40018100 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 40018100: 9d e3 bf 90 save %sp, -112, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 40018104: 40 00 06 f4 call 40019cd4 40018108: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4001810c: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 40018110: 91 2a 20 10 sll %o0, 0x10, %o0 40018114: 91 32 20 10 srl %o0, 0x10, %o0 40018118: 80 a2 00 01 cmp %o0, %g1 4001811c: 02 80 00 04 be 4001812c 40018120: 80 a2 20 00 cmp %o0, 0 40018124: 12 80 00 0c bne 40018154 <== NOT EXECUTED 40018128: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EPERM ); #endif jnode->st_uid = owner; 4001812c: f2 36 20 38 sth %i1, [ %i0 + 0x38 ] jnode->st_gid = group; 40018130: f4 36 20 3a sth %i2, [ %i0 + 0x3a ] IMFS_update_ctime( jnode ); 40018134: 90 07 bf f0 add %fp, -16, %o0 40018138: 7f ff b8 25 call 400061cc 4001813c: 92 10 20 00 clr %o1 40018140: c2 07 bf f0 ld [ %fp + -16 ], %g1 40018144: 84 10 20 00 clr %g2 40018148: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 4001814c: 81 c7 e0 08 ret 40018150: 91 e8 00 02 restore %g0, %g2, %o0 #if defined(RTEMS_POSIX_API) st_uid = geteuid(); if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) rtems_set_errno_and_return_minus_one( EPERM ); 40018154: 40 00 3d 4a call 4002767c <__errno> <== NOT EXECUTED 40018158: 01 00 00 00 nop <== NOT EXECUTED 4001815c: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40018160: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 40018164: 10 bf ff fa b 4001814c <== NOT EXECUTED 40018168: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f1d4 : IMFS_jnode_types_t type, char *name, mode_t mode, IMFS_types_union *info ) { 4000f1d4: 9d e3 bf 90 save %sp, -112, %sp struct timeval tv; IMFS_jnode_t *parent = NULL; IMFS_fs_info_t *fs_info; char *sym_name; if ( parent_loc != NULL ) 4000f1d8: a6 96 20 00 orcc %i0, 0, %l3 4000f1dc: 02 80 00 03 be 4000f1e8 4000f1e0: a4 10 20 00 clr %l2 parent = parent_loc->node_access; 4000f1e4: e4 04 c0 00 ld [ %l3 ], %l2 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000f1e8: 90 10 20 01 mov 1, %o0 4000f1ec: 92 10 20 5c mov 0x5c, %o1 4000f1f0: 7f ff d1 53 call 4000373c 4000f1f4: b0 10 20 00 clr %i0 if ( !node ) 4000f1f8: a2 92 20 00 orcc %o0, 0, %l1 4000f1fc: 02 80 00 24 be 4000f28c 4000f200: 82 10 20 01 mov 1, %g1 * Fill in the basic information */ node->st_nlink = 1; node->type = type; strncpy( node->name, name, IMFS_NAME_MAX ); 4000f204: 92 10 00 1a mov %i2, %o1 4000f208: 94 10 20 20 mov 0x20, %o2 /* * Fill in the basic information */ node->st_nlink = 1; 4000f20c: c2 34 60 30 sth %g1, [ %l1 + 0x30 ] node->type = type; 4000f210: f2 24 60 48 st %i1, [ %l1 + 0x48 ] strncpy( node->name, name, IMFS_NAME_MAX ); 4000f214: 40 00 08 9f call 40011490 4000f218: 90 04 60 0c add %l1, 0xc, %o0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000f21c: 05 10 00 6c sethi %hi(0x4001b000), %g2 4000f220: c6 00 a0 50 ld [ %g2 + 0x50 ], %g3 ! 4001b050 /* * Allocate an IMFS jnode */ node = calloc( 1, sizeof( IMFS_jnode_t ) ); 4000f224: b0 10 00 11 mov %l1, %i0 /* * Fill in the mode and permission information for the jnode structure. */ node->st_mode = mode & ~rtems_filesystem_umask; 4000f228: c2 10 e0 24 lduh [ %g3 + 0x24 ], %g1 4000f22c: 82 2e c0 01 andn %i3, %g1, %g1 #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); 4000f230: 7f ff f8 22 call 4000d2b8 4000f234: c2 34 60 2e sth %g1, [ %l1 + 0x2e ] node->st_gid = getegid(); 4000f238: 7f ff f8 1c call 4000d2a8 4000f23c: d0 34 60 38 sth %o0, [ %l1 + 0x38 ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000f240: 92 10 20 00 clr %o1 node->st_mode = mode & ~rtems_filesystem_umask; #if defined(RTEMS_POSIX_API) node->st_uid = geteuid(); node->st_gid = getegid(); 4000f244: d0 34 60 3a sth %o0, [ %l1 + 0x3a ] /* * Now set all the times. */ gettimeofday( &tv, 0 ); 4000f248: 7f ff f8 20 call 4000d2c8 4000f24c: 90 07 bf f0 add %fp, -16, %o0 node->stat_atime = (time_t) tv.tv_sec; 4000f250: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Set the type specific information */ switch (type) { 4000f254: 80 a6 60 06 cmp %i1, 6 gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; node->stat_mtime = (time_t) tv.tv_sec; node->stat_ctime = (time_t) tv.tv_sec; 4000f258: c2 24 60 44 st %g1, [ %l1 + 0x44 ] * Now set all the times. */ gettimeofday( &tv, 0 ); node->stat_atime = (time_t) tv.tv_sec; 4000f25c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] /* * Set the type specific information */ switch (type) { 4000f260: 08 80 00 0d bleu 4000f294 4000f264: c2 24 60 40 st %g1, [ %l1 + 0x40 ] node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; break; default: assert(0); 4000f268: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED 4000f26c: 15 10 00 67 sethi %hi(0x40019c00), %o2 <== NOT EXECUTED 4000f270: 90 12 21 c0 or %o0, 0x1c0, %o0 <== NOT EXECUTED 4000f274: 94 12 a0 08 or %o2, 8, %o2 <== NOT EXECUTED 4000f278: 7f ff cf 97 call 400030d4 <__assert> <== NOT EXECUTED 4000f27c: 92 10 20 77 mov 0x77, %o1 <== NOT EXECUTED /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000f280: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 4000f284: 12 80 00 13 bne 4000f2d0 <== NOT EXECUTED 4000f288: 90 04 a0 4c add %l2, 0x4c, %o0 <== NOT EXECUTED node->st_ino = ++fs_info->ino_count; } return node; } 4000f28c: 81 c7 e0 08 ret 4000f290: 81 e8 00 00 restore /* * Set the type specific information */ switch (type) { 4000f294: 83 2e 60 02 sll %i1, 2, %g1 4000f298: 05 10 00 3c sethi %hi(0x4000f000), %g2 4000f29c: 84 10 a1 b8 or %g2, 0x1b8, %g2 ! 4000f1b8 4000f2a0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000f2a4: 81 c0 c0 00 jmp %g3 4000f2a8: 01 00 00 00 nop node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 4000f2ac: c0 24 60 4c clr [ %l1 + 0x4c ] <== NOT EXECUTED node->info.linearfile.direct = 0; 4000f2b0: c0 24 60 50 clr [ %l1 + 0x50 ] <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; 4000f2b4: c0 24 60 4c clr [ %l1 + 0x4c ] node->info.file.indirect = 0; 4000f2b8: c0 24 60 50 clr [ %l1 + 0x50 ] node->info.file.doubly_indirect = 0; 4000f2bc: c0 24 60 54 clr [ %l1 + 0x54 ] node->info.file.triply_indirect = 0; 4000f2c0: c0 24 60 58 clr [ %l1 + 0x58 ] /* * If this node has a parent, then put it in that directory list. */ if ( parent ) { 4000f2c4: 80 a4 a0 00 cmp %l2, 0 4000f2c8: 02 bf ff f1 be 4000f28c 4000f2cc: 90 04 a0 4c add %l2, 0x4c, %o0 Chain_Append( &parent->info.directory.Entries, &node->Node ); 4000f2d0: 7f ff e3 09 call 40007ef4 <_Chain_Append> 4000f2d4: 92 10 00 11 mov %l1, %o1 node->Parent = parent; fs_info = parent_loc->mt_entry->fs_info; 4000f2d8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 * If this node has a parent, then put it in that directory list. */ if ( parent ) { Chain_Append( &parent->info.directory.Entries, &node->Node ); node->Parent = parent; 4000f2dc: e4 24 60 08 st %l2, [ %l1 + 8 ] fs_info = parent_loc->mt_entry->fs_info; 4000f2e0: c6 00 60 2c ld [ %g1 + 0x2c ], %g3 node->st_ino = ++fs_info->ino_count; 4000f2e4: c4 00 c0 00 ld [ %g3 ], %g2 4000f2e8: 84 00 a0 01 inc %g2 4000f2ec: c4 20 c0 00 st %g2, [ %g3 ] 4000f2f0: c4 24 60 34 st %g2, [ %l1 + 0x34 ] } return node; } 4000f2f4: 81 c7 e0 08 ret 4000f2f8: 81 e8 00 00 restore case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: sym_name = calloc( 1, strlen( info->sym_link.name ) + 1 ); 4000f2fc: 40 00 07 fb call 400112e8 4000f300: d0 07 00 00 ld [ %i4 ], %o0 4000f304: 92 02 20 01 add %o0, 1, %o1 4000f308: 7f ff d1 0d call 4000373c 4000f30c: 90 10 20 01 mov 1, %o0 strcpy( sym_name, info->sym_link.name ); 4000f310: d2 07 00 00 ld [ %i4 ], %o1 4000f314: 40 00 07 d5 call 40011268 4000f318: a0 10 00 08 mov %o0, %l0 node->info.sym_link.name = sym_name; 4000f31c: 10 bf ff ea b 4000f2c4 4000f320: e0 24 60 4c st %l0, [ %l1 + 0x4c ] case IMFS_DIRECTORY: Chain_Initialize_empty(&node->info.directory.Entries); break; case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; 4000f324: c2 07 00 00 ld [ %i4 ], %g1 4000f328: 10 bf ff e7 b 4000f2c4 4000f32c: c2 24 60 4c st %g1, [ %l1 + 0x4c ] node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; 4000f330: c2 07 20 04 ld [ %i4 + 4 ], %g1 strcpy( sym_name, info->sym_link.name ); node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000f334: c4 07 00 00 ld [ %i4 ], %g2 node->info.device.minor = info->device.minor; 4000f338: c2 24 60 50 st %g1, [ %l1 + 0x50 ] strcpy( sym_name, info->sym_link.name ); node->info.sym_link.name = sym_name; break; case IMFS_DEVICE: node->info.device.major = info->device.major; 4000f33c: 10 bf ff e2 b 4000f2c4 4000f340: c4 24 60 4c st %g2, [ %l1 + 0x4c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000f344: 82 04 60 50 add %l1, 0x50, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000f348: 84 04 60 4c add %l1, 0x4c, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000f34c: c0 24 60 50 clr [ %l1 + 0x50 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000f350: c2 24 60 4c st %g1, [ %l1 + 0x4c ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000f354: 10 bf ff dc b 4000f2c4 4000f358: c4 24 60 54 st %g2, [ %l1 + 0x54 ] 40004c1c : void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 40004c1c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; Chain_Control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004c20: 80 a6 20 00 cmp %i0, 0 40004c24: 02 80 00 3a be 40004d0c 40004c28: 11 10 00 84 sethi %hi(0x40021000), %o0 assert( level >= 0 ); 40004c2c: 80 a6 60 00 cmp %i1, 0 40004c30: 06 80 00 30 bl 40004cf0 40004c34: 11 10 00 84 sethi %hi(0x40021000), %o0 assert( the_directory->type == IMFS_DIRECTORY ); 40004c38: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 40004c3c: 80 a0 60 01 cmp %g1, 1 40004c40: 02 80 00 07 be 40004c5c 40004c44: 11 10 00 84 sethi %hi(0x40021000), %o0 40004c48: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40004c4c: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 40004c50: 94 12 a1 10 or %o2, 0x110, %o2 <== NOT EXECUTED 40004c54: 40 00 01 e0 call 400053d4 <__assert> <== NOT EXECUTED 40004c58: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 40004c5c: e2 06 20 4c ld [ %i0 + 0x4c ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40004c60: b0 06 20 50 add %i0, 0x50, %i0 !_Chain_Is_tail( the_chain, the_node ); 40004c64: 80 a4 40 18 cmp %l1, %i0 40004c68: 02 80 00 1c be 40004cd8 40004c6c: 03 10 00 84 sethi %hi(0x40021000), %g1 40004c70: 25 10 00 8c sethi %hi(0x40023000), %l2 40004c74: a6 10 61 38 or %g1, 0x138, %l3 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004c78: a8 06 60 01 add %i1, 1, %l4 !_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++ ) 40004c7c: 80 a6 60 00 cmp %i1, 0 40004c80: 06 80 00 0c bl 40004cb0 40004c84: c2 04 a2 28 ld [ %l2 + 0x228 ], %g1 40004c88: a0 10 20 00 clr %l0 fprintf(stdout, "...." ); 40004c8c: 90 10 00 13 mov %l3, %o0 40004c90: d6 00 60 08 ld [ %g1 + 8 ], %o3 40004c94: 92 10 20 01 mov 1, %o1 40004c98: 40 00 42 73 call 40015664 40004c9c: 94 10 20 04 mov 4, %o2 !_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++ ) 40004ca0: a0 04 20 01 inc %l0 40004ca4: 80 a6 40 10 cmp %i1, %l0 40004ca8: 16 bf ff f9 bge 40004c8c 40004cac: c2 04 a2 28 ld [ %l2 + 0x228 ], %g1 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 40004cb0: 7f ff ff 7e call 40004aa8 40004cb4: 90 10 00 11 mov %l1, %o0 if ( the_jnode->type == IMFS_DIRECTORY ) 40004cb8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 40004cbc: 80 a0 60 01 cmp %g1, 1 40004cc0: 22 80 00 08 be,a 40004ce0 40004cc4: 90 10 00 11 mov %l1, %o0 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004cc8: e2 04 40 00 ld [ %l1 ], %l1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 40004ccc: 80 a4 40 18 cmp %l1, %i0 40004cd0: 12 bf ff ec bne 40004c80 40004cd4: 80 a6 60 00 cmp %i1, 0 40004cd8: 81 c7 e0 08 ret 40004cdc: 81 e8 00 00 restore for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 40004ce0: 7f ff ff cf call 40004c1c 40004ce4: 92 10 00 14 mov %l4, %o1 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); the_node = the_node->next ) { 40004ce8: 10 bf ff f9 b 40004ccc 40004cec: e2 04 40 00 ld [ %l1 ], %l1 IMFS_jnode_t *the_jnode; int i; assert( the_directory ); assert( level >= 0 ); 40004cf0: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40004cf4: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 40004cf8: 94 12 a1 00 or %o2, 0x100, %o2 <== NOT EXECUTED 40004cfc: 40 00 01 b6 call 400053d4 <__assert> <== NOT EXECUTED 40004d00: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 40004d04: 10 bf ff ce b 40004c3c <== NOT EXECUTED 40004d08: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED Chain_Node *the_node; Chain_Control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 40004d0c: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40004d10: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 40004d14: 94 12 a0 f0 or %o2, 0xf0, %o2 <== NOT EXECUTED 40004d18: 40 00 01 af call 400053d4 <__assert> <== NOT EXECUTED 40004d1c: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED assert( level >= 0 ); 40004d20: 10 bf ff c4 b 40004c30 <== NOT EXECUTED 40004d24: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4000c320 : int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000c320: 9d e3 bf 70 save %sp, -144, %sp /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000c324: e2 06 80 00 ld [ %i2 ], %l1 int IMFS_eval_path( const char *pathname, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000c328: a6 10 00 18 mov %i0, %l3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 4000c32c: a4 10 20 00 clr %l2 4000c330: a8 07 bf d3 add %fp, -45, %l4 4000c334: aa 07 bf f4 add %fp, -12, %l5 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000c338: 2d 10 00 6c sethi %hi(0x4001b000), %l6 * 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], token, &len ); 4000c33c: 90 04 c0 12 add %l3, %l2, %o0 4000c340: 92 10 00 14 mov %l4, %o1 4000c344: 40 00 01 f4 call 4000cb14 4000c348: 94 10 00 15 mov %l5, %o2 i += len; if ( !pathloc->node_access ) 4000c34c: c6 06 80 00 ld [ %i2 ], %g3 * 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], token, &len ); 4000c350: a0 10 00 08 mov %o0, %l0 i += len; if ( !pathloc->node_access ) 4000c354: 80 a0 e0 00 cmp %g3, 0 4000c358: 02 80 00 4c be 4000c488 4000c35c: c2 07 bf f4 ld [ %fp + -12 ], %g1 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 4000c360: 80 a2 20 00 cmp %o0, 0 4000c364: 12 80 00 11 bne 4000c3a8 4000c368: a4 04 80 01 add %l2, %g1, %l2 * 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 ) { 4000c36c: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000c370: 80 a0 60 01 cmp %g1, 1 4000c374: 22 80 00 52 be,a 4000c4bc 4000c378: c6 00 e0 58 ld [ %g3 + 0x58 ], %g3 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000c37c: 7f ff ff 92 call 4000c1c4 4000c380: 90 10 00 1a mov %i2, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000c384: 92 10 00 19 mov %i1, %o1 return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 4000c388: b0 10 00 08 mov %o0, %i0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 4000c38c: 7f ff ff ac call 4000c23c 4000c390: 90 10 00 1a mov %i2, %o0 4000c394: 80 a2 20 00 cmp %o0, 0 4000c398: 02 80 00 6b be 4000c544 4000c39c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000c3a0: 81 c7 e0 08 ret 4000c3a4: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) 4000c3a8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1 4000c3ac: 80 a0 60 01 cmp %g1, 1 4000c3b0: 02 80 00 3c be 4000c4a0 4000c3b4: 90 10 00 1a mov %i2, %o0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 4000c3b8: 80 a4 20 03 cmp %l0, 3 4000c3bc: 02 80 00 21 be 4000c440 4000c3c0: a2 10 00 03 mov %g3, %l1 4000c3c4: 80 a4 20 04 cmp %l0, 4 4000c3c8: 02 80 00 18 be 4000c428 4000c3cc: 80 a4 20 02 cmp %l0, 2 4000c3d0: 02 80 00 06 be 4000c3e8 4000c3d4: 80 a4 20 04 cmp %l0, 4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 4000c3d8: 12 bf ff da bne 4000c340 4000c3dc: 90 04 c0 12 add %l3, %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 ) { 4000c3e0: 10 bf ff e4 b 4000c370 <== NOT EXECUTED 4000c3e4: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 <== NOT EXECUTED case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 4000c3e8: c2 05 a0 50 ld [ %l6 + 0x50 ], %g1 4000c3ec: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 4000c3f0: 80 a0 80 03 cmp %g2, %g3 4000c3f4: 02 bf ff d3 be 4000c340 4000c3f8: 90 04 c0 12 add %l3, %l2, %o0 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 4000c3fc: d8 06 a0 0c ld [ %i2 + 0xc ], %o4 4000c400: c2 03 20 18 ld [ %o4 + 0x18 ], %g1 4000c404: 80 a0 40 03 cmp %g1, %g3 4000c408: 22 80 00 5b be,a 4000c574 4000c40c: c8 03 20 10 ld [ %o4 + 0x10 ], %g4 *pathloc = newloc; return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) 4000c410: e2 00 e0 08 ld [ %g3 + 8 ], %l1 4000c414: 80 a4 60 00 cmp %l1, 0 4000c418: 02 80 00 46 be 4000c530 4000c41c: 01 00 00 00 nop /* * Set the node access to the point we have found. */ pathloc->node_access = node; 4000c420: 10 bf ff c8 b 4000c340 4000c424: e2 26 80 00 st %l1, [ %i2 ] case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 4000c428: 40 00 0e d2 call 4000ff70 <__errno> 4000c42c: b0 10 3f ff mov -1, %i0 4000c430: 82 10 20 5b mov 0x5b, %g1 4000c434: c2 22 00 00 st %g1, [ %o0 ] 4000c438: 81 c7 e0 08 ret 4000c43c: 81 e8 00 00 restore case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 4000c440: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 4000c444: 80 a0 60 03 cmp %g1, 3 4000c448: 02 80 00 31 be 4000c50c 4000c44c: 80 a0 60 04 cmp %g1, 4 node = pathloc->node_access; if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 4000c450: 02 80 00 54 be 4000c5a0 4000c454: 90 10 00 1a mov %i2, %o0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 4000c458: 80 a0 60 01 cmp %g1, 1 4000c45c: 12 80 00 40 bne 4000c55c 4000c460: 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 ) { 4000c464: c6 04 60 58 ld [ %l1 + 0x58 ], %g3 4000c468: 80 a0 e0 00 cmp %g3, 0 4000c46c: 12 80 00 17 bne 4000c4c8 4000c470: 90 10 00 11 mov %l1, %o0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 4000c474: 40 00 01 76 call 4000ca4c 4000c478: 92 10 00 14 mov %l4, %o1 if ( !node ) 4000c47c: a2 92 20 00 orcc %o0, 0, %l1 4000c480: 32 bf ff af bne,a 4000c33c 4000c484: e2 26 80 00 st %l1, [ %i2 ] rtems_set_errno_and_return_minus_one( ENOENT ); 4000c488: 40 00 0e ba call 4000ff70 <__errno> 4000c48c: b0 10 3f ff mov -1, %i0 4000c490: 82 10 20 02 mov 2, %g1 4000c494: c2 22 00 00 st %g1, [ %o0 ] 4000c498: 81 c7 e0 08 ret 4000c49c: 81 e8 00 00 restore /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 4000c4a0: 7f ff ff 67 call 4000c23c 4000c4a4: 92 10 20 01 mov 1, %o1 4000c4a8: 80 a2 20 00 cmp %o0, 0 4000c4ac: 02 80 00 37 be 4000c588 4000c4b0: 01 00 00 00 nop 4000c4b4: 10 bf ff c1 b 4000c3b8 4000c4b8: c6 06 80 00 ld [ %i2 ], %g3 * * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { 4000c4bc: 80 a0 e0 00 cmp %g3, 0 4000c4c0: 02 bf ff af be 4000c37c 4000c4c4: 01 00 00 00 nop newloc = node->info.directory.mt_fs->mt_fs_root; 4000c4c8: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4 *pathloc = newloc; 4000c4cc: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000c4d0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000c4d4: da 01 00 00 ld [ %g4 ], %o5 * NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; 4000c4d8: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3 *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000c4dc: d0 07 bf f4 ld [ %fp + -12 ], %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000c4e0: c2 26 a0 0c st %g1, [ %i2 + 0xc ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000c4e4: 90 24 80 08 sub %l2, %o0, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000c4e8: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000c4ec: c6 26 80 00 st %g3, [ %i2 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000c4f0: 90 02 00 13 add %o0, %l3, %o0 */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 4000c4f4: c8 26 a0 08 st %g4, [ %i2 + 8 ] return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc ); 4000c4f8: 92 10 00 19 mov %i1, %o1 4000c4fc: 9f c3 40 00 call %o5 4000c500: 94 10 00 1a mov %i2, %o2 4000c504: 81 c7 e0 08 ret 4000c508: 91 e8 00 08 restore %g0, %o0, %o0 * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { IMFS_evaluate_hard_link( pathloc, 0 ); 4000c50c: 90 10 00 1a mov %i2, %o0 4000c510: 7f ff ff 69 call 4000c2b4 4000c514: 92 10 20 00 clr %o1 node = pathloc->node_access; 4000c518: d0 06 80 00 ld [ %i2 ], %o0 if ( !node ) 4000c51c: 80 a2 20 00 cmp %o0, 0 4000c520: 02 80 00 0f be 4000c55c 4000c524: a2 10 00 08 mov %o0, %l1 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000c528: 10 bf ff cc b 4000c458 4000c52c: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); } } else { if ( !node->Parent ) rtems_set_errno_and_return_minus_one( ENOENT ); 4000c530: 40 00 0e 90 call 4000ff70 <__errno> 4000c534: b0 10 3f ff mov -1, %i0 4000c538: e0 22 00 00 st %l0, [ %o0 ] 4000c53c: 81 c7 e0 08 ret 4000c540: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000c544: 40 00 0e 8b call 4000ff70 <__errno> 4000c548: b0 10 3f ff mov -1, %i0 4000c54c: 82 10 20 0d mov 0xd, %g1 4000c550: c2 22 00 00 st %g1, [ %o0 ] return result; } 4000c554: 81 c7 e0 08 ret 4000c558: 81 e8 00 00 restore /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 4000c55c: 40 00 0e 85 call 4000ff70 <__errno> 4000c560: b0 10 3f ff mov -1, %i0 4000c564: 82 10 20 14 mov 0x14, %g1 4000c568: c2 22 00 00 st %g1, [ %o0 ] 4000c56c: 81 c7 e0 08 ret 4000c570: 81 e8 00 00 restore if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; *pathloc = newloc; 4000c574: c2 03 20 14 ld [ %o4 + 0x14 ], %g1 return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc); 4000c578: da 01 00 00 ld [ %g4 ], %o5 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 4000c57c: c4 03 20 0c ld [ %o4 + 0xc ], %g2 4000c580: 10 bf ff d7 b 4000c4dc 4000c584: c6 03 20 08 ld [ %o4 + 8 ], %g3 * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) if ( node->type == IMFS_DIRECTORY ) if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000c588: 40 00 0e 7a call 4000ff70 <__errno> 4000c58c: b0 10 3f ff mov -1, %i0 4000c590: 82 10 20 0d mov 0xd, %g1 4000c594: c2 22 00 00 st %g1, [ %o0 ] 4000c598: 81 c7 e0 08 ret 4000c59c: 81 e8 00 00 restore if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 4000c5a0: 40 00 00 09 call 4000c5c4 4000c5a4: 92 10 20 00 clr %o1 4000c5a8: b0 10 00 08 mov %o0, %i0 node = pathloc->node_access; if ( result == -1 ) 4000c5ac: 80 a2 3f ff cmp %o0, -1 4000c5b0: 02 bf ff 7c be 4000c3a0 4000c5b4: d0 06 80 00 ld [ %i2 ], %o0 } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); node = pathloc->node_access; 4000c5b8: c2 02 20 48 ld [ %o0 + 0x48 ], %g1 4000c5bc: 10 bf ff a7 b 4000c458 4000c5c0: a2 10 00 08 mov %o0, %l1 4000c2b4 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000c2b4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000c2b8: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 4000c2bc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000c2c0: 80 a0 60 03 cmp %g1, 3 4000c2c4: 22 80 00 05 be,a 4000c2d8 4000c2c8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000c2cc: 7f ff ee 34 call 40007b9c <== NOT EXECUTED 4000c2d0: 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; 4000c2d4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED IMFS_Set_handlers( node ); 4000c2d8: 90 10 00 18 mov %i0, %o0 4000c2dc: 7f ff ff ba call 4000c1c4 4000c2e0: c2 26 00 00 st %g1, [ %i0 ] /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000c2e4: 90 10 00 18 mov %i0, %o0 4000c2e8: 92 10 00 19 mov %i1, %o1 4000c2ec: 7f ff ff d4 call 4000c23c 4000c2f0: b0 10 20 00 clr %i0 4000c2f4: 80 a2 20 00 cmp %o0, 0 4000c2f8: 02 80 00 04 be 4000c308 4000c2fc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000c300: 81 c7 e0 08 ret 4000c304: 81 e8 00 00 restore /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000c308: 40 00 0f 1a call 4000ff70 <__errno> <== NOT EXECUTED 4000c30c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000c310: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000c314: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return result; } 4000c318: 81 c7 e0 08 ret <== NOT EXECUTED 4000c31c: 81 e8 00 00 restore <== NOT EXECUTED 4000c6b0 : int IMFS_evaluate_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000c6b0: 9d e3 bf 98 save %sp, -104, %sp 4000c6b4: 10 80 00 07 b 4000c6d0 4000c6b8: 23 10 00 6c sethi %hi(0x4001b000), %l1 */ if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) 4000c6bc: 02 80 00 23 be 4000c748 4000c6c0: 82 00 7f fd add %g1, -3, %g1 result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000c6c4: 80 a0 60 01 cmp %g1, 1 4000c6c8: 18 80 00 1c bgu 4000c738 4000c6cc: 90 10 20 00 clr %o0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000c6d0: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 { IMFS_jnode_t *jnode; int result = 0; do { jnode = node->node_access; 4000c6d4: e0 06 00 00 ld [ %i0 ], %l0 /* * Increment and check the link counter. */ rtems_filesystem_link_counts ++; 4000c6d8: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1 4000c6dc: 82 00 60 01 inc %g1 4000c6e0: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ] if ( rtems_filesystem_link_counts > MAXSYMLINK ) { 4000c6e4: 83 28 60 10 sll %g1, 0x10, %g1 4000c6e8: 83 30 60 10 srl %g1, 0x10, %g1 4000c6ec: 80 a0 60 05 cmp %g1, 5 4000c6f0: 18 80 00 1b bgu 4000c75c 4000c6f4: 01 00 00 00 nop /* * Follow the Link node. */ if ( jnode->type == IMFS_HARD_LINK ) 4000c6f8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000c6fc: 80 a0 60 03 cmp %g1, 3 4000c700: 12 bf ff ef bne 4000c6bc 4000c704: 80 a0 60 04 cmp %g1, 4 result = IMFS_evaluate_hard_link( node, flags ); 4000c708: 90 10 00 18 mov %i0, %o0 4000c70c: 7f ff fe ea call 4000c2b4 4000c710: 92 10 00 19 mov %i1, %o1 else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000c714: 80 a2 20 00 cmp %o0, 0 4000c718: 12 80 00 09 bne 4000c73c 4000c71c: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 4000c720: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000c724: 82 00 7f fd add %g1, -3, %g1 4000c728: 80 a0 60 01 cmp %g1, 1 4000c72c: 08 bf ff ea bleu 4000c6d4 4000c730: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 4000c734: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Clear link counter. */ rtems_filesystem_link_counts = 0; 4000c738: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 4000c73c: c0 30 60 26 clrh [ %g1 + 0x26 ] return result; } 4000c740: 81 c7 e0 08 ret 4000c744: 91 e8 00 08 restore %g0, %o0, %o0 if ( jnode->type == IMFS_HARD_LINK ) result = IMFS_evaluate_hard_link( node, flags ); else if (jnode->type == IMFS_SYM_LINK ) result = IMFS_evaluate_sym_link( node, flags ); 4000c748: 90 10 00 18 mov %i0, %o0 4000c74c: 7f ff ff 9e call 4000c5c4 4000c750: 92 10 00 19 mov %i1, %o1 } while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) || ( jnode->type == IMFS_HARD_LINK ) ) ); 4000c754: 10 bf ff f1 b 4000c718 4000c758: 80 a2 20 00 cmp %o0, 0 */ rtems_filesystem_link_counts ++; if ( rtems_filesystem_link_counts > MAXSYMLINK ) { rtems_filesystem_link_counts = 0; rtems_set_errno_and_return_minus_one( ELOOP ); 4000c75c: 40 00 0e 05 call 4000ff70 <__errno> 4000c760: c0 30 a0 26 clrh [ %g2 + 0x26 ] 4000c764: 82 10 20 5c mov 0x5c, %g1 4000c768: c2 22 00 00 st %g1, [ %o0 ] 4000c76c: 90 10 3f ff mov -1, %o0 */ rtems_filesystem_link_counts = 0; return result; } 4000c770: 81 c7 e0 08 ret 4000c774: 91 e8 00 08 restore %g0, %o0, %o0 4000c5c4 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 4000c5c4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode = node->node_access; 4000c5c8: e0 06 00 00 ld [ %i0 ], %l0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 4000c5cc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000c5d0: 80 a0 60 04 cmp %g1, 4 4000c5d4: 22 80 00 05 be,a 4000c5e8 4000c5d8: c2 04 20 08 ld [ %l0 + 8 ], %g1 rtems_fatal_error_occurred (0xABCD0000); 4000c5dc: 7f ff ed 70 call 40007b9c <== NOT EXECUTED 4000c5e0: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED if ( !jnode->Parent ) 4000c5e4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000c5e8: 80 a0 60 00 cmp %g1, 0 4000c5ec: 02 80 00 28 be 4000c68c 4000c5f0: 01 00 00 00 nop /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 4000c5f4: c2 26 00 00 st %g1, [ %i0 ] rtems_filesystem_get_sym_start_loc( 4000c5f8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 4000c5fc: c2 48 80 00 ldsb [ %g2 ], %g1 4000c600: 80 a0 60 2f cmp %g1, 0x2f 4000c604: 02 80 00 15 be 4000c658 4000c608: 80 a0 60 5c cmp %g1, 0x5c 4000c60c: 02 80 00 13 be 4000c658 4000c610: 80 a0 60 00 cmp %g1, 0 4000c614: 02 80 00 11 be 4000c658 4000c618: 90 10 20 00 clr %o0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 4000c61c: 90 02 00 02 add %o0, %g2, %o0 4000c620: 94 10 00 18 mov %i0, %o2 4000c624: 7f ff ff 3f call 4000c320 4000c628: 92 10 00 19 mov %i1, %o1 4000c62c: a0 10 00 08 mov %o0, %l0 &jnode->info.sym_link.name[i], flags, node ); IMFS_Set_handlers( node ); 4000c630: 7f ff fe e5 call 4000c1c4 4000c634: 90 10 00 18 mov %i0, %o0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 4000c638: 90 10 00 18 mov %i0, %o0 4000c63c: 7f ff ff 00 call 4000c23c 4000c640: 92 10 00 19 mov %i1, %o1 4000c644: 80 a2 20 00 cmp %o0, 0 4000c648: 02 80 00 15 be 4000c69c 4000c64c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EACCES ); return result; } 4000c650: 81 c7 e0 08 ret 4000c654: 91 e8 00 10 restore %g0, %l0, %o0 * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 4000c658: 03 10 00 6c sethi %hi(0x4001b000), %g1 4000c65c: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 4000c660: 90 10 20 01 mov 1, %o0 4000c664: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 4000c668: c2 26 00 00 st %g1, [ %i0 ] 4000c66c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 4000c670: c4 26 20 04 st %g2, [ %i0 + 4 ] 4000c674: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000c678: c2 26 20 08 st %g1, [ %i0 + 8 ] 4000c67c: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 4000c680: c4 26 20 0c st %g2, [ %i0 + 0xc ] 4000c684: 10 bf ff e6 b 4000c61c 4000c688: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) rtems_fatal_error_occurred( 0xBAD00000 ); 4000c68c: 7f ff ed 44 call 40007b9c <== NOT EXECUTED 4000c690: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED 4000c694: 10 bf ff d8 b 4000c5f4 <== NOT EXECUTED 4000c698: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) rtems_set_errno_and_return_minus_one( EACCES ); 4000c69c: 40 00 0e 35 call 4000ff70 <__errno> <== NOT EXECUTED 4000c6a0: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED 4000c6a4: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED 4000c6a8: 10 bf ff ea b 4000c650 <== NOT EXECUTED 4000c6ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000f35c : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 4000f35c: 9d e3 bf 90 save %sp, -112, %sp /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 4000f360: 7f ff f7 d6 call 4000d2b8 4000f364: f0 06 00 00 ld [ %i0 ], %i0 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 4000f368: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 4000f36c: 91 2a 20 10 sll %o0, 0x10, %o0 4000f370: 91 32 20 10 srl %o0, 0x10, %o0 4000f374: 80 a2 00 01 cmp %o0, %g1 4000f378: 02 80 00 04 be 4000f388 4000f37c: 80 a2 20 00 cmp %o0, 0 4000f380: 12 80 00 13 bne 4000f3cc <== NOT EXECUTED 4000f384: 01 00 00 00 nop <== NOT EXECUTED #endif /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) 4000f388: 83 2e 60 10 sll %i1, 0x10, %g1 4000f38c: 83 30 60 10 srl %g1, 0x10, %g1 4000f390: 82 08 7e 00 and %g1, -512, %g1 4000f394: 80 a0 60 00 cmp %g1, 0 4000f398: 12 80 00 0d bne 4000f3cc 4000f39c: 90 07 bf f0 add %fp, -16, %o0 rtems_set_errno_and_return_minus_one( EPERM ); jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO); 4000f3a0: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 jnode->st_mode |= mode; 4000f3a4: 82 08 7e 00 and %g1, -512, %g1 4000f3a8: 82 10 40 19 or %g1, %i1, %g1 IMFS_update_ctime( jnode ); 4000f3ac: 92 10 20 00 clr %o1 4000f3b0: 7f ff f7 c6 call 4000d2c8 4000f3b4: c2 36 20 2e sth %g1, [ %i0 + 0x2e ] 4000f3b8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4000f3bc: 84 10 20 00 clr %g2 4000f3c0: c2 26 20 44 st %g1, [ %i0 + 0x44 ] return 0; } 4000f3c4: 81 c7 e0 08 ret 4000f3c8: 91 e8 00 02 restore %g0, %g2, %o0 /* * Change only the RWX permissions on the jnode to mode. */ if ( mode & (~ (S_IRWXU | S_IRWXG | S_IRWXO ) ) ) rtems_set_errno_and_return_minus_one( EPERM ); 4000f3cc: 40 00 02 e9 call 4000ff70 <__errno> 4000f3d0: 01 00 00 00 nop 4000f3d4: 82 10 20 01 mov 1, %g1 ! 1 4000f3d8: 84 10 3f ff mov -1, %g2 4000f3dc: 10 bf ff fa b 4000f3c4 4000f3e0: c2 22 00 00 st %g1, [ %o0 ] 4000ca4c : IMFS_jnode_t *IMFS_find_match_in_dir( IMFS_jnode_t *directory, char *name ) { 4000ca4c: 9d e3 bf 98 save %sp, -104, %sp /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000ca50: 80 a6 20 00 cmp %i0, 0 4000ca54: 02 80 00 18 be 4000cab4 4000ca58: 11 10 00 68 sethi %hi(0x4001a000), %o0 if ( !name ) 4000ca5c: 80 a6 60 00 cmp %i1, 0 4000ca60: 12 80 00 04 bne 4000ca70 4000ca64: 80 a6 20 00 cmp %i0, 0 if ( !strcmp( name, the_jnode->name ) ) return the_jnode; } return 0; } 4000ca68: 81 c7 e0 08 ret 4000ca6c: 91 e8 20 00 restore %g0, 0, %o0 assert( directory ); if ( !name ) return 0; assert( name ); if ( !directory ) 4000ca70: 02 80 00 0f be 4000caac 4000ca74: 90 10 00 19 mov %i1, %o0 /* * Check for "." and ".." */ if ( !strcmp( name, dotname ) ) 4000ca78: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000ca7c: 40 00 11 cb call 400111a8 4000ca80: 92 12 63 d0 or %o1, 0x3d0, %o1 ! 4001afd0 4000ca84: 80 a2 20 00 cmp %o0, 0 4000ca88: 02 80 00 09 be 4000caac 4000ca8c: 90 10 00 19 mov %i1, %o0 return directory; if ( !strcmp( name, dotdotname ) ) 4000ca90: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000ca94: 40 00 11 c5 call 400111a8 4000ca98: 92 12 63 d8 or %o1, 0x3d8, %o1 ! 4001afd8 4000ca9c: 80 a2 20 00 cmp %o0, 0 4000caa0: 32 80 00 0c bne,a 4000cad0 4000caa4: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 return directory->Parent; 4000caa8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000caac: 81 c7 e0 08 ret <== NOT EXECUTED 4000cab0: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for fatal errors. A NULL directory show a problem in the * the IMFS code. */ assert( directory ); 4000cab4: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000cab8: 90 12 20 40 or %o0, 0x40, %o0 <== NOT EXECUTED 4000cabc: 94 12 a0 90 or %o2, 0x90, %o2 <== NOT EXECUTED 4000cac0: 7f ff d9 85 call 400030d4 <__assert> <== NOT EXECUTED 4000cac4: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED if ( !name ) 4000cac8: 10 bf ff e6 b 4000ca60 <== NOT EXECUTED 4000cacc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000cad0: b0 06 20 50 add %i0, 0x50, %i0 return directory->Parent; the_chain = &directory->info.directory.Entries; for ( the_node = the_chain->first; !_Chain_Is_tail( the_chain, the_node ); 4000cad4: 80 a4 00 18 cmp %l0, %i0 4000cad8: 12 80 00 07 bne 4000caf4 4000cadc: 92 04 20 0c add %l0, 0xc, %o1 4000cae0: 81 c7 e0 08 ret 4000cae4: 91 e8 20 00 restore %g0, 0, %o0 4000cae8: 80 a6 00 10 cmp %i0, %l0 4000caec: 02 bf ff df be 4000ca68 4000caf0: 92 04 20 0c add %l0, 0xc, %o1 the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; if ( !strcmp( name, the_jnode->name ) ) 4000caf4: 40 00 11 ad call 400111a8 4000caf8: 90 10 00 19 mov %i1, %o0 4000cafc: 80 a2 20 00 cmp %o0, 0 4000cb00: 32 bf ff fa bne,a 4000cae8 4000cb04: e0 04 00 00 ld [ %l0 ], %l0 4000cb08: b0 10 00 10 mov %l0, %i0 4000cb0c: 81 c7 e0 08 ret 4000cb10: 81 e8 00 00 restore 40018bbc : ((IMFS_jnode_t *)( Chain_Head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 40018bbc: 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; 40018bc0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 40018bc4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 40018bc8: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 /* * 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; 40018bcc: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 loc = temp_mt_entry->mt_fs_root; 40018bd0: c2 27 bf ec st %g1, [ %fp + -20 ] 40018bd4: c4 3f bf f0 std %g2, [ %fp + -16 ] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 40018bd8: c0 26 20 18 clr [ %i0 + 0x18 ] * 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; 40018bdc: e0 27 bf e8 st %l0, [ %fp + -24 ] 40018be0: a2 07 bf e8 add %fp, -24, %l1 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 40018be4: e0 27 bf e8 st %l0, [ %fp + -24 ] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 40018be8: f0 04 20 08 ld [ %l0 + 8 ], %i0 loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40018bec: 7f ff fd d0 call 4001832c 40018bf0: 90 10 00 11 mov %l1, %o0 if ( jnode->type != IMFS_DIRECTORY ) { 40018bf4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40018bf8: 80 a0 60 01 cmp %g1, 1 40018bfc: 12 80 00 1c bne 40018c6c 40018c00: 84 04 20 50 add %l0, 0x50, %g2 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 40018c04: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40018c08: 80 a0 40 02 cmp %g1, %g2 40018c0c: 02 80 00 18 be 40018c6c 40018c10: 80 a4 20 00 cmp %l0, 0 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } if ( jnode != NULL ) { 40018c14: 02 80 00 1e be 40018c8c 40018c18: 01 00 00 00 nop if ( jnode->type == IMFS_DIRECTORY ) { 40018c1c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40018c20: 80 a0 60 01 cmp %g1, 1 40018c24: 32 bf ff f1 bne,a 40018be8 40018c28: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED if ( jnode_has_children( jnode ) ) 40018c2c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40018c30: 82 04 20 50 add %l0, 0x50, %g1 40018c34: 80 a0 80 01 cmp %g2, %g1 40018c38: 22 bf ff ec be,a 40018be8 40018c3c: e0 27 bf e8 st %l0, [ %fp + -24 ] jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 40018c40: 80 a0 a0 00 cmp %g2, 0 40018c44: 02 80 00 12 be 40018c8c 40018c48: a0 10 00 02 mov %g2, %l0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 40018c4c: 90 10 00 11 mov %l1, %o0 temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; 40018c50: e0 27 bf e8 st %l0, [ %fp + -24 ] IMFS_Set_handlers( &loc ); 40018c54: 7f ff fd b6 call 4001832c 40018c58: f0 04 20 08 ld [ %l0 + 8 ], %i0 if ( jnode->type != IMFS_DIRECTORY ) { 40018c5c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40018c60: 80 a0 60 01 cmp %g1, 1 40018c64: 02 bf ff e8 be 40018c04 40018c68: 84 04 20 50 add %l0, 0x50, %g2 result = IMFS_unlink( &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( &loc ); 40018c6c: 7f ff b3 ed call 40005c20 40018c70: 90 10 00 11 mov %l1, %o0 if (result != 0) 40018c74: 80 a2 20 00 cmp %o0, 0 40018c78: 12 80 00 07 bne 40018c94 40018c7c: a0 10 00 18 mov %i0, %l0 return -1; jnode = next; } if ( jnode != NULL ) { 40018c80: 80 a4 20 00 cmp %l0, 0 40018c84: 32 bf ff e7 bne,a 40018c20 40018c88: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 } } } while (jnode != NULL); return 0; } 40018c8c: 81 c7 e0 08 ret 40018c90: 91 e8 20 00 restore %g0, 0, %o0 jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); 40018c94: 81 c7 e0 08 ret <== NOT EXECUTED 40018c98: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 4000cb14 : IMFS_token_types IMFS_get_token( const char *path, char *token, int *token_len ) { 4000cb14: 9d e3 bf 98 save %sp, -104, %sp register char c; /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; 4000cb18: c4 0e 00 00 ldub [ %i0 ], %g2 while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000cb1c: 87 28 a0 18 sll %g2, 0x18, %g3 4000cb20: 83 38 e0 18 sra %g3, 0x18, %g1 4000cb24: 80 a0 60 2f cmp %g1, 0x2f 4000cb28: 02 80 00 28 be 4000cbc8 4000cb2c: 80 a0 60 5c cmp %g1, 0x5c 4000cb30: 02 80 00 26 be 4000cbc8 4000cb34: 80 a0 60 00 cmp %g1, 0 4000cb38: 02 80 00 41 be 4000cc3c 4000cb3c: 86 10 20 00 clr %g3 token[i] = c; 4000cb40: c4 2e 40 00 stb %g2, [ %i1 ] return IMFS_INVALID_TOKEN; if ( !IMFS_is_valid_name_char(c) ) type = IMFS_INVALID_TOKEN; c = path [++i]; 4000cb44: 86 00 e0 01 inc %g3 /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000cb48: c2 48 c0 18 ldsb [ %g3 + %i0 ], %g1 4000cb4c: 80 a0 60 2f cmp %g1, 0x2f 4000cb50: 02 80 00 07 be 4000cb6c 4000cb54: c4 08 c0 18 ldub [ %g3 + %i0 ], %g2 4000cb58: 80 a0 60 5c cmp %g1, 0x5c 4000cb5c: 02 80 00 04 be 4000cb6c 4000cb60: 80 a0 60 00 cmp %g1, 0 4000cb64: 12 80 00 12 bne 4000cbac 4000cb68: 80 a0 e0 20 cmp %g3, 0x20 i++; type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { 4000cb6c: 82 00 c0 19 add %g3, %i1, %g1 4000cb70: c4 48 7f ff ldsb [ %g1 + -1 ], %g2 4000cb74: 80 a0 a0 00 cmp %g2, 0 4000cb78: 32 80 00 1c bne,a 4000cbe8 4000cb7c: c0 2e 40 03 clrb [ %i1 + %g3 ] /* * Set token_len to the number of characters copied. */ *token_len = i; 4000cb80: c6 26 80 00 st %g3, [ %i2 ] <== NOT EXECUTED * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4000cb84: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000cb88: 13 10 00 67 sethi %hi(0x40019c00), %o1 <== NOT EXECUTED 4000cb8c: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED 4000cb90: 40 00 11 86 call 400111a8 <== NOT EXECUTED 4000cb94: 92 12 62 40 or %o1, 0x240, %o1 <== NOT EXECUTED 4000cb98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000cb9c: 12 80 00 1c bne 4000cc0c <== NOT EXECUTED 4000cba0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED else if ( strcmp( token, "." ) == 0 ) type = IMFS_CURRENT_DIR; } return type; } 4000cba4: 81 c7 e0 08 ret 4000cba8: 81 e8 00 00 restore /* * Copy a name into token. (Remember NULL is a token.) */ c = path[i]; while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) { 4000cbac: 14 bf ff f1 bg 4000cb70 4000cbb0: 82 00 c0 19 add %g3, %i1, %g1 token[i] = c; if ( i == IMFS_NAME_MAX ) 4000cbb4: 80 a0 e0 20 cmp %g3, 0x20 4000cbb8: 12 bf ff e3 bne 4000cb44 4000cbbc: c4 28 c0 19 stb %g2, [ %g3 + %i1 ] 4000cbc0: 81 c7 e0 08 ret 4000cbc4: 91 e8 20 04 restore %g0, 4, %o0 /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4000cbc8: c4 2e 40 00 stb %g2, [ %i1 ] if ( token[i] != '\0' ) { 4000cbcc: 80 a0 e0 00 cmp %g3, 0 4000cbd0: 82 10 20 01 mov 1, %g1 4000cbd4: 02 80 00 16 be 4000cc2c 4000cbd8: b0 10 20 01 mov 1, %i0 /* * Set token_len to the number of characters copied. */ *token_len = i; 4000cbdc: c2 26 80 00 st %g1, [ %i2 ] 4000cbe0: 81 c7 e0 08 ret 4000cbe4: 81 e8 00 00 restore 4000cbe8: c6 26 80 00 st %g3, [ %i2 ] * If we copied something that was not a seperator see if * it was a special name. */ if ( type == IMFS_NAME ) { if ( strcmp( token, "..") == 0 ) 4000cbec: 90 10 00 19 mov %i1, %o0 4000cbf0: 13 10 00 67 sethi %hi(0x40019c00), %o1 4000cbf4: b0 10 20 02 mov 2, %i0 4000cbf8: 40 00 11 6c call 400111a8 4000cbfc: 92 12 62 40 or %o1, 0x240, %o1 4000cc00: 80 a2 20 00 cmp %o0, 0 4000cc04: 02 bf ff e8 be 4000cba4 4000cc08: 90 10 00 19 mov %i1, %o0 type = IMFS_UP_DIR; else if ( strcmp( token, "." ) == 0 ) 4000cc0c: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000cc10: 40 00 11 66 call 400111a8 4000cc14: 92 12 60 a0 or %o1, 0xa0, %o1 ! 4001a0a0 <_CPU_Trap_slot_template+0x70> 4000cc18: 80 a0 00 08 cmp %g0, %o0 4000cc1c: 82 60 20 00 subx %g0, 0, %g1 4000cc20: b0 08 60 02 and %g1, 2, %i0 4000cc24: 81 c7 e0 08 ret 4000cc28: 91 ee 20 01 restore %i0, 1, %o0 type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000cc2c: 82 10 20 00 clr %g1 <== NOT EXECUTED /* * Set token_len to the number of characters copied. */ *token_len = i; 4000cc30: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED type = IMFS_CURRENT_DIR; } else { type = IMFS_NO_MORE_PATH; } } else if (token[ i-1 ] != '\0') { token[i] = '\0'; 4000cc34: 81 c7 e0 08 ret <== NOT EXECUTED 4000cc38: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Copy a seperator into token. */ if ( i == 0 ) { token[i] = c; 4000cc3c: c4 2e 40 00 stb %g2, [ %i1 ] 4000cc40: 82 10 20 00 clr %g1 4000cc44: 10 bf ff e6 b 4000cbdc 4000cc48: b0 10 20 00 clr %i0 4000cc4c : rtems_filesystem_mount_table_entry_t *temp_mt_entry, rtems_filesystem_operations_table *op_table, rtems_filesystem_file_handlers_r *memfile_handlers, rtems_filesystem_file_handlers_r *directory_handlers ) { 4000cc4c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 4000cc50: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cc54: 84 10 20 00 clr %g2 4000cc58: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 4000cc5c: 82 10 20 10 mov 0x10, %g1 * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { 4000cc60: 80 a0 40 03 cmp %g1, %g3 4000cc64: 02 80 00 06 be 4000cc7c 4000cc68: 84 00 a0 01 inc %g2 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); 4000cc6c: 80 a0 a0 06 cmp %g2, 6 4000cc70: 12 bf ff fc bne 4000cc60 4000cc74: 83 28 60 01 sll %g1, 1, %g1 4000cc78: 86 10 20 80 mov 0x80, %g3 <== NOT EXECUTED bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = TRUE; } } *dest_bytes_per_block = ((is_valid) 4000cc7c: 03 10 00 6e sethi %hi(0x4001b800), %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_node( 4000cc80: 98 10 20 00 clr %o4 bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = TRUE; } } *dest_bytes_per_block = ((is_valid) 4000cc84: c6 20 63 c4 st %g3, [ %g1 + 0x3c4 ] * 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_node( 4000cc88: 92 10 20 01 mov 1, %o1 4000cc8c: 90 10 20 00 clr %o0 4000cc90: 15 10 00 67 sethi %hi(0x40019c00), %o2 4000cc94: 17 00 00 10 sethi %hi(0x4000), %o3 4000cc98: 94 12 a1 e0 or %o2, 0x1e0, %o2 4000cc9c: 40 00 09 4e call 4000f1d4 4000cca0: 96 12 e1 ed or %o3, 0x1ed, %o3 NULL ); 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; 4000cca4: 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_node( 4000cca8: d0 26 20 18 st %o0, [ %i0 + 0x18 ] ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 4000ccac: f2 26 20 20 st %i1, [ %i0 + 0x20 ] "", ( S_IFDIR | 0755 ), NULL ); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 4000ccb0: f6 26 20 1c st %i3, [ %i0 + 0x1c ] temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 4000ccb4: 13 10 00 6c sethi %hi(0x4001b000), %o1 4000ccb8: 90 06 20 30 add %i0, 0x30, %o0 4000ccbc: 40 00 0e 82 call 400106c4 4000ccc0: 92 12 63 48 or %o1, 0x348, %o1 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 4000ccc4: 90 10 20 01 mov 1, %o0 4000ccc8: 7f ff da 9d call 4000373c 4000cccc: 92 10 20 0c mov 0xc, %o1 if ( !fs_info ){ 4000ccd0: 80 a2 20 00 cmp %o0, 0 4000ccd4: 02 80 00 0a be 4000ccfc 4000ccd8: 82 10 20 01 mov 1, %g1 fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000ccdc: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 4000cce0: c2 22 00 00 st %g1, [ %o0 ] 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; 4000cce4: d0 26 20 2c st %o0, [ %i0 + 0x2c ] * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 4000cce8: f6 22 20 08 st %i3, [ %o0 + 8 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 4000ccec: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 4000ccf0: f4 22 20 04 st %i2, [ %o0 + 4 ] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; return 0; } 4000ccf4: 81 c7 e0 08 ret 4000ccf8: 91 e8 20 00 restore %g0, 0, %o0 /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ){ free(temp_mt_entry->mt_fs_root.node_access); 4000ccfc: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED 4000cd00: 7f ff d9 c8 call 40003420 <== NOT EXECUTED 4000cd04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 4000cd08: 40 00 0c 9a call 4000ff70 <__errno> <== NOT EXECUTED 4000cd0c: 01 00 00 00 nop <== NOT EXECUTED 4000cd10: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 4000cd14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cd18: 81 c7 e0 08 ret <== NOT EXECUTED 4000cd1c: 81 e8 00 00 restore <== NOT EXECUTED 40005968 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 40005968: 9d e3 bf 58 save %sp, -168, %sp /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 4000596c: c2 06 00 00 ld [ %i0 ], %g1 40005970: c2 27 bf dc st %g1, [ %fp + -36 ] if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 40005974: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2 40005978: 80 a0 a0 07 cmp %g2, 7 4000597c: 18 80 00 1b bgu 400059e8 40005980: 90 10 00 1a mov %i2, %o0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, new_name, &i ); 40005984: a0 07 bf bb add %fp, -69, %l0 40005988: 94 07 bf f4 add %fp, -12, %o2 4000598c: 7f ff ff 6a call 40005734 40005990: 92 10 00 10 mov %l0, %o1 /* * Create a new link node. */ new_node = IMFS_create_node( 40005994: 90 10 00 19 mov %i1, %o0 40005998: 94 10 00 10 mov %l0, %o2 4000599c: 92 10 20 03 mov 3, %o1 400059a0: 17 00 00 28 sethi %hi(0xa000), %o3 400059a4: 98 07 bf dc add %fp, -36, %o4 400059a8: 40 00 49 f8 call 40018188 400059ac: 96 12 e1 ff or %o3, 0x1ff, %o3 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 400059b0: 80 a2 20 00 cmp %o0, 0 400059b4: 02 80 00 13 be 40005a00 400059b8: c4 07 bf dc ld [ %fp + -36 ], %g2 /* * 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 ); 400059bc: 90 07 bf ec add %fp, -20, %o0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 400059c0: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 IMFS_update_ctime( info.hard_link.link_node ); 400059c4: 92 10 20 00 clr %o1 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 400059c8: 82 00 60 01 inc %g1 IMFS_update_ctime( info.hard_link.link_node ); 400059cc: 40 00 02 00 call 400061cc 400059d0: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] 400059d4: c4 07 bf ec ld [ %fp + -20 ], %g2 400059d8: c2 07 bf dc ld [ %fp + -36 ], %g1 400059dc: c4 20 60 44 st %g2, [ %g1 + 0x44 ] return 0; } 400059e0: 81 c7 e0 08 ret 400059e4: 91 e8 20 00 restore %g0, 0, %o0 * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) rtems_set_errno_and_return_minus_one( EMLINK ); 400059e8: 40 00 87 25 call 4002767c <__errno> 400059ec: b0 10 3f ff mov -1, %i0 400059f0: 82 10 20 1f mov 0x1f, %g1 400059f4: c2 22 00 00 st %g1, [ %o0 ] 400059f8: 81 c7 e0 08 ret 400059fc: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40005a00: 40 00 87 1f call 4002767c <__errno> <== NOT EXECUTED 40005a04: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005a08: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40005a0c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005a10: 81 c7 e0 08 ret <== NOT EXECUTED 40005a14: 81 e8 00 00 restore <== NOT EXECUTED 4001d67c : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001d67c: 9d e3 bf 98 save %sp, -104, %sp block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001d680: 80 a6 20 00 cmp %i0, 0 4001d684: 02 80 00 26 be 4001d71c 4001d688: 92 10 21 69 mov 0x169, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d68c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d690: 80 a0 60 05 cmp %g1, 5 4001d694: 02 80 00 0b be 4001d6c0 4001d698: 11 10 00 e9 sethi %hi(0x4003a400), %o0 4001d69c: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED 4001d6a0: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d6a4: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d6a8: 7f ff a1 ff call 40005ea4 <__assert> <== NOT EXECUTED 4001d6ac: 94 12 a3 a0 or %o2, 0x3a0, %o2 ! 4003a7a0 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001d6b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001d6b4: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001d6b8: 12 80 00 13 bne 4001d704 <== NOT EXECUTED 4001d6bc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); 4001d6c0: 90 10 00 18 mov %i0, %o0 4001d6c4: 92 10 00 19 mov %i1, %o1 4001d6c8: 7f ff fe 54 call 4001d018 4001d6cc: 94 10 20 01 mov 1, %o2 if ( *block_entry_ptr ) 4001d6d0: 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 ); 4001d6d4: b2 10 00 08 mov %o0, %i1 if ( *block_entry_ptr ) 4001d6d8: 80 a0 60 00 cmp %g1, 0 4001d6dc: 12 80 00 0e bne 4001d714 4001d6e0: b0 10 20 00 clr %i0 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); 4001d6e4: 7f ff fe 40 call 4001cfe4 4001d6e8: b0 10 20 01 mov 1, %i0 if ( !memory ) 4001d6ec: 80 a2 20 00 cmp %o0, 0 4001d6f0: 02 80 00 14 be 4001d740 4001d6f4: 01 00 00 00 nop return 1; *block_entry_ptr = memory; 4001d6f8: d0 26 40 00 st %o0, [ %i1 ] return 0; } 4001d6fc: 81 c7 e0 08 ret 4001d700: 91 e8 20 00 restore %g0, 0, %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001d704: 40 00 27 de call 4002767c <__errno> <== NOT EXECUTED 4001d708: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001d70c: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001d710: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d714: 81 c7 e0 08 ret 4001d718: 81 e8 00 00 restore ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); 4001d71c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001d720: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d724: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d728: 7f ff a1 df call 40005ea4 <__assert> <== NOT EXECUTED 4001d72c: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001d730: 40 00 27 d3 call 4002767c <__errno> <== NOT EXECUTED 4001d734: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001d738: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001d73c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d740: 81 c7 e0 08 ret <== NOT EXECUTED 4001d744: 81 e8 00 00 restore <== NOT EXECUTED 4001d748 : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 4001d748: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001d74c: 80 a6 20 00 cmp %i0, 0 4001d750: 02 80 00 56 be 4001d8a8 4001d754: 92 10 21 31 mov 0x131, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d758: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d75c: 80 a0 60 05 cmp %g1, 5 4001d760: 02 80 00 0b be 4001d78c 4001d764: 92 10 21 35 mov 0x135, %o1 4001d768: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001d76c: 90 12 23 40 or %o0, 0x340, %o0 ! 4003a740 <_POSIX_Threads_Default_attributes+0x38> <== NOT EXECUTED 4001d770: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d774: 7f ff a1 cc call 40005ea4 <__assert> <== NOT EXECUTED 4001d778: 94 12 a3 a0 or %o2, 0x3a0, %o2 ! 4003a7a0 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001d77c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001d780: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001d784: 12 80 00 3d bne 4001d878 <== NOT EXECUTED 4001d788: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EIO ); if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 4001d78c: 03 10 00 fb sethi %hi(0x4003ec00), %g1 4001d790: e2 00 63 d8 ld [ %g1 + 0x3d8 ], %l1 ! 4003efd8 4001d794: a1 34 60 02 srl %l1, 2, %l0 4001d798: 92 10 00 10 mov %l0, %o1 4001d79c: 7f ff 96 32 call 40003064 <.umul> 4001d7a0: 90 04 20 01 add %l0, 1, %o0 4001d7a4: 92 10 00 10 mov %l0, %o1 4001d7a8: 7f ff 96 2f call 40003064 <.umul> 4001d7ac: 90 02 20 01 inc %o0 4001d7b0: 92 10 00 11 mov %l1, %o1 4001d7b4: 7f ff 96 2c call 40003064 <.umul> 4001d7b8: 90 02 3f ff add %o0, -1, %o0 4001d7bc: 80 a6 40 08 cmp %i1, %o0 4001d7c0: 1a 80 00 34 bcc 4001d890 4001d7c4: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) 4001d7c8: e0 06 20 4c ld [ %i0 + 0x4c ], %l0 4001d7cc: 80 a6 40 10 cmp %i1, %l0 4001d7d0: 04 80 00 24 ble 4001d860 4001d7d4: 82 10 20 00 clr %g1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001d7d8: 92 10 00 11 mov %l1, %o1 4001d7dc: 40 00 64 87 call 400369f8 <.div> 4001d7e0: 90 10 00 19 mov %i1, %o0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001d7e4: 92 10 00 11 mov %l1, %o1 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001d7e8: a4 10 00 08 mov %o0, %l2 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001d7ec: 40 00 64 83 call 400369f8 <.div> 4001d7f0: 90 10 00 10 mov %l0, %o0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 4001d7f4: 80 a4 80 08 cmp %l2, %o0 4001d7f8: 0a 80 00 1c bcs 4001d868 4001d7fc: a2 10 00 08 mov %o0, %l1 4001d800: 10 80 00 05 b 4001d814 4001d804: a0 10 00 08 mov %o0, %l0 4001d808: 80 a4 80 10 cmp %l2, %l0 4001d80c: 2a 80 00 18 bcs,a 4001d86c 4001d810: f2 26 20 4c st %i1, [ %i0 + 0x4c ] if ( IMFS_memfile_addblock( the_jnode, block ) ) { 4001d814: 92 10 00 10 mov %l0, %o1 4001d818: 7f ff ff 99 call 4001d67c 4001d81c: 90 10 00 18 mov %i0, %o0 4001d820: 80 a2 20 00 cmp %o0, 0 4001d824: 22 bf ff f9 be,a 4001d808 4001d828: a0 04 20 01 inc %l0 for ( ; block>=old_blocks ; block-- ) { 4001d82c: 10 80 00 06 b 4001d844 <== NOT EXECUTED 4001d830: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); 4001d834: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001d838: 7f ff fe ac call 4001d2e8 <== NOT EXECUTED 4001d83c: 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-- ) { 4001d840: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED 4001d844: 08 bf ff fc bleu 4001d834 <== NOT EXECUTED 4001d848: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 4001d84c: 40 00 27 8c call 4002767c <__errno> <== NOT EXECUTED 4001d850: 01 00 00 00 nop <== NOT EXECUTED 4001d854: 82 10 20 1c mov 0x1c, %g1 ! 1c <== NOT EXECUTED 4001d858: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d85c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 4001d860: 81 c7 e0 08 ret 4001d864: 91 e8 00 01 restore %g0, %g1, %o0 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 4001d868: f2 26 20 4c st %i1, [ %i0 + 0x4c ] <== NOT EXECUTED 4001d86c: 82 10 20 00 clr %g1 return 0; } 4001d870: 81 c7 e0 08 ret 4001d874: 91 e8 00 01 restore %g0, %g1, %o0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001d878: 40 00 27 81 call 4002767c <__errno> <== NOT EXECUTED 4001d87c: 01 00 00 00 nop <== NOT EXECUTED 4001d880: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001d884: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d888: 10 bf ff f6 b 4001d860 <== NOT EXECUTED 4001d88c: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001d890: 40 00 27 7b call 4002767c <__errno> <== NOT EXECUTED 4001d894: 01 00 00 00 nop <== NOT EXECUTED 4001d898: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001d89c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d8a0: 10 bf ff f0 b 4001d860 <== NOT EXECUTED 4001d8a4: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001d8a8: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001d8ac: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d8b0: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d8b4: 7f ff a1 7c call 40005ea4 <__assert> <== NOT EXECUTED 4001d8b8: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001d8bc: 40 00 27 70 call 4002767c <__errno> <== NOT EXECUTED 4001d8c0: 01 00 00 00 nop <== NOT EXECUTED 4001d8c4: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001d8c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d8cc: 10 bf ff e5 b 4001d860 <== NOT EXECUTED 4001d8d0: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4001d018 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 4001d018: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001d01c: 80 a6 20 00 cmp %i0, 0 4001d020: 02 80 00 76 be 4001d1f8 4001d024: 11 10 00 e9 sethi %hi(0x4003a400), %o0 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d028: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d02c: 80 a0 60 05 cmp %g1, 5 4001d030: 12 80 00 2f bne 4001d0ec 4001d034: 92 10 23 8a mov 0x38a, %o1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 4001d038: 03 10 00 fb sethi %hi(0x4003ec00), %g1 4001d03c: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 4003efd8 4001d040: a3 30 a0 02 srl %g2, 2, %l1 4001d044: 82 04 7f ff add %l1, -1, %g1 4001d048: 80 a6 40 01 cmp %i1, %g1 4001d04c: 08 80 00 20 bleu 4001d0cc 4001d050: 80 a6 a0 00 cmp %i2, 0 /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 4001d054: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED 4001d058: 7f ff 98 03 call 40003064 <.umul> <== NOT EXECUTED 4001d05c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001d060: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED 4001d064: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4001d068: 18 80 00 31 bgu 4001d12c <== NOT EXECUTED 4001d06c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 4001d070: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001d074: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001d078: 40 00 67 0a call 40036ca0 <.urem> <== NOT EXECUTED 4001d07c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001d080: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001d084: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001d088: 40 00 66 5a call 400369f0 <.udiv> <== NOT EXECUTED 4001d08c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 4001d090: 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; 4001d094: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { 4001d098: 02 80 00 4e be 4001d1d0 <== NOT EXECUTED 4001d09c: e0 06 20 54 ld [ %i0 + 0x54 ], %l0 <== NOT EXECUTED if ( !p ) { 4001d0a0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001d0a4: 02 80 00 63 be 4001d230 <== NOT EXECUTED 4001d0a8: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->doubly_indirect = p; } p1 = (block_p *)p[ doubly ]; 4001d0ac: a3 2c 60 02 sll %l1, 2, %l1 <== NOT EXECUTED 4001d0b0: c2 04 40 10 ld [ %l1 + %l0 ], %g1 <== NOT EXECUTED if ( !p1 ) { 4001d0b4: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001d0b8: 02 80 00 65 be 4001d24c <== NOT EXECUTED 4001d0bc: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) return 0; p[ doubly ] = (block_p) p1; } return (block_p *)&p1[ singly ]; 4001d0c0: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED 4001d0c4: 81 c7 e0 08 ret <== NOT EXECUTED 4001d0c8: 91 e8 40 08 restore %g1, %o0, %o0 <== NOT EXECUTED fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { 4001d0cc: 02 80 00 12 be 4001d114 4001d0d0: d0 06 20 50 ld [ %i0 + 0x50 ], %o0 if ( !p ) { 4001d0d4: 80 a2 20 00 cmp %o0, 0 4001d0d8: 02 80 00 4f be 4001d214 4001d0dc: 01 00 00 00 nop p = memfile_alloc_block(); if ( !p ) return 0; info->indirect = p; } return &info->indirect[ my_block ]; 4001d0e0: 83 2e 60 02 sll %i1, 2, %g1 4001d0e4: 81 c7 e0 08 ret 4001d0e8: 91 e8 40 08 restore %g1, %o0, %o0 assert( the_jnode ); if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d0ec: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d0f0: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d0f4: 7f ff a3 6c call 40005ea4 <__assert> <== NOT EXECUTED 4001d0f8: 94 12 a3 a0 or %o2, 0x3a0, %o2 ! 4003a7a0 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001d0fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001d100: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001d104: 02 bf ff ce be 4001d03c <== NOT EXECUTED 4001d108: 03 10 00 fb sethi %hi(0x4003ec00), %g1 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001d10c: 81 c7 e0 08 ret <== NOT EXECUTED 4001d110: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } if ( !p ) return 0; return &info->indirect[ my_block ]; 4001d114: 83 2e 60 02 sll %i1, 2, %g1 info->indirect = p; } return &info->indirect[ my_block ]; } if ( !p ) 4001d118: 80 a2 20 00 cmp %o0, 0 4001d11c: 02 bf ff fc be 4001d10c 4001d120: b0 02 00 01 add %o0, %g1, %i0 /* * This means the requested block number is out of range. */ return 0; } 4001d124: 81 c7 e0 08 ret 4001d128: 81 e8 00 00 restore #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 4001d12c: 90 02 20 01 inc %o0 <== NOT EXECUTED 4001d130: 7f ff 97 cd call 40003064 <.umul> <== NOT EXECUTED 4001d134: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001d138: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED 4001d13c: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED 4001d140: 18 bf ff f3 bgu 4001d10c <== NOT EXECUTED 4001d144: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001d148: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001d14c: 40 00 66 d5 call 40036ca0 <.urem> <== NOT EXECUTED 4001d150: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001d154: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 4001d158: a6 10 00 08 mov %o0, %l3 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 4001d15c: 40 00 66 25 call 400369f0 <.udiv> <== NOT EXECUTED 4001d160: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 4001d164: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001d168: 40 00 66 22 call 400369f0 <.udiv> <== NOT EXECUTED 4001d16c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001d170: 92 10 00 11 mov %l1, %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; 4001d174: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 4001d178: 40 00 66 ca call 40036ca0 <.urem> <== NOT EXECUTED 4001d17c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001d180: 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; 4001d184: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { 4001d188: 02 80 00 38 be 4001d268 <== NOT EXECUTED 4001d18c: e0 06 20 58 ld [ %i0 + 0x58 ], %l0 <== NOT EXECUTED if ( !p ) { 4001d190: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001d194: 02 80 00 40 be 4001d294 <== NOT EXECUTED 4001d198: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; 4001d19c: a5 2c a0 02 sll %l2, 2, %l2 <== NOT EXECUTED 4001d1a0: c2 04 80 10 ld [ %l2 + %l0 ], %g1 <== NOT EXECUTED if ( !p1 ) { 4001d1a4: a2 90 60 00 orcc %g1, 0, %l1 <== NOT EXECUTED 4001d1a8: 02 80 00 49 be 4001d2cc <== NOT EXECUTED 4001d1ac: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) return 0; p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; 4001d1b0: a1 2e 60 02 sll %i1, 2, %l0 <== NOT EXECUTED 4001d1b4: c2 04 00 11 ld [ %l0 + %l1 ], %g1 <== NOT EXECUTED if ( !p2 ) { 4001d1b8: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001d1bc: 02 80 00 3d be 4001d2b0 <== NOT EXECUTED 4001d1c0: 01 00 00 00 nop <== NOT EXECUTED p2 = memfile_alloc_block(); if ( !p2 ) return 0; p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; 4001d1c4: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 4001d1c8: 81 c7 e0 08 ret <== NOT EXECUTED 4001d1cc: 91 e8 40 08 restore %g1, %o0, %o0 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 4001d1d0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001d1d4: 02 bf ff ce be 4001d10c <== NOT EXECUTED 4001d1d8: 83 2a 20 02 sll %o0, 2, %g1 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; 4001d1dc: c4 04 00 01 ld [ %l0 + %g1 ], %g2 <== 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 ]; 4001d1e0: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED if ( !p ) return 0; p = (block_p *)p[ doubly ]; if ( !p ) 4001d1e4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001d1e8: 02 bf ff c9 be 4001d10c <== NOT EXECUTED 4001d1ec: b0 00 c0 02 add %g3, %g2, %i0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } 4001d1f0: 81 c7 e0 08 ret <== NOT EXECUTED 4001d1f4: 81 e8 00 00 restore <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001d1f8: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED 4001d1fc: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d200: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d204: 7f ff a3 28 call 40005ea4 <__assert> <== NOT EXECUTED 4001d208: 94 12 a3 90 or %o2, 0x390, %o2 ! 4003a790 <_POSIX_Threads_Default_attributes+0x88> <== NOT EXECUTED 4001d20c: 81 c7 e0 08 ret <== NOT EXECUTED 4001d210: 81 e8 00 00 restore <== NOT EXECUTED p = info->indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001d214: 7f ff ff 74 call 4001cfe4 4001d218: 01 00 00 00 nop if ( !p ) 4001d21c: 80 a2 20 00 cmp %o0, 0 4001d220: 02 bf ff bb be 4001d10c 4001d224: 01 00 00 00 nop return 0; info->indirect = p; 4001d228: 10 bf ff ae b 4001d0e0 4001d22c: d0 26 20 50 st %o0, [ %i0 + 0x50 ] p = info->doubly_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001d230: 7f ff ff 6d call 4001cfe4 <== NOT EXECUTED 4001d234: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001d238: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001d23c: 02 bf ff b4 be 4001d10c <== NOT EXECUTED 4001d240: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->doubly_indirect = p; 4001d244: 10 bf ff 9a b 4001d0ac <== NOT EXECUTED 4001d248: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); 4001d24c: 7f ff ff 66 call 4001cfe4 <== NOT EXECUTED 4001d250: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 4001d254: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001d258: 02 bf ff ad be 4001d10c <== NOT EXECUTED 4001d25c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p[ doubly ] = (block_p) p1; 4001d260: 10 bf ff 98 b 4001d0c0 <== NOT EXECUTED 4001d264: c2 24 40 10 st %g1, [ %l1 + %l0 ] <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 4001d268: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4001d26c: 02 bf ff a8 be 4001d10c <== NOT EXECUTED 4001d270: 83 2c a0 02 sll %l2, 2, %g1 <== 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 ]; 4001d274: d0 04 00 01 ld [ %l0 + %g1 ], %o0 <== NOT EXECUTED if ( !p1 ) 4001d278: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001d27c: 02 bf ff a4 be 4001d10c <== NOT EXECUTED 4001d280: 83 2e 60 02 sll %i1, 2, %g1 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 4001d284: c6 02 00 01 ld [ %o0 + %g1 ], %g3 <== NOT EXECUTED 4001d288: 85 2c e0 02 sll %l3, 2, %g2 <== NOT EXECUTED 4001d28c: 81 c7 e0 08 ret <== NOT EXECUTED 4001d290: 91 e8 80 03 restore %g2, %g3, %o0 <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { if ( !p ) { p = memfile_alloc_block(); 4001d294: 7f ff ff 54 call 4001cfe4 <== NOT EXECUTED 4001d298: 01 00 00 00 nop <== NOT EXECUTED if ( !p ) 4001d29c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001d2a0: 02 bf ff 9b be 4001d10c <== NOT EXECUTED 4001d2a4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED return 0; info->triply_indirect = p; 4001d2a8: 10 bf ff bd b 4001d19c <== NOT EXECUTED 4001d2ac: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED p[ triply ] = (block_p) p1; } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); 4001d2b0: 7f ff ff 4d call 4001cfe4 <== NOT EXECUTED 4001d2b4: 01 00 00 00 nop <== NOT EXECUTED if ( !p2 ) 4001d2b8: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001d2bc: 02 bf ff 94 be 4001d10c <== NOT EXECUTED 4001d2c0: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; 4001d2c4: 10 bf ff c0 b 4001d1c4 <== NOT EXECUTED 4001d2c8: c2 24 00 11 st %g1, [ %l0 + %l1 ] <== NOT EXECUTED info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; if ( !p1 ) { p1 = memfile_alloc_block(); 4001d2cc: 7f ff ff 46 call 4001cfe4 <== NOT EXECUTED 4001d2d0: 01 00 00 00 nop <== NOT EXECUTED if ( !p1 ) 4001d2d4: 82 92 20 00 orcc %o0, 0, %g1 <== NOT EXECUTED 4001d2d8: 02 bf ff 8d be 4001d10c <== NOT EXECUTED 4001d2dc: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; 4001d2e0: 10 bf ff b4 b 4001d1b0 <== NOT EXECUTED 4001d2e4: c2 24 80 10 st %g1, [ %l2 + %l0 ] <== NOT EXECUTED 4001dd3c : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 4001dd3c: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001dd40: a4 96 20 00 orcc %i0, 0, %l2 4001dd44: 02 80 00 ac be 4001dff4 4001dd48: 92 10 22 4a mov 0x24a, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 4001dd4c: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 4001dd50: 82 00 bf fb add %g2, -5, %g1 4001dd54: 80 a0 60 01 cmp %g1, 1 4001dd58: 08 80 00 0c bleu 4001dd88 4001dd5c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 4001dd60: 92 10 22 4f mov 0x24f, %o1 <== NOT EXECUTED 4001dd64: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dd68: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dd6c: 7f ff a0 4e call 40005ea4 <__assert> <== NOT EXECUTED 4001dd70: 94 12 a3 f0 or %o2, 0x3f0, %o2 ! 4003a7f0 <_POSIX_Threads_Default_attributes+0xe8> <== NOT EXECUTED the_jnode->type == IMFS_LINEAR_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE && 4001dd74: c4 04 a0 48 ld [ %l2 + 0x48 ], %g2 <== NOT EXECUTED 4001dd78: 82 00 bf fb add %g2, -5, %g1 <== NOT EXECUTED 4001dd7c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001dd80: 18 80 00 82 bgu 4001df88 <== NOT EXECUTED 4001dd84: 01 00 00 00 nop <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001dd88: 80 a6 a0 00 cmp %i2, 0 4001dd8c: 02 80 00 a5 be 4001e020 4001dd90: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 4001dd94: 02 80 00 92 be 4001dfdc 4001dd98: 80 a0 a0 06 cmp %g2, 6 /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 4001dd9c: 02 80 00 4e be 4001ded4 4001dda0: 82 06 c0 19 add %i3, %i1, %g1 * 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 ) 4001dda4: c4 04 a0 4c ld [ %l2 + 0x4c ], %g2 4001dda8: 80 a0 40 02 cmp %g1, %g2 4001ddac: 18 80 00 31 bgu 4001de70 4001ddb0: a2 10 00 1b mov %i3, %l1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ddb4: 27 10 00 fb sethi %hi(0x4003ec00), %l3 4001ddb8: f6 04 e3 d8 ld [ %l3 + 0x3d8 ], %i3 ! 4003efd8 4001ddbc: 90 10 00 19 mov %i1, %o0 4001ddc0: 40 00 63 ba call 40036ca8 <.rem> 4001ddc4: 92 10 00 1b mov %i3, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ddc8: 92 10 00 1b mov %i3, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ddcc: a8 10 00 08 mov %o0, %l4 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ddd0: 40 00 63 0a call 400369f8 <.div> 4001ddd4: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001ddd8: 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; 4001dddc: b2 10 00 08 mov %o0, %i1 if ( start_offset ) { 4001dde0: a0 10 00 1a mov %i2, %l0 4001dde4: 12 80 00 4d bne 4001df18 4001dde8: b0 10 20 00 clr %i0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001ddec: f4 04 e3 d8 ld [ %l3 + 0x3d8 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001ddf0: 80 a4 40 1a cmp %l1, %i2 4001ddf4: 1a 80 00 0e bcc 4001de2c 4001ddf8: 92 10 00 19 mov %i1, %o1 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4001ddfc: 10 80 00 20 b 4001de7c 4001de00: 80 a4 60 00 cmp %l1, 0 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 ); 4001de04: d2 02 40 00 ld [ %o1 ], %o1 4001de08: 40 00 2c d1 call 4002914c 4001de0c: a2 24 40 1a sub %l1, %i2, %l1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001de10: c2 04 e3 d8 ld [ %l3 + 0x3d8 ], %g1 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 ); 4001de14: a0 04 00 1a add %l0, %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001de18: 80 a0 40 11 cmp %g1, %l1 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); dest += to_copy; block++; 4001de1c: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001de20: 18 80 00 16 bgu 4001de78 4001de24: b0 06 00 1a add %i0, %i2, %i0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001de28: 92 10 00 19 mov %i1, %o1 4001de2c: 94 10 20 00 clr %o2 4001de30: 7f ff fc 7a call 4001d018 4001de34: 90 10 00 12 mov %l2, %o0 assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 4001de38: 94 10 00 1a mov %i2, %o2 * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001de3c: 92 10 00 08 mov %o0, %o1 assert( block_ptr ); 4001de40: 80 a2 60 00 cmp %o1, 0 4001de44: 12 bf ff f0 bne 4001de04 4001de48: 90 10 00 10 mov %l0, %o0 4001de4c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001de50: 92 10 22 a5 mov 0x2a5, %o1 <== NOT EXECUTED 4001de54: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001de58: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001de5c: 7f ff a0 12 call 40005ea4 <__assert> <== NOT EXECUTED 4001de60: 94 12 a3 e0 or %o2, 0x3e0, %o2 ! 4003a7e0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED if ( !block_ptr ) return copied; 4001de64: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED } IMFS_update_atime( the_jnode ); return copied; } 4001de68: 81 c7 e0 08 ret <== NOT EXECUTED 4001de6c: 91 e8 00 0a restore %g0, %o2, %o0 <== NOT EXECUTED * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) my_length = the_jnode->info.file.size - start; 4001de70: 10 bf ff d1 b 4001ddb4 4001de74: a2 20 80 19 sub %g2, %i1, %l1 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 4001de78: 80 a4 60 00 cmp %l1, 0 4001de7c: 02 80 00 0f be 4001deb8 4001de80: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001de84: 92 10 00 19 mov %i1, %o1 4001de88: 90 10 00 12 mov %l2, %o0 4001de8c: 7f ff fc 63 call 4001d018 4001de90: 94 10 20 00 clr %o2 assert( block_ptr ); 4001de94: 80 a2 20 00 cmp %o0, 0 4001de98: 22 80 00 4a be,a 4001dfc0 4001de9c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 4001dea0: d2 02 00 00 ld [ %o0 ], %o1 copied += my_length; 4001dea4: b0 06 00 11 add %i0, %l1, %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 ); 4001dea8: 90 10 00 10 mov %l0, %o0 4001deac: 40 00 2c a8 call 4002914c 4001deb0: 94 10 00 11 mov %l1, %o2 copied += my_length; } IMFS_update_atime( the_jnode ); 4001deb4: 90 07 bf f0 add %fp, -16, %o0 4001deb8: 7f ff a0 c5 call 400061cc 4001debc: 92 10 20 00 clr %o1 4001dec0: c2 07 bf f0 ld [ %fp + -16 ], %g1 return copied; 4001dec4: 94 10 00 18 mov %i0, %o2 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001dec8: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] return copied; } 4001decc: 81 c7 e0 08 ret 4001ded0: 91 e8 00 0a restore %g0, %o2, %o0 if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 4001ded4: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED 4001ded8: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED 4001dedc: 82 20 40 19 sub %g1, %i1, %g1 <== NOT EXECUTED 4001dee0: 80 a6 c0 01 cmp %i3, %g1 <== NOT EXECUTED 4001dee4: 18 80 00 22 bgu 4001df6c <== NOT EXECUTED 4001dee8: d2 04 a0 50 ld [ %l2 + 0x50 ], %o1 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; memcpy(dest, &file_ptr[start], my_length); 4001deec: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4001def0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4001def4: 40 00 2c 96 call 4002914c <== NOT EXECUTED 4001def8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001defc: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED 4001df00: 7f ff a0 b3 call 400061cc <== NOT EXECUTED 4001df04: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001df08: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED return copied; 4001df0c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001df10: 10 bf ff ef b 4001decc <== NOT EXECUTED 4001df14: c2 24 a0 3c st %g1, [ %l2 + 0x3c ] <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001df18: 90 10 00 12 mov %l2, %o0 4001df1c: 92 10 00 19 mov %i1, %o1 4001df20: 7f ff fc 3e call 4001d018 4001df24: 94 10 20 00 clr %o2 assert( block_ptr ); 4001df28: 80 a2 20 00 cmp %o0, 0 4001df2c: 02 80 00 1d be 4001dfa0 4001df30: 92 26 c0 14 sub %i3, %l4, %o1 */ 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; 4001df34: 80 a4 40 09 cmp %l1, %o1 4001df38: 08 80 00 03 bleu 4001df44 4001df3c: 94 10 00 11 mov %l1, %o2 4001df40: 94 10 00 09 mov %o1, %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 ); 4001df44: d2 02 00 00 ld [ %o0 ], %o1 dest += to_copy; 4001df48: a0 06 80 0a add %i2, %o2, %l0 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 ); 4001df4c: 92 05 00 09 add %l4, %o1, %o1 dest += to_copy; block++; 4001df50: b2 06 60 01 inc %i1 my_length -= to_copy; 4001df54: a2 24 40 0a sub %l1, %o2, %l1 4001df58: 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 ); 4001df5c: 40 00 2c 7c call 4002914c 4001df60: 90 10 00 1a mov %i2, %o0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001df64: 10 bf ff a3 b 4001ddf0 4001df68: f4 04 e3 d8 ld [ %l3 + 0x3d8 ], %i2 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) my_length = the_jnode->info.linearfile.size - start; 4001df6c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 4001df70: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED 4001df74: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4001df78: 40 00 2c 75 call 4002914c <== NOT EXECUTED 4001df7c: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); copied += my_length; } IMFS_update_atime( the_jnode ); 4001df80: 10 bf ff e0 b 4001df00 <== NOT EXECUTED 4001df84: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED assert( the_jnode->type == IMFS_MEMORY_FILE || the_jnode->type == IMFS_LINEAR_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE && the_jnode->type != IMFS_LINEAR_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001df88: 40 00 25 bd call 4002767c <__errno> <== NOT EXECUTED 4001df8c: 01 00 00 00 nop <== NOT EXECUTED 4001df90: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001df94: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001df98: 10 bf ff b4 b 4001de68 <== NOT EXECUTED 4001df9c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001dfa0: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001dfa4: 92 10 22 94 mov 0x294, %o1 <== NOT EXECUTED 4001dfa8: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dfac: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dfb0: 7f ff 9f bd call 40005ea4 <__assert> <== NOT EXECUTED 4001dfb4: 94 12 a3 e0 or %o2, 0x3e0, %o2 ! 4003a7e0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED 4001dfb8: 10 bf ff ac b 4001de68 <== NOT EXECUTED 4001dfbc: 94 10 20 00 clr %o2 <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001dfc0: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED 4001dfc4: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dfc8: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dfcc: 7f ff 9f b6 call 40005ea4 <__assert> <== NOT EXECUTED 4001dfd0: 94 12 a3 e0 or %o2, 0x3e0, %o2 ! 4003a7e0 <_POSIX_Threads_Default_attributes+0xd8> <== NOT EXECUTED if ( !block_ptr ) return copied; 4001dfd4: 10 bf ff a5 b 4001de68 <== NOT EXECUTED 4001dfd8: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001dfdc: 40 00 25 a8 call 4002767c <__errno> <== NOT EXECUTED 4001dfe0: 01 00 00 00 nop <== NOT EXECUTED 4001dfe4: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001dfe8: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001dfec: 10 bf ff 9f b 4001de68 <== NOT EXECUTED 4001dff0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001dff4: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001dff8: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dffc: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001e000: 7f ff 9f a9 call 40005ea4 <__assert> <== NOT EXECUTED 4001e004: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001e008: 40 00 25 9d call 4002767c <__errno> <== NOT EXECUTED 4001e00c: 01 00 00 00 nop <== NOT EXECUTED 4001e010: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001e014: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001e018: 10 bf ff 94 b 4001de68 <== NOT EXECUTED 4001e01c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 4001e020: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED 4001e024: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001e028: 15 10 00 ea sethi %hi(0x4003a800), %o2 <== NOT EXECUTED 4001e02c: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001e030: 7f ff 9f 9d call 40005ea4 <__assert> <== NOT EXECUTED 4001e034: 94 12 a0 40 or %o2, 0x40, %o2 <== NOT EXECUTED if ( !dest ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001e038: 40 00 25 91 call 4002767c <__errno> <== NOT EXECUTED 4001e03c: 01 00 00 00 nop <== NOT EXECUTED 4001e040: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4001e044: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 4001e048: 10 bf ff 88 b 4001de68 <== NOT EXECUTED 4001e04c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d394 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 4001d394: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001d398: 80 a6 20 00 cmp %i0, 0 4001d39c: 02 80 00 74 be 4001d56c 4001d3a0: 92 10 21 ec mov 0x1ec, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d3a4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d3a8: 80 a0 60 05 cmp %g1, 5 4001d3ac: 02 80 00 0b be 4001d3d8 4001d3b0: 11 10 00 e9 sethi %hi(0x4003a400), %o0 4001d3b4: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED 4001d3b8: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d3bc: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d3c0: 7f ff a2 b9 call 40005ea4 <__assert> <== NOT EXECUTED 4001d3c4: 94 12 a3 a0 or %o2, 0x3a0, %o2 ! 4003a7a0 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001d3c8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001d3cc: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001d3d0: 12 80 00 5a bne 4001d538 <== NOT EXECUTED 4001d3d4: 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; 4001d3d8: 25 10 00 fb sethi %hi(0x4003ec00), %l2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4001d3dc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 /* * 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; 4001d3e0: c4 04 a3 d8 ld [ %l2 + 0x3d8 ], %g2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 4001d3e4: 80 a0 60 00 cmp %g1, 0 4001d3e8: 02 80 00 05 be 4001d3fc 4001d3ec: a7 30 a0 02 srl %g2, 2, %l3 memfile_free_blocks_in_table( &info->indirect, to_free ); 4001d3f0: 90 06 20 50 add %i0, 0x50, %o0 4001d3f4: 7f ff ff c9 call 4001d318 4001d3f8: 92 10 00 13 mov %l3, %o1 } if ( info->doubly_indirect ) { 4001d3fc: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 4001d400: 80 a2 20 00 cmp %o0, 0 4001d404: 02 80 00 19 be 4001d468 4001d408: c2 04 a3 d8 ld [ %l2 + 0x3d8 ], %g1 for ( i=0 ; i <== NOT EXECUTED 4001d418: 84 10 20 00 clr %g2 <== NOT EXECUTED 4001d41c: 10 80 00 03 b 4001d428 <== NOT EXECUTED 4001d420: a0 10 20 00 clr %l0 <== NOT EXECUTED 4001d424: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED if ( info->doubly_indirect[i] ) { 4001d428: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001d42c: c4 00 40 08 ld [ %g1 + %o0 ], %g2 <== NOT EXECUTED 4001d430: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001d434: 02 80 00 04 be 4001d444 <== NOT EXECUTED 4001d438: 90 00 40 08 add %g1, %o0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( 4001d43c: 7f ff ff b7 call 4001d318 <== NOT EXECUTED 4001d440: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001d458: a0 10 00 02 mov %g2, %l0 <== 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 ); 4001d45c: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED 4001d460: 7f ff ff ae call 4001d318 <== NOT EXECUTED 4001d464: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED } if ( info->triply_indirect ) { 4001d468: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 4001d46c: 80 a0 a0 00 cmp %g2, 0 4001d470: 02 80 00 37 be 4001d54c 4001d474: 82 10 20 00 clr %g1 for ( i=0 ; i <== NOT EXECUTED 4001d488: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001d48c: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4001d490: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001d494: 02 80 00 31 be 4001d558 <== NOT EXECUTED 4001d498: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; 4001d49c: a8 10 20 00 clr %l4 <== NOT EXECUTED 4001d4a0: aa 10 20 00 clr %l5 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED 4001d4b4: 90 05 40 02 add %l5, %g2, %o0 <== NOT EXECUTED 4001d4b8: a2 10 20 00 clr %l1 <== NOT EXECUTED 4001d4bc: 84 10 20 00 clr %g2 <== NOT EXECUTED if ( p[j] ) { 4001d4c0: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001d4c4: c4 00 40 10 ld [ %g1 + %l0 ], %g2 <== NOT EXECUTED 4001d4c8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001d4cc: 02 80 00 04 be 4001d4dc <== NOT EXECUTED 4001d4d0: 90 00 40 10 add %g1, %l0, %o0 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); 4001d4d4: 7f ff ff 91 call 4001d318 <== NOT EXECUTED 4001d4d8: 92 10 00 13 mov %l3, %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 4001d4f0: a2 10 00 02 mov %g2, %l1 <== NOT EXECUTED 4001d4f4: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 4001d4f8: 90 05 40 02 add %l5, %g2, %o0 <== NOT EXECUTED 4001d4fc: 7f ff ff 87 call 4001d318 <== NOT EXECUTED 4001d500: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED 4001d518: ab 2d 20 02 sll %l4, 2, %l5 <== NOT EXECUTED p = (block_p *) info->triply_indirect[i]; 4001d51c: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED 4001d520: c2 00 80 15 ld [ %g2 + %l5 ], %g1 <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 4001d524: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001d528: 02 80 00 0b be 4001d554 <== NOT EXECUTED 4001d52c: a0 10 00 01 mov %g1, %l0 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED 4001d534: c2 04 a3 d8 ld [ %l2 + 0x3d8 ], %g1 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001d538: 40 00 28 51 call 4002767c <__errno> <== NOT EXECUTED 4001d53c: 01 00 00 00 nop <== NOT EXECUTED 4001d540: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001d544: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d548: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&info->triply_indirect, to_free ); } return 0; } 4001d54c: 81 c7 e0 08 ret 4001d550: 91 e8 00 01 restore %g0, %g1, %o0 } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 4001d554: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED 4001d558: 7f ff ff 70 call 4001d318 <== NOT EXECUTED 4001d55c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4001d560: 82 10 20 00 clr %g1 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 4001d564: 81 c7 e0 08 ret <== NOT EXECUTED 4001d568: 91 e8 00 01 restore %g0, %g1, %o0 <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001d56c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001d570: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d574: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d578: 7f ff a2 4b call 40005ea4 <__assert> <== NOT EXECUTED 4001d57c: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001d580: 40 00 28 3f call 4002767c <__errno> <== NOT EXECUTED 4001d584: 01 00 00 00 nop <== NOT EXECUTED 4001d588: 82 10 20 05 mov 5, %g1 ! 5 <== NOT EXECUTED 4001d58c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d590: 10 bf ff ef b 4001d54c <== NOT EXECUTED 4001d594: 82 10 3f ff mov -1, %g1 <== NOT EXECUTED 4001d2e8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 4001d2e8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001d2ec: 94 10 20 00 clr %o2 <== NOT EXECUTED 4001d2f0: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001d2f4: 7f ff ff 49 call 4001d018 <== NOT EXECUTED 4001d2f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ptr = *block_entry_ptr; 4001d2fc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED *block_entry_ptr = 0; memfile_free_block( ptr ); return 1; } 4001d300: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED block_p *block_entry_ptr; block_p ptr; block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ptr = *block_entry_ptr; *block_entry_ptr = 0; 4001d304: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED memfile_free_block( ptr ); 4001d308: 7f ff ff 2e call 4001cfc0 <== NOT EXECUTED 4001d30c: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED return 1; } 4001d310: 81 c7 e0 08 ret <== NOT EXECUTED 4001d314: 81 e8 00 00 restore <== NOT EXECUTED 4001d9a0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 4001d9a0: 9d e3 bf 90 save %sp, -112, %sp /* * Perform internal consistency checks */ assert( the_jnode ); 4001d9a4: 80 a6 20 00 cmp %i0, 0 4001d9a8: 02 80 00 99 be 4001dc0c 4001d9ac: 92 10 22 e1 mov 0x2e1, %o1 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); 4001d9b0: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d9b4: 80 a0 60 05 cmp %g1, 5 4001d9b8: 02 80 00 0b be 4001d9e4 4001d9bc: 11 10 00 e9 sethi %hi(0x4003a400), %o0 4001d9c0: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED 4001d9c4: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001d9c8: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001d9cc: 7f ff a1 36 call 40005ea4 <__assert> <== NOT EXECUTED 4001d9d0: 94 12 a3 a0 or %o2, 0x3a0, %o2 ! 4003a7a0 <_POSIX_Threads_Default_attributes+0x98> <== NOT EXECUTED if ( the_jnode->type != IMFS_MEMORY_FILE ) 4001d9d4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 <== NOT EXECUTED 4001d9d8: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 4001d9dc: 12 80 00 82 bne 4001dbe4 <== NOT EXECUTED 4001d9e0: 01 00 00 00 nop <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001d9e4: 80 a6 a0 00 cmp %i2, 0 4001d9e8: 02 80 00 93 be 4001dc34 4001d9ec: 80 a6 e0 00 cmp %i3, 0 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 4001d9f0: 02 80 00 82 be 4001dbf8 4001d9f4: 92 06 c0 19 add %i3, %i1, %o1 * 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 ) { 4001d9f8: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4001d9fc: 80 a2 40 01 cmp %o1, %g1 4001da00: 18 80 00 43 bgu 4001db0c 4001da04: 25 10 00 fb sethi %hi(0x4003ec00), %l2 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001da08: e0 04 a3 d8 ld [ %l2 + 0x3d8 ], %l0 ! 4003efd8 4001da0c: 90 10 00 19 mov %i1, %o0 4001da10: 40 00 64 a6 call 40036ca8 <.rem> 4001da14: 92 10 00 10 mov %l0, %o1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001da18: 92 10 00 10 mov %l0, %o1 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 4001da1c: a2 10 00 08 mov %o0, %l1 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 4001da20: 40 00 63 f6 call 400369f8 <.div> 4001da24: 90 10 00 19 mov %i1, %o0 if ( start_offset ) { 4001da28: 80 a4 60 00 cmp %l1, 0 4001da2c: 12 80 00 42 bne 4001db34 4001da30: b2 10 00 08 mov %o0, %i1 4001da34: a0 10 00 1a mov %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001da38: f4 04 a3 d8 ld [ %l2 + 0x3d8 ], %i2 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001da3c: 80 a6 c0 1a cmp %i3, %i2 4001da40: 1a 80 00 0e bcc 4001da78 4001da44: 92 10 00 19 mov %i1, %o1 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001da48: 10 80 00 1c b 4001dab8 4001da4c: 80 a6 e0 00 cmp %i3, 0 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 ); 4001da50: d0 02 00 00 ld [ %o0 ], %o0 4001da54: 40 00 2d be call 4002914c 4001da58: b6 26 c0 1a sub %i3, %i2, %i3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001da5c: c2 04 a3 d8 ld [ %l2 + 0x3d8 ], %g1 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 ); 4001da60: a0 04 00 1a add %l0, %i2, %l0 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001da64: 80 a0 40 1b cmp %g1, %i3 #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; block++; 4001da68: b2 06 60 01 inc %i1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 4001da6c: 18 80 00 12 bgu 4001dab4 4001da70: a2 04 40 1a add %l1, %i2, %l1 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001da74: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001da78: 94 10 20 00 clr %o2 4001da7c: 7f ff fd 67 call 4001d018 4001da80: 90 10 00 18 mov %i0, %o0 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 ); 4001da84: 92 10 00 10 mov %l0, %o1 */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001da88: 80 a2 20 00 cmp %o0, 0 4001da8c: 12 bf ff f1 bne 4001da50 4001da90: 94 10 00 1a mov %i2, %o2 4001da94: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001da98: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001da9c: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001daa0: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 4001daa4: 7f ff a1 00 call 40005ea4 <__assert> <== NOT EXECUTED 4001daa8: 92 10 23 2e mov 0x32e, %o1 <== NOT EXECUTED } IMFS_atime_mtime_update( the_jnode ); return copied; } 4001daac: 81 c7 e0 08 ret <== NOT EXECUTED 4001dab0: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 4001dab4: 80 a6 e0 00 cmp %i3, 0 4001dab8: 02 80 00 0e be 4001daf0 4001dabc: 90 07 bf f0 add %fp, -16, %o0 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001dac0: 92 10 00 19 mov %i1, %o1 4001dac4: 90 10 00 18 mov %i0, %o0 4001dac8: 7f ff fd 54 call 4001d018 4001dacc: 94 10 20 00 clr %o2 assert( block_ptr ); 4001dad0: 80 a2 20 00 cmp %o0, 0 4001dad4: 02 80 00 3d be 4001dbc8 4001dad8: 92 10 00 10 mov %l0, %o1 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 ); 4001dadc: d0 02 00 00 ld [ %o0 ], %o0 my_length = 0; copied += to_copy; 4001dae0: a2 04 40 1b add %l1, %i3, %l1 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 ); 4001dae4: 40 00 2d 9a call 4002914c 4001dae8: 94 10 00 1b mov %i3, %o2 my_length = 0; copied += to_copy; } IMFS_atime_mtime_update( the_jnode ); 4001daec: 90 07 bf f0 add %fp, -16, %o0 4001daf0: 7f ff a1 b7 call 400061cc 4001daf4: 92 10 20 00 clr %o1 4001daf8: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001dafc: c2 26 20 3c st %g1, [ %i0 + 0x3c ] 4001db00: c2 26 20 40 st %g1, [ %i0 + 0x40 ] return copied; } 4001db04: 81 c7 e0 08 ret 4001db08: 91 e8 00 11 restore %g0, %l1, %o0 * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { status = IMFS_memfile_extend( the_jnode, last_byte ); 4001db0c: 7f ff ff 0f call 4001d748 4001db10: 90 10 00 18 mov %i0, %o0 if ( status ) 4001db14: 80 a2 20 00 cmp %o0, 0 4001db18: 02 bf ff bc be 4001da08 4001db1c: 25 10 00 fb sethi %hi(0x4003ec00), %l2 rtems_set_errno_and_return_minus_one( ENOSPC ); 4001db20: 40 00 26 d7 call 4002767c <__errno> <== NOT EXECUTED 4001db24: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001db28: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001db2c: 10 bf ff e0 b 4001daac <== NOT EXECUTED 4001db30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 4001db34: 90 10 00 18 mov %i0, %o0 4001db38: 92 10 00 19 mov %i1, %o1 4001db3c: 7f ff fd 37 call 4001d018 4001db40: 94 10 20 00 clr %o2 assert( block_ptr ); 4001db44: 80 a2 20 00 cmp %o0, 0 4001db48: 22 80 00 19 be,a 4001dbac 4001db4c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== 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; 4001db50: 94 24 00 11 sub %l0, %l1, %o2 4001db54: 80 a2 80 1b cmp %o2, %i3 4001db58: 18 80 00 0b bgu 4001db84 4001db5c: d0 02 00 00 ld [ %o0 ], %o0 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 ); src += to_copy; 4001db60: a0 06 80 0a add %i2, %o2, %l0 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4001db64: 90 04 40 08 add %l1, %o0, %o0 <== NOT EXECUTED src += to_copy; block++; 4001db68: b2 06 60 01 inc %i1 <== NOT EXECUTED my_length -= to_copy; 4001db6c: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED copied += to_copy; 4001db70: a2 10 00 0a mov %o2, %l1 <== NOT EXECUTED if ( !block_ptr ) return copied; #if 0 fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 4001db74: 40 00 2d 76 call 4002914c <== NOT EXECUTED 4001db78: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001db7c: 10 bf ff b0 b 4001da3c <== NOT EXECUTED 4001db80: f4 04 a3 d8 ld [ %l2 + 0x3d8 ], %i2 <== 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; 4001db84: 94 10 00 1b mov %i3, %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 ); 4001db88: 90 04 40 08 add %l1, %o0, %o0 src += to_copy; 4001db8c: a0 06 80 0a add %i2, %o2, %l0 block++; 4001db90: b2 06 60 01 inc %i1 my_length -= to_copy; 4001db94: b6 26 c0 0a sub %i3, %o2, %i3 copied += to_copy; 4001db98: a2 10 00 0a mov %o2, %l1 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 ); 4001db9c: 40 00 2d 6c call 4002914c 4001dba0: 92 10 00 1a mov %i2, %o1 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 4001dba4: 10 bf ff a6 b 4001da3c 4001dba8: f4 04 a3 d8 ld [ %l2 + 0x3d8 ], %i2 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001dbac: 92 10 23 1a mov 0x31a, %o1 <== NOT EXECUTED 4001dbb0: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dbb4: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dbb8: a2 10 20 00 clr %l1 <== NOT EXECUTED 4001dbbc: 7f ff a0 ba call 40005ea4 <__assert> <== NOT EXECUTED 4001dbc0: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 4001dbc4: 30 bf ff ba b,a 4001daac <== NOT EXECUTED assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); 4001dbc8: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001dbcc: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dbd0: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dbd4: 94 12 a3 e0 or %o2, 0x3e0, %o2 <== NOT EXECUTED 4001dbd8: 7f ff a0 b3 call 40005ea4 <__assert> <== NOT EXECUTED 4001dbdc: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED 4001dbe0: 30 bf ff b3 b,a 4001daac <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); if ( the_jnode->type != IMFS_MEMORY_FILE ) rtems_set_errno_and_return_minus_one( EIO ); 4001dbe4: 40 00 26 a6 call 4002767c <__errno> <== NOT EXECUTED 4001dbe8: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001dbec: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001dbf0: 10 bf ff af b 4001daac <== NOT EXECUTED 4001dbf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001dbf8: 40 00 26 a1 call 4002767c <__errno> <== NOT EXECUTED 4001dbfc: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001dc00: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001dc04: 10 bf ff aa b 4001daac <== NOT EXECUTED 4001dc08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Perform internal consistency checks */ assert( the_jnode ); 4001dc0c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001dc10: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dc14: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dc18: 7f ff a0 a3 call 40005ea4 <__assert> <== NOT EXECUTED 4001dc1c: 94 12 a3 90 or %o2, 0x390, %o2 <== NOT EXECUTED if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); 4001dc20: 40 00 26 97 call 4002767c <__errno> <== NOT EXECUTED 4001dc24: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001dc28: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4001dc2c: 10 bf ff a0 b 4001daac <== NOT EXECUTED 4001dc30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * Error check arguments */ assert( source ); 4001dc34: 92 10 22 ed mov 0x2ed, %o1 <== NOT EXECUTED 4001dc38: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001dc3c: 15 10 00 e9 sethi %hi(0x4003a400), %o2 <== NOT EXECUTED 4001dc40: 90 12 23 40 or %o0, 0x340, %o0 <== NOT EXECUTED 4001dc44: 7f ff a0 98 call 40005ea4 <__assert> <== NOT EXECUTED 4001dc48: 94 12 a3 d8 or %o2, 0x3d8, %o2 <== NOT EXECUTED if ( !source ) rtems_set_errno_and_return_minus_one( EINVAL ); 4001dc4c: 40 00 26 8c call 4002767c <__errno> <== NOT EXECUTED 4001dc50: a2 10 3f ff mov -1, %l1 <== NOT EXECUTED 4001dc54: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001dc58: 10 bf ff 95 b 4001daac <== NOT EXECUTED 4001dc5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cd20 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 4000cd20: 9d e3 bf 60 save %sp, -160, %sp IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, new_name, &result ); 4000cd24: 90 10 00 18 mov %i0, %o0 4000cd28: 94 07 bf f4 add %fp, -12, %o2 4000cd2c: b0 07 bf c3 add %fp, -61, %i0 4000cd30: 7f ff ff 79 call 4000cb14 4000cd34: 92 10 00 18 mov %i0, %o1 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 4000cd38: b3 2e 60 10 sll %i1, 0x10, %i1 4000cd3c: 03 00 00 3c sethi %hi(0xf000), %g1 4000cd40: 97 36 60 10 srl %i1, 0x10, %o3 4000cd44: 05 00 00 10 sethi %hi(0x4000), %g2 4000cd48: 86 0a c0 01 and %o3, %g1, %g3 4000cd4c: 80 a0 c0 02 cmp %g3, %g2 4000cd50: 02 80 00 1f be 4000cdcc 4000cd54: 90 10 00 1c mov %i4, %o0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 4000cd58: 03 00 00 20 sethi %hi(0x8000), %g1 4000cd5c: 80 a0 c0 01 cmp %g3, %g1 4000cd60: 02 80 00 12 be 4000cda8 4000cd64: 92 10 20 05 mov 5, %o1 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 4000cd68: 03 00 00 18 sethi %hi(0x6000), %g1 4000cd6c: 80 a0 c0 01 cmp %g3, %g1 4000cd70: 02 80 00 0b be 4000cd9c 4000cd74: 03 00 00 08 sethi %hi(0x2000), %g1 4000cd78: 80 a0 c0 01 cmp %g3, %g1 4000cd7c: 22 80 00 09 be,a 4000cda0 4000cd80: f6 27 bf e8 st %i3, [ %fp + -24 ] type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000cd84: 40 00 0c 7b call 4000ff70 <__errno> <== NOT EXECUTED 4000cd88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cd8c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000cd90: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cd94: 81 c7 e0 08 ret <== NOT EXECUTED 4000cd98: 81 e8 00 00 restore <== NOT EXECUTED type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 4000cd9c: f6 27 bf e8 st %i3, [ %fp + -24 ] <== NOT EXECUTED 4000cda0: f4 27 bf e4 st %i2, [ %fp + -28 ] 4000cda4: 92 10 20 02 mov 2, %o1 /* * Allocate and fill in an IMFS jnode */ new_node = IMFS_create_node( 4000cda8: 94 10 00 18 mov %i0, %o2 4000cdac: 98 07 bf e4 add %fp, -28, %o4 4000cdb0: 40 00 09 09 call 4000f1d4 4000cdb4: b0 10 20 00 clr %i0 new_name, mode, &info ); if ( !new_node ) 4000cdb8: 80 a2 20 00 cmp %o0, 0 4000cdbc: 02 80 00 06 be 4000cdd4 4000cdc0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 4000cdc4: 81 c7 e0 08 ret 4000cdc8: 81 e8 00 00 restore type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else { rtems_set_errno_and_return_minus_one( EINVAL ); 4000cdcc: 10 bf ff f7 b 4000cda8 4000cdd0: 92 10 20 01 mov 1, %o1 mode, &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 4000cdd4: 40 00 0c 67 call 4000ff70 <__errno> <== NOT EXECUTED 4000cdd8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cddc: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000cde0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 4000cde4: 81 c7 e0 08 ret <== NOT EXECUTED 4000cde8: 81 e8 00 00 restore <== NOT EXECUTED 40005ae4 : #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40005ae4: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40005ae8: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40005aec: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40005af0: 80 a0 60 01 cmp %g1, 1 40005af4: 12 80 00 05 bne 40005b08 40005af8: 01 00 00 00 nop /* * Set mt_fs pointer to point to the mount table entry for * the mounted file system. */ node->info.directory.mt_fs = mt_entry; 40005afc: f0 20 a0 58 st %i0, [ %g2 + 0x58 ] return 0; } 40005b00: 81 c7 e0 08 ret 40005b04: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40005b08: 40 00 86 dd call 4002767c <__errno> <== NOT EXECUTED 40005b0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005b10: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40005b14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005b18: 81 c7 e0 08 ret <== NOT EXECUTED 40005b1c: 81 e8 00 00 restore <== NOT EXECUTED 40004aa8 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 40004aa8: 9d e3 bf 98 save %sp, -104, %sp assert( the_jnode ); 40004aac: 80 a6 20 00 cmp %i0, 0 40004ab0: 02 80 00 54 be 40004c00 40004ab4: 11 10 00 84 sethi %hi(0x40021000), %o0 fprintf(stdout, "%s", the_jnode->name ); 40004ab8: 21 10 00 8c sethi %hi(0x40023000), %l0 40004abc: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 ! 40023228 <_impure_ptr> 40004ac0: 90 06 20 0c add %i0, 0xc, %o0 40004ac4: 40 00 40 39 call 40014ba8 40004ac8: d2 00 60 08 ld [ %g1 + 8 ], %o1 switch( the_jnode->type ) { 40004acc: d4 06 20 48 ld [ %i0 + 0x48 ], %o2 40004ad0: 80 a2 a0 06 cmp %o2, 6 40004ad4: 08 80 00 10 bleu 40004b14 40004ad8: 83 2a a0 02 sll %o2, 2, %g1 fprintf(stdout, " links not printed\n" ); assert(0); break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40004adc: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 <== NOT EXECUTED 40004ae0: 13 10 00 84 sethi %hi(0x40021000), %o1 <== NOT EXECUTED 40004ae4: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004ae8: 40 00 3f e3 call 40014a74 <== NOT EXECUTED 40004aec: 92 12 60 e0 or %o1, 0xe0, %o1 <== NOT EXECUTED assert(0); 40004af0: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED 40004af4: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40004af8: 15 10 00 83 sethi %hi(0x40020c00), %o2 <== NOT EXECUTED 40004afc: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 40004b00: 94 12 a2 28 or %o2, 0x228, %o2 <== NOT EXECUTED 40004b04: 40 00 02 34 call 400053d4 <__assert> <== NOT EXECUTED 40004b08: 31 10 00 84 sethi %hi(0x40021000), %i0 <== NOT EXECUTED break; } puts(""); 40004b0c: 40 00 46 a7 call 400165a8 <== NOT EXECUTED 40004b10: 91 ee 20 00 restore %i0, 0, %o0 <== NOT EXECUTED ) { assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { 40004b14: 05 10 00 12 sethi %hi(0x40004800), %g2 40004b18: 84 10 a2 50 or %g2, 0x250, %g2 ! 40004a50 40004b1c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40004b20: 81 c0 c0 00 jmp %g3 40004b24: 01 00 00 00 nop fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 40004b28: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 <== NOT EXECUTED 40004b2c: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED 40004b30: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED 40004b34: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED 40004b38: 13 10 00 84 sethi %hi(0x40021000), %o1 <== NOT EXECUTED 40004b3c: 40 00 3f ce call 40014a74 <== NOT EXECUTED 40004b40: 92 12 60 a8 or %o1, 0xa8, %o1 ! 400210a8 <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004b44: 31 10 00 84 sethi %hi(0x40021000), %i0 <== NOT EXECUTED 40004b48: 40 00 46 98 call 400165a8 <== NOT EXECUTED 40004b4c: 91 ee 20 00 restore %i0, 0, %o0 <== NOT EXECUTED assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { case IMFS_DIRECTORY: fprintf(stdout, "/" ); 40004b50: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 40004b54: 90 10 20 2f mov 0x2f, %o0 40004b58: d2 00 60 08 ld [ %g1 + 8 ], %o1 40004b5c: 40 00 3f d2 call 40014aa4 40004b60: 31 10 00 84 sethi %hi(0x40021000), %i0 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004b64: 40 00 46 91 call 400165a8 40004b68: 91 ee 20 00 restore %i0, 0, %o0 case IMFS_DIRECTORY: fprintf(stdout, "/" ); break; case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 40004b6c: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 40004b70: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 40004b74: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40004b78: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004b7c: 13 10 00 84 sethi %hi(0x40021000), %o1 40004b80: 40 00 3f bd call 40014a74 40004b84: 92 12 60 90 or %o1, 0x90, %o1 ! 40021090 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004b88: 31 10 00 84 sethi %hi(0x40021000), %i0 40004b8c: 40 00 46 87 call 400165a8 40004b90: 91 ee 20 00 restore %i0, 0, %o0 (uint32_t)the_jnode->info.file.size ); #endif break; case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 40004b94: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 <== NOT EXECUTED 40004b98: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004b9c: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004ba0: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40004ba4: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004ba8: 40 00 42 af call 40015664 <== NOT EXECUTED 40004bac: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED assert(0); 40004bb0: 10 bf ff d1 b 40004af4 <== NOT EXECUTED 40004bb4: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40004bb8: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 <== NOT EXECUTED 40004bbc: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004bc0: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED 40004bc4: 11 10 00 84 sethi %hi(0x40021000), %o0 <== NOT EXECUTED 40004bc8: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED 40004bcc: 40 00 42 a6 call 40015664 <== NOT EXECUTED 40004bd0: 90 12 20 c8 or %o0, 0xc8, %o0 <== NOT EXECUTED assert(0); 40004bd4: 10 bf ff c8 b 40004af4 <== NOT EXECUTED 40004bd8: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40004bdc: c2 04 22 28 ld [ %l0 + 0x228 ], %g1 40004be0: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 40004be4: d0 00 60 08 ld [ %g1 + 8 ], %o0 40004be8: 13 10 00 84 sethi %hi(0x40021000), %o1 40004bec: 40 00 3f a2 call 40014a74 40004bf0: 92 12 60 b8 or %o1, 0xb8, %o1 ! 400210b8 default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 40004bf4: 31 10 00 84 sethi %hi(0x40021000), %i0 40004bf8: 40 00 46 6c call 400165a8 40004bfc: 91 ee 20 00 restore %i0, 0, %o0 void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { assert( the_jnode ); 40004c00: 15 10 00 84 sethi %hi(0x40021000), %o2 <== NOT EXECUTED 40004c04: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED 40004c08: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED 40004c0c: 40 00 01 f2 call 400053d4 <__assert> <== NOT EXECUTED 40004c10: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED fprintf(stdout, "%s", the_jnode->name ); 40004c14: 10 bf ff aa b 40004abc <== NOT EXECUTED 40004c18: 21 10 00 8c sethi %hi(0x40023000), %l0 <== NOT EXECUTED 40005b2c : int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 40005b2c: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; int i; node = loc->node_access; 40005b30: c6 06 00 00 ld [ %i0 ], %g3 if ( node->type != IMFS_SYM_LINK ) 40005b34: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 40005b38: 80 a0 60 04 cmp %g1, 4 40005b3c: 12 80 00 19 bne 40005ba0 40005b40: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40005b44: 02 80 00 15 be 40005b98 40005b48: 88 10 20 00 clr %g4 40005b4c: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005b50: b0 10 20 00 clr %i0 for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 40005b54: c4 48 40 00 ldsb [ %g1 ], %g2 40005b58: 80 a0 a0 00 cmp %g2, 0 40005b5c: 12 80 00 08 bne 40005b7c 40005b60: c2 08 40 00 ldub [ %g1 ], %g1 40005b64: 30 80 00 13 b,a 40005bb0 <== NOT EXECUTED 40005b68: c2 00 e0 4c ld [ %g3 + 0x4c ], %g1 40005b6c: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2 40005b70: 80 a0 a0 00 cmp %g2, 0 40005b74: 02 80 00 07 be 40005b90 40005b78: c2 08 40 18 ldub [ %g1 + %i0 ], %g1 buf[i] = node->info.sym_link.name[i]; 40005b7c: c2 2e 40 04 stb %g1, [ %i1 + %g4 ] 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++ ) 40005b80: b0 06 20 01 inc %i0 40005b84: 80 a6 00 1a cmp %i0, %i2 40005b88: 12 bf ff f8 bne 40005b68 40005b8c: 88 10 00 18 mov %i0, %g4 buf[i] = node->info.sym_link.name[i]; return i; } 40005b90: 81 c7 e0 08 ret 40005b94: 81 e8 00 00 restore 40005b98: 81 c7 e0 08 ret <== NOT EXECUTED 40005b9c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005ba0: 40 00 86 b7 call 4002767c <__errno> <== NOT EXECUTED 40005ba4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005ba8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005bac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005bb0: 81 c7 e0 08 ret <== NOT EXECUTED 40005bb4: 81 e8 00 00 restore <== NOT EXECUTED 4000cdf8 : */ int IMFS_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4000cdf8: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4000cdfc: e0 06 00 00 ld [ %i0 ], %l0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4000ce00: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000ce04: 80 a0 60 00 cmp %g1, 0 4000ce08: 22 80 00 06 be,a 4000ce20 4000ce0c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 4000ce10: 40 00 05 c2 call 4000e518 <_Chain_Extract> 4000ce14: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 4000ce18: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ce1c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4000ce20: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4000ce24: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4000ce28: 90 07 bf f0 add %fp, -16, %o0 4000ce2c: 40 00 01 27 call 4000d2c8 4000ce30: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 4000ce34: c2 07 bf f0 ld [ %fp + -16 ], %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) ) { 4000ce38: 90 10 00 10 mov %l0, %o0 4000ce3c: 40 00 01 5d call 4000d3b0 4000ce40: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 4000ce44: 80 a2 20 00 cmp %o0, 0 4000ce48: 12 80 00 12 bne 4000ce90 4000ce4c: 01 00 00 00 nop 4000ce50: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 4000ce54: 80 a0 60 00 cmp %g1, 0 4000ce58: 12 80 00 0e bne 4000ce90 4000ce5c: 03 10 00 6c sethi %hi(0x4001b000), %g1 /* * Is rtems_filesystem_current this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 4000ce60: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 4000ce64: c4 06 00 00 ld [ %i0 ], %g2 4000ce68: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4000ce6c: 80 a0 40 02 cmp %g1, %g2 4000ce70: 22 80 00 02 be,a 4000ce78 4000ce74: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { 4000ce78: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4000ce7c: 80 a0 60 04 cmp %g1, 4 4000ce80: 22 80 00 06 be,a 4000ce98 4000ce84: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 if ( the_jnode->info.sym_link.name ) free( the_jnode->info.sym_link.name ); } free( the_jnode ); 4000ce88: 7f ff d9 66 call 40003420 4000ce8c: 90 10 00 10 mov %l0, %o0 } return 0; } 4000ce90: 81 c7 e0 08 ret 4000ce94: 91 e8 20 00 restore %g0, 0, %o0 /* * Free memory associated with a memory file. */ if ( the_jnode->type == IMFS_SYM_LINK ) { if ( the_jnode->info.sym_link.name ) 4000ce98: 80 a2 20 00 cmp %o0, 0 4000ce9c: 02 bf ff fb be 4000ce88 4000cea0: 01 00 00 00 nop free( the_jnode->info.sym_link.name ); 4000cea4: 7f ff d9 5f call 40003420 4000cea8: 01 00 00 00 nop 4000ceac: 30 bf ff f7 b,a 4000ce88 4000ceb0 : int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 4000ceb0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 4000ceb4: f0 06 00 00 ld [ %i0 ], %i0 switch ( the_jnode->type ) { 4000ceb8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000cebc: 80 a0 60 04 cmp %g1, 4 4000cec0: 22 80 00 11 be,a 4000cf04 4000cec4: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED 4000cec8: 14 80 00 0b bg 4000cef4 4000cecc: 80 a0 60 06 cmp %g1, 6 4000ced0: 80 a0 60 02 cmp %g1, 2 4000ced4: 22 80 00 1e be,a 4000cf4c 4000ced8: c4 06 20 4c ld [ %i0 + 0x4c ], %g2 case IMFS_SYM_LINK: buf->st_size = 0; break; default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000cedc: 40 00 0c 25 call 4000ff70 <__errno> <== NOT EXECUTED 4000cee0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cee4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000cee8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ceec: 81 c7 e0 08 ret <== NOT EXECUTED 4000cef0: 81 e8 00 00 restore <== NOT EXECUTED IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 4000cef4: 14 bf ff fa bg 4000cedc 4000cef8: 01 00 00 00 nop buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); break; case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 4000cefc: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 4000cf00: c2 26 60 20 st %g1, [ %i1 + 0x20 ] default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000cf04: c2 16 20 2e lduh [ %i0 + 0x2e ], %g1 buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000cf08: c4 06 20 34 ld [ %i0 + 0x34 ], %g2 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 4000cf0c: c2 36 60 0c sth %g1, [ %i1 + 0xc ] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 4000cf10: c4 26 60 08 st %g2, [ %i1 + 8 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000cf14: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 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; 4000cf18: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 4000cf1c: c2 36 60 0e sth %g1, [ %i1 + 0xe ] 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; 4000cf20: c4 26 60 24 st %g2, [ %i1 + 0x24 ] } 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; 4000cf24: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1 buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000cf28: c4 06 20 40 ld [ %i0 + 0x40 ], %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; 4000cf2c: c2 36 60 10 sth %g1, [ %i1 + 0x10 ] buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 4000cf30: c4 26 60 2c st %g2, [ %i1 + 0x2c ] 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; 4000cf34: c4 16 20 3a lduh [ %i0 + 0x3a ], %g2 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000cf38: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 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; 4000cf3c: c4 36 60 12 sth %g2, [ %i1 + 0x12 ] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 4000cf40: c2 26 60 34 st %g1, [ %i1 + 0x34 ] return 0; } 4000cf44: 81 c7 e0 08 ret 4000cf48: 91 e8 20 00 restore %g0, 0, %o0 4000cf4c: c6 06 20 50 ld [ %i0 + 0x50 ], %g3 switch ( the_jnode->type ) { case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor ); 4000cf50: 10 bf ff ed b 4000cf04 4000cf54: c4 3e 40 00 std %g2, [ %i1 ] 40005bb8 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40005bb8: 9d e3 bf 60 save %sp, -160, %sp /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); 40005bbc: a0 07 bf c3 add %fp, -61, %l0 40005bc0: 94 07 bf f4 add %fp, -12, %o2 40005bc4: 92 10 00 10 mov %l0, %o1 40005bc8: 7f ff fe db call 40005734 40005bcc: 90 10 00 1a mov %i2, %o0 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 40005bd0: 90 10 00 18 mov %i0, %o0 * Remove any separators at the end of the string. */ IMFS_get_token( node_name, new_name, &i ); info.sym_link.name = link_name; 40005bd4: f2 27 bf e4 st %i1, [ %fp + -28 ] /* * Create a new link node. */ new_node = IMFS_create_node( 40005bd8: 94 10 00 10 mov %l0, %o2 40005bdc: 92 10 20 04 mov 4, %o1 40005be0: 17 00 00 28 sethi %hi(0xa000), %o3 40005be4: 98 07 bf e4 add %fp, -28, %o4 40005be8: 96 12 e1 ff or %o3, 0x1ff, %o3 40005bec: 40 00 49 67 call 40018188 40005bf0: b0 10 20 00 clr %i0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 40005bf4: 80 a2 20 00 cmp %o0, 0 40005bf8: 02 80 00 04 be 40005c08 40005bfc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; } 40005c00: 81 c7 e0 08 ret 40005c04: 81 e8 00 00 restore ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) rtems_set_errno_and_return_minus_one( ENOMEM ); 40005c08: 40 00 86 9d call 4002767c <__errno> <== NOT EXECUTED 40005c0c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005c10: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40005c14: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; } 40005c18: 81 c7 e0 08 ret <== NOT EXECUTED 40005c1c: 81 e8 00 00 restore <== NOT EXECUTED 40005c20 : #include int IMFS_unlink( rtems_filesystem_location_info_t *loc /* IN */ ) { 40005c20: 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; 40005c24: e0 06 00 00 ld [ %i0 ], %l0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 40005c28: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 40005c2c: 80 a0 60 03 cmp %g1, 3 40005c30: 22 80 00 08 be,a 40005c50 40005c34: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( loc ); 40005c38: c4 06 20 04 ld [ %i0 + 4 ], %g2 40005c3c: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 40005c40: 9f c0 40 00 call %g1 40005c44: 90 10 00 18 mov %i0, %o0 return result; } 40005c48: 81 c7 e0 08 ret 40005c4c: 91 e8 00 08 restore %g0, %o0, %o0 * free the node. */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) 40005c50: 80 a0 60 00 cmp %g1, 0 40005c54: 02 80 00 21 be 40005cd8 40005c58: a2 07 bf e0 add %fp, -32, %l1 rtems_set_errno_and_return_minus_one( EINVAL ); the_link = *loc; 40005c5c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40005c60: c4 06 20 08 ld [ %i0 + 8 ], %g2 40005c64: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40005c68: e0 27 bf e0 st %l0, [ %fp + -32 ] 40005c6c: c4 3f bf e8 std %g2, [ %fp + -24 ] 40005c70: c2 27 bf e4 st %g1, [ %fp + -28 ] the_link.node_access = node->info.hard_link.link_node; 40005c74: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 40005c78: c2 27 bf e0 st %g1, [ %fp + -32 ] IMFS_Set_handlers( &the_link ); 40005c7c: 40 00 49 ac call 4001832c 40005c80: 90 10 00 11 mov %l1, %o0 /* * 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) 40005c84: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40005c88: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1 40005c8c: 80 a0 60 01 cmp %g1, 1 40005c90: 02 80 00 0a be 40005cb8 40005c94: 82 00 7f ff add %g1, -1, %g1 return -1; } else { node->info.hard_link.link_node->st_nlink --; IMFS_update_ctime( node->info.hard_link.link_node ); 40005c98: 90 07 bf f0 add %fp, -16, %o0 if ( result != 0 ) return -1; } else { node->info.hard_link.link_node->st_nlink --; 40005c9c: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ] IMFS_update_ctime( node->info.hard_link.link_node ); 40005ca0: 40 00 01 4b call 400061cc 40005ca4: 92 10 20 00 clr %o1 40005ca8: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40005cac: c2 07 bf f0 ld [ %fp + -16 ], %g1 40005cb0: 10 bf ff e2 b 40005c38 40005cb4: c2 20 a0 44 st %g1, [ %g2 + 0x44 ] * to remove the node that is a link and the node itself. */ if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( &the_link ); 40005cb8: c2 07 bf e4 ld [ %fp + -28 ], %g1 40005cbc: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40005cc0: 9f c0 80 00 call %g2 40005cc4: 90 10 00 11 mov %l1, %o0 if ( result != 0 ) 40005cc8: 80 a2 20 00 cmp %o0, 0 40005ccc: 02 bf ff db be 40005c38 40005cd0: 90 10 3f ff mov -1, %o0 40005cd4: 30 bf ff dd b,a 40005c48 */ if ( node->type == IMFS_HARD_LINK ) { if ( !node->info.hard_link.link_node ) rtems_set_errno_and_return_minus_one( EINVAL ); 40005cd8: 40 00 86 69 call 4002767c <__errno> <== NOT EXECUTED 40005cdc: 01 00 00 00 nop <== NOT EXECUTED 40005ce0: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40005ce4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005ce8: 10 bf ff d8 b 40005c48 <== NOT EXECUTED 40005cec: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40005cf0 : #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 40005cf0: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 40005cf4: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 40005cf8: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 40005cfc: 80 a0 60 01 cmp %g1, 1 40005d00: 12 80 00 09 bne 40005d24 40005d04: 01 00 00 00 nop /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 40005d08: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1 40005d0c: 80 a0 60 00 cmp %g1, 0 40005d10: 02 80 00 0b be 40005d3c 40005d14: 01 00 00 00 nop /* * Set the mt_fs pointer to indicate that there is no longer * a file system mounted to this point. */ node->info.directory.mt_fs = NULL; 40005d18: c0 20 a0 58 clr [ %g2 + 0x58 ] return 0; } 40005d1c: 81 c7 e0 08 ret 40005d20: 91 e8 20 00 restore %g0, 0, %o0 /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 40005d24: 40 00 86 56 call 4002767c <__errno> <== NOT EXECUTED 40005d28: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005d2c: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED 40005d30: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005d34: 81 c7 e0 08 ret <== NOT EXECUTED 40005d38: 81 e8 00 00 restore <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 40005d3c: 40 00 86 50 call 4002767c <__errno> <== NOT EXECUTED 40005d40: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40005d44: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40005d48: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40005d4c: 81 c7 e0 08 ret <== NOT EXECUTED 40005d50: 81 e8 00 00 restore <== NOT EXECUTED 4002769c : assert( 0 ); return 0; } int POSIX_BOTTOM_REACHED() { 4002769c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400276a0: 92 10 20 22 mov 0x22, %o1 <== NOT EXECUTED 400276a4: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 400276a8: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 400276ac: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 400276b0: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 400276b4: 7f ff 89 20 call 40009b34 <__assert> <== NOT EXECUTED 400276b8: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400276bc: 81 c7 e0 08 ret <== NOT EXECUTED 400276c0: 81 e8 00 00 restore <== NOT EXECUTED 400276c4 : */ #include int POSIX_MP_NOT_IMPLEMENTED() { 400276c4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 400276c8: 92 10 20 1c mov 0x1c, %o1 <== NOT EXECUTED 400276cc: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 400276d0: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 400276d4: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 400276d8: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 400276dc: 7f ff 89 16 call 40009b34 <__assert> <== NOT EXECUTED 400276e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 400276e4: 81 c7 e0 08 ret <== NOT EXECUTED 400276e8: 81 e8 00 00 restore <== NOT EXECUTED 40027674 : assert( 0 ); return 0; } int POSIX_NOT_IMPLEMENTED() { 40027674: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED assert( 0 ); 40027678: 92 10 20 28 mov 0x28, %o1 <== NOT EXECUTED 4002767c: 11 10 00 ad sethi %hi(0x4002b400), %o0 <== NOT EXECUTED 40027680: 15 10 00 9e sethi %hi(0x40027800), %o2 <== NOT EXECUTED 40027684: 90 12 20 d8 or %o0, 0xd8, %o0 <== NOT EXECUTED 40027688: 94 12 a3 08 or %o2, 0x308, %o2 <== NOT EXECUTED 4002768c: 7f ff 89 2a call 40009b34 <__assert> <== NOT EXECUTED 40027690: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40027694: 81 c7 e0 08 ret <== NOT EXECUTED 40027698: 81 e8 00 00 restore <== NOT EXECUTED 40003788 : void RTEMS_Malloc_Initialize( void *start, size_t length, size_t sbrk_amount ) { 40003788: 9d e3 bf 98 save %sp, -104, %sp */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000378c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * get length worth of memory using sbrk. Make sure we * align the address that we get back. */ starting_address = start; RTEMS_Malloc_Sbrk_amount = sbrk_amount; 40003790: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40003794: 82 10 60 84 or %g1, 0x84, %g1 40003798: f4 20 a0 7c st %i2, [ %g2 + 0x7c ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000379c: c2 20 7f fc st %g1, [ %g1 + -4 ] 400037a0: 82 00 7f fc add %g1, -4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400037a4: c2 20 60 08 st %g1, [ %g1 + 8 ] if (!starting_address) { 400037a8: 80 a6 20 00 cmp %i0, 0 400037ac: 02 80 00 19 be 40003810 400037b0: c0 20 60 04 clr [ %g1 + 4 ] * 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 ( rtems_cpu_configuration_get_do_zero_of_workspace() ) 400037b4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400037b8: c4 00 62 04 ld [ %g1 + 0x204 ], %g2 ! 4001be04 <_CPU_Table+0x10> 400037bc: 80 a0 a0 00 cmp %g2, 0 400037c0: 32 80 00 0f bne,a 400037fc 400037c4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED void *starting_address, size_t size, uint32_t page_size ) { return _Heap_Initialize( the_heap, starting_address, size, page_size ); 400037c8: 92 10 00 18 mov %i0, %o1 400037cc: 94 10 00 19 mov %i1, %o2 400037d0: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400037d4: 96 10 20 08 mov 8, %o3 400037d8: 40 00 13 fd call 400087cc <_Heap_Initialize> 400037dc: 90 12 20 24 or %o0, 0x24, %o0 &RTEMS_Malloc_Heap, starting_address, length, CPU_HEAP_ALIGNMENT ); if ( !status ) 400037e0: 80 a2 20 00 cmp %o0, 0 400037e4: 02 80 00 04 be 400037f4 400037e8: 01 00 00 00 nop 400037ec: 81 c7 e0 08 ret 400037f0: 81 e8 00 00 restore rtems_fatal_error_occurred( status ); 400037f4: 40 00 10 ea call 40007b9c <== NOT EXECUTED 400037f8: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * given to a process eliminates the chance of a process seeing data * left over from another process. This would be a security violation. */ if ( rtems_cpu_configuration_get_do_zero_of_workspace() ) memset( starting_address, 0, length ); 400037fc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40003800: 40 00 33 de call 40010778 <== NOT EXECUTED 40003804: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40003808: 10 bf ff f1 b 400037cc <== NOT EXECUTED 4000380c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED starting_address = start; RTEMS_Malloc_Sbrk_amount = sbrk_amount; if (!starting_address) { uaddress = (uintptr_t)sbrk(length); 40003810: 7f ff f9 38 call 40001cf0 <== NOT EXECUTED 40003814: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED if (uaddress == (uintptr_t) -1) { 40003818: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4000381c: 02 80 00 0b be 40003848 <== NOT EXECUTED 40003820: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { 40003824: 80 8a 20 07 btst 7, %o0 <== NOT EXECUTED 40003828: 02 bf ff e4 be 400037b8 <== NOT EXECUTED 4000382c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 40003830: 82 06 20 08 add %i0, 8, %g1 <== NOT EXECUTED 40003834: 82 08 7f f8 and %g1, -8, %g1 <== NOT EXECUTED /* * adjust the length by whatever we aligned by */ length -= uaddress - old_address; 40003838: 84 20 40 18 sub %g1, %i0, %g2 <== NOT EXECUTED 4000383c: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED 40003840: 10 bf ff dd b 400037b4 <== NOT EXECUTED 40003844: b2 26 40 02 sub %i1, %g2, %i1 <== NOT EXECUTED if (!starting_address) { uaddress = (uintptr_t)sbrk(length); if (uaddress == (uintptr_t) -1) { rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 40003848: 40 00 10 d5 call 40007b9c <== NOT EXECUTED 4000384c: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED /* DOES NOT RETURN!!! */ } if (uaddress & (CPU_HEAP_ALIGNMENT-1)) { old_address = uaddress; uaddress = (uaddress + CPU_HEAP_ALIGNMENT) & ~(CPU_HEAP_ALIGNMENT-1); 40003850: 10 bf ff f9 b 40003834 <== NOT EXECUTED 40003854: 82 06 20 08 add %i0, 8, %g1 <== NOT EXECUTED 400038f0 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 400038f0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED void *low; void *high_water_mark; Stack_Control *stack; char name[5]; if ( !the_thread ) 400038f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400038f8: 02 80 00 2a be 400039a0 <== NOT EXECUTED 400038fc: 2b 10 00 80 sethi %hi(0x40020000), %l5 <== NOT EXECUTED return; if ( !print_handler ) 40003900: e6 05 61 70 ld [ %l5 + 0x170 ], %l3 ! 40020170 <== NOT EXECUTED 40003904: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 40003908: 02 80 00 26 be 400039a0 <== NOT EXECUTED 4000390c: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { 40003910: 02 80 00 33 be 400039dc <== NOT EXECUTED 40003914: a2 06 20 d0 add %i0, 0xd0, %l1 <== NOT EXECUTED else return; } else stack = &the_thread->Start.Initial_stack; low = Stack_check_usable_stack_start(stack); 40003918: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 4000391c: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED else return; } else stack = &the_thread->Start.Initial_stack; low = Stack_check_usable_stack_start(stack); 40003920: a0 00 60 10 add %g1, 0x10, %l0 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 40003924: a4 00 bf f0 add %g2, -16, %l2 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 40003928: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000392c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 40003930: 7f ff ff d7 call 4000388c <== NOT EXECUTED 40003934: a8 10 20 00 clr %l4 <== NOT EXECUTED if ( high_water_mark ) 40003938: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000393c: 02 80 00 03 be 40003948 <== NOT EXECUTED 40003940: 82 04 00 12 add %l0, %l2, %g1 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 40003944: a8 20 40 08 sub %g1, %o0, %l4 <== NOT EXECUTED else used = 0; if ( the_thread ) { 40003948: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 4000394c: 02 80 00 17 be 400039a8 <== NOT EXECUTED 40003950: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003954: d0 06 20 08 ld [ %i0 + 8 ], %o0 <== NOT EXECUTED 40003958: a0 07 bf f3 add %fp, -13, %l0 <== NOT EXECUTED 4000395c: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED 40003960: 40 00 11 3d call 40007e54 <== NOT EXECUTED 40003964: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED name[ 2 ] = 'T'; name[ 3 ] = 'R'; name[ 4 ] = '\0'; } (*print_handler)( 40003968: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED 4000396c: e6 05 61 70 ld [ %l5 + 0x170 ], %l3 <== NOT EXECUTED 40003970: d4 06 20 08 ld [ %i0 + 8 ], %o2 <== NOT EXECUTED 40003974: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 <== NOT EXECUTED 40003978: da 04 40 00 ld [ %l1 ], %o5 <== NOT EXECUTED 4000397c: d8 04 60 04 ld [ %l1 + 4 ], %o4 <== NOT EXECUTED 40003980: 13 10 00 75 sethi %hi(0x4001d400), %o1 <== NOT EXECUTED 40003984: 9a 03 00 0d add %o4, %o5, %o5 <== NOT EXECUTED 40003988: e4 23 a0 5c st %l2, [ %sp + 0x5c ] <== NOT EXECUTED 4000398c: e8 23 a0 60 st %l4, [ %sp + 0x60 ] <== NOT EXECUTED 40003990: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40003994: 9a 03 7f ff add %o5, -1, %o5 <== NOT EXECUTED 40003998: 9f c4 c0 00 call %l3 <== NOT EXECUTED 4000399c: 92 12 61 00 or %o1, 0x100, %o1 <== NOT EXECUTED 400039a0: 81 c7 e0 08 ret <== NOT EXECUTED 400039a4: 81 e8 00 00 restore <== NOT EXECUTED 400039a8: d0 00 61 6c ld [ %g1 + 0x16c ], %o0 <== NOT EXECUTED if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; name[ 1 ] = 'N'; 400039ac: 84 10 20 4e mov 0x4e, %g2 <== NOT EXECUTED used = 0; if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; 400039b0: 82 10 20 49 mov 0x49, %g1 <== NOT EXECUTED name[ 1 ] = 'N'; 400039b4: c4 2f bf f4 stb %g2, [ %fp + -12 ] <== NOT EXECUTED used = 0; if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; 400039b8: c2 2f bf f3 stb %g1, [ %fp + -13 ] <== NOT EXECUTED name[ 1 ] = 'N'; name[ 2 ] = 'T'; name[ 3 ] = 'R'; 400039bc: 84 10 20 52 mov 0x52, %g2 <== NOT EXECUTED if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; name[ 1 ] = 'N'; name[ 2 ] = 'T'; 400039c0: 82 10 20 54 mov 0x54, %g1 <== NOT EXECUTED name[ 3 ] = 'R'; name[ 4 ] = '\0'; 400039c4: c0 2f bf f7 clrb [ %fp + -9 ] <== NOT EXECUTED if ( the_thread ) { rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); } else { name[ 0 ] = 'I'; name[ 1 ] = 'N'; name[ 2 ] = 'T'; 400039c8: c2 2f bf f5 stb %g1, [ %fp + -11 ] <== NOT EXECUTED name[ 3 ] = 'R'; 400039cc: c4 2f bf f6 stb %g2, [ %fp + -10 ] <== NOT EXECUTED name[ 4 ] = '\0'; } (*print_handler)( 400039d0: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED 400039d4: 10 bf ff e9 b 40003978 <== NOT EXECUTED 400039d8: a0 07 bf f3 add %fp, -13, %l0 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 400039dc: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED 400039e0: 82 10 63 34 or %g1, 0x334, %g1 ! 40020334 <== NOT EXECUTED 400039e4: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED stack = &Stack_check_Interrupt_stack; the_thread = 0; } else return; 400039e8: a2 10 00 01 mov %g1, %l1 <== NOT EXECUTED /* * XXX HACK to get to interrupt stack */ if (the_thread == (Thread_Control *) -1) { if (Stack_check_Interrupt_stack.area) { 400039ec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400039f0: 12 bf ff ca bne 40003918 <== NOT EXECUTED 400039f4: b0 10 20 00 clr %i0 <== NOT EXECUTED 400039f8: 81 c7 e0 08 ret <== NOT EXECUTED 400039fc: 81 e8 00 00 restore <== NOT EXECUTED 4000388c : */ void *Stack_check_find_high_water_mark( const void *s, size_t n ) { 4000388c: 82 10 00 08 mov %o0, %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++) 40003890: 92 0a 7f fc and %o1, -4, %o1 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 40003894: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 40003898: 92 02 40 08 add %o1, %o0, %o1 <== NOT EXECUTED 4000389c: 80 a2 00 09 cmp %o0, %o1 <== NOT EXECUTED 400038a0: 3a 80 00 12 bcc,a 400038e8 <== NOT EXECUTED 400038a4: 90 10 20 00 clr %o0 <== NOT EXECUTED if (*base != U32_PATTERN) 400038a8: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 400038ac: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED 400038b0: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <== NOT EXECUTED 400038b4: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400038b8: 22 80 00 07 be,a 400038d4 <== NOT EXECUTED 400038bc: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 400038c0: 30 80 00 0a b,a 400038e8 <== NOT EXECUTED 400038c4: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400038c8: 12 80 00 08 bne 400038e8 <== NOT EXECUTED 400038cc: 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++) 400038d0: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED 400038d4: 80 a2 40 08 cmp %o1, %o0 <== NOT EXECUTED 400038d8: 38 bf ff fb bgu,a 400038c4 <== NOT EXECUTED 400038dc: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 400038e0: 81 c3 e0 08 retl <== NOT EXECUTED 400038e4: 90 10 20 00 clr %o0 <== NOT EXECUTED 400038e8: 81 c3 e0 08 retl <== NOT EXECUTED 400038ec: 01 00 00 00 nop 40003a84 : */ void Stack_check_report_blown_task( Thread_Control *running, boolean pattern_ok ) { 40003a84: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; printk( 40003a88: d4 1e 20 08 ldd [ %i0 + 8 ], %o2 <== NOT EXECUTED 40003a8c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40003a90: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 40003a94: 40 00 06 47 call 400053b0 <== NOT EXECUTED 40003a98: 90 12 21 88 or %o0, 0x188, %o0 ! 4001d588 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif printk( 40003a9c: d4 06 20 d4 ld [ %i0 + 0xd4 ], %o2 <== NOT EXECUTED 40003aa0: c2 06 20 d0 ld [ %i0 + 0xd0 ], %g1 <== NOT EXECUTED 40003aa4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40003aa8: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 40003aac: 94 02 80 01 add %o2, %g1, %o2 <== NOT EXECUTED 40003ab0: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED 40003ab4: 94 02 bf ff add %o2, -1, %o2 <== NOT EXECUTED 40003ab8: 40 00 06 3e call 400053b0 <== NOT EXECUTED 40003abc: 90 12 21 c8 or %o0, 0x1c8, %o0 <== NOT EXECUTED stack->area, stack->area + stack->size - 1, stack->size ); if ( !pattern_ok ) { 40003ac0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40003ac4: 12 80 00 07 bne 40003ae0 <== NOT EXECUTED 40003ac8: 11 10 00 75 sethi %hi(0x4001d400), %o0 <== NOT EXECUTED printk( 40003acc: d2 06 20 d4 ld [ %i0 + 0xd4 ], %o1 <== NOT EXECUTED 40003ad0: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 40003ad4: 90 12 21 f8 or %o0, 0x1f8, %o0 <== NOT EXECUTED 40003ad8: 40 00 06 36 call 400053b0 <== NOT EXECUTED 40003adc: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED " Damaged pattern begins at 0x%08lx and is %ld bytes long\n", (unsigned long) Stack_check_Get_pattern_area(stack), (long) PATTERN_SIZE_BYTES); } rtems_fatal_error_occurred( 0x81 ); 40003ae0: 40 00 14 e7 call 40008e7c <== NOT EXECUTED 40003ae4: 91 e8 20 81 restore %g0, 0x81, %o0 <== NOT EXECUTED 40003ae8: 01 00 00 00 nop 40007de8 <_API_extensions_Run_postdriver>: * * _API_extensions_Run_postdriver */ void _API_extensions_Run_postdriver( void ) { 40007de8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007dec: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007df0: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007df4: 82 10 60 70 or %g1, 0x70, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40007df8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007dfc: 80 a4 00 11 cmp %l0, %l1 40007e00: 02 80 00 0c be 40007e30 <_API_extensions_Run_postdriver+0x48> 40007e04: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postdriver_hook ) 40007e08: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007e0c: 80 a0 60 00 cmp %g1, 0 40007e10: 22 80 00 05 be,a 40007e24 <_API_extensions_Run_postdriver+0x3c> 40007e14: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postdriver_hook)(); 40007e18: 9f c0 40 00 call %g1 40007e1c: 01 00 00 00 nop Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007e20: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e24: 80 a4 00 11 cmp %l0, %l1 40007e28: 32 bf ff f9 bne,a 40007e0c <_API_extensions_Run_postdriver+0x24> 40007e2c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 40007e30: 81 c7 e0 08 ret 40007e34: 81 e8 00 00 restore 40007ea4 <_API_extensions_Run_postswitch>: * * _API_extensions_Run_postswitch */ void _API_extensions_Run_postswitch( void ) { 40007ea4: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007ea8: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007eac: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007eb0: 82 10 60 70 or %g1, 0x70, %g1 40007eb4: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007eb8: 80 a4 00 11 cmp %l0, %l1 40007ebc: 02 80 00 0c be 40007eec <_API_extensions_Run_postswitch+0x48> 40007ec0: 25 10 00 6f sethi %hi(0x4001bc00), %l2 the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->postswitch_hook ) 40007ec4: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007ec8: 80 a0 60 00 cmp %g1, 0 40007ecc: 22 80 00 05 be,a 40007ee0 <_API_extensions_Run_postswitch+0x3c> 40007ed0: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED (*the_extension->postswitch_hook)( _Thread_Executing ); 40007ed4: 9f c0 40 00 call %g1 40007ed8: d0 04 a2 bc ld [ %l2 + 0x2bc ], %o0 Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007edc: e0 04 00 00 ld [ %l0 ], %l0 { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007ee0: 80 a4 00 11 cmp %l0, %l1 40007ee4: 32 bf ff f9 bne,a 40007ec8 <_API_extensions_Run_postswitch+0x24> 40007ee8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40007eec: 81 c7 e0 08 ret 40007ef0: 81 e8 00 00 restore 40007e54 <_API_extensions_Run_predriver>: * * _API_extensions_Run_predriver */ void _API_extensions_Run_predriver( void ) { 40007e54: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; 40007e58: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007e5c: e0 00 60 70 ld [ %g1 + 0x70 ], %l0 ! 4001c070 <_API_extensions_List> 40007e60: 82 10 60 70 or %g1, 0x70, %g1 40007e64: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e68: 80 a4 00 11 cmp %l0, %l1 40007e6c: 02 80 00 0c be 40007e9c <_API_extensions_Run_predriver+0x48> 40007e70: 01 00 00 00 nop the_node = the_node->next ) { the_extension = (API_extensions_Control *) the_node; if ( the_extension->predriver_hook ) 40007e74: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007e78: 80 a0 60 00 cmp %g1, 0 40007e7c: 22 80 00 05 be,a 40007e90 <_API_extensions_Run_predriver+0x3c> 40007e80: e0 04 00 00 ld [ %l0 ], %l0 (*the_extension->predriver_hook)(); 40007e84: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007e88: 01 00 00 00 nop <== NOT EXECUTED Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; the_node = the_node->next ) { 40007e8c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED { Chain_Node *the_node; API_extensions_Control *the_extension; for ( the_node = _API_extensions_List.first ; !_Chain_Is_tail( &_API_extensions_List, the_node ) ; 40007e90: 80 a4 00 11 cmp %l0, %l1 40007e94: 32 bf ff f9 bne,a 40007e78 <_API_extensions_Run_predriver+0x24> 40007e98: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007e9c: 81 c7 e0 08 ret 40007ea0: 81 e8 00 00 restore 4000a378 <_CORE_RWLock_Release>: */ CORE_RWLock_Status _CORE_RWLock_Release( CORE_RWLock_Control *the_rwlock ) { 4000a378: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing = _Thread_Executing; 4000a37c: 03 10 00 7a sethi %hi(0x4001e800), %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 ); 4000a380: 7f ff e2 f9 call 40002f64 4000a384: e0 00 63 1c ld [ %g1 + 0x31c ], %l0 ! 4001eb1c <_Thread_Executing> 4000a388: 84 10 00 08 mov %o0, %g2 switch ( the_rwlock->current_state ) { 4000a38c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 4000a390: 80 a0 60 01 cmp %g1, 1 4000a394: 22 80 00 2d be,a 4000a448 <_CORE_RWLock_Release+0xd0> 4000a398: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000a39c: 0a 80 00 24 bcs 4000a42c <_CORE_RWLock_Release+0xb4> 4000a3a0: 80 a0 60 02 cmp %g1, 2 4000a3a4: 22 80 00 02 be,a 4000a3ac <_CORE_RWLock_Release+0x34> 4000a3a8: 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; 4000a3ac: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000a3b0: 7f ff e2 f1 call 40002f74 4000a3b4: 90 10 00 02 mov %g2, %o0 next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); 4000a3b8: 40 00 09 93 call 4000ca04 <_Thread_queue_Dequeue> 4000a3bc: 90 10 00 18 mov %i0, %o0 if ( next ) { 4000a3c0: 80 a2 20 00 cmp %o0, 0 4000a3c4: 22 80 00 1f be,a 4000a440 <_CORE_RWLock_Release+0xc8> 4000a3c8: b0 10 20 00 clr %i0 if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { 4000a3cc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 4000a3d0: 80 a0 60 01 cmp %g1, 1 4000a3d4: 02 80 00 26 be 4000a46c <_CORE_RWLock_Release+0xf4> 4000a3d8: 84 10 20 01 mov 1, %g2 } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4000a3dc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4000a3e0: 82 00 60 01 inc %g1 the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING; 4000a3e4: c4 26 20 44 st %g2, [ %i0 + 0x44 ] } /* * Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING */ the_rwlock->number_of_readers += 1; 4000a3e8: 10 80 00 0a b 4000a410 <_CORE_RWLock_Release+0x98> 4000a3ec: 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 ); if ( !next || 4000a3f0: 80 a0 60 01 cmp %g1, 1 4000a3f4: 02 80 00 12 be 4000a43c <_CORE_RWLock_Release+0xc4> 4000a3f8: 92 10 00 08 mov %o0, %o1 next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 4000a3fc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000a400: 90 10 00 18 mov %i0, %o0 while ( 1 ) { next = _Thread_queue_First( &the_rwlock->Wait_queue ); if ( !next || next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) return CORE_RWLOCK_SUCCESSFUL; the_rwlock->number_of_readers += 1; 4000a404: 82 00 60 01 inc %g1 _Thread_queue_Extract( &the_rwlock->Wait_queue, next ); 4000a408: 40 00 0a cd call 4000cf3c <_Thread_queue_Extract> 4000a40c: 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 ); 4000a410: 40 00 0b 3b call 4000d0fc <_Thread_queue_First> 4000a414: 90 10 00 18 mov %i0, %o0 if ( !next || 4000a418: 80 a2 20 00 cmp %o0, 0 4000a41c: 32 bf ff f5 bne,a 4000a3f0 <_CORE_RWLock_Release+0x78> 4000a420: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a424: 81 c7 e0 08 ret 4000a428: 91 e8 20 00 restore %g0, 0, %o0 */ _ISR_Disable( level ); switch ( the_rwlock->current_state ) { case CORE_RWLOCK_UNLOCKED: _ISR_Enable( level ); 4000a42c: 7f ff e2 d2 call 40002f74 <== NOT EXECUTED 4000a430: 01 00 00 00 nop <== NOT EXECUTED executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; 4000a434: 82 10 20 02 mov 2, %g1 ! 2 <== NOT EXECUTED 4000a438: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a43c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000a440: 81 c7 e0 08 ret 4000a444: 81 e8 00 00 restore _ISR_Enable( level ); executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE; return CORE_RWLOCK_SUCCESSFUL; case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; 4000a448: 82 00 7f ff add %g1, -1, %g1 if ( the_rwlock->number_of_readers != 0 ) { 4000a44c: 80 a0 60 00 cmp %g1, 0 4000a450: 12 80 00 04 bne 4000a460 <_CORE_RWLock_Release+0xe8> 4000a454: c2 26 20 48 st %g1, [ %i0 + 0x48 ] return CORE_RWLOCK_SUCCESSFUL; } executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; break; case CORE_RWLOCK_LOCKED_FOR_WRITING: executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL; 4000a458: 10 bf ff d5 b 4000a3ac <_CORE_RWLock_Release+0x34> 4000a45c: c0 24 20 34 clr [ %l0 + 0x34 ] case CORE_RWLOCK_LOCKED_FOR_READING: the_rwlock->number_of_readers -= 1; if ( the_rwlock->number_of_readers != 0 ) { /* must be unlocked again */ _ISR_Enable( level ); 4000a460: 7f ff e2 c5 call 40002f74 4000a464: b0 10 20 00 clr %i0 4000a468: 30 bf ff f6 b,a 4000a440 <_CORE_RWLock_Release+0xc8> next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue ); if ( next ) { if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) { the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING; 4000a46c: 82 10 20 02 mov 2, %g1 4000a470: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } } /* indentation is to match _ISR_Disable at top */ return CORE_RWLOCK_SUCCESSFUL; } 4000a474: 81 c7 e0 08 ret 4000a478: 91 e8 20 00 restore %g0, 0, %o0 4000a47c <_CORE_RWLock_Timeout>: void _CORE_RWLock_Timeout( Objects_Id id, void *ignored ) { 4000a47c: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000a480: 92 96 20 00 orcc %i0, 0, %o1 4000a484: 12 80 00 1a bne 4000a4ec <_CORE_RWLock_Timeout+0x70> 4000a488: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a48c: 31 10 00 7a sethi %hi(0x4001e800), %i0 <== NOT EXECUTED 4000a490: c2 06 22 40 ld [ %i0 + 0x240 ], %g1 ! 4001ea40 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000a494: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000a498: c2 26 22 40 st %g1, [ %i0 + 0x240 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000a49c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 4000a4a0: d2 00 63 1c ld [ %g1 + 0x31c ], %o1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000a4a4: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000a4a8: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 4000a4ac: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000a4b0: 80 a0 e0 00 cmp %g3, 0 4000a4b4: 02 80 00 06 be 4000a4cc <_CORE_RWLock_Timeout+0x50> 4000a4b8: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000a4bc: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 4000a4c0: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 4000a4c4: 02 80 00 20 be 4000a544 <_CORE_RWLock_Timeout+0xc8> <== NOT EXECUTED 4000a4c8: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000a4cc: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000a4d0: 40 00 0a 9b call 4000cf3c <_Thread_queue_Extract> 4000a4d4: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000a4d8: c2 06 22 40 ld [ %i0 + 0x240 ], %g1 4000a4dc: 82 00 7f ff add %g1, -1, %g1 4000a4e0: c2 26 22 40 st %g1, [ %i0 + 0x240 ] 4000a4e4: 81 c7 e0 08 ret 4000a4e8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a4ec: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000a4f0: 80 a0 a0 04 cmp %g2, 4 4000a4f4: 18 bf ff fc bgu 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a4f8: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000a4fc: 80 a0 60 01 cmp %g1, 1 4000a500: 12 bf ff f9 bne 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a504: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000a508: 05 10 00 7a sethi %hi(0x4001e800), %g2 4000a50c: 84 10 a1 a0 or %g2, 0x1a0, %g2 ! 4001e9a0 <_Objects_Information_table> 4000a510: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000a514: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000a518: 80 a2 20 00 cmp %o0, 0 4000a51c: 02 bf ff f2 be 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a520: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000a524: 40 00 03 4a call 4000b24c <_Objects_Get> 4000a528: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000a52c: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a530: 80 a0 60 00 cmp %g1, 0 4000a534: 12 bf ff ec bne 4000a4e4 <_CORE_RWLock_Timeout+0x68> 4000a538: 92 10 00 08 mov %o0, %o1 4000a53c: 10 bf ff db b 4000a4a8 <_CORE_RWLock_Timeout+0x2c> 4000a540: 31 10 00 7a sethi %hi(0x4001e800), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 4000a544: 02 bf ff e5 be 4000a4d8 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 4000a548: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 4000a54c: 10 bf ff e3 b 4000a4d8 <_CORE_RWLock_Timeout+0x5c> <== NOT EXECUTED 4000a550: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 40015150 <_CORE_message_queue_Broadcast>: size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 40015150: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 40015154: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 size_t size, Objects_Id id, CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, uint32_t *count ) { 40015158: a4 10 00 18 mov %i0, %l2 Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 4001515c: 80 a0 40 1a cmp %g1, %i2 40015160: 0a 80 00 17 bcs 400151bc <_CORE_message_queue_Broadcast+0x6c> 40015164: 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 ) { 40015168: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1 4001516c: 80 a0 60 00 cmp %g1, 0 40015170: 02 80 00 0a be 40015198 <_CORE_message_queue_Broadcast+0x48> 40015174: a2 10 20 00 clr %l1 *count = 0; 40015178: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED 4001517c: 81 c7 e0 08 ret <== NOT EXECUTED 40015180: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40015184: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40015188: 40 00 24 ab call 4001e434 4001518c: a2 04 60 01 inc %l1 buffer, waitp->return_argument, size ); *(uint32_t *)the_thread->Wait.return_argument_1 = size; 40015190: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 40015194: 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))) { 40015198: 40 00 0b 94 call 40017fe8 <_Thread_queue_Dequeue> 4001519c: 90 10 00 12 mov %l2, %o0 400151a0: 92 10 00 19 mov %i1, %o1 400151a4: a0 10 00 08 mov %o0, %l0 400151a8: 80 a2 20 00 cmp %o0, 0 400151ac: 12 bf ff f6 bne 40015184 <_CORE_message_queue_Broadcast+0x34> 400151b0: 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; 400151b4: e2 27 40 00 st %l1, [ %i5 ] 400151b8: b0 10 20 00 clr %i0 return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 400151bc: 81 c7 e0 08 ret 400151c0: 81 e8 00 00 restore 40015ab8 <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, uint32_t maximum_message_size ) { 40015ab8: 9d e3 bf 98 save %sp, -104, %sp uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; 40015abc: c0 26 20 48 clr [ %i0 + 0x48 ] ) { uint32_t message_buffering_required; uint32_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; 40015ac0: 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; 40015ac4: 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; 40015ac8: c0 26 20 60 clr [ %i0 + 0x60 ] the_message_queue->notify_argument = the_argument; 40015acc: 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)) { 40015ad0: 80 8e e0 03 btst 3, %i3 40015ad4: 02 80 00 07 be 40015af0 <_CORE_message_queue_Initialize+0x38> 40015ad8: a0 10 00 1b mov %i3, %l0 allocated_message_size += sizeof(uint32_t); 40015adc: 82 06 e0 04 add %i3, 4, %g1 allocated_message_size &= ~(sizeof(uint32_t) - 1); 40015ae0: a0 08 7f fc and %g1, -4, %l0 } if (allocated_message_size < maximum_message_size) 40015ae4: 80 a6 c0 10 cmp %i3, %l0 40015ae8: 18 80 00 09 bgu 40015b0c <_CORE_message_queue_Initialize+0x54> 40015aec: 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 = maximum_pending_messages * 40015af0: b6 04 20 14 add %l0, 0x14, %i3 40015af4: 92 10 00 1a mov %i2, %o1 40015af8: 40 00 2a d1 call 4002063c <.umul> 40015afc: 90 10 00 1b mov %i3, %o0 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) 40015b00: 80 a2 00 10 cmp %o0, %l0 40015b04: 1a 80 00 04 bcc 40015b14 <_CORE_message_queue_Initialize+0x5c> 40015b08: 92 10 00 08 mov %o0, %o1 STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return TRUE; } 40015b0c: 81 c7 e0 08 ret <== NOT EXECUTED 40015b10: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40015b14: 11 10 00 9c sethi %hi(0x40027000), %o0 40015b18: 7f ff e6 5b call 4000f484 <_Heap_Allocate> 40015b1c: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) 40015b20: 80 a2 20 00 cmp %o0, 0 40015b24: 02 bf ff fa be 40015b0c <_CORE_message_queue_Initialize+0x54> 40015b28: d0 26 20 5c st %o0, [ %i0 + 0x5c ] /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( 40015b2c: 92 10 00 08 mov %o0, %o1 40015b30: 94 10 00 1a mov %i2, %o2 40015b34: 90 06 20 68 add %i0, 0x68, %o0 40015b38: 7f ff ff 73 call 40015904 <_Chain_Initialize> 40015b3c: 96 10 00 1b mov %i3, %o3 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( 40015b40: c2 06 40 00 ld [ %i1 ], %g1 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015b44: 84 06 20 50 add %i0, 0x50, %g2 40015b48: 82 18 60 01 xor %g1, 1, %g1 40015b4c: 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); 40015b50: 82 06 20 54 add %i0, 0x54, %g1 the_chain->permanent_null = NULL; 40015b54: c0 26 20 54 clr [ %i0 + 0x54 ] 40015b58: 90 10 00 18 mov %i0, %o0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 40015b5c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 40015b60: c4 26 20 58 st %g2, [ %i0 + 0x58 ] 40015b64: 92 60 3f ff subx %g0, -1, %o1 40015b68: 94 10 20 80 mov 0x80, %o2 40015b6c: 96 10 20 06 mov 6, %o3 40015b70: 7f ff f0 5f call 40011cec <_Thread_queue_Initialize> 40015b74: b0 10 20 01 mov 1, %i0 40015b78: 81 c7 e0 08 ret 40015b7c: 81 e8 00 00 restore 40017d50 <_CORE_message_queue_Submit>: CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, boolean wait, Watchdog_Interval timeout ) { 40017d50: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40017d54: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, CORE_message_queue_Submit_types submit_type, boolean wait, Watchdog_Interval timeout ) { 40017d58: a2 10 00 18 mov %i0, %l1 ISR_Level level; CORE_message_queue_Buffer_control *the_message; Thread_Control *the_thread; if ( size > the_message_queue->maximum_message_size ) { 40017d5c: 80 a0 40 1a cmp %g1, %i2 40017d60: 0a 80 00 22 bcs 40017de8 <_CORE_message_queue_Submit+0x98> 40017d64: b0 10 20 01 mov 1, %i0 /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { 40017d68: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40017d6c: 80 a0 a0 00 cmp %g2, 0 40017d70: 02 80 00 22 be 40017df8 <_CORE_message_queue_Submit+0xa8> 40017d74: 01 00 00 00 nop /* * No one waiting on the message queue at this time, so attempt to * queue the message up for a future receive. */ if ( the_message_queue->number_of_pending_messages < 40017d78: c2 04 60 44 ld [ %l1 + 0x44 ], %g1 40017d7c: 80 a0 40 02 cmp %g1, %g2 40017d80: 18 80 00 2b bgu 40017e2c <_CORE_message_queue_Submit+0xdc> 40017d84: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * No message buffers were available so we may need to return an * overflow error or block the sender until the message is placed * on the queue. */ if ( !wait ) { 40017d88: 80 a0 60 00 cmp %g1, 0 40017d8c: 02 80 00 17 be 40017de8 <_CORE_message_queue_Submit+0x98> 40017d90: b0 10 20 02 mov 2, %i0 /* * Do NOT block on a send if the caller is in an ISR. It is * deadly to block in an ISR. */ if ( _ISR_Is_in_progress() ) { 40017d94: 03 10 00 b6 sethi %hi(0x4002d800), %g1 40017d98: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 4002dbf4 <_ISR_Nest_level> 40017d9c: 80 a0 a0 00 cmp %g2, 0 40017da0: 12 80 00 14 bne 40017df0 <_CORE_message_queue_Submit+0xa0> 40017da4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 */ { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); 40017da8: 7f ff aa 99 call 4000280c 40017dac: e0 00 60 0c ld [ %g1 + 0xc ], %l0 ! 4002dc0c <_Thread_Executing> 40017db0: 82 10 20 01 mov 1, %g1 _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 = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; 40017db4: fa 24 20 24 st %i5, [ %l0 + 0x24 ] Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; executing->Wait.id = id; 40017db8: f6 24 20 20 st %i3, [ %l0 + 0x20 ] executing->Wait.return_argument = buffer; 40017dbc: f2 24 20 28 st %i1, [ %l0 + 0x28 ] executing->Wait.option = size; 40017dc0: f4 24 20 30 st %i2, [ %l0 + 0x30 ] { Thread_Control *executing = _Thread_Executing; _ISR_Disable( level ); _Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue ); executing->Wait.queue = &the_message_queue->Wait_queue; 40017dc4: e2 24 20 44 st %l1, [ %l0 + 0x44 ] 40017dc8: c2 24 60 30 st %g1, [ %l1 + 0x30 ] executing->Wait.id = id; executing->Wait.return_argument = buffer; executing->Wait.option = size; executing->Wait.count = submit_type; _ISR_Enable( level ); 40017dcc: 7f ff aa 94 call 4000281c 40017dd0: b0 10 20 07 mov 7, %i0 _Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout ); 40017dd4: d2 07 a0 60 ld [ %fp + 0x60 ], %o1 40017dd8: 90 10 00 11 mov %l1, %o0 40017ddc: 15 10 00 48 sethi %hi(0x40012000), %o2 40017de0: 7f ff e7 89 call 40011c04 <_Thread_queue_Enqueue_with_handler> 40017de4: 94 12 a1 44 or %o2, 0x144, %o2 ! 40012144 <_Thread_queue_Timeout> 40017de8: 81 c7 e0 08 ret 40017dec: 81 e8 00 00 restore } return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT; } 40017df0: 81 c7 e0 08 ret <== NOT EXECUTED 40017df4: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED /* * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); 40017df8: 7f ff e7 15 call 40011a4c <_Thread_queue_Dequeue> 40017dfc: 90 10 00 11 mov %l1, %o0 if ( the_thread ) { 40017e00: a0 92 20 00 orcc %o0, 0, %l0 40017e04: 02 80 00 1b be 40017e70 <_CORE_message_queue_Submit+0x120> 40017e08: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40017e0c: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 40017e10: 40 00 13 b0 call 4001ccd0 40017e14: 94 10 00 1a mov %i2, %o2 _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 40017e18: c2 04 20 2c ld [ %l0 + 0x2c ], %g1 the_thread->Wait.count = submit_type; 40017e1c: fa 24 20 24 st %i5, [ %l0 + 0x24 ] _CORE_message_queue_Copy_buffer( buffer, the_thread->Wait.return_argument, size ); *(size_t *)the_thread->Wait.return_argument_1 = size; 40017e20: f4 20 40 00 st %i2, [ %g1 ] the_thread->Wait.count = submit_type; 40017e24: 81 c7 e0 08 ret 40017e28: 91 e8 20 00 restore %g0, 0, %o0 RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control * _CORE_message_queue_Allocate_message_buffer ( CORE_message_queue_Control *the_message_queue ) { return (CORE_message_queue_Buffer_control *) 40017e2c: 7f ff dc d3 call 4000f178 <_Chain_Get> 40017e30: 90 04 60 68 add %l1, 0x68, %o0 /* * NOTE: If the system is consistent, this error should never occur. */ if ( !the_message ) { 40017e34: a0 92 20 00 orcc %o0, 0, %l0 40017e38: 02 bf ff ee be 40017df0 <_CORE_message_queue_Submit+0xa0> 40017e3c: 92 10 00 19 mov %i1, %o1 const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 40017e40: 94 10 00 1a mov %i2, %o2 40017e44: 40 00 13 a3 call 4001ccd0 40017e48: 90 04 20 10 add %l0, 0x10, %o0 size ); the_message->Contents.size = size; the_message->priority = submit_type; _CORE_message_queue_Insert_message( 40017e4c: 90 10 00 11 mov %l1, %o0 _CORE_message_queue_Copy_buffer( buffer, the_message->Contents.buffer, size ); the_message->Contents.size = size; 40017e50: f4 24 20 0c st %i2, [ %l0 + 0xc ] the_message->priority = submit_type; 40017e54: fa 24 20 08 st %i5, [ %l0 + 8 ] _CORE_message_queue_Insert_message( 40017e58: 92 10 00 10 mov %l0, %o1 40017e5c: 94 10 00 1d mov %i5, %o2 40017e60: 40 00 0c 60 call 4001afe0 <_CORE_message_queue_Insert_message> 40017e64: b0 10 20 00 clr %i0 40017e68: 81 c7 e0 08 ret 40017e6c: 81 e8 00 00 restore * Is there a thread currently waiting on this message queue? */ if ( the_message_queue->number_of_pending_messages == 0 ) { the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue ); if ( the_thread ) { 40017e70: 10 bf ff c2 b 40017d78 <_CORE_message_queue_Submit+0x28> 40017e74: c4 04 60 48 ld [ %l1 + 0x48 ], %g2 40007f80 <_CORE_mutex_Initialize>: CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40007f80: 9d e3 bf 98 save %sp, -104, %sp /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f84: c2 06 40 00 ld [ %i1 ], %g1 CORE_mutex_Status _CORE_mutex_Initialize( CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock ) { 40007f88: 90 10 00 18 mov %i0, %o0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f8c: c2 26 20 40 st %g1, [ %i0 + 0x40 ] 40007f90: c4 06 60 04 ld [ %i1 + 4 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40007f94: 80 a6 a0 00 cmp %i2, 0 /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007f98: c4 26 20 44 st %g2, [ %i0 + 0x44 ] 40007f9c: c8 06 60 08 ld [ %i1 + 8 ], %g4 40007fa0: c8 26 20 48 st %g4, [ %i0 + 0x48 ] 40007fa4: da 06 60 0c ld [ %i1 + 0xc ], %o5 the_mutex->lock = initial_lock; 40007fa8: f4 26 20 50 st %i2, [ %i0 + 0x50 ] /* Add this to the RTEMS environment later ????????? rtems_assert( initial_lock == CORE_MUTEX_LOCKED || initial_lock == CORE_MUTEX_UNLOCKED ); */ the_mutex->Attributes = *the_mutex_attributes; 40007fac: da 26 20 4c st %o5, [ %i0 + 0x4c ] the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { 40007fb0: 12 80 00 1c bne 40008020 <_CORE_mutex_Initialize+0xa0> 40007fb4: c0 26 20 58 clr [ %i0 + 0x58 ] the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40007fb8: 19 10 00 6f sethi %hi(0x4001bc00), %o4 40007fbc: c6 03 22 bc ld [ %o4 + 0x2bc ], %g3 ! 4001bebc <_Thread_Executing> the_mutex->Attributes = *the_mutex_attributes; the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; 40007fc0: 82 10 20 01 mov 1, %g1 40007fc4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; 40007fc8: c4 00 e0 08 ld [ %g3 + 8 ], %g2 the_mutex->lock = initial_lock; the_mutex->blocked_count = 0; if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; 40007fcc: c6 26 20 5c st %g3, [ %i0 + 0x5c ] the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40007fd0: 80 a1 20 02 cmp %g4, 2 40007fd4: 12 80 00 1f bne 40008050 <_CORE_mutex_Initialize+0xd0> 40007fd8: c4 26 20 60 st %g2, [ %i0 + 0x60 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 40007fdc: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40007fe0: 80 a0 40 0d cmp %g1, %o5 40007fe4: 0a 80 00 0d bcs 40008018 <_CORE_mutex_Initialize+0x98> 40007fe8: b0 10 20 06 mov 6, %i0 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007fec: c4 03 22 bc ld [ %o4 + 0x2bc ], %g2 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40007ff0: 94 10 24 00 mov 0x400, %o2 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007ff4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40007ff8: 96 10 20 05 mov 5, %o3 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; 40007ffc: 82 00 60 01 inc %g1 40008000: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008004: c2 06 60 08 ld [ %i1 + 8 ], %g1 40008008: b0 10 20 00 clr %i0 4000800c: 80 a0 00 01 cmp %g0, %g1 40008010: 40 00 0b 60 call 4000ad90 <_Thread_queue_Initialize> 40008014: 92 40 20 00 addx %g0, 0, %o1 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40008018: 81 c7 e0 08 ret 4000801c: 81 e8 00 00 restore the_mutex->nest_count = 0; the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008020: c2 06 60 08 ld [ %i1 + 8 ], %g1 if ( _Thread_Executing->current_priority < the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; 40008024: c0 26 20 54 clr [ %i0 + 0x54 ] the_mutex->holder = NULL; the_mutex->holder_id = 0; } _Thread_queue_Initialize( 40008028: 80 a0 00 01 cmp %g0, %g1 the_mutex->Attributes.priority_ceiling ) return CORE_MUTEX_STATUS_CEILING_VIOLATED; _Thread_Executing->resource_count++; } else { the_mutex->nest_count = 0; the_mutex->holder = NULL; 4000802c: c0 26 20 5c clr [ %i0 + 0x5c ] the_mutex->holder_id = 0; 40008030: c0 26 20 60 clr [ %i0 + 0x60 ] } _Thread_queue_Initialize( 40008034: 92 40 20 00 addx %g0, 0, %o1 40008038: 94 10 24 00 mov 0x400, %o2 4000803c: 96 10 20 05 mov 5, %o3 40008040: 40 00 0b 54 call 4000ad90 <_Thread_queue_Initialize> 40008044: b0 10 20 00 clr %i0 STATES_WAITING_FOR_MUTEX, CORE_MUTEX_TIMEOUT ); return CORE_MUTEX_STATUS_SUCCESSFUL; } 40008048: 81 c7 e0 08 ret 4000804c: 81 e8 00 00 restore if ( initial_lock == CORE_MUTEX_LOCKED ) { the_mutex->nest_count = 1; the_mutex->holder = _Thread_Executing; the_mutex->holder_id = _Thread_Executing->Object.id; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008050: 80 a1 20 03 cmp %g4, 3 40008054: 32 bf ff e7 bne,a 40007ff0 <_CORE_mutex_Initialize+0x70> 40008058: c4 03 22 bc ld [ %o4 + 0x2bc ], %g2 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) if ( _Thread_Executing->current_priority < 4000805c: 10 bf ff e1 b 40007fe0 <_CORE_mutex_Initialize+0x60> <== NOT EXECUTED 40008060: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED 40008064 <_CORE_mutex_Seize_interrupt_blocking>: void _CORE_mutex_Seize_interrupt_blocking( CORE_mutex_Control *the_mutex, Watchdog_Interval timeout ) { 40008064: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40008068: c4 06 20 48 ld [ %i0 + 0x48 ], %g2 Watchdog_Interval timeout ) { Thread_Control *executing; executing = _Thread_Executing; 4000806c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { 40008070: 80 a0 a0 02 cmp %g2, 2 40008074: 12 80 00 08 bne 40008094 <_CORE_mutex_Seize_interrupt_blocking+0x30> 40008078: d2 00 62 bc ld [ %g1 + 0x2bc ], %o1 if ( the_mutex->holder->current_priority > executing->current_priority ) { 4000807c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 40008080: d2 02 60 14 ld [ %o1 + 0x14 ], %o1 40008084: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40008088: 80 a0 40 09 cmp %g1, %o1 4000808c: 18 80 00 16 bgu 400080e4 <_CORE_mutex_Seize_interrupt_blocking+0x80> 40008090: 01 00 00 00 nop FALSE ); } } the_mutex->blocked_count++; 40008094: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 40008098: 90 10 00 18 mov %i0, %o0 FALSE ); } } the_mutex->blocked_count++; 4000809c: 82 00 60 01 inc %g1 _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 400080a0: 92 10 00 19 mov %i1, %o1 FALSE ); } } the_mutex->blocked_count++; 400080a4: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _Thread_queue_Enqueue( &the_mutex->Wait_queue, timeout ); 400080a8: 15 10 00 2b sethi %hi(0x4000ac00), %o2 400080ac: 40 00 0a 2b call 4000a958 <_Thread_queue_Enqueue_with_handler> 400080b0: 94 12 a2 98 or %o2, 0x298, %o2 ! 4000ae98 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400080b4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400080b8: c2 00 a1 e0 ld [ %g2 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400080bc: 82 00 7f ff add %g1, -1, %g1 400080c0: c2 20 a1 e0 st %g1, [ %g2 + 0x1e0 ] 400080c4: c6 00 a1 e0 ld [ %g2 + 0x1e0 ], %g3 400080c8: 80 a0 e0 00 cmp %g3, 0 400080cc: 02 80 00 04 be 400080dc <_CORE_mutex_Seize_interrupt_blocking+0x78> 400080d0: 01 00 00 00 nop 400080d4: 81 c7 e0 08 ret <== NOT EXECUTED 400080d8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400080dc: 40 00 08 af call 4000a398 <_Thread_Dispatch> 400080e0: 81 e8 00 00 restore Thread_Control *executing; executing = _Thread_Executing; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ) { if ( the_mutex->holder->current_priority > executing->current_priority ) { _Thread_Change_priority( 400080e4: 40 00 07 89 call 40009f08 <_Thread_Change_priority> 400080e8: 94 10 20 00 clr %o2 FALSE ); } } the_mutex->blocked_count++; 400080ec: 10 bf ff eb b 40008098 <_CORE_mutex_Seize_interrupt_blocking+0x34> 400080f0: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 400080f4 <_CORE_mutex_Surrender>: CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 400080f4: 9d e3 bf 98 save %sp, -104, %sp * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 400080f8: c2 06 20 44 ld [ %i0 + 0x44 ], %g1 CORE_mutex_Status _CORE_mutex_Surrender( CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support ) { 400080fc: a0 10 00 18 mov %i0, %l0 * allowed when the mutex in quetion is FIFO or simple Priority * discipline. But Priority Ceiling or Priority Inheritance mutexes * must be released by the thread which acquired them. */ if ( the_mutex->Attributes.only_owner_release ) { 40008100: 80 a0 60 00 cmp %g1, 0 40008104: 02 80 00 07 be 40008120 <_CORE_mutex_Surrender+0x2c> 40008108: d0 06 20 5c ld [ %i0 + 0x5c ], %o0 if ( !_Thread_Is_executing( holder ) ) 4000810c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40008110: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> 40008114: 80 a2 00 02 cmp %o0, %g2 40008118: 12 80 00 49 bne 4000823c <_CORE_mutex_Surrender+0x148> 4000811c: b0 10 20 03 mov 3, %i0 return CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE; } /* XXX already unlocked -- not right status */ if ( !the_mutex->nest_count ) 40008120: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40008124: 80 a0 60 00 cmp %g1, 0 40008128: 22 80 00 45 be,a 4000823c <_CORE_mutex_Surrender+0x148> 4000812c: b0 10 20 00 clr %i0 return CORE_MUTEX_STATUS_SUCCESSFUL; the_mutex->nest_count--; 40008130: 82 00 7f ff add %g1, -1, %g1 if ( the_mutex->nest_count != 0 ) { 40008134: 80 a0 60 00 cmp %g1, 0 40008138: 02 80 00 09 be 4000815c <_CORE_mutex_Surrender+0x68> 4000813c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008140: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 40008144: 80 a0 60 00 cmp %g1, 0 40008148: 02 80 00 3d be 4000823c <_CORE_mutex_Surrender+0x148> 4000814c: b0 10 20 00 clr %i0 40008150: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008154: 02 80 00 3a be 4000823c <_CORE_mutex_Surrender+0x148> <== NOT EXECUTED 40008158: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000815c: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 /* * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008160: 80 a0 a0 02 cmp %g2, 2 40008164: 22 80 00 2a be,a 4000820c <_CORE_mutex_Surrender+0x118> 40008168: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000816c: 80 a0 a0 03 cmp %g2, 3 40008170: 22 80 00 27 be,a 4000820c <_CORE_mutex_Surrender+0x118> 40008174: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; the_mutex->holder = NULL; 40008178: c0 24 20 5c clr [ %l0 + 0x5c ] /* * Whether or not someone is waiting for the mutex, an * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000817c: 80 a0 a0 02 cmp %g2, 2 40008180: 02 80 00 17 be 400081dc <_CORE_mutex_Surrender+0xe8> 40008184: c0 24 20 60 clr [ %l0 + 0x60 ] 40008188: 80 a0 a0 03 cmp %g2, 3 4000818c: 22 80 00 15 be,a 400081e0 <_CORE_mutex_Surrender+0xec> 40008190: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 /* * Now we check if another thread was waiting for this mutex. If so, * transfer the mutex to that thread. */ if ( ( the_thread = _Thread_queue_Dequeue( &the_mutex->Wait_queue ) ) ) { 40008194: 40 00 09 83 call 4000a7a0 <_Thread_queue_Dequeue> 40008198: 90 10 00 10 mov %l0, %o0 4000819c: 86 92 20 00 orcc %o0, 0, %g3 400081a0: 02 80 00 2e be 40008258 <_CORE_mutex_Surrender+0x164> 400081a4: 82 10 20 01 mov 1, %g1 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400081a8: c2 00 e0 08 ld [ %g3 + 8 ], %g1 the_mutex->nest_count = 1; switch ( the_mutex->Attributes.discipline ) { 400081ac: c4 04 20 48 ld [ %l0 + 0x48 ], %g2 } else #endif { the_mutex->holder = the_thread; the_mutex->holder_id = the_thread->Object.id; 400081b0: c2 24 20 60 st %g1, [ %l0 + 0x60 ] } else #endif { the_mutex->holder = the_thread; 400081b4: c6 24 20 5c st %g3, [ %l0 + 0x5c ] the_mutex->holder_id = the_thread->Object.id; the_mutex->nest_count = 1; 400081b8: 82 10 20 01 mov 1, %g1 switch ( the_mutex->Attributes.discipline ) { 400081bc: 80 a0 a0 02 cmp %g2, 2 400081c0: 02 80 00 21 be 40008244 <_CORE_mutex_Surrender+0x150> 400081c4: c2 24 20 54 st %g1, [ %l0 + 0x54 ] 400081c8: 80 a0 a0 03 cmp %g2, 3 400081cc: 22 80 00 13 be,a 40008218 <_CORE_mutex_Surrender+0x124> 400081d0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; return CORE_MUTEX_STATUS_SUCCESSFUL; } 400081d4: 81 c7 e0 08 ret 400081d8: 91 e8 20 00 restore %g0, 0, %o0 * inherited priority must be lowered if this is the last * mutex (i.e. resource) this task has. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { if ( holder->resource_count == 0 && 400081dc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 400081e0: 80 a0 60 00 cmp %g1, 0 400081e4: 12 bf ff ec bne 40008194 <_CORE_mutex_Surrender+0xa0> 400081e8: 01 00 00 00 nop 400081ec: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 400081f0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 400081f4: 80 a2 40 01 cmp %o1, %g1 400081f8: 02 bf ff e7 be 40008194 <_CORE_mutex_Surrender+0xa0> 400081fc: 01 00 00 00 nop holder->real_priority != holder->current_priority ) { _Thread_Change_priority( holder, holder->real_priority, TRUE ); 40008200: 40 00 07 42 call 40009f08 <_Thread_Change_priority> 40008204: 94 10 20 01 mov 1, %o2 ! 1 40008208: 30 bf ff e3 b,a 40008194 <_CORE_mutex_Surrender+0xa0> * Formally release the mutex before possibly transferring it to a * blocked thread. */ if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) holder->resource_count--; 4000820c: 82 00 7f ff add %g1, -1, %g1 40008210: 10 bf ff da b 40008178 <_CORE_mutex_Surrender+0x84> 40008214: c2 22 20 1c st %g1, [ %o0 + 0x1c ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; if (the_mutex->Attributes.priority_ceiling < 40008218: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: the_thread->resource_count++; 4000821c: 82 00 60 01 inc %g1 40008220: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if (the_mutex->Attributes.priority_ceiling < 40008224: d2 04 20 4c ld [ %l0 + 0x4c ], %o1 40008228: 80 a2 40 02 cmp %o1, %g2 4000822c: 1a 80 00 04 bcc 4000823c <_CORE_mutex_Surrender+0x148> 40008230: b0 10 20 00 clr %i0 the_thread->current_priority){ _Thread_Change_priority( 40008234: 40 00 07 35 call 40009f08 <_Thread_Change_priority> 40008238: 94 10 20 00 clr %o2 4000823c: 81 c7 e0 08 ret 40008240: 81 e8 00 00 restore switch ( the_mutex->Attributes.discipline ) { case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: break; case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_thread->resource_count++; 40008244: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40008248: 82 00 60 01 inc %g1 4000824c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 40008250: 81 c7 e0 08 ret 40008254: 91 e8 20 00 restore %g0, 0, %o0 } break; } } } else the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008258: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4000825c: 81 c7 e0 08 ret 40008260: 91 e8 20 00 restore %g0, 0, %o0 40008e00 <_CORE_spinlock_Release>: */ CORE_spinlock_Status _CORE_spinlock_Release( CORE_spinlock_Control *the_spinlock ) { 40008e00: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 40008e04: 7f ff e6 28 call 400026a4 40008e08: 01 00 00 00 nop /* * It must locked before it can be unlocked. */ if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008e0c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008e10: 80 a0 60 00 cmp %g1, 0 40008e14: 12 80 00 06 bne 40008e2c <_CORE_spinlock_Release+0x2c> 40008e18: 03 10 00 58 sethi %hi(0x40016000), %g1 _ISR_Enable( level ); 40008e1c: 7f ff e6 26 call 400026b4 40008e20: b0 10 20 06 mov 6, %i0 40008e24: 81 c7 e0 08 ret 40008e28: 81 e8 00 00 restore } /* * It must locked by the current thread before it can be unlocked. */ if ( the_spinlock->holder != _Thread_Executing->Object.id ) { 40008e2c: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 40008e30: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008e34: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008e38: 80 a0 c0 01 cmp %g3, %g1 40008e3c: 02 80 00 06 be 40008e54 <_CORE_spinlock_Release+0x54> 40008e40: 01 00 00 00 nop _ISR_Enable( level ); 40008e44: 7f ff e6 1c call 400026b4 <== NOT EXECUTED 40008e48: b0 10 20 02 mov 2, %i0 ! 2 <== NOT EXECUTED 40008e4c: 81 c7 e0 08 ret <== NOT EXECUTED 40008e50: 81 e8 00 00 restore <== NOT EXECUTED } /* * Let it be unlocked. */ the_spinlock->users -= 1; 40008e54: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008e58: 82 00 7f ff add %g1, -1, %g1 40008e5c: c2 26 20 08 st %g1, [ %i0 + 8 ] the_spinlock->lock = CORE_SPINLOCK_UNLOCKED; 40008e60: c0 26 20 04 clr [ %i0 + 4 ] the_spinlock->holder = 0; 40008e64: c0 26 20 0c clr [ %i0 + 0xc ] _ISR_Enable( level ); 40008e68: 7f ff e6 13 call 400026b4 40008e6c: b0 10 20 00 clr %i0 return CORE_SPINLOCK_SUCCESSFUL; } 40008e70: 81 c7 e0 08 ret 40008e74: 81 e8 00 00 restore 40008e78 <_CORE_spinlock_Wait>: CORE_spinlock_Status _CORE_spinlock_Wait( CORE_spinlock_Control *the_spinlock, boolean wait, Watchdog_Interval timeout ) { 40008e78: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; 40008e7c: 23 10 00 58 sethi %hi(0x40016000), %l1 40008e80: c2 04 63 a4 ld [ %l1 + 0x3a4 ], %g1 ! 400163a4 <_Watchdog_Ticks_since_boot> _ISR_Disable( level ); 40008e84: 7f ff e6 08 call 400026a4 40008e88: a0 06 80 01 add %i2, %g1, %l0 40008e8c: 88 10 00 08 mov %o0, %g4 if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008e90: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008e94: 80 a0 60 01 cmp %g1, 1 40008e98: 02 80 00 45 be 40008fac <_CORE_spinlock_Wait+0x134> 40008e9c: 03 10 00 58 sethi %hi(0x40016000), %g1 (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; 40008ea0: c2 06 20 08 ld [ %i0 + 8 ], %g1 40008ea4: 82 00 60 01 inc %g1 40008ea8: c2 26 20 08 st %g1, [ %i0 + 8 ] for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008eac: c4 06 20 04 ld [ %i0 + 4 ], %g2 40008eb0: 80 a0 a0 00 cmp %g2, 0 40008eb4: 02 80 00 2b be 40008f60 <_CORE_spinlock_Wait+0xe8> 40008eb8: 80 a6 60 00 cmp %i1, 0 } /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { 40008ebc: 12 80 00 0d bne 40008ef0 <_CORE_spinlock_Wait+0x78> 40008ec0: 33 10 00 58 sethi %hi(0x40016000), %i1 40008ec4: 30 80 00 32 b,a 40008f8c <_CORE_spinlock_Wait+0x114> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008ec8: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 ! 40016220 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008ecc: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008ed0: c2 26 62 20 st %g1, [ %i1 + 0x220 ] <== NOT EXECUTED /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40008ed4: 7f ff e5 f4 call 400026a4 <== NOT EXECUTED 40008ed8: 01 00 00 00 nop <== NOT EXECUTED 40008edc: 88 10 00 08 mov %o0, %g4 <== NOT EXECUTED _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008ee0: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40008ee4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008ee8: 02 80 00 1f be 40008f64 <_CORE_spinlock_Wait+0xec> <== NOT EXECUTED 40008eec: 03 10 00 58 sethi %hi(0x40016000), %g1 <== NOT EXECUTED } /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { 40008ef0: 80 a6 a0 00 cmp %i2, 0 40008ef4: 02 80 00 06 be 40008f0c <_CORE_spinlock_Wait+0x94> 40008ef8: 01 00 00 00 nop 40008efc: c2 04 63 a4 ld [ %l1 + 0x3a4 ], %g1 <== NOT EXECUTED 40008f00: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40008f04: 08 80 00 34 bleu 40008fd4 <_CORE_spinlock_Wait+0x15c> <== NOT EXECUTED 40008f08: 01 00 00 00 nop <== NOT EXECUTED * * A spinlock cannot be deleted while it is being used so we are * safe from deletion. */ _ISR_Enable( level ); 40008f0c: 7f ff e5 ea call 400026b4 40008f10: 90 10 00 04 mov %g4, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008f14: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 40008f18: 82 00 7f ff add %g1, -1, %g1 40008f1c: c2 26 62 20 st %g1, [ %i1 + 0x220 ] 40008f20: c4 06 62 20 ld [ %i1 + 0x220 ], %g2 40008f24: 80 a0 a0 00 cmp %g2, 0 40008f28: 12 bf ff e8 bne 40008ec8 <_CORE_spinlock_Wait+0x50> 40008f2c: 01 00 00 00 nop _Thread_Dispatch(); 40008f30: 40 00 08 17 call 4000af8c <_Thread_Dispatch> 40008f34: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008f38: c2 06 62 20 ld [ %i1 + 0x220 ], %g1 40008f3c: 82 00 60 01 inc %g1 40008f40: c2 26 62 20 st %g1, [ %i1 + 0x220 ] /* Another thread could get dispatched here */ /* Reenter the critical sections so we can attempt the lock again. */ _Thread_Disable_dispatch(); _ISR_Disable( level ); 40008f44: 7f ff e5 d8 call 400026a4 40008f48: 01 00 00 00 nop 40008f4c: 88 10 00 08 mov %o0, %g4 _ISR_Enable( level ); return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { 40008f50: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008f54: 80 a0 60 00 cmp %g1, 0 40008f58: 12 bf ff e7 bne 40008ef4 <_CORE_spinlock_Wait+0x7c> 40008f5c: 80 a6 a0 00 cmp %i2, 0 the_spinlock->lock = CORE_SPINLOCK_LOCKED; the_spinlock->holder = _Thread_Executing->Object.id; 40008f60: 03 10 00 58 sethi %hi(0x40016000), %g1 40008f64: c6 00 62 fc ld [ %g1 + 0x2fc ], %g3 ! 400162fc <_Thread_Executing> return CORE_SPINLOCK_HOLDER_RELOCKING; } the_spinlock->users += 1; for ( ;; ) { if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) { the_spinlock->lock = CORE_SPINLOCK_LOCKED; 40008f68: 84 10 20 01 mov 1, %g2 40008f6c: c4 26 20 04 st %g2, [ %i0 + 4 ] the_spinlock->holder = _Thread_Executing->Object.id; 40008f70: c2 00 e0 08 ld [ %g3 + 8 ], %g1 40008f74: c2 26 20 0c st %g1, [ %i0 + 0xc ] _ISR_Enable( level ); 40008f78: b0 10 20 00 clr %i0 40008f7c: 7f ff e5 ce call 400026b4 40008f80: 90 10 00 04 mov %g4, %o0 40008f84: 81 c7 e0 08 ret 40008f88: 81 e8 00 00 restore /* * Spinlock is unavailable. If not willing to wait, return. */ if ( !wait ) { the_spinlock->users -= 1; 40008f8c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008f90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008f94: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008f98: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 40008f9c: 7f ff e5 c6 call 400026b4 <== NOT EXECUTED 40008fa0: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008fa4: 81 c7 e0 08 ret <== NOT EXECUTED 40008fa8: 81 e8 00 00 restore <== NOT EXECUTED { ISR_Level level; Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout; _ISR_Disable( level ); if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) && 40008fac: c4 00 62 fc ld [ %g1 + 0x2fc ], %g2 40008fb0: c6 06 20 0c ld [ %i0 + 0xc ], %g3 40008fb4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40008fb8: 80 a0 c0 01 cmp %g3, %g1 40008fbc: 12 bf ff b9 bne 40008ea0 <_CORE_spinlock_Wait+0x28> 40008fc0: 01 00 00 00 nop (the_spinlock->holder == _Thread_Executing->Object.id) ) { _ISR_Enable( level ); 40008fc4: 7f ff e5 bc call 400026b4 40008fc8: b0 10 20 01 mov 1, %i0 ! 1 40008fcc: 81 c7 e0 08 ret 40008fd0: 81 e8 00 00 restore /* * They are willing to wait but there could be a timeout. */ if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) { the_spinlock->users -= 1; 40008fd4: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED 40008fd8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40008fdc: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED _ISR_Enable( level ); 40008fe0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED 40008fe4: 7f ff e5 b4 call 400026b4 <== NOT EXECUTED 40008fe8: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED 40008fec: 81 c7 e0 08 ret <== NOT EXECUTED 40008ff0: 81 e8 00 00 restore <== NOT EXECUTED 4000e4ac <_Debug_Is_enabled>: */ boolean _Debug_Is_enabled( rtems_debug_control level ) { 4000e4ac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000e4b0: c4 00 62 c0 ld [ %g1 + 0x2c0 ], %g2 ! 4001bec0 <_Debug_Level> <== NOT EXECUTED 4000e4b4: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED return (_Debug_Level & level) ? TRUE : FALSE; } 4000e4b8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000e4bc: 81 c3 e0 08 retl <== NOT EXECUTED 4000e4c0: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED 4000668c <_Event_Seize>: rtems_event_set event_in, rtems_option option_set, rtems_interval ticks, rtems_event_set *event_out ) { 4000668c: 9d e3 bf 98 save %sp, -104, %sp rtems_event_set pending_events; ISR_Level level; RTEMS_API_Control *api; Event_Sync_states sync_state; executing = _Thread_Executing; 40006690: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006694: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> executing->Wait.return_code = RTEMS_SUCCESSFUL; 40006698: c0 24 20 34 clr [ %l0 + 0x34 ] api = executing->API_Extensions[ THREAD_API_RTEMS ]; _ISR_Disable( level ); 4000669c: 7f ff ee 53 call 40001fe8 400066a0: e4 04 21 6c ld [ %l0 + 0x16c ], %l2 400066a4: 84 10 00 08 mov %o0, %g2 pending_events = api->pending_events; 400066a8: c2 04 a0 40 ld [ %l2 + 0x40 ], %g1 seized_events = _Event_sets_Get( pending_events, event_in ); if ( !_Event_sets_Is_empty( seized_events ) && 400066ac: a2 8e 00 01 andcc %i0, %g1, %l1 400066b0: 02 80 00 0e be 400066e8 <_Event_Seize+0x5c> 400066b4: 80 8e 60 01 btst 1, %i1 400066b8: 80 a6 00 11 cmp %i0, %l1 400066bc: 02 80 00 04 be 400066cc <_Event_Seize+0x40> 400066c0: 80 8e 60 02 btst 2, %i1 400066c4: 02 80 00 09 be 400066e8 <_Event_Seize+0x5c> 400066c8: 80 8e 60 01 btst 1, %i1 (seized_events == event_in || _Options_Is_any( option_set )) ) { api->pending_events = 400066cc: 82 28 40 11 andn %g1, %l1, %g1 400066d0: c2 24 a0 40 st %g1, [ %l2 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); _ISR_Enable( level ); 400066d4: 7f ff ee 49 call 40001ff8 400066d8: 01 00 00 00 nop *event_out = seized_events; 400066dc: e2 26 c0 00 st %l1, [ %i3 ] 400066e0: 81 c7 e0 08 ret 400066e4: 81 e8 00 00 restore return; } if ( _Options_Is_no_wait( option_set ) ) { 400066e8: 12 80 00 1e bne 40006760 <_Event_Seize+0xd4> 400066ec: 82 10 20 01 mov 1, %g1 executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 400066f0: 23 10 00 71 sethi %hi(0x4001c400), %l1 executing->Wait.option = (uint32_t ) option_set; 400066f4: f2 24 20 30 st %i1, [ %l0 + 0x30 ] executing->Wait.count = (uint32_t ) event_in; 400066f8: f0 24 20 24 st %i0, [ %l0 + 0x24 ] executing->Wait.return_argument = event_out; 400066fc: f6 24 20 28 st %i3, [ %l0 + 0x28 ] executing->Wait.return_code = RTEMS_UNSATISFIED; *event_out = seized_events; return; } _Event_Sync_state = EVENT_SYNC_NOTHING_HAPPENED; 40006700: c2 24 63 c4 st %g1, [ %l1 + 0x3c4 ] executing->Wait.option = (uint32_t ) option_set; executing->Wait.count = (uint32_t ) event_in; executing->Wait.return_argument = event_out; _ISR_Enable( level ); 40006704: 7f ff ee 3d call 40001ff8 40006708: 90 10 00 02 mov %g2, %o0 if ( ticks ) { 4000670c: 80 a6 a0 00 cmp %i2, 0 40006710: 32 80 00 24 bne,a 400067a0 <_Event_Seize+0x114> 40006714: c2 04 20 08 ld [ %l0 + 8 ], %g1 NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 40006718: 90 10 00 10 mov %l0, %o0 4000671c: 40 00 12 2f call 4000afd8 <_Thread_Set_state> 40006720: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 40006724: 7f ff ee 31 call 40001fe8 40006728: 01 00 00 00 nop 4000672c: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 40006730: c4 04 63 c4 ld [ %l1 + 0x3c4 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 40006734: c0 24 63 c4 clr [ %l1 + 0x3c4 ] switch ( sync_state ) { 40006738: 80 a0 a0 02 cmp %g2, 2 4000673c: 02 80 00 30 be 400067fc <_Event_Seize+0x170> 40006740: 82 10 20 06 mov 6, %g1 40006744: 80 a0 a0 03 cmp %g2, 3 40006748: 02 80 00 0d be 4000677c <_Event_Seize+0xf0> 4000674c: 80 a0 a0 01 cmp %g2, 1 40006750: 02 80 00 31 be 40006814 <_Event_Seize+0x188> 40006754: 01 00 00 00 nop 40006758: 81 c7 e0 08 ret <== NOT EXECUTED 4000675c: 81 e8 00 00 restore <== NOT EXECUTED *event_out = seized_events; return; } if ( _Options_Is_no_wait( option_set ) ) { _ISR_Enable( level ); 40006760: 7f ff ee 26 call 40001ff8 40006764: 90 10 00 02 mov %g2, %o0 executing->Wait.return_code = RTEMS_UNSATISFIED; 40006768: 82 10 20 0d mov 0xd, %g1 4000676c: c2 24 20 34 st %g1, [ %l0 + 0x34 ] *event_out = seized_events; 40006770: e2 26 c0 00 st %l1, [ %i3 ] 40006774: 81 c7 e0 08 ret 40006778: 81 e8 00 00 restore _ISR_Enable( level ); _Thread_Unblock( executing ); return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { 4000677c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40006780: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006784: 22 80 00 26 be,a 4000681c <_Event_Seize+0x190> <== NOT EXECUTED 40006788: c4 24 20 50 st %g2, [ %l0 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &executing->Timer ); } else _ISR_Enable( level ); 4000678c: 7f ff ee 1b call 40001ff8 <== NOT EXECUTED 40006790: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006794: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 40006798: 40 00 0e 4b call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000679c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400067a0: 92 04 20 48 add %l0, 0x48, %o1 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 400067a4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400067a8: 03 10 00 1a sethi %hi(0x40006800), %g1 400067ac: 82 10 62 50 or %g1, 0x250, %g1 ! 40006a50 <_Event_Timeout> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400067b0: f4 24 20 54 st %i2, [ %l0 + 0x54 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400067b4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400067b8: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400067bc: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400067c0: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400067c4: 40 00 14 1c call 4000b834 <_Watchdog_Insert> 400067c8: 90 12 22 dc or %o0, 0x2dc, %o0 ! 4001bedc <_Watchdog_Ticks_chain> NULL ); _Watchdog_Insert_ticks( &executing->Timer, ticks ); } _Thread_Set_state( executing, STATES_WAITING_FOR_EVENT ); 400067cc: 90 10 00 10 mov %l0, %o0 400067d0: 40 00 12 02 call 4000afd8 <_Thread_Set_state> 400067d4: 92 10 21 00 mov 0x100, %o1 _ISR_Disable( level ); 400067d8: 7f ff ee 04 call 40001fe8 400067dc: 01 00 00 00 nop 400067e0: b0 10 00 08 mov %o0, %i0 sync_state = _Event_Sync_state; 400067e4: c4 04 63 c4 ld [ %l1 + 0x3c4 ], %g2 _Event_Sync_state = EVENT_SYNC_SYNCHRONIZED; 400067e8: c0 24 63 c4 clr [ %l1 + 0x3c4 ] switch ( sync_state ) { 400067ec: 80 a0 a0 02 cmp %g2, 2 400067f0: 12 bf ff d6 bne 40006748 <_Event_Seize+0xbc> 400067f4: 80 a0 a0 03 cmp %g2, 3 case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); return; case EVENT_SYNC_TIMEOUT: executing->Wait.return_code = RTEMS_TIMEOUT; 400067f8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 400067fc: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40006800: 7f ff ed fe call 40001ff8 <== NOT EXECUTED 40006804: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 40006808: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000680c: 40 00 0e 2e call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 40006810: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED * enter the synchronization states above. */ return; case EVENT_SYNC_NOTHING_HAPPENED: _ISR_Enable( level ); 40006814: 7f ff ed f9 call 40001ff8 40006818: 81 e8 00 00 restore return; case EVENT_SYNC_SATISFIED: if ( _Watchdog_Is_active( &executing->Timer ) ) { _Watchdog_Deactivate( &executing->Timer ); _ISR_Enable( level ); 4000681c: 7f ff ed f7 call 40001ff8 <== NOT EXECUTED 40006820: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED (void) _Watchdog_Remove( &executing->Timer ); 40006824: 40 00 14 6e call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 40006828: 90 04 20 48 add %l0, 0x48, %o0 <== NOT EXECUTED 4000682c: 10 bf ff db b 40006798 <_Event_Seize+0x10c> <== NOT EXECUTED 40006830: b2 16 63 f8 or %i1, 0x3f8, %i1 <== NOT EXECUTED 40006930 <_Event_Surrender>: */ void _Event_Surrender( Thread_Control *the_thread ) { 40006930: 9d e3 bf 98 save %sp, -104, %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 ]; 40006934: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 option_set = (rtems_option) the_thread->Wait.option; 40006938: e4 06 20 30 ld [ %i0 + 0x30 ], %l2 _ISR_Disable( level ); 4000693c: 7f ff ed ab call 40001fe8 40006940: b2 10 00 18 mov %i0, %i1 40006944: a2 10 00 08 mov %o0, %l1 pending_events = api->pending_events; 40006948: c8 04 20 40 ld [ %l0 + 0x40 ], %g4 event_condition = (rtems_event_set) the_thread->Wait.count; 4000694c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { 40006950: 9a 88 c0 04 andcc %g3, %g4, %o5 40006954: 02 80 00 20 be 400069d4 <_Event_Surrender+0xa4> 40006958: 01 00 00 00 nop if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { 4000695c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40006960: 80 88 61 00 btst 0x100, %g1 40006964: 02 80 00 08 be 40006984 <_Event_Surrender+0x54> 40006968: 19 10 00 71 sethi %hi(0x4001c400), %o4 if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { 4000696c: 80 a0 c0 0d cmp %g3, %o5 40006970: 02 80 00 1b be 400069dc <_Event_Surrender+0xac> 40006974: 80 8c a0 02 btst 2, %l2 40006978: 12 80 00 1a bne 400069e0 <_Event_Surrender+0xb0> 4000697c: 82 29 00 0d andn %g4, %o5, %g1 } return; } } switch ( _Event_Sync_state ) { 40006980: 19 10 00 71 sethi %hi(0x4001c400), %o4 <== NOT EXECUTED 40006984: c2 03 23 c4 ld [ %o4 + 0x3c4 ], %g1 ! 4001c7c4 <_Event_Sync_state> <== NOT EXECUTED 40006988: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000698c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40006990: 18 80 00 11 bgu 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 40006994: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED case EVENT_SYNC_SATISFIED: break; case EVENT_SYNC_NOTHING_HAPPENED: case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) 40006998: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000699c: 80 a6 40 02 cmp %i1, %g2 <== NOT EXECUTED 400069a0: 12 80 00 0d bne 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 400069a4: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { 400069a8: 02 80 00 04 be 400069b8 <_Event_Surrender+0x88> <== NOT EXECUTED 400069ac: 80 8c a0 02 btst 2, %l2 <== NOT EXECUTED 400069b0: 02 80 00 09 be 400069d4 <_Event_Surrender+0xa4> <== NOT EXECUTED 400069b4: 01 00 00 00 nop <== NOT EXECUTED api->pending_events = 400069b8: 82 29 00 0d andn %g4, %o5, %g1 <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069bc: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 <== NOT EXECUTED case EVENT_SYNC_TIMEOUT: if ( !_Thread_Is_executing( the_thread ) ) break; if ( seized_events == event_condition || _Options_Is_any(option_set) ) { api->pending_events = 400069c0: c2 24 20 40 st %g1, [ %l0 + 0x40 ] <== NOT EXECUTED _Event_sets_Clear( pending_events,seized_events ); the_thread->Wait.count = 0; 400069c4: c0 26 60 24 clr [ %i1 + 0x24 ] <== NOT EXECUTED *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; _Event_Sync_state = EVENT_SYNC_SATISFIED; 400069c8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 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; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069cc: da 20 80 00 st %o5, [ %g2 ] <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_SATISFIED; 400069d0: c2 23 23 c4 st %g1, [ %o4 + 0x3c4 ] <== NOT EXECUTED } break; } } _ISR_Enable( level ); 400069d4: 7f ff ed 89 call 40001ff8 400069d8: 91 e8 00 11 restore %g0, %l1, %o0 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = 400069dc: 82 29 00 0d andn %g4, %o5, %g1 _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069e0: c4 06 60 28 ld [ %i1 + 0x28 ], %g2 seized_events = _Event_sets_Get( pending_events, event_condition ); if ( !_Event_sets_Is_empty( seized_events ) ) { if ( _States_Is_waiting_for_event( the_thread->current_state ) ) { if ( seized_events == event_condition || _Options_Is_any( option_set ) ) { api->pending_events = 400069e4: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _Event_sets_Clear( pending_events, seized_events ); the_thread->Wait.count = 0; 400069e8: c0 26 60 24 clr [ %i1 + 0x24 ] *(rtems_event_set *)the_thread->Wait.return_argument = seized_events; 400069ec: da 20 80 00 st %o5, [ %g2 ] _ISR_Flash( level ); 400069f0: 7f ff ed 82 call 40001ff8 400069f4: 01 00 00 00 nop 400069f8: 7f ff ed 7c call 40001fe8 400069fc: 01 00 00 00 nop if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 40006a00: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 40006a04: 80 a0 60 02 cmp %g1, 2 40006a08: 02 80 00 08 be 40006a28 <_Event_Surrender+0xf8> 40006a0c: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 40006a10: 90 10 00 11 mov %l1, %o0 40006a14: 7f ff ed 79 call 40001ff8 40006a18: 33 04 00 ff sethi %hi(0x1003fc00), %i1 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006a1c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006a20: 40 00 0d a9 call 4000a0c4 <_Thread_Clear_state> 40006a24: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 40006a28: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 40006a2c: 7f ff ed 73 call 40001ff8 40006a30: 90 10 00 11 mov %l1, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 40006a34: 40 00 13 ea call 4000b9dc <_Watchdog_Remove> 40006a38: 90 06 60 48 add %i1, 0x48, %o0 40006a3c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 40006a40: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 40006a44: 40 00 0d a0 call 4000a0c4 <_Thread_Clear_state> 40006a48: 81 e8 00 00 restore 40006a4c: 01 00 00 00 nop 40006a50 <_Event_Timeout>: void _Event_Timeout( Objects_Id id, void *ignored ) { 40006a50: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006a54: 92 96 20 00 orcc %i0, 0, %o1 40006a58: 12 80 00 25 bne 40006aec <_Event_Timeout+0x9c> 40006a5c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006a60: 21 10 00 6f sethi %hi(0x4001bc00), %l0 <== NOT EXECUTED 40006a64: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40006a68: 82 00 60 01 inc %g1 <== NOT EXECUTED 40006a6c: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006a70: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006a74: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40006a78: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED * 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 ); 40006a7c: 7f ff ed 5b call 40001fe8 40006a80: 01 00 00 00 nop 40006a84: 88 10 00 08 mov %o0, %g4 if ( the_thread->Wait.count ) { /* verify thread is waiting */ 40006a88: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 40006a8c: 80 a0 60 00 cmp %g1, 0 40006a90: 02 80 00 3a be 40006b78 <_Event_Timeout+0x128> 40006a94: 07 10 00 71 sethi %hi(0x4001c400), %g3 the_thread->Wait.count = 0; if ( _Event_Sync_state != EVENT_SYNC_SYNCHRONIZED && 40006a98: c2 00 e3 c4 ld [ %g3 + 0x3c4 ], %g1 ! 4001c7c4 <_Event_Sync_state> 40006a9c: 80 a0 60 00 cmp %g1, 0 40006aa0: 02 80 00 29 be 40006b44 <_Event_Timeout+0xf4> 40006aa4: c0 26 20 24 clr [ %i0 + 0x24 ] 40006aa8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006aac: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 40006ab0: 80 a6 00 02 cmp %i0, %g2 <== NOT EXECUTED 40006ab4: 12 80 00 25 bne 40006b48 <_Event_Timeout+0xf8> <== NOT EXECUTED 40006ab8: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { 40006abc: c2 00 e3 c4 ld [ %g3 + 0x3c4 ], %g1 <== NOT EXECUTED 40006ac0: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40006ac4: 02 80 00 03 be 40006ad0 <_Event_Timeout+0x80> <== NOT EXECUTED 40006ac8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED _Event_Sync_state = EVENT_SYNC_TIMEOUT; 40006acc: c2 20 e3 c4 st %g1, [ %g3 + 0x3c4 ] <== NOT EXECUTED } _ISR_Enable( level ); 40006ad0: 7f ff ed 4a call 40001ff8 <== NOT EXECUTED 40006ad4: 01 00 00 00 nop <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006ad8: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 <== NOT EXECUTED 40006adc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40006ae0: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED 40006ae4: 81 c7 e0 08 ret <== NOT EXECUTED 40006ae8: 81 e8 00 00 restore <== NOT EXECUTED 40006aec: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40006af0: 80 a0 a0 04 cmp %g2, 4 40006af4: 18 bf ff fc bgu 40006ae4 <_Event_Timeout+0x94> 40006af8: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40006afc: 80 a0 60 01 cmp %g1, 1 40006b00: 12 bf ff f9 bne 40006ae4 <_Event_Timeout+0x94> 40006b04: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40006b08: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40006b0c: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 40006b10: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40006b14: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40006b18: 80 a2 20 00 cmp %o0, 0 40006b1c: 02 80 00 15 be 40006b70 <_Event_Timeout+0x120> 40006b20: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006b24: 40 00 08 f5 call 40008ef8 <_Objects_Get> 40006b28: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; ISR_Level level; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006b2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006b30: 80 a0 60 00 cmp %g1, 0 40006b34: 12 bf ff ec bne 40006ae4 <_Event_Timeout+0x94> 40006b38: b0 10 00 08 mov %o0, %i0 40006b3c: 10 bf ff d0 b 40006a7c <_Event_Timeout+0x2c> 40006b40: 21 10 00 6f sethi %hi(0x4001bc00), %l0 if ( _Event_Sync_state != EVENT_SYNC_SATISFIED ) { _Event_Sync_state = EVENT_SYNC_TIMEOUT; } _ISR_Enable( level ); } else { the_thread->Wait.return_code = RTEMS_TIMEOUT; 40006b44: 82 10 20 06 mov 6, %g1 40006b48: c2 26 20 34 st %g1, [ %i0 + 0x34 ] _ISR_Enable( level ); 40006b4c: 7f ff ed 2b call 40001ff8 40006b50: 90 10 00 04 mov %g4, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40006b54: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40006b58: 90 10 00 18 mov %i0, %o0 40006b5c: 40 00 0d 5a call 4000a0c4 <_Thread_Clear_state> 40006b60: 92 12 63 f8 or %o1, 0x3f8, %o1 */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40006b64: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 40006b68: 82 00 7f ff add %g1, -1, %g1 40006b6c: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40006b70: 81 c7 e0 08 ret 40006b74: 81 e8 00 00 restore _Thread_Unblock( the_thread ); } } else { _ISR_Enable( level ); 40006b78: 7f ff ed 20 call 40001ff8 <== NOT EXECUTED 40006b7c: 01 00 00 00 nop <== NOT EXECUTED 40006b80: 30 bf ff f9 b,a 40006b64 <_Event_Timeout+0x114> <== NOT EXECUTED 40008438 <_Heap_Allocate>: void *_Heap_Allocate( Heap_Control *the_heap, size_t size ) { 40008438: 9d e3 bf 98 save %sp, -104, %sp Heap_Block *the_block; void *ptr = NULL; Heap_Statistics *const stats = &the_heap->stats; Heap_Block *const tail = _Heap_Tail(the_heap); the_size = 4000843c: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 40008440: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40008444: 90 10 00 19 mov %i1, %o0 40008448: 40 00 00 cd call 4000877c <_Heap_Calc_block_size> 4000844c: a0 10 00 18 mov %i0, %l0 _Heap_Calc_block_size(size, the_heap->page_size, the_heap->min_block_size); if(the_size == 0) 40008450: 80 a2 20 00 cmp %o0, 0 40008454: 22 80 00 1a be,a 400084bc <_Heap_Allocate+0x84> 40008458: b0 10 20 00 clr %i0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4000845c: f0 06 20 08 ld [ %i0 + 8 ], %i0 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 40008460: 80 a4 00 18 cmp %l0, %i0 40008464: 22 80 00 16 be,a 400084bc <_Heap_Allocate+0x84> 40008468: b0 10 20 00 clr %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 4000846c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008470: 80 a2 00 01 cmp %o0, %g1 40008474: 08 80 00 16 bleu 400084cc <_Heap_Allocate+0x94> 40008478: b2 10 20 00 clr %i1 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 4000847c: 10 80 00 07 b 40008498 <_Heap_Allocate+0x60> 40008480: f0 06 20 08 ld [ %i0 + 8 ], %i0 /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { 40008484: c2 06 20 04 ld [ %i0 + 4 ], %g1 40008488: 80 a2 00 01 cmp %o0, %g1 4000848c: 08 80 00 11 bleu 400084d0 <_Heap_Allocate+0x98> 40008490: 94 10 00 08 mov %o0, %o2 return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; the_block = the_block->next, ++search_count) 40008494: f0 06 20 08 ld [ %i0 + 8 ], %i0 if(the_size == 0) return NULL; /* Find large enough free block. */ for(the_block = _Heap_First(the_heap), search_count = 0; the_block != tail; 40008498: 80 a4 00 18 cmp %l0, %i0 4000849c: 12 bf ff fa bne 40008484 <_Heap_Allocate+0x4c> 400084a0: b2 06 60 01 inc %i1 400084a4: b0 10 20 00 clr %i0 _HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size)); break; } } if(stats->max_search < search_count) 400084a8: c2 04 20 44 ld [ %l0 + 0x44 ], %g1 400084ac: 80 a6 40 01 cmp %i1, %g1 400084b0: 08 80 00 05 bleu 400084c4 <_Heap_Allocate+0x8c> 400084b4: 01 00 00 00 nop stats->max_search = search_count; 400084b8: f2 24 20 44 st %i1, [ %l0 + 0x44 ] 400084bc: 81 c7 e0 08 ret 400084c0: 81 e8 00 00 restore return ptr; } 400084c4: 81 c7 e0 08 ret 400084c8: 81 e8 00 00 restore _HAssert(_Heap_Is_prev_used(the_block)); /* Don't bother to mask out the HEAP_PREV_USED bit as it won't change the result of the comparison. */ if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); 400084cc: 94 10 00 08 mov %o0, %o2 400084d0: 92 10 00 18 mov %i0, %o1 400084d4: 40 00 00 7e call 400086cc <_Heap_Block_allocate> 400084d8: 90 10 00 10 mov %l0, %o0 ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084dc: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 stats->searches += search_count + 1; 400084e0: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084e4: 82 00 60 01 inc %g1 stats->searches += search_count + 1; 400084e8: 84 00 a0 01 inc %g2 if(the_block->size >= the_size) { (void)_Heap_Block_allocate(the_heap, the_block, the_size ); ptr = _Heap_User_area(the_block); stats->allocs += 1; 400084ec: c2 24 20 48 st %g1, [ %l0 + 0x48 ] stats->searches += search_count + 1; 400084f0: 84 00 80 19 add %g2, %i1, %g2 RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset ( void *base, uint32_t offset ) { return (void *)((char *)base + offset); 400084f4: b0 06 20 08 add %i0, 8, %i0 400084f8: 10 bf ff ec b 400084a8 <_Heap_Allocate+0x70> 400084fc: c4 24 20 4c st %g2, [ %l0 + 0x4c ] 4001c548 <_Heap_Get_free_information>: */ RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First ( Heap_Control *the_heap ) { return _Heap_Head(the_heap)->next; 4001c548: da 02 20 08 ld [ %o0 + 8 ], %o5 <== NOT EXECUTED ) { Heap_Block *the_block; Heap_Block *const tail = _Heap_Tail(the_heap); info->number = 0; 4001c54c: c0 22 40 00 clr [ %o1 ] <== NOT EXECUTED info->largest = 0; 4001c550: c0 22 60 04 clr [ %o1 + 4 ] <== NOT EXECUTED info->total = 0; 4001c554: c0 22 60 08 clr [ %o1 + 8 ] <== NOT EXECUTED for(the_block = _Heap_First(the_heap); the_block != tail; 4001c558: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001c55c: 02 80 00 12 be 4001c5a4 <_Heap_Get_free_information+0x5c> <== NOT EXECUTED 4001c560: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001c564: 84 10 00 0c mov %o4, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4001c568: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; info->total += the_size; if ( info->largest < the_size ) 4001c56c: c6 02 60 04 ld [ %o1 + 4 ], %g3 <== NOT EXECUTED 4001c570: 88 08 7f fe and %g1, -2, %g4 <== NOT EXECUTED uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 4001c574: 84 00 a0 01 inc %g2 <== NOT EXECUTED info->total += the_size; 4001c578: 82 03 00 04 add %o4, %g4, %g1 <== NOT EXECUTED uint32_t const the_size = _Heap_Block_size(the_block); /* As we always coalesce free blocks, prev block must have been used. */ _HAssert(_Heap_Is_prev_used(the_block)); info->number++; 4001c57c: c4 22 40 00 st %g2, [ %o1 ] <== NOT EXECUTED info->total += the_size; 4001c580: c2 22 60 08 st %g1, [ %o1 + 8 ] <== NOT EXECUTED if ( info->largest < the_size ) 4001c584: 80 a1 00 03 cmp %g4, %g3 <== NOT EXECUTED 4001c588: 08 80 00 03 bleu 4001c594 <_Heap_Get_free_information+0x4c> <== NOT EXECUTED 4001c58c: 98 10 00 01 mov %g1, %o4 <== NOT EXECUTED info->largest = the_size; 4001c590: c8 22 60 04 st %g4, [ %o1 + 4 ] <== NOT EXECUTED info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; the_block = the_block->next) 4001c594: da 03 60 08 ld [ %o5 + 8 ], %o5 <== NOT EXECUTED info->number = 0; info->largest = 0; info->total = 0; for(the_block = _Heap_First(the_heap); the_block != tail; 4001c598: 80 a2 00 0d cmp %o0, %o5 <== NOT EXECUTED 4001c59c: 32 bf ff f4 bne,a 4001c56c <_Heap_Get_free_information+0x24> <== NOT EXECUTED 4001c5a0: c2 03 60 04 ld [ %o5 + 4 ], %g1 <== NOT EXECUTED 4001c5a4: 81 c3 e0 08 retl <== NOT EXECUTED 4001c5a8: 01 00 00 00 nop 400087cc <_Heap_Initialize>: Heap_Control *the_heap, void *starting_address, size_t size, uint32_t page_size ) { 400087cc: 9d e3 bf 98 save %sp, -104, %sp _H_uptr_t start; _H_uptr_t aligned_start; uint32_t overhead; Heap_Statistics *const stats = &the_heap->stats; if (page_size == 0) 400087d0: 80 a6 e0 00 cmp %i3, 0 400087d4: 12 80 00 43 bne 400088e0 <_Heap_Initialize+0x114> 400087d8: 84 8e e0 07 andcc %i3, 7, %g2 400087dc: b6 10 20 08 mov 8, %i3 <== NOT EXECUTED 400087e0: a4 10 20 00 clr %l2 <== NOT EXECUTED /* Calculate aligned_start so that aligned_start + HEAP_BLOCK_USER_OFFSET (value of user pointer) is aligned on 'page_size' boundary. Make sure resulting 'aligned_start' is not below 'starting_address'. */ start = _H_p2u(starting_address); aligned_start = start + HEAP_BLOCK_USER_OFFSET; 400087e4: a0 06 60 08 add %i1, 8, %l0 uint32_t alignment ) { _H_uptr_t v = *value; uint32_t a = alignment; _H_uptr_t r = v % a; 400087e8: 92 10 00 1b mov %i3, %o1 400087ec: 40 00 3a b6 call 400172c4 <.urem> 400087f0: 90 10 00 10 mov %l0, %o0 *value = r ? v - r + a : v; 400087f4: 80 a2 20 00 cmp %o0, 0 400087f8: 02 80 00 05 be 4000880c <_Heap_Initialize+0x40> 400087fc: a2 04 3f f8 add %l0, -8, %l1 40008800: 82 06 c0 10 add %i3, %l0, %g1 40008804: a0 20 40 08 sub %g1, %o0, %l0 _Heap_Align_up_uptr ( &aligned_start, page_size ); aligned_start -= HEAP_BLOCK_USER_OFFSET; 40008808: a2 04 3f f8 add %l0, -8, %l1 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000880c: 80 a4 a0 00 cmp %l2, 0 40008810: 02 80 00 04 be 40008820 <_Heap_Initialize+0x54> 40008814: 82 10 20 10 mov 0x10, %g1 40008818: 82 06 e0 10 add %i3, 0x10, %g1 4000881c: 82 20 40 12 sub %g1, %l2, %g1 40008820: c2 26 20 14 st %g1, [ %i0 + 0x14 ] /* Calculate 'the_size' -- size of the first block so that there is enough space at the end for the permanent last block. It is equal to 'size' minus total overhead aligned down to the nearest multiple of 'page_size'. */ overhead = HEAP_OVERHEAD + (aligned_start - start); 40008824: 82 24 40 19 sub %l1, %i1, %g1 40008828: 82 00 60 08 add %g1, 8, %g1 if ( size < overhead ) 4000882c: 80 a0 40 1a cmp %g1, %i2 40008830: 18 80 00 2a bgu 400088d8 <_Heap_Initialize+0x10c> 40008834: a0 26 80 01 sub %i2, %g1, %l0 uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 40008838: 92 10 00 1b mov %i3, %o1 4000883c: 40 00 3a a2 call 400172c4 <.urem> 40008840: 90 10 00 10 mov %l0, %o0 return 0; /* Too small area for the heap */ the_size = size - overhead; _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) 40008844: a0 a4 00 08 subcc %l0, %o0, %l0 40008848: 02 80 00 24 be 400088d8 <_Heap_Initialize+0x10c> 4000884c: 09 10 00 6e sethi %hi(0x4001b800), %g4 return 0; /* Too small area for the heap */ the_heap->page_size = page_size; 40008850: f6 26 20 10 st %i3, [ %i0 + 0x10 ] the_heap->begin = starting_address; the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; 40008854: f6 24 40 00 st %i3, [ %l1 ] the_block->size = the_size | HEAP_PREV_USED; 40008858: 82 14 20 01 or %l0, 1, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 4000885c: c6 01 23 bc ld [ %g4 + 0x3bc ], %g3 the_heap->end = starting_address + size; the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; 40008860: c2 24 60 04 st %g1, [ %l1 + 4 ] _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ 40008864: e0 24 40 10 st %l0, [ %l1 + %l0 ] RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 40008868: 9a 04 40 10 add %l1, %l0, %o5 the_block->size = page_size; 4000886c: f6 23 60 04 st %i3, [ %o5 + 4 ] the_block = (Heap_Block *) aligned_start; the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); 40008870: f0 24 60 08 st %i0, [ %l1 + 8 ] the_block->prev = _Heap_Head( the_heap ); 40008874: f0 24 60 0c st %i0, [ %l1 + 0xc ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 40008878: c6 26 20 28 st %g3, [ %i0 + 0x28 ] the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ the_block->prev_size = the_size; /* Previous block is free */ the_block->size = page_size; stats->size = size; 4000887c: f4 26 20 2c st %i2, [ %i0 + 0x2c ] stats->free_size = the_size; 40008880: e0 26 20 30 st %l0, [ %i0 + 0x30 ] stats->min_free_size = the_size; 40008884: e0 26 20 34 st %l0, [ %i0 + 0x34 ] stats->free_blocks = 1; stats->max_free_blocks = 1; stats->used_blocks = 0; 40008888: c0 26 20 40 clr [ %i0 + 0x40 ] stats->max_search = 0; 4000888c: c0 26 20 44 clr [ %i0 + 0x44 ] stats->allocs = 0; 40008890: c0 26 20 48 clr [ %i0 + 0x48 ] stats->searches = 0; 40008894: c0 26 20 4c clr [ %i0 + 0x4c ] stats->frees = 0; 40008898: c0 26 20 50 clr [ %i0 + 0x50 ] stats->resizes = 0; 4000889c: c0 26 20 54 clr [ %i0 + 0x54 ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 400088a0: 84 10 20 01 mov 1, %g2 stats->max_free_blocks = 1; 400088a4: c4 26 20 3c st %g2, [ %i0 + 0x3c ] the_block->size = page_size; stats->size = size; stats->free_size = the_size; stats->min_free_size = the_size; stats->free_blocks = 1; 400088a8: c4 26 20 38 st %g2, [ %i0 + 0x38 ] if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 400088ac: 82 06 40 1a add %i1, %i2, %g1 stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400088b0: 86 00 e0 01 inc %g3 if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; the_heap->end = starting_address + size; 400088b4: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Heap_Align_down ( &the_size, page_size ); if ( the_size == 0 ) return 0; /* Too small area for the heap */ the_heap->page_size = page_size; the_heap->begin = starting_address; 400088b8: f2 26 20 18 st %i1, [ %i0 + 0x18 ] the_block->prev_size = page_size; the_block->size = the_size | HEAP_PREV_USED; the_block->next = _Heap_Tail( the_heap ); the_block->prev = _Heap_Head( the_heap ); _Heap_Head(the_heap)->next = the_block; 400088bc: e2 26 20 08 st %l1, [ %i0 + 8 ] _Heap_Tail(the_heap)->prev = the_block; 400088c0: e2 26 20 0c st %l1, [ %i0 + 0xc ] the_heap->start = the_block; 400088c4: e2 26 20 20 st %l1, [ %i0 + 0x20 ] _HAssert(_Heap_Is_aligned(the_heap->page_size, CPU_ALIGNMENT)); _HAssert(_Heap_Is_aligned(the_heap->min_block_size, page_size)); _HAssert(_Heap_Is_aligned_ptr(_Heap_User_area(the_block), page_size)); the_block = _Heap_Block_at( the_block, the_size ); the_heap->final = the_block; /* Permanent final block of the heap */ 400088c8: da 26 20 24 st %o5, [ %i0 + 0x24 ] stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++; 400088cc: c6 21 23 bc st %g3, [ %g4 + 0x3bc ] return ( the_size - HEAP_BLOCK_USED_OVERHEAD ); 400088d0: 81 c7 e0 08 ret 400088d4: 91 ec 3f fc restore %l0, -4, %o0 } 400088d8: 81 c7 e0 08 ret 400088dc: 91 e8 20 00 restore %g0, 0, %o0 ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 400088e0: 02 80 00 04 be 400088f0 <_Heap_Initialize+0x124> 400088e4: 90 10 20 10 mov 0x10, %o0 400088e8: 82 06 e0 08 add %i3, 8, %g1 400088ec: b6 20 40 02 sub %g1, %g2, %i3 400088f0: 40 00 3a 75 call 400172c4 <.urem> 400088f4: 92 10 00 1b mov %i3, %o1 400088f8: 10 bf ff bb b 400087e4 <_Heap_Initialize+0x18> 400088fc: a4 10 00 08 mov %o0, %l2 4000e6d0 <_Heap_Resize_block>: void *starting_address, size_t size, uint32_t *old_mem_size, uint32_t *avail_mem_size ) { 4000e6d0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; uint32_t const page_size = the_heap->page_size; 4000e6d4: e6 06 20 10 ld [ %i0 + 0x10 ], %l3 <== NOT EXECUTED Heap_Block *next_next_block; uint32_t old_block_size; uint32_t old_user_size; uint32_t prev_used_flag; Heap_Statistics *const stats = &the_heap->stats; uint32_t const min_block_size = the_heap->min_block_size; 4000e6d8: ee 06 20 14 ld [ %i0 + 0x14 ], %l7 <== NOT EXECUTED uint32_t const page_size = the_heap->page_size; *old_mem_size = 0; 4000e6dc: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED *avail_mem_size = 0; 4000e6e0: c0 27 00 00 clr [ %i4 ] <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e6e4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000e6e8: 40 00 22 f7 call 400172c4 <.urem> <== NOT EXECUTED 4000e6ec: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Heap_Is_block_in ( Heap_Control *the_heap, Heap_Block *the_block ) { return _Addresses_Is_in_range( the_block, the_heap->start, the_heap->final ); 4000e6f0: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e6f4: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000e6f8: a4 02 3f f8 add %o0, -8, %l2 <== NOT EXECUTED _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 4000e6fc: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 4000e700: 1a 80 00 05 bcc 4000e714 <_Heap_Resize_block+0x44> <== NOT EXECUTED 4000e704: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000e708: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED } 4000e70c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e710: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED *old_mem_size = 0; *avail_mem_size = 0; _Heap_Start_of_block(the_heap, starting_address, &the_block); _HAssert(_Heap_Is_block_in(the_heap, the_block)); if (!_Heap_Is_block_in(the_heap, the_block)) 4000e714: 80 a4 80 02 cmp %l2, %g2 <== NOT EXECUTED 4000e718: 38 bf ff fd bgu,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e71c: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED return HEAP_RESIZE_FATAL_ERROR; prev_used_flag = the_block->size & HEAP_PREV_USED; 4000e720: c6 04 a0 04 ld [ %l2 + 4 ], %g3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size ( Heap_Block *the_block ) { return (the_block->size & ~HEAP_PREV_USED); 4000e724: a8 08 ff fe and %g3, -2, %l4 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e728: a2 04 80 14 add %l2, %l4, %l1 <== NOT EXECUTED old_block_size = _Heap_Block_size(the_block); next_block = _Heap_Block_at(the_block, old_block_size); _HAssert(_Heap_Is_block_in(the_heap, next_block)); _HAssert(_Heap_Is_prev_used(next_block)); if ( !_Heap_Is_block_in(the_heap, next_block) || 4000e72c: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED 4000e730: 2a bf ff f7 bcs,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e734: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED 4000e738: 80 a4 40 02 cmp %l1, %g2 <== NOT EXECUTED 4000e73c: 38 bf ff f4 bgu,a 4000e70c <_Heap_Resize_block+0x3c> <== NOT EXECUTED 4000e740: 84 10 20 02 mov 2, %g2 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Heap_Is_prev_used ( Heap_Block *the_block ) { return (the_block->size & HEAP_PREV_USED); 4000e744: c2 04 60 04 ld [ %l1 + 4 ], %g1 <== NOT EXECUTED 4000e748: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e74c: 02 bf ff ef be 4000e708 <_Heap_Resize_block+0x38> <== NOT EXECUTED 4000e750: aa 08 7f fe and %g1, -2, %l5 <== NOT EXECUTED !_Heap_Is_prev_used(next_block)) return HEAP_RESIZE_FATAL_ERROR; next_block_size = _Heap_Block_size(next_block); next_next_block = _Heap_Block_at(next_block, next_block_size); next_is_used = (next_block == the_heap->final) || 4000e754: 80 a0 80 11 cmp %g2, %l1 <== NOT EXECUTED 4000e758: ac 10 20 01 mov 1, %l6 <== NOT EXECUTED 4000e75c: 02 80 00 04 be 4000e76c <_Heap_Resize_block+0x9c> <== NOT EXECUTED 4000e760: ba 04 40 15 add %l1, %l5, %i5 <== NOT EXECUTED 4000e764: c2 07 60 04 ld [ %i5 + 4 ], %g1 <== NOT EXECUTED 4000e768: ac 08 60 01 and %g1, 1, %l6 <== NOT EXECUTED _Heap_Is_prev_used(next_next_block); /* See _Heap_Size_of_user_area() source for explanations */ old_user_size = _Addresses_Subtract(next_block, starting_address) 4000e76c: 82 24 40 19 sub %l1, %i1, %g1 <== NOT EXECUTED 4000e770: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED + HEAP_BLOCK_HEADER_OFFSET; *old_mem_size = old_user_size; 4000e774: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED if (size > old_user_size) { 4000e778: 80 a0 40 1a cmp %g1, %i2 <== NOT EXECUTED 4000e77c: 1a 80 00 16 bcc 4000e7d4 <_Heap_Resize_block+0x104> <== NOT EXECUTED 4000e780: b6 08 e0 01 and %g3, 1, %i3 <== NOT EXECUTED /* Need to extend the block: allocate part of the next block and then merge 'the_block' and allocated block together. */ if (next_is_used) /* Next block is in use, -- no way to extend */ 4000e784: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000e788: 12 80 00 10 bne 4000e7c8 <_Heap_Resize_block+0xf8> <== NOT EXECUTED 4000e78c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; else { uint32_t add_block_size = size - old_user_size; 4000e790: a0 26 80 01 sub %i2, %g1, %l0 <== NOT EXECUTED uint32_t alignment ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; 4000e794: 40 00 22 cc call 400172c4 <.urem> <== NOT EXECUTED 4000e798: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED *value = r ? v - r + a : v; 4000e79c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000e7a0: 02 80 00 05 be 4000e7b4 <_Heap_Resize_block+0xe4> <== NOT EXECUTED 4000e7a4: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000e7a8: 82 04 00 13 add %l0, %l3, %g1 <== NOT EXECUTED 4000e7ac: a0 20 40 08 sub %g1, %o0, %l0 <== NOT EXECUTED 4000e7b0: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED 4000e7b4: 0a 80 00 1d bcs 4000e828 <_Heap_Resize_block+0x158> <== NOT EXECUTED 4000e7b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 4000e7bc: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000e7c0: 1a 80 00 1f bcc 4000e83c <_Heap_Resize_block+0x16c> <== NOT EXECUTED 4000e7c4: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED } } } ++stats->resizes; return HEAP_RESIZE_SUCCESSFUL; 4000e7c8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED } 4000e7cc: 81 c7 e0 08 ret <== NOT EXECUTED 4000e7d0: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED --stats->used_blocks; } } else { /* Calculate how much memory we could free */ uint32_t free_block_size = old_user_size - size; 4000e7d4: a0 20 40 1a sub %g1, %i2, %l0 <== NOT EXECUTED uint32_t *value, uint32_t alignment ) { uint32_t v = *value; *value = v - (v % alignment); 4000e7d8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 4000e7dc: 40 00 22 ba call 400172c4 <.urem> <== NOT EXECUTED 4000e7e0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Heap_Align_down(&free_block_size, page_size); if (free_block_size > 0) { 4000e7e4: a0 a4 00 08 subcc %l0, %o0, %l0 <== NOT EXECUTED 4000e7e8: 22 80 00 0b be,a 4000e814 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000e7ec: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED /* To free some memory the block should be shortened so that it can can hold 'size' user bytes and still remain not shorter than 'min_block_size'. */ uint32_t new_block_size = old_block_size - free_block_size; 4000e7f0: 86 25 00 10 sub %l4, %l0, %g3 <== NOT EXECUTED if (new_block_size < min_block_size) { 4000e7f4: 80 a5 c0 03 cmp %l7, %g3 <== NOT EXECUTED 4000e7f8: 08 80 00 1c bleu 4000e868 <_Heap_Resize_block+0x198> <== NOT EXECUTED 4000e7fc: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED uint32_t delta = min_block_size - new_block_size; 4000e800: 82 25 c0 03 sub %l7, %g3, %g1 <== NOT EXECUTED _HAssert(free_block_size >= delta); free_block_size -= delta; if (free_block_size == 0) { 4000e804: a0 a4 00 01 subcc %l0, %g1, %l0 <== NOT EXECUTED 4000e808: 32 80 00 17 bne,a 4000e864 <_Heap_Resize_block+0x194> <== NOT EXECUTED 4000e80c: 86 00 c0 01 add %g3, %g1, %g3 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; } } } ++stats->resizes; 4000e810: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000e814: 84 10 20 00 clr %g2 <== NOT EXECUTED 4000e818: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000e81c: c2 26 20 54 st %g1, [ %i0 + 0x54 ] <== NOT EXECUTED return HEAP_RESIZE_SUCCESSFUL; } 4000e820: 81 c7 e0 08 ret <== NOT EXECUTED 4000e824: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED ) { uint32_t v = *value; uint32_t a = alignment; uint32_t r = v % a; *value = r ? v - r + a : v; 4000e828: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED else { uint32_t add_block_size = size - old_user_size; _Heap_Align_up(&add_block_size, page_size); if (add_block_size < min_block_size) add_block_size = min_block_size; if (add_block_size > next_block_size) 4000e82c: 80 a5 40 08 cmp %l5, %o0 <== NOT EXECUTED 4000e830: 0a bf ff e7 bcs 4000e7cc <_Heap_Resize_block+0xfc> <== NOT EXECUTED 4000e834: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */ add_block_size = 4000e838: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 4000e83c: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4000e840: 7f ff e7 a3 call 400086cc <_Heap_Block_allocate> <== NOT EXECUTED 4000e844: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Heap_Block_allocate(the_heap, next_block, add_block_size); /* Merge two subsequent blocks */ the_block->size = (old_block_size + add_block_size) | prev_used_flag; 4000e848: 90 02 00 14 add %o0, %l4, %o0 <== NOT EXECUTED 4000e84c: 90 12 00 1b or %o0, %i3, %o0 <== NOT EXECUTED 4000e850: d0 24 a0 04 st %o0, [ %l2 + 4 ] <== NOT EXECUTED --stats->used_blocks; 4000e854: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED 4000e858: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000e85c: 10 bf ff ed b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e860: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED _HAssert(new_block_size >= min_block_size); _HAssert(new_block_size + free_block_size == old_block_size); _HAssert(_Heap_Is_aligned(new_block_size, page_size)); _HAssert(_Heap_Is_aligned(free_block_size, page_size)); if (!next_is_used) { 4000e864: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 4000e868: 12 80 00 15 bne 4000e8bc <_Heap_Resize_block+0x1ec> <== NOT EXECUTED 4000e86c: 80 a4 00 17 cmp %l0, %l7 <== NOT EXECUTED Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; 4000e870: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED 4000e874: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e878: 86 04 80 03 add %l2, %g3, %g3 <== NOT EXECUTED if (!next_is_used) { /* Extend the next block to the low addresses by 'free_block_size' */ Heap_Block *const new_next_block = _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; 4000e87c: 88 04 00 15 add %l0, %l5, %g4 <== NOT EXECUTED Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; Heap_Block *prev = block->prev; 4000e880: d8 04 60 0c ld [ %l1 + 0xc ], %o4 <== NOT EXECUTED _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; next_next_block->prev_size = new_next_block_size; 4000e884: c8 27 40 00 st %g4, [ %i5 ] <== NOT EXECUTED Heap_Block *old_block, Heap_Block *new_block ) { Heap_Block *block = old_block; Heap_Block *next = block->next; 4000e888: da 04 60 08 ld [ %l1 + 8 ], %o5 <== NOT EXECUTED _Heap_Block_at(the_block, new_block_size); uint32_t const new_next_block_size = next_block_size + free_block_size; _HAssert(_Heap_Is_block_in(the_heap, next_next_block)); the_block->size = new_block_size | prev_used_flag; new_next_block->size = new_next_block_size | HEAP_PREV_USED; 4000e88c: 84 11 20 01 or %g4, 1, %g2 <== NOT EXECUTED 4000e890: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED next_next_block->prev_size = new_next_block_size; _Heap_Block_replace(next_block, new_next_block); the_heap->stats.free_size += free_block_size; 4000e894: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Heap_Block *prev = block->prev; block = new_block; block->next = next; 4000e898: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 4000e89c: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED block->prev = prev; 4000e8a0: d8 20 e0 0c st %o4, [ %g3 + 0xc ] <== NOT EXECUTED 4000e8a4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000e8a8: 88 01 3f fc add %g4, -4, %g4 <== NOT EXECUTED next->prev = prev->next = block; 4000e8ac: c6 23 60 0c st %g3, [ %o5 + 0xc ] <== NOT EXECUTED 4000e8b0: c6 23 20 08 st %g3, [ %o4 + 8 ] <== NOT EXECUTED 4000e8b4: 10 bf ff d7 b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e8b8: c8 27 00 00 st %g4, [ %i4 ] <== NOT EXECUTED } else if (free_block_size >= min_block_size) { 4000e8bc: 2a bf ff d6 bcs,a 4000e814 <_Heap_Resize_block+0x144> <== NOT EXECUTED 4000e8c0: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4000e8c4: 82 10 c0 1b or %g3, %i3, %g1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000e8c8: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED the_heap->stats.free_size += free_block_size; *avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD; } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; 4000e8cc: c2 24 a0 04 st %g1, [ %l2 + 4 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e8d0: 92 04 80 03 add %l2, %g3, %o1 <== NOT EXECUTED next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; 4000e8d4: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED ++stats->used_blocks; /* We have created used block */ 4000e8d8: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8dc: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 4000e8e0: 82 00 60 01 inc %g1 <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8e4: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED } else if (free_block_size >= min_block_size) { /* Split the block into 2 used parts, then free the second one. */ the_block->size = new_block_size | prev_used_flag; next_block = _Heap_Block_at(the_block, new_block_size); next_block->size = free_block_size | HEAP_PREV_USED; ++stats->used_blocks; /* We have created used block */ 4000e8e8: c2 26 20 40 st %g1, [ %i0 + 0x40 ] <== NOT EXECUTED --stats->frees; /* Don't count next call in stats */ 4000e8ec: c4 26 20 50 st %g2, [ %i0 + 0x50 ] <== NOT EXECUTED _Heap_Free(the_heap, _Heap_User_area(next_block)); 4000e8f0: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED 4000e8f4: 7f ff e7 03 call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e8f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED *avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD; 4000e8fc: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED 4000e900: 10 bf ff c4 b 4000e810 <_Heap_Resize_block+0x140> <== NOT EXECUTED 4000e904: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED 4000e908 <_Heap_Size_of_user_area>: boolean _Heap_Size_of_user_area( Heap_Control *the_heap, void *starting_address, size_t *size ) { 4000e908: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Heap_Block *the_block; Heap_Block *next_block; uint32_t the_size; if ( !_Addresses_Is_in_range( 4000e90c: e0 06 20 20 ld [ %i0 + 0x20 ], %l0 <== NOT EXECUTED 4000e910: 80 a6 40 10 cmp %i1, %l0 <== NOT EXECUTED 4000e914: 0a 80 00 05 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e918: e2 06 20 24 ld [ %i0 + 0x24 ], %l1 <== NOT EXECUTED 4000e91c: 80 a6 40 11 cmp %i1, %l1 <== NOT EXECUTED 4000e920: 28 80 00 04 bleu,a 4000e930 <_Heap_Size_of_user_area+0x28> <== NOT EXECUTED 4000e924: d2 06 20 10 ld [ %i0 + 0x10 ], %o1 <== NOT EXECUTED *size = _Addresses_Subtract ( next_block, starting_address ) + HEAP_BLOCK_HEADER_OFFSET; return( TRUE ); } 4000e928: 81 c7 e0 08 ret <== NOT EXECUTED 4000e92c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* The address passed could be greater than the block address plus * HEAP_BLOCK_USER_OFFSET as _Heap_Allocate_aligned() may produce such user * pointers. To get rid of this offset we need to align the address down * to the nearest 'page_size' boundary. */ _Heap_Align_down_uptr ( &addr, the_heap->page_size ); *the_block = (Heap_Block *)(addr - HEAP_BLOCK_USER_OFFSET); 4000e930: 40 00 22 65 call 400172c4 <.urem> <== NOT EXECUTED 4000e934: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000e938: 90 26 40 08 sub %i1, %o0, %o0 <== NOT EXECUTED 4000e93c: 90 02 3f f8 add %o0, -8, %o0 <== NOT EXECUTED return( FALSE ); _Heap_Start_of_block( the_heap, starting_address, &the_block ); _HAssert(_Heap_Is_block_in( the_heap, the_block )); if ( !_Heap_Is_block_in( the_heap, the_block ) ) 4000e940: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000e944: 0a bf ff f9 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e948: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000e94c: 18 bf ff f7 bgu 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e950: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( void *base, uint32_t offset ) { return (Heap_Block *) _Addresses_Add_offset( base, offset ); 4000e954: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000e958: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 4000e95c: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED the_size = _Heap_Block_size( the_block ); next_block = _Heap_Block_at( the_block, the_size ); _HAssert(_Heap_Is_block_in( the_heap, next_block )); _HAssert(_Heap_Is_prev_used( next_block )); if ( 4000e960: 80 a2 00 10 cmp %o0, %l0 <== NOT EXECUTED 4000e964: 0a bf ff f1 bcs 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e968: 80 a2 00 11 cmp %o0, %l1 <== NOT EXECUTED 4000e96c: 18 bf ff ef bgu 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e970: 01 00 00 00 nop <== NOT EXECUTED 4000e974: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4000e978: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000e97c: 02 bf ff eb be 4000e928 <_Heap_Size_of_user_area+0x20> <== NOT EXECUTED 4000e980: 82 22 00 19 sub %o0, %i1, %g1 <== NOT EXECUTED and then add correction equal to the offset of the 'size' field of the 'Heap_Block' structure. The correction is due to the fact that 'prev_size' field of the next block is actually used as user accessible area of 'the_block'. */ *size = _Addresses_Subtract ( next_block, starting_address ) 4000e984: 82 00 60 04 add %g1, 4, %g1 <== NOT EXECUTED 4000e988: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED 4000e98c: 81 c7 e0 08 ret <== NOT EXECUTED 4000e990: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 40007c08 <_IO_Manager_initialization>: void _IO_Manager_initialization( rtems_driver_address_table *driver_table, uint32_t drivers_in_table, uint32_t number_of_drivers ) { 40007c08: 9d e3 bf 98 save %sp, -104, %sp /* * If the user claims there are less drivers than are actually in * the table, then let's just go with the table's count. */ if ( number_of_drivers <= drivers_in_table ) 40007c0c: 80 a6 80 19 cmp %i2, %i1 40007c10: 08 80 00 27 bleu 40007cac <_IO_Manager_initialization+0xa4> 40007c14: 03 10 00 72 sethi %hi(0x4001c800), %g1 /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 40007c18: 83 2e a0 03 sll %i2, 3, %g1 <== NOT EXECUTED 40007c1c: a1 2e a0 05 sll %i2, 5, %l0 <== NOT EXECUTED 40007c20: a0 24 00 01 sub %l0, %g1, %l0 <== NOT EXECUTED 40007c24: 40 00 0f cf call 4000bb60 <_Workspace_Allocate_or_fatal_error> <== NOT EXECUTED 40007c28: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 40007c2c: 03 10 00 72 sethi %hi(0x4001c800), %g1 <== NOT EXECUTED memset( 40007c30: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED _IO_Driver_address_table = (rtems_driver_address_table *) _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; 40007c34: f4 20 60 14 st %i2, [ %g1 + 0x14 ] <== NOT EXECUTED /* * The application requested extra slots in the driver table, so we * have to allocate a new driver table and copy theirs to it. */ _IO_Driver_address_table = (rtems_driver_address_table *) 40007c38: 21 10 00 72 sethi %hi(0x4001c800), %l0 <== NOT EXECUTED _Workspace_Allocate_or_fatal_error( sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); _IO_Number_of_drivers = number_of_drivers; memset( 40007c3c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007c40: 40 00 22 ce call 40010778 <== NOT EXECUTED 40007c44: d0 24 20 18 st %o0, [ %l0 + 0x18 ] <== NOT EXECUTED _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c48: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40007c4c: 02 80 00 16 be 40007ca4 <_IO_Manager_initialization+0x9c> <== NOT EXECUTED 40007c50: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c54: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007c58: 98 10 20 00 clr %o4 <== NOT EXECUTED 40007c5c: c2 03 00 18 ld [ %o4 + %i0 ], %g1 <== NOT EXECUTED 40007c60: 9a 03 00 18 add %o4, %i0, %o5 <== NOT EXECUTED 40007c64: c2 23 00 0a st %g1, [ %o4 + %o2 ] <== NOT EXECUTED 40007c68: c4 03 60 04 ld [ %o5 + 4 ], %g2 <== NOT EXECUTED 40007c6c: 86 03 00 0a add %o4, %o2, %g3 <== NOT EXECUTED 40007c70: c4 20 e0 04 st %g2, [ %g3 + 4 ] <== NOT EXECUTED 40007c74: c2 03 60 08 ld [ %o5 + 8 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c78: 96 02 e0 01 inc %o3 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c7c: c2 20 e0 08 st %g1, [ %g3 + 8 ] <== NOT EXECUTED 40007c80: c4 03 60 0c ld [ %o5 + 0xc ], %g2 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c84: 98 03 20 18 add %o4, 0x18, %o4 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c88: c4 20 e0 0c st %g2, [ %g3 + 0xc ] <== NOT EXECUTED 40007c8c: c8 03 60 10 ld [ %o5 + 0x10 ], %g4 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c90: 80 a2 c0 19 cmp %o3, %i1 <== NOT EXECUTED _IO_Driver_address_table[index] = driver_table[index]; 40007c94: c8 20 e0 10 st %g4, [ %g3 + 0x10 ] <== NOT EXECUTED 40007c98: c2 03 60 14 ld [ %o5 + 0x14 ], %g1 <== NOT EXECUTED memset( _IO_Driver_address_table, 0, sizeof( rtems_driver_address_table ) * ( number_of_drivers ) ); for ( index = 0 ; index < drivers_in_table ; index++ ) 40007c9c: 12 bf ff f0 bne 40007c5c <_IO_Manager_initialization+0x54> <== NOT EXECUTED 40007ca0: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] <== NOT EXECUTED 40007ca4: 81 c7 e0 08 ret <== NOT EXECUTED 40007ca8: 81 e8 00 00 restore <== NOT EXECUTED * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; _IO_Number_of_drivers = number_of_drivers; 40007cac: 05 10 00 72 sethi %hi(0x4001c800), %g2 * If the maximum number of driver is the same as the number in the * table, then we do not have to copy the driver table. They can't * register any dynamically. */ if ( number_of_drivers == drivers_in_table ) { _IO_Driver_address_table = driver_table; 40007cb0: f0 20 60 18 st %i0, [ %g1 + 0x18 ] _IO_Number_of_drivers = number_of_drivers; 40007cb4: f2 20 a0 14 st %i1, [ %g2 + 0x14 ] 40007cb8: 81 c7 e0 08 ret 40007cbc: 81 e8 00 00 restore 40008940 <_ISR_Handler_initialization>: * * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { 40008940: 9d e3 bf 98 save %sp, -104, %sp _ISR_Signals_to_thread_executing = FALSE; 40008944: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _ISR_Nest_level = 0; 40008948: 05 10 00 6f sethi %hi(0x4001bc00), %g2 * Output parameters: NONE */ void _ISR_Handler_initialization( void ) { _ISR_Signals_to_thread_executing = FALSE; 4000894c: c0 20 63 68 clr [ %g1 + 0x368 ] _ISR_Nest_level = 0; 40008950: c0 20 a2 a4 clr [ %g2 + 0x2a4 ] _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40008954: 40 00 0c 83 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008958: 90 10 24 00 mov 0x400, %o0 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 4000895c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40008960: a0 10 61 f4 or %g1, 0x1f4, %l0 ! 4001bdf4 <_CPU_Table> 40008964: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 { _ISR_Signals_to_thread_executing = FALSE; _ISR_Nest_level = 0; _ISR_Vector_table = _Workspace_Allocate_or_fatal_error( 40008968: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _CPU_Initialize_vectors(); #if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE ) if ( _CPU_Table.interrupt_stack_size < STACK_MINIMUM_SIZE ) 4000896c: 80 a0 af ff cmp %g2, 0xfff 40008970: 18 80 00 07 bgu 4000898c <_ISR_Handler_initialization+0x4c> 40008974: d0 20 62 84 st %o0, [ %g1 + 0x284 ] _Internal_error_Occurred( 40008978: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000897c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40008980: 7f ff ff e0 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40008984: 94 10 20 05 mov 5, %o2 <== NOT EXECUTED 40008988: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 4000898c: 40 00 0c 75 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008990: 90 10 00 02 mov %g2, %o0 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 40008994: c6 04 20 18 ld [ %l0 + 0x18 ], %g3 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 40008998: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 4000899c: 86 02 00 03 add %o0, %g3, %g3 400089a0: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL ); _CPU_Interrupt_stack_low = 400089a4: d0 20 61 f0 st %o0, [ %g1 + 0x1f0 ] _Workspace_Allocate_or_fatal_error( _CPU_Table.interrupt_stack_size ); _CPU_Interrupt_stack_high = _Addresses_Add_offset( 400089a8: c6 20 a1 3c st %g3, [ %g2 + 0x13c ] #if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE ) _CPU_Install_interrupt_stack(); #endif } 400089ac: 81 c7 e0 08 ret 400089b0: 81 e8 00 00 restore 4001b134 <_Objects_Copy_name_raw>: const size_t length ) { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; 4001b134: 95 32 a0 02 srl %o2, 2, %o2 <== NOT EXECUTED while ( tmp_length-- ) 4001b138: 80 a2 a0 00 cmp %o2, 0 <== NOT EXECUTED 4001b13c: 02 80 00 09 be 4001b160 <_Objects_Copy_name_raw+0x2c> <== NOT EXECUTED 4001b140: 86 10 20 00 clr %g3 <== NOT EXECUTED 4001b144: 84 10 20 00 clr %g2 <== NOT EXECUTED *destination_p++ = *source_p++; 4001b148: c2 00 80 08 ld [ %g2 + %o0 ], %g1 <== NOT EXECUTED 4001b14c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4001b150: c2 20 80 09 st %g1, [ %g2 + %o1 ] <== NOT EXECUTED { uint32_t *source_p = (uint32_t *) source; uint32_t *destination_p = (uint32_t *) destination; size_t tmp_length = length / OBJECTS_NAME_ALIGNMENT; while ( tmp_length-- ) 4001b154: 80 a0 c0 0a cmp %g3, %o2 <== NOT EXECUTED 4001b158: 12 bf ff fc bne 4001b148 <_Objects_Copy_name_raw+0x14> <== NOT EXECUTED 4001b15c: 84 00 a0 04 add %g2, 4, %g2 <== NOT EXECUTED 4001b160: 81 c3 e0 08 retl <== NOT EXECUTED 4001b164: 01 00 00 00 nop 40008a68 <_Objects_Extend_information>: */ void _Objects_Extend_information( Objects_Information *information ) { 40008a68: 9d e3 bf 88 save %sp, -120, %sp */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index( Objects_Id id ) { return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS; 40008a6c: c4 06 20 08 ld [ %i0 + 8 ], %g2 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40008a70: e4 16 20 10 lduh [ %i0 + 0x10 ], %l2 40008a74: 03 00 00 3f sethi %hi(0xfc00), %g1 40008a78: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008a7c: a2 08 80 01 and %g2, %g1, %l1 40008a80: 80 a4 40 12 cmp %l1, %l2 40008a84: 08 80 00 8c bleu 40008cb4 <_Objects_Extend_information+0x24c> 40008a88: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008a8c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 minimum_index = _Objects_Get_index( information->minimum_id ); index_base = minimum_index; block = 0; if ( information->maximum < minimum_index ) 40008a90: a8 10 00 11 mov %l1, %l4 40008a94: ac 10 20 00 clr %l6 40008a98: a6 10 20 01 mov 1, %l3 40008a9c: 90 10 20 03 mov 3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008aa0: 80 a0 60 00 cmp %g1, 0 40008aa4: 12 80 00 a4 bne 40008d34 <_Objects_Extend_information+0x2cc> 40008aa8: ba 04 00 12 add %l0, %l2, %i5 if ( !object_blocks ) return; } else { object_blocks = (void**) 40008aac: 90 02 00 11 add %o0, %l1, %o0 40008ab0: 90 02 00 1d add %o0, %i5, %o0 40008ab4: 40 00 0c 2b call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008ab8: 91 2a 20 02 sll %o0, 2, %o0 40008abc: ae 10 00 08 mov %o0, %l7 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008ac0: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40008ac4: 83 2c e0 02 sll %l3, 2, %g1 /* * Take the block count down. Saves all the (block_count - 1) * in the copies. */ block_count--; 40008ac8: 86 04 ff ff add %l3, -1, %g3 if ( information->maximum > minimum_index ) { 40008acc: 80 a4 40 02 cmp %l1, %g2 /* * Break the block into the various sections. * */ inactive_per_block = (uint32_t *) _Addresses_Add_offset( 40008ad0: a6 05 c0 01 add %l7, %g1, %l3 object_blocks, block_count * sizeof(void*) ); name_table = (Objects_Name *) _Addresses_Add_offset( 40008ad4: aa 00 40 13 add %g1, %l3, %l5 * in the copies. */ block_count--; if ( information->maximum > minimum_index ) { 40008ad8: 0a 80 00 ac bcs 40008d88 <_Objects_Extend_information+0x320> 40008adc: a4 00 40 15 add %g1, %l5, %l2 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008ae0: 80 a4 60 00 cmp %l1, 0 40008ae4: 02 80 00 09 be 40008b08 <_Objects_Extend_information+0xa0> 40008ae8: a1 28 e0 02 sll %g3, 2, %l0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40008aec: 84 10 20 00 clr %g2 /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { local_table[ index ] = NULL; 40008af0: 83 28 a0 02 sll %g2, 2, %g1 else { /* * Deal with the special case of the 0 to minimum_index */ for ( index = 0; index < minimum_index; index++ ) { 40008af4: 84 00 a0 01 inc %g2 40008af8: 80 a0 80 11 cmp %g2, %l1 40008afc: 12 bf ff fd bne 40008af0 <_Objects_Extend_information+0x88> 40008b00: c0 20 40 12 clr [ %g1 + %l2 ] 40008b04: a1 28 e0 02 sll %g3, 2, %l0 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40008b08: c0 24 00 17 clr [ %l0 + %l7 ] inactive_per_block[block_count] = 0; 40008b0c: c0 24 00 13 clr [ %l0 + %l3 ] name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40008b10: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40008b14: 86 05 00 01 add %l4, %g1, %g3 40008b18: 80 a0 c0 14 cmp %g3, %l4 40008b1c: 08 80 00 0a bleu 40008b44 <_Objects_Extend_information+0xdc> 40008b20: c0 25 40 10 clr [ %l5 + %l0 ] 40008b24: 83 2d 20 02 sll %l4, 2, %g1 40008b28: 84 04 80 01 add %l2, %g1, %g2 40008b2c: 82 10 00 14 mov %l4, %g1 index++ ) { local_table[ index ] = NULL; 40008b30: c0 20 80 00 clr [ %g2 ] inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); index++ ) { 40008b34: 82 00 60 01 inc %g1 object_blocks[block_count] = NULL; inactive_per_block[block_count] = 0; name_table[block_count] = NULL; for ( index=index_base ; index < ( information->allocation_size + index_base ); 40008b38: 80 a0 40 03 cmp %g1, %g3 40008b3c: 12 bf ff fd bne 40008b30 <_Objects_Extend_information+0xc8> 40008b40: 84 00 a0 04 add %g2, 4, %g2 index++ ) { local_table[ index ] = NULL; } _ISR_Disable( level ); 40008b44: 7f ff e5 29 call 40001fe8 40008b48: 01 00 00 00 nop information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b4c: c4 06 00 00 ld [ %i0 ], %g2 40008b50: c8 16 20 04 lduh [ %i0 + 4 ], %g4 40008b54: 87 2f 60 10 sll %i5, 0x10, %g3 40008b58: 89 29 20 1b sll %g4, 0x1b, %g4 40008b5c: 87 30 e0 10 srl %g3, 0x10, %g3 local_table[ index ] = NULL; } _ISR_Disable( level ); old_tables = information->object_blocks; 40008b60: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b64: 03 00 00 40 sethi %hi(0x10000), %g1 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; 40008b68: e6 26 20 38 st %l3, [ %i0 + 0x38 ] information->name_table = name_table; 40008b6c: ea 26 20 24 st %l5, [ %i0 + 0x24 ] information->local_table = local_table; 40008b70: e4 26 20 20 st %l2, [ %i0 + 0x20 ] information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b74: 85 28 a0 18 sll %g2, 0x18, %g2 information->object_blocks = object_blocks; information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; 40008b78: fa 36 20 10 sth %i5, [ %i0 + 0x10 ] information->maximum_id = _Objects_Build_id( 40008b7c: 84 10 80 01 or %g2, %g1, %g2 _ISR_Disable( level ); old_tables = information->object_blocks; information->object_blocks = object_blocks; 40008b80: ee 26 20 3c st %l7, [ %i0 + 0x3c ] information->inactive_per_block = inactive_per_block; information->name_table = name_table; information->local_table = local_table; information->maximum = maximum; information->maximum_id = _Objects_Build_id( 40008b84: 84 10 80 04 or %g2, %g4, %g2 40008b88: 84 10 80 03 or %g2, %g3, %g2 40008b8c: c4 26 20 0c st %g2, [ %i0 + 0xc ] information->the_class, _Objects_Local_node, information->maximum ); _ISR_Enable( level ); 40008b90: 7f ff e5 1a call 40001ff8 40008b94: 01 00 00 00 nop if ( old_tables ) 40008b98: 80 a4 20 00 cmp %l0, 0 40008b9c: 02 80 00 05 be 40008bb0 <_Objects_Extend_information+0x148> 40008ba0: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40008ba4: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008ba8: 7f ff fe 56 call 40008500 <_Heap_Free> 40008bac: 90 12 22 2c or %o0, 0x22c, %o0 ! 4001be2c <_Workspace_Area> /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { 40008bb0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008bb4: 80 a0 60 00 cmp %g1, 0 40008bb8: 02 80 00 6a be 40008d60 <_Objects_Extend_information+0x2f8> 40008bbc: c2 16 20 44 lduh [ %i0 + 0x44 ], %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40008bc0: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008bc4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 information->object_blocks[ block ] = 40008bc8: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40008bcc: 40 00 38 d8 call 40016f2c <.umul> 40008bd0: 90 00 40 08 add %g1, %o0, %o0 40008bd4: 92 10 00 08 mov %o0, %o1 40008bd8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008bdc: 7f ff fe 17 call 40008438 <_Heap_Allocate> 40008be0: 90 12 22 2c or %o0, 0x22c, %o0 ! 4001be2c <_Workspace_Area> _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40008be4: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 /* * Allocate the name table, and the objects */ if ( information->auto_extend ) { information->object_blocks[ block ] = 40008be8: a7 2d a0 02 sll %l6, 2, %l3 40008bec: d0 24 c0 10 st %o0, [ %l3 + %l0 ] _Workspace_Allocate( (information->allocation_size * information->name_length) + (information->allocation_size * information->size) ); if ( !information->object_blocks[ block ] ) 40008bf0: c2 04 c0 12 ld [ %l3 + %l2 ], %g1 40008bf4: 80 a0 60 00 cmp %g1, 0 40008bf8: 02 80 00 7b be 40008de4 <_Objects_Extend_information+0x37c> 40008bfc: 01 00 00 00 nop 40008c00: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008c04: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40008c08: 40 00 38 c9 call 40016f2c <.umul> 40008c0c: a2 10 00 14 mov %l4, %l1 40008c10: c2 04 80 13 ld [ %l2 + %l3 ], %g1 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40008c14: c4 06 20 24 ld [ %i0 + 0x24 ], %g2 40008c18: a0 02 00 01 add %o0, %g1, %l0 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c1c: d4 06 20 18 ld [ %i0 + 0x18 ], %o2 name_area = (Objects_Name *) _Addresses_Add_offset( information->object_blocks[ block ], (information->allocation_size * information->size) ); information->name_table[ block ] = name_area; 40008c20: e0 20 80 13 st %l0, [ %g2 + %l3 ] /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c24: d6 06 20 1c ld [ %i0 + 0x1c ], %o3 40008c28: d2 04 80 13 ld [ %l2 + %l3 ], %o1 40008c2c: a8 07 bf ec add %fp, -20, %l4 index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c30: 2b 00 00 40 sethi %hi(0x10000), %l5 /* * Initialize objects .. add to a local chain first. */ _Chain_Initialize( 40008c34: 90 10 00 14 mov %l4, %o0 40008c38: 40 00 16 42 call 4000e540 <_Chain_Initialize> 40008c3c: a4 06 20 28 add %i0, 0x28, %l2 40008c40: 30 80 00 0f b,a 40008c7c <_Objects_Extend_information+0x214> index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c44: c4 16 20 04 lduh [ %i0 + 4 ], %g2 40008c48: c6 16 20 44 lduh [ %i0 + 0x44 ], %g3 40008c4c: 83 28 60 18 sll %g1, 0x18, %g1 40008c50: 85 28 a0 1b sll %g2, 0x1b, %g2 40008c54: 82 10 40 15 or %g1, %l5, %g1 40008c58: 82 10 40 02 or %g1, %g2, %g1 40008c5c: 82 10 40 11 or %g1, %l1, %g1 information->the_class, _Objects_Local_node, index ); the_object->name = (void *) name_area; 40008c60: e0 22 20 0c st %l0, [ %o0 + 0xc ] index = index_base; while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) { the_object->id = _Objects_Build_id( 40008c64: c2 22 20 08 st %g1, [ %o0 + 8 ] the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008c68: 92 10 00 08 mov %o0, %o1 40008c6c: a0 04 00 03 add %l0, %g3, %l0 index++; 40008c70: a2 04 60 01 inc %l1 the_object->name = (void *) name_area; name_area = _Addresses_Add_offset( name_area, information->name_length ); _Chain_Append( &information->Inactive, &the_object->Node ); 40008c74: 7f ff fc a0 call 40007ef4 <_Chain_Append> 40008c78: 90 10 00 12 mov %l2, %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 ) { 40008c7c: 7f ff fc aa call 40007f24 <_Chain_Get> 40008c80: 90 10 00 14 mov %l4, %o0 40008c84: 80 a2 20 00 cmp %o0, 0 40008c88: 32 bf ff ef bne,a 40008c44 <_Objects_Extend_information+0x1dc> 40008c8c: c2 06 00 00 ld [ %i0 ], %g1 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008c90: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 40008c94: c4 06 20 18 ld [ %i0 + 0x18 ], %g2 information->inactive += information->allocation_size; 40008c98: c8 16 20 34 lduh [ %i0 + 0x34 ], %g4 _Chain_Append( &information->Inactive, &the_object->Node ); index++; } information->inactive_per_block[ block ] = information->allocation_size; 40008c9c: c4 20 c0 13 st %g2, [ %g3 + %l3 ] information->inactive += information->allocation_size; 40008ca0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40008ca4: 82 00 40 04 add %g1, %g4, %g1 40008ca8: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 40008cac: 81 c7 e0 08 ret 40008cb0: 81 e8 00 00 restore block = 0; if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; 40008cb4: 90 10 00 12 mov %l2, %o0 40008cb8: 40 00 38 d7 call 40017014 <.udiv> 40008cbc: 92 10 00 10 mov %l0, %o1 for ( ; block < block_count; block++ ) { 40008cc0: 80 a2 20 00 cmp %o0, 0 40008cc4: 02 80 00 46 be 40008ddc <_Objects_Extend_information+0x374> 40008cc8: a8 10 00 11 mov %l1, %l4 if ( information->object_blocks[ block ] == NULL ) 40008ccc: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 40008cd0: c2 00 80 00 ld [ %g2 ], %g1 40008cd4: 80 a0 60 00 cmp %g1, 0 40008cd8: 12 80 00 08 bne 40008cf8 <_Objects_Extend_information+0x290> 40008cdc: ac 10 20 00 clr %l6 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008ce0: 10 80 00 0c b 40008d10 <_Objects_Extend_information+0x2a8> <== NOT EXECUTED 40008ce4: 80 a5 00 12 cmp %l4, %l2 <== NOT EXECUTED block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { if ( information->object_blocks[ block ] == NULL ) 40008ce8: c2 00 40 02 ld [ %g1 + %g2 ], %g1 40008cec: 80 a0 60 00 cmp %g1, 0 40008cf0: 02 80 00 08 be 40008d10 <_Objects_Extend_information+0x2a8> 40008cf4: 80 a5 00 12 cmp %l4, %l2 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008cf8: ac 05 a0 01 inc %l6 if ( information->object_blocks[ block ] == NULL ) break; else index_base += information->allocation_size; 40008cfc: a8 05 00 10 add %l4, %l0, %l4 if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008d00: 80 a5 80 08 cmp %l6, %o0 40008d04: 12 bf ff f9 bne 40008ce8 <_Objects_Extend_information+0x280> 40008d08: 83 2d a0 02 sll %l6, 2, %g1 /* * If the index_base is the maximum we need to grow the tables. */ if (index_base >= information->maximum ) { 40008d0c: 80 a5 00 12 cmp %l4, %l2 40008d10: 2a bf ff a9 bcs,a 40008bb4 <_Objects_Extend_information+0x14c> 40008d14: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008d18: a6 02 20 01 add %o0, 1, %l3 40008d1c: 83 2c e0 01 sll %l3, 1, %g1 40008d20: 90 00 40 13 add %g1, %l3, %o0 /* * Allocate the tables and break it up. */ if ( information->auto_extend ) { 40008d24: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 40008d28: 80 a0 60 00 cmp %g1, 0 40008d2c: 02 bf ff 60 be 40008aac <_Objects_Extend_information+0x44> 40008d30: ba 04 00 12 add %l0, %l2, %i5 40008d34: 92 02 00 11 add %o0, %l1, %o1 40008d38: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40008d3c: 92 02 40 1d add %o1, %i5, %o1 40008d40: 90 12 22 2c or %o0, 0x22c, %o0 40008d44: 7f ff fd bd call 40008438 <_Heap_Allocate> 40008d48: 93 2a 60 02 sll %o1, 2, %o1 block_count * (sizeof(void *) + sizeof(uint32_t ) + sizeof(Objects_Name *)) + ((maximum + minimum_index) * sizeof(Objects_Control *)) ); if ( !object_blocks ) 40008d4c: ae 92 20 00 orcc %o0, 0, %l7 40008d50: 32 bf ff 5d bne,a 40008ac4 <_Objects_Extend_information+0x5c> 40008d54: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 40008d58: 81 c7 e0 08 ret <== NOT EXECUTED 40008d5c: 81 e8 00 00 restore <== NOT EXECUTED if ( !information->object_blocks[ block ] ) return; } else { information->object_blocks[ block ] = 40008d60: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 40008d64: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40008d68: 40 00 38 71 call 40016f2c <.umul> 40008d6c: 90 00 40 08 add %g1, %o0, %o0 40008d70: 40 00 0b 7c call 4000bb60 <_Workspace_Allocate_or_fatal_error> 40008d74: e0 06 20 3c ld [ %i0 + 0x3c ], %l0 40008d78: e4 06 20 3c ld [ %i0 + 0x3c ], %l2 40008d7c: a7 2d a0 02 sll %l6, 2, %l3 40008d80: 10 bf ff a0 b 40008c00 <_Objects_Extend_information+0x198> 40008d84: d0 24 c0 10 st %o0, [ %l3 + %l0 ] /* * 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, 40008d88: d2 06 20 3c ld [ %i0 + 0x3c ], %o1 40008d8c: a1 28 e0 02 sll %g3, 2, %l0 40008d90: 90 10 00 17 mov %l7, %o0 40008d94: 40 00 1e 4c call 400106c4 40008d98: 94 10 00 10 mov %l0, %o2 information->object_blocks, block_count * sizeof(void*) ); memcpy( inactive_per_block, 40008d9c: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 40008da0: 94 10 00 10 mov %l0, %o2 40008da4: 40 00 1e 48 call 400106c4 40008da8: 90 10 00 13 mov %l3, %o0 information->inactive_per_block, block_count * sizeof(uint32_t ) ); memcpy( name_table, 40008dac: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 40008db0: 94 10 00 10 mov %l0, %o2 40008db4: 40 00 1e 44 call 400106c4 40008db8: 90 10 00 15 mov %l5, %o0 information->name_table, block_count * sizeof(Objects_Name *) ); memcpy( local_table, 40008dbc: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2 40008dc0: d2 06 20 20 ld [ %i0 + 0x20 ], %o1 40008dc4: 94 02 80 11 add %o2, %l1, %o2 40008dc8: 90 10 00 12 mov %l2, %o0 40008dcc: 40 00 1e 3e call 400106c4 40008dd0: 95 2a a0 02 sll %o2, 2, %o2 /* * Initialise the new entries in the table. */ object_blocks[block_count] = NULL; 40008dd4: 10 bf ff 4e b 40008b0c <_Objects_Extend_information+0xa4> 40008dd8: c0 24 00 17 clr [ %l0 + %l7 ] if ( information->maximum < minimum_index ) block_count = 0; else { block_count = information->maximum / information->allocation_size; for ( ; block < block_count; block++ ) { 40008ddc: 10 bf ff cc b 40008d0c <_Objects_Extend_information+0x2a4> <== NOT EXECUTED 40008de0: ac 10 20 00 clr %l6 <== NOT EXECUTED 40008de4: 81 c7 e0 08 ret <== NOT EXECUTED 40008de8: 81 e8 00 00 restore <== NOT EXECUTED 4000a994 <_Objects_Get_name_as_string>: char *_Objects_Get_name_as_string( Objects_Id id, size_t length, char *name ) { 4000a994: 9d e3 bf 88 save %sp, -120, %sp 4000a998: 92 10 00 18 mov %i0, %o1 uint32_t i; char lname[5]; Objects_Control *the_object; Objects_Locations location; if ( length == 0 ) 4000a99c: 80 a6 60 00 cmp %i1, 0 4000a9a0: 12 80 00 04 bne 4000a9b0 <_Objects_Get_name_as_string+0x1c> 4000a9a4: b0 10 00 1a mov %i2, %i0 _Thread_Enable_dispatch(); return name; } return NULL; /* unreachable path */ } 4000a9a8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9ac: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED Objects_Locations location; if ( length == 0 ) return NULL; if ( name == NULL ) 4000a9b0: 80 a6 a0 00 cmp %i2, 0 4000a9b4: 02 80 00 40 be 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9b8: 87 32 60 16 srl %o1, 0x16, %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 4000a9bc: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000a9c0: 86 08 e0 1c and %g3, 0x1c, %g3 4000a9c4: 82 10 62 60 or %g1, 0x260, %g1 4000a9c8: c8 00 40 03 ld [ %g1 + %g3 ], %g4 4000a9cc: 85 32 60 1b srl %o1, 0x1b, %g2 4000a9d0: 85 28 a0 02 sll %g2, 2, %g2 4000a9d4: f4 01 00 02 ld [ %g4 + %g2 ], %i2 return NULL; information = _Objects_Get_information( id ); if ( !information ) 4000a9d8: 80 a6 a0 00 cmp %i2, 0 4000a9dc: 22 80 00 36 be,a 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9e0: b0 10 20 00 clr %i0 <== NOT EXECUTED return NULL; the_object = _Objects_Get( information, id, &location ); 4000a9e4: 90 10 00 1a mov %i2, %o0 4000a9e8: 40 00 00 3f call 4000aae4 <_Objects_Get> 4000a9ec: 94 07 bf f4 add %fp, -12, %o2 switch ( location ) { 4000a9f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a9f4: 80 a0 60 00 cmp %g1, 0 4000a9f8: 32 80 00 2f bne,a 4000aab4 <_Objects_Get_name_as_string+0x120> 4000a9fc: b0 10 20 00 clr %i0 <== NOT EXECUTED case OBJECTS_ERROR: return NULL; case OBJECTS_LOCAL: if ( information->is_string ) { 4000aa00: c2 06 a0 40 ld [ %i2 + 0x40 ], %g1 4000aa04: 80 a0 60 00 cmp %g1, 0 4000aa08: 22 80 00 2d be,a 4000aabc <_Objects_Get_name_as_string+0x128> 4000aa0c: c2 02 20 0c ld [ %o0 + 0xc ], %g1 s = the_object->name; 4000aa10: d0 02 20 0c ld [ %o0 + 0xc ], %o0 lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 4000aa14: 80 a6 60 01 cmp %i1, 1 4000aa18: 02 80 00 1c be 4000aa88 <_Objects_Get_name_as_string+0xf4> 4000aa1c: 9a 10 00 18 mov %i0, %o5 4000aa20: c8 0a 00 00 ldub [ %o0 ], %g4 4000aa24: 85 29 20 18 sll %g4, 0x18, %g2 4000aa28: 80 a0 a0 00 cmp %g2, 0 4000aa2c: 22 80 00 18 be,a 4000aa8c <_Objects_Get_name_as_string+0xf8> 4000aa30: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED 4000aa34: b2 06 7f ff add %i1, -1, %i1 4000aa38: 98 10 20 00 clr %o4 4000aa3c: 10 80 00 07 b 4000aa58 <_Objects_Get_name_as_string+0xc4> 4000aa40: 17 10 00 80 sethi %hi(0x40020000), %o3 4000aa44: c8 0a 00 00 ldub [ %o0 ], %g4 4000aa48: 85 29 20 18 sll %g4, 0x18, %g2 4000aa4c: 80 a0 a0 00 cmp %g2, 0 4000aa50: 22 80 00 0f be,a 4000aa8c <_Objects_Get_name_as_string+0xf8> 4000aa54: c0 2b 40 00 clrb [ %o5 ] <== NOT EXECUTED *d = (!isprint(*s)) ? '*' : *s; 4000aa58: c2 02 e3 30 ld [ %o3 + 0x330 ], %g1 4000aa5c: 85 38 a0 18 sra %g2, 0x18, %g2 4000aa60: c6 48 80 01 ldsb [ %g2 + %g1 ], %g3 4000aa64: 80 88 e0 97 btst 0x97, %g3 4000aa68: 12 80 00 03 bne 4000aa74 <_Objects_Get_name_as_string+0xe0> 4000aa6c: 90 02 20 01 inc %o0 4000aa70: 88 10 20 2a mov 0x2a, %g4 <== NOT EXECUTED 4000aa74: c8 2b 40 00 stb %g4, [ %o5 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; s = lname; } for ( i=0, d=name ; i<(length-1) && *s ; i++, s++, d++ ) { 4000aa78: 98 03 20 01 inc %o4 4000aa7c: 80 a3 00 19 cmp %o4, %i1 4000aa80: 12 bf ff f1 bne 4000aa44 <_Objects_Get_name_as_string+0xb0> 4000aa84: 9a 03 60 01 inc %o5 *d = (!isprint(*s)) ? '*' : *s; } *d = '\0'; 4000aa88: c0 2b 40 00 clrb [ %o5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000aa8c: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000aa90: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 40028b00 <_Thread_Dispatch_disable_level> 4000aa94: 84 00 bf ff add %g2, -1, %g2 4000aa98: c4 20 63 00 st %g2, [ %g1 + 0x300 ] 4000aa9c: c6 00 63 00 ld [ %g1 + 0x300 ], %g3 4000aaa0: 80 a0 e0 00 cmp %g3, 0 4000aaa4: 12 80 00 04 bne 4000aab4 <_Objects_Get_name_as_string+0x120> 4000aaa8: 01 00 00 00 nop _Thread_Dispatch(); 4000aaac: 40 00 04 fa call 4000be94 <_Thread_Dispatch> 4000aab0: 01 00 00 00 nop 4000aab4: 81 c7 e0 08 ret 4000aab8: 81 e8 00 00 restore lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4000aabc: c0 2f bf f3 clrb [ %fp + -13 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000aac0: 85 30 60 18 srl %g1, 0x18, %g2 lname[ 1 ] = (u32_name >> 16) & 0xff; 4000aac4: 87 30 60 10 srl %g1, 0x10, %g3 lname[ 2 ] = (u32_name >> 8) & 0xff; lname[ 3 ] = (u32_name >> 0) & 0xff; 4000aac8: c2 2f bf f2 stb %g1, [ %fp + -14 ] if ( information->is_string ) { s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; 4000aacc: c4 2f bf ef stb %g2, [ %fp + -17 ] lname[ 1 ] = (u32_name >> 16) & 0xff; lname[ 2 ] = (u32_name >> 8) & 0xff; 4000aad0: 83 30 60 08 srl %g1, 8, %g1 s = the_object->name; } else { uint32_t u32_name = (uint32_t) the_object->name; lname[ 0 ] = (u32_name >> 24) & 0xff; lname[ 1 ] = (u32_name >> 16) & 0xff; 4000aad4: c6 2f bf f0 stb %g3, [ %fp + -16 ] lname[ 2 ] = (u32_name >> 8) & 0xff; 4000aad8: c2 2f bf f1 stb %g1, [ %fp + -15 ] lname[ 3 ] = (u32_name >> 0) & 0xff; lname[ 4 ] = '\0'; 4000aadc: 10 bf ff ce b 4000aa14 <_Objects_Get_name_as_string+0x80> 4000aae0: 90 07 bf ef add %fp, -17, %o0 4001b168 <_Objects_Get_next>: Objects_Information *information, Objects_Id id, Objects_Locations *location_p, Objects_Id *next_id_p ) { 4001b168: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Objects_Control *object; Objects_Id next_id; if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX) 4001b16c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001b170: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4001b174: 80 8e 40 01 btst %i1, %g1 <== NOT EXECUTED 4001b178: 22 80 00 02 be,a 4001b180 <_Objects_Get_next+0x18> <== NOT EXECUTED 4001b17c: f2 06 20 08 ld [ %i0 + 8 ], %i1 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 4001b180: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4001b184: a0 10 63 ff or %g1, 0x3ff, %l0 ! ffff <== NOT EXECUTED 4001b188: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED 4001b18c: 82 0e 40 10 and %i1, %l0, %g1 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001b190: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001b194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED else next_id = id; do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) 4001b198: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4001b19c: 18 80 00 0b bgu 4001b1c8 <_Objects_Get_next+0x60> <== NOT EXECUTED 4001b1a0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED *location_p = OBJECTS_ERROR; goto final; } /* try to grab one */ object = _Objects_Get(information, next_id, location_p); 4001b1a4: 7f ff d3 ea call 4001014c <_Objects_Get> <== NOT EXECUTED 4001b1a8: b2 06 60 01 inc %i1 <== NOT EXECUTED next_id++; } while (*location_p != OBJECTS_LOCAL); 4001b1ac: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4001b1b0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b1b4: 32 bf ff f6 bne,a 4001b18c <_Objects_Get_next+0x24> <== NOT EXECUTED 4001b1b8: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 <== NOT EXECUTED *next_id_p = next_id; 4001b1bc: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED return object; final: *next_id_p = OBJECTS_ID_FINAL; return 0; } 4001b1c0: 81 c7 e0 08 ret <== NOT EXECUTED 4001b1c4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001b1c8: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001b1cc: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED 4001b1d0: 90 10 20 00 clr %o0 <== NOT EXECUTED do { /* walked off end of list? */ if (_Objects_Get_index(next_id) > information->maximum) { *location_p = OBJECTS_ERROR; 4001b1d4: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED *next_id_p = next_id; return object; final: *next_id_p = OBJECTS_ID_FINAL; 4001b1d8: c4 26 c0 00 st %g2, [ %i3 ] <== NOT EXECUTED return 0; } 4001b1dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001b1e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400166f0 <_Objects_Get_no_protection>: ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 400166f0: c2 02 20 08 ld [ %o0 + 8 ], %g1 if ( information->maximum >= index ) { 400166f4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 ) { Objects_Control *the_object; uint32_t index; index = id - information->minimum_id + 1; 400166f8: 92 22 40 01 sub %o1, %g1, %o1 400166fc: 82 02 60 01 add %o1, 1, %g1 if ( information->maximum >= index ) { 40016700: 80 a0 40 02 cmp %g1, %g2 40016704: 18 80 00 09 bgu 40016728 <_Objects_Get_no_protection+0x38> 40016708: 83 28 60 02 sll %g1, 2, %g1 if ( (the_object = information->local_table[ index ]) != NULL ) { 4001670c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40016710: d0 00 80 01 ld [ %g2 + %g1 ], %o0 40016714: 80 a2 20 00 cmp %o0, 0 40016718: 02 80 00 08 be 40016738 <_Objects_Get_no_protection+0x48> 4001671c: 82 10 20 02 mov 2, %g1 *location = OBJECTS_LOCAL; 40016720: 81 c3 e0 08 retl 40016724: c0 22 80 00 clr [ %o2 ] return the_object; } *location = OBJECTS_ERROR; return NULL; } *location = OBJECTS_ERROR; 40016728: 82 10 20 02 mov 2, %g1 4001672c: 90 10 20 00 clr %o0 /* * Not supported for multiprocessing */ return NULL; } 40016730: 81 c3 e0 08 retl 40016734: c2 22 80 00 st %g1, [ %o2 ] if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { *location = OBJECTS_LOCAL; return the_object; } *location = OBJECTS_ERROR; 40016738: 81 c3 e0 08 retl <== NOT EXECUTED 4001673c: c2 22 80 00 st %g1, [ %o2 ] <== NOT EXECUTED 4000915c <_Objects_Handler_initialization>: uint32_t node, uint32_t maximum_nodes, uint32_t maximum_global_objects ) { if ( node < 1 || node > maximum_nodes ) 4000915c: 80 a2 20 00 cmp %o0, 0 40009160: 22 80 00 07 be,a 4000917c <_Objects_Handler_initialization+0x20> 40009164: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009168: 80 a2 00 09 cmp %o0, %o1 4000916c: 18 80 00 04 bgu 4000917c <_Objects_Handler_initialization+0x20> 40009170: 90 10 20 00 clr %o0 40009174: 81 c3 e0 08 retl 40009178: 01 00 00 00 nop _Internal_error_Occurred( 4000917c: 92 10 20 01 mov 1, %o1 ! 1 <== NOT EXECUTED 40009180: 94 10 20 08 mov 8, %o2 <== NOT EXECUTED 40009184: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009188: 7f ff fd de call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000918c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009190: 01 00 00 00 nop 4000a490 <_Objects_Id_to_name>: Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 4000a490: 9d e3 bf 90 save %sp, -112, %sp 4000a494: 92 10 00 18 mov %i0, %o1 uint32_t the_class; Objects_Information *information; Objects_Control *the_object = (Objects_Control *) 0; Objects_Locations ignored_location; if ( !name ) 4000a498: 80 a6 60 00 cmp %i1, 0 4000a49c: 02 80 00 24 be 4000a52c <_Objects_Id_to_name+0x9c> 4000a4a0: b0 10 20 01 mov 1, %i0 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a4a4: 83 32 60 18 srl %o1, 0x18, %g1 4000a4a8: 82 08 60 07 and %g1, 7, %g1 return OBJECTS_INVALID_NAME; the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) 4000a4ac: 80 a0 60 04 cmp %g1, 4 4000a4b0: 18 80 00 25 bgu 4000a544 <_Objects_Id_to_name+0xb4> 4000a4b4: 87 28 60 02 sll %g1, 2, %g3 return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( id ); information = _Objects_Information_table[ the_api ][ the_class ]; 4000a4b8: 03 10 00 81 sethi %hi(0x40020400), %g1 4000a4bc: 82 10 63 d0 or %g1, 0x3d0, %g1 ! 400207d0 <_Objects_Information_table> 4000a4c0: c8 00 40 03 ld [ %g1 + %g3 ], %g4 4000a4c4: 85 32 60 1b srl %o1, 0x1b, %g2 4000a4c8: 85 28 a0 02 sll %g2, 2, %g2 4000a4cc: d0 01 00 02 ld [ %g4 + %g2 ], %o0 if ( !information ) 4000a4d0: 80 a2 20 00 cmp %o0, 0 4000a4d4: 02 80 00 1c be 4000a544 <_Objects_Id_to_name+0xb4> 4000a4d8: 01 00 00 00 nop return OBJECTS_INVALID_ID; if ( information->is_string ) 4000a4dc: c2 02 20 40 ld [ %o0 + 0x40 ], %g1 4000a4e0: 80 a0 60 00 cmp %g1, 0 4000a4e4: 12 80 00 18 bne 4000a544 <_Objects_Id_to_name+0xb4> 4000a4e8: 01 00 00 00 nop return OBJECTS_INVALID_ID; the_object = _Objects_Get( information, id, &ignored_location ); 4000a4ec: 7f ff ff c2 call 4000a3f4 <_Objects_Get> 4000a4f0: 94 07 bf f4 add %fp, -12, %o2 if ( !the_object ) 4000a4f4: 80 a2 20 00 cmp %o0, 0 4000a4f8: 02 80 00 13 be 4000a544 <_Objects_Id_to_name+0xb4> 4000a4fc: 01 00 00 00 nop return OBJECTS_INVALID_ID; *name = the_object->name; 4000a500: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4000a504: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000a508: 07 10 00 82 sethi %hi(0x40020800), %g3 4000a50c: c2 00 e0 70 ld [ %g3 + 0x70 ], %g1 ! 40020870 <_Thread_Dispatch_disable_level> 4000a510: b0 10 20 00 clr %i0 4000a514: 82 00 7f ff add %g1, -1, %g1 4000a518: c2 20 e0 70 st %g1, [ %g3 + 0x70 ] 4000a51c: c4 00 e0 70 ld [ %g3 + 0x70 ], %g2 4000a520: 80 a0 a0 00 cmp %g2, 0 4000a524: 02 80 00 04 be 4000a534 <_Objects_Id_to_name+0xa4> 4000a528: 01 00 00 00 nop _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 4000a52c: 81 c7 e0 08 ret <== NOT EXECUTED 4000a530: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000a534: 40 00 05 07 call 4000b950 <_Thread_Dispatch> 4000a538: 01 00 00 00 nop 4000a53c: 81 c7 e0 08 ret 4000a540: 81 e8 00 00 restore 4000a544: 81 c7 e0 08 ret <== NOT EXECUTED 4000a548: 91 e8 20 03 restore %g0, 3, %o0 <== NOT EXECUTED 4000906c <_Objects_Name_to_id>: Objects_Information *information, Objects_Name name, uint32_t node, Objects_Id *id ) { 4000906c: 9d e3 bf 98 save %sp, -104, %sp 40009070: a2 10 00 18 mov %i0, %l1 Objects_Control *the_object; uint32_t index; uint32_t name_length; Objects_Name_comparators compare_them; if ( !id ) 40009074: 80 a6 e0 00 cmp %i3, 0 40009078: 02 80 00 2d be 4000912c <_Objects_Name_to_id+0xc0> 4000907c: b0 10 20 02 mov 2, %i0 return OBJECTS_INVALID_ADDRESS; if ( name == 0 ) 40009080: 80 a6 60 00 cmp %i1, 0 40009084: 02 80 00 28 be 40009124 <_Objects_Name_to_id+0xb8> 40009088: 01 00 00 00 nop return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 4000908c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 40009090: 86 90 60 00 orcc %g1, 0, %g3 40009094: 02 80 00 24 be 40009124 <_Objects_Name_to_id+0xb8> 40009098: 80 a6 a0 00 cmp %i2, 0 4000909c: 12 80 00 26 bne 40009134 <_Objects_Name_to_id+0xc8> 400090a0: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 search_local_node = TRUE; if ( search_local_node ) { name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; 400090a4: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 400090a8: 05 10 00 3a sethi %hi(0x4000e800), %g2 400090ac: 80 a0 60 00 cmp %g1, 0 400090b0: a4 10 a1 94 or %g2, 0x194, %l2 400090b4: 02 80 00 04 be 400090c4 <_Objects_Name_to_id+0x58> 400090b8: c8 14 60 44 lduh [ %l1 + 0x44 ], %g4 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400090bc: 03 10 00 3a sethi %hi(0x4000e800), %g1 400090c0: a4 10 61 a4 or %g1, 0x1a4, %l2 ! 4000e9a4 <_Objects_Compare_name_string> for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090c4: 83 29 20 10 sll %g4, 0x10, %g1 if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 400090c8: a0 10 20 01 mov 1, %l0 for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090cc: b1 30 60 10 srl %g1, 0x10, %i0 if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { the_object = information->local_table[ index ]; 400090d0: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 400090d4: 83 2c 20 02 sll %l0, 2, %g1 400090d8: f4 00 80 01 ld [ %g2 + %g1 ], %i2 if ( !the_object || !the_object->name ) 400090dc: 80 a6 a0 00 cmp %i2, 0 400090e0: 02 80 00 0c be 40009110 <_Objects_Name_to_id+0xa4> 400090e4: a0 04 20 01 inc %l0 400090e8: d2 06 a0 0c ld [ %i2 + 0xc ], %o1 400090ec: 80 a2 60 00 cmp %o1, 0 400090f0: 02 80 00 08 be 40009110 <_Objects_Name_to_id+0xa4> 400090f4: 90 10 00 19 mov %i1, %o0 continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { 400090f8: 9f c4 80 00 call %l2 400090fc: 94 10 00 18 mov %i0, %o2 40009100: 80 a2 20 00 cmp %o0, 0 40009104: 32 80 00 13 bne,a 40009150 <_Objects_Name_to_id+0xe4> 40009108: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000910c: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 name_length = information->name_length; if ( information->is_string ) compare_them = _Objects_Compare_name_string; else compare_them = _Objects_Compare_name_raw; for ( index = 1; index <= information->maximum; index++ ) { 40009110: 83 28 e0 10 sll %g3, 0x10, %g1 40009114: 83 30 60 10 srl %g1, 0x10, %g1 40009118: 80 a0 40 10 cmp %g1, %l0 4000911c: 3a bf ff ee bcc,a 400090d4 <_Objects_Name_to_id+0x68> 40009120: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 40009124: 81 c7 e0 08 ret 40009128: 91 e8 20 01 restore %g0, 1, %o0 return ( _Objects_MP_Global_name_search( information, name, node, id ) ); #else return OBJECTS_INVALID_NAME; #endif } 4000912c: 81 c7 e0 08 ret <== NOT EXECUTED 40009130: 81 e8 00 00 restore <== NOT EXECUTED if ( name == 0 ) return OBJECTS_INVALID_NAME; search_local_node = FALSE; if ( information->maximum != 0 && 40009134: 82 10 63 ff or %g1, 0x3ff, %g1 40009138: 80 a6 80 01 cmp %i2, %g1 4000913c: 02 bf ff da be 400090a4 <_Objects_Name_to_id+0x38> 40009140: 80 a6 a0 01 cmp %i2, 1 40009144: 22 bf ff d9 be,a 400090a8 <_Objects_Name_to_id+0x3c> 40009148: c2 04 60 40 ld [ %l1 + 0x40 ], %g1 4000914c: 30 bf ff f6 b,a 40009124 <_Objects_Name_to_id+0xb8> the_object = information->local_table[ index ]; if ( !the_object || !the_object->name ) continue; if ( (*compare_them)( name, the_object->name, name_length ) ) { *id = the_object->id; 40009150: c2 26 c0 00 st %g1, [ %i3 ] 40009154: 81 c7 e0 08 ret 40009158: 91 e8 20 00 restore %g0, 0, %o0 40009194 <_Objects_Shrink_information>: */ void _Objects_Shrink_information( Objects_Information *information ) { 40009194: 9d e3 bf 98 save %sp, -104, %sp 40009198: c4 06 20 08 ld [ %i0 + 8 ], %g2 /* * Search the list to find block or chunnk with all objects inactive. */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; 4000919c: e0 06 20 18 ld [ %i0 + 0x18 ], %l0 400091a0: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0 400091a4: 03 00 00 3f sethi %hi(0xfc00), %g1 400091a8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400091ac: 92 10 00 10 mov %l0, %o1 400091b0: a2 08 80 01 and %g2, %g1, %l1 400091b4: 40 00 37 98 call 40017014 <.udiv> 400091b8: 90 22 00 11 sub %o0, %l1, %o0 for ( block = 0; block < block_count; block++ ) { 400091bc: 80 a2 20 00 cmp %o0, 0 400091c0: 02 80 00 15 be 40009214 <_Objects_Shrink_information+0x80> 400091c4: 86 10 20 00 clr %g3 if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091c8: c8 06 20 38 ld [ %i0 + 0x38 ], %g4 400091cc: c2 01 00 00 ld [ %g4 ], %g1 400091d0: 84 10 20 04 mov 4, %g2 400091d4: 80 a4 00 01 cmp %l0, %g1 400091d8: a8 10 20 00 clr %l4 400091dc: 12 80 00 0a bne 40009204 <_Objects_Shrink_information+0x70> 400091e0: a4 10 20 00 clr %l2 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 400091e4: 10 80 00 10 b 40009224 <_Objects_Shrink_information+0x90> <== NOT EXECUTED 400091e8: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 <== NOT EXECUTED information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400091ec: a2 04 40 10 add %l1, %l0, %l1 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091f0: 80 a4 00 01 cmp %l0, %g1 information->inactive -= information->allocation_size; return; } index_base += information->allocation_size; 400091f4: a4 10 00 02 mov %g2, %l2 index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { if ( information->inactive_per_block[ block ] == information->allocation_size ) { 400091f8: 02 80 00 09 be 4000921c <_Objects_Shrink_information+0x88> 400091fc: 82 00 a0 04 add %g2, 4, %g1 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; return; 40009200: 84 10 00 01 mov %g1, %g2 */ index_base = _Objects_Get_index( information->minimum_id ); block_count = ( information->maximum - index_base ) / information->allocation_size; for ( block = 0; block < block_count; block++ ) { 40009204: 86 00 e0 01 inc %g3 40009208: 80 a0 c0 08 cmp %g3, %o0 4000920c: 32 bf ff f8 bne,a 400091ec <_Objects_Shrink_information+0x58> 40009210: c2 00 80 04 ld [ %g2 + %g4 ], %g1 40009214: 81 c7 e0 08 ret 40009218: 81 e8 00 00 restore if ( information->inactive_per_block[ block ] == information->allocation_size ) { 4000921c: a8 10 00 02 mov %g2, %l4 /* * XXX - Not to sure how to use a chain where you need to iterate and * and remove elements. */ the_object = (Objects_Control *) information->Inactive.first; 40009220: d0 06 20 28 ld [ %i0 + 0x28 ], %o0 40009224: 03 00 00 3f sethi %hi(0xfc00), %g1 40009228: e0 02 00 00 ld [ %o0 ], %l0 4000922c: 10 80 00 10 b 4000926c <_Objects_Shrink_information+0xd8> 40009230: a6 10 63 ff or %g1, 0x3ff, %l3 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40009234: 82 04 40 01 add %l1, %g1, %g1 40009238: 80 a0 80 01 cmp %g2, %g1 4000923c: 3a 80 00 12 bcc,a 40009284 <_Objects_Shrink_information+0xf0> 40009240: 90 10 00 10 mov %l0, %o0 if ( !_Chain_Is_last( &the_object->Node ) ) the_object = (Objects_Control *) the_object->Node.next; else the_object = NULL; _Chain_Extract( &extract_me->Node ); 40009244: 40 00 14 b5 call 4000e518 <_Chain_Extract> 40009248: 01 00 00 00 nop 4000924c: 90 10 00 10 mov %l0, %o0 } else { the_object = (Objects_Control *) the_object->Node.next; } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40009250: 80 a2 20 00 cmp %o0, 0 40009254: 22 80 00 10 be,a 40009294 <_Objects_Shrink_information+0x100> 40009258: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_last( const Chain_Node *the_node ) { return (the_node->next == NULL); 4000925c: e0 02 00 00 ld [ %o0 ], %l0 40009260: 80 a4 20 00 cmp %l0, 0 40009264: 22 80 00 0c be,a 40009294 <_Objects_Shrink_information+0x100> 40009268: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 4000926c: c2 02 20 08 ld [ %o0 + 8 ], %g1 40009270: 84 08 40 13 and %g1, %l3, %g2 */ do { index = _Objects_Get_index( the_object->id ); if ((index >= index_base) && 40009274: 80 a4 40 02 cmp %l1, %g2 40009278: 28 bf ff ef bleu,a 40009234 <_Objects_Shrink_information+0xa0> 4000927c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 the_object = NULL; _Chain_Extract( &extract_me->Node ); } else { the_object = (Objects_Control *) the_object->Node.next; 40009280: 90 10 00 10 mov %l0, %o0 } } while ( the_object && !_Chain_Is_last( &the_object->Node ) ); 40009284: 80 a2 20 00 cmp %o0, 0 40009288: 32 bf ff f6 bne,a 40009260 <_Objects_Shrink_information+0xcc> 4000928c: e0 02 00 00 ld [ %o0 ], %l0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40009290: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40009294: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40009298: d2 00 40 14 ld [ %g1 + %l4 ], %o1 4000929c: 7f ff fc 99 call 40008500 <_Heap_Free> 400092a0: 90 12 22 2c or %o0, 0x22c, %o0 */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 400092a4: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 400092a8: c8 06 20 24 ld [ %i0 + 0x24 ], %g4 information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; 400092ac: c0 24 80 02 clr [ %l2 + %g2 ] information->inactive -= information->allocation_size; 400092b0: c2 16 20 34 lduh [ %i0 + 0x34 ], %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 400092b4: c4 06 20 3c ld [ %i0 + 0x3c ], %g2 information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092b8: c6 06 20 18 ld [ %i0 + 0x18 ], %g3 /* * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; 400092bc: c0 25 00 04 clr [ %l4 + %g4 ] information->object_blocks[ block ] = NULL; information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092c0: 82 20 40 03 sub %g1, %g3, %g1 * Free the memory and reset the structures in the object' information */ _Workspace_Free( information->object_blocks[ block ] ); information->name_table[ block ] = NULL; information->object_blocks[ block ] = NULL; 400092c4: c0 25 00 02 clr [ %l4 + %g2 ] information->inactive_per_block[ block ] = 0; information->inactive -= information->allocation_size; 400092c8: c2 36 20 34 sth %g1, [ %i0 + 0x34 ] 400092cc: 81 c7 e0 08 ret 400092d0: 81 e8 00 00 restore 40007cc0 <_POSIX_API_Initialize>: void _POSIX_API_Initialize( rtems_configuration_table *configuration_table ) { 40007cc0: 9d e3 bf 98 save %sp, -104, %sp /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; 40007cc4: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 if ( !api_configuration ) 40007cc8: 80 a6 20 00 cmp %i0, 0 40007ccc: 02 80 00 1f be 40007d48 <_POSIX_API_Initialize+0x88> 40007cd0: 03 10 00 6e sethi %hi(0x4001b800), %g1 api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; _POSIX_signals_Manager_Initialization( 40007cd4: d0 06 20 14 ld [ %i0 + 0x14 ], %o0 api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) api_configuration = &_POSIX_Default_configuration; _Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects; 40007cd8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40007cdc: 03 10 00 70 sethi %hi(0x4001c000), %g1 40007ce0: 82 10 63 78 or %g1, 0x378, %g1 ! 4001c378 <_POSIX_Objects> _POSIX_signals_Manager_Initialization( 40007ce4: 40 00 17 69 call 4000da88 <_POSIX_signals_Manager_Initialization> 40007ce8: c2 20 a1 4c st %g1, [ %g2 + 0x14c ] api_configuration->maximum_queued_signals ); _POSIX_Threads_Manager_initialization( 40007cec: d2 06 20 2c ld [ %i0 + 0x2c ], %o1 40007cf0: d4 06 20 30 ld [ %i0 + 0x30 ], %o2 40007cf4: 40 00 17 da call 4000dc5c <_POSIX_Threads_Manager_initialization> 40007cf8: d0 06 00 00 ld [ %i0 ], %o0 api_configuration->maximum_threads, api_configuration->number_of_initialization_threads, api_configuration->User_initialization_threads_table ); _POSIX_Condition_variables_Manager_initialization( 40007cfc: 40 00 17 11 call 4000d940 <_POSIX_Condition_variables_Manager_initialization> 40007d00: d0 06 20 08 ld [ %i0 + 8 ], %o0 api_configuration->maximum_condition_variables ); _POSIX_Key_Manager_initialization( api_configuration->maximum_keys ); 40007d04: 40 00 17 1b call 4000d970 <_POSIX_Key_Manager_initialization> 40007d08: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _POSIX_Mutex_Manager_initialization( 40007d0c: 40 00 17 3b call 4000d9f8 <_POSIX_Mutex_Manager_initialization> 40007d10: d0 06 20 04 ld [ %i0 + 4 ], %o0 api_configuration->maximum_mutexes ); _POSIX_Message_queue_Manager_initialization( 40007d14: 40 00 17 23 call 4000d9a0 <_POSIX_Message_queue_Manager_initialization> 40007d18: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 api_configuration->maximum_message_queues ); _POSIX_Semaphore_Manager_initialization( 40007d1c: 40 00 18 a5 call 4000dfb0 <_POSIX_Semaphore_Manager_initialization> 40007d20: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 api_configuration->maximum_semaphores ); _POSIX_Timer_Manager_initialization( api_configuration->maximum_timers ); 40007d24: 40 00 18 96 call 4000df7c <_POSIX_Timer_Manager_initialization> 40007d28: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 _POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers ); 40007d2c: 40 00 17 3f call 4000da28 <_POSIX_Barrier_Manager_initialization> 40007d30: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 _POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks ); 40007d34: 40 00 17 49 call 4000da58 <_POSIX_RWLock_Manager_initialization> 40007d38: d0 06 20 24 ld [ %i0 + 0x24 ], %o0 _POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks); 40007d3c: f0 06 20 28 ld [ %i0 + 0x28 ], %i0 40007d40: 40 00 17 b1 call 4000dc04 <_POSIX_Spinlock_Manager_initialization> 40007d44: 81 e8 00 00 restore /* XXX need to assert here based on size assumptions */ assert( sizeof(pthread_t) == sizeof(Objects_Id) ); api_configuration = configuration_table->POSIX_api_configuration; if ( !api_configuration ) 40007d48: 10 bf ff e3 b 40007cd4 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED 40007d4c: b0 10 63 88 or %g1, 0x388, %i0 <== NOT EXECUTED 4000f0e0 <_POSIX_Barrier_Translate_core_barrier_return_code>: int _POSIX_Barrier_Translate_core_barrier_return_code( CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) 4000f0e0: 80 a2 20 03 cmp %o0, 3 4000f0e4: 18 80 00 06 bgu 4000f0fc <_POSIX_Barrier_Translate_core_barrier_return_code+0x1c> 4000f0e8: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); } 4000f0ec: 03 10 00 6e sethi %hi(0x4001b800), %g1 4000f0f0: 82 10 61 d8 or %g1, 0x1d8, %g1 ! 4001b9d8 <_POSIX_Barrier_Return_codes> 4000f0f4: 81 c3 e0 08 retl 4000f0f8: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_barrier_Status the_barrier_status ) { if ( the_barrier_status <= CORE_BARRIER_TIMEOUT ) return _POSIX_Barrier_Return_codes[the_barrier_status]; return POSIX_BOTTOM_REACHED(); 4000f0fc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000f100: 7f ff e1 9e call 40007778 <== NOT EXECUTED 4000f104: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000f108: 01 00 00 00 nop 400079f4 <_POSIX_Condition_variables_Signal_support>: int _POSIX_Condition_variables_Signal_support( pthread_cond_t *cond, boolean is_broadcast ) { 400079f4: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 400079f8: 80 a6 20 00 cmp %i0, 0 400079fc: 32 80 00 05 bne,a 40007a10 <_POSIX_Condition_variables_Signal_support+0x1c> 40007a00: d2 06 00 00 ld [ %i0 ], %o1 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007a04: 90 10 20 16 mov 0x16, %o0 } 40007a08: 81 c7 e0 08 ret 40007a0c: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40007a10: 80 a2 7f ff cmp %o1, -1 40007a14: 22 80 00 27 be,a 40007ab0 <_POSIX_Condition_variables_Signal_support+0xbc> 40007a18: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007a1c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007a20: 94 07 bf f4 add %fp, -12, %o2 40007a24: 40 00 0f 68 call 4000b7c4 <_Objects_Get> 40007a28: 90 12 21 bc or %o0, 0x1bc, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; Thread_Control *the_thread; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007a2c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007a30: a0 10 00 08 mov %o0, %l0 40007a34: 80 a0 60 00 cmp %g1, 0 40007a38: 02 80 00 08 be 40007a58 <_POSIX_Condition_variables_Signal_support+0x64> 40007a3c: b0 02 20 18 add %o0, 0x18, %i0 40007a40: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007a44: 28 bf ff f1 bleu,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 40007a48: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007a4c: 40 00 04 b6 call 40008d24 <== NOT EXECUTED 40007a50: 01 00 00 00 nop <== NOT EXECUTED 40007a54: 30 bf ff ed b,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); 40007a58: 40 00 15 49 call 4000cf7c <_Thread_queue_Dequeue> 40007a5c: 90 10 00 18 mov %i0, %o0 if ( !the_thread ) 40007a60: 80 a2 20 00 cmp %o0, 0 40007a64: 02 80 00 11 be 40007aa8 <_POSIX_Condition_variables_Signal_support+0xb4> 40007a68: 80 a6 60 00 cmp %i1, 0 the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; } while ( is_broadcast && the_thread ); 40007a6c: 12 bf ff fb bne 40007a58 <_POSIX_Condition_variables_Signal_support+0x64> 40007a70: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a74: 03 10 00 69 sethi %hi(0x4001a400), %g1 40007a78: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 40007a7c: 90 10 20 00 clr %o0 40007a80: 84 00 bf ff add %g2, -1, %g2 40007a84: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 40007a88: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007a8c: 80 a0 e0 00 cmp %g3, 0 40007a90: 12 bf ff de bne 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> 40007a94: 01 00 00 00 nop _Thread_Dispatch(); 40007a98: 40 00 14 37 call 4000cb74 <_Thread_Dispatch> 40007a9c: 01 00 00 00 nop 40007aa0: 10 bf ff da b 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> 40007aa4: 90 10 20 00 clr %o0 ! 0 case OBJECTS_LOCAL: do { the_thread = _Thread_queue_Dequeue( &the_cond->Wait_queue ); if ( !the_thread ) the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 40007aa8: 10 bf ff f3 b 40007a74 <_POSIX_Condition_variables_Signal_support+0x80> 40007aac: c0 24 20 14 clr [ %l0 + 0x14 ] if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007ab0: 7f ff ff 83 call 400078bc <== NOT EXECUTED 40007ab4: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007ab8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007abc: 32 bf ff d3 bne,a 40007a08 <_POSIX_Condition_variables_Signal_support+0x14> <== NOT EXECUTED 40007ac0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40007ac4: 10 bf ff d6 b 40007a1c <_POSIX_Condition_variables_Signal_support+0x28> <== NOT EXECUTED 40007ac8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007b44 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, boolean already_timedout ) { 40007b44: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007b48: 80 a6 60 00 cmp %i1, 0 40007b4c: 32 80 00 04 bne,a 40007b5c <_POSIX_Condition_variables_Wait_support+0x18> 40007b50: d2 06 40 00 ld [ %i1 ], %o1 return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007b54: 81 c7 e0 08 ret 40007b58: 91 e8 20 16 restore %g0, 0x16, %o0 40007b5c: 80 a2 7f ff cmp %o1, -1 40007b60: 22 80 00 37 be,a 40007c3c <_POSIX_Condition_variables_Wait_support+0xf8> 40007b64: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40007b68: a2 07 bf f4 add %fp, -12, %l1 40007b6c: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007b70: 94 10 00 11 mov %l1, %o2 40007b74: 40 00 0f 14 call 4000b7c4 <_Objects_Get> 40007b78: 90 12 20 d4 or %o0, 0xd4, %o0 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 40007b7c: 80 a2 20 00 cmp %o0, 0 40007b80: 02 bf ff f5 be 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007b84: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 40007b88: 21 10 00 69 sethi %hi(0x4001a400), %l0 40007b8c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 ! 4001a470 <_Thread_Dispatch_disable_level> ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007b90: 80 a6 20 00 cmp %i0, 0 40007b94: 82 00 7f ff add %g1, -1, %g1 40007b98: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007b9c: 02 bf ff ee be 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007ba0: 01 00 00 00 nop *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 40007ba4: d2 06 00 00 ld [ %i0 ], %o1 40007ba8: 80 a2 7f ff cmp %o1, -1 40007bac: 22 80 00 42 be,a 40007cb4 <_POSIX_Condition_variables_Wait_support+0x170> 40007bb0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 40007bb4: 94 10 00 11 mov %l1, %o2 40007bb8: 11 10 00 6a sethi %hi(0x4001a800), %o0 40007bbc: 40 00 0f 02 call 4000b7c4 <_Objects_Get> 40007bc0: 90 12 21 bc or %o0, 0x1bc, %o0 ! 4001a9bc <_POSIX_Condition_variables_Information> } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007bc4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007bc8: 80 a0 60 00 cmp %g1, 0 40007bcc: 12 80 00 15 bne 40007c20 <_POSIX_Condition_variables_Wait_support+0xdc> 40007bd0: a2 10 00 08 mov %o0, %l1 #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 40007bd4: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40007bd8: 80 a0 a0 00 cmp %g2, 0 40007bdc: 02 80 00 1f be 40007c58 <_POSIX_Condition_variables_Wait_support+0x114> 40007be0: 01 00 00 00 nop 40007be4: c2 06 40 00 ld [ %i1 ], %g1 40007be8: 80 a0 80 01 cmp %g2, %g1 40007bec: 02 80 00 1b be 40007c58 <_POSIX_Condition_variables_Wait_support+0x114> 40007bf0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007bf4: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 <== NOT EXECUTED 40007bf8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007bfc: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED 40007c00: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 <== NOT EXECUTED 40007c04: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007c08: 12 bf ff d3 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c0c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40007c10: 40 00 13 d9 call 4000cb74 <_Thread_Dispatch> <== NOT EXECUTED 40007c14: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40007c18: 81 c7 e0 08 ret <== NOT EXECUTED 40007c1c: 81 e8 00 00 restore <== NOT EXECUTED } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 40007c20: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007c24: 08 bf ff cc bleu 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c28: 01 00 00 00 nop <== NOT EXECUTED if ( mutex_status ) return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); 40007c2c: 40 00 04 3e call 40008d24 <== NOT EXECUTED 40007c30: 01 00 00 00 nop <== NOT EXECUTED 40007c34: 81 c7 e0 08 ret <== NOT EXECUTED 40007c38: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40007c3c: 40 00 00 94 call 40007e8c <== NOT EXECUTED 40007c40: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007c44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c48: 12 bf ff c3 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007c4c: 01 00 00 00 nop <== NOT EXECUTED 40007c50: 10 bf ff c6 b 40007b68 <_POSIX_Condition_variables_Wait_support+0x24> <== NOT EXECUTED 40007c54: d2 06 40 00 ld [ %i1 ], %o1 <== NOT EXECUTED if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { _Thread_Enable_dispatch(); return EINVAL; } (void) pthread_mutex_unlock( mutex ); 40007c58: 40 00 01 a2 call 400082e0 40007c5c: 90 10 00 19 mov %i1, %o0 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 40007c60: 80 a6 e0 00 cmp %i3, 0 40007c64: 22 80 00 1b be,a 40007cd0 <_POSIX_Condition_variables_Wait_support+0x18c> 40007c68: c2 06 40 00 ld [ %i1 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007c6c: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 40007c70: b0 10 20 74 mov 0x74, %i0 40007c74: 82 00 7f ff add %g1, -1, %g1 40007c78: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007c7c: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 40007c80: 80 a0 a0 00 cmp %g2, 0 40007c84: 02 80 00 09 be 40007ca8 <_POSIX_Condition_variables_Wait_support+0x164> 40007c88: 01 00 00 00 nop /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 40007c8c: 40 00 00 e8 call 4000802c 40007c90: 90 10 00 19 mov %i1, %o0 if ( mutex_status ) 40007c94: 80 a2 20 00 cmp %o0, 0 40007c98: 12 bf ff af bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> 40007c9c: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore _Thread_Dispatch(); 40007ca8: 40 00 13 b3 call 4000cb74 <_Thread_Dispatch> 40007cac: 01 00 00 00 nop 40007cb0: 30 bf ff f7 b,a 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 40007cb4: 7f ff ff 02 call 400078bc <== NOT EXECUTED 40007cb8: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 40007cbc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007cc0: 12 bf ff a5 bne 40007b54 <_POSIX_Condition_variables_Wait_support+0x10> <== NOT EXECUTED 40007cc4: 01 00 00 00 nop <== NOT EXECUTED 40007cc8: 10 bf ff bb b 40007bb4 <_POSIX_Condition_variables_Wait_support+0x70> <== NOT EXECUTED 40007ccc: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cd0: 37 10 00 69 sethi %hi(0x4001a400), %i3 return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 40007cd4: c2 24 60 14 st %g1, [ %l1 + 0x14 ] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cd8: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 40007cdc: c4 06 00 00 ld [ %i0 ], %g2 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; 40007ce0: 90 04 60 18 add %l1, 0x18, %o0 _Thread_Executing->Wait.id = *cond; 40007ce4: c4 20 60 20 st %g2, [ %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; 40007ce8: d0 20 60 44 st %o0, [ %g1 + 0x44 ] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 40007cec: c0 20 60 34 clr [ %g1 + 0x34 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007cf0: 82 10 20 01 mov 1, %g1 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 40007cf4: 92 10 00 1a mov %i2, %o1 40007cf8: c2 24 60 48 st %g1, [ %l1 + 0x48 ] 40007cfc: 15 10 00 35 sethi %hi(0x4000d400), %o2 40007d00: 40 00 15 0d call 4000d134 <_Thread_queue_Enqueue_with_handler> 40007d04: 94 12 a2 fc or %o2, 0x2fc, %o2 ! 4000d6fc <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d08: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 40007d0c: 82 00 7f ff add %g1, -1, %g1 40007d10: c2 24 20 70 st %g1, [ %l0 + 0x70 ] 40007d14: c4 04 20 70 ld [ %l0 + 0x70 ], %g2 40007d18: 80 a0 a0 00 cmp %g2, 0 40007d1c: 12 80 00 05 bne 40007d30 <_POSIX_Condition_variables_Wait_support+0x1ec> 40007d20: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 _Thread_Dispatch(); 40007d24: 40 00 13 94 call 4000cb74 <_Thread_Dispatch> 40007d28: 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; 40007d2c: c2 06 e1 4c ld [ %i3 + 0x14c ], %g1 40007d30: f0 00 60 34 ld [ %g1 + 0x34 ], %i0 if ( status && status != ETIMEDOUT ) 40007d34: 80 a6 20 00 cmp %i0, 0 40007d38: 02 bf ff d5 be 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> 40007d3c: 80 a6 20 74 cmp %i0, 0x74 40007d40: 02 bf ff d3 be 40007c8c <_POSIX_Condition_variables_Wait_support+0x148> 40007d44: 01 00 00 00 nop return EINVAL; return status; } return POSIX_BOTTOM_REACHED(); } 40007d48: 81 c7 e0 08 ret <== NOT EXECUTED 40007d4c: 81 e8 00 00 restore <== NOT EXECUTED 4000f518 <_POSIX_Keys_Run_destructors>: */ void _POSIX_Keys_Run_destructors( Thread_Control *thread ) { 4000f518: 9d e3 bf 98 save %sp, -104, %sp uint32_t iterations; boolean are_all_null; POSIX_Keys_Control *the_key; void *value; thread_index = _Objects_Get_index( thread->Object.id ); 4000f51c: c2 06 20 08 ld [ %i0 + 8 ], %g1 the_key = (POSIX_Keys_Control *) _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { value = the_key->Values[ thread_api ][ thread_index ]; 4000f520: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f524: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f528: 84 08 40 02 and %g1, %g2, %g2 4000f52c: aa 10 20 00 clr %l5 4000f530: a9 28 a0 02 sll %g2, 2, %l4 */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000f534: 83 30 60 16 srl %g1, 0x16, %g1 4000f538: 05 10 00 70 sethi %hi(0x4001c000), %g2 4000f53c: a6 08 60 1c and %g1, 0x1c, %l3 4000f540: a2 10 a2 e0 or %g2, 0x2e0, %l1 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000f544: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f548: 80 a0 60 00 cmp %g1, 0 4000f54c: 02 80 00 27 be 4000f5e8 <_POSIX_Keys_Run_destructors+0xd0> 4000f550: b0 10 20 01 mov 1, %i0 4000f554: a4 10 20 01 mov 1, %l2 the_key = (POSIX_Keys_Control *) 4000f558: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000f55c: 83 2e 20 02 sll %i0, 2, %g1 4000f560: c4 00 80 01 ld [ %g2 + %g1 ], %g2 _POSIX_Keys_Information.local_table[ index ]; if ( the_key && the_key->is_active && the_key->destructor ) { 4000f564: 80 a0 a0 00 cmp %g2, 0 4000f568: 02 80 00 16 be 4000f5c0 <_POSIX_Keys_Run_destructors+0xa8> 4000f56c: b0 06 20 01 inc %i0 4000f570: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000f574: 80 a0 60 00 cmp %g1, 0 4000f578: 02 80 00 12 be 4000f5c0 <_POSIX_Keys_Run_destructors+0xa8> 4000f57c: a0 04 c0 02 add %l3, %g2, %l0 4000f580: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 4000f584: 80 a0 e0 00 cmp %g3, 0 4000f588: 22 80 00 0f be,a 4000f5c4 <_POSIX_Keys_Run_destructors+0xac> 4000f58c: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED value = the_key->Values[ thread_api ][ thread_index ]; 4000f590: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000f594: c4 00 40 14 ld [ %g1 + %l4 ], %g2 if ( value ) { 4000f598: 90 90 a0 00 orcc %g2, 0, %o0 4000f59c: 22 80 00 0a be,a 4000f5c4 <_POSIX_Keys_Run_destructors+0xac> 4000f5a0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 <== NOT EXECUTED (*the_key->destructor)( value ); 4000f5a4: 9f c0 c0 00 call %g3 4000f5a8: 01 00 00 00 nop if ( the_key->Values[ thread_api ][ thread_index ] ) 4000f5ac: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 4000f5b0: c4 05 00 01 ld [ %l4 + %g1 ], %g2 4000f5b4: 80 a0 00 02 cmp %g0, %g2 4000f5b8: 82 40 3f ff addx %g0, -1, %g1 4000f5bc: a4 0c 80 01 and %l2, %g1, %l2 for ( ; ; ) { are_all_null = TRUE; for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) { 4000f5c0: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f5c4: 80 a0 40 18 cmp %g1, %i0 4000f5c8: 3a bf ff e5 bcc,a 4000f55c <_POSIX_Keys_Run_destructors+0x44> 4000f5cc: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 are_all_null = FALSE; } } } if ( are_all_null == TRUE ) 4000f5d0: 80 a4 a0 01 cmp %l2, 1 4000f5d4: 02 80 00 05 be 4000f5e8 <_POSIX_Keys_Run_destructors+0xd0> 4000f5d8: aa 05 60 01 inc %l5 * loop. It seems rude to unnecessarily lock up a system. * * Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99. */ if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS ) 4000f5dc: 80 a5 60 04 cmp %l5, 4 4000f5e0: 32 bf ff da bne,a 4000f548 <_POSIX_Keys_Run_destructors+0x30> 4000f5e4: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000f5e8: 81 c7 e0 08 ret 4000f5ec: 81 e8 00 00 restore 40014ac8 <_POSIX_Message_queue_Create_support>: const char *name_arg, int pshared, struct mq_attr *attr_ptr, POSIX_Message_queue_Control **message_queue ) { 40014ac8: 9d e3 bf 98 save %sp, -104, %sp CORE_message_queue_Attributes *the_mq_attr; struct mq_attr attr; char *name; size_t n; n = strnlen( name_arg, NAME_MAX ); 40014acc: 92 10 20 ff mov 0xff, %o1 40014ad0: 90 10 00 18 mov %i0, %o0 40014ad4: 40 00 12 6f call 40019490 40014ad8: aa 10 00 18 mov %i0, %l5 if ( n > NAME_MAX ) 40014adc: b0 10 20 5b mov 0x5b, %i0 40014ae0: 80 a2 20 ff cmp %o0, 0xff 40014ae4: 18 80 00 42 bgu 40014bec <_POSIX_Message_queue_Create_support+0x124> 40014ae8: a4 10 00 08 mov %o0, %l2 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014aec: 27 10 00 9c sethi %hi(0x40027000), %l3 40014af0: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 40014af4: 82 00 60 01 inc %g1 40014af8: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] * but were not compared against any existing implementation for * compatibility. See README.mqueue for an example program we * think will print out the defaults. Report anything you find with it. */ if ( attr_ptr == NULL ) { 40014afc: 80 a6 a0 00 cmp %i2, 0 40014b00: 22 80 00 41 be,a 40014c04 <_POSIX_Message_queue_Create_support+0x13c> 40014b04: b4 10 20 10 mov 0x10, %i2 attr.mq_maxmsg = 10; attr.mq_msgsize = 16; } else { if ( attr_ptr->mq_maxmsg <= 0 ){ 40014b08: e2 06 a0 04 ld [ %i2 + 4 ], %l1 40014b0c: 80 a4 60 00 cmp %l1, 0 40014b10: 04 80 00 4c ble 40014c40 <_POSIX_Message_queue_Create_support+0x178> 40014b14: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ 40014b18: f4 06 a0 08 ld [ %i2 + 8 ], %i2 40014b1c: 80 a6 a0 00 cmp %i2, 0 40014b20: 04 80 00 48 ble 40014c40 <_POSIX_Message_queue_Create_support+0x178> 40014b24: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void ) { return (POSIX_Message_queue_Control *) 40014b28: 29 10 00 9d sethi %hi(0x40027400), %l4 40014b2c: 7f ff eb b5 call 4000fa00 <_Objects_Allocate> 40014b30: 90 15 22 a8 or %l4, 0x2a8, %o0 ! 400276a8 <_POSIX_Message_queue_Information> rtems_set_errno_and_return_minus_one( ENFILE ); } #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { 40014b34: a0 92 20 00 orcc %o0, 0, %l0 40014b38: 02 80 00 35 be 40014c0c <_POSIX_Message_queue_Create_support+0x144> 40014b3c: 82 10 20 01 mov 1, %g1 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; 40014b40: f2 24 20 10 st %i1, [ %l0 + 0x10 ] 40014b44: 92 10 00 12 mov %l2, %o1 the_mq->named = TRUE; the_mq->open_count = 1; the_mq->linked = TRUE; 40014b48: c2 24 20 18 st %g1, [ %l0 + 0x18 ] _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); } the_mq->process_shared = pshared; the_mq->named = TRUE; 40014b4c: c2 24 20 14 st %g1, [ %l0 + 0x14 ] the_mq->open_count = 1; 40014b50: c2 24 20 1c st %g1, [ %l0 + 0x1c ] 40014b54: 25 10 00 9c sethi %hi(0x40027000), %l2 40014b58: 7f ff ea 4b call 4000f484 <_Heap_Allocate> 40014b5c: 90 14 a2 dc or %l2, 0x2dc, %o0 ! 400272dc <_Workspace_Area> * Make a copy of the user's string for name just in case it was * dynamically constructed. */ name = _Workspace_Allocate(n); if (!name) { 40014b60: b2 92 20 00 orcc %o0, 0, %i1 40014b64: 22 80 00 56 be,a 40014cbc <_POSIX_Message_queue_Create_support+0x1f4> 40014b68: 90 15 22 a8 or %l4, 0x2a8, %o0 <== NOT EXECUTED _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); } strcpy( name, name_arg ); 40014b6c: 40 00 0f e4 call 40018afc 40014b70: 92 10 00 15 mov %l5, %o1 */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; if ( ! _CORE_message_queue_Initialize( 40014b74: 94 10 00 11 mov %l1, %o2 * Note that thread blocking discipline should be based on the * current scheduling policy. */ the_mq_attr = &the_mq->Message_queue.Attributes; the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 40014b78: c0 24 20 60 clr [ %l0 + 0x60 ] if ( ! _CORE_message_queue_Initialize( 40014b7c: 96 10 00 1a mov %i2, %o3 40014b80: 90 04 20 20 add %l0, 0x20, %o0 40014b84: 40 00 03 cd call 40015ab8 <_CORE_message_queue_Initialize> 40014b88: 92 04 20 60 add %l0, 0x60, %o1 40014b8c: 80 a2 20 00 cmp %o0, 0 40014b90: 02 80 00 39 be 40014c74 <_POSIX_Message_queue_Create_support+0x1ac> 40014b94: 90 15 22 a8 or %l4, 0x2a8, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40014b98: c2 04 20 08 ld [ %l0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40014b9c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40014ba0: 05 00 00 3f sethi %hi(0xfc00), %g2 40014ba4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40014ba8: 82 08 40 02 and %g1, %g2, %g1 40014bac: 80 a0 40 03 cmp %g1, %g3 40014bb0: 38 80 00 06 bgu,a 40014bc8 <_POSIX_Message_queue_Create_support+0x100> 40014bb4: e0 26 c0 00 st %l0, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40014bb8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40014bbc: 83 28 60 02 sll %g1, 2, %g1 40014bc0: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_Message_queue_Information, &the_mq->Object, (char *) name ); *message_queue = the_mq; 40014bc4: e0 26 c0 00 st %l0, [ %i3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40014bc8: f2 24 20 0c st %i1, [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014bcc: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 40014bd0: b0 10 20 00 clr %i0 40014bd4: 82 00 7f ff add %g1, -1, %g1 40014bd8: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] 40014bdc: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 40014be0: 80 a0 a0 00 cmp %g2, 0 40014be4: 02 80 00 04 be 40014bf4 <_POSIX_Message_queue_Create_support+0x12c> 40014be8: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 40014bec: 81 c7 e0 08 ret 40014bf0: 81 e8 00 00 restore _Thread_Dispatch(); 40014bf4: 7f ff f1 c0 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014bf8: 01 00 00 00 nop <== NOT EXECUTED 40014bfc: 81 c7 e0 08 ret <== NOT EXECUTED 40014c00: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40014c04: 10 bf ff c9 b 40014b28 <_POSIX_Message_queue_Create_support+0x60> 40014c08: a2 10 20 0a mov 0xa, %l1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014c0c: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014c10: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014c14: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014c18: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014c1c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014c20: 02 80 00 36 be 40014cf8 <_POSIX_Message_queue_Create_support+0x230> <== NOT EXECUTED 40014c24: 01 00 00 00 nop <== NOT EXECUTED #endif the_mq = _POSIX_Message_queue_Allocate(); if ( !the_mq ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 40014c28: 40 00 0a d1 call 4001776c <__errno> <== NOT EXECUTED 40014c2c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014c30: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 40014c34: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014c38: 81 c7 e0 08 ret <== NOT EXECUTED 40014c3c: 81 e8 00 00 restore <== NOT EXECUTED 40014c40: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 40014c44: 82 00 7f ff add %g1, -1, %g1 40014c48: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] 40014c4c: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 40014c50: 80 a0 a0 00 cmp %g2, 0 40014c54: 02 80 00 2c be 40014d04 <_POSIX_Message_queue_Create_support+0x23c> 40014c58: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); } if ( attr_ptr->mq_msgsize <= 0 ){ _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40014c5c: 40 00 0a c4 call 4001776c <__errno> 40014c60: b0 10 3f ff mov -1, %i0 ! ffffffff 40014c64: 82 10 20 16 mov 0x16, %g1 40014c68: c2 22 00 00 st %g1, [ %o0 ] 40014c6c: 81 c7 e0 08 ret 40014c70: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 40014c74: 7f ff ec 71 call 4000fe38 <_Objects_Free> <== NOT EXECUTED 40014c78: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40014c7c: 90 14 a2 dc or %l2, 0x2dc, %o0 <== NOT EXECUTED 40014c80: 7f ff ea 33 call 4000f54c <_Heap_Free> <== NOT EXECUTED 40014c84: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40014c88: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014c8c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014c90: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014c94: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014c98: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014c9c: 02 80 00 1d be 40014d10 <_POSIX_Message_queue_Create_support+0x248> <== NOT EXECUTED 40014ca0: 01 00 00 00 nop <== NOT EXECUTED #endif _POSIX_Message_queue_Free( the_mq ); _Workspace_Free(name); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 40014ca4: 40 00 0a b2 call 4001776c <__errno> <== NOT EXECUTED 40014ca8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014cac: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 40014cb0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014cb4: 81 c7 e0 08 ret <== NOT EXECUTED 40014cb8: 81 e8 00 00 restore <== NOT EXECUTED 40014cbc: 7f ff ec 5f call 4000fe38 <_Objects_Free> <== NOT EXECUTED 40014cc0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40014cc4: c2 04 e2 90 ld [ %l3 + 0x290 ], %g1 <== NOT EXECUTED 40014cc8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014ccc: c2 24 e2 90 st %g1, [ %l3 + 0x290 ] <== NOT EXECUTED 40014cd0: c4 04 e2 90 ld [ %l3 + 0x290 ], %g2 <== NOT EXECUTED 40014cd4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40014cd8: 02 80 00 11 be 40014d1c <_POSIX_Message_queue_Create_support+0x254> <== NOT EXECUTED 40014cdc: 01 00 00 00 nop <== NOT EXECUTED name = _Workspace_Allocate(n); if (!name) { _POSIX_Message_queue_Free( the_mq ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOMEM ); 40014ce0: 40 00 0a a3 call 4001776c <__errno> <== NOT EXECUTED 40014ce4: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40014ce8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 40014cec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40014cf0: 81 c7 e0 08 ret <== NOT EXECUTED 40014cf4: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40014cf8: 7f ff f1 7f call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014cfc: 01 00 00 00 nop <== NOT EXECUTED 40014d00: 30 bf ff ca b,a 40014c28 <_POSIX_Message_queue_Create_support+0x160> <== NOT EXECUTED 40014d04: 7f ff f1 7c call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d08: 01 00 00 00 nop <== NOT EXECUTED 40014d0c: 30 bf ff d4 b,a 40014c5c <_POSIX_Message_queue_Create_support+0x194> <== NOT EXECUTED 40014d10: 7f ff f1 79 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d14: 01 00 00 00 nop <== NOT EXECUTED 40014d18: 30 bf ff e3 b,a 40014ca4 <_POSIX_Message_queue_Create_support+0x1dc> <== NOT EXECUTED 40014d1c: 7f ff f1 76 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 40014d20: 01 00 00 00 nop <== NOT EXECUTED 40014d24: 30 bf ff ef b,a 40014ce0 <_POSIX_Message_queue_Create_support+0x218> <== NOT EXECUTED 4000b094 <_POSIX_Message_queue_Delete>: */ void _POSIX_Message_queue_Delete( POSIX_Message_queue_Control *the_mq ) { 4000b094: 9d e3 bf 98 save %sp, -104, %sp if ( !the_mq->linked && !the_mq->open_count ) { 4000b098: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000b09c: 80 a0 60 00 cmp %g1, 0 4000b0a0: 12 80 00 1f bne 4000b11c <_POSIX_Message_queue_Delete+0x88> 4000b0a4: b2 10 00 18 mov %i0, %i1 4000b0a8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 4000b0ac: 80 a0 60 00 cmp %g1, 0 4000b0b0: 12 80 00 1b bne 4000b11c <_POSIX_Message_queue_Delete+0x88> 4000b0b4: 01 00 00 00 nop /* the name memory may have been freed by unlink. */ if ( the_mq->Object.name ) 4000b0b8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 4000b0bc: 80 a2 60 00 cmp %o1, 0 4000b0c0: 02 80 00 04 be 4000b0d0 <_POSIX_Message_queue_Delete+0x3c> 4000b0c4: 11 10 00 9c sethi %hi(0x40027000), %o0 RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000b0c8: 40 00 11 21 call 4000f54c <_Heap_Free> <== NOT EXECUTED 4000b0cc: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b0d0: 03 10 00 9d sethi %hi(0x40027400), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000b0d4: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b0d8: b0 10 62 a8 or %g1, 0x2a8, %i0 4000b0dc: c4 16 20 10 lduh [ %i0 + 0x10 ], %g2 4000b0e0: 03 00 00 3f sethi %hi(0xfc00), %g1 4000b0e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b0e8: 82 08 c0 01 and %g3, %g1, %g1 4000b0ec: 80 a0 40 02 cmp %g1, %g2 4000b0f0: 18 80 00 05 bgu 4000b104 <_POSIX_Message_queue_Delete+0x70> 4000b0f4: 90 06 60 20 add %i1, 0x20, %o0 information->local_table[ index ] = the_object; 4000b0f8: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 4000b0fc: 83 28 60 02 sll %g1, 2, %g1 4000b100: c0 20 80 01 clr [ %g2 + %g1 ] _Workspace_Free( the_mq->Object.name ); _Objects_Close( &_POSIX_Message_queue_Information, &the_mq->Object ); _CORE_message_queue_Close( 4000b104: 92 10 20 00 clr %o1 4000b108: 94 10 20 05 mov 5, %o2 4000b10c: 40 00 0e dc call 4000ec7c <_CORE_message_queue_Close> 4000b110: c0 26 60 0c clr [ %i1 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free ( POSIX_Message_queue_Control *the_mq ) { _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object ); 4000b114: 40 00 13 49 call 4000fe38 <_Objects_Free> 4000b118: 81 e8 00 00 restore 4000b11c: 81 c7 e0 08 ret 4000b120: 81 e8 00 00 restore 4000b6b4 <_POSIX_Message_queue_Receive_support>: size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b6b4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000b6b8: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b6bc: 94 07 bf f4 add %fp, -12, %o2 4000b6c0: 90 12 20 60 or %o0, 0x60, %o0 4000b6c4: 40 00 12 20 call 4000ff44 <_Objects_Get> 4000b6c8: 92 10 00 18 mov %i0, %o1 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b6cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 size_t msg_len, unsigned int *msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b6d0: 94 10 00 19 mov %i1, %o2 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b6d4: 80 a0 60 01 cmp %g1, 1 4000b6d8: 02 80 00 43 be 4000b7e4 <_POSIX_Message_queue_Receive_support+0x130> 4000b6dc: 9a 10 00 1d mov %i5, %o5 4000b6e0: 80 a0 60 01 cmp %g1, 1 4000b6e4: 1a 80 00 29 bcc 4000b788 <_POSIX_Message_queue_Receive_support+0xd4> 4000b6e8: 80 a0 60 02 cmp %g1, 2 case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { 4000b6ec: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000b6f0: 82 08 a0 03 and %g2, 3, %g1 4000b6f4: 80 a0 60 01 cmp %g1, 1 4000b6f8: 02 80 00 2a be 4000b7a0 <_POSIX_Message_queue_Receive_support+0xec> 4000b6fc: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000b700: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( msg_len < the_mq->Message_queue.maximum_message_size ) { 4000b704: c2 02 20 6c ld [ %o0 + 0x6c ], %g1 4000b708: 80 a0 40 1a cmp %g1, %i2 4000b70c: 18 80 00 44 bgu 4000b81c <_POSIX_Message_queue_Receive_support+0x168> 4000b710: 80 a7 20 00 cmp %i4, 0 length_out = -1; /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000b714: 12 80 00 3a bne 4000b7fc <_POSIX_Message_queue_Receive_support+0x148> 4000b718: 98 10 20 00 clr %o4 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000b71c: 82 10 3f ff mov -1, %g1 do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000b720: 90 02 20 20 add %o0, 0x20, %o0 4000b724: 92 10 00 18 mov %i0, %o1 /* * Now if something goes wrong, we return a "length" of -1 * to indicate an error. */ length_out = -1; 4000b728: c2 27 bf f0 st %g1, [ %fp + -16 ] do_wait = wait; /* * Now perform the actual message receive */ _CORE_message_queue_Seize( 4000b72c: 40 00 0d 7a call 4000ed14 <_CORE_message_queue_Seize> 4000b730: 96 07 bf f0 add %fp, -16, %o3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b734: 05 10 00 9c sethi %hi(0x40027000), %g2 4000b738: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b73c: 82 00 7f ff add %g1, -1, %g1 4000b740: c2 20 a2 90 st %g1, [ %g2 + 0x290 ] 4000b744: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 4000b748: 80 a0 e0 00 cmp %g3, 0 4000b74c: 02 80 00 30 be 4000b80c <_POSIX_Message_queue_Receive_support+0x158> 4000b750: 01 00 00 00 nop do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b754: 3b 10 00 9c sethi %hi(0x40027000), %i5 <== NOT EXECUTED 4000b758: c4 07 63 6c ld [ %i5 + 0x36c ], %g2 ! 4002736c <_Thread_Executing> <== NOT EXECUTED 4000b75c: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000b760: c8 00 a0 34 ld [ %g2 + 0x34 ], %g4 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b764: 87 38 60 1f sra %g1, 0x1f, %g3 4000b768: 82 18 c0 01 xor %g3, %g1, %g1 4000b76c: 82 20 40 03 sub %g1, %g3, %g1 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) 4000b770: 80 a1 20 00 cmp %g4, 0 4000b774: 12 80 00 38 bne 4000b854 <_POSIX_Message_queue_Receive_support+0x1a0> 4000b778: c2 26 c0 00 st %g1, [ %i3 ] return length_out; 4000b77c: d0 07 bf f0 ld [ %fp + -16 ], %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b780: 81 c7 e0 08 ret 4000b784: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; size_t length_out; boolean do_wait; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b788: 02 80 00 10 be 4000b7c8 <_POSIX_Message_queue_Receive_support+0x114> 4000b78c: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); 4000b790: 40 00 06 8e call 4000d1c8 <== NOT EXECUTED 4000b794: 01 00 00 00 nop <== NOT EXECUTED } 4000b798: 81 c7 e0 08 ret 4000b79c: 91 e8 00 08 restore %g0, %o0, %o0 4000b7a0: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b7a4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b7a8: 84 00 bf ff add %g2, -1, %g2 4000b7ac: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b7b0: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b7b4: 80 a0 e0 00 cmp %g3, 0 4000b7b8: 12 80 00 04 bne 4000b7c8 <_POSIX_Message_queue_Receive_support+0x114> 4000b7bc: 01 00 00 00 nop _Thread_Dispatch(); 4000b7c0: 40 00 16 cd call 400112f4 <_Thread_Dispatch> 4000b7c4: 01 00 00 00 nop return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000b7c8: 40 00 2f e9 call 4001776c <__errno> 4000b7cc: 01 00 00 00 nop 4000b7d0: 82 10 20 09 mov 9, %g1 ! 9 4000b7d4: c2 22 00 00 st %g1, [ %o0 ] 4000b7d8: 90 10 3f ff mov -1, %o0 _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b7dc: 81 c7 e0 08 ret 4000b7e0: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b7e4: 40 00 16 c4 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b7e8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b7ec: 40 00 06 81 call 4000d1f0 <== NOT EXECUTED 4000b7f0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Executing->Wait.return_code ) ); } return POSIX_BOTTOM_REACHED(); } 4000b7f4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b7f8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000b7fc: 83 30 a0 0e srl %g2, 0xe, %g1 4000b800: 82 18 60 01 xor %g1, 1, %g1 4000b804: 10 bf ff c6 b 4000b71c <_POSIX_Message_queue_Receive_support+0x68> 4000b808: 98 08 60 01 and %g1, 1, %o4 4000b80c: 40 00 16 ba call 400112f4 <_Thread_Dispatch> 4000b810: 3b 10 00 9c sethi %hi(0x40027000), %i5 do_wait, timeout ); _Thread_Enable_dispatch(); *msg_prio = 4000b814: 10 bf ff d2 b 4000b75c <_POSIX_Message_queue_Receive_support+0xa8> 4000b818: c4 07 63 6c ld [ %i5 + 0x36c ], %g2 ! 4002736c <_Thread_Executing> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b81c: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b820: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b824: 84 00 bf ff add %g2, -1, %g2 4000b828: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b82c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b830: 80 a0 e0 00 cmp %g3, 0 4000b834: 02 80 00 11 be 4000b878 <_POSIX_Message_queue_Receive_support+0x1c4> 4000b838: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( msg_len < the_mq->Message_queue.maximum_message_size ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EMSGSIZE ); 4000b83c: 40 00 2f cc call 4001776c <__errno> 4000b840: 01 00 00 00 nop 4000b844: 82 10 20 7a mov 0x7a, %g1 ! 7a 4000b848: c2 22 00 00 st %g1, [ %o0 ] 4000b84c: 10 bf ff d3 b 4000b798 <_POSIX_Message_queue_Receive_support+0xe4> 4000b850: 90 10 3f ff mov -1, %o0 _POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count); if ( !_Thread_Executing->Wait.return_code ) return length_out; rtems_set_errno_and_return_minus_one( 4000b854: 40 00 2f c6 call 4001776c <__errno> 4000b858: 01 00 00 00 nop 4000b85c: c2 07 63 6c ld [ %i5 + 0x36c ], %g1 4000b860: a0 10 00 08 mov %o0, %l0 4000b864: 40 00 00 e5 call 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000b868: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 4000b86c: d0 24 00 00 st %o0, [ %l0 ] 4000b870: 10 bf ff ca b 4000b798 <_POSIX_Message_queue_Receive_support+0xe4> 4000b874: 90 10 3f ff mov -1, %o0 _Thread_Dispatch(); 4000b878: 40 00 16 9f call 400112f4 <_Thread_Dispatch> 4000b87c: 01 00 00 00 nop 4000b880: 30 bf ff ef b,a 4000b83c <_POSIX_Message_queue_Receive_support+0x188> 4000b89c <_POSIX_Message_queue_Send_support>: size_t msg_len, uint32_t msg_prio, boolean wait, Watchdog_Interval timeout ) { 4000b89c: 9d e3 bf 88 save %sp, -120, %sp /* * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) 4000b8a0: 80 a6 e0 20 cmp %i3, 0x20 4000b8a4: 18 80 00 5b bgu 4000ba10 <_POSIX_Message_queue_Send_support+0x174> 4000b8a8: 92 10 00 18 mov %i0, %o1 4000b8ac: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b8b0: 90 12 20 60 or %o0, 0x60, %o0 ! 40027860 <_POSIX_Message_queue_Information_fds> 4000b8b4: 40 00 11 a4 call 4000ff44 <_Objects_Get> 4000b8b8: 94 07 bf f4 add %fp, -12, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b8bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b8c0: 80 a0 60 01 cmp %g1, 1 4000b8c4: 02 80 00 42 be 4000b9cc <_POSIX_Message_queue_Send_support+0x130> 4000b8c8: 01 00 00 00 nop 4000b8cc: 2a 80 00 09 bcs,a 4000b8f0 <_POSIX_Message_queue_Send_support+0x54> 4000b8d0: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000b8d4: 80 a0 60 02 cmp %g1, 2 4000b8d8: 02 80 00 36 be 4000b9b0 <_POSIX_Message_queue_Send_support+0x114> 4000b8dc: 01 00 00 00 nop _POSIX_Message_queue_Translate_core_message_queue_return_code( msg_status ) ); } return POSIX_BOTTOM_REACHED(); 4000b8e0: 40 00 06 3a call 4000d1c8 <== NOT EXECUTED 4000b8e4: 01 00 00 00 nop <== NOT EXECUTED } 4000b8e8: 81 c7 e0 08 ret 4000b8ec: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { 4000b8f0: 80 88 60 03 btst 3, %g1 4000b8f4: 02 80 00 25 be 4000b988 <_POSIX_Message_queue_Send_support+0xec> 4000b8f8: 80 a7 20 00 cmp %i4, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); } the_mq = the_mq_fd->Queue; 4000b8fc: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) 4000b900: 12 80 00 39 bne 4000b9e4 <_POSIX_Message_queue_Send_support+0x148> 4000b904: 84 10 20 00 clr %g2 do_wait = wait; /* * Now perform the actual message receive */ msg_status = _CORE_message_queue_Submit( 4000b908: fa 23 a0 60 st %i5, [ %sp + 0x60 ] 4000b90c: c4 23 a0 5c st %g2, [ %sp + 0x5c ] 4000b910: 92 10 00 19 mov %i1, %o1 4000b914: 94 10 00 1a mov %i2, %o2 4000b918: 96 10 00 18 mov %i0, %o3 4000b91c: 9a 20 00 1b neg %i3, %o5 4000b920: 98 10 20 00 clr %o4 4000b924: 40 00 0d 43 call 4000ee30 <_CORE_message_queue_Submit> 4000b928: 90 02 20 20 add %o0, 0x20, %o0 4000b92c: ba 10 00 08 mov %o0, %i5 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b930: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b934: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b938: 84 00 bf ff add %g2, -1, %g2 4000b93c: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b940: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b944: 80 a0 e0 00 cmp %g3, 0 4000b948: 02 80 00 2b be 4000b9f4 <_POSIX_Message_queue_Send_support+0x158> 4000b94c: 01 00 00 00 nop * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4000b950: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED 4000b954: 02 80 00 2c be 4000ba04 <_POSIX_Message_queue_Send_support+0x168> 4000b958: 03 10 00 9c sethi %hi(0x40027000), %g1 msg_status = _Thread_Executing->Wait.return_code; if ( !msg_status ) 4000b95c: 80 a7 60 00 cmp %i5, 0 4000b960: 02 bf ff e2 be 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000b964: 90 10 20 00 clr %o0 return msg_status; rtems_set_errno_and_return_minus_one( 4000b968: 40 00 2f 81 call 4001776c <__errno> 4000b96c: 01 00 00 00 nop 4000b970: a0 10 00 08 mov %o0, %l0 4000b974: 40 00 00 a1 call 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4000b978: 90 10 00 1d mov %i5, %o0 4000b97c: d0 24 00 00 st %o0, [ %l0 ] 4000b980: 10 bf ff da b 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000b984: 90 10 3f ff mov -1, %o0 4000b988: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b98c: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b990: 84 00 bf ff add %g2, -1, %g2 4000b994: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b998: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b99c: 80 a0 e0 00 cmp %g3, 0 4000b9a0: 12 80 00 04 bne 4000b9b0 <_POSIX_Message_queue_Send_support+0x114> 4000b9a4: 01 00 00 00 nop _Thread_Dispatch(); 4000b9a8: 40 00 16 53 call 400112f4 <_Thread_Dispatch> 4000b9ac: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBADF ); 4000b9b0: 40 00 2f 6f call 4001776c <__errno> 4000b9b4: 01 00 00 00 nop 4000b9b8: 82 10 20 09 mov 9, %g1 ! 9 4000b9bc: c2 22 00 00 st %g1, [ %o0 ] 4000b9c0: 90 10 3f ff mov -1, %o0 msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000b9c4: 81 c7 e0 08 ret 4000b9c8: 91 e8 00 08 restore %g0, %o0, %o0 switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b9cc: 40 00 16 4a call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b9d0: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b9d4: 40 00 06 07 call 4000d1f0 <== NOT EXECUTED 4000b9d8: 01 00 00 00 nop <== NOT EXECUTED msg_status ) ); } return POSIX_BOTTOM_REACHED(); } 4000b9dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b9e0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED /* * A timed receive with a bad time will do a poll regardless. */ if ( wait ) do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? FALSE : TRUE; 4000b9e4: 83 30 60 0e srl %g1, 0xe, %g1 4000b9e8: 82 18 60 01 xor %g1, 1, %g1 4000b9ec: 10 bf ff c7 b 4000b908 <_POSIX_Message_queue_Send_support+0x6c> 4000b9f0: 84 08 60 01 and %g1, 1, %g2 4000b9f4: 40 00 16 40 call 400112f4 <_Thread_Dispatch> 4000b9f8: 01 00 00 00 nop * after it wakes up. The returned status is correct for * non-blocking operations but if we blocked, then we need * to look at the status in our TCB. */ if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT ) 4000b9fc: 10 bf ff d6 b 4000b954 <_POSIX_Message_queue_Send_support+0xb8> 4000ba00: 80 a7 60 07 cmp %i5, 7 msg_status = _Thread_Executing->Wait.return_code; 4000ba04: c4 00 63 6c ld [ %g1 + 0x36c ], %g2 4000ba08: 10 bf ff d5 b 4000b95c <_POSIX_Message_queue_Send_support+0xc0> 4000ba0c: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5 * Validate the priority. * XXX - Do not validate msg_prio is not less than 0. */ if ( msg_prio > MQ_PRIO_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000ba10: 40 00 2f 57 call 4001776c <__errno> 4000ba14: 01 00 00 00 nop 4000ba18: 82 10 20 16 mov 0x16, %g1 ! 16 4000ba1c: c2 22 00 00 st %g1, [ %o0 ] 4000ba20: 10 bf ff b2 b 4000b8e8 <_POSIX_Message_queue_Send_support+0x4c> 4000ba24: 90 10 3f ff mov -1, %o0 4000bbf8 <_POSIX_Message_queue_Translate_core_message_queue_return_code>: */ int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { 4000bbf8: 9d e3 bf 98 save %sp, -104, %sp switch ( the_message_queue_status ) { 4000bbfc: 80 a6 20 03 cmp %i0, 3 4000bc00: 02 80 00 21 be 4000bc84 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x8c> 4000bc04: 94 10 00 18 mov %i0, %o2 4000bc08: 80 a6 20 03 cmp %i0, 3 4000bc0c: 08 80 00 12 bleu 4000bc54 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x5c> 4000bc10: 80 a6 20 01 cmp %i0, 1 4000bc14: 80 a6 20 05 cmp %i0, 5 4000bc18: 02 80 00 19 be 4000bc7c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x84> 4000bc1c: 01 00 00 00 nop 4000bc20: 2a 80 00 13 bcs,a 4000bc6c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000bc24: b0 10 20 0b mov 0xb, %i0 ! b 4000bc28: 80 a6 20 06 cmp %i0, 6 4000bc2c: 02 80 00 1a be 4000bc94 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x9c> 4000bc30: 03 00 44 44 sethi %hi(0x1111000), %g1 4000bc34: 82 10 61 11 or %g1, 0x111, %g1 ! 1111111 <== NOT EXECUTED 4000bc38: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4000bc3c: 02 80 00 14 be 4000bc8c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x94> <== NOT EXECUTED 4000bc40: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED * RTEMS POSIX API implementation does not support multiprocessing. */ case THREAD_STATUS_PROXY_BLOCKING: return ENOSYS; } _Internal_error_Occurred( 4000bc44: 40 00 0f 42 call 4000f94c <_Internal_error_Occurred> <== NOT EXECUTED 4000bc48: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000bc4c: 40 00 05 5f call 4000d1c8 <== NOT EXECUTED 4000bc50: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc54: 02 80 00 06 be 4000bc6c <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x74> 4000bc58: b0 10 20 7a mov 0x7a, %i0 4000bc5c: 80 a2 a0 01 cmp %o2, 1 4000bc60: 08 80 00 05 bleu 4000bc74 <_POSIX_Message_queue_Translate_core_message_queue_return_code+0x7c> 4000bc64: 01 00 00 00 nop _Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, the_message_queue_status ); return POSIX_BOTTOM_REACHED(); 4000bc68: b0 10 20 0b mov 0xb, %i0 ! b } 4000bc6c: 81 c7 e0 08 ret 4000bc70: 81 e8 00 00 restore int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc74: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc78: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Out of message buffers to queue pending message */ case CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED: return ENOMEM; 4000bc7c: 81 c7 e0 08 ret 4000bc80: 91 e8 20 09 restore %g0, 9, %o0 /* * Bad message size */ case CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE: return EMSGSIZE; 4000bc84: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc88: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED int _POSIX_Message_queue_Translate_core_message_queue_return_code( uint32_t the_message_queue_status ) { switch ( the_message_queue_status ) { 4000bc8c: 81 c7 e0 08 ret <== NOT EXECUTED 4000bc90: 91 e8 20 58 restore %g0, 0x58, %o0 <== NOT EXECUTED 4000bc94: 81 c7 e0 08 ret 4000bc98: 91 e8 20 74 restore %g0, 0x74, %o0 400113dc <_POSIX_Mutex_From_core_mutex_status>: */ int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { 400113dc: 9d e3 bf 98 save %sp, -104, %sp switch ( status ) { 400113e0: 80 a6 20 06 cmp %i0, 6 400113e4: 08 80 00 0b bleu 40011410 <_POSIX_Mutex_From_core_mutex_status+0x34> 400113e8: 83 2e 20 02 sll %i0, 2, %g1 case CORE_MUTEX_STATUS_CEILING_VIOLATED: return EINVAL; default: break; } assert( 0 ); 400113ec: 92 10 20 32 mov 0x32, %o1 <== NOT EXECUTED 400113f0: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 400113f4: 15 10 00 63 sethi %hi(0x40018c00), %o2 <== NOT EXECUTED 400113f8: 90 12 20 38 or %o0, 0x38, %o0 <== NOT EXECUTED 400113fc: 94 12 a2 d0 or %o2, 0x2d0, %o2 <== NOT EXECUTED 40011400: 7f ff cf 64 call 40005190 <__assert> <== NOT EXECUTED 40011404: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 40011408: 81 c7 e0 08 ret <== NOT EXECUTED 4001140c: 81 e8 00 00 restore <== NOT EXECUTED int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 40011410: 05 10 00 44 sethi %hi(0x40011000), %g2 40011414: 84 10 a3 c0 or %g2, 0x3c0, %g2 ! 400113c0 <_POSIX_Message_queue_Manager_initialization+0x58> 40011418: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4001141c: 81 c0 c0 00 jmp %g3 40011420: 01 00 00 00 nop 40011424: 81 c7 e0 08 ret 40011428: 91 e8 20 74 restore %g0, 0x74, %o0 4001142c: 81 c7 e0 08 ret 40011430: 91 e8 20 00 restore %g0, 0, %o0 case CORE_MUTEX_STATUS_SUCCESSFUL: return 0; 40011434: 81 c7 e0 08 ret 40011438: 91 e8 20 10 restore %g0, 0x10, %o0 case CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT: return EBUSY; 4001143c: 81 c7 e0 08 ret 40011440: 91 e8 20 2d restore %g0, 0x2d, %o0 case CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED: return EDEADLK; 40011444: 81 c7 e0 08 ret 40011448: 91 e8 20 01 restore %g0, 1, %o0 int _POSIX_Mutex_From_core_mutex_status( CORE_mutex_Status status ) { switch ( status ) { 4001144c: 81 c7 e0 08 ret 40011450: 91 e8 20 16 restore %g0, 0x16, %o0 40008b58 <_POSIX_Mutex_Lock_support>: int _POSIX_Mutex_Lock_support( pthread_mutex_t *mutex, boolean blocking, Watchdog_Interval timeout ) { 40008b58: 9d e3 bf 90 save %sp, -112, %sp ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008b5c: 80 a6 20 00 cmp %i0, 0 40008b60: 32 80 00 05 bne,a 40008b74 <_POSIX_Mutex_Lock_support+0x1c> 40008b64: d2 06 00 00 ld [ %i0 ], %o1 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40008b68: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40008b6c: 81 c7 e0 08 ret 40008b70: 91 e8 00 08 restore %g0, %o0, %o0 40008b74: 80 a2 7f ff cmp %o1, -1 40008b78: 02 80 00 94 be 40008dc8 <_POSIX_Mutex_Lock_support+0x270> 40008b7c: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 40008b80: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008b84: 94 07 bf f4 add %fp, -12, %o2 40008b88: 90 12 23 e4 or %o0, 0x3e4, %o0 40008b8c: 40 00 0e d8 call 4000c6ec <_Objects_Get_isr_disable> 40008b90: 96 07 bf f0 add %fp, -16, %o3 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40008b94: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008b98: 80 a0 60 00 cmp %g1, 0 40008b9c: 12 80 00 21 bne 40008c20 <_POSIX_Mutex_Lock_support+0xc8> 40008ba0: a0 10 00 08 mov %o0, %l0 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008ba4: 31 10 00 70 sethi %hi(0x4001c000), %i0 40008ba8: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008bac: 80 a0 60 00 cmp %g1, 0 40008bb0: 12 80 00 22 bne 40008c38 <_POSIX_Mutex_Lock_support+0xe0> 40008bb4: 80 a6 60 00 cmp %i1, 0 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008bb8: 23 10 00 71 sethi %hi(0x4001c400), %l1 40008bbc: c4 04 60 5c ld [ %l1 + 0x5c ], %g2 ! 4001c45c <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40008bc0: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40008bc4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40008bc8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40008bcc: 80 a0 60 00 cmp %g1, 0 40008bd0: 22 80 00 26 be,a 40008c68 <_POSIX_Mutex_Lock_support+0x110> 40008bd4: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40008bd8: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008bdc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40008be0: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40008be4: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40008be8: c2 24 20 74 st %g1, [ %l0 + 0x74 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40008bec: c4 24 20 70 st %g2, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40008bf0: 80 a0 e0 02 cmp %g3, 2 40008bf4: 02 80 00 2b be 40008ca0 <_POSIX_Mutex_Lock_support+0x148> 40008bf8: c8 24 20 68 st %g4, [ %l0 + 0x68 ] 40008bfc: 80 a0 e0 03 cmp %g3, 3 40008c00: 22 80 00 2a be,a 40008ca8 <_POSIX_Mutex_Lock_support+0x150> 40008c04: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40008c08: 7f ff ed 2b call 400040b4 40008c0c: 01 00 00 00 nop the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008c10: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 40008c14: 40 00 21 f2 call 400113dc <_POSIX_Mutex_From_core_mutex_status> 40008c18: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 40008c1c: 30 bf ff d4 b,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> register POSIX_Mutex_Control *the_mutex; Objects_Locations location; ISR_Level level; the_mutex = _POSIX_Mutex_Get_interrupt_disable( mutex, &location, &level ); switch ( location ) { 40008c20: 80 a0 60 02 cmp %g1, 2 40008c24: 28 bf ff d2 bleu,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> 40008c28: 90 10 20 16 mov 0x16, %o0 ); return _POSIX_Mutex_From_core_mutex_status( (CORE_mutex_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40008c2c: 40 00 04 15 call 40009c80 <== NOT EXECUTED 40008c30: 01 00 00 00 nop <== NOT EXECUTED 40008c34: 30 bf ff ce b,a 40008b6c <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008c38: 02 bf ff e1 be 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c3c: 23 10 00 71 sethi %hi(0x4001c400), %l1 <== NOT EXECUTED 40008c40: 03 10 00 71 sethi %hi(0x4001c400), %g1 <== NOT EXECUTED 40008c44: c4 00 61 60 ld [ %g1 + 0x160 ], %g2 ! 4001c560 <_System_state_Current> <== NOT EXECUTED 40008c48: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40008c4c: 08 bf ff dc bleu 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c50: 90 10 20 00 clr %o0 <== NOT EXECUTED 40008c54: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008c58: 40 00 0d 45 call 4000c16c <_Internal_error_Occurred> <== NOT EXECUTED 40008c5c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40008c60: 10 bf ff d7 b 40008bbc <_POSIX_Mutex_Lock_support+0x64> <== NOT EXECUTED 40008c64: 23 10 00 71 sethi %hi(0x4001c400), %l1 <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40008c68: 80 a0 40 02 cmp %g1, %g2 40008c6c: 12 80 00 2d bne 40008d20 <_POSIX_Mutex_Lock_support+0x1c8> 40008c70: 80 a6 60 00 cmp %i1, 0 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008c74: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40008c78: 80 a0 60 00 cmp %g1, 0 40008c7c: 12 80 00 41 bne 40008d80 <_POSIX_Mutex_Lock_support+0x228> 40008c80: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40008c84: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 <== NOT EXECUTED 40008c88: 82 00 60 01 inc %g1 <== NOT EXECUTED 40008c8c: c2 24 20 68 st %g1, [ %l0 + 0x68 ] <== NOT EXECUTED _ISR_Enable( level ); 40008c90: 7f ff ed 09 call 400040b4 <== NOT EXECUTED 40008c94: 01 00 00 00 nop <== NOT EXECUTED the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008c98: 10 bf ff df b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40008c9c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008ca0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008ca4: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40008ca8: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40008cac: 12 bf ff d7 bne 40008c08 <_POSIX_Mutex_Lock_support+0xb0> 40008cb0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40008cb4: c6 04 20 60 ld [ %l0 + 0x60 ], %g3 current = executing->current_priority; 40008cb8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 if ( current == ceiling ) { 40008cbc: 80 a0 40 03 cmp %g1, %g3 40008cc0: 02 80 00 49 be 40008de4 <_POSIX_Mutex_Lock_support+0x28c> 40008cc4: 80 a0 c0 01 cmp %g3, %g1 _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40008cc8: 1a 80 00 36 bcc 40008da0 <_POSIX_Mutex_Lock_support+0x248> 40008ccc: 82 10 20 06 mov 6, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008cd0: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008cd4: 82 00 60 01 inc %g1 40008cd8: c2 26 23 80 st %g1, [ %i0 + 0x380 ] _Thread_Disable_dispatch(); _ISR_Enable( level ); 40008cdc: 7f ff ec f6 call 400040b4 40008ce0: 01 00 00 00 nop _Thread_Change_priority( 40008ce4: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 40008ce8: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 40008cec: 40 00 12 66 call 4000d684 <_Thread_Change_priority> 40008cf0: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008cf4: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008cf8: 82 00 7f ff add %g1, -1, %g1 40008cfc: c2 26 23 80 st %g1, [ %i0 + 0x380 ] 40008d00: c4 06 23 80 ld [ %i0 + 0x380 ], %g2 40008d04: 80 a0 a0 00 cmp %g2, 0 40008d08: 32 bf ff c3 bne,a 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d0c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 40008d10: 40 00 13 81 call 4000db14 <_Thread_Dispatch> 40008d14: 01 00 00 00 nop 40008d18: 10 bf ff bf b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d1c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_mutex_Seize( 40008d20: 32 80 00 08 bne,a 40008d40 <_POSIX_Mutex_Lock_support+0x1e8> 40008d24: c4 04 20 08 ld [ %l0 + 8 ], %g2 40008d28: 7f ff ec e3 call 400040b4 40008d2c: d0 07 bf f0 ld [ %fp + -16 ], %o0 40008d30: c4 04 60 5c ld [ %l1 + 0x5c ], %g2 40008d34: 82 10 20 01 mov 1, %g1 40008d38: 10 bf ff b6 b 40008c10 <_POSIX_Mutex_Lock_support+0xb8> 40008d3c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] 40008d40: c6 04 60 5c ld [ %l1 + 0x5c ], %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d44: c2 06 23 80 ld [ %i0 + 0x380 ], %g1 40008d48: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] 40008d4c: 82 00 60 01 inc %g1 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40008d50: 84 10 20 01 mov 1, %g2 40008d54: c2 26 23 80 st %g1, [ %i0 + 0x380 ] 40008d58: c4 24 20 44 st %g2, [ %l0 + 0x44 ] 40008d5c: a0 04 20 14 add %l0, 0x14, %l0 40008d60: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 40008d64: 7f ff ec d4 call 400040b4 40008d68: d0 07 bf f0 ld [ %fp + -16 ], %o0 40008d6c: 90 10 00 10 mov %l0, %o0 40008d70: 40 00 0a ae call 4000b828 <_CORE_mutex_Seize_interrupt_blocking> 40008d74: 92 10 00 1a mov %i2, %o1 the_mutex->Object.id, blocking, timeout, level ); return _POSIX_Mutex_From_core_mutex_status( 40008d78: 10 bf ff a7 b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d7c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40008d80: 12 bf ff e8 bne 40008d20 <_POSIX_Mutex_Lock_support+0x1c8> 40008d84: 80 a6 60 00 cmp %i1, 0 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40008d88: 82 10 20 02 mov 2, %g1 40008d8c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] _ISR_Enable( level ); 40008d90: 7f ff ec c9 call 400040b4 40008d94: 01 00 00 00 nop 40008d98: 10 bf ff 9f b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008d9c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40008da0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] the_mutex->lock = CORE_MUTEX_UNLOCKED; 40008da4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] the_mutex->nest_count = 0; /* undo locking above */ 40008da8: c0 24 20 68 clr [ %l0 + 0x68 ] executing->resource_count--; /* undo locking above */ 40008dac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 40008db0: 82 00 7f ff add %g1, -1, %g1 40008db4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40008db8: 7f ff ec bf call 400040b4 40008dbc: 01 00 00 00 nop 40008dc0: 10 bf ff 95 b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> 40008dc4: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 ISR_Level *level ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008dc8: 7f ff fe f6 call 400089a0 <== NOT EXECUTED 40008dcc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008dd0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008dd4: 12 bf ff 66 bne 40008b6c <_POSIX_Mutex_Lock_support+0x14> <== NOT EXECUTED 40008dd8: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40008ddc: 10 bf ff 69 b 40008b80 <_POSIX_Mutex_Lock_support+0x28> <== NOT EXECUTED 40008de0: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40008de4: 7f ff ec b4 call 400040b4 <== NOT EXECUTED 40008de8: 01 00 00 00 nop <== NOT EXECUTED 40008dec: 10 bf ff 8a b 40008c14 <_POSIX_Mutex_Lock_support+0xbc> <== NOT EXECUTED 40008df0: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code>: int _POSIX_RWLock_Translate_core_RWLock_return_code( CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) 400078f8: 80 a2 20 03 cmp %o0, 3 400078fc: 18 80 00 06 bgu 40007914 <_POSIX_RWLock_Translate_core_RWLock_return_code+0x1c> 40007900: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); } 40007904: 03 10 00 72 sethi %hi(0x4001c800), %g1 40007908: 82 10 62 cc or %g1, 0x2cc, %g1 ! 4001cacc <_POSIX_RWLock_Return_codes> 4000790c: 81 c3 e0 08 retl 40007910: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_RWLock_Status the_rwlock_status ) { if ( the_rwlock_status <= CORE_RWLOCK_STATUS_LAST ) return _POSIX_RWLock_Return_codes[the_rwlock_status]; return POSIX_BOTTOM_REACHED(); 40007914: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007918: 40 00 02 95 call 4000836c <== NOT EXECUTED 4000791c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007920: 01 00 00 00 nop 40010570 <_POSIX_Semaphore_Create_support>: const char *name, int pshared, unsigned int value, POSIX_Semaphore_Control **the_sem ) { 40010570: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40010574: 21 10 00 85 sethi %hi(0x40021400), %l0 40010578: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 4001057c: 82 00 60 01 inc %g1 40010580: c2 24 22 30 st %g1, [ %l0 + 0x230 ] char *name_p = (char *)name; _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { 40010584: 80 a6 60 00 cmp %i1, 0 40010588: 12 80 00 3b bne 40010674 <_POSIX_Semaphore_Create_support+0x104> 4001058c: 80 a6 20 00 cmp %i0, 0 _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); } if ( name ) { 40010590: 02 80 00 07 be 400105ac <_POSIX_Semaphore_Create_support+0x3c> 40010594: 23 10 00 86 sethi %hi(0x40021800), %l1 if( strlen(name) > PATH_MAX ) { 40010598: 40 00 0f b9 call 4001447c 4001059c: 90 10 00 18 mov %i0, %o0 400105a0: 80 a2 20 ff cmp %o0, 0xff 400105a4: 18 80 00 41 bgu 400106a8 <_POSIX_Semaphore_Create_support+0x138> 400105a8: 23 10 00 86 sethi %hi(0x40021800), %l1 * _POSIX_Semaphore_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void ) { return (POSIX_Semaphore_Control *) 400105ac: 7f ff e9 91 call 4000abf0 <_Objects_Allocate> 400105b0: 90 14 61 b0 or %l1, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> } } the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { 400105b4: b2 92 20 00 orcc %o0, 0, %i1 400105b8: 02 80 00 4f be 400106f4 <_POSIX_Semaphore_Create_support+0x184> 400105bc: 80 a6 20 00 cmp %i0, 0 } #endif the_semaphore->process_shared = pshared; if ( name ) { 400105c0: 02 80 00 29 be 40010664 <_POSIX_Semaphore_Create_support+0xf4> 400105c4: c0 26 60 10 clr [ %i1 + 0x10 ] the_semaphore->named = TRUE; 400105c8: 82 10 20 01 mov 1, %g1 the_semaphore->open_count = 1; the_semaphore->linked = TRUE; 400105cc: c2 26 60 18 st %g1, [ %i1 + 0x18 ] #endif the_semaphore->process_shared = pshared; if ( name ) { the_semaphore->named = TRUE; 400105d0: c2 26 60 14 st %g1, [ %i1 + 0x14 ] the_semaphore->open_count = 1; 400105d4: c2 26 60 1c st %g1, [ %i1 + 0x1c ] /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 400105d8: 82 10 3f ff mov -1, %g1 _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 400105dc: 90 06 60 20 add %i1, 0x20, %o0 /* * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; 400105e0: c2 26 60 60 st %g1, [ %i1 + 0x60 ] * be derived from the current scheduling policy. One * thing is certain, no matter what we decide, it won't be * the same as all other POSIX implementations. :) */ the_sem_attr->discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO; 400105e4: c0 26 60 64 clr [ %i1 + 0x64 ] * This effectively disables limit checking. */ the_sem_attr->maximum_count = 0xFFFFFFFF; _CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value ); 400105e8: 94 10 00 1a mov %i2, %o2 400105ec: 7f ff e7 b1 call 4000a4b0 <_CORE_semaphore_Initialize> 400105f0: 92 06 60 60 add %i1, 0x60, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400105f4: 90 14 61 b0 or %l1, 0x1b0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400105f8: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400105fc: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40010600: 03 00 00 3f sethi %hi(0xfc00), %g1 40010604: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010608: 82 08 80 01 and %g2, %g1, %g1 4001060c: 80 a0 40 03 cmp %g1, %g3 40010610: 38 80 00 06 bgu,a 40010628 <_POSIX_Semaphore_Create_support+0xb8> 40010614: f2 26 c0 00 st %i1, [ %i3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40010618: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4001061c: 83 28 60 02 sll %g1, 2, %g1 40010620: f2 20 80 01 st %i1, [ %g2 + %g1 ] * Make the semaphore available for use. */ _Objects_Open(&_POSIX_Semaphore_Information, &the_semaphore->Object, name_p); *the_sem = the_semaphore; 40010624: f2 26 c0 00 st %i1, [ %i3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40010628: f0 26 60 0c st %i0, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001062c: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40010630: b0 10 20 00 clr %i0 40010634: 82 00 7f ff add %g1, -1, %g1 40010638: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 4001063c: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010640: 80 a0 a0 00 cmp %g2, 0 40010644: 02 80 00 04 be 40010654 <_POSIX_Semaphore_Create_support+0xe4> 40010648: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return 0; } 4001064c: 81 c7 e0 08 ret 40010650: 81 e8 00 00 restore _Thread_Dispatch(); 40010654: 7f ff ef a4 call 4000c4e4 <_Thread_Dispatch> 40010658: 01 00 00 00 nop 4001065c: 81 c7 e0 08 ret 40010660: 81 e8 00 00 restore if ( name ) { the_semaphore->named = TRUE; the_semaphore->open_count = 1; the_semaphore->linked = TRUE; } else { the_semaphore->named = FALSE; 40010664: c0 26 60 14 clr [ %i1 + 0x14 ] the_semaphore->open_count = 0; 40010668: c0 26 60 1c clr [ %i1 + 0x1c ] the_semaphore->linked = FALSE; 4001066c: 10 bf ff db b 400105d8 <_POSIX_Semaphore_Create_support+0x68> 40010670: c0 26 60 18 clr [ %i1 + 0x18 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010674: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40010678: 82 00 7f ff add %g1, -1, %g1 4001067c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40010680: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010684: 80 a0 a0 00 cmp %g2, 0 40010688: 02 80 00 15 be 400106dc <_POSIX_Semaphore_Create_support+0x16c> 4001068c: 01 00 00 00 nop _Thread_Disable_dispatch(); /* Sharing semaphores among processes is not currently supported */ if (pshared != 0) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSYS ); 40010690: 40 00 09 03 call 40012a9c <__errno> 40010694: b0 10 3f ff mov -1, %i0 ! ffffffff 40010698: 82 10 20 58 mov 0x58, %g1 4001069c: c2 22 00 00 st %g1, [ %o0 ] 400106a0: 81 c7 e0 08 ret 400106a4: 81 e8 00 00 restore 400106a8: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 <== NOT EXECUTED 400106ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400106b0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] <== NOT EXECUTED 400106b4: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 <== NOT EXECUTED 400106b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400106bc: 02 80 00 0b be 400106e8 <_POSIX_Semaphore_Create_support+0x178> <== NOT EXECUTED 400106c0: 01 00 00 00 nop <== NOT EXECUTED } if ( name ) { if( strlen(name) > PATH_MAX ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 400106c4: 40 00 08 f6 call 40012a9c <__errno> <== NOT EXECUTED 400106c8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400106cc: 82 10 20 5b mov 0x5b, %g1 <== NOT EXECUTED 400106d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400106d4: 81 c7 e0 08 ret <== NOT EXECUTED 400106d8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400106dc: 7f ff ef 82 call 4000c4e4 <_Thread_Dispatch> 400106e0: 01 00 00 00 nop 400106e4: 30 bf ff eb b,a 40010690 <_POSIX_Semaphore_Create_support+0x120> 400106e8: 7f ff ef 7f call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400106ec: 01 00 00 00 nop <== NOT EXECUTED 400106f0: 30 bf ff f5 b,a 400106c4 <_POSIX_Semaphore_Create_support+0x154> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400106f4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 400106f8: 82 00 7f ff add %g1, -1, %g1 400106fc: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40010700: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40010704: 80 a0 a0 00 cmp %g2, 0 40010708: 02 80 00 08 be 40010728 <_POSIX_Semaphore_Create_support+0x1b8> 4001070c: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Allocate(); if ( !the_semaphore ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENOSPC ); 40010710: 40 00 08 e3 call 40012a9c <__errno> 40010714: b0 10 3f ff mov -1, %i0 ! ffffffff 40010718: 82 10 20 1c mov 0x1c, %g1 4001071c: c2 22 00 00 st %g1, [ %o0 ] 40010720: 81 c7 e0 08 ret 40010724: 81 e8 00 00 restore _Thread_Dispatch(); 40010728: 7f ff ef 6f call 4000c4e4 <_Thread_Dispatch> 4001072c: 01 00 00 00 nop 40010730: 30 bf ff f8 b,a 40010710 <_POSIX_Semaphore_Create_support+0x1a0> 40010824 <_POSIX_Semaphore_Wait_support>: int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 40010824: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 40010828: d2 06 00 00 ld [ %i0 ], %o1 4001082c: 94 07 bf f4 add %fp, -12, %o2 40010830: 11 10 00 86 sethi %hi(0x40021800), %o0 40010834: 7f ff ea 40 call 4000b134 <_Objects_Get> 40010838: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4001083c: c2 07 bf f4 ld [ %fp + -12 ], %g1 int _POSIX_Semaphore_Wait_support( sem_t *sem, boolean blocking, Watchdog_Interval timeout ) { 40010840: 94 10 00 19 mov %i1, %o2 POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 40010844: 80 a0 60 01 cmp %g1, 1 40010848: 02 80 00 24 be 400108d8 <_POSIX_Semaphore_Wait_support+0xb4> 4001084c: 96 10 00 1a mov %i2, %o3 40010850: 80 a0 60 01 cmp %g1, 1 40010854: 2a 80 00 07 bcs,a 40010870 <_POSIX_Semaphore_Wait_support+0x4c> 40010858: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001085c: 80 a0 60 02 cmp %g1, 2 40010860: 02 80 00 20 be 400108e0 <_POSIX_Semaphore_Wait_support+0xbc> 40010864: 01 00 00 00 nop */ break; } } return 0; } 40010868: 81 c7 e0 08 ret 4001086c: 91 e8 20 00 restore %g0, 0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Seize( 40010870: 40 00 01 9b call 40010edc <_CORE_semaphore_Seize> 40010874: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010878: 03 10 00 85 sethi %hi(0x40021400), %g1 4001087c: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 40010880: 84 00 bf ff add %g2, -1, %g2 40010884: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40010888: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 4001088c: 80 a0 e0 00 cmp %g3, 0 40010890: 02 80 00 1a be 400108f8 <_POSIX_Semaphore_Wait_support+0xd4> 40010894: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 40010898: 03 10 00 85 sethi %hi(0x40021400), %g1 <== NOT EXECUTED 4001089c: c4 00 63 0c ld [ %g1 + 0x30c ], %g2 ! 4002170c <_Thread_Executing> 400108a0: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 400108a4: 80 a0 60 02 cmp %g1, 2 400108a8: 02 80 00 06 be 400108c0 <_POSIX_Semaphore_Wait_support+0x9c> 400108ac: 80 a0 60 03 cmp %g1, 3 400108b0: 02 80 00 16 be 40010908 <_POSIX_Semaphore_Wait_support+0xe4> 400108b4: 80 a0 60 01 cmp %g1, 1 400108b8: 12 bf ff ec bne 40010868 <_POSIX_Semaphore_Wait_support+0x44> 400108bc: 01 00 00 00 nop case CORE_SEMAPHORE_STATUS_SUCCESSFUL: break; case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_WAS_DELETED: rtems_set_errno_and_return_minus_one( EAGAIN ); 400108c0: 40 00 08 77 call 40012a9c <__errno> 400108c4: b0 10 3f ff mov -1, %i0 ! ffffffff 400108c8: 82 10 20 0b mov 0xb, %g1 400108cc: c2 22 00 00 st %g1, [ %o0 ] 400108d0: 81 c7 e0 08 ret 400108d4: 81 e8 00 00 restore the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400108d8: 7f ff ef 03 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400108dc: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); 400108e0: 40 00 08 6f call 40012a9c <__errno> 400108e4: b0 10 3f ff mov -1, %i0 ! ffffffff 400108e8: 82 10 20 16 mov 0x16, %g1 400108ec: c2 22 00 00 st %g1, [ %o0 ] 400108f0: 81 c7 e0 08 ret 400108f4: 81 e8 00 00 restore _Thread_Dispatch(); 400108f8: 7f ff ee fb call 4000c4e4 <_Thread_Dispatch> 400108fc: 01 00 00 00 nop the_semaphore->Object.id, blocking, timeout ); _Thread_Enable_dispatch(); switch ( _Thread_Executing->Wait.return_code ) { 40010900: 10 bf ff e7 b 4001089c <_POSIX_Semaphore_Wait_support+0x78> 40010904: 03 10 00 85 sethi %hi(0x40021400), %g1 case CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_WAS_DELETED: rtems_set_errno_and_return_minus_one( EAGAIN ); case CORE_SEMAPHORE_TIMEOUT: rtems_set_errno_and_return_minus_one( ETIMEDOUT ); 40010908: 40 00 08 65 call 40012a9c <__errno> 4001090c: b0 10 3f ff mov -1, %i0 40010910: 82 10 20 74 mov 0x74, %g1 40010914: c2 22 00 00 st %g1, [ %o0 ] 40010918: 81 c7 e0 08 ret 4001091c: 81 e8 00 00 restore 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code>: int _POSIX_Spinlock_Translate_core_spinlock_return_code( CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) 40006cfc: 80 a2 20 06 cmp %o0, 6 40006d00: 18 80 00 06 bgu 40006d18 <_POSIX_Spinlock_Translate_core_spinlock_return_code+0x1c> 40006d04: 85 2a 20 02 sll %o0, 2, %g2 return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); } 40006d08: 03 10 00 51 sethi %hi(0x40014400), %g1 40006d0c: 82 10 62 5c or %g1, 0x25c, %g1 ! 4001465c <_POSIX_Spinlock_Return_codes> 40006d10: 81 c3 e0 08 retl 40006d14: d0 00 40 02 ld [ %g1 + %g2 ], %o0 CORE_spinlock_Status the_spinlock_status ) { if ( the_spinlock_status <= CORE_SPINLOCK_STATUS_LAST ) return _POSIX_Spinlock_Return_codes[the_spinlock_status]; return POSIX_BOTTOM_REACHED(); 40006d18: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40006d1c: 40 00 00 66 call 40006eb4 <== NOT EXECUTED 40006d20: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006d24: 01 00 00 00 nop 40007b3c <_POSIX_Threads_Initialize_user_threads_body>: * * Output parameters: NONE */ void _POSIX_Threads_Initialize_user_threads_body( void ) { 40007b3c: 9d e3 bf 58 save %sp, -168, %sp uint32_t maximum; posix_initialization_threads_table *user_threads; pthread_t thread_id; pthread_attr_t attr; user_threads = _POSIX_Threads_User_initialization_threads; 40007b40: 03 10 00 80 sethi %hi(0x40020000), %g1 40007b44: e4 00 61 fc ld [ %g1 + 0x1fc ], %l2 ! 400201fc <_POSIX_Threads_User_initialization_threads> maximum = _POSIX_Threads_Number_of_initialization_threads; 40007b48: 03 10 00 80 sethi %hi(0x40020000), %g1 if ( !user_threads || maximum == 0 ) 40007b4c: 80 a4 a0 00 cmp %l2, 0 40007b50: 02 80 00 54 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007b54: ec 00 62 cc ld [ %g1 + 0x2cc ], %l6 40007b58: 80 a5 a0 00 cmp %l6, 0 40007b5c: 02 80 00 51 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007b60: 03 10 00 77 sethi %hi(0x4001dc00), %g1 * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { status = pthread_attr_init( &attr ); assert( !status ); 40007b64: 05 10 00 74 sethi %hi(0x4001d000), %g2 40007b68: aa 10 60 c8 or %g1, 0xc8, %l5 40007b6c: a8 10 a0 f8 or %g2, 0xf8, %l4 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007b70: a6 10 20 00 clr %l3 40007b74: a2 10 20 00 clr %l1 40007b78: a0 07 bf bc add %fp, -68, %l0 40007b7c: 10 80 00 1a b 40007be4 <_POSIX_Threads_Initialize_user_threads_body+0xa8> 40007b80: ae 07 bf f4 add %fp, -12, %l7 status = pthread_attr_init( &attr ); assert( !status ); status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40007b84: 40 00 20 db call 4000fef0 40007b88: 90 10 00 10 mov %l0, %o0 assert( !status ); 40007b8c: 80 a2 20 00 cmp %o0, 0 40007b90: 12 80 00 26 bne 40007c28 <_POSIX_Threads_Initialize_user_threads_body+0xec> 40007b94: 94 10 00 14 mov %l4, %o2 status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40007b98: 82 04 80 11 add %l2, %l1, %g1 40007b9c: d2 00 60 04 ld [ %g1 + 4 ], %o1 40007ba0: 40 00 20 e4 call 4000ff30 40007ba4: 90 10 00 10 mov %l0, %o0 assert( !status ); 40007ba8: 80 a2 20 00 cmp %o0, 0 40007bac: 12 80 00 2a bne 40007c54 <_POSIX_Threads_Initialize_user_threads_body+0x118> 40007bb0: 90 10 00 15 mov %l5, %o0 status = pthread_create( 40007bb4: d4 04 40 12 ld [ %l1 + %l2 ], %o2 40007bb8: 92 10 00 10 mov %l0, %o1 40007bbc: 96 10 20 00 clr %o3 40007bc0: 90 10 00 17 mov %l7, %o0 40007bc4: 7f ff fe dd call 40007738 40007bc8: a2 04 60 08 add %l1, 8, %l1 &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40007bcc: 80 a2 20 00 cmp %o0, 0 40007bd0: 12 80 00 2e bne 40007c88 <_POSIX_Threads_Initialize_user_threads_body+0x14c> 40007bd4: 90 10 00 15 mov %l5, %o0 * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007bd8: 80 a4 c0 16 cmp %l3, %l6 40007bdc: 02 80 00 31 be 40007ca0 <_POSIX_Threads_Initialize_user_threads_body+0x164> 40007be0: 01 00 00 00 nop status = pthread_attr_init( &attr ); 40007be4: 90 10 00 10 mov %l0, %o0 40007be8: 40 00 20 b7 call 4000fec4 40007bec: a6 04 e0 01 inc %l3 assert( !status ); 40007bf0: 80 a2 20 00 cmp %o0, 0 40007bf4: 02 bf ff e4 be 40007b84 <_POSIX_Threads_Initialize_user_threads_body+0x48> 40007bf8: 92 10 20 02 mov 2, %o1 40007bfc: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40007c00: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c04: 7f ff f0 ff call 40004000 <__assert> <== NOT EXECUTED 40007c08: 92 10 20 47 mov 0x47, %o1 <== NOT EXECUTED status = pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED ); 40007c0c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40007c10: 40 00 20 b8 call 4000fef0 <== NOT EXECUTED 40007c14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40007c18: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c1c: 02 bf ff e0 be 40007b9c <_POSIX_Threads_Initialize_user_threads_body+0x60> <== NOT EXECUTED 40007c20: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40007c24: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED 40007c28: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c2c: 7f ff f0 f5 call 40004000 <__assert> <== NOT EXECUTED 40007c30: 92 10 20 4a mov 0x4a, %o1 <== NOT EXECUTED status = pthread_attr_setstacksize( &attr, user_threads[ index ].stack_size); 40007c34: 82 04 80 11 add %l2, %l1, %g1 <== NOT EXECUTED 40007c38: d2 00 60 04 ld [ %g1 + 4 ], %o1 <== NOT EXECUTED 40007c3c: 40 00 20 bd call 4000ff30 <== NOT EXECUTED 40007c40: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED assert( !status ); 40007c44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c48: 22 bf ff dc be,a 40007bb8 <_POSIX_Threads_Initialize_user_threads_body+0x7c> <== NOT EXECUTED 40007c4c: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40007c50: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c54: 92 10 20 4d mov 0x4d, %o1 <== NOT EXECUTED 40007c58: 7f ff f0 ea call 40004000 <__assert> <== NOT EXECUTED 40007c5c: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED status = pthread_create( 40007c60: d4 04 40 12 ld [ %l1 + %l2 ], %o2 <== NOT EXECUTED 40007c64: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40007c68: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007c6c: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED 40007c70: 7f ff fe b2 call 40007738 <== NOT EXECUTED 40007c74: a2 04 60 08 add %l1, 8, %l1 <== NOT EXECUTED &thread_id, &attr, user_threads[ index ].thread_entry, NULL ); assert( !status ); 40007c78: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40007c7c: 02 bf ff d8 be 40007bdc <_POSIX_Threads_Initialize_user_threads_body+0xa0> <== NOT EXECUTED 40007c80: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40007c84: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40007c88: 92 10 20 55 mov 0x55, %o1 <== NOT EXECUTED 40007c8c: 7f ff f0 dd call 40004000 <__assert> <== NOT EXECUTED 40007c90: 94 10 00 14 mov %l4, %o2 <== NOT EXECUTED * * Setting the attributes explicitly is critical, since we don't want * to inherit the idle tasks attributes. */ for ( index=0 ; index < maximum ; index++ ) { 40007c94: 80 a4 c0 16 cmp %l3, %l6 <== NOT EXECUTED 40007c98: 12 bf ff d4 bne 40007be8 <_POSIX_Threads_Initialize_user_threads_body+0xac> <== NOT EXECUTED 40007c9c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore 4000dea0 <_POSIX_Threads_Sporadic_budget_TSR>: void _POSIX_Threads_Sporadic_budget_TSR( Objects_Id id, void *argument ) { 4000dea0: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; POSIX_API_Control *api; the_thread = argument; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000dea4: f0 06 61 70 ld [ %i1 + 0x170 ], %i0 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); 4000dea8: 40 00 04 09 call 4000eecc <_Timespec_To_ticks> 4000deac: 90 06 20 90 add %i0, 0x90, %o0 if ( !ticks ) 4000deb0: 80 a2 20 00 cmp %o0, 0 4000deb4: 22 80 00 02 be,a 4000debc <_POSIX_Threads_Sporadic_budget_TSR+0x1c> 4000deb8: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000debc: c2 06 20 98 ld [ %i0 + 0x98 ], %g1 the_thread->cpu_time_budget = ticks; new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000dec0: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 4000dec4: 84 10 20 ff mov 0xff, %g2 ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget ); if ( !ticks ) ticks = 1; the_thread->cpu_time_budget = ticks; 4000dec8: d0 26 60 84 st %o0, [ %i1 + 0x84 ] 4000decc: 92 20 80 01 sub %g2, %g1, %o1 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000ded0: 80 a0 e0 00 cmp %g3, 0 4000ded4: 02 80 00 10 be 4000df14 <_POSIX_Threads_Sporadic_budget_TSR+0x74> 4000ded8: d2 26 60 18 st %o1, [ %i1 + 0x18 ] 4000dedc: c2 06 60 14 ld [ %i1 + 0x14 ], %g1 4000dee0: 80 a2 40 01 cmp %o1, %g1 4000dee4: 0a 80 00 0d bcs 4000df18 <_POSIX_Threads_Sporadic_budget_TSR+0x78> 4000dee8: 90 10 00 19 mov %i1, %o0 the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000deec: 40 00 03 f8 call 4000eecc <_Timespec_To_ticks> <== NOT EXECUTED 4000def0: 90 06 20 88 add %i0, 0x88, %o0 <== NOT EXECUTED if ( !ticks ) 4000def4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000def8: 22 80 00 10 be,a 4000df38 <_POSIX_Threads_Sporadic_budget_TSR+0x98> <== NOT EXECUTED 4000defc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000df00: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000df04: b2 06 20 9c add %i0, 0x9c, %i1 4000df08: 31 10 00 6f sethi %hi(0x4001bc00), %i0 4000df0c: 7f ff f6 4a call 4000b834 <_Watchdog_Insert> 4000df10: 91 ee 22 dc restore %i0, 0x2dc, %o0 new_priority = _POSIX_Priority_To_core( api->ss_high_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000df14: 90 10 00 19 mov %i1, %o0 4000df18: 7f ff ef fc call 40009f08 <_Thread_Change_priority> 4000df1c: 94 10 20 01 mov 1, %o2 ticks = _Timespec_To_ticks( &api->schedparam.ss_replenish_period ); 4000df20: 40 00 03 eb call 4000eecc <_Timespec_To_ticks> 4000df24: 90 06 20 88 add %i0, 0x88, %o0 if ( !ticks ) 4000df28: 80 a2 20 00 cmp %o0, 0 4000df2c: 32 bf ff f6 bne,a 4000df04 <_POSIX_Threads_Sporadic_budget_TSR+0x64> 4000df30: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] 4000df34: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000df38: b2 06 20 9c add %i0, 0x9c, %i1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000df3c: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000df40: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000df44: 7f ff f6 3c call 4000b834 <_Watchdog_Insert> <== NOT EXECUTED 4000df48: 91 ee 22 dc restore %i0, 0x2dc, %o0 <== NOT EXECUTED 4000df4c: 01 00 00 00 nop 4000de50 <_POSIX_Threads_Sporadic_budget_callout>: ) { POSIX_API_Control *api; uint32_t new_priority; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000de50: c4 02 21 70 ld [ %o0 + 0x170 ], %g2 the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */ new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000de54: c8 02 20 1c ld [ %o0 + 0x1c ], %g4 RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core( int priority ) { return (Priority_Control) (255 - priority); 4000de58: c6 00 a0 84 ld [ %g2 + 0x84 ], %g3 * 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 */ 4000de5c: 82 10 3f ff mov -1, %g1 4000de60: 84 10 20 ff mov 0xff, %g2 4000de64: c2 22 20 84 st %g1, [ %o0 + 0x84 ] 4000de68: 92 20 80 03 sub %g2, %g3, %o1 new_priority = _POSIX_Priority_To_core( api->schedparam.ss_low_priority ); the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000de6c: 80 a1 20 00 cmp %g4, 0 4000de70: 02 80 00 06 be 4000de88 <_POSIX_Threads_Sporadic_budget_callout+0x38> 4000de74: d2 22 20 18 st %o1, [ %o0 + 0x18 ] 4000de78: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED 4000de7c: 80 a2 40 01 cmp %o1, %g1 <== NOT EXECUTED 4000de80: 1a 80 00 06 bcc 4000de98 <_POSIX_Threads_Sporadic_budget_callout+0x48> <== NOT EXECUTED 4000de84: 01 00 00 00 nop <== NOT EXECUTED the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, TRUE ); 4000de88: 94 10 20 01 mov 1, %o2 ! 1 4000de8c: 82 13 c0 00 mov %o7, %g1 4000de90: 7f ff f0 1e call 40009f08 <_Thread_Change_priority> 4000de94: 9e 10 40 00 mov %g1, %o7 4000de98: 81 c3 e0 08 retl <== NOT EXECUTED 4000de9c: 01 00 00 00 nop 400065a0 <_POSIX_Threads_cancel_run>: */ void _POSIX_Threads_cancel_run( Thread_Control *the_thread ) { 400065a0: 9d e3 bf 98 save %sp, -104, %sp POSIX_Cancel_Handler_control *handler; Chain_Control *handler_stack; POSIX_API_Control *thread_support; ISR_Level level; thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; 400065a4: e2 06 21 70 ld [ %i0 + 0x170 ], %l1 handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; 400065a8: 82 10 20 01 mov 1, %g1 while ( !_Chain_Is_empty( handler_stack ) ) { 400065ac: c4 04 60 d8 ld [ %l1 + 0xd8 ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400065b0: b2 04 60 dc add %l1, 0xdc, %i1 400065b4: 80 a0 80 19 cmp %g2, %i1 400065b8: 02 80 00 17 be 40006614 <_POSIX_Threads_cancel_run+0x74> 400065bc: c2 24 60 cc st %g1, [ %l1 + 0xcc ] 400065c0: 03 10 00 63 sethi %hi(0x40018c00), %g1 <== NOT EXECUTED 400065c4: a4 10 63 1c or %g1, 0x31c, %l2 ! 40018f1c <_Workspace_Area> <== NOT EXECUTED _ISR_Disable( level ); 400065c8: 7f ff ee c6 call 400020e0 <== NOT EXECUTED 400065cc: 01 00 00 00 nop <== NOT EXECUTED handler = (POSIX_Cancel_Handler_control *) 400065d0: e0 06 60 04 ld [ %i1 + 4 ], %l0 <== NOT EXECUTED ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 400065d4: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED previous = the_node->previous; 400065d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 400065dc: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 400065e0: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED _Chain_Tail( handler_stack )->previous; _Chain_Extract_unprotected( &handler->Node ); _ISR_Enable( level ); 400065e4: 7f ff ee c3 call 400020f0 <== NOT EXECUTED 400065e8: 01 00 00 00 nop <== NOT EXECUTED (*handler->routine)( handler->arg ); 400065ec: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 400065f0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400065f4: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 400065f8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400065fc: 40 00 0a e8 call 4000919c <_Heap_Free> <== NOT EXECUTED 40006600: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED handler_stack = &thread_support->Cancellation_Handlers; thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE; while ( !_Chain_Is_empty( handler_stack ) ) { 40006604: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED 40006608: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000660c: 12 bf ff ef bne 400065c8 <_POSIX_Threads_cancel_run+0x28> <== NOT EXECUTED 40006610: 01 00 00 00 nop <== NOT EXECUTED } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; _Thread_Close( 40006614: c6 06 20 08 ld [ %i0 + 8 ], %g3 40006618: 03 10 00 63 sethi %hi(0x40018c00), %g1 4000661c: 85 30 e0 16 srl %g3, 0x16, %g2 40006620: 82 10 62 30 or %g1, 0x230, %g1 40006624: 84 08 a0 1c and %g2, 0x1c, %g2 40006628: c8 00 40 02 ld [ %g1 + %g2 ], %g4 4000662c: 87 30 e0 1b srl %g3, 0x1b, %g3 40006630: 87 28 e0 02 sll %g3, 2, %g3 40006634: d0 01 00 03 ld [ %g4 + %g3 ], %o0 40006638: 92 10 00 18 mov %i0, %o1 _Workspace_Free( handler ); } /* Now we can delete the thread */ the_thread->Wait.return_argument = PTHREAD_CANCELED; 4000663c: 82 10 3f ff mov -1, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 40006640: b2 10 00 18 mov %i0, %i1 40006644: c2 26 20 28 st %g1, [ %i0 + 0x28 ] _Thread_Close( 40006648: 40 00 11 c1 call 4000ad4c <_Thread_Close> 4000664c: 31 10 00 64 sethi %hi(0x40019000), %i0 40006650: 40 00 0d 0e call 40009a88 <_Objects_Free> 40006654: 91 ee 21 b8 restore %i0, 0x1b8, %o0 40006658: 01 00 00 00 nop 4000c818 <_POSIX_Timer_TSR>: * Description: This is the operation that is ran when a timer expires * ***************************************************************************/ void _POSIX_Timer_TSR(Objects_Id timer, void *data) { 4000c818: 9d e3 bf 98 save %sp, -104, %sp boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000c81c: c2 06 60 68 ld [ %i1 + 0x68 ], %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000c820: c4 06 60 54 ld [ %i1 + 0x54 ], %g2 boolean activated; ptimer = (POSIX_Timer_Control *)data; /* Increment the number of expirations. */ ptimer->overrun = ptimer->overrun + 1; 4000c824: 82 00 60 01 inc %g1 /* The timer must be reprogrammed */ if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) || 4000c828: 80 a0 a0 00 cmp %g2, 0 4000c82c: 12 80 00 0e bne 4000c864 <_POSIX_Timer_TSR+0x4c> 4000c830: c2 26 60 68 st %g1, [ %i1 + 0x68 ] 4000c834: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED 4000c838: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c83c: 32 80 00 0b bne,a 4000c868 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED 4000c840: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 <== NOT EXECUTED /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; } else { /* Indicates that the timer is stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000c844: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 4000c848: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] <== NOT EXECUTED /* * The sending of the signal to the process running the handling function * specified for that signal is simulated */ if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) { 4000c84c: d0 06 60 38 ld [ %i1 + 0x38 ], %o0 4000c850: 40 00 22 7b call 4001523c 4000c854: d2 06 60 44 ld [ %i1 + 0x44 ], %o1 } /* After the signal handler returns, the count of expirations of the * timer must be set to 0. */ ptimer->overrun = 0; 4000c858: c0 26 60 68 clr [ %i1 + 0x68 ] 4000c85c: 81 c7 e0 08 ret 4000c860: 81 e8 00 00 restore ( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) { #if 0 status = rtems_timer_fire_after( ptimer->timer_id, ptimer->ticks, _POSIX_Timer_TSR, ptimer ); #endif activated = _Watchdog_Insert_ticks_helper( 4000c864: d2 06 60 64 ld [ %i1 + 0x64 ], %o1 4000c868: d4 06 60 08 ld [ %i1 + 8 ], %o2 4000c86c: 90 06 60 10 add %i1, 0x10, %o0 4000c870: 17 10 00 32 sethi %hi(0x4000c800), %o3 4000c874: 98 10 00 19 mov %i1, %o4 4000c878: 7f ff ff cd call 4000c7ac <_Watchdog_Insert_ticks_helper> 4000c87c: 96 12 e0 18 or %o3, 0x18, %o3 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) 4000c880: 80 a2 20 00 cmp %o0, 0 4000c884: 02 bf ff f6 be 4000c85c <_POSIX_Timer_TSR+0x44> 4000c888: 01 00 00 00 nop return; /* Store the time when the timer was started again */ _TOD_Get( &ptimer->time ); 4000c88c: 40 00 0a 9b call 4000f2f8 <_TOD_Get> 4000c890: 90 06 60 6c add %i1, 0x6c, %o0 /* The state really did not change but just to be safe */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000c894: 82 10 20 03 mov 3, %g1 4000c898: 10 bf ff ed b 4000c84c <_POSIX_Timer_TSR+0x34> 4000c89c: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ] 4000dbf4 <_POSIX_signals_Abnormal_termination_handler>: /*** PROCESS WIDE STUFF ****/ sigset_t _POSIX_signals_Pending; void _POSIX_signals_Abnormal_termination_handler( int signo ) { 4000dbf4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED exit( 1 ); 4000dbf8: 40 00 08 e1 call 4000ff7c <== NOT EXECUTED 4000dbfc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000dc00: 01 00 00 00 nop 4000f5f0 <_POSIX_signals_Check_signal>: boolean _POSIX_signals_Check_signal( POSIX_API_Control *api, int signo, boolean is_global ) { 4000f5f0: 9d e3 bf 88 save %sp, -120, %sp siginfo_t siginfo_struct; sigset_t saved_signals_blocked; if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 4000f5f4: 98 10 20 01 mov 1, %o4 4000f5f8: 96 10 00 1a mov %i2, %o3 4000f5fc: a6 07 bf ec add %fp, -20, %l3 4000f600: 90 10 00 18 mov %i0, %o0 4000f604: 92 10 00 19 mov %i1, %o1 4000f608: 40 00 00 2f call 4000f6c4 <_POSIX_signals_Clear_signals> 4000f60c: 94 10 00 13 mov %l3, %o2 4000f610: 80 a2 20 00 cmp %o0, 0 4000f614: 02 80 00 23 be 4000f6a0 <_POSIX_signals_Check_signal+0xb0> 4000f618: 03 10 00 71 sethi %hi(0x4001c400), %g1 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000f61c: a4 10 60 74 or %g1, 0x74, %l2 ! 4001c474 <_POSIX_signals_Vectors> 4000f620: 83 2e 60 04 sll %i1, 4, %g1 4000f624: 85 2e 60 02 sll %i1, 2, %g2 4000f628: a0 20 40 02 sub %g1, %g2, %l0 4000f62c: b4 04 00 12 add %l0, %l2, %i2 4000f630: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f634: 80 a0 60 00 cmp %g1, 0 4000f638: 02 80 00 1c be 4000f6a8 <_POSIX_signals_Check_signal+0xb8> 4000f63c: 11 10 00 68 sethi %hi(0x4001a000), %o0 /* * Just to prevent sending a signal which is currently being ignored. */ if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN ) 4000f640: 80 a0 60 01 cmp %g1, 1 4000f644: 02 80 00 17 be 4000f6a0 <_POSIX_signals_Check_signal+0xb0> 4000f648: 01 00 00 00 nop /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; 4000f64c: e2 06 20 c4 ld [ %i0 + 0xc4 ], %l1 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000f650: c2 06 a0 04 ld [ %i2 + 4 ], %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000f654: c4 04 80 10 ld [ %l2 + %l0 ], %g2 /* * Block the signals requested in sa_mask */ saved_signals_blocked = api->signals_blocked; api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 4000f658: 82 10 40 11 or %g1, %l1, %g1 /* Here, the signal handler function executes */ switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { 4000f65c: 80 a0 a0 02 cmp %g2, 2 4000f660: 02 80 00 08 be 4000f680 <_POSIX_signals_Check_signal+0x90> 4000f664: c2 26 20 c4 st %g1, [ %i0 + 0xc4 ] &siginfo_struct, NULL /* context is undefined per 1003.1b-1993, p. 66 */ ); break; default: (*_POSIX_signals_Vectors[ signo ].sa_handler)( signo ); 4000f668: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f66c: 9f c0 40 00 call %g1 4000f670: 90 10 00 19 mov %i1, %o0 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000f674: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000f678: 81 c7 e0 08 ret 4000f67c: 91 e8 20 01 restore %g0, 1, %o0 case SA_SIGINFO: /* * * assert( is_global ); */ (*_POSIX_signals_Vectors[ signo ].sa_sigaction)( 4000f680: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000f684: 90 10 00 19 mov %i1, %o0 4000f688: 92 10 00 13 mov %l3, %o1 4000f68c: 9f c0 40 00 call %g1 4000f690: 94 10 20 00 clr %o2 /* * Restore the previous set of blocked signals */ api->signals_blocked = saved_signals_blocked; 4000f694: e2 26 20 c4 st %l1, [ %i0 + 0xc4 ] 4000f698: 81 c7 e0 08 ret 4000f69c: 91 e8 20 01 restore %g0, 1, %o0 return TRUE; } 4000f6a0: 81 c7 e0 08 ret 4000f6a4: 91 e8 20 00 restore %g0, 0, %o0 /* * Since we made a union of these, only one test is necessary but this is * safer. */ assert( _POSIX_signals_Vectors[ signo ].sa_handler || 4000f6a8: 92 10 20 33 mov 0x33, %o1 <== NOT EXECUTED 4000f6ac: 90 12 22 20 or %o0, 0x220, %o0 <== NOT EXECUTED 4000f6b0: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000f6b4: 7f ff ce 88 call 400030d4 <__assert> <== NOT EXECUTED 4000f6b8: 94 12 a2 70 or %o2, 0x270, %o2 ! 4001a270 <_POSIX_Threads_Default_attributes+0x178> <== NOT EXECUTED 4000f6bc: 10 bf ff e1 b 4000f640 <_POSIX_signals_Check_signal+0x50> <== NOT EXECUTED 4000f6c0: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000f6c4 <_POSIX_signals_Clear_signals>: int signo, siginfo_t *info, boolean is_global, boolean check_blocked ) { 4000f6c4: 9d e3 bf 98 save %sp, -104, %sp sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000f6c8: 82 10 20 01 mov 1, %g1 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4000f6cc: 80 a7 20 00 cmp %i4, 0 sigset_t signals_blocked; ISR_Level level; boolean do_callout; POSIX_signals_Siginfo_node *psiginfo; mask = signo_to_mask( signo ); 4000f6d0: 84 06 7f ff add %i1, -1, %g2 /* set blocked signals based on if checking for them, SIGNAL_ALL_MASK * insures that no signals are blocked and all are checked. */ if ( check_blocked ) 4000f6d4: b8 10 3f ff mov -1, %i4 4000f6d8: 02 80 00 04 be 4000f6e8 <_POSIX_signals_Clear_signals+0x24> 4000f6dc: a1 28 40 02 sll %g1, %g2, %l0 signals_blocked = ~api->signals_blocked; 4000f6e0: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1 4000f6e4: b8 38 00 01 xnor %g0, %g1, %i4 signals_blocked = SIGNAL_ALL_MASK; /* XXX this is not right for siginfo type signals yet */ /* XXX since they can't be cleared the same way */ _ISR_Disable( level ); 4000f6e8: 7f ff ca 40 call 40001fe8 4000f6ec: 01 00 00 00 nop 4000f6f0: a2 10 00 08 mov %o0, %l1 if ( is_global ) { 4000f6f4: 80 a6 e0 00 cmp %i3, 0 4000f6f8: 22 80 00 16 be,a 4000f750 <_POSIX_signals_Clear_signals+0x8c> 4000f6fc: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { 4000f700: 05 10 00 71 sethi %hi(0x4001c400), %g2 4000f704: c2 00 a2 40 ld [ %g2 + 0x240 ], %g1 ! 4001c640 <_POSIX_signals_Pending> 4000f708: 82 0c 00 01 and %l0, %g1, %g1 4000f70c: 80 88 40 1c btst %g1, %i4 4000f710: 02 80 00 1a be 4000f778 <_POSIX_signals_Clear_signals+0xb4> 4000f714: 85 2e 60 02 sll %i1, 2, %g2 if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { 4000f718: 87 2e 60 04 sll %i1, 4, %g3 4000f71c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f720: 86 20 c0 02 sub %g3, %g2, %g3 4000f724: 82 10 60 74 or %g1, 0x74, %g1 4000f728: c4 00 40 03 ld [ %g1 + %g3 ], %g2 4000f72c: 80 a0 a0 02 cmp %g2, 2 4000f730: 02 80 00 17 be 4000f78c <_POSIX_signals_Clear_signals+0xc8> 4000f734: 90 10 00 10 mov %l0, %o0 &psiginfo->Node ); } else do_callout = FALSE; } else _POSIX_signals_Clear_process_signals( mask ); 4000f738: 40 00 01 f6 call 4000ff10 <_POSIX_signals_Clear_process_signals> 4000f73c: b0 10 20 01 mov 1, %i0 if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000f740: 7f ff ca 2e call 40001ff8 4000f744: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f748: 81 c7 e0 08 ret 4000f74c: 81 e8 00 00 restore } else _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { 4000f750: 82 0c 00 08 and %l0, %o0, %g1 4000f754: 80 88 40 1c btst %g1, %i4 4000f758: 02 80 00 08 be 4000f778 <_POSIX_signals_Clear_signals+0xb4> 4000f75c: 82 2a 00 10 andn %o0, %l0, %g1 api->signals_pending &= ~mask; 4000f760: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ] 4000f764: b0 10 20 01 mov 1, %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000f768: 7f ff ca 24 call 40001ff8 4000f76c: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f770: 81 c7 e0 08 ret 4000f774: 81 e8 00 00 restore _POSIX_signals_Clear_process_signals( mask ); do_callout = TRUE; } } else { if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; 4000f778: b0 10 20 00 clr %i0 do_callout = TRUE; } } _ISR_Enable( level ); 4000f77c: 7f ff ca 1f call 40001ff8 4000f780: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f784: 81 c7 e0 08 ret 4000f788: 81 e8 00 00 restore _ISR_Disable( level ); if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4000f78c: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f790: 82 10 62 44 or %g1, 0x244, %g1 ! 4001c644 <_POSIX_signals_Siginfo> */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000f794: f8 00 c0 01 ld [ %g3 + %g1 ], %i4 4000f798: 88 00 c0 01 add %g3, %g1, %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f79c: 9a 01 20 04 add %g4, 4, %o5 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 4000f7a0: 80 a7 00 0d cmp %i4, %o5 4000f7a4: 32 80 00 1b bne,a 4000f810 <_POSIX_signals_Clear_signals+0x14c> 4000f7a8: c4 07 00 00 ld [ %i4 ], %g2 4000f7ac: b8 10 20 00 clr %i4 <== NOT EXECUTED 4000f7b0: b6 10 20 00 clr %i3 <== NOT EXECUTED _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) _POSIX_signals_Clear_process_signals( mask ); 4000f7b4: 40 00 01 d7 call 4000ff10 <_POSIX_signals_Clear_process_signals> 4000f7b8: 90 10 00 10 mov %l0, %o0 if ( psiginfo ) { 4000f7bc: 80 a7 20 00 cmp %i4, 0 4000f7c0: 02 bf ff ea be 4000f768 <_POSIX_signals_Clear_signals+0xa4> 4000f7c4: b0 10 20 01 mov 1, %i0 *info = psiginfo->Info; 4000f7c8: c2 06 e0 08 ld [ %i3 + 8 ], %g1 4000f7cc: c2 26 80 00 st %g1, [ %i2 ] 4000f7d0: c4 06 e0 0c ld [ %i3 + 0xc ], %g2 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000f7d4: 03 10 00 71 sethi %hi(0x4001c400), %g1 4000f7d8: c4 26 a0 04 st %g2, [ %i2 + 4 ] 4000f7dc: 82 10 61 f8 or %g1, 0x1f8, %g1 4000f7e0: c6 06 e0 10 ld [ %i3 + 0x10 ], %g3 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000f7e4: c2 26 c0 00 st %g1, [ %i3 ] old_last_node = the_chain->last; 4000f7e8: 82 00 7f fc add %g1, -4, %g1 4000f7ec: c4 00 60 08 ld [ %g1 + 8 ], %g2 the_chain->last = the_node; 4000f7f0: f6 20 60 08 st %i3, [ %g1 + 8 ] 4000f7f4: c6 26 a0 08 st %g3, [ %i2 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000f7f8: c4 26 e0 04 st %g2, [ %i3 + 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; 4000f7fc: f6 20 80 00 st %i3, [ %g2 ] if ( mask & (api->signals_pending & signals_blocked) ) { api->signals_pending &= ~mask; do_callout = TRUE; } } _ISR_Enable( level ); 4000f800: 7f ff c9 fe call 40001ff8 4000f804: 90 10 00 11 mov %l1, %o0 return do_callout; } 4000f808: 81 c7 e0 08 ret 4000f80c: 81 e8 00 00 restore Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; the_chain->first = new_first; 4000f810: c4 20 c0 01 st %g2, [ %g3 + %g1 ] new_first->previous = _Chain_Head(the_chain); 4000f814: c8 20 a0 04 st %g4, [ %g2 + 4 ] if ( is_global ) { if ( mask & (_POSIX_signals_Pending & signals_blocked) ) { if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] ); if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) ) 4000f818: c2 00 c0 01 ld [ %g3 + %g1 ], %g1 4000f81c: 80 a3 40 01 cmp %o5, %g1 4000f820: 12 bf ff e7 bne 4000f7bc <_POSIX_signals_Clear_signals+0xf8> 4000f824: b6 10 00 1c mov %i4, %i3 4000f828: 30 bf ff e3 b,a 4000f7b4 <_POSIX_signals_Clear_signals+0xf0> 40007a30 <_POSIX_signals_Get_highest>: #include int _POSIX_signals_Get_highest( sigset_t set ) { 40007a30: 86 10 00 08 mov %o0, %g3 40007a34: 90 10 20 1b mov 0x1b, %o0 int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( set & signo_to_mask( signo ) ) 40007a38: 84 02 3f ff add %o0, -1, %g2 40007a3c: 82 10 20 01 mov 1, %g1 40007a40: 83 28 40 02 sll %g1, %g2, %g1 40007a44: 80 88 40 03 btst %g1, %g3 40007a48: 12 80 00 11 bne 40007a8c <_POSIX_signals_Get_highest+0x5c> 40007a4c: 01 00 00 00 nop sigset_t set ) { int signo; for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 40007a50: 90 02 20 01 inc %o0 40007a54: 80 a2 20 20 cmp %o0, 0x20 40007a58: 12 bf ff f9 bne 40007a3c <_POSIX_signals_Get_highest+0xc> 40007a5c: 84 02 3f ff add %o0, -1, %g2 40007a60: 10 80 00 05 b 40007a74 <_POSIX_signals_Get_highest+0x44> 40007a64: 90 10 20 01 mov 1, %o0 return signo; } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 40007a68: 80 a2 20 1b cmp %o0, 0x1b 40007a6c: 02 80 00 0a be 40007a94 <_POSIX_signals_Get_highest+0x64> 40007a70: 01 00 00 00 nop if ( set & signo_to_mask( signo ) ) 40007a74: 84 02 3f ff add %o0, -1, %g2 40007a78: 82 10 20 01 mov 1, %g1 40007a7c: 83 28 40 02 sll %g1, %g2, %g1 40007a80: 80 88 40 03 btst %g1, %g3 40007a84: 22 bf ff f9 be,a 40007a68 <_POSIX_signals_Get_highest+0x38> 40007a88: 90 02 20 01 inc %o0 return signo; } return 0; } 40007a8c: 81 c3 e0 08 retl 40007a90: 01 00 00 00 nop 40007a94: 81 c3 e0 08 retl <== NOT EXECUTED 40007a98: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED 4000db20 <_POSIX_signals_Post_switch_extension>: */ void _POSIX_signals_Post_switch_extension( Thread_Control *the_thread ) { 4000db20: 9d e3 bf 98 save %sp, -104, %sp POSIX_API_Control *api; int signo; ISR_Level level; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000db24: e0 06 21 70 ld [ %i0 + 0x170 ], %l0 4000db28: 23 10 00 71 sethi %hi(0x4001c400), %l1 * The first thing done is to check there are any signals to be * processed at all. No point in doing this loop otherwise. */ restart: _ISR_Disable( level ); 4000db2c: 7f ff d1 2f call 40001fe8 4000db30: 01 00 00 00 nop 4000db34: b0 10 00 08 mov %o0, %i0 if ( !(~api->signals_blocked & 4000db38: c2 04 62 40 ld [ %l1 + 0x240 ], %g1 4000db3c: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 4000db40: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 4000db44: 82 10 40 02 or %g1, %g2, %g1 4000db48: 80 a8 40 03 andncc %g1, %g3, %g0 4000db4c: 02 80 00 27 be 4000dbe8 <_POSIX_signals_Post_switch_extension+0xc8> 4000db50: 01 00 00 00 nop (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); return; } _ISR_Enable( level ); 4000db54: 7f ff d1 29 call 40001ff8 4000db58: b0 10 20 1b mov 0x1b, %i0 ! 1b for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000db5c: 92 10 00 18 mov %i0, %o1 4000db60: 94 10 20 00 clr %o2 4000db64: 40 00 06 a3 call 4000f5f0 <_POSIX_signals_Check_signal> 4000db68: 90 10 00 10 mov %l0, %o0 4000db6c: 80 a2 20 00 cmp %o0, 0 4000db70: 12 bf ff ef bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000db74: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000db78: 90 10 00 10 mov %l0, %o0 4000db7c: 94 10 20 01 mov 1, %o2 4000db80: 40 00 06 9c call 4000f5f0 <_POSIX_signals_Check_signal> 4000db84: b0 06 20 01 inc %i0 4000db88: 80 a2 20 00 cmp %o0, 0 4000db8c: 12 bf ff e8 bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000db90: 80 a6 20 20 cmp %i0, 0x20 _ISR_Enable( level ); return; } _ISR_Enable( level ); for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) { 4000db94: 12 bf ff f3 bne 4000db60 <_POSIX_signals_Post_switch_extension+0x40> 4000db98: 92 10 00 18 mov %i0, %o1 4000db9c: b0 10 20 01 mov 1, %i0 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { if ( _POSIX_signals_Check_signal( api, signo, FALSE ) ) 4000dba0: 92 10 00 18 mov %i0, %o1 4000dba4: 94 10 20 00 clr %o2 4000dba8: 40 00 06 92 call 4000f5f0 <_POSIX_signals_Check_signal> 4000dbac: 90 10 00 10 mov %l0, %o0 4000dbb0: 80 a2 20 00 cmp %o0, 0 4000dbb4: 12 bf ff de bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000dbb8: 92 10 00 18 mov %i0, %o1 goto restart; if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) 4000dbbc: 90 10 00 10 mov %l0, %o0 4000dbc0: 94 10 20 01 mov 1, %o2 4000dbc4: 40 00 06 8b call 4000f5f0 <_POSIX_signals_Check_signal> 4000dbc8: b0 06 20 01 inc %i0 4000dbcc: 80 a2 20 00 cmp %o0, 0 4000dbd0: 12 bf ff d7 bne 4000db2c <_POSIX_signals_Post_switch_extension+0xc> 4000dbd4: 80 a6 20 1b cmp %i0, 0x1b } /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */ for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) { 4000dbd8: 12 bf ff f3 bne 4000dba4 <_POSIX_signals_Post_switch_extension+0x84> 4000dbdc: 92 10 00 18 mov %i0, %o1 if ( _POSIX_signals_Check_signal( api, signo, TRUE ) ) goto restart; } } 4000dbe0: 81 c7 e0 08 ret <== NOT EXECUTED 4000dbe4: 81 e8 00 00 restore <== NOT EXECUTED restart: _ISR_Disable( level ); if ( !(~api->signals_blocked & (api->signals_pending | _POSIX_signals_Pending)) ) { _ISR_Enable( level ); 4000dbe8: 7f ff d1 04 call 40001ff8 4000dbec: 81 e8 00 00 restore 4000dbf0: 01 00 00 00 nop 40027400 <_POSIX_signals_Unblock_thread>: boolean _POSIX_signals_Unblock_thread( Thread_Control *the_thread, int signo, siginfo_t *info ) { 40027400: 9d e3 bf 98 save %sp, -104, %sp /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027404: c8 06 20 10 ld [ %i0 + 0x10 ], %g4 40027408: 07 04 00 20 sethi %hi(0x10008000), %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 4002740c: 84 06 7f ff add %i1, -1, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027410: 82 09 00 03 and %g4, %g3, %g1 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 40027414: 9a 10 20 01 mov 1, %o5 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027418: 80 a0 40 03 cmp %g1, %g3 sigset_t mask; siginfo_t *the_info = NULL; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; mask = signo_to_mask( signo ); 4002741c: 85 2b 40 02 sll %o5, %g2, %g2 /* * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { 40027420: 02 80 00 1d be 40027494 <_POSIX_signals_Unblock_thread+0x94> 40027424: c6 06 21 70 ld [ %i0 + 0x170 ], %g3 */ return FALSE; } if ( ~api->signals_blocked & mask ) { 40027428: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 4002742c: 80 a8 80 01 andncc %g2, %g1, %g0 40027430: 02 80 00 21 be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027434: 03 04 00 00 sethi %hi(0x10000000), %g1 the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40027438: 80 89 00 01 btst %g4, %g1 4002743c: 02 80 00 1e be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027440: da 26 20 78 st %o5, [ %i0 + 0x78 ] the_thread->Wait.return_code = EINTR; 40027444: 84 10 20 04 mov 4, %g2 if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) 40027448: 03 00 00 ef sethi %hi(0x3bc00), %g1 4002744c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 40027450: 80 89 00 01 btst %g4, %g1 40027454: 12 80 00 29 bne 400274f8 <_POSIX_signals_Unblock_thread+0xf8> 40027458: c4 26 20 34 st %g2, [ %i0 + 0x34 ] _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ 4002745c: 80 89 20 08 btst 8, %g4 40027460: 02 80 00 15 be 400274b4 <_POSIX_signals_Unblock_thread+0xb4> 40027464: 01 00 00 00 nop if ( _Watchdog_Is_active( &the_thread->Timer ) ) 40027468: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4002746c: 80 a0 60 02 cmp %g1, 2 40027470: 02 80 00 2b be 4002751c <_POSIX_signals_Unblock_thread+0x11c> 40027474: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 40027478: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4002747c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 40027480: b0 10 20 00 clr %i0 40027484: 7f ff a7 a5 call 40011318 <_Thread_Clear_state> 40027488: 92 12 63 f8 or %o1, 0x3f8, %o1 4002748c: 81 c7 e0 08 ret 40027490: 81 e8 00 00 restore * Is the thread is specifically waiting for a signal? */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { 40027494: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40027498: 80 88 80 01 btst %g2, %g1 4002749c: 12 80 00 08 bne 400274bc <_POSIX_signals_Unblock_thread+0xbc> 400274a0: 82 10 20 04 mov 4, %g1 400274a4: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 400274a8: 80 a8 80 01 andncc %g2, %g1, %g0 400274ac: 12 80 00 04 bne 400274bc <_POSIX_signals_Unblock_thread+0xbc> 400274b0: 82 10 20 04 mov 4, %g1 } } } return FALSE; } 400274b4: 81 c7 e0 08 ret 400274b8: 91 e8 20 00 restore %g0, 0, %o0 */ if ( _States_Is_interruptible_signal( the_thread->current_state ) ) { if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) { the_thread->Wait.return_code = EINTR; 400274bc: c2 26 20 34 st %g1, [ %i0 + 0x34 ] the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { 400274c0: 80 a6 a0 00 cmp %i2, 0 400274c4: 02 80 00 12 be 4002750c <_POSIX_signals_Unblock_thread+0x10c> 400274c8: c6 06 20 28 ld [ %i0 + 0x28 ], %g3 the_info->si_signo = signo; the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; } else { *the_info = *info; 400274cc: c2 06 80 00 ld [ %i2 ], %g1 400274d0: c2 20 c0 00 st %g1, [ %g3 ] 400274d4: c4 06 a0 04 ld [ %i2 + 4 ], %g2 400274d8: c4 20 e0 04 st %g2, [ %g3 + 4 ] 400274dc: c2 06 a0 08 ld [ %i2 + 8 ], %g1 400274e0: c2 20 e0 08 st %g1, [ %g3 + 8 ] } _Thread_queue_Extract_with_proxy( the_thread ); 400274e4: 90 10 00 18 mov %i0, %o0 400274e8: 7f ff aa a7 call 40011f84 <_Thread_queue_Extract_with_proxy> 400274ec: b0 10 20 01 mov 1, %i0 400274f0: 81 c7 e0 08 ret 400274f4: 81 e8 00 00 restore the_thread->do_post_task_switch_extension = TRUE; if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); 400274f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400274fc: 7f ff aa a2 call 40011f84 <_Thread_queue_Extract_with_proxy> <== NOT EXECUTED 40027500: b0 10 20 00 clr %i0 <== NOT EXECUTED 40027504: 81 c7 e0 08 ret <== NOT EXECUTED 40027508: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Wait.return_code = EINTR; the_info = (siginfo_t *) the_thread->Wait.return_argument; if ( !info ) { the_info->si_signo = signo; 4002750c: f2 20 c0 00 st %i1, [ %g3 ] the_info->si_code = SI_USER; 40027510: da 20 e0 04 st %o5, [ %g3 + 4 ] the_info->si_value.sival_int = 0; 40027514: 10 bf ff f4 b 400274e4 <_POSIX_signals_Unblock_thread+0xe4> 40027518: c0 20 e0 08 clr [ %g3 + 8 ] the_thread->Wait.return_code = EINTR; if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) _Thread_queue_Extract_with_proxy( the_thread ); else if ( _States_Is_delaying(the_thread->current_state)){ if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4002751c: 7f ff ad f9 call 40012d00 <_Watchdog_Remove> 40027520: 90 06 20 48 add %i0, 0x48, %o0 40027524: 10 bf ff d6 b 4002747c <_POSIX_signals_Unblock_thread+0x7c> 40027528: 90 10 00 18 mov %i0, %o0 400092d4 <_Protected_heap_Allocate>: void *_Protected_heap_Allocate( Heap_Control *the_heap, size_t size ) { 400092d4: 9d e3 bf 98 save %sp, -104, %sp void *p; _RTEMS_Lock_allocator(); 400092d8: 7f ff e3 44 call 40001fe8 400092dc: 01 00 00 00 nop 400092e0: a4 10 00 08 mov %o0, %l2 400092e4: 23 10 00 6f sethi %hi(0x4001bc00), %l1 400092e8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400092ec: 80 a0 60 00 cmp %g1, 0 400092f0: 02 80 00 0b be 4000931c <_Protected_heap_Allocate+0x48> 400092f4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 400092f8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400092fc: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 40009300: 80 a0 a0 01 cmp %g2, 1 40009304: 08 80 00 06 bleu 4000931c <_Protected_heap_Allocate+0x48> 40009308: 90 10 20 00 clr %o0 4000930c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009310: 7f ff fd 7c call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009314: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009318: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000931c: 09 10 00 6f sethi %hi(0x4001bc00), %g4 40009320: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 40009324: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009328: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000932c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40009330: 80 a0 60 00 cmp %g1, 0 40009334: 22 80 00 27 be,a 400093d0 <_Protected_heap_Allocate+0xfc> 40009338: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000933c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009340: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009344: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009348: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000934c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009350: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009354: 80 a0 e0 02 cmp %g3, 2 40009358: 12 80 00 2d bne 4000940c <_Protected_heap_Allocate+0x138> 4000935c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009360: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009364: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009368: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000936c: 02 80 00 46 be 40009484 <_Protected_heap_Allocate+0x1b0> 40009370: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40009374: 7f ff e3 21 call 40001ff8 40009378: 90 10 00 12 mov %l2, %o0 p = _Heap_Allocate( the_heap, size ); 4000937c: 90 10 00 18 mov %i0, %o0 40009380: 7f ff fc 2e call 40008438 <_Heap_Allocate> 40009384: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009388: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 4000938c: b0 10 00 08 mov %o0, %i0 40009390: 82 00 60 01 inc %g1 40009394: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] _RTEMS_Unlock_allocator(); 40009398: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 4000939c: 94 10 20 00 clr %o2 400093a0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400093a4: 7f ff fb 54 call 400080f4 <_CORE_mutex_Surrender> 400093a8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400093ac: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 400093b0: 82 00 7f ff add %g1, -1, %g1 400093b4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 400093b8: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 400093bc: 80 a0 a0 00 cmp %g2, 0 400093c0: 02 80 00 2d be 40009474 <_Protected_heap_Allocate+0x1a0> 400093c4: 01 00 00 00 nop return p; } 400093c8: 81 c7 e0 08 ret 400093cc: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400093d0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400093d4: 12 80 00 16 bne 4000942c <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 400093d8: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400093dc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400093e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400093e4: 22 80 00 43 be,a 400094f0 <_Protected_heap_Allocate+0x21c> <== NOT EXECUTED 400093e8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400093ec: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400093f0: 12 80 00 0f bne 4000942c <_Protected_heap_Allocate+0x158> <== NOT EXECUTED 400093f4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400093f8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400093fc: 7f ff e2 ff call 40001ff8 <== NOT EXECUTED 40009400: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { void *p; _RTEMS_Lock_allocator(); p = _Heap_Allocate( the_heap, size ); 40009404: 10 bf ff df b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009408: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000940c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009410: 12 bf ff d9 bne 40009374 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED 40009414: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009418: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000941c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009420: 02 80 00 19 be 40009484 <_Protected_heap_Allocate+0x1b0> <== NOT EXECUTED 40009424: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009428: 30 bf ff d3 b,a 40009374 <_Protected_heap_Allocate+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000942c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED size_t size ) { void *p; _RTEMS_Lock_allocator(); 40009430: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009434: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009438: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000943c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009440: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009444: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40009448: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000944c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009450: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009454: 7f ff e2 e9 call 40001ff8 <== NOT EXECUTED 40009458: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000945c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009460: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009464: 7f ff fb 00 call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009468: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED p = _Heap_Allocate( the_heap, size ); 4000946c: 10 bf ff c5 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009470: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009474: 40 00 03 c9 call 4000a398 <_Thread_Dispatch> 40009478: 01 00 00 00 nop 4000947c: 81 c7 e0 08 ret 40009480: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009484: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009488: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000948c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009490: 02 80 00 28 be 40009530 <_Protected_heap_Allocate+0x25c> <== NOT EXECUTED 40009494: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009498: 1a 80 00 1c bcc 40009508 <_Protected_heap_Allocate+0x234> <== NOT EXECUTED 4000949c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400094a0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400094a4: 82 00 60 01 inc %g1 <== NOT EXECUTED 400094a8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400094ac: 7f ff e2 d3 call 40001ff8 <== NOT EXECUTED 400094b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 400094b4: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400094b8: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400094bc: 40 00 02 93 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400094c0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400094c4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400094c8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400094cc: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400094d0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400094d4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400094d8: 32 bf ff aa bne,a 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400094dc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400094e0: 40 00 03 ae call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400094e4: 01 00 00 00 nop <== NOT EXECUTED 400094e8: 10 bf ff a6 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 400094ec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400094f0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400094f4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400094f8: 7f ff e2 c0 call 40001ff8 <== NOT EXECUTED 400094fc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009500: 10 bf ff a0 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 40009504: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009508: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000950c: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009510: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009514: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009518: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000951c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009520: 7f ff e2 b6 call 40001ff8 <== NOT EXECUTED 40009524: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009528: 10 bf ff 96 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 4000952c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009530: 7f ff e2 b2 call 40001ff8 <== NOT EXECUTED 40009534: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009538: 10 bf ff 92 b 40009380 <_Protected_heap_Allocate+0xac> <== NOT EXECUTED 4000953c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009540 <_Protected_heap_Extend>: boolean _Protected_heap_Extend( Heap_Control *the_heap, void *starting_address, size_t size ) { 40009540: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 40009544: 7f ff e2 a9 call 40001fe8 <== NOT EXECUTED 40009548: 01 00 00 00 nop <== NOT EXECUTED 4000954c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009550: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009554: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009558: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000955c: 02 80 00 0b be 40009588 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 40009560: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009564: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009568: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 4000956c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009570: 08 80 00 06 bleu 40009588 <_Protected_heap_Extend+0x48> <== NOT EXECUTED 40009574: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009578: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000957c: 7f ff fc e1 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009580: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009584: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009588: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 4000958c: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009590: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009594: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009598: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000959c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400095a0: 22 80 00 2d be,a 40009654 <_Protected_heap_Extend+0x114> <== NOT EXECUTED 400095a4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400095a8: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400095ac: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400095b0: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400095b4: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400095b8: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 400095bc: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400095c0: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 400095c4: 12 80 00 33 bne 40009690 <_Protected_heap_Extend+0x150> <== NOT EXECUTED 400095c8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400095cc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400095d0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400095d4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400095d8: 02 80 00 48 be 400096f8 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 400095dc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 400095e0: 7f ff e2 86 call 40001ff8 <== NOT EXECUTED 400095e4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 400095e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400095ec: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 400095f0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 400095f4: 40 00 14 04 call 4000e604 <_Heap_Extend> <== NOT EXECUTED 400095f8: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400095fc: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009600: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40009604: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009608: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000960c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009610: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009614: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009618: 7f ff fa b7 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000961c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009620: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009624: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009628: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 4000962c: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009630: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009634: 12 80 00 05 bne 40009648 <_Protected_heap_Extend+0x108> <== NOT EXECUTED 40009638: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 4000963c: 40 00 03 57 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009640: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_EXTEND_SUCCESSFUL); } 40009644: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40009648: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 4000964c: 81 c7 e0 08 ret <== NOT EXECUTED 40009650: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009654: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009658: 12 80 00 16 bne 400096b0 <_Protected_heap_Extend+0x170> <== NOT EXECUTED 4000965c: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009660: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009668: 22 80 00 3f be,a 40009764 <_Protected_heap_Extend+0x224> <== NOT EXECUTED 4000966c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009670: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009674: 12 80 00 0f bne 400096b0 <_Protected_heap_Extend+0x170> <== NOT EXECUTED 40009678: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000967c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009680: 7f ff e2 5e call 40001ff8 <== NOT EXECUTED 40009684: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 40009688: 10 bf ff d9 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 4000968c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009690: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009694: 12 bf ff d3 bne 400095e0 <_Protected_heap_Extend+0xa0> <== NOT EXECUTED 40009698: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000969c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400096a0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400096a4: 02 80 00 15 be 400096f8 <_Protected_heap_Extend+0x1b8> <== NOT EXECUTED 400096a8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400096ac: 30 bf ff cd b,a 400095e0 <_Protected_heap_Extend+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400096b0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED ) { Heap_Extend_status status; uint32_t amount_extended; _RTEMS_Lock_allocator(); 400096b4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 400096b8: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 400096bc: 82 00 60 01 inc %g1 <== NOT EXECUTED 400096c0: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 400096c4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400096c8: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 400096cc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400096d0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 400096d4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 400096d8: 7f ff e2 48 call 40001ff8 <== NOT EXECUTED 400096dc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400096e0: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 400096e4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400096e8: 7f ff fa 5f call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400096ec: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Extend(the_heap, starting_address, size, &amount_extended); 400096f0: 10 bf ff bf b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400096f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400096f8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 400096fc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009700: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009704: 02 80 00 28 be 400097a4 <_Protected_heap_Extend+0x264> <== NOT EXECUTED 40009708: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000970c: 1a 80 00 1c bcc 4000977c <_Protected_heap_Extend+0x23c> <== NOT EXECUTED 40009710: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40009714: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009718: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000971c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009720: 7f ff e2 36 call 40001ff8 <== NOT EXECUTED 40009724: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009728: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000972c: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009730: 40 00 01 f6 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009734: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009738: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 4000973c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009740: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009744: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009748: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000974c: 32 bf ff a8 bne,a 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009750: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009754: 40 00 03 11 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009758: 01 00 00 00 nop <== NOT EXECUTED 4000975c: 10 bf ff a4 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009760: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009764: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009768: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000976c: 7f ff e2 23 call 40001ff8 <== NOT EXECUTED 40009770: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009774: 10 bf ff 9e b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 40009778: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000977c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009780: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009784: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009788: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000978c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009790: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009794: 7f ff e2 19 call 40001ff8 <== NOT EXECUTED 40009798: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000979c: 10 bf ff 94 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400097a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 400097a4: 7f ff e2 15 call 40001ff8 <== NOT EXECUTED 400097a8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400097ac: 10 bf ff 90 b 400095ec <_Protected_heap_Extend+0xac> <== NOT EXECUTED 400097b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400097b4 <_Protected_heap_Free>: boolean _Protected_heap_Free( Heap_Control *the_heap, void *start_address ) { 400097b4: 9d e3 bf 98 save %sp, -104, %sp boolean status; _RTEMS_Lock_allocator(); 400097b8: 7f ff e2 0c call 40001fe8 400097bc: 01 00 00 00 nop 400097c0: a4 10 00 08 mov %o0, %l2 400097c4: 23 10 00 6f sethi %hi(0x4001bc00), %l1 400097c8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400097cc: 80 a0 60 00 cmp %g1, 0 400097d0: 02 80 00 0b be 400097fc <_Protected_heap_Free+0x48> 400097d4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 400097d8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 400097dc: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 400097e0: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400097e4: 08 80 00 06 bleu 400097fc <_Protected_heap_Free+0x48> <== NOT EXECUTED 400097e8: 90 10 20 00 clr %o0 <== NOT EXECUTED 400097ec: 92 10 20 00 clr %o1 <== NOT EXECUTED 400097f0: 7f ff fc 44 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 400097f4: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400097f8: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 400097fc: 09 10 00 6f sethi %hi(0x4001bc00), %g4 40009800: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 40009804: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009808: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000980c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40009810: 80 a0 60 00 cmp %g1, 0 40009814: 22 80 00 27 be,a 400098b0 <_Protected_heap_Free+0xfc> 40009818: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000981c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009820: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009824: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009828: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000982c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009830: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009834: 80 a0 e0 02 cmp %g3, 2 40009838: 12 80 00 2d bne 400098ec <_Protected_heap_Free+0x138> 4000983c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009840: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009844: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009848: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000984c: 02 80 00 46 be 40009964 <_Protected_heap_Free+0x1b0> 40009850: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 40009854: 7f ff e1 e9 call 40001ff8 40009858: 90 10 00 12 mov %l2, %o0 status = _Heap_Free( the_heap, start_address ); 4000985c: 90 10 00 18 mov %i0, %o0 40009860: 7f ff fb 28 call 40008500 <_Heap_Free> 40009864: 92 10 00 19 mov %i1, %o1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009868: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 4000986c: b0 10 00 08 mov %o0, %i0 40009870: 82 00 60 01 inc %g1 40009874: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] _RTEMS_Unlock_allocator(); 40009878: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 4000987c: 94 10 20 00 clr %o2 40009880: d2 02 20 08 ld [ %o0 + 8 ], %o1 40009884: 7f ff fa 1c call 400080f4 <_CORE_mutex_Surrender> 40009888: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000988c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40009890: 82 00 7f ff add %g1, -1, %g1 40009894: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40009898: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 4000989c: 80 a0 a0 00 cmp %g2, 0 400098a0: 02 80 00 2d be 40009954 <_Protected_heap_Free+0x1a0> 400098a4: 01 00 00 00 nop return status; } 400098a8: 81 c7 e0 08 ret <== NOT EXECUTED 400098ac: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400098b0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 400098b4: 12 80 00 16 bne 4000990c <_Protected_heap_Free+0x158> <== NOT EXECUTED 400098b8: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 400098bc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400098c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400098c4: 22 80 00 43 be,a 400099d0 <_Protected_heap_Free+0x21c> <== NOT EXECUTED 400098c8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400098cc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400098d0: 12 80 00 0f bne 4000990c <_Protected_heap_Free+0x158> <== NOT EXECUTED 400098d4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400098d8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400098dc: 7f ff e1 c7 call 40001ff8 <== NOT EXECUTED 400098e0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Free( the_heap, start_address ); 400098e4: 10 bf ff df b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400098e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400098ec: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400098f0: 12 bf ff d9 bne 40009854 <_Protected_heap_Free+0xa0> <== NOT EXECUTED 400098f4: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400098f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400098fc: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009900: 02 80 00 19 be 40009964 <_Protected_heap_Free+0x1b0> <== NOT EXECUTED 40009904: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009908: 30 bf ff d3 b,a 40009854 <_Protected_heap_Free+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000990c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED void *start_address ) { boolean status; _RTEMS_Lock_allocator(); 40009910: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009914: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009918: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000991c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009920: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009924: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009928: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000992c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009930: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009934: 7f ff e1 b1 call 40001ff8 <== NOT EXECUTED 40009938: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000993c: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009940: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009944: 7f ff f9 c8 call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009948: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Free( the_heap, start_address ); 4000994c: 10 bf ff c5 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009950: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009954: 40 00 02 91 call 4000a398 <_Thread_Dispatch> 40009958: 01 00 00 00 nop 4000995c: 81 c7 e0 08 ret 40009960: 81 e8 00 00 restore */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009964: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009968: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000996c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009970: 02 80 00 28 be 40009a10 <_Protected_heap_Free+0x25c> <== NOT EXECUTED 40009974: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009978: 1a 80 00 1c bcc 400099e8 <_Protected_heap_Free+0x234> <== NOT EXECUTED 4000997c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009980: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009984: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009988: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000998c: 7f ff e1 9b call 40001ff8 <== NOT EXECUTED 40009990: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009994: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009998: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000999c: 40 00 01 5b call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400099a0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400099a4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400099a8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400099ac: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400099b0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400099b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400099b8: 32 bf ff aa bne,a 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400099c0: 40 00 02 76 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400099c4: 01 00 00 00 nop <== NOT EXECUTED 400099c8: 10 bf ff a6 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400099d0: 82 00 60 01 inc %g1 <== NOT EXECUTED 400099d4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 400099d8: 7f ff e1 88 call 40001ff8 <== NOT EXECUTED 400099dc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400099e0: 10 bf ff a0 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 400099e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 400099e8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 400099ec: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 400099f0: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 400099f4: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400099f8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400099fc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009a00: 7f ff e1 7e call 40001ff8 <== NOT EXECUTED 40009a04: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009a08: 10 bf ff 96 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009a0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009a10: 7f ff e1 7a call 40001ff8 <== NOT EXECUTED 40009a14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009a18: 10 bf ff 92 b 40009860 <_Protected_heap_Free+0xac> <== NOT EXECUTED 40009a1c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009a20 <_Protected_heap_Get_block_size>: boolean _Protected_heap_Get_block_size( Heap_Control *the_heap, void *starting_address, size_t *size ) { 40009a20: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED boolean status; _RTEMS_Lock_allocator(); 40009a24: 7f ff e1 71 call 40001fe8 <== NOT EXECUTED 40009a28: 01 00 00 00 nop <== NOT EXECUTED 40009a2c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009a30: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009a34: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009a38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009a3c: 02 80 00 0b be 40009a68 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 40009a40: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009a44: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009a48: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 40009a4c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009a50: 08 80 00 06 bleu 40009a68 <_Protected_heap_Get_block_size+0x48> <== NOT EXECUTED 40009a54: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009a58: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009a5c: 7f ff fb a9 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009a60: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009a64: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009a68: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 40009a6c: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009a70: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009a74: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009a78: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40009a7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009a80: 22 80 00 28 be,a 40009b20 <_Protected_heap_Get_block_size+0x100> <== NOT EXECUTED 40009a84: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40009a88: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009a8c: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009a90: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009a94: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009a98: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009a9c: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009aa0: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40009aa4: 12 80 00 2e bne 40009b5c <_Protected_heap_Get_block_size+0x13c> <== NOT EXECUTED 40009aa8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009aac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009ab0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009ab4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009ab8: 02 80 00 47 be 40009bd4 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 40009abc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009ac0: 7f ff e1 4e call 40001ff8 <== NOT EXECUTED 40009ac4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009ac8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009acc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009ad0: 40 00 13 8e call 4000e908 <_Heap_Size_of_user_area> <== NOT EXECUTED 40009ad4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009ad8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009adc: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 40009ae0: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009ae4: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 40009ae8: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009aec: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009af0: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009af4: 7f ff f9 80 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 40009af8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009afc: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009b00: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009b04: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009b08: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009b0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009b10: 02 80 00 2d be 40009bc4 <_Protected_heap_Get_block_size+0x1a4> <== NOT EXECUTED 40009b14: 01 00 00 00 nop <== NOT EXECUTED return status; } 40009b18: 81 c7 e0 08 ret <== NOT EXECUTED 40009b1c: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009b20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009b24: 12 80 00 16 bne 40009b7c <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 40009b28: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009b2c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009b34: 22 80 00 43 be,a 40009c40 <_Protected_heap_Get_block_size+0x220> <== NOT EXECUTED 40009b38: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009b3c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009b40: 12 80 00 0f bne 40009b7c <_Protected_heap_Get_block_size+0x15c> <== NOT EXECUTED 40009b44: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40009b48: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009b4c: 7f ff e1 2b call 40001ff8 <== NOT EXECUTED 40009b50: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED ) { boolean status; _RTEMS_Lock_allocator(); status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009b54: 10 bf ff de b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009b58: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009b5c: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009b60: 12 bf ff d8 bne 40009ac0 <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED 40009b64: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009b68: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009b6c: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009b70: 02 80 00 19 be 40009bd4 <_Protected_heap_Get_block_size+0x1b4> <== NOT EXECUTED 40009b74: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009b78: 30 bf ff d2 b,a 40009ac0 <_Protected_heap_Get_block_size+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009b7c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED size_t *size ) { boolean status; _RTEMS_Lock_allocator(); 40009b80: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009b84: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009b88: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009b8c: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009b90: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009b94: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009b98: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40009b9c: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009ba0: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009ba4: 7f ff e1 15 call 40001ff8 <== NOT EXECUTED 40009ba8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009bac: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009bb0: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009bb4: 7f ff f9 2c call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009bb8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Size_of_user_area( the_heap, starting_address, size ); 40009bbc: 10 bf ff c4 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009bc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009bc4: 40 00 01 f5 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009bc8: 01 00 00 00 nop <== NOT EXECUTED 40009bcc: 81 c7 e0 08 ret <== NOT EXECUTED 40009bd0: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009bd4: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009bd8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009bdc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009be0: 02 80 00 28 be 40009c80 <_Protected_heap_Get_block_size+0x260> <== NOT EXECUTED 40009be4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009be8: 1a 80 00 1c bcc 40009c58 <_Protected_heap_Get_block_size+0x238> <== NOT EXECUTED 40009bec: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009bf0: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009bf4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009bf8: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009bfc: 7f ff e0 ff call 40001ff8 <== NOT EXECUTED 40009c00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009c04: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009c08: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009c0c: 40 00 00 bf call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009c10: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009c14: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009c1c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009c20: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009c24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009c28: 32 bf ff a9 bne,a 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009c30: 40 00 01 da call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009c34: 01 00 00 00 nop <== NOT EXECUTED 40009c38: 10 bf ff a5 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009c40: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009c44: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40009c48: 7f ff e0 ec call 40001ff8 <== NOT EXECUTED 40009c4c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c50: 10 bf ff 9f b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009c58: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009c5c: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009c60: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009c64: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009c68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009c6c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009c70: 7f ff e0 e2 call 40001ff8 <== NOT EXECUTED 40009c74: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c78: 10 bf ff 95 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009c80: 7f ff e0 de call 40001ff8 <== NOT EXECUTED 40009c84: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009c88: 10 bf ff 91 b 40009acc <_Protected_heap_Get_block_size+0xac> <== NOT EXECUTED 40009c8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d46c <_Protected_heap_Get_free_information>: void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { 4000d46c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _RTEMS_Lock_allocator(); 4000d470: 7f ff da 91 call 40003eb4 <== NOT EXECUTED 4000d474: 01 00 00 00 nop <== NOT EXECUTED 4000d478: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 4000d47c: 23 10 00 ff sethi %hi(0x4003fc00), %l1 <== NOT EXECUTED 4000d480: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000d484: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d488: 02 80 00 0b be 4000d4b4 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000d48c: 27 10 00 ff sethi %hi(0x4003fc00), %l3 <== NOT EXECUTED 4000d490: 03 10 00 ff sethi %hi(0x4003fc00), %g1 <== NOT EXECUTED 4000d494: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 4003fe30 <_System_state_Current> <== NOT EXECUTED 4000d498: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 4000d49c: 08 80 00 06 bleu 4000d4b4 <_Protected_heap_Get_free_information+0x48> <== NOT EXECUTED 4000d4a0: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000d4a4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d4a8: 7f ff fb 49 call 4000c1cc <_Internal_error_Occurred> <== NOT EXECUTED 4000d4ac: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 4000d4b0: 27 10 00 ff sethi %hi(0x4003fc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4000d4b4: 09 10 00 ff sethi %hi(0x4003fc00), %g4 <== NOT EXECUTED 4000d4b8: e0 04 e1 24 ld [ %l3 + 0x124 ], %l0 <== NOT EXECUTED 4000d4bc: c4 01 21 2c ld [ %g4 + 0x12c ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4000d4c0: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4000d4c4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 4000d4c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d4cc: 22 80 00 26 be,a 4000d564 <_Protected_heap_Get_free_information+0xf8> <== NOT EXECUTED 4000d4d0: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4000d4d4: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000d4d8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 4000d4dc: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4000d4e0: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4000d4e4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 4000d4e8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000d4ec: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 4000d4f0: 12 80 00 2c bne 4000d5a0 <_Protected_heap_Get_free_information+0x134> <== NOT EXECUTED 4000d4f4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d4f8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d4fc: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d500: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d504: 02 80 00 43 be 4000d610 <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000d508: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000d50c: 7f ff da 6e call 40003ec4 <== NOT EXECUTED 4000d510: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000d514: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d518: 40 00 3c 0c call 4001c548 <_Heap_Get_free_information> <== NOT EXECUTED 4000d51c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d520: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d524: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d528: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED _RTEMS_Unlock_allocator(); 4000d52c: d0 04 e1 24 ld [ %l3 + 0x124 ], %o0 <== NOT EXECUTED 4000d530: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000d534: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 4000d538: 7f ff f9 22 call 4000b9c0 <_CORE_mutex_Surrender> <== NOT EXECUTED 4000d53c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000d540: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d544: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d548: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d54c: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 <== NOT EXECUTED 4000d550: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d554: 02 80 00 2d be 4000d608 <_Protected_heap_Get_free_information+0x19c> <== NOT EXECUTED 4000d558: 01 00 00 00 nop <== NOT EXECUTED 4000d55c: 81 c7 e0 08 ret <== NOT EXECUTED 4000d560: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4000d564: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 4000d568: 12 80 00 16 bne 4000d5c0 <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000d56c: c6 04 e1 24 ld [ %l3 + 0x124 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000d570: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4000d574: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d578: 22 80 00 41 be,a 4000d67c <_Protected_heap_Get_free_information+0x210> <== NOT EXECUTED 4000d57c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 4000d580: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4000d584: 12 80 00 0f bne 4000d5c0 <_Protected_heap_Get_free_information+0x154> <== NOT EXECUTED 4000d588: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 4000d58c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d590: 7f ff da 4d call 40003ec4 <== NOT EXECUTED 4000d594: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); _Heap_Get_free_information( the_heap, info ); 4000d598: 10 bf ff e0 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d59c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000d5a0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 4000d5a4: 12 bf ff da bne 4000d50c <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED 4000d5a8: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4000d5ac: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000d5b0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4000d5b4: 02 80 00 17 be 4000d610 <_Protected_heap_Get_free_information+0x1a4> <== NOT EXECUTED 4000d5b8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 4000d5bc: 30 bf ff d4 b,a 4000d50c <_Protected_heap_Get_free_information+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d5c0: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED void _Protected_heap_Get_free_information( Heap_Control *the_heap, Heap_Information *info ) { _RTEMS_Lock_allocator(); 4000d5c4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4000d5c8: c8 01 21 2c ld [ %g4 + 0x12c ], %g4 <== NOT EXECUTED 4000d5cc: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d5d0: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 4000d5d4: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d5d8: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 4000d5dc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4000d5e0: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 4000d5e4: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4000d5e8: 7f ff da 37 call 40003ec4 <== NOT EXECUTED 4000d5ec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d5f0: d0 04 e1 24 ld [ %l3 + 0x124 ], %o0 <== NOT EXECUTED 4000d5f4: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000d5f8: 7f ff f8 ce call 4000b930 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4000d5fc: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED _Heap_Get_free_information( the_heap, info ); 4000d600: 10 bf ff c6 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d604: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000d608: 40 00 01 f3 call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4000d60c: 81 e8 00 00 restore <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4000d610: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 4000d614: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000d618: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000d61c: 02 80 00 28 be 4000d6bc <_Protected_heap_Get_free_information+0x250> <== NOT EXECUTED 4000d620: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 4000d624: 1a 80 00 1c bcc 4000d694 <_Protected_heap_Get_free_information+0x228> <== NOT EXECUTED 4000d628: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000d62c: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d630: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d634: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000d638: 7f ff da 23 call 40003ec4 <== NOT EXECUTED 4000d63c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 4000d640: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4000d644: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 4000d648: 40 00 00 bf call 4000d944 <_Thread_Change_priority> <== NOT EXECUTED 4000d64c: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000d650: c2 04 60 50 ld [ %l1 + 0x50 ], %g1 <== NOT EXECUTED 4000d654: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d658: c2 24 60 50 st %g1, [ %l1 + 0x50 ] <== NOT EXECUTED 4000d65c: c4 04 60 50 ld [ %l1 + 0x50 ], %g2 <== NOT EXECUTED 4000d660: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000d664: 32 bf ff ad bne,a 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d668: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000d66c: 40 00 01 da call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4000d670: 01 00 00 00 nop <== NOT EXECUTED 4000d674: 10 bf ff a9 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d678: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4000d67c: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000d680: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4000d684: 7f ff da 10 call 40003ec4 <== NOT EXECUTED 4000d688: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d68c: 10 bf ff a3 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d690: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000d694: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 4000d698: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 4000d69c: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4000d6a0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4000d6a4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000d6a8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 4000d6ac: 7f ff da 06 call 40003ec4 <== NOT EXECUTED 4000d6b0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d6b4: 10 bf ff 99 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d6b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 4000d6bc: 7f ff da 02 call 40003ec4 <== NOT EXECUTED 4000d6c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4000d6c4: 10 bf ff 95 b 4000d518 <_Protected_heap_Get_free_information+0xac> <== NOT EXECUTED 4000d6c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009c90 <_Protected_heap_Resize_block>: boolean _Protected_heap_Resize_block( Heap_Control *the_heap, void *starting_address, size_t size ) { 40009c90: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 40009c94: 7f ff e0 d5 call 40001fe8 <== NOT EXECUTED 40009c98: 01 00 00 00 nop <== NOT EXECUTED 40009c9c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40009ca0: 23 10 00 6f sethi %hi(0x4001bc00), %l1 <== NOT EXECUTED 40009ca4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009ca8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cac: 02 80 00 0b be 40009cd8 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40009cb0: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40009cb4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40009cb8: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 40009cbc: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40009cc0: 08 80 00 06 bleu 40009cd8 <_Protected_heap_Resize_block+0x48> <== NOT EXECUTED 40009cc4: 90 10 20 00 clr %o0 <== NOT EXECUTED 40009cc8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009ccc: 7f ff fb 0d call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40009cd0: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40009cd4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40009cd8: 09 10 00 6f sethi %hi(0x4001bc00), %g4 <== NOT EXECUTED 40009cdc: e0 04 e2 b4 ld [ %l3 + 0x2b4 ], %l0 <== NOT EXECUTED 40009ce0: c4 01 22 bc ld [ %g4 + 0x2bc ], %g2 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40009ce4: c0 20 a0 34 clr [ %g2 + 0x34 ] <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40009ce8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40009cec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009cf0: 22 80 00 2e be,a 40009da8 <_Protected_heap_Resize_block+0x118> <== NOT EXECUTED 40009cf4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40009cf8: c0 24 20 60 clr [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009cfc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40009d00: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 <== NOT EXECUTED executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40009d04: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40009d08: c2 24 20 70 st %g1, [ %l0 + 0x70 ] <== NOT EXECUTED executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40009d0c: c4 24 20 6c st %g2, [ %l0 + 0x6c ] <== NOT EXECUTED the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009d10: 80 a0 e0 02 cmp %g3, 2 <== NOT EXECUTED 40009d14: 12 80 00 34 bne 40009de4 <_Protected_heap_Resize_block+0x154> <== NOT EXECUTED 40009d18: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009d1c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009d20: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009d24: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009d28: 02 80 00 49 be 40009e4c <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40009d2c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009d30: 7f ff e0 b2 call 40001ff8 <== NOT EXECUTED 40009d34: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40009d38: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009d3c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009d40: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009d44: 96 07 bf f4 add %fp, -12, %o3 <== NOT EXECUTED 40009d48: 40 00 12 62 call 4000e6d0 <_Heap_Resize_block> <== NOT EXECUTED 40009d4c: 98 07 bf f0 add %fp, -16, %o4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009d50: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009d54: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 40009d58: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009d5c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED the_heap, starting_address, size, &old_mem_size, &avail_mem_size ); _RTEMS_Unlock_allocator(); 40009d60: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009d64: 94 10 20 00 clr %o2 <== NOT EXECUTED 40009d68: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40009d6c: 7f ff f8 e2 call 400080f4 <_CORE_mutex_Surrender> <== NOT EXECUTED 40009d70: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009d74: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009d78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009d7c: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009d80: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009d84: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009d88: 12 80 00 05 bne 40009d9c <_Protected_heap_Resize_block+0x10c> <== NOT EXECUTED 40009d8c: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED _Thread_Dispatch(); 40009d90: 40 00 01 82 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009d94: 01 00 00 00 nop <== NOT EXECUTED return (status == HEAP_RESIZE_SUCCESSFUL); } 40009d98: 80 a0 00 10 cmp %g0, %l0 <== NOT EXECUTED 40009d9c: b0 60 3f ff subx %g0, -1, %i0 <== NOT EXECUTED 40009da0: 81 c7 e0 08 ret <== NOT EXECUTED 40009da4: 81 e8 00 00 restore <== NOT EXECUTED /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40009da8: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40009dac: 12 80 00 16 bne 40009e04 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40009db0: c6 04 e2 b4 ld [ %l3 + 0x2b4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40009db4: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40009db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009dbc: 22 80 00 3f be,a 40009eb8 <_Protected_heap_Resize_block+0x228> <== NOT EXECUTED 40009dc0: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40009dc4: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009dc8: 12 80 00 0f bne 40009e04 <_Protected_heap_Resize_block+0x174> <== NOT EXECUTED 40009dcc: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40009dd0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40009dd4: 7f ff e0 89 call 40001ff8 <== NOT EXECUTED 40009dd8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); status = _Heap_Resize_block( 40009ddc: 10 bf ff d8 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009de0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40009de4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40009de8: 12 bf ff d2 bne 40009d30 <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED 40009dec: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40009df0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009df4: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40009df8: 02 80 00 15 be 40009e4c <_Protected_heap_Resize_block+0x1bc> <== NOT EXECUTED 40009dfc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40009e00: 30 bf ff cc b,a 40009d30 <_Protected_heap_Resize_block+0xa0> <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009e04: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED { Heap_Resize_status status; uint32_t old_mem_size; uint32_t avail_mem_size; _RTEMS_Lock_allocator(); 40009e08: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40009e0c: c8 01 22 bc ld [ %g4 + 0x2bc ], %g4 <== NOT EXECUTED 40009e10: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009e14: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40009e18: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009e1c: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40009e20: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40009e24: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40009e28: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40009e2c: 7f ff e0 73 call 40001ff8 <== NOT EXECUTED 40009e30: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009e34: d0 04 e2 b4 ld [ %l3 + 0x2b4 ], %o0 <== NOT EXECUTED 40009e38: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009e3c: 7f ff f8 8a call 40008064 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40009e40: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED status = _Heap_Resize_block( 40009e44: 10 bf ff be b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009e48: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40009e4c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40009e50: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40009e54: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40009e58: 02 80 00 28 be 40009ef8 <_Protected_heap_Resize_block+0x268> <== NOT EXECUTED 40009e5c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40009e60: 1a 80 00 1c bcc 40009ed0 <_Protected_heap_Resize_block+0x240> <== NOT EXECUTED 40009e64: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED 40009e68: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009e6c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009e70: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40009e74: 7f ff e0 61 call 40001ff8 <== NOT EXECUTED 40009e78: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40009e7c: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40009e80: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40009e84: 40 00 00 21 call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 40009e88: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009e8c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40009e90: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009e94: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 40009e98: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 40009e9c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40009ea0: 32 bf ff a7 bne,a 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ea4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009ea8: 40 00 01 3c call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40009eac: 01 00 00 00 nop <== NOT EXECUTED 40009eb0: 10 bf ff a3 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009eb4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40009eb8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009ebc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40009ec0: 7f ff e0 4e call 40001ff8 <== NOT EXECUTED 40009ec4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009ec8: 10 bf ff 9d b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ecc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40009ed0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40009ed4: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40009ed8: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40009edc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40009ee0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40009ee4: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40009ee8: 7f ff e0 44 call 40001ff8 <== NOT EXECUTED 40009eec: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009ef0: 10 bf ff 93 b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009ef4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40009ef8: 7f ff e0 40 call 40001ff8 <== NOT EXECUTED 40009efc: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40009f00: 10 bf ff 8f b 40009d3c <_Protected_heap_Resize_block+0xac> <== NOT EXECUTED 40009f04: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000e3b4 <_RTEMS_tasks_Delete_extension>: User_extensions_routine _RTEMS_tasks_Delete_extension( Thread_Control *executing, Thread_Control *deleted ) { 4000e3b4: 9d e3 bf 98 save %sp, -104, %sp /* * Free per task variable memory */ tvp = deleted->task_variables; 4000e3b8: e0 06 61 7c ld [ %i1 + 0x17c ], %l0 deleted->task_variables = NULL; 4000e3bc: c0 26 61 7c clr [ %i1 + 0x17c ] while (tvp) { 4000e3c0: 80 a4 20 00 cmp %l0, 0 4000e3c4: 02 80 00 25 be 4000e458 <_RTEMS_tasks_Delete_extension+0xa4> 4000e3c8: 29 10 00 6f sethi %hi(0x4001bc00), %l4 4000e3cc: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 4000e3d0: 10 80 00 12 b 4000e418 <_RTEMS_tasks_Delete_extension+0x64> <== NOT EXECUTED 4000e3d4: a4 15 22 2c or %l4, 0x22c, %l2 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { if (tvp->dtor) 4000e3d8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED 4000e3dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000e3e0: 22 80 00 06 be,a 4000e3f8 <_RTEMS_tasks_Delete_extension+0x44> <== NOT EXECUTED 4000e3e4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED (*tvp->dtor)(*tvp->ptr); 4000e3e8: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 4000e3ec: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000e3f0: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4000e3f4: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 4000e3f8: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000e3fc: c2 20 80 00 st %g1, [ %g2 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000e400: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000e404: 7f ff e8 3f call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e408: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000e40c: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000e410: 22 80 00 13 be,a 4000e45c <_RTEMS_tasks_Delete_extension+0xa8> <== NOT EXECUTED 4000e414: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 <== NOT EXECUTED next = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(deleted)) { 4000e418: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 4000e41c: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 4000e420: 02 bf ff ee be 4000e3d8 <_RTEMS_tasks_Delete_extension+0x24> <== NOT EXECUTED 4000e424: e2 04 00 00 ld [ %l0 ], %l1 <== NOT EXECUTED if (tvp->dtor) (*tvp->dtor)(*tvp->ptr); *tvp->ptr = tvp->gval; } else { if (tvp->dtor) 4000e428: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 4000e42c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000e430: 02 bf ff f5 be 4000e404 <_RTEMS_tasks_Delete_extension+0x50> <== NOT EXECUTED 4000e434: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4000e438: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000e43c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 4000e440: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000e444: 7f ff e8 2f call 40008500 <_Heap_Free> <== NOT EXECUTED 4000e448: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED * Free per task variable memory */ tvp = deleted->task_variables; deleted->task_variables = NULL; while (tvp) { 4000e44c: a0 94 60 00 orcc %l1, 0, %l0 <== NOT EXECUTED 4000e450: 12 bf ff f3 bne 4000e41c <_RTEMS_tasks_Delete_extension+0x68> <== NOT EXECUTED 4000e454: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 4000e458: d2 06 61 6c ld [ %i1 + 0x16c ], %o1 4000e45c: 7f ff e8 29 call 40008500 <_Heap_Free> 4000e460: 90 15 22 2c or %l4, 0x22c, %o0 /* * Free API specific memory */ (void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] ); deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL; 4000e464: c0 26 61 6c clr [ %i1 + 0x16c ] } 4000e468: 81 c7 e0 08 ret 4000e46c: 81 e8 00 00 restore 400076bc <_RTEMS_tasks_Initialize_user_tasks_body>: * * Output parameters: NONE */ void _RTEMS_tasks_Initialize_user_tasks_body( void ) { 400076bc: 9d e3 bf 90 save %sp, -112, %sp rtems_status_code return_value; rtems_initialization_tasks_table *user_tasks; rtems_api_configuration_table *api_configuration; api_configuration = _Configuration_Table->RTEMS_api_configuration; 400076c0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400076c4: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 4001bea0 <_Configuration_Table> 400076c8: c6 00 a0 2c ld [ %g2 + 0x2c ], %g3 /* * NOTE: This is slightly different from the Ada implementation. */ user_tasks = api_configuration->User_initialization_tasks_table; 400076cc: d0 00 e0 28 ld [ %g3 + 0x28 ], %o0 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) 400076d0: 80 a2 20 00 cmp %o0, 0 400076d4: 02 80 00 2f be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 400076d8: e4 00 e0 24 ld [ %g3 + 0x24 ], %l2 400076dc: 80 a4 a0 00 cmp %l2, 0 400076e0: 02 80 00 2c be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 400076e4: a0 10 00 08 mov %o0, %l0 return; for ( index=0 ; index < maximum ; index++ ) { 400076e8: a2 10 20 00 clr %l1 400076ec: 10 80 00 0c b 4000771c <_RTEMS_tasks_Initialize_user_tasks_body+0x60> 400076f0: a6 07 bf f4 add %fp, -12, %l3 ); if ( !rtems_is_status_successful( return_value ) ) _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); return_value = rtems_task_start( 400076f4: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 400076f8: d0 07 bf f4 ld [ %fp + -12 ], %o0 400076fc: 40 00 00 27 call 40007798 40007700: a2 04 60 01 inc %l1 id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 40007704: 80 a2 20 00 cmp %o0, 0 40007708: 12 80 00 1c bne 40007778 <_RTEMS_tasks_Initialize_user_tasks_body+0xbc> 4000770c: 94 10 00 08 mov %o0, %o2 maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 40007710: 80 a4 40 12 cmp %l1, %l2 40007714: 02 80 00 1f be 40007790 <_RTEMS_tasks_Initialize_user_tasks_body+0xd4> 40007718: a0 04 20 1c add %l0, 0x1c, %l0 return_value = rtems_task_create( 4000771c: d6 04 20 14 ld [ %l0 + 0x14 ], %o3 40007720: d8 04 20 0c ld [ %l0 + 0xc ], %o4 40007724: d2 04 20 08 ld [ %l0 + 8 ], %o1 40007728: d4 04 20 04 ld [ %l0 + 4 ], %o2 4000772c: d0 04 00 00 ld [ %l0 ], %o0 40007730: 7f ff ff 1a call 40007398 40007734: 9a 10 00 13 mov %l3, %o5 user_tasks[ index ].mode_set, user_tasks[ index ].attribute_set, &id ); if ( !rtems_is_status_successful( return_value ) ) 40007738: 80 a2 20 00 cmp %o0, 0 4000773c: 22 bf ff ee be,a 400076f4 <_RTEMS_tasks_Initialize_user_tasks_body+0x38> 40007740: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 40007744: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007748: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000774c: 40 00 04 6d call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007750: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED return_value = rtems_task_start( 40007754: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40007758: d4 04 20 18 ld [ %l0 + 0x18 ], %o2 <== NOT EXECUTED 4000775c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40007760: 40 00 00 0e call 40007798 <== NOT EXECUTED 40007764: a2 04 60 01 inc %l1 <== NOT EXECUTED id, user_tasks[ index ].entry_point, user_tasks[ index ].argument ); if ( !rtems_is_status_successful( return_value ) ) 40007768: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000776c: 02 bf ff ea be 40007714 <_RTEMS_tasks_Initialize_user_tasks_body+0x58> <== NOT EXECUTED 40007770: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED _Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value ); 40007774: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40007778: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000777c: 40 00 04 61 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007780: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED maximum = api_configuration->number_of_initialization_tasks; if ( !user_tasks || maximum == 0 ) return; for ( index=0 ; index < maximum ; index++ ) { 40007784: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 40007788: 12 bf ff e5 bne 4000771c <_RTEMS_tasks_Initialize_user_tasks_body+0x60> <== NOT EXECUTED 4000778c: a0 04 20 1c add %l0, 0x1c, %l0 <== NOT EXECUTED 40007790: 81 c7 e0 08 ret 40007794: 81 e8 00 00 restore 4000837c <_Rate_monotonic_Timeout>: void _Rate_monotonic_Timeout( Objects_Id id, void *ignored ) { 4000837c: 9d e3 bf 90 save %sp, -112, %sp 40008380: 11 10 00 82 sethi %hi(0x40020800), %o0 40008384: 92 10 00 18 mov %i0, %o1 40008388: 90 12 23 dc or %o0, 0x3dc, %o0 4000838c: 40 00 09 cd call 4000aac0 <_Objects_Get> 40008390: 94 07 bf f4 add %fp, -12, %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 ) { 40008394: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008398: 80 a0 60 00 cmp %g1, 0 4000839c: 12 80 00 11 bne 400083e0 <_Rate_monotonic_Timeout+0x64> 400083a0: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: /* impossible */ case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; 400083a4: d0 02 20 50 ld [ %o0 + 0x50 ], %o0 if ( _States_Is_waiting_for_period( the_thread->current_state ) && 400083a8: 03 00 00 10 sethi %hi(0x4000), %g1 400083ac: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 400083b0: 80 88 80 01 btst %g2, %g1 400083b4: 32 80 00 0d bne,a 400083e8 <_Rate_monotonic_Timeout+0x6c> 400083b8: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) { 400083bc: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 400083c0: 80 a0 60 01 cmp %g1, 1 400083c4: 02 80 00 17 be 40008420 <_Rate_monotonic_Timeout+0xa4> 400083c8: 82 10 20 04 mov 4, %g1 the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING; _Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length ); } else the_period->state = RATE_MONOTONIC_EXPIRED; 400083cc: c2 26 20 38 st %g1, [ %i0 + 0x38 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 400083d0: 05 10 00 83 sethi %hi(0x40020c00), %g2 400083d4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 400083d8: 82 00 7f ff add %g1, -1, %g1 400083dc: c2 20 a1 70 st %g1, [ %g2 + 0x170 ] 400083e0: 81 c7 e0 08 ret 400083e4: 81 e8 00 00 restore case OBJECTS_ERROR: break; case OBJECTS_LOCAL: the_thread = the_period->owner; if ( _States_Is_waiting_for_period( the_thread->current_state ) && 400083e8: c2 06 20 08 ld [ %i0 + 8 ], %g1 400083ec: 80 a0 80 01 cmp %g2, %g1 400083f0: 32 bf ff f4 bne,a 400083c0 <_Rate_monotonic_Timeout+0x44> 400083f4: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 400083f8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 400083fc: 40 00 0e 24 call 4000bc8c <_Thread_Clear_state> 40008400: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008404: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008408: 92 06 20 10 add %i0, 0x10, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000840c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008410: 11 10 00 83 sethi %hi(0x40020c00), %o0 40008414: 40 00 14 59 call 4000d578 <_Watchdog_Insert> 40008418: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> 4000841c: 30 bf ff ed b,a 400083d0 <_Rate_monotonic_Timeout+0x54> Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40008420: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 <== NOT EXECUTED the_thread->Wait.id == the_period->Object.id ) { _Thread_Unblock( the_thread ); _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; 40008424: 84 10 20 03 mov 3, %g2 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008428: 92 06 20 10 add %i0, 0x10, %o1 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000842c: c2 26 20 1c st %g1, [ %i0 + 0x1c ] <== NOT EXECUTED 40008430: c4 26 20 38 st %g2, [ %i0 + 0x38 ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40008434: 11 10 00 83 sethi %hi(0x40020c00), %o0 <== NOT EXECUTED 40008438: 40 00 14 50 call 4000d578 <_Watchdog_Insert> <== NOT EXECUTED 4000843c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> <== NOT EXECUTED 40008440: 30 bf ff e4 b,a 400083d0 <_Rate_monotonic_Timeout+0x54> <== NOT EXECUTED 4001bf64 <_Region_Process_queue>: */ void _Region_Process_queue( Region_Control *the_region ) { 4001bf64: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001bf68: 27 10 00 d7 sethi %hi(0x40035c00), %l3 4001bf6c: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001bf70: 82 00 60 01 inc %g1 4001bf74: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001bf78: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001bf7c: 82 00 60 01 inc %g1 4001bf80: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] * NOTE: Be sure to disable dispatching before unlocking the mutex * since we do not want to open a window where a context * switch could occur. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 4001bf84: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4001bf88: d0 00 63 c4 ld [ %g1 + 0x3c4 ], %o0 ! 40035fc4 <_RTEMS_Allocator_Mutex> 4001bf8c: 94 10 20 00 clr %o2 4001bf90: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001bf94: 7f ff e5 e0 call 40015714 <_CORE_mutex_Surrender> 4001bf98: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001bf9c: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001bfa0: a2 06 20 10 add %i0, 0x10, %l1 4001bfa4: 82 00 7f ff add %g1, -1, %g1 4001bfa8: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001bfac: c4 04 e2 f0 ld [ %l3 + 0x2f0 ], %g2 4001bfb0: 80 a0 a0 00 cmp %g2, 0 4001bfb4: 02 80 00 21 be 4001c038 <_Region_Process_queue+0xd4> 4001bfb8: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 4001bfbc: 10 80 00 10 b 4001bffc <_Region_Process_queue+0x98> 4001bfc0: a4 06 20 68 add %i0, 0x68, %l2 the_segment = (void **) _Region_Allocate_segment( the_region, the_thread->Wait.count ); if ( the_segment == NULL ) 4001bfc4: 7f ff e6 e8 call 40015b64 <_Heap_Allocate> 4001bfc8: d2 04 20 24 ld [ %l0 + 0x24 ], %o1 4001bfcc: 80 a2 20 00 cmp %o0, 0 4001bfd0: 02 80 00 11 be 4001c014 <_Region_Process_queue+0xb0> 4001bfd4: 01 00 00 00 nop break; *(void **)the_thread->Wait.return_argument = the_segment; the_region->number_of_used_blocks += 1; 4001bfd8: c2 06 20 64 ld [ %i0 + 0x64 ], %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001bfdc: c4 04 20 28 ld [ %l0 + 0x28 ], %g2 the_region->number_of_used_blocks += 1; 4001bfe0: 82 00 60 01 inc %g1 ); if ( the_segment == NULL ) break; *(void **)the_thread->Wait.return_argument = the_segment; 4001bfe4: d0 20 80 00 st %o0, [ %g2 ] the_region->number_of_used_blocks += 1; 4001bfe8: c2 26 20 64 st %g1, [ %i0 + 0x64 ] _Thread_queue_Extract( &the_region->Wait_queue, the_thread ); 4001bfec: 90 10 00 11 mov %l1, %o0 4001bff0: 40 00 02 79 call 4001c9d4 <_Thread_queue_Extract> 4001bff4: 92 10 00 10 mov %l0, %o1 the_thread->Wait.return_code = RTEMS_SUCCESSFUL; 4001bff8: c0 24 20 34 clr [ %l0 + 0x34 ] /* * NOTE: The following loop is O(n) where n is the number of * threads whose memory request is satisfied. */ for ( ; ; ) { the_thread = _Thread_queue_First( &the_region->Wait_queue ); 4001bffc: 40 00 02 c0 call 4001cafc <_Thread_queue_First> 4001c000: 90 10 00 11 mov %l1, %o0 4001c004: a0 10 00 08 mov %o0, %l0 if ( the_thread == NULL ) 4001c008: 80 a4 20 00 cmp %l0, 0 4001c00c: 12 bf ff ee bne 4001bfc4 <_Region_Process_queue+0x60> 4001c010: 90 10 00 12 mov %l2, %o0 4001c014: c2 04 e2 f0 ld [ %l3 + 0x2f0 ], %g1 4001c018: 82 00 7f ff add %g1, -1, %g1 4001c01c: c2 24 e2 f0 st %g1, [ %l3 + 0x2f0 ] 4001c020: c4 04 e2 f0 ld [ %l3 + 0x2f0 ], %g2 4001c024: 80 a0 a0 00 cmp %g2, 0 4001c028: 02 80 00 07 be 4001c044 <_Region_Process_queue+0xe0> 4001c02c: 01 00 00 00 nop 4001c030: 81 c7 e0 08 ret <== NOT EXECUTED 4001c034: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4001c038: 7f ff ee ea call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 4001c03c: a4 06 20 68 add %i0, 0x68, %l2 <== NOT EXECUTED 4001c040: 30 bf ff ef b,a 4001bffc <_Region_Process_queue+0x98> <== NOT EXECUTED 4001c044: 7f ff ee e7 call 40017be0 <_Thread_Dispatch> 4001c048: 81 e8 00 00 restore 4001c04c: 01 00 00 00 nop 40009d08 <_TOD_Set>: */ void _TOD_Set( const struct timespec *time ) { 40009d08: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009d0c: 23 10 00 a2 sethi %hi(0x40028800), %l1 40009d10: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40009d14: 82 00 60 01 inc %g1 40009d18: c2 24 63 00 st %g1, [ %l1 + 0x300 ] _Thread_Disable_dispatch(); _TOD_Deactivate(); if ( time->tv_sec < _TOD_Seconds_since_epoch ) 40009d1c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40009d20: c2 06 00 00 ld [ %i0 ], %g1 40009d24: d4 04 23 b8 ld [ %l0 + 0x3b8 ], %o2 40009d28: 80 a0 40 0a cmp %g1, %o2 40009d2c: 36 80 00 18 bge,a 40009d8c <_TOD_Set+0x84> 40009d30: 94 20 40 0a sub %g1, %o2, %o2 Watchdog_Adjust_directions direction, Watchdog_Interval units ) { _Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units ); 40009d34: 11 10 00 a2 sethi %hi(0x40028800), %o0 40009d38: 94 22 80 01 sub %o2, %g1, %o2 40009d3c: 90 12 23 f0 or %o0, 0x3f0, %o0 40009d40: 40 00 0e ea call 4000d8e8 <_Watchdog_Adjust> 40009d44: 92 10 20 01 mov 1, %o1 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d48: c4 06 00 00 ld [ %i0 ], %g2 40009d4c: 86 14 23 b8 or %l0, 0x3b8, %g3 40009d50: c4 24 23 b8 st %g2, [ %l0 + 0x3b8 ] 40009d54: c2 06 20 04 ld [ %i0 + 4 ], %g1 _TOD_Is_set = TRUE; 40009d58: 84 10 20 01 mov 1, %g2 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d5c: c2 20 e0 04 st %g1, [ %g3 + 4 ] _TOD_Is_set = TRUE; 40009d60: 03 10 00 a2 sethi %hi(0x40028800), %g1 40009d64: c4 20 63 3c st %g2, [ %g1 + 0x33c ] ! 40028b3c <_TOD_Is_set> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009d68: c2 04 63 00 ld [ %l1 + 0x300 ], %g1 40009d6c: 82 00 7f ff add %g1, -1, %g1 40009d70: c2 24 63 00 st %g1, [ %l1 + 0x300 ] 40009d74: c4 04 63 00 ld [ %l1 + 0x300 ], %g2 40009d78: 80 a0 a0 00 cmp %g2, 0 40009d7c: 02 80 00 0a be 40009da4 <_TOD_Set+0x9c> 40009d80: 01 00 00 00 nop 40009d84: 81 c7 e0 08 ret 40009d88: 81 e8 00 00 restore 40009d8c: 11 10 00 a2 sethi %hi(0x40028800), %o0 40009d90: 92 10 20 00 clr %o1 40009d94: 40 00 0e d5 call 4000d8e8 <_Watchdog_Adjust> 40009d98: 90 12 23 f0 or %o0, 0x3f0, %o0 else _Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - _TOD_Seconds_since_epoch ); /* POSIX format TOD (timespec) */ _TOD_Now = *time; 40009d9c: 10 bf ff ec b 40009d4c <_TOD_Set+0x44> 40009da0: c4 06 00 00 ld [ %i0 ], %g2 _Thread_Dispatch(); 40009da4: 40 00 08 3c call 4000be94 <_Thread_Dispatch> <== NOT EXECUTED 40009da8: 81 e8 00 00 restore <== NOT EXECUTED 40009dac: 01 00 00 00 nop 4000a248 <_Thread_Create_idle>: */ const char *_Thread_Idle_name = "IDLE"; void _Thread_Create_idle( void ) { 4000a248: 9d e3 bf 80 save %sp, -128, %sp * This routine allocates an internal thread. */ RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information ); 4000a24c: 39 10 00 6f sethi %hi(0x4001bc00), %i4 4000a250: 7f ff f9 d9 call 400089b4 <_Objects_Allocate> 4000a254: 90 17 23 70 or %i4, 0x370, %o0 ! 4001bf70 <_Thread_Internal_information> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 4000a258: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a25c: 96 10 61 f4 or %g1, 0x1f4, %o3 ! 4001bdf4 <_CPU_Table> 4000a260: c4 02 e0 0c ld [ %o3 + 0xc ], %g2 * The entire workspace is zeroed during its initialization. Thus, all * fields not explicitly assigned were explicitly zeroed by * _Workspace_Initialization. */ _Thread_Idle = _Thread_Internal_allocate(); 4000a264: 37 10 00 6f sethi %hi(0x4001bc00), %i3 4000a268: d0 26 e3 c8 st %o0, [ %i3 + 0x3c8 ] ! 4001bfc8 <_Thread_Idle> idle = (void *) _CPU_Thread_Idle_body; #else idle = (void *) _Thread_Idle_body; #endif if ( _CPU_Table.idle_task ) 4000a26c: 03 10 00 29 sethi %hi(0x4000a400), %g1 4000a270: 92 10 00 08 mov %o0, %o1 4000a274: 80 a0 a0 00 cmp %g2, 0 4000a278: 02 80 00 03 be 4000a284 <_Thread_Create_idle+0x3c> 4000a27c: b4 10 60 f4 or %g1, 0xf4, %i2 idle = _CPU_Table.idle_task; 4000a280: b4 10 00 02 mov %g2, %i2 <== NOT EXECUTED idle_task_stack_size = _CPU_Table.idle_task_stack_size; 4000a284: d6 02 e0 14 ld [ %o3 + 0x14 ], %o3 if ( idle_task_stack_size < STACK_MINIMUM_SIZE ) 4000a288: 80 a2 ef ff cmp %o3, 0xfff 4000a28c: 28 80 00 02 bleu,a 4000a294 <_Thread_Create_idle+0x4c> 4000a290: 17 00 00 04 sethi %hi(0x1000), %o3 idle_task_stack_size = STACK_MINIMUM_SIZE; _Thread_Initialize( 4000a294: 03 10 00 6b sethi %hi(0x4001ac00), %g1 4000a298: c4 00 63 88 ld [ %g1 + 0x388 ], %g2 ! 4001af88 <_Thread_Idle_name> 4000a29c: 82 10 20 01 mov 1, %g1 4000a2a0: c4 23 a0 6c st %g2, [ %sp + 0x6c ] 4000a2a4: 90 17 23 70 or %i4, 0x370, %o0 4000a2a8: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000a2ac: c0 23 a0 60 clr [ %sp + 0x60 ] 4000a2b0: c0 23 a0 64 clr [ %sp + 0x64 ] 4000a2b4: c0 23 a0 68 clr [ %sp + 0x68 ] 4000a2b8: 94 10 20 00 clr %o2 4000a2bc: 98 10 20 00 clr %o4 4000a2c0: 40 00 00 8e call 4000a4f8 <_Thread_Initialize> 4000a2c4: 9a 10 20 ff mov 0xff, %o5 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000a2c8: c6 06 e3 c8 ld [ %i3 + 0x3c8 ], %g3 4000a2cc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a2d0: 05 10 00 6f sethi %hi(0x4001bc00), %g2 _Thread_Executing = _Thread_Idle; _Thread_Start( 4000a2d4: b0 10 00 03 mov %g3, %i0 /* * WARNING!!! This is necessary to "kick" start the system and * MUST be done before _Thread_Start is invoked. */ _Thread_Heir = 4000a2d8: c6 20 62 bc st %g3, [ %g1 + 0x2bc ] 4000a2dc: c6 20 a2 94 st %g3, [ %g2 + 0x294 ] _Thread_Executing = _Thread_Idle; _Thread_Start( 4000a2e0: b2 10 20 00 clr %i1 4000a2e4: b6 10 20 00 clr %i3 4000a2e8: 40 00 04 07 call 4000b304 <_Thread_Start> 4000a2ec: 99 e8 20 00 restore %g0, 0, %o4 4000a2f0: 01 00 00 00 nop 4000a2f4 <_Thread_Delay_ended>: void _Thread_Delay_ended( Objects_Id id, void *ignored ) { 4000a2f4: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000a2f8: 92 96 20 00 orcc %i0, 0, %o1 4000a2fc: 12 80 00 11 bne 4000a340 <_Thread_Delay_ended+0x4c> 4000a300: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000a304: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000a308: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000a30c: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000a310: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000a314: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a318: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000a31c: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000a320: 13 04 00 ff sethi %hi(0x1003fc00), %o1 <== NOT EXECUTED 4000a324: 7f ff ff 68 call 4000a0c4 <_Thread_Clear_state> 4000a328: 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; 4000a32c: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 4000a330: 82 00 7f ff add %g1, -1, %g1 4000a334: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] 4000a338: 81 c7 e0 08 ret 4000a33c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000a340: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000a344: 80 a0 a0 04 cmp %g2, 4 4000a348: 18 bf ff fc bgu 4000a338 <_Thread_Delay_ended+0x44> 4000a34c: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000a350: 80 a0 60 01 cmp %g1, 1 4000a354: 12 bf ff f9 bne 4000a338 <_Thread_Delay_ended+0x44> 4000a358: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000a35c: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000a360: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 4000a364: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000a368: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000a36c: 80 a2 20 00 cmp %o0, 0 4000a370: 02 bf ff f2 be 4000a338 <_Thread_Delay_ended+0x44> 4000a374: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000a378: 7f ff fa e0 call 40008ef8 <_Objects_Get> 4000a37c: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000a380: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000a384: 80 a0 60 00 cmp %g1, 0 4000a388: 12 bf ff ec bne 4000a338 <_Thread_Delay_ended+0x44> 4000a38c: 31 10 00 6f sethi %hi(0x4001bc00), %i0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000a390: 10 bf ff e5 b 4000a324 <_Thread_Delay_ended+0x30> 4000a394: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000fc94 <_Thread_Handler>: * * Output parameters: NONE */ void _Thread_Handler( void ) { 4000fc94: 9d e3 bf 98 save %sp, -104, %sp #endif #if defined(__USE__MAIN__) extern void _main(void); #endif executing = _Thread_Executing; 4000fc98: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000fc9c: f4 00 62 bc ld [ %g1 + 0x2bc ], %i2 ! 4001bebc <_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(); 4000fca0: 3f 10 00 3f sethi %hi(0x4000fc00), %i7 4000fca4: be 17 e0 94 or %i7, 0x94, %i7 ! 4000fc94 <_Thread_Handler> * have to put level into a register for those cpu's that use * inline asm here */ level = executing->Start.isr_level; _ISR_Set_level(level); 4000fca8: d0 06 a0 c4 ld [ %i2 + 0xc4 ], %o0 4000fcac: 7f ff c8 d3 call 40001ff8 4000fcb0: 91 2a 20 08 sll %o0, 8, %o0 #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000fcb4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 doneConstructors = 1; 4000fcb8: 82 10 20 01 mov 1, %g1 level = executing->Start.isr_level; _ISR_Set_level(level); #if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__) doneCons = doneConstructors; 4000fcbc: f2 08 a0 00 ldub [ %g2 ], %i1 * 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 ); 4000fcc0: 90 10 00 1a mov %i2, %o0 4000fcc4: 7f ff ee 4e call 4000b5fc <_User_extensions_Thread_begin> 4000fcc8: c2 28 a0 00 stb %g1, [ %g2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000fccc: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000fcd0: c2 00 a1 e0 ld [ %g2 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000fcd4: 82 00 7f ff add %g1, -1, %g1 4000fcd8: c2 20 a1 e0 st %g1, [ %g2 + 0x1e0 ] 4000fcdc: c6 00 a1 e0 ld [ %g2 + 0x1e0 ], %g3 4000fce0: 80 a0 e0 00 cmp %g3, 0 4000fce4: 02 80 00 36 be 4000fdbc <_Thread_Handler+0x128> 4000fce8: 01 00 00 00 nop /* * _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) */ 4000fcec: 83 2e 60 18 sll %i1, 0x18, %g1 <== NOT EXECUTED 4000fcf0: 80 a0 60 00 cmp %g1, 0 4000fcf4: 02 80 00 22 be 4000fd7c <_Thread_Handler+0xe8> 4000fcf8: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fcfc: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000fd00: 80 a0 60 01 cmp %g1, 1 4000fd04: 22 80 00 25 be,a 4000fd98 <_Thread_Handler+0x104> 4000fd08: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd0c: 80 a0 60 01 cmp %g1, 1 4000fd10: 1a 80 00 0c bcc 4000fd40 <_Thread_Handler+0xac> 4000fd14: 80 a0 60 02 cmp %g1, 2 case THREAD_START_NUMERIC: executing->Wait.return_argument = 4000fd18: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd1c: 9f c0 40 00 call %g1 4000fd20: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 4000fd24: d0 26 a0 28 st %o0, [ %i2 + 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 ); 4000fd28: 90 10 00 1a mov %i2, %o0 4000fd2c: 7f ff ee 5c call 4000b69c <_User_extensions_Thread_exitted> 4000fd30: b0 10 20 00 clr %i0 _Internal_error_Occurred( 4000fd34: b2 10 20 01 mov 1, %i1 4000fd38: 7f ff e2 f2 call 40008900 <_Internal_error_Occurred> 4000fd3c: 95 e8 20 06 restore %g0, 6, %o2 #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fd40: 02 80 00 23 be 4000fdcc <_Thread_Handler+0x138> <== NOT EXECUTED 4000fd44: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000fd48: 12 bf ff f9 bne 4000fd2c <_Thread_Handler+0x98> <== NOT EXECUTED 4000fd4c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED executing->Start.pointer_argument, executing->Start.numeric_argument ); break; case THREAD_START_BOTH_NUMERIC_FIRST: executing->Wait.return_argument = 4000fd50: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000fd54: d2 06 a0 b0 ld [ %i2 + 0xb0 ], %o1 <== NOT EXECUTED 4000fd58: d0 06 a0 b4 ld [ %i2 + 0xb4 ], %o0 <== NOT EXECUTED 4000fd5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000fd60: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000fd64: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] <== NOT EXECUTED * 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 ); 4000fd68: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000fd6c: 7f ff ee 4c call 4000b69c <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000fd70: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000fd74: 7f ff e2 e3 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fd78: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED * _init could be a weak symbol and we SHOULD test it but it isn't * in any configuration I know of and it generates a warning on every * RTEMS target configuration. --joel (12 May 2007) */ if (!doneCons) /* && (volatile void *)_init) */ _init (); 4000fd7c: 40 00 2b 1b call 4001a9e8 <_init> 4000fd80: 01 00 00 00 nop #if defined(__USE__MAIN__) if (!doneCons && _main) __main (); #endif switch ( executing->Start.prototype ) { 4000fd84: c2 06 a0 ac ld [ %i2 + 0xac ], %g1 4000fd88: 80 a0 60 01 cmp %g1, 1 4000fd8c: 12 bf ff e1 bne 4000fd10 <_Thread_Handler+0x7c> 4000fd90: 01 00 00 00 nop (*(Thread_Entry_numeric) executing->Start.entry_point)( executing->Start.numeric_argument ); break; case THREAD_START_POINTER: executing->Wait.return_argument = 4000fd94: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 4000fd98: d0 06 a0 b0 ld [ %i2 + 0xb0 ], %o0 4000fd9c: 9f c0 40 00 call %g1 4000fda0: b0 10 20 00 clr %i0 4000fda4: d0 26 a0 28 st %o0, [ %i2 + 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 ); 4000fda8: 90 10 00 1a mov %i2, %o0 4000fdac: 7f ff ee 3c call 4000b69c <_User_extensions_Thread_exitted> 4000fdb0: b2 10 20 01 mov 1, %i1 _Internal_error_Occurred( 4000fdb4: 7f ff e2 d3 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fdb8: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED _Thread_Dispatch(); 4000fdbc: 7f ff e9 77 call 4000a398 <_Thread_Dispatch> 4000fdc0: 01 00 00 00 nop /* * _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) */ 4000fdc4: 10 bf ff cb b 4000fcf0 <_Thread_Handler+0x5c> 4000fdc8: 83 2e 60 18 sll %i1, 0x18, %g1 (*(Thread_Entry_pointer) executing->Start.entry_point)( executing->Start.pointer_argument ); break; case THREAD_START_BOTH_POINTER_FIRST: executing->Wait.return_argument = 4000fdcc: c2 06 a0 a8 ld [ %i2 + 0xa8 ], %g1 <== NOT EXECUTED 4000fdd0: d0 1e a0 b0 ldd [ %i2 + 0xb0 ], %o0 <== NOT EXECUTED 4000fdd4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000fdd8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000fddc: d0 26 a0 28 st %o0, [ %i2 + 0x28 ] <== NOT EXECUTED * 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 ); 4000fde0: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED 4000fde4: 7f ff ee 2e call 4000b69c <_User_extensions_Thread_exitted> <== NOT EXECUTED 4000fde8: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED _Internal_error_Occurred( 4000fdec: 7f ff e2 c5 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000fdf0: 95 e8 20 06 restore %g0, 6, %o2 <== NOT EXECUTED 4000fdf4: 01 00 00 00 nop 4000a6b4 <_Thread_Handler_initialization>: void _Thread_Handler_initialization( uint32_t ticks_per_timeslice, uint32_t maximum_extensions, uint32_t maximum_proxies ) { 4000a6b4: 9d e3 bf 90 save %sp, -112, %sp /* * BOTH stacks hooks must be set or both must be NULL. * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) 4000a6b8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a6bc: 82 10 61 f4 or %g1, 0x1f4, %g1 ! 4001bdf4 <_CPU_Table> 4000a6c0: c4 00 60 20 ld [ %g1 + 0x20 ], %g2 4000a6c4: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 4000a6c8: 80 a0 00 02 cmp %g0, %g2 4000a6cc: 88 60 3f ff subx %g0, -1, %g4 4000a6d0: 80 a0 00 03 cmp %g0, %g3 4000a6d4: 82 60 3f ff subx %g0, -1, %g1 4000a6d8: 80 a1 00 01 cmp %g4, %g1 4000a6dc: 12 80 00 2c bne 4000a78c <_Thread_Handler_initialization+0xd8> 4000a6e0: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a6e4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Thread_Executing = NULL; 4000a6e8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a6ec: c0 20 62 cc clr [ %g1 + 0x2cc ] _Thread_Executing = NULL; 4000a6f0: c0 20 a2 bc clr [ %g2 + 0x2bc ] _Thread_Heir = NULL; 4000a6f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 4000a6f8: 05 10 00 6f sethi %hi(0x4001bc00), %g2 INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; _Thread_Executing = NULL; _Thread_Heir = NULL; 4000a6fc: c0 20 62 94 clr [ %g1 + 0x294 ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; 4000a700: c0 20 a2 ac clr [ %g2 + 0x2ac ] _Thread_Maximum_extensions = maximum_extensions; 4000a704: 03 10 00 6f sethi %hi(0x4001bc00), %g1 _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4000a708: 05 10 00 6f sethi %hi(0x4001bc00), %g2 _Thread_Allocated_fp = NULL; #endif _Thread_Do_post_task_switch_extension = 0; _Thread_Maximum_extensions = maximum_extensions; 4000a70c: f2 20 62 a8 st %i1, [ %g1 + 0x2a8 ] _Thread_Ticks_per_timeslice = ticks_per_timeslice; 4000a710: f0 20 a1 38 st %i0, [ %g2 + 0x138 ] _Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error( 4000a714: 40 00 05 13 call 4000bb60 <_Workspace_Allocate_or_fatal_error> 4000a718: 90 10 2c 00 mov 0xc00, %o0 4000a71c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a720: 84 10 00 08 mov %o0, %g2 4000a724: d0 20 61 34 st %o0, [ %g1 + 0x134 ] 4000a728: 86 02 2c 00 add %o0, 0xc00, %g3 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a72c: 82 00 a0 04 add %g2, 4, %g1 the_chain->permanent_null = NULL; 4000a730: c0 20 a0 04 clr [ %g2 + 4 ] the_chain->last = _Chain_Head(the_chain); 4000a734: c4 20 a0 08 st %g2, [ %g2 + 8 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a738: c2 20 80 00 st %g1, [ %g2 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000a73c: 84 00 a0 0c add %g2, 0xc, %g2 (PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control) ); for ( index=0; index <= PRIORITY_MAXIMUM ; index++ ) 4000a740: 80 a0 80 03 cmp %g2, %g3 4000a744: 12 bf ff fb bne 4000a730 <_Thread_Handler_initialization+0x7c> 4000a748: 82 00 a0 04 add %g2, 4, %g1 /* * Initialize this class of objects. */ _Objects_Initialize_information( 4000a74c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000a750: c4 00 62 e8 ld [ %g1 + 0x2e8 ], %g2 ! 4001bee8 <_System_state_Is_multiprocessing> 4000a754: 82 10 20 08 mov 8, %g1 4000a758: 80 a0 00 02 cmp %g0, %g2 4000a75c: 96 10 20 02 mov 2, %o3 4000a760: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 4000a764: 96 42 ff ff addx %o3, -1, %o3 4000a768: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a76c: 92 10 20 01 mov 1, %o1 4000a770: 90 12 23 70 or %o0, 0x370, %o0 4000a774: 94 10 20 01 mov 1, %o2 4000a778: 98 10 21 80 mov 0x180, %o4 4000a77c: 7f ff fa 06 call 40008f94 <_Objects_Initialize_information> 4000a780: 9a 10 20 01 mov 1, %o5 FALSE, /* TRUE if this is a global object class */ NULL /* Proxy extraction support callout */ #endif ); } 4000a784: 81 c7 e0 08 ret 4000a788: 81 e8 00 00 restore * Do not allow mixture. */ if ( !( ( _CPU_Table.stack_allocate_hook == 0 ) == ( _CPU_Table.stack_free_hook == 0 ) ) ) _Internal_error_Occurred( 4000a78c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000a790: 7f ff f8 5c call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000a794: 94 10 20 0f mov 0xf, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_BAD_STACK_HOOK ); _Context_Switch_necessary = FALSE; 4000a798: 10 bf ff d4 b 4000a6e8 <_Thread_Handler_initialization+0x34> <== NOT EXECUTED 4000a79c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a4f8 <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { 4000a4f8: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the Ada self pointer */ the_thread->rtems_ada_self = NULL; 4000a4fc: c0 26 60 80 clr [ %i1 + 0x80 ] /* * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { 4000a500: 80 a6 a0 00 cmp %i2, 0 4000a504: 02 80 00 59 be 4000a668 <_Thread_Initialize+0x170> 4000a508: e2 07 a0 60 ld [ %fp + 0x60 ], %l1 stack = the_thread->Start.stack; the_thread->Start.core_allocated_stack = TRUE; } else { stack = stack_area; actual_stack_size = stack_size; the_thread->Start.core_allocated_stack = FALSE; 4000a50c: c0 26 60 cc clr [ %i1 + 0xcc ] <== NOT EXECUTED 4000a510: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { 4000a514: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000a518: d2 04 22 a8 ld [ %l0 + 0x2a8 ], %o1 ! 4001bea8 <_Thread_Maximum_extensions> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; 4000a51c: f4 26 60 d4 st %i2, [ %i1 + 0xd4 ] the_stack->size = size; 4000a520: d0 26 60 d0 st %o0, [ %i1 + 0xd0 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000a524: c0 26 60 50 clr [ %i1 + 0x50 ] the_watchdog->routine = routine; 4000a528: c0 26 60 64 clr [ %i1 + 0x64 ] the_watchdog->id = id; 4000a52c: c0 26 60 68 clr [ %i1 + 0x68 ] the_watchdog->user_data = user_data; 4000a530: c0 26 60 6c clr [ %i1 + 0x6c ] 4000a534: 80 a2 60 00 cmp %o1, 0 4000a538: 12 80 00 38 bne 4000a618 <_Thread_Initialize+0x120> 4000a53c: c0 26 61 68 clr [ %i1 + 0x168 ] return FALSE; } } else extensions_area = NULL; the_thread->extensions = (void **) extensions_area; 4000a540: c0 26 61 78 clr [ %i1 + 0x178 ] 4000a544: b6 10 20 00 clr %i3 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a548: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 the_thread->Start.budget_algorithm = budget_algorithm; 4000a54c: e2 26 60 bc st %l1, [ %i1 + 0xbc ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a550: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ] the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; 4000a554: c2 07 a0 64 ld [ %fp + 0x64 ], %g1 switch ( budget_algorithm ) { 4000a558: 80 a4 60 02 cmp %l1, 2 4000a55c: 12 80 00 05 bne 4000a570 <_Thread_Initialize+0x78> 4000a560: c2 26 60 c0 st %g1, [ %i1 + 0xc0 ] case THREAD_CPU_BUDGET_ALGORITHM_NONE: case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE: break; case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 4000a564: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a568: c4 00 61 38 ld [ %g1 + 0x138 ], %g2 ! 4001bd38 <_Thread_Ticks_per_timeslice> <== NOT EXECUTED 4000a56c: c4 26 60 84 st %g2, [ %i1 + 0x84 ] <== NOT EXECUTED break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 4000a570: c2 07 a0 68 ld [ %fp + 0x68 ], %g1 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; 4000a574: c0 26 60 44 clr [ %i1 + 0x44 ] break; case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; } the_thread->Start.isr_level = isr_level; 4000a578: c2 26 60 c4 st %g1, [ %i1 + 0xc4 ] the_thread->current_state = STATES_DORMANT; 4000a57c: 82 10 20 01 mov 1, %g1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; 4000a580: c0 26 60 1c clr [ %i1 + 0x1c ] break; } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; 4000a584: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->suspend_count = 0; 4000a588: c0 26 60 70 clr [ %i1 + 0x70 ] the_thread->real_priority = priority; 4000a58c: fa 26 60 18 st %i5, [ %i1 + 0x18 ] the_thread->Start.initial_priority = priority; 4000a590: fa 26 60 c8 st %i5, [ %i1 + 0xc8 ] _Thread_Set_priority( the_thread, priority ); 4000a594: 92 10 00 1d mov %i5, %o1 4000a598: 40 00 02 76 call 4000af70 <_Thread_Set_priority> 4000a59c: 90 10 00 19 mov %i1, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000a5a0: c4 06 60 08 ld [ %i1 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000a5a4: c6 16 20 10 lduh [ %i0 + 0x10 ], %g3 /* * Initialize the CPU usage statistics */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS the_thread->cpu_time_used.tv_sec = 0; 4000a5a8: c0 26 60 90 clr [ %i1 + 0x90 ] 4000a5ac: 03 00 00 3f sethi %hi(0xfc00), %g1 4000a5b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000a5b4: 82 08 80 01 and %g2, %g1, %g1 4000a5b8: 80 a0 40 03 cmp %g1, %g3 4000a5bc: 08 80 00 13 bleu 4000a608 <_Thread_Initialize+0x110> 4000a5c0: c0 26 60 94 clr [ %i1 + 0x94 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000a5c4: c2 07 a0 6c ld [ %fp + 0x6c ], %g1 /* * Invoke create extensions */ if ( !_User_extensions_Thread_create( the_thread ) ) { 4000a5c8: 90 10 00 19 mov %i1, %o0 4000a5cc: c2 26 60 0c st %g1, [ %i1 + 0xc ] 4000a5d0: 40 00 04 46 call 4000b6e8 <_User_extensions_Thread_create> 4000a5d4: b0 10 20 01 mov 1, %i0 4000a5d8: 80 a2 20 00 cmp %o0, 0 4000a5dc: 12 80 00 34 bne 4000a6ac <_Thread_Initialize+0x1b4> 4000a5e0: 80 a6 e0 00 cmp %i3, 0 if ( extensions_area ) 4000a5e4: 02 80 00 05 be 4000a5f8 <_Thread_Initialize+0x100> <== NOT EXECUTED 4000a5e8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 <== NOT EXECUTED 4000a5ec: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000a5f0: 7f ff f7 c4 call 40008500 <_Heap_Free> <== NOT EXECUTED 4000a5f4: 90 12 22 2c or %o0, 0x22c, %o0 <== NOT EXECUTED #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 4000a5f8: 40 00 03 22 call 4000b280 <_Thread_Stack_Free> <== NOT EXECUTED 4000a5fc: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000a600: 81 c7 e0 08 ret 4000a604: 91 e8 20 00 restore %g0, 0, %o0 uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 4000a608: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 4000a60c: 83 28 60 02 sll %g1, 2, %g1 4000a610: 10 bf ff ed b 4000a5c4 <_Thread_Initialize+0xcc> 4000a614: f2 20 80 01 st %i1, [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000a618: 92 02 60 01 inc %o1 4000a61c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a620: 93 2a 60 02 sll %o1, 2, %o1 4000a624: 7f ff f7 85 call 40008438 <_Heap_Allocate> 4000a628: 90 12 22 2c or %o0, 0x22c, %o0 if ( _Thread_Maximum_extensions ) { extensions_area = _Workspace_Allocate( (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) { 4000a62c: b6 92 20 00 orcc %o0, 0, %i3 4000a630: 02 80 00 1c be 4000a6a0 <_Thread_Initialize+0x1a8> 4000a634: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 4000a638: 80 a0 7f ff cmp %g1, -1 4000a63c: 02 bf ff c3 be 4000a548 <_Thread_Initialize+0x50> 4000a640: f6 26 61 78 st %i3, [ %i1 + 0x178 ] 4000a644: 86 00 60 01 add %g1, 1, %g3 4000a648: 84 10 20 00 clr %g2 the_thread->extensions[i] = NULL; 4000a64c: 83 28 a0 02 sll %g2, 2, %g1 * call. */ if ( the_thread->extensions ) { int i; for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ ) 4000a650: 84 00 a0 01 inc %g2 4000a654: 80 a0 80 03 cmp %g2, %g3 4000a658: 12 bf ff fd bne 4000a64c <_Thread_Initialize+0x154> 4000a65c: c0 26 c0 01 clr [ %i3 + %g1 ] /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; 4000a660: 10 bf ff bb b 4000a54c <_Thread_Initialize+0x54> 4000a664: c2 07 a0 5c ld [ %fp + 0x5c ], %g1 * Allocate and Initialize the stack for this thread. */ if ( !stack_area ) { if ( !_Stack_Is_enough( stack_size ) ) 4000a668: 80 a6 ef ff cmp %i3, 0xfff 4000a66c: 08 80 00 03 bleu 4000a678 <_Thread_Initialize+0x180> 4000a670: 13 00 00 04 sethi %hi(0x1000), %o1 4000a674: 92 10 00 1b mov %i3, %o1 actual_stack_size = STACK_MINIMUM_SIZE; else actual_stack_size = stack_size; actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size ); 4000a678: 40 00 02 e7 call 4000b214 <_Thread_Stack_Allocate> 4000a67c: 90 10 00 19 mov %i1, %o0 if ( !actual_stack_size || actual_stack_size < stack_size ) 4000a680: 80 a2 20 00 cmp %o0, 0 4000a684: 02 bf ff df be 4000a600 <_Thread_Initialize+0x108> 4000a688: 80 a6 c0 08 cmp %i3, %o0 4000a68c: 18 bf ff dd bgu 4000a600 <_Thread_Initialize+0x108> 4000a690: 82 10 20 01 mov 1, %g1 return FALSE; /* stack allocation failed */ stack = the_thread->Start.stack; 4000a694: f4 06 60 d8 ld [ %i1 + 0xd8 ], %i2 the_thread->Start.core_allocated_stack = TRUE; 4000a698: 10 bf ff 9f b 4000a514 <_Thread_Initialize+0x1c> 4000a69c: c2 26 60 cc st %g1, [ %i1 + 0xcc ] #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); 4000a6a0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4000a6a4: 40 00 02 f7 call 4000b280 <_Thread_Stack_Free> <== NOT EXECUTED 4000a6a8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000a6ac: 81 c7 e0 08 ret 4000a6b0: 81 e8 00 00 restore 4000fc28 <_Thread_Reset>: void _Thread_Reset( Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { 4000fc28: 9d e3 bf 98 save %sp, -104, %sp the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000fc2c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 the_thread->budget_algorithm = the_thread->Start.budget_algorithm; 4000fc30: c4 06 20 bc ld [ %i0 + 0xbc ], %g2 the_thread->budget_callout = the_thread->Start.budget_callout; 4000fc34: c6 06 20 c0 ld [ %i0 + 0xc0 ], %g3 uint32_t numeric_argument ) { the_thread->resource_count = 0; the_thread->suspend_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; 4000fc38: c2 26 20 7c st %g1, [ %i0 + 0x7c ] the_thread->budget_algorithm = the_thread->Start.budget_algorithm; the_thread->budget_callout = the_thread->Start.budget_callout; 4000fc3c: c4 3e 20 88 std %g2, [ %i0 + 0x88 ] the_thread->Start.pointer_argument = pointer_argument; 4000fc40: f2 26 20 b0 st %i1, [ %i0 + 0xb0 ] the_thread->Start.numeric_argument = numeric_argument; 4000fc44: f4 26 20 b4 st %i2, [ %i0 + 0xb4 ] Thread_Control *the_thread, void *pointer_argument, uint32_t numeric_argument ) { the_thread->resource_count = 0; 4000fc48: c0 26 20 1c clr [ %i0 + 0x1c ] the_thread->suspend_count = 0; 4000fc4c: c0 26 20 70 clr [ %i0 + 0x70 ] the_thread->budget_callout = the_thread->Start.budget_callout; the_thread->Start.pointer_argument = pointer_argument; the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { 4000fc50: 7f ff ef 4f call 4000b98c <_Thread_queue_Extract_with_proxy> 4000fc54: 90 10 00 18 mov %i0, %o0 4000fc58: 80 a2 20 00 cmp %o0, 0 4000fc5c: 32 80 00 07 bne,a 4000fc78 <_Thread_Reset+0x50> 4000fc60: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 if ( _Watchdog_Is_active( &the_thread->Timer ) ) 4000fc64: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000fc68: 80 a0 60 02 cmp %g1, 2 4000fc6c: 02 80 00 0c be 4000fc9c <_Thread_Reset+0x74> 4000fc70: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000fc74: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 4000fc78: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 4000fc7c: 80 a0 40 19 cmp %g1, %i1 4000fc80: 02 80 00 05 be 4000fc94 <_Thread_Reset+0x6c> 4000fc84: 01 00 00 00 nop the_thread->real_priority = the_thread->Start.initial_priority; 4000fc88: f2 26 20 18 st %i1, [ %i0 + 0x18 ] _Thread_Set_priority( the_thread, the_thread->Start.initial_priority ); 4000fc8c: 7f ff f0 01 call 4000bc90 <_Thread_Set_priority> 4000fc90: 81 e8 00 00 restore 4000fc94: 81 c7 e0 08 ret 4000fc98: 81 e8 00 00 restore the_thread->Start.numeric_argument = numeric_argument; if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) { if ( _Watchdog_Is_active( &the_thread->Timer ) ) (void) _Watchdog_Remove( &the_thread->Timer ); 4000fc9c: 7f ff f2 ac call 4000c74c <_Watchdog_Remove> <== NOT EXECUTED 4000fca0: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED } if ( the_thread->current_priority != the_thread->Start.initial_priority ) { 4000fca4: 10 bf ff f5 b 4000fc78 <_Thread_Reset+0x50> <== NOT EXECUTED 4000fca8: f2 06 20 c8 ld [ %i0 + 0xc8 ], %i1 <== NOT EXECUTED 4000ee30 <_Thread_Reset_timeslice>: * ready chain * select heir */ void _Thread_Reset_timeslice( void ) { 4000ee30: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000ee34: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ee38: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000ee3c: 7f ff cc 6b call 40001fe8 4000ee40: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000ee44: b0 10 00 08 mov %o0, %i0 if ( _Chain_Has_only_one_node( ready ) ) { 4000ee48: c4 04 40 00 ld [ %l1 ], %g2 4000ee4c: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000ee50: 80 a0 80 01 cmp %g2, %g1 4000ee54: 32 80 00 04 bne,a 4000ee64 <_Thread_Reset_timeslice+0x34> 4000ee58: c6 04 00 00 ld [ %l0 ], %g3 _ISR_Enable( level ); 4000ee5c: 7f ff cc 67 call 40001ff8 4000ee60: 81 e8 00 00 restore { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000ee64: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000ee68: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000ee6c: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000ee70: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000ee74: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000ee78: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000ee7c: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000ee80: 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; 4000ee84: e0 20 40 00 st %l0, [ %g1 ] return; } _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000ee88: 7f ff cc 5c call 40001ff8 4000ee8c: 01 00 00 00 nop 4000ee90: 7f ff cc 56 call 40001fe8 4000ee94: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000ee98: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000ee9c: c2 00 a2 94 ld [ %g2 + 0x294 ], %g1 ! 4001be94 <_Thread_Heir> 4000eea0: 80 a4 00 01 cmp %l0, %g1 4000eea4: 32 80 00 05 bne,a 4000eeb8 <_Thread_Reset_timeslice+0x88> 4000eea8: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000eeac: c2 04 40 00 ld [ %l1 ], %g1 4000eeb0: c2 20 a2 94 st %g1, [ %g2 + 0x294 ] _Context_Switch_necessary = TRUE; 4000eeb4: 84 10 20 01 mov 1, %g2 4000eeb8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000eebc: c4 20 62 cc st %g2, [ %g1 + 0x2cc ] ! 4001becc <_Context_Switch_necessary> _ISR_Enable( level ); 4000eec0: 7f ff cc 4e call 40001ff8 4000eec4: 81 e8 00 00 restore 4000eec8: 01 00 00 00 nop 4000cac4 <_Thread_Resume>: void _Thread_Resume( Thread_Control *the_thread, boolean force ) { 4000cac4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; States_Control current_state; _ISR_Disable( level ); 4000cac8: 7f ff d8 90 call 40002d08 4000cacc: 01 00 00 00 nop 4000cad0: a0 10 00 08 mov %o0, %l0 if ( force == TRUE ) 4000cad4: 80 a6 60 01 cmp %i1, 1 4000cad8: 22 80 00 13 be,a 4000cb24 <_Thread_Resume+0x60> 4000cadc: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 the_thread->suspend_count = 0; else the_thread->suspend_count--; 4000cae0: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED 4000cae4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if ( the_thread->suspend_count > 0 ) { 4000cae8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000caec: 12 80 00 0c bne 4000cb1c <_Thread_Resume+0x58> <== NOT EXECUTED 4000caf0: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED _ISR_Enable( level ); return; } current_state = the_thread->current_state; 4000caf4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if ( current_state & STATES_SUSPENDED ) { 4000caf8: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 4000cafc: 02 80 00 06 be 4000cb14 <_Thread_Resume+0x50> <== NOT EXECUTED 4000cb00: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE States_Control _States_Clear ( States_Control states_to_clear, States_Control current_state ) { return (current_state & ~states_to_clear); 4000cb04: 82 08 7f fd and %g1, -3, %g1 <== NOT EXECUTED current_state = the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state); if ( _States_Is_ready( current_state ) ) { 4000cb08: 80 a0 60 00 cmp %g1, 0 4000cb0c: 02 80 00 0b be 4000cb38 <_Thread_Resume+0x74> 4000cb10: c2 26 20 10 st %g1, [ %i0 + 0x10 ] _Context_Switch_necessary = TRUE; } } } _ISR_Enable( level ); 4000cb14: 7f ff d8 81 call 40002d18 4000cb18: 91 e8 00 10 restore %g0, %l0, %o0 the_thread->suspend_count = 0; else the_thread->suspend_count--; if ( the_thread->suspend_count > 0 ) { _ISR_Enable( level ); 4000cb1c: 7f ff d8 7f call 40002d18 <== NOT EXECUTED 4000cb20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return; } current_state = the_thread->current_state; if ( current_state & STATES_SUSPENDED ) { 4000cb24: 80 88 60 02 btst 2, %g1 4000cb28: 02 bf ff fb be 4000cb14 <_Thread_Resume+0x50> 4000cb2c: c0 26 20 70 clr [ %i0 + 0x70 ] 4000cb30: 10 bf ff f6 b 4000cb08 <_Thread_Resume+0x44> 4000cb34: 82 08 7f fd and %g1, -3, %g1 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000cb38: c8 06 20 9c ld [ %i0 + 0x9c ], %g4 4000cb3c: c4 16 20 a2 lduh [ %i0 + 0xa2 ], %g2 4000cb40: c2 11 00 00 lduh [ %g4 ], %g1 if ( _States_Is_ready( current_state ) ) { _Priority_Add_to_bit_map( &the_thread->Priority_map ); _Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node); 4000cb44: c6 06 20 98 ld [ %i0 + 0x98 ], %g3 4000cb48: 82 10 40 02 or %g1, %g2, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000cb4c: 1b 10 00 a2 sethi %hi(0x40028800), %o5 RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map ( Priority_Information *the_priority_map ) { *the_priority_map->minor |= the_priority_map->ready_minor; 4000cb50: c2 31 00 00 sth %g1, [ %g4 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000cb54: 82 00 e0 04 add %g3, 4, %g1 _Priority_Major_bit_map |= the_priority_map->ready_major; 4000cb58: d8 16 20 a0 lduh [ %i0 + 0xa0 ], %o4 4000cb5c: c2 26 00 00 st %g1, [ %i0 ] 4000cb60: c4 13 63 d0 lduh [ %o5 + 0x3d0 ], %g2 old_last_node = the_chain->last; 4000cb64: c8 00 e0 08 ld [ %g3 + 8 ], %g4 the_chain->last = the_node; 4000cb68: f0 20 e0 08 st %i0, [ %g3 + 8 ] 4000cb6c: 84 10 80 0c or %g2, %o4, %g2 old_last_node->next = the_node; the_node->previous = old_last_node; 4000cb70: c8 26 20 04 st %g4, [ %i0 + 4 ] 4000cb74: c4 33 63 d0 sth %g2, [ %o5 + 0x3d0 ] 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; 4000cb78: f0 21 00 00 st %i0, [ %g4 ] _ISR_Flash( level ); 4000cb7c: 7f ff d8 67 call 40002d18 4000cb80: 90 10 00 10 mov %l0, %o0 4000cb84: 7f ff d8 61 call 40002d08 4000cb88: 01 00 00 00 nop if ( the_thread->current_priority < _Thread_Heir->current_priority ) { 4000cb8c: 09 10 00 a2 sethi %hi(0x40028800), %g4 4000cb90: c4 01 23 b4 ld [ %g4 + 0x3b4 ], %g2 ! 40028bb4 <_Thread_Heir> 4000cb94: c6 06 20 14 ld [ %i0 + 0x14 ], %g3 4000cb98: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4000cb9c: 80 a0 c0 01 cmp %g3, %g1 4000cba0: 1a bf ff dd bcc 4000cb14 <_Thread_Resume+0x50> 4000cba4: 01 00 00 00 nop _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000cba8: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000cbac: c4 00 63 dc ld [ %g1 + 0x3dc ], %g2 ! 40028bdc <_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; 4000cbb0: f0 21 23 b4 st %i0, [ %g4 + 0x3b4 ] if ( _Thread_Executing->is_preemptible || 4000cbb4: c2 00 a0 7c ld [ %g2 + 0x7c ], %g1 4000cbb8: 80 a0 60 00 cmp %g1, 0 4000cbbc: 02 80 00 06 be 4000cbd4 <_Thread_Resume+0x110> 4000cbc0: 80 a0 e0 00 cmp %g3, 0 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000cbc4: 84 10 20 01 mov 1, %g2 4000cbc8: 03 10 00 a2 sethi %hi(0x40028800), %g1 4000cbcc: c4 20 63 ec st %g2, [ %g1 + 0x3ec ] ! 40028bec <_Context_Switch_necessary> 4000cbd0: 30 bf ff d1 b,a 4000cb14 <_Thread_Resume+0x50> _ISR_Flash( level ); if ( the_thread->current_priority < _Thread_Heir->current_priority ) { _Thread_Heir = the_thread; if ( _Thread_Executing->is_preemptible || 4000cbd4: 12 bf ff d0 bne 4000cb14 <_Thread_Resume+0x50> 4000cbd8: 84 10 20 01 mov 1, %g2 the_thread->current_priority == 0 ) _Context_Switch_necessary = TRUE; 4000cbdc: 10 bf ff fc b 4000cbcc <_Thread_Resume+0x108> <== NOT EXECUTED 4000cbe0: 03 10 00 a2 sethi %hi(0x40028800), %g1 <== NOT EXECUTED 4000b214 <_Thread_Stack_Allocate>: size_t _Thread_Stack_Allocate( Thread_Control *the_thread, size_t stack_size ) { 4000b214: 9d e3 bf 98 save %sp, -104, %sp void *stack_addr = 0; size_t the_stack_size = stack_size; if ( !_Stack_Is_enough( the_stack_size ) ) 4000b218: 80 a6 6f ff cmp %i1, 0xfff 4000b21c: 28 80 00 02 bleu,a 4000b224 <_Thread_Stack_Allocate+0x10> 4000b220: 33 00 00 04 sethi %hi(0x1000), %i1 <== NOT EXECUTED * Call ONLY the CPU table stack allocate hook, _or_ the * the RTEMS workspace allocate. This is so the stack free * routine can call the correct deallocation routine. */ if ( _CPU_Table.stack_allocate_hook ) { 4000b224: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b228: c2 00 62 14 ld [ %g1 + 0x214 ], %g1 ! 4001be14 <_CPU_Table+0x20> 4000b22c: 80 a0 60 00 cmp %g1, 0 4000b230: 02 80 00 0a be 4000b258 <_Thread_Stack_Allocate+0x44> 4000b234: 92 06 60 10 add %i1, 0x10, %o1 stack_addr = (*_CPU_Table.stack_allocate_hook)( the_stack_size ); 4000b238: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b23c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000b240: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] <== NOT EXECUTED the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 4000b244: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4000b248: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000b24c: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED 4000b250: 81 c7 e0 08 ret <== NOT EXECUTED 4000b254: 81 e8 00 00 restore <== NOT EXECUTED 4000b258: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000b25c: b2 10 00 09 mov %o1, %i1 4000b260: 7f ff f4 76 call 40008438 <_Heap_Allocate> 4000b264: 90 12 22 2c or %o0, 0x22c, %o0 } if ( !stack_addr ) the_stack_size = 0; the_thread->Start.stack = stack_addr; 4000b268: d0 26 20 d8 st %o0, [ %i0 + 0xd8 ] the_stack_size = _Stack_Adjust_size( the_stack_size ); stack_addr = _Workspace_Allocate( the_stack_size ); } if ( !stack_addr ) 4000b26c: 80 a0 00 08 cmp %g0, %o0 4000b270: b0 60 20 00 subx %g0, 0, %i0 the_stack_size = 0; the_thread->Start.stack = stack_addr; return the_stack_size; } 4000b274: b0 0e 40 18 and %i1, %i0, %i0 4000b278: 81 c7 e0 08 ret 4000b27c: 81 e8 00 00 restore 4000b280 <_Thread_Stack_Free>: */ void _Thread_Stack_Free( Thread_Control *the_thread ) { 4000b280: 9d e3 bf 98 save %sp, -104, %sp /* * If the API provided the stack space, then don't free it. */ if ( !the_thread->Start.core_allocated_stack ) 4000b284: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 4000b288: 80 a0 60 00 cmp %g1, 0 4000b28c: 02 80 00 08 be 4000b2ac <_Thread_Stack_Free+0x2c> 4000b290: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * Call ONLY the CPU table stack free hook, or the * the RTEMS workspace free. This is so the free * routine properly matches the allocation of the stack. */ if ( _CPU_Table.stack_free_hook ) 4000b294: c2 00 62 18 ld [ %g1 + 0x218 ], %g1 ! 4001be18 <_CPU_Table+0x24> 4000b298: 80 a0 60 00 cmp %g1, 0 4000b29c: 22 80 00 06 be,a 4000b2b4 <_Thread_Stack_Free+0x34> 4000b2a0: f2 06 20 d4 ld [ %i0 + 0xd4 ], %i1 (*_CPU_Table.stack_free_hook)( the_thread->Start.Initial_stack.area ); 4000b2a4: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b2a8: d0 06 20 d4 ld [ %i0 + 0xd4 ], %o0 <== NOT EXECUTED 4000b2ac: 81 c7 e0 08 ret <== NOT EXECUTED 4000b2b0: 81 e8 00 00 restore <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4000b2b4: 31 10 00 6f sethi %hi(0x4001bc00), %i0 4000b2b8: 7f ff f4 92 call 40008500 <_Heap_Free> 4000b2bc: 91 ee 22 2c restore %i0, 0x22c, %o0 4000b2c0: 01 00 00 00 nop 4000b3f8 <_Thread_Yield_processor>: * ready chain * select heir */ void _Thread_Yield_processor( void ) { 4000b3f8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *executing; Chain_Control *ready; executing = _Thread_Executing; 4000b3fc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b400: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 ! 4001bebc <_Thread_Executing> ready = executing->ready; _ISR_Disable( level ); 4000b404: 7f ff da f9 call 40001fe8 4000b408: e2 04 20 98 ld [ %l0 + 0x98 ], %l1 4000b40c: b0 10 00 08 mov %o0, %i0 if ( !_Chain_Has_only_one_node( ready ) ) { 4000b410: c4 04 40 00 ld [ %l1 ], %g2 4000b414: c2 04 60 08 ld [ %l1 + 8 ], %g1 4000b418: 80 a0 80 01 cmp %g2, %g1 4000b41c: 12 80 00 0b bne 4000b448 <_Thread_Yield_processor+0x50> 4000b420: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( _Thread_Is_heir( executing ) ) _Thread_Heir = (Thread_Control *) ready->first; _Context_Switch_necessary = TRUE; } else if ( !_Thread_Is_heir( executing ) ) 4000b424: c4 00 62 94 ld [ %g1 + 0x294 ], %g2 ! 4001be94 <_Thread_Heir> 4000b428: 80 a4 00 02 cmp %l0, %g2 4000b42c: 02 80 00 05 be 4000b440 <_Thread_Yield_processor+0x48> 4000b430: 01 00 00 00 nop _Context_Switch_necessary = TRUE; 4000b434: 84 10 20 01 mov 1, %g2 ! 1 4000b438: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b43c: c4 20 62 cc st %g2, [ %g1 + 0x2cc ] ! 4001becc <_Context_Switch_necessary> _ISR_Enable( level ); 4000b440: 7f ff da ee call 40001ff8 4000b444: 81 e8 00 00 restore ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000b448: c6 04 00 00 ld [ %l0 ], %g3 previous = the_node->previous; 4000b44c: c4 04 20 04 ld [ %l0 + 4 ], %g2 Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b450: 82 04 60 04 add %l1, 4, %g1 Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; previous->next = next; 4000b454: c6 20 80 00 st %g3, [ %g2 ] Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000b458: c2 24 00 00 st %g1, [ %l0 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000b45c: c4 20 e0 04 st %g2, [ %g3 + 4 ] ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); old_last_node = the_chain->last; 4000b460: c2 04 60 08 ld [ %l1 + 8 ], %g1 the_chain->last = the_node; 4000b464: e0 24 60 08 st %l0, [ %l1 + 8 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000b468: 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; 4000b46c: e0 20 40 00 st %l0, [ %g1 ] _ISR_Disable( level ); if ( !_Chain_Has_only_one_node( ready ) ) { _Chain_Extract_unprotected( &executing->Object.Node ); _Chain_Append_unprotected( ready, &executing->Object.Node ); _ISR_Flash( level ); 4000b470: 7f ff da e2 call 40001ff8 4000b474: 01 00 00 00 nop 4000b478: 7f ff da dc call 40001fe8 4000b47c: 01 00 00 00 nop if ( _Thread_Is_heir( executing ) ) 4000b480: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000b484: c2 00 a2 94 ld [ %g2 + 0x294 ], %g1 ! 4001be94 <_Thread_Heir> 4000b488: 80 a4 00 01 cmp %l0, %g1 4000b48c: 32 bf ff eb bne,a 4000b438 <_Thread_Yield_processor+0x40> 4000b490: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED _Thread_Heir = (Thread_Control *) ready->first; 4000b494: c2 04 40 00 ld [ %l1 ], %g1 4000b498: 10 bf ff e7 b 4000b434 <_Thread_Yield_processor+0x3c> 4000b49c: c2 20 a2 94 st %g1, [ %g2 + 0x294 ] 4000a7a0 <_Thread_queue_Dequeue>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000a7a0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000a7a4: 80 a0 60 00 cmp %g1, 0 4000a7a8: 12 80 00 05 bne 4000a7bc <_Thread_queue_Dequeue+0x1c> 4000a7ac: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); 4000a7b0: 82 13 c0 00 mov %o7, %g1 4000a7b4: 40 00 10 97 call 4000ea10 <_Thread_queue_Dequeue_fifo> 4000a7b8: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000a7bc: 02 80 00 04 be 4000a7cc <_Thread_queue_Dequeue+0x2c> 4000a7c0: 01 00 00 00 nop the_thread = NULL; break; } return( the_thread ); } 4000a7c4: 81 c3 e0 08 retl <== NOT EXECUTED 4000a7c8: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_Dequeue_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_Dequeue_priority( the_thread_queue ); 4000a7cc: 82 13 c0 00 mov %o7, %g1 4000a7d0: 40 00 00 03 call 4000a7dc <_Thread_queue_Dequeue_priority> 4000a7d4: 9e 10 40 00 mov %g1, %o7 4000a7d8: 01 00 00 00 nop 4000ea10 <_Thread_queue_Dequeue_fifo>: */ Thread_Control *_Thread_queue_Dequeue_fifo( Thread_queue_Control *the_thread_queue ) { 4000ea10: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_Control *the_thread; _ISR_Disable( level ); 4000ea14: 7f ff cd 75 call 40001fe8 4000ea18: a0 10 00 18 mov %i0, %l0 4000ea1c: 84 10 00 08 mov %o0, %g2 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ea20: f0 06 00 00 ld [ %i0 ], %i0 if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) { 4000ea24: 82 04 20 04 add %l0, 4, %g1 4000ea28: 80 a6 00 01 cmp %i0, %g1 4000ea2c: 22 80 00 1d be,a 4000eaa0 <_Thread_queue_Dequeue_fifo+0x90> 4000ea30: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 4000ea34: c2 06 00 00 ld [ %i0 ], %g1 the_chain->first = new_first; 4000ea38: c2 24 00 00 st %g1, [ %l0 ] the_thread = (Thread_Control *) _Chain_Get_first_unprotected( &the_thread_queue->Queues.Fifo ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000ea3c: c4 06 20 50 ld [ %i0 + 0x50 ], %g2 new_first->previous = _Chain_Head(the_chain); 4000ea40: e0 20 60 04 st %l0, [ %g1 + 4 ] 4000ea44: 80 a0 a0 02 cmp %g2, 2 4000ea48: 02 80 00 0a be 4000ea70 <_Thread_queue_Dequeue_fifo+0x60> 4000ea4c: c0 26 20 44 clr [ %i0 + 0x44 ] _ISR_Enable( level ); 4000ea50: 7f ff cd 6a call 40001ff8 4000ea54: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000ea58: 90 10 00 18 mov %i0, %o0 4000ea5c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000ea60: 7f ff ed 99 call 4000a0c4 <_Thread_Clear_state> 4000ea64: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000ea68: 81 c7 e0 08 ret 4000ea6c: 81 e8 00 00 restore RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000ea70: 82 10 20 03 mov 3, %g1 4000ea74: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000ea78: 7f ff cd 60 call 40001ff8 4000ea7c: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000ea80: 7f ff f3 d7 call 4000b9dc <_Watchdog_Remove> 4000ea84: 90 06 20 48 add %i0, 0x48, %o0 4000ea88: 90 10 00 18 mov %i0, %o0 4000ea8c: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000ea90: 7f ff ed 8d call 4000a0c4 <_Thread_Clear_state> 4000ea94: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000ea98: 81 c7 e0 08 ret 4000ea9c: 81 e8 00 00 restore #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000eaa0: 80 a0 60 02 cmp %g1, 2 4000eaa4: 18 80 00 0c bgu 4000ead4 <_Thread_queue_Dequeue_fifo+0xc4> 4000eaa8: 80 a0 60 03 cmp %g1, 3 4000eaac: 80 a0 60 01 cmp %g1, 1 4000eab0: 0a 80 00 0b bcs 4000eadc <_Thread_queue_Dequeue_fifo+0xcc> 4000eab4: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000eab8: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000eabc: 7f ff cd 4f call 40001ff8 <== NOT EXECUTED 4000eac0: 01 00 00 00 nop <== NOT EXECUTED return _Thread_Executing; 4000eac4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000eac8: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED } return NULL; /* this is only to prevent warnings */ } 4000eacc: 81 c7 e0 08 ret <== NOT EXECUTED 4000ead0: 81 e8 00 00 restore <== NOT EXECUTED #endif return the_thread; } switch ( the_thread_queue->sync_state ) { 4000ead4: 12 bf ff e5 bne 4000ea68 <_Thread_queue_Dequeue_fifo+0x58> <== NOT EXECUTED 4000ead8: b0 10 20 00 clr %i0 <== NOT EXECUTED case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000eadc: b0 10 20 00 clr %i0 4000eae0: 7f ff cd 46 call 40001ff8 4000eae4: 90 10 00 02 mov %g2, %o0 4000eae8: 81 c7 e0 08 ret 4000eaec: 81 e8 00 00 restore 4000a7dc <_Thread_queue_Dequeue_priority>: */ Thread_Control *_Thread_queue_Dequeue_priority( Thread_queue_Control *the_thread_queue ) { 4000a7dc: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_second_node; Chain_Node *last_node; Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); 4000a7e0: 7f ff de 02 call 40001fe8 4000a7e4: 01 00 00 00 nop 4000a7e8: 9a 10 00 08 mov %o0, %o5 4000a7ec: 86 10 20 00 clr %g3 4000a7f0: 88 10 20 00 clr %g4 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000a7f4: d0 01 00 18 ld [ %g4 + %i0 ], %o0 for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { 4000a7f8: 85 28 e0 02 sll %g3, 2, %g2 4000a7fc: 83 28 e0 04 sll %g3, 4, %g1 4000a800: 82 20 40 02 sub %g1, %g2, %g1 4000a804: 82 06 00 01 add %i0, %g1, %g1 4000a808: 82 00 60 04 add %g1, 4, %g1 4000a80c: 80 a2 00 01 cmp %o0, %g1 4000a810: 12 80 00 50 bne 4000a950 <_Thread_queue_Dequeue_priority+0x174> 4000a814: 88 01 20 0c add %g4, 0xc, %g4 Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { 4000a818: 86 00 e0 01 inc %g3 Chain_Node *next_node; Chain_Node *previous_node; _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 4000a81c: 80 a0 e0 04 cmp %g3, 4 4000a820: 32 bf ff f6 bne,a 4000a7f8 <_Thread_queue_Dequeue_priority+0x1c> 4000a824: d0 01 00 18 ld [ %g4 + %i0 ], %o0 the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 4000a828: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000a82c: 80 a0 60 02 cmp %g1, 2 4000a830: 08 80 00 23 bleu 4000a8bc <_Thread_queue_Dequeue_priority+0xe0> 4000a834: 80 a0 60 01 cmp %g1, 1 4000a838: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000a83c: 02 80 00 29 be 4000a8e0 <_Thread_queue_Dequeue_priority+0x104> <== NOT EXECUTED 4000a840: b0 10 20 00 clr %i0 <== NOT EXECUTED return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; 4000a844: c6 06 20 38 ld [ %i0 + 0x38 ], %g3 new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a848: 82 06 20 3c add %i0, 0x3c, %g1 _ISR_Enable( level ); return _Thread_Executing; } dequeue: the_thread->Wait.queue = NULL; 4000a84c: c0 26 20 44 clr [ %i0 + 0x44 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a850: 80 a0 c0 01 cmp %g3, %g1 dequeue: the_thread->Wait.queue = NULL; new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; next_node = the_thread->Object.Node.next; 4000a854: c4 06 00 00 ld [ %i0 ], %g2 previous_node = the_thread->Object.Node.previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000a858: 02 80 00 27 be 4000a8f4 <_Thread_queue_Dequeue_priority+0x118> 4000a85c: c2 06 20 04 ld [ %i0 + 4 ], %g1 last_node = the_thread->Wait.Block2n.last; 4000a860: d8 06 20 40 ld [ %i0 + 0x40 ], %o4 new_second_node = new_first_node->next; 4000a864: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000a868: c6 20 a0 04 st %g3, [ %g2 + 4 ] if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000a86c: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000a870: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000a874: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000a878: c4 06 20 38 ld [ %i0 + 0x38 ], %g2 4000a87c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1 4000a880: 80 a0 80 01 cmp %g2, %g1 4000a884: 12 80 00 2d bne 4000a938 <_Thread_queue_Dequeue_priority+0x15c> 4000a888: 82 00 e0 38 add %g3, 0x38, %g1 } else { previous_node->next = next_node; next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000a88c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000a890: 80 a0 60 02 cmp %g1, 2 4000a894: 02 80 00 1e be 4000a90c <_Thread_queue_Dequeue_priority+0x130> 4000a898: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000a89c: 7f ff dd d7 call 40001ff8 4000a8a0: 90 10 00 0d mov %o5, %o0 4000a8a4: 90 10 00 18 mov %i0, %o0 4000a8a8: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000a8ac: 7f ff fe 06 call 4000a0c4 <_Thread_Clear_state> 4000a8b0: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 4000a8b4: 81 c7 e0 08 ret 4000a8b8: 81 e8 00 00 restore the_thread_queue->Queues.Priority[ index ].first; goto dequeue; } } switch ( the_thread_queue->sync_state ) { 4000a8bc: 0a 80 00 09 bcs 4000a8e0 <_Thread_queue_Dequeue_priority+0x104> 4000a8c0: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); return NULL; case THREAD_QUEUE_NOTHING_HAPPENED: case THREAD_QUEUE_TIMEOUT: the_thread_queue->sync_state = THREAD_QUEUE_SATISFIED; 4000a8c4: c2 26 20 30 st %g1, [ %i0 + 0x30 ] <== NOT EXECUTED _ISR_Enable( level ); 4000a8c8: 7f ff dd cc call 40001ff8 <== NOT EXECUTED 4000a8cc: 90 10 00 0d mov %o5, %o0 <== NOT EXECUTED return _Thread_Executing; 4000a8d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000a8d4: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000a8d8: 81 c7 e0 08 ret <== NOT EXECUTED 4000a8dc: 81 e8 00 00 restore <== NOT EXECUTED } switch ( the_thread_queue->sync_state ) { case THREAD_QUEUE_SYNCHRONIZED: case THREAD_QUEUE_SATISFIED: _ISR_Enable( level ); 4000a8e0: b0 10 20 00 clr %i0 4000a8e4: 7f ff dd c5 call 40001ff8 4000a8e8: 90 10 00 0d mov %o5, %o0 4000a8ec: 81 c7 e0 08 ret 4000a8f0: 81 e8 00 00 restore last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000a8f4: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4000a8f8: c4 20 40 00 st %g2, [ %g1 ] next_node->previous = previous_node; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000a8fc: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000a900: 80 a0 60 02 cmp %g1, 2 4000a904: 12 bf ff e6 bne 4000a89c <_Thread_queue_Dequeue_priority+0xc0> 4000a908: 82 10 20 03 mov 3, %g1 RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000a90c: c2 26 20 50 st %g1, [ %i0 + 0x50 ] _ISR_Enable( level ); _Thread_Unblock( the_thread ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000a910: 7f ff dd ba call 40001ff8 4000a914: 90 10 00 0d mov %o5, %o0 (void) _Watchdog_Remove( &the_thread->Timer ); 4000a918: 40 00 04 31 call 4000b9dc <_Watchdog_Remove> 4000a91c: 90 06 20 48 add %i0, 0x48, %o0 4000a920: 90 10 00 18 mov %i0, %o0 4000a924: 13 04 00 ff sethi %hi(0x1003fc00), %o1 4000a928: 7f ff fd e7 call 4000a0c4 <_Thread_Clear_state> 4000a92c: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif return( the_thread ); } 4000a930: 81 c7 e0 08 ret 4000a934: 81 e8 00 00 restore new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = 4000a938: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000a93c: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] new_first_thread->Wait.Block2n.last = last_node; 4000a940: d8 20 e0 40 st %o4, [ %g3 + 0x40 ] last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000a944: 82 00 e0 3c add %g3, 0x3c, %g1 4000a948: 10 bf ff d1 b 4000a88c <_Thread_queue_Dequeue_priority+0xb0> 4000a94c: c2 23 00 00 st %g1, [ %o4 ] _ISR_Disable( level ); for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; index++ ) { if ( !_Chain_Is_empty( &the_thread_queue->Queues.Priority[ index ] ) ) { the_thread = (Thread_Control *) 4000a950: 10 bf ff bd b 4000a844 <_Thread_queue_Dequeue_priority+0x68> 4000a954: b0 10 00 08 mov %o0, %i0 4000eaf0 <_Thread_queue_Enqueue_fifo>: void _Thread_queue_Enqueue_fifo ( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000eaf0: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Thread_queue_States sync_state; _ISR_Disable( level ); 4000eaf4: 7f ff cd 3d call 40001fe8 4000eaf8: 01 00 00 00 nop sync_state = the_thread_queue->sync_state; 4000eafc: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; switch ( sync_state ) { 4000eb00: 80 a0 a0 02 cmp %g2, 2 4000eb04: 02 80 00 22 be 4000eb8c <_Thread_queue_Enqueue_fifo+0x9c> 4000eb08: c0 26 20 30 clr [ %i0 + 0x30 ] 4000eb0c: 80 a0 a0 03 cmp %g2, 3 4000eb10: 02 80 00 11 be 4000eb54 <_Thread_queue_Enqueue_fifo+0x64> 4000eb14: 80 a0 a0 01 cmp %g2, 1 4000eb18: 02 80 00 07 be 4000eb34 <_Thread_queue_Enqueue_fifo+0x44> 4000eb1c: 82 06 20 04 add %i0, 4, %g1 4000eb20: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000eb24: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eb28: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000eb2c: 7f ff ed 66 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000eb30: 81 e8 00 00 restore <== NOT EXECUTED Chain_Node *the_node ) { Chain_Node *old_last_node; the_node->next = _Chain_Tail(the_chain); 4000eb34: c2 26 40 00 st %g1, [ %i1 ] old_last_node = the_chain->last; 4000eb38: c4 06 20 08 ld [ %i0 + 8 ], %g2 the_chain->last = the_node; 4000eb3c: f2 26 20 08 st %i1, [ %i0 + 8 ] case THREAD_QUEUE_NOTHING_HAPPENED: _Chain_Append_unprotected( &the_thread_queue->Queues.Fifo, &the_thread->Object.Node ); the_thread->Wait.queue = the_thread_queue; 4000eb40: f0 26 60 44 st %i0, [ %i1 + 0x44 ] old_last_node->next = the_node; the_node->previous = old_last_node; 4000eb44: c4 26 60 04 st %g2, [ %i1 + 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; 4000eb48: f2 20 80 00 st %i1, [ %g2 ] _ISR_Enable( level ); 4000eb4c: 7f ff cd 2b call 40001ff8 4000eb50: 91 e8 00 08 restore %g0, %o0, %o0 the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000eb54: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000eb58: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000eb5c: 12 80 00 16 bne 4000ebb4 <_Thread_queue_Enqueue_fifo+0xc4> <== NOT EXECUTED 4000eb60: 01 00 00 00 nop <== NOT EXECUTED 4000eb64: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000eb68: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000eb6c: 7f ff cd 23 call 40001ff8 <== NOT EXECUTED 4000eb70: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000eb74: 7f ff f3 9a call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 4000eb78: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000eb7c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eb80: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000eb84: 7f ff ed 50 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000eb88: 81 e8 00 00 restore <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000eb8c: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000eb90: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000eb94: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 4000eb98: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000eb9c: 7f ff cd 17 call 40001ff8 <== NOT EXECUTED 4000eba0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000eba4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000eba8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ebac: 7f ff ed 46 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ebb0: 81 e8 00 00 restore <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4000ebb4: 7f ff cd 11 call 40001ff8 <== NOT EXECUTED 4000ebb8: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ebbc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ebc0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ebc4: 7f ff ed 40 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ebc8: 81 e8 00 00 restore <== NOT EXECUTED 4000ebcc: 01 00 00 00 nop 4000a9dc <_Thread_queue_Enqueue_priority>: void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000a9dc: 9d e3 bf 98 save %sp, -104, %sp States_Control block_state; Thread_queue_States sync_state; _Chain_Initialize_empty( &the_thread->Wait.Block2n ); priority = the_thread->current_priority; 4000a9e0: e4 06 60 14 ld [ %i1 + 0x14 ], %l2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a9e4: 82 06 60 3c add %i1, 0x3c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000a9e8: 84 06 60 38 add %i1, 0x38, %g2 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000a9ec: c2 26 60 38 st %g1, [ %i1 + 0x38 ] the_chain->permanent_null = NULL; 4000a9f0: c0 26 60 3c clr [ %i1 + 0x3c ] the_chain->last = _Chain_Head(the_chain); 4000a9f4: c4 26 60 40 st %g2, [ %i1 + 0x40 ] void _Thread_queue_Enqueue_priority( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000a9f8: aa 10 00 18 mov %i0, %l5 priority = the_thread->current_priority; header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state; if ( _Thread_queue_Is_reverse_search( priority ) ) 4000a9fc: 80 8c a0 20 btst 0x20, %l2 RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number ( Priority_Control the_priority ) { return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER); 4000aa00: 83 34 a0 06 srl %l2, 6, %g1 4000aa04: 12 80 00 40 bne 4000ab04 <_Thread_queue_Enqueue_priority+0x128> 4000aa08: e8 06 20 38 ld [ %i0 + 0x38 ], %l4 4000aa0c: 85 28 60 04 sll %g1, 4, %g2 4000aa10: 83 28 60 02 sll %g1, 2, %g1 goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->first; 4000aa14: ac 20 80 01 sub %g2, %g1, %l6 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000aa18: 82 06 00 16 add %i0, %l6, %g1 4000aa1c: a6 00 60 04 add %g1, 4, %l3 if ( _Thread_queue_Is_reverse_search( priority ) ) goto restart_reverse_search; restart_forward_search: search_priority = PRIORITY_MINIMUM - 1; _ISR_Disable( level ); 4000aa20: 7f ff dd 72 call 40001fe8 4000aa24: 01 00 00 00 nop 4000aa28: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->first; 4000aa2c: e0 05 40 16 ld [ %l5 + %l6 ], %l0 while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 4000aa30: 80 a4 00 13 cmp %l0, %l3 4000aa34: 02 80 00 24 be 4000aac4 <_Thread_queue_Enqueue_priority+0xe8> 4000aa38: a2 10 3f ff mov -1, %l1 search_priority = search_thread->current_priority; 4000aa3c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aa40: 80 a4 80 11 cmp %l2, %l1 4000aa44: 28 80 00 21 bleu,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa48: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 4000aa4c: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 4000aa50: 80 a4 c0 10 cmp %l3, %l0 4000aa54: 32 80 00 19 bne,a 4000aab8 <_Thread_queue_Enqueue_priority+0xdc> 4000aa58: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000aa5c: 10 80 00 1b b 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa60: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); 4000aa64: 7f ff dd 65 call 40001ff8 4000aa68: 90 10 00 18 mov %i0, %o0 4000aa6c: 7f ff dd 5f call 40001fe8 4000aa70: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000aa74: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000aa78: 80 8d 00 01 btst %l4, %g1 4000aa7c: 02 80 00 91 be 4000acc0 <_Thread_queue_Enqueue_priority+0x2e4> 4000aa80: 01 00 00 00 nop _ISR_Enable( level ); goto restart_forward_search; } search_thread = 4000aa84: e0 04 00 00 ld [ %l0 ], %l0 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 ) ) { 4000aa88: 80 a4 00 13 cmp %l0, %l3 4000aa8c: 22 80 00 0f be,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aa90: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 4000aa94: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aa98: 80 a4 80 11 cmp %l2, %l1 4000aa9c: 28 80 00 0b bleu,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aaa0: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.next; 4000aaa4: e0 04 00 00 ld [ %l0 ], %l0 if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) ) 4000aaa8: 80 a4 00 13 cmp %l0, %l3 4000aaac: 22 80 00 07 be,a 4000aac8 <_Thread_queue_Enqueue_priority+0xec> 4000aab0: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; 4000aab4: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority <= search_priority ) 4000aab8: 80 a4 80 11 cmp %l2, %l1 4000aabc: 18 bf ff ea bgu 4000aa64 <_Thread_queue_Enqueue_priority+0x88> 4000aac0: 01 00 00 00 nop } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000aac4: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 4000aac8: 80 a0 60 01 cmp %g1, 1 4000aacc: 02 80 00 63 be 4000ac58 <_Thread_queue_Enqueue_priority+0x27c> 4000aad0: 80 a4 80 11 cmp %l2, %l1 return; synchronize: sync_state = the_thread_queue->sync_state; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 4000aad4: c0 25 60 30 clr [ %l5 + 0x30 ] <== NOT EXECUTED switch ( sync_state ) { 4000aad8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000aadc: 02 80 00 54 be 4000ac2c <_Thread_queue_Enqueue_priority+0x250> <== NOT EXECUTED 4000aae0: 84 10 00 01 mov %g1, %g2 <== NOT EXECUTED 4000aae4: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 4000aae8: 22 80 00 43 be,a 4000abf4 <_Thread_queue_Enqueue_priority+0x218> <== NOT EXECUTED 4000aaec: c2 06 60 50 ld [ %i1 + 0x50 ], %g1 <== NOT EXECUTED 4000aaf0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000aaf4: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000aaf8: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000aafc: 7f ff fd 72 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ab00: 81 e8 00 00 restore <== NOT EXECUTED 4000ab04: 85 28 60 04 sll %g1, 4, %g2 4000ab08: 83 28 60 02 sll %g1, 2, %g1 restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 4000ab0c: 82 20 80 01 sub %g2, %g1, %g1 4000ab10: a6 00 40 18 add %g1, %i0, %l3 return; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; _ISR_Disable( level ); 4000ab14: 7f ff dd 35 call 40001fe8 4000ab18: 01 00 00 00 nop 4000ab1c: b0 10 00 08 mov %o0, %i0 search_thread = (Thread_Control *) header->last; 4000ab20: e0 04 e0 08 ld [ %l3 + 8 ], %l0 while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 4000ab24: 80 a4 00 13 cmp %l0, %l3 4000ab28: 02 80 00 24 be 4000abb8 <_Thread_queue_Enqueue_priority+0x1dc> 4000ab2c: a2 10 21 00 mov 0x100, %l1 search_priority = search_thread->current_priority; 4000ab30: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 if ( priority >= search_priority ) 4000ab34: 80 a4 80 11 cmp %l2, %l1 4000ab38: 3a 80 00 21 bcc,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab3c: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 4000ab40: e0 04 20 04 ld [ %l0 + 4 ], %l0 if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 4000ab44: 80 a4 c0 10 cmp %l3, %l0 4000ab48: 32 80 00 19 bne,a 4000abac <_Thread_queue_Enqueue_priority+0x1d0> 4000ab4c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000ab50: 10 80 00 1b b 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab54: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 break; search_priority = search_thread->current_priority; if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); 4000ab58: 7f ff dd 28 call 40001ff8 4000ab5c: 90 10 00 18 mov %i0, %o0 4000ab60: 7f ff dd 22 call 40001fe8 4000ab64: 01 00 00 00 nop if ( !_States_Are_set( search_thread->current_state, block_state) ) { 4000ab68: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 4000ab6c: 80 8d 00 01 btst %l4, %g1 4000ab70: 02 80 00 57 be 4000accc <_Thread_queue_Enqueue_priority+0x2f0> 4000ab74: 01 00 00 00 nop _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 4000ab78: e0 04 20 04 ld [ %l0 + 4 ], %l0 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 ) ) { 4000ab7c: 80 a4 00 13 cmp %l0, %l3 4000ab80: 22 80 00 0f be,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> 4000ab84: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 search_priority = search_thread->current_priority; 4000ab88: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 4000ab8c: 80 a4 80 11 cmp %l2, %l1 <== NOT EXECUTED 4000ab90: 3a 80 00 0b bcc,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 4000ab94: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; #if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE ) search_thread = (Thread_Control *) search_thread->Object.Node.previous; 4000ab98: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) ) 4000ab9c: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED 4000aba0: 22 80 00 07 be,a 4000abbc <_Thread_queue_Enqueue_priority+0x1e0> <== NOT EXECUTED 4000aba4: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 <== NOT EXECUTED break; search_priority = search_thread->current_priority; 4000aba8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED if ( priority >= search_priority ) 4000abac: 80 a4 80 11 cmp %l2, %l1 4000abb0: 0a bf ff ea bcs 4000ab58 <_Thread_queue_Enqueue_priority+0x17c> 4000abb4: 01 00 00 00 nop } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) 4000abb8: c2 05 60 30 ld [ %l5 + 0x30 ], %g1 4000abbc: 80 a0 60 01 cmp %g1, 1 4000abc0: 12 bf ff c6 bne 4000aad8 <_Thread_queue_Enqueue_priority+0xfc> 4000abc4: c0 25 60 30 clr [ %l5 + 0x30 ] goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 4000abc8: 80 a4 80 11 cmp %l2, %l1 4000abcc: 22 80 00 35 be,a 4000aca0 <_Thread_queue_Enqueue_priority+0x2c4> 4000abd0: 82 04 20 3c add %l0, 0x3c, %g1 goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 4000abd4: c2 04 00 00 ld [ %l0 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 4000abd8: e0 26 60 04 st %l0, [ %i1 + 4 ] search_node = (Chain_Node *) search_thread; next_node = search_node->next; the_node = (Chain_Node *) the_thread; the_node->next = next_node; 4000abdc: 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; 4000abe0: ea 26 60 44 st %l5, [ %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; 4000abe4: f2 24 00 00 st %i1, [ %l0 ] next_node->previous = the_node; 4000abe8: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000abec: 7f ff dd 03 call 40001ff8 4000abf0: 81 e8 00 00 restore the_thread->Wait.queue = NULL; _ISR_Enable( level ); break; case THREAD_QUEUE_SATISFIED: if ( _Watchdog_Is_active( &the_thread->Timer ) ) { 4000abf4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000abf8: 12 80 00 22 bne 4000ac80 <_Thread_queue_Enqueue_priority+0x2a4> <== NOT EXECUTED 4000abfc: 01 00 00 00 nop <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_REMOVE_IT; 4000ac00: c4 26 60 50 st %g2, [ %i1 + 0x50 ] <== NOT EXECUTED _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; 4000ac04: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED _ISR_Enable( level ); 4000ac08: 7f ff dc fc call 40001ff8 <== NOT EXECUTED 4000ac0c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void) _Watchdog_Remove( &the_thread->Timer ); 4000ac10: 40 00 03 73 call 4000b9dc <_Watchdog_Remove> <== NOT EXECUTED 4000ac14: 90 06 60 48 add %i1, 0x48, %o0 <== NOT EXECUTED 4000ac18: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac1c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac20: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac24: 7f ff fd 28 call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac28: 81 e8 00 00 restore <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ac2c: c4 06 60 44 ld [ %i1 + 0x44 ], %g2 <== NOT EXECUTED the_thread->Wait.queue = NULL; 4000ac30: c0 26 60 44 clr [ %i1 + 0x44 ] <== NOT EXECUTED * This should never happen. All of this was dealt with above. */ break; case THREAD_QUEUE_TIMEOUT: the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000ac34: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 <== NOT EXECUTED 4000ac38: c2 26 60 34 st %g1, [ %i1 + 0x34 ] <== NOT EXECUTED the_thread->Wait.queue = NULL; _ISR_Enable( level ); 4000ac3c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ac40: 7f ff dc ee call 40001ff8 <== NOT EXECUTED 4000ac44: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac48: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac4c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac50: 7f ff fd 1d call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac54: 81 e8 00 00 restore <== NOT EXECUTED if ( the_thread_queue->sync_state != THREAD_QUEUE_NOTHING_HAPPENED ) goto synchronize; the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; if ( priority == search_priority ) 4000ac58: 02 80 00 11 be 4000ac9c <_Thread_queue_Enqueue_priority+0x2c0> 4000ac5c: c0 25 60 30 clr [ %l5 + 0x30 ] goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 4000ac60: c2 04 20 04 ld [ %l0 + 4 ], %g1 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000ac64: e0 26 40 00 st %l0, [ %i1 ] the_node->previous = previous_node; 4000ac68: 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; 4000ac6c: ea 26 60 44 st %l5, [ %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; 4000ac70: f2 20 40 00 st %i1, [ %g1 ] search_node->previous = the_node; 4000ac74: f2 24 20 04 st %i1, [ %l0 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000ac78: 7f ff dc e0 call 40001ff8 4000ac7c: 81 e8 00 00 restore _Watchdog_Deactivate( &the_thread->Timer ); the_thread->Wait.queue = NULL; _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); } else _ISR_Enable( level ); 4000ac80: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000ac84: 7f ff dc dd call 40001ff8 <== NOT EXECUTED 4000ac88: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED 4000ac8c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 <== NOT EXECUTED 4000ac90: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <== NOT EXECUTED 4000ac94: 7f ff fd 0c call 4000a0c4 <_Thread_Clear_state> <== NOT EXECUTED 4000ac98: 81 e8 00 00 restore <== NOT EXECUTED 4000ac9c: 82 04 20 3c add %l0, 0x3c, %g1 _ISR_Enable( level ); return; equal_priority: /* add at end of priority group */ search_node = _Chain_Tail( &search_thread->Wait.Block2n ); previous_node = search_node->previous; 4000aca0: c4 00 60 04 ld [ %g1 + 4 ], %g2 the_node = (Chain_Node *) the_thread; the_node->next = search_node; 4000aca4: c2 26 40 00 st %g1, [ %i1 ] the_node->previous = previous_node; 4000aca8: c4 26 60 04 st %g2, [ %i1 + 4 ] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 4000acac: ea 26 60 44 st %l5, [ %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; 4000acb0: f2 20 80 00 st %i1, [ %g2 ] search_node->previous = the_node; 4000acb4: f2 20 60 04 st %i1, [ %g1 + 4 ] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 4000acb8: 7f ff dc d0 call 40001ff8 4000acbc: 81 e8 00 00 restore if ( priority <= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4000acc0: 7f ff dc ce call 40001ff8 <== NOT EXECUTED 4000acc4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000acc8: 30 bf ff 56 b,a 4000aa20 <_Thread_queue_Enqueue_priority+0x44> <== NOT EXECUTED if ( priority >= search_priority ) break; #endif _ISR_Flash( level ); if ( !_States_Are_set( search_thread->current_state, block_state) ) { _ISR_Enable( level ); 4000accc: 7f ff dc cb call 40001ff8 <== NOT EXECUTED 4000acd0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000acd4: 30 bf ff 90 b,a 4000ab14 <_Thread_queue_Enqueue_priority+0x138> <== NOT EXECUTED 4000a958 <_Thread_queue_Enqueue_with_handler>: void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4000a958: 9d e3 bf 98 save %sp, -104, %sp Thread_Control *the_thread; the_thread = _Thread_Executing; 4000a95c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4000a960: d2 06 20 38 ld [ %i0 + 0x38 ], %o1 Thread_queue_Timeout_callout handler ) { Thread_Control *the_thread; the_thread = _Thread_Executing; 4000a964: e0 00 62 bc ld [ %g1 + 0x2bc ], %l0 void _Thread_queue_Enqueue_with_handler( Thread_queue_Control *the_thread_queue, Watchdog_Interval timeout, Thread_queue_Timeout_callout handler ) { 4000a968: a2 10 00 18 mov %i0, %l1 else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state ); 4000a96c: 40 00 01 9b call 4000afd8 <_Thread_Set_state> 4000a970: 90 10 00 10 mov %l0, %o0 /* * If the thread wants to timeout, then schedule its timer. */ if ( timeout ) { 4000a974: 80 a6 60 00 cmp %i1, 0 4000a978: 32 80 00 0e bne,a 4000a9b0 <_Thread_queue_Enqueue_with_handler+0x58> 4000a97c: c2 04 20 08 ld [ %l0 + 8 ], %g1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a980: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000a984: 80 a0 60 00 cmp %g1, 0 4000a988: 12 80 00 04 bne 4000a998 <_Thread_queue_Enqueue_with_handler+0x40> 4000a98c: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); 4000a990: 40 00 10 58 call 4000eaf0 <_Thread_queue_Enqueue_fifo> 4000a994: 93 e8 00 10 restore %g0, %l0, %o1 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a998: 02 80 00 04 be 4000a9a8 <_Thread_queue_Enqueue_with_handler+0x50> 4000a99c: 01 00 00 00 nop 4000a9a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000a9a4: 81 e8 00 00 restore <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Enqueue_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Enqueue_priority( the_thread_queue, the_thread ); 4000a9a8: 40 00 00 0d call 4000a9dc <_Thread_queue_Enqueue_priority> 4000a9ac: 93 e8 00 10 restore %g0, %l0, %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000a9b0: f4 24 20 64 st %i2, [ %l0 + 0x64 ] the_watchdog->id = id; 4000a9b4: c2 24 20 68 st %g1, [ %l0 + 0x68 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000a9b8: f2 24 20 54 st %i1, [ %l0 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000a9bc: c0 24 20 50 clr [ %l0 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 4000a9c0: c0 24 20 6c clr [ %l0 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000a9c4: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000a9c8: 92 04 20 48 add %l0, 0x48, %o1 4000a9cc: 40 00 03 9a call 4000b834 <_Watchdog_Insert> 4000a9d0: 90 12 22 dc or %o0, 0x2dc, %o0 } /* * Now enqueue the thread per the discipline for this thread queue. */ switch( the_thread_queue->discipline ) { 4000a9d4: 10 bf ff ec b 4000a984 <_Thread_queue_Enqueue_with_handler+0x2c> 4000a9d8: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 4000ebd0 <_Thread_queue_Extract>: void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000ebd0: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000ebd4: 80 a0 60 00 cmp %g1, 0 4000ebd8: 12 80 00 05 bne 4000ebec <_Thread_queue_Extract+0x1c> 4000ebdc: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); 4000ebe0: 82 13 c0 00 mov %o7, %g1 4000ebe4: 40 00 04 85 call 4000fdf8 <_Thread_queue_Extract_fifo> 4000ebe8: 9e 10 40 00 mov %g1, %o7 void _Thread_queue_Extract( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { switch ( the_thread_queue->discipline ) { 4000ebec: 02 80 00 04 be 4000ebfc <_Thread_queue_Extract+0x2c> 4000ebf0: 94 10 20 00 clr %o2 4000ebf4: 81 c3 e0 08 retl <== NOT EXECUTED 4000ebf8: 01 00 00 00 nop <== NOT EXECUTED case THREAD_QUEUE_DISCIPLINE_FIFO: _Thread_queue_Extract_fifo( the_thread_queue, the_thread ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: _Thread_queue_Extract_priority( the_thread_queue, the_thread ); 4000ebfc: 82 13 c0 00 mov %o7, %g1 4000ec00: 40 00 00 03 call 4000ec0c <_Thread_queue_Extract_priority_helper> 4000ec04: 9e 10 40 00 mov %g1, %o7 4000ec08: 01 00 00 00 nop 4000fdf8 <_Thread_queue_Extract_fifo>: void _Thread_queue_Extract_fifo( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000fdf8: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; _ISR_Disable( level ); 4000fdfc: 7f ff c8 7b call 40001fe8 4000fe00: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000fe04: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000fe08: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000fe0c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000fe10: 80 88 80 01 btst %g2, %g1 4000fe14: 02 80 00 19 be 4000fe78 <_Thread_queue_Extract_fifo+0x80> 4000fe18: 01 00 00 00 nop ) { Chain_Node *next; Chain_Node *previous; next = the_node->next; 4000fe1c: c2 06 40 00 ld [ %i1 ], %g1 previous = the_node->previous; 4000fe20: c4 06 60 04 ld [ %i1 + 4 ], %g2 _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000fe24: c6 06 60 50 ld [ %i1 + 0x50 ], %g3 next->previous = previous; previous->next = next; 4000fe28: c2 20 80 00 st %g1, [ %g2 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000fe2c: c4 20 60 04 st %g2, [ %g1 + 4 ] 4000fe30: 80 a0 e0 02 cmp %g3, 2 4000fe34: 12 80 00 0c bne 4000fe64 <_Thread_queue_Extract_fifo+0x6c> 4000fe38: c0 26 60 44 clr [ %i1 + 0x44 ] 4000fe3c: 82 10 20 03 mov 3, %g1 4000fe40: c2 26 60 50 st %g1, [ %i1 + 0x50 ] _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000fe44: 7f ff c8 6d call 40001ff8 4000fe48: 01 00 00 00 nop (void) _Watchdog_Remove( &the_thread->Timer ); 4000fe4c: 7f ff ee e4 call 4000b9dc <_Watchdog_Remove> 4000fe50: 90 06 60 48 add %i1, 0x48, %o0 RTEMS_INLINE_ROUTINE void _Thread_Unblock ( Thread_Control *the_thread ) { _Thread_Clear_state( the_thread, STATES_BLOCKED ); 4000fe54: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000fe58: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000fe5c: 7f ff e8 9a call 4000a0c4 <_Thread_Clear_state> 4000fe60: 81 e8 00 00 restore _Chain_Extract_unprotected( &the_thread->Object.Node ); the_thread->Wait.queue = NULL; if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); 4000fe64: 7f ff c8 65 call 40001ff8 4000fe68: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000fe6c: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000fe70: 7f ff e8 95 call 4000a0c4 <_Thread_Clear_state> 4000fe74: 81 e8 00 00 restore ISR_Level level; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000fe78: 7f ff c8 60 call 40001ff8 <== NOT EXECUTED 4000fe7c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000fe80: 01 00 00 00 nop 4000ec0c <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread, boolean requeuing ) { 4000ec0c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *new_first_node; Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); 4000ec10: 7f ff cc f6 call 40001fe8 4000ec14: b0 10 00 19 mov %i1, %i0 if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ec18: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ec1c: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ec20: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ec24: 80 88 80 01 btst %g2, %g1 4000ec28: 02 80 00 29 be 4000eccc <_Thread_queue_Extract_priority_helper+0xc0> 4000ec2c: 82 06 60 3c add %i1, 0x3c, %g1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4000ec30: c6 06 60 38 ld [ %i1 + 0x38 ], %g3 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 4000ec34: c4 06 40 00 ld [ %i1 ], %g2 previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 4000ec38: 80 a0 c0 01 cmp %g3, %g1 4000ec3c: 12 80 00 10 bne 4000ec7c <_Thread_queue_Extract_priority_helper+0x70> 4000ec40: c2 06 60 04 ld [ %i1 + 4 ], %g1 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; next_node->previous = previous_node; 4000ec44: c2 20 a0 04 st %g1, [ %g2 + 4 ] new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 4000ec48: c4 20 40 00 st %g2, [ %g1 ] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000ec4c: 80 a6 a0 00 cmp %i2, 0 4000ec50: 12 80 00 1d bne 4000ecc4 <_Thread_queue_Extract_priority_helper+0xb8> 4000ec54: 01 00 00 00 nop _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 4000ec58: c2 06 20 50 ld [ %i0 + 0x50 ], %g1 4000ec5c: 80 a0 60 02 cmp %g1, 2 4000ec60: 02 80 00 1d be 4000ecd4 <_Thread_queue_Extract_priority_helper+0xc8> 4000ec64: 82 10 20 03 mov 3, %g1 _ISR_Enable( level ); 4000ec68: 7f ff cc e4 call 40001ff8 4000ec6c: 33 04 00 ff sethi %hi(0x1003fc00), %i1 4000ec70: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 4000ec74: 7f ff ed 14 call 4000a0c4 <_Thread_Clear_state> 4000ec78: 81 e8 00 00 restore previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 4000ec7c: da 06 60 40 ld [ %i1 + 0x40 ], %o5 new_second_node = new_first_node->next; 4000ec80: c8 00 c0 00 ld [ %g3 ], %g4 previous_node->next = new_first_node; next_node->previous = new_first_node; 4000ec84: c6 20 a0 04 st %g3, [ %g2 + 4 ] new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 4000ec88: c6 20 40 00 st %g3, [ %g1 ] next_node->previous = new_first_node; new_first_node->next = next_node; 4000ec8c: c4 20 c0 00 st %g2, [ %g3 ] new_first_node->previous = previous_node; 4000ec90: c2 20 e0 04 st %g1, [ %g3 + 4 ] if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 4000ec94: c4 06 60 38 ld [ %i1 + 0x38 ], %g2 4000ec98: c2 06 60 40 ld [ %i1 + 0x40 ], %g1 4000ec9c: 80 a0 80 01 cmp %g2, %g1 4000eca0: 02 bf ff ec be 4000ec50 <_Thread_queue_Extract_priority_helper+0x44> 4000eca4: 80 a6 a0 00 cmp %i2, 0 /* > two threads on 2-n */ new_second_node->previous = 4000eca8: 82 00 e0 38 add %g3, 0x38, %g1 <== NOT EXECUTED 4000ecac: c2 21 20 04 st %g1, [ %g4 + 4 ] <== NOT EXECUTED _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 4000ecb0: c8 20 e0 38 st %g4, [ %g3 + 0x38 ] <== NOT EXECUTED new_first_thread->Wait.Block2n.last = last_node; 4000ecb4: da 20 e0 40 st %o5, [ %g3 + 0x40 ] <== NOT EXECUTED last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 4000ecb8: 82 00 e0 3c add %g3, 0x3c, %g1 <== NOT EXECUTED /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 4000ecbc: 02 bf ff e7 be 4000ec58 <_Thread_queue_Extract_priority_helper+0x4c> <== NOT EXECUTED 4000ecc0: c2 23 40 00 st %g1, [ %o5 ] <== NOT EXECUTED _ISR_Enable( level ); 4000ecc4: 7f ff cc cd call 40001ff8 4000ecc8: 91 e8 00 08 restore %g0, %o0, %o0 Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _ISR_Enable( level ); 4000eccc: 7f ff cc cb call 40001ff8 <== NOT EXECUTED 4000ecd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000ecd4: c2 26 20 50 st %g1, [ %i0 + 0x50 ] if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); 4000ecd8: 7f ff cc c8 call 40001ff8 4000ecdc: 33 04 00 ff sethi %hi(0x1003fc00), %i1 (void) _Watchdog_Remove( &the_thread->Timer ); 4000ece0: 7f ff f3 3f call 4000b9dc <_Watchdog_Remove> 4000ece4: 90 06 20 48 add %i0, 0x48, %o0 4000ece8: b2 16 63 f8 or %i1, 0x3f8, %i1 4000ecec: 7f ff ec f6 call 4000a0c4 <_Thread_Clear_state> 4000ecf0: 81 e8 00 00 restore 4000ecf4: 01 00 00 00 nop 4000acd8 <_Thread_queue_Extract_with_proxy>: */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 4000acd8: 9d e3 bf 98 save %sp, -104, %sp States_Control state; Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; 4000acdc: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 */ boolean _Thread_queue_Extract_with_proxy( Thread_Control *the_thread ) { 4000ace0: a0 10 00 18 mov %i0, %l0 Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; state = the_thread->current_state; if ( _States_Is_waiting_on_thread_queue( state ) ) { 4000ace4: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ace8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000acec: 80 88 80 01 btst %g2, %g1 4000acf0: 02 80 00 1e be 4000ad68 <_Thread_queue_Extract_with_proxy+0x90> 4000acf4: b0 10 20 00 clr %i0 if ( _States_Is_waiting_for_rpc_reply( state ) && 4000acf8: 03 00 00 08 sethi %hi(0x2000), %g1 4000acfc: 80 88 80 01 btst %g2, %g1 4000ad00: 22 80 00 17 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> 4000ad04: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 4000ad08: 03 00 00 e7 sethi %hi(0x39c00), %g1 <== NOT EXECUTED 4000ad0c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 39ee0 <== NOT EXECUTED 4000ad10: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 4000ad14: 22 80 00 12 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 4000ad18: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED _States_Is_locally_blocked( state ) ) { the_information = _Objects_Get_information( the_thread->Wait.id ); 4000ad1c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED proxy_extract_callout = 4000ad20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000ad24: 85 30 e0 16 srl %g3, 0x16, %g2 <== NOT EXECUTED 4000ad28: 82 10 61 40 or %g1, 0x140, %g1 <== NOT EXECUTED 4000ad2c: 84 08 a0 1c and %g2, 0x1c, %g2 <== NOT EXECUTED 4000ad30: c8 00 40 02 ld [ %g1 + %g2 ], %g4 <== NOT EXECUTED 4000ad34: 87 30 e0 1b srl %g3, 0x1b, %g3 <== NOT EXECUTED 4000ad38: 87 28 e0 02 sll %g3, 2, %g3 <== NOT EXECUTED 4000ad3c: c2 01 00 03 ld [ %g4 + %g3 ], %g1 <== NOT EXECUTED 4000ad40: c2 00 60 48 ld [ %g1 + 0x48 ], %g1 <== NOT EXECUTED (Objects_Thread_queue_Extract_callout) the_information->extract; if ( proxy_extract_callout ) 4000ad44: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ad48: 22 80 00 05 be,a 4000ad5c <_Thread_queue_Extract_with_proxy+0x84> <== NOT EXECUTED 4000ad4c: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED (*proxy_extract_callout)( the_thread ); 4000ad50: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000ad54: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000ad58: d0 04 20 44 ld [ %l0 + 0x44 ], %o0 <== NOT EXECUTED 4000ad5c: 92 10 00 10 mov %l0, %o1 4000ad60: 40 00 0f 9c call 4000ebd0 <_Thread_queue_Extract> 4000ad64: b0 10 20 01 mov 1, %i0 return TRUE; } return FALSE; } 4000ad68: 81 c7 e0 08 ret 4000ad6c: 81 e8 00 00 restore 4000d54c <_Thread_queue_First>: Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000d54c: c2 02 20 34 ld [ %o0 + 0x34 ], %g1 4000d550: 80 a0 60 00 cmp %g1, 0 4000d554: 12 80 00 05 bne 4000d568 <_Thread_queue_First+0x1c> 4000d558: 80 a0 60 01 cmp %g1, 1 case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); 4000d55c: 82 13 c0 00 mov %o7, %g1 4000d560: 40 00 10 43 call 4001166c <_Thread_queue_First_fifo> 4000d564: 9e 10 40 00 mov %g1, %o7 Thread_queue_Control *the_thread_queue ) { Thread_Control *the_thread; switch ( the_thread_queue->discipline ) { 4000d568: 02 80 00 04 be 4000d578 <_Thread_queue_First+0x2c> 4000d56c: 01 00 00 00 nop the_thread = NULL; break; } return the_thread; } 4000d570: 81 c3 e0 08 retl <== NOT EXECUTED 4000d574: 90 10 20 00 clr %o0 ! 0 <== NOT EXECUTED switch ( the_thread_queue->discipline ) { case THREAD_QUEUE_DISCIPLINE_FIFO: the_thread = _Thread_queue_First_fifo( the_thread_queue ); break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: the_thread = _Thread_queue_First_priority( the_thread_queue ); 4000d578: 82 13 c0 00 mov %o7, %g1 4000d57c: 40 00 00 03 call 4000d588 <_Thread_queue_First_priority> 4000d580: 9e 10 40 00 mov %g1, %o7 4000d584: 01 00 00 00 nop 4000ad90 <_Thread_queue_Initialize>: uint32_t timeout_status ) { uint32_t index; the_thread_queue->state = state; 4000ad90: d4 22 20 38 st %o2, [ %o0 + 0x38 ] the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status; 4000ad94: d6 22 20 3c st %o3, [ %o0 + 0x3c ] the_thread_queue->sync_state = THREAD_QUEUE_SYNCHRONIZED; 4000ad98: c0 22 20 30 clr [ %o0 + 0x30 ] switch ( the_discipline ) { 4000ad9c: 80 a2 60 00 cmp %o1, 0 4000ada0: 12 80 00 07 bne 4000adbc <_Thread_queue_Initialize+0x2c> 4000ada4: d2 22 20 34 st %o1, [ %o0 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ada8: 82 02 20 04 add %o0, 4, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adac: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000adb0: c0 22 20 04 clr [ %o0 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adb4: 81 c3 e0 08 retl 4000adb8: c2 22 00 00 st %g1, [ %o0 ] 4000adbc: 80 a2 60 01 cmp %o1, 1 4000adc0: 02 80 00 04 be 4000add0 <_Thread_queue_Initialize+0x40> 4000adc4: 82 02 20 04 add %o0, 4, %g1 4000adc8: 81 c3 e0 08 retl <== NOT EXECUTED 4000adcc: 01 00 00 00 nop <== NOT EXECUTED 4000add0: 84 02 20 10 add %o0, 0x10, %g2 4000add4: c2 22 00 00 st %g1, [ %o0 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000add8: 82 02 20 0c add %o0, 0xc, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000addc: c4 22 20 0c st %g2, [ %o0 + 0xc ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ade0: c2 22 20 14 st %g1, [ %o0 + 0x14 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ade4: 84 02 20 1c add %o0, 0x1c, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ade8: 82 02 20 18 add %o0, 0x18, %g1 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adec: c4 22 20 18 st %g2, [ %o0 + 0x18 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adf0: c2 22 20 20 st %g1, [ %o0 + 0x20 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000adf4: 84 02 20 28 add %o0, 0x28, %g2 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000adf8: 82 02 20 24 add %o0, 0x24, %g1 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000adfc: c0 22 20 04 clr [ %o0 + 4 ] the_chain->last = _Chain_Head(the_chain); 4000ae00: d0 22 20 08 st %o0, [ %o0 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 4000ae04: c0 22 20 10 clr [ %o0 + 0x10 ] 4000ae08: c0 22 20 1c clr [ %o0 + 0x1c ] 4000ae0c: c0 22 20 28 clr [ %o0 + 0x28 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 4000ae10: c4 22 20 24 st %g2, [ %o0 + 0x24 ] the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 4000ae14: 81 c3 e0 08 retl 4000ae18: c2 22 20 2c st %g1, [ %o0 + 0x2c ] 4000ae1c <_Thread_queue_Requeue>: void _Thread_queue_Requeue( Thread_queue_Control *the_thread_queue, Thread_Control *the_thread ) { 4000ae1c: 9d e3 bf 98 save %sp, -104, %sp /* just in case the thread really wasn't blocked here */ if ( !the_thread_queue ) { 4000ae20: 80 a6 20 00 cmp %i0, 0 4000ae24: 02 80 00 06 be 4000ae3c <_Thread_queue_Requeue+0x20> 4000ae28: 01 00 00 00 nop return; } switch ( the_thread_queue->discipline ) { 4000ae2c: e0 06 20 34 ld [ %i0 + 0x34 ], %l0 4000ae30: 80 a4 20 01 cmp %l0, 1 4000ae34: 02 80 00 04 be 4000ae44 <_Thread_queue_Requeue+0x28> 4000ae38: 01 00 00 00 nop 4000ae3c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ae40: 81 e8 00 00 restore <== NOT EXECUTED break; case THREAD_QUEUE_DISCIPLINE_PRIORITY: { Thread_queue_Control *tq = the_thread_queue; ISR_Level level; _ISR_Disable( level ); 4000ae44: 7f ff dc 69 call 40001fe8 4000ae48: 01 00 00 00 nop 4000ae4c: a2 10 00 08 mov %o0, %l1 if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 4000ae50: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 4000ae54: 03 00 00 ef sethi %hi(0x3bc00), %g1 4000ae58: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 4000ae5c: 80 88 80 01 btst %g2, %g1 4000ae60: 12 80 00 04 bne 4000ae70 <_Thread_queue_Requeue+0x54> 4000ae64: 94 10 20 01 mov 1, %o2 _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); _Thread_queue_Enqueue_priority( tq, the_thread ); } _ISR_Enable( level ); 4000ae68: 7f ff dc 64 call 40001ff8 <== NOT EXECUTED 4000ae6c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED ISR_Level level; _ISR_Disable( level ); if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { _Thread_queue_Enter_critical_section( tq ); _Thread_queue_Extract_priority_helper( tq, the_thread, TRUE ); 4000ae70: 90 10 00 18 mov %i0, %o0 4000ae74: 92 10 00 19 mov %i1, %o1 4000ae78: 40 00 0f 65 call 4000ec0c <_Thread_queue_Extract_priority_helper> 4000ae7c: e0 26 20 30 st %l0, [ %i0 + 0x30 ] _Thread_queue_Enqueue_priority( tq, the_thread ); 4000ae80: 90 10 00 18 mov %i0, %o0 4000ae84: 7f ff fe d6 call 4000a9dc <_Thread_queue_Enqueue_priority> 4000ae88: 92 10 00 19 mov %i1, %o1 } _ISR_Enable( level ); 4000ae8c: 7f ff dc 5b call 40001ff8 4000ae90: 91 e8 00 11 restore %g0, %l1, %o0 4000ae94: 01 00 00 00 nop 4000ae98 <_Thread_queue_Timeout>: void _Thread_queue_Timeout( Objects_Id id, void *ignored ) { 4000ae98: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000ae9c: 92 96 20 00 orcc %i0, 0, %o1 4000aea0: 12 80 00 1a bne 4000af08 <_Thread_queue_Timeout+0x70> 4000aea4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000aea8: 31 10 00 6f sethi %hi(0x4001bc00), %i0 <== NOT EXECUTED 4000aeac: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000aeb0: 82 00 60 01 inc %g1 <== NOT EXECUTED 4000aeb4: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000aeb8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000aebc: d2 00 62 bc ld [ %g1 + 0x2bc ], %o1 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000aec0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED */ static inline void _Thread_queue_Process_timeout( Thread_Control *the_thread ) { Thread_queue_Control *the_thread_queue = the_thread->Wait.queue; 4000aec4: d0 02 60 44 ld [ %o1 + 0x44 ], %o0 * If it is not satisfied, then it is "nothing happened" and * this is the "timeout" transition. After a request is satisfied, * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && 4000aec8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 4000aecc: 80 a0 e0 00 cmp %g3, 0 4000aed0: 02 80 00 06 be 4000aee8 <_Thread_queue_Timeout+0x50> 4000aed4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000aed8: c4 00 62 bc ld [ %g1 + 0x2bc ], %g2 ! 4001bebc <_Thread_Executing> <== NOT EXECUTED 4000aedc: 80 a2 40 02 cmp %o1, %g2 <== NOT EXECUTED 4000aee0: 02 80 00 20 be 4000af60 <_Thread_queue_Timeout+0xc8> <== NOT EXECUTED 4000aee4: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; } else { the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status; 4000aee8: c2 02 20 3c ld [ %o0 + 0x3c ], %g1 _Thread_queue_Extract( the_thread->Wait.queue, the_thread ); 4000aeec: 40 00 0f 39 call 4000ebd0 <_Thread_queue_Extract> 4000aef0: c2 22 60 34 st %g1, [ %o1 + 0x34 ] */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 4000aef4: c2 06 21 e0 ld [ %i0 + 0x1e0 ], %g1 4000aef8: 82 00 7f ff add %g1, -1, %g1 4000aefc: c2 26 21 e0 st %g1, [ %i0 + 0x1e0 ] 4000af00: 81 c7 e0 08 ret 4000af04: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000af08: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000af0c: 80 a0 a0 04 cmp %g2, 4 4000af10: 18 bf ff fc bgu 4000af00 <_Thread_queue_Timeout+0x68> 4000af14: 83 32 60 1b srl %o1, 0x1b, %g1 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000af18: 80 a0 60 01 cmp %g1, 1 4000af1c: 12 bf ff f9 bne 4000af00 <_Thread_queue_Timeout+0x68> 4000af20: 83 28 a0 02 sll %g2, 2, %g1 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000af24: 05 10 00 6f sethi %hi(0x4001bc00), %g2 4000af28: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 4000af2c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000af30: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000af34: 80 a2 20 00 cmp %o0, 0 4000af38: 02 bf ff f2 be 4000af00 <_Thread_queue_Timeout+0x68> 4000af3c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000af40: 7f ff f7 ee call 40008ef8 <_Objects_Get> 4000af44: 94 07 bf f4 add %fp, -12, %o2 Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000af48: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000af4c: 80 a0 60 00 cmp %g1, 0 4000af50: 12 bf ff ec bne 4000af00 <_Thread_queue_Timeout+0x68> 4000af54: 92 10 00 08 mov %o0, %o1 4000af58: 10 bf ff db b 4000aec4 <_Thread_queue_Timeout+0x2c> 4000af5c: 31 10 00 6f sethi %hi(0x4001bc00), %i0 * a timeout is not allowed to occur. */ if ( the_thread_queue->sync_state != THREAD_QUEUE_SYNCHRONIZED && _Thread_Is_executing( the_thread ) ) { if ( the_thread_queue->sync_state != THREAD_QUEUE_SATISFIED ) 4000af60: 02 bf ff e5 be 4000aef4 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 4000af64: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED the_thread_queue->sync_state = THREAD_QUEUE_TIMEOUT; 4000af68: 10 bf ff e3 b 4000aef4 <_Thread_queue_Timeout+0x5c> <== NOT EXECUTED 4000af6c: c2 22 20 30 st %g1, [ %o0 + 0x30 ] <== NOT EXECUTED 40014560 <_Timer_Server_body>: */ Thread _Timer_Server_body( uint32_t ignored ) { 40014560: 9d e3 bf 98 save %sp, -104, %sp /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 40014564: 03 10 00 d8 sethi %hi(0x40036000), %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014568: 21 10 00 d7 sethi %hi(0x40035c00), %l0 4001456c: c6 00 60 74 ld [ %g1 + 0x74 ], %g3 _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 40014570: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014574: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 40014578: c8 00 a3 a8 ld [ %g2 + 0x3a8 ], %g4 /* * Initialize the "last time" markers to indicate the timer that * the server was initiated. */ _Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot; 4001457c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014580: 82 00 60 01 inc %g1 40014584: c6 20 a1 fc st %g3, [ %g2 + 0x1fc ] 40014588: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] _Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch; 4001458c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40014590: c8 20 a1 f8 st %g4, [ %g2 + 0x1f8 ] ! 40035df8 <_Timer_Server_seconds_last_time> RTEMS_COMPILER_MEMORY_BARRIER(); 40014594: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40014598: 05 10 00 d7 sethi %hi(0x40035c00), %g2 4001459c: ba 10 61 f0 or %g1, 0x1f0, %i5 400145a0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400145a4: 39 10 00 da sethi %hi(0x40036800), %i4 /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 400145a8: b4 10 a3 ec or %g2, 0x3ec, %i2 400145ac: ae 10 62 04 or %g1, 0x204, %l7 400145b0: 05 10 00 d7 sethi %hi(0x40035c00), %g2 400145b4: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400145b8: a6 10 a2 0c or %g2, 0x20c, %l3 400145bc: b6 10 63 e0 or %g1, 0x3e0, %i3 400145c0: 2d 10 00 d7 sethi %hi(0x40035c00), %l6 400145c4: 2b 10 00 d7 sethi %hi(0x40035c00), %l5 400145c8: a4 10 00 1c mov %i4, %l2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400145cc: a2 10 00 10 mov %l0, %l1 400145d0: 10 80 00 18 b 40014630 <_Timer_Server_body+0xd0> 400145d4: a8 10 00 13 mov %l3, %l4 _Timer_Server_reset_ticks_timer(); _Timer_Server_reset_seconds_timer(); 400145d8: 80 a0 40 17 cmp %g1, %l7 400145dc: 32 80 00 27 bne,a 40014678 <_Timer_Server_body+0x118> 400145e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED 400145e4: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 400145e8: 82 00 7f ff add %g1, -1, %g1 400145ec: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] 400145f0: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 400145f4: 80 a0 a0 00 cmp %g2, 0 400145f8: 02 80 00 2b be 400146a4 <_Timer_Server_body+0x144> 400145fc: 01 00 00 00 nop * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 40014600: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 <== NOT EXECUTED 40014604: 40 00 14 3f call 40019700 <_Watchdog_Remove> 40014608: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_stop_seconds_timer(); 4001460c: 40 00 14 3d call 40019700 <_Watchdog_Remove> 40014610: 90 10 00 14 mov %l4, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40014614: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40014618: 82 00 60 01 inc %g1 4001461c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] * This ensures that the primary difference is that _ISR_Nest_level * is 0 for task-based timers and non-zero for the others. */ _Thread_Disable_dispatch(); _Timer_Server_process_ticks_chain(); 40014620: 7f ff ff bf call 4001451c <_Timer_Server_process_ticks_chain> 40014624: 01 00 00 00 nop _Timer_Server_process_seconds_chain(); 40014628: 7f ff ff a2 call 400144b0 <_Timer_Server_process_seconds_chain> 4001462c: 01 00 00 00 nop /* * Block until there is something to do. */ _Thread_Set_state( _Timer_Server, STATES_DELAYING ); 40014630: d0 07 21 78 ld [ %i4 + 0x178 ], %o0 40014634: 40 00 10 de call 400189ac <_Thread_Set_state> 40014638: 92 10 20 08 mov 8, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 4001463c: c2 05 a1 ec ld [ %l6 + 0x1ec ], %g1 _Timer_Server_reset_ticks_timer(); 40014640: 80 a0 40 1d cmp %g1, %i5 40014644: 22 bf ff e5 be,a 400145d8 <_Timer_Server_body+0x78> 40014648: c2 05 62 00 ld [ %l5 + 0x200 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001464c: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 40014650: d2 04 a1 78 ld [ %l2 + 0x178 ], %o1 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40014654: 90 10 00 1a mov %i2, %o0 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014658: c2 22 60 54 st %g1, [ %o1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4001465c: 40 00 13 bf call 40019558 <_Watchdog_Insert> 40014660: 92 02 60 48 add %o1, 0x48, %o1 40014664: c2 05 62 00 ld [ %l5 + 0x200 ], %g1 _Timer_Server_reset_seconds_timer(); 40014668: 80 a0 40 17 cmp %g1, %l7 4001466c: 02 bf ff de be 400145e4 <_Timer_Server_body+0x84> 40014670: 01 00 00 00 nop Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014674: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40014678: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4001467c: c2 24 e0 0c st %g1, [ %l3 + 0xc ] <== NOT EXECUTED _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 40014680: 40 00 13 b6 call 40019558 <_Watchdog_Insert> <== NOT EXECUTED 40014684: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014688: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED 4001468c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40014690: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] <== NOT EXECUTED 40014694: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 <== NOT EXECUTED 40014698: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001469c: 32 bf ff da bne,a 40014604 <_Timer_Server_body+0xa4> <== NOT EXECUTED 400146a0: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 <== NOT EXECUTED _Thread_Dispatch(); 400146a4: 40 00 0d 4f call 40017be0 <_Thread_Dispatch> 400146a8: 01 00 00 00 nop * At this point, at least one of the timers this task relies * upon has fired. Stop them both while we process any outstanding * timers. Before we block, we will restart them. */ _Timer_Server_stop_ticks_timer(); 400146ac: 10 bf ff d6 b 40014604 <_Timer_Server_body+0xa4> 400146b0: d0 04 a1 78 ld [ %l2 + 0x178 ], %o0 4001451c <_Timer_Server_process_ticks_chain>: void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 4001451c: 03 10 00 d8 sethi %hi(0x40036000), %g1 if ( snapshot >= _Timer_Server_ticks_last_time ) 40014520: 07 10 00 d7 sethi %hi(0x40035c00), %g3 void _Timer_Server_process_ticks_chain(void) { Watchdog_Interval snapshot; Watchdog_Interval ticks; snapshot = _Watchdog_Ticks_since_boot; 40014524: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 if ( snapshot >= _Timer_Server_ticks_last_time ) 40014528: c2 00 e1 fc ld [ %g3 + 0x1fc ], %g1 4001452c: 80 a0 80 01 cmp %g2, %g1 40014530: 1a 80 00 04 bcc 40014540 <_Timer_Server_process_ticks_chain+0x24> 40014534: 94 20 80 01 sub %g2, %g1, %o2 ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; 40014538: 82 38 00 01 xnor %g0, %g1, %g1 <== NOT EXECUTED 4001453c: 94 00 40 02 add %g1, %g2, %o2 <== NOT EXECUTED _Timer_Server_ticks_last_time = snapshot; _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 40014540: 11 10 00 d7 sethi %hi(0x40035c00), %o0 if ( snapshot >= _Timer_Server_ticks_last_time ) ticks = snapshot - _Timer_Server_ticks_last_time; else ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot; _Timer_Server_ticks_last_time = snapshot; 40014544: c4 20 e1 fc st %g2, [ %g3 + 0x1fc ] _Watchdog_Adjust( &_Timer_Ticks_chain, WATCHDOG_FORWARD, ticks ); 40014548: 90 12 21 ec or %o0, 0x1ec, %o0 4001454c: 92 10 20 00 clr %o1 40014550: 82 13 c0 00 mov %o7, %g1 40014554: 40 00 13 d0 call 40019494 <_Watchdog_Adjust> 40014558: 9e 10 40 00 mov %g1, %o7 4001455c: 01 00 00 00 nop 4000d330 <_Timespec_Divide>: const struct timespec *lhs, const struct timespec *rhs, uint32_t *ival_percentage, uint32_t *fval_percentage ) { 4000d330: 9d e3 bf 98 save %sp, -104, %sp * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d334: c2 06 40 00 ld [ %i1 ], %g1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; 4000d338: de 06 20 04 ld [ %i0 + 4 ], %o7 right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d33c: 96 10 00 01 mov %g1, %o3 4000d340: 95 38 60 1f sra %g1, 0x1f, %o2 4000d344: 83 30 60 1d srl %g1, 0x1d, %g1 4000d348: 9b 2a e0 03 sll %o3, 3, %o5 4000d34c: 99 2a a0 03 sll %o2, 3, %o4 4000d350: 98 10 40 0c or %g1, %o4, %o4 4000d354: 83 33 60 1b srl %o5, 0x1b, %g1 4000d358: 85 2b 20 05 sll %o4, 5, %g2 4000d35c: 87 2b 60 05 sll %o5, 5, %g3 4000d360: 84 10 40 02 or %g1, %g2, %g2 4000d364: 86 a0 c0 0d subcc %g3, %o5, %g3 4000d368: 83 30 e0 1a srl %g3, 0x1a, %g1 4000d36c: 84 60 80 0c subx %g2, %o4, %g2 4000d370: 9b 28 e0 06 sll %g3, 6, %o5 4000d374: 99 28 a0 06 sll %g2, 6, %o4 4000d378: 9a a3 40 03 subcc %o5, %g3, %o5 4000d37c: 98 10 40 0c or %g1, %o4, %o4 4000d380: 98 63 00 02 subx %o4, %g2, %o4 4000d384: 9a 83 40 0b addcc %o5, %o3, %o5 4000d388: 83 33 60 1e srl %o5, 0x1e, %g1 4000d38c: 98 43 00 0a addx %o4, %o2, %o4 4000d390: 87 2b 60 02 sll %o5, 2, %g3 4000d394: 85 2b 20 02 sll %o4, 2, %g2 4000d398: 9a 83 40 03 addcc %o5, %g3, %o5 4000d39c: 84 10 40 02 or %g1, %g2, %g2 4000d3a0: 83 33 60 1e srl %o5, 0x1e, %g1 4000d3a4: 98 43 00 02 addx %o4, %g2, %o4 4000d3a8: 87 2b 60 02 sll %o5, 2, %g3 4000d3ac: 85 2b 20 02 sll %o4, 2, %g2 4000d3b0: 9a 83 40 03 addcc %o5, %g3, %o5 4000d3b4: 84 10 40 02 or %g1, %g2, %g2 4000d3b8: 83 33 60 1e srl %o5, 0x1e, %g1 4000d3bc: 98 43 00 02 addx %o4, %g2, %o4 4000d3c0: 85 2b 20 02 sll %o4, 2, %g2 4000d3c4: 84 10 40 02 or %g1, %g2, %g2 right += rhs->tv_nsec; 4000d3c8: c2 06 60 04 ld [ %i1 + 4 ], %g1 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d3cc: 87 2b 60 02 sll %o5, 2, %g3 4000d3d0: 9a 83 40 03 addcc %o5, %g3, %o5 right += rhs->tv_nsec; 4000d3d4: 95 38 60 1f sra %g1, 0x1f, %o2 * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; left += lhs->tv_nsec; right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d3d8: 98 43 00 02 addx %o4, %g2, %o4 4000d3dc: 89 33 60 17 srl %o5, 0x17, %g4 4000d3e0: 85 2b 20 09 sll %o4, 9, %g2 4000d3e4: 87 2b 60 09 sll %o5, 9, %g3 4000d3e8: 84 11 00 02 or %g4, %g2, %g2 right += rhs->tv_nsec; 4000d3ec: 96 80 c0 01 addcc %g3, %g1, %o3 4000d3f0: 94 40 80 0a addx %g2, %o2, %o2 if ( right == 0 ) { 4000d3f4: 80 92 80 0b orcc %o2, %o3, %g0 4000d3f8: 12 80 00 06 bne 4000d410 <_Timespec_Divide+0xe0> 4000d3fc: f0 06 00 00 ld [ %i0 ], %i0 *ival_percentage = 0; 4000d400: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED *fval_percentage = 0; 4000d404: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED 4000d408: 81 c7 e0 08 ret <== NOT EXECUTED 4000d40c: 81 e8 00 00 restore <== NOT EXECUTED /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d410: 83 36 20 1d srl %i0, 0x1d, %g1 4000d414: 9b 2e 20 03 sll %i0, 3, %o5 4000d418: 91 3e 20 1f sra %i0, 0x1f, %o0 4000d41c: 99 2a 20 03 sll %o0, 3, %o4 4000d420: 98 10 40 0c or %g1, %o4, %o4 4000d424: 83 33 60 1b srl %o5, 0x1b, %g1 4000d428: 85 2b 20 05 sll %o4, 5, %g2 4000d42c: 87 2b 60 05 sll %o5, 5, %g3 4000d430: 84 10 40 02 or %g1, %g2, %g2 4000d434: 86 a0 c0 0d subcc %g3, %o5, %g3 4000d438: 83 30 e0 1a srl %g3, 0x1a, %g1 4000d43c: 84 60 80 0c subx %g2, %o4, %g2 4000d440: 9b 28 e0 06 sll %g3, 6, %o5 4000d444: 99 28 a0 06 sll %g2, 6, %o4 4000d448: 9a a3 40 03 subcc %o5, %g3, %o5 4000d44c: 98 10 40 0c or %g1, %o4, %o4 4000d450: 98 63 00 02 subx %o4, %g2, %o4 4000d454: 9a 83 40 18 addcc %o5, %i0, %o5 4000d458: 83 33 60 1e srl %o5, 0x1e, %g1 4000d45c: 98 43 00 08 addx %o4, %o0, %o4 4000d460: 87 2b 60 02 sll %o5, 2, %g3 4000d464: 85 2b 20 02 sll %o4, 2, %g2 4000d468: 9a 83 40 03 addcc %o5, %g3, %o5 4000d46c: 84 10 40 02 or %g1, %g2, %g2 4000d470: 83 33 60 1e srl %o5, 0x1e, %g1 4000d474: 98 43 00 02 addx %o4, %g2, %o4 4000d478: 87 2b 60 02 sll %o5, 2, %g3 4000d47c: 85 2b 20 02 sll %o4, 2, %g2 4000d480: 9a 83 40 03 addcc %o5, %g3, %o5 4000d484: 84 10 40 02 or %g1, %g2, %g2 4000d488: 83 33 60 1e srl %o5, 0x1e, %g1 4000d48c: 98 43 00 02 addx %o4, %g2, %o4 4000d490: 87 2b 60 02 sll %o5, 2, %g3 4000d494: 85 2b 20 02 sll %o4, 2, %g2 4000d498: 9a 83 40 03 addcc %o5, %g3, %o5 4000d49c: 84 10 40 02 or %g1, %g2, %g2 4000d4a0: 83 33 60 17 srl %o5, 0x17, %g1 4000d4a4: 98 43 00 02 addx %o4, %g2, %o4 4000d4a8: 93 2b 60 09 sll %o5, 9, %o1 4000d4ac: 91 2b 20 09 sll %o4, 9, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d4b0: 92 82 40 0f addcc %o1, %o7, %o1 /* * For math simplicity just convert the timespec to nanoseconds * in a 64-bit integer. */ left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND; 4000d4b4: 90 10 40 08 or %g1, %o0, %o0 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d4b8: 83 32 60 1e srl %o1, 0x1e, %g1 4000d4bc: a1 3b e0 1f sra %o7, 0x1f, %l0 4000d4c0: 87 2a 60 02 sll %o1, 2, %g3 4000d4c4: 90 42 00 10 addx %o0, %l0, %o0 4000d4c8: 85 2a 20 02 sll %o0, 2, %g2 4000d4cc: 84 10 40 02 or %g1, %g2, %g2 4000d4d0: 83 30 e0 1b srl %g3, 0x1b, %g1 4000d4d4: 99 28 a0 05 sll %g2, 5, %o4 4000d4d8: 9b 28 e0 05 sll %g3, 5, %o5 4000d4dc: 98 10 40 0c or %g1, %o4, %o4 4000d4e0: 9a a3 40 03 subcc %o5, %g3, %o5 4000d4e4: 98 63 00 02 subx %o4, %g2, %o4 4000d4e8: 9a 83 40 09 addcc %o5, %o1, %o5 4000d4ec: 83 33 60 1e srl %o5, 0x1e, %g1 4000d4f0: 98 43 00 08 addx %o4, %o0, %o4 4000d4f4: 87 2b 60 02 sll %o5, 2, %g3 4000d4f8: 85 2b 20 02 sll %o4, 2, %g2 4000d4fc: 9a 83 40 03 addcc %o5, %g3, %o5 4000d500: 84 10 40 02 or %g1, %g2, %g2 4000d504: 83 33 60 1e srl %o5, 0x1e, %g1 4000d508: 87 2b 60 02 sll %o5, 2, %g3 4000d50c: 98 43 00 02 addx %o4, %g2, %o4 4000d510: 9a 83 40 03 addcc %o5, %g3, %o5 4000d514: 85 2b 20 02 sll %o4, 2, %g2 4000d518: 84 10 40 02 or %g1, %g2, %g2 4000d51c: 83 33 60 1b srl %o5, 0x1b, %g1 4000d520: 98 43 00 02 addx %o4, %g2, %o4 4000d524: 93 2b 60 05 sll %o5, 5, %o1 4000d528: 91 2b 20 05 sll %o4, 5, %o0 4000d52c: 40 00 36 56 call 4001ae84 <__udivdi3> 4000d530: 90 10 40 08 or %g1, %o0, %o0 *ival_percentage = answer / 1000; 4000d534: 94 10 20 00 clr %o2 * Put it back in the timespec result. * * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; 4000d538: a0 10 00 08 mov %o0, %l0 4000d53c: a2 10 00 09 mov %o1, %l1 *ival_percentage = answer / 1000; 4000d540: 96 10 23 e8 mov 0x3e8, %o3 4000d544: 40 00 36 50 call 4001ae84 <__udivdi3> 4000d548: 90 10 00 10 mov %l0, %o0 *fval_percentage = answer % 1000; 4000d54c: 90 10 00 10 mov %l0, %o0 * TODO: Rounding on the last digit of the fval. */ answer = (left * 100000) / right; *ival_percentage = answer / 1000; 4000d550: d2 26 80 00 st %o1, [ %i2 ] *fval_percentage = answer % 1000; 4000d554: 94 10 20 00 clr %o2 4000d558: 92 10 00 11 mov %l1, %o1 4000d55c: 40 00 37 29 call 4001b200 <__umoddi3> 4000d560: 96 10 23 e8 mov 0x3e8, %o3 4000d564: d2 26 c0 00 st %o1, [ %i3 ] 4000d568: 81 c7 e0 08 ret 4000d56c: 81 e8 00 00 restore 4000b64c <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, boolean is_internal, uint32_t the_error ) { 4000b64c: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 4000b650: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b654: 82 10 60 64 or %g1, 0x64, %g1 ! 4001c064 <_User_extensions_List> 4000b658: e0 00 60 08 ld [ %g1 + 8 ], %l0 !_Chain_Is_head( &_User_extensions_List, the_node ) ; 4000b65c: 80 a4 00 01 cmp %l0, %g1 4000b660: 02 80 00 0d be 4000b694 <_User_extensions_Fatal+0x48> 4000b664: a2 10 00 01 mov %g1, %l1 the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 4000b668: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000b66c: 80 a0 60 00 cmp %g1, 0 4000b670: 02 80 00 05 be 4000b684 <_User_extensions_Fatal+0x38> 4000b674: 90 10 00 18 mov %i0, %o0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 4000b678: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000b67c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000b680: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 4000b684: e0 04 20 04 ld [ %l0 + 4 ], %l0 { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; 4000b688: 80 a4 00 11 cmp %l0, %l1 4000b68c: 32 bf ff f8 bne,a 4000b66c <_User_extensions_Fatal+0x20> 4000b690: c2 04 20 30 ld [ %l0 + 0x30 ], %g1 4000b694: 81 c7 e0 08 ret 4000b698: 81 e8 00 00 restore 400128f4 <_User_extensions_Remove_set>: */ void _User_extensions_Remove_set ( User_extensions_Control *the_extension ) { 400128f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED _Chain_Extract( &the_extension->Node ); 400128f8: 40 00 14 87 call 40017b14 <_Chain_Extract> <== NOT EXECUTED 400128fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED /* * If a switch handler is present, remove it. */ if ( the_extension->Callouts.thread_switch != NULL ) 40012900: c2 06 20 24 ld [ %i0 + 0x24 ], %g1 <== NOT EXECUTED 40012904: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40012908: 02 80 00 04 be 40012918 <_User_extensions_Remove_set+0x24> <== NOT EXECUTED 4001290c: 01 00 00 00 nop <== NOT EXECUTED _Chain_Extract( &the_extension->Switch.Node ); 40012910: 40 00 14 81 call 40017b14 <_Chain_Extract> <== NOT EXECUTED 40012914: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED 40012918: 81 c7 e0 08 ret <== NOT EXECUTED 4001291c: 81 e8 00 00 restore <== NOT EXECUTED 4000b6e8 <_User_extensions_Thread_create>: */ boolean _User_extensions_Thread_create ( Thread_Control *the_thread ) { 4000b6e8: 9d e3 bf 98 save %sp, -104, %sp Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; 4000b6ec: 03 10 00 70 sethi %hi(0x4001c000), %g1 4000b6f0: e0 00 60 64 ld [ %g1 + 0x64 ], %l0 ! 4001c064 <_User_extensions_List> 4000b6f4: 82 10 60 64 or %g1, 0x64, %g1 4000b6f8: a2 00 60 04 add %g1, 4, %l1 !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 4000b6fc: 80 a4 00 11 cmp %l0, %l1 4000b700: 02 80 00 0f be 4000b73c <_User_extensions_Thread_create+0x54> 4000b704: 25 10 00 6f sethi %hi(0x4001bc00), %l2 the_node = the_node->next ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.thread_create != NULL ) { 4000b708: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 4000b70c: 80 a0 60 00 cmp %g1, 0 4000b710: 02 80 00 07 be 4000b72c <_User_extensions_Thread_create+0x44> 4000b714: 92 10 00 18 mov %i0, %o1 status = (*the_extension->Callouts.thread_create)( 4000b718: 9f c0 40 00 call %g1 4000b71c: d0 04 a2 bc ld [ %l2 + 0x2bc ], %o0 _Thread_Executing, the_thread ); if ( !status ) 4000b720: 80 a2 20 00 cmp %o0, 0 4000b724: 02 80 00 08 be 4000b744 <_User_extensions_Thread_create+0x5c> 4000b728: 01 00 00 00 nop User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; the_node = the_node->next ) { 4000b72c: e0 04 00 00 ld [ %l0 ], %l0 Chain_Node *the_node; User_extensions_Control *the_extension; boolean status; for ( the_node = _User_extensions_List.first ; !_Chain_Is_tail( &_User_extensions_List, the_node ) ; 4000b730: 80 a4 00 11 cmp %l0, %l1 4000b734: 32 bf ff f6 bne,a 4000b70c <_User_extensions_Thread_create+0x24> 4000b738: c2 04 20 14 ld [ %l0 + 0x14 ], %g1 return FALSE; } } return TRUE; } 4000b73c: 81 c7 e0 08 ret 4000b740: 91 e8 20 01 restore %g0, 1, %o0 if ( the_extension->Callouts.thread_create != NULL ) { status = (*the_extension->Callouts.thread_create)( _Thread_Executing, the_thread ); if ( !status ) 4000b744: 81 c7 e0 08 ret <== NOT EXECUTED 4000b748: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000b834 <_Watchdog_Insert>: void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000b834: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4000b838: 03 10 00 6f sethi %hi(0x4001bc00), %g1 void _Watchdog_Insert( Chain_Control *header, Watchdog_Control *the_watchdog ) { 4000b83c: ac 10 00 18 mov %i0, %l6 Watchdog_Control *after; uint32_t insert_isr_nest_level; Watchdog_Interval delta_interval; insert_isr_nest_level = _ISR_Nest_level; 4000b840: e6 00 62 a4 ld [ %g1 + 0x2a4 ], %l3 _ISR_Disable( level ); 4000b844: 7f ff d9 e9 call 40001fe8 4000b848: 01 00 00 00 nop 4000b84c: b0 10 00 08 mov %o0, %i0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { 4000b850: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000b854: 80 a0 60 00 cmp %g1, 0 4000b858: 12 80 00 49 bne 4000b97c <_Watchdog_Insert+0x148> 4000b85c: 01 00 00 00 nop _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; 4000b860: 2b 10 00 6f sethi %hi(0x4001bc00), %l5 4000b864: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 ! 4001bf60 <_Watchdog_Sync_count> if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000b868: 84 10 20 01 mov 1, %g2 _Watchdog_Sync_count++; 4000b86c: 82 00 60 01 inc %g1 4000b870: 29 10 00 6f sethi %hi(0x4001bc00), %l4 if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); return; } the_watchdog->state = WATCHDOG_BEING_INSERTED; 4000b874: c4 26 60 08 st %g2, [ %i1 + 8 ] _Watchdog_Sync_count++; 4000b878: c2 25 63 60 st %g1, [ %l5 + 0x360 ] if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000b87c: ae 10 00 14 mov %l4, %l7 the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000b880: e4 06 60 0c ld [ %i1 + 0xc ], %l2 * cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; 4000b884: e2 05 80 00 ld [ %l6 ], %l1 ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000b888: 80 a4 a0 00 cmp %l2, 0 4000b88c: 02 80 00 2b be 4000b938 <_Watchdog_Insert+0x104> 4000b890: 03 10 00 6f sethi %hi(0x4001bc00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000b894: c2 04 40 00 ld [ %l1 ], %g1 4000b898: 80 a0 60 00 cmp %g1, 0 4000b89c: 02 80 00 27 be 4000b938 <_Watchdog_Insert+0x104> 4000b8a0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000b8a4: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000b8a8: 80 a4 80 10 cmp %l2, %l0 4000b8ac: 1a 80 00 13 bcc 4000b8f8 <_Watchdog_Insert+0xc4> 4000b8b0: 01 00 00 00 nop after->delta_interval -= delta_interval; 4000b8b4: 10 80 00 1f b 4000b930 <_Watchdog_Insert+0xfc> 4000b8b8: a0 24 00 12 sub %l0, %l2, %l0 if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { 4000b8bc: c2 05 22 b8 ld [ %l4 + 0x2b8 ], %g1 4000b8c0: 80 a4 c0 01 cmp %l3, %g1 4000b8c4: 0a 80 00 30 bcs 4000b984 <_Watchdog_Insert+0x150> 4000b8c8: 01 00 00 00 nop */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ; ; after = _Watchdog_Next( after ) ) { if ( delta_interval == 0 || !_Watchdog_Next( after ) ) 4000b8cc: a4 a4 80 10 subcc %l2, %l0, %l2 4000b8d0: 02 80 00 19 be 4000b934 <_Watchdog_Insert+0x100> 4000b8d4: e2 04 40 00 ld [ %l1 ], %l1 4000b8d8: c2 04 40 00 ld [ %l1 ], %g1 4000b8dc: 80 a0 60 00 cmp %g1, 0 4000b8e0: 02 80 00 16 be 4000b938 <_Watchdog_Insert+0x104> 4000b8e4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 break; if ( delta_interval < after->delta_interval ) { 4000b8e8: e0 04 60 10 ld [ %l1 + 0x10 ], %l0 4000b8ec: 80 a4 00 12 cmp %l0, %l2 4000b8f0: 38 80 00 10 bgu,a 4000b930 <_Watchdog_Insert+0xfc> 4000b8f4: a0 24 00 12 sub %l0, %l2, %l0 * used around this flash point allowed interrupts to execute * which violated the design assumptions. The critical section * mechanism used here WAS redesigned to address this. */ _ISR_Flash( level ); 4000b8f8: 7f ff d9 c0 call 40001ff8 4000b8fc: 90 10 00 18 mov %i0, %o0 4000b900: 7f ff d9 ba call 40001fe8 4000b904: 01 00 00 00 nop if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { 4000b908: c2 06 60 08 ld [ %i1 + 8 ], %g1 4000b90c: 80 a0 60 01 cmp %g1, 1 4000b910: 02 bf ff eb be 4000b8bc <_Watchdog_Insert+0x88> 4000b914: 01 00 00 00 nop _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000b918: e6 25 22 b8 st %l3, [ %l4 + 0x2b8 ] <== NOT EXECUTED _Watchdog_Sync_count--; 4000b91c: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 <== NOT EXECUTED 4000b920: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b924: c2 25 63 60 st %g1, [ %l5 + 0x360 ] <== NOT EXECUTED _ISR_Enable( level ); 4000b928: 7f ff d9 b4 call 40001ff8 <== NOT EXECUTED 4000b92c: 81 e8 00 00 restore <== NOT EXECUTED if ( delta_interval == 0 || !_Watchdog_Next( after ) ) break; if ( delta_interval < after->delta_interval ) { after->delta_interval -= delta_interval; 4000b930: e0 24 60 10 st %l0, [ %l1 + 0x10 ] the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000b934: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b938: c6 00 63 64 ld [ %g1 + 0x364 ], %g3 ! 4001bf64 <_Watchdog_Ticks_since_boot> _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); 4000b93c: c4 04 60 04 ld [ %l1 + 4 ], %g2 the_watchdog->start_time = _Watchdog_Ticks_since_boot; 4000b940: c6 26 60 14 st %g3, [ %i1 + 0x14 ] } } _Watchdog_Activate( the_watchdog ); the_watchdog->delta_interval = delta_interval; 4000b944: e4 26 60 10 st %l2, [ %i1 + 0x10 ] RTEMS_INLINE_ROUTINE void _Watchdog_Activate( Watchdog_Control *the_watchdog ) { the_watchdog->state = WATCHDOG_ACTIVE; 4000b948: 82 10 20 02 mov 2, %g1 ) { Chain_Node *before_node; the_node->previous = after_node; before_node = after_node->next; 4000b94c: c8 00 80 00 ld [ %g2 ], %g4 _Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node ); the_watchdog->start_time = _Watchdog_Ticks_since_boot; exit_insert: _Watchdog_Sync_level = insert_isr_nest_level; 4000b950: e6 25 22 b8 st %l3, [ %l4 + 0x2b8 ] 4000b954: c2 26 60 08 st %g1, [ %i1 + 8 ] _Watchdog_Sync_count--; 4000b958: c2 05 63 60 ld [ %l5 + 0x360 ], %g1 after_node->next = the_node; 4000b95c: f2 20 80 00 st %i1, [ %g2 ] Chain_Node *the_node ) { Chain_Node *before_node; the_node->previous = after_node; 4000b960: c4 26 60 04 st %g2, [ %i1 + 4 ] 4000b964: 82 00 7f ff add %g1, -1, %g1 before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node; 4000b968: f2 21 20 04 st %i1, [ %g4 + 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; 4000b96c: c8 26 40 00 st %g4, [ %i1 ] 4000b970: c2 25 63 60 st %g1, [ %l5 + 0x360 ] _ISR_Enable( level ); 4000b974: 7f ff d9 a1 call 40001ff8 4000b978: 81 e8 00 00 restore * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_watchdog->state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4000b97c: 7f ff d9 9f call 40001ff8 <== NOT EXECUTED 4000b980: 81 e8 00 00 restore <== NOT EXECUTED if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) { goto exit_insert; } if ( _Watchdog_Sync_level > insert_isr_nest_level ) { _Watchdog_Sync_level = insert_isr_nest_level; 4000b984: e6 25 e2 b8 st %l3, [ %l7 + 0x2b8 ] the_watchdog->state = WATCHDOG_BEING_INSERTED; _Watchdog_Sync_count++; restart: delta_interval = the_watchdog->initial; 4000b988: 10 bf ff bf b 4000b884 <_Watchdog_Insert+0x50> 4000b98c: e4 06 60 0c ld [ %i1 + 0xc ], %l2 4000c7ac <_Watchdog_Insert_ticks_helper>: Watchdog_Interval ticks, Objects_Id id, Watchdog_Service_routine_entry TSR, void *arg ) { 4000c7ac: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; (void) _Watchdog_Remove( timer ); 4000c7b0: 40 00 18 b1 call 40012a74 <_Watchdog_Remove> 4000c7b4: 90 10 00 18 mov %i0, %o0 _ISR_Disable( level ); 4000c7b8: 7f ff e8 b2 call 40006a80 4000c7bc: 01 00 00 00 nop 4000c7c0: a0 10 00 08 mov %o0, %l0 /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( timer->state != WATCHDOG_INACTIVE ) { 4000c7c4: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000c7c8: 80 a0 60 00 cmp %g1, 0 4000c7cc: 22 80 00 06 be,a 4000c7e4 <_Watchdog_Insert_ticks_helper+0x38> 4000c7d0: f6 26 20 1c st %i3, [ %i0 + 0x1c ] _ISR_Enable( level ); 4000c7d4: 7f ff e8 af call 40006a90 <== NOT EXECUTED 4000c7d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c7dc: 81 c7 e0 08 ret <== NOT EXECUTED 4000c7e0: 81 e8 00 00 restore <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000c7e4: f4 26 20 20 st %i2, [ %i0 + 0x20 ] the_watchdog->user_data = user_data; 4000c7e8: f8 26 20 24 st %i4, [ %i0 + 0x24 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000c7ec: f2 26 20 0c st %i1, [ %i0 + 0xc ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000c7f0: c0 26 20 08 clr [ %i0 + 8 ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4000c7f4: 92 10 00 18 mov %i0, %o1 4000c7f8: 11 10 00 9c sethi %hi(0x40027000), %o0 4000c7fc: 40 00 18 34 call 400128cc <_Watchdog_Insert> 4000c800: 90 12 23 8c or %o0, 0x38c, %o0 ! 4002738c <_Watchdog_Ticks_chain> * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ _Watchdog_Initialize( timer, TSR, id, arg ); _Watchdog_Insert_ticks( timer, ticks ); _ISR_Enable( level ); 4000c804: b0 10 20 01 mov 1, %i0 4000c808: 7f ff e8 a2 call 40006a90 4000c80c: 90 10 00 10 mov %l0, %o0 return TRUE; } 4000c810: 81 c7 e0 08 ret 4000c814: 81 e8 00 00 restore 4000b9dc <_Watchdog_Remove>: */ Watchdog_States _Watchdog_Remove( Watchdog_Control *the_watchdog ) { 4000b9dc: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); 4000b9e0: 7f ff d9 82 call 40001fe8 4000b9e4: a0 10 00 18 mov %i0, %l0 previous_state = the_watchdog->state; 4000b9e8: f0 06 20 08 ld [ %i0 + 8 ], %i0 switch ( previous_state ) { 4000b9ec: 80 a6 20 01 cmp %i0, 1 4000b9f0: 02 80 00 2a be 4000ba98 <_Watchdog_Remove+0xbc> 4000b9f4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000b9f8: 1a 80 00 09 bcc 4000ba1c <_Watchdog_Remove+0x40> 4000b9fc: 80 a6 20 03 cmp %i0, 3 _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba00: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba04: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 4000ba08: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000ba0c: 7f ff d9 7b call 40001ff8 4000ba10: 01 00 00 00 nop return( previous_state ); } 4000ba14: 81 c7 e0 08 ret 4000ba18: 81 e8 00 00 restore Watchdog_States previous_state; Watchdog_Control *next_watchdog; _ISR_Disable( level ); previous_state = the_watchdog->state; switch ( previous_state ) { 4000ba1c: 18 bf ff fa bgu 4000ba04 <_Watchdog_Remove+0x28> 4000ba20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next( Watchdog_Control *the_watchdog ) { return ( (Watchdog_Control *) the_watchdog->Node.next ); 4000ba24: c8 04 00 00 ld [ %l0 ], %g4 break; case WATCHDOG_ACTIVE: case WATCHDOG_REMOVE_IT: the_watchdog->state = WATCHDOG_INACTIVE; 4000ba28: c0 24 20 08 clr [ %l0 + 8 ] next_watchdog = _Watchdog_Next( the_watchdog ); if ( _Watchdog_Next(next_watchdog) ) 4000ba2c: c2 01 00 00 ld [ %g4 ], %g1 4000ba30: 80 a0 60 00 cmp %g1, 0 4000ba34: 02 80 00 07 be 4000ba50 <_Watchdog_Remove+0x74> 4000ba38: 03 10 00 6f sethi %hi(0x4001bc00), %g1 next_watchdog->delta_interval += the_watchdog->delta_interval; 4000ba3c: c2 01 20 10 ld [ %g4 + 0x10 ], %g1 4000ba40: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 4000ba44: 82 00 40 02 add %g1, %g2, %g1 4000ba48: c2 21 20 10 st %g1, [ %g4 + 0x10 ] if ( _Watchdog_Sync_count ) 4000ba4c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba50: c4 00 63 60 ld [ %g1 + 0x360 ], %g2 ! 4001bf60 <_Watchdog_Sync_count> 4000ba54: 80 a0 a0 00 cmp %g2, 0 4000ba58: 22 80 00 07 be,a 4000ba74 <_Watchdog_Remove+0x98> 4000ba5c: c2 04 20 04 ld [ %l0 + 4 ], %g1 _Watchdog_Sync_level = _ISR_Nest_level; 4000ba60: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 4000ba64: c6 00 62 a4 ld [ %g1 + 0x2a4 ], %g3 ! 4001bea4 <_ISR_Nest_level> <== NOT EXECUTED 4000ba68: 05 10 00 6f sethi %hi(0x4001bc00), %g2 <== NOT EXECUTED 4000ba6c: c6 20 a2 b8 st %g3, [ %g2 + 0x2b8 ] ! 4001beb8 <_Watchdog_Sync_level> <== NOT EXECUTED { Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; 4000ba70: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED next->previous = previous; previous->next = next; 4000ba74: c8 20 40 00 st %g4, [ %g1 ] Chain_Node *next; Chain_Node *previous; next = the_node->next; previous = the_node->previous; next->previous = previous; 4000ba78: c2 21 20 04 st %g1, [ %g4 + 4 ] _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba7c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000ba80: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 4000ba84: c4 24 20 18 st %g2, [ %l0 + 0x18 ] _ISR_Enable( level ); 4000ba88: 7f ff d9 5c call 40001ff8 4000ba8c: 01 00 00 00 nop return( previous_state ); } 4000ba90: 81 c7 e0 08 ret 4000ba94: 81 e8 00 00 restore _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000ba98: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 <== NOT EXECUTED /* * It is not actually on the chain so just change the state and * the Insert operation we interrupted will be aborted. */ the_watchdog->state = WATCHDOG_INACTIVE; 4000ba9c: c0 24 20 08 clr [ %l0 + 8 ] <== NOT EXECUTED _Watchdog_Sync_level = _ISR_Nest_level; _Chain_Extract_unprotected( &the_watchdog->Node ); break; } the_watchdog->stop_time = _Watchdog_Ticks_since_boot; 4000baa0: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED _ISR_Enable( level ); 4000baa4: 7f ff d9 55 call 40001ff8 <== NOT EXECUTED 4000baa8: 01 00 00 00 nop <== NOT EXECUTED return( previous_state ); } 4000baac: 81 c7 e0 08 ret <== NOT EXECUTED 4000bab0: 81 e8 00 00 restore <== NOT EXECUTED 4000bb60 <_Workspace_Allocate_or_fatal_error>: */ void *_Workspace_Allocate_or_fatal_error( size_t size ) { 4000bb60: 9d e3 bf 98 save %sp, -104, %sp RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4000bb64: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000bb68: 92 10 00 18 mov %i0, %o1 4000bb6c: 7f ff f2 33 call 40008438 <_Heap_Allocate> 4000bb70: 90 12 22 2c or %o0, 0x22c, %o0 void *memory; memory = _Workspace_Allocate( size ); if ( memory == NULL ) 4000bb74: b0 92 20 00 orcc %o0, 0, %i0 4000bb78: 12 80 00 04 bne 4000bb88 <_Workspace_Allocate_or_fatal_error+0x28> 4000bb7c: 92 10 20 01 mov 1, %o1 _Internal_error_Occurred( 4000bb80: 7f ff f3 60 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bb84: 94 10 20 04 mov 4, %o2 <== NOT EXECUTED TRUE, INTERNAL_ERROR_WORKSPACE_ALLOCATION ); return memory; } 4000bb88: 81 c7 e0 08 ret 4000bb8c: 81 e8 00 00 restore 4000bb90 <_Workspace_Handler_initialization>: void _Workspace_Handler_initialization( void *starting_address, size_t size ) { 4000bb90: 9d e3 bf 98 save %sp, -104, %sp uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) 4000bb94: 80 a6 20 00 cmp %i0, 0 4000bb98: 02 80 00 1d be 4000bc0c <_Workspace_Handler_initialization+0x7c> 4000bb9c: 80 8e 20 07 btst 7, %i0 4000bba0: 12 80 00 1c bne 4000bc10 <_Workspace_Handler_initialization+0x80> 4000bba4: 90 10 20 00 clr %o0 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000bba8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000bbac: c4 00 62 04 ld [ %g1 + 0x204 ], %g2 ! 4001be04 <_CPU_Table+0x10> 4000bbb0: 80 a0 a0 00 cmp %g2, 0 4000bbb4: 02 80 00 0c be 4000bbe4 <_Workspace_Handler_initialization+0x54> 4000bbb8: 92 10 00 18 mov %i0, %o1 for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000bbbc: 87 36 60 02 srl %i1, 2, %g3 <== NOT EXECUTED 4000bbc0: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000bbc4: 02 80 00 08 be 4000bbe4 <_Workspace_Handler_initialization+0x54> <== NOT EXECUTED 4000bbc8: 84 10 20 00 clr %g2 <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; 4000bbcc: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; index++ ) 4000bbd0: 84 00 a0 01 inc %g2 <== NOT EXECUTED INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { for( zero_out_array = (uint32_t *) starting_address, index = 0 ; index < size / sizeof( uint32_t ) ; 4000bbd4: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED 4000bbd8: 12 bf ff fd bne 4000bbcc <_Workspace_Handler_initialization+0x3c> <== NOT EXECUTED 4000bbdc: c0 20 40 18 clr [ %g1 + %i0 ] <== NOT EXECUTED index++ ) zero_out_array[ index ] = 0; } memory_available = _Heap_Initialize( 4000bbe0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000bbe4: 94 10 00 19 mov %i1, %o2 4000bbe8: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000bbec: 96 10 20 08 mov 8, %o3 4000bbf0: 7f ff f2 f7 call 400087cc <_Heap_Initialize> 4000bbf4: 90 12 22 2c or %o0, 0x22c, %o0 starting_address, size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) 4000bbf8: 80 a2 20 00 cmp %o0, 0 4000bbfc: 02 80 00 0a be 4000bc24 <_Workspace_Handler_initialization+0x94> 4000bc00: b0 10 20 00 clr %i0 4000bc04: 81 c7 e0 08 ret 4000bc08: 81 e8 00 00 restore uint32_t *zero_out_array; uint32_t index; uint32_t memory_available; if ( !starting_address || !_Addresses_Is_aligned( starting_address ) ) _Internal_error_Occurred( 4000bc0c: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000bc10: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4000bc14: 7f ff f3 3b call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bc18: 94 10 20 02 mov 2, %o2 <== NOT EXECUTED INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS ); if ( _CPU_Table.do_zero_of_workspace ) { 4000bc1c: 10 bf ff e4 b 4000bbac <_Workspace_Handler_initialization+0x1c> <== NOT EXECUTED 4000bc20: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED size, CPU_HEAP_ALIGNMENT ); if ( memory_available == 0 ) _Internal_error_Occurred( 4000bc24: b2 10 20 01 mov 1, %i1 <== NOT EXECUTED 4000bc28: 7f ff f3 36 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 4000bc2c: 95 e8 20 03 restore %g0, 3, %o2 <== NOT EXECUTED 4000bc30: 01 00 00 00 nop 40019538 <_exit>: #include #if !defined(RTEMS_UNIX) void _exit(int status) { 40019538: 9d e3 bf 98 save %sp, -104, %sp * 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(); 4001953c: 7f ff ff e4 call 400194cc 40019540: 01 00 00 00 nop rtems_shutdown_executive(status); 40019544: 40 00 00 4c call 40019674 40019548: 90 10 00 18 mov %i0, %o0 4001954c: 30 80 00 00 b,a 4001954c <_exit+0x14> <== NOT EXECUTED 40024fe0 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 40024fe0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40024fe4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40024fe8: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED 40024fec: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40024ff0: 7f ff ff 6f call 40024dac <== NOT EXECUTED 40024ff4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40024ff8: 01 00 00 00 nop 40026c74 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr ) { return getpid(); 40026c74: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40026c78: 7f ff ff fd call 40026c6c <== NOT EXECUTED 40026c7c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40026c80: 01 00 00 00 nop 4000d32c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 4000d32c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000d330: 7f ff ff e6 call 4000d2c8 <== NOT EXECUTED 4000d334: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000d338: 01 00 00 00 nop 40026f20 <_kill_r>: struct _reent *ptr, pid_t pid, int sig ) { return kill( pid, sig ); 40026f20: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40026f24: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40026f28: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40026f2c: 7f ff ff f8 call 40026f0c <== NOT EXECUTED 40026f30: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40026f34: 01 00 00 00 nop 40005038 <_link_r>: struct _reent *ptr, const char *existing, const char *new ) { return link( existing, new ); 40005038: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4000503c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40005040: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40005044: 7f ff ff 59 call 40004da8 <== NOT EXECUTED 40005048: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4000504c: 01 00 00 00 nop 40004004 <_open_r>: const char *buf, int flags, int mode ) { return open( buf, flags, mode ); 40004004: 90 10 00 09 mov %o1, %o0 40004008: 92 10 00 0a mov %o2, %o1 4000400c: 94 10 00 0b mov %o3, %o2 40004010: 82 13 c0 00 mov %o7, %g1 40004014: 7f ff ff 36 call 40003cec 40004018: 9e 10 40 00 mov %g1, %o7 4000401c: 01 00 00 00 nop <== NOT EXECUTED 40003724 <_realloc_r>: struct _reent *ignored, void *ptr, size_t size ) { return realloc( ptr, size ); 40003724: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40003728: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 4000372c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003730: 7f ff ff b6 call 40003608 <== NOT EXECUTED 40003734: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003738: 01 00 00 00 nop 40007b28 <_stat_r>: struct _reent *ptr, const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 40007b28: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 40007b2c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED 40007b30: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40007b34: 7f ff ff b3 call 40007a00 <== NOT EXECUTED 40007b38: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40007b3c: 01 00 00 00 nop 4001b0b8 <_unlink_r>: int _unlink_r( struct _reent *ptr, const char *path ) { return unlink( path ); 4001b0b8: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED 4001b0bc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001b0c0: 7f ff ff a5 call 4001af54 <== NOT EXECUTED 4001b0c4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001b0c8: 01 00 00 00 nop 400068f8 : int alphasort(d1, d2) const void *d1; const void *d2; { return(strcmp((*(struct dirent **)d1)->d_name, 400068f8: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED 400068fc: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED 40006900: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED 40006904: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED 40006908: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4000690c: 40 00 39 dc call 4001507c <== NOT EXECUTED 40006910: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40006914: 01 00 00 00 nop 40019140 : #include int chdir( const char *pathname ) { 40019140: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 40019144: 92 10 20 01 mov 1, %o1 40019148: 90 10 00 18 mov %i0, %o0 4001914c: a0 07 bf e8 add %fp, -24, %l0 40019150: 96 10 20 01 mov 1, %o3 40019154: 94 10 00 10 mov %l0, %o2 40019158: 7f ff b3 bf call 40006054 4001915c: b0 10 3f ff mov -1, %i0 pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE ); if ( result != 0 ) 40019160: 80 a2 20 00 cmp %o0, 0 40019164: 12 80 00 2f bne 40019220 40019168: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 4001916c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 40019170: 80 a0 60 00 cmp %g1, 0 40019174: 22 80 00 2d be,a 40019228 40019178: 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_DIRECTORY ) { 4001917c: 9f c0 40 00 call %g1 40019180: 90 10 00 10 mov %l0, %o0 40019184: 80 a2 20 01 cmp %o0, 1 40019188: 12 80 00 19 bne 400191ec 4001918c: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTDIR ); } rtems_filesystem_freenode( &rtems_filesystem_current ); 40019190: 21 10 00 f5 sethi %hi(0x4003d400), %l0 40019194: d0 04 23 f0 ld [ %l0 + 0x3f0 ], %o0 ! 4003d7f0 40019198: c2 02 20 0c ld [ %o0 + 0xc ], %g1 4001919c: 80 a0 60 00 cmp %g1, 0 400191a0: 22 80 00 09 be,a 400191c4 400191a4: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400191a8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400191ac: 80 a0 60 00 cmp %g1, 0 400191b0: 22 80 00 05 be,a 400191c4 400191b4: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 400191b8: 9f c0 40 00 call %g1 400191bc: 90 02 20 04 add %o0, 4, %o0 rtems_filesystem_current = loc; 400191c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400191c4: c6 04 23 f0 ld [ %l0 + 0x3f0 ], %g3 400191c8: c2 20 e0 04 st %g1, [ %g3 + 4 ] 400191cc: c4 07 bf ec ld [ %fp + -20 ], %g2 400191d0: c4 20 e0 08 st %g2, [ %g3 + 8 ] 400191d4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400191d8: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 400191dc: c4 07 bf f4 ld [ %fp + -12 ], %g2 400191e0: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return 0; } 400191e4: 81 c7 e0 08 ret 400191e8: 91 e8 20 00 restore %g0, 0, %o0 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 400191ec: 80 a0 60 00 cmp %g1, 0 400191f0: 02 80 00 08 be 40019210 400191f4: 01 00 00 00 nop 400191f8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400191fc: 80 a0 60 00 cmp %g1, 0 40019200: 02 80 00 04 be 40019210 40019204: 01 00 00 00 nop 40019208: 9f c0 40 00 call %g1 4001920c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 40019210: 40 00 39 1b call 4002767c <__errno> 40019214: b0 10 3f ff mov -1, %i0 40019218: 82 10 20 14 mov 0x14, %g1 4001921c: c2 22 00 00 st %g1, [ %o0 ] 40019220: 81 c7 e0 08 ret 40019224: 81 e8 00 00 restore /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { rtems_filesystem_freenode( &loc ); 40019228: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001922c: 02 80 00 04 be 4001923c <== NOT EXECUTED 40019230: 01 00 00 00 nop <== NOT EXECUTED 40019234: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019238: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001923c: 40 00 39 10 call 4002767c <__errno> <== NOT EXECUTED 40019240: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019244: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40019248: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001924c: 81 c7 e0 08 ret <== NOT EXECUTED 40019250: 81 e8 00 00 restore <== NOT EXECUTED 40019254 : int chmod( const char *path, mode_t mode ) { 40019254: 9d e3 bf 88 save %sp, -120, %sp int status; rtems_filesystem_location_info_t loc; int result; status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE ); 40019258: 92 10 20 00 clr %o1 4001925c: 90 10 00 18 mov %i0, %o0 40019260: a0 07 bf e8 add %fp, -24, %l0 40019264: 96 10 20 01 mov 1, %o3 40019268: 94 10 00 10 mov %l0, %o2 4001926c: 7f ff b3 7a call 40006054 40019270: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40019274: 80 a2 20 00 cmp %o0, 0 40019278: 12 80 00 16 bne 400192d0 4001927c: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !loc.handlers ){ 40019280: 80 a0 60 00 cmp %g1, 0 40019284: 22 80 00 25 be,a 40019318 40019288: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ 4001928c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40019290: 80 a0 60 00 cmp %g1, 0 40019294: 02 80 00 11 be 400192d8 40019298: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4001929c: 90 10 00 10 mov %l0, %o0 400192a0: 9f c0 40 00 call %g1 400192a4: 93 32 60 10 srl %o1, 0x10, %o1 rtems_filesystem_freenode( &loc ); 400192a8: c2 07 bf f0 ld [ %fp + -16 ], %g1 400192ac: 80 a0 60 00 cmp %g1, 0 400192b0: 02 80 00 08 be 400192d0 400192b4: b0 10 00 08 mov %o0, %i0 400192b8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400192bc: 80 a0 60 00 cmp %g1, 0 400192c0: 02 80 00 23 be 4001934c 400192c4: 01 00 00 00 nop 400192c8: 9f c0 40 00 call %g1 400192cc: 90 10 00 10 mov %l0, %o0 return result; } 400192d0: 81 c7 e0 08 ret 400192d4: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EBADF ); } if ( !loc.handlers->fchmod_h ){ rtems_filesystem_freenode( &loc ); 400192d8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400192dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400192e0: 02 80 00 08 be 40019300 <== NOT EXECUTED 400192e4: 01 00 00 00 nop <== NOT EXECUTED 400192e8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400192ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400192f0: 02 80 00 04 be 40019300 <== NOT EXECUTED 400192f4: 01 00 00 00 nop <== NOT EXECUTED 400192f8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400192fc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019300: 40 00 38 df call 4002767c <__errno> <== NOT EXECUTED 40019304: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019308: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001930c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019310: 81 c7 e0 08 ret <== NOT EXECUTED 40019314: 81 e8 00 00 restore <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE ); if ( status != 0 ) return -1; if ( !loc.handlers ){ rtems_filesystem_freenode( &loc ); 40019318: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001931c: 02 80 00 08 be 4001933c <== NOT EXECUTED 40019320: 01 00 00 00 nop <== NOT EXECUTED 40019324: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40019328: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001932c: 02 80 00 04 be 4001933c <== NOT EXECUTED 40019330: 01 00 00 00 nop <== NOT EXECUTED 40019334: 9f c0 40 00 call %g1 <== NOT EXECUTED 40019338: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4001933c: 40 00 38 d0 call 4002767c <__errno> <== NOT EXECUTED 40019340: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019344: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40019348: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001934c: 81 c7 e0 08 ret <== NOT EXECUTED 40019350: 81 e8 00 00 restore <== NOT EXECUTED 40019354 : int chown( const char *path, uid_t owner, gid_t group ) { 40019354: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) ) 40019358: 92 10 20 00 clr %o1 4001935c: 90 10 00 18 mov %i0, %o0 40019360: a0 07 bf e8 add %fp, -24, %l0 40019364: 96 10 20 01 mov 1, %o3 40019368: 94 10 00 10 mov %l0, %o2 4001936c: 7f ff b3 3a call 40006054 40019370: b0 10 3f ff mov -1, %i0 40019374: 80 a2 20 00 cmp %o0, 0 40019378: 12 80 00 15 bne 400193cc 4001937c: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; if ( !loc.ops->chown_h ) { 40019380: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40019384: 80 a0 a0 00 cmp %g2, 0 40019388: 02 80 00 13 be 400193d4 4001938c: 93 2e 60 10 sll %i1, 0x10, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->chown_h)( &loc, owner, group ); 40019390: 95 2e a0 10 sll %i2, 0x10, %o2 40019394: 93 32 60 10 srl %o1, 0x10, %o1 40019398: 95 32 a0 10 srl %o2, 0x10, %o2 4001939c: 9f c0 80 00 call %g2 400193a0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 400193a4: c2 07 bf f0 ld [ %fp + -16 ], %g1 400193a8: 80 a0 60 00 cmp %g1, 0 400193ac: 02 80 00 08 be 400193cc 400193b0: b0 10 00 08 mov %o0, %i0 400193b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400193b8: 80 a0 60 00 cmp %g1, 0 400193bc: 02 80 00 10 be 400193fc 400193c0: 01 00 00 00 nop 400193c4: 9f c0 40 00 call %g1 400193c8: 90 10 00 10 mov %l0, %o0 return result; } 400193cc: 81 c7 e0 08 ret 400193d0: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) ) return -1; if ( !loc.ops->chown_h ) { rtems_filesystem_freenode( &loc ); 400193d4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400193d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400193dc: 02 80 00 04 be 400193ec <== NOT EXECUTED 400193e0: 01 00 00 00 nop <== NOT EXECUTED 400193e4: 9f c0 40 00 call %g1 <== NOT EXECUTED 400193e8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400193ec: 40 00 38 a4 call 4002767c <__errno> <== NOT EXECUTED 400193f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400193f4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400193f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400193fc: 81 c7 e0 08 ret <== NOT EXECUTED 40019400: 81 e8 00 00 restore <== NOT EXECUTED 40019404 : #include int chroot( const char *pathname ) { 40019404: 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) { 40019408: 23 10 00 f5 sethi %hi(0x4003d400), %l1 4001940c: e0 04 63 f0 ld [ %l1 + 0x3f0 ], %l0 ! 4003d7f0 40019410: 03 10 01 00 sethi %hi(0x40040000), %g1 40019414: 82 10 62 d4 or %g1, 0x2d4, %g1 ! 400402d4 40019418: 80 a4 00 01 cmp %l0, %g1 4001941c: 02 80 00 24 be 400194ac 40019420: 01 00 00 00 nop rtems_libio_set_private_env(); /* try to set a new private env*/ if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ rtems_set_errno_and_return_minus_one( ENOTSUP ); }; result = chdir(pathname); 40019424: 7f ff ff 47 call 40019140 40019428: 90 10 00 18 mov %i0, %o0 if (result) { 4001942c: 80 a2 20 00 cmp %o0, 0 40019430: 12 80 00 2b bne 400194dc 40019434: 11 10 00 e8 sethi %hi(0x4003a000), %o0 rtems_set_errno_and_return_minus_one( errno ); }; /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { 40019438: 92 10 20 00 clr %o1 4001943c: 90 12 20 10 or %o0, 0x10, %o0 40019440: 94 07 bf e8 add %fp, -24, %o2 40019444: 7f ff b3 04 call 40006054 40019448: 96 10 20 00 clr %o3 4001944c: 80 a2 20 00 cmp %o0, 0 40019450: 12 80 00 23 bne 400194dc 40019454: d0 04 63 f0 ld [ %l1 + 0x3f0 ], %o0 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 40019458: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4001945c: 80 a0 60 00 cmp %g1, 0 40019460: 22 80 00 09 be,a 40019484 40019464: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40019468: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001946c: 80 a0 60 00 cmp %g1, 0 40019470: 22 80 00 05 be,a 40019484 40019474: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED 40019478: 9f c0 40 00 call %g1 4001947c: 90 02 20 14 add %o0, 0x14, %o0 rtems_filesystem_root = loc; 40019480: c2 07 bf e8 ld [ %fp + -24 ], %g1 40019484: c6 04 63 f0 ld [ %l1 + 0x3f0 ], %g3 40019488: c2 20 e0 14 st %g1, [ %g3 + 0x14 ] 4001948c: c4 07 bf ec ld [ %fp + -20 ], %g2 40019490: c4 20 e0 18 st %g2, [ %g3 + 0x18 ] 40019494: c2 07 bf f0 ld [ %fp + -16 ], %g1 40019498: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] 4001949c: c4 07 bf f4 ld [ %fp + -12 ], %g2 400194a0: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] return 0; } 400194a4: 81 c7 e0 08 ret 400194a8: 91 e8 20 00 restore %g0, 0, %o0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { rtems_libio_set_private_env(); /* try to set a new private env*/ 400194ac: 40 00 05 59 call 4001aa10 400194b0: 01 00 00 00 nop if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 400194b4: c2 04 63 f0 ld [ %l1 + 0x3f0 ], %g1 400194b8: 80 a0 40 10 cmp %g1, %l0 400194bc: 12 bf ff da bne 40019424 400194c0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); 400194c4: 40 00 38 6e call 4002767c <__errno> <== NOT EXECUTED 400194c8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400194cc: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400194d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400194d4: 81 c7 e0 08 ret <== NOT EXECUTED 400194d8: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( errno ); }; /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); 400194dc: 40 00 38 68 call 4002767c <__errno> <== NOT EXECUTED 400194e0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400194e4: 40 00 38 66 call 4002767c <__errno> <== NOT EXECUTED 400194e8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 400194ec: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 400194f0: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED 400194f4: 81 c7 e0 08 ret <== NOT EXECUTED 400194f8: 81 e8 00 00 restore <== NOT EXECUTED 40007458 : int clock_gettime( clockid_t clock_id, struct timespec *tp ) { 40007458: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 4000745c: 90 96 60 00 orcc %i1, 0, %o0 40007460: 02 80 00 1d be 400074d4 40007464: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 40007468: 02 80 00 09 be 4000748c 4000746c: 01 00 00 00 nop 40007470: 08 80 00 0b bleu 4000749c 40007474: 80 a6 20 01 cmp %i0, 1 40007478: 80 a6 20 03 cmp %i0, 3 <== NOT EXECUTED 4000747c: 02 80 00 14 be 400074cc <== NOT EXECUTED 40007480: 80 a6 20 04 cmp %i0, 4 <== NOT EXECUTED 40007484: 12 80 00 08 bne 400074a4 <== NOT EXECUTED 40007488: 01 00 00 00 nop <== NOT EXECUTED break; #endif #ifdef _POSIX_CPUTIME case CLOCK_PROCESS_CPUTIME: _TOD_Get_uptime(tp); 4000748c: 40 00 0b 87 call 4000a2a8 <_TOD_Get_uptime> <== NOT EXECUTED 40007490: b0 10 20 00 clr %i0 ! 0 <== NOT EXECUTED 40007494: 81 c7 e0 08 ret <== NOT EXECUTED 40007498: 81 e8 00 00 restore <== NOT EXECUTED ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 4000749c: 02 80 00 08 be 400074bc 400074a0: 01 00 00 00 nop case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 400074a4: 40 00 29 a7 call 40011b40 <__errno> <== NOT EXECUTED 400074a8: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 400074ac: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400074b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return 0; } 400074b4: 81 c7 e0 08 ret <== NOT EXECUTED 400074b8: 81 e8 00 00 restore <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: _TOD_Get(tp); 400074bc: 40 00 0b 62 call 4000a244 <_TOD_Get> 400074c0: b0 10 20 00 clr %i0 400074c4: 81 c7 e0 08 ret 400074c8: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 400074cc: 40 00 03 56 call 40008224 <== NOT EXECUTED 400074d0: 81 e8 00 00 restore <== NOT EXECUTED clockid_t clock_id, struct timespec *tp ) { if ( !tp ) rtems_set_errno_and_return_minus_one( EINVAL ); 400074d4: 40 00 29 9b call 40011b40 <__errno> <== NOT EXECUTED 400074d8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400074dc: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400074e0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400074e4: 81 c7 e0 08 ret <== NOT EXECUTED 400074e8: 81 e8 00 00 restore <== NOT EXECUTED 400074ec : int clock_settime( clockid_t clock_id, const struct timespec *tp ) { 400074ec: 9d e3 bf 98 save %sp, -104, %sp if ( !tp ) 400074f0: 90 96 60 00 orcc %i1, 0, %o0 400074f4: 02 80 00 26 be 4000758c 400074f8: 80 a6 20 02 cmp %i0, 2 rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { 400074fc: 02 80 00 22 be 40007584 40007500: 80 a6 20 03 cmp %i0, 3 40007504: 02 80 00 20 be 40007584 40007508: 80 a6 20 01 cmp %i0, 1 4000750c: 22 80 00 08 be,a 4000752c 40007510: c4 02 00 00 ld [ %o0 ], %g2 case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); break; #endif default: rtems_set_errno_and_return_minus_one( EINVAL ); 40007514: 40 00 29 8b call 40011b40 <__errno> 40007518: b0 10 3f ff mov -1, %i0 4000751c: 82 10 20 16 mov 0x16, %g1 40007520: c2 22 00 00 st %g1, [ %o0 ] } return 0; } 40007524: 81 c7 e0 08 ret 40007528: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) 4000752c: 03 08 76 b9 sethi %hi(0x21dae400), %g1 40007530: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff 40007534: 80 a0 80 01 cmp %g2, %g1 40007538: 08 80 00 15 bleu 4000758c 4000753c: 21 10 00 7f sethi %hi(0x4001fc00), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007540: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 ! 4001fd00 <_Thread_Dispatch_disable_level> 40007544: 82 00 60 01 inc %g1 40007548: c2 24 21 00 st %g1, [ %l0 + 0x100 ] rtems_set_errno_and_return_minus_one( EINVAL ); _Thread_Disable_dispatch(); _TOD_Set( tp ); 4000754c: 40 00 0b 7f call 4000a348 <_TOD_Set> 40007550: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: c2 04 21 00 ld [ %l0 + 0x100 ], %g1 40007558: b0 10 20 00 clr %i0 4000755c: 82 00 7f ff add %g1, -1, %g1 40007560: c2 24 21 00 st %g1, [ %l0 + 0x100 ] 40007564: c4 04 21 00 ld [ %l0 + 0x100 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 12 80 00 0c bne 4000759c 40007570: 01 00 00 00 nop _Thread_Dispatch(); 40007574: 40 00 13 5d call 4000c2e8 <_Thread_Dispatch> 40007578: 01 00 00 00 nop 4000757c: 81 c7 e0 08 ret 40007580: 81 e8 00 00 restore break; #endif #ifdef _POSIX_THREAD_CPUTIME case CLOCK_THREAD_CPUTIME: return POSIX_NOT_IMPLEMENTED(); 40007584: 40 00 03 28 call 40008224 <== NOT EXECUTED 40007588: 81 e8 00 00 restore <== NOT EXECUTED switch ( clock_id ) { case CLOCK_REALTIME: if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000758c: 40 00 29 6d call 40011b40 <__errno> <== NOT EXECUTED 40007590: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007594: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40007598: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000759c: 81 c7 e0 08 ret <== NOT EXECUTED 400075a0: 81 e8 00 00 restore <== NOT EXECUTED 400194fc : * close a directory. */ int closedir(dirp) register DIR *dirp; { 400194fc: 9d e3 bf 98 save %sp, -104, %sp int fd; if ( !dirp ) 40019500: a0 96 20 00 orcc %i0, 0, %l0 40019504: 02 80 00 0b be 40019530 40019508: 82 10 3f ff mov -1, %g1 rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); 4001950c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); fd = dirp->dd_fd; 40019510: f0 04 00 00 ld [ %l0 ], %i0 dirp->dd_fd = -1; dirp->dd_loc = 0; 40019514: c0 24 20 04 clr [ %l0 + 4 ] (void)free((void *)dirp->dd_buf); 40019518: 7f ff b4 4d call 4000664c 4001951c: c2 24 00 00 st %g1, [ %l0 ] (void)free((void *)dirp); 40019520: 7f ff b4 4b call 4000664c 40019524: 90 10 00 10 mov %l0, %o0 return(close(fd)); 40019528: 7f ff b2 6a call 40005ed0 4001952c: 81 e8 00 00 restore register DIR *dirp; { int fd; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 40019530: 40 00 38 53 call 4002767c <__errno> <== NOT EXECUTED 40019534: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40019538: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4001953c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED dirp->dd_fd = -1; dirp->dd_loc = 0; (void)free((void *)dirp->dd_buf); (void)free((void *)dirp); return(close(fd)); } 40019540: 81 c7 e0 08 ret <== NOT EXECUTED 40019544: 81 e8 00 00 restore <== NOT EXECUTED 4000f11c : */ int device_close( rtems_libio_t *iop ) { 4000f11c: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000f120: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 args.iop = iop; 4000f124: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = 0; 4000f128: c0 27 bf f0 clr [ %fp + -16 ] args.mode = 0; 4000f12c: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_close( 4000f130: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 4000f134: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 4000f138: 94 07 bf ec add %fp, -20, %o2 4000f13c: 40 00 02 52 call 4000fa84 4000f140: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { 4000f144: 80 a2 20 00 cmp %o0, 0 4000f148: 12 80 00 04 bne 4000f158 4000f14c: 01 00 00 00 nop return rtems_deviceio_errno(status); } return 0; } 4000f150: 81 c7 e0 08 ret 4000f154: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) { return rtems_deviceio_errno(status); 4000f158: 7f ff ff a1 call 4000efdc <== NOT EXECUTED 4000f15c: 01 00 00 00 nop <== NOT EXECUTED } return 0; } 4000f160: 81 c7 e0 08 ret <== NOT EXECUTED 4000f164: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000f010 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 4000f010: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->file_info; 4000f014: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 <== NOT EXECUTED rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; args.command = command; 4000f018: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED args.buffer = buffer; 4000f01c: f4 27 bf f0 st %i2, [ %fp + -16 ] <== NOT EXECUTED { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; 4000f020: f0 27 bf e8 st %i0, [ %fp + -24 ] <== NOT EXECUTED args.command = command; args.buffer = buffer; the_jnode = iop->file_info; status = rtems_io_control( 4000f024: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED 4000f028: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED 4000f02c: 40 00 02 ac call 4000fadc <== NOT EXECUTED 4000f030: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000f034: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000f038: 12 80 00 05 bne 4000f04c <== NOT EXECUTED 4000f03c: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return args.ioctl_return; 4000f040: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000f044: 81 c7 e0 08 ret <== NOT EXECUTED 4000f048: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000f04c: 7f ff ff e4 call 4000efdc <== NOT EXECUTED 4000f050: 01 00 00 00 nop <== NOT EXECUTED return args.ioctl_return; } 4000f054: 81 c7 e0 08 ret <== NOT EXECUTED 4000f058: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000f168 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4000f168: 9d e3 bf 88 save %sp, -120, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.flags = iop->flags; 4000f16c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 { rtems_libio_open_close_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000f170: c4 06 20 2c ld [ %i0 + 0x2c ], %g2 args.iop = iop; 4000f174: f0 27 bf ec st %i0, [ %fp + -20 ] args.flags = iop->flags; 4000f178: c2 27 bf f0 st %g1, [ %fp + -16 ] args.mode = mode; 4000f17c: f6 27 bf f4 st %i3, [ %fp + -12 ] status = rtems_io_open( 4000f180: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1 4000f184: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0 4000f188: 94 07 bf ec add %fp, -20, %o2 4000f18c: 40 00 02 6a call 4000fb34 4000f190: b0 10 20 00 clr %i0 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000f194: 80 a2 20 00 cmp %o0, 0 4000f198: 12 80 00 04 bne 4000f1a8 4000f19c: 01 00 00 00 nop return rtems_deviceio_errno(status); return 0; } 4000f1a0: 81 c7 e0 08 ret 4000f1a4: 81 e8 00 00 restore the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000f1a8: 7f ff ff 8d call 4000efdc <== NOT EXECUTED 4000f1ac: 01 00 00 00 nop <== NOT EXECUTED return 0; } 4000f1b0: 81 c7 e0 08 ret <== NOT EXECUTED 4000f1b4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000f0bc : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4000f0bc: 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; 4000f0c0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000f0c4: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000f0c8: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; 4000f0cc: f2 27 bf e8 st %i1, [ %fp + -24 ] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000f0d0: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED args.buffer = buffer; args.count = count; 4000f0d4: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED args.flags = iop->flags; 4000f0d8: c4 27 bf f0 st %g2, [ %fp + -16 ] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000f0dc: 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; 4000f0e0: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED status = rtems_io_read( 4000f0e4: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED 4000f0e8: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED 4000f0ec: 40 00 02 a8 call 4000fb8c <== NOT EXECUTED 4000f0f0: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000f0f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000f0f8: 12 80 00 05 bne 4000f10c <== NOT EXECUTED 4000f0fc: 01 00 00 00 nop <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000f100: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED } 4000f104: 81 c7 e0 08 ret <== NOT EXECUTED 4000f108: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000f10c: 7f ff ff b4 call 4000efdc <== NOT EXECUTED 4000f110: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000f114: 81 c7 e0 08 ret <== NOT EXECUTED 4000f118: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 4000f05c : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 4000f05c: 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; 4000f060: c4 06 20 0c ld [ %i0 + 0xc ], %g2 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000f064: c2 06 20 08 ld [ %i0 + 8 ], %g1 { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4000f068: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; 4000f06c: f2 27 bf e8 st %i1, [ %fp + -24 ] IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; 4000f070: c2 27 bf e4 st %g1, [ %fp + -28 ] args.buffer = (void *) buffer; args.count = count; 4000f074: f4 27 bf ec st %i2, [ %fp + -20 ] args.flags = iop->flags; 4000f078: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; 4000f07c: 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; 4000f080: c0 27 bf f4 clr [ %fp + -12 ] status = rtems_io_write( 4000f084: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 4000f088: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 4000f08c: 40 00 02 d6 call 4000fbe4 4000f090: 94 07 bf e0 add %fp, -32, %o2 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) 4000f094: 80 a2 20 00 cmp %o0, 0 4000f098: 12 80 00 05 bne 4000f0ac 4000f09c: 01 00 00 00 nop return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 4000f0a0: d0 07 bf f4 ld [ %fp + -12 ], %o0 } 4000f0a4: 81 c7 e0 08 ret 4000f0a8: 91 e8 00 08 restore %g0, %o0, %o0 the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 4000f0ac: 7f ff ff cc call 4000efdc <== NOT EXECUTED 4000f0b0: 01 00 00 00 nop <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 4000f0b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000f0b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40005310 : /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 40005310: 9d e3 bf 98 save %sp, -104, %sp rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 40005314: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1 40005318: 80 a0 60 00 cmp %g1, 0 4000531c: 12 80 00 04 bne 4000532c 40005320: 01 00 00 00 nop 40005324: 81 c7 e0 08 ret 40005328: 81 e8 00 00 restore rtems_interrupt_disable (level); 4000532c: 7f ff f3 2f call 40001fe8 <== NOT EXECUTED 40005330: 01 00 00 00 nop <== NOT EXECUTED while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { 40005334: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40005338: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 4000533c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005340: 12 80 00 0a bne 40005368 <== NOT EXECUTED 40005344: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40005348: 30 80 00 1b b,a 400053b4 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 4000534c: 7f ff f3 27 call 40001fe8 <== NOT EXECUTED 40005350: 01 00 00 00 nop <== NOT EXECUTED 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) { 40005354: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 40005358: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 4000535c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005360: 02 80 00 15 be 400053b4 <== NOT EXECUTED 40005364: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40005368: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 4000536c: 7f ff f3 23 call 40001ff8 <== NOT EXECUTED 40005370: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40005374: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40005378: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000537c: 40 00 06 eb call 40006f28 <== NOT EXECUTED 40005380: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005384: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005388: 02 bf ff f1 be 4000534c <== NOT EXECUTED 4000538c: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005390: 40 00 0a 03 call 40007b9c <== NOT EXECUTED 40005394: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40005398: 7f ff f3 14 call 40001fe8 <== NOT EXECUTED 4000539c: 01 00 00 00 nop <== NOT EXECUTED 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) { 400053a0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED 400053a4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400053a8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400053ac: 12 bf ff ef bne 40005368 <== NOT EXECUTED 400053b0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level); 400053b4: 7f ff f3 11 call 40001ff8 <== NOT EXECUTED 400053b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400053bc: 01 00 00 00 nop 40004034 : int dup2( int fildes, int fildes2 ) { 40004034: 9d e3 bf 48 save %sp, -184, %sp /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 40004038: a0 07 bf a8 add %fp, -88, %l0 4000403c: 90 10 00 18 mov %i0, %o0 40004040: 40 00 01 ce call 40004778 40004044: 92 10 00 10 mov %l0, %o1 if ( status == -1 ) 40004048: 80 a2 3f ff cmp %o0, -1 4000404c: 32 80 00 05 bne,a 40004060 40004050: 92 10 00 10 mov %l0, %o1 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40004054: 90 10 3f ff mov -1, %o0 } 40004058: 81 c7 e0 08 ret 4000405c: 91 e8 00 08 restore %g0, %o0, %o0 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 40004060: 40 00 01 c6 call 40004778 40004064: 90 10 00 19 mov %i1, %o0 if ( status == -1 ) 40004068: 80 a2 3f ff cmp %o0, -1 4000406c: 02 bf ff fa be 40004054 40004070: 90 10 00 18 mov %i0, %o0 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 40004074: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40004078: 40 00 00 a1 call 400042fc <== NOT EXECUTED 4000407c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004080: 30 bf ff f6 b,a 40004058 <== NOT EXECUTED 40004d20 : /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 40004d20: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 40004d24: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 40004d28: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 40004d2c: 02 80 00 18 be 40004d8c <== NOT EXECUTED 40004d30: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40004d34: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 4001b378 <__ctype_ptr> <== NOT EXECUTED 40004d38: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 40004d3c: c2 0a 00 02 ldub [ %o0 + %g2 ], %g1 <== NOT EXECUTED 40004d40: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004d44: 02 80 00 13 be 40004d90 <== NOT EXECUTED 40004d48: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED 40004d4c: 02 80 00 11 be 40004d90 <== NOT EXECUTED 40004d50: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004d54: 02 80 00 0f be 40004d90 <== NOT EXECUTED 40004d58: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; 40004d5c: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED echobuf[1] = c ^ 0x40; 40004d60: c2 2f bf f7 stb %g1, [ %fp + -9 ] <== 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] = '^'; 40004d64: c4 2f bf f6 stb %g2, [ %fp + -10 ] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 40004d68: 90 07 bf f6 add %fp, -10, %o0 <== NOT EXECUTED 40004d6c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004d70: 7f ff ff 36 call 40004a48 <== NOT EXECUTED 40004d74: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED tty->column += 2; 40004d78: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004d7c: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED 40004d80: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED 40004d84: 81 c7 e0 08 ret <== NOT EXECUTED 40004d88: 81 e8 00 00 restore <== NOT EXECUTED 40004d8c: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED } else { oproc (c, tty); 40004d90: 7f ff ff 83 call 40004b9c <== NOT EXECUTED 40004d94: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40004d98: 81 c7 e0 08 ret <== NOT EXECUTED 40004d9c: 81 e8 00 00 restore <== NOT EXECUTED 40019d08 : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 40019d08: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 40019d0c: d0 00 62 b4 ld [ %g1 + 0x2b4 ], %o0 ! 4003f2b4 <== NOT EXECUTED 40019d10: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019d14: 02 80 00 05 be 40019d28 <== NOT EXECUTED 40019d18: 01 00 00 00 nop <== NOT EXECUTED fclose(group_fp); 40019d1c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019d20: 40 00 36 ad call 400277d4 <== NOT EXECUTED 40019d24: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019d28: 81 c3 e0 08 retl <== NOT EXECUTED 40019d2c: 01 00 00 00 nop 40019d30 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 40019d30: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 40019d34: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 4003f1cc <== NOT EXECUTED 40019d38: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019d3c: 02 80 00 05 be 40019d50 <== NOT EXECUTED 40019d40: 01 00 00 00 nop <== NOT EXECUTED fclose(passwd_fp); 40019d44: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40019d48: 40 00 36 a3 call 400277d4 <== NOT EXECUTED 40019d4c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40019d50: 81 c3 e0 08 retl <== NOT EXECUTED 40019d54: 01 00 00 00 nop 40004da0 : * 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) { 40004da0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->ccount == 0) 40004da4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2 <== NOT EXECUTED 40004da8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004dac: 02 80 00 36 be 40004e84 <== NOT EXECUTED 40004db0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED return; if (lineFlag) { 40004db4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004db8: 12 80 00 35 bne 40004e8c <== NOT EXECUTED 40004dbc: c6 06 20 3c ld [ %i0 + 0x3c ], %g3 <== NOT EXECUTED 40004dc0: 27 10 00 67 sethi %hi(0x40019c00), %l3 <== NOT EXECUTED 40004dc4: 03 10 00 67 sethi %hi(0x40019c00), %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004dc8: 25 10 00 6c sethi %hi(0x4001b000), %l2 <== NOT EXECUTED 40004dcc: a2 10 62 b8 or %g1, 0x2b8, %l1 <== NOT EXECUTED 40004dd0: 10 80 00 0d b 40004e04 <== NOT EXECUTED 40004dd4: a8 14 e2 c0 or %l3, 0x2c0, %l4 <== NOT EXECUTED 40004dd8: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40004ddc: 12 80 00 6a bne 40004f84 <== NOT EXECUTED 40004de0: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004de4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004de8: 02 80 00 65 be 40004f7c <== NOT EXECUTED 40004dec: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 40004df0: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40004df4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004df8: 02 80 00 61 be 40004f7c <== NOT EXECUTED 40004dfc: 01 00 00 00 nop <== NOT EXECUTED 40004e00: c6 04 20 3c ld [ %l0 + 0x3c ], %g3 <== NOT EXECUTED unsigned char c = tty->cbuf[--tty->ccount]; 40004e04: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED 40004e08: 88 00 bf ff add %g2, -1, %g4 <== NOT EXECUTED 40004e0c: c8 24 20 20 st %g4, [ %l0 + 0x20 ] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 40004e10: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40004e14: 02 bf ff f4 be 40004de4 <== NOT EXECUTED 40004e18: c4 0b 40 04 ldub [ %o5 + %g4 ], %g2 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 40004e1c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004e20: 12 80 00 05 bne 40004e34 <== NOT EXECUTED 40004e24: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 40004e28: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40004e2c: 22 80 00 6a be,a 40004fd4 <== NOT EXECUTED 40004e30: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); } else if (c == '\t') { 40004e34: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40004e38: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40004e3c: 02 80 00 24 be 40004ecc <== NOT EXECUTED 40004e40: c2 04 a3 78 ld [ %l2 + 0x378 ], %g1 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 40004e44: b0 08 a0 ff and %g2, 0xff, %i0 <== NOT EXECUTED 40004e48: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 <== NOT EXECUTED 40004e4c: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40004e50: 12 bf ff e2 bne 40004dd8 <== NOT EXECUTED 40004e54: 90 10 00 13 mov %l3, %o0 <== 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); 40004e58: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 40004e5c: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004e60: 7f ff fe fa call 40004a48 <== NOT EXECUTED 40004e64: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004e68: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004e6c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004e70: 02 bf ff de be 40004de8 <== NOT EXECUTED 40004e74: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED tty->column--; 40004e78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } } } if (!lineFlag) 40004e7c: 12 bf ff dd bne 40004df0 <== NOT EXECUTED 40004e80: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED 40004e84: 81 c7 e0 08 ret <== NOT EXECUTED 40004e88: 81 e8 00 00 restore <== NOT EXECUTED erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 40004e8c: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40004e90: 22 bf ff fd be,a 40004e84 <== NOT EXECUTED 40004e94: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 40004e98: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40004e9c: 12 bf ff ca bne 40004dc4 <== NOT EXECUTED 40004ea0: 27 10 00 67 sethi %hi(0x40019c00), %l3 <== NOT EXECUTED tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty); 40004ea4: 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; 40004ea8: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 40004eac: 7f ff ff 9d call 40004d20 <== NOT EXECUTED 40004eb0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 40004eb4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED 40004eb8: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004ebc: 02 bf ff f2 be 40004e84 <== NOT EXECUTED 40004ec0: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED echo ('\n', tty); 40004ec4: 7f ff ff 97 call 40004d20 <== NOT EXECUTED 40004ec8: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004ecc: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED 40004ed0: 02 80 00 19 be 40004f34 <== NOT EXECUTED 40004ed4: f0 04 20 2c ld [ %l0 + 0x2c ], %i0 <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004ed8: d8 04 a3 78 ld [ %l2 + 0x378 ], %o4 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004edc: 96 08 e2 00 and %g3, 0x200, %o3 <== NOT EXECUTED while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004ee0: 10 80 00 07 b 40004efc <== NOT EXECUTED 40004ee4: 86 10 20 00 clr %g3 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 40004ee8: 32 80 00 02 bne,a 40004ef0 <== NOT EXECUTED 40004eec: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004ef0: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40004ef4: 22 80 00 11 be,a 40004f38 <== NOT EXECUTED 40004ef8: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED c = tty->cbuf[i++]; 40004efc: c2 08 c0 0d ldub [ %g3 + %o5 ], %g1 <== NOT EXECUTED if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 40004f00: 84 08 60 ff and %g1, 0xff, %g2 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 40004f04: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 40004f08: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 40004f0c: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED 40004f10: 02 80 00 18 be 40004f70 <== NOT EXECUTED 40004f14: 86 00 e0 01 inc %g3 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 40004f18: c2 08 80 0c ldub [ %g2 + %o4 ], %g1 <== NOT EXECUTED 40004f1c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004f20: 12 bf ff f2 bne 40004ee8 <== NOT EXECUTED 40004f24: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 40004f28: 80 a0 c0 04 cmp %g3, %g4 <== NOT EXECUTED 40004f2c: 12 bf ff f4 bne 40004efc <== NOT EXECUTED 40004f30: b0 06 20 01 inc %i0 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004f34: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004f38: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 40004f3c: 16 bf ff ab bge 40004de8 <== NOT EXECUTED 40004f40: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); 40004f44: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40004f48: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004f4c: 7f ff fe bf call 40004a48 <== NOT EXECUTED 40004f50: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED tty->column--; 40004f54: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004f58: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 40004f5c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED 40004f60: 14 bf ff f9 bg 40004f44 <== NOT EXECUTED 40004f64: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004f68: 10 bf ff a0 b 40004de8 <== NOT EXECUTED 40004f6c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; 40004f70: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED 40004f74: 10 bf ff df b 40004ef0 <== NOT EXECUTED 40004f78: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED 40004f7c: 81 c7 e0 08 ret <== NOT EXECUTED 40004f80: 81 e8 00 00 restore <== NOT EXECUTED tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { rtems_termios_puts ("\b \b", 3, tty); 40004f84: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40004f88: 7f ff fe b0 call 40004a48 <== NOT EXECUTED 40004f8c: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED if (tty->column) 40004f90: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED 40004f94: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004f98: 02 80 00 04 be 40004fa8 <== NOT EXECUTED 40004f9c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED tty->column--; 40004fa0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004fa4: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 40004fa8: c2 04 a3 78 ld [ %l2 + 0x378 ], %g1 <== NOT EXECUTED 40004fac: c4 0e 00 01 ldub [ %i0 + %g1 ], %g2 <== NOT EXECUTED 40004fb0: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 40004fb4: 22 bf ff aa be,a 40004e5c <== NOT EXECUTED 40004fb8: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 40004fbc: c6 04 20 3c ld [ %l0 + 0x3c ], %g3 <== NOT EXECUTED 40004fc0: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40004fc4: 32 bf ff a6 bne,a 40004e5c <== NOT EXECUTED 40004fc8: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED if (tty->column) tty->column--; } } } if (!lineFlag) 40004fcc: 10 bf ff 87 b 40004de8 <== NOT EXECUTED 40004fd0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { echo (tty->termios.c_cc[VERASE], tty); 40004fd4: 7f ff ff 53 call 40004d20 <== NOT EXECUTED 40004fd8: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED 40004fdc: 01 00 00 00 nop 40024dac : int fcntl( int fd, int cmd, ... ) { 40024dac: 9d e3 bf 90 save %sp, -112, %sp int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40024db0: 03 10 00 f3 sethi %hi(0x4003cc00), %g1 40024db4: d8 00 63 dc ld [ %g1 + 0x3dc ], %o4 ! 4003cfdc ... ) { int ret; va_list ap; va_start( ap, cmd ); 40024db8: 88 07 a0 4c add %fp, 0x4c, %g4 int fcntl( int fd, int cmd, ... ) { 40024dbc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 40024dc0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40024dc4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40024dc8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 40024dcc: 80 a6 00 0c cmp %i0, %o4 40024dd0: 1a 80 00 78 bcc 40024fb0 40024dd4: c8 27 bf f4 st %g4, [ %fp + -12 ] iop = rtems_libio_iop( fd ); 40024dd8: 3b 10 00 fe sethi %hi(0x4003f800), %i5 40024ddc: da 07 62 74 ld [ %i5 + 0x274 ], %o5 ! 4003fa74 40024de0: 85 2e 20 02 sll %i0, 2, %g2 40024de4: 83 2e 20 04 sll %i0, 4, %g1 40024de8: 82 20 40 02 sub %g1, %g2, %g1 40024dec: 82 00 40 18 add %g1, %i0, %g1 40024df0: 83 28 60 02 sll %g1, 2, %g1 40024df4: b0 00 40 0d add %g1, %o5, %i0 rtems_libio_check_is_open(iop); 40024df8: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40024dfc: 80 8a 21 00 btst 0x100, %o0 40024e00: 02 80 00 6c be 40024fb0 40024e04: 80 a6 60 09 cmp %i1, 9 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40024e08: 08 80 00 09 bleu 40024e2c 40024e0c: 83 2e 60 02 sll %i1, 2, %g1 errno = ENOTSUP; ret = -1; break; default: errno = EINVAL; 40024e10: 40 00 0a 1b call 4002767c <__errno> 40024e14: 01 00 00 00 nop 40024e18: 82 10 20 16 mov 0x16, %g1 ! 16 40024e1c: c2 22 00 00 st %g1, [ %o0 ] { int ret; va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); 40024e20: b8 10 3f ff mov -1, %i4 return ret; } 40024e24: 81 c7 e0 08 ret 40024e28: 91 e8 00 1c restore %g0, %i4, %o0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 40024e2c: 05 10 00 93 sethi %hi(0x40024c00), %g2 40024e30: 84 10 a1 84 or %g2, 0x184, %g2 ! 40024d84 40024e34: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40024e38: 81 c0 c0 00 jmp %g3 40024e3c: 01 00 00 00 nop errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 40024e40: 40 00 0a 0f call 4002767c <__errno> 40024e44: b8 10 3f ff mov -1, %i4 ! ffffffff 40024e48: 82 10 20 86 mov 0x86, %g1 40024e4c: 10 bf ff f6 b 40024e24 40024e50: c2 22 00 00 st %g1, [ %o0 ] case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 40024e54: d0 01 00 00 ld [ %g4 ], %o0 40024e58: 7f ff 85 e4 call 400065e8 40024e5c: b8 10 20 00 clr %i4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 40024e60: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40024e64: 90 0a 22 01 and %o0, 0x201, %o0 40024e68: 82 08 7d fe and %g1, -514, %g1 40024e6c: 90 12 00 01 or %o0, %g1, %o0 40024e70: d0 26 20 0c st %o0, [ %i0 + 0xc ] * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { if (iop->handlers->fcntl_h) { 40024e74: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40024e78: c2 00 60 30 ld [ %g1 + 0x30 ], %g1 40024e7c: 80 a0 60 00 cmp %g1, 0 40024e80: 02 bf ff e9 be 40024e24 40024e84: 90 10 00 19 mov %i1, %o0 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 40024e88: 9f c0 40 00 call %g1 40024e8c: 92 10 00 18 mov %i0, %o1 if (err) { 40024e90: ba 92 20 00 orcc %o0, 0, %i5 40024e94: 02 bf ff e4 be 40024e24 40024e98: 01 00 00 00 nop errno = err; 40024e9c: 40 00 09 f8 call 4002767c <__errno> <== NOT EXECUTED 40024ea0: b8 10 3f ff mov -1, %i4 ! ffffffff <== NOT EXECUTED 40024ea4: 10 bf ff e0 b 40024e24 <== NOT EXECUTED 40024ea8: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 40024eac: 7f ff 85 21 call 40006330 40024eb0: 01 00 00 00 nop 40024eb4: b8 10 00 08 mov %o0, %i4 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 40024eb8: 80 a7 20 00 cmp %i4, 0 40024ebc: 36 bf ff ef bge,a 40024e78 40024ec0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40024ec4: 30 bf ff d8 b,a 40024e24 <== NOT EXECUTED * if a new process is exec()'ed. Since RTEMS does not support * processes, then we can ignore this one except to make * F_GETFD work. */ if ( va_arg( ap, int ) ) 40024ec8: c2 01 00 00 ld [ %g4 ], %g1 40024ecc: 80 a0 60 00 cmp %g1, 0 40024ed0: 22 80 00 2d be,a 40024f84 40024ed4: 90 0a 37 ff and %o0, -2049, %o0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 40024ed8: 90 12 28 00 or %o0, 0x800, %o0 40024edc: b8 10 20 00 clr %i4 40024ee0: 10 bf ff e5 b 40024e74 40024ee4: d0 26 20 0c st %o0, [ %i0 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 40024ee8: 83 32 20 0b srl %o0, 0xb, %g1 40024eec: 10 bf ff e2 b 40024e74 40024ef0: b8 08 60 01 and %g1, 1, %i4 * This switch should contain all the cases from POSIX. */ switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 40024ef4: c6 01 00 00 ld [ %g4 ], %g3 if ( fd2 ) 40024ef8: 80 a0 e0 00 cmp %g3, 0 40024efc: 02 80 00 32 be 40024fc4 40024f00: 80 a3 00 03 cmp %o4, %g3 diop = rtems_libio_iop( fd2 ); 40024f04: 96 10 20 00 clr %o3 <== NOT EXECUTED 40024f08: 18 80 00 22 bgu 40024f90 <== NOT EXECUTED 40024f0c: 98 10 20 00 clr %o4 <== NOT EXECUTED } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40024f10: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40024f14: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40024f18: c2 23 20 10 st %g1, [ %o4 + 0x10 ] 40024f1c: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 ret = (int) (diop - rtems_libio_iops); 40024f20: c8 07 62 74 ld [ %i5 + 0x274 ], %g4 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40024f24: c4 23 20 14 st %g2, [ %o4 + 0x14 ] 40024f28: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 ret = -1; break; } } diop->handlers = iop->handlers; 40024f2c: da 06 20 30 ld [ %i0 + 0x30 ], %o5 diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40024f30: c2 23 20 18 st %g1, [ %o4 + 0x18 ] 40024f34: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 ret = (int) (diop - rtems_libio_iops); 40024f38: 88 22 c0 04 sub %o3, %g4, %g4 break; } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; 40024f3c: c6 23 20 2c st %g3, [ %o4 + 0x2c ] diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40024f40: 89 39 20 02 sra %g4, 2, %g4 40024f44: 87 29 20 02 sll %g4, 2, %g3 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 40024f48: c4 23 20 1c st %g2, [ %o4 + 0x1c ] ret = -1; break; } } diop->handlers = iop->handlers; 40024f4c: da 23 20 30 st %o5, [ %o4 + 0x30 ] diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40024f50: 85 29 20 06 sll %g4, 6, %g2 } } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; 40024f54: d0 23 20 0c st %o0, [ %o4 + 0xc ] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 40024f58: 84 20 80 03 sub %g2, %g3, %g2 40024f5c: 83 28 a0 06 sll %g2, 6, %g1 40024f60: 82 20 40 02 sub %g1, %g2, %g1 40024f64: 87 28 60 0c sll %g1, 0xc, %g3 40024f68: 82 00 40 03 add %g1, %g3, %g1 40024f6c: 82 00 40 04 add %g1, %g4, %g1 40024f70: 83 28 60 04 sll %g1, 4, %g1 40024f74: 82 20 40 04 sub %g1, %g4, %g1 40024f78: 83 28 60 02 sll %g1, 2, %g1 40024f7c: 10 bf ff cf b 40024eb8 40024f80: b8 21 00 01 sub %g4, %g1, %i4 */ if ( va_arg( ap, int ) ) iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 40024f84: b8 10 20 00 clr %i4 <== NOT EXECUTED 40024f88: 10 bf ff bb b 40024e74 <== NOT EXECUTED 40024f8c: d0 26 20 0c st %o0, [ %i0 + 0xc ] <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 40024f90: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED 40024f94: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED 40024f98: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 40024f9c: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED 40024fa0: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40024fa4: 96 03 40 01 add %o5, %g1, %o3 <== NOT EXECUTED 40024fa8: 10 bf ff da b 40024f10 <== NOT EXECUTED 40024fac: 98 10 00 0b mov %o3, %o4 <== NOT EXECUTED int mask; int ret = 0; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40024fb0: 40 00 09 b3 call 4002767c <__errno> <== NOT EXECUTED 40024fb4: b8 10 3f ff mov -1, %i4 <== NOT EXECUTED 40024fb8: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40024fbc: 10 bf ff 9a b 40024e24 <== NOT EXECUTED 40024fc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); else { /* allocate a file control block */ diop = rtems_libio_allocate(); 40024fc4: 7f ff 85 4b call 400064f0 40024fc8: 01 00 00 00 nop if ( diop == 0 ) { 40024fcc: 98 92 20 00 orcc %o0, 0, %o4 40024fd0: 02 bf ff 94 be 40024e20 40024fd4: 96 10 00 0c mov %o4, %o3 40024fd8: 10 bf ff ce b 40024f10 40024fdc: d0 06 20 0c ld [ %i0 + 0xc ], %o0 40008624 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 40008624: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008628: c4 00 60 e8 ld [ %g1 + 0xe8 ], %g2 ! 4001c0e8 4000862c: 82 10 60 e8 or %g1, 0xe8, %g1 40008630: 86 00 60 04 add %g1, 4, %g3 !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 40008634: 80 a0 80 03 cmp %g2, %g3 40008638: 02 80 00 10 be 40008678 4000863c: 01 00 00 00 nop 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 ) { 40008640: d2 02 60 0c ld [ %o1 + 0xc ], %o1 40008644: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 40008648: 80 a0 40 09 cmp %g1, %o1 4000864c: 32 80 00 08 bne,a 4000866c 40008650: c4 00 80 00 ld [ %g2 ], %g2 * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 40008654: 81 c3 e0 08 retl <== NOT EXECUTED 40008658: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 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 ) { 4000865c: 80 a0 40 09 cmp %g1, %o1 40008660: 02 80 00 08 be 40008680 40008664: 90 10 20 01 mov 1, %o0 * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 40008668: c4 00 80 00 ld [ %g2 ], %g2 * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000866c: 80 a0 80 03 cmp %g2, %g3 40008670: 32 bf ff fb bne,a 4000865c 40008674: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 return TRUE; } } return FALSE; } 40008678: 81 c3 e0 08 retl 4000867c: 90 10 20 00 clr %o0 40008680: 81 c3 e0 08 retl 40008684: 01 00 00 00 nop 40004634 : long fpathconf( int fd, int name ) { 40004634: 9d e3 bf 98 save %sp, -104, %sp long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 40004638: 03 10 00 65 sethi %hi(0x40019400), %g1 4000463c: c4 00 61 fc ld [ %g1 + 0x1fc ], %g2 ! 400195fc 40004640: 80 a6 00 02 cmp %i0, %g2 40004644: 1a 80 00 41 bcc 40004748 40004648: 03 10 00 6a sethi %hi(0x4001a800), %g1 iop = rtems_libio_iop(fd); 4000464c: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 ! 4001a824 40004650: 85 2e 20 02 sll %i0, 2, %g2 40004654: 83 2e 20 04 sll %i0, 4, %g1 40004658: 82 20 40 02 sub %g1, %g2, %g1 4000465c: 82 00 40 18 add %g1, %i0, %g1 40004660: 83 28 60 02 sll %g1, 2, %g1 40004664: 82 00 40 03 add %g1, %g3, %g1 rtems_libio_check_is_open(iop); 40004668: c6 00 60 0c ld [ %g1 + 0xc ], %g3 4000466c: 80 88 e1 00 btst 0x100, %g3 40004670: 02 80 00 36 be 40004748 40004674: 80 88 e0 02 btst 2, %g3 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004678: 02 80 00 3a be 40004760 4000467c: 80 a6 60 0b cmp %i1, 0xb * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 40004680: 08 80 00 08 bleu 400046a0 40004684: f0 00 60 1c ld [ %g1 + 0x1c ], %i0 break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40004688: 40 00 39 39 call 40012b6c <__errno> 4000468c: b0 10 3f ff mov -1, %i0 40004690: 82 10 20 16 mov 0x16, %g1 40004694: c2 22 00 00 st %g1, [ %o0 ] break; } return return_value; } 40004698: 81 c7 e0 08 ret 4000469c: 81 e8 00 00 restore * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { 400046a0: 83 2e 60 02 sll %i1, 2, %g1 400046a4: 05 10 00 11 sethi %hi(0x40004400), %g2 400046a8: 84 10 a2 04 or %g2, 0x204, %g2 ! 40004604 400046ac: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400046b0: 81 c0 c0 00 jmp %g3 400046b4: 01 00 00 00 nop break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; break; case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 400046b8: f0 06 20 58 ld [ %i0 + 0x58 ], %i0 400046bc: 81 c7 e0 08 ret 400046c0: 81 e8 00 00 restore break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; break; case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 400046c4: f0 06 20 54 ld [ %i0 + 0x54 ], %i0 400046c8: 81 c7 e0 08 ret 400046cc: 81 e8 00 00 restore break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; break; case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 400046d0: f0 06 20 48 ld [ %i0 + 0x48 ], %i0 400046d4: 81 c7 e0 08 ret 400046d8: 81 e8 00 00 restore break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; break; case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 400046dc: f0 06 20 5c ld [ %i0 + 0x5c ], %i0 400046e0: 81 c7 e0 08 ret 400046e4: 81 e8 00 00 restore break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; break; case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 400046e8: f0 06 20 50 ld [ %i0 + 0x50 ], %i0 400046ec: 81 c7 e0 08 ret 400046f0: 81 e8 00 00 restore break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; break; case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 400046f4: f0 06 20 4c ld [ %i0 + 0x4c ], %i0 400046f8: 81 c7 e0 08 ret 400046fc: 81 e8 00 00 restore break; case _PC_PATH_MAX: return_value = the_limits->path_max; break; case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 40004700: f0 06 20 44 ld [ %i0 + 0x44 ], %i0 40004704: 81 c7 e0 08 ret 40004708: 81 e8 00 00 restore break; case _PC_NAME_MAX: return_value = the_limits->name_max; break; case _PC_PATH_MAX: return_value = the_limits->path_max; 4000470c: f0 06 20 40 ld [ %i0 + 0x40 ], %i0 40004710: 81 c7 e0 08 ret 40004714: 81 e8 00 00 restore break; case _PC_MAX_INPUT: return_value = the_limits->max_input; break; case _PC_NAME_MAX: return_value = the_limits->name_max; 40004718: f0 06 20 3c ld [ %i0 + 0x3c ], %i0 4000471c: 81 c7 e0 08 ret 40004720: 81 e8 00 00 restore break; case _PC_MAX_CANON: return_value = the_limits->max_canon; break; case _PC_MAX_INPUT: return_value = the_limits->max_input; 40004724: f0 06 20 38 ld [ %i0 + 0x38 ], %i0 40004728: 81 c7 e0 08 ret 4000472c: 81 e8 00 00 restore switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; break; case _PC_MAX_CANON: return_value = the_limits->max_canon; 40004730: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 40004734: 81 c7 e0 08 ret 40004738: 81 e8 00 00 restore the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; switch ( name ) { case _PC_LINK_MAX: return_value = the_limits->link_max; 4000473c: f0 06 20 30 ld [ %i0 + 0x30 ], %i0 40004740: 81 c7 e0 08 ret 40004744: 81 e8 00 00 restore rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); iop = rtems_libio_iop(fd); rtems_libio_check_is_open(iop); 40004748: 40 00 39 09 call 40012b6c <__errno> 4000474c: b0 10 3f ff mov -1, %i0 40004750: 82 10 20 09 mov 9, %g1 40004754: c2 22 00 00 st %g1, [ %o0 ] 40004758: 81 c7 e0 08 ret 4000475c: 81 e8 00 00 restore rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 40004760: 40 00 39 03 call 40012b6c <__errno> <== NOT EXECUTED 40004764: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004768: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000476c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004770: 81 c7 e0 08 ret <== NOT EXECUTED 40004774: 81 e8 00 00 restore <== NOT EXECUTED 40003420 : } void free( void *ptr ) { 40003420: 9d e3 bf 98 save %sp, -104, %sp MSBUMP(free_calls, 1); if ( !ptr ) 40003424: 80 a6 20 00 cmp %i0, 0 40003428: 02 80 00 19 be 4000348c 4000342c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 /* * Do not attempt to free memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 40003430: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 40003434: 80 a0 a0 03 cmp %g2, 3 40003438: 12 80 00 0e bne 40003470 4000343c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ((_Thread_Dispatch_disable_level > 0) || (_ISR_Nest_level > 0)) { 40003440: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40003444: 80 a0 a0 00 cmp %g2, 0 40003448: 12 80 00 06 bne 40003460 4000344c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40003450: c4 00 62 a4 ld [ %g1 + 0x2a4 ], %g2 ! 4001bea4 <_ISR_Nest_level> 40003454: 80 a0 a0 00 cmp %g2, 0 40003458: 02 80 00 07 be 40003474 4000345c: 37 10 00 6f sethi %hi(0x4001bc00), %i3 Chain_Append(&RTEMS_Malloc_GC_list, (Chain_Node *)ptr); 40003460: b2 10 00 18 mov %i0, %i1 40003464: 31 10 00 6f sethi %hi(0x4001bc00), %i0 40003468: 40 00 12 a3 call 40007ef4 <_Chain_Append> 4000346c: 91 ee 20 80 restore %i0, 0x80, %o0 MSBUMP(lifetime_freed, size); } } #endif if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) { 40003470: 37 10 00 6f sethi %hi(0x4001bc00), %i3 <== NOT EXECUTED 40003474: 92 10 00 18 mov %i0, %o1 40003478: 40 00 18 cf call 400097b4 <_Protected_heap_Free> 4000347c: 90 16 e0 24 or %i3, 0x24, %o0 40003480: 80 a2 20 00 cmp %o0, 0 40003484: 02 80 00 04 be 40003494 40003488: 82 16 e0 24 or %i3, 0x24, %g1 4000348c: 81 c7 e0 08 ret 40003490: 81 e8 00 00 restore printk( "Program heap: free of bad pointer %p -- range %p - %p \n", 40003494: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED 40003498: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED 4000349c: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED 400034a0: 31 10 00 67 sethi %hi(0x40019c00), %i0 <== NOT EXECUTED 400034a4: 40 00 03 c8 call 400043c4 <== NOT EXECUTED 400034a8: 91 ee 22 48 restore %i0, 0x248, %o0 <== NOT EXECUTED 400034ac: 01 00 00 00 nop 4001a8e4 : * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 4001a8e4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 4001a8e8: 03 10 01 00 sethi %hi(0x40040000), %g1 <== NOT EXECUTED 4001a8ec: 82 10 62 d4 or %g1, 0x2d4, %g1 ! 400402d4 <== NOT EXECUTED 4001a8f0: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED 4001a8f4: 02 80 00 18 be 4001a954 <== NOT EXECUTED 4001a8f8: 01 00 00 00 nop <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 4001a8fc: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4001a900: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a904: 22 80 00 09 be,a 4001a928 <== NOT EXECUTED 4001a908: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 4001a90c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001a910: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a914: 22 80 00 05 be,a 4001a928 <== NOT EXECUTED 4001a918: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 4001a91c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001a920: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 4001a924: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED 4001a928: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a92c: 02 80 00 08 be 4001a94c <== NOT EXECUTED 4001a930: 01 00 00 00 nop <== NOT EXECUTED 4001a934: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001a938: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a93c: 02 80 00 04 be 4001a94c <== NOT EXECUTED 4001a940: 01 00 00 00 nop <== NOT EXECUTED 4001a944: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001a948: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED free(env); 4001a94c: 7f ff af 40 call 4000664c <== NOT EXECUTED 4001a950: 81 e8 00 00 restore <== NOT EXECUTED 4001a954: 81 c7 e0 08 ret <== NOT EXECUTED 4001a958: 81 e8 00 00 restore <== NOT EXECUTED 40019234 : int fstat( int fd, struct stat *sbuf ) { 40019234: 9d e3 bf 98 save %sp, -104, %sp /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 40019238: 92 96 60 00 orcc %i1, 0, %o1 4001923c: 02 80 00 3f be 40019338 40019240: 03 10 00 6a sethi %hi(0x4001a800), %g1 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 40019244: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 4001aa2c 40019248: 80 a6 00 02 cmp %i0, %g2 4001924c: 1a 80 00 2f bcc 40019308 40019250: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40019254: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 ! 4001bc18 40019258: 85 2e 20 02 sll %i0, 2, %g2 4001925c: 83 2e 20 04 sll %i0, 4, %g1 40019260: 82 20 40 02 sub %g1, %g2, %g1 40019264: 82 00 40 18 add %g1, %i0, %g1 40019268: 83 28 60 02 sll %g1, 2, %g1 4001926c: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 40019270: c4 02 20 0c ld [ %o0 + 0xc ], %g2 40019274: 80 88 a1 00 btst 0x100, %g2 40019278: 02 80 00 24 be 40019308 4001927c: 01 00 00 00 nop if ( !iop->handlers ) 40019280: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 40019284: 80 a0 60 00 cmp %g1, 0 40019288: 02 80 00 20 be 40019308 4001928c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fstat_h ) 40019290: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 40019294: 80 a0 60 00 cmp %g1, 0 40019298: 02 80 00 22 be 40019320 4001929c: 01 00 00 00 nop /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( sbuf, 0, sizeof(struct stat) ); 400192a0: c0 22 40 00 clr [ %o1 ] 400192a4: c0 22 60 04 clr [ %o1 + 4 ] 400192a8: c0 22 60 08 clr [ %o1 + 8 ] 400192ac: c0 22 60 0c clr [ %o1 + 0xc ] 400192b0: c0 22 60 10 clr [ %o1 + 0x10 ] 400192b4: c0 22 60 14 clr [ %o1 + 0x14 ] 400192b8: c0 22 60 18 clr [ %o1 + 0x18 ] 400192bc: c0 22 60 1c clr [ %o1 + 0x1c ] 400192c0: c0 22 60 20 clr [ %o1 + 0x20 ] 400192c4: c0 22 60 24 clr [ %o1 + 0x24 ] 400192c8: c0 22 60 28 clr [ %o1 + 0x28 ] 400192cc: c0 22 60 2c clr [ %o1 + 0x2c ] 400192d0: c0 22 60 30 clr [ %o1 + 0x30 ] 400192d4: c0 22 60 34 clr [ %o1 + 0x34 ] 400192d8: c0 22 60 38 clr [ %o1 + 0x38 ] 400192dc: c0 22 60 3c clr [ %o1 + 0x3c ] 400192e0: c0 22 60 40 clr [ %o1 + 0x40 ] 400192e4: c0 22 60 44 clr [ %o1 + 0x44 ] 400192e8: c0 22 60 48 clr [ %o1 + 0x48 ] 400192ec: c0 22 60 4c clr [ %o1 + 0x4c ] return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 400192f0: c2 02 20 30 ld [ %o0 + 0x30 ], %g1 400192f4: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 400192f8: 9f c0 80 00 call %g2 400192fc: 90 02 20 10 add %o0, 0x10, %o0 } 40019300: 81 c7 e0 08 ret 40019304: 91 e8 00 08 restore %g0, %o0, %o0 iop = rtems_libio_iop( fd ); rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40019308: 7f ff db 1a call 4000ff70 <__errno> 4001930c: 01 00 00 00 nop 40019310: 82 10 20 09 mov 9, %g1 ! 9 40019314: c2 22 00 00 st %g1, [ %o0 ] 40019318: 10 bf ff fa b 40019300 4001931c: 90 10 3f ff mov -1, %o0 if ( !iop->handlers->fstat_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019320: 7f ff db 14 call 4000ff70 <__errno> <== NOT EXECUTED 40019324: 01 00 00 00 nop <== NOT EXECUTED 40019328: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001932c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019330: 10 bf ff f4 b 40019300 <== NOT EXECUTED 40019334: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40019338: 7f ff db 0e call 4000ff70 <__errno> 4001933c: 01 00 00 00 nop 40019340: 82 10 20 0e mov 0xe, %g1 ! e 40019344: c2 22 00 00 st %g1, [ %o0 ] 40019348: 10 bf ff ee b 40019300 4001934c: 90 10 3f ff mov -1, %o0 400048ac : #include int fsync( int fd ) { 400048ac: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400048b0: 03 10 00 65 sethi %hi(0x40019400), %g1 400048b4: c4 00 61 fc ld [ %g1 + 0x1fc ], %g2 ! 400195fc 400048b8: 80 a6 00 02 cmp %i0, %g2 400048bc: 1a 80 00 1b bcc 40004928 400048c0: 03 10 00 6a sethi %hi(0x4001a800), %g1 iop = rtems_libio_iop( fd ); 400048c4: c6 00 60 24 ld [ %g1 + 0x24 ], %g3 ! 4001a824 400048c8: 85 2e 20 02 sll %i0, 2, %g2 400048cc: 83 2e 20 04 sll %i0, 4, %g1 400048d0: 82 20 40 02 sub %g1, %g2, %g1 400048d4: 82 00 40 18 add %g1, %i0, %g1 400048d8: 83 28 60 02 sll %g1, 2, %g1 400048dc: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 400048e0: c6 02 20 0c ld [ %o0 + 0xc ], %g3 400048e4: 80 88 e1 00 btst 0x100, %g3 400048e8: 02 80 00 10 be 40004928 400048ec: 80 88 e0 04 btst 4, %g3 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 400048f0: 02 80 00 14 be 40004940 400048f4: 01 00 00 00 nop /* * Now process the fsync(). */ if ( !iop->handlers ) 400048f8: c6 02 20 30 ld [ %o0 + 0x30 ], %g3 400048fc: 80 a0 e0 00 cmp %g3, 0 40004900: 02 80 00 0a be 40004928 40004904: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) 40004908: c2 00 e0 28 ld [ %g3 + 0x28 ], %g1 4000490c: 80 a0 60 00 cmp %g1, 0 40004910: 02 80 00 12 be 40004958 40004914: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->fsync_h)( iop ); 40004918: 9f c0 40 00 call %g1 4000491c: 01 00 00 00 nop } 40004920: 81 c7 e0 08 ret 40004924: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the fsync(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 40004928: 40 00 38 91 call 40012b6c <__errno> <== NOT EXECUTED 4000492c: 01 00 00 00 nop <== NOT EXECUTED 40004930: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40004934: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004938: 10 bf ff fa b 40004920 <== NOT EXECUTED 4000493c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40004940: 40 00 38 8b call 40012b6c <__errno> 40004944: 01 00 00 00 nop 40004948: 82 10 20 16 mov 0x16, %g1 ! 16 4000494c: c2 22 00 00 st %g1, [ %o0 ] 40004950: 10 bf ff f4 b 40004920 40004954: 90 10 3f ff mov -1, %o0 if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->fsync_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004958: 40 00 38 85 call 40012b6c <__errno> 4000495c: 01 00 00 00 nop 40004960: 82 10 20 86 mov 0x86, %g1 ! 86 40004964: c2 22 00 00 st %g1, [ %o0 ] 40004968: 10 bf ff ee b 40004920 4000496c: 90 10 3f ff mov -1, %o0 4000d18c : int ftruncate( int fd, off_t length ) { 4000d18c: 9d e3 bf 88 save %sp, -120, %sp rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 4000d190: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000d194: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 4001aa2c 4000d198: 80 a6 00 02 cmp %i0, %g2 4000d19c: 1a 80 00 2b bcc 4000d248 4000d1a0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 iop = rtems_libio_iop( fd ); 4000d1a4: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 ! 4001bc18 4000d1a8: 85 2e 20 02 sll %i0, 2, %g2 4000d1ac: 83 2e 20 04 sll %i0, 4, %g1 4000d1b0: 82 20 40 02 sub %g1, %g2, %g1 4000d1b4: 82 00 40 18 add %g1, %i0, %g1 4000d1b8: 83 28 60 02 sll %g1, 2, %g1 4000d1bc: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 4000d1c0: c4 06 20 0c ld [ %i0 + 0xc ], %g2 4000d1c4: 80 88 a1 00 btst 0x100, %g2 4000d1c8: 02 80 00 20 be 4000d248 4000d1cc: 01 00 00 00 nop /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 4000d1d0: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4000d1d4: c2 27 bf e8 st %g1, [ %fp + -24 ] 4000d1d8: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 4000d1dc: c4 27 bf ec st %g2, [ %fp + -20 ] 4000d1e0: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 4000d1e4: c2 27 bf f0 st %g1, [ %fp + -16 ] 4000d1e8: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 4000d1ec: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000d1f0: 80 a0 60 00 cmp %g1, 0 4000d1f4: 02 80 00 1b be 4000d260 4000d1f8: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 4000d1fc: 9f c0 40 00 call %g1 4000d200: 90 07 bf e8 add %fp, -24, %o0 4000d204: 80 a2 20 01 cmp %o0, 1 4000d208: 02 80 00 22 be 4000d290 4000d20c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000d210: c2 06 20 0c ld [ %i0 + 0xc ], %g1 4000d214: 80 88 60 04 btst 4, %g1 4000d218: 02 80 00 18 be 4000d278 4000d21c: 01 00 00 00 nop if ( !iop->handlers->ftruncate_h ) 4000d220: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 4000d224: c2 00 60 20 ld [ %g1 + 0x20 ], %g1 4000d228: 80 a0 60 00 cmp %g1, 0 4000d22c: 02 80 00 0d be 4000d260 4000d230: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->ftruncate_h)( iop, length ); 4000d234: 90 10 00 18 mov %i0, %o0 4000d238: 9f c0 40 00 call %g1 4000d23c: 92 10 00 19 mov %i1, %o1 } 4000d240: 81 c7 e0 08 ret 4000d244: 91 e8 00 08 restore %g0, %o0, %o0 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 4000d248: 40 00 0b 4a call 4000ff70 <__errno> <== NOT EXECUTED 4000d24c: 01 00 00 00 nop <== NOT EXECUTED 4000d250: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4000d254: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d258: 10 bf ff fa b 4000d240 <== NOT EXECUTED 4000d25c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); if ( !iop->handlers->ftruncate_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4000d260: 40 00 0b 44 call 4000ff70 <__errno> <== NOT EXECUTED 4000d264: 01 00 00 00 nop <== NOT EXECUTED 4000d268: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000d26c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d270: 10 bf ff f4 b 4000d240 <== NOT EXECUTED 4000d274: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 4000d278: 40 00 0b 3e call 4000ff70 <__errno> <== NOT EXECUTED 4000d27c: 01 00 00 00 nop <== NOT EXECUTED 4000d280: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000d284: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d288: 10 bf ff ee b 4000d240 <== NOT EXECUTED 4000d28c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( EISDIR ); 4000d290: 40 00 0b 38 call 4000ff70 <__errno> <== NOT EXECUTED 4000d294: 01 00 00 00 nop <== NOT EXECUTED 4000d298: 82 10 20 15 mov 0x15, %g1 ! 15 <== NOT EXECUTED 4000d29c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d2a0: 10 bf ff e8 b 4000d240 <== NOT EXECUTED 4000d2a4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400198a0 : char * getcwd (pt, size) char *pt; size_t size; { 400198a0: 9d e3 bf 30 save %sp, -208, %sp <== NOT EXECUTED * If no buffer specified by the user, allocate one as necessary. * If a buffer is specified, the size has to be non-zero. The path * is built from the end of the buffer backwards. */ if (pt) 400198a4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 400198a8: 02 80 00 fa be 40019c90 <== NOT EXECUTED 400198ac: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED if (!size) { errno = EINVAL; return (char *) NULL; } ept = pt + size; 400198b0: b6 10 20 00 clr %i3 <== NOT EXECUTED */ if (pt) { ptsize = 0; if (!size) 400198b4: 02 80 00 f1 be 40019c78 <== NOT EXECUTED 400198b8: b2 06 00 19 add %i0, %i1, %i1 <== NOT EXECUTED return (char *) NULL; } ept = pt + ptsize; } bpt = ept - 1; *bpt = '\0'; 400198bc: c0 2e 7f ff clrb [ %i1 + -1 ] <== NOT EXECUTED * Allocate bytes (1024 - malloc space) for the string of "../"'s. * Should always be enough (it's 340 levels). If it's not, allocate * as necessary. Special * case the first stat, it's ".", not "..". */ if (!(up = (char *) malloc (upsize = 1024 - 4))) 400198c0: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 400198c4: 7f ff b3 8b call 400066f0 <== NOT EXECUTED 400198c8: b8 06 7f ff add %i1, -1, %i4 <== NOT EXECUTED 400198cc: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 400198d0: 02 80 00 0c be 40019900 <== NOT EXECUTED 400198d4: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; up[1] = '\0'; 400198d8: c0 2c 60 01 clrb [ %l1 + 1 ] <== NOT EXECUTED { goto err; } eup = up + MAXPATHLEN; bup = up; up[0] = '.'; 400198dc: c2 2c 40 00 stb %g1, [ %l1 ] <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) 400198e0: ae 07 bf a8 add %fp, -88, %l7 <== NOT EXECUTED 400198e4: 11 10 00 e6 sethi %hi(0x40039800), %o0 <== NOT EXECUTED 400198e8: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400198ec: 7f ff b8 45 call 40007a00 <== NOT EXECUTED 400198f0: 90 12 23 88 or %o0, 0x388, %o0 <== NOT EXECUTED 400198f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400198f8: 02 80 00 10 be 40019938 <== NOT EXECUTED 400198fc: c4 1f bf a8 ldd [ %fp + -88 ], %g2 <== NOT EXECUTED /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); if (ptsize) 40019900: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40019904: 12 80 00 06 bne 4001991c <== NOT EXECUTED 40019908: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED free (pt); free (up); 4001990c: 7f ff b3 50 call 4000664c <== NOT EXECUTED 40019910: b0 10 20 00 clr %i0 <== NOT EXECUTED 40019914: 81 c7 e0 08 ret <== NOT EXECUTED 40019918: 81 e8 00 00 restore <== NOT EXECUTED err: if(dir) (void) _closedir (dir); if (ptsize) free (pt); 4001991c: 7f ff b3 4c call 4000664c <== NOT EXECUTED 40019920: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40019924: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40019928: 7f ff b3 49 call 4000664c <== NOT EXECUTED 4001992c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40019930: 81 c7 e0 08 ret <== NOT EXECUTED 40019934: 81 e8 00 00 restore <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40019938: 82 04 64 00 add %l1, 0x400, %g1 <== NOT EXECUTED up[1] = '\0'; /* Save root values, so know when to stop. */ if (stat ("/", &s)) goto err; root_dev = s.st_dev; 4001993c: c4 3f bf 98 std %g2, [ %fp + -104 ] <== NOT EXECUTED root_ino = s.st_ino; 40019940: c6 07 bf b0 ld [ %fp + -80 ], %g3 <== NOT EXECUTED if (!(up = (char *) malloc (upsize = 1024 - 4))) { goto err; } eup = up + MAXPATHLEN; 40019944: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED if (stat ("/", &s)) goto err; root_dev = s.st_dev; root_ino = s.st_ino; errno = 0; /* XXX readdir has no error return. */ 40019948: 40 00 37 4d call 4002767c <__errno> <== NOT EXECUTED 4001994c: c6 27 bf a0 st %g3, [ %fp + -96 ] <== NOT EXECUTED 40019950: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 40019954: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED 40019958: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 4001995c: c4 27 bf 94 st %g2, [ %fp + -108 ] <== NOT EXECUTED 40019960: b4 10 23 fc mov 0x3fc, %i2 <== NOT EXECUTED for (first = 1;; first = 0) { /* Stat the current level. */ if (_stat (up, &s)) 40019964: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40019968: 7f ff b8 26 call 40007a00 <== NOT EXECUTED 4001996c: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40019970: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019974: 12 bf ff e3 bne 40019900 <== NOT EXECUTED 40019978: e4 1f bf a8 ldd [ %fp + -88 ], %l2 <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 4001997c: c6 07 bf 98 ld [ %fp + -104 ], %g3 <== NOT EXECUTED 40019980: 80 a0 c0 12 cmp %g3, %l2 <== NOT EXECUTED 40019984: 02 80 00 a9 be 40019c28 <== NOT EXECUTED 40019988: fa 07 bf b0 ld [ %fp + -80 ], %i5 <== NOT EXECUTED * Build pointer to the parent directory, allocating memory * as necessary. Max length is 3 for "../", the largest * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) 4001998c: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40019990: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED 40019994: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40019998: 08 80 00 5a bleu 40019b00 <== NOT EXECUTED 4001999c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 400199a0: 82 10 20 2e mov 0x2e, %g1 <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; 400199a4: c0 2d 20 02 clrb [ %l4 + 2 ] <== NOT EXECUTED } bup = up; eup = up + upsize; } *bup++ = '.'; *bup++ = '.'; 400199a8: c2 2d 20 01 stb %g1, [ %l4 + 1 ] <== NOT EXECUTED goto err; } bup = up; eup = up + upsize; } *bup++ = '.'; 400199ac: c2 2d 00 00 stb %g1, [ %l4 ] <== NOT EXECUTED *bup++ = '.'; *bup = '\0'; /* Open and stat parent directory. */ if (!(dir = _opendir (up)) || _fstat (__dirfd (dir), &s)) 400199b0: 40 00 03 a8 call 4001a850 <== NOT EXECUTED 400199b4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400199b8: aa 92 20 00 orcc %o0, 0, %l5 <== NOT EXECUTED 400199bc: 02 bf ff d2 be 40019904 <== NOT EXECUTED 400199c0: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 400199c4: d0 05 40 00 ld [ %l5 ], %o0 <== NOT EXECUTED 400199c8: 40 00 2d 8d call 40024ffc <== NOT EXECUTED 400199cc: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400199d0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400199d4: 12 80 00 39 bne 40019ab8 <== NOT EXECUTED 400199d8: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED goto err; /* Add trailing slash for next directory. */ *bup++ = '/'; 400199dc: c2 2d 20 02 stb %g1, [ %l4 + 2 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 400199e0: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED 400199e4: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 400199e8: 02 80 00 4f be 40019b24 <== NOT EXECUTED 400199ec: a8 05 20 03 add %l4, 3, %l4 <== NOT EXECUTED 400199f0: ac 10 20 00 clr %l6 <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 400199f4: 40 00 04 59 call 4001ab58 <== NOT EXECUTED 400199f8: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 400199fc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019a00: 02 80 00 28 be 40019aa0 <== NOT EXECUTED 40019a04: 01 00 00 00 nop <== NOT EXECUTED goto notfound; if (ISDOT (dp)) 40019a08: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40019a0c: 80 a0 60 2e cmp %g1, 0x2e <== NOT EXECUTED 40019a10: 12 80 00 0d bne 40019a44 <== NOT EXECUTED 40019a14: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED 40019a18: c2 4a 20 0d ldsb [ %o0 + 0xd ], %g1 <== NOT EXECUTED 40019a1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019a20: 02 bf ff f5 be 400199f4 <== NOT EXECUTED 40019a24: 05 00 3f ff sethi %hi(0xfffc00), %g2 <== NOT EXECUTED 40019a28: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 40019a2c: 07 00 0b 80 sethi %hi(0x2e0000), %g3 <== NOT EXECUTED 40019a30: 84 10 a3 00 or %g2, 0x300, %g2 <== NOT EXECUTED 40019a34: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 40019a38: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40019a3c: 02 bf ff ee be 400199f4 <== NOT EXECUTED 40019a40: 01 00 00 00 nop <== NOT EXECUTED continue; bcopy (dp->d_name, bup, strlen (dp->d_name) + 1); 40019a44: 40 00 4c 05 call 4002ca58 <== NOT EXECUTED 40019a48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019a4c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40019a50: 94 02 20 01 add %o0, 1, %o2 <== NOT EXECUTED 40019a54: 40 00 3d eb call 40029200 <== NOT EXECUTED 40019a58: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) 40019a5c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40019a60: 7f ff b7 e8 call 40007a00 <== NOT EXECUTED 40019a64: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 40019a68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019a6c: 02 80 00 17 be 40019ac8 <== NOT EXECUTED 40019a70: c2 07 bf a8 ld [ %fp + -88 ], %g1 <== NOT EXECUTED { if (!save_errno) 40019a74: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 40019a78: 02 80 00 1e be 40019af0 <== NOT EXECUTED 40019a7c: 01 00 00 00 nop <== NOT EXECUTED save_errno = errno; errno = 0; 40019a80: 40 00 36 ff call 4002767c <__errno> <== NOT EXECUTED 40019a84: 01 00 00 00 nop <== NOT EXECUTED 40019a88: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED } } else for (;;) { if (!(dp = _readdir (dir))) 40019a8c: 40 00 04 33 call 4001ab58 <== NOT EXECUTED 40019a90: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40019a94: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019a98: 32 bf ff dd bne,a 40019a0c <== NOT EXECUTED 40019a9c: c2 4a 20 0c ldsb [ %o0 + 0xc ], %g1 <== NOT EXECUTED * If readdir set errno, use it, not any saved error; otherwise, * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) 40019aa0: 40 00 36 f7 call 4002767c <__errno> <== NOT EXECUTED 40019aa4: 01 00 00 00 nop <== NOT EXECUTED 40019aa8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40019aac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019ab0: 02 80 00 57 be 40019c0c <== NOT EXECUTED 40019ab4: 01 00 00 00 nop <== NOT EXECUTED errno = save_errno ? save_errno : ENOENT; /* FALLTHROUGH */ err: if(dir) (void) _closedir (dir); 40019ab8: 7f ff fe 91 call 400194fc <== NOT EXECUTED 40019abc: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED if (ptsize) 40019ac0: 10 bf ff 91 b 40019904 <== NOT EXECUTED 40019ac4: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED if (!save_errno) save_errno = errno; errno = 0; continue; } if (s.st_dev == dev && s.st_ino == ino) 40019ac8: 80 a0 40 12 cmp %g1, %l2 <== NOT EXECUTED 40019acc: 12 bf ff ca bne 400199f4 <== NOT EXECUTED 40019ad0: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40019ad4: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40019ad8: 12 bf ff c7 bne 400199f4 <== NOT EXECUTED 40019adc: c2 07 bf b0 ld [ %fp + -80 ], %g1 <== NOT EXECUTED 40019ae0: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40019ae4: 12 bf ff c4 bne 400199f4 <== NOT EXECUTED 40019ae8: 01 00 00 00 nop <== NOT EXECUTED 40019aec: 30 80 00 1b b,a 40019b58 <== NOT EXECUTED /* Save the first error for later. */ if (stat (up, &s)) { if (!save_errno) save_errno = errno; 40019af0: 40 00 36 e3 call 4002767c <__errno> <== NOT EXECUTED 40019af4: 01 00 00 00 nop <== NOT EXECUTED 40019af8: 10 bf ff e2 b 40019a80 <== NOT EXECUTED 40019afc: ec 02 00 00 ld [ %o0 ], %l6 <== NOT EXECUTED * possible component name, plus a trailing NULL. */ if (bup + 3 + MAXNAMLEN + 1 >= eup) { if (!(up = (char *) realloc (up, upsize *= 2))) 40019b00: b5 2e a0 01 sll %i2, 1, %i2 <== NOT EXECUTED 40019b04: 7f ff b3 4c call 40006834 <== NOT EXECUTED 40019b08: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 40019b0c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 40019b10: 02 bf ff 7c be 40019900 <== NOT EXECUTED 40019b14: 82 04 40 1a add %l1, %i2, %g1 <== NOT EXECUTED { goto err; } bup = up; eup = up + upsize; 40019b18: a8 10 00 11 mov %l1, %l4 <== NOT EXECUTED 40019b1c: 10 bf ff a1 b 400199a0 <== NOT EXECUTED 40019b20: c2 27 bf a4 st %g1, [ %fp + -92 ] <== NOT EXECUTED * the inode number in the directory is for the entry in the * parent directory, not the inode number of the mounted file. */ save_errno = 0; if (s.st_dev == dev) 40019b24: c2 07 bf ac ld [ %fp + -84 ], %g1 <== NOT EXECUTED 40019b28: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40019b2c: 12 bf ff b2 bne 400199f4 <== NOT EXECUTED 40019b30: ac 10 20 00 clr %l6 <== NOT EXECUTED { for (;;) { if (!(dp = _readdir (dir))) 40019b34: 40 00 04 09 call 4001ab58 <== NOT EXECUTED 40019b38: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED 40019b3c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019b40: 02 bf ff d8 be 40019aa0 <== NOT EXECUTED 40019b44: ac 10 20 00 clr %l6 <== NOT EXECUTED goto notfound; if (dp->d_ino == ino) 40019b48: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40019b4c: 80 a0 40 1d cmp %g1, %i5 <== NOT EXECUTED 40019b50: 12 bf ff f9 bne 40019b34 <== NOT EXECUTED 40019b54: a0 02 20 0c add %o0, 0xc, %l0 <== NOT EXECUTED /* * Check for length of the current name, preceding slash, * leading slash. */ if (bpt - pt <= strlen (dp->d_name) + (first ? 1 : 2)) 40019b58: 40 00 4b c0 call 4002ca58 <== NOT EXECUTED 40019b5c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40019b60: c2 07 bf 94 ld [ %fp + -108 ], %g1 <== NOT EXECUTED 40019b64: a4 27 00 18 sub %i4, %i0, %l2 <== NOT EXECUTED 40019b68: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40019b6c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED 40019b70: 82 00 60 01 inc %g1 <== NOT EXECUTED 40019b74: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 40019b78: 80 a4 80 01 cmp %l2, %g1 <== NOT EXECUTED 40019b7c: 18 80 00 13 bgu 40019bc8 <== NOT EXECUTED 40019b80: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED { size_t len, off; if (!ptsize) 40019b84: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 40019b88: 02 80 00 4a be 40019cb0 <== NOT EXECUTED 40019b8c: 01 00 00 00 nop <== NOT EXECUTED errno = ERANGE; goto err; } off = bpt - pt; len = ept - bpt; if (!(pt = (char *) realloc (pt, ptsize *= 2))) 40019b90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019b94: b7 2e e0 01 sll %i3, 1, %i3 <== NOT EXECUTED 40019b98: 7f ff b3 27 call 40006834 <== NOT EXECUTED 40019b9c: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 40019ba0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40019ba4: 02 bf ff c5 be 40019ab8 <== NOT EXECUTED 40019ba8: 82 26 40 1c sub %i1, %i4, %g1 <== NOT EXECUTED { goto err; } bpt = pt + off; ept = pt + ptsize; (void) bcopy (bpt, ept - len, len); 40019bac: 92 06 00 12 add %i0, %l2, %o1 <== NOT EXECUTED if (!(pt = (char *) realloc (pt, ptsize *= 2))) { goto err; } bpt = pt + off; ept = pt + ptsize; 40019bb0: b2 06 00 1b add %i0, %i3, %i1 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); 40019bb4: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 40019bb8: b8 26 40 01 sub %i1, %g1, %i4 <== NOT EXECUTED 40019bbc: 40 00 3d 91 call 40029200 <== NOT EXECUTED 40019bc0: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED bpt = ept - len; } if (!first) 40019bc4: c4 07 bf 94 ld [ %fp + -108 ], %g2 <== NOT EXECUTED 40019bc8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40019bcc: 12 80 00 04 bne 40019bdc <== NOT EXECUTED 40019bd0: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED *--bpt = '/'; 40019bd4: b8 07 3f ff add %i4, -1, %i4 <== NOT EXECUTED 40019bd8: c2 2f 00 00 stb %g1, [ %i4 ] <== NOT EXECUTED bpt -= strlen (dp->d_name); 40019bdc: 40 00 4b 9f call 4002ca58 <== NOT EXECUTED 40019be0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40019be4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40019be8: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED (void) bcopy (bpt, ept - len, len); bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); 40019bec: b8 27 00 08 sub %i4, %o0, %i4 <== NOT EXECUTED bcopy (dp->d_name, bpt, strlen (dp->d_name)); (void) _closedir (dir); dir = 0; /* Truncate any file name. */ *bup = '\0'; 40019bf0: c0 27 bf 94 clr [ %fp + -108 ] <== NOT EXECUTED bpt = ept - len; } if (!first) *--bpt = '/'; bpt -= strlen (dp->d_name); bcopy (dp->d_name, bpt, strlen (dp->d_name)); 40019bf4: 40 00 3d 83 call 40029200 <== NOT EXECUTED 40019bf8: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED (void) _closedir (dir); 40019bfc: 7f ff fe 40 call 400194fc <== NOT EXECUTED 40019c00: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED dir = 0; /* Truncate any file name. */ *bup = '\0'; 40019c04: 10 bf ff 58 b 40019964 <== NOT EXECUTED 40019c08: c0 2d 00 00 clrb [ %l4 ] <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40019c0c: 40 00 36 9c call 4002767c <__errno> <== NOT EXECUTED 40019c10: 01 00 00 00 nop <== NOT EXECUTED 40019c14: 80 a5 a0 00 cmp %l6, 0 <== NOT EXECUTED 40019c18: 22 80 00 16 be,a 40019c70 <== NOT EXECUTED 40019c1c: ac 10 20 02 mov 2, %l6 <== NOT EXECUTED 40019c20: 10 bf ff a6 b 40019ab8 <== NOT EXECUTED 40019c24: ec 22 00 00 st %l6, [ %o0 ] <== NOT EXECUTED /* Save current node values. */ ino = s.st_ino; dev = s.st_dev; /* Check for reaching root. */ if (root_dev == dev && root_ino == ino) 40019c28: c2 07 bf 9c ld [ %fp + -100 ], %g1 <== NOT EXECUTED 40019c2c: 80 a0 40 13 cmp %g1, %l3 <== NOT EXECUTED 40019c30: 12 bf ff 58 bne 40019990 <== NOT EXECUTED 40019c34: c6 07 bf a4 ld [ %fp + -92 ], %g3 <== NOT EXECUTED 40019c38: c4 07 bf a0 ld [ %fp + -96 ], %g2 <== NOT EXECUTED 40019c3c: 80 a0 80 1d cmp %g2, %i5 <== NOT EXECUTED 40019c40: 12 bf ff 55 bne 40019994 <== NOT EXECUTED 40019c44: 82 05 24 04 add %l4, 0x404, %g1 <== NOT EXECUTED { *--bpt = '/'; 40019c48: 82 10 20 2f mov 0x2f, %g1 <== NOT EXECUTED 40019c4c: 92 07 3f ff add %i4, -1, %o1 <== NOT EXECUTED 40019c50: c2 2f 3f ff stb %g1, [ %i4 + -1 ] <== NOT EXECUTED /* * It's unclear that it's a requirement to copy the * path to the beginning of the buffer, but it's always * been that way and stuff would probably break. */ (void) bcopy (bpt, pt, ept - bpt); 40019c54: 94 26 40 09 sub %i1, %o1, %o2 <== NOT EXECUTED 40019c58: 40 00 3d 6a call 40029200 <== NOT EXECUTED 40019c5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED free (up); 40019c60: 7f ff b2 7b call 4000664c <== NOT EXECUTED 40019c64: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40019c68: 81 c7 e0 08 ret <== NOT EXECUTED 40019c6c: 81 e8 00 00 restore <== NOT EXECUTED * didn't find the current directory in its parent directory, set * errno to ENOENT. */ if (!errno) errno = save_errno ? save_errno : ENOENT; 40019c70: 10 bf ff 92 b 40019ab8 <== NOT EXECUTED 40019c74: ec 22 00 00 st %l6, [ %o0 ] <== NOT EXECUTED if (pt) { ptsize = 0; if (!size) { errno = EINVAL; 40019c78: 40 00 36 81 call 4002767c <__errno> <== NOT EXECUTED 40019c7c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40019c80: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40019c84: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019c88: 81 c7 e0 08 ret <== NOT EXECUTED 40019c8c: 81 e8 00 00 restore <== NOT EXECUTED } ept = pt + size; } else { if (!(pt = (char *) malloc (ptsize = 1024 - 4))) 40019c90: 7f ff b2 98 call 400066f0 <== NOT EXECUTED 40019c94: 90 10 23 fc mov 0x3fc, %o0 <== NOT EXECUTED 40019c98: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019c9c: 02 bf ff 1e be 40019914 <== NOT EXECUTED 40019ca0: b6 10 23 fc mov 0x3fc, %i3 <== NOT EXECUTED 40019ca4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED { return (char *) NULL; } ept = pt + ptsize; 40019ca8: 10 bf ff 05 b 400198bc <== NOT EXECUTED 40019cac: b2 02 23 fc add %o0, 0x3fc, %i1 <== NOT EXECUTED { size_t len, off; if (!ptsize) { errno = ERANGE; 40019cb0: 40 00 36 73 call 4002767c <__errno> <== NOT EXECUTED 40019cb4: 01 00 00 00 nop <== NOT EXECUTED 40019cb8: 82 10 20 22 mov 0x22, %g1 ! 22 <== NOT EXECUTED 40019cbc: 10 bf ff 7f b 40019ab8 <== NOT EXECUTED 40019cc0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40025130 : int getdents( int dd_fd, char *dd_buf, int dd_len ) { 40025130: 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 ); 40025134: 03 10 00 f3 sethi %hi(0x4003cc00), %g1 40025138: c4 00 63 dc ld [ %g1 + 0x3dc ], %g2 ! 4003cfdc int getdents( int dd_fd, char *dd_buf, int dd_len ) { 4002513c: 88 10 00 18 mov %i0, %g4 /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 40025140: 80 a6 00 02 cmp %i0, %g2 40025144: 1a 80 00 0a bcc 4002516c 40025148: b0 10 20 00 clr %i0 4002514c: 03 10 00 fe sethi %hi(0x4003f800), %g1 40025150: c6 00 62 74 ld [ %g1 + 0x274 ], %g3 ! 4003fa74 40025154: 85 29 20 02 sll %g4, 2, %g2 40025158: 83 29 20 04 sll %g4, 4, %g1 4002515c: 82 20 40 02 sub %g1, %g2, %g1 40025160: 82 00 40 04 add %g1, %g4, %g1 40025164: 83 28 60 02 sll %g1, 2, %g1 40025168: b0 00 40 03 add %g1, %g3, %i0 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 4002516c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 40025170: c2 27 bf e8 st %g1, [ %fp + -24 ] 40025174: c4 06 20 14 ld [ %i0 + 0x14 ], %g2 40025178: c4 27 bf ec st %g2, [ %fp + -20 ] 4002517c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1 40025180: c2 27 bf f0 st %g1, [ %fp + -16 ] 40025184: c4 06 20 1c ld [ %i0 + 0x1c ], %g2 if ( !loc.ops->node_type_h ) 40025188: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4002518c: 80 a0 60 00 cmp %g1, 0 40025190: 02 80 00 17 be 400251ec 40025194: c4 27 bf f4 st %g2, [ %fp + -12 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 40025198: 9f c0 40 00 call %g1 4002519c: 90 07 bf e8 add %fp, -24, %o0 400251a0: 80 a2 20 01 cmp %o0, 1 400251a4: 12 80 00 0c bne 400251d4 400251a8: 01 00 00 00 nop /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 400251ac: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400251b0: c2 00 60 08 ld [ %g1 + 8 ], %g1 400251b4: 80 a0 60 00 cmp %g1, 0 400251b8: 02 80 00 0d be 400251ec 400251bc: 92 10 00 19 mov %i1, %o1 rtems_set_errno_and_return_minus_one( ENOTSUP ); return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 400251c0: 90 10 00 18 mov %i0, %o0 400251c4: 9f c0 40 00 call %g1 400251c8: 94 10 00 1a mov %i2, %o2 } 400251cc: 81 c7 e0 08 ret 400251d0: 91 e8 00 08 restore %g0, %o0, %o0 loc = iop->pathinfo; if ( !loc.ops->node_type_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 400251d4: 40 00 09 2a call 4002767c <__errno> 400251d8: 01 00 00 00 nop 400251dc: 82 10 20 14 mov 0x14, %g1 ! 14 400251e0: c2 22 00 00 st %g1, [ %o0 ] 400251e4: 10 bf ff fa b 400251cc 400251e8: 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 ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 400251ec: 40 00 09 24 call 4002767c <__errno> <== NOT EXECUTED 400251f0: 01 00 00 00 nop <== NOT EXECUTED 400251f4: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400251f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400251fc: 10 bf ff f4 b 400251cc <== NOT EXECUTED 40025200: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40019ce4 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 40019ce4: 03 10 00 f5 sethi %hi(0x4003d400), %g1 <== NOT EXECUTED 40019ce8: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4003d7f0 <== NOT EXECUTED return _POSIX_types_Gid; } 40019cec: 81 c3 e0 08 retl <== NOT EXECUTED 40019cf0: d0 10 a0 2a lduh [ %g2 + 0x2a ], %o0 <== NOT EXECUTED 4001a3bc : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001a3bc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4001a3c0: 7f ff ff b3 call 4001a28c <== NOT EXECUTED 4001a3c4: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { 4001a3c8: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a3cc: 13 10 00 f2 sethi %hi(0x4003c800), %o1 <== NOT EXECUTED 4001a3d0: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 4001a3d4: 40 00 36 fe call 40027fcc <== NOT EXECUTED 4001a3d8: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 4001a3dc: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4001a3e0: 12 80 00 0b bne 4001a40c <== NOT EXECUTED 4001a3e4: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001a3e8: 30 80 00 27 b,a 4001a484 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 4001a3ec: 40 00 43 7a call 4002b1d4 <== NOT EXECUTED 4001a3f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001a3f4: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4001a3f8: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (grp->gr_gid == gid); } if (match) { 4001a3fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a400: 12 80 00 14 bne 4001a450 <== NOT EXECUTED 4001a404: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 4001a408: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001a40c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a410: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 4001a414: 7f ff fe d2 call 40019f5c <== NOT EXECUTED 4001a418: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a41c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a420: 02 80 00 11 be 4001a464 <== NOT EXECUTED 4001a424: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 4001a428: 32 bf ff f1 bne,a 4001a3ec <== NOT EXECUTED 4001a42c: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(grp->gr_name, name) == 0); } else { match = (grp->gr_gid == gid); 4001a430: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4001a434: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4001a438: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001a43c: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4001a440: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a444: 02 bf ff f2 be 4001a40c <== NOT EXECUTED 4001a448: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4001a44c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a450: 40 00 34 e1 call 400277d4 <== NOT EXECUTED 4001a454: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = grp; 4001a458: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4001a45c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a460: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { errno = EINVAL; 4001a464: 40 00 34 86 call 4002767c <__errno> <== NOT EXECUTED 4001a468: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a46c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001a470: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4001a474: 40 00 34 d8 call 400277d4 <== NOT EXECUTED 4001a478: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a47c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a480: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; 4001a484: 40 00 34 7e call 4002767c <__errno> <== NOT EXECUTED 4001a488: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a48c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001a490: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a494: 81 c7 e0 08 ret <== NOT EXECUTED 4001a498: 81 e8 00 00 restore <== NOT EXECUTED 4001a0d8 : return NULL; return p; } struct group *getgrent() { 4001a0d8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (group_fp == NULL) 4001a0dc: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 4001a0e0: d0 00 62 b4 ld [ %g1 + 0x2b4 ], %o0 ! 4003f2b4 <== NOT EXECUTED 4001a0e4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a0e8: 02 80 00 0d be 4001a11c <== NOT EXECUTED 4001a0ec: 21 10 00 fc sethi %hi(0x4003f000), %l0 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 4001a0f0: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a0f4: 92 14 23 80 or %l0, 0x380, %o1 <== NOT EXECUTED 4001a0f8: 94 12 a2 b8 or %o2, 0x2b8, %o2 <== NOT EXECUTED 4001a0fc: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a100: 7f ff ff 97 call 40019f5c <== NOT EXECUTED 4001a104: b0 14 23 80 or %l0, 0x380, %i0 <== NOT EXECUTED 4001a108: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a10c: 02 80 00 04 be 4001a11c <== NOT EXECUTED 4001a110: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &grent; } 4001a114: 81 c7 e0 08 ret <== NOT EXECUTED 4001a118: 81 e8 00 00 restore <== NOT EXECUTED 4001a11c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a120: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001a4d4 : } struct group *getgrgid( gid_t gid ) { 4001a4d4: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 4001a4d8: 13 10 00 fc sethi %hi(0x4003f000), %o1 <== NOT EXECUTED 4001a4dc: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001a4e0: 92 12 63 80 or %o1, 0x380, %o1 <== NOT EXECUTED 4001a4e4: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4001a4e8: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a4ec: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a4f0: 94 12 a2 b8 or %o2, 0x2b8, %o2 <== NOT EXECUTED 4001a4f4: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001a4f8: 7f ff ff e9 call 4001a49c <== NOT EXECUTED 4001a4fc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001a500: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a504: 22 80 00 02 be,a 4001a50c <== NOT EXECUTED 4001a508: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001a50c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a510: 81 e8 00 00 restore <== NOT EXECUTED 4001a49c : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001a49c: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4001a4a0: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4001a4a4: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4001a4a8: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001a4ac: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 4001a4b0: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4001a4b4: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001a4b8: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4001a4bc: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001a4c0: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001a4c4: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001a4c8: 7f ff ff bd call 4001a3bc <== NOT EXECUTED 4001a4cc: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001a4d0: 01 00 00 00 nop 4001a540 : } struct group *getgrnam( const char *name ) { 4001a540: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct group *p; if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p)) 4001a544: 13 10 00 fc sethi %hi(0x4003f000), %o1 <== NOT EXECUTED 4001a548: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a54c: 92 12 63 80 or %o1, 0x380, %o1 <== NOT EXECUTED 4001a550: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a554: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a558: 94 12 a2 b8 or %o2, 0x2b8, %o2 <== NOT EXECUTED 4001a55c: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001a560: 7f ff ff ed call 4001a514 <== NOT EXECUTED 4001a564: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001a568: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a56c: 22 80 00 02 be,a 4001a574 <== NOT EXECUTED 4001a570: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001a574: 81 c7 e0 08 ret <== NOT EXECUTED 4001a578: 81 e8 00 00 restore <== NOT EXECUTED 4001a514 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 4001a514: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 4001a518: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4001a51c: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getgr_r(name, 0, grp, buffer, bufsize, result); 4001a520: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4001a524: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 4001a528: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 4001a52c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001a530: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001a534: 7f ff ff a2 call 4001a3bc <== NOT EXECUTED 4001a538: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001a53c: 01 00 00 00 nop 4001a5c0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001a5c0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; int match; init_etc_passwd_group(); 4001a5c4: 7f ff ff 32 call 4001a28c <== NOT EXECUTED 4001a5c8: 01 00 00 00 nop <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { 4001a5cc: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a5d0: 13 10 00 f2 sethi %hi(0x4003c800), %o1 <== NOT EXECUTED 4001a5d4: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED 4001a5d8: 40 00 36 7d call 40027fcc <== NOT EXECUTED 4001a5dc: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 4001a5e0: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED 4001a5e4: 12 80 00 0b bne 4001a610 <== NOT EXECUTED 4001a5e8: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001a5ec: 30 80 00 27 b,a 4001a688 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 4001a5f0: 40 00 42 f9 call 4002b1d4 <== NOT EXECUTED 4001a5f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4001a5f8: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 4001a5fc: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } else { match = (pwd->pw_uid == uid); } if (match) { 4001a600: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a604: 12 80 00 14 bne 4001a654 <== NOT EXECUTED 4001a608: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 4001a60c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED 4001a610: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a614: 96 10 00 1c mov %i4, %o3 <== NOT EXECUTED 4001a618: 7f ff fe c3 call 4001a124 <== NOT EXECUTED 4001a61c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a620: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a624: 02 80 00 11 be 4001a668 <== NOT EXECUTED 4001a628: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED errno = EINVAL; fclose(fp); return -1; } if (name) { 4001a62c: 32 bf ff f1 bne,a 4001a5f0 <== NOT EXECUTED 4001a630: d0 06 80 00 ld [ %i2 ], %o0 <== NOT EXECUTED match = (strcmp(pwd->pw_name, name) == 0); } else { match = (pwd->pw_uid == uid); 4001a634: c2 16 a0 08 lduh [ %i2 + 8 ], %g1 <== NOT EXECUTED 4001a638: 82 18 40 19 xor %g1, %i1, %g1 <== NOT EXECUTED 4001a63c: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001a640: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED } if (match) { 4001a644: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a648: 02 bf ff f2 be 4001a610 <== NOT EXECUTED 4001a64c: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED fclose(fp); 4001a650: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a654: 40 00 34 60 call 400277d4 <== NOT EXECUTED 4001a658: b0 10 20 00 clr %i0 <== NOT EXECUTED *result = pwd; 4001a65c: f4 27 40 00 st %i2, [ %i5 ] <== NOT EXECUTED } } fclose(fp); errno = EINVAL; return -1; } 4001a660: 81 c7 e0 08 ret <== NOT EXECUTED 4001a664: 81 e8 00 00 restore <== NOT EXECUTED errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { errno = EINVAL; 4001a668: 40 00 34 05 call 4002767c <__errno> <== NOT EXECUTED 4001a66c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a670: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001a674: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED fclose(fp); 4001a678: 40 00 34 57 call 400277d4 <== NOT EXECUTED 4001a67c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a680: 81 c7 e0 08 ret <== NOT EXECUTED 4001a684: 81 e8 00 00 restore <== NOT EXECUTED int match; init_etc_passwd_group(); if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; 4001a688: 40 00 33 fd call 4002767c <__errno> <== NOT EXECUTED 4001a68c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001a690: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4001a694: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001a698: 81 c7 e0 08 ret <== NOT EXECUTED 4001a69c: 81 e8 00 00 restore <== NOT EXECUTED 4001a240 : return NULL; return p; } struct passwd *getpwent() { 4001a240: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (passwd_fp == NULL) 4001a244: 03 10 00 fc sethi %hi(0x4003f000), %g1 <== NOT EXECUTED 4001a248: d0 00 61 cc ld [ %g1 + 0x1cc ], %o0 ! 4003f1cc <== NOT EXECUTED 4001a24c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a250: 02 80 00 0d be 4001a284 <== NOT EXECUTED 4001a254: 21 10 00 fc sethi %hi(0x4003f000), %l0 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 4001a258: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a25c: 92 14 22 98 or %l0, 0x298, %o1 <== NOT EXECUTED 4001a260: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 4001a264: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a268: 7f ff ff af call 4001a124 <== NOT EXECUTED 4001a26c: b0 14 22 98 or %l0, 0x298, %i0 <== NOT EXECUTED 4001a270: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a274: 02 80 00 04 be 4001a284 <== NOT EXECUTED 4001a278: 01 00 00 00 nop <== NOT EXECUTED return NULL; return &pwent; } 4001a27c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a280: 81 e8 00 00 restore <== NOT EXECUTED 4001a284: 81 c7 e0 08 ret <== NOT EXECUTED 4001a288: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001a744 : } struct passwd *getpwnam( const char *name ) { 4001a744: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p)) 4001a748: 13 10 00 fc sethi %hi(0x4003f000), %o1 <== NOT EXECUTED 4001a74c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a750: 92 12 62 98 or %o1, 0x298, %o1 <== NOT EXECUTED 4001a754: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a758: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a75c: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 4001a760: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001a764: 7f ff ff ed call 4001a718 <== NOT EXECUTED 4001a768: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001a76c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a770: 22 80 00 02 be,a 4001a778 <== NOT EXECUTED 4001a774: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001a778: 81 c7 e0 08 ret <== NOT EXECUTED 4001a77c: 81 e8 00 00 restore <== NOT EXECUTED 4001a718 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001a718: 82 10 00 0a mov %o2, %g1 <== NOT EXECUTED 4001a71c: 84 10 00 0b mov %o3, %g2 <== NOT EXECUTED 4001a720: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(name, 0, pwd, buffer, bufsize, result); 4001a724: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED 4001a728: 96 10 00 01 mov %g1, %o3 <== NOT EXECUTED 4001a72c: 98 10 00 02 mov %g2, %o4 <== NOT EXECUTED 4001a730: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001a734: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001a738: 7f ff ff a2 call 4001a5c0 <== NOT EXECUTED 4001a73c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001a740: 01 00 00 00 nop 4001a6d8 : } struct passwd *getpwuid( uid_t uid ) { 4001a6d8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 4001a6dc: 13 10 00 fc sethi %hi(0x4003f000), %o1 <== NOT EXECUTED 4001a6e0: 91 2e 20 10 sll %i0, 0x10, %o0 <== NOT EXECUTED 4001a6e4: 92 12 62 98 or %o1, 0x298, %o1 <== NOT EXECUTED 4001a6e8: 91 32 20 10 srl %o0, 0x10, %o0 <== NOT EXECUTED 4001a6ec: 15 10 00 fc sethi %hi(0x4003f000), %o2 <== NOT EXECUTED 4001a6f0: 96 10 20 c8 mov 0xc8, %o3 <== NOT EXECUTED 4001a6f4: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED 4001a6f8: 98 07 bf f4 add %fp, -12, %o4 <== NOT EXECUTED 4001a6fc: 7f ff ff e9 call 4001a6a0 <== NOT EXECUTED 4001a700: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001a704: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a708: 22 80 00 02 be,a 4001a710 <== NOT EXECUTED 4001a70c: f0 07 bf f4 ld [ %fp + -12 ], %i0 <== NOT EXECUTED return NULL; return p; } 4001a710: 81 c7 e0 08 ret <== NOT EXECUTED 4001a714: 81 e8 00 00 restore <== NOT EXECUTED 4001a6a0 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001a6a0: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 4001a6a4: 84 10 00 0a mov %o2, %g2 <== NOT EXECUTED 4001a6a8: 86 10 00 0b mov %o3, %g3 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4001a6ac: 93 2a 20 10 sll %o0, 0x10, %o1 <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 4001a6b0: 9a 10 00 0c mov %o4, %o5 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 4001a6b4: 94 10 00 01 mov %g1, %o2 <== NOT EXECUTED 4001a6b8: 93 32 60 10 srl %o1, 0x10, %o1 <== NOT EXECUTED 4001a6bc: 96 10 00 02 mov %g2, %o3 <== NOT EXECUTED 4001a6c0: 98 10 00 03 mov %g3, %o4 <== NOT EXECUTED 4001a6c4: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001a6c8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 4001a6cc: 7f ff ff bd call 4001a5c0 <== NOT EXECUTED 4001a6d0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 4001a6d4: 01 00 00 00 nop 4000d2c8 : int gettimeofday( struct timeval *tp, void * __tz ) { 4000d2c8: 9d e3 bf 90 save %sp, -112, %sp /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 4000d2cc: 80 a6 20 00 cmp %i0, 0 4000d2d0: 02 80 00 11 be 4000d314 4000d2d4: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 4000d2d8: 7f ff d3 44 call 40001fe8 4000d2dc: 01 00 00 00 nop 4000d2e0: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 4000d2e4: 7f ff ec 0b call 40008310 <_TOD_Get> 4000d2e8: 90 07 bf f0 add %fp, -16, %o0 _ISR_Enable(level); 4000d2ec: 7f ff d3 43 call 40001ff8 4000d2f0: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000d2f4: d0 07 bf f4 ld [ %fp + -12 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 4000d2f8: c2 07 bf f0 ld [ %fp + -16 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000d2fc: 92 10 23 e8 mov 0x3e8, %o1 4000d300: 40 00 27 45 call 40017014 <.udiv> 4000d304: c2 26 00 00 st %g1, [ %i0 ] 4000d308: 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; } 4000d30c: 81 c7 e0 08 ret 4000d310: 91 e8 20 00 restore %g0, 0, %o0 void * __tz ) { /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { errno = EFAULT; 4000d314: 40 00 0b 17 call 4000ff70 <__errno> <== NOT EXECUTED 4000d318: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000d31c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 4000d320: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d324: 81 c7 e0 08 ret <== NOT EXECUTED 4000d328: 81 e8 00 00 restore <== NOT EXECUTED 4001a780 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 4001a780: 03 10 00 f5 sethi %hi(0x4003d400), %g1 <== NOT EXECUTED 4001a784: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4003d7f0 <== NOT EXECUTED return _POSIX_types_Uid; } 4001a788: 81 c3 e0 08 retl <== NOT EXECUTED 4001a78c: d0 10 a0 28 lduh [ %g2 + 0x28 ], %o0 <== NOT EXECUTED 400248ec : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 400248ec: c4 02 20 2c ld [ %o0 + 0x2c ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 400248f0: 86 10 00 08 mov %o0, %g3 IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) 400248f4: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1 400248f8: 80 a0 60 01 cmp %g1, 1 400248fc: 02 80 00 04 be 4002490c 40024900: 90 10 3f ff mov -1, %o0 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; return 0; } 40024904: 81 c3 e0 08 retl <== NOT EXECUTED 40024908: 01 00 00 00 nop <== NOT EXECUTED the_jnode = (IMFS_jnode_t *) iop->file_info; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 4002490c: c0 20 e0 08 clr [ %g3 + 8 ] return 0; } 40024910: 81 c3 e0 08 retl 40024914: 90 10 20 00 clr %o0 40024a08 : ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40024a08: 9d e3 be 88 save %sp, -376, %sp int current_entry; int first_entry; int last_entry; struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; 40024a0c: c2 06 20 2c ld [ %i0 + 0x2c ], %g1 ssize_t imfs_dir_read( rtems_libio_t *iop, void *buffer, size_t count ) { 40024a10: 90 10 00 1a mov %i2, %o0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 40024a14: e2 00 60 4c ld [ %g1 + 0x4c ], %l1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 40024a18: a4 00 60 50 add %g1, 0x50, %l2 struct dirent tmp_dirent; the_jnode = (IMFS_jnode_t *)iop->file_info; the_chain = &the_jnode->info.directory.Entries; if ( Chain_Is_empty( the_chain ) ) 40024a1c: 80 a4 40 12 cmp %l1, %l2 40024a20: 02 80 00 34 be 40024af0 40024a24: aa 10 20 00 clr %l5 /* Move to the first of the desired directory entries */ the_node = the_chain->first; bytes_transferred = 0; first_entry = iop->offset; 40024a28: e8 06 20 08 ld [ %i0 + 8 ], %l4 /* protect against using sizes that are not exact multiples of the */ /* -dirent- size. These could result in unexpected results */ last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); 40024a2c: 40 00 47 f1 call 400369f0 <.udiv> 40024a30: 92 10 21 0c mov 0x10c, %o1 40024a34: 83 2a 20 02 sll %o0, 2, %g1 40024a38: 85 2a 20 06 sll %o0, 6, %g2 40024a3c: 82 00 40 02 add %g1, %g2, %g1 40024a40: 82 20 40 08 sub %g1, %o0, %g1 40024a44: 83 28 60 02 sll %g1, 2, %g1 40024a48: a6 00 40 14 add %g1, %l4, %l3 /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40024a4c: 80 a4 e0 00 cmp %l3, 0 40024a50: 04 80 00 2a ble 40024af8 40024a54: 80 a4 80 11 cmp %l2, %l1 current_entry = current_entry + sizeof(struct dirent) ){ if ( Chain_Is_tail( the_chain, the_node ) ){ 40024a58: 02 80 00 28 be 40024af8 40024a5c: b4 10 20 00 clr %i2 tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); strcpy( tmp_dirent.d_name, the_jnode->name ); 40024a60: ae 07 be ec add %fp, -276, %l7 40024a64: 10 80 00 08 b 40024a84 40024a68: ac 07 be f8 add %fp, -264, %l6 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40024a6c: 80 a4 c0 1a cmp %l3, %i2 40024a70: 04 80 00 20 ble 40024af0 40024a74: e2 04 40 00 ld [ %l1 ], %l1 current_entry = current_entry + sizeof(struct dirent) ){ if ( Chain_Is_tail( the_chain, the_node ) ){ 40024a78: 80 a4 80 11 cmp %l2, %l1 40024a7c: 02 80 00 1d be 40024af0 40024a80: 01 00 00 00 nop /* entry in the read */ return bytes_transferred; /* Indicate that there are no more */ /* entries to return */ } if( current_entry >= first_entry ) { 40024a84: 80 a5 00 1a cmp %l4, %i2 40024a88: 34 bf ff f9 bg,a 40024a6c 40024a8c: b4 06 a1 0c add %i2, 0x10c, %i2 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; 40024a90: f4 27 be f0 st %i2, [ %fp + -272 ] tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 40024a94: c4 04 60 34 ld [ %l1 + 0x34 ], %g2 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 40024a98: 82 10 21 0c mov 0x10c, %g1 the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40024a9c: a0 04 60 0c add %l1, 0xc, %l0 } if( current_entry >= first_entry ) { /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); 40024aa0: c2 37 be f4 sth %g1, [ %fp + -268 ] the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; 40024aa4: c4 27 be ec st %g2, [ %fp + -276 ] tmp_dirent.d_namlen = strlen( the_jnode->name ); 40024aa8: 40 00 1f ec call 4002ca58 40024aac: 90 10 00 10 mov %l0, %o0 strcpy( tmp_dirent.d_name, the_jnode->name ); 40024ab0: 92 10 00 10 mov %l0, %o1 /* Move the entry to the return buffer */ tmp_dirent.d_off = current_entry; tmp_dirent.d_reclen = sizeof( struct dirent ); the_jnode = (IMFS_jnode_t *) the_node; tmp_dirent.d_ino = the_jnode->st_ino; tmp_dirent.d_namlen = strlen( the_jnode->name ); 40024ab4: d0 37 be f6 sth %o0, [ %fp + -266 ] strcpy( tmp_dirent.d_name, the_jnode->name ); 40024ab8: 40 00 19 f7 call 4002b294 40024abc: 90 10 00 16 mov %l6, %o0 memcpy( 40024ac0: 90 06 40 15 add %i1, %l5, %o0 40024ac4: 92 10 00 17 mov %l7, %o1 40024ac8: 40 00 11 a1 call 4002914c 40024acc: 94 10 21 0c mov 0x10c, %o2 buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 40024ad0: c2 06 20 08 ld [ %i0 + 8 ], %g1 bytes_transferred = bytes_transferred + sizeof( struct dirent ); } the_node = the_node->next; 40024ad4: b4 06 a1 0c add %i2, 0x10c, %i2 memcpy( buffer + bytes_transferred, (void *)&tmp_dirent, sizeof( struct dirent ) ); iop->offset = iop->offset + sizeof(struct dirent); 40024ad8: 82 00 61 0c add %g1, 0x10c, %g1 40024adc: c2 26 20 08 st %g1, [ %i0 + 8 ] bytes_transferred = bytes_transferred + sizeof( struct dirent ); 40024ae0: aa 05 61 0c add %l5, 0x10c, %l5 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40024ae4: 80 a4 c0 1a cmp %l3, %i2 40024ae8: 14 bf ff e4 bg 40024a78 40024aec: e2 04 40 00 ld [ %l1 ], %l1 the_node = the_node->next; } /* Success */ return bytes_transferred; } 40024af0: 81 c7 e0 08 ret 40024af4: 91 e8 00 15 restore %g0, %l5, %o0 last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent); /* The directory was not empty so try to move to the desired entry in chain*/ for ( current_entry = 0; current_entry < last_entry; 40024af8: 10 bf ff fe b 40024af0 <== NOT EXECUTED 40024afc: aa 10 20 00 clr %l5 <== NOT EXECUTED 40024b00 : */ int imfs_dir_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 40024b00: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 40024b04: e0 06 00 00 ld [ %i0 ], %l0 /* * You cannot remove a node that still has children */ if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) ) 40024b08: c4 04 20 4c ld [ %l0 + 0x4c ], %g2 40024b0c: 82 04 20 50 add %l0, 0x50, %g1 40024b10: 80 a0 80 01 cmp %g2, %g1 40024b14: 12 80 00 36 bne 40024bec 40024b18: 01 00 00 00 nop /* * You cannot remove the file system root node. */ if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access ) 40024b1c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40024b20: c4 00 60 18 ld [ %g1 + 0x18 ], %g2 40024b24: 80 a4 00 02 cmp %l0, %g2 40024b28: 02 80 00 2b be 40024bd4 40024b2c: 01 00 00 00 nop /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) 40024b30: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 40024b34: 80 a0 60 00 cmp %g1, 0 40024b38: 12 80 00 27 bne 40024bd4 40024b3c: 01 00 00 00 nop /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 40024b40: c2 04 20 08 ld [ %l0 + 8 ], %g1 40024b44: 80 a0 60 00 cmp %g1, 0 40024b48: 22 80 00 06 be,a 40024b60 40024b4c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 Chain_Extract( (Chain_Node *) the_jnode ); 40024b50: 7f ff de 10 call 4001c390 <_Chain_Extract> 40024b54: 90 10 00 10 mov %l0, %o0 the_jnode->Parent = NULL; 40024b58: c0 24 20 08 clr [ %l0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40024b5c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 40024b60: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 40024b64: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 40024b68: 90 07 bf f0 add %fp, -16, %o0 40024b6c: 7f ff 85 98 call 400061cc 40024b70: c2 34 20 30 sth %g1, [ %l0 + 0x30 ] 40024b74: c2 07 bf f0 ld [ %fp + -16 ], %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) ) { 40024b78: 90 10 00 10 mov %l0, %o0 40024b7c: 7f ff 86 04 call 4000638c 40024b80: c2 24 20 44 st %g1, [ %l0 + 0x44 ] 40024b84: 80 a2 20 00 cmp %o0, 0 40024b88: 12 80 00 11 bne 40024bcc 40024b8c: 01 00 00 00 nop 40024b90: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 40024b94: 80 a0 60 00 cmp %g1, 0 40024b98: 12 80 00 0d bne 40024bcc 40024b9c: 03 10 00 f5 sethi %hi(0x4003d400), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == pathloc->node_access ) 40024ba0: c6 00 63 f0 ld [ %g1 + 0x3f0 ], %g3 ! 4003d7f0 40024ba4: c4 06 00 00 ld [ %i0 ], %g2 40024ba8: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40024bac: 80 a0 40 02 cmp %g1, %g2 40024bb0: 22 80 00 02 be,a 40024bb8 40024bb4: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED /* * Free memory associated with a memory file. */ free( the_jnode ); 40024bb8: 90 10 00 10 mov %l0, %o0 40024bbc: 7f ff 86 a4 call 4000664c 40024bc0: b0 10 20 00 clr %i0 40024bc4: 81 c7 e0 08 ret 40024bc8: 81 e8 00 00 restore } return 0; } 40024bcc: 81 c7 e0 08 ret 40024bd0: 91 e8 20 00 restore %g0, 0, %o0 /* * You cannot remove a mountpoint. */ if ( the_jnode->info.directory.mt_fs != NULL ) rtems_set_errno_and_return_minus_one( EBUSY ); 40024bd4: 40 00 0a aa call 4002767c <__errno> 40024bd8: b0 10 3f ff mov -1, %i0 40024bdc: 82 10 20 10 mov 0x10, %g1 40024be0: c2 22 00 00 st %g1, [ %o0 ] 40024be4: 81 c7 e0 08 ret 40024be8: 81 e8 00 00 restore /* * You cannot remove a node that still has children */ if ( ! Chain_Is_empty( &the_jnode->info.directory.Entries ) ) rtems_set_errno_and_return_minus_one( ENOTEMPTY ); 40024bec: 40 00 0a a4 call 4002767c <__errno> 40024bf0: b0 10 3f ff mov -1, %i0 40024bf4: 82 10 20 5a mov 0x5a, %g1 40024bf8: c2 22 00 00 st %g1, [ %o0 ] 40024bfc: 81 c7 e0 08 ret 40024c00: 81 e8 00 00 restore 4001a28c : /* * Initialize useable but dummy databases */ void init_etc_passwd_group(void) { 4001a28c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) 4001a290: 05 10 00 fc sethi %hi(0x4003f000), %g2 <== NOT EXECUTED 4001a294: c2 48 a1 c8 ldsb [ %g2 + 0x1c8 ], %g1 ! 4003f1c8 <== NOT EXECUTED 4001a298: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a29c: 02 80 00 04 be 4001a2ac <== NOT EXECUTED 4001a2a0: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 4001a2a4: 81 c7 e0 08 ret <== NOT EXECUTED 4001a2a8: 81 e8 00 00 restore <== NOT EXECUTED return; etc_passwd_initted = 1; mkdir("/etc", 0777); 4001a2ac: 92 10 21 ff mov 0x1ff, %o1 <== NOT EXECUTED FILE *fp; static char etc_passwd_initted = 0; if (etc_passwd_initted) return; etc_passwd_initted = 1; 4001a2b0: c2 28 a1 c8 stb %g1, [ %g2 + 0x1c8 ] <== NOT EXECUTED mkdir("/etc", 0777); 4001a2b4: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a2b8: 40 00 01 3b call 4001a7a4 <== NOT EXECUTED 4001a2bc: 90 12 22 40 or %o0, 0x240, %o0 ! 4003a640 <_CPU_Trap_slot_template+0xe70> <== NOT EXECUTED /* * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { 4001a2c0: 31 10 00 e9 sethi %hi(0x4003a400), %i0 <== NOT EXECUTED 4001a2c4: 21 10 00 f2 sethi %hi(0x4003c800), %l0 <== NOT EXECUTED 4001a2c8: 90 16 22 48 or %i0, 0x248, %o0 <== NOT EXECUTED 4001a2cc: 40 00 37 40 call 40027fcc <== NOT EXECUTED 4001a2d0: 92 14 22 68 or %l0, 0x268, %o1 <== NOT EXECUTED 4001a2d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a2d8: 22 80 00 0d be,a 4001a30c <== NOT EXECUTED 4001a2dc: 90 16 22 48 or %i0, 0x248, %o0 <== NOT EXECUTED } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4001a2e0: 40 00 35 3d call 400277d4 <== NOT EXECUTED 4001a2e4: 01 00 00 00 nop <== NOT EXECUTED } /* * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { 4001a2e8: 92 14 22 68 or %l0, 0x268, %o1 <== NOT EXECUTED 4001a2ec: 31 10 00 e9 sethi %hi(0x4003a400), %i0 <== NOT EXECUTED 4001a2f0: 40 00 37 37 call 40027fcc <== NOT EXECUTED 4001a2f4: 90 16 22 c0 or %i0, 0x2c0, %o0 ! 4003a6c0 <_CPU_Trap_slot_template+0xef0> <== NOT EXECUTED 4001a2f8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a2fc: 22 80 00 11 be,a 4001a340 <== NOT EXECUTED 4001a300: 90 16 22 c0 or %i0, 0x2c0, %o0 <== NOT EXECUTED fclose(fp); 4001a304: 40 00 35 34 call 400277d4 <== NOT EXECUTED 4001a308: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * Initialize /etc/passwd */ if ((fp = fopen("/etc/passwd", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/passwd", "w")) != NULL) { 4001a30c: 13 10 00 e5 sethi %hi(0x40039400), %o1 <== NOT EXECUTED 4001a310: 40 00 37 2f call 40027fcc <== NOT EXECUTED 4001a314: 92 12 63 e0 or %o1, 0x3e0, %o1 ! 400397e0 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 4001a318: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001a31c: 02 bf ff f3 be 4001a2e8 <== NOT EXECUTED 4001a320: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED fprintf(fp, "root:*:0:0:root::/:/bin/sh\n" 4001a324: 94 10 20 66 mov 0x66, %o2 <== NOT EXECUTED 4001a328: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 4001a32c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a330: 40 00 3a 6d call 40028ce4 <== NOT EXECUTED 4001a334: 90 12 22 58 or %o0, 0x258, %o0 ! 4003a658 <_CPU_Trap_slot_template+0xe88> <== NOT EXECUTED "rtems:*:1:1:RTEMS Application::/:/bin/sh\n" "tty:!:2:2:tty owner::/:/bin/false\n" ); fclose(fp); 4001a338: 10 bf ff ea b 4001a2e0 <== NOT EXECUTED 4001a33c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED * Initialize /etc/group */ if ((fp = fopen("/etc/group", "r")) != NULL) { fclose(fp); } else if ((fp = fopen("/etc/group", "w")) != NULL) { 4001a340: 13 10 00 e5 sethi %hi(0x40039400), %o1 <== NOT EXECUTED 4001a344: 40 00 37 22 call 40027fcc <== NOT EXECUTED 4001a348: 92 12 63 e0 or %o1, 0x3e0, %o1 ! 400397e0 <_CPU_Trap_slot_template+0x10> <== NOT EXECUTED 4001a34c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001a350: 02 bf ff d5 be 4001a2a4 <== NOT EXECUTED 4001a354: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED fprintf( fp, "root:x:0:root\n" 4001a358: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 4001a35c: 94 10 20 2a mov 0x2a, %o2 <== NOT EXECUTED 4001a360: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED 4001a364: 40 00 3a 60 call 40028ce4 <== NOT EXECUTED 4001a368: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED "rtems:x:1:rtems\n" "tty:x:2:tty\n" ); fclose(fp); 4001a36c: 40 00 35 1a call 400277d4 <== NOT EXECUTED 4001a370: 81 e8 00 00 restore <== NOT EXECUTED 4001a374: 01 00 00 00 nop 4001a9a4 : int ioctl( int fd, ioctl_command_t command, ... ) { 4001a9a4: 9d e3 bf 90 save %sp, -112, %sp va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4001a9a8: 03 10 00 ad sethi %hi(0x4002b400), %g1 4001a9ac: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 ! 4002b55c int ioctl( int fd, ioctl_command_t command, ... ) { 4001a9b0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4001a9b4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4001a9b8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 4001a9bc: 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 ); 4001a9c0: 80 a6 00 02 cmp %i0, %g2 4001a9c4: 1a 80 00 1b bcc 4001aa30 4001a9c8: 92 10 00 19 mov %i1, %o1 iop = rtems_libio_iop( fd ); 4001a9cc: 03 10 00 b6 sethi %hi(0x4002d800), %g1 4001a9d0: c6 00 61 68 ld [ %g1 + 0x168 ], %g3 ! 4002d968 4001a9d4: 85 2e 20 02 sll %i0, 2, %g2 4001a9d8: 83 2e 20 04 sll %i0, 4, %g1 4001a9dc: 82 20 40 02 sub %g1, %g2, %g1 4001a9e0: 82 00 40 18 add %g1, %i0, %g1 4001a9e4: 83 28 60 02 sll %g1, 2, %g1 4001a9e8: 90 00 40 03 add %g1, %g3, %o0 rtems_libio_check_is_open(iop); 4001a9ec: c4 02 20 0c ld [ %o0 + 0xc ], %g2 4001a9f0: 80 88 a1 00 btst 0x100, %g2 4001a9f4: 02 80 00 0f be 4001aa30 4001a9f8: 82 07 a0 50 add %fp, 0x50, %g1 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4001a9fc: c4 02 20 30 ld [ %o0 + 0x30 ], %g2 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4001aa00: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4001aa04: 80 a0 a0 00 cmp %g2, 0 4001aa08: 02 80 00 0a be 4001aa30 4001aa0c: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EBADF ); if ( !iop->handlers->ioctl_h ) 4001aa10: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4001aa14: 80 a0 60 00 cmp %g1, 0 4001aa18: 02 80 00 0c be 4001aa48 4001aa1c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4001aa20: 9f c0 40 00 call %g1 4001aa24: 01 00 00 00 nop return rc; } 4001aa28: 81 c7 e0 08 ret 4001aa2c: 91 e8 00 08 restore %g0, %o0, %o0 /* * Now process the ioctl(). */ if ( !iop->handlers ) rtems_set_errno_and_return_minus_one( EBADF ); 4001aa30: 40 00 02 87 call 4001b44c <__errno> <== NOT EXECUTED 4001aa34: 01 00 00 00 nop <== NOT EXECUTED 4001aa38: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001aa3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001aa40: 10 bf ff fa b 4001aa28 <== NOT EXECUTED 4001aa44: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED if ( !iop->handlers->ioctl_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001aa48: 40 00 02 81 call 4001b44c <__errno> <== NOT EXECUTED 4001aa4c: 01 00 00 00 nop <== NOT EXECUTED 4001aa50: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001aa54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001aa58: 10 bf ff f4 b 4001aa28 <== NOT EXECUTED 4001aa5c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 40004fe0 : /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 40004fe0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) 40004fe4: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED 40004fe8: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40004fec: 02 80 00 03 be 40004ff8 <== NOT EXECUTED 40004ff0: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED c &= 0x7f; 40004ff4: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 40004ff8: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED 40004ffc: 02 80 00 0b be 40005028 <== NOT EXECUTED 40005000: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED c = tolower (c); 40005004: 03 10 00 6c sethi %hi(0x4001b000), %g1 <== NOT EXECUTED 40005008: c4 00 63 78 ld [ %g1 + 0x378 ], %g2 ! 4001b378 <__ctype_ptr> <== NOT EXECUTED 4000500c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40005010: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED 40005014: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40005018: 32 80 00 02 bne,a 40005020 <== NOT EXECUTED 4000501c: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED 40005020: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == '\r') { 40005024: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED 40005028: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED 4000502c: 02 80 00 32 be 400050f4 <== NOT EXECUTED 40005030: 80 a0 60 0a cmp %g1, 0xa <== 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)) { 40005034: 02 80 00 35 be 40005108 <== NOT EXECUTED 40005038: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 4000503c: 02 80 00 1f be 400050b8 <== NOT EXECUTED 40005040: 05 10 00 6b sethi %hi(0x4001ac00), %g2 <== NOT EXECUTED 40005044: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED 40005048: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 4000504c: 22 80 00 1b be,a 400050b8 <== NOT EXECUTED 40005050: 05 10 00 6b sethi %hi(0x4001ac00), %g2 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40005054: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED 40005058: a2 0c 20 ff and %l0, 0xff, %l1 <== NOT EXECUTED 4000505c: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40005060: 02 80 00 5a be 400051c8 <== NOT EXECUTED 40005064: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 40005068: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED 4000506c: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40005070: 02 80 00 5b be 400051dc <== NOT EXECUTED 40005074: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { 40005078: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED 4000507c: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40005080: 02 80 00 55 be 400051d4 <== NOT EXECUTED 40005084: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return 1; } else if (c == '\n') { 40005088: 80 a4 60 0a cmp %l1, 0xa <== NOT EXECUTED 4000508c: 02 80 00 3e be 40005184 <== NOT EXECUTED 40005090: 80 88 a0 48 btst 0x48, %g2 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) 40005094: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED 40005098: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 4000509c: 02 80 00 27 be 40005138 <== NOT EXECUTED 400050a0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED 400050a4: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED 400050a8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 400050ac: 02 80 00 23 be 40005138 <== NOT EXECUTED 400050b0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 400050b4: 05 10 00 6b sethi %hi(0x4001ac00), %g2 <== NOT EXECUTED 400050b8: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED 400050bc: c2 00 a3 34 ld [ %g2 + 0x334 ], %g1 <== NOT EXECUTED 400050c0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400050c4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400050c8: 16 80 00 0e bge 40005100 <== NOT EXECUTED 400050cc: 01 00 00 00 nop <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 400050d0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400050d4: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED 400050d8: 12 80 00 21 bne 4000515c <== NOT EXECUTED 400050dc: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 400050e0: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 400050e4: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 400050e8: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 400050ec: 81 c7 e0 08 ret <== NOT EXECUTED 400050f0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) 400050f4: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED 400050f8: 02 80 00 0c be 40005128 <== NOT EXECUTED 400050fc: 80 88 e1 00 btst 0x100, %g3 <== NOT EXECUTED * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; 40005100: 81 c7 e0 08 ret <== NOT EXECUTED 40005104: 91 e8 20 00 restore %g0, 0, %o0 <== 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)) { 40005108: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED 4000510c: 02 bf ff cf be 40005048 <== NOT EXECUTED 40005110: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 40005114: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED 40005118: 02 bf ff e7 be 400050b4 <== NOT EXECUTED 4000511c: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 40005120: 10 bf ff ce b 40005058 <== NOT EXECUTED 40005124: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; if (tty->termios.c_iflag & ICRNL) 40005128: 32 bf ff c7 bne,a 40005044 <== NOT EXECUTED 4000512c: 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)) { 40005130: 10 bf ff c6 b 40005048 <== NOT EXECUTED 40005134: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 40005138: 12 80 00 1c bne 400051a8 <== NOT EXECUTED 4000513c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 40005140: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40005144: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40005148: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 4000514c: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED 40005150: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 40005154: 81 c7 e0 08 ret <== NOT EXECUTED 40005158: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 4000515c: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED 40005160: 7f ff fe f0 call 40004d20 <== NOT EXECUTED 40005164: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005168: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 4000516c: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED 40005170: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED 40005174: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED 40005178: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED 4000517c: 81 c7 e0 08 ret <== NOT EXECUTED 40005180: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED } else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) 40005184: 12 80 00 0d bne 400051b8 <== NOT EXECUTED 40005188: 90 10 20 0a mov 0xa, %o0 <== NOT EXECUTED echo (c, tty); tty->cbuf[tty->ccount++] = c; 4000518c: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED 40005190: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED 40005194: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED 40005198: e2 28 80 01 stb %l1, [ %g2 + %g1 ] <== NOT EXECUTED 4000519c: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED 400051a0: 81 c7 e0 08 ret <== NOT EXECUTED 400051a4: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) || (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) echo (c, tty); 400051a8: 7f ff fe de call 40004d20 <== NOT EXECUTED 400051ac: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400051b0: 10 bf ff e5 b 40005144 <== NOT EXECUTED 400051b4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED else if (c == tty->termios.c_cc[VEOF]) { return 1; } else if (c == '\n') { if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); 400051b8: 7f ff fe da call 40004d20 <== NOT EXECUTED 400051bc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 400051c0: 10 bf ff f4 b 40005190 <== NOT EXECUTED 400051c4: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { if (c == tty->termios.c_cc[VERASE]) { erase (tty, 0); 400051c8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400051cc: 7f ff fe f5 call 40004da0 <== NOT EXECUTED 400051d0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400051d4: 81 c7 e0 08 ret <== NOT EXECUTED 400051d8: 81 e8 00 00 restore <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); 400051dc: 7f ff fe f1 call 40004da0 <== NOT EXECUTED 400051e0: b0 10 20 00 clr %i0 <== NOT EXECUTED 400051e4: 81 c7 e0 08 ret <== NOT EXECUTED 400051e8: 81 e8 00 00 restore <== NOT EXECUTED 40027024 : int killinfo( pid_t pid, int sig, const union sigval *value ) { 40027024: 9d e3 bf 88 save %sp, -120, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) 40027028: 7f ff ff 11 call 40026c6c 4002702c: 01 00 00 00 nop 40027030: 80 a2 00 18 cmp %o0, %i0 40027034: 12 80 00 ca bne 4002735c 40027038: 80 a6 60 00 cmp %i1, 0 /* * Validate the signal passed. */ if ( !sig ) 4002703c: 02 80 00 ce be 40027374 40027040: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 40027044: 90 06 7f ff add %i1, -1, %o0 40027048: 80 a2 20 1f cmp %o0, 0x1f 4002704c: 18 80 00 ca bgu 40027374 40027050: 03 10 00 b8 sethi %hi(0x4002e000), %g1 /* * If the signal is being ignored, then we are out of here. */ if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40027054: a5 2e 60 02 sll %i1, 2, %l2 40027058: ac 10 62 48 or %g1, 0x248, %l6 4002705c: a7 2e 60 04 sll %i1, 4, %l3 40027060: 82 24 c0 12 sub %l3, %l2, %g1 40027064: 82 00 40 16 add %g1, %l6, %g1 40027068: c4 00 60 08 ld [ %g1 + 8 ], %g2 4002706c: 80 a0 a0 01 cmp %g2, 1 40027070: 02 80 00 4f be 400271ac 40027074: 80 a6 60 0b cmp %i1, 0xb * 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. */ switch ( sig ) { 40027078: 18 80 00 0c bgu 400270a8 4002707c: 82 10 20 01 mov 1, %g1 40027080: 83 28 40 19 sll %g1, %i1, %g1 <== NOT EXECUTED 40027084: 80 88 69 10 btst 0x910, %g1 <== NOT EXECUTED 40027088: 02 80 00 08 be 400270a8 <== NOT EXECUTED 4002708c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED case SIGFPE: case SIGILL: case SIGSEGV: return pthread_kill( pthread_self(), sig ); 40027090: 40 00 01 75 call 40027664 <== NOT EXECUTED 40027094: 01 00 00 00 nop <== NOT EXECUTED 40027098: 40 00 01 25 call 4002752c <== NOT EXECUTED 4002709c: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400270a0: 81 c7 e0 08 ret 400270a4: 91 e8 00 08 restore %g0, %o0, %o0 /* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; 400270a8: f2 27 bf ec st %i1, [ %fp + -20 ] siginfo->si_code = SI_USER; 400270ac: c2 27 bf f0 st %g1, [ %fp + -16 ] if ( !value ) { 400270b0: 80 a6 a0 00 cmp %i2, 0 400270b4: 02 80 00 46 be 400271cc 400270b8: b1 28 40 08 sll %g1, %o0, %i0 siginfo->si_value.sival_int = 0; } else { siginfo->si_value = *value; 400270bc: c2 06 80 00 ld [ %i2 ], %g1 400270c0: c2 27 bf f4 st %g1, [ %fp + -12 ] 400270c4: 35 10 00 b6 sethi %hi(0x4002d800), %i2 400270c8: c2 06 a3 30 ld [ %i2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 400270cc: 82 00 60 01 inc %g1 400270d0: c2 26 a3 30 st %g1, [ %i2 + 0x330 ] /* * 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; 400270d4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400270d8: c6 00 60 0c ld [ %g1 + 0xc ], %g3 ! 4002dc0c <_Thread_Executing> api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( _POSIX_signals_Is_interested( api, mask ) ) { 400270dc: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 400270e0: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 400270e4: 80 ae 00 01 andncc %i0, %g1, %g0 400270e8: 12 80 00 1a bne 40027150 400270ec: 03 10 00 b8 sethi %hi(0x4002e000), %g1 goto process_it; 400270f0: 98 10 63 d4 or %g1, 0x3d4, %o4 ! 4002e3d4 <_POSIX_signals_Wait_queue> */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400270f4: 96 03 20 30 add %o4, 0x30, %o3 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; 400270f8: c8 03 00 00 ld [ %o4 ], %g4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400270fc: 9a 03 20 04 add %o4, 4, %o5 !_Chain_Is_tail( the_chain, the_node ) ; 40027100: 80 a1 00 0d cmp %g4, %o5 40027104: 02 80 00 34 be 400271d4 40027108: 86 10 00 04 mov %g4, %g3 the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 4002710c: c2 01 20 30 ld [ %g4 + 0x30 ], %g1 40027110: 80 8e 00 01 btst %i0, %g1 40027114: 02 80 00 0b be 40027140 40027118: c4 01 21 70 ld [ %g4 + 0x170 ], %g2 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 4002711c: 10 80 00 0e b 40027154 40027120: 82 10 20 01 mov 1, %g1 index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 40027124: 80 a1 00 0d cmp %g4, %o5 <== NOT EXECUTED 40027128: 02 80 00 2b be 400271d4 <== NOT EXECUTED 4002712c: 86 10 00 04 mov %g4, %g3 <== NOT EXECUTED the_node = the_node->next ) { the_thread = (Thread_Control *)the_node; api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) { 40027130: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1 <== NOT EXECUTED 40027134: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED 40027138: 12 80 00 06 bne 40027150 <== NOT EXECUTED 4002713c: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 <== NOT EXECUTED 40027140: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1 <== NOT EXECUTED 40027144: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED 40027148: 22 bf ff f7 be,a 40027124 <== NOT EXECUTED 4002714c: c8 01 00 00 ld [ %g4 ], %g4 <== NOT EXECUTED * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40027150: 82 10 20 01 mov 1, %g1 /* * 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 ) ) { 40027154: 90 10 00 03 mov %g3, %o0 40027158: 92 10 00 19 mov %i1, %o1 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 4002715c: c2 20 e0 78 st %g1, [ %g3 + 0x78 ] /* * 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 ) ) { 40027160: 40 00 00 a8 call 40027400 <_POSIX_signals_Unblock_thread> 40027164: 94 07 bf ec add %fp, -20, %o2 40027168: 80 a2 20 00 cmp %o0, 0 4002716c: 12 80 00 09 bne 40027190 40027170: 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 ); 40027174: 40 00 00 93 call 400273c0 <_POSIX_signals_Set_process_signals> 40027178: 90 10 00 18 mov %i0, %o0 if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { 4002717c: b2 24 c0 12 sub %l3, %l2, %i1 40027180: c2 05 80 19 ld [ %l6 + %i1 ], %g1 40027184: 80 a0 60 02 cmp %g1, 2 40027188: 02 80 00 65 be 4002731c 4002718c: 11 10 00 b8 sethi %hi(0x4002e000), %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40027190: c2 06 a3 30 ld [ %i2 + 0x330 ], %g1 40027194: 82 00 7f ff add %g1, -1, %g1 40027198: c2 26 a3 30 st %g1, [ %i2 + 0x330 ] 4002719c: c4 06 a3 30 ld [ %i2 + 0x330 ], %g2 400271a0: 80 a0 a0 00 cmp %g2, 0 400271a4: 02 80 00 05 be 400271b8 400271a8: 01 00 00 00 nop _Thread_Dispatch(); 400271ac: 90 10 20 00 clr %o0 ! 0 _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); } _Thread_Enable_dispatch(); return 0; } 400271b0: 81 c7 e0 08 ret 400271b4: 91 e8 00 08 restore %g0, %o0, %o0 400271b8: 7f ff a9 0d call 400115ec <_Thread_Dispatch> 400271bc: 01 00 00 00 nop 400271c0: 90 10 20 00 clr %o0 ! 0 400271c4: 81 c7 e0 08 ret 400271c8: 91 e8 00 08 restore %g0, %o0, %o0 siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER; if ( !value ) { siginfo->si_value.sival_int = 0; 400271cc: 10 bf ff be b 400270c4 400271d0: c0 27 bf f4 clr [ %fp + -12 ] index++ ) { the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ]; for ( the_node = the_chain->first ; !_Chain_Is_tail( the_chain, the_node ) ; 400271d4: 98 03 20 0c add %o4, 0xc, %o4 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400271d8: 80 a3 00 0b cmp %o4, %o3 400271dc: 32 bf ff c8 bne,a 400270fc 400271e0: c8 03 00 00 ld [ %o4 ], %g4 400271e4: 03 10 00 b6 sethi %hi(0x4002d800), %g1 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 400271e8: 05 10 00 ad sethi %hi(0x4002b400), %g2 400271ec: ba 10 62 90 or %g1, 0x290, %i5 400271f0: b6 10 a0 80 or %g2, 0x80, %i3 */ /* XXX violation of visibility -- need to define thread queue support */ for( index=0 ; index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ; 400271f4: a8 10 21 00 mov 0x100, %l4 400271f8: ae 10 20 00 clr %l7 400271fc: aa 10 20 02 mov 2, %l5 * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 40027200: 39 04 00 00 sethi %hi(0x10000000), %i4 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 40027204: 83 2d 60 02 sll %l5, 2, %g1 40027208: c2 07 40 01 ld [ %i5 + %g1 ], %g1 4002720c: 80 a0 60 00 cmp %g1, 0 40027210: 22 80 00 35 be,a 400272e4 40027214: aa 05 60 01 inc %l5 continue; the_info = _Objects_Information_table[ the_api ][ 1 ]; 40027218: c2 00 60 04 ld [ %g1 + 4 ], %g1 if ( !the_info ) /* manager not installed */ 4002721c: 80 a0 60 00 cmp %g1, 0 40027220: 22 80 00 31 be,a 400272e4 40027224: aa 05 60 01 inc %l5 <== NOT EXECUTED continue; maximum = the_info->maximum; object_table = the_info->local_table; 40027228: e2 00 60 20 ld [ %g1 + 0x20 ], %l1 assert( object_table ); /* always at least 1 entry */ 4002722c: 80 a4 60 00 cmp %l1, 0 40027230: 02 80 00 57 be 4002738c 40027234: e0 10 60 10 lduh [ %g1 + 0x10 ], %l0 for ( index = 1 ; index <= maximum ; index++ ) { 40027238: 80 a4 20 00 cmp %l0, 0 4002723c: 22 80 00 2a be,a 400272e4 40027240: aa 05 60 01 inc %l5 40027244: 88 10 20 01 mov 1, %g4 the_thread = (Thread_Control *) object_table[ index ]; 40027248: 83 29 20 02 sll %g4, 2, %g1 4002724c: c4 00 40 11 ld [ %g1 + %l1 ], %g2 if ( !the_thread ) 40027250: 80 a0 a0 00 cmp %g2, 0 40027254: 22 80 00 20 be,a 400272d4 40027258: 88 01 20 01 inc %g4 /* * If this thread is of lower priority than the interested thread, * go on to the next thread. */ if ( the_thread->current_priority > interested_priority ) 4002725c: c6 00 a0 14 ld [ %g2 + 0x14 ], %g3 40027260: 80 a0 c0 14 cmp %g3, %l4 40027264: 38 80 00 1c bgu,a 400272d4 40027268: 88 01 20 01 inc %g4 <== NOT EXECUTED /* * If this thread is not interested, then go on to the next thread. */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4002726c: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 if ( !api || !_POSIX_signals_Is_interested( api, mask ) ) 40027270: 80 a0 60 00 cmp %g1, 0 40027274: 22 80 00 18 be,a 400272d4 40027278: 88 01 20 01 inc %g4 <== NOT EXECUTED 4002727c: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 40027280: 80 ae 00 01 andncc %i0, %g1, %g0 40027284: 22 80 00 14 be,a 400272d4 40027288: 88 01 20 01 inc %g4 * Now we know the thread under connsideration is interested. * If the thread under consideration is of higher priority, then * it becomes the interested thread. */ if ( the_thread->current_priority < interested_priority ) { 4002728c: 80 a0 c0 14 cmp %g3, %l4 40027290: 2a 80 00 1c bcs,a 40027300 40027294: ae 10 00 02 mov %g2, %l7 * Now the thread and the interested thread have the same priority. * If the interested thread is ready, then we don't need to send it * to a blocked thread. */ if ( _States_Is_ready( interested_thread->current_state ) ) 40027298: c2 05 e0 10 ld [ %l7 + 0x10 ], %g1 <== NOT EXECUTED 4002729c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400272a0: 22 80 00 0d be,a 400272d4 <== NOT EXECUTED 400272a4: 88 01 20 01 inc %g4 <== NOT EXECUTED * Now the interested thread is blocked. * If the thread we are considering is not, the it becomes the * interested thread. */ if ( _States_Is_ready( the_thread->current_state ) ) { 400272a8: da 00 a0 10 ld [ %g2 + 0x10 ], %o5 <== NOT EXECUTED 400272ac: 80 a3 60 00 cmp %o5, 0 <== NOT EXECUTED 400272b0: 22 80 00 14 be,a 40027300 <== NOT EXECUTED 400272b4: ae 10 00 02 mov %g2, %l7 <== NOT EXECUTED * Now we know both threads are blocked. * If the interested thread is interruptible, then just use it. */ /* XXX need a new states macro */ if ( interested_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) 400272b8: 80 88 40 1c btst %g1, %i4 <== NOT EXECUTED 400272bc: 32 80 00 06 bne,a 400272d4 <== NOT EXECUTED 400272c0: 88 01 20 01 inc %g4 <== NOT EXECUTED * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 400272c4: 80 8b 40 1c btst %o5, %i4 <== NOT EXECUTED 400272c8: 32 80 00 0e bne,a 40027300 <== NOT EXECUTED 400272cc: ae 10 00 02 mov %g2, %l7 <== NOT EXECUTED maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ for ( index = 1 ; index <= maximum ; index++ ) { 400272d0: 88 01 20 01 inc %g4 400272d4: 80 a4 00 04 cmp %l0, %g4 400272d8: 1a bf ff dd bcc 4002724c 400272dc: 83 29 20 02 sll %g4, 2, %g1 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 400272e0: aa 05 60 01 inc %l5 interested_thread = NULL; interested_priority = PRIORITY_MAXIMUM + 1; for ( the_api = 2; the_api <= OBJECTS_APIS_LAST; 400272e4: 80 a5 60 04 cmp %l5, 4 400272e8: 18 80 00 08 bgu 40027308 400272ec: 80 a5 60 01 cmp %l5, 1 the_api++ ) { if ( the_api == OBJECTS_INTERNAL_THREADS ) 400272f0: 22 bf ff c5 be,a 40027204 400272f4: aa 10 20 02 mov 2, %l5 <== NOT EXECUTED continue; if ( !_Objects_Information_table[ the_api ] ) /* API not installed */ 400272f8: 10 bf ff c4 b 40027208 400272fc: 83 2d 60 02 sll %l5, 2, %g1 * If the thread under consideration is interruptible by a signal, * then it becomes the interested thread. */ /* XXX need a new states macro */ if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { 40027300: 10 bf ff f4 b 400272d0 40027304: a8 10 00 03 mov %g3, %l4 interested_priority = the_thread->current_priority; } } } if ( interested_thread ) { 40027308: 80 a5 e0 00 cmp %l7, 0 4002730c: 02 bf ff 9a be 40027174 40027310: 86 10 00 17 mov %l7, %g3 * evaluate the signals pending. */ process_it: the_thread->do_post_task_switch_extension = TRUE; 40027314: 10 bf ff 90 b 40027154 40027318: 82 10 20 01 mov 1, %g1 _POSIX_signals_Set_process_signals( mask ); if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) 4002731c: 7f ff 9f 97 call 4000f178 <_Chain_Get> 40027320: 90 12 23 c8 or %o0, 0x3c8, %o0 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { 40027324: 80 a2 20 00 cmp %o0, 0 40027328: 02 80 00 20 be 400273a8 4002732c: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40027330: 92 10 00 08 mov %o0, %o1 _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); } psiginfo->Info = *siginfo; 40027334: c2 22 20 08 st %g1, [ %o0 + 8 ] 40027338: c4 07 bf f0 ld [ %fp + -16 ], %g2 4002733c: c4 22 20 0c st %g2, [ %o0 + 0xc ] 40027340: c2 07 bf f4 ld [ %fp + -12 ], %g1 40027344: c2 22 20 10 st %g1, [ %o0 + 0x10 ] _Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node ); 40027348: 11 10 00 b9 sethi %hi(0x4002e400), %o0 4002734c: 90 12 20 18 or %o0, 0x18, %o0 ! 4002e418 <_POSIX_signals_Siginfo> 40027350: 7f ff 9f 7e call 4000f148 <_Chain_Append> 40027354: 90 06 40 08 add %i1, %o0, %o0 40027358: 30 bf ff 8e b,a 40027190 /* * Only supported for the "calling process" (i.e. this node). */ if ( pid != getpid() ) rtems_set_errno_and_return_minus_one( ESRCH ); 4002735c: 7f ff d0 3c call 4001b44c <__errno> 40027360: 01 00 00 00 nop 40027364: 82 10 20 03 mov 3, %g1 ! 3 40027368: c2 22 00 00 st %g1, [ %o0 ] 4002736c: 10 bf ff 4d b 400270a0 40027370: 90 10 3f ff mov -1, %o0 if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 40027374: 7f ff d0 36 call 4001b44c <__errno> 40027378: 01 00 00 00 nop 4002737c: 82 10 20 16 mov 0x16, %g1 ! 16 40027380: c2 22 00 00 st %g1, [ %o0 ] 40027384: 10 bf ff 47 b 400270a0 40027388: 90 10 3f ff mov -1, %o0 continue; maximum = the_info->maximum; object_table = the_info->local_table; assert( object_table ); /* always at least 1 entry */ 4002738c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 40027390: 92 10 20 c1 mov 0xc1, %o1 <== NOT EXECUTED 40027394: 15 10 00 ad sethi %hi(0x4002b400), %o2 <== NOT EXECUTED 40027398: 7f ff 89 e7 call 40009b34 <__assert> <== NOT EXECUTED 4002739c: 94 12 a0 c8 or %o2, 0xc8, %o2 ! 4002b4c8 <_RTEMS_version+0x70> <== NOT EXECUTED for ( index = 1 ; index <= maximum ; index++ ) { 400273a0: 10 bf ff a7 b 4002723c <== NOT EXECUTED 400273a4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) { psiginfo = (POSIX_signals_Siginfo_node *) _Chain_Get( &_POSIX_signals_Inactive_siginfo ); if ( !psiginfo ) { rtems_set_errno_and_return_minus_one( EAGAIN ); 400273a8: 7f ff d0 29 call 4001b44c <__errno> <== NOT EXECUTED 400273ac: 01 00 00 00 nop <== NOT EXECUTED 400273b0: 82 10 20 0b mov 0xb, %g1 ! b <== NOT EXECUTED 400273b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400273b8: 10 bf ff 3a b 400270a0 <== NOT EXECUTED 400273bc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400194cc : extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { 400194cc: 9d e3 bf 98 save %sp, -104, %sp /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) 400194d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400194d4: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 400194d8: 80 a0 a0 03 cmp %g2, 3 400194dc: 12 80 00 15 bne 40019530 400194e0: 21 10 00 6c sethi %hi(0x4001b000), %l0 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != &libc_global_reent) { 400194e4: c4 04 23 80 ld [ %l0 + 0x380 ], %g2 ! 4001b380 <_impure_ptr> 400194e8: 03 10 00 6a sethi %hi(0x4001a800), %g1 400194ec: b0 10 63 30 or %g1, 0x330, %i0 ! 4001ab30 400194f0: 80 a0 80 18 cmp %g2, %i0 400194f4: 02 80 00 06 be 4001950c 400194f8: c2 04 23 80 ld [ %l0 + 0x380 ], %g1 _wrapup_reent(&libc_global_reent); 400194fc: 40 00 00 ab call 400197a8 <_wrapup_reent> 40019500: 90 10 00 18 mov %i0, %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 = &libc_global_reent; 40019504: f0 24 23 80 st %i0, [ %l0 + 0x380 ] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); 40019508: c2 04 23 80 ld [ %l0 + 0x380 ], %g1 4001950c: 7f ff da ef call 400100c8 40019510: d0 00 60 04 ld [ %g1 + 4 ], %o0 fclose (stdout); 40019514: c2 04 23 80 ld [ %l0 + 0x380 ], %g1 40019518: 7f ff da ec call 400100c8 4001951c: d0 00 60 08 ld [ %g1 + 8 ], %o0 fclose (stderr); 40019520: c2 04 23 80 ld [ %l0 + 0x380 ], %g1 40019524: f0 00 60 0c ld [ %g1 + 0xc ], %i0 40019528: 7f ff da e8 call 400100c8 4001952c: 81 e8 00 00 restore 40019530: 81 c7 e0 08 ret <== NOT EXECUTED 40019534: 81 e8 00 00 restore <== NOT EXECUTED 40004da8 : int link( const char *existing, const char *new ) { 40004da8: 9d e3 bf 70 save %sp, -144, %sp /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, TRUE ); 40004dac: 92 10 20 00 clr %o1 40004db0: 90 10 00 18 mov %i0, %o0 40004db4: a0 07 bf e4 add %fp, -28, %l0 40004db8: 96 10 20 01 mov 1, %o3 40004dbc: 94 10 00 10 mov %l0, %o2 40004dc0: 7f ff fe 88 call 400047e0 40004dc4: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 40004dc8: 80 a2 20 00 cmp %o0, 0 40004dcc: 12 80 00 84 bne 40004fdc 40004dd0: 01 00 00 00 nop /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40004dd4: c2 4e 40 00 ldsb [ %i1 ], %g1 40004dd8: 80 a0 60 2f cmp %g1, 0x2f 40004ddc: 02 80 00 06 be 40004df4 40004de0: 80 a0 60 5c cmp %g1, 0x5c 40004de4: 02 80 00 04 be 40004df4 40004de8: 80 a0 60 00 cmp %g1, 0 40004dec: 12 80 00 3a bne 40004ed4 40004df0: 03 10 00 6d sethi %hi(0x4001b400), %g1 40004df4: 03 10 00 6d sethi %hi(0x4001b400), %g1 40004df8: c6 00 61 58 ld [ %g1 + 0x158 ], %g3 ! 4001b558 40004dfc: 88 10 20 01 mov 1, %g4 40004e00: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40004e04: c2 27 bf d4 st %g1, [ %fp + -44 ] 40004e08: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40004e0c: c4 27 bf d8 st %g2, [ %fp + -40 ] 40004e10: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40004e14: c2 27 bf dc st %g1, [ %fp + -36 ] 40004e18: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40004e1c: c4 27 bf e0 st %g2, [ %fp + -32 ] if ( !parent_loc.ops->evalformake_h ) { 40004e20: c2 07 bf dc ld [ %fp + -36 ], %g1 40004e24: c2 00 60 04 ld [ %g1 + 4 ], %g1 40004e28: 80 a0 60 00 cmp %g1, 0 40004e2c: 02 80 00 5e be 40004fa4 40004e30: 90 06 40 04 add %i1, %g4, %o0 rtems_filesystem_freenode( &existing_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 40004e34: a2 07 bf d4 add %fp, -44, %l1 40004e38: 94 07 bf f4 add %fp, -12, %o2 40004e3c: 9f c0 40 00 call %g1 40004e40: 92 10 00 11 mov %l1, %o1 if ( result != 0 ) { 40004e44: b2 92 20 00 orcc %o0, 0, %i1 40004e48: 12 80 00 48 bne 40004f68 40004e4c: c4 07 bf e0 ld [ %fp + -32 ], %g2 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 40004e50: c2 07 bf f0 ld [ %fp + -16 ], %g1 40004e54: 80 a0 80 01 cmp %g2, %g1 40004e58: 12 80 00 2a bne 40004f00 40004e5c: c4 07 bf dc ld [ %fp + -36 ], %g2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { 40004e60: c2 00 a0 08 ld [ %g2 + 8 ], %g1 40004e64: 80 a0 60 00 cmp %g1, 0 40004e68: 02 80 00 5f be 40004fe4 40004e6c: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 40004e70: 90 10 00 10 mov %l0, %o0 40004e74: 9f c0 40 00 call %g1 40004e78: 92 10 00 11 mov %l1, %o1 rtems_filesystem_freenode( &existing_loc ); 40004e7c: c2 07 bf ec ld [ %fp + -20 ], %g1 40004e80: 80 a0 60 00 cmp %g1, 0 40004e84: 02 80 00 08 be 40004ea4 40004e88: b0 10 00 08 mov %o0, %i0 40004e8c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004e90: 80 a0 60 00 cmp %g1, 0 40004e94: 22 80 00 05 be,a 40004ea8 40004e98: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40004e9c: 9f c0 40 00 call %g1 40004ea0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40004ea4: c2 07 bf dc ld [ %fp + -36 ], %g1 40004ea8: 80 a0 60 00 cmp %g1, 0 40004eac: 02 80 00 4c be 40004fdc 40004eb0: 01 00 00 00 nop 40004eb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004eb8: 80 a0 60 00 cmp %g1, 0 40004ebc: 02 80 00 48 be 40004fdc 40004ec0: 01 00 00 00 nop 40004ec4: 9f c0 40 00 call %g1 40004ec8: 90 10 00 11 mov %l1, %o0 return result; } 40004ecc: 81 c7 e0 08 ret 40004ed0: 81 e8 00 00 restore /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 40004ed4: c6 00 61 58 ld [ %g1 + 0x158 ], %g3 40004ed8: 88 10 20 00 clr %g4 40004edc: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40004ee0: c2 27 bf d4 st %g1, [ %fp + -44 ] 40004ee4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 40004ee8: c4 27 bf d8 st %g2, [ %fp + -40 ] 40004eec: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40004ef0: c2 27 bf dc st %g1, [ %fp + -36 ] 40004ef4: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 40004ef8: 10 bf ff ca b 40004e20 40004efc: c4 27 bf e0 st %g2, [ %fp + -32 ] * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { rtems_filesystem_freenode( &existing_loc ); 40004f00: c2 07 bf ec ld [ %fp + -20 ], %g1 40004f04: 80 a0 60 00 cmp %g1, 0 40004f08: 22 80 00 09 be,a 40004f2c 40004f0c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40004f10: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004f14: 80 a0 60 00 cmp %g1, 0 40004f18: 22 80 00 05 be,a 40004f2c 40004f1c: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED 40004f20: 9f c0 40 00 call %g1 40004f24: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &parent_loc ); 40004f28: c2 07 bf dc ld [ %fp + -36 ], %g1 40004f2c: 80 a0 60 00 cmp %g1, 0 40004f30: 02 80 00 08 be 40004f50 40004f34: 01 00 00 00 nop 40004f38: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004f3c: 80 a0 60 00 cmp %g1, 0 40004f40: 02 80 00 04 be 40004f50 40004f44: 01 00 00 00 nop 40004f48: 9f c0 40 00 call %g1 40004f4c: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EXDEV ); 40004f50: 40 00 38 77 call 4001312c <__errno> 40004f54: b0 10 3f ff mov -1, %i0 40004f58: 82 10 20 12 mov 0x12, %g1 40004f5c: c2 22 00 00 st %g1, [ %o0 ] 40004f60: 81 c7 e0 08 ret 40004f64: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); if ( result != 0 ) { rtems_filesystem_freenode( &existing_loc ); 40004f68: c2 07 bf ec ld [ %fp + -20 ], %g1 40004f6c: 80 a0 60 00 cmp %g1, 0 40004f70: 02 80 00 08 be 40004f90 40004f74: 01 00 00 00 nop 40004f78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40004f7c: 80 a0 60 00 cmp %g1, 0 40004f80: 02 80 00 04 be 40004f90 40004f84: 01 00 00 00 nop 40004f88: 9f c0 40 00 call %g1 40004f8c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( result ); 40004f90: 40 00 38 67 call 4001312c <__errno> 40004f94: b0 10 3f ff mov -1, %i0 40004f98: f2 22 00 00 st %i1, [ %o0 ] 40004f9c: 81 c7 e0 08 ret 40004fa0: 81 e8 00 00 restore */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); if ( !parent_loc.ops->evalformake_h ) { rtems_filesystem_freenode( &existing_loc ); 40004fa4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40004fa8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004fac: 02 80 00 08 be 40004fcc <== NOT EXECUTED 40004fb0: 01 00 00 00 nop <== NOT EXECUTED 40004fb4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40004fb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004fbc: 02 80 00 04 be 40004fcc <== NOT EXECUTED 40004fc0: 01 00 00 00 nop <== NOT EXECUTED 40004fc4: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004fc8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 40004fcc: 40 00 38 58 call 4001312c <__errno> <== NOT EXECUTED 40004fd0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40004fd4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40004fd8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40004fdc: 81 c7 e0 08 ret 40004fe0: 81 e8 00 00 restore rtems_filesystem_freenode( &parent_loc ); rtems_set_errno_and_return_minus_one( EXDEV ); } if ( !parent_loc.ops->link_h ) { rtems_filesystem_freenode( &existing_loc ); 40004fe4: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 40004fe8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004fec: 02 80 00 0a be 40005014 <== NOT EXECUTED 40004ff0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004ff4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40004ff8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004ffc: 02 80 00 06 be 40005014 <== NOT EXECUTED 40005000: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005004: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005008: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000500c: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 40005010: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005014: 02 bf ff ee be 40004fcc <== NOT EXECUTED 40005018: 01 00 00 00 nop <== NOT EXECUTED 4000501c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40005020: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005024: 02 bf ff ea be 40004fcc <== NOT EXECUTED 40005028: 01 00 00 00 nop <== NOT EXECUTED 4000502c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005030: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40005034: 30 bf ff e6 b,a 40004fcc <== NOT EXECUTED 400193a8 : off_t lseek( int fd, off_t offset, int whence ) { 400193a8: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 400193ac: 03 10 00 6a sethi %hi(0x4001a800), %g1 400193b0: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 4001aa2c off_t lseek( int fd, off_t offset, int whence ) { 400193b4: 92 10 00 19 mov %i1, %o1 rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 400193b8: 80 a6 00 02 cmp %i0, %g2 400193bc: 1a 80 00 31 bcc 40019480 400193c0: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400193c4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400193c8: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 ! 4001bc18 400193cc: 85 2e 20 02 sll %i0, 2, %g2 400193d0: 83 2e 20 04 sll %i0, 4, %g1 400193d4: 82 20 40 02 sub %g1, %g2, %g1 400193d8: 82 00 40 18 add %g1, %i0, %g1 400193dc: 83 28 60 02 sll %g1, 2, %g1 400193e0: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 400193e4: c4 06 20 0c ld [ %i0 + 0xc ], %g2 400193e8: 80 88 a1 00 btst 0x100, %g2 400193ec: 02 80 00 25 be 40019480 400193f0: 01 00 00 00 nop /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 400193f4: c4 06 20 30 ld [ %i0 + 0x30 ], %g2 400193f8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 400193fc: 80 a0 60 00 cmp %g1, 0 40019400: 02 80 00 26 be 40019498 40019404: 80 a6 a0 01 cmp %i2, 1 /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 40019408: 02 80 00 14 be 40019458 4001940c: f4 06 20 08 ld [ %i0 + 8 ], %i2 40019410: 80 a2 a0 02 cmp %o2, 2 40019414: 02 80 00 0d be 40019448 40019418: 80 a2 a0 00 cmp %o2, 0 4001941c: 12 80 00 12 bne 40019464 40019420: 01 00 00 00 nop case SEEK_SET: iop->offset = offset; 40019424: f2 26 20 08 st %i1, [ %i0 + 8 ] /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 40019428: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 4001942c: 9f c0 40 00 call %g1 40019430: 90 10 00 18 mov %i0, %o0 if ( status == (off_t) -1 ) 40019434: 80 a2 3f ff cmp %o0, -1 40019438: 22 80 00 02 be,a 40019440 4001943c: f4 26 20 08 st %i2, [ %i0 + 8 ] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019440: 81 c7 e0 08 ret 40019444: 91 e8 00 08 restore %g0, %o0, %o0 case SEEK_CUR: iop->offset += offset; break; case SEEK_END: iop->offset = iop->size + offset; 40019448: c2 06 20 04 ld [ %i0 + 4 ], %g1 4001944c: 82 06 40 01 add %i1, %g1, %g1 40019450: 10 bf ff f6 b 40019428 40019454: c2 26 20 08 st %g1, [ %i0 + 8 ] case SEEK_SET: iop->offset = offset; break; case SEEK_CUR: iop->offset += offset; 40019458: 82 06 40 1a add %i1, %i2, %g1 4001945c: 10 bf ff f3 b 40019428 40019460: c2 26 20 08 st %g1, [ %i0 + 8 ] case SEEK_END: iop->offset = iop->size + offset; break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40019464: 7f ff da c3 call 4000ff70 <__errno> 40019468: 01 00 00 00 nop 4001946c: 82 10 20 16 mov 0x16, %g1 ! 16 40019470: c2 22 00 00 st %g1, [ %o0 ] 40019474: 90 10 3f ff mov -1, %o0 /* * So if the operation failed, we have to restore iop->offset. */ return status; } 40019478: 81 c7 e0 08 ret 4001947c: 91 e8 00 08 restore %g0, %o0, %o0 off_t old_offset; off_t status; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40019480: 7f ff da bc call 4000ff70 <__errno> <== NOT EXECUTED 40019484: 01 00 00 00 nop <== NOT EXECUTED 40019488: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001948c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019490: 10 bf ff ec b 40019440 <== NOT EXECUTED 40019494: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019498: 7f ff da b6 call 4000ff70 <__errno> <== NOT EXECUTED 4001949c: 01 00 00 00 nop <== NOT EXECUTED 400194a0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 400194a4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400194a8: 10 bf ff e6 b 40019440 <== NOT EXECUTED 400194ac: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400034c4 : #ifdef RTEMS_NEWLIB void *malloc( size_t size ) { 400034c4: 9d e3 bf 98 save %sp, -104, %sp uint32_t sbrk_amount; Chain_Node *to_be_freed; MSBUMP(malloc_calls, 1); if ( !size ) 400034c8: a2 96 20 00 orcc %i0, 0, %l1 400034cc: 02 80 00 1c be 4000353c 400034d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 400034d4: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 400034d8: 80 a0 a0 03 cmp %g2, 3 400034dc: 02 80 00 13 be 40003528 400034e0: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400034e4: 10 80 00 04 b 400034f4 400034e8: a0 12 20 80 or %o0, 0x80, %l0 ! 4001bc80 /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) free(to_be_freed); 400034ec: 7f ff ff cd call 40003420 400034f0: 01 00 00 00 nop } /* * If some free's have been deferred, then do them now. */ while ((to_be_freed = Chain_Get(&RTEMS_Malloc_GC_list)) != NULL) 400034f4: 40 00 12 8c call 40007f24 <_Chain_Get> 400034f8: 90 10 00 10 mov %l0, %o0 400034fc: 80 a2 20 00 cmp %o0, 0 40003500: 12 bf ff fb bne 400034ec 40003504: 92 10 00 11 mov %l1, %o1 */ #ifdef MALLOC_ARENA_CHECK size += sizeof(struct mallocNode) + SENTINELSIZE; #endif return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 40003508: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000350c: 40 00 17 72 call 400092d4 <_Protected_heap_Allocate> 40003510: 90 14 20 24 or %l0, 0x24, %o0 ! 4001bc24 if ( !return_this ) { 40003514: b0 92 20 00 orcc %o0, 0, %i0 40003518: 02 80 00 11 be 4000355c 4000351c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 mallocNodeHead.forw = mp; rtems_interrupt_enable(key); } #endif return return_this; } 40003520: 81 c7 e0 08 ret 40003524: 81 e8 00 00 restore /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 40003528: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000352c: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40003530: 80 a0 a0 00 cmp %g2, 0 40003534: 02 80 00 04 be 40003544 40003538: 03 10 00 6f sethi %hi(0x4001bc00), %g1 mallocNodeHead.forw = mp; rtems_interrupt_enable(key); } #endif return return_this; } 4000353c: 81 c7 e0 08 ret 40003540: 91 e8 20 00 restore %g0, 0, %o0 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 40003544: c4 00 62 a4 ld [ %g1 + 0x2a4 ], %g2 40003548: 80 a0 a0 00 cmp %g2, 0 4000354c: 02 bf ff ea be 400034f4 40003550: a0 12 20 80 or %o0, 0x80, %l0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); if ( !return_this ) { errno = ENOMEM; return (void *) 0; 40003554: 81 c7 e0 08 ret <== NOT EXECUTED 40003558: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; 4000355c: e4 00 60 7c ld [ %g1 + 0x7c ], %l2 <== NOT EXECUTED if ( sbrk_amount == 0 ) 40003560: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40003564: 02 bf ff ef be 40003520 <== NOT EXECUTED 40003568: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); 4000356c: 40 00 4e aa call 40017014 <.udiv> <== NOT EXECUTED 40003570: 90 04 40 12 add %l1, %l2, %o0 <== NOT EXECUTED 40003574: 40 00 4e 6e call 40016f2c <.umul> <== NOT EXECUTED 40003578: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED if ((starting_address = (void *)sbrk(the_size)) 4000357c: 7f ff f9 dd call 40001cf0 <== NOT EXECUTED 40003580: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40003584: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 40003588: 02 bf ff e6 be 40003520 <== NOT EXECUTED 4000358c: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED == (void*) -1) return (void *) 0; if ( !_Protected_heap_Extend( 40003590: 94 10 00 12 mov %l2, %o2 <== NOT EXECUTED 40003594: 40 00 17 eb call 40009540 <_Protected_heap_Extend> <== NOT EXECUTED 40003598: 90 14 20 24 or %l0, 0x24, %o0 <== NOT EXECUTED 4000359c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400035a0: 02 80 00 0d be 400035d4 <== NOT EXECUTED 400035a4: 90 14 20 24 or %l0, 0x24, %o0 <== NOT EXECUTED return (void *) 0; } MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size ); 400035a8: 40 00 17 4b call 400092d4 <_Protected_heap_Allocate> <== NOT EXECUTED 400035ac: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED if ( !return_this ) { 400035b0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400035b4: 12 80 00 0e bne 400035ec <== NOT EXECUTED 400035b8: 01 00 00 00 nop <== NOT EXECUTED errno = ENOMEM; 400035bc: 40 00 32 6d call 4000ff70 <__errno> <== NOT EXECUTED 400035c0: 01 00 00 00 nop <== NOT EXECUTED 400035c4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400035c8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400035cc: 81 c7 e0 08 ret <== NOT EXECUTED 400035d0: 81 e8 00 00 restore <== NOT EXECUTED == (void*) -1) return (void *) 0; if ( !_Protected_heap_Extend( &RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); 400035d4: 7f ff f9 c7 call 40001cf0 <== NOT EXECUTED 400035d8: 90 20 00 12 neg %l2, %o0 <== NOT EXECUTED errno = ENOMEM; 400035dc: 40 00 32 65 call 4000ff70 <__errno> <== NOT EXECUTED 400035e0: 01 00 00 00 nop <== NOT EXECUTED 400035e4: 82 10 20 0c mov 0xc, %g1 ! c <== NOT EXECUTED 400035e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400035ec: 81 c7 e0 08 ret <== NOT EXECUTED 400035f0: 81 e8 00 00 restore <== NOT EXECUTED 4000661c : /* * Find amount of free heap remaining */ size_t malloc_free_space( void ) { 4000661c: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED Heap_Information info; _Protected_heap_Get_free_information( &RTEMS_Malloc_Heap, &info ); 40006620: 11 10 00 fe sethi %hi(0x4003f800), %o0 <== NOT EXECUTED 40006624: 92 07 bf ec add %fp, -20, %o1 <== NOT EXECUTED 40006628: 40 00 1b 91 call 4000d46c <_Protected_heap_Get_free_information> <== NOT EXECUTED 4000662c: 90 12 22 80 or %o0, 0x280, %o0 <== NOT EXECUTED return (size_t) info.largest; } 40006630: f0 07 bf f0 ld [ %fp + -16 ], %i0 <== NOT EXECUTED 40006634: 81 c7 e0 08 ret <== NOT EXECUTED 40006638: 81 e8 00 00 restore <== NOT EXECUTED 4001d598 : return memfile_check_rmnod( the_jnode ); } int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){ 4001d598: 9d e3 bf 98 save %sp, -104, %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) ) { 4001d59c: 7f ff a3 7c call 4000638c 4001d5a0: 90 10 00 18 mov %i0, %o0 4001d5a4: 80 a2 20 00 cmp %o0, 0 4001d5a8: 12 80 00 13 bne 4001d5f4 4001d5ac: 01 00 00 00 nop 4001d5b0: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 4001d5b4: 80 a0 60 00 cmp %g1, 0 4001d5b8: 12 80 00 0f bne 4001d5f4 4001d5bc: 03 10 00 f5 sethi %hi(0x4003d400), %g1 /* * Is the rtems_filesystem_current is this node? */ if ( rtems_filesystem_current.node_access == the_jnode ) 4001d5c0: c2 00 63 f0 ld [ %g1 + 0x3f0 ], %g1 ! 4003d7f0 4001d5c4: c4 00 60 04 ld [ %g1 + 4 ], %g2 4001d5c8: 80 a0 80 18 cmp %g2, %i0 4001d5cc: 22 80 00 02 be,a 4001d5d4 4001d5d0: 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) 4001d5d4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 4001d5d8: 80 a0 60 06 cmp %g1, 6 4001d5dc: 02 80 00 04 be 4001d5ec 4001d5e0: 01 00 00 00 nop IMFS_memfile_remove( the_jnode ); 4001d5e4: 7f ff ff 6c call 4001d394 4001d5e8: 90 10 00 18 mov %i0, %o0 free( the_jnode ); 4001d5ec: 7f ff a4 18 call 4000664c 4001d5f0: 90 10 00 18 mov %i0, %o0 } return 0; } 4001d5f4: 81 c7 e0 08 ret 4001d5f8: 91 e8 20 00 restore %g0, 0, %o0 4001d318 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 4001d318: 9d e3 bf 98 save %sp, -104, %sp /* * Perform internal consistency checks */ assert( block_table ); 4001d31c: 80 a6 20 00 cmp %i0, 0 4001d320: 02 80 00 16 be 4001d378 4001d324: 80 a6 60 00 cmp %i1, 0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4001d32c: e0 06 00 00 ld [ %i0 ], %l0 4001d330: a2 10 20 00 clr %l1 4001d334: b4 10 20 00 clr %i2 if ( b[i] ) { 4001d338: d0 06 80 10 ld [ %i2 + %l0 ], %o0 4001d33c: 80 a2 20 00 cmp %o0, 0 4001d340: 02 80 00 05 be 4001d354 4001d344: a2 04 60 01 inc %l1 memfile_free_block( b[i] ); 4001d348: 7f ff ff 1e call 4001cfc0 4001d34c: 01 00 00 00 nop b[i] = 0; 4001d350: c0 26 80 10 clr [ %i2 + %l0 ] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 4001d35c: b4 06 a0 04 add %i2, 4, %i2 4001d360: e0 06 00 00 ld [ %i0 ], %l0 /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 4001d364: 7f ff ff 17 call 4001cfc0 4001d368: 90 10 00 10 mov %l0, %o0 *block_table = 0; 4001d36c: c0 26 00 00 clr [ %i0 ] } 4001d370: 81 c7 e0 08 ret 4001d374: 81 e8 00 00 restore /* * Perform internal consistency checks */ assert( block_table ); 4001d378: 31 10 00 e9 sethi %hi(0x4003a400), %i0 <== NOT EXECUTED 4001d37c: 35 10 00 e9 sethi %hi(0x4003a400), %i2 <== NOT EXECUTED 4001d380: b0 16 23 40 or %i0, 0x340, %i0 <== NOT EXECUTED 4001d384: b4 16 a3 c8 or %i2, 0x3c8, %i2 <== NOT EXECUTED 4001d388: 7f ff a2 c7 call 40005ea4 <__assert> <== NOT EXECUTED 4001d38c: 93 e8 21 b1 restore %g0, 0x1b1, %o1 <== NOT EXECUTED 4001d390: 01 00 00 00 nop 4001d8d4 : int memfile_ftruncate( rtems_libio_t *iop, off_t length ) { 4001d8d4: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001d8d8: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 * 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 ) 4001d8dc: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001d8e0: 80 a0 40 19 cmp %g1, %i1 4001d8e4: 16 80 00 06 bge 4001d8fc 4001d8e8: 92 10 00 19 mov %i1, %o1 return IMFS_memfile_extend( the_jnode, length ); 4001d8ec: 7f ff ff 97 call 4001d748 <== NOT EXECUTED 4001d8f0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); return 0; } 4001d8f4: 81 c7 e0 08 ret <== NOT EXECUTED 4001d8f8: 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; 4001d8fc: f2 24 20 4c st %i1, [ %l0 + 0x4c ] iop->size = the_jnode->info.file.size; 4001d900: f2 26 20 04 st %i1, [ %i0 + 4 ] IMFS_update_atime( the_jnode ); 4001d904: 90 07 bf f0 add %fp, -16, %o0 4001d908: 7f ff a2 31 call 400061cc 4001d90c: 92 10 20 00 clr %o1 4001d910: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001d914: 90 10 20 00 clr %o0 4001d918: c2 24 20 3c st %g1, [ %l0 + 0x3c ] return 0; } 4001d91c: 81 c7 e0 08 ret 4001d920: 91 e8 00 08 restore %g0, %o0, %o0 4001d924 : off_t memfile_lseek( rtems_libio_t *iop, off_t offset, int whence ) { 4001d924: 9d e3 bf 98 save %sp, -104, %sp IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 4001d928: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 if (the_jnode->type == IMFS_LINEAR_FILE) { 4001d92c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001d930: 80 a0 60 06 cmp %g1, 6 4001d934: 02 80 00 0d be 4001d968 4001d938: a2 10 00 18 mov %i0, %l1 if (iop->offset > the_jnode->info.linearfile.size) iop->offset = the_jnode->info.linearfile.size; } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 4001d93c: d2 06 20 08 ld [ %i0 + 8 ], %o1 4001d940: 7f ff ff 82 call 4001d748 4001d944: 90 10 00 10 mov %l0, %o0 4001d948: 80 a2 20 00 cmp %o0, 0 4001d94c: 12 80 00 0f bne 4001d988 4001d950: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOSPC ); iop->size = the_jnode->info.file.size; 4001d954: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001d958: f0 06 20 08 ld [ %i0 + 8 ], %i0 4001d95c: c2 24 60 04 st %g1, [ %l1 + 4 ] } return iop->offset; } 4001d960: 81 c7 e0 08 ret 4001d964: 81 e8 00 00 restore IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { if (iop->offset > the_jnode->info.linearfile.size) 4001d968: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED 4001d96c: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4001d970: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED 4001d974: 04 80 00 09 ble 4001d998 <== NOT EXECUTED 4001d978: 01 00 00 00 nop <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; 4001d97c: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED 4001d980: 81 c7 e0 08 ret <== NOT EXECUTED 4001d984: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) rtems_set_errno_and_return_minus_one( ENOSPC ); 4001d988: 40 00 27 3d call 4002767c <__errno> <== NOT EXECUTED 4001d98c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001d990: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED 4001d994: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001d998: 81 c7 e0 08 ret <== NOT EXECUTED 4001d99c: 81 e8 00 00 restore <== NOT EXECUTED 4001dc90 : rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001dc90: 9d e3 bf 98 save %sp, -104, %sp the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 4001dc94: c4 06 20 0c ld [ %i0 + 0xc ], %g2 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 4001dc98: 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)) 4001dc9c: 80 88 a2 04 btst 0x204, %g2 4001dca0: 02 80 00 06 be 4001dcb8 4001dca4: e0 06 20 2c ld [ %i0 + 0x2c ], %l0 4001dca8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1 4001dcac: 80 a0 60 06 cmp %g1, 6 4001dcb0: 22 80 00 0b be,a 4001dcdc 4001dcb4: d6 04 20 4c ld [ %l0 + 0x4c ], %o3 <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; if ((count != 0) && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4001dcb8: 80 88 a2 00 btst 0x200, %g2 4001dcbc: 02 80 00 04 be 4001dccc 4001dcc0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 iop->offset = the_jnode->info.file.size; 4001dcc4: c2 24 60 08 st %g1, [ %l1 + 8 ] iop->size = the_jnode->info.file.size; 4001dcc8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 4001dccc: b0 10 20 00 clr %i0 4001dcd0: c2 24 60 04 st %g1, [ %l1 + 4 ] return 0; } 4001dcd4: 81 c7 e0 08 ret 4001dcd8: 81 e8 00 00 restore * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; 4001dcdc: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; 4001dce0: 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; 4001dce4: c0 24 20 54 clr [ %l0 + 0x54 ] <== 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; 4001dce8: c0 24 20 4c clr [ %l0 + 0x4c ] <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; 4001dcec: c0 24 20 58 clr [ %l0 + 0x58 ] <== 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; 4001dcf0: c0 24 20 50 clr [ %l0 + 0x50 ] <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) 4001dcf4: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED 4001dcf8: 12 80 00 08 bne 4001dd18 <== NOT EXECUTED 4001dcfc: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED 4001dd00: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 4001dd04: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED 4001dd08: 02 bf ff f1 be 4001dccc <== NOT EXECUTED 4001dd0c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED iop->offset = the_jnode->info.file.size; 4001dd10: 10 bf ff ee b 4001dcc8 <== NOT EXECUTED 4001dd14: c2 24 60 08 st %g1, [ %l1 + 8 ] <== 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) 4001dd18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001dd1c: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001dd20: 7f ff ff 20 call 4001d9a0 <== NOT EXECUTED 4001dd24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001dd28: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4001dd2c: 02 bf ff ea be 4001dcd4 <== NOT EXECUTED 4001dd30: 01 00 00 00 nop <== NOT EXECUTED 4001dd34: 10 bf ff f4 b 4001dd04 <== NOT EXECUTED 4001dd38: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED 4001e050 : ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001e050: 82 10 00 09 mov %o1, %g1 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 4001e054: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001e058: d0 02 20 2c ld [ %o0 + 0x2c ], %o0 ssize_t memfile_read( rtems_libio_t *iop, void *buffer, size_t count ) { 4001e05c: 96 10 00 0a mov %o2, %o3 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; return IMFS_memfile_read( the_jnode, iop->offset, buffer, count ); 4001e060: 94 10 00 01 mov %g1, %o2 4001e064: 82 13 c0 00 mov %o7, %g1 4001e068: 7f ff ff 35 call 4001dd3c 4001e06c: 9e 10 40 00 mov %g1, %o7 4001e070: 01 00 00 00 nop <== NOT EXECUTED 4001d5fc : */ int memfile_rmnod( rtems_filesystem_location_info_t *pathloc /* IN */ ) { 4001d5fc: 9d e3 bf 90 save %sp, -112, %sp IMFS_jnode_t *the_jnode; the_jnode = (IMFS_jnode_t *) pathloc->node_access; 4001d600: f0 06 00 00 ld [ %i0 ], %i0 /* * Take the node out of the parent's chain that contains this node */ if ( the_jnode->Parent != NULL ) { 4001d604: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001d608: 80 a0 60 00 cmp %g1, 0 4001d60c: 22 80 00 06 be,a 4001d624 4001d610: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED Chain_Extract( (Chain_Node *) the_jnode ); 4001d614: 7f ff fb 5f call 4001c390 <_Chain_Extract> 4001d618: 90 10 00 18 mov %i0, %o0 the_jnode->Parent = NULL; 4001d61c: c0 26 20 08 clr [ %i0 + 8 ] /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001d620: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 IMFS_update_ctime( the_jnode ); 4001d624: 92 10 20 00 clr %o1 /* * Decrement the link counter and see if we can free the space. */ the_jnode->st_nlink--; 4001d628: 82 00 7f ff add %g1, -1, %g1 IMFS_update_ctime( the_jnode ); 4001d62c: 90 07 bf f0 add %fp, -16, %o0 4001d630: 7f ff a2 e7 call 400061cc 4001d634: c2 36 20 30 sth %g1, [ %i0 + 0x30 ] 4001d638: c2 07 bf f0 ld [ %fp + -16 ], %g1 return memfile_check_rmnod( the_jnode ); 4001d63c: 90 10 00 18 mov %i0, %o0 4001d640: 7f ff ff d6 call 4001d598 4001d644: c2 26 20 44 st %g1, [ %i0 + 0x44 ] } 4001d648: 81 c7 e0 08 ret 4001d64c: 91 e8 00 08 restore %g0, %o0, %o0 4000c184 : int miniIMFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { return IMFS_initialize_support( 4000c184: 13 10 00 6b sethi %hi(0x4001ac00), %o1 4000c188: 15 10 00 6e sethi %hi(0x4001b800), %o2 4000c18c: 92 12 63 8c or %o1, 0x38c, %o1 4000c190: 94 12 a3 c8 or %o2, 0x3c8, %o2 4000c194: 96 10 00 0a mov %o2, %o3 4000c198: 82 13 c0 00 mov %o7, %g1 4000c19c: 40 00 02 ac call 4000cc4c 4000c1a0: 9e 10 40 00 mov %g1, %o7 4000c1a4: 01 00 00 00 nop <== NOT EXECUTED 40003858 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 40003858: 9d e3 bf 80 save %sp, -128, %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) ) ) 4000385c: 03 00 00 3c sethi %hi(0xf000), %g1 40003860: b3 2e 60 10 sll %i1, 0x10, %i1 40003864: b3 36 60 10 srl %i1, 0x10, %i1 40003868: 84 8e 40 01 andcc %i1, %g1, %g2 4000386c: 02 80 00 4e be 400039a4 40003870: 03 00 00 04 sethi %hi(0x1000), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) 40003874: 80 a0 80 01 cmp %g2, %g1 40003878: 02 80 00 18 be 400038d8 4000387c: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003880: c2 4e 00 00 ldsb [ %i0 ], %g1 40003884: 80 a0 60 2f cmp %g1, 0x2f 40003888: 02 80 00 1a be 400038f0 4000388c: 80 a0 60 5c cmp %g1, 0x5c 40003890: 02 80 00 18 be 400038f0 40003894: 80 a0 60 00 cmp %g1, 0 40003898: 02 80 00 17 be 400038f4 4000389c: 03 10 00 6c sethi %hi(0x4001b000), %g1 400038a0: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 400038a4: 88 10 20 00 clr %g4 400038a8: c2 00 e0 04 ld [ %g3 + 4 ], %g1 400038ac: c2 27 bf e4 st %g1, [ %fp + -28 ] 400038b0: c4 00 e0 08 ld [ %g3 + 8 ], %g2 400038b4: c4 27 bf e8 st %g2, [ %fp + -24 ] 400038b8: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 400038bc: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 400038c0: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400038c4: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 400038c8: c2 00 60 04 ld [ %g1 + 4 ], %g1 400038cc: 80 a0 60 00 cmp %g1, 0 400038d0: 12 80 00 17 bne 4000392c 400038d4: c4 27 bf f0 st %g2, [ %fp + -16 ] if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); 400038d8: 40 00 31 a6 call 4000ff70 <__errno> 400038dc: b0 10 3f ff mov -1, %i0 400038e0: 82 10 20 86 mov 0x86, %g1 400038e4: c2 22 00 00 st %g1, [ %o0 ] 400038e8: 81 c7 e0 08 ret 400038ec: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 400038f0: 03 10 00 6c sethi %hi(0x4001b000), %g1 400038f4: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 400038f8: 88 10 20 01 mov 1, %g4 400038fc: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40003900: c2 27 bf e4 st %g1, [ %fp + -28 ] 40003904: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40003908: c4 27 bf e8 st %g2, [ %fp + -24 ] 4000390c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40003910: c2 27 bf ec st %g1, [ %fp + -20 ] if ( !temp_loc.ops->evalformake_h ) { 40003914: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( S_ISFIFO(mode) ) rtems_set_errno_and_return_minus_one( ENOTSUP ); rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 40003918: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 if ( !temp_loc.ops->evalformake_h ) { 4000391c: c2 00 60 04 ld [ %g1 + 4 ], %g1 40003920: 80 a0 60 00 cmp %g1, 0 40003924: 02 bf ff ed be 400038d8 40003928: c4 27 bf f0 st %g2, [ %fp + -16 ] rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->evalformake_h)( 4000392c: 90 06 00 04 add %i0, %g4, %o0 40003930: a0 07 bf e4 add %fp, -28, %l0 40003934: 94 07 bf f4 add %fp, -12, %o2 40003938: 92 10 00 10 mov %l0, %o1 4000393c: 9f c0 40 00 call %g1 40003940: b0 10 3f ff mov -1, %i0 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 40003944: 80 a2 20 00 cmp %o0, 0 40003948: 12 bf ff e8 bne 400038e8 4000394c: c2 07 bf ec ld [ %fp + -20 ], %g1 return -1; if ( !temp_loc.ops->mknod_h ) { 40003950: c4 00 60 14 ld [ %g1 + 0x14 ], %g2 40003954: 80 a0 a0 00 cmp %g2, 0 40003958: 02 80 00 19 be 400039bc 4000395c: d0 07 bf f4 ld [ %fp + -12 ], %o0 rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 40003960: 92 10 00 19 mov %i1, %o1 40003964: 94 10 00 1a mov %i2, %o2 40003968: 96 10 00 1b mov %i3, %o3 4000396c: 9f c0 80 00 call %g2 40003970: 98 10 00 10 mov %l0, %o4 rtems_filesystem_freenode( &temp_loc ); 40003974: c2 07 bf ec ld [ %fp + -20 ], %g1 40003978: 80 a0 60 00 cmp %g1, 0 4000397c: 02 bf ff db be 400038e8 40003980: b0 10 00 08 mov %o0, %i0 40003984: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003988: 80 a0 60 00 cmp %g1, 0 4000398c: 02 80 00 0a be 400039b4 40003990: 01 00 00 00 nop 40003994: 9f c0 40 00 call %g1 40003998: 90 10 00 10 mov %l0, %o0 return result; } 4000399c: 81 c7 e0 08 ret 400039a0: 81 e8 00 00 restore int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) rtems_set_errno_and_return_minus_one( EINVAL ); 400039a4: 40 00 31 73 call 4000ff70 <__errno> <== NOT EXECUTED 400039a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400039ac: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400039b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400039b4: 81 c7 e0 08 ret 400039b8: 81 e8 00 00 restore ); if ( result != 0 ) return -1; if ( !temp_loc.ops->mknod_h ) { rtems_filesystem_freenode( &temp_loc ); 400039bc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 400039c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400039c4: 02 bf ff c5 be 400038d8 <== NOT EXECUTED 400039c8: 01 00 00 00 nop <== NOT EXECUTED 400039cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400039d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 400039d4: 30 bf ff c1 b,a 400038d8 <== NOT EXECUTED 4000d688 : rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, char *device, char *mount_point ) { 4000d688: 9d e3 bf 88 save %sp, -120, %sp /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 4000d68c: 80 a6 60 00 cmp %i1, 0 4000d690: 02 80 00 8c be 4000d8c0 4000d694: a4 10 00 18 mov %i0, %l2 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 4000d698: 80 a6 a0 01 cmp %i2, 1 4000d69c: 18 80 00 89 bgu 4000d8c0 4000d6a0: 01 00 00 00 nop errno = EINVAL; return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 4000d6a4: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000d6a8: 80 a0 60 00 cmp %g1, 0 4000d6ac: 02 80 00 4c be 4000d7dc 4000d6b0: 80 a6 e0 00 cmp %i3, 0 /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 4000d6b4: 02 80 00 05 be 4000d6c8 4000d6b8: 90 10 20 64 mov 0x64, %o0 size += strlen( device ) + 1; 4000d6bc: 40 00 0f 0b call 400112e8 <== NOT EXECUTED 4000d6c0: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED 4000d6c4: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED temp_mt_entry = malloc( size ); 4000d6c8: 7f ff d7 7f call 400034c4 4000d6cc: 01 00 00 00 nop if ( !temp_mt_entry ) { 4000d6d0: a2 92 20 00 orcc %o0, 0, %l1 4000d6d4: 02 80 00 95 be 4000d928 4000d6d8: a0 10 00 11 mov %l1, %l0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 4000d6dc: f4 24 60 28 st %i2, [ %l1 + 0x28 ] if ( device ) { 4000d6e0: 80 a6 e0 00 cmp %i3, 0 4000d6e4: 02 80 00 47 be 4000d800 4000d6e8: e2 24 20 24 st %l1, [ %l0 + 0x24 ] temp_mt_entry->dev = 4000d6ec: 90 04 60 64 add %l1, 0x64, %o0 <== NOT EXECUTED (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 4000d6f0: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED 4000d6f4: 40 00 0e dd call 40011268 <== NOT EXECUTED 4000d6f8: d0 24 60 60 st %o0, [ %l1 + 0x60 ] <== NOT EXECUTED /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 4000d6fc: 80 a7 20 00 cmp %i4, 0 4000d700: 02 80 00 20 be 4000d780 4000d704: 90 10 00 1c mov %i4, %o0 if ( rtems_filesystem_evaluate_path( 4000d708: 92 10 20 07 mov 7, %o1 4000d70c: b8 07 bf e8 add %fp, -24, %i4 4000d710: 96 10 20 01 mov 1, %o3 4000d714: 7f ff d6 ab call 400031c0 4000d718: 94 10 00 1c mov %i4, %o2 4000d71c: 80 a2 3f ff cmp %o0, -1 4000d720: 02 80 00 33 be 4000d7ec 4000d724: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 4000d728: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 4000d72c: 80 a0 60 00 cmp %g1, 0 4000d730: 02 80 00 5a be 4000d898 4000d734: 01 00 00 00 nop /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 4000d738: 9f c0 40 00 call %g1 4000d73c: 90 10 00 1c mov %i4, %o0 4000d740: 80 a2 20 01 cmp %o0, 1 4000d744: 02 80 00 31 be 4000d808 4000d748: 03 10 00 71 sethi %hi(0x4001c400), %g1 errno = ENOTDIR; 4000d74c: 40 00 0a 09 call 4000ff70 <__errno> 4000d750: 01 00 00 00 nop 4000d754: 82 10 20 14 mov 0x14, %g1 ! 14 4000d758: c2 22 00 00 st %g1, [ %o0 ] return 0; cleanup_and_bail: free( temp_mt_entry ); 4000d75c: 90 10 00 11 mov %l1, %o0 4000d760: 7f ff d7 30 call 40003420 4000d764: a0 10 00 1c mov %i4, %l0 if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000d768: c2 04 20 08 ld [ %l0 + 8 ], %g1 4000d76c: 80 a0 60 00 cmp %g1, 0 4000d770: 32 80 00 5a bne,a 4000d8d8 4000d774: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000d778: 81 c7 e0 08 ret <== NOT EXECUTED 4000d77c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED * This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL; 4000d780: c0 24 60 18 clr [ %l1 + 0x18 ] temp_mt_entry->mt_fs_root.handlers = NULL; 4000d784: c0 24 60 1c clr [ %l1 + 0x1c ] temp_mt_entry->mt_fs_root.ops = NULL; 4000d788: c0 24 60 20 clr [ %l1 + 0x20 ] temp_mt_entry->mt_point_node.node_access = NULL; 4000d78c: c0 24 60 08 clr [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = NULL; 4000d790: c0 24 60 0c clr [ %l1 + 0xc ] temp_mt_entry->mt_point_node.ops = NULL; 4000d794: c0 24 60 10 clr [ %l1 + 0x10 ] temp_mt_entry->mt_point_node.mt_entry = NULL; 4000d798: c0 24 60 14 clr [ %l1 + 0x14 ] 4000d79c: a0 10 20 00 clr %l0 } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 4000d7a0: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 4000d7a4: 9f c0 40 00 call %g1 4000d7a8: 90 10 00 11 mov %l1, %o0 4000d7ac: 80 a2 20 00 cmp %o0, 0 4000d7b0: 12 80 00 51 bne 4000d8f4 4000d7b4: 11 10 00 71 sethi %hi(0x4001c400), %o0 /* * Add the mount table entry to the mount table chain */ Chain_Append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); 4000d7b8: 92 10 00 11 mov %l1, %o1 4000d7bc: 7f ff e9 ce call 40007ef4 <_Chain_Append> 4000d7c0: 90 12 20 68 or %o0, 0x68, %o0 if ( mt_entry ) 4000d7c4: 80 a4 a0 00 cmp %l2, 0 4000d7c8: 02 80 00 03 be 4000d7d4 4000d7cc: b0 10 20 00 clr %i0 *mt_entry = temp_mt_entry; 4000d7d0: e2 24 80 00 st %l1, [ %l2 ] 4000d7d4: 81 c7 e0 08 ret 4000d7d8: 81 e8 00 00 restore return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { errno = ENOTSUP; 4000d7dc: 40 00 09 e5 call 4000ff70 <__errno> <== NOT EXECUTED 4000d7e0: a0 10 20 00 clr %l0 <== NOT EXECUTED 4000d7e4: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000d7e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000d7ec: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000d7f0: 7f ff d7 0c call 40003420 <== NOT EXECUTED 4000d7f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); return -1; } 4000d7f8: 81 c7 e0 08 ret <== NOT EXECUTED 4000d7fc: 81 e8 00 00 restore <== 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; 4000d800: 10 bf ff bf b 4000d6fc 4000d804: c0 24 60 60 clr [ %l1 + 0x60 ] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 4000d808: c4 00 60 68 ld [ %g1 + 0x68 ], %g2 4000d80c: 82 10 60 68 or %g1, 0x68, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 4000d810: 88 00 60 04 add %g1, 4, %g4 !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000d814: 80 a0 80 04 cmp %g2, %g4 4000d818: 02 80 00 0e be 4000d850 4000d81c: c6 07 bf e8 ld [ %fp + -24 ], %g3 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 ) 4000d820: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 4000d824: 80 a0 40 03 cmp %g1, %g3 4000d828: 32 80 00 07 bne,a 4000d844 4000d82c: c4 00 80 00 ld [ %g2 ], %g2 4000d830: 30 80 00 1f b,a 4000d8ac <== NOT EXECUTED 4000d834: 80 a0 40 03 cmp %g1, %g3 4000d838: 02 80 00 1d be 4000d8ac 4000d83c: 01 00 00 00 nop * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { 4000d840: c4 00 80 00 ld [ %g2 ], %g2 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !Chain_Is_tail( &rtems_filesystem_mount_table_control, the_node ); 4000d844: 80 a0 80 04 cmp %g2, %g4 4000d848: 32 bf ff fb bne,a 4000d834 4000d84c: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; 4000d850: c2 07 bf f0 ld [ %fp + -16 ], %g1 * 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; 4000d854: c6 24 60 08 st %g3, [ %l1 + 8 ] temp_mt_entry->mt_point_node.handlers = loc.handlers; 4000d858: c4 07 bf ec ld [ %fp + -20 ], %g2 temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000d85c: c6 07 bf f4 ld [ %fp + -12 ], %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 ){ 4000d860: c8 00 60 20 ld [ %g1 + 0x20 ], %g4 * 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; 4000d864: c4 24 60 0c st %g2, [ %l1 + 0xc ] temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry; 4000d868: c6 24 60 14 st %g3, [ %l1 + 0x14 ] /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ 4000d86c: 80 a1 20 00 cmp %g4, 0 4000d870: 02 80 00 0a be 4000d898 4000d874: c2 24 60 10 st %g1, [ %l1 + 0x10 ] errno = ENOTSUP; goto cleanup_and_bail; } if ( loc.ops->mount_h( temp_mt_entry ) ) { 4000d878: 90 10 00 11 mov %l1, %o0 4000d87c: 9f c1 00 00 call %g4 4000d880: a0 10 00 1c mov %i4, %l0 4000d884: 80 a2 20 00 cmp %o0, 0 4000d888: 22 bf ff c7 be,a 4000d7a4 4000d88c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1 return 0; cleanup_and_bail: free( temp_mt_entry ); 4000d890: 10 bf ff b4 b 4000d760 <== NOT EXECUTED 4000d894: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP; 4000d898: 40 00 09 b6 call 4000ff70 <__errno> <== NOT EXECUTED 4000d89c: 01 00 00 00 nop <== NOT EXECUTED 4000d8a0: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4000d8a4: 10 bf ff ae b 4000d75c <== NOT EXECUTED 4000d8a8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 4000d8ac: 40 00 09 b1 call 4000ff70 <__errno> 4000d8b0: 01 00 00 00 nop 4000d8b4: 82 10 20 10 mov 0x10, %g1 ! 10 4000d8b8: 10 bf ff a9 b 4000d75c 4000d8bc: c2 22 00 00 st %g1, [ %o0 ] * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 4000d8c0: 40 00 09 ac call 4000ff70 <__errno> 4000d8c4: b0 10 3f ff mov -1, %i0 4000d8c8: 82 10 20 16 mov 0x16, %g1 4000d8cc: c2 22 00 00 st %g1, [ %o0 ] 4000d8d0: 81 c7 e0 08 ret 4000d8d4: 81 e8 00 00 restore cleanup_and_bail: free( temp_mt_entry ); if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); 4000d8d8: 80 a0 60 00 cmp %g1, 0 4000d8dc: 02 bf ff a7 be 4000d778 4000d8e0: 90 10 00 10 mov %l0, %o0 4000d8e4: 9f c0 40 00 call %g1 4000d8e8: b0 10 3f ff mov -1, %i0 4000d8ec: 81 c7 e0 08 ret 4000d8f0: 81 e8 00 00 restore temp_mt_entry->mt_point_node.mt_entry = NULL; } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 4000d8f4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4000d8f8: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED 4000d8fc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000d900: 02 80 00 04 be 4000d910 <== NOT EXECUTED 4000d904: 01 00 00 00 nop <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 4000d908: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000d90c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 4000d910: 7f ff d6 c4 call 40003420 <== NOT EXECUTED 4000d914: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( loc_to_free ) 4000d918: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000d91c: 32 bf ff 94 bne,a 4000d76c <== NOT EXECUTED 4000d920: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED 4000d924: 30 bf ff 95 b,a 4000d778 <== NOT EXECUTED if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); if ( !temp_mt_entry ) { errno = ENOMEM; 4000d928: 40 00 09 92 call 4000ff70 <__errno> <== NOT EXECUTED 4000d92c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000d930: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED 4000d934: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000d938: 81 c7 e0 08 ret <== NOT EXECUTED 4000d93c: 81 e8 00 00 restore <== NOT EXECUTED 4000af88 : */ int mq_close( mqd_t mqdes ) { 4000af88: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000af8c: 21 10 00 9e sethi %hi(0x40027800), %l0 4000af90: 92 10 00 18 mov %i0, %o1 4000af94: 94 07 bf f4 add %fp, -12, %o2 4000af98: 40 00 13 eb call 4000ff44 <_Objects_Get> 4000af9c: 90 14 20 60 or %l0, 0x60, %o0 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000afa0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000afa4: 80 a0 60 01 cmp %g1, 1 4000afa8: 02 80 00 2e be 4000b060 4000afac: b0 10 00 08 mov %o0, %i0 4000afb0: 80 a0 60 01 cmp %g1, 1 4000afb4: 2a 80 00 09 bcs,a 4000afd8 4000afb8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 4000afbc: 80 a0 60 02 cmp %g1, 2 4000afc0: 02 80 00 2e be 4000b078 4000afc4: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000afc8: 40 00 08 80 call 4000d1c8 <== NOT EXECUTED 4000afcc: 01 00 00 00 nop <== NOT EXECUTED } 4000afd0: 81 c7 e0 08 ret <== NOT EXECUTED 4000afd4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 4000afd8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 _POSIX_Message_queue_Delete( the_mq ); 4000afdc: 90 10 00 02 mov %g2, %o0 * being disassociated. This may result in the queue being really * deleted. */ the_mq = the_mq_fd->Queue; the_mq->open_count -= 1; 4000afe0: 82 00 7f ff add %g1, -1, %g1 _POSIX_Message_queue_Delete( the_mq ); 4000afe4: 40 00 00 2c call 4000b094 <_POSIX_Message_queue_Delete> 4000afe8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000afec: 90 14 20 60 or %l0, 0x60, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000aff0: c4 06 20 08 ld [ %i0 + 8 ], %g2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000aff4: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000aff8: 03 00 00 3f sethi %hi(0xfc00), %g1 4000affc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b000: 82 08 80 01 and %g2, %g1, %g1 4000b004: 80 a0 40 03 cmp %g1, %g3 4000b008: 38 80 00 06 bgu,a 4000b020 4000b00c: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000b010: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000b014: 83 28 60 02 sll %g1, 2, %g1 4000b018: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000b01c: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b020: 40 00 13 86 call 4000fe38 <_Objects_Free> 4000b024: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b028: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b02c: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b030: 90 10 20 00 clr %o0 4000b034: 84 00 bf ff add %g2, -1, %g2 4000b038: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b03c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b040: 80 a0 e0 00 cmp %g3, 0 4000b044: 12 bf ff e3 bne 4000afd0 4000b048: 01 00 00 00 nop _Thread_Dispatch(); 4000b04c: 40 00 18 aa call 400112f4 <_Thread_Dispatch> 4000b050: 01 00 00 00 nop 4000b054: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b058: 81 c7 e0 08 ret 4000b05c: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b060: 40 00 18 a5 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b064: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b068: 40 00 08 62 call 4000d1f0 <== NOT EXECUTED 4000b06c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b070: 81 c7 e0 08 ret <== NOT EXECUTED 4000b074: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b078: 40 00 31 bd call 4001776c <__errno> 4000b07c: 01 00 00 00 nop 4000b080: 82 10 20 09 mov 9, %g1 ! 9 4000b084: c2 22 00 00 st %g1, [ %o0 ] 4000b088: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b08c: 81 c7 e0 08 ret 4000b090: 91 e8 00 08 restore %g0, %o0, %o0 4000b124 : int mq_getattr( mqd_t mqdes, struct mq_attr *mqstat ) { 4000b124: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) 4000b128: 80 a6 60 00 cmp %i1, 0 4000b12c: 02 80 00 36 be 4000b204 4000b130: 92 10 00 18 mov %i0, %o1 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control_fd *) 4000b134: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b138: 94 07 bf f4 add %fp, -12, %o2 4000b13c: 40 00 13 82 call 4000ff44 <_Objects_Get> 4000b140: 90 12 20 60 or %o0, 0x60, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b144: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b148: 80 a0 60 01 cmp %g1, 1 4000b14c: 02 80 00 28 be 4000b1ec 4000b150: 01 00 00 00 nop 4000b154: 2a 80 00 09 bcs,a 4000b178 4000b158: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 4000b15c: 80 a0 60 02 cmp %g1, 2 4000b160: 02 80 00 1c be 4000b1d0 4000b164: 01 00 00 00 nop mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000b168: 40 00 08 18 call 4000d1c8 <== NOT EXECUTED 4000b16c: 01 00 00 00 nop <== NOT EXECUTED } 4000b170: 81 c7 e0 08 ret 4000b174: 91 e8 00 08 restore %g0, %o0, %o0 * Return the old values. */ the_mq_attr = &the_mq->Message_queue.Attributes; mqstat->mq_flags = the_mq_fd->oflag; 4000b178: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 4000b17c: c4 26 40 00 st %g2, [ %i1 ] mqstat->mq_msgsize = the_mq->Message_queue.maximum_message_size; 4000b180: c2 00 e0 6c ld [ %g3 + 0x6c ], %g1 4000b184: c2 26 60 08 st %g1, [ %i1 + 8 ] mqstat->mq_maxmsg = the_mq->Message_queue.maximum_pending_messages; 4000b188: c4 00 e0 64 ld [ %g3 + 0x64 ], %g2 4000b18c: c4 26 60 04 st %g2, [ %i1 + 4 ] mqstat->mq_curmsgs = the_mq->Message_queue.number_of_pending_messages; 4000b190: c2 00 e0 68 ld [ %g3 + 0x68 ], %g1 4000b194: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b198: 07 10 00 9c sethi %hi(0x40027000), %g3 4000b19c: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b1a0: 90 10 20 00 clr %o0 4000b1a4: 82 00 7f ff add %g1, -1, %g1 4000b1a8: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] 4000b1ac: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 4000b1b0: 80 a0 a0 00 cmp %g2, 0 4000b1b4: 12 bf ff ef bne 4000b170 4000b1b8: 01 00 00 00 nop _Thread_Dispatch(); 4000b1bc: 40 00 18 4e call 400112f4 <_Thread_Dispatch> 4000b1c0: 01 00 00 00 nop 4000b1c4: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1c8: 81 c7 e0 08 ret 4000b1cc: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b1d0: 40 00 31 67 call 4001776c <__errno> 4000b1d4: 01 00 00 00 nop 4000b1d8: 82 10 20 09 mov 9, %g1 ! 9 4000b1dc: c2 22 00 00 st %g1, [ %o0 ] 4000b1e0: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1e4: 81 c7 e0 08 ret 4000b1e8: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b1ec: 40 00 18 42 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b1f0: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b1f4: 40 00 07 ff call 4000d1f0 <== NOT EXECUTED 4000b1f8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b1fc: 81 c7 e0 08 ret <== NOT EXECUTED 4000b200: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; CORE_message_queue_Attributes *the_mq_attr; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000b204: 40 00 31 5a call 4001776c <__errno> 4000b208: 01 00 00 00 nop 4000b20c: 82 10 20 16 mov 0x16, %g1 ! 16 4000b210: c2 22 00 00 st %g1, [ %o0 ] 4000b214: 10 bf ff d7 b 4000b170 4000b218: 90 10 3f ff mov -1, %o0 4000b240 : int mq_notify( mqd_t mqdes, const struct sigevent *notification ) { 4000b240: 9d e3 bf 90 save %sp, -112, %sp 4000b244: 11 10 00 9e sethi %hi(0x40027800), %o0 4000b248: 92 10 00 18 mov %i0, %o1 4000b24c: 90 12 20 60 or %o0, 0x60, %o0 4000b250: 40 00 13 3d call 4000ff44 <_Objects_Get> 4000b254: 94 07 bf f4 add %fp, -12, %o2 POSIX_Message_queue_Control *the_mq; POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000b258: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000b25c: 80 a0 60 01 cmp %g1, 1 4000b260: 02 80 00 2e be 4000b318 4000b264: 01 00 00 00 nop 4000b268: 0a 80 00 09 bcs 4000b28c 4000b26c: 80 a6 60 00 cmp %i1, 0 4000b270: 80 a0 60 02 cmp %g1, 2 4000b274: 02 80 00 2f be 4000b330 4000b278: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000b27c: 40 00 07 d3 call 4000d1c8 <== NOT EXECUTED 4000b280: 01 00 00 00 nop <== NOT EXECUTED } 4000b284: 81 c7 e0 08 ret 4000b288: 91 e8 00 08 restore %g0, %o0, %o0 return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_mq = the_mq_fd->Queue; if ( notification ) { 4000b28c: 02 80 00 3e be 4000b384 4000b290: d0 02 20 10 ld [ %o0 + 0x10 ], %o0 if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { 4000b294: c2 02 20 80 ld [ %o0 + 0x80 ], %g1 4000b298: 80 a0 60 00 cmp %g1, 0 4000b29c: 12 80 00 2c bne 4000b34c 4000b2a0: 01 00 00 00 nop the_message_queue->notify_argument = the_argument; 4000b2a4: c0 22 20 84 clr [ %o0 + 0x84 ] rtems_set_errno_and_return_minus_one( EBUSY ); } _CORE_message_queue_Set_notify( &the_mq->Message_queue, NULL, NULL ); the_mq->notification = *notification; 4000b2a8: c2 06 40 00 ld [ %i1 ], %g1 4000b2ac: c2 22 20 94 st %g1, [ %o0 + 0x94 ] 4000b2b0: c4 06 60 04 ld [ %i1 + 4 ], %g2 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4000b2b4: 03 10 00 2c sethi %hi(0x4000b000), %g1 4000b2b8: c4 22 20 98 st %g2, [ %o0 + 0x98 ] 4000b2bc: c6 06 60 08 ld [ %i1 + 8 ], %g3 4000b2c0: 82 10 62 1c or %g1, 0x21c, %g1 4000b2c4: c6 22 20 9c st %g3, [ %o0 + 0x9c ] 4000b2c8: c2 22 20 80 st %g1, [ %o0 + 0x80 ] 4000b2cc: c2 06 60 0c ld [ %i1 + 0xc ], %g1 4000b2d0: c2 22 20 a0 st %g1, [ %o0 + 0xa0 ] 4000b2d4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2 the_message_queue->notify_argument = the_argument; 4000b2d8: d0 22 20 84 st %o0, [ %o0 + 0x84 ] 4000b2dc: c4 22 20 a4 st %g2, [ %o0 + 0xa4 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b2e0: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b2e4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b2e8: 90 10 20 00 clr %o0 4000b2ec: 84 00 bf ff add %g2, -1, %g2 4000b2f0: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b2f4: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b2f8: 80 a0 e0 00 cmp %g3, 0 4000b2fc: 12 bf ff e2 bne 4000b284 4000b300: 01 00 00 00 nop _Thread_Dispatch(); 4000b304: 40 00 17 fc call 400112f4 <_Thread_Dispatch> 4000b308: 01 00 00 00 nop 4000b30c: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b310: 81 c7 e0 08 ret 4000b314: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000b318: 40 00 17 f7 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b31c: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000b320: 40 00 07 b4 call 4000d1f0 <== NOT EXECUTED 4000b324: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b328: 81 c7 e0 08 ret <== NOT EXECUTED 4000b32c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000b330: 40 00 31 0f call 4001776c <__errno> 4000b334: 01 00 00 00 nop 4000b338: 82 10 20 09 mov 9, %g1 ! 9 4000b33c: c2 22 00 00 st %g1, [ %o0 ] 4000b340: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000b344: 81 c7 e0 08 ret 4000b348: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b34c: 03 10 00 9c sethi %hi(0x40027000), %g1 4000b350: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> 4000b354: 84 00 bf ff add %g2, -1, %g2 4000b358: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 4000b35c: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 4000b360: 80 a0 e0 00 cmp %g3, 0 4000b364: 02 80 00 0b be 4000b390 4000b368: 01 00 00 00 nop the_mq = the_mq_fd->Queue; if ( notification ) { if ( _CORE_message_queue_Is_notify_enabled( &the_mq->Message_queue ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EBUSY ); 4000b36c: 40 00 31 00 call 4001776c <__errno> 4000b370: 01 00 00 00 nop 4000b374: 82 10 20 10 mov 0x10, %g1 ! 10 4000b378: c2 22 00 00 st %g1, [ %o0 ] 4000b37c: 10 bf ff c2 b 4000b284 4000b380: 90 10 3f ff mov -1, %o0 4000b384: c0 22 20 84 clr [ %o0 + 0x84 ] CORE_message_queue_Control *the_message_queue, CORE_message_queue_Notify_Handler the_handler, void *the_argument ) { the_message_queue->notify_handler = the_handler; 4000b388: 10 bf ff d6 b 4000b2e0 4000b38c: c0 22 20 80 clr [ %o0 + 0x80 ] _Thread_Dispatch(); 4000b390: 40 00 17 d9 call 400112f4 <_Thread_Dispatch> 4000b394: 01 00 00 00 nop 4000b398: 30 bf ff f5 b,a 4000b36c 4000b39c : int oflag, ... /* mode_t mode, */ /* struct mq_attr attr */ ) { 4000b39c: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000b3a0: 21 10 00 9c sethi %hi(0x40027000), %l0 4000b3a4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000b3a8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 4000b3ac: 82 00 60 01 inc %g1 4000b3b0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 4000b3b4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 4000b3b8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 4000b3bc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b3c0: a2 10 00 18 mov %i0, %l1 POSIX_Message_queue_Control_fd *the_mq_fd; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 4000b3c4: ba 8e 62 00 andcc %i1, 0x200, %i5 4000b3c8: 12 80 00 16 bne 4000b420 4000b3cc: f4 07 a0 50 ld [ %fp + 0x50 ], %i2 4000b3d0: b4 10 20 00 clr %i2 */ RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd * _POSIX_Message_queue_Allocate_fd( void ) { return (POSIX_Message_queue_Control_fd *) 4000b3d4: 39 10 00 9e sethi %hi(0x40027800), %i4 4000b3d8: 40 00 11 8a call 4000fa00 <_Objects_Allocate> 4000b3dc: 90 17 20 60 or %i4, 0x60, %o0 ! 40027860 <_POSIX_Message_queue_Information_fds> attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); va_end(arg); } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { 4000b3e0: b0 92 20 00 orcc %o0, 0, %i0 4000b3e4: 32 80 00 1a bne,a 4000b44c 4000b3e8: f2 26 20 14 st %i1, [ %i0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b3ec: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b3f0: 82 00 7f ff add %g1, -1, %g1 4000b3f4: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b3f8: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b3fc: 80 a0 a0 00 cmp %g2, 0 4000b400: 02 80 00 0b be 4000b42c 4000b404: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000b408: 40 00 30 d9 call 4001776c <__errno> <== NOT EXECUTED 4000b40c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000b410: 82 10 20 17 mov 0x17, %g1 <== NOT EXECUTED 4000b414: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000b418: 81 c7 e0 08 ret <== NOT EXECUTED 4000b41c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); attr = (struct mq_attr *) va_arg( arg, struct mq_attr * ); 4000b420: 82 07 a0 54 add %fp, 0x54, %g1 4000b424: 10 bf ff ec b 4000b3d4 4000b428: c2 27 bf f4 st %g1, [ %fp + -12 ] _Thread_Dispatch(); 4000b42c: 40 00 17 b2 call 400112f4 <_Thread_Dispatch> 4000b430: b0 10 3f ff mov -1, %i0 } the_mq_fd = _POSIX_Message_queue_Allocate_fd(); if ( !the_mq_fd ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( ENFILE ); 4000b434: 40 00 30 ce call 4001776c <__errno> 4000b438: 01 00 00 00 nop 4000b43c: 82 10 20 17 mov 0x17, %g1 ! 17 4000b440: c2 22 00 00 st %g1, [ %o0 ] 4000b444: 81 c7 e0 08 ret 4000b448: 81 e8 00 00 restore } the_mq_fd->oflag = oflag; status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000b44c: 90 10 00 11 mov %l1, %o0 4000b450: 40 00 26 36 call 40014d28 <_POSIX_Message_queue_Name_to_id> 4000b454: 92 07 bf f0 add %fp, -16, %o1 * and we can just return a pointer to the id. Otherwise we may * need to check to see if this is a "message queue does not exist" * or some other miscellaneous error on the name. */ if ( status ) { 4000b458: b6 92 20 00 orcc %o0, 0, %i3 4000b45c: 02 80 00 14 be 4000b4ac 4000b460: 82 0e 6a 00 and %i1, 0xa00, %g1 /* * 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) ) ) { 4000b464: 80 a6 e0 02 cmp %i3, 2 4000b468: 02 80 00 51 be 4000b5ac 4000b46c: 80 a7 60 00 cmp %i5, 0 RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b470: 90 17 20 60 or %i4, 0x60, %o0 4000b474: 40 00 12 71 call 4000fe38 <_Objects_Free> 4000b478: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b47c: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b480: 82 00 7f ff add %g1, -1, %g1 4000b484: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b488: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b48c: 80 a0 a0 00 cmp %g2, 0 4000b490: 02 80 00 1a be 4000b4f8 4000b494: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, mqd_t ); 4000b498: 40 00 30 b5 call 4001776c <__errno> 4000b49c: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b4a0: f6 22 00 00 st %i3, [ %o0 ] 4000b4a4: 81 c7 e0 08 ret 4000b4a8: 81 e8 00 00 restore /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 4000b4ac: 80 a0 6a 00 cmp %g1, 0xa00 4000b4b0: 12 80 00 18 bne 4000b510 4000b4b4: d2 07 bf f0 ld [ %fp + -16 ], %o1 4000b4b8: 90 17 20 60 or %i4, 0x60, %o0 4000b4bc: 40 00 12 5f call 4000fe38 <_Objects_Free> 4000b4c0: 92 10 00 18 mov %i0, %o1 4000b4c4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b4c8: 82 00 7f ff add %g1, -1, %g1 4000b4cc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b4d0: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b4d4: 80 a0 a0 00 cmp %g2, 0 4000b4d8: 02 80 00 0b be 4000b504 4000b4dc: 01 00 00 00 nop _POSIX_Message_queue_Free_fd( the_mq_fd ); _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t ); 4000b4e0: 40 00 30 a3 call 4001776c <__errno> 4000b4e4: b0 10 3f ff mov -1, %i0 ! ffffffff 4000b4e8: 82 10 20 11 mov 0x11, %g1 4000b4ec: c2 22 00 00 st %g1, [ %o0 ] 4000b4f0: 81 c7 e0 08 ret 4000b4f4: 81 e8 00 00 restore _Thread_Dispatch(); 4000b4f8: 40 00 17 7f call 400112f4 <_Thread_Dispatch> 4000b4fc: 01 00 00 00 nop 4000b500: 30 bf ff e6 b,a 4000b498 4000b504: 40 00 17 7c call 400112f4 <_Thread_Dispatch> 4000b508: 01 00 00 00 nop 4000b50c: 30 bf ff f5 b,a 4000b4e0 RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Message_queue_Control *) 4000b510: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000b514: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED 4000b518: 40 00 12 8b call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000b51c: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); the_mq->open_count += 1; 4000b520: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 <== NOT EXECUTED /* * In this case we need to do an ID->pointer conversion to * check the mode. */ the_mq = _POSIX_Message_queue_Get( the_mq_id, &location ); 4000b524: d0 27 bf ec st %o0, [ %fp + -20 ] <== NOT EXECUTED the_mq->open_count += 1; 4000b528: 82 00 60 01 inc %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b52c: 88 17 20 60 or %i4, 0x60, %g4 <== NOT EXECUTED 4000b530: c2 22 20 1c st %g1, [ %o0 + 0x1c ] <== NOT EXECUTED 4000b534: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b538: c4 06 20 08 ld [ %i0 + 8 ], %g2 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b53c: 03 00 00 3f sethi %hi(0xfc00), %g1 <== NOT EXECUTED 4000b540: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <== NOT EXECUTED 4000b544: 82 08 80 01 and %g2, %g1, %g1 <== NOT EXECUTED 4000b548: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000b54c: 18 80 00 05 bgu 4000b560 <== NOT EXECUTED 4000b550: d0 26 20 10 st %o0, [ %i0 + 0x10 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000b554: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 <== NOT EXECUTED 4000b558: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000b55c: f0 20 80 01 st %i0, [ %g2 + %g1 ] <== NOT EXECUTED if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000b560: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b564: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 <== NOT EXECUTED 4000b568: 23 10 00 9c sethi %hi(0x40027000), %l1 <== NOT EXECUTED 4000b56c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b570: c2 24 22 90 st %g1, [ %l0 + 0x290 ] <== NOT EXECUTED 4000b574: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 <== NOT EXECUTED 4000b578: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b57c: 02 80 00 28 be 4000b61c <== NOT EXECUTED 4000b580: 01 00 00 00 nop <== NOT EXECUTED 4000b584: c2 04 62 90 ld [ %l1 + 0x290 ], %g1 <== NOT EXECUTED 4000b588: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000b58c: c2 24 62 90 st %g1, [ %l1 + 0x290 ] <== NOT EXECUTED 4000b590: c4 04 62 90 ld [ %l1 + 0x290 ], %g2 <== NOT EXECUTED 4000b594: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000b598: 02 80 00 1c be 4000b608 <== NOT EXECUTED 4000b59c: 01 00 00 00 nop <== NOT EXECUTED &the_mq_fd->Object, NULL ); _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); return (mqd_t)the_mq_fd->Object.id; 4000b5a0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b5a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000b5a8: 81 e8 00 00 restore <== NOT EXECUTED /* * 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) ) ) { 4000b5ac: 02 bf ff b2 be 4000b474 4000b5b0: 90 17 20 60 or %i4, 0x60, %o0 /* * At this point, the message queue does not exist and everything has been * checked. We should go ahead and create a message queue. */ status = _POSIX_Message_queue_Create_support( 4000b5b4: 90 10 00 11 mov %l1, %o0 4000b5b8: 94 10 00 1a mov %i2, %o2 4000b5bc: 92 10 20 01 mov 1, %o1 4000b5c0: 40 00 25 42 call 40014ac8 <_POSIX_Message_queue_Create_support> 4000b5c4: 96 07 bf ec add %fp, -20, %o3 /* * errno was set by Create_support, so don't set it again. */ if ( status == -1 ) { 4000b5c8: 80 a2 3f ff cmp %o0, -1 4000b5cc: 12 80 00 1b bne 4000b638 4000b5d0: c4 07 bf ec ld [ %fp + -20 ], %g2 4000b5d4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b5d8: 82 00 7f ff add %g1, -1, %g1 4000b5dc: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b5e0: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b5e4: 80 a0 a0 00 cmp %g2, 0 4000b5e8: 02 80 00 10 be 4000b628 4000b5ec: 01 00 00 00 nop RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd ( POSIX_Message_queue_Control_fd *the_mq_fd ) { _Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object ); 4000b5f0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000b5f4: 90 17 20 60 or %i4, 0x60, %o0 4000b5f8: 40 00 12 10 call 4000fe38 <_Objects_Free> 4000b5fc: b0 10 3f ff mov -1, %i0 4000b600: 81 c7 e0 08 ret 4000b604: 81 e8 00 00 restore _Thread_Dispatch(); 4000b608: 40 00 17 3b call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b60c: 01 00 00 00 nop <== NOT EXECUTED 4000b610: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED 4000b614: 81 c7 e0 08 ret <== NOT EXECUTED 4000b618: 81 e8 00 00 restore <== NOT EXECUTED 4000b61c: 40 00 17 36 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000b620: 01 00 00 00 nop <== NOT EXECUTED 4000b624: 30 bf ff d8 b,a 4000b584 <== NOT EXECUTED 4000b628: 40 00 17 33 call 400112f4 <_Thread_Dispatch> 4000b62c: 01 00 00 00 nop 4000b630: 10 bf ff f1 b 4000b5f4 4000b634: 92 10 00 18 mov %i0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b638: 90 17 20 60 or %i4, 0x60, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000b63c: c6 06 20 08 ld [ %i0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000b640: c8 12 20 10 lduh [ %o0 + 0x10 ], %g4 4000b644: 03 00 00 3f sethi %hi(0xfc00), %g1 4000b648: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000b64c: 82 08 c0 01 and %g3, %g1, %g1 4000b650: 80 a0 40 04 cmp %g1, %g4 4000b654: 18 80 00 05 bgu 4000b668 4000b658: c4 26 20 10 st %g2, [ %i0 + 0x10 ] information->local_table[ index ] = the_object; 4000b65c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000b660: 83 28 60 02 sll %g1, 2, %g1 4000b664: f0 20 80 01 st %i0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000b668: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000b66c: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000b670: 82 00 7f ff add %g1, -1, %g1 4000b674: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000b678: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000b67c: 80 a0 a0 00 cmp %g2, 0 4000b680: 32 bf ff 66 bne,a 4000b418 4000b684: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000b688: 40 00 17 1b call 400112f4 <_Thread_Dispatch> 4000b68c: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return (mqd_t) the_mq_fd->Object.id; 4000b690: f0 06 20 08 ld [ %i0 + 8 ], %i0 } 4000b694: 81 c7 e0 08 ret 4000b698: 81 e8 00 00 restore 4000ba28 : int mq_setattr( mqd_t mqdes, const struct mq_attr *mqstat, struct mq_attr *omqstat ) { 4000ba28: 9d e3 bf 90 save %sp, -112, %sp POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) 4000ba2c: 80 a6 60 00 cmp %i1, 0 4000ba30: 02 80 00 3a be 4000bb18 4000ba34: 92 10 00 18 mov %i0, %o1 4000ba38: 11 10 00 9e sethi %hi(0x40027800), %o0 4000ba3c: 94 07 bf f4 add %fp, -12, %o2 4000ba40: 40 00 11 41 call 4000ff44 <_Objects_Get> 4000ba44: 90 12 20 60 or %o0, 0x60, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000ba48: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ba4c: 80 a0 60 01 cmp %g1, 1 4000ba50: 02 80 00 2c be 4000bb00 4000ba54: 01 00 00 00 nop 4000ba58: 1a 80 00 1d bcc 4000bacc 4000ba5c: 80 a0 60 02 cmp %g1, 2 /* * Return the old values. */ if ( omqstat ) { 4000ba60: 80 a6 a0 00 cmp %i2, 0 4000ba64: 02 80 00 0a be 4000ba8c 4000ba68: c6 02 20 10 ld [ %o0 + 0x10 ], %g3 omqstat->mq_flags = the_mq_fd->oflag; 4000ba6c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000ba70: c2 26 80 00 st %g1, [ %i2 ] omqstat->mq_msgsize = the_core_mq->maximum_message_size; 4000ba74: c4 00 e0 6c ld [ %g3 + 0x6c ], %g2 4000ba78: c4 26 a0 08 st %g2, [ %i2 + 8 ] omqstat->mq_maxmsg = the_core_mq->maximum_pending_messages; 4000ba7c: c2 00 e0 64 ld [ %g3 + 0x64 ], %g1 4000ba80: c2 26 a0 04 st %g1, [ %i2 + 4 ] omqstat->mq_curmsgs = the_core_mq->number_of_pending_messages; 4000ba84: c4 00 e0 68 ld [ %g3 + 0x68 ], %g2 4000ba88: c4 26 a0 0c st %g2, [ %i2 + 0xc ] } the_mq_fd->oflag = mqstat->mq_flags; 4000ba8c: c2 06 40 00 ld [ %i1 ], %g1 4000ba90: c2 22 20 14 st %g1, [ %o0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ba94: 07 10 00 9c sethi %hi(0x40027000), %g3 4000ba98: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000ba9c: 90 10 20 00 clr %o0 4000baa0: 82 00 7f ff add %g1, -1, %g1 4000baa4: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] 4000baa8: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 4000baac: 80 a0 a0 00 cmp %g2, 0 4000bab0: 12 80 00 0b bne 4000badc 4000bab4: 01 00 00 00 nop _Thread_Dispatch(); 4000bab8: 40 00 16 0f call 400112f4 <_Thread_Dispatch> 4000babc: 01 00 00 00 nop 4000bac0: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000bac4: 81 c7 e0 08 ret 4000bac8: 91 e8 00 08 restore %g0, %o0, %o0 if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { 4000bacc: 02 80 00 06 be 4000bae4 4000bad0: 01 00 00 00 nop the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000bad4: 40 00 05 bd call 4000d1c8 <== NOT EXECUTED 4000bad8: 01 00 00 00 nop <== NOT EXECUTED } 4000badc: 81 c7 e0 08 ret 4000bae0: 91 e8 00 08 restore %g0, %o0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); 4000bae4: 40 00 2f 22 call 4001776c <__errno> 4000bae8: 01 00 00 00 nop 4000baec: 82 10 20 09 mov 9, %g1 ! 9 4000baf0: c2 22 00 00 st %g1, [ %o0 ] 4000baf4: 90 10 3f ff mov -1, %o0 the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000baf8: 81 c7 e0 08 ret 4000bafc: 91 e8 00 08 restore %g0, %o0, %o0 the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EBADF ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000bb00: 40 00 15 fd call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000bb04: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000bb08: 40 00 05 ba call 4000d1f0 <== NOT EXECUTED 4000bb0c: 01 00 00 00 nop <== NOT EXECUTED the_mq_fd->oflag = mqstat->mq_flags; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000bb10: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb14: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED POSIX_Message_queue_Control_fd *the_mq_fd; CORE_message_queue_Control *the_core_mq; Objects_Locations location; if ( !mqstat ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000bb18: 40 00 2f 15 call 4001776c <__errno> 4000bb1c: 01 00 00 00 nop 4000bb20: 82 10 20 16 mov 0x16, %g1 ! 16 4000bb24: c2 22 00 00 st %g1, [ %o0 ] 4000bb28: 10 bf ff ed b 4000badc 4000bb2c: 90 10 3f ff mov -1, %o0 4000bb30 : char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000bb30: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb34: 92 07 bf f4 add %fp, -12, %o1 4000bb38: 40 00 00 95 call 4000bd8c <_POSIX_Absolute_timeout_to_ticks> 4000bb3c: 90 10 00 1c mov %i4, %o0 char *msg_ptr, size_t msg_len, unsigned int *msg_prio, const struct timespec *abstime ) { 4000bb40: 92 10 00 19 mov %i1, %o1 4000bb44: 94 10 00 1a mov %i2, %o2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb48: 80 a2 20 02 cmp %o0, 2 4000bb4c: 18 80 00 09 bgu 4000bb70 4000bb50: 96 10 00 1b mov %i3, %o3 4000bb54: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000bb58: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000bb5c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bb60: 7f ff fe d5 call 4000b6b4 <_POSIX_Message_queue_Receive_support> <== NOT EXECUTED 4000bb64: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000bb68: 81 c7 e0 08 ret <== NOT EXECUTED 4000bb6c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb70: 80 a2 20 03 cmp %o0, 3 4000bb74: 12 bf ff fa bne 4000bb5c 4000bb78: da 07 bf f4 ld [ %fp + -12 ], %o5 4000bb7c: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Receive_support( 4000bb80: 90 10 00 18 mov %i0, %o0 4000bb84: 7f ff fe cc call 4000b6b4 <_POSIX_Message_queue_Receive_support> 4000bb88: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000bb8c: 81 c7 e0 08 ret 4000bb90: 91 e8 00 08 restore %g0, %o0, %o0 4000bb94 : const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000bb94: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bb98: 92 07 bf f4 add %fp, -12, %o1 4000bb9c: 40 00 00 7c call 4000bd8c <_POSIX_Absolute_timeout_to_ticks> 4000bba0: 90 10 00 1c mov %i4, %o0 const char *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec *abstime ) { 4000bba4: 92 10 00 19 mov %i1, %o1 4000bba8: 94 10 00 1a mov %i2, %o2 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bbac: 80 a2 20 02 cmp %o0, 2 4000bbb0: 18 80 00 09 bgu 4000bbd4 4000bbb4: 96 10 00 1b mov %i3, %o3 4000bbb8: b8 10 20 00 clr %i4 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000bbbc: da 07 bf f4 ld [ %fp + -12 ], %o5 <== NOT EXECUTED 4000bbc0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000bbc4: 7f ff ff 36 call 4000b89c <_POSIX_Message_queue_Send_support> <== NOT EXECUTED 4000bbc8: 98 10 00 1c mov %i4, %o4 <== NOT EXECUTED msg_len, msg_prio, do_wait, ticks ); } 4000bbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000bbd0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ switch ( _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ) ) { 4000bbd4: 80 a2 20 03 cmp %o0, 3 4000bbd8: 12 bf ff fa bne 4000bbc0 4000bbdc: da 07 bf f4 ld [ %fp + -12 ], %o5 4000bbe0: b8 10 20 01 mov 1, %i4 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } return _POSIX_Message_queue_Send_support( 4000bbe4: 90 10 00 18 mov %i0, %o0 4000bbe8: 7f ff ff 2d call 4000b89c <_POSIX_Message_queue_Send_support> 4000bbec: 98 10 00 1c mov %i4, %o4 msg_len, msg_prio, do_wait, ticks ); } 4000bbf0: 81 c7 e0 08 ret 4000bbf4: 91 e8 00 08 restore %g0, %o0, %o0 4000bc9c : */ int mq_unlink( const char *name ) { 4000bc9c: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000bca0: 21 10 00 9c sethi %hi(0x40027000), %l0 4000bca4: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000bca8: 90 10 00 18 mov %i0, %o0 4000bcac: 82 00 60 01 inc %g1 4000bcb0: c2 24 22 90 st %g1, [ %l0 + 0x290 ] register POSIX_Message_queue_Control *the_mq; Objects_Id the_mq_id; _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); 4000bcb4: 40 00 24 1d call 40014d28 <_POSIX_Message_queue_Name_to_id> 4000bcb8: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 4000bcbc: b0 92 20 00 orcc %o0, 0, %i0 4000bcc0: 12 80 00 24 bne 4000bd50 4000bcc4: 03 10 00 9d sethi %hi(0x40027400), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 4000bcc8: c4 07 bf f4 ld [ %fp + -12 ], %g2 4000bccc: 88 10 62 a8 or %g1, 0x2a8, %g4 4000bcd0: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 4000bcd4: 03 00 00 3f sethi %hi(0xfc00), %g1 4000bcd8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000bcdc: 82 08 80 01 and %g2, %g1, %g1 4000bce0: 80 a0 40 03 cmp %g1, %g3 4000bce4: 18 80 00 05 bgu 4000bcf8 4000bce8: b0 10 20 00 clr %i0 4000bcec: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000bcf0: 83 28 60 02 sll %g1, 2, %g1 4000bcf4: f0 00 80 01 ld [ %g2 + %g1 ], %i0 4000bcf8: d2 06 20 0c ld [ %i0 + 0xc ], %o1 _Objects_MP_Close( &_POSIX_Message_queue_Information, the_mq_id ); } #endif the_mq->linked = FALSE; 4000bcfc: c0 26 20 18 clr [ %i0 + 0x18 ] 4000bd00: 11 10 00 9c sethi %hi(0x40027000), %o0 4000bd04: 40 00 0e 12 call 4000f54c <_Heap_Free> 4000bd08: 90 12 22 dc or %o0, 0x2dc, %o0 ! 400272dc <_Workspace_Area> _Workspace_Free( the_mq->Object.name ); _POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq ); 4000bd0c: 90 10 00 18 mov %i0, %o0 4000bd10: 7f ff fc e1 call 4000b094 <_POSIX_Message_queue_Delete> 4000bd14: c0 26 20 0c clr [ %i0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000bd18: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000bd1c: b0 10 20 00 clr %i0 4000bd20: 82 00 7f ff add %g1, -1, %g1 4000bd24: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000bd28: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000bd2c: 80 a0 a0 00 cmp %g2, 0 4000bd30: 02 80 00 04 be 4000bd40 4000bd34: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000bd38: 81 c7 e0 08 ret <== NOT EXECUTED 4000bd3c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000bd40: 40 00 15 6d call 400112f4 <_Thread_Dispatch> 4000bd44: 01 00 00 00 nop 4000bd48: 81 c7 e0 08 ret 4000bd4c: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000bd50: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000bd54: 82 00 7f ff add %g1, -1, %g1 4000bd58: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000bd5c: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000bd60: 80 a0 a0 00 cmp %g2, 0 4000bd64: 02 80 00 07 be 4000bd80 4000bd68: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 4000bd6c: 40 00 2e 80 call 4001776c <__errno> 4000bd70: 01 00 00 00 nop 4000bd74: f0 22 00 00 st %i0, [ %o0 ] 4000bd78: 81 c7 e0 08 ret 4000bd7c: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 4000bd80: 40 00 15 5d call 400112f4 <_Thread_Dispatch> 4000bd84: 01 00 00 00 nop 4000bd88: 30 bf ff f9 b,a 4000bd6c 40016c04 : int nanosleep( const struct timespec *rqtp, struct timespec *rmtp ) { 40016c04: 9d e3 bf 98 save %sp, -104, %sp Watchdog_Interval ticks; if ( !_Timespec_Is_valid( rqtp ) ) 40016c08: 40 00 06 fc call 400187f8 <_Timespec_Is_valid> 40016c0c: 90 10 00 18 mov %i0, %o0 40016c10: 80 a2 20 00 cmp %o0, 0 40016c14: 02 80 00 4d be 40016d48 40016c18: 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 ) 40016c1c: c2 06 00 00 ld [ %i0 ], %g1 40016c20: 80 a0 60 00 cmp %g1, 0 40016c24: 06 80 00 49 bl 40016d48 40016c28: 01 00 00 00 nop 40016c2c: c2 06 20 04 ld [ %i0 + 4 ], %g1 40016c30: 80 a0 60 00 cmp %g1, 0 40016c34: 06 80 00 45 bl 40016d48 40016c38: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); ticks = _Timespec_To_ticks( rqtp ); 40016c3c: 40 00 07 00 call 4001883c <_Timespec_To_ticks> 40016c40: 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 ) { 40016c44: b0 92 20 00 orcc %o0, 0, %i0 40016c48: 02 80 00 2d be 40016cfc 40016c4c: 21 10 00 b6 sethi %hi(0x4002d800), %l0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40016c50: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 40016c54: 82 00 60 01 inc %g1 40016c58: c2 24 23 30 st %g1, [ %l0 + 0x330 ] /* * Block for the desired amount of time */ _Thread_Disable_dispatch(); _Thread_Set_state( 40016c5c: 23 10 00 b7 sethi %hi(0x4002dc00), %l1 40016c60: d0 04 60 0c ld [ %l1 + 0xc ], %o0 ! 4002dc0c <_Thread_Executing> 40016c64: 13 04 00 00 sethi %hi(0x10000000), %o1 40016c68: 7f ff ed 87 call 40012284 <_Thread_Set_state> 40016c6c: 92 12 60 08 or %o1, 8, %o1 ! 10000008 _Thread_Executing, STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL ); _Watchdog_Initialize( 40016c70: d2 04 60 0c ld [ %l1 + 0xc ], %o1 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40016c74: 03 10 00 45 sethi %hi(0x40011400), %g1 40016c78: c4 02 60 08 ld [ %o1 + 8 ], %g2 40016c7c: 82 10 61 48 or %g1, 0x148, %g1 the_watchdog->id = id; 40016c80: c4 22 60 68 st %g2, [ %o1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40016c84: c2 22 60 64 st %g1, [ %o1 + 0x64 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40016c88: f0 22 60 54 st %i0, [ %o1 + 0x54 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40016c8c: c0 22 60 50 clr [ %o1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40016c90: c0 22 60 6c clr [ %o1 + 0x6c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40016c94: 11 10 00 b7 sethi %hi(0x4002dc00), %o0 40016c98: 92 02 60 48 add %o1, 0x48, %o1 40016c9c: 7f ff ef af call 40012b58 <_Watchdog_Insert> 40016ca0: 90 12 20 2c or %o0, 0x2c, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40016ca4: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016ca8: 82 00 7f ff add %g1, -1, %g1 40016cac: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 40016cb0: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 40016cb4: 80 a0 a0 00 cmp %g2, 0 40016cb8: 02 80 00 2a be 40016d60 40016cbc: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40016cc0: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016cc4: 02 80 00 0c be 40016cf4 40016cc8: c2 04 60 0c ld [ %l1 + 0xc ], %g1 ticks -= _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40016ccc: 92 10 00 19 mov %i1, %o1 _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { ticks -= 40016cd0: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 40016cd4: e0 00 60 60 ld [ %g1 + 0x60 ], %l0 40016cd8: a0 24 00 02 sub %l0, %g2, %l0 40016cdc: a0 26 00 10 sub %i0, %l0, %l0 _Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time; _Timespec_From_ticks( ticks, rmtp ); 40016ce0: 40 00 06 b1 call 400187a4 <_Timespec_From_ticks> 40016ce4: 90 10 00 10 mov %l0, %o0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) 40016ce8: 80 a4 20 00 cmp %l0, 0 40016cec: 12 80 00 25 bne 40016d80 40016cf0: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINTR ); } return 0; } 40016cf4: 81 c7 e0 08 ret 40016cf8: 91 e8 20 00 restore %g0, 0, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40016cfc: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016d00: 82 00 60 01 inc %g1 40016d04: c2 24 23 30 st %g1, [ %l0 + 0x330 ] * consistent with the RTEMS API and yields desirable behavior. */ if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); 40016d08: 7f ff ee 67 call 400126a4 <_Thread_Yield_processor> 40016d0c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40016d10: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 40016d14: 82 00 7f ff add %g1, -1, %g1 40016d18: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 40016d1c: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 40016d20: 80 a0 a0 00 cmp %g2, 0 40016d24: 02 80 00 13 be 40016d70 40016d28: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( rmtp ) { 40016d2c: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016d30: 02 bf ff f1 be 40016cf4 40016d34: 01 00 00 00 nop rmtp->tv_sec = 0; rmtp->tv_nsec = 0; 40016d38: c0 26 60 04 clr [ %i1 + 4 ] if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { rmtp->tv_sec = 0; 40016d3c: c0 26 40 00 clr [ %i1 ] rmtp->tv_nsec = 0; 40016d40: 81 c7 e0 08 ret 40016d44: 91 e8 20 00 restore %g0, 0, %o0 * * 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 ) rtems_set_errno_and_return_minus_one( EINVAL ); 40016d48: 40 00 11 c1 call 4001b44c <__errno> 40016d4c: b0 10 3f ff mov -1, %i0 40016d50: 82 10 20 16 mov 0x16, %g1 40016d54: c2 22 00 00 st %g1, [ %o0 ] 40016d58: 81 c7 e0 08 ret 40016d5c: 81 e8 00 00 restore _Thread_Dispatch(); 40016d60: 7f ff ea 23 call 400115ec <_Thread_Dispatch> 40016d64: 01 00 00 00 nop _Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks ); _Thread_Enable_dispatch(); /* calculate time remaining */ if ( rmtp ) { 40016d68: 10 bf ff d7 b 40016cc4 40016d6c: 80 a6 60 00 cmp %i1, 0 40016d70: 7f ff ea 1f call 400115ec <_Thread_Dispatch> 40016d74: 01 00 00 00 nop if ( !ticks ) { _Thread_Disable_dispatch(); _Thread_Yield_processor(); _Thread_Enable_dispatch(); if ( rmtp ) { 40016d78: 10 bf ff ee b 40016d30 40016d7c: 80 a6 60 00 cmp %i1, 0 /* * If there is time remaining, then we were interrupted by a signal. */ if ( ticks ) rtems_set_errno_and_return_minus_one( EINTR ); 40016d80: 40 00 11 b3 call 4001b44c <__errno> 40016d84: b0 10 3f ff mov -1, %i0 40016d88: 82 10 20 04 mov 4, %g1 40016d8c: c2 22 00 00 st %g1, [ %o0 ] 40016d90: 81 c7 e0 08 ret 40016d94: 81 e8 00 00 restore 40003a68 : */ int newlib_free_buffers( FILE *fp ) { 40003a68: 9d e3 bf 98 save %sp, -104, %sp switch ( fileno(fp) ) { 40003a6c: 40 00 32 11 call 400102b0 40003a70: 90 10 00 18 mov %i0, %o0 40003a74: 80 a2 20 02 cmp %o0, 2 40003a78: 28 80 00 06 bleu,a 40003a90 40003a7c: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_flags &= ~__SMBF; fp->_bf._base = fp->_p = (unsigned char *) NULL; } break; default: fclose(fp); 40003a80: 40 00 31 92 call 400100c8 <== NOT EXECUTED 40003a84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } return 0; } 40003a88: 81 c7 e0 08 ret 40003a8c: 91 e8 20 00 restore %g0, 0, %o0 { switch ( fileno(fp) ) { case 0: case 1: case 2: if (fp->_flags & __SMBF) { 40003a90: 80 88 60 80 btst 0x80, %g1 40003a94: 02 bf ff fd be 40003a88 40003a98: 01 00 00 00 nop free( fp->_bf._base ); 40003a9c: 7f ff fe 61 call 40003420 40003aa0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 fp->_flags &= ~__SMBF; 40003aa4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003aa8: c0 26 20 10 clr [ %i0 + 0x10 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003aac: 82 08 7f 7f and %g1, -129, %g1 fp->_bf._base = fp->_p = (unsigned char *) NULL; 40003ab0: c0 26 00 00 clr [ %i0 ] case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 40003ab4: c2 36 20 0c sth %g1, [ %i0 + 0xc ] break; default: fclose(fp); } return 0; } 40003ab8: 81 c7 e0 08 ret 40003abc: 91 e8 20 00 restore %g0, 0, %o0 40003ae4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor, void *pargp ) { 40003ae4: 9d e3 bf 98 save %sp, -104, %sp rtems_device_driver status; if ( !initialized ) { 40003ae8: 05 10 00 7f sethi %hi(0x4001fc00), %g2 40003aec: c2 48 a1 d0 ldsb [ %g2 + 0x1d0 ], %g1 ! 4001fdd0 40003af0: 80 a0 60 00 cmp %g1, 0 40003af4: 02 80 00 04 be 40003b04 40003af8: 82 10 20 01 mov 1, %g1 NULL_major = major; } return RTEMS_SUCCESSFUL; } 40003afc: 81 c7 e0 08 ret 40003b00: 91 e8 20 00 restore %g0, 0, %o0 rtems_device_driver status; if ( !initialized ) { initialized = 1; status = rtems_io_register_name( 40003b04: 11 10 00 74 sethi %hi(0x4001d000), %o0 ) { rtems_device_driver status; if ( !initialized ) { initialized = 1; 40003b08: c2 28 a1 d0 stb %g1, [ %g2 + 0x1d0 ] status = rtems_io_register_name( 40003b0c: 90 12 22 f0 or %o0, 0x2f0, %o0 40003b10: 92 10 00 18 mov %i0, %o1 40003b14: 40 00 00 50 call 40003c54 40003b18: 94 10 20 00 clr %o2 "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) 40003b1c: 80 a2 20 00 cmp %o0, 0 40003b20: 12 80 00 05 bne 40003b34 40003b24: 03 10 00 7f sethi %hi(0x4001fc00), %g1 rtems_fatal_error_occurred(status); NULL_major = major; 40003b28: f0 20 63 84 st %i0, [ %g1 + 0x384 ] ! 4001ff84 } return RTEMS_SUCCESSFUL; } 40003b2c: 81 c7 e0 08 ret 40003b30: 91 e8 20 00 restore %g0, 0, %o0 major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred(status); 40003b34: 40 00 13 b0 call 400089f4 <== NOT EXECUTED 40003b38: 01 00 00 00 nop <== NOT EXECUTED NULL_major = major; 40003b3c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 <== NOT EXECUTED 40003b40: 10 bf ff fb b 40003b2c <== NOT EXECUTED 40003b44: f0 20 63 84 st %i0, [ %g1 + 0x384 ] ! 4001ff84 <== NOT EXECUTED 40003ac0 : void *pargp ) { rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp; if ( rw_args ) 40003ac0: 80 a2 a0 00 cmp %o2, 0 40003ac4: 02 80 00 04 be 40003ad4 40003ac8: 01 00 00 00 nop rw_args->bytes_moved = rw_args->count; 40003acc: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED 40003ad0: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED return NULL_SUCCESSFUL; } 40003ad4: 81 c3 e0 08 retl 40003ad8: 90 10 20 00 clr %o0 40003cec : int open( const char *pathname, int flags, ... ) { 40003cec: 9d e3 bf 80 save %sp, -128, %sp 40003cf0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 40003cf4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 40003cf8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 40003cfc: f4 27 a0 4c st %i2, [ %fp + 0x4c ] /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 40003d00: 82 06 60 01 add %i1, 1, %g1 if ( ( status & _FREAD ) == _FREAD ) eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003d04: 80 88 60 02 btst 2, %g1 * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD ) 40003d08: 82 08 60 01 and %g1, 1, %g1 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 40003d0c: 02 80 00 03 be 40003d18 40003d10: a1 28 60 02 sll %g1, 2, %l0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; 40003d14: a0 14 20 02 or %l0, 2, %l0 va_start(ap, flags); mode = va_arg( ap, int ); 40003d18: 82 07 a0 50 add %fp, 0x50, %g1 * descriptors are obtained using socket(), not open(). */ /* allocate a file control block */ iop = rtems_libio_allocate(); if ( iop == 0 ) { 40003d1c: b8 10 20 17 mov 0x17, %i4 * 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(); 40003d20: 40 00 25 fd call 4000d514 40003d24: c2 27 bf f4 st %g1, [ %fp + -12 ] if ( iop == 0 ) { 40003d28: ba 92 20 00 orcc %o0, 0, %i5 40003d2c: 02 80 00 62 be 40003eb4 40003d30: 92 10 00 10 mov %l0, %o1 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 40003d34: b6 07 bf e4 add %fp, -28, %i3 40003d38: 90 10 00 18 mov %i0, %o0 40003d3c: 94 10 00 1b mov %i3, %o2 40003d40: 7f ff fd 20 call 400031c0 40003d44: 96 10 20 01 mov 1, %o3 pathname, eval_flags, &loc, TRUE ); if ( status == -1 ) { 40003d48: 80 a2 3f ff cmp %o0, -1 40003d4c: 02 80 00 73 be 40003f18 40003d50: 82 0e 6a 00 and %i1, 0xa00, %g1 if ( status != 0 ) { /* The file did not exist */ rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 40003d54: b8 10 20 11 mov 0x11, %i4 40003d58: 80 a0 6a 00 cmp %g1, 0xa00 40003d5c: 02 80 00 62 be 40003ee4 40003d60: a0 10 00 1b mov %i3, %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003d64: c2 07 bf e8 ld [ %fp + -24 ], %g1 iop->file_info = loc.node_access; 40003d68: c4 07 bf e4 ld [ %fp + -28 ], %g2 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003d6c: c2 27 60 30 st %g1, [ %i5 + 0x30 ] iop->file_info = loc.node_access; 40003d70: c4 27 60 2c st %g2, [ %i5 + 0x2c ] iop->flags |= rtems_libio_fcntl_flags( flags ); 40003d74: e0 07 60 0c ld [ %i5 + 0xc ], %l0 40003d78: 40 00 26 25 call 4000d60c 40003d7c: 90 10 00 19 mov %i1, %o0 iop->pathinfo = loc; 40003d80: c2 07 bf e4 ld [ %fp + -28 ], %g1 if ( !iop->handlers->open_h ) { 40003d84: c4 07 60 30 ld [ %i5 + 0x30 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003d88: c2 27 60 10 st %g1, [ %i5 + 0x10 ] 40003d8c: c2 07 bf e8 ld [ %fp + -24 ], %g1 if ( !iop->handlers->open_h ) { 40003d90: c4 00 80 00 ld [ %g2 ], %g2 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 40003d94: c2 27 60 14 st %g1, [ %i5 + 0x14 ] 40003d98: c2 07 bf ec ld [ %fp + -20 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003d9c: 90 12 00 10 or %o0, %l0, %o0 iop->pathinfo = loc; 40003da0: c2 27 60 18 st %g1, [ %i5 + 0x18 ] 40003da4: c2 07 bf f0 ld [ %fp + -16 ], %g1 * returned by successful path evaluation. */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 40003da8: d0 27 60 0c st %o0, [ %i5 + 0xc ] iop->pathinfo = loc; if ( !iop->handlers->open_h ) { 40003dac: 80 a0 a0 00 cmp %g2, 0 40003db0: 02 80 00 54 be 40003f00 40003db4: c2 27 60 1c st %g1, [ %i5 + 0x1c ] rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 40003db8: 92 10 00 18 mov %i0, %o1 40003dbc: 96 10 00 1a mov %i2, %o3 40003dc0: 90 10 00 1d mov %i5, %o0 40003dc4: 9f c0 80 00 call %g2 40003dc8: 94 10 00 19 mov %i1, %o2 if ( rc ) 40003dcc: b8 92 20 00 orcc %o0, 0, %i4 40003dd0: 12 80 00 29 bne 40003e74 40003dd4: 80 8e 64 00 btst 0x400, %i1 /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 40003dd8: 02 80 00 16 be 40003e30 40003ddc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 rc = ftruncate( iop - rtems_libio_iops, 0 ); 40003de0: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 ! 4001bc18 40003de4: 92 10 20 00 clr %o1 40003de8: 84 27 40 02 sub %i5, %g2, %g2 40003dec: 85 38 a0 02 sra %g2, 2, %g2 40003df0: 87 28 a0 02 sll %g2, 2, %g3 40003df4: 83 28 a0 06 sll %g2, 6, %g1 40003df8: 82 20 40 03 sub %g1, %g3, %g1 40003dfc: 91 28 60 06 sll %g1, 6, %o0 40003e00: 90 22 00 01 sub %o0, %g1, %o0 40003e04: 87 2a 20 0c sll %o0, 0xc, %g3 40003e08: 90 02 00 03 add %o0, %g3, %o0 40003e0c: 90 02 00 02 add %o0, %g2, %o0 40003e10: 91 2a 20 04 sll %o0, 4, %o0 40003e14: 90 22 00 02 sub %o0, %g2, %o0 40003e18: 91 2a 20 02 sll %o0, 2, %o0 40003e1c: 40 00 24 dc call 4000d18c 40003e20: 90 20 80 08 sub %g2, %o0, %o0 if ( rc ) { 40003e24: b8 92 20 00 orcc %o0, 0, %i4 40003e28: 12 80 00 5a bne 40003f90 40003e2c: 01 00 00 00 nop if ( loc_to_free ) rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003e30: c6 04 20 18 ld [ %l0 + 0x18 ], %g3 40003e34: 86 27 40 03 sub %i5, %g3, %g3 40003e38: 87 38 e0 02 sra %g3, 2, %g3 40003e3c: 89 28 e0 02 sll %g3, 2, %g4 40003e40: 85 28 e0 06 sll %g3, 6, %g2 40003e44: 84 20 80 04 sub %g2, %g4, %g2 40003e48: 83 28 a0 06 sll %g2, 6, %g1 40003e4c: 82 20 40 02 sub %g1, %g2, %g1 40003e50: 89 28 60 0c sll %g1, 0xc, %g4 40003e54: 82 00 40 04 add %g1, %g4, %g1 40003e58: 82 00 40 03 add %g1, %g3, %g1 40003e5c: 83 28 60 04 sll %g1, 4, %g1 40003e60: 82 20 40 03 sub %g1, %g3, %g1 40003e64: 83 28 60 02 sll %g1, 2, %g1 40003e68: b0 20 c0 01 sub %g3, %g1, %i0 40003e6c: 81 c7 e0 08 ret 40003e70: 81 e8 00 00 restore /* * Single exit and clean up path. */ done: va_end(ap); 40003e74: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED if ( rc ) { if ( iop ) rtems_libio_free( iop ); 40003e78: 40 00 25 90 call 4000d4b8 <== NOT EXECUTED 40003e7c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED if ( loc_to_free ) 40003e80: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40003e84: 02 80 00 0c be 40003eb4 40003e88: 01 00 00 00 nop rtems_filesystem_freenode( loc_to_free ); 40003e8c: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003e90: 80 a0 60 00 cmp %g1, 0 40003e94: 02 80 00 08 be 40003eb4 40003e98: 01 00 00 00 nop 40003e9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40003ea0: 80 a0 60 00 cmp %g1, 0 40003ea4: 02 80 00 04 be 40003eb4 40003ea8: 01 00 00 00 nop 40003eac: 9f c0 40 00 call %g1 40003eb0: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( rc ); 40003eb4: 40 00 30 2f call 4000ff70 <__errno> 40003eb8: b0 10 3f ff mov -1, %i0 40003ebc: f8 22 00 00 st %i4, [ %o0 ] 40003ec0: 81 c7 e0 08 ret 40003ec4: 81 e8 00 00 restore } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); if ( rc ) { rc = errno; 40003ec8: 40 00 30 2a call 4000ff70 <__errno> 40003ecc: 01 00 00 00 nop 40003ed0: f8 02 00 00 ld [ %o0 ], %i4 */ done: va_end(ap); if ( rc ) { 40003ed4: 80 a7 20 00 cmp %i4, 0 40003ed8: 02 bf ff d6 be 40003e30 40003edc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40003ee0: a0 10 20 00 clr %l0 if ( iop ) 40003ee4: 80 a7 60 00 cmp %i5, 0 40003ee8: 22 bf ff e7 be,a 40003e84 40003eec: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED rtems_libio_free( iop ); 40003ef0: 40 00 25 72 call 4000d4b8 40003ef4: 90 10 00 1d mov %i5, %o0 if ( loc_to_free ) 40003ef8: 10 bf ff e3 b 40003e84 40003efc: 80 a4 20 00 cmp %l0, 0 rtems_filesystem_freenode( loc_to_free ); rtems_set_errno_and_return_minus_one( rc ); } return iop - rtems_libio_iops; 40003f00: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED done: va_end(ap); if ( rc ) { if ( iop ) 40003f04: 80 a7 60 00 cmp %i5, 0 <== NOT EXECUTED 40003f08: 12 bf ff fa bne 40003ef0 <== NOT EXECUTED 40003f0c: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED rtems_libio_free( iop ); if ( loc_to_free ) 40003f10: 10 bf ff dd b 40003e84 <== NOT EXECUTED 40003f14: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( pathname, eval_flags, &loc, TRUE ); if ( status == -1 ) { if ( errno != ENOENT ) { 40003f18: 40 00 30 16 call 4000ff70 <__errno> 40003f1c: 01 00 00 00 nop 40003f20: c2 02 00 00 ld [ %o0 ], %g1 40003f24: 80 a0 60 02 cmp %g1, 2 40003f28: 12 bf ff e8 bne 40003ec8 40003f2c: 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) ) { 40003f30: b8 10 20 02 mov 2, %i4 40003f34: 02 bf ff ec be 40003ee4 40003f38: a0 10 20 00 clr %l0 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 40003f3c: 13 3f ff e0 sethi %hi(0xffff8000), %o1 40003f40: 90 10 00 18 mov %i0, %o0 40003f44: 92 16 80 09 or %i2, %o1, %o1 40003f48: 94 10 20 00 clr %o2 40003f4c: 93 2a 60 10 sll %o1, 0x10, %o1 40003f50: 96 10 20 00 clr %o3 40003f54: 7f ff fe 41 call 40003858 40003f58: 93 32 60 10 srl %o1, 0x10, %o1 if ( rc ) { 40003f5c: 80 a2 20 00 cmp %o0, 0 40003f60: 12 bf ff da bne 40003ec8 40003f64: 90 10 00 18 mov %i0, %o0 rc = errno; goto done; } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE ); 40003f68: 92 10 20 00 clr %o1 40003f6c: 94 10 00 1b mov %i3, %o2 40003f70: 96 10 20 01 mov 1, %o3 40003f74: 7f ff fc 93 call 400031c0 40003f78: b8 10 20 0d mov 0xd, %i4 if ( status != 0 ) { /* The file did not exist */ 40003f7c: 80 a2 20 00 cmp %o0, 0 40003f80: 12 bf ff d9 bne 40003ee4 40003f84: a0 10 20 00 clr %l0 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 40003f88: 10 bf ff 78 b 40003d68 40003f8c: c2 07 bf e8 ld [ %fp + -24 ], %g1 */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40003f90: 40 00 2f f8 call 4000ff70 <__errno> <== NOT EXECUTED 40003f94: 01 00 00 00 nop <== NOT EXECUTED 40003f98: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 40003f9c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003fa0: 12 80 00 15 bne 40003ff4 <== NOT EXECUTED 40003fa4: 01 00 00 00 nop <== NOT EXECUTED close( iop - rtems_libio_iops ); 40003fa8: c4 04 20 18 ld [ %l0 + 0x18 ], %g2 <== NOT EXECUTED 40003fac: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED 40003fb0: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED 40003fb4: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED 40003fb8: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED 40003fbc: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40003fc0: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED 40003fc4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 40003fc8: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED 40003fcc: ba 10 20 00 clr %i5 <== NOT EXECUTED 40003fd0: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED 40003fd4: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED 40003fd8: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED 40003fdc: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 40003fe0: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED 40003fe4: 40 00 24 39 call 4000d0c8 <== NOT EXECUTED 40003fe8: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 40003fec: 10 bf ff bb b 40003ed8 <== NOT EXECUTED 40003ff0: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED */ if ( (flags & O_TRUNC) == O_TRUNC ) { rc = ftruncate( iop - rtems_libio_iops, 0 ); if ( rc ) { if(errno) rc = errno; 40003ff4: 40 00 2f df call 4000ff70 <__errno> <== NOT EXECUTED 40003ff8: 01 00 00 00 nop <== NOT EXECUTED 40003ffc: 10 bf ff eb b 40003fa8 <== NOT EXECUTED 40004000: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED 40003c70 : /* * This is a replaceable stub */ void open_dev_console(void) { 40003c70: 9d e3 bf 98 save %sp, -104, %sp int error_code = 'S' << 24 | 'T' << 16 | 'D' << 8; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 40003c74: 31 10 00 66 sethi %hi(0x40019800), %i0 40003c78: 92 10 20 00 clr %o1 40003c7c: 90 16 23 a8 or %i0, 0x3a8, %o0 40003c80: 40 00 00 1b call 40003cec 40003c84: 94 10 20 00 clr %o2 40003c88: 80 a2 3f ff cmp %o0, -1 40003c8c: 02 80 00 0f be 40003cc8 40003c90: 90 16 23 a8 or %i0, 0x3a8, %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) 40003c94: 92 10 20 01 mov 1, %o1 40003c98: 40 00 00 15 call 40003cec 40003c9c: 94 10 20 00 clr %o2 40003ca0: 80 a2 3f ff cmp %o0, -1 40003ca4: 02 80 00 0e be 40003cdc 40003ca8: 11 14 d5 11 sethi %hi(0x53544400), %o0 rtems_fatal_error_occurred( error_code | '1' ); if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40003cac: 90 16 23 a8 or %i0, 0x3a8, %o0 40003cb0: 92 10 20 01 mov 1, %o1 40003cb4: 40 00 00 0e call 40003cec 40003cb8: 94 10 20 00 clr %o2 40003cbc: 80 a2 3f ff cmp %o0, -1 40003cc0: 02 80 00 04 be 40003cd0 40003cc4: 31 14 d5 11 sethi %hi(0x53544400), %i0 40003cc8: 81 c7 e0 08 ret 40003ccc: 81 e8 00 00 restore rtems_fatal_error_occurred( error_code | '2' ); 40003cd0: b0 16 20 32 or %i0, 0x32, %i0 <== NOT EXECUTED 40003cd4: 40 00 0f b2 call 40007b9c <== NOT EXECUTED 40003cd8: 81 e8 00 00 restore <== NOT EXECUTED /* * But if we find /dev/console once, we better find it twice more * or something is REALLY wrong. */ if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1) rtems_fatal_error_occurred( error_code | '1' ); 40003cdc: 40 00 0f b0 call 40007b9c <== NOT EXECUTED 40003ce0: 90 12 20 31 or %o0, 0x31, %o0 <== NOT EXECUTED if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 40003ce4: 10 bf ff f3 b 40003cb0 <== NOT EXECUTED 40003ce8: 90 16 23 a8 or %i0, 0x3a8, %o0 <== NOT EXECUTED 4001a850 : * open a directory. */ DIR * opendir(name) const char *name; { 4001a850: 9d e3 bf 98 save %sp, -104, %sp register DIR *dirp; register int fd; if ((fd = open(name, 0)) == -1) 4001a854: 92 10 20 00 clr %o1 4001a858: 90 10 00 18 mov %i0, %o0 4001a85c: 7f ff b2 65 call 400071f0 4001a860: b0 10 20 00 clr %i0 4001a864: 80 a2 3f ff cmp %o0, -1 4001a868: 02 80 00 18 be 4001a8c8 4001a86c: a0 10 00 08 mov %o0, %l0 return NULL; if (fcntl(fd, F_SETFD, 1) == -1 || 4001a870: 92 10 20 02 mov 2, %o1 4001a874: 40 00 29 4e call 40024dac 4001a878: 94 10 20 01 mov 1, %o2 4001a87c: 80 a2 3f ff cmp %o0, -1 4001a880: 02 80 00 15 be 4001a8d4 4001a884: 90 10 00 10 mov %l0, %o0 4001a888: 7f ff af 9a call 400066f0 4001a88c: 90 10 20 18 mov 0x18, %o0 4001a890: 80 a2 20 00 cmp %o0, 0 4001a894: 22 80 00 10 be,a 4001a8d4 4001a898: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a89c: b0 10 00 08 mov %o0, %i0 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 4001a8a0: 7f ff af 94 call 400066f0 4001a8a4: 90 10 22 00 mov 0x200, %o0 dirp->dd_len = 512; 4001a8a8: 82 10 22 00 mov 0x200, %g1 * If CLSIZE is an exact multiple of DIRBLKSIZ, use a CLSIZE * buffer that it cluster boundary aligned. * Hopefully this can be a big win someday by allowing page trades * to user space to be done by getdirentries() */ dirp->dd_buf = malloc (512); 4001a8ac: d0 26 20 0c st %o0, [ %i0 + 0xc ] dirp->dd_len = 512; if (dirp->dd_buf == NULL) { 4001a8b0: 80 a2 20 00 cmp %o0, 0 4001a8b4: 02 80 00 07 be 4001a8d0 4001a8b8: c2 26 20 10 st %g1, [ %i0 + 0x10 ] close (fd); return NULL; } dirp->dd_fd = fd; 4001a8bc: e0 26 00 00 st %l0, [ %i0 ] dirp->dd_loc = 0; 4001a8c0: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_seek = 0; 4001a8c4: c0 26 20 14 clr [ %i0 + 0x14 ] /* * Set up seek point for rewinddir. */ return dirp; } 4001a8c8: 81 c7 e0 08 ret 4001a8cc: 81 e8 00 00 restore */ dirp->dd_buf = malloc (512); dirp->dd_len = 512; if (dirp->dd_buf == NULL) { close (fd); 4001a8d0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001a8d4: 7f ff ad 7f call 40005ed0 <== NOT EXECUTED 4001a8d8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001a8dc: 81 c7 e0 08 ret <== NOT EXECUTED 4001a8e0: 81 e8 00 00 restore <== NOT EXECUTED 40004b9c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 40004b9c: 9d e3 bf 98 save %sp, -104, %sp int i; if (tty->termios.c_oflag & OPOST) { 40004ba0: c6 06 60 34 ld [ %i1 + 0x34 ], %g3 40004ba4: 80 88 e0 01 btst 1, %g3 40004ba8: 02 80 00 10 be 40004be8 40004bac: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] switch (c) { 40004bb0: b0 0e 20 ff and %i0, 0xff, %i0 40004bb4: 80 a6 20 09 cmp %i0, 9 40004bb8: 22 80 00 28 be,a 40004c58 40004bbc: c8 06 60 28 ld [ %i1 + 0x28 ], %g4 40004bc0: 18 80 00 10 bgu 40004c00 40004bc4: 80 a6 20 0a cmp %i0, 0xa 40004bc8: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED 40004bcc: 12 80 00 11 bne 40004c10 <== NOT EXECUTED 40004bd0: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 40004bd4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004bd8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004bdc: 04 80 00 03 ble 40004be8 <== NOT EXECUTED 40004be0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->column--; 40004be4: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004be8: 94 10 00 19 mov %i1, %o2 40004bec: 90 07 a0 44 add %fp, 0x44, %o0 40004bf0: 7f ff ff 96 call 40004a48 40004bf4: 92 10 20 01 mov 1, %o1 40004bf8: 81 c7 e0 08 ret 40004bfc: 81 e8 00 00 restore oproc (unsigned char c, struct rtems_termios_tty *tty) { int i; if (tty->termios.c_oflag & OPOST) { switch (c) { 40004c00: 02 80 00 24 be 40004c90 40004c04: 80 a6 20 0d cmp %i0, 0xd 40004c08: 02 80 00 2f be 40004cc4 40004c0c: 80 88 e0 02 btst 2, %g3 if (tty->column > 0) tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 40004c10: 02 80 00 08 be 40004c30 40004c14: 07 10 00 6c sethi %hi(0x4001b000), %g3 c = toupper(c); 40004c18: c4 00 e3 78 ld [ %g3 + 0x378 ], %g2 ! 4001b378 <__ctype_ptr> <== NOT EXECUTED 40004c1c: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED 40004c20: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40004c24: 32 80 00 02 bne,a 40004c2c <== NOT EXECUTED 40004c28: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED 40004c2c: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED if (!iscntrl(c)) 40004c30: c2 00 e3 78 ld [ %g3 + 0x378 ], %g1 40004c34: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2 40004c38: c6 08 80 01 ldub [ %g2 + %g1 ], %g3 40004c3c: 80 88 e0 20 btst 0x20, %g3 40004c40: 12 bf ff eb bne 40004bec 40004c44: 94 10 00 19 mov %i1, %o2 tty->column++; 40004c48: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 40004c4c: 82 00 60 01 inc %g1 40004c50: 10 bf ff e7 b 40004bec 40004c54: c2 26 60 28 st %g1, [ %i1 + 0x28 ] tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004c58: 05 00 00 06 sethi %hi(0x1800), %g2 40004c5c: 82 08 c0 02 and %g3, %g2, %g1 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004c60: 86 09 20 07 and %g4, 7, %g3 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004c64: 80 a0 40 02 cmp %g1, %g2 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 40004c68: 82 10 20 08 mov 8, %g1 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 40004c6c: 02 80 00 25 be 40004d00 40004c70: 92 20 40 03 sub %g1, %g3, %o1 tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004c74: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004c78: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i; 40004c7c: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty); 40004c80: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED 40004c84: 7f ff ff 71 call 40004a48 <== NOT EXECUTED 40004c88: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40004c8c: 30 80 00 23 b,a 40004d18 <== NOT EXECUTED int i; if (tty->termios.c_oflag & OPOST) { switch (c) { case '\n': if (tty->termios.c_oflag & ONLRET) 40004c90: 80 88 e0 20 btst 0x20, %g3 40004c94: 32 80 00 02 bne,a 40004c9c 40004c98: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED tty->column = 0; if (tty->termios.c_oflag & ONLCR) { 40004c9c: 80 88 e0 04 btst 4, %g3 40004ca0: 02 bf ff d3 be 40004bec 40004ca4: 94 10 00 19 mov %i1, %o2 rtems_termios_puts ("\r", 1, tty); 40004ca8: 11 10 00 67 sethi %hi(0x40019c00), %o0 40004cac: 92 10 20 01 mov 1, %o1 40004cb0: 90 12 22 a0 or %o0, 0x2a0, %o0 40004cb4: 7f ff ff 65 call 40004a48 40004cb8: 94 10 00 19 mov %i1, %o2 tty->column = 0; 40004cbc: 10 bf ff cb b 40004be8 40004cc0: c0 26 60 28 clr [ %i1 + 0x28 ] } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 40004cc4: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED 40004cc8: 02 80 00 06 be 40004ce0 <== NOT EXECUTED 40004ccc: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED 40004cd0: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED 40004cd4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004cd8: 02 bf ff c8 be 40004bf8 <== NOT EXECUTED 40004cdc: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 40004ce0: 22 bf ff c2 be,a 40004be8 <== NOT EXECUTED 40004ce4: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED c = '\n'; 40004ce8: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 40004cec: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED 40004cf0: 02 bf ff be be 40004be8 <== NOT EXECUTED 40004cf4: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED tty->column = 0; break; } tty->column = 0; 40004cf8: 10 bf ff bc b 40004be8 <== NOT EXECUTED 40004cfc: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40004d00: 82 02 40 04 add %o1, %g4, %g1 rtems_termios_puts ( " ", i, tty); 40004d04: 94 10 00 19 mov %i1, %o2 break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; 40004d08: c2 26 60 28 st %g1, [ %i1 + 0x28 ] rtems_termios_puts ( " ", i, tty); 40004d0c: 11 10 00 67 sethi %hi(0x40019c00), %o0 40004d10: 7f ff ff 4e call 40004a48 40004d14: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 40019ea8 40004d18: 81 c7 e0 08 ret 40004d1c: 81 e8 00 00 restore 40006de0 : */ int pthread_barrier_destroy( pthread_barrier_t *barrier ) { 40006de0: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40006de4: 80 a6 20 00 cmp %i0, 0 40006de8: 02 80 00 23 be 40006e74 40006dec: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40006df0: d2 06 00 00 ld [ %i0 ], %o1 40006df4: 31 10 00 76 sethi %hi(0x4001d800), %i0 40006df8: 40 00 0d 56 call 4000a350 <_Objects_Get> 40006dfc: 90 16 23 40 or %i0, 0x340, %o0 ! 4001db40 <_POSIX_Barrier_Information> return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40006e00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e04: 80 a0 60 00 cmp %g1, 0 40006e08: 12 80 00 14 bne 40006e58 40006e0c: 92 10 00 08 mov %o0, %o1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( the_barrier->Barrier.number_of_waiting_threads != 0 ) { 40006e10: c2 02 20 58 ld [ %o0 + 0x58 ], %g1 40006e14: 80 a0 60 00 cmp %g1, 0 40006e18: 02 80 00 1a be 40006e80 40006e1c: 90 16 23 40 or %i0, 0x340, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e20: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006e24: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40006e28: 90 10 20 10 mov 0x10, %o0 40006e2c: 84 00 bf ff add %g2, -1, %g2 40006e30: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40006e34: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40006e38: 80 a0 e0 00 cmp %g3, 0 40006e3c: 12 80 00 0c bne 40006e6c 40006e40: 01 00 00 00 nop _Thread_Dispatch(); 40006e44: 40 00 12 2f call 4000b700 <_Thread_Dispatch> 40006e48: 01 00 00 00 nop 40006e4c: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006e50: 81 c7 e0 08 ret 40006e54: 91 e8 00 08 restore %g0, %o0, %o0 if ( !barrier ) return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40006e58: 80 a0 60 02 cmp %g1, 2 40006e5c: 08 80 00 07 bleu 40006e78 40006e60: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e64: 40 00 02 45 call 40007778 <== NOT EXECUTED 40006e68: 01 00 00 00 nop <== NOT EXECUTED } 40006e6c: 81 c7 e0 08 ret 40006e70: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e74: 90 10 20 16 mov 0x16, %o0 } 40006e78: 81 c7 e0 08 ret 40006e7c: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006e80: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006e84: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006e88: 05 00 00 3f sethi %hi(0xfc00), %g2 40006e8c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006e90: 82 08 40 02 and %g1, %g2, %g1 40006e94: 80 a0 40 03 cmp %g1, %g3 40006e98: 18 80 00 04 bgu 40006ea8 40006e9c: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40006ea0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006ea4: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Barrier_Free ( POSIX_Barrier_Control *the_barrier ) { _Objects_Free( &_POSIX_Barrier_Information, &the_barrier->Object ); 40006ea8: 40 00 0c e7 call 4000a244 <_Objects_Free> 40006eac: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006eb0: 03 10 00 75 sethi %hi(0x4001d400), %g1 40006eb4: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40006eb8: 90 10 20 00 clr %o0 40006ebc: 84 00 bf ff add %g2, -1, %g2 40006ec0: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40006ec4: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40006ec8: 80 a0 e0 00 cmp %g3, 0 40006ecc: 12 bf ff e8 bne 40006e6c 40006ed0: 01 00 00 00 nop _Thread_Dispatch(); 40006ed4: 40 00 12 0b call 4000b700 <_Thread_Dispatch> 40006ed8: 01 00 00 00 nop 40006edc: 10 bf ff e4 b 40006e6c 40006ee0: 90 10 20 00 clr %o0 ! 0 40006ee4 : int pthread_barrier_init( pthread_barrier_t *barrier, const pthread_barrierattr_t *attr, unsigned int count ) { 40006ee4: 9d e3 bf 88 save %sp, -120, %sp const pthread_barrierattr_t *the_attr; /* * Error check parameters */ if ( !barrier ) 40006ee8: 80 a6 20 00 cmp %i0, 0 40006eec: 02 80 00 27 be 40006f88 40006ef0: a0 10 00 19 mov %i1, %l0 return EINVAL; if ( count == 0 ) 40006ef4: 80 a6 a0 00 cmp %i2, 0 40006ef8: 02 80 00 24 be 40006f88 40006efc: 80 a6 60 00 cmp %i1, 0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40006f00: 22 80 00 25 be,a 40006f94 40006f04: a0 07 bf e8 add %fp, -24, %l0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40006f08: c2 04 00 00 ld [ %l0 ], %g1 40006f0c: 80 a0 60 00 cmp %g1, 0 40006f10: 22 80 00 1c be,a 40006f80 40006f14: b0 10 20 16 mov 0x16, %i0 return EINVAL; switch ( the_attr->process_shared ) { 40006f18: c2 04 20 04 ld [ %l0 + 4 ], %g1 40006f1c: 80 a0 60 00 cmp %g1, 0 40006f20: 32 80 00 18 bne,a 40006f80 40006f24: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006f28: 33 10 00 75 sethi %hi(0x4001d400), %i1 40006f2c: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 ! 4001d690 <_Thread_Dispatch_disable_level> /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; the_attributes.maximum_count = count; 40006f30: f4 27 bf f4 st %i2, [ %fp + -12 ] 40006f34: 82 00 60 01 inc %g1 } /* * Convert from POSIX attributes to Core Barrier attributes */ the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40006f38: c0 27 bf f0 clr [ %fp + -16 ] 40006f3c: c2 26 62 90 st %g1, [ %i1 + 0x290 ] * 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 *) 40006f40: 35 10 00 76 sethi %hi(0x4001d800), %i2 40006f44: 40 00 0b b2 call 40009e0c <_Objects_Allocate> 40006f48: 90 16 a3 40 or %i2, 0x340, %o0 ! 4001db40 <_POSIX_Barrier_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _POSIX_Barrier_Allocate(); if ( !the_barrier ) { 40006f4c: a0 92 20 00 orcc %o0, 0, %l0 40006f50: 12 80 00 15 bne 40006fa4 40006f54: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006f58: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 40006f5c: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006f60: 82 00 7f ff add %g1, -1, %g1 40006f64: c2 26 62 90 st %g1, [ %i1 + 0x290 ] 40006f68: c4 06 62 90 ld [ %i1 + 0x290 ], %g2 40006f6c: 80 a0 a0 00 cmp %g2, 0 40006f70: 12 80 00 07 bne 40006f8c 40006f74: 01 00 00 00 nop 40006f78: 40 00 11 e2 call 4000b700 <_Thread_Dispatch> 40006f7c: 01 00 00 00 nop 40006f80: 81 c7 e0 08 ret 40006f84: 81 e8 00 00 restore 40006f88: b0 10 20 16 mov 0x16, %i0 * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; } 40006f8c: 81 c7 e0 08 ret 40006f90: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_barrierattr_init( &my_attr ); 40006f94: 7f ff ff 7d call 40006d88 40006f98: 90 10 00 10 mov %l0, %o0 } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40006f9c: 10 bf ff dc b 40006f0c 40006fa0: c2 04 00 00 ld [ %l0 ], %g1 if ( !the_barrier ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40006fa4: 40 00 08 d9 call 40009308 <_CORE_barrier_Initialize> 40006fa8: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006fac: 90 16 a3 40 or %i2, 0x340, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006fb0: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006fb4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006fb8: 03 00 00 3f sethi %hi(0xfc00), %g1 40006fbc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006fc0: 82 08 c0 01 and %g3, %g1, %g1 40006fc4: 80 a0 40 02 cmp %g1, %g2 40006fc8: 38 80 00 06 bgu,a 40006fe0 40006fcc: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006fd0: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006fd4: 83 28 60 02 sll %g1, 2, %g1 40006fd8: e0 20 80 01 st %l0, [ %g2 + %g1 ] ); /* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; 40006fdc: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006fe0: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006fe4: c2 06 62 90 ld [ %i1 + 0x290 ], %g1 40006fe8: 10 bf ff de b 40006f60 40006fec: b0 10 20 00 clr %i0 40006ff0 : */ int pthread_barrier_wait( pthread_barrier_t *barrier ) { 40006ff0: 9d e3 bf 90 save %sp, -112, %sp POSIX_Barrier_Control *the_barrier = NULL; Objects_Locations location; if ( !barrier ) 40006ff4: 80 a6 20 00 cmp %i0, 0 40006ff8: 02 80 00 24 be 40007088 40006ffc: 11 10 00 76 sethi %hi(0x4001d800), %o0 RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get ( pthread_barrier_t *barrier, Objects_Locations *location ) { return (POSIX_Barrier_Control *) _Objects_Get( 40007000: d2 06 00 00 ld [ %i0 ], %o1 40007004: 94 07 bf f4 add %fp, -12, %o2 40007008: 40 00 0c d2 call 4000a350 <_Objects_Get> 4000700c: 90 12 23 40 or %o0, 0x340, %o0 return EINVAL; the_barrier = _POSIX_Barrier_Get( barrier, &location ); switch ( location ) { 40007010: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007014: 80 a0 60 00 cmp %g1, 0 40007018: 22 80 00 09 be,a 4000703c 4000701c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40007020: 80 a0 60 02 cmp %g1, 2 40007024: 08 80 00 1a bleu 4000708c 40007028: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 4000702c: 40 00 01 d3 call 40007778 <== NOT EXECUTED 40007030: 01 00 00 00 nop <== NOT EXECUTED } 40007034: 81 c7 e0 08 ret <== NOT EXECUTED 40007038: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_barrier_Wait( 4000703c: 94 10 20 01 mov 1, %o2 40007040: 90 02 20 10 add %o0, 0x10, %o0 40007044: 96 10 20 00 clr %o3 40007048: 40 00 08 bc call 40009338 <_CORE_barrier_Wait> 4000704c: 98 10 20 00 clr %o4 40007050: 03 10 00 75 sethi %hi(0x4001d400), %g1 40007054: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 4001d690 <_Thread_Dispatch_disable_level> 40007058: 84 00 bf ff add %g2, -1, %g2 4000705c: c4 20 62 90 st %g2, [ %g1 + 0x290 ] 40007060: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 40007064: 80 a0 e0 00 cmp %g3, 0 40007068: 02 80 00 0b be 40007094 4000706c: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 40007070: 03 10 00 75 sethi %hi(0x4001d400), %g1 <== NOT EXECUTED 40007074: c4 00 63 6c ld [ %g1 + 0x36c ], %g2 ! 4001d76c <_Thread_Executing> 40007078: 40 00 20 1a call 4000f0e0 <_POSIX_Barrier_Translate_core_barrier_return_code> 4000707c: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007080: 81 c7 e0 08 ret 40007084: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007088: 90 10 20 16 mov 0x16, %o0 } 4000708c: 81 c7 e0 08 ret 40007090: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007094: 40 00 11 9b call 4000b700 <_Thread_Dispatch> 40007098: 01 00 00 00 nop TRUE, 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_Barrier_Translate_core_barrier_return_code( 4000709c: 10 bf ff f6 b 40007074 400070a0: 03 10 00 75 sethi %hi(0x4001d400), %g1 400064c8 : */ int pthread_cancel( pthread_t thread ) { 400064c8: 9d e3 bf 90 save %sp, -112, %sp /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 400064cc: 03 10 00 63 sethi %hi(0x40018c00), %g1 400064d0: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> */ int pthread_cancel( pthread_t thread ) { 400064d4: 92 10 00 18 mov %i0, %o1 /* * Don't even think about deleting a resource from an ISR. */ if ( _ISR_Is_in_progress() ) 400064d8: 80 a0 a0 00 cmp %g2, 0 400064dc: 12 80 00 11 bne 40006520 400064e0: 90 10 20 47 mov 0x47, %o0 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400064e4: 11 10 00 64 sethi %hi(0x40019000), %o0 400064e8: 94 07 bf f4 add %fp, -12, %o2 400064ec: 40 00 0d aa call 40009b94 <_Objects_Get> 400064f0: 90 12 21 b8 or %o0, 0x1b8, %o0 return EPROTO; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400064f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400064f8: 80 a0 60 01 cmp %g1, 1 400064fc: 02 80 00 22 be 40006584 40006500: 01 00 00 00 nop 40006504: 2a 80 00 09 bcs,a 40006528 40006508: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 4000650c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006510: 02 80 00 04 be 40006520 <== NOT EXECUTED 40006514: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006518: 40 00 02 d9 call 4000707c <== NOT EXECUTED 4000651c: 01 00 00 00 nop <== NOT EXECUTED } 40006520: 81 c7 e0 08 ret <== NOT EXECUTED 40006524: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); case OBJECTS_LOCAL: thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ]; thread_support->cancelation_requested = 1; 40006528: 82 10 20 01 mov 1, %g1 if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 4000652c: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40006530: 80 a0 a0 00 cmp %g2, 0 40006534: 12 80 00 06 bne 4000654c 40006538: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ] 4000653c: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40006540: 80 a0 60 01 cmp %g1, 1 40006544: 02 80 00 14 be 40006594 40006548: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000654c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006550: c4 00 62 d0 ld [ %g1 + 0x2d0 ], %g2 ! 40018ed0 <_Thread_Dispatch_disable_level> 40006554: 90 10 20 00 clr %o0 40006558: 84 00 bf ff add %g2, -1, %g2 4000655c: c4 20 62 d0 st %g2, [ %g1 + 0x2d0 ] 40006560: c6 00 62 d0 ld [ %g1 + 0x2d0 ], %g3 40006564: 80 a0 e0 00 cmp %g3, 0 40006568: 12 bf ff ee bne 40006520 4000656c: 01 00 00 00 nop _Thread_Dispatch(); 40006570: 40 00 12 75 call 4000af44 <_Thread_Dispatch> 40006574: 01 00 00 00 nop 40006578: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000657c: 81 c7 e0 08 ret 40006580: 91 e8 00 08 restore %g0, %o0, %o0 the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { case OBJECTS_ERROR: return EINVAL; case OBJECTS_REMOTE: return POSIX_MP_NOT_IMPLEMENTED(); 40006584: 40 00 02 c8 call 400070a4 <== NOT EXECUTED 40006588: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000658c: 81 c7 e0 08 ret <== NOT EXECUTED 40006590: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED thread_support->cancelation_requested = 1; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS ) { _POSIX_Threads_cancel_run( the_thread ); 40006594: 40 00 00 03 call 400065a0 <_POSIX_Threads_cancel_run> 40006598: 01 00 00 00 nop 4000659c: 30 bf ff ec b,a 4000654c 4000778c : */ int pthread_cond_destroy( pthread_cond_t *cond ) { 4000778c: 9d e3 bf 90 save %sp, -112, %sp ) { Objects_Id *id = (Objects_Id *)cond; int status; if ( !id ) { 40007790: 80 a6 20 00 cmp %i0, 0 40007794: 32 80 00 05 bne,a 400077a8 40007798: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4000779c: 90 10 20 16 mov 0x16, %o0 } 400077a0: 81 c7 e0 08 ret 400077a4: 91 e8 00 08 restore %g0, %o0, %o0 *location = OBJECTS_ERROR; return (POSIX_Condition_variables_Control *) 0; } if ( *id == PTHREAD_COND_INITIALIZER ) { 400077a8: 80 a2 7f ff cmp %o1, -1 400077ac: 02 80 00 3d be 400078a0 400077b0: 90 10 00 18 mov %i0, %o0 /* * Now call Objects_Get() */ return (POSIX_Condition_variables_Control *) 400077b4: 21 10 00 6a sethi %hi(0x4001a800), %l0 400077b8: 94 07 bf f4 add %fp, -12, %o2 400077bc: 40 00 10 02 call 4000b7c4 <_Objects_Get> 400077c0: 90 14 21 bc or %l0, 0x1bc, %o0 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 400077c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400077c8: 80 a0 60 00 cmp %g1, 0 400077cc: 12 80 00 14 bne 4000781c 400077d0: b0 10 00 08 mov %o0, %i0 return EINVAL; case OBJECTS_LOCAL: if ( _Thread_queue_First( &the_cond->Wait_queue ) ) { 400077d4: 40 00 17 5e call 4000d54c <_Thread_queue_First> 400077d8: 90 02 20 18 add %o0, 0x18, %o0 400077dc: 80 a2 20 00 cmp %o0, 0 400077e0: 02 80 00 15 be 40007834 400077e4: 90 14 21 bc or %l0, 0x1bc, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400077e8: 03 10 00 69 sethi %hi(0x4001a400), %g1 400077ec: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 400077f0: 90 10 20 10 mov 0x10, %o0 400077f4: 84 00 bf ff add %g2, -1, %g2 400077f8: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 400077fc: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007800: 80 a0 e0 00 cmp %g3, 0 40007804: 12 bf ff e7 bne 400077a0 40007808: 01 00 00 00 nop _Thread_Dispatch(); 4000780c: 40 00 14 da call 4000cb74 <_Thread_Dispatch> 40007810: 01 00 00 00 nop 40007814: 10 bf ff e3 b 400077a0 40007818: 90 10 20 10 mov 0x10, %o0 ! 10 { POSIX_Condition_variables_Control *the_cond; Objects_Locations location; the_cond = _POSIX_Condition_variables_Get( cond, &location ); switch ( location ) { 4000781c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007820: 28 bf ff e0 bleu,a 400077a0 <== NOT EXECUTED 40007824: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007828: 40 00 05 3f call 40008d24 <== NOT EXECUTED 4000782c: 01 00 00 00 nop <== NOT EXECUTED 40007830: 30 bf ff dc b,a 400077a0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40007834: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007838: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000783c: 05 00 00 3f sethi %hi(0xfc00), %g2 40007840: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40007844: 82 08 40 02 and %g1, %g2, %g1 40007848: 80 a0 40 03 cmp %g1, %g3 4000784c: 38 80 00 06 bgu,a 40007864 40007850: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007854: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007858: 83 28 60 02 sll %g1, 2, %g1 4000785c: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40007860: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( POSIX_Condition_variables_Control *the_condition_variable ) { _Objects_Free( 40007864: 40 00 0f 95 call 4000b6b8 <_Objects_Free> 40007868: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000786c: 03 10 00 69 sethi %hi(0x4001a400), %g1 40007870: c4 00 60 70 ld [ %g1 + 0x70 ], %g2 ! 4001a470 <_Thread_Dispatch_disable_level> 40007874: 90 10 20 00 clr %o0 40007878: 84 00 bf ff add %g2, -1, %g2 4000787c: c4 20 60 70 st %g2, [ %g1 + 0x70 ] 40007880: c6 00 60 70 ld [ %g1 + 0x70 ], %g3 40007884: 80 a0 e0 00 cmp %g3, 0 40007888: 12 bf ff c6 bne 400077a0 4000788c: 01 00 00 00 nop _Thread_Dispatch(); 40007890: 40 00 14 b9 call 4000cb74 <_Thread_Dispatch> 40007894: 01 00 00 00 nop 40007898: 10 bf ff c2 b 400077a0 4000789c: 90 10 20 00 clr %o0 ! 0 if ( *id == PTHREAD_COND_INITIALIZER ) { /* * Do an "auto-create" here. */ status = pthread_cond_init( (pthread_cond_t *)id, 0 ); 400078a0: 40 00 00 07 call 400078bc <== NOT EXECUTED 400078a4: 92 10 20 00 clr %o1 <== NOT EXECUTED if ( status ) { 400078a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400078ac: 12 bf ff bd bne 400077a0 <== NOT EXECUTED 400078b0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400078b4: 10 bf ff c0 b 400077b4 <== NOT EXECUTED 400078b8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400078bc : int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 400078bc: 9d e3 bf 98 save %sp, -104, %sp POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 400078c0: 03 10 00 61 sethi %hi(0x40018400), %g1 int pthread_cond_init( pthread_cond_t *cond, const pthread_condattr_t *attr ) { 400078c4: a6 10 00 18 mov %i0, %l3 POSIX_Condition_variables_Control *the_cond; const pthread_condattr_t *the_attr; if ( attr ) the_attr = attr; 400078c8: 80 a6 60 00 cmp %i1, 0 400078cc: 02 80 00 03 be 400078d8 400078d0: a0 10 61 94 or %g1, 0x194, %l0 400078d4: a0 10 00 19 mov %i1, %l0 /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 400078d8: c2 04 20 04 ld [ %l0 + 4 ], %g1 400078dc: 80 a0 60 01 cmp %g1, 1 400078e0: 02 80 00 3d be 400079d4 400078e4: 01 00 00 00 nop return POSIX_MP_NOT_IMPLEMENTED(); if ( !the_attr->is_initialized ) 400078e8: c2 04 00 00 ld [ %l0 ], %g1 400078ec: 80 a0 60 00 cmp %g1, 0 400078f0: 02 80 00 16 be 40007948 400078f4: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400078f8: 23 10 00 69 sethi %hi(0x4001a400), %l1 400078fc: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 ! 4001a470 <_Thread_Dispatch_disable_level> 40007900: 82 00 60 01 inc %g1 40007904: c2 24 60 70 st %g1, [ %l1 + 0x70 ] */ RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Allocate( void ) { return (POSIX_Condition_variables_Control *) 40007908: 25 10 00 6a sethi %hi(0x4001a800), %l2 4000790c: 40 00 0e 5d call 4000b280 <_Objects_Allocate> 40007910: 90 14 a1 bc or %l2, 0x1bc, %o0 ! 4001a9bc <_POSIX_Condition_variables_Information> _Thread_Disable_dispatch(); the_cond = _POSIX_Condition_variables_Allocate(); if ( !the_cond ) { 40007914: b2 92 20 00 orcc %o0, 0, %i1 40007918: 32 80 00 0e bne,a 40007950 4000791c: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007920: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 40007924: b0 10 20 0c mov 0xc, %i0 40007928: 82 00 7f ff add %g1, -1, %g1 4000792c: c2 24 60 70 st %g1, [ %l1 + 0x70 ] 40007930: c4 04 60 70 ld [ %l1 + 0x70 ], %g2 40007934: 80 a0 a0 00 cmp %g2, 0 40007938: 12 80 00 25 bne 400079cc 4000793c: 01 00 00 00 nop _Thread_Dispatch(); 40007940: 40 00 14 8d call 4000cb74 <_Thread_Dispatch> 40007944: 01 00 00 00 nop 40007948: 81 c7 e0 08 ret 4000794c: 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( 40007950: 90 06 60 18 add %i1, 0x18, %o0 _Thread_Enable_dispatch(); return EAGAIN; } #endif the_cond->process_shared = the_attr->process_shared; 40007954: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 40007958: c0 26 60 14 clr [ %i1 + 0x14 ] /* XXX some more initialization might need to go here */ _Thread_queue_Initialize( 4000795c: 92 10 20 00 clr %o1 40007960: 94 10 28 00 mov 0x800, %o2 40007964: 40 00 17 24 call 4000d5f4 <_Thread_queue_Initialize> 40007968: 96 10 20 74 mov 0x74, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000796c: 90 14 a1 bc or %l2, 0x1bc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40007970: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007974: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40007978: 03 00 00 3f sethi %hi(0xfc00), %g1 4000797c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007980: 82 08 c0 01 and %g3, %g1, %g1 40007984: 80 a0 40 02 cmp %g1, %g2 40007988: 38 80 00 06 bgu,a 400079a0 4000798c: c6 24 c0 00 st %g3, [ %l3 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007990: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007994: 83 28 60 02 sll %g1, 2, %g1 40007998: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Condition_variables_Information, &the_cond->Object, 0 ); *cond = the_cond->Object.id; 4000799c: c6 24 c0 00 st %g3, [ %l3 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400079a0: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400079a4: c2 04 60 70 ld [ %l1 + 0x70 ], %g1 400079a8: b0 10 20 00 clr %i0 400079ac: 82 00 7f ff add %g1, -1, %g1 400079b0: c2 24 60 70 st %g1, [ %l1 + 0x70 ] 400079b4: c4 04 60 70 ld [ %l1 + 0x70 ], %g2 400079b8: 80 a0 a0 00 cmp %g2, 0 400079bc: 12 80 00 04 bne 400079cc 400079c0: 01 00 00 00 nop _Thread_Dispatch(); 400079c4: 40 00 14 6c call 4000cb74 <_Thread_Dispatch> 400079c8: 01 00 00 00 nop #endif _Thread_Enable_dispatch(); return 0; } 400079cc: 81 c7 e0 08 ret 400079d0: 81 e8 00 00 restore /* * XXX: Be careful about attributes when global!!! */ if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) return POSIX_MP_NOT_IMPLEMENTED(); 400079d4: 40 00 04 de call 40008d4c <== NOT EXECUTED 400079d8: 81 e8 00 00 restore <== NOT EXECUTED 400079dc: 01 00 00 00 nop 40007738 : pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40007738: 9d e3 bf 68 save %sp, -152, %sp Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 4000773c: 03 10 00 77 sethi %hi(0x4001dc00), %g1 pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)( void * ), void *arg ) { 40007740: ac 10 00 18 mov %i0, %l6 Thread_Control *the_thread; POSIX_API_Control *api; int schedpolicy = SCHED_RR; struct sched_param schedparam; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes; 40007744: 80 a6 60 00 cmp %i1, 0 40007748: 02 80 00 03 be 40007754 4000774c: a2 10 61 18 or %g1, 0x118, %l1 40007750: a2 10 00 19 mov %i1, %l1 if ( !the_attr->is_initialized ) 40007754: c2 04 40 00 ld [ %l1 ], %g1 40007758: 80 a0 60 00 cmp %g1, 0 4000775c: 02 80 00 10 be 4000779c 40007760: 01 00 00 00 nop /* * Core Thread Initialize insures we get the minimum amount of * stack space if it is allowed to allocate it itself. */ if ( the_attr->stackaddr && !_Stack_Is_enough( the_attr->stacksize ) ) 40007764: c2 04 60 04 ld [ %l1 + 4 ], %g1 40007768: 80 a0 60 00 cmp %g1, 0 4000776c: 22 80 00 07 be,a 40007788 40007770: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 40007774: c2 04 60 08 ld [ %l1 + 8 ], %g1 40007778: 80 a0 6f ff cmp %g1, 0xfff 4000777c: 08 80 00 08 bleu 4000779c 40007780: 01 00 00 00 nop * 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 ) { 40007784: c2 04 60 10 ld [ %l1 + 0x10 ], %g1 <== NOT EXECUTED 40007788: 80 a0 60 01 cmp %g1, 1 4000778c: 02 80 00 34 be 4000785c 40007790: 80 a0 60 02 cmp %g1, 2 40007794: 22 80 00 04 be,a 400077a4 40007798: c4 04 60 18 ld [ %l1 + 0x18 ], %g2 4000779c: 81 c7 e0 08 ret 400077a0: 91 e8 20 16 restore %g0, 0x16, %o0 schedpolicy = api->schedpolicy; schedparam = api->schedparam; break; case PTHREAD_EXPLICIT_SCHED: schedpolicy = the_attr->schedpolicy; 400077a4: f2 04 60 14 ld [ %l1 + 0x14 ], %i1 schedparam = the_attr->schedparam; 400077a8: c4 27 bf e0 st %g2, [ %fp + -32 ] 400077ac: c2 04 60 1c ld [ %l1 + 0x1c ], %g1 400077b0: c2 27 bf e4 st %g1, [ %fp + -28 ] 400077b4: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 400077b8: c4 27 bf e8 st %g2, [ %fp + -24 ] 400077bc: c2 04 60 24 ld [ %l1 + 0x24 ], %g1 400077c0: c2 27 bf ec st %g1, [ %fp + -20 ] 400077c4: c4 04 60 28 ld [ %l1 + 0x28 ], %g2 400077c8: c4 27 bf f0 st %g2, [ %fp + -16 ] 400077cc: c2 04 60 2c ld [ %l1 + 0x2c ], %g1 400077d0: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * Check the contentionscope since rtems only supports PROCESS wide * contention (i.e. no system wide contention). */ if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS ) 400077d4: c2 04 60 0c ld [ %l1 + 0xc ], %g1 400077d8: 80 a0 60 00 cmp %g1, 0 400077dc: 12 80 00 1e bne 40007854 400077e0: b0 10 20 86 mov 0x86, %i0 /* * Interpret the scheduling parameters. */ if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) ) 400077e4: e6 07 bf e0 ld [ %fp + -32 ], %l3 400077e8: 82 04 ff ff add %l3, -1, %g1 400077ec: 80 a0 60 fd cmp %g1, 0xfd 400077f0: 18 bf ff eb bgu 4000779c 400077f4: 80 a6 60 01 cmp %i1, 1 */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400077f8: 02 80 00 41 be 400078fc 400077fc: a8 10 20 00 clr %l4 40007800: 04 80 00 41 ble 40007904 40007804: 80 a6 60 02 cmp %i1, 2 40007808: 02 80 00 26 be 400078a0 4000780c: 80 a6 60 03 cmp %i1, 3 40007810: 12 bf ff e3 bne 4000779c 40007814: 01 00 00 00 nop case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( &schedparam.ss_replenish_period ) < 40007818: 40 00 17 62 call 4000d5a0 <_Timespec_To_ticks> 4000781c: 90 07 bf e8 add %fp, -24, %o0 40007820: a0 10 00 08 mov %o0, %l0 40007824: 40 00 17 5f call 4000d5a0 <_Timespec_To_ticks> 40007828: 90 07 bf f0 add %fp, -16, %o0 4000782c: 80 a4 00 08 cmp %l0, %o0 40007830: 0a bf ff db bcs 4000779c 40007834: c2 07 bf e4 ld [ %fp + -28 ], %g1 _Timespec_To_ticks( &schedparam.ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) ) 40007838: 82 00 7f ff add %g1, -1, %g1 4000783c: 80 a0 60 fd cmp %g1, 0xfd 40007840: 18 bf ff d7 bgu 4000779c 40007844: 03 10 00 1f sethi %hi(0x40007c00), %g1 40007848: a8 10 20 03 mov 3, %l4 4000784c: 10 80 00 17 b 400078a8 40007850: b0 10 62 c4 or %g1, 0x2c4, %i0 *thread = the_thread->Object.id; _Thread_Enable_dispatch(); return 0; } 40007854: 81 c7 e0 08 ret 40007858: 81 e8 00 00 restore * attributes structure. */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 4000785c: 03 10 00 7f sethi %hi(0x4001fc00), %g1 40007860: c4 00 61 dc ld [ %g1 + 0x1dc ], %g2 ! 4001fddc <_Thread_Executing> 40007864: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 schedpolicy = api->schedpolicy; schedparam = api->schedparam; 40007868: c8 00 e0 80 ld [ %g3 + 0x80 ], %g4 */ switch ( the_attr->inheritsched ) { case PTHREAD_INHERIT_SCHED: api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; schedpolicy = api->schedpolicy; 4000786c: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1 schedparam = api->schedparam; 40007870: c8 27 bf e0 st %g4, [ %fp + -32 ] 40007874: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 40007878: c2 27 bf e4 st %g1, [ %fp + -28 ] 4000787c: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 40007880: c4 27 bf e8 st %g2, [ %fp + -24 ] 40007884: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 40007888: c2 27 bf ec st %g1, [ %fp + -20 ] 4000788c: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40007890: c4 27 bf f0 st %g2, [ %fp + -16 ] 40007894: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 40007898: 10 bf ff cf b 400077d4 4000789c: c2 27 bf f4 st %g1, [ %fp + -12 ] */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400078a0: a8 10 20 02 mov 2, %l4 <== NOT EXECUTED 400078a4: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400078a8: 25 10 00 7f sethi %hi(0x4001fc00), %l2 400078ac: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 ! 4001fd00 <_Thread_Dispatch_disable_level> 400078b0: 82 00 60 01 inc %g1 400078b4: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] * _POSIX_Threads_Allocate */ RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void ) { return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information ); 400078b8: 2b 10 00 7f sethi %hi(0x4001fc00), %l5 400078bc: 40 00 0c 4e call 4000a9f4 <_Objects_Allocate> 400078c0: 90 15 63 e8 or %l5, 0x3e8, %o0 ! 4001ffe8 <_POSIX_Threads_Information> * NOTE: Global threads are not currently supported. */ the_thread = _POSIX_Threads_Allocate(); if ( !the_thread ) { 400078c4: a0 92 20 00 orcc %o0, 0, %l0 400078c8: 32 80 00 14 bne,a 40007918 400078cc: d4 04 60 04 ld [ %l1 + 4 ], %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400078d0: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 400078d4: 82 00 7f ff add %g1, -1, %g1 400078d8: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 400078dc: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 400078e0: 80 a0 a0 00 cmp %g2, 0 400078e4: 12 bf ff dc bne 40007854 400078e8: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 400078ec: 40 00 12 7f call 4000c2e8 <_Thread_Dispatch> 400078f0: 01 00 00 00 nop 400078f4: 81 c7 e0 08 ret 400078f8: 81 e8 00 00 restore */ budget_callout = NULL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; switch ( schedpolicy ) { 400078fc: 10 bf ff eb b 400078a8 40007900: b0 10 20 00 clr %i0 40007904: 80 a6 60 00 cmp %i1, 0 40007908: a8 10 20 01 mov 1, %l4 4000790c: 02 bf ff e7 be 400078a8 40007910: b0 10 20 00 clr %i0 40007914: 30 bf ff a2 b,a 4000779c /* * Initialize the core thread for this task. */ status = _Thread_Initialize( 40007918: d6 04 60 08 ld [ %l1 + 8 ], %o3 4000791c: 9a 10 20 ff mov 0xff, %o5 40007920: e8 23 a0 60 st %l4, [ %sp + 0x60 ] 40007924: f0 23 a0 64 st %i0, [ %sp + 0x64 ] 40007928: c0 23 a0 68 clr [ %sp + 0x68 ] 4000792c: c0 23 a0 6c clr [ %sp + 0x6c ] 40007930: 9a 23 40 13 sub %o5, %l3, %o5 40007934: a8 10 20 01 mov 1, %l4 40007938: 90 15 63 e8 or %l5, 0x3e8, %o0 4000793c: e8 23 a0 5c st %l4, [ %sp + 0x5c ] 40007940: 92 10 00 10 mov %l0, %o1 40007944: 40 00 12 d7 call 4000c4a0 <_Thread_Initialize> 40007948: 98 10 20 00 clr %o4 budget_callout, 0, /* isr level */ NULL /* posix threads don't have a name */ ); if ( !status ) { 4000794c: 80 a2 20 00 cmp %o0, 0 40007950: 12 80 00 05 bne 40007964 40007954: 90 15 63 e8 or %l5, 0x3e8, %o0 RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 40007958: 40 00 0d 35 call 4000ae2c <_Objects_Free> 4000795c: 92 10 00 10 mov %l0, %o1 40007960: 30 bf ff dc b,a 400078d0 /* * finish initializing the per API structure */ api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40007964: e6 04 21 70 ld [ %l0 + 0x170 ], %l3 api->Attributes = *the_attr; 40007968: 92 10 00 11 mov %l1, %o1 4000796c: 94 10 20 38 mov 0x38, %o2 40007970: 40 00 2a 61 call 400122f4 40007974: 90 10 00 13 mov %l3, %o0 api->detachstate = the_attr->detachstate; 40007978: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 api->schedpolicy = schedpolicy; 4000797c: f2 24 e0 7c st %i1, [ %l3 + 0x7c ] api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; 40007980: c2 24 e0 38 st %g1, [ %l3 + 0x38 ] api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007984: c2 07 bf e0 ld [ %fp + -32 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007988: 94 10 00 1a mov %i2, %o2 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 4000798c: c2 24 e0 80 st %g1, [ %l3 + 0x80 ] 40007990: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 40007994: 96 10 00 1b mov %i3, %o3 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 40007998: c2 24 e0 84 st %g1, [ %l3 + 0x84 ] 4000799c: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079a0: 90 10 00 10 mov %l0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079a4: c2 24 e0 88 st %g1, [ %l3 + 0x88 ] 400079a8: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079ac: 92 10 20 01 mov 1, %o1 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079b0: c2 24 e0 8c st %g1, [ %l3 + 0x8c ] 400079b4: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079b8: 98 10 20 00 clr %o4 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->Attributes = *the_attr; api->detachstate = the_attr->detachstate; api->schedpolicy = schedpolicy; api->schedparam = schedparam; 400079bc: c2 24 e0 90 st %g1, [ %l3 + 0x90 ] 400079c0: c4 07 bf f4 ld [ %fp + -12 ], %g2 400079c4: c4 24 e0 94 st %g2, [ %l3 + 0x94 ] /* * POSIX threads are allocated and started in one operation. */ status = _Thread_Start( 400079c8: 40 00 16 39 call 4000d2ac <_Thread_Start> 400079cc: e8 24 20 78 st %l4, [ %l0 + 0x78 ] start_routine, arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { 400079d0: 80 a6 60 03 cmp %i1, 3 400079d4: 02 80 00 12 be 40007a1c 400079d8: a2 10 00 08 mov %o0, %l1 /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 400079dc: 80 a4 60 00 cmp %l1, 0 400079e0: 12 80 00 18 bne 40007a40 400079e4: 90 15 63 e8 or %l5, 0x3e8, %o0 400079e8: 40 00 0d 11 call 4000ae2c <_Objects_Free> <== NOT EXECUTED 400079ec: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400079f0: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 <== NOT EXECUTED 400079f4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400079f8: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] <== NOT EXECUTED 400079fc: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 <== NOT EXECUTED 40007a00: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007a04: 12 bf ff 66 bne 4000779c <== NOT EXECUTED 40007a08: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40007a0c: 40 00 12 37 call 4000c2e8 <_Thread_Dispatch> <== NOT EXECUTED 40007a10: b0 10 20 16 mov 0x16, %i0 ! 16 <== NOT EXECUTED 40007a14: 81 c7 e0 08 ret <== NOT EXECUTED 40007a18: 81 e8 00 00 restore <== NOT EXECUTED arg, 0 /* unused */ ); if ( schedpolicy == SCHED_SPORADIC ) { _Watchdog_Insert_ticks( 40007a1c: 40 00 16 e1 call 4000d5a0 <_Timespec_To_ticks> 40007a20: 90 04 e0 88 add %l3, 0x88, %o0 40007a24: 92 04 e0 9c add %l3, 0x9c, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007a28: d0 24 e0 a8 st %o0, [ %l3 + 0xa8 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007a2c: 11 10 00 7f sethi %hi(0x4001fc00), %o0 40007a30: 40 00 17 ef call 4000d9ec <_Watchdog_Insert> 40007a34: 90 12 21 fc or %o0, 0x1fc, %o0 ! 4001fdfc <_Watchdog_Ticks_chain> /* * _Thread_Start only fails if the thread was in the incorrect state */ if ( !status ) { 40007a38: 10 bf ff ea b 400079e0 40007a3c: 80 a4 60 00 cmp %l1, 0 /* * Return the id and indicate we successfully created the thread */ *thread = the_thread->Object.id; 40007a40: c2 04 20 08 ld [ %l0 + 8 ], %g1 40007a44: c2 25 80 00 st %g1, [ %l6 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a48: c2 04 a1 00 ld [ %l2 + 0x100 ], %g1 40007a4c: b0 10 20 00 clr %i0 40007a50: 82 00 7f ff add %g1, -1, %g1 40007a54: c2 24 a1 00 st %g1, [ %l2 + 0x100 ] 40007a58: c4 04 a1 00 ld [ %l2 + 0x100 ], %g2 40007a5c: 80 a0 a0 00 cmp %g2, 0 40007a60: 12 80 00 04 bne 40007a70 40007a64: 01 00 00 00 nop _Thread_Dispatch(); 40007a68: 40 00 12 20 call 4000c2e8 <_Thread_Dispatch> 40007a6c: 01 00 00 00 nop 40007a70: 81 c7 e0 08 ret 40007a74: 81 e8 00 00 restore 40006df8 : #include int pthread_detach( pthread_t thread ) { 40006df8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 40006dfc: 11 10 00 64 sethi %hi(0x40019000), %o0 40006e00: 92 10 00 18 mov %i0, %o1 40006e04: 90 12 20 18 or %o0, 0x18, %o0 40006e08: 40 00 0c 94 call 4000a058 <_Objects_Get> 40006e0c: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40006e10: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e14: 80 a0 60 00 cmp %g1, 0 40006e18: 12 80 00 0f bne 40006e54 40006e1c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api->detachstate = PTHREAD_CREATE_DETACHED; 40006e20: c2 02 21 70 ld [ %o0 + 0x170 ], %g1 40006e24: c0 20 60 38 clr [ %g1 + 0x38 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e28: 07 10 00 63 sethi %hi(0x40018c00), %g3 40006e2c: c2 00 e1 30 ld [ %g3 + 0x130 ], %g1 ! 40018d30 <_Thread_Dispatch_disable_level> 40006e30: 90 10 20 00 clr %o0 40006e34: 82 00 7f ff add %g1, -1, %g1 40006e38: c2 20 e1 30 st %g1, [ %g3 + 0x130 ] 40006e3c: c4 00 e1 30 ld [ %g3 + 0x130 ], %g2 40006e40: 80 a0 a0 00 cmp %g2, 0 40006e44: 02 80 00 0a be 40006e6c 40006e48: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006e4c: 81 c7 e0 08 ret 40006e50: 91 e8 00 08 restore %g0, %o0, %o0 register Thread_Control *the_thread; POSIX_API_Control *api; Objects_Locations location; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40006e54: 08 bf ff fe bleu 40006e4c 40006e58: 90 10 20 03 mov 3, %o0 api->detachstate = PTHREAD_CREATE_DETACHED; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006e5c: 40 00 01 c6 call 40007574 <== NOT EXECUTED 40006e60: 01 00 00 00 nop <== NOT EXECUTED } 40006e64: 81 c7 e0 08 ret <== NOT EXECUTED 40006e68: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006e6c: 40 00 11 67 call 4000b408 <_Thread_Dispatch> 40006e70: 01 00 00 00 nop 40006e74: 90 10 20 00 clr %o0 ! 0 40006e78: 81 c7 e0 08 ret 40006e7c: 91 e8 00 08 restore %g0, %o0, %o0 4000f82c : #include void pthread_exit( void *value_ptr ) { 4000f82c: 9d e3 bf 98 save %sp, -104, %sp Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); 4000f830: 25 10 00 6f sethi %hi(0x4001bc00), %l2 4000f834: c2 04 a2 bc ld [ %l2 + 0x2bc ], %g1 ! 4001bebc <_Thread_Executing> 4000f838: c6 00 60 08 ld [ %g1 + 8 ], %g3 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 4000f83c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000f840: 85 30 e0 16 srl %g3, 0x16, %g2 4000f844: 82 10 61 40 or %g1, 0x140, %g1 4000f848: 84 08 a0 1c and %g2, 0x1c, %g2 4000f84c: c8 00 40 02 ld [ %g1 + %g2 ], %g4 4000f850: 87 30 e0 1b srl %g3, 0x1b, %g3 4000f854: 87 28 e0 02 sll %g3, 2, %g3 4000f858: e2 01 00 03 ld [ %g4 + %g3 ], %l1 /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000f85c: 80 a4 60 00 cmp %l1, 0 4000f860: 22 80 00 19 be,a 4000f8c4 4000f864: 11 10 00 68 sethi %hi(0x4001a000), %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f868: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000f86c: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000f870: 82 00 60 01 inc %g1 4000f874: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] _Thread_Disable_dispatch(); _Thread_Executing->Wait.return_argument = value_ptr; 4000f878: d2 04 a2 bc ld [ %l2 + 0x2bc ], %o1 _Thread_Close( the_information, _Thread_Executing ); 4000f87c: 90 10 00 11 mov %l1, %o0 4000f880: 7f ff ea 48 call 4000a1a0 <_Thread_Close> 4000f884: f0 22 60 28 st %i0, [ %o1 + 0x28 ] RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free ( Thread_Control *the_pthread ) { _Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object ); 4000f888: d2 04 a2 bc ld [ %l2 + 0x2bc ], %o1 4000f88c: 11 10 00 70 sethi %hi(0x4001c000), %o0 4000f890: 7f ff e5 57 call 40008dec <_Objects_Free> 4000f894: 90 12 20 c8 or %o0, 0xc8, %o0 ! 4001c0c8 <_POSIX_Threads_Information> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000f898: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 4000f89c: 82 00 7f ff add %g1, -1, %g1 4000f8a0: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 4000f8a4: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 4000f8a8: 80 a0 a0 00 cmp %g2, 0 4000f8ac: 02 80 00 04 be 4000f8bc 4000f8b0: 01 00 00 00 nop 4000f8b4: 81 c7 e0 08 ret <== NOT EXECUTED 4000f8b8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000f8bc: 7f ff ea b7 call 4000a398 <_Thread_Dispatch> 4000f8c0: 81 e8 00 00 restore Objects_Information *the_information; the_information = _Objects_Get_information( _Thread_Executing->Object.id ); /* This should never happen if _Thread_Get() works right */ assert( the_information ); 4000f8c4: 15 10 00 68 sethi %hi(0x4001a000), %o2 <== NOT EXECUTED 4000f8c8: 90 12 22 d0 or %o0, 0x2d0, %o0 <== NOT EXECUTED 4000f8cc: 94 12 a3 18 or %o2, 0x318, %o2 <== NOT EXECUTED 4000f8d0: 7f ff ce 01 call 400030d4 <__assert> <== NOT EXECUTED 4000f8d4: 92 10 20 25 mov 0x25, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000f8d8: 10 bf ff e5 b 4000f86c <== NOT EXECUTED 4000f8dc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 <== NOT EXECUTED 40009484 : int pthread_getschedparam( pthread_t thread, int *policy, struct sched_param *param ) { 40009484: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40009488: 80 a6 60 00 cmp %i1, 0 4000948c: 02 80 00 33 be 40009558 40009490: 92 10 00 18 mov %i0, %o1 40009494: 80 a6 a0 00 cmp %i2, 0 40009498: 02 80 00 30 be 40009558 4000949c: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 400094a0: 11 10 00 71 sethi %hi(0x4001c400), %o0 400094a4: 40 00 0c b0 call 4000c764 <_Objects_Get> 400094a8: 90 12 22 68 or %o0, 0x268, %o0 ! 4001c668 <_POSIX_Threads_Information> return EINVAL; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400094ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 400094b0: 80 a0 60 00 cmp %g1, 0 400094b4: 22 80 00 09 be,a 400094d8 400094b8: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 400094bc: 80 a0 60 02 cmp %g1, 2 400094c0: 08 80 00 04 bleu 400094d0 400094c4: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400094c8: 40 00 01 ee call 40009c80 <== NOT EXECUTED 400094cc: 01 00 00 00 nop <== NOT EXECUTED } 400094d0: 81 c7 e0 08 ret 400094d4: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( policy ) *policy = api->schedpolicy; 400094d8: c2 00 e0 7c ld [ %g3 + 0x7c ], %g1 400094dc: c2 26 40 00 st %g1, [ %i1 ] if ( param ) { *param = api->schedparam; 400094e0: c4 00 e0 80 ld [ %g3 + 0x80 ], %g2 400094e4: c4 26 80 00 st %g2, [ %i2 ] 400094e8: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1 400094ec: c2 26 a0 04 st %g1, [ %i2 + 4 ] 400094f0: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2 400094f4: c4 26 a0 08 st %g2, [ %i2 + 8 ] 400094f8: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1 400094fc: c2 26 a0 0c st %g1, [ %i2 + 0xc ] 40009500: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 40009504: c4 26 a0 10 st %g2, [ %i2 + 0x10 ] 40009508: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 4000950c: c2 26 a0 14 st %g1, [ %i2 + 0x14 ] param->sched_priority = 40009510: c4 02 20 14 ld [ %o0 + 0x14 ], %g2 40009514: 82 10 20 ff mov 0xff, %g1 40009518: 82 20 40 02 sub %g1, %g2, %g1 4000951c: c2 26 80 00 st %g1, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009520: 07 10 00 70 sethi %hi(0x4001c000), %g3 40009524: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40009528: 90 10 20 00 clr %o0 4000952c: 82 00 7f ff add %g1, -1, %g1 40009530: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40009534: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40009538: 80 a0 a0 00 cmp %g2, 0 4000953c: 12 bf ff e5 bne 400094d0 40009540: 01 00 00 00 nop _Thread_Dispatch(); 40009544: 40 00 11 74 call 4000db14 <_Thread_Dispatch> 40009548: 01 00 00 00 nop 4000954c: 90 10 20 00 clr %o0 ! 0 return 0; } return POSIX_BOTTOM_REACHED(); } 40009550: 81 c7 e0 08 ret 40009554: 91 e8 00 08 restore %g0, %o0, %o0 { Objects_Locations location; POSIX_API_Control *api; register Thread_Control *the_thread; if ( !policy || !param ) 40009558: 10 bf ff de b 400094d0 4000955c: 90 10 20 16 mov 0x16, %o0 40006de4 : */ void *pthread_getspecific( pthread_key_t key ) { 40006de4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 40006de8: 11 10 00 65 sethi %hi(0x40019400), %o0 40006dec: 92 10 00 18 mov %i0, %o1 40006df0: 90 12 20 80 or %o0, 0x80, %o0 40006df4: 40 00 0d 4c call 4000a324 <_Objects_Get> 40006df8: 94 07 bf f4 add %fp, -12, %o2 uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006dfc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e00: 80 a0 60 00 cmp %g1, 0 40006e04: 12 80 00 18 bne 40006e64 40006e08: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return NULL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40006e0c: 03 10 00 64 sethi %hi(0x40019000), %g1 40006e10: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 ! 4001905c <_Thread_Executing> 40006e14: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; 40006e18: 05 00 00 3f sethi %hi(0xfc00), %g2 40006e1c: 83 30 e0 16 srl %g3, 0x16, %g1 40006e20: 82 08 60 1c and %g1, 0x1c, %g1 40006e24: 82 00 40 08 add %g1, %o0, %g1 40006e28: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40006e2c: 84 10 a3 ff or %g2, 0x3ff, %g2 40006e30: 86 08 c0 02 and %g3, %g2, %g3 40006e34: 87 28 e0 02 sll %g3, 2, %g3 40006e38: f0 01 00 03 ld [ %g4 + %g3 ], %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e3c: 05 10 00 63 sethi %hi(0x40018c00), %g2 40006e40: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006e44: 82 00 7f ff add %g1, -1, %g1 40006e48: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] 40006e4c: c6 00 a3 80 ld [ %g2 + 0x380 ], %g3 40006e50: 80 a0 e0 00 cmp %g3, 0 40006e54: 02 80 00 0a be 40006e7c 40006e58: 01 00 00 00 nop _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); return (void *)NULL; } 40006e5c: 81 c7 e0 08 ret 40006e60: 81 e8 00 00 restore uint32_t index; Objects_Locations location; void *key_data; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006e64: 08 bf ff fe bleu 40006e5c 40006e68: b0 10 20 00 clr %i0 index = _Objects_Get_index( _Thread_Executing->Object.id ); key_data = (void *) the_key->Values[ api ][ index ]; _Thread_Enable_dispatch(); return key_data; } (void) POSIX_BOTTOM_REACHED(); 40006e6c: 40 00 02 75 call 40007840 <== NOT EXECUTED 40006e70: 01 00 00 00 nop <== NOT EXECUTED return (void *)NULL; } 40006e74: 81 c7 e0 08 ret <== NOT EXECUTED 40006e78: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40006e7c: 40 00 12 16 call 4000b6d4 <_Thread_Dispatch> 40006e80: 01 00 00 00 nop 40006e84: 81 c7 e0 08 ret 40006e88: 81 e8 00 00 restore 40008954 : int pthread_join( pthread_t thread, void **value_ptr ) { 40008954: 9d e3 bf 90 save %sp, -112, %sp 40008958: 11 10 00 6d sethi %hi(0x4001b400), %o0 4000895c: 92 10 00 18 mov %i0, %o1 40008960: 90 12 23 68 or %o0, 0x368, %o0 40008964: 40 00 0c 65 call 4000baf8 <_Objects_Get> 40008968: 94 07 bf f4 add %fp, -12, %o2 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 4000896c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008970: 80 a0 60 00 cmp %g1, 0 40008974: 12 80 00 15 bne 400089c8 40008978: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 4000897c: c6 02 21 70 ld [ %o0 + 0x170 ], %g3 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { 40008980: c2 00 e0 38 ld [ %g3 + 0x38 ], %g1 40008984: 80 a0 60 00 cmp %g1, 0 40008988: 12 80 00 16 bne 400089e0 4000898c: 03 10 00 6d sethi %hi(0x4001b400), %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008990: 03 10 00 6d sethi %hi(0x4001b400), %g1 40008994: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 4001b480 <_Thread_Dispatch_disable_level> 40008998: 90 10 20 16 mov 0x16, %o0 4000899c: 84 00 bf ff add %g2, -1, %g2 400089a0: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 400089a4: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 400089a8: 80 a0 e0 00 cmp %g3, 0 400089ac: 12 80 00 05 bne 400089c0 400089b0: 01 00 00 00 nop _Thread_Dispatch(); 400089b4: 40 00 11 3d call 4000cea8 <_Thread_Dispatch> 400089b8: 01 00 00 00 nop 400089bc: 90 10 20 16 mov 0x16, %o0 ! 16 *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); } 400089c0: 81 c7 e0 08 ret 400089c4: 91 e8 00 08 restore %g0, %o0, %o0 POSIX_API_Control *api; Objects_Locations location; void *return_pointer; the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 400089c8: 08 bf ff fe bleu 400089c0 400089cc: 90 10 20 03 mov 3, %o0 if ( value_ptr ) *value_ptr = return_pointer; return 0; } return POSIX_BOTTOM_REACHED(); 400089d0: 40 00 01 91 call 40009014 <== NOT EXECUTED 400089d4: 01 00 00 00 nop <== NOT EXECUTED } 400089d8: 81 c7 e0 08 ret <== NOT EXECUTED 400089dc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Thread_Is_executing ( const Thread_Control *the_thread ) { return ( the_thread == _Thread_Executing ); 400089e0: c4 00 61 5c ld [ %g1 + 0x15c ], %g2 if ( api->detachstate == PTHREAD_CREATE_DETACHED ) { _Thread_Enable_dispatch(); return EINVAL; } if ( _Thread_Is_executing( the_thread ) ) { 400089e4: 80 a2 00 02 cmp %o0, %g2 400089e8: 12 80 00 0f bne 40008a24 400089ec: 82 07 bf f0 add %fp, -16, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400089f0: 03 10 00 6d sethi %hi(0x4001b400), %g1 400089f4: c4 00 60 80 ld [ %g1 + 0x80 ], %g2 ! 4001b480 <_Thread_Dispatch_disable_level> 400089f8: 90 10 20 2d mov 0x2d, %o0 400089fc: 84 00 bf ff add %g2, -1, %g2 40008a00: c4 20 60 80 st %g2, [ %g1 + 0x80 ] 40008a04: c6 00 60 80 ld [ %g1 + 0x80 ], %g3 40008a08: 80 a0 e0 00 cmp %g3, 0 40008a0c: 12 bf ff ed bne 400089c0 40008a10: 01 00 00 00 nop _Thread_Dispatch(); 40008a14: 40 00 11 25 call 4000cea8 <_Thread_Dispatch> 40008a18: 01 00 00 00 nop 40008a1c: 10 bf ff e9 b 400089c0 40008a20: 90 10 20 2d mov 0x2d, %o0 ! 2d /* * Put ourself on the threads join list */ _Thread_Executing->Wait.return_argument = &return_pointer; 40008a24: c2 20 a0 28 st %g1, [ %g2 + 0x28 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40008a28: 84 10 20 01 mov 1, %g2 _Thread_queue_Enter_critical_section( &api->Join_List ); _Thread_queue_Enqueue( &api->Join_List, WATCHDOG_NO_TIMEOUT ); 40008a2c: 90 00 e0 3c add %g3, 0x3c, %o0 40008a30: c4 20 e0 6c st %g2, [ %g3 + 0x6c ] 40008a34: 92 10 20 00 clr %o1 40008a38: 15 10 00 36 sethi %hi(0x4000d800), %o2 40008a3c: 40 00 12 8b call 4000d468 <_Thread_queue_Enqueue_with_handler> 40008a40: 94 12 a1 a8 or %o2, 0x1a8, %o2 ! 4000d9a8 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008a44: 05 10 00 6d sethi %hi(0x4001b400), %g2 40008a48: c2 00 a0 80 ld [ %g2 + 0x80 ], %g1 ! 4001b480 <_Thread_Dispatch_disable_level> 40008a4c: 82 00 7f ff add %g1, -1, %g1 40008a50: c2 20 a0 80 st %g1, [ %g2 + 0x80 ] 40008a54: c6 00 a0 80 ld [ %g2 + 0x80 ], %g3 40008a58: 80 a0 e0 00 cmp %g3, 0 40008a5c: 12 80 00 05 bne 40008a70 40008a60: 80 a6 60 00 cmp %i1, 0 _Thread_Dispatch(); 40008a64: 40 00 11 11 call 4000cea8 <_Thread_Dispatch> 40008a68: 01 00 00 00 nop _Thread_Enable_dispatch(); if ( value_ptr ) 40008a6c: 80 a6 60 00 cmp %i1, 0 40008a70: 02 bf ff d4 be 400089c0 40008a74: 90 10 20 00 clr %o0 *value_ptr = return_pointer; 40008a78: c2 07 bf f0 ld [ %fp + -16 ], %g1 40008a7c: 10 bf ff d1 b 400089c0 40008a80: c2 26 40 00 st %g1, [ %i1 ] 40006b54 : int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 40006b54: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006b58: 25 10 00 63 sethi %hi(0x40018c00), %l2 40006b5c: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006b60: 82 00 60 01 inc %g1 40006b64: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] * _POSIX_Keys_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 40006b68: 29 10 00 65 sethi %hi(0x40019400), %l4 40006b6c: 40 00 0c 9d call 40009de0 <_Objects_Allocate> 40006b70: 90 15 20 80 or %l4, 0x80, %o0 ! 40019480 <_POSIX_Keys_Information> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 40006b74: a0 92 20 00 orcc %o0, 0, %l0 40006b78: 32 80 00 0e bne,a 40006bb0 40006b7c: f2 24 20 14 st %i1, [ %l0 + 0x14 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006b80: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 40006b84: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006b88: 82 00 7f ff add %g1, -1, %g1 40006b8c: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] 40006b90: c4 04 a3 80 ld [ %l2 + 0x380 ], %g2 40006b94: 80 a0 a0 00 cmp %g2, 0 40006b98: 12 80 00 3d bne 40006c8c 40006b9c: 01 00 00 00 nop 40006ba0: 40 00 12 cd call 4000b6d4 <_Thread_Dispatch> 40006ba4: 01 00 00 00 nop 40006ba8: 81 c7 e0 08 ret 40006bac: 81 e8 00 00 restore 40006bb0: 03 10 00 63 sethi %hi(0x40018c00), %g1 RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 40006bb4: 2f 10 00 63 sethi %hi(0x40018c00), %l7 40006bb8: ac 10 62 e0 or %g1, 0x2e0, %l6 _Thread_Enable_dispatch(); return EAGAIN; } the_key->destructor = destructor; 40006bbc: b2 10 00 10 mov %l0, %i1 40006bc0: a6 10 20 01 mov 1, %l3 40006bc4: aa 15 e3 cc or %l7, 0x3cc, %l5 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] && 40006bc8: 83 2c e0 02 sll %l3, 2, %g1 40006bcc: c2 00 40 16 ld [ %g1 + %l6 ], %g1 40006bd0: 80 a0 60 00 cmp %g1, 0 40006bd4: 02 80 00 30 be 40006c94 40006bd8: 90 10 00 15 mov %l5, %o0 40006bdc: c2 00 60 04 ld [ %g1 + 4 ], %g1 40006be0: 80 a0 60 00 cmp %g1, 0 40006be4: 22 80 00 0d be,a 40006c18 40006be8: c0 26 60 1c clr [ %i1 + 0x1c ] <== NOT EXECUTED _Objects_Information_table[ the_api ][ 1 ] ) { bytes_to_allocate = sizeof( void * ) * 40006bec: c2 10 60 10 lduh [ %g1 + 0x10 ], %g1 40006bf0: 82 00 60 01 inc %g1 40006bf4: a3 28 60 02 sll %g1, 2, %l1 40006bf8: 40 00 0b 1b call 40009864 <_Heap_Allocate> 40006bfc: 92 10 00 11 mov %l1, %o1 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { 40006c00: 82 92 20 00 orcc %o0, 0, %g1 40006c04: 02 80 00 26 be 40006c9c 40006c08: 94 10 00 11 mov %l1, %o2 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return ENOMEM; } the_key->Values[ the_api ] = table; 40006c0c: c2 26 60 1c st %g1, [ %i1 + 0x1c ] memset( table, '\0', bytes_to_allocate ); 40006c10: 40 00 2b 92 call 40011a58 40006c14: 92 10 20 00 clr %o1 * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 40006c18: a6 04 e0 01 inc %l3 * APIs are optional. Thus there may be no ITRON tasks to have keys * for. [NOTE: Currently RTEMS Classic API tasks are always enabled.] */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 40006c1c: 80 a4 e0 05 cmp %l3, 5 40006c20: 12 bf ff ea bne 40006bc8 40006c24: b2 06 60 04 add %i1, 4, %i1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c28: 90 15 20 80 or %l4, 0x80, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006c2c: c8 04 20 08 ld [ %l0 + 8 ], %g4 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c30: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 } } the_key->is_active = TRUE; 40006c34: 84 10 20 01 mov 1, %g2 40006c38: 03 00 00 3f sethi %hi(0xfc00), %g1 40006c3c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006c40: 82 09 00 01 and %g4, %g1, %g1 40006c44: 80 a0 40 03 cmp %g1, %g3 40006c48: 18 80 00 05 bgu 40006c5c 40006c4c: c4 24 20 10 st %g2, [ %l0 + 0x10 ] information->local_table[ index ] = the_object; 40006c50: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c54: 83 28 60 02 sll %g1, 2, %g1 40006c58: e0 20 80 01 st %l0, [ %g2 + %g1 ] _Objects_Open( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 40006c5c: c8 26 00 00 st %g4, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006c60: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c64: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 40006c68: b0 10 20 00 clr %i0 40006c6c: 82 00 7f ff add %g1, -1, %g1 40006c70: c2 24 a3 80 st %g1, [ %l2 + 0x380 ] 40006c74: c4 04 a3 80 ld [ %l2 + 0x380 ], %g2 40006c78: 80 a0 a0 00 cmp %g2, 0 40006c7c: 12 80 00 04 bne 40006c8c 40006c80: 01 00 00 00 nop _Thread_Dispatch(); 40006c84: 40 00 12 94 call 4000b6d4 <_Thread_Dispatch> 40006c88: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 40006c8c: 81 c7 e0 08 ret 40006c90: 81 e8 00 00 restore } the_key->Values[ the_api ] = table; memset( table, '\0', bytes_to_allocate ); } else { the_key->Values[ the_api ] = NULL; 40006c94: 10 bf ff e1 b 40006c18 40006c98: c0 26 60 1c clr [ %i1 + 0x1c ] bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; the_api >= 1; 40006c9c: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40006ca0: 02 80 00 0d be 40006cd4 <== NOT EXECUTED 40006ca4: 90 15 20 80 or %l4, 0x80, %o0 <== NOT EXECUTED 40006ca8: 83 2c e0 02 sll %l3, 2, %g1 <== NOT EXECUTED 40006cac: b2 15 e3 cc or %l7, 0x3cc, %i1 <== NOT EXECUTED 40006cb0: 82 00 60 18 add %g1, 0x18, %g1 <== NOT EXECUTED 40006cb4: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 40006cb8: d2 04 40 00 ld [ %l1 ], %o1 <== NOT EXECUTED 40006cbc: 40 00 0b 1c call 4000992c <_Heap_Free> <== NOT EXECUTED 40006cc0: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40006cc4: a6 84 ff ff addcc %l3, -1, %l3 <== NOT EXECUTED 40006cc8: 12 bf ff fc bne 40006cb8 <== NOT EXECUTED 40006ccc: a2 04 7f fc add %l1, -4, %l1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40006cd0: 90 15 20 80 or %l4, 0x80, %o0 <== NOT EXECUTED 40006cd4: 40 00 0d 51 call 4000a218 <_Objects_Free> <== NOT EXECUTED 40006cd8: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006cdc: c2 04 a3 80 ld [ %l2 + 0x380 ], %g1 <== NOT EXECUTED 40006ce0: 10 bf ff aa b 40006b88 <== NOT EXECUTED 40006ce4: b0 10 20 0c mov 0xc, %i0 <== NOT EXECUTED 40006ce8 : */ int pthread_key_delete( pthread_key_t key ) { 40006ce8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Keys_Control *) 40006cec: 23 10 00 65 sethi %hi(0x40019400), %l1 40006cf0: 92 10 00 18 mov %i0, %o1 40006cf4: 94 07 bf f4 add %fp, -12, %o2 40006cf8: 40 00 0d 8b call 4000a324 <_Objects_Get> 40006cfc: 90 14 60 80 or %l1, 0x80, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006d00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d04: 80 a0 60 00 cmp %g1, 0 40006d08: 12 80 00 28 bne 40006da8 40006d0c: a0 10 00 08 mov %o0, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006d10: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d14: 88 14 60 80 or %l1, 0x80, %g4 40006d18: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 40006d1c: 03 00 00 3f sethi %hi(0xfc00), %g1 40006d20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006d24: 82 08 c0 01 and %g3, %g1, %g1 40006d28: 80 a0 40 02 cmp %g1, %g2 40006d2c: 28 80 00 26 bleu,a 40006dc4 40006d30: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 40006d34: 03 10 00 63 sethi %hi(0x40018c00), %g1 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40006d38: c0 24 20 0c clr [ %l0 + 0xc ] case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; 40006d3c: c0 24 20 10 clr [ %l0 + 0x10 ] 40006d40: a4 10 63 cc or %g1, 0x3cc, %l2 40006d44: b0 10 20 00 clr %i0 for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) if ( the_key->Values[ the_api ] ) 40006d48: 82 04 00 18 add %l0, %i0, %g1 40006d4c: d2 00 60 1c ld [ %g1 + 0x1c ], %o1 40006d50: 80 a2 60 00 cmp %o1, 0 40006d54: 02 80 00 04 be 40006d64 40006d58: b0 06 20 04 add %i0, 4, %i0 40006d5c: 40 00 0a f4 call 4000992c <_Heap_Free> 40006d60: 90 10 00 12 mov %l2, %o0 _Objects_Close( &_POSIX_Keys_Information, &the_key->Object ); the_key->is_active = FALSE; for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; 40006d64: 80 a6 20 10 cmp %i0, 0x10 40006d68: 12 bf ff f9 bne 40006d4c 40006d6c: 82 04 00 18 add %l0, %i0, %g1 RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 40006d70: 90 14 60 80 or %l1, 0x80, %o0 40006d74: 40 00 0d 29 call 4000a218 <_Objects_Free> 40006d78: 92 10 00 10 mov %l0, %o1 40006d7c: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006d80: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 40018f80 <_Thread_Dispatch_disable_level> 40006d84: 90 10 20 00 clr %o0 40006d88: 84 00 bf ff add %g2, -1, %g2 40006d8c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40006d90: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40006d94: 80 a0 e0 00 cmp %g3, 0 40006d98: 02 80 00 0e be 40006dd0 40006d9c: 01 00 00 00 nop _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006da0: 81 c7 e0 08 ret 40006da4: 91 e8 00 08 restore %g0, %o0, %o0 register POSIX_Keys_Control *the_key; Objects_Locations location; uint32_t the_api; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006da8: 80 a0 60 02 cmp %g1, 2 40006dac: 08 bf ff fd bleu 40006da0 40006db0: 90 10 20 16 mov 0x16, %o0 _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006db4: 40 00 02 a3 call 40007840 <== NOT EXECUTED 40006db8: 01 00 00 00 nop <== NOT EXECUTED } 40006dbc: 81 c7 e0 08 ret <== NOT EXECUTED 40006dc0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) information->local_table[ index ] = the_object; 40006dc4: 83 28 60 02 sll %g1, 2, %g1 40006dc8: 10 bf ff db b 40006d34 40006dcc: c0 20 80 01 clr [ %g2 + %g1 ] _Thread_Dispatch(); 40006dd0: 40 00 12 41 call 4000b6d4 <_Thread_Dispatch> 40006dd4: 01 00 00 00 nop 40006dd8: 90 10 20 00 clr %o0 ! 0 40006ddc: 81 c7 e0 08 ret 40006de0: 91 e8 00 08 restore %g0, %o0, %o0 4002752c : int pthread_kill( pthread_t thread, int sig ) { 4002752c: 9d e3 bf 90 save %sp, -112, %sp POSIX_API_Control *api; Thread_Control *the_thread; Objects_Locations location; if ( !sig ) 40027530: 80 a6 60 00 cmp %i1, 0 40027534: 02 80 00 46 be 4002764c 40027538: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4002753c: a0 06 7f ff add %i1, -1, %l0 40027540: 80 a4 20 1f cmp %l0, 0x1f 40027544: 18 80 00 42 bgu 4002764c 40027548: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get ( pthread_t id, Objects_Locations *location ) { return (Thread_Control *) 4002754c: 11 10 00 b7 sethi %hi(0x4002dc00), %o0 40027550: 7f ff a2 ff call 4001014c <_Objects_Get> 40027554: 90 12 22 64 or %o0, 0x264, %o0 ! 4002de64 <_POSIX_Threads_Information> if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) rtems_set_errno_and_return_minus_one( ENOSYS ); */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40027558: c2 07 bf f4 ld [ %fp + -12 ], %g1 4002755c: 80 a0 60 00 cmp %g1, 0 40027560: 02 80 00 0c be 40027590 40027564: b0 10 00 08 mov %o0, %i0 40027568: 80 a0 60 02 cmp %g1, 2 4002756c: 18 80 00 34 bgu 4002763c 40027570: 01 00 00 00 nop case OBJECTS_ERROR: case OBJECTS_REMOTE: rtems_set_errno_and_return_minus_one( ESRCH ); 40027574: 7f ff cf b6 call 4001b44c <__errno> 40027578: 01 00 00 00 nop 4002757c: 82 10 20 03 mov 3, %g1 ! 3 40027580: c2 22 00 00 st %g1, [ %o0 ] 40027584: 90 10 3f ff mov -1, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40027588: 81 c7 e0 08 ret 4002758c: 91 e8 00 08 restore %g0, %o0, %o0 api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( sig ) { if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) { 40027590: 87 2e 60 02 sll %i1, 2, %g3 40027594: 85 2e 60 04 sll %i1, 4, %g2 40027598: 03 10 00 b8 sethi %hi(0x4002e000), %g1 4002759c: 84 20 80 03 sub %g2, %g3, %g2 400275a0: 82 10 62 48 or %g1, 0x248, %g1 400275a4: 84 00 80 01 add %g2, %g1, %g2 400275a8: c6 00 a0 08 ld [ %g2 + 8 ], %g3 400275ac: 80 a0 e0 01 cmp %g3, 1 400275b0: 02 80 00 15 be 40027604 400275b4: c8 02 21 70 ld [ %o0 + 0x170 ], %g4 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 400275b8: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 400275bc: 92 10 00 19 mov %i1, %o1 return 0; } /* XXX critical section */ api->signals_pending |= signo_to_mask( sig ); 400275c0: b2 10 20 01 mov 1, %i1 400275c4: 83 2e 40 10 sll %i1, %l0, %g1 400275c8: 84 10 80 01 or %g2, %g1, %g2 (void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL ); 400275cc: 94 10 20 00 clr %o2 400275d0: 7f ff ff 8c call 40027400 <_POSIX_signals_Unblock_thread> 400275d4: c4 21 20 c8 st %g2, [ %g4 + 0xc8 ] the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 400275d8: 03 10 00 b6 sethi %hi(0x4002d800), %g1 400275dc: c4 00 63 f4 ld [ %g1 + 0x3f4 ], %g2 ! 4002dbf4 <_ISR_Nest_level> 400275e0: 80 a0 a0 00 cmp %g2, 0 400275e4: 02 80 00 08 be 40027604 400275e8: f2 26 20 78 st %i1, [ %i0 + 0x78 ] 400275ec: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400275f0: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4002dc0c <_Thread_Executing> 400275f4: 80 a6 00 02 cmp %i0, %g2 400275f8: 12 80 00 03 bne 40027604 400275fc: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 _ISR_Signals_to_thread_executing = TRUE; 40027600: f2 20 60 b8 st %i1, [ %g1 + 0xb8 ] ! 4002dcb8 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40027604: 03 10 00 b6 sethi %hi(0x4002d800), %g1 40027608: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4002760c: 90 10 20 00 clr %o0 40027610: 84 00 bf ff add %g2, -1, %g2 40027614: c4 20 63 30 st %g2, [ %g1 + 0x330 ] 40027618: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 4002761c: 80 a0 e0 00 cmp %g3, 0 40027620: 12 bf ff da bne 40027588 40027624: 01 00 00 00 nop _Thread_Dispatch(); 40027628: 7f ff a7 f1 call 400115ec <_Thread_Dispatch> 4002762c: 01 00 00 00 nop 40027630: 90 10 20 00 clr %o0 ! 0 } 40027634: 81 c7 e0 08 ret 40027638: 91 e8 00 08 restore %g0, %o0, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 4002763c: 40 00 00 18 call 4002769c <== NOT EXECUTED 40027640: 01 00 00 00 nop <== NOT EXECUTED } 40027644: 81 c7 e0 08 ret <== NOT EXECUTED 40027648: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !sig ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4002764c: 7f ff cf 80 call 4001b44c <__errno> 40027650: 01 00 00 00 nop 40027654: 82 10 20 16 mov 0x16, %g1 ! 16 40027658: c2 22 00 00 st %g1, [ %o0 ] 4002765c: 10 bf ff cb b 40027588 40027660: 90 10 3f ff mov -1, %o0 400087a0 : */ int pthread_mutex_destroy( pthread_mutex_t *mutex ) { 400087a0: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400087a4: 80 a6 20 00 cmp %i0, 0 400087a8: 32 80 00 05 bne,a 400087bc 400087ac: d2 06 00 00 ld [ %i0 ], %o1 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400087b0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 400087b4: 81 c7 e0 08 ret 400087b8: 91 e8 00 08 restore %g0, %o0, %o0 400087bc: 80 a2 7f ff cmp %o1, -1 400087c0: 02 80 00 40 be 400088c0 400087c4: 90 10 00 18 mov %i0, %o0 return (POSIX_Mutex_Control *) 400087c8: 21 10 00 71 sethi %hi(0x4001c400), %l0 400087cc: 94 07 bf f4 add %fp, -12, %o2 400087d0: 40 00 0f e5 call 4000c764 <_Objects_Get> 400087d4: 90 14 23 e4 or %l0, 0x3e4, %o0 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 400087d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400087dc: 80 a0 60 00 cmp %g1, 0 400087e0: 12 80 00 13 bne 4000882c 400087e4: b0 10 00 08 mov %o0, %i0 /* * XXX: There is an error for the mutex being locked * or being in use by a condition variable. */ if ( _CORE_mutex_Is_locked( &the_mutex->Mutex ) ) { 400087e8: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 400087ec: 80 a0 60 00 cmp %g1, 0 400087f0: 32 80 00 15 bne,a 40008844 400087f4: a0 14 23 e4 or %l0, 0x3e4, %l0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400087f8: 03 10 00 70 sethi %hi(0x4001c000), %g1 400087fc: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008800: 90 10 20 10 mov 0x10, %o0 40008804: 84 00 bf ff add %g2, -1, %g2 40008808: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 4000880c: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40008810: 80 a0 e0 00 cmp %g3, 0 40008814: 12 bf ff e8 bne 400087b4 40008818: 01 00 00 00 nop _Thread_Dispatch(); 4000881c: 40 00 14 be call 4000db14 <_Thread_Dispatch> 40008820: 01 00 00 00 nop 40008824: 10 bf ff e4 b 400087b4 40008828: 90 10 20 10 mov 0x10, %o0 ! 10 { register POSIX_Mutex_Control *the_mutex; Objects_Locations location; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 4000882c: 80 a0 60 02 cmp %g1, 2 40008830: 28 bf ff e1 bleu,a 400087b4 40008834: 90 10 20 16 mov 0x16, %o0 } #endif _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008838: 40 00 05 12 call 40009c80 <== NOT EXECUTED 4000883c: 01 00 00 00 nop <== NOT EXECUTED 40008840: 30 bf ff dd b,a 400087b4 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40008844: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008848: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 4000884c: 05 00 00 3f sethi %hi(0xfc00), %g2 40008850: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40008854: 82 08 40 02 and %g1, %g2, %g1 40008858: 80 a0 40 03 cmp %g1, %g3 4000885c: 18 80 00 05 bgu 40008870 40008860: 94 10 20 16 mov 0x16, %o2 information->local_table[ index ] = the_object; 40008864: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40008868: 83 28 60 02 sll %g1, 2, %g1 4000886c: c0 20 80 01 clr [ %g2 + %g1 ] return EBUSY; } _Objects_Close( &_POSIX_Mutex_Information, &the_mutex->Object ); _CORE_mutex_Flush( 40008870: 90 06 20 14 add %i0, 0x14, %o0 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40008874: c0 26 20 0c clr [ %i0 + 0xc ] 40008878: 40 00 0b af call 4000b734 <_CORE_mutex_Flush> 4000887c: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _POSIX_Mutex_Free ( POSIX_Mutex_Control *the_mutex ) { _Objects_Free( &_POSIX_Mutex_Information, &the_mutex->Object ); 40008880: 90 10 00 10 mov %l0, %o0 40008884: 40 00 0f 75 call 4000c658 <_Objects_Free> 40008888: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000888c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008890: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008894: 90 10 20 00 clr %o0 40008898: 84 00 bf ff add %g2, -1, %g2 4000889c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 400088a0: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 400088a4: 80 a0 e0 00 cmp %g3, 0 400088a8: 12 bf ff c3 bne 400087b4 400088ac: 01 00 00 00 nop _Thread_Dispatch(); 400088b0: 40 00 14 99 call 4000db14 <_Thread_Dispatch> 400088b4: 01 00 00 00 nop 400088b8: 10 bf ff bf b 400087b4 400088bc: 90 10 20 00 clr %o0 ! 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 400088c0: 40 00 00 38 call 400089a0 <== NOT EXECUTED 400088c4: 92 10 20 00 clr %o1 <== NOT EXECUTED 400088c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400088cc: 12 bf ff ba bne 400087b4 <== NOT EXECUTED 400088d0: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 400088d4: 10 bf ff bd b 400087c8 <== NOT EXECUTED 400088d8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400088dc : int pthread_mutex_getprioceiling( pthread_mutex_t *mutex, int *prioceiling ) { 400088dc: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; if ( !prioceiling ) 400088e0: 80 a6 60 00 cmp %i1, 0 400088e4: 02 80 00 04 be 400088f4 400088e8: 80 a6 20 00 cmp %i0, 0 400088ec: 32 80 00 05 bne,a 40008900 400088f0: d2 06 00 00 ld [ %i0 ], %o1 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400088f4: 90 10 20 16 mov 0x16, %o0 } 400088f8: 81 c7 e0 08 ret 400088fc: 91 e8 00 08 restore %g0, %o0, %o0 40008900: 80 a2 7f ff cmp %o1, -1 40008904: 22 80 00 20 be,a 40008984 40008908: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 4000890c: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008910: 94 07 bf f4 add %fp, -12, %o2 40008914: 40 00 0f 94 call 4000c764 <_Objects_Get> 40008918: 90 12 23 e4 or %o0, 0x3e4, %o0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 4000891c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008920: 80 a0 60 00 cmp %g1, 0 40008924: 12 80 00 13 bne 40008970 40008928: 80 a0 60 02 cmp %g1, 2 return POSIX_MP_NOT_IMPLEMENTED(); /* XXX feels questionable */ #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: *prioceiling = _POSIX_Priority_From_core( 4000892c: c4 02 20 60 ld [ %o0 + 0x60 ], %g2 40008930: 82 10 20 ff mov 0xff, %g1 40008934: 82 20 40 02 sub %g1, %g2, %g1 40008938: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000893c: 07 10 00 70 sethi %hi(0x4001c000), %g3 40008940: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008944: 90 10 20 00 clr %o0 40008948: 82 00 7f ff add %g1, -1, %g1 4000894c: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40008950: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40008954: 80 a0 a0 00 cmp %g2, 0 40008958: 12 bf ff e8 bne 400088f8 4000895c: 01 00 00 00 nop _Thread_Dispatch(); 40008960: 40 00 14 6d call 4000db14 <_Thread_Dispatch> 40008964: 01 00 00 00 nop 40008968: 10 bf ff e4 b 400088f8 4000896c: 90 10 20 00 clr %o0 ! 0 if ( !prioceiling ) return EINVAL; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008970: 28 bf ff e2 bleu,a 400088f8 40008974: 90 10 20 16 mov 0x16, %o0 the_mutex->Mutex.Attributes.priority_ceiling ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008978: 40 00 04 c2 call 40009c80 <== NOT EXECUTED 4000897c: 01 00 00 00 nop <== NOT EXECUTED 40008980: 30 bf ff de b,a 400088f8 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008984: 40 00 00 07 call 400089a0 <== NOT EXECUTED 40008988: 92 10 20 00 clr %o1 <== NOT EXECUTED 4000898c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008990: 32 bf ff da bne,a 400088f8 <== NOT EXECUTED 40008994: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 40008998: 10 bf ff dd b 4000890c <== NOT EXECUTED 4000899c: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 400089a0 : int pthread_mutex_init( pthread_mutex_t *mutex, const pthread_mutexattr_t *attr ) { 400089a0: 9d e3 bf 98 save %sp, -104, %sp #if 0 register POSIX_Mutex_Control *mutex_in_use; Objects_Locations location; #endif if ( attr ) the_attr = attr; 400089a4: 03 10 00 69 sethi %hi(0x4001a400), %g1 400089a8: 80 a6 60 00 cmp %i1, 0 400089ac: 02 80 00 03 be 400089b8 400089b0: a0 10 60 4c or %g1, 0x4c, %l0 400089b4: a0 10 00 19 mov %i1, %l0 else the_attr = &_POSIX_Mutex_Default_attributes; /* Check for NULL mutex */ if ( !mutex ) 400089b8: 80 a6 20 00 cmp %i0, 0 400089bc: 22 80 00 2c be,a 40008a6c 400089c0: b0 10 20 16 mov 0x16, %i0 return EBUSY; } } #endif if ( !the_attr->is_initialized ) 400089c4: c2 04 00 00 ld [ %l0 ], %g1 400089c8: 80 a0 60 00 cmp %g1, 0 400089cc: 22 80 00 28 be,a 40008a6c 400089d0: b0 10 20 16 mov 0x16, %i0 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 400089d4: c2 04 20 04 ld [ %l0 + 4 ], %g1 400089d8: 80 a0 60 00 cmp %g1, 0 400089dc: 12 80 00 2b bne 40008a88 400089e0: 11 10 00 69 sethi %hi(0x4001a400), %o0 /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 400089e4: c2 04 20 0c ld [ %l0 + 0xc ], %g1 400089e8: 80 a0 60 01 cmp %g1, 1 400089ec: 02 80 00 07 be 40008a08 400089f0: a4 10 20 02 mov 2, %l2 400089f4: 80 a0 60 02 cmp %g1, 2 400089f8: 02 80 00 22 be 40008a80 400089fc: 80 a0 60 00 cmp %g1, 0 40008a00: 12 80 00 1d bne 40008a74 40008a04: a4 10 20 00 clr %l2 break; default: return EINVAL; } if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) ) 40008a08: c2 04 20 08 ld [ %l0 + 8 ], %g1 40008a0c: 82 00 7f ff add %g1, -1, %g1 40008a10: 80 a0 60 fd cmp %g1, 0xfd 40008a14: 38 80 00 16 bgu,a 40008a6c 40008a18: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008a1c: 23 10 00 70 sethi %hi(0x4001c000), %l1 40008a20: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008a24: 82 00 60 01 inc %g1 40008a28: c2 24 63 80 st %g1, [ %l1 + 0x380 ] * _POSIX_Mutex_Allocate */ RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void ) { return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information ); 40008a2c: 27 10 00 71 sethi %hi(0x4001c400), %l3 40008a30: 40 00 0d fc call 4000c220 <_Objects_Allocate> 40008a34: 90 14 e3 e4 or %l3, 0x3e4, %o0 ! 4001c7e4 <_POSIX_Mutex_Information> _Thread_Disable_dispatch(); the_mutex = _POSIX_Mutex_Allocate(); if ( !the_mutex ) { 40008a38: b2 92 20 00 orcc %o0, 0, %i1 40008a3c: 32 80 00 1e bne,a 40008ab4 40008a40: c2 04 20 04 ld [ %l0 + 4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008a44: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 40008a48: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40008a4c: 82 00 7f ff add %g1, -1, %g1 40008a50: c2 24 63 80 st %g1, [ %l1 + 0x380 ] 40008a54: c4 04 63 80 ld [ %l1 + 0x380 ], %g2 40008a58: 80 a0 a0 00 cmp %g2, 0 40008a5c: 12 80 00 07 bne 40008a78 40008a60: 01 00 00 00 nop 40008a64: 40 00 14 2c call 4000db14 <_Thread_Dispatch> 40008a68: 01 00 00 00 nop 40008a6c: 81 c7 e0 08 ret 40008a70: 81 e8 00 00 restore 40008a74: b0 10 20 16 mov 0x16, %i0 ); #endif _Thread_Enable_dispatch(); return 0; } 40008a78: 81 c7 e0 08 ret 40008a7c: 81 e8 00 00 restore /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008a80: 10 bf ff e2 b 40008a08 40008a84: a4 10 20 03 mov 3, %l2 /* * XXX: Be careful about attributes when global!!! */ assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE ); 40008a88: 15 10 00 69 sethi %hi(0x4001a400), %o2 <== NOT EXECUTED 40008a8c: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED 40008a90: 94 12 a0 a8 or %o2, 0xa8, %o2 <== NOT EXECUTED 40008a94: 7f ff f1 bf call 40005190 <__assert> <== NOT EXECUTED 40008a98: 92 10 20 64 mov 0x64, %o1 <== NOT EXECUTED /* * Determine the discipline of the mutex */ switch ( the_attr->protocol ) { 40008a9c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40008aa0: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40008aa4: 12 bf ff d5 bne 400089f8 <== NOT EXECUTED 40008aa8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008aac: 10 bf ff d7 b 40008a08 <== NOT EXECUTED 40008ab0: a4 10 20 02 mov 2, %l2 <== NOT EXECUTED _Thread_Enable_dispatch(); return EAGAIN; } #endif the_mutex->process_shared = the_attr->process_shared; 40008ab4: c2 26 60 10 st %g1, [ %i1 + 0x10 ] the_mutex_attr = &the_mutex->Mutex.Attributes; if ( the_attr->recursive ) 40008ab8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008abc: 80 a0 a0 00 cmp %g2, 0 40008ac0: 32 80 00 04 bne,a 40008ad0 40008ac4: c0 26 60 54 clr [ %i1 + 0x54 ] <== NOT EXECUTED the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; 40008ac8: 82 10 20 01 mov 1, %g1 40008acc: c2 26 60 54 st %g1, [ %i1 + 0x54 ] the_mutex_attr->only_owner_release = TRUE; the_mutex_attr->priority_ceiling = 40008ad0: c6 04 20 08 ld [ %l0 + 8 ], %g3 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 40008ad4: 84 10 20 01 mov 1, %g2 the_mutex_attr->priority_ceiling = 40008ad8: 82 10 20 ff mov 0xff, %g1 40008adc: 82 20 40 03 sub %g1, %g3, %g1 if ( the_attr->recursive ) the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; else the_mutex_attr->lock_nesting_behavior = CORE_MUTEX_NESTING_IS_ERROR; the_mutex_attr->only_owner_release = TRUE; 40008ae0: c4 26 60 58 st %g2, [ %i1 + 0x58 ] the_mutex_attr->priority_ceiling = 40008ae4: c2 26 60 60 st %g1, [ %i1 + 0x60 ] _POSIX_Priority_To_core( the_attr->prio_ceiling ); the_mutex_attr->discipline = the_discipline; 40008ae8: e4 26 60 5c st %l2, [ %i1 + 0x5c ] /* * Must be initialized to unlocked. */ _CORE_mutex_Initialize( 40008aec: 90 06 60 14 add %i1, 0x14, %o0 40008af0: 92 06 60 54 add %i1, 0x54, %o1 40008af4: 40 00 0b 14 call 4000b744 <_CORE_mutex_Initialize> 40008af8: 94 10 20 01 mov 1, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008afc: 90 14 e3 e4 or %l3, 0x3e4, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40008b00: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40008b04: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40008b08: 03 00 00 3f sethi %hi(0xfc00), %g1 40008b0c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40008b10: 82 08 c0 01 and %g3, %g1, %g1 40008b14: 80 a0 40 02 cmp %g1, %g2 40008b18: 38 80 00 06 bgu,a 40008b30 40008b1c: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40008b20: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40008b24: 83 28 60 02 sll %g1, 2, %g1 40008b28: f2 20 80 01 st %i1, [ %g2 + %g1 ] CORE_MUTEX_UNLOCKED ); _Objects_Open( &_POSIX_Mutex_Information, &the_mutex->Object, 0 ); *mutex = the_mutex->Object.id; 40008b2c: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40008b30: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008b34: c2 04 63 80 ld [ %l1 + 0x380 ], %g1 40008b38: 10 bf ff c5 b 40008a4c 40008b3c: b0 10 20 00 clr %i0 40008df4 : int pthread_mutex_setprioceiling( pthread_mutex_t *mutex, int prioceiling, int *old_ceiling ) { 40008df4: 9d e3 bf 90 save %sp, -112, %sp register POSIX_Mutex_Control *the_mutex; Objects_Locations location; Priority_Control the_priority; int status; if ( !old_ceiling ) 40008df8: 80 a6 a0 00 cmp %i2, 0 40008dfc: 02 80 00 06 be 40008e14 40008e00: a0 10 00 18 mov %i0, %l0 return EINVAL; if ( !_POSIX_Priority_Is_valid( prioceiling ) ) 40008e04: 82 06 7f ff add %i1, -1, %g1 40008e08: 80 a0 60 fd cmp %g1, 0xfd 40008e0c: 08 80 00 04 bleu 40008e1c 40008e10: 01 00 00 00 nop ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008e14: 81 c7 e0 08 ret 40008e18: 91 e8 20 16 restore %g0, 0x16, %o0 /* * Must acquire the mutex before we can change it's ceiling */ status = pthread_mutex_lock( mutex ); 40008e1c: 7f ff ff 49 call 40008b40 40008e20: 90 10 00 18 mov %i0, %o0 if ( status ) 40008e24: b0 92 20 00 orcc %o0, 0, %i0 40008e28: 12 80 00 24 bne 40008eb8 40008e2c: 80 a4 20 00 cmp %l0, 0 Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008e30: 22 80 00 22 be,a 40008eb8 40008e34: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40008e38: d2 04 00 00 ld [ %l0 ], %o1 40008e3c: 80 a2 7f ff cmp %o1, -1 40008e40: 22 80 00 26 be,a 40008ed8 40008e44: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40008e48: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008e4c: 94 07 bf f4 add %fp, -12, %o2 40008e50: 40 00 0e 45 call 4000c764 <_Objects_Get> 40008e54: 90 12 23 e4 or %o0, 0x3e4, %o0 return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008e58: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008e5c: 80 a0 60 00 cmp %g1, 0 40008e60: 12 80 00 18 bne 40008ec0 40008e64: 80 a0 60 02 cmp %g1, 2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e68: c6 02 20 60 ld [ %o0 + 0x60 ], %g3 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008e6c: d2 02 20 08 ld [ %o0 + 8 ], %o1 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e70: 82 10 20 ff mov 0xff, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008e74: 84 20 40 19 sub %g1, %i1, %g2 return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e78: 82 20 40 03 sub %g1, %g3, %g1 the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; 40008e7c: c4 22 20 60 st %g2, [ %o0 + 0x60 ] return EINVAL; #endif case OBJECTS_ERROR: return EINVAL; /* impossible to get here */ case OBJECTS_LOCAL: *old_ceiling = _POSIX_Priority_From_core( 40008e80: c2 26 80 00 st %g1, [ %i2 ] the_mutex->Mutex.Attributes.priority_ceiling ); the_mutex->Mutex.Attributes.priority_ceiling = the_priority; _CORE_mutex_Surrender( 40008e84: 94 10 20 00 clr %o2 40008e88: 40 00 0a 8c call 4000b8b8 <_CORE_mutex_Surrender> 40008e8c: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008e90: 05 10 00 70 sethi %hi(0x4001c000), %g2 40008e94: c2 00 a3 80 ld [ %g2 + 0x380 ], %g1 ! 4001c380 <_Thread_Dispatch_disable_level> 40008e98: 82 00 7f ff add %g1, -1, %g1 40008e9c: c2 20 a3 80 st %g1, [ %g2 + 0x380 ] 40008ea0: c6 00 a3 80 ld [ %g2 + 0x380 ], %g3 40008ea4: 80 a0 e0 00 cmp %g3, 0 40008ea8: 12 80 00 04 bne 40008eb8 40008eac: 01 00 00 00 nop _Thread_Dispatch(); 40008eb0: 40 00 13 19 call 4000db14 <_Thread_Dispatch> 40008eb4: 01 00 00 00 nop 40008eb8: 81 c7 e0 08 ret 40008ebc: 81 e8 00 00 restore status = pthread_mutex_lock( mutex ); if ( status ) return status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008ec0: 28 bf ff fe bleu,a 40008eb8 <== NOT EXECUTED 40008ec4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008ec8: 40 00 03 6e call 40009c80 <== NOT EXECUTED 40008ecc: 01 00 00 00 nop <== NOT EXECUTED 40008ed0: 81 c7 e0 08 ret <== NOT EXECUTED 40008ed4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008ed8: 7f ff fe b2 call 400089a0 <== NOT EXECUTED 40008edc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40008ee0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008ee4: 32 bf ff f5 bne,a 40008eb8 <== NOT EXECUTED 40008ee8: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED 40008eec: 10 bf ff d7 b 40008e48 <== NOT EXECUTED 40008ef0: d2 04 00 00 ld [ %l0 ], %o1 <== NOT EXECUTED 40008ef4 : int pthread_mutex_timedlock( pthread_mutex_t *mutex, const struct timespec *abstime ) { 40008ef4: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40008ef8: 90 10 00 19 mov %i1, %o0 40008efc: 40 00 00 46 call 40009014 <_POSIX_Absolute_timeout_to_ticks> 40008f00: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008f04: 80 a2 20 03 cmp %o0, 3 40008f08: 02 80 00 07 be 40008f24 40008f0c: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008f10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40008f14: 7f ff ff 11 call 40008b58 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED 40008f18: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 40008f1c: 81 c7 e0 08 ret <== NOT EXECUTED 40008f20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Mutex_Lock_support( 40008f24: 90 10 00 18 mov %i0, %o0 40008f28: 7f ff ff 0c call 40008b58 <_POSIX_Mutex_Lock_support> 40008f2c: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 40008f30: 81 c7 e0 08 ret 40008f34: 91 e8 00 08 restore %g0, %o0, %o0 40008f50 : */ int pthread_mutex_unlock( pthread_mutex_t *mutex ) { 40008f50: 9d e3 bf 90 save %sp, -112, %sp 40008f54: 80 a6 20 00 cmp %i0, 0 40008f58: 32 80 00 05 bne,a 40008f6c 40008f5c: d2 06 00 00 ld [ %i0 ], %o1 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40008f60: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED } 40008f64: 81 c7 e0 08 ret 40008f68: 91 e8 00 08 restore %g0, %o0, %o0 40008f6c: 80 a2 7f ff cmp %o1, -1 40008f70: 22 80 00 22 be,a 40008ff8 40008f74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return (POSIX_Mutex_Control *) 40008f78: 11 10 00 71 sethi %hi(0x4001c400), %o0 40008f7c: 94 07 bf f4 add %fp, -12, %o2 40008f80: 40 00 0d f9 call 4000c764 <_Objects_Get> 40008f84: 90 12 23 e4 or %o0, 0x3e4, %o0 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008f88: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008f8c: 80 a0 60 00 cmp %g1, 0 40008f90: 12 80 00 12 bne 40008fd8 40008f94: 80 a0 60 02 cmp %g1, 2 ); #endif case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_mutex_Surrender( 40008f98: d2 02 20 08 ld [ %o0 + 8 ], %o1 40008f9c: 94 10 20 00 clr %o2 40008fa0: 40 00 0a 46 call 4000b8b8 <_CORE_mutex_Surrender> 40008fa4: 90 02 20 14 add %o0, 0x14, %o0 40008fa8: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008fac: 03 10 00 70 sethi %hi(0x4001c000), %g1 40008fb0: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40008fb4: 84 00 bf ff add %g2, -1, %g2 40008fb8: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40008fbc: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40008fc0: 80 a0 e0 00 cmp %g3, 0 40008fc4: 02 80 00 0a be 40008fec 40008fc8: 01 00 00 00 nop #else NULL #endif ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); 40008fcc: 40 00 21 04 call 400113dc <_POSIX_Mutex_From_core_mutex_status> 40008fd0: 90 10 00 18 mov %i0, %o0 40008fd4: 30 bf ff e4 b,a 40008f64 register POSIX_Mutex_Control *the_mutex; Objects_Locations location; CORE_mutex_Status status; the_mutex = _POSIX_Mutex_Get( mutex, &location ); switch ( location ) { 40008fd8: 28 bf ff e3 bleu,a 40008f64 40008fdc: 90 10 20 16 mov 0x16, %o0 ); _Thread_Enable_dispatch(); return _POSIX_Mutex_From_core_mutex_status( status ); break; } return POSIX_BOTTOM_REACHED(); 40008fe0: 40 00 03 28 call 40009c80 <== NOT EXECUTED 40008fe4: 01 00 00 00 nop <== NOT EXECUTED 40008fe8: 30 bf ff df b,a 40008f64 <== NOT EXECUTED _Thread_Dispatch(); 40008fec: 40 00 12 ca call 4000db14 <_Thread_Dispatch> 40008ff0: 01 00 00 00 nop 40008ff4: 30 bf ff f6 b,a 40008fcc Objects_Locations *location ) { Objects_Id *id = (Objects_Id *)mutex; ___POSIX_Mutex_Get_support( id, location ); 40008ff8: 7f ff fe 6a call 400089a0 <== NOT EXECUTED 40008ffc: 92 10 20 00 clr %o1 <== NOT EXECUTED 40009000: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40009004: 32 bf ff d8 bne,a 40008f64 <== NOT EXECUTED 40009008: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED 4000900c: 10 bf ff db b 40008f78 <== NOT EXECUTED 40009010: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED 40007ff0 : int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { 40007ff0: 9d e3 bf 90 save %sp, -112, %sp if ( !once_control || !init_routine ) 40007ff4: a0 96 20 00 orcc %i0, 0, %l0 40007ff8: 02 80 00 18 be 40008058 40007ffc: 80 a6 60 00 cmp %i1, 0 40008000: 02 80 00 16 be 40008058 40008004: 01 00 00 00 nop return EINVAL; if ( !once_control->init_executed ) { 40008008: c2 04 20 04 ld [ %l0 + 4 ], %g1 4000800c: 80 a0 60 00 cmp %g1, 0 40008010: 12 80 00 10 bne 40008050 40008014: b0 10 20 00 clr %i0 rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); 40008018: b0 07 bf f4 add %fp, -12, %i0 4000801c: 90 10 21 00 mov 0x100, %o0 40008020: 92 10 21 00 mov 0x100, %o1 40008024: 40 00 05 41 call 40009528 40008028: 94 10 00 18 mov %i0, %o2 if ( !once_control->init_executed ) { 4000802c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40008030: 80 a0 60 00 cmp %g1, 0 40008034: 02 80 00 0b be 40008060 40008038: 82 10 20 01 mov 1, %g1 once_control->is_initialized = TRUE; once_control->init_executed = TRUE; (*init_routine)(); } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4000803c: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED 40008040: 94 10 00 18 mov %i0, %o2 40008044: 92 10 21 00 mov 0x100, %o1 40008048: 40 00 05 38 call 40009528 4000804c: b0 10 20 00 clr %i0 } return 0; } 40008050: 81 c7 e0 08 ret 40008054: 81 e8 00 00 restore int pthread_once( pthread_once_t *once_control, void (*init_routine)(void) ) { if ( !once_control || !init_routine ) 40008058: 81 c7 e0 08 ret 4000805c: 91 e8 20 16 restore %g0, 0x16, %o0 if ( !once_control->init_executed ) { rtems_mode saveMode; rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode); if ( !once_control->init_executed ) { once_control->is_initialized = TRUE; once_control->init_executed = TRUE; 40008060: c2 24 20 04 st %g1, [ %l0 + 4 ] (*init_routine)(); 40008064: 9f c6 40 00 call %i1 40008068: c2 24 00 00 st %g1, [ %l0 ] } rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode); 4000806c: 10 bf ff f5 b 40008040 40008070: d0 07 bf f4 ld [ %fp + -12 ], %o0 400073e0 : */ int pthread_rwlock_destroy( pthread_rwlock_t *rwlock ) { 400073e0: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock = NULL; Objects_Locations location; if ( !rwlock ) 400073e4: 80 a6 20 00 cmp %i0, 0 400073e8: 02 80 00 24 be 40007478 400073ec: 21 10 00 7b sethi %hi(0x4001ec00), %l0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 400073f0: d2 06 00 00 ld [ %i0 ], %o1 400073f4: 94 07 bf f4 add %fp, -12, %o2 400073f8: 40 00 0f 95 call 4000b24c <_Objects_Get> 400073fc: 90 14 20 dc or %l0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007400: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007404: 80 a0 60 00 cmp %g1, 0 40007408: 12 80 00 15 bne 4000745c 4000740c: b0 10 00 08 mov %o0, %i0 case OBJECTS_LOCAL: /* * If there is at least one thread waiting, then do not delete it. */ if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) { 40007410: 40 00 17 3b call 4000d0fc <_Thread_queue_First> 40007414: 90 02 20 10 add %o0, 0x10, %o0 40007418: 80 a2 20 00 cmp %o0, 0 4000741c: 02 80 00 1a be 40007484 40007420: 90 14 20 dc or %l0, 0xdc, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007424: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007428: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 4000742c: 90 10 20 10 mov 0x10, %o0 40007430: 84 00 bf ff add %g2, -1, %g2 40007434: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007438: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 4000743c: 80 a0 e0 00 cmp %g3, 0 40007440: 12 80 00 0c bne 40007470 40007444: 01 00 00 00 nop _Thread_Dispatch(); 40007448: 40 00 14 6d call 4000c5fc <_Thread_Dispatch> 4000744c: 01 00 00 00 nop 40007450: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40007454: 81 c7 e0 08 ret 40007458: 91 e8 00 08 restore %g0, %o0, %o0 if ( !rwlock ) return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000745c: 80 a0 60 02 cmp %g1, 2 40007460: 08 80 00 07 bleu 4000747c 40007464: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007468: 40 00 03 c1 call 4000836c <== NOT EXECUTED 4000746c: 01 00 00 00 nop <== NOT EXECUTED } 40007470: 81 c7 e0 08 ret 40007474: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40007478: 90 10 20 16 mov 0x16, %o0 } 4000747c: 81 c7 e0 08 ret 40007480: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40007484: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007488: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000748c: 05 00 00 3f sethi %hi(0xfc00), %g2 40007490: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40007494: 82 08 40 02 and %g1, %g2, %g1 40007498: 80 a0 40 03 cmp %g1, %g3 4000749c: 38 80 00 06 bgu,a 400074b4 400074a0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400074a4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400074a8: 83 28 60 02 sll %g1, 2, %g1 400074ac: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 400074b0: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free ( POSIX_RWLock_Control *the_RWLock ) { _Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object ); 400074b4: 40 00 0f 23 call 4000b140 <_Objects_Free> 400074b8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074bc: 03 10 00 7a sethi %hi(0x4001e800), %g1 400074c0: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 400074c4: 90 10 20 00 clr %o0 400074c8: 84 00 bf ff add %g2, -1, %g2 400074cc: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 400074d0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 400074d4: 80 a0 e0 00 cmp %g3, 0 400074d8: 12 bf ff e6 bne 40007470 400074dc: 01 00 00 00 nop _Thread_Dispatch(); 400074e0: 40 00 14 47 call 4000c5fc <_Thread_Dispatch> 400074e4: 01 00 00 00 nop 400074e8: 10 bf ff e2 b 40007470 400074ec: 90 10 20 00 clr %o0 ! 0 400074f0 : int pthread_rwlock_init( pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr ) { 400074f0: 9d e3 bf 88 save %sp, -120, %sp const pthread_rwlockattr_t *the_attr; /* * Error check parameters */ if ( !rwlock ) 400074f4: 80 a6 20 00 cmp %i0, 0 400074f8: 02 80 00 23 be 40007584 400074fc: a0 10 00 19 mov %i1, %l0 return EINVAL; /* * If the user passed in NULL, use the default attributes */ if ( attr ) { 40007500: 80 a6 60 00 cmp %i1, 0 40007504: 22 80 00 23 be,a 40007590 40007508: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 4000750c: c2 04 00 00 ld [ %l0 ], %g1 40007510: 80 a0 60 00 cmp %g1, 0 40007514: 22 80 00 1a be,a 4000757c 40007518: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED return EINVAL; switch ( the_attr->process_shared ) { 4000751c: c2 04 20 04 ld [ %l0 + 4 ], %g1 40007520: 80 a0 60 00 cmp %g1, 0 40007524: 32 80 00 16 bne,a 4000757c 40007528: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000752c: 33 10 00 7a sethi %hi(0x4001e800), %i1 40007530: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007534: 82 00 60 01 inc %g1 40007538: c2 26 62 40 st %g1, [ %i1 + 0x240 ] * 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 *) 4000753c: 23 10 00 7b sethi %hi(0x4001ec00), %l1 40007540: 40 00 0d f2 call 4000ad08 <_Objects_Allocate> 40007544: 90 14 60 dc or %l1, 0xdc, %o0 ! 4001ecdc <_POSIX_RWLock_Information> */ _Thread_Disable_dispatch(); /* prevents deletion */ the_rwlock = _POSIX_RWLock_Allocate(); if ( !the_rwlock ) { 40007548: a0 92 20 00 orcc %o0, 0, %l0 4000754c: 12 80 00 15 bne 400075a0 40007550: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 40007558: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 4000755c: 82 00 7f ff add %g1, -1, %g1 40007560: c2 26 62 40 st %g1, [ %i1 + 0x240 ] 40007564: c4 06 62 40 ld [ %i1 + 0x240 ], %g2 40007568: 80 a0 a0 00 cmp %g2, 0 4000756c: 12 80 00 07 bne 40007588 40007570: 01 00 00 00 nop 40007574: 40 00 14 22 call 4000c5fc <_Thread_Dispatch> 40007578: 01 00 00 00 nop 4000757c: 81 c7 e0 08 ret 40007580: 81 e8 00 00 restore 40007584: b0 10 20 16 mov 0x16, %i0 *rwlock = the_rwlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40007588: 81 c7 e0 08 ret 4000758c: 81 e8 00 00 restore * If the user passed in NULL, use the default attributes */ if ( attr ) { the_attr = attr; } else { (void) pthread_rwlockattr_init( &default_attr ); 40007590: 40 00 03 4e call 400082c8 <== NOT EXECUTED 40007594: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } /* * Now start error checking the attributes that we are going to use */ if ( !the_attr->is_initialized ) 40007598: 10 bf ff de b 40007510 <== NOT EXECUTED 4000759c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED if ( !the_rwlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes ); 400075a0: 40 00 0b 14 call 4000a1f0 <_CORE_RWLock_Initialize> 400075a4: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400075a8: 90 14 60 dc or %l1, 0xdc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400075ac: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400075b0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400075b4: 03 00 00 3f sethi %hi(0xfc00), %g1 400075b8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400075bc: 82 08 c0 01 and %g3, %g1, %g1 400075c0: 80 a0 40 02 cmp %g1, %g2 400075c4: 38 80 00 06 bgu,a 400075dc 400075c8: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400075cc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400075d0: 83 28 60 02 sll %g1, 2, %g1 400075d4: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_POSIX_RWLock_Information, &the_rwlock->Object, 0 ); *rwlock = the_rwlock->Object.id; 400075d8: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400075dc: c0 24 20 0c clr [ %l0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400075e0: c2 06 62 40 ld [ %i1 + 0x240 ], %g1 400075e4: 10 bf ff de b 4000755c 400075e8: b0 10 20 00 clr %i0 400075ec : */ int pthread_rwlock_rdlock( pthread_rwlock_t *rwlock ) { 400075ec: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400075f0: 80 a6 20 00 cmp %i0, 0 400075f4: 02 80 00 24 be 40007684 400075f8: 11 10 00 7b sethi %hi(0x4001ec00), %o0 RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get ( pthread_rwlock_t *RWLock, Objects_Locations *location ) { return (POSIX_RWLock_Control *) _Objects_Get( 400075fc: d2 06 00 00 ld [ %i0 ], %o1 40007600: 94 07 bf f4 add %fp, -12, %o2 40007604: 40 00 0f 12 call 4000b24c <_Objects_Get> 40007608: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 4000760c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007610: 80 a0 60 00 cmp %g1, 0 40007614: 22 80 00 09 be,a 40007638 40007618: d2 06 00 00 ld [ %i0 ], %o1 4000761c: 80 a0 60 02 cmp %g1, 2 40007620: 08 80 00 1a bleu 40007688 40007624: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007628: 40 00 03 51 call 4000836c <== NOT EXECUTED 4000762c: 01 00 00 00 nop <== NOT EXECUTED } 40007630: 81 c7 e0 08 ret <== NOT EXECUTED 40007634: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40007638: 90 02 20 10 add %o0, 0x10, %o0 4000763c: 94 10 20 01 mov 1, %o2 40007640: 96 10 20 00 clr %o3 40007644: 40 00 0a f6 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007648: 98 10 20 00 clr %o4 4000764c: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007650: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007654: 84 00 bf ff add %g2, -1, %g2 40007658: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 4000765c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007660: 80 a0 e0 00 cmp %g3, 0 40007664: 02 80 00 0b be 40007690 40007668: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 4000766c: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007670: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007674: 40 00 00 a1 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007678: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 4000767c: 81 c7 e0 08 ret 40007680: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007684: 90 10 20 16 mov 0x16, %o0 } 40007688: 81 c7 e0 08 ret 4000768c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007690: 40 00 13 db call 4000c5fc <_Thread_Dispatch> 40007694: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007698: 10 bf ff f6 b 40007670 4000769c: 03 10 00 7a sethi %hi(0x4001e800), %g1 400076a0 : int pthread_rwlock_timedrdlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 400076a0: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 400076a4: 80 a6 20 00 cmp %i0, 0 400076a8: 02 80 00 2b be 40007754 400076ac: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400076b0: 40 00 22 b7 call 4001018c <_POSIX_Absolute_timeout_to_ticks> 400076b4: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 400076b8: 80 a2 20 02 cmp %o0, 2 400076bc: 08 80 00 29 bleu 40007760 400076c0: b2 10 00 08 mov %o0, %i1 400076c4: 80 a2 20 03 cmp %o0, 3 400076c8: 22 80 00 02 be,a 400076d0 400076cc: a0 10 20 01 mov 1, %l0 400076d0: d2 06 00 00 ld [ %i0 ], %o1 400076d4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400076d8: 94 07 bf f4 add %fp, -12, %o2 400076dc: 40 00 0e dc call 4000b24c <_Objects_Get> 400076e0: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400076e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400076e8: 80 a0 60 00 cmp %g1, 0 400076ec: 12 80 00 27 bne 40007788 400076f0: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 400076f4: d2 06 00 00 ld [ %i0 ], %o1 400076f8: d6 07 bf f0 ld [ %fp + -16 ], %o3 400076fc: 90 02 20 10 add %o0, 0x10, %o0 40007700: 94 10 00 10 mov %l0, %o2 40007704: 40 00 0a c6 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007708: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000770c: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007710: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007714: 84 00 bf ff add %g2, -1, %g2 40007718: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 4000771c: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007720: 80 a0 e0 00 cmp %g3, 0 40007724: 02 80 00 26 be 400077bc 40007728: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 4000772c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40007730: 12 80 00 1e bne 400077a8 40007734: 07 10 00 7a sethi %hi(0x4001e800), %g3 40007738: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 4000773c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40007740: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40007744: 12 80 00 1a bne 400077ac <== NOT EXECUTED 40007748: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 4000774c: 12 80 00 15 bne 400077a0 <== NOT EXECUTED 40007750: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007754: 90 10 20 16 mov 0x16, %o0 } 40007758: 81 c7 e0 08 ret 4000775c: 91 e8 00 08 restore %g0, %o0, %o0 40007760: d2 06 00 00 ld [ %i0 ], %o1 40007764: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007768: 94 07 bf f4 add %fp, -12, %o2 4000776c: 40 00 0e b8 call 4000b24c <_Objects_Get> 40007770: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007774: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007778: 80 a0 60 00 cmp %g1, 0 4000777c: 02 bf ff de be 400076f4 40007780: a0 10 20 00 clr %l0 40007784: 80 a0 60 02 cmp %g1, 2 40007788: 08 bf ff f4 bleu 40007758 4000778c: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007790: 40 00 02 f7 call 4000836c <== NOT EXECUTED 40007794: 01 00 00 00 nop <== NOT EXECUTED } 40007798: 81 c7 e0 08 ret <== NOT EXECUTED 4000779c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400077a0: 08 bf ff ee bleu 40007758 <== NOT EXECUTED 400077a4: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400077a8: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 400077ac: 40 00 00 53 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400077b0: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400077b4: 81 c7 e0 08 ret 400077b8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400077bc: 40 00 13 90 call 4000c5fc <_Thread_Dispatch> 400077c0: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400077c4: 10 bf ff db b 40007730 400077c8: 80 a4 20 00 cmp %l0, 0 400077cc : int pthread_rwlock_timedwrlock( pthread_rwlock_t *rwlock, const struct timespec *abstime ) { 400077cc: 9d e3 bf 90 save %sp, -112, %sp Objects_Locations location; Watchdog_Interval ticks; boolean do_wait; POSIX_Absolute_timeout_conversion_results_t status; if ( !rwlock ) 400077d0: 80 a6 20 00 cmp %i0, 0 400077d4: 02 80 00 2b be 40007880 400077d8: 90 10 00 19 mov %i1, %o0 * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 400077dc: 40 00 22 6c call 4001018c <_POSIX_Absolute_timeout_to_ticks> 400077e0: 92 07 bf f0 add %fp, -16, %o1 switch (status) { 400077e4: 80 a2 20 02 cmp %o0, 2 400077e8: 08 80 00 29 bleu 4000788c 400077ec: b2 10 00 08 mov %o0, %i1 400077f0: 80 a2 20 03 cmp %o0, 3 400077f4: 22 80 00 02 be,a 400077fc 400077f8: a0 10 20 01 mov 1, %l0 400077fc: d2 06 00 00 ld [ %i0 ], %o1 40007800: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007804: 94 07 bf f4 add %fp, -12, %o2 40007808: 40 00 0e 91 call 4000b24c <_Objects_Get> 4000780c: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007810: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007814: 80 a0 60 00 cmp %g1, 0 40007818: 12 80 00 27 bne 400078b4 4000781c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007820: d2 06 00 00 ld [ %i0 ], %o1 40007824: d6 07 bf f0 ld [ %fp + -16 ], %o3 40007828: 90 02 20 10 add %o0, 0x10, %o0 4000782c: 94 10 00 10 mov %l0, %o2 40007830: 40 00 0a b0 call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007834: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007838: 03 10 00 7a sethi %hi(0x4001e800), %g1 4000783c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007840: 84 00 bf ff add %g2, -1, %g2 40007844: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007848: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 4000784c: 80 a0 e0 00 cmp %g3, 0 40007850: 02 80 00 26 be 400078e8 40007854: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 40007858: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 4000785c: 12 80 00 1e bne 400078d4 40007860: 07 10 00 7a sethi %hi(0x4001e800), %g3 40007864: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 ! 4001eb1c <_Thread_Executing> <== NOT EXECUTED 40007868: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 4000786c: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40007870: 12 80 00 1a bne 400078d8 <== NOT EXECUTED 40007874: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 40007878: 12 80 00 15 bne 400078cc <== NOT EXECUTED 4000787c: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007880: 90 10 20 16 mov 0x16, %o0 } 40007884: 81 c7 e0 08 ret 40007888: 91 e8 00 08 restore %g0, %o0, %o0 4000788c: d2 06 00 00 ld [ %i0 ], %o1 40007890: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007894: 94 07 bf f4 add %fp, -12, %o2 40007898: 40 00 0e 6d call 4000b24c <_Objects_Get> 4000789c: 90 12 20 dc or %o0, 0xdc, %o0 do_wait = TRUE; break; } the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400078a0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400078a4: 80 a0 60 00 cmp %g1, 0 400078a8: 02 bf ff de be 40007820 400078ac: a0 10 20 00 clr %l0 400078b0: 80 a0 60 02 cmp %g1, 2 400078b4: 08 bf ff f4 bleu 40007884 400078b8: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400078bc: 40 00 02 ac call 4000836c <== NOT EXECUTED 400078c0: 01 00 00 00 nop <== NOT EXECUTED } 400078c4: 81 c7 e0 08 ret <== NOT EXECUTED 400078c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); if ( !do_wait && (_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) { switch (status) { 400078cc: 08 bf ff ee bleu 40007884 <== NOT EXECUTED 400078d0: 90 10 20 74 mov 0x74, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: break; } } return _POSIX_RWLock_Translate_core_RWLock_return_code( 400078d4: c2 00 e3 1c ld [ %g3 + 0x31c ], %g1 400078d8: 40 00 00 08 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400078dc: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400078e0: 81 c7 e0 08 ret 400078e4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400078e8: 40 00 13 45 call 4000c5fc <_Thread_Dispatch> 400078ec: 01 00 00 00 nop ticks, NULL ); _Thread_Enable_dispatch(); if ( !do_wait && 400078f0: 10 bf ff db b 4000785c 400078f4: 80 a4 20 00 cmp %l0, 0 40007924 : */ int pthread_rwlock_tryrdlock( pthread_rwlock_t *rwlock ) { 40007924: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40007928: 80 a6 20 00 cmp %i0, 0 4000792c: 02 80 00 24 be 400079bc 40007930: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007934: d2 06 00 00 ld [ %i0 ], %o1 40007938: 94 07 bf f4 add %fp, -12, %o2 4000793c: 40 00 0e 44 call 4000b24c <_Objects_Get> 40007940: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007944: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007948: 80 a0 60 00 cmp %g1, 0 4000794c: 22 80 00 09 be,a 40007970 40007950: d2 06 00 00 ld [ %i0 ], %o1 40007954: 80 a0 60 02 cmp %g1, 2 40007958: 08 80 00 1a bleu 400079c0 4000795c: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007960: 40 00 02 83 call 4000836c <== NOT EXECUTED 40007964: 01 00 00 00 nop <== NOT EXECUTED } 40007968: 81 c7 e0 08 ret <== NOT EXECUTED 4000796c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_reading( 40007970: 90 02 20 10 add %o0, 0x10, %o0 40007974: 94 10 20 00 clr %o2 40007978: 96 10 20 00 clr %o3 4000797c: 40 00 0a 28 call 4000a21c <_CORE_RWLock_Obtain_for_reading> 40007980: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007984: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007988: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 4000798c: 84 00 bf ff add %g2, -1, %g2 40007990: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007994: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007998: 80 a0 e0 00 cmp %g3, 0 4000799c: 02 80 00 0b be 400079c8 400079a0: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400079a4: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 400079a8: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 400079ac: 7f ff ff d3 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 400079b0: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 400079b4: 81 c7 e0 08 ret 400079b8: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 400079bc: 90 10 20 16 mov 0x16, %o0 } 400079c0: 81 c7 e0 08 ret 400079c4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400079c8: 40 00 13 0d call 4000c5fc <_Thread_Dispatch> 400079cc: 01 00 00 00 nop NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 400079d0: 10 bf ff f6 b 400079a8 400079d4: 03 10 00 7a sethi %hi(0x4001e800), %g1 400079d8 : */ int pthread_rwlock_trywrlock( pthread_rwlock_t *rwlock ) { 400079d8: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 400079dc: 80 a6 20 00 cmp %i0, 0 400079e0: 02 80 00 24 be 40007a70 400079e4: 11 10 00 7b sethi %hi(0x4001ec00), %o0 400079e8: d2 06 00 00 ld [ %i0 ], %o1 400079ec: 94 07 bf f4 add %fp, -12, %o2 400079f0: 40 00 0e 17 call 4000b24c <_Objects_Get> 400079f4: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 400079f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400079fc: 80 a0 60 00 cmp %g1, 0 40007a00: 22 80 00 09 be,a 40007a24 40007a04: d2 06 00 00 ld [ %i0 ], %o1 40007a08: 80 a0 60 02 cmp %g1, 2 40007a0c: 08 80 00 1a bleu 40007a74 40007a10: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007a14: 40 00 02 56 call 4000836c <== NOT EXECUTED 40007a18: 01 00 00 00 nop <== NOT EXECUTED } 40007a1c: 81 c7 e0 08 ret <== NOT EXECUTED 40007a20: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007a24: 90 02 20 10 add %o0, 0x10, %o0 40007a28: 94 10 20 00 clr %o2 40007a2c: 96 10 20 00 clr %o3 40007a30: 40 00 0a 30 call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007a34: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007a38: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007a3c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007a40: 84 00 bf ff add %g2, -1, %g2 40007a44: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007a48: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007a4c: 80 a0 e0 00 cmp %g3, 0 40007a50: 02 80 00 0b be 40007a7c 40007a54: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007a58: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007a5c: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007a60: 7f ff ff a6 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007a64: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007a68: 81 c7 e0 08 ret 40007a6c: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007a70: 90 10 20 16 mov 0x16, %o0 } 40007a74: 81 c7 e0 08 ret 40007a78: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007a7c: 40 00 12 e0 call 4000c5fc <_Thread_Dispatch> 40007a80: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007a84: 10 bf ff f6 b 40007a5c 40007a88: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007a8c : */ int pthread_rwlock_unlock( pthread_rwlock_t *rwlock ) { 40007a8c: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; CORE_RWLock_Status status; if ( !rwlock ) 40007a90: 80 a6 20 00 cmp %i0, 0 40007a94: 02 80 00 1f be 40007b10 40007a98: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007a9c: d2 06 00 00 ld [ %i0 ], %o1 40007aa0: 94 07 bf f4 add %fp, -12, %o2 40007aa4: 40 00 0d ea call 4000b24c <_Objects_Get> 40007aa8: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007ab0: 80 a0 60 00 cmp %g1, 0 40007ab4: 02 80 00 08 be 40007ad4 40007ab8: 80 a0 60 02 cmp %g1, 2 40007abc: 08 80 00 16 bleu 40007b14 40007ac0: 90 10 20 16 mov 0x16, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40007ac4: 40 00 02 2a call 4000836c <== NOT EXECUTED 40007ac8: 01 00 00 00 nop <== NOT EXECUTED } 40007acc: 81 c7 e0 08 ret <== NOT EXECUTED 40007ad0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_RWLock_Release( &the_rwlock->RWLock ); 40007ad4: 40 00 0a 29 call 4000a378 <_CORE_RWLock_Release> 40007ad8: 90 02 20 10 add %o0, 0x10, %o0 40007adc: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007ae0: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007ae4: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007ae8: 84 00 bf ff add %g2, -1, %g2 40007aec: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007af0: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007af4: 80 a0 e0 00 cmp %g3, 0 40007af8: 02 80 00 09 be 40007b1c 40007afc: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); 40007b00: 7f ff ff 7e call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007b04: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40007b08: 81 c7 e0 08 ret 40007b0c: 91 e8 00 08 restore %g0, %o0, %o0 status = _CORE_RWLock_Release( &the_rwlock->RWLock ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40007b10: 90 10 20 16 mov 0x16, %o0 } 40007b14: 81 c7 e0 08 ret 40007b18: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007b1c: 40 00 12 b8 call 4000c5fc <_Thread_Dispatch> 40007b20: 01 00 00 00 nop 40007b24: 30 bf ff f7 b,a 40007b00 40007b28 : */ int pthread_rwlock_wrlock( pthread_rwlock_t *rwlock ) { 40007b28: 9d e3 bf 90 save %sp, -112, %sp POSIX_RWLock_Control *the_rwlock; Objects_Locations location; if ( !rwlock ) 40007b2c: 80 a6 20 00 cmp %i0, 0 40007b30: 02 80 00 24 be 40007bc0 40007b34: 11 10 00 7b sethi %hi(0x4001ec00), %o0 40007b38: d2 06 00 00 ld [ %i0 ], %o1 40007b3c: 94 07 bf f4 add %fp, -12, %o2 40007b40: 40 00 0d c3 call 4000b24c <_Objects_Get> 40007b44: 90 12 20 dc or %o0, 0xdc, %o0 return EINVAL; the_rwlock = _POSIX_RWLock_Get( rwlock, &location ); switch ( location ) { 40007b48: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007b4c: 80 a0 60 00 cmp %g1, 0 40007b50: 22 80 00 09 be,a 40007b74 40007b54: d2 06 00 00 ld [ %i0 ], %o1 40007b58: 80 a0 60 02 cmp %g1, 2 40007b5c: 08 80 00 1a bleu 40007bc4 40007b60: 90 10 20 16 mov 0x16, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007b64: 40 00 02 02 call 4000836c <== NOT EXECUTED 40007b68: 01 00 00 00 nop <== NOT EXECUTED } 40007b6c: 81 c7 e0 08 ret <== NOT EXECUTED 40007b70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: _CORE_RWLock_Obtain_for_writing( 40007b74: 90 02 20 10 add %o0, 0x10, %o0 40007b78: 94 10 20 01 mov 1, %o2 40007b7c: 96 10 20 00 clr %o3 40007b80: 40 00 09 dc call 4000a2f0 <_CORE_RWLock_Obtain_for_writing> 40007b84: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007b88: 03 10 00 7a sethi %hi(0x4001e800), %g1 40007b8c: c4 00 62 40 ld [ %g1 + 0x240 ], %g2 ! 4001ea40 <_Thread_Dispatch_disable_level> 40007b90: 84 00 bf ff add %g2, -1, %g2 40007b94: c4 20 62 40 st %g2, [ %g1 + 0x240 ] 40007b98: c6 00 62 40 ld [ %g1 + 0x240 ], %g3 40007b9c: 80 a0 e0 00 cmp %g3, 0 40007ba0: 02 80 00 0b be 40007bcc 40007ba4: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007ba8: 03 10 00 7a sethi %hi(0x4001e800), %g1 <== NOT EXECUTED 40007bac: c4 00 63 1c ld [ %g1 + 0x31c ], %g2 ! 4001eb1c <_Thread_Executing> 40007bb0: 7f ff ff 52 call 400078f8 <_POSIX_RWLock_Translate_core_RWLock_return_code> 40007bb4: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); } 40007bb8: 81 c7 e0 08 ret 40007bbc: 91 e8 00 08 restore %g0, %o0, %o0 return _POSIX_RWLock_Translate_core_RWLock_return_code( (CORE_RWLock_Status) _Thread_Executing->Wait.return_code ); } return POSIX_BOTTOM_REACHED(); 40007bc0: 90 10 20 16 mov 0x16, %o0 } 40007bc4: 81 c7 e0 08 ret 40007bc8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007bcc: 40 00 12 8c call 4000c5fc <_Thread_Dispatch> 40007bd0: 01 00 00 00 nop 0, NULL ); _Thread_Enable_dispatch(); return _POSIX_RWLock_Translate_core_RWLock_return_code( 40007bd4: 10 bf ff f6 b 40007bac 40007bd8: 03 10 00 7a sethi %hi(0x4001e800), %g1 40006e14 : int pthread_setcancelstate( int state, int *oldstate ) { 40006e14: 9d e3 bf 98 save %sp, -104, %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() ) 40006e18: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006e1c: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> int pthread_setcancelstate( int state, int *oldstate ) { 40006e20: 86 10 00 18 mov %i0, %g3 * 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() ) 40006e24: 80 a0 a0 00 cmp %g2, 0 40006e28: 12 80 00 22 bne 40006eb0 40006e2c: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldstate ) 40006e30: 80 a6 60 00 cmp %i1, 0 40006e34: 02 80 00 04 be 40006e44 40006e38: 80 a0 e0 01 cmp %g3, 1 return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) 40006e3c: 08 80 00 04 bleu 40006e4c 40006e40: 21 10 00 63 sethi %hi(0x40018c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40006e44: 81 c7 e0 08 ret <== NOT EXECUTED 40006e48: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006e4c: 09 10 00 63 sethi %hi(0x40018c00), %g4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006e50: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006e54: c4 01 23 ac ld [ %g4 + 0x3ac ], %g2 40006e58: 82 00 60 01 inc %g1 40006e5c: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40006e60: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006e64: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006e68: 80 a0 e0 00 cmp %g3, 0 return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; _Thread_Disable_dispatch(); *oldstate = thread_support->cancelability_state; 40006e6c: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_state = state; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006e70: 12 80 00 06 bne 40006e88 40006e74: c6 20 a0 cc st %g3, [ %g2 + 0xcc ] 40006e78: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1 40006e7c: 80 a0 60 01 cmp %g1, 1 40006e80: 22 80 00 0e be,a 40006eb8 40006e84: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e88: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006e8c: b0 10 20 00 clr %i0 40006e90: 82 00 7f ff add %g1, -1, %g1 40006e94: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40006e98: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40006e9c: 80 a0 a0 00 cmp %g2, 0 40006ea0: 12 80 00 04 bne 40006eb0 40006ea4: 01 00 00 00 nop _Thread_Dispatch(); 40006ea8: 40 00 10 27 call 4000af44 <_Thread_Dispatch> 40006eac: 01 00 00 00 nop 40006eb0: 81 c7 e0 08 ret 40006eb4: 81 e8 00 00 restore 40006eb8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006ebc: 02 bf ff f3 be 40006e88 <== NOT EXECUTED 40006ec0: 01 00 00 00 nop <== NOT EXECUTED thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40006ec4: 7f ff fd b7 call 400065a0 <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40006ec8: d0 01 23 ac ld [ %g4 + 0x3ac ], %o0 <== NOT EXECUTED 40006ecc: 30 bf ff ef b,a 40006e88 <== NOT EXECUTED 40006ed0 : int pthread_setcanceltype( int type, int *oldtype ) { 40006ed0: 9d e3 bf 98 save %sp, -104, %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() ) 40006ed4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006ed8: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> int pthread_setcanceltype( int type, int *oldtype ) { 40006edc: 88 10 00 18 mov %i0, %g4 * 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() ) 40006ee0: 80 a0 a0 00 cmp %g2, 0 40006ee4: 12 80 00 22 bne 40006f6c 40006ee8: b0 10 20 47 mov 0x47, %i0 return EPROTO; if ( !oldtype ) 40006eec: 80 a6 60 00 cmp %i1, 0 40006ef0: 02 80 00 04 be 40006f00 40006ef4: 80 a1 20 01 cmp %g4, 1 return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) 40006ef8: 08 80 00 04 bleu 40006f08 40006efc: 21 10 00 63 sethi %hi(0x40018c00), %l0 thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); _Thread_Enable_dispatch(); return 0; } 40006f00: 81 c7 e0 08 ret <== NOT EXECUTED 40006f04: 91 e8 20 16 restore %g0, 0x16, %o0 <== NOT EXECUTED return EINVAL; if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS ) return EINVAL; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006f08: 1b 10 00 63 sethi %hi(0x40018c00), %o5 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006f0c: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006f10: c4 03 63 ac ld [ %o5 + 0x3ac ], %g2 40006f14: 82 00 60 01 inc %g1 40006f18: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40006f1c: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); *oldtype = thread_support->cancelability_type; 40006f20: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1 40006f24: c2 26 40 00 st %g1, [ %i1 ] thread_support->cancelability_type = type; if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006f28: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2 40006f2c: 80 a0 a0 00 cmp %g2, 0 40006f30: 12 80 00 05 bne 40006f44 40006f34: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ] 40006f38: 80 a1 20 01 cmp %g4, 1 40006f3c: 22 80 00 0e be,a 40006f74 40006f40: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006f44: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006f48: b0 10 20 00 clr %i0 40006f4c: 82 00 7f ff add %g1, -1, %g1 40006f50: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40006f54: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40006f58: 80 a0 a0 00 cmp %g2, 0 40006f5c: 12 80 00 04 bne 40006f6c 40006f60: 01 00 00 00 nop _Thread_Dispatch(); 40006f64: 40 00 0f f8 call 4000af44 <_Thread_Dispatch> 40006f68: 01 00 00 00 nop 40006f6c: 81 c7 e0 08 ret 40006f70: 81 e8 00 00 restore 40006f74: 80 a0 60 00 cmp %g1, 0 40006f78: 02 bf ff f3 be 40006f44 40006f7c: 01 00 00 00 nop thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS && thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 40006f80: 7f ff fd 88 call 400065a0 <_POSIX_Threads_cancel_run> <== NOT EXECUTED 40006f84: d0 03 63 ac ld [ %o5 + 0x3ac ], %o0 <== NOT EXECUTED 40006f88: 30 bf ff ef b,a 40006f44 <== NOT EXECUTED 40009a24 : int pthread_setschedparam( pthread_t thread, int policy, struct sched_param *param ) { 40009a24: 9d e3 bf 90 save %sp, -112, %sp /* * Check all the parameters */ if ( !param ) 40009a28: 80 a6 a0 00 cmp %i2, 0 40009a2c: 02 80 00 10 be 40009a6c 40009a30: 90 10 20 16 mov 0x16, %o0 return EINVAL; if ( !_POSIX_Priority_Is_valid( param->sched_priority ) ) 40009a34: c2 06 80 00 ld [ %i2 ], %g1 40009a38: 82 00 7f ff add %g1, -1, %g1 40009a3c: 80 a0 60 fd cmp %g1, 0xfd 40009a40: 18 80 00 0b bgu 40009a6c 40009a44: 80 a6 60 01 cmp %i1, 1 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009a48: 02 80 00 66 be 40009be0 40009a4c: a2 10 20 00 clr %l1 40009a50: 04 80 00 66 ble 40009be8 40009a54: 80 a6 60 02 cmp %i1, 2 40009a58: 02 80 00 07 be 40009a74 40009a5c: 80 a6 60 03 cmp %i1, 3 40009a60: 02 80 00 41 be 40009b64 40009a64: 01 00 00 00 nop } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009a68: 90 10 20 16 mov 0x16, %o0 ! 16 } 40009a6c: 81 c7 e0 08 ret 40009a70: 91 e8 00 08 restore %g0, %o0, %o0 return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009a74: a2 10 20 02 mov 2, %l1 40009a78: a4 10 20 00 clr %l2 40009a7c: 92 10 00 18 mov %i0, %o1 40009a80: 11 10 00 71 sethi %hi(0x4001c400), %o0 40009a84: 94 07 bf f4 add %fp, -12, %o2 40009a88: 40 00 0b 37 call 4000c764 <_Objects_Get> 40009a8c: 90 12 22 68 or %o0, 0x268, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009a90: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009a94: 80 a0 60 00 cmp %g1, 0 40009a98: 12 80 00 4b bne 40009bc4 40009a9c: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: case OBJECTS_REMOTE: return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; 40009aa0: e0 02 21 70 ld [ %o0 + 0x170 ], %l0 if ( api->schedpolicy == SCHED_SPORADIC ) 40009aa4: c2 04 20 7c ld [ %l0 + 0x7c ], %g1 40009aa8: 80 a0 60 03 cmp %g1, 3 40009aac: 02 80 00 5e be 40009c24 40009ab0: 01 00 00 00 nop (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; 40009ab4: f2 24 20 7c st %i1, [ %l0 + 0x7c ] api->schedparam = *param; 40009ab8: c6 06 80 00 ld [ %i2 ], %g3 the_thread->budget_algorithm = budget_algorithm; 40009abc: e2 26 20 88 st %l1, [ %i0 + 0x88 ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009ac0: c6 24 20 80 st %g3, [ %l0 + 0x80 ] 40009ac4: c2 06 a0 04 ld [ %i2 + 4 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; 40009ac8: e4 26 20 8c st %l2, [ %i0 + 0x8c ] if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009acc: c2 24 20 84 st %g1, [ %l0 + 0x84 ] 40009ad0: c4 06 a0 08 ld [ %i2 + 8 ], %g2 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009ad4: 80 a6 60 00 cmp %i1, 0 if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); api->schedpolicy = policy; api->schedparam = *param; 40009ad8: c4 24 20 88 st %g2, [ %l0 + 0x88 ] 40009adc: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 40009ae0: c2 24 20 8c st %g1, [ %l0 + 0x8c ] 40009ae4: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2 40009ae8: c4 24 20 90 st %g2, [ %l0 + 0x90 ] 40009aec: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1 the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009af0: 06 80 00 0f bl 40009b2c 40009af4: c2 24 20 94 st %g1, [ %l0 + 0x94 ] 40009af8: 80 a6 60 02 cmp %i1, 2 40009afc: 14 80 00 41 bg 40009c00 40009b00: 80 a6 60 03 cmp %i1, 3 40009b04: c6 04 20 80 ld [ %l0 + 0x80 ], %g3 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40009b08: 03 10 00 70 sethi %hi(0x4001c000), %g1 40009b0c: c4 00 62 d8 ld [ %g1 + 0x2d8 ], %g2 ! 4001c2d8 <_Thread_Ticks_per_timeslice> 40009b10: 92 10 20 ff mov 0xff, %o1 the_thread->real_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009b14: 90 10 00 18 mov %i0, %o0 40009b18: 92 22 40 03 sub %o1, %g3, %o1 switch ( api->schedpolicy ) { case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice; 40009b1c: c4 26 20 84 st %g2, [ %i0 + 0x84 ] the_thread->real_priority = 40009b20: d2 26 20 18 st %o1, [ %i0 + 0x18 ] _POSIX_Priority_To_core( api->schedparam.sched_priority ); _Thread_Change_priority( 40009b24: 40 00 0e d8 call 4000d684 <_Thread_Change_priority> 40009b28: 94 10 20 01 mov 1, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009b2c: 03 10 00 70 sethi %hi(0x4001c000), %g1 40009b30: c4 00 63 80 ld [ %g1 + 0x380 ], %g2 ! 4001c380 <_Thread_Dispatch_disable_level> 40009b34: 90 10 20 00 clr %o0 40009b38: 84 00 bf ff add %g2, -1, %g2 40009b3c: c4 20 63 80 st %g2, [ %g1 + 0x380 ] 40009b40: c6 00 63 80 ld [ %g1 + 0x380 ], %g3 40009b44: 80 a0 e0 00 cmp %g3, 0 40009b48: 12 bf ff c9 bne 40009a6c 40009b4c: 01 00 00 00 nop _Thread_Dispatch(); 40009b50: 40 00 0f f1 call 4000db14 <_Thread_Dispatch> 40009b54: 01 00 00 00 nop 40009b58: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40009b5c: 81 c7 e0 08 ret 40009b60: 91 e8 00 08 restore %g0, %o0, %o0 case SCHED_SPORADIC: budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT; budget_callout = _POSIX_Threads_Sporadic_budget_callout; if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < 40009b64: 40 00 14 80 call 4000ed64 <_Timespec_To_ticks> 40009b68: 90 06 a0 08 add %i2, 8, %o0 40009b6c: a0 10 00 08 mov %o0, %l0 40009b70: 40 00 14 7d call 4000ed64 <_Timespec_To_ticks> 40009b74: 90 06 a0 10 add %i2, 0x10, %o0 40009b78: 80 a4 00 08 cmp %l0, %o0 40009b7c: 2a bf ff bc bcs,a 40009a6c 40009b80: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40009b84: c2 06 a0 04 ld [ %i2 + 4 ], %g1 40009b88: 82 00 7f ff add %g1, -1, %g1 40009b8c: 80 a0 60 fd cmp %g1, 0xfd 40009b90: 18 bf ff b6 bgu 40009a68 40009b94: 03 10 00 26 sethi %hi(0x40009800), %g1 40009b98: 92 10 00 18 mov %i0, %o1 40009b9c: a4 10 60 e8 or %g1, 0xe8, %l2 40009ba0: 11 10 00 71 sethi %hi(0x4001c400), %o0 40009ba4: 94 07 bf f4 add %fp, -12, %o2 40009ba8: 40 00 0a ef call 4000c764 <_Objects_Get> 40009bac: 90 12 22 68 or %o0, 0x268, %o0 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009bb0: c2 07 bf f4 ld [ %fp + -12 ], %g1 if ( _Timespec_To_ticks( ¶m->ss_replenish_period ) < _Timespec_To_ticks( ¶m->ss_initial_budget ) ) return EINVAL; if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) ) 40009bb4: a2 10 20 03 mov 3, %l1 /* * Actually change the scheduling policy and parameters */ the_thread = _POSIX_Threads_Get( thread, &location ); switch ( location ) { 40009bb8: 80 a0 60 00 cmp %g1, 0 40009bbc: 02 bf ff b9 be 40009aa0 40009bc0: b0 10 00 08 mov %o0, %i0 40009bc4: 80 a0 60 02 cmp %g1, 2 40009bc8: 08 bf ff a9 bleu 40009a6c 40009bcc: 90 10 20 03 mov 3, %o0 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009bd0: 40 00 00 2c call 40009c80 <== NOT EXECUTED 40009bd4: 01 00 00 00 nop <== NOT EXECUTED } 40009bd8: 81 c7 e0 08 ret <== NOT EXECUTED 40009bdc: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED return EINVAL; budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; budget_callout = NULL; switch ( policy ) { 40009be0: 10 bf ff a7 b 40009a7c 40009be4: a4 10 20 00 clr %l2 40009be8: 80 a6 60 00 cmp %i1, 0 40009bec: a2 10 20 01 mov 1, %l1 40009bf0: 02 bf ff a3 be 40009a7c 40009bf4: a4 10 20 00 clr %l2 } _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40009bf8: 10 bf ff 9d b 40009a6c 40009bfc: 90 10 20 16 mov 0x16, %o0 api->schedpolicy = policy; api->schedparam = *param; the_thread->budget_algorithm = budget_algorithm; the_thread->budget_callout = budget_callout; switch ( api->schedpolicy ) { 40009c00: 12 bf ff cb bne 40009b2c 40009c04: 01 00 00 00 nop TRUE ); break; case SCHED_SPORADIC: api->ss_high_priority = api->schedparam.sched_priority; 40009c08: c6 24 20 98 st %g3, [ %l0 + 0x98 ] _Watchdog_Remove( &api->Sporadic_timer ); 40009c0c: 40 00 15 d3 call 4000f358 <_Watchdog_Remove> 40009c10: 90 04 20 9c add %l0, 0x9c, %o0 _POSIX_Threads_Sporadic_budget_TSR( 0, the_thread ); 40009c14: 92 10 00 18 mov %i0, %o1 40009c18: 7f ff ff 48 call 40009938 <_POSIX_Threads_Sporadic_budget_TSR> 40009c1c: 90 10 20 00 clr %o0 40009c20: 30 bf ff c3 b,a 40009b2c return ESRCH; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_POSIX ]; if ( api->schedpolicy == SCHED_SPORADIC ) (void) _Watchdog_Remove( &api->Sporadic_timer ); 40009c24: 40 00 15 cd call 4000f358 <_Watchdog_Remove> 40009c28: 90 04 20 9c add %l0, 0x9c, %o0 api->schedpolicy = policy; 40009c2c: 10 bf ff a3 b 40009ab8 40009c30: f2 24 20 7c st %i1, [ %l0 + 0x7c ] 40006e8c : int pthread_setspecific( pthread_key_t key, const void *value ) { 40006e8c: 9d e3 bf 90 save %sp, -112, %sp 40006e90: 11 10 00 65 sethi %hi(0x40019400), %o0 40006e94: 92 10 00 18 mov %i0, %o1 40006e98: 90 12 20 80 or %o0, 0x80, %o0 40006e9c: 40 00 0d 22 call 4000a324 <_Objects_Get> 40006ea0: 94 07 bf f4 add %fp, -12, %o2 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006ea4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006ea8: 80 a0 60 00 cmp %g1, 0 40006eac: 12 80 00 19 bne 40006f10 40006eb0: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never happen */ return EINVAL; case OBJECTS_LOCAL: api = _Objects_Get_API( _Thread_Executing->Object.id ); 40006eb4: 03 10 00 64 sethi %hi(0x40019000), %g1 40006eb8: c4 00 60 5c ld [ %g1 + 0x5c ], %g2 ! 4001905c <_Thread_Executing> 40006ebc: c6 00 a0 08 ld [ %g2 + 8 ], %g3 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; 40006ec0: 05 00 00 3f sethi %hi(0xfc00), %g2 40006ec4: 83 30 e0 16 srl %g3, 0x16, %g1 40006ec8: 82 08 60 1c and %g1, 0x1c, %g1 40006ecc: 82 00 40 08 add %g1, %o0, %g1 40006ed0: c8 00 60 18 ld [ %g1 + 0x18 ], %g4 40006ed4: 84 10 a3 ff or %g2, 0x3ff, %g2 40006ed8: 86 08 c0 02 and %g3, %g2, %g3 40006edc: 87 28 e0 02 sll %g3, 2, %g3 40006ee0: f2 21 00 03 st %i1, [ %g4 + %g3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006ee4: 07 10 00 63 sethi %hi(0x40018c00), %g3 40006ee8: c2 00 e3 80 ld [ %g3 + 0x380 ], %g1 ! 40018f80 <_Thread_Dispatch_disable_level> 40006eec: 90 10 20 00 clr %o0 40006ef0: 82 00 7f ff add %g1, -1, %g1 40006ef4: c2 20 e3 80 st %g1, [ %g3 + 0x380 ] 40006ef8: c4 00 e3 80 ld [ %g3 + 0x380 ], %g2 40006efc: 80 a0 a0 00 cmp %g2, 0 40006f00: 02 80 00 0a be 40006f28 40006f04: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006f08: 81 c7 e0 08 ret 40006f0c: 91 e8 00 08 restore %g0, %o0, %o0 uint32_t api; uint32_t index; Objects_Locations location; the_key = _POSIX_Keys_Get( key, &location ); switch ( location ) { 40006f10: 08 bf ff fe bleu 40006f08 40006f14: 90 10 20 16 mov 0x16, %o0 index = _Objects_Get_index( _Thread_Executing->Object.id ); the_key->Values[ api ][ index ] = (void *) value; _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006f18: 40 00 02 4a call 40007840 <== NOT EXECUTED 40006f1c: 01 00 00 00 nop <== NOT EXECUTED } 40006f20: 81 c7 e0 08 ret <== NOT EXECUTED 40006f24: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40006f28: 40 00 11 eb call 4000b6d4 <_Thread_Dispatch> 40006f2c: 01 00 00 00 nop 40006f30: 90 10 20 00 clr %o0 ! 0 40006f34: 81 c7 e0 08 ret 40006f38: 91 e8 00 08 restore %g0, %o0, %o0 40006a8c : */ int pthread_spin_destroy( pthread_spinlock_t *spinlock ) { 40006a8c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; if ( !spinlock ) 40006a90: 80 a6 20 00 cmp %i0, 0 40006a94: 02 80 00 23 be 40006b20 40006a98: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 40006a9c: d2 06 00 00 ld [ %i0 ], %o1 40006aa0: 31 10 00 59 sethi %hi(0x40016400), %i0 40006aa4: 40 00 0c 4e call 40009bdc <_Objects_Get> 40006aa8: 90 16 21 54 or %i0, 0x154, %o0 ! 40016554 <_POSIX_Spinlock_Information> return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006aac: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006ab0: 80 a0 60 00 cmp %g1, 0 40006ab4: 12 80 00 14 bne 40006b04 40006ab8: 92 10 00 08 mov %o0, %o1 RTEMS_INLINE_ROUTINE boolean _CORE_spinlock_Is_busy( CORE_spinlock_Control *the_spinlock ) { return (the_spinlock->users != 0); 40006abc: c2 02 20 18 ld [ %o0 + 0x18 ], %g1 case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: if ( _CORE_spinlock_Is_busy( &the_spinlock->Spinlock ) ) { 40006ac0: 80 a0 60 00 cmp %g1, 0 40006ac4: 02 80 00 1a be 40006b2c 40006ac8: 90 16 21 54 or %i0, 0x154, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006acc: 03 10 00 58 sethi %hi(0x40016000), %g1 40006ad0: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006ad4: 90 10 20 10 mov 0x10, %o0 40006ad8: 84 00 bf ff add %g2, -1, %g2 40006adc: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006ae0: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006ae4: 80 a0 e0 00 cmp %g3, 0 40006ae8: 12 80 00 0c bne 40006b18 40006aec: 01 00 00 00 nop _Thread_Dispatch(); 40006af0: 40 00 11 27 call 4000af8c <_Thread_Dispatch> 40006af4: 01 00 00 00 nop 40006af8: 90 10 20 10 mov 0x10, %o0 ! 10 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40006afc: 81 c7 e0 08 ret 40006b00: 91 e8 00 08 restore %g0, %o0, %o0 if ( !spinlock ) return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006b04: 80 a0 60 02 cmp %g1, 2 40006b08: 08 80 00 07 bleu 40006b24 40006b0c: 90 10 20 16 mov 0x16, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006b10: 40 00 00 e9 call 40006eb4 <== NOT EXECUTED 40006b14: 01 00 00 00 nop <== NOT EXECUTED } 40006b18: 81 c7 e0 08 ret 40006b1c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40006b20: 90 10 20 16 mov 0x16, %o0 } 40006b24: 81 c7 e0 08 ret 40006b28: 91 e8 00 08 restore %g0, %o0, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006b2c: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006b30: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006b34: 05 00 00 3f sethi %hi(0xfc00), %g2 40006b38: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006b3c: 82 08 40 02 and %g1, %g2, %g1 40006b40: 80 a0 40 03 cmp %g1, %g3 40006b44: 18 80 00 04 bgu 40006b54 40006b48: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40006b4c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006b50: c0 20 80 01 clr [ %g2 + %g1 ] */ RTEMS_INLINE_ROUTINE void _POSIX_Spinlock_Free ( POSIX_Spinlock_Control *the_spinlock ) { _Objects_Free( &_POSIX_Spinlock_Information, &the_spinlock->Object ); 40006b54: 40 00 0b df call 40009ad0 <_Objects_Free> 40006b58: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006b5c: 03 10 00 58 sethi %hi(0x40016000), %g1 40006b60: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006b64: 90 10 20 00 clr %o0 40006b68: 84 00 bf ff add %g2, -1, %g2 40006b6c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006b70: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006b74: 80 a0 e0 00 cmp %g3, 0 40006b78: 12 bf ff e8 bne 40006b18 40006b7c: 01 00 00 00 nop _Thread_Dispatch(); 40006b80: 40 00 11 03 call 4000af8c <_Thread_Dispatch> 40006b84: 01 00 00 00 nop 40006b88: 10 bf ff e4 b 40006b18 40006b8c: 90 10 20 00 clr %o0 ! 0 40006b90 : int pthread_spin_init( pthread_spinlock_t *spinlock, int pshared ) { 40006b90: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock; CORE_spinlock_Attributes attributes; if ( !spinlock ) 40006b94: 80 a6 20 00 cmp %i0, 0 40006b98: 02 80 00 1a be 40006c00 40006b9c: 80 a6 60 00 cmp %i1, 0 return EINVAL; switch ( pshared ) { 40006ba0: 32 80 00 16 bne,a 40006bf8 40006ba4: b0 10 20 16 mov 0x16, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006ba8: 21 10 00 58 sethi %hi(0x40016000), %l0 40006bac: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 ! 40016220 <_Thread_Dispatch_disable_level> 40006bb0: 82 00 60 01 inc %g1 40006bb4: c2 24 22 20 st %g1, [ %l0 + 0x220 ] * This function allocates a spinlock control block from * the inactive chain of free spinlock control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Allocate( void ) { return (POSIX_Spinlock_Control *) 40006bb8: 23 10 00 59 sethi %hi(0x40016400), %l1 40006bbc: 40 00 0a b7 call 40009698 <_Objects_Allocate> 40006bc0: 90 14 61 54 or %l1, 0x154, %o0 ! 40016554 <_POSIX_Spinlock_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_spinlock = _POSIX_Spinlock_Allocate(); if ( !the_spinlock ) { 40006bc4: b2 92 20 00 orcc %o0, 0, %i1 40006bc8: 12 80 00 11 bne 40006c0c 40006bcc: 90 06 60 10 add %i1, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006bd0: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 40006bd4: b0 10 20 0b mov 0xb, %i0 _Thread_Dispatch(); 40006bd8: 82 00 7f ff add %g1, -1, %g1 40006bdc: c2 24 22 20 st %g1, [ %l0 + 0x220 ] 40006be0: c4 04 22 20 ld [ %l0 + 0x220 ], %g2 40006be4: 80 a0 a0 00 cmp %g2, 0 40006be8: 12 80 00 07 bne 40006c04 40006bec: 01 00 00 00 nop 40006bf0: 40 00 10 e7 call 4000af8c <_Thread_Dispatch> 40006bf4: 01 00 00 00 nop 40006bf8: 81 c7 e0 08 ret 40006bfc: 81 e8 00 00 restore 40006c00: b0 10 20 16 mov 0x16, %i0 *spinlock = the_spinlock->Object.id; _Thread_Enable_dispatch(); return 0; } 40006c04: 81 c7 e0 08 ret 40006c08: 81 e8 00 00 restore if ( !the_spinlock ) { _Thread_Enable_dispatch(); return EAGAIN; } _CORE_spinlock_Initialize( &the_spinlock->Spinlock, &attributes ); 40006c0c: 40 00 08 76 call 40008de4 <_CORE_spinlock_Initialize> 40006c10: 92 07 bf f4 add %fp, -12, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c14: 90 14 61 54 or %l1, 0x154, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006c18: c6 06 60 08 ld [ %i1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006c1c: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006c20: 03 00 00 3f sethi %hi(0xfc00), %g1 40006c24: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006c28: 82 08 c0 01 and %g3, %g1, %g1 40006c2c: 80 a0 40 02 cmp %g1, %g2 40006c30: 38 80 00 06 bgu,a 40006c48 40006c34: c6 26 00 00 st %g3, [ %i0 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006c38: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006c3c: 83 28 60 02 sll %g1, 2, %g1 40006c40: f2 20 80 01 st %i1, [ %g2 + %g1 ] &_POSIX_Spinlock_Information, &the_spinlock->Object, 0 ); *spinlock = the_spinlock->Object.id; 40006c44: c6 26 00 00 st %g3, [ %i0 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006c48: c0 26 60 0c clr [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c4c: c2 04 22 20 ld [ %l0 + 0x220 ], %g1 40006c50: 10 bf ff e2 b 40006bd8 40006c54: b0 10 20 00 clr %i0 40006c58 : */ int pthread_spin_lock( pthread_spinlock_t *spinlock ) { 40006c58: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006c5c: 80 a6 20 00 cmp %i0, 0 40006c60: 02 80 00 21 be 40006ce4 40006c64: 11 10 00 59 sethi %hi(0x40016400), %o0 RTEMS_INLINE_ROUTINE POSIX_Spinlock_Control *_POSIX_Spinlock_Get ( pthread_spinlock_t *spinlock, Objects_Locations *location ) { return (POSIX_Spinlock_Control *) _Objects_Get( 40006c68: d2 06 00 00 ld [ %i0 ], %o1 40006c6c: 94 07 bf f4 add %fp, -12, %o2 40006c70: 40 00 0b db call 40009bdc <_Objects_Get> 40006c74: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006c78: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006c7c: 80 a0 60 00 cmp %g1, 0 40006c80: 02 80 00 09 be 40006ca4 40006c84: 92 10 20 01 mov 1, %o1 40006c88: 80 a0 60 02 cmp %g1, 2 40006c8c: 08 80 00 17 bleu 40006ce8 40006c90: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006c94: 40 00 00 88 call 40006eb4 <== NOT EXECUTED 40006c98: 01 00 00 00 nop <== NOT EXECUTED } 40006c9c: 81 c7 e0 08 ret <== NOT EXECUTED 40006ca0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); 40006ca4: 94 10 20 00 clr %o2 40006ca8: 40 00 08 74 call 40008e78 <_CORE_spinlock_Wait> 40006cac: 90 02 20 10 add %o0, 0x10, %o0 40006cb0: b0 10 00 08 mov %o0, %i0 40006cb4: 03 10 00 58 sethi %hi(0x40016000), %g1 40006cb8: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006cbc: 84 00 bf ff add %g2, -1, %g2 40006cc0: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006cc4: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006cc8: 80 a0 e0 00 cmp %g3, 0 40006ccc: 02 80 00 09 be 40006cf0 40006cd0: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006cd4: 40 00 00 0a call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006cd8: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006cdc: 81 c7 e0 08 ret 40006ce0: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, TRUE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006ce4: 90 10 20 16 mov 0x16, %o0 } 40006ce8: 81 c7 e0 08 ret 40006cec: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006cf0: 40 00 10 a7 call 4000af8c <_Thread_Dispatch> 40006cf4: 01 00 00 00 nop 40006cf8: 30 bf ff f7 b,a 40006cd4 40006d28 : */ int pthread_spin_trylock( pthread_spinlock_t *spinlock ) { 40006d28: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006d2c: 80 a6 20 00 cmp %i0, 0 40006d30: 02 80 00 21 be 40006db4 40006d34: 11 10 00 59 sethi %hi(0x40016400), %o0 40006d38: d2 06 00 00 ld [ %i0 ], %o1 40006d3c: 94 07 bf f4 add %fp, -12, %o2 40006d40: 40 00 0b a7 call 40009bdc <_Objects_Get> 40006d44: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006d48: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006d4c: 80 a0 60 00 cmp %g1, 0 40006d50: 02 80 00 09 be 40006d74 40006d54: 92 10 20 00 clr %o1 40006d58: 80 a0 60 02 cmp %g1, 2 40006d5c: 08 80 00 17 bleu 40006db8 40006d60: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006d64: 40 00 00 54 call 40006eb4 <== NOT EXECUTED 40006d68: 01 00 00 00 nop <== NOT EXECUTED } 40006d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40006d70: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); 40006d74: 94 10 20 00 clr %o2 40006d78: 40 00 08 40 call 40008e78 <_CORE_spinlock_Wait> 40006d7c: 90 02 20 10 add %o0, 0x10, %o0 40006d80: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d84: 03 10 00 58 sethi %hi(0x40016000), %g1 40006d88: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006d8c: 84 00 bf ff add %g2, -1, %g2 40006d90: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006d94: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006d98: 80 a0 e0 00 cmp %g3, 0 40006d9c: 02 80 00 09 be 40006dc0 40006da0: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006da4: 7f ff ff d6 call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006da8: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006dac: 81 c7 e0 08 ret 40006db0: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Wait( &the_spinlock->Spinlock, FALSE, 0 ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006db4: 90 10 20 16 mov 0x16, %o0 } 40006db8: 81 c7 e0 08 ret 40006dbc: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006dc0: 40 00 10 73 call 4000af8c <_Thread_Dispatch> 40006dc4: 01 00 00 00 nop 40006dc8: 30 bf ff f7 b,a 40006da4 40006dcc : */ int pthread_spin_unlock( pthread_spinlock_t *spinlock ) { 40006dcc: 9d e3 bf 90 save %sp, -112, %sp POSIX_Spinlock_Control *the_spinlock = NULL; Objects_Locations location; CORE_spinlock_Status status; if ( !spinlock ) 40006dd0: 80 a6 20 00 cmp %i0, 0 40006dd4: 02 80 00 1f be 40006e50 40006dd8: 11 10 00 59 sethi %hi(0x40016400), %o0 40006ddc: d2 06 00 00 ld [ %i0 ], %o1 40006de0: 94 07 bf f4 add %fp, -12, %o2 40006de4: 40 00 0b 7e call 40009bdc <_Objects_Get> 40006de8: 90 12 21 54 or %o0, 0x154, %o0 return EINVAL; the_spinlock = _POSIX_Spinlock_Get( spinlock, &location ); switch ( location ) { 40006dec: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006df0: 80 a0 60 00 cmp %g1, 0 40006df4: 02 80 00 08 be 40006e14 40006df8: 80 a0 60 02 cmp %g1, 2 40006dfc: 08 80 00 16 bleu 40006e54 40006e00: 90 10 20 16 mov 0x16, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006e04: 40 00 00 2c call 40006eb4 <== NOT EXECUTED 40006e08: 01 00 00 00 nop <== NOT EXECUTED } 40006e0c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e10: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return EINVAL; case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); 40006e14: 40 00 07 fb call 40008e00 <_CORE_spinlock_Release> 40006e18: 90 02 20 10 add %o0, 0x10, %o0 40006e1c: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006e20: 03 10 00 58 sethi %hi(0x40016000), %g1 40006e24: c4 00 62 20 ld [ %g1 + 0x220 ], %g2 ! 40016220 <_Thread_Dispatch_disable_level> 40006e28: 84 00 bf ff add %g2, -1, %g2 40006e2c: c4 20 62 20 st %g2, [ %g1 + 0x220 ] 40006e30: c6 00 62 20 ld [ %g1 + 0x220 ], %g3 40006e34: 80 a0 e0 00 cmp %g3, 0 40006e38: 02 80 00 09 be 40006e5c 40006e3c: 01 00 00 00 nop _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); 40006e40: 7f ff ff af call 40006cfc <_POSIX_Spinlock_Translate_core_spinlock_return_code> 40006e44: 90 10 00 18 mov %i0, %o0 } return POSIX_BOTTOM_REACHED(); } 40006e48: 81 c7 e0 08 ret 40006e4c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_LOCAL: status = _CORE_spinlock_Release( &the_spinlock->Spinlock ); _Thread_Enable_dispatch(); return _POSIX_Spinlock_Translate_core_spinlock_return_code( status ); } return POSIX_BOTTOM_REACHED(); 40006e50: 90 10 20 16 mov 0x16, %o0 } 40006e54: 81 c7 e0 08 ret 40006e58: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40006e5c: 40 00 10 4c call 4000af8c <_Thread_Dispatch> 40006e60: 01 00 00 00 nop 40006e64: 30 bf ff f7 b,a 40006e40 40006fb0 : * * 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183 */ void pthread_testcancel( void ) { 40006fb0: 9d e3 bf 98 save %sp, -104, %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() ) 40006fb4: 03 10 00 63 sethi %hi(0x40018c00), %g1 40006fb8: c4 00 63 94 ld [ %g1 + 0x394 ], %g2 ! 40018f94 <_ISR_Nest_level> 40006fbc: 80 a0 a0 00 cmp %g2, 0 40006fc0: 12 80 00 17 bne 4000701c 40006fc4: 21 10 00 63 sethi %hi(0x40018c00), %l0 return; thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; 40006fc8: 07 10 00 63 sethi %hi(0x40018c00), %g3 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006fcc: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40006fd0: c4 00 e3 ac ld [ %g3 + 0x3ac ], %g2 40006fd4: 82 00 60 01 inc %g1 40006fd8: c4 00 a1 70 ld [ %g2 + 0x170 ], %g2 40006fdc: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] _Thread_Disable_dispatch(); if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE && 40006fe0: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1 40006fe4: 80 a0 60 00 cmp %g1, 0 40006fe8: 12 80 00 06 bne 40007000 40006fec: 01 00 00 00 nop 40006ff0: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 40006ff4: 80 a0 60 00 cmp %g1, 0 40006ff8: 12 80 00 0d bne 4000702c 40006ffc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007000: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40007004: 82 00 7f ff add %g1, -1, %g1 40007008: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 4000700c: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40007010: 80 a0 a0 00 cmp %g2, 0 40007014: 02 80 00 04 be 40007024 40007018: 01 00 00 00 nop 4000701c: 81 c7 e0 08 ret <== NOT EXECUTED 40007020: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40007024: 40 00 0f c8 call 4000af44 <_Thread_Dispatch> 40007028: 81 e8 00 00 restore thread_support->cancelation_requested ) _POSIX_Threads_cancel_run( _Thread_Executing ); 4000702c: 7f ff fd 5d call 400065a0 <_POSIX_Threads_cancel_run> 40007030: d0 00 e3 ac ld [ %g3 + 0x3ac ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007034: c2 04 22 d0 ld [ %l0 + 0x2d0 ], %g1 40007038: 82 00 7f ff add %g1, -1, %g1 4000703c: c2 24 22 d0 st %g1, [ %l0 + 0x2d0 ] 40007040: c4 04 22 d0 ld [ %l0 + 0x2d0 ], %g2 40007044: 80 a0 a0 00 cmp %g2, 0 40007048: 12 bf ff f5 bne 4000701c 4000704c: 01 00 00 00 nop 40007050: 30 bf ff f5 b,a 40007024 40019550 : ssize_t read( int fd, void *buffer, size_t count ) { 40019550: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019554: 03 10 00 6a sethi %hi(0x4001a800), %g1 40019558: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 4001aa2c ssize_t read( int fd, void *buffer, size_t count ) { 4001955c: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 40019560: 80 a6 00 02 cmp %i0, %g2 40019564: 1a 80 00 24 bcc 400195f4 40019568: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 4001956c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40019570: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 ! 4001bc18 40019574: 85 2e 20 02 sll %i0, 2, %g2 40019578: 83 2e 20 04 sll %i0, 4, %g1 4001957c: 82 20 40 02 sub %g1, %g2, %g1 40019580: 82 00 40 18 add %g1, %i0, %g1 40019584: 83 28 60 02 sll %g1, 2, %g1 40019588: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 4001958c: c2 06 20 0c ld [ %i0 + 0xc ], %g1 40019590: 80 88 61 00 btst 0x100, %g1 40019594: 02 80 00 18 be 400195f4 40019598: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 4001959c: 02 80 00 1c be 4001960c 400195a0: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 400195a4: 02 80 00 12 be 400195ec 400195a8: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 400195ac: 80 88 60 02 btst 2, %g1 400195b0: 02 80 00 17 be 4001960c 400195b4: 01 00 00 00 nop /* * Now process the read(). */ if ( !iop->handlers->read_h ) 400195b8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 400195bc: c2 00 60 08 ld [ %g1 + 8 ], %g1 400195c0: 80 a0 60 00 cmp %g1, 0 400195c4: 02 80 00 18 be 40019624 400195c8: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->read_h)( iop, buffer, count ); 400195cc: 9f c0 40 00 call %g1 400195d0: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 400195d4: 80 a2 20 00 cmp %o0, 0 400195d8: 04 80 00 05 ble 400195ec 400195dc: 01 00 00 00 nop iop->offset += rc; 400195e0: c2 06 20 08 ld [ %i0 + 8 ], %g1 400195e4: 82 00 40 08 add %g1, %o0, %g1 400195e8: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 400195ec: 81 c7 e0 08 ret 400195f0: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 400195f4: 7f ff da 5f call 4000ff70 <__errno> <== NOT EXECUTED 400195f8: 01 00 00 00 nop <== NOT EXECUTED 400195fc: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 40019600: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019604: 10 bf ff fa b 400195ec <== NOT EXECUTED 40019608: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 4001960c: 7f ff da 59 call 4000ff70 <__errno> <== NOT EXECUTED 40019610: 01 00 00 00 nop <== NOT EXECUTED 40019614: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40019618: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001961c: 10 bf ff f4 b 400195ec <== NOT EXECUTED 40019620: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019624: 7f ff da 53 call 4000ff70 <__errno> <== NOT EXECUTED 40019628: 01 00 00 00 nop <== NOT EXECUTED 4001962c: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40019630: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019634: 10 bf ff ee b 400195ec <== NOT EXECUTED 40019638: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 4001ab58 : /* * get next entry in a directory. */ struct dirent * readdir(dirp) register DIR *dirp; { 4001ab58: 9d e3 bf 98 save %sp, -104, %sp register struct dirent *dp; if ( !dirp ) 4001ab5c: 80 a6 20 00 cmp %i0, 0 4001ab60: 02 80 00 29 be 4001ac04 4001ab64: 88 10 20 00 clr %g4 4001ab68: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; for (;;) { if (dirp->dd_loc == 0) { 4001ab6c: c4 06 20 04 ld [ %i0 + 4 ], %g2 4001ab70: 80 a0 a0 00 cmp %g2, 0 4001ab74: 22 80 00 1b be,a 4001abe0 4001ab78: d0 06 00 00 ld [ %i0 ], %o0 dirp->dd_len); if (dirp->dd_size <= 0) return NULL; } if (dirp->dd_loc >= dirp->dd_size) { 4001ab7c: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001ab80: 80 a0 40 02 cmp %g1, %g2 4001ab84: 24 bf ff fa ble,a 4001ab6c 4001ab88: c0 26 20 04 clr [ %i0 + 4 ] dirp->dd_loc = 0; continue; } dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc); 4001ab8c: 88 00 80 09 add %g2, %o1, %g4 if ((intptr_t)dp & 03) /* bogus pointer check */ 4001ab90: 80 89 20 03 btst 3, %g4 4001ab94: 32 80 00 1c bne,a 4001ac04 4001ab98: 88 10 20 00 clr %g4 <== NOT EXECUTED return NULL; if (dp->d_reclen <= 0 || 4001ab9c: c6 11 20 08 lduh [ %g4 + 8 ], %g3 4001aba0: 80 a0 e0 00 cmp %g3, 0 4001aba4: 02 80 00 17 be 4001ac00 4001aba8: 9a 00 80 03 add %g2, %g3, %o5 4001abac: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 4001abb0: 82 00 60 01 inc %g1 4001abb4: 82 20 40 02 sub %g1, %g2, %g1 4001abb8: 80 a0 c0 01 cmp %g3, %g1 4001abbc: 34 80 00 12 bg,a 4001ac04 4001abc0: 88 10 20 00 clr %g4 <== NOT EXECUTED dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; 4001abc4: da 26 20 04 st %o5, [ %i0 + 4 ] if (dp->d_ino == 0) 4001abc8: c2 00 80 09 ld [ %g2 + %o1 ], %g1 4001abcc: 80 a0 60 00 cmp %g1, 0 4001abd0: 22 bf ff e8 be,a 4001ab70 4001abd4: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED continue; return (dp); } } 4001abd8: 81 c7 e0 08 ret 4001abdc: 91 e8 00 04 restore %g0, %g4, %o0 if ( !dirp ) return NULL; for (;;) { if (dirp->dd_loc == 0) { dirp->dd_size = getdents (dirp->dd_fd, 4001abe0: 40 00 29 54 call 40025130 4001abe4: d4 06 20 10 ld [ %i0 + 0x10 ], %o2 dirp->dd_buf, dirp->dd_len); if (dirp->dd_size <= 0) 4001abe8: 80 a2 20 00 cmp %o0, 0 4001abec: 04 80 00 05 ble 4001ac00 4001abf0: d0 26 20 08 st %o0, [ %i0 + 8 ] 4001abf4: c4 06 20 04 ld [ %i0 + 4 ], %g2 4001abf8: 10 bf ff e1 b 4001ab7c 4001abfc: d2 06 20 0c ld [ %i0 + 0xc ], %o1 return NULL; if (dp->d_reclen <= 0 || dp->d_reclen > dirp->dd_len + 1 - dirp->dd_loc) return NULL; dirp->dd_loc += dp->d_reclen; if (dp->d_ino == 0) 4001ac00: 88 10 20 00 clr %g4 continue; return (dp); } } 4001ac04: 81 c7 e0 08 ret 4001ac08: 91 e8 00 04 restore %g0, %g4, %o0 40007090 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 40007090: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t loc; int result; if (!buf) 40007094: 80 a6 60 00 cmp %i1, 0 40007098: 02 80 00 27 be 40007134 4000709c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); 400070a0: a0 07 bf e8 add %fp, -24, %l0 400070a4: 92 10 20 00 clr %o1 400070a8: 94 10 00 10 mov %l0, %o2 400070ac: 96 10 20 00 clr %o3 400070b0: 7f ff f9 89 call 400056d4 400070b4: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 400070b8: 80 a2 20 00 cmp %o0, 0 400070bc: 12 80 00 1c bne 4000712c 400070c0: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !loc.ops->node_type_h ){ 400070c4: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 400070c8: 80 a0 60 00 cmp %g1, 0 400070cc: 22 80 00 31 be,a 40007190 400070d0: 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 ){ 400070d4: 9f c0 40 00 call %g1 400070d8: 90 10 00 10 mov %l0, %o0 400070dc: 80 a2 20 04 cmp %o0, 4 400070e0: 12 80 00 1b bne 4000714c 400070e4: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EINVAL ); } if ( !loc.ops->readlink_h ){ 400070e8: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1 400070ec: 80 a0 60 00 cmp %g1, 0 400070f0: 02 80 00 27 be 4000718c 400070f4: 92 10 00 19 mov %i1, %o1 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 400070f8: 94 10 00 1a mov %i2, %o2 400070fc: 9f c0 40 00 call %g1 40007100: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40007104: c2 07 bf f0 ld [ %fp + -16 ], %g1 40007108: 80 a0 60 00 cmp %g1, 0 4000710c: 02 80 00 08 be 4000712c 40007110: b0 10 00 08 mov %o0, %i0 40007114: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007118: 80 a0 60 00 cmp %g1, 0 4000711c: 02 80 00 26 be 400071b4 40007120: 01 00 00 00 nop 40007124: 9f c0 40 00 call %g1 40007128: 90 10 00 10 mov %l0, %o0 return result; } 4000712c: 81 c7 e0 08 ret 40007130: 81 e8 00 00 restore { rtems_filesystem_location_info_t loc; int result; if (!buf) rtems_set_errno_and_return_minus_one( EFAULT ); 40007134: 40 00 35 76 call 4001470c <__errno> <== NOT EXECUTED 40007138: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000713c: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED 40007140: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007144: 81 c7 e0 08 ret <== NOT EXECUTED 40007148: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ rtems_filesystem_freenode( &loc ); 4000714c: c2 07 bf f0 ld [ %fp + -16 ], %g1 40007150: 80 a0 60 00 cmp %g1, 0 40007154: 02 80 00 08 be 40007174 40007158: 01 00 00 00 nop 4000715c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007160: 80 a0 60 00 cmp %g1, 0 40007164: 02 80 00 04 be 40007174 40007168: 01 00 00 00 nop 4000716c: 9f c0 40 00 call %g1 40007170: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EINVAL ); 40007174: 40 00 35 66 call 4001470c <__errno> 40007178: b0 10 3f ff mov -1, %i0 4000717c: 82 10 20 16 mov 0x16, %g1 40007180: c2 22 00 00 st %g1, [ %o0 ] 40007184: 81 c7 e0 08 ret 40007188: 81 e8 00 00 restore } if ( !loc.ops->readlink_h ){ rtems_filesystem_freenode( &loc ); 4000718c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40007190: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007194: 02 80 00 04 be 400071a4 <== NOT EXECUTED 40007198: 01 00 00 00 nop <== NOT EXECUTED 4000719c: 9f c0 40 00 call %g1 <== NOT EXECUTED 400071a0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400071a4: 40 00 35 5a call 4001470c <__errno> <== NOT EXECUTED 400071a8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400071ac: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400071b0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400071b4: 81 c7 e0 08 ret <== NOT EXECUTED 400071b8: 81 e8 00 00 restore <== NOT EXECUTED 40003608 : void *realloc( void *ptr, size_t size ) { 40003608: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 4000360c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40003610: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> <== NOT EXECUTED 40003614: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 40003618: 02 80 00 10 be 40003658 <== NOT EXECUTED 4000361c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED } /* * Continue with realloc(). */ if ( !ptr ) 40003620: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40003624: 02 80 00 13 be 40003670 <== NOT EXECUTED 40003628: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED return malloc( size ); if ( !size ) { 4000362c: 02 80 00 15 be 40003680 <== NOT EXECUTED 40003630: 21 10 00 6f sethi %hi(0x4001bc00), %l0 <== NOT EXECUTED memcpy(np,ptr,size); free(ptr); return np; } #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, size ) ) { 40003634: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40003638: 90 14 20 24 or %l0, 0x24, %o0 <== NOT EXECUTED 4000363c: 40 00 19 95 call 40009c90 <_Protected_heap_Resize_block> <== NOT EXECUTED 40003640: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED 40003644: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40003648: 02 80 00 13 be 40003694 <== NOT EXECUTED 4000364c: 01 00 00 00 nop <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40003650: 81 c7 e0 08 ret <== NOT EXECUTED 40003654: 81 e8 00 00 restore <== NOT EXECUTED /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 40003658: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 <== NOT EXECUTED 4000365c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003660: 02 80 00 25 be 400036f4 <== NOT EXECUTED 40003664: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 40003668: 81 c7 e0 08 ret <== NOT EXECUTED 4000366c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Continue with realloc(). */ if ( !ptr ) return malloc( size ); 40003670: 7f ff ff 95 call 400034c4 <== NOT EXECUTED 40003674: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 40003678: 81 c7 e0 08 ret <== NOT EXECUTED 4000367c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED if ( !size ) { free( ptr ); 40003680: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003684: 7f ff ff 67 call 40003420 <== NOT EXECUTED 40003688: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000368c: 81 c7 e0 08 ret <== NOT EXECUTED 40003690: 81 e8 00 00 restore <== NOT EXECUTED #endif if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, size ) ) { return ptr; } new_area = malloc( size ); 40003694: 7f ff ff 8c call 400034c4 <== NOT EXECUTED 40003698: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED * There used to be a free on this error case but it is wrong to * free the memory per OpenGroup Single UNIX Specification V2 * and the C Standard. */ if ( !new_area ) { 4000369c: a2 92 20 00 orcc %o0, 0, %l1 <== NOT EXECUTED 400036a0: 02 bf ff f2 be 40003668 <== NOT EXECUTED 400036a4: 90 14 20 24 or %l0, 0x24, %o0 <== NOT EXECUTED return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { 400036a8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400036ac: 40 00 18 dd call 40009a20 <_Protected_heap_Get_block_size> <== NOT EXECUTED 400036b0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400036b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400036b8: 02 80 00 15 be 4000370c <== NOT EXECUTED 400036bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED errno = EINVAL; return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 400036c0: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED 400036c4: 08 80 00 03 bleu 400036d0 <== NOT EXECUTED 400036c8: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 400036cc: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED 400036d0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400036d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400036d8: 40 00 33 fb call 400106c4 <== NOT EXECUTED 400036dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED free( ptr ); 400036e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400036e4: 7f ff ff 4f call 40003420 <== NOT EXECUTED 400036e8: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 400036ec: 81 c7 e0 08 ret <== NOT EXECUTED 400036f0: 81 e8 00 00 restore <== NOT EXECUTED if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 400036f4: c4 00 62 a4 ld [ %g1 + 0x2a4 ], %g2 <== NOT EXECUTED 400036f8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400036fc: 02 bf ff ca be 40003624 <== NOT EXECUTED 40003700: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; 40003704: 81 c7 e0 08 ret <== NOT EXECUTED 40003708: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( !new_area ) { return (void *) 0; } if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) { errno = EINVAL; 4000370c: 40 00 32 19 call 4000ff70 <__errno> <== NOT EXECUTED 40003710: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003714: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40003718: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000371c: 81 c7 e0 08 ret <== NOT EXECUTED 40003720: 81 e8 00 00 restore <== NOT EXECUTED 4001ac0c : #include int rmdir( const char *pathname ) { 4001ac0c: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); 4001ac10: 92 10 20 00 clr %o1 4001ac14: 90 10 00 18 mov %i0, %o0 4001ac18: a0 07 bf e8 add %fp, -24, %l0 4001ac1c: 96 10 20 00 clr %o3 4001ac20: 7f ff ad 0d call 40006054 4001ac24: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 4001ac28: 80 a2 20 00 cmp %o0, 0 4001ac2c: 02 80 00 04 be 4001ac3c 4001ac30: 90 10 20 02 mov 2, %o0 result = (*loc.handlers->rmnod_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 4001ac34: 81 c7 e0 08 ret 4001ac38: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 4001ac3c: 7f ff ac d6 call 40005f94 4001ac40: 92 10 00 10 mov %l0, %o1 if (result != 0) { 4001ac44: 80 a2 20 00 cmp %o0, 0 4001ac48: 12 80 00 2d bne 4001acfc 4001ac4c: c4 07 bf f0 ld [ %fp + -16 ], %g2 /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 4001ac50: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4001ac54: 80 a0 60 00 cmp %g1, 0 4001ac58: 22 80 00 35 be,a 4001ad2c 4001ac5c: 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_DIRECTORY ){ 4001ac60: 9f c0 40 00 call %g1 4001ac64: 90 10 00 10 mov %l0, %o0 4001ac68: 80 a2 20 01 cmp %o0, 1 4001ac6c: 12 80 00 14 bne 4001acbc 4001ac70: c2 07 bf ec ld [ %fp + -20 ], %g1 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 4001ac74: c2 00 60 34 ld [ %g1 + 0x34 ], %g1 4001ac78: 80 a0 60 00 cmp %g1, 0 4001ac7c: 22 80 00 37 be,a 4001ad58 4001ac80: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.handlers->rmnod_h)( &loc ); 4001ac84: 9f c0 40 00 call %g1 4001ac88: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4001ac8c: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001ac90: 80 a0 60 00 cmp %g1, 0 4001ac94: 02 80 00 08 be 4001acb4 4001ac98: b0 10 00 08 mov %o0, %i0 4001ac9c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001aca0: 80 a0 60 00 cmp %g1, 0 4001aca4: 02 80 00 2b be 4001ad50 4001aca8: 01 00 00 00 nop 4001acac: 9f c0 40 00 call %g1 4001acb0: 90 10 00 10 mov %l0, %o0 4001acb4: 81 c7 e0 08 ret 4001acb8: 81 e8 00 00 restore rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ rtems_filesystem_freenode( &loc ); 4001acbc: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001acc0: 80 a0 60 00 cmp %g1, 0 4001acc4: 02 80 00 08 be 4001ace4 4001acc8: 01 00 00 00 nop 4001accc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001acd0: 80 a0 60 00 cmp %g1, 0 4001acd4: 02 80 00 04 be 4001ace4 4001acd8: 01 00 00 00 nop 4001acdc: 9f c0 40 00 call %g1 4001ace0: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 4001ace4: 40 00 32 66 call 4002767c <__errno> 4001ace8: b0 10 3f ff mov -1, %i0 4001acec: 82 10 20 14 mov 0x14, %g1 4001acf0: c2 22 00 00 st %g1, [ %o0 ] 4001acf4: 81 c7 e0 08 ret 4001acf8: 81 e8 00 00 restore if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0) { rtems_filesystem_freenode( &loc ); 4001acfc: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001ad00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ad04: 02 bf ff ec be 4001acb4 <== NOT EXECUTED 4001ad08: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001ad0c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001ad10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ad14: 02 bf ff e8 be 4001acb4 <== NOT EXECUTED 4001ad18: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001ad1c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001ad20: 01 00 00 00 nop <== NOT EXECUTED 4001ad24: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad28: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ rtems_filesystem_freenode( &loc ); 4001ad2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ad30: 02 80 00 04 be 4001ad40 <== NOT EXECUTED 4001ad34: 01 00 00 00 nop <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 4001ad38: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001ad3c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001ad40: 40 00 32 4f call 4002767c <__errno> <== NOT EXECUTED 4001ad44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001ad48: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001ad4c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ad50: 81 c7 e0 08 ret <== NOT EXECUTED 4001ad54: 81 e8 00 00 restore <== NOT EXECUTED /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ rtems_filesystem_freenode( &loc ); 4001ad58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ad5c: 02 bf ff f9 be 4001ad40 <== NOT EXECUTED 4001ad60: 01 00 00 00 nop <== NOT EXECUTED 4001ad64: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001ad68: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001ad6c: 12 bf ff f3 bne 4001ad38 <== NOT EXECUTED 4001ad70: 01 00 00 00 nop <== NOT EXECUTED 4001ad74: 30 bf ff f3 b,a 4001ad40 <== NOT EXECUTED 4001a8e4 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[32] = ""; #endif return bad_buffer; } 4001a8e4: 11 10 00 b2 sethi %hi(0x4002c800), %o0 <== NOT EXECUTED 4001a8e8: 81 c3 e0 08 retl <== NOT EXECUTED 4001a8ec: 90 12 21 a0 or %o0, 0x1a0, %o0 ! 4002c9a0 <== NOT EXECUTED 40016008 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 40016008: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4001600c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40016010: 40 00 00 0b call 4001603c <== NOT EXECUTED 40016014: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (nap) 40016018: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001601c: 02 80 00 05 be 40016030 <== NOT EXECUTED 40016020: 01 00 00 00 nop <== NOT EXECUTED return nap->name; return rtems_assoc_name_bad(local_value); } 40016024: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED 40016028: 81 c7 e0 08 ret <== NOT EXECUTED 4001602c: 81 e8 00 00 restore <== NOT EXECUTED nap = rtems_assoc_ptr_by_local(ap, local_value); if (nap) return nap->name; return rtems_assoc_name_bad(local_value); 40016030: 40 00 12 2d call 4001a8e4 <== NOT EXECUTED 40016034: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED 40016038: 01 00 00 00 nop 4000fe84 : const rtems_assoc_t *rtems_assoc_ptr_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000fe84: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000fe88: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED 4000fe8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fe90: 02 80 00 1e be 4000ff08 <== NOT EXECUTED 4000fe94: 13 10 00 68 sethi %hi(0x4001a000), %o1 <== NOT EXECUTED 4000fe98: 40 00 04 c4 call 400111a8 <== NOT EXECUTED 4000fe9c: 92 12 62 10 or %o1, 0x210, %o1 ! 4001a210 <_POSIX_Threads_Default_attributes+0x118> <== NOT EXECUTED 4000fea0: 84 10 00 18 mov %i0, %g2 <== NOT EXECUTED 4000fea4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000fea8: 12 80 00 0f bne 4000fee4 <== NOT EXECUTED 4000feac: 86 10 20 00 clr %g3 <== NOT EXECUTED default_ap = ap++; for ( ; ap->name; ap++) 4000feb0: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000feb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000feb8: 02 80 00 10 be 4000fef8 <== NOT EXECUTED 4000febc: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED if (ap->local_value == local_value) 4000fec0: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4000fec4: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000fec8: 02 80 00 0b be 4000fef4 <== NOT EXECUTED 4000fecc: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000fed0: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED 4000fed4: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED 4000fed8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000fedc: 02 80 00 09 be 4000ff00 <== NOT EXECUTED 4000fee0: 01 00 00 00 nop <== NOT EXECUTED if (ap->local_value == local_value) 4000fee4: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4000fee8: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000feec: 32 bf ff fa bne,a 4000fed4 <== NOT EXECUTED 4000fef0: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000fef4: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED if (ap->local_value == local_value) return ap; return default_ap; } 4000fef8: 81 c7 e0 08 ret <== NOT EXECUTED 4000fefc: 81 e8 00 00 restore <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000ff00: 81 c7 e0 08 ret <== NOT EXECUTED 4000ff04: 91 e8 00 03 restore %g0, %g3, %o0 <== NOT EXECUTED uint32_t local_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000ff08: 81 c7 e0 08 ret <== NOT EXECUTED 4000ff0c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000f464 : const rtems_assoc_t *rtems_assoc_ptr_by_remote( const rtems_assoc_t *ap, uint32_t remote_value ) { 4000f464: 9d e3 bf 98 save %sp, -104, %sp const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000f468: d0 06 00 00 ld [ %i0 ], %o0 4000f46c: 80 a2 20 00 cmp %o0, 0 4000f470: 02 80 00 1e be 4000f4e8 4000f474: 13 10 00 68 sethi %hi(0x4001a000), %o1 4000f478: 40 00 07 4c call 400111a8 4000f47c: 92 12 62 10 or %o1, 0x210, %o1 ! 4001a210 <_POSIX_Threads_Default_attributes+0x118> 4000f480: 84 10 00 18 mov %i0, %g2 4000f484: 80 a2 20 00 cmp %o0, 0 4000f488: 12 80 00 0f bne 4000f4c4 4000f48c: 86 10 20 00 clr %g3 default_ap = ap++; for ( ; ap->name; ap++) 4000f490: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED 4000f494: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000f498: 02 80 00 10 be 4000f4d8 <== NOT EXECUTED 4000f49c: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED if (ap->remote_value == remote_value) 4000f4a0: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 4000f4a4: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4000f4a8: 02 80 00 0b be 4000f4d4 <== NOT EXECUTED 4000f4ac: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000f4b0: 84 00 a0 0c add %g2, 0xc, %g2 <== NOT EXECUTED 4000f4b4: c2 00 80 00 ld [ %g2 ], %g1 4000f4b8: 80 a0 60 00 cmp %g1, 0 4000f4bc: 02 80 00 09 be 4000f4e0 4000f4c0: 01 00 00 00 nop if (ap->remote_value == remote_value) 4000f4c4: c2 00 a0 08 ld [ %g2 + 8 ], %g1 4000f4c8: 80 a0 40 19 cmp %g1, %i1 4000f4cc: 32 bf ff fa bne,a 4000f4b4 4000f4d0: 84 00 a0 0c add %g2, 0xc, %g2 const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000f4d4: b0 10 00 02 mov %g2, %i0 if (ap->remote_value == remote_value) return ap; return default_ap; } 4000f4d8: 81 c7 e0 08 ret 4000f4dc: 81 e8 00 00 restore const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) default_ap = ap++; for ( ; ap->name; ap++) 4000f4e0: 81 c7 e0 08 ret 4000f4e4: 91 e8 00 03 restore %g0, %g3, %o0 uint32_t remote_value ) { const rtems_assoc_t *default_ap = 0; if (rtems_assoc_is_default(ap)) 4000f4e8: 81 c7 e0 08 ret <== NOT EXECUTED 4000f4ec: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4000f4f0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { 4000f4f0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); 4000f4f4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000f4f8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4000f4fc: 40 00 02 62 call 4000fe84 <== NOT EXECUTED 4000f500: b0 10 20 00 clr %i0 <== NOT EXECUTED if (nap) 4000f504: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000f508: 32 80 00 02 bne,a 4000f510 <== NOT EXECUTED 4000f50c: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED return nap->remote_value; return 0; } 4000f510: 81 c7 e0 08 ret <== NOT EXECUTED 4000f514: 81 e8 00 00 restore <== NOT EXECUTED 400073d0 : rtems_name name, rtems_attribute attribute_set, uint32_t maximum_waiters, rtems_id *id ) { 400073d0: 9d e3 bf 90 save %sp, -112, %sp Barrier_Control *the_barrier; CORE_barrier_Attributes the_attributes; if ( !rtems_is_name_valid( name ) ) 400073d4: a4 96 20 00 orcc %i0, 0, %l2 400073d8: 02 80 00 20 be 40007458 400073dc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400073e0: 80 a6 e0 00 cmp %i3, 0 400073e4: 02 80 00 1d be 40007458 400073e8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { 400073ec: 80 8e 60 10 btst 0x10, %i1 400073f0: 02 80 00 39 be 400074d4 400073f4: 80 a6 a0 00 cmp %i2, 0 the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) 400073f8: 02 80 00 18 be 40007458 400073fc: b0 10 20 0a mov 0xa, %i0 if ( !id ) return RTEMS_INVALID_ADDRESS; /* Initialize core barrier attributes */ if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; 40007400: c0 27 bf f0 clr [ %fp + -16 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007404: 21 10 00 81 sethi %hi(0x40020400), %l0 40007408: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 ! 40020590 <_Thread_Dispatch_disable_level> if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; the_attributes.maximum_count = maximum_waiters; 4000740c: f4 27 bf f4 st %i2, [ %fp + -12 ] 40007410: 82 00 60 01 inc %g1 40007414: c2 24 21 90 st %g1, [ %l0 + 0x190 ] * This function allocates a barrier control block from * the inactive chain of free barrier control blocks. */ RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void ) { return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information ); 40007418: 23 10 00 80 sethi %hi(0x40020000), %l1 4000741c: 40 00 0a 6b call 40009dc8 <_Objects_Allocate> 40007420: 90 14 63 f8 or %l1, 0x3f8, %o0 ! 400203f8 <_Barrier_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_barrier = _Barrier_Allocate(); if ( !the_barrier ) { 40007424: b4 92 20 00 orcc %o0, 0, %i2 40007428: 12 80 00 0e bne 40007460 4000742c: 90 06 a0 14 add %i2, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007430: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 40007434: b0 10 20 05 mov 5, %i0 40007438: 82 00 7f ff add %g1, -1, %g1 4000743c: c2 24 21 90 st %g1, [ %l0 + 0x190 ] 40007440: c4 04 21 90 ld [ %l0 + 0x190 ], %g2 40007444: 80 a0 a0 00 cmp %g2, 0 40007448: 12 80 00 21 bne 400074cc 4000744c: 01 00 00 00 nop _Thread_Dispatch(); 40007450: 40 00 10 d7 call 4000b7ac <_Thread_Dispatch> 40007454: 01 00 00 00 nop 40007458: 81 c7 e0 08 ret 4000745c: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } the_barrier->attribute_set = attribute_set; 40007460: f2 26 a0 10 st %i1, [ %i2 + 0x10 ] _CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes ); 40007464: 40 00 07 8d call 40009298 <_CORE_barrier_Initialize> 40007468: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000746c: 90 14 63 f8 or %l1, 0x3f8, %o0 Objects_Name name ) { uint32_t index; index = _Objects_Get_index( the_object->id ); 40007470: c6 06 a0 08 ld [ %i2 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007474: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40007478: 03 00 00 3f sethi %hi(0xfc00), %g1 4000747c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40007480: 82 08 c0 01 and %g3, %g1, %g1 40007484: 80 a0 40 02 cmp %g1, %g2 40007488: 38 80 00 06 bgu,a 400074a0 4000748c: e4 26 a0 0c st %l2, [ %i2 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40007490: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007494: 83 28 60 02 sll %g1, 2, %g1 40007498: f4 20 80 01 st %i2, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000749c: e4 26 a0 0c st %l2, [ %i2 + 0xc ] &_Barrier_Information, &the_barrier->Object, (Objects_Name) name ); *id = the_barrier->Object.id; 400074a0: c6 26 c0 00 st %g3, [ %i3 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400074a4: c2 04 21 90 ld [ %l0 + 0x190 ], %g1 400074a8: b0 10 20 00 clr %i0 400074ac: 82 00 7f ff add %g1, -1, %g1 400074b0: c2 24 21 90 st %g1, [ %l0 + 0x190 ] 400074b4: c4 04 21 90 ld [ %l0 + 0x190 ], %g2 400074b8: 80 a0 a0 00 cmp %g2, 0 400074bc: 12 80 00 04 bne 400074cc 400074c0: 01 00 00 00 nop _Thread_Dispatch(); 400074c4: 40 00 10 ba call 4000b7ac <_Thread_Dispatch> 400074c8: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400074cc: 81 c7 e0 08 ret 400074d0: 81 e8 00 00 restore if ( _Attributes_Is_barrier_automatic( attribute_set ) ) { the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE; if ( maximum_waiters == 0 ) return RTEMS_INVALID_NUMBER; } else the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE; 400074d4: 82 10 20 01 mov 1, %g1 400074d8: 10 bf ff cb b 40007404 400074dc: c2 27 bf f0 st %g1, [ %fp + -16 ] 400074e0 : */ rtems_status_code rtems_barrier_delete( rtems_id id ) { 400074e0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 400074e4: 21 10 00 80 sethi %hi(0x40020000), %l0 400074e8: 92 10 00 18 mov %i0, %o1 400074ec: 94 07 bf f4 add %fp, -12, %o2 400074f0: 40 00 0b 87 call 4000a30c <_Objects_Get> 400074f4: 90 14 23 f8 or %l0, 0x3f8, %o0 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 400074f8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400074fc: 80 a0 60 00 cmp %g1, 0 40007500: 12 80 00 20 bne 40007580 40007504: b0 10 00 08 mov %o0, %i0 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Flush( 40007508: 90 02 20 14 add %o0, 0x14, %o0 4000750c: 92 10 20 00 clr %o1 40007510: 40 00 13 1d call 4000c184 <_Thread_queue_Flush> 40007514: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007518: 90 14 23 f8 or %l0, 0x3f8, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000751c: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40007520: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40007524: 05 00 00 3f sethi %hi(0xfc00), %g2 40007528: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000752c: 82 08 40 02 and %g1, %g2, %g1 40007530: 80 a0 40 03 cmp %g1, %g3 40007534: 38 80 00 06 bgu,a 4000754c 40007538: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000753c: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40007540: 83 28 60 02 sll %g1, 2, %g1 40007544: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40007548: c0 26 20 0c clr [ %i0 + 0xc ] */ RTEMS_INLINE_ROUTINE void _Barrier_Free ( Barrier_Control *the_barrier ) { _Objects_Free( &_Barrier_Information, &the_barrier->Object ); 4000754c: 40 00 0b 2d call 4000a200 <_Objects_Free> 40007550: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007554: 03 10 00 81 sethi %hi(0x40020400), %g1 40007558: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 4000755c: b0 10 20 00 clr %i0 40007560: 84 00 bf ff add %g2, -1, %g2 40007564: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 40007568: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 4000756c: 80 a0 e0 00 cmp %g3, 0 40007570: 02 80 00 09 be 40007594 40007574: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007578: 81 c7 e0 08 ret 4000757c: 81 e8 00 00 restore { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007580: 80 a0 60 02 cmp %g1, 2 40007584: 08 bf ff fd bleu 40007578 40007588: b0 10 20 04 mov 4, %i0 4000758c: 81 c7 e0 08 ret <== NOT EXECUTED 40007590: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40007594: 40 00 10 86 call 4000b7ac <_Thread_Dispatch> 40007598: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000759c: 81 c7 e0 08 ret 400075a0: 81 e8 00 00 restore 400075dc : rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released ) { 400075dc: 9d e3 bf 90 save %sp, -112, %sp 400075e0: a0 10 00 18 mov %i0, %l0 Barrier_Control *the_barrier; Objects_Locations location; if ( !released ) 400075e4: 80 a6 60 00 cmp %i1, 0 400075e8: 02 80 00 1f be 40007664 400075ec: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) 400075f0: 11 10 00 80 sethi %hi(0x40020000), %o0 400075f4: 92 10 00 10 mov %l0, %o1 400075f8: 90 12 23 f8 or %o0, 0x3f8, %o0 400075fc: 40 00 0b 44 call 4000a30c <_Objects_Get> 40007600: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007604: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007608: 80 a0 60 00 cmp %g1, 0 4000760c: 02 80 00 07 be 40007628 40007610: 92 10 00 10 mov %l0, %o1 40007614: 80 a0 60 02 cmp %g1, 2 40007618: 08 80 00 13 bleu 40007664 4000761c: b0 10 20 04 mov 4, %i0 40007620: 81 c7 e0 08 ret <== NOT EXECUTED 40007624: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL ); 40007628: 94 10 20 00 clr %o2 4000762c: 40 00 07 27 call 400092c8 <_CORE_barrier_Release> 40007630: 90 02 20 14 add %o0, 0x14, %o0 40007634: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007638: 03 10 00 81 sethi %hi(0x40020400), %g1 4000763c: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 40007640: b0 10 20 00 clr %i0 40007644: 84 00 bf ff add %g2, -1, %g2 40007648: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 4000764c: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 40007650: 80 a0 e0 00 cmp %g3, 0 40007654: 12 80 00 04 bne 40007664 40007658: 01 00 00 00 nop _Thread_Dispatch(); 4000765c: 40 00 10 54 call 4000b7ac <_Thread_Dispatch> 40007660: 01 00 00 00 nop return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007664: 81 c7 e0 08 ret 40007668: 81 e8 00 00 restore 4000766c : rtems_status_code rtems_barrier_wait( rtems_id id, rtems_interval timeout ) { 4000766c: 9d e3 bf 90 save %sp, -112, %sp 40007670: 11 10 00 80 sethi %hi(0x40020000), %o0 40007674: 92 10 00 18 mov %i0, %o1 40007678: 90 12 23 f8 or %o0, 0x3f8, %o0 4000767c: 40 00 0b 24 call 4000a30c <_Objects_Get> 40007680: 94 07 bf f4 add %fp, -12, %o2 Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 40007684: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007688: 80 a0 60 00 cmp %g1, 0 4000768c: 12 80 00 14 bne 400076dc 40007690: 96 10 00 19 mov %i1, %o3 case OBJECTS_REMOTE: case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _CORE_barrier_Wait( 40007694: 90 02 20 14 add %o0, 0x14, %o0 40007698: 92 10 00 18 mov %i0, %o1 4000769c: 94 10 20 01 mov 1, %o2 400076a0: 40 00 07 15 call 400092f4 <_CORE_barrier_Wait> 400076a4: 98 10 20 00 clr %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400076a8: 03 10 00 81 sethi %hi(0x40020400), %g1 400076ac: c4 00 61 90 ld [ %g1 + 0x190 ], %g2 ! 40020590 <_Thread_Dispatch_disable_level> 400076b0: 84 00 bf ff add %g2, -1, %g2 400076b4: c4 20 61 90 st %g2, [ %g1 + 0x190 ] 400076b8: c6 00 61 90 ld [ %g1 + 0x190 ], %g3 400076bc: 80 a0 e0 00 cmp %g3, 0 400076c0: 02 80 00 0d be 400076f4 400076c4: 03 10 00 81 sethi %hi(0x40020400), %g1 TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 400076c8: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 4002066c <_Thread_Executing> <== NOT EXECUTED 400076cc: 40 00 1f 95 call 4000f520 <_Barrier_Translate_core_barrier_return_code> <== NOT EXECUTED 400076d0: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400076d4: 81 c7 e0 08 ret 400076d8: 91 e8 00 08 restore %g0, %o0, %o0 { Barrier_Control *the_barrier; Objects_Locations location; the_barrier = _Barrier_Get( id, &location ); switch ( location ) { 400076dc: 80 a0 60 02 cmp %g1, 2 400076e0: 08 bf ff fd bleu 400076d4 400076e4: 90 10 20 04 mov 4, %o0 400076e8: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400076ec: 81 c7 e0 08 ret <== NOT EXECUTED 400076f0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400076f4: 40 00 10 2e call 4000b7ac <_Thread_Dispatch> 400076f8: 01 00 00 00 nop TRUE, timeout, NULL ); _Thread_Enable_dispatch(); return _Barrier_Translate_core_barrier_return_code( 400076fc: 03 10 00 81 sethi %hi(0x40020400), %g1 40007700: c4 00 62 6c ld [ %g1 + 0x26c ], %g2 ! 4002066c <_Thread_Executing> 40007704: 40 00 1f 87 call 4000f520 <_Barrier_Translate_core_barrier_return_code> 40007708: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 4000770c: 30 bf ff f2 b,a 400076d4 400063e4 : rtems_status_code rtems_clock_get( rtems_clock_get_options option, void *time_buffer ) { 400063e4: 9d e3 bf 60 save %sp, -160, %sp 400063e8: 82 10 00 18 mov %i0, %g1 if ( !time_buffer ) 400063ec: 80 a6 60 00 cmp %i1, 0 400063f0: 02 80 00 19 be 40006454 400063f4: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; switch ( option ) { 400063f8: 80 a0 60 04 cmp %g1, 4 400063fc: 18 80 00 16 bgu 40006454 40006400: b0 10 20 19 mov 0x19, %i0 40006404: 83 28 60 02 sll %g1, 2, %g1 40006408: 05 10 00 18 sethi %hi(0x40006000), %g2 4000640c: 84 10 a3 d0 or %g2, 0x3d0, %g2 ! 400063d0 40006410: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40006414: 81 c0 c0 00 jmp %g3 40006418: 01 00 00 00 nop } case RTEMS_CLOCK_GET_TIME_VALUE: { struct timeval *time = (struct timeval *)time_buffer; if ( !_TOD_Is_set ) 4000641c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 <== NOT EXECUTED 40006420: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> <== NOT EXECUTED 40006424: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40006428: 12 80 00 46 bne 40006540 <== NOT EXECUTED 4000642c: 01 00 00 00 nop <== NOT EXECUTED } } return RTEMS_INTERNAL_ERROR; /* should never get here */ } 40006430: 81 c7 e0 08 ret 40006434: 91 e8 20 0b restore %g0, 0xb, %o0 } case RTEMS_CLOCK_GET_TICKS_PER_SECOND: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick; 40006438: 03 10 00 6f sethi %hi(0x4001bc00), %g1 4000643c: d2 00 63 bc ld [ %g1 + 0x3bc ], %o1 ! 4001bfbc <_TOD_Microseconds_per_tick> 40006440: 11 00 03 d0 sethi %hi(0xf4000), %o0 40006444: b0 10 20 00 clr %i0 40006448: 40 00 42 f3 call 40017014 <.udiv> 4000644c: 90 12 22 40 or %o0, 0x240, %o0 40006450: d0 26 40 00 st %o0, [ %i1 ] 40006454: 81 c7 e0 08 ret 40006458: 81 e8 00 00 restore } case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: { rtems_interval *interval = (rtems_interval *)time_buffer; *interval = _Watchdog_Ticks_since_boot; 4000645c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006460: c4 00 63 64 ld [ %g1 + 0x364 ], %g2 ! 4001bf64 <_Watchdog_Ticks_since_boot> 40006464: c4 26 40 00 st %g2, [ %i1 ] 40006468: 81 c7 e0 08 ret 4000646c: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH: { rtems_interval *interval = (rtems_interval *)time_buffer; if ( !_TOD_Is_set ) 40006470: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006474: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> 40006478: 80 a0 a0 00 cmp %g2, 0 4000647c: 02 bf ff ed be 40006430 40006480: 03 10 00 6f sethi %hi(0x4001bc00), %g1 return RTEMS_NOT_DEFINED; *interval = _TOD_Seconds_since_epoch; 40006484: c4 00 62 98 ld [ %g1 + 0x298 ], %g2 ! 4001be98 <_TOD_Now> 40006488: c4 26 40 00 st %g2, [ %i1 ] 4000648c: 81 c7 e0 08 ret 40006490: 91 e8 20 00 restore %g0, 0, %o0 case RTEMS_CLOCK_GET_TOD: { struct tm time; struct timeval now; rtems_time_of_day *tmbuf = (rtems_time_of_day *)time_buffer; if ( !_TOD_Is_set ) 40006494: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006498: c4 00 62 1c ld [ %g1 + 0x21c ], %g2 ! 4001be1c <_TOD_Is_set> 4000649c: 80 a0 a0 00 cmp %g2, 0 400064a0: 02 bf ff e4 be 40006430 400064a4: 01 00 00 00 nop ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 400064a8: 7f ff ee d0 call 40001fe8 400064ac: 01 00 00 00 nop 400064b0: a0 10 00 08 mov %o0, %l0 _TOD_Get( &now ); 400064b4: 40 00 07 97 call 40008310 <_TOD_Get> 400064b8: 90 07 bf e8 add %fp, -24, %o0 _ISR_Enable(level); 400064bc: 7f ff ee cf call 40001ff8 400064c0: 90 10 00 10 mov %l0, %o0 time->tv_sec = now.tv_sec; 400064c4: c2 07 bf e8 ld [ %fp + -24 ], %g1 time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400064c8: d0 07 bf ec ld [ %fp + -20 ], %o0 _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 400064cc: c2 27 bf f0 st %g1, [ %fp + -16 ] time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 400064d0: 40 00 42 d1 call 40017014 <.udiv> 400064d4: 92 10 23 e8 mov 0x3e8, %o1 /* Obtain the current time */ _TOD_Get_timeval( &now ); /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); 400064d8: 92 07 bf c4 add %fp, -60, %o1 400064dc: d0 27 bf f4 st %o0, [ %fp + -12 ] 400064e0: 40 00 28 74 call 400106b0 400064e4: 90 07 bf f0 add %fp, -16, %o0 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 400064e8: c4 07 bf d0 ld [ %fp + -48 ], %g2 tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 400064ec: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400064f0: d2 00 63 bc ld [ %g1 + 0x3bc ], %o1 ! 4001bfbc <_TOD_Microseconds_per_tick> gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; 400064f4: c4 26 60 08 st %g2, [ %i1 + 8 ] tmbuf->hour = time.tm_hour; 400064f8: c2 07 bf cc ld [ %fp + -52 ], %g1 tmbuf->minute = time.tm_min; 400064fc: c4 07 bf c8 ld [ %fp + -56 ], %g2 /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; tmbuf->month = time.tm_mon + 1; tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; 40006500: c2 26 60 0c st %g1, [ %i1 + 0xc ] tmbuf->minute = time.tm_min; 40006504: c4 26 60 10 st %g2, [ %i1 + 0x10 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006508: c2 07 bf d8 ld [ %fp + -40 ], %g1 tmbuf->month = time.tm_mon + 1; 4000650c: c4 07 bf d4 ld [ %fp + -44 ], %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 40006510: c6 07 bf c4 ld [ %fp + -60 ], %g3 tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 40006514: d0 07 bf f4 ld [ %fp + -12 ], %o0 /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006518: 82 00 67 6c add %g1, 0x76c, %g1 tmbuf->month = time.tm_mon + 1; 4000651c: 84 00 a0 01 inc %g2 tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; 40006520: c6 26 60 14 st %g3, [ %i1 + 0x14 ] /* Split it into a closer format */ gmtime_r( &now.tv_sec, &time ); /* Now adjust it to the RTEMS format */ tmbuf->year = time.tm_year + 1900; 40006524: c2 26 40 00 st %g1, [ %i1 ] tmbuf->month = time.tm_mon + 1; 40006528: c4 26 60 04 st %g2, [ %i1 + 4 ] tmbuf->day = time.tm_mday; tmbuf->hour = time.tm_hour; tmbuf->minute = time.tm_min; tmbuf->second = time.tm_sec; tmbuf->ticks = now.tv_usec / _TOD_Microseconds_per_tick; 4000652c: 40 00 42 ba call 40017014 <.udiv> 40006530: b0 10 20 00 clr %i0 40006534: d0 26 60 18 st %o0, [ %i1 + 0x18 ] 40006538: 81 c7 e0 08 ret 4000653c: 81 e8 00 00 restore ) { ISR_Level level; struct timespec now; _ISR_Disable(level); 40006540: 7f ff ee aa call 40001fe8 <== NOT EXECUTED 40006544: 01 00 00 00 nop <== NOT EXECUTED 40006548: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED _TOD_Get( &now ); 4000654c: 40 00 07 71 call 40008310 <_TOD_Get> <== NOT EXECUTED 40006550: 90 07 bf e8 add %fp, -24, %o0 <== NOT EXECUTED _ISR_Enable(level); 40006554: 7f ff ee a9 call 40001ff8 <== NOT EXECUTED 40006558: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED time->tv_sec = now.tv_sec; 4000655c: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 40006560: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 40006564: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); time->tv_sec = now.tv_sec; 40006568: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND; 4000656c: 40 00 42 aa call 40017014 <.udiv> <== NOT EXECUTED 40006570: b0 10 20 00 clr %i0 <== NOT EXECUTED 40006574: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED 40006578: 81 c7 e0 08 ret <== NOT EXECUTED 4000657c: 81 e8 00 00 restore <== NOT EXECUTED 400065a0 : * * NOTE: This routine only works for leap-years through 2099. */ rtems_status_code rtems_clock_tick( void ) { 400065a0: 9d e3 bf 98 save %sp, -104, %sp _TOD_Tickle_ticks(); 400065a4: 40 00 07 83 call 400083b0 <_TOD_Tickle_ticks> 400065a8: 01 00 00 00 nop */ RTEMS_INLINE_ROUTINE void _Watchdog_Tickle_ticks( void ) { _Watchdog_Tickle( &_Watchdog_Ticks_chain ); 400065ac: 11 10 00 6f sethi %hi(0x4001bc00), %o0 400065b0: 40 00 15 41 call 4000bab4 <_Watchdog_Tickle> 400065b4: 90 12 22 dc or %o0, 0x2dc, %o0 ! 4001bedc <_Watchdog_Ticks_chain> _Watchdog_Tickle_ticks(); _Thread_Tickle_timeslice(); 400065b8: 40 00 13 65 call 4000b34c <_Thread_Tickle_timeslice> 400065bc: 01 00 00 00 nop * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_context_switch_necessary( void ) { return ( _Context_Switch_necessary ); 400065c0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400065c4: c4 00 62 cc ld [ %g1 + 0x2cc ], %g2 ! 4001becc <_Context_Switch_necessary> if ( _Thread_Is_context_switch_necessary() && 400065c8: 80 a0 a0 00 cmp %g2, 0 400065cc: 02 80 00 06 be 400065e4 400065d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 * otherwise. */ RTEMS_INLINE_ROUTINE boolean _Thread_Is_dispatching_enabled( void ) { return ( _Thread_Dispatch_disable_level == 0 ); 400065d4: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 400065d8: 80 a0 a0 00 cmp %g2, 0 400065dc: 02 80 00 04 be 400065ec 400065e0: 01 00 00 00 nop _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); return RTEMS_SUCCESSFUL; } 400065e4: 81 c7 e0 08 ret 400065e8: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Tickle_timeslice(); if ( _Thread_Is_context_switch_necessary() && _Thread_Is_dispatching_enabled() ) _Thread_Dispatch(); 400065ec: 40 00 0f 6b call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400065f0: b0 10 20 00 clr %i0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 400065f4: 81 c7 e0 08 ret <== NOT EXECUTED 400065f8: 81 e8 00 00 restore <== NOT EXECUTED 40003cb8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003cb8: 9d e3 bf 68 save %sp, -152, %sp struct timespec uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 40003cbc: 80 a6 60 00 cmp %i1, 0 40003cc0: 02 80 00 61 be 40003e44 40003cc4: 01 00 00 00 nop * 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. */ #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _TOD_Get_uptime( &uptime ); 40003cc8: 40 00 17 e8 call 40009c68 <_TOD_Get_uptime> 40003ccc: 90 07 bf e0 add %fp, -32, %o0 _Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 40003cd0: 92 07 bf e0 add %fp, -32, %o1 40003cd4: 94 07 bf d8 add %fp, -40, %o2 40003cd8: 11 10 00 a4 sethi %hi(0x40029000), %o0 40003cdc: 40 00 26 25 call 4000d570 <_Timespec_Subtract> 40003ce0: 90 12 21 94 or %o0, 0x194, %o0 ! 40029194 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003ce4: 90 10 00 18 mov %i0, %o0 40003ce8: 13 10 00 77 sethi %hi(0x4001dc00), %o1 40003cec: 9f c6 40 00 call %i1 40003cf0: 92 12 62 70 or %o1, 0x270, %o1 ! 4001de70 40003cf4: 03 10 00 a2 sethi %hi(0x40028800), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40003cf8: 05 10 00 77 sethi %hi(0x4001dc00), %g2 } } } #endif (*print)( context, "CPU Usage by thread\n" 40003cfc: aa 10 62 64 or %g1, 0x264, %l5 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003d00: a8 07 bf eb add %fp, -21, %l4 /* * Print the information */ (*print)( context, 40003d04: 03 10 00 77 sethi %hi(0x4001dc00), %g1 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40003d08: b4 10 a2 b0 or %g2, 0x2b0, %i2 /* * Print the information */ (*print)( context, 40003d0c: b6 10 62 c8 or %g1, 0x2c8, %i3 /* * 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 ) { 40003d10: 39 10 00 a2 sethi %hi(0x40028800), %i4 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003d14: ba 07 bf f4 add %fp, -12, %i5 40003d18: ae 07 bf f0 add %fp, -16, %l7 40003d1c: ac 07 bf d0 add %fp, -48, %l6 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 40003d20: c2 05 40 00 ld [ %l5 ], %g1 40003d24: 80 a0 60 00 cmp %g1, 0 40003d28: 22 80 00 39 be,a 40003e0c 40003d2c: aa 05 60 04 add %l5, 4, %l5 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 40003d30: e6 00 60 04 ld [ %g1 + 4 ], %l3 if ( information ) { 40003d34: 80 a4 e0 00 cmp %l3, 0 40003d38: 22 80 00 35 be,a 40003e0c 40003d3c: aa 05 60 04 add %l5, 4, %l5 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 40003d40: c2 14 e0 10 lduh [ %l3 + 0x10 ], %g1 40003d44: 86 90 60 00 orcc %g1, 0, %g3 40003d48: 22 80 00 31 be,a 40003e0c 40003d4c: aa 05 60 04 add %l5, 4, %l5 40003d50: a4 10 20 01 mov 1, %l2 the_thread = (Thread_Control *)information->local_table[ i ]; 40003d54: c4 04 e0 20 ld [ %l3 + 0x20 ], %g2 40003d58: 83 2c a0 02 sll %l2, 2, %g1 40003d5c: e0 00 80 01 ld [ %g2 + %g1 ], %l0 if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003d60: 94 10 00 14 mov %l4, %o2 40003d64: 92 10 20 05 mov 5, %o1 information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) 40003d68: 80 a4 20 00 cmp %l0, 0 40003d6c: 02 80 00 22 be 40003df4 40003d70: a4 04 a0 01 inc %l2 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 40003d74: d0 04 20 08 ld [ %l0 + 8 ], %o0 40003d78: 40 00 10 bb call 40008064 40003d7c: a2 10 00 16 mov %l6, %l1 (*print)( context, "0x%08" PRIx32 " %4s ", the_thread->Object.id, name ); 40003d80: d4 04 20 08 ld [ %l0 + 8 ], %o2 40003d84: 90 10 00 18 mov %i0, %o0 40003d88: 92 10 00 1a mov %i2, %o1 40003d8c: 9f c6 40 00 call %i1 40003d90: 96 10 00 14 mov %l4, %o3 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003d94: c4 1c 20 90 ldd [ %l0 + 0x90 ], %g2 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003d98: c8 07 23 dc ld [ %i4 + 0x3dc ], %g4 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS /* * If this is the currently executing thread, account for time * since the last context switch. */ ran = the_thread->cpu_time_used; 40003d9c: c4 3f bf d0 std %g2, [ %fp + -48 ] if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 40003da0: da 01 20 08 ld [ %g4 + 8 ], %o5 40003da4: c2 04 20 08 ld [ %l0 + 8 ], %g1 40003da8: 80 a3 40 01 cmp %o5, %g1 40003dac: 02 80 00 28 be 40003e4c 40003db0: 92 07 bf e0 add %fp, -32, %o1 _Timespec_Subtract( &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003db4: 94 10 00 1d mov %i5, %o2 40003db8: 96 10 00 17 mov %l7, %o3 40003dbc: 90 10 00 11 mov %l1, %o0 40003dc0: 40 00 25 5c call 4000d330 <_Timespec_Divide> 40003dc4: 92 07 bf d8 add %fp, -40, %o1 /* * Print the information */ (*print)( context, 40003dc8: d0 07 bf d4 ld [ %fp + -44 ], %o0 40003dcc: 40 00 5a d6 call 4001a924 <.udiv> 40003dd0: 92 10 23 e8 mov 0x3e8, %o1 40003dd4: d4 07 bf d0 ld [ %fp + -48 ], %o2 40003dd8: d8 07 bf f4 ld [ %fp + -12 ], %o4 40003ddc: da 07 bf f0 ld [ %fp + -16 ], %o5 40003de0: 96 10 00 08 mov %o0, %o3 40003de4: 92 10 00 1b mov %i3, %o1 40003de8: 9f c6 40 00 call %i1 40003dec: 90 10 00 18 mov %i0, %o0 40003df0: c6 14 e0 10 lduh [ %l3 + 0x10 ], %g3 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++ ) { 40003df4: 83 28 e0 10 sll %g3, 0x10, %g1 40003df8: 83 30 60 10 srl %g1, 0x10, %g1 40003dfc: 80 a0 40 12 cmp %g1, %l2 40003e00: 3a bf ff d6 bcc,a 40003d58 40003e04: c4 04 e0 20 ld [ %l3 + 0x20 ], %g2 40003e08: aa 05 60 04 add %l5, 4, %l5 " ID NAME TICKS PERCENT\n" #endif ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 40003e0c: 03 10 00 a2 sethi %hi(0x40028800), %g1 40003e10: 82 10 62 74 or %g1, 0x274, %g1 ! 40028a74 <_Objects_Information_table+0x14> 40003e14: 80 a5 40 01 cmp %l5, %g1 40003e18: 32 bf ff c3 bne,a 40003d24 40003e1c: c2 05 40 00 ld [ %l5 ], %g1 } } } #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS (*print)( context, "Time since last CPU Usage reset %" PRId32 40003e20: d0 07 bf dc ld [ %fp + -36 ], %o0 40003e24: 40 00 5a c0 call 4001a924 <.udiv> 40003e28: 92 10 23 e8 mov 0x3e8, %o1 40003e2c: d4 07 bf d8 ld [ %fp + -40 ], %o2 40003e30: 96 10 00 08 mov %o0, %o3 40003e34: 13 10 00 77 sethi %hi(0x4001dc00), %o1 40003e38: 90 10 00 18 mov %i0, %o0 40003e3c: 9f c6 40 00 call %i1 40003e40: 92 12 62 e0 or %o1, 0x2e0, %o1 40003e44: 81 c7 e0 08 ret 40003e48: 81 e8 00 00 restore * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { struct timespec used; _Timespec_Subtract( 40003e4c: 94 07 bf c8 add %fp, -56, %o2 40003e50: 11 10 00 a2 sethi %hi(0x40028800), %o0 40003e54: 40 00 25 c7 call 4000d570 <_Timespec_Subtract> 40003e58: 90 12 23 e4 or %o0, 0x3e4, %o0 ! 40028be4 <_Thread_Time_of_last_context_switch> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timespec_Add_to( &ran, &used ); 40003e5c: 92 07 bf c8 add %fp, -56, %o1 40003e60: 40 00 25 1a call 4000d2c8 <_Timespec_Add_to> 40003e64: 90 10 00 16 mov %l6, %o0 }; _Timespec_Divide( &ran, &total, &ival, &fval ); 40003e68: 10 bf ff d4 b 40003db8 40003e6c: 94 10 00 1d mov %i5, %o2 4000efdc : { 0, 0, 0 }, }; static int rtems_deviceio_errno(rtems_status_code code) { 4000efdc: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) 4000efe0: 11 10 00 6c sethi %hi(0x4001b000), %o0 <== NOT EXECUTED 4000efe4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000efe8: 40 00 01 42 call 4000f4f0 <== NOT EXECUTED 4000efec: 90 12 22 c4 or %o0, 0x2c4, %o0 <== NOT EXECUTED 4000eff0: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4000eff4: 02 80 00 05 be 4000f008 <== NOT EXECUTED 4000eff8: 01 00 00 00 nop <== NOT EXECUTED { errno = rc; 4000effc: 40 00 03 dd call 4000ff70 <__errno> <== NOT EXECUTED 4000f000: 01 00 00 00 nop <== NOT EXECUTED 4000f004: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED return -1; } return -1; } 4000f008: 81 c7 e0 08 ret <== NOT EXECUTED 4000f00c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED 40009d6c : int rtems_error( int error_flag, const char *printf_format, ... ) { 40009d6c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 40009d70: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED int rtems_error( int error_flag, const char *printf_format, ... ) { 40009d74: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40009d78: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40009d7c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40009d80: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); chars_written = rtems_verror(error_flag, printf_format, arglist); 40009d84: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40009d88: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40009d8c: 7f ff ff 7c call 40009b7c <== NOT EXECUTED 40009d90: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); return chars_written; } 40009d94: 81 c7 e0 08 ret <== NOT EXECUTED 40009d98: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40006834 : rtems_status_code rtems_event_send( Objects_Id id, rtems_event_set event_in ) { 40006834: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40006838: 92 96 20 00 orcc %i0, 0, %o1 4000683c: 12 80 00 1c bne 400068ac 40006840: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006844: 23 10 00 6f sethi %hi(0x4001bc00), %l1 40006848: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000684c: 82 00 60 01 inc %g1 40006850: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40006854: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006858: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000685c: c0 27 bf f4 clr [ %fp + -12 ] rtems_event_set *the_event_set ) { ISR_Level level; _ISR_Disable( level ); 40006860: 7f ff ed e2 call 40001fe8 40006864: e0 06 21 6c ld [ %i0 + 0x16c ], %l0 *the_event_set |= the_new_events; 40006868: c2 04 20 40 ld [ %l0 + 0x40 ], %g1 4000686c: 82 10 40 19 or %g1, %i1, %g1 40006870: c2 24 20 40 st %g1, [ %l0 + 0x40 ] _ISR_Enable( level ); 40006874: 7f ff ed e1 call 40001ff8 40006878: 01 00 00 00 nop case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; _Event_sets_Post( event_in, &api->pending_events ); _Event_Surrender( the_thread ); 4000687c: 40 00 00 2d call 40006930 <_Event_Surrender> 40006880: 90 10 00 18 mov %i0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006884: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006888: b0 10 20 00 clr %i0 4000688c: 82 00 7f ff add %g1, -1, %g1 40006890: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40006894: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 40006898: 80 a0 a0 00 cmp %g2, 0 4000689c: 02 80 00 0a be 400068c4 400068a0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400068a4: 81 c7 e0 08 ret 400068a8: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 400068ac: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 400068b0: 80 a0 a0 04 cmp %g2, 4 400068b4: 08 80 00 08 bleu 400068d4 400068b8: 83 32 60 1b srl %o1, 0x1b, %g1 400068bc: 81 c7 e0 08 ret <== NOT EXECUTED 400068c0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400068c4: 40 00 0e b5 call 4000a398 <_Thread_Dispatch> 400068c8: 01 00 00 00 nop 400068cc: 81 c7 e0 08 ret 400068d0: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 400068d4: 80 a0 60 01 cmp %g1, 1 400068d8: 12 bf ff f3 bne 400068a4 400068dc: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 400068e0: 83 28 a0 02 sll %g2, 2, %g1 400068e4: 05 10 00 6f sethi %hi(0x4001bc00), %g2 400068e8: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 400068ec: c6 00 80 01 ld [ %g2 + %g1 ], %g3 400068f0: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 400068f4: 80 a2 20 00 cmp %o0, 0 400068f8: 02 bf ff f5 be 400068cc 400068fc: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40006900: 40 00 09 7e call 40008ef8 <_Objects_Get> 40006904: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40006908: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000690c: b0 10 00 08 mov %o0, %i0 40006910: 80 a0 60 00 cmp %g1, 0 40006914: 02 bf ff d3 be 40006860 40006918: 23 10 00 6f sethi %hi(0x4001bc00), %l1 4000691c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40006920: 18 bf ff e1 bgu 400068a4 <== NOT EXECUTED 40006924: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40006928: 81 c7 e0 08 ret <== NOT EXECUTED 4000692c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000ec28 : rtems_status_code rtems_extension_create( rtems_name name, rtems_extensions_table *extension_table, Objects_Id *id ) { 4000ec28: 9d e3 bf 98 save %sp, -104, %sp Extension_Control *the_extension; if ( !rtems_is_name_valid( name ) ) 4000ec2c: a6 96 20 00 orcc %i0, 0, %l3 4000ec30: 02 80 00 16 be 4000ec88 4000ec34: b0 10 20 03 mov 3, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000ec38: 23 10 00 b6 sethi %hi(0x4002d800), %l1 4000ec3c: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 4000ec40: 82 00 60 01 inc %g1 4000ec44: c2 24 63 30 st %g1, [ %l1 + 0x330 ] * the inactive chain of free extension control blocks. */ RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void ) { return (Extension_Control *) _Objects_Allocate( &_Extension_Information ); 4000ec48: 25 10 00 b7 sethi %hi(0x4002dc00), %l2 4000ec4c: 40 00 03 ef call 4000fc08 <_Objects_Allocate> 4000ec50: 90 14 a1 cc or %l2, 0x1cc, %o0 ! 4002ddcc <_Extension_Information> _Thread_Disable_dispatch(); /* to prevent deletion */ the_extension = _Extension_Allocate(); if ( !the_extension ) { 4000ec54: a0 92 20 00 orcc %o0, 0, %l0 4000ec58: 12 80 00 0e bne 4000ec90 4000ec5c: 90 04 20 10 add %l0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ec60: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 <== NOT EXECUTED 4000ec64: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED 4000ec68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ec6c: c2 24 63 30 st %g1, [ %l1 + 0x330 ] <== NOT EXECUTED 4000ec70: c4 04 63 30 ld [ %l1 + 0x330 ], %g2 <== NOT EXECUTED 4000ec74: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ec78: 12 80 00 20 bne 4000ecf8 <== NOT EXECUTED 4000ec7c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4000ec80: 40 00 0a 5b call 400115ec <_Thread_Dispatch> <== NOT EXECUTED 4000ec84: 01 00 00 00 nop <== NOT EXECUTED 4000ec88: 81 c7 e0 08 ret <== NOT EXECUTED 4000ec8c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } _User_extensions_Add_set( &the_extension->Extension, extension_table ); 4000ec90: 40 00 0e df call 4001280c <_User_extensions_Add_set> 4000ec94: 92 10 00 19 mov %i1, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ec98: 90 14 a1 cc or %l2, 0x1cc, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000ec9c: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000eca0: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4000eca4: 03 00 00 3f sethi %hi(0xfc00), %g1 4000eca8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000ecac: 82 08 c0 01 and %g3, %g1, %g1 4000ecb0: 80 a0 40 02 cmp %g1, %g2 4000ecb4: 38 80 00 06 bgu,a 4000eccc 4000ecb8: e6 24 20 0c st %l3, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ecbc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000ecc0: 83 28 60 02 sll %g1, 2, %g1 4000ecc4: e0 20 80 01 st %l0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000ecc8: e6 24 20 0c st %l3, [ %l0 + 0xc ] &_Extension_Information, &the_extension->Object, (Objects_Name) name ); *id = the_extension->Object.id; 4000eccc: c6 26 80 00 st %g3, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ecd0: c2 04 63 30 ld [ %l1 + 0x330 ], %g1 4000ecd4: b0 10 20 00 clr %i0 4000ecd8: 82 00 7f ff add %g1, -1, %g1 4000ecdc: c2 24 63 30 st %g1, [ %l1 + 0x330 ] 4000ece0: c4 04 63 30 ld [ %l1 + 0x330 ], %g2 4000ece4: 80 a0 a0 00 cmp %g2, 0 4000ece8: 12 80 00 04 bne 4000ecf8 4000ecec: 01 00 00 00 nop _Thread_Dispatch(); 4000ecf0: 40 00 0a 3f call 400115ec <_Thread_Dispatch> 4000ecf4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 4000ecf8: 81 c7 e0 08 ret 4000ecfc: 81 e8 00 00 restore 4000ed00 : */ rtems_status_code rtems_extension_delete( Objects_Id id ) { 4000ed00: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Get ( Objects_Id id, Objects_Locations *location ) { return (Extension_Control *) 4000ed04: 21 10 00 b7 sethi %hi(0x4002dc00), %l0 <== NOT EXECUTED 4000ed08: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000ed0c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000ed10: 40 00 05 0f call 4001014c <_Objects_Get> <== NOT EXECUTED 4000ed14: 90 14 21 cc or %l0, 0x1cc, %o0 <== NOT EXECUTED Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000ed18: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000ed1c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ed20: 12 80 00 1e bne 4000ed98 <== NOT EXECUTED 4000ed24: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case OBJECTS_ERROR: case OBJECTS_REMOTE: /* should never return this */ return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _User_extensions_Remove_set( &the_extension->Extension ); 4000ed28: 40 00 0e f3 call 400128f4 <_User_extensions_Remove_set> <== NOT EXECUTED 4000ed2c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ed30: 90 14 21 cc or %l0, 0x1cc, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000ed34: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ed38: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 <== NOT EXECUTED 4000ed3c: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000ed40: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000ed44: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000ed48: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ed4c: 38 80 00 06 bgu,a 4000ed64 <== NOT EXECUTED 4000ed50: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ed54: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 <== NOT EXECUTED 4000ed58: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000ed5c: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000ed60: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Extension_Free ( Extension_Control *the_extension ) { _Objects_Free( &_Extension_Information, &the_extension->Object ); 4000ed64: 40 00 04 b7 call 40010040 <_Objects_Free> <== NOT EXECUTED 4000ed68: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ed6c: 03 10 00 b6 sethi %hi(0x4002d800), %g1 <== NOT EXECUTED 4000ed70: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ed74: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ed78: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ed7c: c4 20 63 30 st %g2, [ %g1 + 0x330 ] <== NOT EXECUTED 4000ed80: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 <== NOT EXECUTED 4000ed84: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000ed88: 02 80 00 09 be 4000edac <== NOT EXECUTED 4000ed8c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ed90: 81 c7 e0 08 ret <== NOT EXECUTED 4000ed94: 81 e8 00 00 restore <== NOT EXECUTED { Extension_Control *the_extension; Objects_Locations location; the_extension = _Extension_Get( id, &location ); switch ( location ) { 4000ed98: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ed9c: 08 bf ff fd bleu 4000ed90 <== NOT EXECUTED 4000eda0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 4000eda4: 81 c7 e0 08 ret <== NOT EXECUTED 4000eda8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000edac: 40 00 0a 10 call 400115ec <_Thread_Dispatch> <== NOT EXECUTED 4000edb0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000edb4: 81 c7 e0 08 ret <== NOT EXECUTED 4000edb8: 81 e8 00 00 restore <== NOT EXECUTED 40003100 : int rtems_filesystem_evaluate_parent( int flags, rtems_filesystem_location_info_t *pathloc ) { 40003100: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) 40003104: 80 a6 60 00 cmp %i1, 0 40003108: 02 80 00 28 be 400031a8 4000310c: 92 10 00 18 mov %i0, %o1 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) 40003110: c8 06 60 08 ld [ %i1 + 8 ], %g4 40003114: da 01 00 00 ld [ %g4 ], %o5 40003118: 80 a3 60 00 cmp %o5, 0 4000311c: 02 80 00 1d be 40003190 40003120: 11 10 00 67 sethi %hi(0x40019c00), %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; 40003124: c6 06 60 0c ld [ %i1 + 0xc ], %g3 40003128: c2 06 40 00 ld [ %i1 ], %g1 4000312c: c4 06 60 04 ld [ %i1 + 4 ], %g2 40003130: c2 27 bf e8 st %g1, [ %fp + -24 ] 40003134: c4 27 bf ec st %g2, [ %fp + -20 ] 40003138: c8 27 bf f0 st %g4, [ %fp + -16 ] 4000313c: c6 27 bf f4 st %g3, [ %fp + -12 ] result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); 40003140: b2 07 bf e8 add %fp, -24, %i1 40003144: 90 12 22 40 or %o0, 0x240, %o0 40003148: 9f c3 40 00 call %o5 4000314c: 94 10 00 19 mov %i1, %o2 if (result != 0){ 40003150: b0 92 20 00 orcc %o0, 0, %i0 40003154: 12 80 00 0d bne 40003188 40003158: c2 07 bf f0 ld [ %fp + -16 ], %g1 return -1; } rtems_filesystem_freenode( &parent ); 4000315c: 80 a0 60 00 cmp %g1, 0 40003160: 02 80 00 16 be 400031b8 40003164: 01 00 00 00 nop 40003168: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4000316c: 80 a0 60 00 cmp %g1, 0 40003170: 02 80 00 12 be 400031b8 40003174: 01 00 00 00 nop 40003178: 9f c0 40 00 call %g1 4000317c: 90 10 00 19 mov %i1, %o0 return result; } 40003180: 81 c7 e0 08 ret 40003184: 81 e8 00 00 restore if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); parent = *pathloc; result = (*pathloc->ops->evalpath_h)( "..", flags, &parent ); if (result != 0){ 40003188: 81 c7 e0 08 ret <== NOT EXECUTED 4000318c: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ if ( !pathloc->ops->evalpath_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40003190: 40 00 33 78 call 4000ff70 <__errno> <== NOT EXECUTED 40003194: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003198: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4000319c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031a0: 81 c7 e0 08 ret <== NOT EXECUTED 400031a4: 81 e8 00 00 restore <== NOT EXECUTED { rtems_filesystem_location_info_t parent; int result; if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 400031a8: 40 00 33 72 call 4000ff70 <__errno> <== NOT EXECUTED 400031ac: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400031b0: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 400031b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400031b8: 81 c7 e0 08 ret <== NOT EXECUTED 400031bc: 81 e8 00 00 restore <== NOT EXECUTED 400031c0 : const char *pathname, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 400031c0: 9d e3 bf 98 save %sp, -104, %sp /* * Verify Input parameters. */ if ( !pathname ) 400031c4: 80 a6 20 00 cmp %i0, 0 400031c8: 02 80 00 50 be 40003308 400031cc: 80 a6 a0 00 cmp %i2, 0 rtems_set_errno_and_return_minus_one( EFAULT ); if ( !pathloc ) 400031d0: 02 80 00 54 be 40003320 400031d4: 01 00 00 00 nop /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 400031d8: c2 4e 00 00 ldsb [ %i0 ], %g1 400031dc: 80 a0 60 2f cmp %g1, 0x2f 400031e0: 02 80 00 11 be 40003224 400031e4: 80 a0 60 5c cmp %g1, 0x5c 400031e8: 02 80 00 0f be 40003224 400031ec: 80 a0 60 00 cmp %g1, 0 400031f0: 02 80 00 0e be 40003228 400031f4: 03 10 00 6c sethi %hi(0x4001b000), %g1 400031f8: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 400031fc: 88 10 20 00 clr %g4 40003200: c2 00 e0 04 ld [ %g3 + 4 ], %g1 40003204: c2 26 80 00 st %g1, [ %i2 ] 40003208: c4 00 e0 08 ld [ %g3 + 8 ], %g2 4000320c: c4 26 a0 04 st %g2, [ %i2 + 4 ] 40003210: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 40003214: c2 26 a0 08 st %g1, [ %i2 + 8 ] 40003218: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 4000321c: 10 80 00 0d b 40003250 40003220: c4 26 a0 0c st %g2, [ %i2 + 0xc ] 40003224: 03 10 00 6c sethi %hi(0x4001b000), %g1 40003228: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 ! 4001b050 4000322c: 88 10 20 01 mov 1, %g4 40003230: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40003234: c2 26 80 00 st %g1, [ %i2 ] 40003238: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 4000323c: c4 26 a0 04 st %g2, [ %i2 + 4 ] 40003240: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40003244: c2 26 a0 08 st %g1, [ %i2 + 8 ] 40003248: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 4000324c: c4 26 a0 0c st %g2, [ %i2 + 0xc ] if ( !pathloc->ops->evalpath_h ) 40003250: c2 06 a0 08 ld [ %i2 + 8 ], %g1 40003254: c2 00 40 00 ld [ %g1 ], %g1 40003258: 80 a0 60 00 cmp %g1, 0 4000325c: 02 80 00 25 be 400032f0 40003260: 90 06 00 04 add %i0, %g4, %o0 rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( &pathname[i], flags, pathloc ); 40003264: 92 10 00 19 mov %i1, %o1 40003268: 9f c0 40 00 call %g1 4000326c: 94 10 00 1a mov %i2, %o2 /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 40003270: b0 92 20 00 orcc %o0, 0, %i0 40003274: 12 80 00 0f bne 400032b0 40003278: 80 a6 e0 00 cmp %i3, 0 4000327c: 02 80 00 2d be 40003330 40003280: 01 00 00 00 nop if ( !pathloc->ops->node_type_h ){ 40003284: c4 06 a0 08 ld [ %i2 + 8 ], %g2 40003288: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4000328c: 80 a0 60 00 cmp %g1, 0 40003290: 22 80 00 13 be,a 400032dc 40003294: 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 ); 40003298: 9f c0 40 00 call %g1 4000329c: 90 10 00 1a mov %i2, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 400032a0: 90 02 3f fd add %o0, -3, %o0 400032a4: 80 a2 20 01 cmp %o0, 1 400032a8: 28 80 00 04 bleu,a 400032b8 400032ac: c4 06 a0 08 ld [ %i2 + 8 ], %g2 } } return result; } 400032b0: 81 c7 e0 08 ret 400032b4: 81 e8 00 00 restore type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 400032b8: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 400032bc: 80 a0 60 00 cmp %g1, 0 400032c0: 02 80 00 06 be 400032d8 400032c4: 90 10 00 1a mov %i2, %o0 * 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 ); 400032c8: 9f c0 40 00 call %g1 400032cc: 92 10 00 19 mov %i1, %o1 } } return result; } 400032d0: 81 c7 e0 08 ret 400032d4: 91 e8 00 08 restore %g0, %o0, %o0 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ rtems_filesystem_freenode( pathloc ); 400032d8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400032dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400032e0: 02 80 00 04 be 400032f0 <== NOT EXECUTED 400032e4: 01 00 00 00 nop <== NOT EXECUTED 400032e8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400032ec: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 400032f0: 40 00 33 20 call 4000ff70 <__errno> <== NOT EXECUTED 400032f4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400032f8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 400032fc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003300: 81 c7 e0 08 ret <== NOT EXECUTED 40003304: 81 e8 00 00 restore <== NOT EXECUTED /* * Verify Input parameters. */ if ( !pathname ) rtems_set_errno_and_return_minus_one( EFAULT ); 40003308: 40 00 33 1a call 4000ff70 <__errno> 4000330c: b0 10 3f ff mov -1, %i0 40003310: 82 10 20 0e mov 0xe, %g1 40003314: c2 22 00 00 st %g1, [ %o0 ] 40003318: 81 c7 e0 08 ret 4000331c: 81 e8 00 00 restore if ( !pathloc ) rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 40003320: 40 00 33 14 call 4000ff70 <__errno> <== NOT EXECUTED 40003324: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40003328: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED 4000332c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40003330: 81 c7 e0 08 ret 40003334: 81 e8 00 00 restore 4000cf58 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 4000cf58: 9d e3 bf 80 save %sp, -128, %sp /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 4000cf5c: 25 10 00 6c sethi %hi(0x4001b000), %l2 4000cf60: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 ! 4001b050 4000cf64: 82 10 20 12 mov 0x12, %g1 init_fs_mount_table(); 4000cf68: 40 00 01 c0 call 4000d668 4000cf6c: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ] /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 4000cf70: 03 10 00 6a sethi %hi(0x4001a800), %g1 4000cf74: c4 00 62 48 ld [ %g1 + 0x248 ], %g2 ! 4001aa48 4000cf78: 80 a0 a0 00 cmp %g2, 0 4000cf7c: 02 80 00 40 be 4000d07c 4000cf80: 03 10 00 6a sethi %hi(0x4001a800), %g1 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 4000cf84: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 4001aa44 status = mount( 4000cf88: 90 07 bf f4 add %fp, -12, %o0 4000cf8c: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 4000cf90: d2 00 80 00 ld [ %g2 ], %o1 4000cf94: d4 00 a0 04 ld [ %g2 + 4 ], %o2 4000cf98: 40 00 01 bc call 4000d688 4000cf9c: d6 00 a0 08 ld [ %g2 + 8 ], %o3 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000cfa0: 80 a2 3f ff cmp %o0, -1 4000cfa4: 02 80 00 45 be 4000d0b8 4000cfa8: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfac: c8 07 bf f4 ld [ %fp + -12 ], %g4 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000cfb0: c2 04 a0 50 ld [ %l2 + 0x50 ], %g1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfb4: c4 01 20 18 ld [ %g4 + 0x18 ], %g2 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 4000cfb8: c0 30 60 26 clrh [ %g1 + 0x26 ] * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfbc: c4 20 60 14 st %g2, [ %g1 + 0x14 ] 4000cfc0: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000cfc4: a0 07 bf e4 add %fp, -28, %l0 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfc8: c6 20 60 18 st %g3, [ %g1 + 0x18 ] 4000cfcc: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000cfd0: 23 10 00 68 sethi %hi(0x4001a000), %l1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfd4: c4 20 60 1c st %g2, [ %g1 + 0x1c ] 4000cfd8: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000cfdc: 92 10 20 00 clr %o1 * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000cfe0: c6 20 60 20 st %g3, [ %g1 + 0x20 ] /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000cfe4: 94 10 00 10 mov %l0, %o2 4000cfe8: 96 10 20 00 clr %o3 4000cfec: 7f ff d8 75 call 400031c0 4000cff0: 90 14 60 a8 or %l1, 0xa8, %o0 rtems_filesystem_root = loc; 4000cff4: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 4000cff8: c2 07 bf e4 ld [ %fp + -28 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000cffc: 94 10 00 10 mov %l0, %o2 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000d000: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4000d004: c2 07 bf e8 ld [ %fp + -24 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000d008: 92 10 20 00 clr %o1 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000d00c: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 4000d010: c2 07 bf ec ld [ %fp + -20 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000d014: 96 10 20 00 clr %o3 * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4000d018: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4000d01c: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4000d020: 90 14 60 a8 or %l1, 0xa8, %o0 4000d024: 7f ff d8 67 call 400031c0 4000d028: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4000d02c: c2 07 bf e4 ld [ %fp + -28 ], %g1 4000d030: c6 04 a0 50 ld [ %l2 + 0x50 ], %g3 * * 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); 4000d034: 11 10 00 68 sethi %hi(0x4001a000), %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000d038: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4000d03c: c2 07 bf e8 ld [ %fp + -24 ], %g1 * * 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); 4000d040: 90 12 20 b0 or %o0, 0xb0, %o0 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000d044: c2 20 e0 08 st %g1, [ %g3 + 8 ] 4000d048: c2 07 bf ec ld [ %fp + -20 ], %g1 * * 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); 4000d04c: 92 10 21 ff mov 0x1ff, %o1 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_current = loc; 4000d050: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 4000d054: c4 07 bf f0 ld [ %fp + -16 ], %g2 * * 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); 4000d058: 40 00 01 7a call 4000d640 4000d05c: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] if ( status != 0 ) 4000d060: 80 a2 20 00 cmp %o0, 0 4000d064: 02 80 00 04 be 4000d074 4000d068: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 rtems_fatal_error_occurred( 0xABCD0003 ); 4000d06c: 7f ff ea cc call 40007b9c <== NOT EXECUTED 4000d070: 90 12 20 03 or %o0, 3, %o0 ! abcd0003 <== NOT EXECUTED 4000d074: 81 c7 e0 08 ret 4000d078: 81 e8 00 00 restore /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 4000d07c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000d080: 7f ff ea c7 call 40007b9c <== NOT EXECUTED 4000d084: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <== NOT EXECUTED mt = &rtems_filesystem_mount_table[0]; 4000d088: 03 10 00 6a sethi %hi(0x4001a800), %g1 <== NOT EXECUTED 4000d08c: c4 00 62 44 ld [ %g1 + 0x244 ], %g2 ! 4001aa44 <== NOT EXECUTED status = mount( 4000d090: 90 07 bf f4 add %fp, -12, %o0 <== NOT EXECUTED 4000d094: d8 00 a0 0c ld [ %g2 + 0xc ], %o4 <== NOT EXECUTED 4000d098: d2 00 80 00 ld [ %g2 ], %o1 <== NOT EXECUTED 4000d09c: d4 00 a0 04 ld [ %g2 + 4 ], %o2 <== NOT EXECUTED 4000d0a0: 40 00 01 7a call 4000d688 <== NOT EXECUTED 4000d0a4: d6 00 a0 08 ld [ %g2 + 8 ], %o3 <== NOT EXECUTED &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 4000d0a8: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 4000d0ac: 32 bf ff c1 bne,a 4000cfb0 <== NOT EXECUTED 4000d0b0: c8 07 bf f4 ld [ %fp + -12 ], %g4 <== NOT EXECUTED rtems_fatal_error_occurred( 0xABCD0002 ); 4000d0b4: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED 4000d0b8: 7f ff ea b9 call 40007b9c <== NOT EXECUTED 4000d0bc: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 4000d0c0: 10 bf ff bc b 4000cfb0 <== NOT EXECUTED 4000d0c4: c8 07 bf f4 ld [ %fp + -12 ], %g4 <== NOT EXECUTED 40007bb8 : #include const char *rtems_get_version_string(void) { return _RTEMS_version; } 40007bb8: 11 10 00 6a sethi %hi(0x4001a800), %o0 <== NOT EXECUTED 40007bbc: 81 c3 e0 08 retl <== NOT EXECUTED 40007bc0: 90 12 21 c0 or %o0, 0x1c0, %o0 ! 4001a9c0 <_RTEMS_version> <== NOT EXECUTED 4000795c : rtems_interrupt_level rtems_initialize_executive_early( rtems_configuration_table *configuration_table, rtems_cpu_table *cpu_table ) { 4000795c: 9d e3 bf 80 save %sp, -128, %sp * Dispatching and interrupts are disabled until the end of the * initialization sequence. This prevents an inadvertent context * switch before the executive is initialized. */ _ISR_Disable( bsp_level ); 40007960: 7f ff e9 a2 call 40001fe8 40007964: 01 00 00 00 nop 40007968: a6 10 00 08 mov %o0, %l3 if ( configuration_table == NULL ) 4000796c: 80 a6 20 00 cmp %i0, 0 40007970: 22 80 00 79 be,a 40007b54 40007974: 90 10 20 00 clr %o0 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 40007978: 05 10 00 6f sethi %hi(0x4001bc00), %g2 RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; _System_state_Is_multiprocessing = is_multiprocessing; 4000797c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007980: a4 10 a1 f4 or %g2, 0x1f4, %l2 40007984: 94 10 20 28 mov 0x28, %o2 40007988: 92 10 00 19 mov %i1, %o1 4000798c: c0 20 62 e8 clr [ %g1 + 0x2e8 ] RTEMS_INLINE_ROUTINE void _System_state_Handler_initialization ( boolean is_multiprocessing ) { _System_state_Current = SYSTEM_STATE_BEFORE_INITIALIZATION; 40007990: 29 10 00 6f sethi %hi(0x4001bc00), %l4 40007994: 90 10 00 12 mov %l2, %o0 40007998: 40 00 23 4b call 400106c4 4000799c: c0 25 23 c0 clr [ %l4 + 0x3c0 ] /* * Provided just for user convenience. */ _Configuration_Table = configuration_table; 400079a0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 INTERNAL_ERROR_CORE, TRUE, INTERNAL_ERROR_NO_CPU_TABLE ); _CPU_Initialize( cpu_table, _Thread_Dispatch ); 400079a4: 90 10 00 19 mov %i1, %o0 400079a8: 13 10 00 28 sethi %hi(0x4000a000), %o1 400079ac: 92 12 63 98 or %o1, 0x398, %o1 ! 4000a398 <_Thread_Dispatch> 400079b0: 40 00 11 a6 call 4000c048 <_CPU_Initialize> 400079b4: f0 20 62 a0 st %i0, [ %g1 + 0x2a0 ] /* * Do this as early as possible to insure no debugging output * is even attempted to be printed. */ _Debug_Manager_initialization(); 400079b8: 40 00 1a b8 call 4000e498 <_Debug_Manager_initialization> 400079bc: a2 10 20 01 mov 1, %l1 _API_extensions_Initialization(); 400079c0: 40 00 01 03 call 40007dcc <_API_extensions_Initialization> 400079c4: 01 00 00 00 nop _Thread_Dispatch_initialization(); _Workspace_Handler_initialization( 400079c8: d2 06 20 04 ld [ %i0 + 4 ], %o1 400079cc: d0 06 00 00 ld [ %i0 ], %o0 * This routine initializes the thread dispatching subsystem. */ RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void ) { _Thread_Dispatch_disable_level = 1; 400079d0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400079d4: e2 20 61 e0 st %l1, [ %g1 + 0x1e0 ] ! 4001bde0 <_Thread_Dispatch_disable_level> 400079d8: 40 00 10 6e call 4000bb90 <_Workspace_Handler_initialization> 400079dc: 21 10 00 6f sethi %hi(0x4001bc00), %l0 (void *)configuration_table->work_space_start, configuration_table->work_space_size ); _User_extensions_Handler_initialization( 400079e0: d0 06 20 20 ld [ %i0 + 0x20 ], %o0 400079e4: 40 00 0e df call 4000b560 <_User_extensions_Handler_initialization> 400079e8: d2 06 20 24 ld [ %i0 + 0x24 ], %o1 configuration_table->number_of_initial_extensions, configuration_table->User_extension_table ); _ISR_Handler_initialization(); 400079ec: 40 00 03 d5 call 40008940 <_ISR_Handler_initialization> 400079f0: 01 00 00 00 nop _Objects_Handler_initialization( 400079f4: 90 10 20 01 mov 1, %o0 ! 1 400079f8: 92 10 20 01 mov 1, %o1 400079fc: 40 00 05 d8 call 4000915c <_Objects_Handler_initialization> 40007a00: 94 10 20 00 clr %o2 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a04: 05 10 00 6f sethi %hi(0x4001bc00), %g2 /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a08: c0 23 a0 5c clr [ %sp + 0x5c ] multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a0c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007a10: 82 10 62 20 or %g1, 0x220, %g1 ! 4001be20 <_Internal_Objects> /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a14: 92 10 20 01 mov 1, %o1 multiprocessing_table->node, multiprocessing_table->maximum_nodes, multiprocessing_table->maximum_global_objects ); _Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects; 40007a18: c2 20 a1 44 st %g1, [ %g2 + 0x144 ] /* * Initialize the internal allocator Mutex */ _API_Mutex_Initialization( 1 ); 40007a1c: 94 10 20 02 mov 2, %o2 40007a20: 96 10 20 01 mov 1, %o3 40007a24: 98 10 20 74 mov 0x74, %o4 40007a28: 9a 10 20 00 clr %o5 40007a2c: 40 00 05 5a call 40008f94 <_Objects_Initialize_information> 40007a30: 90 14 22 ec or %l0, 0x2ec, %o0 _API_Mutex_Allocate( _RTEMS_Allocator_Mutex ); 40007a34: 82 10 20 02 mov 2, %g1 40007a38: e2 27 bf e8 st %l1, [ %fp + -24 ] 40007a3c: c2 27 bf f0 st %g1, [ %fp + -16 ] 40007a40: c0 27 bf ec clr [ %fp + -20 ] 40007a44: c0 27 bf f4 clr [ %fp + -12 ] 40007a48: 40 00 03 db call 400089b4 <_Objects_Allocate> 40007a4c: 90 14 22 ec or %l0, 0x2ec, %o0 40007a50: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007a54: 84 10 00 08 mov %o0, %g2 40007a58: 92 07 bf e8 add %fp, -24, %o1 40007a5c: c4 20 62 b4 st %g2, [ %g1 + 0x2b4 ] 40007a60: 90 02 20 10 add %o0, 0x10, %o0 40007a64: 40 00 01 47 call 40007f80 <_CORE_mutex_Initialize> 40007a68: 94 10 20 01 mov 1, %o2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 40007a6c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 40007a70: 05 10 00 6f sethi %hi(0x4001bc00), %g2 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; 40007a74: c0 30 62 b0 clrh [ %g1 + 0x2b0 ] for ( index=0 ; index <16 ; index++ ) _Priority_Bit_map[ index ] = 0; 40007a78: c0 30 a3 40 clrh [ %g2 + 0x340 ] 40007a7c: 82 10 20 02 mov 2, %g1 40007a80: 84 10 a3 40 or %g2, 0x340, %g2 40007a84: c0 30 40 02 clrh [ %g1 + %g2 ] 40007a88: 82 00 60 02 add %g1, 2, %g1 RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void ) { size_t index; _Priority_Major_bit_map = 0; for ( index=0 ; index <16 ; index++ ) 40007a8c: 80 a0 60 20 cmp %g1, 0x20 40007a90: 32 bf ff fe bne,a 40007a88 40007a94: c0 30 40 02 clrh [ %g1 + %g2 ] _Priority_Handler_initialization(); _Watchdog_Handler_initialization(); 40007a98: 40 00 0f be call 4000b990 <_Watchdog_Handler_initialization> 40007a9c: 01 00 00 00 nop _TOD_Handler_initialization( configuration_table->microseconds_per_tick ); 40007aa0: 40 00 02 35 call 40008374 <_TOD_Handler_initialization> 40007aa4: d0 06 20 0c ld [ %i0 + 0xc ], %o0 _Thread_Handler_initialization( 40007aa8: d2 06 20 08 ld [ %i0 + 8 ], %o1 40007aac: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 40007ab0: 40 00 0b 01 call 4000a6b4 <_Thread_Handler_initialization> 40007ab4: 94 10 20 00 clr %o2 ); #endif /* MANAGERS */ _RTEMS_API_Initialize( configuration_table ); 40007ab8: 40 00 00 a6 call 40007d50 <_RTEMS_API_Initialize> 40007abc: 90 10 00 18 mov %i0, %o0 _Extension_Manager_initialization( configuration_table->maximum_extensions ); 40007ac0: 40 00 00 2a call 40007b68 <_Extension_Manager_initialization> 40007ac4: d0 06 20 08 ld [ %i0 + 8 ], %o0 _IO_Manager_initialization( 40007ac8: d2 06 20 18 ld [ %i0 + 0x18 ], %o1 40007acc: d4 06 20 14 ld [ %i0 + 0x14 ], %o2 40007ad0: 40 00 00 4e call 40007c08 <_IO_Manager_initialization> 40007ad4: d0 06 20 1c ld [ %i0 + 0x1c ], %o0 configuration_table->number_of_device_drivers, configuration_table->maximum_drivers ); #ifdef RTEMS_POSIX_API _POSIX_API_Initialize( configuration_table ); 40007ad8: 40 00 00 7a call 40007cc0 <_POSIX_API_Initialize> 40007adc: 90 10 00 18 mov %i0, %o0 RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 40007ae0: 82 10 20 01 mov 1, %g1 * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle(); 40007ae4: 40 00 09 d9 call 4000a248 <_Thread_Create_idle> 40007ae8: c2 25 23 c0 st %g1, [ %l4 + 0x3c0 ] /* * Scheduling can properly occur now as long as we avoid dispatching. */ if ( cpu_table->pretasking_hook ) 40007aec: d0 06 40 00 ld [ %i1 ], %o0 40007af0: 80 a2 20 00 cmp %o0, 0 40007af4: 02 80 00 04 be 40007b04 40007af8: 01 00 00 00 nop (*cpu_table->pretasking_hook)(); 40007afc: 9f c2 00 00 call %o0 40007b00: 01 00 00 00 nop /* * Run the API and BSPs predriver hook. */ _API_extensions_Run_predriver(); 40007b04: 40 00 00 d4 call 40007e54 <_API_extensions_Run_predriver> 40007b08: 01 00 00 00 nop if ( _CPU_Table.predriver_hook ) 40007b0c: c2 04 a0 04 ld [ %l2 + 4 ], %g1 40007b10: 80 a0 60 00 cmp %g1, 0 40007b14: 02 80 00 04 be 40007b24 40007b18: 01 00 00 00 nop (*_CPU_Table.predriver_hook)(); 40007b1c: 9f c0 40 00 call %g1 40007b20: 01 00 00 00 nop * Initialize all the device drivers and initialize the MPCI layer. * * NOTE: The MPCI may be build upon a device driver. */ _IO_Initialize_all_drivers(); 40007b24: 40 00 00 28 call 40007bc4 <_IO_Initialize_all_drivers> 40007b28: 01 00 00 00 nop * Run the APIs and BSPs postdriver hooks. * * The API extensions are supposed to create user initialization tasks. */ _API_extensions_Run_postdriver(); 40007b2c: 40 00 00 af call 40007de8 <_API_extensions_Run_postdriver> 40007b30: 01 00 00 00 nop if ( _CPU_Table.postdriver_hook ) 40007b34: c4 04 a0 08 ld [ %l2 + 8 ], %g2 40007b38: 80 a0 a0 00 cmp %g2, 0 40007b3c: 02 80 00 04 be 40007b4c 40007b40: 01 00 00 00 nop (*_CPU_Table.postdriver_hook)(); 40007b44: 9f c0 80 00 call %g2 40007b48: 01 00 00 00 nop return bsp_level; } 40007b4c: 81 c7 e0 08 ret 40007b50: 91 e8 00 13 restore %g0, %l3, %o0 */ _ISR_Disable( bsp_level ); if ( configuration_table == NULL ) _Internal_error_Occurred( 40007b54: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40007b58: 40 00 03 6a call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007b5c: 94 10 20 00 clr %o2 <== NOT EXECUTED /* * Grab our own copy of the user's CPU table. */ _CPU_Table = *cpu_table; 40007b60: 10 bf ff 87 b 4000797c <== NOT EXECUTED 40007b64: 05 10 00 6f sethi %hi(0x4001bc00), %g2 <== NOT EXECUTED 40002f98 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { 40002f98: 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, 0x00, &loc, TRUE ); 40002f9c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40002fa0: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED 40002fa4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40002fa8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40002fac: 40 00 00 85 call 400031c0 <== NOT EXECUTED 40002fb0: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002fb4: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== 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, 0x00, &loc, TRUE ); 40002fb8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { 40002fbc: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40002fc0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40002fc4: 12 80 00 0e bne 40002ffc <== NOT EXECUTED 40002fc8: e4 07 bf e8 ld [ %fp + -24 ], %l2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 40002fcc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40002fd0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40002fd4: 02 80 00 04 be 40002fe4 <== NOT EXECUTED 40002fd8: 01 00 00 00 nop <== NOT EXECUTED 40002fdc: 9f c0 40 00 call %g1 <== NOT EXECUTED 40002fe0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40002fe4: 40 00 33 e3 call 4000ff70 <__errno> <== NOT EXECUTED 40002fe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40002fec: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40002ff0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40002ff4: 81 c7 e0 08 ret <== NOT EXECUTED 40002ff8: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); 40002ffc: 9f c0 80 00 call %g2 <== NOT EXECUTED 40003000: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { 40003004: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40003008: 12 80 00 18 bne 40003068 <== NOT EXECUTED 4000300c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40003010: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED 40003014: 12 80 00 16 bne 4000306c <== NOT EXECUTED 40003018: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; 4000301c: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED device_info->device_name_length = strlen( name ); 40003020: 40 00 38 b2 call 400112e8 <== NOT EXECUTED 40003024: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003028: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; 4000302c: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; rtems_filesystem_freenode( &loc ); 40003030: c6 07 bf f0 ld [ %fp + -16 ], %g3 <== 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; 40003034: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; 40003038: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4000303c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40003040: 02 80 00 17 be 4000309c <== NOT EXECUTED 40003044: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED 40003048: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000304c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40003050: 02 80 00 13 be 4000309c <== NOT EXECUTED 40003054: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003058: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000305c: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003060: 81 c7 e0 08 ret <== NOT EXECUTED 40003064: 81 e8 00 00 restore <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { rtems_filesystem_freenode( &loc ); 40003068: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000306c: 02 80 00 0a be 40003094 <== NOT EXECUTED 40003070: 01 00 00 00 nop <== NOT EXECUTED 40003074: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40003078: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000307c: 02 80 00 06 be 40003094 <== NOT EXECUTED 40003080: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40003084: 9f c0 40 00 call %g1 <== NOT EXECUTED 40003088: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED 4000308c: 81 c7 e0 08 ret <== NOT EXECUTED 40003090: 81 e8 00 00 restore <== 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 ); 40003094: 81 c7 e0 08 ret <== NOT EXECUTED 40003098: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED #endif return RTEMS_SUCCESSFUL; } 4000309c: 81 c7 e0 08 ret <== NOT EXECUTED 400030a0: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40008ccc : rtems_status_code rtems_io_register_driver( rtems_device_major_number major, rtems_driver_address_table *driver_table, rtems_device_major_number *registered_major ) { 40008ccc: 9d e3 bf 98 save %sp, -104, %sp /* * Validate the pointer data and contents passed in */ if ( !driver_table ) 40008cd0: 80 a6 60 00 cmp %i1, 0 40008cd4: 02 80 00 3e be 40008dcc 40008cd8: 90 10 00 18 mov %i0, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) 40008cdc: 80 a6 a0 00 cmp %i2, 0 40008ce0: 02 80 00 3b be 40008dcc 40008ce4: 01 00 00 00 nop return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008ce8: c2 06 40 00 ld [ %i1 ], %g1 40008cec: 80 a0 60 00 cmp %g1, 0 40008cf0: 22 80 00 34 be,a 40008dc0 40008cf4: c2 06 60 04 ld [ %i1 + 4 ], %g1 return RTEMS_INVALID_ADDRESS; *registered_major = 0; 40008cf8: c0 26 80 00 clr [ %i2 ] /* * The requested major number is higher than what is configured. */ if ( major >= _IO_Number_of_drivers ) 40008cfc: 03 10 00 80 sethi %hi(0x40020000), %g1 40008d00: c6 00 63 fc ld [ %g1 + 0x3fc ], %g3 ! 400203fc <_IO_Number_of_drivers> 40008d04: 80 a0 c0 08 cmp %g3, %o0 40008d08: 08 80 00 43 bleu 40008e14 40008d0c: b0 10 20 0a mov 0xa, %i0 /* * Test for initialise/open being present to indicate the driver slot is * in use. */ if ( major == 0 ) { 40008d10: 80 a2 20 00 cmp %o0, 0 40008d14: 12 80 00 1f bne 40008d90 40008d18: 03 10 00 81 sethi %hi(0x40020400), %g1 boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40008d1c: 90 80 ff ff addcc %g3, -1, %o0 40008d20: 02 80 00 26 be 40008db8 40008d24: c8 00 60 00 ld [ %g1 ], %g4 if ( !_IO_Driver_address_table[major].initialization_entry && 40008d28: 85 28 e0 05 sll %g3, 5, %g2 40008d2c: 83 28 e0 03 sll %g3, 3, %g1 40008d30: 84 20 80 01 sub %g2, %g1, %g2 40008d34: 84 00 bf e8 add %g2, -24, %g2 40008d38: 10 80 00 04 b 40008d48 40008d3c: 84 00 80 04 add %g2, %g4, %g2 * in use. */ if ( major == 0 ) { boolean found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) { 40008d40: 02 80 00 1e be 40008db8 40008d44: 84 00 bf e8 add %g2, -24, %g2 if ( !_IO_Driver_address_table[major].initialization_entry && 40008d48: c2 00 80 00 ld [ %g2 ], %g1 40008d4c: 80 a0 60 00 cmp %g1, 0 40008d50: 32 bf ff fc bne,a 40008d40 40008d54: 90 82 3f ff addcc %o0, -1, %o0 40008d58: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40008d5c: 80 a0 60 00 cmp %g1, 0 40008d60: 32 bf ff f8 bne,a 40008d40 40008d64: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008d68: 85 2a 20 03 sll %o0, 3, %g2 40008d6c: 83 2a 20 05 sll %o0, 5, %g1 40008d70: 82 20 40 02 sub %g1, %g2, %g1 40008d74: 88 01 00 01 add %g4, %g1, %g4 40008d78: c2 01 20 04 ld [ %g4 + 4 ], %g1 40008d7c: 80 a0 60 00 cmp %g1, 0 40008d80: 22 80 00 15 be,a 40008dd4 40008d84: c2 06 40 00 ld [ %i1 ], %g1 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008d88: 81 c7 e0 08 ret <== NOT EXECUTED 40008d8c: 91 e8 20 0c restore %g0, 0xc, %o0 <== NOT EXECUTED if ( !found ) return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry || 40008d90: c8 00 60 00 ld [ %g1 ], %g4 40008d94: 85 2a 20 03 sll %o0, 3, %g2 40008d98: 83 2a 20 05 sll %o0, 5, %g1 40008d9c: 82 20 40 02 sub %g1, %g2, %g1 40008da0: c6 00 40 04 ld [ %g1 + %g4 ], %g3 40008da4: 80 a0 e0 00 cmp %g3, 0 40008da8: 02 bf ff f4 be 40008d78 40008dac: 88 00 40 04 add %g1, %g4, %g4 _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008db0: 81 c7 e0 08 ret 40008db4: 91 e8 20 0c restore %g0, 0xc, %o0 40008db8: 81 c7 e0 08 ret 40008dbc: 91 e8 20 05 restore %g0, 5, %o0 return RTEMS_INVALID_ADDRESS; if ( !registered_major ) return RTEMS_INVALID_ADDRESS; if ( !driver_table->initialization_entry && !driver_table->open_entry ) 40008dc0: 80 a0 60 00 cmp %g1, 0 40008dc4: 32 bf ff ce bne,a 40008cfc 40008dc8: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED _IO_Driver_address_table[major] = *driver_table; *registered_major = major; rtems_io_initialize( major, 0, NULL ); return RTEMS_SUCCESSFUL; 40008dcc: 81 c7 e0 08 ret 40008dd0: 91 e8 20 09 restore %g0, 9, %o0 _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; *registered_major = major; 40008dd4: d0 26 80 00 st %o0, [ %i2 ] if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008dd8: c2 21 00 00 st %g1, [ %g4 ] 40008ddc: c4 06 60 04 ld [ %i1 + 4 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008de0: 92 10 20 00 clr %o1 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008de4: c4 21 20 04 st %g2, [ %g4 + 4 ] 40008de8: c2 06 60 08 ld [ %i1 + 8 ], %g1 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008dec: 94 10 20 00 clr %o2 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008df0: c2 21 20 08 st %g1, [ %g4 + 8 ] 40008df4: c4 06 60 0c ld [ %i1 + 0xc ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008df8: b0 10 20 00 clr %i0 if ( _IO_Driver_address_table[major].initialization_entry || _IO_Driver_address_table[major].open_entry ) return RTEMS_RESOURCE_IN_USE; _IO_Driver_address_table[major] = *driver_table; 40008dfc: c4 21 20 0c st %g2, [ %g4 + 0xc ] 40008e00: c2 06 60 10 ld [ %i1 + 0x10 ], %g1 40008e04: c2 21 20 10 st %g1, [ %g4 + 0x10 ] 40008e08: c4 06 60 14 ld [ %i1 + 0x14 ], %g2 *registered_major = major; rtems_io_initialize( major, 0, NULL ); 40008e0c: 7f ff ff 30 call 40008acc 40008e10: c4 21 20 14 st %g2, [ %g4 + 0x14 ] 40008e14: 81 c7 e0 08 ret 40008e18: 81 e8 00 00 restore 4000a3b4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 4000a3b4: 9d e3 bf 98 save %sp, -104, %sp uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 4000a3b8: 80 a6 20 00 cmp %i0, 0 4000a3bc: 02 80 00 23 be 4000a448 4000a3c0: 03 10 00 a2 sethi %hi(0x40028800), %g1 return; 4000a3c4: a4 10 62 64 or %g1, 0x264, %l2 ! 40028a64 <_Objects_Information_table+0x4> 4000a3c8: a6 04 a0 10 add %l2, 0x10, %l3 for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 4000a3cc: c2 04 80 00 ld [ %l2 ], %g1 4000a3d0: 80 a0 60 00 cmp %g1, 0 4000a3d4: 22 80 00 1a be,a 4000a43c 4000a3d8: a4 04 a0 04 add %l2, 4, %l2 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 4000a3dc: e2 00 60 04 ld [ %g1 + 4 ], %l1 if ( information ) { 4000a3e0: 80 a4 60 00 cmp %l1, 0 4000a3e4: 22 80 00 16 be,a 4000a43c 4000a3e8: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { 4000a3ec: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1 4000a3f0: 86 90 60 00 orcc %g1, 0, %g3 4000a3f4: 22 80 00 12 be,a 4000a43c 4000a3f8: a4 04 a0 04 add %l2, 4, %l2 4000a3fc: a0 10 20 01 mov 1, %l0 the_thread = (Thread_Control *)information->local_table[ i ]; 4000a400: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000a404: 83 2c 20 02 sll %l0, 2, %g1 4000a408: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( !the_thread ) 4000a40c: 80 a2 20 00 cmp %o0, 0 4000a410: 02 80 00 05 be 4000a424 4000a414: a0 04 20 01 inc %l0 continue; (*routine)(the_thread); 4000a418: 9f c6 00 00 call %i0 4000a41c: 01 00 00 00 nop 4000a420: c6 14 60 10 lduh [ %l1 + 0x10 ], %g3 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++ ) { 4000a424: 83 28 e0 10 sll %g3, 0x10, %g1 4000a428: 83 30 60 10 srl %g1, 0x10, %g1 4000a42c: 80 a0 40 10 cmp %g1, %l0 4000a430: 3a bf ff f5 bcc,a 4000a404 4000a434: c4 04 60 20 ld [ %l1 + 0x20 ], %g2 4000a438: a4 04 a0 04 add %l2, 4, %l2 if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; 4000a43c: 80 a4 80 13 cmp %l2, %l3 4000a440: 32 bf ff e4 bne,a 4000a3d0 4000a444: c2 04 80 00 ld [ %l2 ], %g1 4000a448: 81 c7 e0 08 ret 4000a44c: 81 e8 00 00 restore 4000d514 : * 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 ) { 4000d514: 9d e3 bf 90 save %sp, -112, %sp rtems_libio_t *iop, *next; rtems_status_code rc; rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 4000d518: 23 10 00 6f sethi %hi(0x4001bc00), %l1 4000d51c: d0 04 60 20 ld [ %l1 + 0x20 ], %o0 ! 4001bc20 4000d520: 92 10 20 00 clr %o1 4000d524: 7f ff e6 81 call 40006f28 4000d528: 94 10 20 00 clr %o2 if (rtems_libio_iop_freelist) { 4000d52c: 21 10 00 6f sethi %hi(0x4001bc00), %l0 4000d530: c4 04 20 1c ld [ %l0 + 0x1c ], %g2 ! 4001bc1c 4000d534: 80 a0 a0 00 cmp %g2, 0 4000d538: 12 80 00 07 bne 4000d554 4000d53c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 } failed: iop = 0; done: 4000d540: b0 10 20 00 clr %i0 rtems_semaphore_release( rtems_libio_semaphore ); 4000d544: 7f ff e7 48 call 40007264 4000d548: d0 04 60 20 ld [ %l1 + 0x20 ], %o0 return iop; } 4000d54c: 81 c7 e0 08 ret 4000d550: 81 e8 00 00 restore rtems_id sema; rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); if (rtems_libio_iop_freelist) { rc = rtems_semaphore_create( 4000d554: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 4000d558: 92 10 20 01 mov 1, %o1 4000d55c: 86 20 80 03 sub %g2, %g3, %g3 4000d560: 87 38 e0 02 sra %g3, 2, %g3 4000d564: 83 28 e0 02 sll %g3, 2, %g1 4000d568: 85 28 e0 06 sll %g3, 6, %g2 4000d56c: 84 20 80 01 sub %g2, %g1, %g2 4000d570: 83 28 a0 06 sll %g2, 6, %g1 4000d574: 82 20 40 02 sub %g1, %g2, %g1 4000d578: 85 28 60 0c sll %g1, 0xc, %g2 4000d57c: 82 00 40 02 add %g1, %g2, %g1 4000d580: 82 00 40 03 add %g1, %g3, %g1 4000d584: 83 28 60 04 sll %g1, 4, %g1 4000d588: 82 20 40 03 sub %g1, %g3, %g1 4000d58c: 83 28 60 02 sll %g1, 2, %g1 4000d590: 86 20 c0 01 sub %g3, %g1, %g3 4000d594: 94 10 20 54 mov 0x54, %o2 4000d598: 96 10 20 00 clr %o3 4000d59c: 11 13 10 92 sethi %hi(0x4c424800), %o0 4000d5a0: 98 07 bf f4 add %fp, -12, %o4 4000d5a4: 90 12 21 00 or %o0, 0x100, %o0 4000d5a8: 7f ff e5 89 call 40006bcc 4000d5ac: 90 10 c0 08 or %g3, %o0, %o0 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &sema ); if (rc != RTEMS_SUCCESSFUL) 4000d5b0: 80 a2 20 00 cmp %o0, 0 4000d5b4: 32 bf ff e4 bne,a 4000d544 4000d5b8: b0 10 20 00 clr %i0 <== NOT EXECUTED goto failed; iop = rtems_libio_iop_freelist; 4000d5bc: f0 04 20 1c ld [ %l0 + 0x1c ], %i0 next = iop->data1; (void) memset( iop, 0, sizeof(rtems_libio_t) ); iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; 4000d5c0: c4 07 bf f4 ld [ %fp + -12 ], %g2 &sema ); if (rc != RTEMS_SUCCESSFUL) goto failed; iop = rtems_libio_iop_freelist; next = iop->data1; 4000d5c4: c2 06 20 28 ld [ %i0 + 0x28 ], %g1 (void) memset( iop, 0, sizeof(rtems_libio_t) ); 4000d5c8: c0 26 20 20 clr [ %i0 + 0x20 ] 4000d5cc: c0 26 00 00 clr [ %i0 ] 4000d5d0: c0 26 20 04 clr [ %i0 + 4 ] 4000d5d4: c0 26 20 08 clr [ %i0 + 8 ] 4000d5d8: c0 26 20 10 clr [ %i0 + 0x10 ] 4000d5dc: c0 26 20 14 clr [ %i0 + 0x14 ] 4000d5e0: c0 26 20 18 clr [ %i0 + 0x18 ] 4000d5e4: c0 26 20 1c clr [ %i0 + 0x1c ] 4000d5e8: c0 26 20 24 clr [ %i0 + 0x24 ] 4000d5ec: c0 26 20 28 clr [ %i0 + 0x28 ] 4000d5f0: c0 26 20 2c clr [ %i0 + 0x2c ] 4000d5f4: c0 26 20 30 clr [ %i0 + 0x30 ] iop->flags = LIBIO_FLAGS_OPEN; iop->sem = sema; rtems_libio_iop_freelist = next; 4000d5f8: c2 24 20 1c st %g1, [ %l0 + 0x1c ] 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; 4000d5fc: c4 26 20 20 st %g2, [ %i0 + 0x20 ] 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; 4000d600: 82 10 21 00 mov 0x100, %g1 4000d604: 10 bf ff d0 b 4000d544 4000d608: c2 26 20 0c st %g1, [ %i0 + 0xc ] 40003338 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 40003338: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code rc; int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 4000333c: 21 10 00 6a sethi %hi(0x4001a800), %l0 40003340: d0 04 22 2c ld [ %l0 + 0x22c ], %o0 ! 4001aa2c 40003344: 80 a2 20 00 cmp %o0, 0 40003348: 12 80 00 13 bne 40003394 4000334c: 92 10 20 34 mov 0x34, %o1 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 40003350: 11 13 10 92 sethi %hi(0x4c424800), %o0 40003354: 92 10 20 01 mov 1, %o1 40003358: 90 12 21 4f or %o0, 0x14f, %o0 4000335c: 94 10 20 54 mov 0x54, %o2 40003360: 96 10 20 00 clr %o3 40003364: 19 10 00 6f sethi %hi(0x4001bc00), %o4 40003368: 40 00 0e 19 call 40006bcc 4000336c: 98 13 20 20 or %o4, 0x20, %o4 ! 4001bc20 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 40003370: 80 a2 20 00 cmp %o0, 0 40003374: 12 80 00 04 bne 40003384 40003378: 01 00 00 00 nop /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 4000337c: 40 00 26 f7 call 4000cf58 40003380: 81 e8 00 00 restore RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) rtems_fatal_error_occurred( rc ); 40003384: 40 00 12 06 call 40007b9c <== NOT EXECUTED 40003388: 01 00 00 00 nop <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ rtems_filesystem_initialize(); 4000338c: 40 00 26 f3 call 4000cf58 <== NOT EXECUTED 40003390: 81 e8 00 00 restore <== NOT EXECUTED int i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 40003394: 40 00 00 ea call 4000373c 40003398: 23 10 00 6f sethi %hi(0x4001bc00), %l1 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 4000339c: 80 a2 20 00 cmp %o0, 0 400033a0: 02 80 00 18 be 40003400 400033a4: d0 24 60 18 st %o0, [ %l1 + 0x18 ] rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 400033a8: c8 04 60 18 ld [ %l1 + 0x18 ], %g4 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 400033ac: c6 04 22 2c ld [ %l0 + 0x22c ], %g3 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; 400033b0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++) 400033b4: 80 a0 e0 01 cmp %g3, 1 400033b8: 02 80 00 10 be 400033f8 400033bc: c8 20 60 1c st %g4, [ %g1 + 0x1c ] 400033c0: 82 10 00 04 mov %g4, %g1 400033c4: 84 10 20 01 mov 1, %g2 iop->data1 = iop + 1; 400033c8: 82 00 60 34 add %g1, 0x34, %g1 400033cc: 84 00 a0 01 inc %g2 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 < (rtems_libio_number_iops - 1) ; i++, iop++) 400033d0: 80 a0 80 03 cmp %g2, %g3 400033d4: 12 bf ff fd bne 400033c8 400033d8: c2 20 7f f4 st %g1, [ %g1 + -12 ] 400033dc: 85 28 e0 02 sll %g3, 2, %g2 400033e0: 83 28 e0 04 sll %g3, 4, %g1 400033e4: 82 20 40 02 sub %g1, %g2, %g1 400033e8: 82 00 40 03 add %g1, %g3, %g1 400033ec: 83 28 60 02 sll %g1, 2, %g1 400033f0: 82 01 00 01 add %g4, %g1, %g1 400033f4: 88 00 7f cc add %g1, -52, %g4 iop->data1 = iop + 1; iop->data1 = NULL; 400033f8: 10 bf ff d6 b 40003350 400033fc: c0 21 20 28 clr [ %g4 + 0x28 ] if (rtems_libio_number_iops > 0) { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 40003400: 40 00 11 e7 call 40007b9c <== NOT EXECUTED 40003404: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED iop = rtems_libio_iop_freelist = rtems_libio_iops; 40003408: 10 bf ff e9 b 400033ac <== NOT EXECUTED 4000340c: c8 04 60 18 ld [ %l1 + 0x18 ], %g4 <== NOT EXECUTED 4001aa10 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 4001aa10: 9d e3 bf 80 save %sp, -128, %sp rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 4001aa14: 90 10 20 00 clr %o0 4001aa18: 92 10 20 00 clr %o1 4001aa1c: 40 00 03 d4 call 4001b96c 4001aa20: 94 07 bf f4 add %fp, -12, %o2 if (sc != RTEMS_SUCCESSFUL) return sc; 4001aa24: b0 92 20 00 orcc %o0, 0, %i0 4001aa28: 12 80 00 44 bne 4001ab38 4001aa2c: 25 10 00 f5 sethi %hi(0x4003d400), %l2 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 4001aa30: c4 04 a3 f0 ld [ %l2 + 0x3f0 ], %g2 ! 4003d7f0 4001aa34: 03 10 01 00 sethi %hi(0x40040000), %g1 4001aa38: a6 10 62 d4 or %g1, 0x2d4, %l3 ! 400402d4 4001aa3c: 80 a0 80 13 cmp %g2, %l3 4001aa40: 12 80 00 0f bne 4001aa7c 4001aa44: a2 14 a3 f0 or %l2, 0x3f0, %l1 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 4001aa48: 7f ff af 2a call 400066f0 4001aa4c: 90 10 20 40 mov 0x40, %o0 if (!tmp) 4001aa50: a0 92 20 00 orcc %o0, 0, %l0 4001aa54: 02 80 00 3b be 4001ab40 4001aa58: 92 10 00 11 mov %l1, %o1 #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); 4001aa5c: 90 10 20 00 clr %o0 4001aa60: 15 10 00 6a sethi %hi(0x4001a800), %o2 4001aa64: 40 00 04 e7 call 4001be00 4001aa68: 94 12 a0 e4 or %o2, 0xe4, %o2 ! 4001a8e4 if (sc != RTEMS_SUCCESSFUL) { 4001aa6c: a2 92 20 00 orcc %o0, 0, %l1 4001aa70: 32 80 00 36 bne,a 4001ab48 4001aa74: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 4001aa78: e0 24 a3 f0 st %l0, [ %l2 + 0x3f0 ] }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 4001aa7c: d0 04 a3 f0 ld [ %l2 + 0x3f0 ], %o0 4001aa80: 92 10 00 13 mov %l3, %o1 4001aa84: 40 00 39 b2 call 4002914c 4001aa88: 94 10 20 40 mov 0x40, %o2 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aa8c: 03 10 00 fe sethi %hi(0x4003f800), %g1 4001aa90: c8 00 62 e8 ld [ %g1 + 0x2e8 ], %g4 ! 4003fae8 } 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*/ 4001aa94: c4 04 a3 f0 ld [ %l2 + 0x3f0 ], %g2 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aa98: c2 01 20 18 ld [ %g4 + 0x18 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aa9c: a2 07 bf e4 add %fp, -28, %l1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aaa0: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] } 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*/ 4001aaa4: c2 07 bf f4 ld [ %fp + -12 ], %g1 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aaa8: c6 01 20 1c ld [ %g4 + 0x1c ], %g3 } 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*/ 4001aaac: c2 20 80 00 st %g1, [ %g2 ] /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aab0: c6 20 a0 18 st %g3, [ %g2 + 0x18 ] 4001aab4: c2 01 20 20 ld [ %g4 + 0x20 ], %g1 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aab8: 21 10 00 e6 sethi %hi(0x40039800), %l0 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aabc: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4001aac0: c6 01 20 24 ld [ %g4 + 0x24 ], %g3 * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aac4: 92 10 20 00 clr %o1 *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 4001aac8: c6 20 a0 20 st %g3, [ %g2 + 0x20 ] * code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aacc: 94 10 00 11 mov %l1, %o2 4001aad0: 96 10 20 00 clr %o3 4001aad4: 7f ff ad 60 call 40006054 4001aad8: 90 14 23 88 or %l0, 0x388, %o0 rtems_filesystem_root = loc; 4001aadc: c4 04 a3 f0 ld [ %l2 + 0x3f0 ], %g2 4001aae0: c2 07 bf e4 ld [ %fp + -28 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aae4: 90 14 23 88 or %l0, 0x388, %o0 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4001aae8: c2 20 a0 14 st %g1, [ %g2 + 0x14 ] 4001aaec: c2 07 bf e8 ld [ %fp + -24 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aaf0: 94 10 00 11 mov %l1, %o2 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4001aaf4: c2 20 a0 18 st %g1, [ %g2 + 0x18 ] 4001aaf8: c2 07 bf ec ld [ %fp + -20 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001aafc: 92 10 20 00 clr %o1 * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 0, &loc, 0); rtems_filesystem_root = loc; 4001ab00: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] 4001ab04: c2 07 bf f0 ld [ %fp + -16 ], %g1 rtems_filesystem_evaluate_path("/", 0, &loc, 0); 4001ab08: 96 10 20 00 clr %o3 4001ab0c: 7f ff ad 52 call 40006054 4001ab10: c2 20 a0 20 st %g1, [ %g2 + 0x20 ] rtems_filesystem_current = loc; 4001ab14: c2 07 bf e4 ld [ %fp + -28 ], %g1 4001ab18: c6 04 a3 f0 ld [ %l2 + 0x3f0 ], %g3 4001ab1c: c2 20 e0 04 st %g1, [ %g3 + 4 ] 4001ab20: c4 07 bf e8 ld [ %fp + -24 ], %g2 4001ab24: c4 20 e0 08 st %g2, [ %g3 + 8 ] 4001ab28: c2 07 bf ec ld [ %fp + -20 ], %g1 4001ab2c: c2 20 e0 0c st %g1, [ %g3 + 0xc ] 4001ab30: c4 07 bf f0 ld [ %fp + -16 ], %g2 4001ab34: c4 20 e0 10 st %g2, [ %g3 + 0x10 ] return RTEMS_SUCCESSFUL; } 4001ab38: 81 c7 e0 08 ret 4001ab3c: 81 e8 00 00 restore if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 4001ab40: 81 c7 e0 08 ret <== NOT EXECUTED 4001ab44: 91 e8 20 1a restore %g0, 0x1a, %o0 <== NOT EXECUTED sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env); if (sc != RTEMS_SUCCESSFUL) { /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 4001ab48: 7f ff ae c1 call 4000664c <== NOT EXECUTED 4001ab4c: b0 10 00 11 mov %l1, %i0 <== NOT EXECUTED 4001ab50: 81 c7 e0 08 ret <== NOT EXECUTED 4001ab54: 81 e8 00 00 restore <== NOT EXECUTED 4001a95c : * 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) { 4001a95c: 9d e3 bf 90 save %sp, -112, %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); 4001a960: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001a964: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001a968: 40 00 04 01 call 4001b96c <== NOT EXECUTED 4001a96c: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4001a970: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 4001a974: 12 80 00 13 bne 4001a9c0 <== NOT EXECUTED 4001a978: 25 10 00 f5 sethi %hi(0x4003d400), %l2 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 4001a97c: e2 04 a3 f0 ld [ %l2 + 0x3f0 ], %l1 ! 4003d7f0 <== NOT EXECUTED 4001a980: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001a984: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED 4001a988: 86 14 a3 f0 or %l2, 0x3f0, %g3 <== NOT EXECUTED 4001a98c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001a990: 02 80 00 0e be 4001a9c8 <== NOT EXECUTED 4001a994: a0 10 00 03 mov %g3, %l0 <== NOT EXECUTED free_user_env(tmp); }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 4001a998: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a99c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4001a9a0: 40 00 05 eb call 4001c14c <== NOT EXECUTED 4001a9a4: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 4001a9a8: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 4001a9ac: 02 80 00 10 be 4001a9ec <== NOT EXECUTED 4001a9b0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 4001a9b4: 03 10 01 00 sethi %hi(0x40040000), %g1 <== NOT EXECUTED 4001a9b8: 82 10 62 d4 or %g1, 0x2d4, %g1 ! 400402d4 <== NOT EXECUTED 4001a9bc: c2 24 a3 f0 st %g1, [ %l2 + 0x3f0 ] <== NOT EXECUTED return sc; } 4001a9c0: 81 c7 e0 08 ret <== NOT EXECUTED 4001a9c4: 91 e8 00 02 restore %g0, %g2, %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; if (rtems_current_user_env->task_id==current_task_id) { /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 4001a9c8: 40 00 05 6d call 4001bf7c <== NOT EXECUTED 4001a9cc: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 4001a9d0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 4001a9d4: 12 bf ff fb bne 4001a9c0 <== NOT EXECUTED 4001a9d8: 01 00 00 00 nop <== NOT EXECUTED free_user_env(tmp); 4001a9dc: 7f ff ff c2 call 4001a8e4 <== NOT EXECUTED 4001a9e0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 4001a9e4: 10 bf ff ee b 4001a99c <== NOT EXECUTED 4001a9e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 4001a9ec: 15 10 00 6a sethi %hi(0x4001a800), %o2 <== NOT EXECUTED 4001a9f0: 40 00 05 04 call 4001be00 <== NOT EXECUTED 4001a9f4: 94 12 a0 e4 or %o2, 0xe4, %o2 ! 4001a8e4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4001a9f8: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED 4001a9fc: 12 bf ff ef bne 4001a9b8 <== NOT EXECUTED 4001aa00: 03 10 01 00 sethi %hi(0x40040000), %g1 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 4001aa04: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001aa08: 10 bf ff ee b 4001a9c0 <== NOT EXECUTED 4001aa0c: c2 24 a3 f0 st %g1, [ %l2 + 0x3f0 ] <== NOT EXECUTED 4000d354 : */ uint32_t rtems_libio_to_fcntl_flags( uint32_t flags ) { 4000d354: 84 10 00 08 mov %o0, %g2 uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 4000d358: 82 08 a0 06 and %g2, 6, %g1 4000d35c: 80 a0 60 06 cmp %g1, 6 4000d360: 02 80 00 05 be 4000d374 4000d364: 90 10 20 02 mov 2, %o0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000d368: 80 88 a0 02 btst 2, %g2 4000d36c: 02 80 00 0e be 4000d3a4 4000d370: 90 10 20 00 clr %o0 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 ) { 4000d374: 80 88 a0 01 btst 1, %g2 4000d378: 02 80 00 04 be 4000d388 4000d37c: 80 88 a2 00 btst 0x200, %g2 fcntl_flags |= O_NONBLOCK; 4000d380: 03 00 00 10 sethi %hi(0x4000), %g1 4000d384: 90 12 00 01 or %o0, %g1, %o0 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 4000d388: 32 80 00 02 bne,a 4000d390 4000d38c: 90 12 20 08 or %o0, 8, %o0 fcntl_flags |= O_APPEND; } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 4000d390: 80 88 a4 00 btst 0x400, %g2 4000d394: 32 80 00 02 bne,a 4000d39c 4000d398: 90 12 22 00 or %o0, 0x200, %o0 fcntl_flags |= O_CREAT; } return fcntl_flags; } 4000d39c: 81 c3 e0 08 retl 4000d3a0: 01 00 00 00 nop { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 4000d3a4: 83 30 a0 02 srl %g2, 2, %g1 <== NOT EXECUTED 4000d3a8: 10 bf ff f3 b 4000d374 <== NOT EXECUTED 4000d3ac: 90 08 60 01 and %g1, 1, %o0 <== NOT EXECUTED 40010110 : Objects_Id id, void *buffer, size_t size, uint32_t *count ) { 40010110: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status core_status; if ( !buffer ) 40010114: 80 a6 60 00 cmp %i1, 0 40010118: 02 80 00 28 be 400101b8 4001011c: 80 a6 e0 00 cmp %i3, 0 return RTEMS_INVALID_ADDRESS; if ( !count ) 40010120: 02 80 00 26 be 400101b8 40010124: 92 10 00 18 mov %i0, %o1 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40010128: 11 10 00 da sethi %hi(0x40036800), %o0 4001012c: 90 12 20 e0 or %o0, 0xe0, %o0 ! 400368e0 <_Message_queue_Information> 40010130: 40 00 19 84 call 40016740 <_Objects_Get> 40010134: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40010138: c2 07 bf f4 ld [ %fp + -12 ], %g1 4001013c: 80 a0 60 00 cmp %g1, 0 40010140: 02 80 00 08 be 40010160 40010144: 9a 10 00 1b mov %i3, %o5 40010148: 80 a0 60 02 cmp %g1, 2 4001014c: 08 80 00 03 bleu 40010158 40010150: 90 10 20 04 mov 4, %o0 40010154: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010158: 81 c7 e0 08 ret 4001015c: 91 e8 00 08 restore %g0, %o0, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: core_status = _CORE_message_queue_Broadcast( 40010160: 92 10 00 19 mov %i1, %o1 40010164: 94 10 00 1a mov %i2, %o2 40010168: 96 10 00 18 mov %i0, %o3 4001016c: 98 10 20 00 clr %o4 40010170: 40 00 13 f8 call 40015150 <_CORE_message_queue_Broadcast> 40010174: 90 02 20 14 add %o0, 0x14, %o0 40010178: b6 10 00 08 mov %o0, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001017c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010180: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010184: 84 00 bf ff add %g2, -1, %g2 40010188: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4001018c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010190: 80 a0 e0 00 cmp %g3, 0 40010194: 02 80 00 06 be 400101ac 40010198: 01 00 00 00 nop #endif count ); _Thread_Enable_dispatch(); return 4001019c: 40 00 01 35 call 40010670 <_Message_queue_Translate_core_message_queue_return_code> 400101a0: 90 10 00 1b mov %i3, %o0 _Message_queue_Translate_core_message_queue_return_code( core_status ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400101a4: 81 c7 e0 08 ret 400101a8: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400101ac: 40 00 1e 8d call 40017be0 <_Thread_Dispatch> 400101b0: 01 00 00 00 nop 400101b4: 30 bf ff fa b,a 4001019c #endif count ); _Thread_Enable_dispatch(); return 400101b8: 10 bf ff e8 b 40010158 <== NOT EXECUTED 400101bc: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 400101c0 : uint32_t count, uint32_t max_message_size, rtems_attribute attribute_set, Objects_Id *id ) { 400101c0: 9d e3 bf 90 save %sp, -112, %sp CORE_message_queue_Attributes the_msgq_attributes; #if defined(RTEMS_MULTIPROCESSING) boolean is_global; #endif if ( !rtems_is_name_valid( name ) ) 400101c4: a4 96 20 00 orcc %i0, 0, %l2 400101c8: 02 80 00 1f be 40010244 400101cc: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 400101d0: 80 a7 20 00 cmp %i4, 0 400101d4: 02 80 00 1c be 40010244 400101d8: b0 10 20 09 mov 9, %i0 if ( (is_global = _Attributes_Is_global( attribute_set ) ) && !_System_state_Is_multiprocessing ) return RTEMS_MP_NOT_CONFIGURED; #endif if ( count == 0 ) 400101dc: 80 a6 60 00 cmp %i1, 0 400101e0: 02 80 00 19 be 40010244 400101e4: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( max_message_size == 0 ) 400101e8: 80 a6 a0 00 cmp %i2, 0 400101ec: 02 80 00 16 be 40010244 400101f0: b0 10 20 08 mov 8, %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400101f4: 23 10 00 d7 sethi %hi(0x40035c00), %l1 400101f8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400101fc: 82 00 60 01 inc %g1 40010200: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] #endif #endif _Thread_Disable_dispatch(); /* protects object pointer */ the_message_queue = _Message_queue_Allocate( count, max_message_size ); 40010204: 90 10 00 19 mov %i1, %o0 40010208: 40 00 2f 2a call 4001beb0 <_Message_queue_Allocate> 4001020c: 92 10 00 1a mov %i2, %o1 if ( !the_message_queue ) { 40010210: a0 92 20 00 orcc %o0, 0, %l0 40010214: 12 80 00 0e bne 4001024c 40010218: 80 8e e0 04 btst 4, %i3 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001021c: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40010220: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40010224: 82 00 7f ff add %g1, -1, %g1 40010228: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 4001022c: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40010230: 80 a0 a0 00 cmp %g2, 0 40010234: 12 80 00 33 bne 40010300 40010238: 01 00 00 00 nop 4001023c: 40 00 1e 69 call 40017be0 <_Thread_Dispatch> 40010240: 01 00 00 00 nop 40010244: 81 c7 e0 08 ret 40010248: 81 e8 00 00 restore } #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) 4001024c: 12 80 00 11 bne 40010290 40010250: f6 24 20 10 st %i3, [ %l0 + 0x10 ] the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; else the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO; 40010254: c0 27 bf f4 clr [ %fp + -12 ] if ( ! _CORE_message_queue_Initialize( 40010258: 94 10 00 19 mov %i1, %o2 4001025c: 96 10 00 1a mov %i2, %o3 40010260: 90 04 20 14 add %l0, 0x14, %o0 40010264: 40 00 14 08 call 40015284 <_CORE_message_queue_Initialize> 40010268: 92 07 bf f4 add %fp, -12, %o1 4001026c: 80 a2 20 00 cmp %o0, 0 40010270: 12 80 00 0b bne 4001029c 40010274: 92 10 00 10 mov %l0, %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 40010278: 11 10 00 da sethi %hi(0x40036800), %o0 <== NOT EXECUTED 4001027c: 40 00 18 da call 400165e4 <_Objects_Free> <== NOT EXECUTED 40010280: 90 12 20 e0 or %o0, 0xe0, %o0 ! 400368e0 <_Message_queue_Information> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010284: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40010288: 10 bf ff e7 b 40010224 <== NOT EXECUTED 4001028c: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED #endif the_message_queue->attribute_set = attribute_set; if (_Attributes_Is_priority( attribute_set ) ) the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY; 40010290: 82 10 20 01 mov 1, %g1 40010294: 10 bf ff f1 b 40010258 40010298: c2 27 bf f4 st %g1, [ %fp + -12 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001029c: 03 10 00 da sethi %hi(0x40036800), %g1 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400102a0: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400102a4: 88 10 60 e0 or %g1, 0xe0, %g4 400102a8: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 400102ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400102b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400102b4: 82 08 c0 01 and %g3, %g1, %g1 400102b8: 80 a0 40 02 cmp %g1, %g2 400102bc: 38 80 00 06 bgu,a 400102d4 400102c0: e4 24 20 0c st %l2, [ %l0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400102c4: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 400102c8: 83 28 60 02 sll %g1, 2, %g1 400102cc: e0 20 80 01 st %l0, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400102d0: e4 24 20 0c st %l2, [ %l0 + 0xc ] &_Message_queue_Information, &the_message_queue->Object, (Objects_Name) name ); *id = the_message_queue->Object.id; 400102d4: c6 27 00 00 st %g3, [ %i4 ] 400102d8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400102dc: b0 10 20 00 clr %i0 400102e0: 82 00 7f ff add %g1, -1, %g1 400102e4: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 400102e8: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400102ec: 80 a0 a0 00 cmp %g2, 0 400102f0: 12 80 00 04 bne 40010300 400102f4: 01 00 00 00 nop _Thread_Dispatch(); 400102f8: 40 00 1e 3a call 40017be0 <_Thread_Dispatch> 400102fc: 01 00 00 00 nop ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40010300: 81 c7 e0 08 ret 40010304: 81 e8 00 00 restore 4001743c : */ rtems_status_code rtems_message_queue_delete( Objects_Id id ) { 4001743c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40017440: 21 10 00 b9 sethi %hi(0x4002e400), %l0 40017444: 92 10 00 18 mov %i0, %o1 40017448: 94 07 bf f4 add %fp, -12, %o2 4001744c: 7f ff e3 40 call 4001014c <_Objects_Get> 40017450: 90 14 21 9c or %l0, 0x19c, %o0 register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40017454: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017458: 80 a0 60 00 cmp %g1, 0 4001745c: 12 80 00 20 bne 400174dc 40017460: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40017464: a0 14 21 9c or %l0, 0x19c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40017468: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001746c: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40017470: 05 00 00 3f sethi %hi(0xfc00), %g2 40017474: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40017478: 82 08 40 02 and %g1, %g2, %g1 4001747c: 80 a0 40 03 cmp %g1, %g3 40017480: 18 80 00 05 bgu 40017494 40017484: 94 10 20 05 mov 5, %o2 information->local_table[ index ] = the_object; 40017488: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 4001748c: 83 28 60 02 sll %g1, 2, %g1 40017490: c0 20 80 01 clr [ %g2 + %g1 ] case OBJECTS_LOCAL: _Objects_Close( &_Message_queue_Information, &the_message_queue->Object ); _CORE_message_queue_Close( 40017494: 90 06 20 14 add %i0, 0x14, %o0 uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40017498: c0 26 20 0c clr [ %i0 + 0xc ] 4001749c: 40 00 01 c0 call 40017b9c <_CORE_message_queue_Close> 400174a0: 92 10 20 00 clr %o1 RTEMS_INLINE_ROUTINE void _Message_queue_Free ( Message_queue_Control *the_message_queue ) { _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); 400174a4: 90 10 00 10 mov %l0, %o0 400174a8: 7f ff e2 e6 call 40010040 <_Objects_Free> 400174ac: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400174b0: 03 10 00 b6 sethi %hi(0x4002d800), %g1 400174b4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> 400174b8: b0 10 20 00 clr %i0 400174bc: 84 00 bf ff add %g2, -1, %g2 400174c0: c4 20 63 30 st %g2, [ %g1 + 0x330 ] 400174c4: c6 00 63 30 ld [ %g1 + 0x330 ], %g3 400174c8: 80 a0 e0 00 cmp %g3, 0 400174cc: 02 80 00 09 be 400174f0 400174d0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400174d4: 81 c7 e0 08 ret 400174d8: 81 e8 00 00 restore { register Message_queue_Control *the_message_queue; Objects_Locations location; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400174dc: 80 a0 60 02 cmp %g1, 2 400174e0: 08 bf ff fd bleu 400174d4 400174e4: b0 10 20 04 mov 4, %i0 400174e8: 81 c7 e0 08 ret <== NOT EXECUTED 400174ec: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED _Thread_Dispatch(); 400174f0: 7f ff e8 3f call 400115ec <_Thread_Dispatch> 400174f4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400174f8: 81 c7 e0 08 ret 400174fc: 81 e8 00 00 restore 400103cc : rtems_status_code rtems_message_queue_flush( Objects_Id id, uint32_t *count ) { 400103cc: 9d e3 bf 90 save %sp, -112, %sp 400103d0: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 400103d4: 80 a6 60 00 cmp %i1, 0 400103d8: 02 80 00 1c be 40010448 400103dc: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 400103e0: 11 10 00 da sethi %hi(0x40036800), %o0 400103e4: 94 07 bf f4 add %fp, -12, %o2 400103e8: 40 00 18 d6 call 40016740 <_Objects_Get> 400103ec: 90 12 20 e0 or %o0, 0xe0, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 400103f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400103f4: 80 a0 60 00 cmp %g1, 0 400103f8: 02 80 00 06 be 40010410 400103fc: 80 a0 60 02 cmp %g1, 2 40010400: 08 80 00 12 bleu 40010448 40010404: b0 10 20 04 mov 4, %i0 40010408: 81 c7 e0 08 ret <== NOT EXECUTED 4001040c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = _CORE_message_queue_Flush( &the_message_queue->message_queue ); 40010410: 40 00 13 7d call 40015204 <_CORE_message_queue_Flush> 40010414: 90 02 20 14 add %o0, 0x14, %o0 40010418: d0 26 40 00 st %o0, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001041c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010420: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010424: b0 10 20 00 clr %i0 40010428: 84 00 bf ff add %g2, -1, %g2 4001042c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010430: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010434: 80 a0 e0 00 cmp %g3, 0 40010438: 12 80 00 04 bne 40010448 4001043c: 01 00 00 00 nop _Thread_Dispatch(); 40010440: 40 00 1d e8 call 40017be0 <_Thread_Dispatch> 40010444: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010448: 81 c7 e0 08 ret 4001044c: 81 e8 00 00 restore 40010450 : rtems_status_code rtems_message_queue_get_number_pending( Objects_Id id, uint32_t *count ) { 40010450: 9d e3 bf 90 save %sp, -112, %sp 40010454: 92 10 00 18 mov %i0, %o1 register Message_queue_Control *the_message_queue; Objects_Locations location; if ( !count ) 40010458: 80 a6 60 00 cmp %i1, 0 4001045c: 02 80 00 1b be 400104c8 40010460: b0 10 20 09 mov 9, %i0 40010464: 11 10 00 da sethi %hi(0x40036800), %o0 40010468: 94 07 bf f4 add %fp, -12, %o2 4001046c: 40 00 18 b5 call 40016740 <_Objects_Get> 40010470: 90 12 20 e0 or %o0, 0xe0, %o0 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 40010474: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010478: 80 a0 60 00 cmp %g1, 0 4001047c: 22 80 00 07 be,a 40010498 40010480: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 40010484: 80 a0 60 02 cmp %g1, 2 40010488: 08 80 00 10 bleu 400104c8 4001048c: b0 10 20 04 mov 4, %i0 40010490: 81 c7 e0 08 ret <== NOT EXECUTED 40010494: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *count = the_message_queue->message_queue.number_of_pending_messages; 40010498: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001049c: 07 10 00 d7 sethi %hi(0x40035c00), %g3 400104a0: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400104a4: b0 10 20 00 clr %i0 400104a8: 82 00 7f ff add %g1, -1, %g1 400104ac: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 400104b0: c4 00 e2 f0 ld [ %g3 + 0x2f0 ], %g2 400104b4: 80 a0 a0 00 cmp %g2, 0 400104b8: 12 80 00 04 bne 400104c8 400104bc: 01 00 00 00 nop _Thread_Dispatch(); 400104c0: 40 00 1d c8 call 40017be0 <_Thread_Dispatch> 400104c4: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400104c8: 81 c7 e0 08 ret 400104cc: 81 e8 00 00 restore 40017534 : void *buffer, size_t *size, uint32_t option_set, rtems_interval timeout ) { 40017534: 9d e3 bf 90 save %sp, -112, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; boolean wait; if ( !buffer ) 40017538: 80 a6 60 00 cmp %i1, 0 4001753c: 02 80 00 2b be 400175e8 40017540: 92 10 00 18 mov %i0, %o1 return RTEMS_INVALID_ADDRESS; if ( !size ) 40017544: 80 a6 a0 00 cmp %i2, 0 40017548: 02 80 00 28 be 400175e8 4001754c: 94 07 bf f4 add %fp, -12, %o2 RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( Objects_Id id, Objects_Locations *location ) { return (Message_queue_Control *) 40017550: 11 10 00 b9 sethi %hi(0x4002e400), %o0 40017554: 7f ff e2 fe call 4001014c <_Objects_Get> 40017558: 90 12 21 9c or %o0, 0x19c, %o0 ! 4002e59c <_Message_queue_Information> return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) { 4001755c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017560: 80 a0 60 00 cmp %g1, 0 40017564: 22 80 00 08 be,a 40017584 40017568: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001756c: 80 a0 60 02 cmp %g1, 2 40017570: 08 80 00 03 bleu 4001757c 40017574: 90 10 20 04 mov 4, %o0 40017578: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001757c: 81 c7 e0 08 ret 40017580: 91 e8 00 08 restore %g0, %o0, %o0 40017584: 98 0e e0 01 and %i3, 1, %o4 if ( _Options_Is_no_wait( option_set ) ) wait = FALSE; else wait = TRUE; _CORE_message_queue_Seize( 40017588: 94 10 00 19 mov %i1, %o2 4001758c: 96 10 00 1a mov %i2, %o3 40017590: 98 1b 20 01 xor %o4, 1, %o4 40017594: 9a 10 00 1c mov %i4, %o5 40017598: 40 00 01 a7 call 40017c34 <_CORE_message_queue_Seize> 4001759c: 90 02 20 14 add %o0, 0x14, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400175a0: 05 10 00 b6 sethi %hi(0x4002d800), %g2 400175a4: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 400175a8: 82 00 7f ff add %g1, -1, %g1 400175ac: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] 400175b0: c6 00 a3 30 ld [ %g2 + 0x330 ], %g3 400175b4: 80 a0 e0 00 cmp %g3, 0 400175b8: 02 80 00 08 be 400175d8 400175bc: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 400175c0: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 <== NOT EXECUTED 400175c4: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 4002dc0c <_Thread_Executing> 400175c8: 40 00 00 36 call 400176a0 <_Message_queue_Translate_core_message_queue_return_code> 400175cc: d0 00 a0 34 ld [ %g2 + 0x34 ], %o0 ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400175d0: 81 c7 e0 08 ret 400175d4: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 400175d8: 7f ff e8 05 call 400115ec <_Thread_Dispatch> 400175dc: 01 00 00 00 nop size, wait, timeout ); _Thread_Enable_dispatch(); return _Message_queue_Translate_core_message_queue_return_code( 400175e0: 10 bf ff f9 b 400175c4 400175e4: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 400175e8: 10 bf ff e5 b 4001757c <== NOT EXECUTED 400175ec: 90 10 20 09 mov 9, %o0 <== NOT EXECUTED 400175f0 : rtems_status_code rtems_message_queue_send( Objects_Id id, void *buffer, size_t size ) { 400175f0: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 400175f4: 80 a6 60 00 cmp %i1, 0 400175f8: 02 80 00 20 be 40017678 400175fc: 90 10 20 09 mov 9, %o0 40017600: 11 10 00 b9 sethi %hi(0x4002e400), %o0 40017604: 92 10 00 18 mov %i0, %o1 40017608: 90 12 21 9c or %o0, 0x19c, %o0 4001760c: 7f ff e2 d0 call 4001014c <_Objects_Get> 40017610: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40017614: c2 07 bf f4 ld [ %fp + -12 ], %g1 40017618: 80 a0 60 00 cmp %g1, 0 4001761c: 12 80 00 19 bne 40017680 40017620: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40017624: 94 10 00 1a mov %i2, %o2 40017628: c0 23 a0 5c clr [ %sp + 0x5c ] 4001762c: c0 23 a0 60 clr [ %sp + 0x60 ] 40017630: 92 10 00 19 mov %i1, %o1 40017634: 96 10 00 18 mov %i0, %o3 40017638: 98 10 20 00 clr %o4 4001763c: 90 02 20 14 add %o0, 0x14, %o0 40017640: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5 40017644: 40 00 01 c3 call 40017d50 <_CORE_message_queue_Submit> 40017648: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff 4001764c: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40017650: 05 10 00 b6 sethi %hi(0x4002d800), %g2 40017654: c2 00 a3 30 ld [ %g2 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 40017658: 82 00 7f ff add %g1, -1, %g1 4001765c: c2 20 a3 30 st %g1, [ %g2 + 0x330 ] 40017660: c6 00 a3 30 ld [ %g2 + 0x330 ], %g3 40017664: 80 a0 e0 00 cmp %g3, 0 40017668: 02 80 00 0b be 40017694 4001766c: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40017670: 40 00 00 0c call 400176a0 <_Message_queue_Translate_core_message_queue_return_code> 40017674: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40017678: 81 c7 e0 08 ret 4001767c: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40017680: 08 bf ff fe bleu 40017678 40017684: 90 10 20 04 mov 4, %o0 40017688: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001768c: 81 c7 e0 08 ret <== NOT EXECUTED 40017690: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40017694: 7f ff e7 d6 call 400115ec <_Thread_Dispatch> 40017698: 01 00 00 00 nop 4001769c: 30 bf ff f5 b,a 40017670 40009a10 : rtems_status_code rtems_message_queue_urgent( Objects_Id id, void *buffer, size_t size ) { 40009a10: 9d e3 bf 88 save %sp, -120, %sp register Message_queue_Control *the_message_queue; Objects_Locations location; CORE_message_queue_Status status; if ( !buffer ) 40009a14: 80 a6 60 00 cmp %i1, 0 40009a18: 02 80 00 1f be 40009a94 40009a1c: 90 10 20 09 mov 9, %o0 40009a20: 11 10 00 92 sethi %hi(0x40024800), %o0 40009a24: 92 10 00 18 mov %i0, %o1 40009a28: 90 12 20 18 or %o0, 0x18, %o0 40009a2c: 40 00 0a 47 call 4000c348 <_Objects_Get> 40009a30: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40009a34: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009a38: 80 a0 60 00 cmp %g1, 0 40009a3c: 12 80 00 18 bne 40009a9c 40009a40: 80 a0 60 02 cmp %g1, 2 CORE_message_queue_API_mp_support_callout api_message_queue_mp_support, boolean wait, Watchdog_Interval timeout ) { return _CORE_message_queue_Submit( 40009a44: 94 10 00 1a mov %i2, %o2 40009a48: c0 23 a0 5c clr [ %sp + 0x5c ] 40009a4c: c0 23 a0 60 clr [ %sp + 0x60 ] 40009a50: 92 10 00 19 mov %i1, %o1 40009a54: 96 10 00 18 mov %i0, %o3 40009a58: 98 10 20 00 clr %o4 40009a5c: 1b 20 00 00 sethi %hi(0x80000000), %o5 40009a60: 40 00 06 0e call 4000b298 <_CORE_message_queue_Submit> 40009a64: 90 02 20 14 add %o0, 0x14, %o0 40009a68: b4 10 00 08 mov %o0, %i2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40009a6c: 03 10 00 8f sethi %hi(0x40023c00), %g1 40009a70: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40023e30 <_Thread_Dispatch_disable_level> 40009a74: 84 00 bf ff add %g2, -1, %g2 40009a78: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40009a7c: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 40009a80: 80 a0 e0 00 cmp %g3, 0 40009a84: 02 80 00 0b be 40009ab0 40009a88: 01 00 00 00 nop /* * Since this API does not allow for blocking sends, we can directly * return the returned status. */ return _Message_queue_Translate_core_message_queue_return_code(status); 40009a8c: 7f ff ff d7 call 400099e8 <_Message_queue_Translate_core_message_queue_return_code> 40009a90: 90 10 00 1a mov %i2, %o0 } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009a94: 81 c7 e0 08 ret 40009a98: 91 e8 00 08 restore %g0, %o0, %o0 if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_message_queue = _Message_queue_Get( id, &location ); switch ( location ) 40009a9c: 08 bf ff fe bleu 40009a94 <== NOT EXECUTED 40009aa0: 90 10 20 04 mov 4, %o0 <== NOT EXECUTED 40009aa4: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Message_queue_Translate_core_message_queue_return_code(status); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009aa8: 81 c7 e0 08 ret <== NOT EXECUTED 40009aac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED _Thread_Dispatch(); 40009ab0: 40 00 0f 4e call 4000d7e8 <_Thread_Dispatch> 40009ab4: 01 00 00 00 nop 40009ab8: 30 bf ff f5 b,a 40009a8c 40009d38 : void rtems_panic( const char *printf_format, ... ) { 40009d38: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40009d3c: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 40009d40: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED void rtems_panic( const char *printf_format, ... ) { 40009d44: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED 40009d48: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40009d4c: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED 40009d50: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED 40009d54: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 40009d58: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40009d5c: 7f ff ff 88 call 40009b7c <== NOT EXECUTED 40009d60: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED va_end(arglist); } 40009d64: 81 c7 e0 08 ret <== NOT EXECUTED 40009d68: 81 e8 00 00 restore <== NOT EXECUTED 40010698 : uint32_t length, uint32_t buffer_size, rtems_attribute attribute_set, Objects_Id *id ) { 40010698: 9d e3 bf 98 save %sp, -104, %sp register Partition_Control *the_partition; if ( !rtems_is_name_valid( name ) ) 4001069c: a8 96 20 00 orcc %i0, 0, %l4 400106a0: 02 80 00 29 be 40010744 400106a4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 400106a8: 80 a6 60 00 cmp %i1, 0 400106ac: 02 80 00 11 be 400106f0 400106b0: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 400106b4: 02 80 00 0f be 400106f0 400106b8: 80 a6 a0 00 cmp %i2, 0 return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 400106bc: 12 80 00 04 bne 400106cc 400106c0: 80 a6 e0 00 cmp %i3, 0 ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 400106c4: 81 c7 e0 08 ret 400106c8: 91 e8 20 08 restore %g0, 8, %o0 return RTEMS_INVALID_ADDRESS; if ( !id ) return RTEMS_INVALID_ADDRESS; if ( length == 0 || buffer_size == 0 || length < buffer_size || 400106cc: 02 80 00 1e be 40010744 400106d0: b0 10 20 08 mov 8, %i0 400106d4: 80 a6 80 1b cmp %i2, %i3 400106d8: 0a 80 00 1b bcs 40010744 400106dc: 80 8e e0 07 btst 7, %i3 400106e0: 12 80 00 19 bne 40010744 400106e4: 80 8e 60 07 btst 7, %i1 !_Partition_Is_buffer_size_aligned( buffer_size ) ) return RTEMS_INVALID_SIZE; if ( !_Addresses_Is_aligned( starting_address ) ) 400106e8: 02 80 00 04 be 400106f8 400106ec: 25 10 00 d7 sethi %hi(0x40035c00), %l2 400106f0: 81 c7 e0 08 ret 400106f4: 91 e8 20 09 restore %g0, 9, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400106f8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400106fc: 82 00 60 01 inc %g1 40010700: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] * the inactive chain of free partition control blocks. */ RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void ) { return (Partition_Control *) _Objects_Allocate( &_Partition_Information ); 40010704: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40010708: 40 00 16 a9 call 400161ac <_Objects_Allocate> 4001070c: 90 14 e0 70 or %l3, 0x70, %o0 ! 40035c70 <_Partition_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_partition = _Partition_Allocate(); if ( !the_partition ) { 40010710: a2 92 20 00 orcc %o0, 0, %l1 40010714: 12 80 00 0e bne 4001074c 40010718: 92 10 00 1b mov %i3, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001071c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40010720: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40010724: 82 00 7f ff add %g1, -1, %g1 40010728: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 4001072c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 40010730: 80 a0 a0 00 cmp %g2, 0 40010734: 12 80 00 04 bne 40010744 40010738: 01 00 00 00 nop 4001073c: 40 00 1d 29 call 40017be0 <_Thread_Dispatch> 40010740: 01 00 00 00 nop 40010744: 81 c7 e0 08 ret 40010748: 81 e8 00 00 restore #endif the_partition->starting_address = starting_address; the_partition->length = length; the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set; 4001074c: f8 24 60 1c st %i4, [ %l1 + 0x1c ] _Thread_Enable_dispatch(); return RTEMS_TOO_MANY; } #endif the_partition->starting_address = starting_address; 40010750: f2 24 60 10 st %i1, [ %l1 + 0x10 ] the_partition->length = length; 40010754: f4 24 60 14 st %i2, [ %l1 + 0x14 ] the_partition->buffer_size = buffer_size; 40010758: f6 24 60 18 st %i3, [ %l1 + 0x18 ] the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0; 4001075c: c0 24 60 20 clr [ %l1 + 0x20 ] _Chain_Initialize( &the_partition->Memory, starting_address, 40010760: 40 00 58 44 call 40026870 <.udiv> 40010764: 90 10 00 1a mov %i2, %o0 40010768: a0 04 60 24 add %l1, 0x24, %l0 4001076c: 94 10 00 08 mov %o0, %o2 40010770: 92 10 00 19 mov %i1, %o1 40010774: 90 10 00 10 mov %l0, %o0 40010778: 40 00 12 5e call 400150f0 <_Chain_Initialize> 4001077c: 96 10 00 1b mov %i3, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010780: 90 14 e0 70 or %l3, 0x70, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40010784: c6 04 60 08 ld [ %l1 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010788: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 4001078c: 03 00 00 3f sethi %hi(0xfc00), %g1 40010790: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40010794: 82 08 c0 01 and %g3, %g1, %g1 40010798: 80 a0 40 02 cmp %g1, %g2 4001079c: 38 80 00 06 bgu,a 400107b4 400107a0: e8 24 60 0c st %l4, [ %l1 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400107a4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400107a8: 83 28 60 02 sll %g1, 2, %g1 400107ac: e2 20 80 01 st %l1, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400107b0: e8 24 60 0c st %l4, [ %l1 + 0xc ] &_Partition_Information, &the_partition->Object, (Objects_Name) name ); *id = the_partition->Object.id; 400107b4: c6 27 40 00 st %g3, [ %i5 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400107b8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400107bc: 10 bf ff da b 40010724 400107c0: b0 10 20 00 clr %i0 400107c4 : */ rtems_status_code rtems_partition_delete( Objects_Id id ) { 400107c4: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400107c8: 92 10 00 18 mov %i0, %o1 400107cc: 94 07 bf f4 add %fp, -12, %o2 400107d0: 31 10 00 d7 sethi %hi(0x40035c00), %i0 400107d4: 40 00 17 db call 40016740 <_Objects_Get> 400107d8: 90 16 20 70 or %i0, 0x70, %o0 ! 40035c70 <_Partition_Information> register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400107dc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400107e0: 80 a0 60 00 cmp %g1, 0 400107e4: 12 80 00 13 bne 40010830 400107e8: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( the_partition->number_of_used_blocks == 0 ) { 400107ec: c2 02 20 20 ld [ %o0 + 0x20 ], %g1 400107f0: 80 a0 60 00 cmp %g1, 0 400107f4: 02 80 00 14 be 40010844 400107f8: 90 16 20 70 or %i0, 0x70, %o0 400107fc: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010800: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010804: b0 10 20 0c mov 0xc, %i0 40010808: 84 00 bf ff add %g2, -1, %g2 4001080c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010810: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010814: 80 a0 e0 00 cmp %g3, 0 40010818: 12 80 00 22 bne 400108a0 4001081c: 01 00 00 00 nop _Thread_Dispatch(); 40010820: 40 00 1c f0 call 40017be0 <_Thread_Dispatch> 40010824: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010828: 81 c7 e0 08 ret 4001082c: 81 e8 00 00 restore { register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 40010830: 80 a0 60 02 cmp %g1, 2 40010834: 08 bf ff fd bleu 40010828 40010838: b0 10 20 04 mov 4, %i0 4001083c: 81 c7 e0 08 ret <== NOT EXECUTED 40010840: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40010844: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010848: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4001084c: 05 00 00 3f sethi %hi(0xfc00), %g2 40010850: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40010854: 82 08 40 02 and %g1, %g2, %g1 40010858: 80 a0 40 03 cmp %g1, %g3 4001085c: 18 80 00 04 bgu 4001086c 40010860: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 40010864: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40010868: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Partition_Free ( Partition_Control *the_partition ) { _Objects_Free( &_Partition_Information, &the_partition->Object ); 4001086c: 40 00 17 5e call 400165e4 <_Objects_Free> 40010870: c0 22 60 0c clr [ %o1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010874: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010878: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001087c: b0 10 20 00 clr %i0 40010880: 84 00 bf ff add %g2, -1, %g2 40010884: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010888: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4001088c: 80 a0 e0 00 cmp %g3, 0 40010890: 12 80 00 04 bne 400108a0 40010894: 01 00 00 00 nop _Thread_Dispatch(); 40010898: 40 00 1c d2 call 40017be0 <_Thread_Dispatch> 4001089c: 01 00 00 00 nop 400108a0: 81 c7 e0 08 ret 400108a4: 81 e8 00 00 restore 400108a8 : rtems_status_code rtems_partition_get_buffer( Objects_Id id, void **buffer ) { 400108a8: 9d e3 bf 90 save %sp, -112, %sp 400108ac: 92 10 00 18 mov %i0, %o1 register Partition_Control *the_partition; Objects_Locations location; void *the_buffer; if ( !buffer ) 400108b0: 80 a6 60 00 cmp %i1, 0 400108b4: 02 80 00 1a be 4001091c 400108b8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400108bc: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400108c0: 94 07 bf f4 add %fp, -12, %o2 400108c4: 40 00 17 9f call 40016740 <_Objects_Get> 400108c8: 90 12 20 70 or %o0, 0x70, %o0 return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400108cc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400108d0: 80 a0 60 00 cmp %g1, 0 400108d4: 12 80 00 14 bne 40010924 400108d8: b0 10 00 08 mov %o0, %i0 RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer ( Partition_Control *the_partition ) { return _Chain_Get( &the_partition->Memory ); 400108dc: 40 00 11 f2 call 400150a4 <_Chain_Get> 400108e0: 90 02 20 24 add %o0, 0x24, %o0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { 400108e4: a0 92 20 00 orcc %o0, 0, %l0 400108e8: 32 80 00 14 bne,a 40010938 400108ec: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400108f0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400108f4: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400108f8: b0 10 20 0d mov 0xd, %i0 400108fc: 84 00 bf ff add %g2, -1, %g2 40010900: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010904: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010908: 80 a0 e0 00 cmp %g3, 0 4001090c: 12 80 00 04 bne 4001091c 40010910: 01 00 00 00 nop _Thread_Dispatch(); 40010914: 40 00 1c b3 call 40017be0 <_Thread_Dispatch> 40010918: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_UNSATISFIED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001091c: 81 c7 e0 08 ret 40010920: 81 e8 00 00 restore if ( !buffer ) return RTEMS_INVALID_ADDRESS; the_partition = _Partition_Get( id, &location ); switch ( location ) { 40010924: 80 a0 60 02 cmp %g1, 2 40010928: 08 bf ff fd bleu 4001091c 4001092c: b0 10 20 04 mov 4, %i0 40010930: 81 c7 e0 08 ret <== NOT EXECUTED 40010934: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_buffer = _Partition_Allocate_buffer( the_partition ); if ( the_buffer ) { the_partition->number_of_used_blocks += 1; 40010938: 82 00 60 01 inc %g1 4001093c: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010940: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40010944: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010948: 82 00 7f ff add %g1, -1, %g1 4001094c: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40010950: c6 00 a2 f0 ld [ %g2 + 0x2f0 ], %g3 40010954: 80 a0 e0 00 cmp %g3, 0 40010958: 02 80 00 05 be 4001096c 4001095c: 01 00 00 00 nop _Thread_Enable_dispatch(); *buffer = the_buffer; 40010960: e0 26 40 00 st %l0, [ %i1 ] <== NOT EXECUTED 40010964: 81 c7 e0 08 ret 40010968: 91 e8 20 00 restore %g0, 0, %o0 _Thread_Dispatch(); 4001096c: 40 00 1c 9d call 40017be0 <_Thread_Dispatch> 40010970: 01 00 00 00 nop 40010974: 10 bf ff fc b 40010964 40010978: e0 26 40 00 st %l0, [ %i1 ] 400109b0 : rtems_status_code rtems_partition_return_buffer( Objects_Id id, void *buffer ) { 400109b0: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get ( Objects_Id id, Objects_Locations *location ) { return (Partition_Control *) 400109b4: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400109b8: 92 10 00 18 mov %i0, %o1 400109bc: 90 12 20 70 or %o0, 0x70, %o0 400109c0: 40 00 17 60 call 40016740 <_Objects_Get> 400109c4: 94 07 bf f4 add %fp, -12, %o2 register Partition_Control *the_partition; Objects_Locations location; the_partition = _Partition_Get( id, &location ); switch ( location ) { 400109c8: c2 07 bf f4 ld [ %fp + -12 ], %g1 400109cc: 80 a0 60 00 cmp %g1, 0 400109d0: 12 80 00 12 bne 40010a18 400109d4: b0 10 00 08 mov %o0, %i0 ) { void *starting; void *ending; starting = the_partition->starting_address; 400109d8: c4 02 20 10 ld [ %o0 + 0x10 ], %g2 ending = _Addresses_Add_offset( starting, the_partition->length ); return ( 400109dc: 80 a0 80 19 cmp %g2, %i1 400109e0: 28 80 00 13 bleu,a 40010a2c 400109e4: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400109e8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400109ec: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400109f0: 84 00 bf ff add %g2, -1, %g2 400109f4: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 400109f8: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 400109fc: 80 a0 e0 00 cmp %g3, 0 40010a00: 12 80 00 27 bne 40010a9c 40010a04: 01 00 00 00 nop _Thread_Dispatch(); 40010a08: 40 00 1c 76 call 40017be0 <_Thread_Dispatch> 40010a0c: b0 10 20 09 mov 9, %i0 ! 9 40010a10: 81 c7 e0 08 ret 40010a14: 81 e8 00 00 restore 40010a18: 80 a0 60 02 cmp %g1, 2 40010a1c: 08 bf ff fd bleu 40010a10 40010a20: b0 10 20 04 mov 4, %i0 40010a24: 81 c7 e0 08 ret <== NOT EXECUTED 40010a28: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 40010a2c: 82 00 80 01 add %g2, %g1, %g1 40010a30: 80 a0 40 19 cmp %g1, %i1 40010a34: 0a bf ff ed bcs 400109e8 40010a38: 01 00 00 00 nop 40010a3c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1 40010a40: 40 00 58 38 call 40026b20 <.urem> 40010a44: 90 26 40 02 sub %i1, %g2, %o0 40010a48: 80 a2 20 00 cmp %o0, 0 40010a4c: 12 bf ff e7 bne 400109e8 40010a50: 92 10 00 19 mov %i1, %o1 RTEMS_INLINE_ROUTINE void _Partition_Free_buffer ( Partition_Control *the_partition, Chain_Node *the_buffer ) { _Chain_Append( &the_partition->Memory, the_buffer ); 40010a54: 40 00 11 88 call 40015074 <_Chain_Append> 40010a58: 90 06 20 24 add %i0, 0x24, %o0 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) { _Partition_Free_buffer( the_partition, buffer ); the_partition->number_of_used_blocks -= 1; 40010a5c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1 40010a60: 82 00 7f ff add %g1, -1, %g1 40010a64: c2 26 20 20 st %g1, [ %i0 + 0x20 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010a68: 07 10 00 d7 sethi %hi(0x40035c00), %g3 40010a6c: c2 00 e2 f0 ld [ %g3 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010a70: b0 10 20 00 clr %i0 40010a74: 82 00 7f ff add %g1, -1, %g1 40010a78: c2 20 e2 f0 st %g1, [ %g3 + 0x2f0 ] 40010a7c: c4 00 e2 f0 ld [ %g3 + 0x2f0 ], %g2 40010a80: 80 a0 a0 00 cmp %g2, 0 40010a84: 12 80 00 04 bne 40010a94 40010a88: 01 00 00 00 nop _Thread_Dispatch(); 40010a8c: 40 00 1c 55 call 40017be0 <_Thread_Dispatch> 40010a90: 01 00 00 00 nop 40010a94: 81 c7 e0 08 ret 40010a98: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010a9c: 81 c7 e0 08 ret <== NOT EXECUTED 40010aa0: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED 4000f91c : */ rtems_status_code rtems_port_delete( Objects_Id id ) { 4000f91c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get ( Objects_Id id, Objects_Locations *location ) { return (Dual_ported_memory_Control *) 4000f920: 92 10 00 18 mov %i0, %o1 4000f924: 94 07 bf f4 add %fp, -12, %o2 4000f928: 31 10 00 d7 sethi %hi(0x40035c00), %i0 4000f92c: 40 00 1b 85 call 40016740 <_Objects_Get> 4000f930: 90 16 20 24 or %i0, 0x24, %o0 ! 40035c24 <_Dual_ported_memory_Information> register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000f934: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000f938: 80 a0 60 00 cmp %g1, 0 4000f93c: 12 80 00 1a bne 4000f9a4 4000f940: 92 10 00 08 mov %o0, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f944: 90 16 20 24 or %i0, 0x24, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000f948: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000f94c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 4000f950: 05 00 00 3f sethi %hi(0xfc00), %g2 4000f954: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 4000f958: 82 08 40 02 and %g1, %g2, %g1 4000f95c: 80 a0 40 03 cmp %g1, %g3 4000f960: 18 80 00 04 bgu 4000f970 4000f964: 83 28 60 02 sll %g1, 2, %g1 information->local_table[ index ] = the_object; 4000f968: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4000f96c: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Dual_ported_memory_Free ( Dual_ported_memory_Control *the_port ) { _Objects_Free( &_Dual_ported_memory_Information, &the_port->Object ); 4000f970: 40 00 1b 1d call 400165e4 <_Objects_Free> 4000f974: c0 22 60 0c clr [ %o1 + 0xc ] 4000f978: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4000f97c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 4000f980: b0 10 20 00 clr %i0 4000f984: 84 00 bf ff add %g2, -1, %g2 4000f988: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4000f98c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4000f990: 80 a0 e0 00 cmp %g3, 0 4000f994: 02 80 00 0a be 4000f9bc 4000f998: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f99c: 81 c7 e0 08 ret <== NOT EXECUTED 4000f9a0: 81 e8 00 00 restore <== NOT EXECUTED { register Dual_ported_memory_Control *the_port; Objects_Locations location; the_port = _Dual_ported_memory_Get( id, &location ); switch ( location ) { 4000f9a4: 82 18 60 02 xor %g1, 2, %g1 4000f9a8: 80 a0 00 01 cmp %g0, %g1 4000f9ac: 84 60 20 00 subx %g0, 0, %g2 4000f9b0: b0 08 a0 15 and %g2, 0x15, %i0 4000f9b4: 81 c7 e0 08 ret 4000f9b8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000f9bc: 40 00 20 89 call 40017be0 <_Thread_Dispatch> 4000f9c0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000f9c4: 81 c7 e0 08 ret 4000f9c8: 81 e8 00 00 restore 40010cb8 : */ rtems_status_code rtems_rate_monotonic_delete( Objects_Id id ) { 40010cb8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40010cbc: 21 10 00 d7 sethi %hi(0x40035c00), %l0 40010cc0: 92 10 00 18 mov %i0, %o1 40010cc4: 94 07 bf f4 add %fp, -12, %o2 40010cc8: 40 00 16 9e call 40016740 <_Objects_Get> 40010ccc: 90 14 20 bc or %l0, 0xbc, %o0 Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010cd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 40010cd4: 80 a0 60 00 cmp %g1, 0 40010cd8: 12 80 00 20 bne 40010d58 40010cdc: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010ce0: a0 14 20 bc or %l0, 0xbc, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40010ce4: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40010ce8: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40010cec: 05 00 00 3f sethi %hi(0xfc00), %g2 40010cf0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40010cf4: 82 08 40 02 and %g1, %g2, %g1 40010cf8: 80 a0 40 03 cmp %g1, %g3 40010cfc: 38 80 00 06 bgu,a 40010d14 40010d00: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40010d04: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40010d08: 83 28 60 02 sll %g1, 2, %g1 40010d0c: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40010d10: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Rate_monotonic_Information, &the_period->Object ); (void) _Watchdog_Remove( &the_period->Timer ); 40010d14: 40 00 22 7b call 40019700 <_Watchdog_Remove> 40010d18: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Rate_monotonic_Free ( Rate_monotonic_Control *the_period ) { _Objects_Free( &_Rate_monotonic_Information, &the_period->Object ); 40010d1c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_INACTIVE; 40010d20: c0 26 20 38 clr [ %i0 + 0x38 ] 40010d24: 40 00 16 30 call 400165e4 <_Objects_Free> 40010d28: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010d2c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40010d30: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40010d34: b0 10 20 00 clr %i0 40010d38: 84 00 bf ff add %g2, -1, %g2 40010d3c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40010d40: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40010d44: 80 a0 e0 00 cmp %g3, 0 40010d48: 02 80 00 0a be 40010d70 40010d4c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010d50: 81 c7 e0 08 ret <== NOT EXECUTED 40010d54: 81 e8 00 00 restore <== NOT EXECUTED { Rate_monotonic_Control *the_period; Objects_Locations location; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010d58: 82 18 60 02 xor %g1, 2, %g1 40010d5c: 80 a0 00 01 cmp %g0, %g1 40010d60: 84 60 20 00 subx %g0, 0, %g2 40010d64: b0 08 a0 15 and %g2, 0x15, %i0 40010d68: 81 c7 e0 08 ret 40010d6c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40010d70: 40 00 1b 9c call 40017be0 <_Thread_Dispatch> 40010d74: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010d78: 81 c7 e0 08 ret 40010d7c: 81 e8 00 00 restore 4000ff34 : rtems_status_code rtems_rate_monotonic_get_statistics( Objects_Id id, rtems_rate_monotonic_period_statistics *statistics ) { 4000ff34: 9d e3 bf 90 save %sp, -112, %sp 4000ff38: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !statistics ) 4000ff3c: 80 a6 60 00 cmp %i1, 0 4000ff40: 02 80 00 17 be 4000ff9c 4000ff44: b0 10 20 09 mov 9, %i0 4000ff48: 11 10 00 82 sethi %hi(0x40020800), %o0 4000ff4c: 94 07 bf f4 add %fp, -12, %o2 4000ff50: 7f ff ea dc call 4000aac0 <_Objects_Get> 4000ff54: 90 12 23 dc or %o0, 0x3dc, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ff58: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000ff5c: 80 a0 60 00 cmp %g1, 0 4000ff60: 12 80 00 11 bne 4000ffa4 4000ff64: 92 10 00 08 mov %o0, %o1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: *statistics = the_period->Statistics; 4000ff68: 90 10 00 19 mov %i1, %o0 4000ff6c: 92 02 60 54 add %o1, 0x54, %o1 4000ff70: 40 00 09 2b call 4001241c 4000ff74: 94 10 20 38 mov 0x38, %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ff78: 03 10 00 83 sethi %hi(0x40020c00), %g1 4000ff7c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 4000ff80: b0 10 20 00 clr %i0 4000ff84: 84 00 bf ff add %g2, -1, %g2 4000ff88: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 4000ff8c: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 4000ff90: 80 a0 e0 00 cmp %g3, 0 4000ff94: 02 80 00 0a be 4000ffbc 4000ff98: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ff9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000ffa0: 81 e8 00 00 restore <== NOT EXECUTED if ( !statistics ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000ffa4: 82 18 60 02 xor %g1, 2, %g1 4000ffa8: 80 a0 00 01 cmp %g0, %g1 4000ffac: 84 60 20 00 subx %g0, 0, %g2 4000ffb0: b0 08 a0 15 and %g2, 0x15, %i0 4000ffb4: 81 c7 e0 08 ret 4000ffb8: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 4000ffbc: 7f ff ef e9 call 4000bf60 <_Thread_Dispatch> 4000ffc0: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000ffc4: 81 c7 e0 08 ret 4000ffc8: 81 e8 00 00 restore 4000ffcc : rtems_status_code rtems_rate_monotonic_get_status( Objects_Id id, rtems_rate_monotonic_period_status *status ) { 4000ffcc: 9d e3 bf 88 save %sp, -120, %sp 4000ffd0: 92 10 00 18 mov %i0, %o1 Objects_Locations location; Rate_monotonic_Control *the_period; if ( !status ) 4000ffd4: 80 a6 60 00 cmp %i1, 0 4000ffd8: 02 80 00 21 be 4001005c 4000ffdc: b0 10 20 09 mov 9, %i0 4000ffe0: 11 10 00 82 sethi %hi(0x40020800), %o0 4000ffe4: 94 07 bf f4 add %fp, -12, %o2 4000ffe8: 7f ff ea b6 call 4000aac0 <_Objects_Get> 4000ffec: 90 12 23 dc or %o0, 0x3dc, %o0 return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 4000fff0: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000fff4: 80 a0 60 00 cmp %g1, 0 4000fff8: 12 80 00 1b bne 40010064 4000fffc: b0 10 00 08 mov %o0, %i0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 40010000: c2 02 20 50 ld [ %o0 + 0x50 ], %g1 40010004: 80 a0 60 00 cmp %g1, 0 40010008: 02 80 00 03 be 40010014 4001000c: 84 10 20 00 clr %g2 40010010: c4 00 60 08 ld [ %g1 + 8 ], %g2 status->state = the_period->state; 40010014: c2 06 20 38 ld [ %i0 + 0x38 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); 40010018: c4 26 40 00 st %g2, [ %i1 ] status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { 4001001c: 80 a0 60 00 cmp %g1, 0 40010020: 12 80 00 1b bne 4001008c 40010024: c2 26 60 04 st %g1, [ %i1 + 4 ] #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; status->executed_since_last_period.tv_nsec = 0; 40010028: c0 26 60 14 clr [ %i1 + 0x14 ] <== NOT EXECUTED status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0); status->state = the_period->state; if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS status->since_last_period.tv_sec = 0; 4001002c: c0 26 60 08 clr [ %i1 + 8 ] <== NOT EXECUTED status->since_last_period.tv_nsec = 0; 40010030: c0 26 60 0c clr [ %i1 + 0xc ] <== NOT EXECUTED #else status->ticks_since_last_period = 0; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS status->executed_since_last_period.tv_sec = 0; 40010034: c0 26 60 10 clr [ %i1 + 0x10 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40010038: 03 10 00 83 sethi %hi(0x40020c00), %g1 4001003c: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40010040: b0 10 20 00 clr %i0 40010044: 84 00 bf ff add %g2, -1, %g2 40010048: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 4001004c: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40010050: 80 a0 e0 00 cmp %g3, 0 40010054: 02 80 00 0a be 4001007c 40010058: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001005c: 81 c7 e0 08 ret <== NOT EXECUTED 40010060: 81 e8 00 00 restore <== NOT EXECUTED if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40010064: 82 18 60 02 xor %g1, 2, %g1 <== NOT EXECUTED 40010068: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4001006c: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 40010070: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 40010074: 81 c7 e0 08 ret <== NOT EXECUTED 40010078: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4001007c: 7f ff ef b9 call 4000bf60 <_Thread_Dispatch> 40010080: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40010084: 81 c7 e0 08 ret 40010088: 81 e8 00 00 restore * This lets them share one single invocation of _TOD_Get_uptime(). */ #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) struct timespec uptime; _TOD_Get_uptime( &uptime ); 4001008c: a0 07 bf ec add %fp, -20, %l0 40010090: 7f ff e7 3e call 40009d88 <_TOD_Get_uptime> 40010094: 90 10 00 10 mov %l0, %o0 #endif #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS _Timespec_Subtract( 40010098: 90 06 20 44 add %i0, 0x44, %o0 4001009c: 92 10 00 10 mov %l0, %o1 400100a0: 7f ff f4 6b call 4000d24c <_Timespec_Subtract> 400100a4: 94 06 60 08 add %i1, 8, %o2 status->ticks_since_last_period = _Watchdog_Ticks_since_boot - the_period->time_at_period; #endif #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS _Timespec_Subtract( 400100a8: 92 10 00 10 mov %l0, %o1 400100ac: 94 06 60 10 add %i1, 0x10, %o2 400100b0: 11 10 00 83 sethi %hi(0x40020c00), %o0 400100b4: 7f ff f4 66 call 4000d24c <_Timespec_Subtract> 400100b8: 90 12 22 54 or %o0, 0x254, %o0 ! 40020e54 <_Thread_Time_of_last_context_switch> 400100bc: 30 bf ff df b,a 40010038 40007d54 : rtems_status_code rtems_rate_monotonic_period( Objects_Id id, rtems_interval length ) { 40007d54: 9d e3 bf 80 save %sp, -128, %sp RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get ( Objects_Id id, Objects_Locations *location ) { return (Rate_monotonic_Control *) 40007d58: 11 10 00 82 sethi %hi(0x40020800), %o0 40007d5c: 92 10 00 18 mov %i0, %o1 40007d60: 90 12 23 dc or %o0, 0x3dc, %o0 40007d64: 40 00 0b 57 call 4000aac0 <_Objects_Get> 40007d68: 94 07 bf f4 add %fp, -12, %o2 rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007d6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007d70: 80 a0 60 00 cmp %g1, 0 40007d74: 12 80 00 15 bne 40007dc8 40007d78: a2 10 00 08 mov %o0, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Thread_Is_executing( the_period->owner ) ) { 40007d7c: 25 10 00 83 sethi %hi(0x40020c00), %l2 40007d80: c4 02 20 50 ld [ %o0 + 0x50 ], %g2 40007d84: c2 04 a2 4c ld [ %l2 + 0x24c ], %g1 40007d88: 80 a0 80 01 cmp %g2, %g1 40007d8c: 02 80 00 14 be 40007ddc 40007d90: 80 a6 60 00 cmp %i1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d94: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007d98: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007d9c: b0 10 20 17 mov 0x17, %i0 _Thread_Dispatch(); 40007da0: 84 00 bf ff add %g2, -1, %g2 40007da4: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 40007da8: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40007dac: 80 a0 e0 00 cmp %g3, 0 40007db0: 12 80 00 66 bne 40007f48 40007db4: 01 00 00 00 nop 40007db8: 40 00 10 6a call 4000bf60 <_Thread_Dispatch> 40007dbc: 01 00 00 00 nop 40007dc0: 81 c7 e0 08 ret 40007dc4: 81 e8 00 00 restore rtems_status_code return_value; rtems_rate_monotonic_period_states local_state; ISR_Level level; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 40007dc8: 80 a0 60 02 cmp %g1, 2 40007dcc: 02 bf ff fd be 40007dc0 40007dd0: b0 10 20 04 mov 4, %i0 break; } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007dd4: 81 c7 e0 08 ret <== NOT EXECUTED 40007dd8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED if ( !_Thread_Is_executing( the_period->owner ) ) { _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { 40007ddc: 22 80 00 73 be,a 40007fa8 40007de0: d0 02 20 38 ld [ %o0 + 0x38 ], %o0 } _Thread_Enable_dispatch(); return( return_value ); } _ISR_Disable( level ); 40007de4: 7f ff eb 73 call 40002bb0 40007de8: 01 00 00 00 nop 40007dec: a0 10 00 08 mov %o0, %l0 switch ( the_period->state ) { 40007df0: e6 04 60 38 ld [ %l1 + 0x38 ], %l3 40007df4: 80 a4 e0 02 cmp %l3, 2 40007df8: 02 80 00 34 be 40007ec8 40007dfc: 80 a4 e0 04 cmp %l3, 4 40007e00: 02 80 00 54 be 40007f50 40007e04: 80 a4 e0 00 cmp %l3, 0 40007e08: 32 bf ff ee bne,a 40007dc0 40007e0c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED /* * No need to update statistics -- there are not a period active */ _ISR_Enable( level ); 40007e10: 7f ff eb 6c call 40002bc0 40007e14: a0 07 bf ec add %fp, -20, %l0 #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) || \ defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) _TOD_Get_uptime( &uptime ); 40007e18: 40 00 07 dc call 40009d88 <_TOD_Get_uptime> 40007e1c: 90 10 00 10 mov %l0, %o0 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e20: c2 07 bf ec ld [ %fp + -20 ], %g1 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e24: c6 04 a2 4c ld [ %l2 + 0x24c ], %g3 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e28: c2 24 60 44 st %g1, [ %l1 + 0x44 ] 40007e2c: c2 07 bf f0 ld [ %fp + -16 ], %g1 the_period->owner_executed_at_period = _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e30: 92 10 00 10 mov %l0, %o1 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS /* * Since the statistics didn't update the starting time, * we do it here. */ the_period->time_at_period = uptime; 40007e34: c2 24 60 48 st %g1, [ %l1 + 0x48 ] #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e38: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e3c: a0 07 bf e4 add %fp, -28, %l0 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e40: c4 24 60 3c st %g2, [ %l1 + 0x3c ] 40007e44: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1 _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e48: 94 10 00 10 mov %l0, %o2 #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS { struct timespec ran; the_period->owner_executed_at_period = 40007e4c: c2 24 60 40 st %g1, [ %l1 + 0x40 ] _Thread_Executing->cpu_time_used; /* How much time time since last context switch */ _Timespec_Subtract( 40007e50: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007e54: 40 00 14 fe call 4000d24c <_Timespec_Subtract> 40007e58: 90 12 22 54 or %o0, 0x254, %o0 ! 40020e54 <_Thread_Time_of_last_context_switch> /* The thread had executed before the last context switch also. * * the_period->owner_executed_at_period += ran */ _Timespec_Add_to( &the_period->owner_executed_at_period, &ran ); 40007e5c: 92 10 00 10 mov %l0, %o1 40007e60: 40 00 14 98 call 4000d0c0 <_Timespec_Add_to> 40007e64: 90 04 60 3c add %l1, 0x3c, %o0 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 40007e68: 84 10 20 02 mov 2, %g2 Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007e6c: 03 10 00 20 sethi %hi(0x40008000), %g1 40007e70: 82 10 63 7c or %g1, 0x37c, %g1 ! 4000837c <_Rate_monotonic_Timeout> the_watchdog->id = id; 40007e74: f0 24 60 30 st %i0, [ %l1 + 0x30 ] Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007e78: f2 24 60 1c st %i1, [ %l1 + 0x1c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40007e7c: c0 24 60 18 clr [ %l1 + 0x18 ] the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 40007e80: c0 24 60 34 clr [ %l1 + 0x34 ] _Rate_monotonic_Timeout, id, NULL ); the_period->next_length = length; 40007e84: f2 24 60 4c st %i1, [ %l1 + 0x4c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007e88: 92 04 60 10 add %l1, 0x10, %o1 #else the_period->owner_ticks_executed_at_period = _Thread_Executing->ticks_executed; #endif the_period->state = RATE_MONOTONIC_ACTIVE; 40007e8c: c4 24 60 38 st %g2, [ %l1 + 0x38 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40007e90: c2 24 60 2c st %g1, [ %l1 + 0x2c ] ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007e94: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007e98: 40 00 15 b8 call 4000d578 <_Watchdog_Insert> 40007e9c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007ea0: 05 10 00 83 sethi %hi(0x40020c00), %g2 40007ea4: c2 00 a1 70 ld [ %g2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40007ea8: 82 00 7f ff add %g1, -1, %g1 40007eac: c2 20 a1 70 st %g1, [ %g2 + 0x170 ] 40007eb0: c6 00 a1 70 ld [ %g2 + 0x170 ], %g3 40007eb4: 80 a0 e0 00 cmp %g3, 0 40007eb8: 02 80 00 22 be 40007f40 40007ebc: 01 00 00 00 nop _Thread_Dispatch(); 40007ec0: 81 c7 e0 08 ret <== NOT EXECUTED 40007ec4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED case RATE_MONOTONIC_ACTIVE: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007ec8: 7f ff ff 43 call 40007bd4 <_Rate_monotonic_Update_statistics> 40007ecc: 90 10 00 11 mov %l1, %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; 40007ed0: 82 10 20 01 mov 1, %g1 the_period->next_length = length; 40007ed4: f2 24 60 4c st %i1, [ %l1 + 0x4c ] * 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; 40007ed8: c2 24 60 38 st %g1, [ %l1 + 0x38 ] the_period->next_length = length; _ISR_Enable( level ); 40007edc: 7f ff eb 39 call 40002bc0 40007ee0: 90 10 00 10 mov %l0, %o0 _Thread_Executing->Wait.id = the_period->Object.id; 40007ee4: c2 04 a2 4c ld [ %l2 + 0x24c ], %g1 40007ee8: c4 04 60 08 ld [ %l1 + 8 ], %g2 _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007eec: 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; 40007ef0: c4 20 60 20 st %g2, [ %g1 + 0x20 ] _Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007ef4: 40 00 13 41 call 4000cbf8 <_Thread_Set_state> 40007ef8: 13 00 00 10 sethi %hi(0x4000), %o1 /* * Did the watchdog timer expire while we were actually blocking * on it? */ _ISR_Disable( level ); 40007efc: 7f ff eb 2d call 40002bb0 40007f00: 01 00 00 00 nop local_state = the_period->state; 40007f04: e0 04 60 38 ld [ %l1 + 0x38 ], %l0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007f08: e6 24 60 38 st %l3, [ %l1 + 0x38 ] _ISR_Enable( level ); 40007f0c: 7f ff eb 2d call 40002bc0 40007f10: 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 ) 40007f14: 80 a4 20 03 cmp %l0, 3 40007f18: 02 80 00 32 be 40007fe0 40007f1c: d0 04 a2 4c ld [ %l2 + 0x24c ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007f20: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007f24: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007f28: 84 00 bf ff add %g2, -1, %g2 40007f2c: c4 20 61 70 st %g2, [ %g1 + 0x170 ] 40007f30: c6 00 61 70 ld [ %g1 + 0x170 ], %g3 40007f34: 80 a0 e0 00 cmp %g3, 0 40007f38: 12 bf ff e2 bne 40007ec0 40007f3c: 01 00 00 00 nop _Thread_Dispatch(); 40007f40: 40 00 10 08 call 4000bf60 <_Thread_Dispatch> 40007f44: b0 10 20 00 clr %i0 ! 0 40007f48: 81 c7 e0 08 ret 40007f4c: 81 e8 00 00 restore case RATE_MONOTONIC_EXPIRED: /* * Update statistics from the concluding period */ _Rate_monotonic_Update_statistics( the_period ); 40007f50: 7f ff ff 21 call 40007bd4 <_Rate_monotonic_Update_statistics> 40007f54: 90 10 00 11 mov %l1, %o0 _ISR_Enable( level ); 40007f58: 7f ff eb 1a call 40002bc0 40007f5c: 90 10 00 10 mov %l0, %o0 the_period->state = RATE_MONOTONIC_ACTIVE; 40007f60: 82 10 20 02 mov 2, %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40007f64: f2 24 60 1c st %i1, [ %l1 + 0x1c ] the_period->next_length = length; 40007f68: f2 24 60 4c st %i1, [ %l1 + 0x4c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40007f6c: 92 04 60 10 add %l1, 0x10, %o1 */ _Rate_monotonic_Update_statistics( the_period ); _ISR_Enable( level ); the_period->state = RATE_MONOTONIC_ACTIVE; 40007f70: c2 24 60 38 st %g1, [ %l1 + 0x38 ] 40007f74: 11 10 00 83 sethi %hi(0x40020c00), %o0 40007f78: 40 00 15 80 call 4000d578 <_Watchdog_Insert> 40007f7c: 90 12 22 6c or %o0, 0x26c, %o0 ! 40020e6c <_Watchdog_Ticks_chain> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007f80: 07 10 00 83 sethi %hi(0x40020c00), %g3 40007f84: c2 00 e1 70 ld [ %g3 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40007f88: b0 10 20 06 mov 6, %i0 40007f8c: 82 00 7f ff add %g1, -1, %g1 40007f90: c2 20 e1 70 st %g1, [ %g3 + 0x170 ] 40007f94: c4 00 e1 70 ld [ %g3 + 0x170 ], %g2 40007f98: 80 a0 a0 00 cmp %g2, 0 40007f9c: 02 bf ff 87 be 40007db8 40007fa0: 01 00 00 00 nop 40007fa4: 30 bf ff e9 b,a 40007f48 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_OWNER_OF_RESOURCE; } if ( length == RTEMS_PERIOD_STATUS ) { switch ( the_period->state ) { 40007fa8: 80 a2 20 02 cmp %o0, 2 40007fac: 02 80 00 09 be 40007fd0 40007fb0: b0 10 20 00 clr %i0 40007fb4: 80 a2 20 04 cmp %o0, 4 40007fb8: 02 80 00 06 be 40007fd0 40007fbc: b0 10 20 06 mov 6, %i0 40007fc0: 80 a2 20 00 cmp %o0, 0 40007fc4: 02 80 00 03 be 40007fd0 40007fc8: b0 10 20 0b mov 0xb, %i0 40007fcc: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40007fd0: 03 10 00 83 sethi %hi(0x40020c00), %g1 40007fd4: c4 00 61 70 ld [ %g1 + 0x170 ], %g2 ! 40020d70 <_Thread_Dispatch_disable_level> 40007fd8: 10 bf ff 73 b 40007da4 40007fdc: 84 00 bf ff add %g2, -1, %g2 * If it did, then we want to unblock ourself and continue as * if nothing happen. The period was reset in the timeout routine. */ if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING ) _Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD ); 40007fe0: 40 00 0f 2b call 4000bc8c <_Thread_Clear_state> <== NOT EXECUTED 40007fe4: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED 40007fe8: 30 bf ff ce b,a 40007f20 <== NOT EXECUTED 40007fec : */ void rtems_rate_monotonic_report_statistics_with_plugin( void *context, rtems_printk_plugin_t print ) { 40007fec: 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 ) 40007ff0: 80 a6 60 00 cmp %i1, 0 40007ff4: 02 80 00 4e be 4000812c 40007ff8: 90 10 00 18 mov %i0, %o0 return; (*print)( context, "Period information by period\n" ); 40007ffc: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008000: 9f c6 40 00 call %i1 40008004: 92 12 61 88 or %o1, 0x188, %o1 ! 4001e188 #if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS) (*print)( context, "--- CPU times are in seconds ---\n" ); 40008008: 90 10 00 18 mov %i0, %o0 4000800c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008010: 9f c6 40 00 call %i1 40008014: 92 12 61 a8 or %o1, 0x1a8, %o1 ! 4001e1a8 #endif #if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS) (*print)( context, "--- Wall times are in seconds ---\n" ); 40008018: 90 10 00 18 mov %i0, %o0 4000801c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008020: 9f c6 40 00 call %i1 40008024: 92 12 61 d0 or %o1, 0x1d0, %o1 ! 4001e1d0 Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED " 40008028: 90 10 00 18 mov %i0, %o0 4000802c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008030: 9f c6 40 00 call %i1 40008034: 92 12 61 f8 or %o1, 0x1f8, %o1 ! 4001e1f8 #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS " " #endif " WALL TIME\n" ); (*print)( context, " " 40008038: 90 10 00 18 mov %i0, %o0 4000803c: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008040: 9f c6 40 00 call %i1 40008044: 92 12 62 48 or %o1, 0x248, %o1 ! 4001e248 /* * 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 ; 40008048: 03 10 00 82 sethi %hi(0x40020800), %g1 4000804c: a6 10 63 dc or %g1, 0x3dc, %l3 ! 40020bdc <_Rate_monotonic_Information> 40008050: e4 04 e0 08 ld [ %l3 + 8 ], %l2 id <= _Rate_monotonic_Information.maximum_id ; 40008054: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40008058: 80 a4 80 01 cmp %l2, %g1 4000805c: 18 80 00 34 bgu 4000812c 40008060: 03 10 00 78 sethi %hi(0x4001e000), %g1 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 40008064: 05 10 00 78 sethi %hi(0x4001e000), %g2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40008068: b6 10 62 98 or %g1, 0x298, %i3 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { (*print)( context, "\n" ); 4000806c: b8 10 a1 c8 or %g2, 0x1c8, %i4 40008070: a8 07 bf 98 add %fp, -104, %l4 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 ); 40008074: aa 07 bf d0 add %fp, -48, %l5 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40008078: ba 07 bf b0 add %fp, -80, %i5 4000807c: ac 07 bf e8 add %fp, -24, %l6 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40008080: b4 07 bf c8 add %fp, -56, %i2 40008084: 10 80 00 06 b 4000809c 40008088: ae 07 bf f3 add %fp, -13, %l7 * 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++ ) { 4000808c: a4 04 a0 01 inc %l2 /* * 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 ; 40008090: 80 a0 40 12 cmp %g1, %l2 40008094: 0a 80 00 26 bcs 4000812c 40008098: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_get_statistics( id, &the_stats ); 4000809c: 90 10 00 12 mov %l2, %o0 400080a0: 40 00 1f a5 call 4000ff34 400080a4: 92 10 00 14 mov %l4, %o1 if ( status != RTEMS_SUCCESSFUL ) 400080a8: 80 a2 20 00 cmp %o0, 0 400080ac: 32 bf ff f8 bne,a 4000808c 400080b0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); 400080b4: 92 10 00 15 mov %l5, %o1 400080b8: 40 00 1f c5 call 4000ffcc 400080bc: 90 10 00 12 mov %l2, %o0 if ( status != RTEMS_SUCCESSFUL ) 400080c0: 80 a2 20 00 cmp %o0, 0 400080c4: 32 bf ff f2 bne,a 4000808c 400080c8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED continue; name[ 0 ] = '\0'; if ( the_status.owner ) { 400080cc: d0 07 bf d0 ld [ %fp + -48 ], %o0 /* If the above passed, so should this but check it anyway */ status = rtems_rate_monotonic_get_status( id, &the_status ); if ( status != RTEMS_SUCCESSFUL ) continue; name[ 0 ] = '\0'; 400080d0: c0 2f bf f3 clrb [ %fp + -13 ] if ( the_status.owner ) { 400080d4: 80 a2 20 00 cmp %o0, 0 400080d8: 12 80 00 4b bne 40008204 400080dc: a0 10 00 17 mov %l7, %l0 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 400080e0: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED 400080e4: 94 10 00 12 mov %l2, %o2 400080e8: 92 10 00 1b mov %i3, %o1 400080ec: 96 10 00 10 mov %l0, %o3 400080f0: 9f c6 40 00 call %i1 400080f4: 90 10 00 18 mov %i0, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 400080f8: c2 07 bf 98 ld [ %fp + -104 ], %g1 */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 400080fc: 94 10 00 16 mov %l6, %o2 40008100: 90 10 00 1d mov %i5, %o0 /* * If the count is zero, don't print statistics */ if (the_stats.count == 0) { 40008104: 80 a0 60 00 cmp %g1, 0 40008108: 12 80 00 0b bne 40008134 4000810c: 92 10 00 1c mov %i4, %o1 (*print)( context, "\n" ); 40008110: 9f c6 40 00 call %i1 40008114: 90 10 00 18 mov %i0, %o0 /* * 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 ; 40008118: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 id++ ) { 4000811c: a4 04 a0 01 inc %l2 /* * 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 ; 40008120: 80 a0 40 12 cmp %g1, %l2 40008124: 1a bf ff df bcc 400080a0 40008128: 90 10 00 12 mov %l2, %o0 4000812c: 81 c7 e0 08 ret 40008130: 81 e8 00 00 restore */ { #ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS struct timespec cpu_average; _Timespec_Divide_by_integer( 40008134: 40 00 13 fd call 4000d128 <_Timespec_Divide_by_integer> 40008138: 92 10 00 01 mov %g1, %o1 &the_stats.total_cpu_time, the_stats.count, &cpu_average ); (*print)( context, 4000813c: d0 07 bf a4 ld [ %fp + -92 ], %o0 40008140: 40 00 49 c8 call 4001a860 <.div> 40008144: 92 10 23 e8 mov 0x3e8, %o1 40008148: a2 10 00 08 mov %o0, %l1 4000814c: d0 07 bf ac ld [ %fp + -84 ], %o0 40008150: 40 00 49 c4 call 4001a860 <.div> 40008154: 92 10 23 e8 mov 0x3e8, %o1 40008158: c2 07 bf e8 ld [ %fp + -24 ], %g1 4000815c: a0 10 00 08 mov %o0, %l0 40008160: d0 07 bf ec ld [ %fp + -20 ], %o0 40008164: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 40008168: 40 00 49 be call 4001a860 <.div> 4000816c: 92 10 23 e8 mov 0x3e8, %o1 40008170: d8 07 bf a8 ld [ %fp + -88 ], %o4 40008174: d4 07 bf a0 ld [ %fp + -96 ], %o2 40008178: 96 10 00 11 mov %l1, %o3 4000817c: 9a 10 00 10 mov %l0, %o5 40008180: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 40008184: 13 10 00 78 sethi %hi(0x4001e000), %o1 40008188: 90 10 00 18 mov %i0, %o0 4000818c: 9f c6 40 00 call %i1 40008190: 92 12 62 b0 or %o1, 0x2b0, %o1 * print Wall time part of statistics */ { #ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS struct timespec wall_average; _Timespec_Divide_by_integer( 40008194: d2 07 bf 98 ld [ %fp + -104 ], %o1 40008198: 94 10 00 16 mov %l6, %o2 4000819c: 40 00 13 e3 call 4000d128 <_Timespec_Divide_by_integer> 400081a0: 90 10 00 1a mov %i2, %o0 &the_stats.total_wall_time, the_stats.count, &wall_average ); (*print)( context, 400081a4: d0 07 bf bc ld [ %fp + -68 ], %o0 400081a8: 40 00 49 ae call 4001a860 <.div> 400081ac: 92 10 23 e8 mov 0x3e8, %o1 400081b0: a2 10 00 08 mov %o0, %l1 400081b4: d0 07 bf c4 ld [ %fp + -60 ], %o0 400081b8: 40 00 49 aa call 4001a860 <.div> 400081bc: 92 10 23 e8 mov 0x3e8, %o1 400081c0: c2 07 bf e8 ld [ %fp + -24 ], %g1 400081c4: a0 10 00 08 mov %o0, %l0 400081c8: d0 07 bf ec ld [ %fp + -20 ], %o0 400081cc: c2 23 a0 5c st %g1, [ %sp + 0x5c ] 400081d0: 40 00 49 a4 call 4001a860 <.div> 400081d4: 92 10 23 e8 mov 0x3e8, %o1 400081d8: d4 07 bf b8 ld [ %fp + -72 ], %o2 400081dc: d8 07 bf c0 ld [ %fp + -64 ], %o4 400081e0: d0 23 a0 60 st %o0, [ %sp + 0x60 ] 400081e4: 96 10 00 11 mov %l1, %o3 400081e8: 9a 10 00 10 mov %l0, %o5 400081ec: 90 10 00 18 mov %i0, %o0 400081f0: 13 10 00 78 sethi %hi(0x4001e000), %o1 400081f4: 9f c6 40 00 call %i1 400081f8: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 4001e2d0 /* * 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 ; 400081fc: 10 bf ff a4 b 4000808c 40008200: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 continue; name[ 0 ] = '\0'; if ( the_status.owner ) { rtems_object_get_name( the_status.owner, sizeof(name), name ); 40008204: 92 10 20 05 mov 5, %o1 40008208: 40 00 00 8f call 40008444 4000820c: 94 10 00 17 mov %l7, %o2 /* * Print part of report line that is not dependent on granularity */ (*print)( context, 40008210: 10 bf ff b5 b 400080e4 40008214: d8 1f bf 98 ldd [ %fp + -104 ], %o4 40008234 : /* * rtems_rate_monotonic_reset_all_statistics */ void rtems_rate_monotonic_reset_all_statistics( void ) { 40008234: 9d e3 bf 98 save %sp, -104, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008238: 25 10 00 83 sethi %hi(0x40020c00), %l2 4000823c: c2 04 a1 70 ld [ %l2 + 0x170 ], %g1 ! 40020d70 <_Thread_Dispatch_disable_level> 40008240: 82 00 60 01 inc %g1 40008244: c2 24 a1 70 st %g1, [ %l2 + 0x170 ] /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; 40008248: 03 10 00 82 sethi %hi(0x40020800), %g1 4000824c: a2 10 63 dc or %g1, 0x3dc, %l1 ! 40020bdc <_Rate_monotonic_Information> 40008250: e0 04 60 08 ld [ %l1 + 8 ], %l0 id <= _Rate_monotonic_Information.maximum_id ; 40008254: c2 04 60 0c ld [ %l1 + 0xc ], %g1 40008258: 80 a4 00 01 cmp %l0, %g1 4000825c: 18 80 00 09 bgu 40008280 40008260: 01 00 00 00 nop id++ ) { status = rtems_rate_monotonic_reset_statistics( id ); 40008264: 40 00 00 13 call 400082b0 40008268: 90 10 00 10 mov %l0, %o0 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 4000826c: c2 04 60 0c ld [ %l1 + 0xc ], %g1 id++ ) { 40008270: a0 04 20 01 inc %l0 /* * Cycle through all possible ids and try to reset each one. If it * is a period that is inactive, we just get an error back. No big deal. */ for ( id=_Rate_monotonic_Information.minimum_id ; id <= _Rate_monotonic_Information.maximum_id ; 40008274: 80 a0 40 10 cmp %g1, %l0 40008278: 1a bf ff fb bcc 40008264 4000827c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008280: c2 04 a1 70 ld [ %l2 + 0x170 ], %g1 40008284: 82 00 7f ff add %g1, -1, %g1 40008288: c2 24 a1 70 st %g1, [ %l2 + 0x170 ] 4000828c: c4 04 a1 70 ld [ %l2 + 0x170 ], %g2 40008290: 80 a0 a0 00 cmp %g2, 0 40008294: 02 80 00 04 be 400082a4 40008298: 01 00 00 00 nop 4000829c: 81 c7 e0 08 ret <== NOT EXECUTED 400082a0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400082a4: 40 00 0f 2f call 4000bf60 <_Thread_Dispatch> 400082a8: 81 e8 00 00 restore 400082ac: 01 00 00 00 nop 40011298 : uint32_t length, uint32_t page_size, rtems_attribute attribute_set, Objects_Id *id ) { 40011298: 9d e3 bf 98 save %sp, -104, %sp Region_Control *the_region; if ( !rtems_is_name_valid( name ) ) 4001129c: a8 96 20 00 orcc %i0, 0, %l4 400112a0: 02 80 00 58 be 40011400 400112a4: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !starting_address ) 400112a8: 80 a6 60 00 cmp %i1, 0 400112ac: 02 80 00 06 be 400112c4 400112b0: 80 a7 60 00 cmp %i5, 0 return RTEMS_INVALID_ADDRESS; if ( !id ) 400112b4: 02 80 00 04 be 400112c4 400112b8: 80 8e 60 07 btst 7, %i1 return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) 400112bc: 02 80 00 04 be 400112cc 400112c0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400112c4: 81 c7 e0 08 ret 400112c8: 91 e8 20 09 restore %g0, 9, %o0 return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 400112cc: 7f ff e6 8f call 4000ad08 400112d0: 01 00 00 00 nop 400112d4: a2 10 00 08 mov %o0, %l1 400112d8: 25 10 00 d7 sethi %hi(0x40035c00), %l2 400112dc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400112e0: 80 a0 60 00 cmp %g1, 0 400112e4: 02 80 00 0b be 40011310 400112e8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400112ec: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 400112f0: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 400112f4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400112f8: 08 80 00 05 bleu 4001130c <== NOT EXECUTED 400112fc: 90 10 20 00 clr %o0 <== NOT EXECUTED 40011300: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011304: 40 00 13 7d call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011308: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001130c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40011310: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011314: c6 00 63 cc ld [ %g1 + 0x3cc ], %g3 40011318: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 4001131c: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011320: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011324: 80 a0 60 00 cmp %g1, 0 40011328: 22 80 00 12 be,a 40011370 4001132c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011330: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011334: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011338: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 4001133c: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011340: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011344: c6 24 20 6c st %g3, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011348: 80 a0 a0 02 cmp %g2, 2 4001134c: 12 80 00 2f bne 40011408 40011350: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011354: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40011358: 82 00 60 01 inc %g1 4001135c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011360: 7f ff e6 6e call 4000ad18 40011364: 90 10 00 11 mov %l1, %o0 * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 40011368: 10 80 00 0f b 400113a4 4001136c: 23 10 00 d7 sethi %hi(0x40035c00), %l1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011370: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40011374: 32 80 00 48 bne,a 40011494 <== NOT EXECUTED 40011378: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4001137c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011384: 12 80 00 41 bne 40011488 <== NOT EXECUTED 40011388: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 4001138c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011390: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011394: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011398: 7f ff e6 60 call 4000ad18 <== NOT EXECUTED 4001139c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400113a0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED 400113a4: 40 00 13 82 call 400161ac <_Objects_Allocate> 400113a8: 90 14 61 08 or %l1, 0x108, %o0 ! 40035d08 <_Region_Information> the_region = _Region_Allocate(); if ( !the_region ) { 400113ac: a0 92 20 00 orcc %o0, 0, %l0 400113b0: 32 80 00 4e bne,a 400114e8 400113b4: 90 04 20 68 add %l0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400113b8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400113bc: 82 00 60 01 inc %g1 400113c0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400113c4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400113c8: 94 10 20 00 clr %o2 400113cc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400113d0: 40 00 10 d1 call 40015714 <_CORE_mutex_Surrender> 400113d4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400113d8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400113dc: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 400113e0: 82 00 7f ff add %g1, -1, %g1 400113e4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 400113e8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 400113ec: 80 a0 a0 00 cmp %g2, 0 400113f0: 12 80 00 04 bne 40011400 400113f4: 01 00 00 00 nop 400113f8: 40 00 19 fa call 40017be0 <_Thread_Dispatch> 400113fc: 01 00 00 00 nop 40011400: 81 c7 e0 08 ret 40011404: 81 e8 00 00 restore if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011408: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 4001140c: 12 bf ff d5 bne 40011360 <== NOT EXECUTED 40011410: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011414: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; 40011418: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2 <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 4001141c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011420: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011424: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED current = executing->current_priority; if ( current == ceiling ) { 40011428: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001142c: 02 80 00 4e be 40011564 <== NOT EXECUTED 40011430: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011434: 1a 80 00 42 bcc 4001153c <== NOT EXECUTED 40011438: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001143c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011440: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011444: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011448: 7f ff e6 34 call 4000ad18 <== NOT EXECUTED 4001144c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011450: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011454: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011458: 40 00 18 be call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 4001145c: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011460: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011464: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011468: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 4001146c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 40011470: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011474: 12 bf ff cc bne 400113a4 <== NOT EXECUTED 40011478: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED _Thread_Dispatch(); 4001147c: 40 00 19 d9 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011480: 01 00 00 00 nop <== NOT EXECUTED 40011484: 30 bf ff c8 b,a 400113a4 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011488: 02 80 00 13 be 400114d4 <== NOT EXECUTED 4001148c: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !_Addresses_Is_aligned( starting_address ) ) return RTEMS_INVALID_ADDRESS; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011490: c4 04 20 08 ld [ %l0 + 8 ], %g2 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011494: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011498: c4 20 e0 20 st %g2, [ %g3 + 0x20 ] <== NOT EXECUTED 4001149c: 82 00 60 01 inc %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 400114a0: 84 10 20 01 mov 1, %g2 <== NOT EXECUTED 400114a4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400114a8: c4 24 20 40 st %g2, [ %l0 + 0x40 ] <== NOT EXECUTED 400114ac: 82 04 20 10 add %l0, 0x10, %g1 <== NOT EXECUTED 400114b0: c2 20 e0 44 st %g1, [ %g3 + 0x44 ] <== NOT EXECUTED 400114b4: 7f ff e6 19 call 4000ad18 <== NOT EXECUTED 400114b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400114bc: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400114c0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400114c4: 40 00 10 70 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 400114c8: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 400114cc: 10 bf ff b6 b 400113a4 <== NOT EXECUTED 400114d0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400114d4: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400114d8: 7f ff e6 10 call 4000ad18 <== NOT EXECUTED 400114dc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400114e0: 10 bf ff b1 b 400113a4 <== NOT EXECUTED 400114e4: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED if ( !the_region ) { _RTEMS_Unlock_allocator(); return RTEMS_TOO_MANY; } the_region->maximum_segment_size = 400114e8: 92 10 00 19 mov %i1, %o1 400114ec: 94 10 00 1a mov %i2, %o2 400114f0: 40 00 12 b5 call 40015fc4 <_Heap_Initialize> 400114f4: 96 10 00 1b mov %i3, %o3 _Heap_Initialize(&the_region->Memory, starting_address, length, page_size); if ( !the_region->maximum_segment_size ) { 400114f8: 80 a2 20 00 cmp %o0, 0 400114fc: 12 80 00 1e bne 40011574 40011500: d0 24 20 5c st %o0, [ %l0 + 0x5c ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 40011504: 90 14 61 08 or %l1, 0x108, %o0 40011508: 40 00 14 37 call 400165e4 <_Objects_Free> 4001150c: 92 10 00 10 mov %l0, %o1 40011510: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011514: 82 00 60 01 inc %g1 40011518: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 4001151c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011520: 94 10 20 00 clr %o2 40011524: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011528: 40 00 10 7b call 40015714 <_CORE_mutex_Surrender> 4001152c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011530: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011534: 10 bf ff ab b 400113e0 40011538: b0 10 20 08 mov 8, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001153c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011540: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011544: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40011548: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4001154c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011550: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011554: 7f ff e5 f1 call 4000ad18 <== NOT EXECUTED 40011558: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED * the inactive chain of free region control blocks. */ RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void ) { return (Region_Control *) _Objects_Allocate( &_Region_Information ); 4001155c: 10 bf ff 92 b 400113a4 <== NOT EXECUTED 40011560: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011564: 7f ff e5 ed call 4000ad18 <== NOT EXECUTED 40011568: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4001156c: 10 bf ff 8e b 400113a4 <== NOT EXECUTED 40011570: 23 10 00 d7 sethi %hi(0x40035c00), %l1 <== NOT EXECUTED the_region->length = length; the_region->page_size = page_size; the_region->attribute_set = attribute_set; the_region->number_of_used_blocks = 0; _Thread_queue_Initialize( 40011574: 90 04 20 10 add %l0, 0x10, %o0 _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_INVALID_SIZE; } the_region->starting_address = starting_address; 40011578: f2 24 20 50 st %i1, [ %l0 + 0x50 ] the_region->length = length; 4001157c: f4 24 20 54 st %i2, [ %l0 + 0x54 ] the_region->page_size = page_size; 40011580: f6 24 20 58 st %i3, [ %l0 + 0x58 ] the_region->attribute_set = attribute_set; 40011584: f8 24 20 60 st %i4, [ %l0 + 0x60 ] the_region->number_of_used_blocks = 0; 40011588: c0 24 20 64 clr [ %l0 + 0x64 ] _Thread_queue_Initialize( 4001158c: 93 37 20 02 srl %i4, 2, %o1 40011590: 94 10 20 40 mov 0x40, %o2 40011594: 92 0a 60 01 and %o1, 1, %o1 40011598: 40 00 1c 10 call 400185d8 <_Thread_queue_Initialize> 4001159c: 96 10 20 06 mov 6, %o3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400115a0: 90 14 61 08 or %l1, 0x108, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 400115a4: c6 04 20 08 ld [ %l0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 400115a8: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 400115ac: 03 00 00 3f sethi %hi(0xfc00), %g1 400115b0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 400115b4: 82 08 c0 01 and %g3, %g1, %g1 400115b8: 80 a0 40 02 cmp %g1, %g2 400115bc: 38 80 00 06 bgu,a 400115d4 400115c0: c6 27 40 00 st %g3, [ %i5 ] <== NOT EXECUTED information->local_table[ index ] = the_object; 400115c4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 400115c8: 83 28 60 02 sll %g1, 2, %g1 400115cc: e0 20 80 01 st %l0, [ %g2 + %g1 ] &_Region_Information, &the_region->Object, (Objects_Name) name ); *id = the_region->Object.id; 400115d0: c6 27 40 00 st %g3, [ %i5 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400115d4: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 400115d8: e8 24 20 0c st %l4, [ %l0 + 0xc ] 400115dc: 82 00 60 01 inc %g1 400115e0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400115e4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400115e8: 94 10 20 00 clr %o2 400115ec: d2 02 20 08 ld [ %o0 + 8 ], %o1 400115f0: 40 00 10 49 call 40015714 <_CORE_mutex_Surrender> 400115f4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400115f8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400115fc: 10 bf ff 79 b 400113e0 40011600: b0 10 20 00 clr %i0 40011604 : */ rtems_status_code rtems_region_delete( Objects_Id id ) { 40011604: 9d e3 bf 90 save %sp, -112, %sp register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40011608: 7f ff e5 c0 call 4000ad08 4001160c: 01 00 00 00 nop 40011610: a2 10 00 08 mov %o0, %l1 40011614: 25 10 00 d7 sethi %hi(0x40035c00), %l2 40011618: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 4001161c: 80 a0 60 00 cmp %g1, 0 40011620: 02 80 00 0b be 4001164c 40011624: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011628: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 4001162c: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 40011630: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40011634: 08 80 00 06 bleu 4001164c <== NOT EXECUTED 40011638: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001163c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011640: 40 00 12 ae call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011644: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40011648: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 4001164c: 09 10 00 d7 sethi %hi(0x40035c00), %g4 40011650: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 40011654: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011658: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 4001165c: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011660: 80 a0 60 00 cmp %g1, 0 40011664: 22 80 00 36 be,a 4001173c 40011668: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 4001166c: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011670: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011674: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011678: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 4001167c: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011680: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011684: 80 a0 e0 02 cmp %g3, 2 40011688: 12 80 00 56 bne 400117e0 4001168c: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011690: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011694: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011698: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 4001169c: 02 80 00 7c be 4001188c 400116a0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400116a4: 7f ff e5 9d call 4000ad18 400116a8: 90 10 00 11 mov %l1, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400116ac: 92 10 00 18 mov %i0, %o1 400116b0: 21 10 00 d7 sethi %hi(0x40035c00), %l0 400116b4: 94 07 bf f4 add %fp, -12, %o2 400116b8: 40 00 14 0e call 400166f0 <_Objects_Get_no_protection> 400116bc: 90 14 21 08 or %l0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 400116c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400116c4: 80 a0 60 01 cmp %g1, 1 400116c8: 02 80 00 33 be 40011794 400116cc: 92 10 00 08 mov %o0, %o1 400116d0: 80 a0 60 01 cmp %g1, 1 400116d4: 1a 80 00 5f bcc 40011850 400116d8: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { 400116dc: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 400116e0: 80 a0 60 00 cmp %g1, 0 400116e4: 22 80 00 99 be,a 40011948 400116e8: 90 14 21 08 or %l0, 0x108, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400116ec: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400116f0: 82 00 60 01 inc %g1 400116f4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); return RTEMS_SUCCESSFUL; } _RTEMS_Unlock_allocator(); 400116f8: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400116fc: 94 10 20 00 clr %o2 40011700: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011704: 40 00 10 04 call 40015714 <_CORE_mutex_Surrender> 40011708: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001170c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011710: b0 10 20 0c mov 0xc, %i0 40011714: 82 00 7f ff add %g1, -1, %g1 40011718: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 4001171c: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 40011720: 80 a0 a0 00 cmp %g2, 0 40011724: 12 80 00 49 bne 40011848 40011728: 01 00 00 00 nop _Thread_Dispatch(); 4001172c: 40 00 19 2d call 40017be0 <_Thread_Dispatch> 40011730: 01 00 00 00 nop 40011734: 81 c7 e0 08 ret 40011738: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 4001173c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011740: 12 80 00 30 bne 40011800 <== NOT EXECUTED 40011744: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011748: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001174c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011750: 22 80 00 6a be,a 400118f8 <== NOT EXECUTED 40011754: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011758: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001175c: 12 80 00 29 bne 40011800 <== NOT EXECUTED 40011760: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40011764: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40011768: 7f ff e5 6c call 4000ad18 <== NOT EXECUTED 4001176c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011770: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40011774: 21 10 00 d7 sethi %hi(0x40035c00), %l0 <== NOT EXECUTED 40011778: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4001177c: 40 00 13 dd call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011780: 90 14 21 08 or %l0, 0x108, %o0 <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011784: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011788: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001178c: 12 bf ff d2 bne 400116d4 <== NOT EXECUTED 40011790: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011794: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 40011798: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001179c: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400117a0: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400117a4: 94 10 20 00 clr %o2 <== NOT EXECUTED 400117a8: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 400117ac: 40 00 0f da call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 400117b0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400117b4: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400117b8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400117bc: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400117c0: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 400117c4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400117c8: 12 80 00 24 bne 40011858 <== NOT EXECUTED 400117cc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 400117d0: 40 00 19 04 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400117d4: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 400117d8: 81 c7 e0 08 ret <== NOT EXECUTED 400117dc: 81 e8 00 00 restore <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400117e0: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 400117e4: 12 bf ff b0 bne 400116a4 <== NOT EXECUTED 400117e8: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400117ec: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 400117f0: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400117f4: 02 80 00 26 be 4001188c <== NOT EXECUTED 400117f8: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 400117fc: 30 bf ff aa b,a 400116a4 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011800: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED ) { register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); 40011804: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011808: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 4001180c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011810: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011814: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 40011818: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 4001181c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011820: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011824: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011828: 7f ff e5 3c call 4000ad18 <== NOT EXECUTED 4001182c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011830: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011834: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011838: 40 00 0f 93 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 4001183c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40011840: 10 bf ff 9c b 400116b0 <== NOT EXECUTED 40011844: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _RTEMS_Unlock_allocator(); return RTEMS_RESOURCE_IN_USE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40011848: 81 c7 e0 08 ret <== NOT EXECUTED 4001184c: 81 e8 00 00 restore <== NOT EXECUTED register Region_Control *the_region; Objects_Locations location; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 40011850: 02 80 00 04 be 40011860 40011854: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40011858: 81 c7 e0 08 ret <== NOT EXECUTED 4001185c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011860: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011864: 82 00 60 01 inc %g1 40011868: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 4001186c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011870: 94 10 20 00 clr %o2 40011874: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011878: 40 00 0f a7 call 40015714 <_CORE_mutex_Surrender> 4001187c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011880: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011884: 10 bf ff a4 b 40011714 40011888: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 4001188c: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011890: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011894: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011898: 02 80 00 28 be 40011938 <== NOT EXECUTED 4001189c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400118a0: 1a 80 00 1c bcc 40011910 <== NOT EXECUTED 400118a4: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400118a8: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400118ac: 82 00 60 01 inc %g1 <== NOT EXECUTED 400118b0: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 400118b4: 7f ff e5 19 call 4000ad18 <== NOT EXECUTED 400118b8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED _Thread_Change_priority( 400118bc: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 400118c0: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 400118c4: 40 00 17 a3 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 400118c8: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400118cc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 <== NOT EXECUTED 400118d0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400118d4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] <== NOT EXECUTED 400118d8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 <== NOT EXECUTED 400118dc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400118e0: 32 bf ff 74 bne,a 400116b0 <== NOT EXECUTED 400118e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 400118e8: 40 00 18 be call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400118ec: 01 00 00 00 nop <== NOT EXECUTED 400118f0: 10 bf ff 70 b 400116b0 <== NOT EXECUTED 400118f4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 400118f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400118fc: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011900: 7f ff e5 06 call 4000ad18 <== NOT EXECUTED 40011904: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011908: 10 bf ff 6a b 400116b0 <== NOT EXECUTED 4001190c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40011910: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011914: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011918: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4001191c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40011920: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011924: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011928: 7f ff e4 fc call 4000ad18 <== NOT EXECUTED 4001192c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011930: 10 bf ff 60 b 400116b0 <== NOT EXECUTED 40011934: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011938: 7f ff e4 f8 call 4000ad18 <== NOT EXECUTED 4001193c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40011940: 10 bf ff 5c b 400116b0 <== NOT EXECUTED 40011944: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40011948: c2 02 60 08 ld [ %o1 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4001194c: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40011950: 05 00 00 3f sethi %hi(0xfc00), %g2 40011954: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40011958: 82 08 40 02 and %g1, %g2, %g1 4001195c: 80 a0 40 03 cmp %g1, %g3 40011960: 18 80 00 05 bgu 40011974 40011964: 01 00 00 00 nop information->local_table[ index ] = the_object; 40011968: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 4001196c: 83 28 60 02 sll %g1, 2, %g1 40011970: c0 20 80 01 clr [ %g2 + %g1 ] RTEMS_INLINE_ROUTINE void _Region_Free ( Region_Control *the_region ) { _Objects_Free( &_Region_Information, &the_region->Object ); 40011974: 40 00 13 1c call 400165e4 <_Objects_Free> 40011978: c0 22 60 0c clr [ %o1 + 0xc ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001197c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 40011980: 82 00 60 01 inc %g1 40011984: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] case OBJECTS_LOCAL: _Region_Debug_Walk( the_region, 5 ); if ( the_region->number_of_used_blocks == 0 ) { _Objects_Close( &_Region_Information, &the_region->Object ); _Region_Free( the_region ); _RTEMS_Unlock_allocator(); 40011988: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 4001198c: 94 10 20 00 clr %o2 40011990: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011994: 40 00 0f 60 call 40015714 <_CORE_mutex_Surrender> 40011998: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001199c: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400119a0: 10 bf ff 5d b 40011714 400119a4: b0 10 20 00 clr %i0 400119a8 : rtems_status_code rtems_region_extend( Objects_Id id, void *starting_address, uint32_t length ) { 400119a8: 9d e3 bf 90 save %sp, -112, %sp 400119ac: a8 10 00 18 mov %i0, %l4 Objects_Locations location; uint32_t amount_extended; Heap_Extend_status heap_status; rtems_status_code status; if ( !starting_address ) 400119b0: 80 a6 60 00 cmp %i1, 0 400119b4: 02 80 00 59 be 40011b18 400119b8: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 400119bc: 7f ff e4 d3 call 4000ad08 400119c0: 01 00 00 00 nop 400119c4: a4 10 00 08 mov %o0, %l2 400119c8: 23 10 00 d7 sethi %hi(0x40035c00), %l1 400119cc: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400119d0: 80 a0 60 00 cmp %g1, 0 400119d4: 02 80 00 0b be 40011a00 400119d8: 27 10 00 d7 sethi %hi(0x40035c00), %l3 400119dc: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 400119e0: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 400119e4: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 400119e8: 08 80 00 06 bleu 40011a00 <== NOT EXECUTED 400119ec: 90 10 20 00 clr %o0 <== NOT EXECUTED 400119f0: 92 10 20 00 clr %o1 <== NOT EXECUTED 400119f4: 40 00 11 c1 call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 400119f8: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 400119fc: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40011a00: 09 10 00 d7 sethi %hi(0x40035c00), %g4 40011a04: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 40011a08: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011a0c: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011a10: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011a14: 80 a0 60 00 cmp %g1, 0 40011a18: 22 80 00 42 be,a 40011b20 40011a1c: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011a20: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011a24: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011a28: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011a2c: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011a30: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011a34: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011a38: 80 a0 e0 02 cmp %g3, 2 40011a3c: 02 80 00 61 be 40011bc0 40011a40: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 40011a44: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40011a48: 22 80 00 60 be,a 40011bc8 <== NOT EXECUTED 40011a4c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011a50: 7f ff e4 b2 call 4000ad18 40011a54: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 40011a58: 92 10 00 14 mov %l4, %o1 40011a5c: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40011a60: 94 07 bf f4 add %fp, -12, %o2 40011a64: 40 00 13 23 call 400166f0 <_Objects_Get_no_protection> 40011a68: 90 12 21 08 or %o0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 40011a6c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011a70: 80 a0 60 01 cmp %g1, 1 40011a74: 02 80 00 40 be 40011b74 40011a78: a0 10 00 08 mov %o0, %l0 40011a7c: 80 a0 60 01 cmp %g1, 1 40011a80: 1a 80 00 70 bcc 40011c40 40011a84: 80 a0 60 02 cmp %g1, 2 _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: heap_status = _Heap_Extend( 40011a88: 92 10 00 19 mov %i1, %o1 40011a8c: 94 10 00 1a mov %i2, %o2 40011a90: 90 02 20 68 add %o0, 0x68, %o0 40011a94: 96 07 bf f0 add %fp, -16, %o3 40011a98: 40 00 10 65 call 40015c2c <_Heap_Extend> 40011a9c: b0 10 20 09 mov 9, %i0 starting_address, length, &amount_extended ); switch ( heap_status ) { 40011aa0: 80 a2 20 01 cmp %o0, 1 40011aa4: 02 80 00 0c be 40011ad4 40011aa8: 01 00 00 00 nop 40011aac: 1a 80 00 8e bcc 40011ce4 40011ab0: 82 1a 20 02 xor %o0, 2, %g1 case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ab4: c6 07 bf f0 ld [ %fp + -16 ], %g3 40011ab8: c4 04 20 54 ld [ %l0 + 0x54 ], %g2 the_region->maximum_segment_size += amount_extended; 40011abc: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ac0: 84 00 80 03 add %g2, %g3, %g2 the_region->maximum_segment_size += amount_extended; 40011ac4: 82 00 40 03 add %g1, %g3, %g1 &amount_extended ); switch ( heap_status ) { case HEAP_EXTEND_SUCCESSFUL: the_region->length += amount_extended; 40011ac8: c4 24 20 54 st %g2, [ %l0 + 0x54 ] the_region->maximum_segment_size += amount_extended; 40011acc: c2 24 20 5c st %g1, [ %l0 + 0x5c ] 40011ad0: b0 10 20 00 clr %i0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011ad4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011ad8: 82 00 60 01 inc %g1 40011adc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] break; case HEAP_EXTEND_NOT_IMPLEMENTED: status = RTEMS_NOT_IMPLEMENTED; break; } _RTEMS_Unlock_allocator(); 40011ae0: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011ae4: 94 10 20 00 clr %o2 40011ae8: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011aec: 40 00 0f 0a call 40015714 <_CORE_mutex_Surrender> 40011af0: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011af4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011af8: 82 00 7f ff add %g1, -1, %g1 40011afc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40011b00: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40011b04: 80 a0 a0 00 cmp %g2, 0 40011b08: 12 80 00 2c bne 40011bb8 40011b0c: 01 00 00 00 nop _Thread_Dispatch(); 40011b10: 40 00 18 34 call 40017be0 <_Thread_Dispatch> 40011b14: 01 00 00 00 nop 40011b18: 81 c7 e0 08 ret 40011b1c: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011b20: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011b24: 12 80 00 4d bne 40011c58 <== NOT EXECUTED 40011b28: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011b2c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011b30: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011b34: 12 80 00 47 bne 40011c50 <== NOT EXECUTED 40011b38: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40011b3c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011b40: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011b44: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011b48: 7f ff e4 74 call 4000ad18 <== NOT EXECUTED 40011b4c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011b50: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011b54: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED 40011b58: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 40011b5c: 40 00 12 e5 call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011b60: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 40011b64: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011b68: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40011b6c: 12 bf ff c5 bne 40011a80 <== NOT EXECUTED 40011b70: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011b74: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011b78: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011b7c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40011b80: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011b84: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011b88: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40011b8c: 40 00 0e e2 call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40011b90: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011b94: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011b98: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011b9c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011ba0: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011ba4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011ba8: 12 80 00 28 bne 40011c48 <== NOT EXECUTED 40011bac: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40011bb0: 40 00 18 0c call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011bb4: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40011bb8: 81 c7 e0 08 ret <== NOT EXECUTED 40011bbc: 81 e8 00 00 restore <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011bc0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011bc4: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011bc8: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011bcc: 12 bf ff a1 bne 40011a50 40011bd0: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011bd4: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011bd8: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011bdc: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011be0: 02 80 00 50 be 40011d20 <== NOT EXECUTED 40011be4: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011be8: 1a 80 00 44 bcc 40011cf8 <== NOT EXECUTED 40011bec: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011bf0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011bf4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011bf8: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011bfc: 7f ff e4 47 call 4000ad18 <== NOT EXECUTED 40011c00: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011c04: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011c08: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011c0c: 40 00 16 d1 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40011c10: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011c14: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011c18: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011c1c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011c20: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011c24: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011c28: 32 bf ff 8d bne,a 40011a5c <== NOT EXECUTED 40011c2c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40011c30: 40 00 17 ec call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011c34: 01 00 00 00 nop <== NOT EXECUTED 40011c38: 10 bf ff 89 b 40011a5c <== NOT EXECUTED 40011c3c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ the_region = _Region_Get( id, &location ); switch ( location ) { 40011c40: 02 80 00 18 be 40011ca0 40011c44: 01 00 00 00 nop 40011c48: 81 c7 e0 08 ret <== NOT EXECUTED 40011c4c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011c50: 02 80 00 1f be 40011ccc <== NOT EXECUTED 40011c54: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011c58: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED if ( !starting_address ) return RTEMS_INVALID_ADDRESS; status = RTEMS_SUCCESSFUL; _RTEMS_Lock_allocator(); /* to prevent deletion */ 40011c5c: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011c60: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 40011c64: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011c68: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011c6c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011c70: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40011c74: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011c78: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011c7c: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011c80: 7f ff e4 26 call 4000ad18 <== NOT EXECUTED 40011c84: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011c88: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40011c8c: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011c90: 40 00 0e 7d call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40011c94: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40011c98: 10 bf ff 71 b 40011a5c <== NOT EXECUTED 40011c9c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011ca0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011ca4: 82 00 60 01 inc %g1 40011ca8: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 40011cac: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40011cb0: 94 10 20 00 clr %o2 40011cb4: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011cb8: 40 00 0e 97 call 40015714 <_CORE_mutex_Surrender> 40011cbc: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011cc0: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011cc4: 10 bf ff 8d b 40011af8 40011cc8: b0 10 20 04 mov 4, %i0 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40011ccc: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40011cd0: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40011cd4: 7f ff e4 11 call 4000ad18 <== NOT EXECUTED 40011cd8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011cdc: 10 bf ff 60 b 40011a5c <== NOT EXECUTED 40011ce0: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED starting_address, length, &amount_extended ); switch ( heap_status ) { 40011ce4: 80 a0 00 01 cmp %g0, %g1 40011ce8: 84 60 20 00 subx %g0, 0, %g2 40011cec: b0 08 bf e8 and %g2, -24, %i0 40011cf0: 10 bf ff 79 b 40011ad4 40011cf4: b0 06 20 18 add %i0, 0x18, %i0 ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40011cf8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40011cfc: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40011d00: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40011d04: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40011d08: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011d0c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40011d10: 7f ff e4 02 call 4000ad18 <== NOT EXECUTED 40011d14: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011d18: 10 bf ff 51 b 40011a5c <== NOT EXECUTED 40011d1c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40011d20: 7f ff e3 fe call 4000ad18 <== NOT EXECUTED 40011d24: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011d28: 10 bf ff 4d b 40011a5c <== NOT EXECUTED 40011d2c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED 40011d30 : uint32_t size, rtems_option option_set, rtems_interval timeout, void **segment ) { 40011d30: 9d e3 bf 90 save %sp, -112, %sp 40011d34: aa 10 00 18 mov %i0, %l5 register Region_Control *the_region; Objects_Locations location; Thread_Control *executing; void *the_segment; if ( !segment ) 40011d38: 80 a7 20 00 cmp %i4, 0 40011d3c: 02 80 00 4e be 40011e74 40011d40: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; *segment = NULL; if ( size == 0 ) 40011d44: 80 a6 60 00 cmp %i1, 0 40011d48: 02 80 00 c8 be 40012068 40011d4c: c0 27 00 00 clr [ %i4 ] return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40011d50: 7f ff e3 ee call 4000ad08 40011d54: 01 00 00 00 nop 40011d58: a4 10 00 08 mov %o0, %l2 40011d5c: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40011d60: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40011d64: 80 a0 60 00 cmp %g1, 0 40011d68: 02 80 00 0b be 40011d94 40011d6c: 29 10 00 d7 sethi %hi(0x40035c00), %l4 40011d70: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40011d74: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 40011d78: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40011d7c: 08 80 00 06 bleu 40011d94 <== NOT EXECUTED 40011d80: 90 10 20 00 clr %o0 <== NOT EXECUTED 40011d84: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011d88: 40 00 10 dc call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40011d8c: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40011d90: 29 10 00 d7 sethi %hi(0x40035c00), %l4 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40011d94: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40011d98: e0 05 23 c4 ld [ %l4 + 0x3c4 ], %l0 40011d9c: c4 04 e3 cc ld [ %l3 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40011da0: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40011da4: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 40011da8: 80 a0 60 00 cmp %g1, 0 40011dac: 22 80 00 34 be,a 40011e7c 40011db0: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 40011db4: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011db8: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40011dbc: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40011dc0: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40011dc4: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 40011dc8: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40011dcc: 80 a0 e0 02 cmp %g3, 2 40011dd0: 02 80 00 54 be 40011f20 40011dd4: c8 24 20 64 st %g4, [ %l0 + 0x64 ] 40011dd8: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40011ddc: 22 80 00 53 be,a 40011f28 <== NOT EXECUTED 40011de0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 40011de4: 7f ff e3 cd call 4000ad18 40011de8: 90 10 00 12 mov %l2, %o0 executing = _Thread_Executing; 40011dec: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 40011df0: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40011df4: 92 10 00 15 mov %l5, %o1 40011df8: 90 12 21 08 or %o0, 0x108, %o0 40011dfc: 40 00 12 3d call 400166f0 <_Objects_Get_no_protection> 40011e00: 94 07 bf f4 add %fp, -12, %o2 the_region = _Region_Get( id, &location ); switch ( location ) { 40011e04: c2 07 bf f4 ld [ %fp + -12 ], %g1 40011e08: 80 a0 60 01 cmp %g1, 1 40011e0c: 02 80 00 32 be 40011ed4 40011e10: a0 10 00 08 mov %o0, %l0 40011e14: 80 a0 60 01 cmp %g1, 1 40011e18: 1a 80 00 62 bcc 40011fa0 40011e1c: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( size > the_region->maximum_segment_size ) { 40011e20: c2 02 20 5c ld [ %o0 + 0x5c ], %g1 40011e24: 80 a6 40 01 cmp %i1, %g1 40011e28: 28 80 00 a0 bleu,a 400120a8 40011e2c: 90 02 20 68 add %o0, 0x68, %o0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011e30: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011e34: 82 00 60 01 inc %g1 40011e38: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 40011e3c: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40011e40: 94 10 20 00 clr %o2 40011e44: d2 02 20 08 ld [ %o0 + 8 ], %o1 40011e48: 40 00 0e 33 call 40015714 <_CORE_mutex_Surrender> 40011e4c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011e50: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40011e54: 82 00 7f ff add %g1, -1, %g1 40011e58: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40011e5c: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40011e60: 80 a0 a0 00 cmp %g2, 0 40011e64: 12 80 00 81 bne 40012068 40011e68: 01 00 00 00 nop _Thread_Dispatch(); 40011e6c: 40 00 17 5d call 40017be0 <_Thread_Dispatch> 40011e70: b0 10 20 08 mov 8, %i0 ! 8 40011e74: 81 c7 e0 08 ret 40011e78: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40011e7c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40011e80: 12 80 00 4e bne 40011fb8 <== NOT EXECUTED 40011e84: c6 05 23 c4 ld [ %l4 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011e88: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 40011e8c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40011e90: 12 80 00 48 bne 40011fb0 <== NOT EXECUTED 40011e94: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40011e98: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 40011e9c: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011ea0: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 40011ea4: 7f ff e3 9d call 4000ad18 <== NOT EXECUTED 40011ea8: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011eac: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40011eb0: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED 40011eb4: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED 40011eb8: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40011ebc: 40 00 12 0d call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 40011ec0: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40011ec4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40011ec8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40011ecc: 12 bf ff d3 bne 40011e18 <== NOT EXECUTED 40011ed0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011ed4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011ed8: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011edc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 40011ee0: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 <== NOT EXECUTED 40011ee4: 94 10 20 00 clr %o2 <== NOT EXECUTED 40011ee8: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40011eec: 40 00 0e 0a call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40011ef0: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011ef4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011ef8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011efc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011f00: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011f04: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011f08: 12 80 00 28 bne 40011fa8 <== NOT EXECUTED 40011f0c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40011f10: 40 00 17 34 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011f14: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 40011f18: 81 c7 e0 08 ret <== NOT EXECUTED 40011f1c: 81 e8 00 00 restore <== NOT EXECUTED the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011f20: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011f24: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40011f28: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40011f2c: 12 bf ff ae bne 40011de4 40011f30: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40011f34: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 40011f38: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 40011f3c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40011f40: 02 80 00 56 be 40012098 <== NOT EXECUTED 40011f44: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40011f48: 1a 80 00 4a bcc 40012070 <== NOT EXECUTED 40011f4c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011f50: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011f54: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011f58: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40011f5c: 7f ff e3 6f call 4000ad18 <== NOT EXECUTED 40011f60: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40011f64: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 40011f68: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40011f6c: 40 00 15 f9 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40011f70: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40011f74: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 40011f78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40011f7c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011f80: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40011f84: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40011f88: 32 bf ff 9a bne,a 40011df0 <== NOT EXECUTED 40011f8c: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED _Thread_Dispatch(); 40011f90: 40 00 17 14 call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40011f94: 01 00 00 00 nop <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40011f98: 10 bf ff 96 b 40011df0 <== NOT EXECUTED 40011f9c: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 40011fa0: 02 80 00 18 be 40012000 40011fa4: 01 00 00 00 nop _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40011fa8: 81 c7 e0 08 ret <== NOT EXECUTED 40011fac: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40011fb0: 02 80 00 28 be 40012050 <== NOT EXECUTED 40011fb4: c6 05 23 c4 ld [ %l4 + 0x3c4 ], %g3 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40011fb8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED *segment = NULL; if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); 40011fbc: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 40011fc0: c8 04 e3 cc ld [ %l3 + 0x3cc ], %g4 <== NOT EXECUTED 40011fc4: 82 00 60 01 inc %g1 <== NOT EXECUTED 40011fc8: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40011fcc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40011fd0: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40011fd4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40011fd8: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40011fdc: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 40011fe0: 7f ff e3 4e call 4000ad18 <== NOT EXECUTED 40011fe4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40011fe8: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 <== NOT EXECUTED 40011fec: 92 10 20 00 clr %o1 <== NOT EXECUTED 40011ff0: 40 00 0d a5 call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40011ff4: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED executing = _Thread_Executing; 40011ff8: 10 bf ff 7e b 40011df0 <== NOT EXECUTED 40011ffc: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED 40012000: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012004: 82 00 60 01 inc %g1 40012008: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 4001200c: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012010: 94 10 20 00 clr %o2 40012014: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012018: 40 00 0d bf call 40015714 <_CORE_mutex_Surrender> 4001201c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012020: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012024: b0 10 20 04 mov 4, %i0 _Thread_Dispatch(); 40012028: 82 00 7f ff add %g1, -1, %g1 4001202c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012030: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012034: 80 a0 a0 00 cmp %g2, 0 40012038: 12 80 00 6d bne 400121ec 4001203c: 01 00 00 00 nop 40012040: 40 00 16 e8 call 40017be0 <_Thread_Dispatch> 40012044: 01 00 00 00 nop 40012048: 81 c7 e0 08 ret 4001204c: 81 e8 00 00 restore case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40012050: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40012054: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 40012058: 7f ff e3 30 call 4000ad18 <== NOT EXECUTED 4001205c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40012060: 10 bf ff 64 b 40011df0 <== NOT EXECUTED 40012064: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 40012068: 81 c7 e0 08 ret <== NOT EXECUTED 4001206c: 91 e8 20 08 restore %g0, 8, %o0 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 40012070: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40012074: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40012078: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 4001207c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40012080: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012084: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40012088: 7f ff e3 24 call 4000ad18 <== NOT EXECUTED 4001208c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if ( size == 0 ) return RTEMS_INVALID_SIZE; _RTEMS_Lock_allocator(); executing = _Thread_Executing; 40012090: 10 bf ff 58 b 40011df0 <== NOT EXECUTED 40012094: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40012098: 7f ff e3 20 call 4000ad18 <== NOT EXECUTED 4001209c: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 400120a0: 10 bf ff 54 b 40011df0 <== NOT EXECUTED 400120a4: f0 04 e3 cc ld [ %l3 + 0x3cc ], %i0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment ( Region_Control *the_region, uint32_t size ) { return _Heap_Allocate( &the_region->Memory, size ); 400120a8: 40 00 0e af call 40015b64 <_Heap_Allocate> 400120ac: 92 10 00 19 mov %i1, %o1 the_segment = _Region_Allocate_segment( the_region, size ); _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { 400120b0: a4 92 20 00 orcc %o0, 0, %l2 400120b4: 02 80 00 17 be 40012110 400120b8: 80 8e a0 01 btst 1, %i2 the_region->number_of_used_blocks += 1; 400120bc: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400120c0: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400120c4: 82 00 60 01 inc %g1 400120c8: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 400120cc: 84 00 a0 01 inc %g2 400120d0: c4 24 62 f0 st %g2, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 400120d4: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 400120d8: 94 10 20 00 clr %o2 400120dc: d2 02 20 08 ld [ %o0 + 8 ], %o1 400120e0: 40 00 0d 8d call 40015714 <_CORE_mutex_Surrender> 400120e4: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400120e8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400120ec: 82 00 7f ff add %g1, -1, %g1 400120f0: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 400120f4: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 400120f8: 80 a0 a0 00 cmp %g2, 0 400120fc: 02 80 00 12 be 40012144 40012100: 01 00 00 00 nop *segment = the_segment; 40012104: e4 27 00 00 st %l2, [ %i4 ] <== NOT EXECUTED 40012108: 81 c7 e0 08 ret 4001210c: 91 e8 20 00 restore %g0, 0, %o0 return RTEMS_SUCCESSFUL; } if ( _Options_Is_no_wait( option_set ) ) { 40012110: 02 80 00 11 be 40012154 40012114: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012118: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 4001211c: 82 00 60 01 inc %g1 40012120: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 40012124: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012128: 94 10 20 00 clr %o2 4001212c: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012130: 40 00 0d 79 call 40015714 <_CORE_mutex_Surrender> 40012134: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012138: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 4001213c: 10 bf ff bb b 40012028 40012140: b0 10 20 0d mov 0xd, %i0 _Thread_Dispatch(); 40012144: 40 00 16 a7 call 40017be0 <_Thread_Dispatch> 40012148: 01 00 00 00 nop _Region_Debug_Walk( the_region, 2 ); if ( the_segment ) { the_region->number_of_used_blocks += 1; _RTEMS_Unlock_allocator(); *segment = the_segment; 4001214c: 10 bf ff ef b 40012108 40012150: e4 27 00 00 st %l2, [ %i4 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012154: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012158: 25 10 00 d7 sethi %hi(0x40035c00), %l2 4001215c: 82 00 60 01 inc %g1 40012160: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012164: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012168: 82 00 60 01 inc %g1 4001216c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] * Switch from using the memory allocation mutex to using a * dispatching disabled critical section. We have to do this * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); 40012170: d0 05 23 c4 ld [ %l4 + 0x3c4 ], %o0 40012174: 94 10 20 00 clr %o2 40012178: d2 02 20 08 ld [ %o0 + 8 ], %o1 4001217c: 40 00 0d 66 call 40015714 <_CORE_mutex_Surrender> 40012180: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012184: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012188: 82 00 7f ff add %g1, -1, %g1 4001218c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012190: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012194: 80 a0 a0 00 cmp %g2, 0 40012198: 02 80 00 17 be 400121f4 4001219c: 01 00 00 00 nop 400121a0: 82 10 20 01 mov 1, %g1 ! 1 executing->Wait.queue = &the_region->Wait_queue; 400121a4: 90 04 20 10 add %l0, 0x10, %o0 executing->Wait.id = id; 400121a8: ea 26 20 20 st %l5, [ %i0 + 0x20 ] executing->Wait.count = size; 400121ac: f2 26 20 24 st %i1, [ %i0 + 0x24 ] executing->Wait.return_argument = segment; 400121b0: f8 26 20 28 st %i4, [ %i0 + 0x28 ] _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 400121b4: 92 10 00 1b mov %i3, %o1 * because this thread is going to block. */ _Thread_Disable_dispatch(); _RTEMS_Unlock_allocator(); executing->Wait.queue = &the_region->Wait_queue; 400121b8: d0 26 20 44 st %o0, [ %i0 + 0x44 ] 400121bc: c2 24 20 40 st %g1, [ %l0 + 0x40 ] executing->Wait.count = size; executing->Wait.return_argument = segment; _Thread_queue_Enter_critical_section( &the_region->Wait_queue ); _Thread_queue_Enqueue( &the_region->Wait_queue, timeout ); 400121c0: 15 10 00 61 sethi %hi(0x40018400), %o2 400121c4: 40 00 17 f7 call 400181a0 <_Thread_queue_Enqueue_with_handler> 400121c8: 94 12 a2 e0 or %o2, 0x2e0, %o2 ! 400186e0 <_Thread_queue_Timeout> 400121cc: c2 04 a2 f0 ld [ %l2 + 0x2f0 ], %g1 400121d0: 82 00 7f ff add %g1, -1, %g1 400121d4: c2 24 a2 f0 st %g1, [ %l2 + 0x2f0 ] 400121d8: c4 04 a2 f0 ld [ %l2 + 0x2f0 ], %g2 400121dc: 80 a0 a0 00 cmp %g2, 0 400121e0: 02 80 00 09 be 40012204 400121e4: 01 00 00 00 nop _Thread_Enable_dispatch(); return (rtems_status_code) executing->Wait.return_code; 400121e8: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 <== NOT EXECUTED 400121ec: 81 c7 e0 08 ret <== NOT EXECUTED 400121f0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 400121f4: 40 00 16 7b call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 400121f8: 01 00 00 00 nop <== NOT EXECUTED 400121fc: 10 bf ff ea b 400121a4 <== NOT EXECUTED 40012200: 82 10 20 01 mov 1, %g1 ! 1 <== NOT EXECUTED 40012204: 40 00 16 77 call 40017be0 <_Thread_Dispatch> 40012208: 01 00 00 00 nop 4001220c: f0 06 20 34 ld [ %i0 + 0x34 ], %i0 40012210: 81 c7 e0 08 ret 40012214: 81 e8 00 00 restore 40012250 : rtems_status_code rtems_region_return_segment( Objects_Id id, void *segment ) { 40012250: 9d e3 bf 90 save %sp, -112, %sp #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 40012254: 7f ff e2 ad call 4000ad08 40012258: 01 00 00 00 nop 4001225c: a4 10 00 08 mov %o0, %l2 40012260: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012264: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40012268: 80 a0 60 00 cmp %g1, 0 4001226c: 02 80 00 0b be 40012298 40012270: 27 10 00 d7 sethi %hi(0x40035c00), %l3 40012274: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40012278: c4 00 60 d0 ld [ %g1 + 0xd0 ], %g2 ! 400360d0 <_System_state_Current> <== NOT EXECUTED 4001227c: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED 40012280: 08 80 00 06 bleu 40012298 <== NOT EXECUTED 40012284: 90 10 20 00 clr %o0 <== NOT EXECUTED 40012288: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001228c: 40 00 0f 9b call 400160f8 <_Internal_error_Occurred> <== NOT EXECUTED 40012290: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED 40012294: 27 10 00 d7 sethi %hi(0x40035c00), %l3 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40012298: 09 10 00 d7 sethi %hi(0x40035c00), %g4 4001229c: e0 04 e3 c4 ld [ %l3 + 0x3c4 ], %l0 400122a0: c4 01 23 cc ld [ %g4 + 0x3cc ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 400122a4: c0 20 a0 34 clr [ %g2 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 400122a8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 400122ac: 80 a0 60 00 cmp %g1, 0 400122b0: 22 80 00 38 be,a 40012390 400122b4: c2 04 20 6c ld [ %l0 + 0x6c ], %g1 <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_LOCKED; 400122b8: c0 24 20 60 clr [ %l0 + 0x60 ] the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400122bc: c2 00 a0 08 ld [ %g2 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 400122c0: c6 04 20 58 ld [ %l0 + 0x58 ], %g3 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 400122c4: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 400122c8: c2 24 20 70 st %g1, [ %l0 + 0x70 ] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 400122cc: c4 24 20 6c st %g2, [ %l0 + 0x6c ] the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400122d0: 80 a0 e0 02 cmp %g3, 2 400122d4: 12 80 00 58 bne 40012434 400122d8: c8 24 20 64 st %g4, [ %l0 + 0x64 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400122dc: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400122e0: 80 a0 e0 03 cmp %g3, 3 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 400122e4: 82 00 60 01 inc %g1 if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 400122e8: 02 80 00 7c be 400124d8 400122ec: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] _ISR_Enable( level ); 400122f0: 7f ff e2 8a call 4000ad18 400122f4: 90 10 00 12 mov %l2, %o0 RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400122f8: 92 10 00 18 mov %i0, %o1 400122fc: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40012300: 94 07 bf f4 add %fp, -12, %o2 40012304: 40 00 10 fb call 400166f0 <_Objects_Get_no_protection> 40012308: 90 12 21 08 or %o0, 0x108, %o0 the_region = _Region_Get( id, &location ); switch ( location ) { 4001230c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012310: 80 a0 60 01 cmp %g1, 1 40012314: 02 80 00 35 be 400123e8 40012318: a0 10 00 08 mov %o0, %l0 4001231c: 80 a0 60 01 cmp %g1, 1 40012320: 1a 80 00 5f bcc 4001249c 40012324: 80 a0 60 02 cmp %g1, 2 RTEMS_INLINE_ROUTINE boolean _Region_Free_segment ( Region_Control *the_region, void *the_segment ) { return _Heap_Free( &the_region->Memory, the_segment ); 40012328: 92 10 00 19 mov %i1, %o1 4001232c: 40 00 0e 73 call 40015cf8 <_Heap_Free> 40012330: 90 02 20 68 add %o0, 0x68, %o0 status = _Region_Free_segment( the_region, segment ); _Region_Debug_Walk( the_region, 4 ); if ( !status ) { 40012334: 80 a2 20 00 cmp %o0, 0 40012338: 32 80 00 97 bne,a 40012594 4001233c: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012340: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012344: 82 00 60 01 inc %g1 40012348: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] _RTEMS_Unlock_allocator(); 4001234c: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 40012350: 94 10 20 00 clr %o2 40012354: d2 02 20 08 ld [ %o0 + 8 ], %o1 40012358: 40 00 0c ef call 40015714 <_CORE_mutex_Surrender> 4001235c: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012360: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012364: b0 10 20 09 mov 9, %i0 40012368: 82 00 7f ff add %g1, -1, %g1 4001236c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012370: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012374: 80 a0 a0 00 cmp %g2, 0 40012378: 12 80 00 8c bne 400125a8 4001237c: 01 00 00 00 nop _Thread_Dispatch(); 40012380: 40 00 16 18 call 40017be0 <_Thread_Dispatch> 40012384: 01 00 00 00 nop 40012388: 81 c7 e0 08 ret 4001238c: 81 e8 00 00 restore /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 40012390: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40012394: 12 80 00 30 bne 40012454 <== NOT EXECUTED 40012398: c6 04 e3 c4 ld [ %l3 + 0x3c4 ], %g3 <== NOT EXECUTED switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4001239c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 400123a0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400123a4: 22 80 00 68 be,a 40012544 <== NOT EXECUTED 400123a8: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 <== NOT EXECUTED 400123ac: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400123b0: 12 80 00 29 bne 40012454 <== NOT EXECUTED 400123b4: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 400123b8: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 400123bc: 7f ff e2 57 call 4000ad18 <== NOT EXECUTED 400123c0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Region_Control *_Region_Get ( Objects_Id id, Objects_Locations *location ) { return (Region_Control *) 400123c4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 400123c8: 11 10 00 d7 sethi %hi(0x40035c00), %o0 <== NOT EXECUTED 400123cc: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 400123d0: 40 00 10 c8 call 400166f0 <_Objects_Get_no_protection> <== NOT EXECUTED 400123d4: 90 12 21 08 or %o0, 0x108, %o0 <== NOT EXECUTED #endif int status; _RTEMS_Lock_allocator(); the_region = _Region_Get( id, &location ); switch ( location ) { 400123d8: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400123dc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 400123e0: 12 bf ff d0 bne 40012320 <== NOT EXECUTED 400123e4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400123e8: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 400123ec: 82 00 60 01 inc %g1 <== NOT EXECUTED 400123f0: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); 400123f4: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 400123f8: 94 10 20 00 clr %o2 <== NOT EXECUTED 400123fc: d2 02 20 08 ld [ %o0 + 8 ], %o1 <== NOT EXECUTED 40012400: 40 00 0c c5 call 40015714 <_CORE_mutex_Surrender> <== NOT EXECUTED 40012404: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012408: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 4001240c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012410: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40012414: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40012418: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001241c: 12 80 00 22 bne 400124a4 <== NOT EXECUTED 40012420: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40012424: 40 00 15 ef call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40012428: b0 10 20 19 mov 0x19, %i0 ! 19 <== NOT EXECUTED 4001242c: 81 c7 e0 08 ret <== NOT EXECUTED 40012430: 81 e8 00 00 restore <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 40012434: 80 a0 e0 03 cmp %g3, 3 <== NOT EXECUTED 40012438: 12 bf ff ae bne 400122f0 <== NOT EXECUTED 4001243c: 01 00 00 00 nop <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40012440: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40012444: 82 00 60 01 inc %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40012448: 02 80 00 24 be 400124d8 <== NOT EXECUTED 4001244c: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED 40012450: 30 bf ff a8 b,a 400122f0 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012454: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED #ifdef RTEMS_REGION_FREE_SHRED_PATTERN uint32_t size; #endif int status; _RTEMS_Lock_allocator(); 40012458: c4 00 e0 08 ld [ %g3 + 8 ], %g2 <== NOT EXECUTED 4001245c: c8 01 23 cc ld [ %g4 + 0x3cc ], %g4 <== NOT EXECUTED 40012460: 82 00 60 01 inc %g1 <== NOT EXECUTED 40012464: c4 21 20 20 st %g2, [ %g4 + 0x20 ] <== NOT EXECUTED 40012468: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 4001246c: 84 00 e0 10 add %g3, 0x10, %g2 <== NOT EXECUTED 40012470: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40012474: c4 21 20 44 st %g2, [ %g4 + 0x44 ] <== NOT EXECUTED 40012478: c2 20 e0 40 st %g1, [ %g3 + 0x40 ] <== NOT EXECUTED 4001247c: 7f ff e2 27 call 4000ad18 <== NOT EXECUTED 40012480: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40012484: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 <== NOT EXECUTED 40012488: 92 10 20 00 clr %o1 <== NOT EXECUTED 4001248c: 40 00 0c 7e call 40015684 <_CORE_mutex_Seize_interrupt_blocking> <== NOT EXECUTED 40012490: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED 40012494: 10 bf ff 9a b 400122fc <== NOT EXECUTED 40012498: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED the_region = _Region_Get( id, &location ); switch ( location ) { 4001249c: 02 80 00 04 be 400124ac 400124a0: 01 00 00 00 nop the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ return RTEMS_SUCCESSFUL; 400124a4: 81 c7 e0 08 ret <== NOT EXECUTED 400124a8: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED 400124ac: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400124b0: 82 00 60 01 inc %g1 400124b4: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] case OBJECTS_REMOTE: /* this error cannot be returned */ _RTEMS_Unlock_allocator(); return RTEMS_INTERNAL_ERROR; case OBJECTS_ERROR: _RTEMS_Unlock_allocator(); 400124b8: d0 04 e3 c4 ld [ %l3 + 0x3c4 ], %o0 400124bc: 94 10 20 00 clr %o2 400124c0: d2 02 20 08 ld [ %o0 + 8 ], %o1 400124c4: 40 00 0c 94 call 40015714 <_CORE_mutex_Surrender> 400124c8: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400124cc: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 400124d0: 10 bf ff a6 b 40012368 400124d4: b0 10 20 04 mov 4, %i0 */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 400124d8: c6 04 20 5c ld [ %l0 + 0x5c ], %g3 <== NOT EXECUTED current = executing->current_priority; 400124dc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 400124e0: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 400124e4: 02 80 00 28 be 40012584 <== NOT EXECUTED 400124e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 400124ec: 1a 80 00 1c bcc 4001255c <== NOT EXECUTED 400124f0: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400124f4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 400124f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400124fc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 40012500: 7f ff e2 06 call 4000ad18 <== NOT EXECUTED 40012504: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED _Thread_Change_priority( 40012508: d2 04 20 5c ld [ %l0 + 0x5c ], %o1 <== NOT EXECUTED 4001250c: d0 04 20 6c ld [ %l0 + 0x6c ], %o0 <== NOT EXECUTED 40012510: 40 00 14 90 call 40017750 <_Thread_Change_priority> <== NOT EXECUTED 40012514: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012518: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 <== NOT EXECUTED 4001251c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012520: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] <== NOT EXECUTED 40012524: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 <== NOT EXECUTED 40012528: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001252c: 32 bf ff 74 bne,a 400122fc <== NOT EXECUTED 40012530: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED _Thread_Dispatch(); 40012534: 40 00 15 ab call 40017be0 <_Thread_Dispatch> <== NOT EXECUTED 40012538: 01 00 00 00 nop <== NOT EXECUTED 4001253c: 10 bf ff 70 b 400122fc <== NOT EXECUTED 40012540: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40012544: 82 00 60 01 inc %g1 <== NOT EXECUTED 40012548: c2 24 20 64 st %g1, [ %l0 + 0x64 ] <== NOT EXECUTED _ISR_Enable( level ); 4001254c: 7f ff e1 f3 call 4000ad18 <== NOT EXECUTED 40012550: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40012554: 10 bf ff 6a b 400122fc <== NOT EXECUTED 40012558: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4001255c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40012560: c8 24 20 60 st %g4, [ %l0 + 0x60 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40012564: c0 24 20 64 clr [ %l0 + 0x64 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40012568: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 4001256c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40012570: c2 20 a0 1c st %g1, [ %g2 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40012574: 7f ff e1 e9 call 4000ad18 <== NOT EXECUTED 40012578: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001257c: 10 bf ff 60 b 400122fc <== NOT EXECUTED 40012580: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40012584: 7f ff e1 e5 call 4000ad18 <== NOT EXECUTED 40012588: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 4001258c: 10 bf ff 5c b 400122fc <== NOT EXECUTED 40012590: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; _Region_Process_queue(the_region); /* unlocks allocator internally */ 40012594: 90 10 00 10 mov %l0, %o0 if ( !status ) { _RTEMS_Unlock_allocator(); return RTEMS_INVALID_ADDRESS; } the_region->number_of_used_blocks -= 1; 40012598: 82 00 7f ff add %g1, -1, %g1 _Region_Process_queue(the_region); /* unlocks allocator internally */ 4001259c: b0 10 20 00 clr %i0 400125a0: 40 00 26 71 call 4001bf64 <_Region_Process_queue> 400125a4: c2 24 20 64 st %g1, [ %l0 + 0x64 ] 400125a8: 81 c7 e0 08 ret 400125ac: 81 e8 00 00 restore 40006bcc : uint32_t count, rtems_attribute attribute_set, rtems_task_priority priority_ceiling, rtems_id *id ) { 40006bcc: 9d e3 bf 80 save %sp, -128, %sp register Semaphore_Control *the_semaphore; CORE_mutex_Attributes the_mutex_attributes; CORE_semaphore_Attributes the_semaphore_attributes; if ( !rtems_is_name_valid( name ) ) 40006bd0: aa 96 20 00 orcc %i0, 0, %l5 40006bd4: 02 80 00 12 be 40006c1c 40006bd8: b0 10 20 03 mov 3, %i0 return RTEMS_INVALID_NAME; if ( !id ) 40006bdc: 80 a7 20 00 cmp %i4, 0 40006be0: 02 80 00 0f be 40006c1c 40006be4: b0 10 20 09 mov 9, %i0 return RTEMS_NOT_DEFINED; } else #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || 40006be8: a4 8e a0 40 andcc %i2, 0x40, %l2 40006bec: 12 80 00 0e bne 40006c24 40006bf0: a0 0e a0 30 and %i2, 0x30, %l0 40006bf4: 80 8e a0 80 btst 0x80, %i2 40006bf8: 12 80 00 0c bne 40006c28 40006bfc: 80 a4 20 10 cmp %l0, 0x10 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); 40006c00: 80 a0 00 10 cmp %g0, %l0 40006c04: a2 60 3f ff subx %g0, -1, %l1 if ( _Attributes_Is_inherit_priority( attribute_set ) && _Attributes_Is_priority_ceiling( attribute_set ) ) return RTEMS_NOT_DEFINED; if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) ) 40006c08: 80 a4 60 00 cmp %l1, 0 40006c0c: 12 80 00 17 bne 40006c68 40006c10: 80 a6 60 01 cmp %i1, 1 40006c14: 08 80 00 15 bleu 40006c68 40006c18: b0 10 20 0a mov 0xa, %i0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40006c1c: 81 c7 e0 08 ret 40006c20: 81 e8 00 00 restore #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40006c24: 80 a4 20 10 cmp %l0, 0x10 40006c28: 12 80 00 0b bne 40006c54 40006c2c: 80 a4 20 20 cmp %l0, 0x20 40006c30: 80 8e a0 04 btst 4, %i2 40006c34: 02 80 00 06 be 40006c4c 40006c38: 80 a4 a0 00 cmp %l2, 0 _Attributes_Is_priority( attribute_set ) ) ) return RTEMS_NOT_DEFINED; } if ( _Attributes_Is_inherit_priority( attribute_set ) && 40006c3c: 02 bf ff f1 be 40006c00 40006c40: 80 8e a0 80 btst 0x80, %i2 40006c44: 02 bf ff f0 be 40006c04 40006c48: 80 a0 00 10 cmp %g0, %l0 0 /* Not used */ ); #endif _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40006c4c: 81 c7 e0 08 ret 40006c50: 91 e8 20 0b restore %g0, 0xb, %o0 #endif if ( _Attributes_Is_inherit_priority( attribute_set ) || _Attributes_Is_priority_ceiling( attribute_set ) ) { if ( ! ( (_Attributes_Is_binary_semaphore( attribute_set ) || 40006c54: 12 bf ff fe bne 40006c4c 40006c58: 80 8e a0 04 btst 4, %i2 40006c5c: 12 bf ff f8 bne 40006c3c 40006c60: 80 a4 a0 00 cmp %l2, 0 40006c64: 30 bf ff fa b,a 40006c4c <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40006c68: 29 10 00 6f sethi %hi(0x4001bc00), %l4 40006c6c: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006c70: 82 00 60 01 inc %g1 40006c74: c2 25 21 e0 st %g1, [ %l4 + 0x1e0 ] * the inactive chain of free semaphore control blocks. */ RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void ) { return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information ); 40006c78: 31 10 00 6f sethi %hi(0x4001bc00), %i0 40006c7c: 40 00 07 4e call 400089b4 <_Objects_Allocate> 40006c80: 90 16 20 98 or %i0, 0x98, %o0 ! 4001bc98 <_Semaphore_Information> _Thread_Disable_dispatch(); /* prevents deletion */ the_semaphore = _Semaphore_Allocate(); if ( !the_semaphore ) { 40006c84: a6 92 20 00 orcc %o0, 0, %l3 40006c88: 12 80 00 0e bne 40006cc0 40006c8c: 80 a4 60 00 cmp %l1, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006c90: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 40006c94: b0 10 20 05 mov 5, %i0 _Thread_Dispatch(); 40006c98: 82 00 7f ff add %g1, -1, %g1 40006c9c: c2 25 21 e0 st %g1, [ %l4 + 0x1e0 ] 40006ca0: c4 05 21 e0 ld [ %l4 + 0x1e0 ], %g2 40006ca4: 80 a0 a0 00 cmp %g2, 0 40006ca8: 12 80 00 04 bne 40006cb8 40006cac: 01 00 00 00 nop 40006cb0: 40 00 0d ba call 4000a398 <_Thread_Dispatch> 40006cb4: 01 00 00 00 nop 40006cb8: 81 c7 e0 08 ret 40006cbc: 81 e8 00 00 restore * If it is not a counting semaphore, then it is either a * simple binary semaphore or a more powerful mutex style binary * semaphore. */ if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { 40006cc0: 12 80 00 1e bne 40006d38 40006cc4: f4 24 e0 10 st %i2, [ %l3 + 0x10 ] CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) 40006cc8: 80 a4 a0 00 cmp %l2, 0 40006ccc: 02 80 00 39 be 40006db0 40006cd0: 80 8e a0 80 btst 0x80, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40006cd4: 82 10 20 02 mov 2, %g1 40006cd8: c2 27 bf e8 st %g1, [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; else the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_FIFO; if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { 40006cdc: 80 a4 20 10 cmp %l0, 0x10 40006ce0: 12 80 00 39 bne 40006dc4 40006ce4: 82 10 20 02 mov 2, %g1 the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40006ce8: c2 07 bf e8 ld [ %fp + -24 ], %g1 40006cec: 80 a0 60 01 cmp %g1, 1 40006cf0: 18 80 00 3d bgu 40006de4 40006cf4: c0 27 bf e0 clr [ %fp + -32 ] case CORE_MUTEX_DISCIPLINES_FIFO: case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; 40006cf8: c0 27 bf e4 clr [ %fp + -28 ] the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; mutex_status = _CORE_mutex_Initialize( 40006cfc: 82 1e 60 01 xor %i1, 1, %g1 40006d00: 80 a0 00 01 cmp %g0, %g1 } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; } the_mutex_attributes.priority_ceiling = priority_ceiling; 40006d04: f6 27 bf ec st %i3, [ %fp + -20 ] mutex_status = _CORE_mutex_Initialize( 40006d08: 94 60 3f ff subx %g0, -1, %o2 40006d0c: 90 04 e0 14 add %l3, 0x14, %o0 40006d10: 40 00 04 9c call 40007f80 <_CORE_mutex_Initialize> 40006d14: 92 07 bf e0 add %fp, -32, %o1 &the_semaphore->Core_control.mutex, &the_mutex_attributes, (count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED ); if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) { 40006d18: 80 a2 20 06 cmp %o0, 6 40006d1c: 12 80 00 14 bne 40006d6c 40006d20: 90 16 20 98 or %i0, 0x98, %o0 RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40006d24: 40 00 08 32 call 40008dec <_Objects_Free> <== NOT EXECUTED 40006d28: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006d2c: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 <== NOT EXECUTED 40006d30: 10 bf ff da b 40006c98 <== NOT EXECUTED 40006d34: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED _Semaphore_Free( the_semaphore ); _Thread_Enable_dispatch(); return RTEMS_INVALID_PRIORITY; } } else { if ( _Attributes_Is_priority( attribute_set ) ) 40006d38: 80 8e a0 04 btst 4, %i2 40006d3c: 22 80 00 04 be,a 40006d4c 40006d40: c0 27 bf f4 clr [ %fp + -12 ] the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY; 40006d44: 82 10 20 01 mov 1, %g1 40006d48: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40006d4c: 82 10 3f ff mov -1, %g1 /* * The following are just to make Purify happy. */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; 40006d50: c0 27 bf e0 clr [ %fp + -32 ] the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; 40006d54: c0 27 bf ec clr [ %fp + -20 ] _CORE_semaphore_Initialize( 40006d58: 94 10 00 19 mov %i1, %o2 /* * This effectively disables limit checking. */ the_semaphore_attributes.maximum_count = 0xFFFFFFFF; 40006d5c: c2 27 bf f0 st %g1, [ %fp + -16 ] */ the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM; _CORE_semaphore_Initialize( 40006d60: 90 04 e0 14 add %l3, 0x14, %o0 40006d64: 40 00 05 44 call 40008274 <_CORE_semaphore_Initialize> 40006d68: 92 07 bf f0 add %fp, -16, %o1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d6c: 90 16 20 98 or %i0, 0x98, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 40006d70: c6 04 e0 08 ld [ %l3 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006d74: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2 40006d78: 03 00 00 3f sethi %hi(0xfc00), %g1 40006d7c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40006d80: 82 08 c0 01 and %g3, %g1, %g1 40006d84: 80 a0 40 02 cmp %g1, %g2 40006d88: 38 80 00 06 bgu,a 40006da0 40006d8c: ea 24 e0 0c st %l5, [ %l3 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006d90: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006d94: 83 28 60 02 sll %g1, 2, %g1 40006d98: e6 20 80 01 st %l3, [ %g2 + %g1 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 40006d9c: ea 24 e0 0c st %l5, [ %l3 + 0xc ] &_Semaphore_Information, &the_semaphore->Object, (Objects_Name) name ); *id = the_semaphore->Object.id; 40006da0: c6 27 00 00 st %g3, [ %i4 ] 40006da4: c2 05 21 e0 ld [ %l4 + 0x1e0 ], %g1 40006da8: 10 bf ff bc b 40006c98 40006dac: b0 10 20 00 clr %i0 if ( !_Attributes_Is_counting_semaphore( attribute_set ) ) { CORE_mutex_Status mutex_status; if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) 40006db0: 02 80 00 08 be 40006dd0 40006db4: 80 8e a0 04 btst 4, %i2 the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; 40006db8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 40006dbc: 10 bf ff c8 b 40006cdc <== NOT EXECUTED 40006dc0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; the_mutex_attributes.only_owner_release = FALSE; 40006dc4: c0 27 bf e4 clr [ %fp + -28 ] case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; break; } } else { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS; 40006dc8: 10 bf ff cd b 40006cfc 40006dcc: c2 27 bf e0 st %g1, [ %fp + -32 ] if ( _Attributes_Is_inherit_priority( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING; else if ( _Attributes_Is_priority( attribute_set ) ) 40006dd0: 22 bf ff c3 be,a 40006cdc 40006dd4: c0 27 bf e8 clr [ %fp + -24 ] the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY; 40006dd8: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40006ddc: 10 bf ff c0 b 40006cdc <== NOT EXECUTED 40006de0: c2 27 bf e8 st %g1, [ %fp + -24 ] <== NOT EXECUTED if ( _Attributes_Is_binary_semaphore( attribute_set ) ) { the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES; switch ( the_mutex_attributes.discipline ) { 40006de4: 80 a0 60 03 cmp %g1, 3 40006de8: 18 bf ff c6 bgu 40006d00 40006dec: 82 1e 60 01 xor %i1, 1, %g1 case CORE_MUTEX_DISCIPLINES_PRIORITY: the_mutex_attributes.only_owner_release = FALSE; break; case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING: case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT: the_mutex_attributes.only_owner_release = TRUE; 40006df0: 82 10 20 01 mov 1, %g1 40006df4: 10 bf ff c2 b 40006cfc 40006df8: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006dfc : #endif rtems_status_code rtems_semaphore_delete( rtems_id id ) { 40006dfc: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40006e00: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40006e04: 92 10 00 18 mov %i0, %o1 40006e08: 94 07 bf f4 add %fp, -12, %o2 40006e0c: 40 00 08 3b call 40008ef8 <_Objects_Get> 40006e10: 90 14 20 98 or %l0, 0x98, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40006e14: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006e18: 80 a0 60 00 cmp %g1, 0 40006e1c: 12 80 00 19 bne 40006e80 40006e20: b0 10 00 08 mov %o0, %i0 40006e24: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40006e28: 84 88 60 30 andcc %g1, 0x30, %g2 40006e2c: 22 80 00 1a be,a 40006e94 40006e30: 90 02 20 14 add %o0, 0x14, %o0 if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) && 40006e34: c2 02 20 64 ld [ %o0 + 0x64 ], %g1 40006e38: 80 a0 60 00 cmp %g1, 0 40006e3c: 12 80 00 35 bne 40006f10 40006e40: 80 a0 a0 20 cmp %g2, 0x20 40006e44: 02 80 00 34 be 40006f14 40006e48: 90 06 20 14 add %i0, 0x14, %o0 40006e4c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006e50: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006e54: b0 10 20 0c mov 0xc, %i0 40006e58: 84 00 bf ff add %g2, -1, %g2 40006e5c: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006e60: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006e64: 80 a0 e0 00 cmp %g3, 0 40006e68: 12 80 00 28 bne 40006f08 40006e6c: 01 00 00 00 nop _Thread_Dispatch(); 40006e70: 40 00 0d 4a call 4000a398 <_Thread_Dispatch> 40006e74: 01 00 00 00 nop 40006e78: 81 c7 e0 08 ret 40006e7c: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40006e80: 80 a0 60 02 cmp %g1, 2 40006e84: 08 bf ff fd bleu 40006e78 40006e88: b0 10 20 04 mov 4, %i0 40006e8c: 81 c7 e0 08 ret <== NOT EXECUTED 40006e90: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED &the_semaphore->Core_control.mutex, SEMAPHORE_MP_OBJECT_WAS_DELETED, CORE_MUTEX_WAS_DELETED ); } else { _CORE_semaphore_Flush( 40006e94: 92 10 20 00 clr %o1 40006e98: 40 00 04 f3 call 40008264 <_CORE_semaphore_Flush> 40006e9c: 94 10 20 02 mov 2, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006ea0: 90 14 20 98 or %l0, 0x98, %o0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40006ea4: c2 06 20 08 ld [ %i0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006ea8: c6 12 20 10 lduh [ %o0 + 0x10 ], %g3 40006eac: 05 00 00 3f sethi %hi(0xfc00), %g2 40006eb0: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40006eb4: 82 08 40 02 and %g1, %g2, %g1 40006eb8: 80 a0 40 03 cmp %g1, %g3 40006ebc: 38 80 00 06 bgu,a 40006ed4 40006ec0: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40006ec4: c4 02 20 20 ld [ %o0 + 0x20 ], %g2 40006ec8: 83 28 60 02 sll %g1, 2, %g1 40006ecc: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40006ed0: c0 26 20 0c clr [ %i0 + 0xc ] RTEMS_INLINE_ROUTINE void _Semaphore_Free ( Semaphore_Control *the_semaphore ) { _Objects_Free( &_Semaphore_Information, &the_semaphore->Object ); 40006ed4: 40 00 07 c6 call 40008dec <_Objects_Free> 40006ed8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40006edc: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006ee0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40006ee4: b0 10 20 00 clr %i0 40006ee8: 84 00 bf ff add %g2, -1, %g2 40006eec: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40006ef0: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40006ef4: 80 a0 e0 00 cmp %g3, 0 40006ef8: 12 80 00 04 bne 40006f08 40006efc: 01 00 00 00 nop _Thread_Dispatch(); 40006f00: 40 00 0d 26 call 4000a398 <_Thread_Dispatch> 40006f04: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006f08: 81 c7 e0 08 ret 40006f0c: 81 e8 00 00 restore !_Attributes_Is_simple_binary_semaphore( the_semaphore->attribute_set ) ) { _Thread_Enable_dispatch(); return RTEMS_RESOURCE_IN_USE; } _CORE_mutex_Flush( 40006f10: 90 06 20 14 add %i0, 0x14, %o0 40006f14: 92 10 20 00 clr %o1 40006f18: 40 00 04 16 call 40007f70 <_CORE_mutex_Flush> 40006f1c: 94 10 20 04 mov 4, %o2 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40006f20: 10 bf ff e1 b 40006ea4 40006f24: 90 14 20 98 or %l0, 0x98, %o0 400073c8 : #endif rtems_status_code rtems_semaphore_flush( rtems_id id ) { 400073c8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 400073cc: 11 10 00 77 sethi %hi(0x4001dc00), %o0 400073d0: 92 10 00 18 mov %i0, %o1 400073d4: 90 12 23 00 or %o0, 0x300, %o0 400073d8: 40 00 08 9b call 40009644 <_Objects_Get> 400073dc: 94 07 bf f4 add %fp, -12, %o2 register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400073e0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400073e4: 80 a0 60 00 cmp %g1, 0 400073e8: 12 80 00 16 bne 40007440 400073ec: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 400073f0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 400073f4: 80 88 60 30 btst 0x30, %g1 400073f8: 12 80 00 16 bne 40007450 400073fc: 90 02 20 14 add %o0, 0x14, %o0 &the_semaphore->Core_control.mutex, SEND_OBJECT_WAS_DELETED, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT ); } else { _CORE_semaphore_Flush( 40007400: 92 10 20 00 clr %o1 <== NOT EXECUTED 40007404: 40 00 05 6b call 400089b0 <_CORE_semaphore_Flush> <== NOT EXECUTED 40007408: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000740c: 03 10 00 78 sethi %hi(0x4001e000), %g1 40007410: c4 00 60 50 ld [ %g1 + 0x50 ], %g2 ! 4001e050 <_Thread_Dispatch_disable_level> 40007414: b0 10 20 00 clr %i0 40007418: 84 00 bf ff add %g2, -1, %g2 4000741c: c4 20 60 50 st %g2, [ %g1 + 0x50 ] 40007420: c6 00 60 50 ld [ %g1 + 0x50 ], %g3 40007424: 80 a0 e0 00 cmp %g3, 0 40007428: 12 80 00 04 bne 40007438 4000742c: 01 00 00 00 nop _Thread_Dispatch(); 40007430: 40 00 0d 71 call 4000a9f4 <_Thread_Dispatch> 40007434: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007438: 81 c7 e0 08 ret 4000743c: 81 e8 00 00 restore { register Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 40007440: 08 bf ff fe bleu 40007438 <== NOT EXECUTED 40007444: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED 40007448: 81 c7 e0 08 ret <== NOT EXECUTED 4000744c: 91 e8 20 19 restore %g0, 0x19, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Flush( 40007450: 92 10 20 00 clr %o1 40007454: 40 00 04 9a call 400086bc <_CORE_mutex_Flush> 40007458: 94 10 20 01 mov 1, %o2 4000745c: 30 bf ff ec b,a 4000740c 40006f28 : rtems_status_code rtems_semaphore_obtain( rtems_id id, uint32_t option_set, rtems_interval timeout ) { 40006f28: 9d e3 bf 90 save %sp, -112, %sp Objects_Id id, Objects_Locations *location, ISR_Level *level ) { return (Semaphore_Control *) 40006f2c: 11 10 00 6f sethi %hi(0x4001bc00), %o0 40006f30: 92 10 00 18 mov %i0, %o1 40006f34: 90 12 20 98 or %o0, 0x98, %o0 40006f38: 94 07 bf f4 add %fp, -12, %o2 40006f3c: 40 00 07 d1 call 40008e80 <_Objects_Get_isr_disable> 40006f40: 96 07 bf f0 add %fp, -16, %o3 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 40006f44: c2 07 bf f4 ld [ %fp + -12 ], %g1 40006f48: 80 a0 60 00 cmp %g1, 0 40006f4c: 12 80 00 19 bne 40006fb0 40006f50: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 40006f54: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40006f58: 80 88 60 30 btst 0x30, %g1 40006f5c: 12 80 00 1b bne 40006fc8 40006f60: 23 10 00 6f sethi %hi(0x4001bc00), %l1 Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40006f64: 27 10 00 6f sethi %hi(0x4001bc00), %l3 40006f68: e4 04 e2 bc ld [ %l3 + 0x2bc ], %l2 ! 4001bebc <_Thread_Executing> Watchdog_Interval timeout, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 40006f6c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; 40006f70: c0 24 a0 34 clr [ %l2 + 0x34 ] if ( the_semaphore->count != 0 ) { 40006f74: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 40006f78: 80 a0 60 00 cmp %g1, 0 40006f7c: 12 80 00 8f bne 400071b8 40006f80: 80 8e 60 01 btst 1, %i1 the_semaphore->count -= 1; _ISR_Enable( level ); return; } if ( !wait ) { 40006f84: 02 80 00 73 be 40007150 40006f88: 01 00 00 00 nop _ISR_Enable( level ); 40006f8c: 7f ff ec 1b call 40001ff8 40006f90: 01 00 00 00 nop executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT; 40006f94: 82 10 20 01 mov 1, %g1 ! 1 40006f98: c2 24 a0 34 st %g1, [ %l2 + 0x34 ] id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 40006f9c: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 40006fa0: 40 00 00 f4 call 40007370 <_Semaphore_Translate_core_semaphore_return_code> 40006fa4: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006fa8: 81 c7 e0 08 ret 40006fac: 91 e8 00 08 restore %g0, %o0, %o0 register Semaphore_Control *the_semaphore; Objects_Locations location; ISR_Level level; the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level ); switch ( location ) { 40006fb0: 80 a0 60 02 cmp %g1, 2 40006fb4: 08 bf ff fd bleu 40006fa8 40006fb8: 90 10 20 04 mov 4, %o0 40006fbc: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40006fc0: 81 c7 e0 08 ret <== NOT EXECUTED 40006fc4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40006fc8: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40006fcc: 80 a0 60 00 cmp %g1, 0 40006fd0: 02 80 00 0e be 40007008 40006fd4: 27 10 00 6f sethi %hi(0x4001bc00), %l3 40006fd8: 80 8e 60 01 btst 1, %i1 40006fdc: 12 80 00 0c bne 4000700c 40006fe0: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 40006fe4: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40006fe8: c4 00 63 c0 ld [ %g1 + 0x3c0 ], %g2 ! 4001bfc0 <_System_state_Current> 40006fec: 80 a0 a0 01 cmp %g2, 1 40006ff0: 08 80 00 07 bleu 4000700c 40006ff4: 90 10 20 00 clr %o0 40006ff8: 92 10 20 00 clr %o1 <== NOT EXECUTED 40006ffc: 40 00 06 41 call 40008900 <_Internal_error_Occurred> <== NOT EXECUTED 40007000: 94 10 20 12 mov 0x12, %o2 <== NOT EXECUTED Thread_Control *executing; ISR_Level level = *level_p; /* disabled when you get here */ executing = _Thread_Executing; 40007004: 27 10 00 6f sethi %hi(0x4001bc00), %l3 <== NOT EXECUTED 40007008: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 ! 4001bebc <_Thread_Executing> CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { Thread_Control *executing; ISR_Level level = *level_p; 4000700c: d0 07 bf f0 ld [ %fp + -16 ], %o0 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 40007010: c0 20 e0 34 clr [ %g3 + 0x34 ] if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 40007014: c2 04 20 64 ld [ %l0 + 0x64 ], %g1 40007018: 80 a0 60 00 cmp %g1, 0 4000701c: 22 80 00 37 be,a 400070f8 40007020: c2 04 20 70 ld [ %l0 + 0x70 ], %g1 the_mutex->lock = CORE_MUTEX_LOCKED; 40007024: c0 24 20 64 clr [ %l0 + 0x64 ] the_mutex->holder = executing; 40007028: c6 24 20 70 st %g3, [ %l0 + 0x70 ] the_mutex->holder_id = executing->Object.id; 4000702c: c2 00 e0 08 ld [ %g3 + 8 ], %g1 */ RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority( CORE_mutex_Attributes *the_attribute ) { return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT; 40007030: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; 40007034: 88 10 20 01 mov 1, %g4 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 40007038: c2 24 20 74 st %g1, [ %l0 + 0x74 ] the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 4000703c: 80 a0 a0 02 cmp %g2, 2 40007040: 12 80 00 24 bne 400070d0 40007044: c8 24 20 68 st %g4, [ %l0 + 0x68 ] _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; 40007048: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 4000704c: 82 00 60 01 inc %g1 40007050: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 40007054: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 40007058: 80 a0 a0 03 cmp %g2, 3 4000705c: 12 80 00 20 bne 400070dc 40007060: 01 00 00 00 nop */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 40007064: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED current = executing->current_priority; 40007068: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 <== NOT EXECUTED if ( current == ceiling ) { 4000706c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40007070: 02 80 00 79 be 40007254 <== NOT EXECUTED 40007074: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED _ISR_Enable( level ); return 0; } if ( current > ceiling ) { 40007078: 1a 80 00 6d bcc 4000722c <== NOT EXECUTED 4000707c: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007080: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 40007084: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007088: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED _Thread_Disable_dispatch(); _ISR_Enable( level ); 4000708c: 7f ff eb db call 40001ff8 <== NOT EXECUTED 40007090: 01 00 00 00 nop <== NOT EXECUTED _Thread_Change_priority( 40007094: d2 04 20 60 ld [ %l0 + 0x60 ], %o1 <== NOT EXECUTED 40007098: d0 04 20 70 ld [ %l0 + 0x70 ], %o0 <== NOT EXECUTED 4000709c: 40 00 0b 9b call 40009f08 <_Thread_Change_priority> <== NOT EXECUTED 400070a0: 94 10 20 00 clr %o2 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400070a4: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 <== NOT EXECUTED 400070a8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 400070ac: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] <== NOT EXECUTED 400070b0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 <== NOT EXECUTED 400070b4: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400070b8: 32 80 00 0c bne,a 400070e8 <== NOT EXECUTED 400070bc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 400070c0: 40 00 0c b6 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 400070c4: 01 00 00 00 nop <== NOT EXECUTED id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 400070c8: 10 80 00 08 b 400070e8 <== NOT EXECUTED 400070cc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 400070d0: 80 a0 a0 03 cmp %g2, 3 <== NOT EXECUTED 400070d4: 22 bf ff de be,a 4000704c <== NOT EXECUTED 400070d8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED _CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) executing->resource_count++; if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { _ISR_Enable( level ); 400070dc: 7f ff eb c7 call 40001ff8 400070e0: 01 00 00 00 nop 400070e4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 400070e8: 40 00 00 98 call 40007348 <_Semaphore_Translate_core_mutex_return_code> 400070ec: d0 00 60 34 ld [ %g1 + 0x34 ], %o0 return _Semaphore_Translate_core_semaphore_return_code( _Thread_Executing->Wait.return_code ); } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400070f0: 81 c7 e0 08 ret 400070f4: 91 e8 00 08 restore %g0, %o0, %o0 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 400070f8: 80 a0 40 03 cmp %g1, %g3 400070fc: 12 80 00 0d bne 40007130 40007100: 80 8e 60 01 btst 1, %i1 switch ( the_mutex->Attributes.lock_nesting_behavior ) { 40007104: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 40007108: 80 a0 60 00 cmp %g1, 0 4000710c: 12 80 00 40 bne 4000720c 40007110: 80 a0 60 01 cmp %g1, 1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 40007114: c2 04 20 68 ld [ %l0 + 0x68 ], %g1 40007118: 82 00 60 01 inc %g1 4000711c: c2 24 20 68 st %g1, [ %l0 + 0x68 ] _ISR_Enable( level ); 40007120: 7f ff eb b6 call 40001ff8 40007124: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40007128: 10 bf ff f0 b 400070e8 4000712c: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 40007130: 02 80 00 28 be 400071d0 40007134: c6 04 e2 bc ld [ %l3 + 0x2bc ], %g3 40007138: 7f ff eb b0 call 40001ff8 4000713c: d0 07 bf f0 ld [ %fp + -16 ], %o0 40007140: c4 04 e2 bc ld [ %l3 + 0x2bc ], %g2 40007144: 82 10 20 01 mov 1, %g1 40007148: 10 bf ff e7 b 400070e4 4000714c: c2 20 a0 34 st %g1, [ %g2 + 0x34 ] rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007150: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40007154: 82 00 60 01 inc %g1 40007158: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 4000715c: 82 10 20 01 mov 1, %g1 40007160: c2 24 20 44 st %g1, [ %l0 + 0x44 ] } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; executing->Wait.id = id; 40007164: f0 24 a0 20 st %i0, [ %l2 + 0x20 ] return; } _Thread_Disable_dispatch(); _Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue ); executing->Wait.queue = &the_semaphore->Wait_queue; 40007168: a0 04 20 14 add %l0, 0x14, %l0 4000716c: e0 24 a0 44 st %l0, [ %l2 + 0x44 ] executing->Wait.id = id; _ISR_Enable( level ); 40007170: 7f ff eb a2 call 40001ff8 40007174: 01 00 00 00 nop _Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout ); 40007178: 90 10 00 10 mov %l0, %o0 4000717c: 92 10 00 1a mov %i2, %o1 40007180: 15 10 00 2b sethi %hi(0x4000ac00), %o2 40007184: 40 00 0d f5 call 4000a958 <_Thread_queue_Enqueue_with_handler> 40007188: 94 12 a2 98 or %o2, 0x298, %o2 ! 4000ae98 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000718c: c2 04 61 e0 ld [ %l1 + 0x1e0 ], %g1 40007190: 82 00 7f ff add %g1, -1, %g1 40007194: c2 24 61 e0 st %g1, [ %l1 + 0x1e0 ] 40007198: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 4000719c: 80 a0 a0 00 cmp %g2, 0 400071a0: 32 bf ff 80 bne,a 40006fa0 400071a4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED _Thread_Dispatch(); 400071a8: 40 00 0c 7c call 4000a398 <_Thread_Dispatch> 400071ac: 01 00 00 00 nop id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, &level ); return _Semaphore_Translate_core_semaphore_return_code( 400071b0: 10 bf ff 7c b 40006fa0 400071b4: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL; if ( the_semaphore->count != 0 ) { the_semaphore->count -= 1; 400071b8: 82 00 7f ff add %g1, -1, %g1 400071bc: c2 24 20 5c st %g1, [ %l0 + 0x5c ] _ISR_Enable( level ); 400071c0: 7f ff eb 8e call 40001ff8 400071c4: 01 00 00 00 nop 400071c8: 10 bf ff 76 b 40006fa0 400071cc: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400071d0: c4 04 61 e0 ld [ %l1 + 0x1e0 ], %g2 400071d4: 82 10 20 01 mov 1, %g1 400071d8: c2 24 20 44 st %g1, [ %l0 + 0x44 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { _CORE_mutex_Seize( 400071dc: f0 20 e0 20 st %i0, [ %g3 + 0x20 ] 400071e0: 84 00 a0 01 inc %g2 400071e4: a0 04 20 14 add %l0, 0x14, %l0 400071e8: c4 24 61 e0 st %g2, [ %l1 + 0x1e0 ] 400071ec: e0 20 e0 44 st %l0, [ %g3 + 0x44 ] 400071f0: 7f ff eb 82 call 40001ff8 400071f4: d0 07 bf f0 ld [ %fp + -16 ], %o0 400071f8: 90 10 00 10 mov %l0, %o0 400071fc: 40 00 03 9a call 40008064 <_CORE_mutex_Seize_interrupt_blocking> 40007200: 92 10 00 1a mov %i2, %o1 id, ((_Options_Is_no_wait( option_set )) ? FALSE : TRUE), timeout, level ); return _Semaphore_Translate_core_mutex_return_code( 40007204: 10 bf ff b9 b 400070e8 40007208: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { switch ( the_mutex->Attributes.lock_nesting_behavior ) { 4000720c: 12 bf ff c9 bne 40007130 40007210: 80 8e 60 01 btst 1, %i1 case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; _ISR_Enable( level ); return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 40007214: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40007218: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED _ISR_Enable( level ); 4000721c: 7f ff eb 77 call 40001ff8 <== NOT EXECUTED 40007220: 01 00 00 00 nop <== NOT EXECUTED 40007224: 10 bf ff b1 b 400070e8 <== NOT EXECUTED 40007228: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 4000722c: c2 20 e0 34 st %g1, [ %g3 + 0x34 ] <== NOT EXECUTED the_mutex->lock = CORE_MUTEX_UNLOCKED; 40007230: c8 24 20 64 st %g4, [ %l0 + 0x64 ] <== NOT EXECUTED the_mutex->nest_count = 0; /* undo locking above */ 40007234: c0 24 20 68 clr [ %l0 + 0x68 ] <== NOT EXECUTED executing->resource_count--; /* undo locking above */ 40007238: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED 4000723c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007240: c2 20 e0 1c st %g1, [ %g3 + 0x1c ] <== NOT EXECUTED _ISR_Enable( level ); 40007244: 7f ff eb 6d call 40001ff8 <== NOT EXECUTED 40007248: 01 00 00 00 nop <== NOT EXECUTED 4000724c: 10 bf ff a7 b 400070e8 <== NOT EXECUTED 40007250: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; current = executing->current_priority; if ( current == ceiling ) { _ISR_Enable( level ); 40007254: 7f ff eb 69 call 40001ff8 <== NOT EXECUTED 40007258: 01 00 00 00 nop <== NOT EXECUTED 4000725c: 10 bf ff a3 b 400070e8 <== NOT EXECUTED 40007260: c2 04 e2 bc ld [ %l3 + 0x2bc ], %g1 <== NOT EXECUTED 40007264 : #endif rtems_status_code rtems_semaphore_release( rtems_id id ) { 40007264: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get ( Objects_Id id, Objects_Locations *location ) { return (Semaphore_Control *) 40007268: 11 10 00 6f sethi %hi(0x4001bc00), %o0 4000726c: 92 10 00 18 mov %i0, %o1 40007270: 90 12 20 98 or %o0, 0x98, %o0 40007274: 40 00 07 21 call 40008ef8 <_Objects_Get> 40007278: 94 07 bf f4 add %fp, -12, %o2 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 4000727c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007280: 80 a0 60 00 cmp %g1, 0 40007284: 12 80 00 16 bne 400072dc 40007288: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) { 4000728c: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007290: 80 88 60 30 btst 0x30, %g1 40007294: 02 80 00 17 be 400072f0 40007298: 92 10 00 18 mov %i0, %o1 mutex_status = _CORE_mutex_Surrender( 4000729c: 94 10 20 00 clr %o2 400072a0: 40 00 03 95 call 400080f4 <_CORE_mutex_Surrender> 400072a4: 90 02 20 14 add %o0, 0x14, %o0 400072a8: b0 10 00 08 mov %o0, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400072ac: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400072b0: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 400072b4: 84 00 bf ff add %g2, -1, %g2 400072b8: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 400072bc: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 400072c0: 80 a0 e0 00 cmp %g3, 0 400072c4: 02 80 00 1e be 4000733c 400072c8: 01 00 00 00 nop &the_semaphore->Core_control.mutex, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); 400072cc: 40 00 00 1f call 40007348 <_Semaphore_Translate_core_mutex_return_code> 400072d0: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400072d4: 81 c7 e0 08 ret 400072d8: 91 e8 00 08 restore %g0, %o0, %o0 Objects_Locations location; CORE_mutex_Status mutex_status; CORE_semaphore_Status semaphore_status; the_semaphore = _Semaphore_Get( id, &location ); switch ( location ) { 400072dc: 08 bf ff fe bleu 400072d4 400072e0: 90 10 20 04 mov 4, %o0 400072e4: 90 10 20 19 mov 0x19, %o0 <== NOT EXECUTED _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400072e8: 81 c7 e0 08 ret <== NOT EXECUTED 400072ec: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return _Semaphore_Translate_core_mutex_return_code( mutex_status ); } else { semaphore_status = _CORE_semaphore_Surrender( 400072f0: 94 10 20 00 clr %o2 400072f4: 40 00 03 ef call 400082b0 <_CORE_semaphore_Surrender> 400072f8: 90 02 20 14 add %o0, 0x14, %o0 400072fc: b0 10 00 08 mov %o0, %i0 40007300: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007304: c4 00 61 e0 ld [ %g1 + 0x1e0 ], %g2 ! 4001bde0 <_Thread_Dispatch_disable_level> 40007308: 84 00 bf ff add %g2, -1, %g2 4000730c: c4 20 61 e0 st %g2, [ %g1 + 0x1e0 ] 40007310: c6 00 61 e0 ld [ %g1 + 0x1e0 ], %g3 40007314: 80 a0 e0 00 cmp %g3, 0 40007318: 02 80 00 06 be 40007330 4000731c: 01 00 00 00 nop &the_semaphore->Core_control.semaphore, id, MUTEX_MP_SUPPORT ); _Thread_Enable_dispatch(); return 40007320: 40 00 00 14 call 40007370 <_Semaphore_Translate_core_semaphore_return_code> 40007324: 90 10 00 18 mov %i0, %o0 _Semaphore_Translate_core_semaphore_return_code( semaphore_status ); } } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007328: 81 c7 e0 08 ret 4000732c: 91 e8 00 08 restore %g0, %o0, %o0 _Thread_Dispatch(); 40007330: 40 00 0c 1a call 4000a398 <_Thread_Dispatch> 40007334: 01 00 00 00 nop 40007338: 30 bf ff fa b,a 40007320 4000733c: 40 00 0c 17 call 4000a398 <_Thread_Dispatch> 40007340: 01 00 00 00 nop 40007344: 30 bf ff e2 b,a 400072cc 40019674 : */ void rtems_shutdown_executive( uint32_t result ) { 40019674: 9d e3 bf 98 save %sp, -104, %sp if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) { 40019678: 33 10 00 6f sethi %hi(0x4001bc00), %i1 4001967c: c2 06 63 c0 ld [ %i1 + 0x3c0 ], %g1 ! 4001bfc0 <_System_state_Current> 40019680: 80 a0 60 04 cmp %g1, 4 40019684: 02 80 00 0c be 400196b4 40019688: 11 10 00 6a sethi %hi(0x4001a800), %o0 #if defined(__USE_INIT_FINI__) extern void _fini( void ); atexit( _fini ); 4001968c: 7f ff da 31 call 4000ff50 40019690: 90 12 22 04 or %o0, 0x204, %o0 ! 4001aa04 <_fini> * routine which initialized the system. */ RTEMS_INLINE_ROUTINE void _Thread_Stop_multitasking( void ) { _Context_Switch( &_Thread_Executing->Registers, &_Thread_BSP_context ); 40019694: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40019698: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> 4001969c: 84 10 20 04 mov 4, %g2 400196a0: b0 06 20 e0 add %i0, 0xe0, %i0 400196a4: c4 26 63 c0 st %g2, [ %i1 + 0x3c0 ] 400196a8: 33 10 00 6f sethi %hi(0x4001bc00), %i1 400196ac: 7f ff c9 62 call 4000bc34 <_CPU_Context_switch> 400196b0: 93 ee 61 58 restore %i1, 0x158, %o1 400196b4: 81 c7 e0 08 ret <== NOT EXECUTED 400196b8: 81 e8 00 00 restore <== NOT EXECUTED 40012db0 : rtems_status_code rtems_signal_send( Objects_Id id, rtems_signal_set signal_set ) { 40012db0: 9d e3 bf 90 save %sp, -112, %sp 40012db4: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; ASR_Information *asr; if ( !signal_set ) 40012db8: 80 a6 60 00 cmp %i1, 0 40012dbc: 02 80 00 1b be 40012e28 40012dc0: b0 10 20 0a mov 0xa, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40012dc4: 80 a2 60 00 cmp %o1, 0 40012dc8: 12 80 00 1a bne 40012e30 40012dcc: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40012dd0: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012dd4: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40012dd8: 82 00 60 01 inc %g1 40012ddc: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40012de0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40012de4: e0 00 63 cc ld [ %g1 + 0x3cc ], %l0 ! 40035fcc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40012de8: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; 40012dec: f0 04 21 6c ld [ %l0 + 0x16c ], %i0 asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { 40012df0: c2 06 20 4c ld [ %i0 + 0x4c ], %g1 40012df4: 80 a0 60 00 cmp %g1, 0 40012df8: 32 80 00 2c bne,a 40012ea8 40012dfc: c2 06 20 48 ld [ %i0 + 0x48 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012e00: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012e04: b0 10 20 0b mov 0xb, %i0 40012e08: 82 00 7f ff add %g1, -1, %g1 40012e0c: c2 24 62 f0 st %g1, [ %l1 + 0x2f0 ] 40012e10: c4 04 62 f0 ld [ %l1 + 0x2f0 ], %g2 40012e14: 80 a0 a0 00 cmp %g2, 0 40012e18: 12 80 00 0b bne 40012e44 40012e1c: 01 00 00 00 nop _Thread_Dispatch(); 40012e20: 40 00 13 70 call 40017be0 <_Thread_Dispatch> 40012e24: 01 00 00 00 nop 40012e28: 81 c7 e0 08 ret 40012e2c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40012e30: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40012e34: 80 a0 a0 04 cmp %g2, 4 40012e38: 08 80 00 05 bleu 40012e4c 40012e3c: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40012e40: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_NOT_DEFINED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40012e44: 81 c7 e0 08 ret 40012e48: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40012e4c: 80 a0 60 01 cmp %g1, 1 40012e50: 12 bf ff f6 bne 40012e28 40012e54: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40012e58: 83 28 a0 02 sll %g2, 2, %g1 40012e5c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40012e60: 84 10 a2 50 or %g2, 0x250, %g2 ! 40035e50 <_Objects_Information_table> 40012e64: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40012e68: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40012e6c: 80 a2 20 00 cmp %o0, 0 40012e70: 02 bf ff f5 be 40012e44 40012e74: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40012e78: 40 00 0e 32 call 40016740 <_Objects_Get> 40012e7c: 94 07 bf f4 add %fp, -12, %o2 if ( !signal_set ) return RTEMS_INVALID_NUMBER; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40012e80: c2 07 bf f4 ld [ %fp + -12 ], %g1 40012e84: a0 10 00 08 mov %o0, %l0 40012e88: 80 a0 60 00 cmp %g1, 0 40012e8c: 02 bf ff d8 be 40012dec 40012e90: 23 10 00 d7 sethi %hi(0x40035c00), %l1 40012e94: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40012e98: 18 bf ff e4 bgu 40012e28 <== NOT EXECUTED 40012e9c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40012ea0: 81 c7 e0 08 ret <== NOT EXECUTED 40012ea4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; if ( ! _ASR_Is_null_handler( asr->handler ) ) { if ( asr->is_enabled ) { 40012ea8: 80 a0 60 00 cmp %g1, 0 40012eac: 02 80 00 19 be 40012f10 40012eb0: 01 00 00 00 nop rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40012eb4: 7f ff df 95 call 4000ad08 40012eb8: 01 00 00 00 nop *signal_set |= signals; 40012ebc: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 40012ec0: 82 10 40 19 or %g1, %i1, %g1 40012ec4: c2 26 20 54 st %g1, [ %i0 + 0x54 ] _ISR_Enable( _level ); 40012ec8: 7f ff df 94 call 4000ad18 40012ecc: 01 00 00 00 nop _ASR_Post_signals( signal_set, &asr->signals_posted ); the_thread->do_post_task_switch_extension = TRUE; if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40012ed0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40012ed4: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 40035fb4 <_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; 40012ed8: 86 10 20 01 mov 1, %g3 if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) 40012edc: 80 a0 a0 00 cmp %g2, 0 40012ee0: 02 80 00 09 be 40012f04 40012ee4: c6 24 20 78 st %g3, [ %l0 + 0x78 ] 40012ee8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40012eec: c4 00 63 cc ld [ %g1 + 0x3cc ], %g2 ! 40035fcc <_Thread_Executing> <== NOT EXECUTED 40012ef0: 80 a4 00 02 cmp %l0, %g2 <== NOT EXECUTED 40012ef4: 12 80 00 04 bne 40012f04 <== NOT EXECUTED 40012ef8: 01 00 00 00 nop <== NOT EXECUTED _ISR_Signals_to_thread_executing = TRUE; 40012efc: 03 10 00 d8 sethi %hi(0x40036000), %g1 <== NOT EXECUTED 40012f00: c6 20 60 78 st %g3, [ %g1 + 0x78 ] ! 40036078 <_ISR_Signals_to_thread_executing> <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40012f04: c2 04 62 f0 ld [ %l1 + 0x2f0 ], %g1 40012f08: 10 bf ff c0 b 40012e08 40012f0c: b0 10 20 00 clr %i0 rtems_signal_set *signal_set ) { ISR_Level _level; _ISR_Disable( _level ); 40012f10: 7f ff df 7e call 4000ad08 40012f14: 01 00 00 00 nop *signal_set |= signals; 40012f18: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 40012f1c: 82 10 40 19 or %g1, %i1, %g1 40012f20: c2 26 20 58 st %g1, [ %i0 + 0x58 ] _ISR_Enable( _level ); 40012f24: 7f ff df 7d call 4000ad18 40012f28: 01 00 00 00 nop 40012f2c: 30 bf ff f6 b,a 40012f04 40003aec : /* * Check if blown */ boolean rtems_stack_checker_is_blown( void ) { 40003aec: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 40003af0: 21 10 00 81 sethi %hi(0x40020400), %l0 <== NOT EXECUTED 40003af4: c2 04 21 ec ld [ %l0 + 0x1ec ], %g1 ! 400205ec <_Thread_Executing> <== NOT EXECUTED ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40003af8: d0 00 60 d4 ld [ %g1 + 0xd4 ], %o0 <== NOT EXECUTED 40003afc: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED 40003b00: 0a 80 00 07 bcs 40003b1c <== NOT EXECUTED 40003b04: b0 10 20 00 clr %i0 <== NOT EXECUTED 40003b08: c2 00 60 d0 ld [ %g1 + 0xd0 ], %g1 <== NOT EXECUTED 40003b0c: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED 40003b10: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED 40003b14: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED 40003b18: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 40003b1c: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED 40003b20: c4 00 61 68 ld [ %g1 + 0x168 ], %g2 ! 40020168 <== NOT EXECUTED 40003b24: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40003b28: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003b2c: 12 80 00 0d bne 40003b60 <== NOT EXECUTED 40003b30: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } /* * The Stack Pointer and the Pattern Area are OK so return FALSE. */ if ( sp_ok && pattern_ok ) 40003b34: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED 40003b38: 22 80 00 06 be,a 40003b50 <== NOT EXECUTED 40003b3c: d0 04 21 ec ld [ %l0 + 0x1ec ], %o0 <== NOT EXECUTED 40003b40: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED 40003b44: 12 80 00 05 bne 40003b58 <== NOT EXECUTED 40003b48: b0 10 20 00 clr %i0 <== NOT EXECUTED return FALSE; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 40003b4c: d0 04 21 ec ld [ %l0 + 0x1ec ], %o0 <== NOT EXECUTED 40003b50: 7f ff ff cd call 40003a84 <== NOT EXECUTED 40003b54: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED return TRUE; } 40003b58: 81 c7 e0 08 ret <== NOT EXECUTED 40003b5c: 81 e8 00 00 restore <== NOT EXECUTED /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { pattern_ok = (!memcmp( 40003b60: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED 40003b64: 13 10 00 80 sethi %hi(0x40020000), %o1 <== NOT EXECUTED 40003b68: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40003b6c: 40 00 38 92 call 40011db4 <== NOT EXECUTED 40003b70: 92 12 63 24 or %o1, 0x324, %o1 <== NOT EXECUTED 40003b74: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40003b78: 92 60 3f ff subx %g0, -1, %o1 <== NOT EXECUTED 40003b7c: 10 bf ff ee b 40003b34 <== NOT EXECUTED 40003b80: 82 10 00 09 mov %o1, %g1 <== NOT EXECUTED 40003a68 : } void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 40003a68: 13 10 00 14 sethi %hi(0x40005000), %o1 <== NOT EXECUTED 40003a6c: 90 10 20 00 clr %o0 <== NOT EXECUTED 40003a70: 92 12 63 e0 or %o1, 0x3e0, %o1 <== NOT EXECUTED 40003a74: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40003a78: 7f ff ff e2 call 40003a00 <== NOT EXECUTED 40003a7c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40003a80: 01 00 00 00 nop 40003a00 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 40003a00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if (Stack_check_Initialized == 0) 40003a04: 03 10 00 80 sethi %hi(0x40020000), %g1 <== NOT EXECUTED 40003a08: c4 00 61 68 ld [ %g1 + 0x168 ], %g2 ! 40020168 <== NOT EXECUTED 40003a0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40003a10: 02 80 00 14 be 40003a60 <== NOT EXECUTED 40003a14: 23 10 00 80 sethi %hi(0x40020000), %l1 <== NOT EXECUTED return; print_context = context; print_handler = print; 40003a18: 21 10 00 80 sethi %hi(0x40020000), %l0 <== NOT EXECUTED ) { if (Stack_check_Initialized == 0) return; print_context = context; 40003a1c: f0 24 61 6c st %i0, [ %l1 + 0x16c ] <== NOT EXECUTED print_handler = print; 40003a20: f2 24 21 70 st %i1, [ %l0 + 0x170 ] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 40003a24: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003a28: 13 10 00 75 sethi %hi(0x4001d400), %o1 <== NOT EXECUTED 40003a2c: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003a30: 92 12 61 30 or %o1, 0x130, %o1 ! 4001d530 <== NOT EXECUTED (*print)( context, 40003a34: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40003a38: 13 10 00 75 sethi %hi(0x4001d400), %o1 <== NOT EXECUTED 40003a3c: 9f c6 40 00 call %i1 <== NOT EXECUTED 40003a40: 92 12 61 48 or %o1, 0x148, %o1 ! 4001d548 <== NOT EXECUTED " ID NAME LOW HIGH AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 40003a44: 11 10 00 0e sethi %hi(0x40003800), %o0 <== NOT EXECUTED 40003a48: 40 00 18 bd call 40009d3c <== NOT EXECUTED 40003a4c: 90 12 20 f0 or %o0, 0xf0, %o0 ! 400038f0 <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 40003a50: 7f ff ff a8 call 400038f0 <== NOT EXECUTED 40003a54: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED print_context = NULL; 40003a58: c0 24 61 6c clr [ %l1 + 0x16c ] <== NOT EXECUTED print_handler = NULL; 40003a5c: c0 24 21 70 clr [ %l0 + 0x170 ] <== NOT EXECUTED 40003a60: 81 c7 e0 08 ret <== NOT EXECUTED 40003a64: 81 e8 00 00 restore <== NOT EXECUTED 40003c54 : */ void rtems_stack_checker_switch_extension( Thread_Control *running, Thread_Control *heir ) { 40003c54: 9d e3 bf 98 save %sp, -104, %sp Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; boolean sp_ok; boolean pattern_ok = TRUE; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 40003c58: c4 06 20 d4 ld [ %i0 + 0xd4 ], %g2 ) { void *sp = __builtin_frame_address(0); #if defined(__GNUC__) if ( sp < the_stack->area ) { 40003c5c: 80 a7 80 02 cmp %fp, %g2 40003c60: 0a 80 00 07 bcs 40003c7c 40003c64: 90 00 a0 08 add %g2, 8, %o0 return FALSE; } if ( sp > (the_stack->area + the_stack->size) ) { 40003c68: c2 06 20 d0 ld [ %i0 + 0xd0 ], %g1 40003c6c: 82 00 80 01 add %g2, %g1, %g1 40003c70: 80 a7 80 01 cmp %fp, %g1 40003c74: 28 80 00 0a bleu,a 40003c9c 40003c78: 13 10 00 80 sethi %hi(0x40020000), %o1 /* * 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, 40003c7c: 13 10 00 80 sethi %hi(0x40020000), %o1 <== NOT EXECUTED 40003c80: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED 40003c84: 40 00 38 4c call 40011db4 <== NOT EXECUTED 40003c88: 92 12 63 24 or %o1, 0x324, %o1 <== NOT EXECUTED 40003c8c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED 40003c90: b2 60 3f ff subx %g0, -1, %i1 <== NOT EXECUTED (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40003c94: 7f ff ff 7c call 40003a84 <== NOT EXECUTED 40003c98: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 40003c9c: 94 10 20 10 mov 0x10, %o2 40003ca0: 40 00 38 45 call 40011db4 40003ca4: 92 12 63 24 or %o1, 0x324, %o1 40003ca8: 80 a2 20 00 cmp %o0, 0 40003cac: 02 80 00 04 be 40003cbc 40003cb0: 01 00 00 00 nop (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( running, pattern_ok ); 40003cb4: 7f ff ff 74 call 40003a84 <== NOT EXECUTED 40003cb8: 93 e8 20 00 restore %g0, 0, %o1 <== NOT EXECUTED 40003cbc: 81 c7 e0 08 ret 40003cc0: 81 e8 00 00 restore 40009b60 : const char * rtems_status_text( rtems_status_code status ) { 40009b60: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED return rtems_assoc_name_by_local(rtems_status_assoc, status); 40009b64: 11 10 00 ae sethi %hi(0x4002b800), %o0 <== NOT EXECUTED 40009b68: 90 12 20 14 or %o0, 0x14, %o0 ! 4002b814 <== NOT EXECUTED 40009b6c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40009b70: 40 00 31 26 call 40016008 <== NOT EXECUTED 40009b74: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40009b78: 01 00 00 00 nop 40007504 : */ rtems_status_code rtems_task_delete( Objects_Id id ) { 40007504: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007508: 92 96 20 00 orcc %i0, 0, %o1 4000750c: 12 80 00 20 bne 4000758c 40007510: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007514: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007518: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 4000751c: 82 00 60 01 inc %g1 40007520: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007524: 03 10 00 6f sethi %hi(0x4001bc00), %g1 40007528: f0 00 62 bc ld [ %g1 + 0x2bc ], %i0 ! 4001bebc <_Thread_Executing> 4000752c: 07 10 00 6f sethi %hi(0x4001bc00), %g3 Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40007530: c0 27 bf f4 clr [ %fp + -12 ] 40007534: a2 10 e1 40 or %g3, 0x140, %l1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_information = _Objects_Get_information( the_thread->Object.id ); 40007538: c2 06 20 08 ld [ %i0 + 8 ], %g1 4000753c: 85 30 60 16 srl %g1, 0x16, %g2 40007540: 84 08 a0 1c and %g2, 0x1c, %g2 40007544: c6 04 40 02 ld [ %l1 + %g2 ], %g3 40007548: 83 30 60 1b srl %g1, 0x1b, %g1 4000754c: 83 28 60 02 sll %g1, 2, %g1 40007550: d0 00 c0 01 ld [ %g3 + %g1 ], %o0 if ( !the_information ) { 40007554: 80 a2 20 00 cmp %o0, 0 40007558: 12 80 00 13 bne 400075a4 4000755c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007560: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 <== NOT EXECUTED 40007564: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40007568: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] <== NOT EXECUTED 4000756c: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 <== NOT EXECUTED 40007570: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40007574: 12 80 00 04 bne 40007584 <== NOT EXECUTED 40007578: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000757c: 40 00 0b 87 call 4000a398 <_Thread_Dispatch> <== NOT EXECUTED 40007580: 01 00 00 00 nop <== NOT EXECUTED 40007584: 81 c7 e0 08 ret 40007588: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000758c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007590: 80 a0 a0 04 cmp %g2, 4 40007594: 08 80 00 1b bleu 40007600 40007598: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000759c: 81 c7 e0 08 ret <== NOT EXECUTED 400075a0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ID; /* This should never happen if _Thread_Get() works right */ } _Thread_Close( the_information, the_thread ); 400075a4: 40 00 0a ff call 4000a1a0 <_Thread_Close> 400075a8: 92 10 00 18 mov %i0, %o1 400075ac: c4 06 20 08 ld [ %i0 + 8 ], %g2 400075b0: 92 10 00 18 mov %i0, %o1 if ( !_Objects_Is_class_valid( the_class ) ) return NULL; the_api = _Objects_Get_API( id ); return _Objects_Information_table[ the_api ][ the_class ]; 400075b4: 83 30 a0 16 srl %g2, 0x16, %g1 400075b8: 82 08 60 1c and %g1, 0x1c, %g1 400075bc: c6 04 40 01 ld [ %l1 + %g1 ], %g3 400075c0: 85 30 a0 1b srl %g2, 0x1b, %g2 400075c4: 85 28 a0 02 sll %g2, 2, %g2 400075c8: 40 00 06 09 call 40008dec <_Objects_Free> 400075cc: d0 00 c0 02 ld [ %g3 + %g2 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400075d0: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 400075d4: b0 10 20 00 clr %i0 400075d8: 82 00 7f ff add %g1, -1, %g1 400075dc: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 400075e0: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 400075e4: 80 a0 a0 00 cmp %g2, 0 400075e8: 12 80 00 04 bne 400075f8 400075ec: 01 00 00 00 nop _Thread_Dispatch(); 400075f0: 40 00 0b 6a call 4000a398 <_Thread_Dispatch> 400075f4: 01 00 00 00 nop 400075f8: 81 c7 e0 08 ret 400075fc: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007600: 80 a0 60 01 cmp %g1, 1 40007604: 12 bf ff e0 bne 40007584 40007608: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000760c: 85 28 a0 02 sll %g2, 2, %g2 40007610: 07 10 00 6f sethi %hi(0x4001bc00), %g3 40007614: a2 10 e1 40 or %g3, 0x140, %l1 ! 4001bd40 <_Objects_Information_table> 40007618: c2 04 40 02 ld [ %l1 + %g2 ], %g1 4000761c: d0 00 60 04 ld [ %g1 + 4 ], %o0 if ( !information ) { 40007620: 80 a2 20 00 cmp %o0, 0 40007624: 02 bf ff f5 be 400075f8 40007628: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000762c: 40 00 06 33 call 40008ef8 <_Objects_Get> 40007630: 94 07 bf f4 add %fp, -12, %o2 register Thread_Control *the_thread; Objects_Locations location; Objects_Information *the_information; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007634: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007638: b0 10 00 08 mov %o0, %i0 4000763c: 80 a0 60 00 cmp %g1, 0 40007640: 02 bf ff be be 40007538 40007644: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007648: 80 a0 60 02 cmp %g1, 2 4000764c: 18 bf ff ce bgu 40007584 40007650: b0 10 20 19 mov 0x19, %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007654: 81 c7 e0 08 ret 40007658: 91 e8 20 04 restore %g0, 4, %o0 40008e10 : rtems_status_code rtems_task_get_note( Objects_Id id, uint32_t notepad, uint32_t *note ) { 40008e10: 9d e3 bf 90 save %sp, -112, %sp 40008e14: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; RTEMS_API_Control *api; if ( !note ) 40008e18: 80 a6 a0 00 cmp %i2, 0 40008e1c: 02 80 00 3b be 40008f08 40008e20: b0 10 20 09 mov 9, %i0 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 40008e24: 80 a6 60 0f cmp %i1, 0xf 40008e28: 18 80 00 38 bgu 40008f08 40008e2c: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40008e30: 80 a2 60 00 cmp %o1, 0 40008e34: 12 80 00 09 bne 40008e58 40008e38: 07 10 00 86 sethi %hi(0x40021800), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40008e3c: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 ! 4002182c <_Thread_Executing> 40008e40: 87 2e 60 02 sll %i1, 2, %g3 40008e44: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 40008e48: c2 00 80 03 ld [ %g2 + %g3 ], %g1 40008e4c: c2 26 80 00 st %g1, [ %i2 ] 40008e50: 81 c7 e0 08 ret 40008e54: 91 e8 20 00 restore %g0, 0, %o0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40008e58: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 40008e5c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40008e60: 80 a2 40 02 cmp %o1, %g2 40008e64: 22 bf ff f8 be,a 40008e44 40008e68: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008e6c: 83 32 60 18 srl %o1, 0x18, %g1 40008e70: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008e74: 80 a0 a0 04 cmp %g2, 4 40008e78: 08 80 00 04 bleu 40008e88 40008e7c: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008e80: 81 c7 e0 08 ret <== NOT EXECUTED 40008e84: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008e88: 80 a0 60 01 cmp %g1, 1 40008e8c: 12 80 00 1f bne 40008f08 40008e90: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008e94: 83 28 a0 02 sll %g2, 2, %g1 40008e98: 05 10 00 85 sethi %hi(0x40021400), %g2 40008e9c: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 400216b0 <_Objects_Information_table> 40008ea0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008ea4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008ea8: 80 a2 20 00 cmp %o0, 0 40008eac: 02 80 00 17 be 40008f08 40008eb0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008eb4: 40 00 07 79 call 4000ac98 <_Objects_Get> 40008eb8: 94 07 bf f4 add %fp, -12, %o2 *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008ebc: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008ec0: 80 a0 60 00 cmp %g1, 0 40008ec4: 12 80 00 13 bne 40008f10 40008ec8: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; *note = api->Notepads[ notepad ]; 40008ecc: c6 02 21 6c ld [ %o0 + 0x16c ], %g3 40008ed0: 83 2e 60 02 sll %i1, 2, %g1 40008ed4: c4 00 c0 01 ld [ %g3 + %g1 ], %g2 40008ed8: c4 26 80 00 st %g2, [ %i2 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008edc: 07 10 00 85 sethi %hi(0x40021400), %g3 40008ee0: c2 00 e3 50 ld [ %g3 + 0x350 ], %g1 ! 40021750 <_Thread_Dispatch_disable_level> 40008ee4: b0 10 20 00 clr %i0 40008ee8: 82 00 7f ff add %g1, -1, %g1 40008eec: c2 20 e3 50 st %g1, [ %g3 + 0x350 ] 40008ef0: c4 00 e3 50 ld [ %g3 + 0x350 ], %g2 40008ef4: 80 a0 a0 00 cmp %g2, 0 40008ef8: 12 80 00 04 bne 40008f08 40008efc: 01 00 00 00 nop _Thread_Dispatch(); 40008f00: 40 00 0c 52 call 4000c048 <_Thread_Dispatch> 40008f04: 01 00 00 00 nop 40008f08: 81 c7 e0 08 ret 40008f0c: 81 e8 00 00 restore *note = api->Notepads[ notepad ]; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008f10: 18 bf ff fe bgu 40008f08 <== NOT EXECUTED 40008f14: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 40008f18: 81 c7 e0 08 ret <== NOT EXECUTED 40008f1c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007cec : */ rtems_status_code rtems_task_is_suspended( Objects_Id id ) { 40007cec: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40007cf0: 92 96 20 00 orcc %i0, 0, %o1 40007cf4: 12 80 00 19 bne 40007d58 40007cf8: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007cfc: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 40007d00: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 4001f5d0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40007d04: 82 00 60 01 inc %g1 <== NOT EXECUTED 40007d08: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40007d0c: 03 10 00 7d sethi %hi(0x4001f400), %g1 <== NOT EXECUTED 40007d10: d0 00 62 ac ld [ %g1 + 0x2ac ], %o0 ! 4001f6ac <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40007d14: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40007d18: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40007d1c: 80 88 60 02 btst 2, %g1 40007d20: 02 80 00 15 be 40007d74 40007d24: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d28: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 40007d2c: b0 10 20 0f mov 0xf, %i0 40007d30: 82 00 7f ff add %g1, -1, %g1 40007d34: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ] 40007d38: c4 00 a1 d0 ld [ %g2 + 0x1d0 ], %g2 40007d3c: 80 a0 a0 00 cmp %g2, 0 40007d40: 12 80 00 0b bne 40007d6c 40007d44: 01 00 00 00 nop _Thread_Dispatch(); 40007d48: 40 00 0b 74 call 4000ab18 <_Thread_Dispatch> 40007d4c: 01 00 00 00 nop 40007d50: 81 c7 e0 08 ret 40007d54: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007d58: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007d5c: 80 a0 a0 04 cmp %g2, 4 40007d60: 08 80 00 08 bleu 40007d80 40007d64: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007d68: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007d6c: 81 c7 e0 08 ret <== NOT EXECUTED 40007d70: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007d74: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 40007d78: 10 bf ff ee b 40007d30 40007d7c: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007d80: 80 a0 60 01 cmp %g1, 1 40007d84: 12 bf ff f3 bne 40007d50 40007d88: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40007d8c: 83 28 a0 02 sll %g2, 2, %g1 40007d90: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007d94: 84 10 a1 30 or %g2, 0x130, %g2 ! 4001f530 <_Objects_Information_table> 40007d98: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40007d9c: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007da0: 80 a2 20 00 cmp %o0, 0 40007da4: 02 bf ff f2 be 40007d6c 40007da8: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40007dac: 40 00 06 6f call 40009768 <_Objects_Get> 40007db0: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007db4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007db8: 80 a0 60 00 cmp %g1, 0 40007dbc: 02 bf ff d7 be 40007d18 40007dc0: 05 10 00 7d sethi %hi(0x4001f400), %g2 40007dc4: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007dc8: 18 bf ff e2 bgu 40007d50 <== NOT EXECUTED 40007dcc: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007dd0: 81 c7 e0 08 ret <== NOT EXECUTED 40007dd4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 400082c8 : rtems_status_code rtems_task_restart( Objects_Id id, uint32_t argument ) { 400082c8: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400082cc: 92 96 20 00 orcc %i0, 0, %o1 400082d0: 12 80 00 1b bne 4000833c 400082d4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400082d8: 21 10 00 7e sethi %hi(0x4001f800), %l0 400082dc: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 ! 4001fa80 <_Thread_Dispatch_disable_level> 400082e0: 82 00 60 01 inc %g1 400082e4: c2 24 22 80 st %g1, [ %l0 + 0x280 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400082e8: 03 10 00 7e sethi %hi(0x4001f800), %g1 400082ec: d0 00 63 5c ld [ %g1 + 0x35c ], %o0 ! 4001fb5c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 400082f0: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Restart( the_thread, NULL, argument ) ) { 400082f4: 94 10 00 19 mov %i1, %o2 400082f8: 40 00 0e 4b call 4000bc24 <_Thread_Restart> 400082fc: 92 10 20 00 clr %o1 40008300: 80 a2 20 00 cmp %o0, 0 40008304: 12 80 00 15 bne 40008358 40008308: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000830c: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 40008310: b0 10 20 0e mov 0xe, %i0 40008314: 82 00 7f ff add %g1, -1, %g1 40008318: c2 24 22 80 st %g1, [ %l0 + 0x280 ] 4000831c: c4 04 22 80 ld [ %l0 + 0x280 ], %g2 40008320: 80 a0 a0 00 cmp %g2, 0 40008324: 12 80 00 0b bne 40008350 40008328: 01 00 00 00 nop _Thread_Dispatch(); 4000832c: 40 00 0b 48 call 4000b04c <_Thread_Dispatch> 40008330: 01 00 00 00 nop 40008334: 81 c7 e0 08 ret 40008338: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000833c: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008340: 80 a0 a0 04 cmp %g2, 4 40008344: 08 80 00 08 bleu 40008364 40008348: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000834c: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008350: 81 c7 e0 08 ret <== NOT EXECUTED 40008354: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008358: c2 04 22 80 ld [ %l0 + 0x280 ], %g1 4000835c: 10 bf ff ee b 40008314 40008360: b0 10 20 00 clr %i0 *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008364: 80 a0 60 01 cmp %g1, 1 40008368: 12 bf ff f3 bne 40008334 4000836c: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008370: 83 28 a0 02 sll %g2, 2, %g1 40008374: 05 10 00 7e sethi %hi(0x4001f800), %g2 40008378: 84 10 a1 e0 or %g2, 0x1e0, %g2 ! 4001f9e0 <_Objects_Information_table> 4000837c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008380: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008384: 80 a2 20 00 cmp %o0, 0 40008388: 02 bf ff f2 be 40008350 4000838c: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008390: 40 00 06 43 call 40009c9c <_Objects_Get> 40008394: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008398: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000839c: 80 a0 60 00 cmp %g1, 0 400083a0: 02 bf ff d5 be 400082f4 400083a4: 21 10 00 7e sethi %hi(0x4001f800), %l0 400083a8: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400083ac: 18 bf ff e2 bgu 40008334 <== NOT EXECUTED 400083b0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 400083b4: 81 c7 e0 08 ret <== NOT EXECUTED 400083b8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40008d84 : */ rtems_status_code rtems_task_resume( Objects_Id id ) { 40008d84: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008d88: 92 96 20 00 orcc %i0, 0, %o1 40008d8c: 12 80 00 19 bne 40008df0 40008d90: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008d94: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008d98: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40008d9c: 82 00 60 01 inc %g1 40008da0: c2 24 23 00 st %g1, [ %l0 + 0x300 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008da4: 03 10 00 a2 sethi %hi(0x40028800), %g1 40008da8: d0 00 63 dc ld [ %g1 + 0x3dc ], %o0 ! 40028bdc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40008dac: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { 40008db0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40008db4: 80 88 60 02 btst 2, %g1 40008db8: 12 80 00 2b bne 40008e64 40008dbc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008dc0: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008dc4: b0 10 20 0e mov 0xe, %i0 40008dc8: 82 00 7f ff add %g1, -1, %g1 40008dcc: c2 24 23 00 st %g1, [ %l0 + 0x300 ] 40008dd0: c4 04 23 00 ld [ %l0 + 0x300 ], %g2 40008dd4: 80 a0 a0 00 cmp %g2, 0 40008dd8: 12 80 00 0b bne 40008e04 40008ddc: 01 00 00 00 nop _Thread_Dispatch(); 40008de0: 40 00 0c 2d call 4000be94 <_Thread_Dispatch> 40008de4: 01 00 00 00 nop 40008de8: 81 c7 e0 08 ret 40008dec: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40008df0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008df4: 80 a0 a0 04 cmp %g2, 4 40008df8: 08 80 00 05 bleu 40008e0c 40008dfc: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40008e00: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40008e04: 81 c7 e0 08 ret 40008e08: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40008e0c: 80 a0 60 01 cmp %g1, 1 40008e10: 12 bf ff f6 bne 40008de8 40008e14: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40008e18: 83 28 a0 02 sll %g2, 2, %g1 40008e1c: 05 10 00 a2 sethi %hi(0x40028800), %g2 40008e20: 84 10 a2 60 or %g2, 0x260, %g2 ! 40028a60 <_Objects_Information_table> 40008e24: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40008e28: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40008e2c: 80 a2 20 00 cmp %o0, 0 40008e30: 02 bf ff f5 be 40008e04 40008e34: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40008e38: 40 00 07 2b call 4000aae4 <_Objects_Get> 40008e3c: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40008e40: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008e44: 80 a0 60 00 cmp %g1, 0 40008e48: 02 bf ff da be 40008db0 40008e4c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008e50: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40008e54: 18 bf ff e5 bgu 40008de8 <== NOT EXECUTED 40008e58: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40008e5c: 81 c7 e0 08 ret <== NOT EXECUTED 40008e60: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _States_Is_suspended( the_thread->current_state ) ) { _Thread_Resume( the_thread, TRUE ); 40008e64: 40 00 0f 18 call 4000cac4 <_Thread_Resume> 40008e68: 92 10 20 01 mov 1, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008e6c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008e70: 10 bf ff d6 b 40008dc8 40008e74: b0 10 20 00 clr %i0 400090f0 : rtems_status_code rtems_task_set_note( Objects_Id id, uint32_t notepad, uint32_t note ) { 400090f0: 9d e3 bf 90 save %sp, -112, %sp 400090f4: 92 10 00 18 mov %i0, %o1 /* * NOTE: There is no check for < RTEMS_NOTEPAD_FIRST because that would * be checking an unsigned number for being negative. */ if ( notepad > RTEMS_NOTEPAD_LAST ) 400090f8: 80 a6 60 0f cmp %i1, 0xf 400090fc: 18 80 00 36 bgu 400091d4 40009100: b0 10 20 0a mov 0xa, %i0 /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40009104: 80 a2 60 00 cmp %o1, 0 40009108: 12 80 00 08 bne 40009128 4000910c: 07 10 00 86 sethi %hi(0x40021800), %g3 _Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) { api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 40009110: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 ! 4002182c <_Thread_Executing> <== NOT EXECUTED 40009114: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 40009118: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED 4000911c: f4 20 80 03 st %i2, [ %g2 + %g3 ] <== NOT EXECUTED 40009120: 81 c7 e0 08 ret <== NOT EXECUTED 40009124: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED /* * Optimize the most likely case to avoid the Thread_Dispatch. */ if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) || 40009128: c2 00 e0 2c ld [ %g3 + 0x2c ], %g1 4000912c: c4 00 60 08 ld [ %g1 + 8 ], %g2 40009130: 80 a2 40 02 cmp %o1, %g2 40009134: 22 bf ff f9 be,a 40009118 40009138: c4 00 61 6c ld [ %g1 + 0x16c ], %g2 <== NOT EXECUTED 4000913c: 83 32 60 18 srl %o1, 0x18, %g1 40009140: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40009144: 80 a0 a0 04 cmp %g2, 4 40009148: 08 80 00 04 bleu 40009158 4000914c: 83 32 60 1b srl %o1, 0x1b, %g1 _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009150: 81 c7 e0 08 ret <== NOT EXECUTED 40009154: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40009158: 80 a0 60 01 cmp %g1, 1 4000915c: 12 80 00 1e bne 400091d4 40009160: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009164: 83 28 a0 02 sll %g2, 2, %g1 40009168: 05 10 00 85 sethi %hi(0x40021400), %g2 4000916c: 84 10 a2 b0 or %g2, 0x2b0, %g2 ! 400216b0 <_Objects_Information_table> 40009170: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009174: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40009178: 80 a2 20 00 cmp %o0, 0 4000917c: 02 80 00 16 be 400091d4 40009180: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009184: 40 00 06 c5 call 4000ac98 <_Objects_Get> 40009188: 94 07 bf f4 add %fp, -12, %o2 api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000918c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009190: 80 a0 60 00 cmp %g1, 0 40009194: 12 80 00 12 bne 400091dc 40009198: 80 a0 60 02 cmp %g1, 2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: api = the_thread->API_Extensions[ THREAD_API_RTEMS ]; api->Notepads[ notepad ] = note; 4000919c: c4 02 21 6c ld [ %o0 + 0x16c ], %g2 400091a0: 83 2e 60 02 sll %i1, 2, %g1 400091a4: f4 20 80 01 st %i2, [ %g2 + %g1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400091a8: 07 10 00 85 sethi %hi(0x40021400), %g3 400091ac: c2 00 e3 50 ld [ %g3 + 0x350 ], %g1 ! 40021750 <_Thread_Dispatch_disable_level> 400091b0: b0 10 20 00 clr %i0 400091b4: 82 00 7f ff add %g1, -1, %g1 400091b8: c2 20 e3 50 st %g1, [ %g3 + 0x350 ] 400091bc: c4 00 e3 50 ld [ %g3 + 0x350 ], %g2 400091c0: 80 a0 a0 00 cmp %g2, 0 400091c4: 12 80 00 04 bne 400091d4 400091c8: 01 00 00 00 nop _Thread_Dispatch(); 400091cc: 40 00 0b 9f call 4000c048 <_Thread_Dispatch> 400091d0: 01 00 00 00 nop 400091d4: 81 c7 e0 08 ret 400091d8: 81 e8 00 00 restore api->Notepads[ notepad ] = note; return RTEMS_SUCCESSFUL; } the_thread = _Thread_Get( id, &location ); switch ( location ) { 400091dc: 18 bf ff fe bgu 400091d4 <== NOT EXECUTED 400091e0: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 400091e4: 81 c7 e0 08 ret <== NOT EXECUTED 400091e8: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4000e6d8 : rtems_status_code rtems_task_set_priority( Objects_Id id, rtems_task_priority new_priority, rtems_task_priority *old_priority ) { 4000e6d8: 9d e3 bf 90 save %sp, -112, %sp register Thread_Control *the_thread; Objects_Locations location; if ( new_priority != RTEMS_CURRENT_PRIORITY && 4000e6dc: 80 a6 60 00 cmp %i1, 0 4000e6e0: 02 80 00 06 be 4000e6f8 4000e6e4: 92 10 00 18 mov %i0, %o1 4000e6e8: 82 06 7f ff add %i1, -1, %g1 4000e6ec: 80 a0 60 fe cmp %g1, 0xfe 4000e6f0: 18 80 00 26 bgu 4000e788 4000e6f4: b0 10 20 13 mov 0x13, %i0 !_RTEMS_tasks_Priority_is_valid( new_priority ) ) return RTEMS_INVALID_PRIORITY; if ( !old_priority ) 4000e6f8: 80 a6 a0 00 cmp %i2, 0 4000e6fc: 02 80 00 23 be 4000e788 4000e700: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4000e704: 80 a2 60 00 cmp %o1, 0 4000e708: 12 80 00 22 bne 4000e790 4000e70c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000e710: 21 10 00 b6 sethi %hi(0x4002d800), %l0 4000e714: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 ! 4002db30 <_Thread_Dispatch_disable_level> 4000e718: 82 00 60 01 inc %g1 4000e71c: c2 24 23 30 st %g1, [ %l0 + 0x330 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4000e720: 03 10 00 b7 sethi %hi(0x4002dc00), %g1 4000e724: d0 00 60 0c ld [ %g1 + 0xc ], %o0 ! 4002dc0c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4000e728: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: /* XXX convert from core priority */ *old_priority = the_thread->current_priority; 4000e72c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 if ( new_priority != RTEMS_CURRENT_PRIORITY ) { 4000e730: 80 a6 60 00 cmp %i1, 0 4000e734: 02 80 00 0d be 4000e768 4000e738: c2 26 80 00 st %g1, [ %i2 ] the_thread->real_priority = new_priority; if ( the_thread->resource_count == 0 || 4000e73c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 4000e740: 80 a0 60 00 cmp %g1, 0 4000e744: 02 80 00 06 be 4000e75c 4000e748: f2 22 20 18 st %i1, [ %o0 + 0x18 ] 4000e74c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 4000e750: 80 a6 40 01 cmp %i1, %g1 4000e754: 1a 80 00 05 bcc 4000e768 4000e758: 01 00 00 00 nop the_thread->current_priority > new_priority ) _Thread_Change_priority( the_thread, new_priority, FALSE ); 4000e75c: 92 10 00 19 mov %i1, %o1 4000e760: 40 00 0a 7f call 4001115c <_Thread_Change_priority> 4000e764: 94 10 20 00 clr %o2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000e768: c2 04 23 30 ld [ %l0 + 0x330 ], %g1 4000e76c: b0 10 20 00 clr %i0 4000e770: 82 00 7f ff add %g1, -1, %g1 4000e774: c2 24 23 30 st %g1, [ %l0 + 0x330 ] 4000e778: c4 04 23 30 ld [ %l0 + 0x330 ], %g2 4000e77c: 80 a0 a0 00 cmp %g2, 0 4000e780: 02 80 00 0a be 4000e7a8 4000e784: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4000e788: 81 c7 e0 08 ret 4000e78c: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 4000e790: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4000e794: 80 a0 a0 04 cmp %g2, 4 4000e798: 08 80 00 08 bleu 4000e7b8 4000e79c: 83 32 60 1b srl %o1, 0x1b, %g1 4000e7a0: 81 c7 e0 08 ret <== NOT EXECUTED 4000e7a4: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000e7a8: 40 00 0b 91 call 400115ec <_Thread_Dispatch> 4000e7ac: 01 00 00 00 nop 4000e7b0: 81 c7 e0 08 ret 4000e7b4: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000e7b8: 80 a0 60 01 cmp %g1, 1 4000e7bc: 12 bf ff f3 bne 4000e788 4000e7c0: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000e7c4: 83 28 a0 02 sll %g2, 2, %g1 4000e7c8: 05 10 00 b6 sethi %hi(0x4002d800), %g2 4000e7cc: 84 10 a2 90 or %g2, 0x290, %g2 ! 4002da90 <_Objects_Information_table> 4000e7d0: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000e7d4: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000e7d8: 80 a2 20 00 cmp %o0, 0 4000e7dc: 02 bf ff f5 be 4000e7b0 4000e7e0: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000e7e4: 40 00 06 5a call 4001014c <_Objects_Get> 4000e7e8: 94 07 bf f4 add %fp, -12, %o2 if ( !old_priority ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 4000e7ec: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000e7f0: 80 a0 60 00 cmp %g1, 0 4000e7f4: 02 bf ff ce be 4000e72c 4000e7f8: 21 10 00 b6 sethi %hi(0x4002d800), %l0 4000e7fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000e800: 18 bf ff e2 bgu 4000e788 <== NOT EXECUTED 4000e804: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000e808: 81 c7 e0 08 ret <== NOT EXECUTED 4000e80c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40007798 : rtems_status_code rtems_task_start( rtems_id id, rtems_task_entry entry_point, rtems_task_argument argument ) { 40007798: 9d e3 bf 90 save %sp, -112, %sp 4000779c: 92 10 00 18 mov %i0, %o1 register Thread_Control *the_thread; Objects_Locations location; if ( entry_point == NULL ) 400077a0: 80 a6 60 00 cmp %i1, 0 400077a4: 02 80 00 1e be 4000781c 400077a8: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 400077ac: 80 a2 60 00 cmp %o1, 0 400077b0: 12 80 00 1d bne 40007824 400077b4: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400077b8: 21 10 00 6f sethi %hi(0x4001bc00), %l0 400077bc: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 ! 4001bde0 <_Thread_Dispatch_disable_level> 400077c0: 82 00 60 01 inc %g1 400077c4: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 400077c8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400077cc: d0 00 62 bc ld [ %g1 + 0x2bc ], %o0 ! 4001bebc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 400077d0: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( _Thread_Start( 400077d4: 94 10 00 19 mov %i1, %o2 400077d8: 98 10 00 1a mov %i2, %o4 400077dc: 92 10 20 00 clr %o1 400077e0: 40 00 0e c9 call 4000b304 <_Thread_Start> 400077e4: 96 10 20 00 clr %o3 400077e8: 80 a2 20 00 cmp %o0, 0 400077ec: 12 80 00 2b bne 40007898 400077f0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400077f4: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 400077f8: b0 10 20 0e mov 0xe, %i0 400077fc: 82 00 7f ff add %g1, -1, %g1 40007800: c2 24 21 e0 st %g1, [ %l0 + 0x1e0 ] 40007804: c4 04 21 e0 ld [ %l0 + 0x1e0 ], %g2 40007808: 80 a0 a0 00 cmp %g2, 0 4000780c: 12 80 00 0b bne 40007838 40007810: 01 00 00 00 nop _Thread_Dispatch(); 40007814: 40 00 0a e1 call 4000a398 <_Thread_Dispatch> 40007818: 01 00 00 00 nop 4000781c: 81 c7 e0 08 ret 40007820: 81 e8 00 00 restore */ RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API( Objects_Id id ) { return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS); 40007824: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40007828: 80 a0 a0 04 cmp %g2, 4 4000782c: 08 80 00 05 bleu 40007840 40007830: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007834: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INCORRECT_STATE; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40007838: 81 c7 e0 08 ret 4000783c: 81 e8 00 00 restore *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 40007840: 80 a0 60 01 cmp %g1, 1 40007844: 12 bf ff f6 bne 4000781c 40007848: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4000784c: 83 28 a0 02 sll %g2, 2, %g1 40007850: 05 10 00 6f sethi %hi(0x4001bc00), %g2 40007854: 84 10 a1 40 or %g2, 0x140, %g2 ! 4001bd40 <_Objects_Information_table> 40007858: c6 00 80 01 ld [ %g2 + %g1 ], %g3 4000785c: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 40007860: 80 a2 20 00 cmp %o0, 0 40007864: 02 bf ff f5 be 40007838 40007868: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4000786c: 40 00 05 a3 call 40008ef8 <_Objects_Get> 40007870: 94 07 bf f4 add %fp, -12, %o2 if ( entry_point == NULL ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40007874: c2 07 bf f4 ld [ %fp + -12 ], %g1 40007878: 80 a0 60 00 cmp %g1, 0 4000787c: 02 bf ff d6 be 400077d4 40007880: 21 10 00 6f sethi %hi(0x4001bc00), %l0 40007884: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40007888: 18 bf ff e5 bgu 4000781c <== NOT EXECUTED 4000788c: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40007890: 81 c7 e0 08 ret <== NOT EXECUTED 40007894: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007898: c2 04 21 e0 ld [ %l0 + 0x1e0 ], %g1 4000789c: 10 bf ff d8 b 400077fc 400078a0: b0 10 20 00 clr %i0 40008f84 : */ rtems_status_code rtems_task_suspend( Objects_Id id ) { 40008f84: 9d e3 bf 90 save %sp, -112, %sp uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 40008f88: 92 96 20 00 orcc %i0, 0, %o1 40008f8c: 12 80 00 19 bne 40008ff0 40008f90: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40008f94: 21 10 00 a2 sethi %hi(0x40028800), %l0 40008f98: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 ! 40028b00 <_Thread_Dispatch_disable_level> 40008f9c: 82 00 60 01 inc %g1 40008fa0: c2 24 23 00 st %g1, [ %l0 + 0x300 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 40008fa4: 03 10 00 a2 sethi %hi(0x40028800), %g1 40008fa8: d0 00 63 dc ld [ %g1 + 0x3dc ], %o0 ! 40028bdc <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 40008fac: c0 27 bf f4 clr [ %fp + -12 ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { 40008fb0: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 40008fb4: 80 88 60 02 btst 2, %g1 40008fb8: 02 80 00 2b be 40009064 40008fbc: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008fc0: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40008fc4: b0 10 20 0f mov 0xf, %i0 40008fc8: 82 00 7f ff add %g1, -1, %g1 40008fcc: c2 24 23 00 st %g1, [ %l0 + 0x300 ] 40008fd0: c4 04 23 00 ld [ %l0 + 0x300 ], %g2 40008fd4: 80 a0 a0 00 cmp %g2, 0 40008fd8: 12 80 00 0b bne 40009004 40008fdc: 01 00 00 00 nop _Thread_Dispatch(); 40008fe0: 40 00 0b ad call 4000be94 <_Thread_Dispatch> 40008fe4: 01 00 00 00 nop 40008fe8: 81 c7 e0 08 ret 40008fec: 81 e8 00 00 restore 40008ff0: 84 08 60 07 and %g1, 7, %g2 tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 40008ff4: 80 a0 a0 04 cmp %g2, 4 40008ff8: 08 80 00 05 bleu 4000900c 40008ffc: 83 32 60 1b srl %o1, 0x1b, %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 40009000: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_ALREADY_SUSPENDED; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009004: 81 c7 e0 08 ret <== NOT EXECUTED 40009008: 81 e8 00 00 restore <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4000900c: 80 a0 60 01 cmp %g1, 1 40009010: 12 bf ff f6 bne 40008fe8 40009014: b0 10 20 04 mov 4, %i0 *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 40009018: 83 28 a0 02 sll %g2, 2, %g1 4000901c: 05 10 00 a2 sethi %hi(0x40028800), %g2 40009020: 84 10 a2 60 or %g2, 0x260, %g2 ! 40028a60 <_Objects_Information_table> 40009024: c6 00 80 01 ld [ %g2 + %g1 ], %g3 40009028: d0 00 e0 04 ld [ %g3 + 4 ], %o0 if ( !information ) { 4000902c: 80 a2 20 00 cmp %o0, 0 40009030: 02 bf ff f5 be 40009004 40009034: 01 00 00 00 nop *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 40009038: 40 00 06 ab call 4000aae4 <_Objects_Get> 4000903c: 94 07 bf f4 add %fp, -12, %o2 { register Thread_Control *the_thread; Objects_Locations location; the_thread = _Thread_Get( id, &location ); switch ( location ) { 40009040: c2 07 bf f4 ld [ %fp + -12 ], %g1 40009044: 80 a0 60 00 cmp %g1, 0 40009048: 02 bf ff da be 40008fb0 4000904c: 21 10 00 a2 sethi %hi(0x40028800), %l0 40009050: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009054: 18 bf ff e5 bgu 40008fe8 <== NOT EXECUTED 40009058: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4000905c: 81 c7 e0 08 ret <== NOT EXECUTED 40009060: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_States_Is_suspended( the_thread->current_state ) ) { _Thread_Suspend( the_thread ); 40009064: 40 00 0f d7 call 4000cfc0 <_Thread_Suspend> 40009068: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000906c: c2 04 23 00 ld [ %l0 + 0x300 ], %g1 40009070: 10 bf ff d6 b 40008fc8 40009074: b0 10 20 00 clr %i0 4001be00 : rtems_status_code rtems_task_variable_add( rtems_id tid, void **ptr, void (*dtor)(void *) ) { 4001be00: 9d e3 bf 90 save %sp, -112, %sp 4001be04: 92 10 00 18 mov %i0, %o1 Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *new; if ( !ptr ) 4001be08: 80 a6 60 00 cmp %i1, 0 4001be0c: 02 80 00 22 be 4001be94 4001be10: b0 10 20 09 mov 9, %i0 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001be14: 80 a2 60 00 cmp %o1, 0 4001be18: 12 80 00 21 bne 4001be9c 4001be1c: 83 32 60 18 srl %o1, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001be20: 21 10 00 ff sethi %hi(0x4003fc00), %l0 4001be24: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> 4001be28: 82 00 60 01 inc %g1 4001be2c: c2 24 20 50 st %g1, [ %l0 + 0x50 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001be30: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001be34: f0 00 61 2c ld [ %g1 + 0x12c ], %i0 ! 4003fd2c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001be38: c0 27 bf f4 clr [ %fp + -12 ] /* * Figure out if the variable is already in this task's list. */ tvp = the_thread->task_variables; 4001be3c: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 while (tvp) { 4001be40: 80 a0 a0 00 cmp %g2, 0 4001be44: 32 80 00 08 bne,a 4001be64 4001be48: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void *_Workspace_Allocate( size_t size ) { return _Heap_Allocate( &_Workspace_Area, size ); 4001be4c: 10 80 00 1a b 4001beb4 4001be50: 11 10 00 ff sethi %hi(0x4003fc00), %o0 4001be54: 84 90 60 00 orcc %g1, 0, %g2 <== NOT EXECUTED 4001be58: 02 80 00 17 be 4001beb4 <== NOT EXECUTED 4001be5c: 11 10 00 ff sethi %hi(0x4003fc00), %o0 <== NOT EXECUTED if (tvp->ptr == ptr) { 4001be60: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED 4001be64: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001be68: 32 bf ff fb bne,a 4001be54 <== NOT EXECUTED 4001be6c: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED tvp->dtor = dtor; 4001be70: f4 20 a0 10 st %i2, [ %g2 + 0x10 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001be74: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 _Thread_Dispatch(); 4001be78: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001be7c: 82 00 7f ff add %g1, -1, %g1 4001be80: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4001be84: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001be88: 80 a0 a0 00 cmp %g2, 0 4001be8c: 02 80 00 1c be 4001befc 4001be90: 01 00 00 00 nop the_thread->task_variables = new; _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001be94: 81 c7 e0 08 ret <== NOT EXECUTED 4001be98: 81 e8 00 00 restore <== NOT EXECUTED 4001be9c: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001bea0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001bea4: 08 80 00 21 bleu 4001bf28 <== NOT EXECUTED 4001bea8: 83 32 60 1b srl %o1, 0x1b, %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001beac: 81 c7 e0 08 ret <== NOT EXECUTED 4001beb0: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 4001beb4: 92 10 20 14 mov 0x14, %o1 4001beb8: 7f ff bf 93 call 4000bd04 <_Heap_Allocate> 4001bebc: 90 12 20 9c or %o0, 0x9c, %o0 * Now allocate memory for this task variable. */ new = (rtems_task_variable_t *) _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { 4001bec0: 80 a2 20 00 cmp %o0, 0 4001bec4: 32 80 00 12 bne,a 4001bf0c 4001bec8: c4 06 21 7c ld [ %i0 + 0x17c ], %g2 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001becc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001bed0: b0 10 20 1a mov 0x1a, %i0 <== NOT EXECUTED 4001bed4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001bed8: c2 24 20 50 st %g1, [ %l0 + 0x50 ] <== NOT EXECUTED 4001bedc: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 4001bee0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001bee4: 12 80 00 08 bne 4001bf04 <== NOT EXECUTED 4001bee8: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001beec: 7f ff c7 ba call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001bef0: 01 00 00 00 nop <== NOT EXECUTED 4001bef4: 81 c7 e0 08 ret <== NOT EXECUTED 4001bef8: 81 e8 00 00 restore <== NOT EXECUTED 4001befc: 7f ff c7 b6 call 4000ddd4 <_Thread_Dispatch> 4001bf00: b0 10 20 00 clr %i0 4001bf04: 81 c7 e0 08 ret 4001bf08: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 4001bf0c: c2 06 40 00 ld [ %i1 ], %g1 new->ptr = ptr; new->dtor = dtor; new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; the_thread->task_variables = new; 4001bf10: d0 26 21 7c st %o0, [ %i0 + 0x17c ] _Workspace_Allocate(sizeof(rtems_task_variable_t)); if (new == NULL) { _Thread_Enable_dispatch(); return RTEMS_NO_MEMORY; } new->gval = *ptr; 4001bf14: c2 22 20 08 st %g1, [ %o0 + 8 ] new->ptr = ptr; 4001bf18: f2 22 20 04 st %i1, [ %o0 + 4 ] new->dtor = dtor; 4001bf1c: f4 22 20 10 st %i2, [ %o0 + 0x10 ] new->next = (struct rtems_task_variable_tt *)the_thread->task_variables; 4001bf20: 10 bf ff d5 b 4001be74 4001bf24: c4 22 00 00 st %g2, [ %o0 ] *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001bf28: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001bf2c: 12 bf ff e0 bne 4001beac <== NOT EXECUTED 4001bf30: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001bf34: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001bf38: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001bf3c: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001bf40: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001bf44: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001bf48: 02 bf ff d9 be 4001beac <== NOT EXECUTED 4001bf4c: 01 00 00 00 nop <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001bf50: 7f ff c2 1d call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001bf54: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !ptr ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001bf58: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001bf5c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED 4001bf60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001bf64: 02 bf ff b6 be 4001be3c <== NOT EXECUTED 4001bf68: 21 10 00 ff sethi %hi(0x4003fc00), %l0 <== NOT EXECUTED 4001bf6c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001bf70: 18 bf ff c9 bgu 4001be94 <== NOT EXECUTED 4001bf74: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED 4001bf78: 30 bf ff cd b,a 4001beac <== NOT EXECUTED 4001bf7c : rtems_status_code rtems_task_variable_delete( rtems_id tid, void **ptr ) { 4001bf7c: 9d e3 bf 90 save %sp, -112, %sp Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp, *prev; if ( !ptr ) 4001bf80: 80 a6 60 00 cmp %i1, 0 4001bf84: 02 80 00 50 be 4001c0c4 4001bf88: 92 10 00 18 mov %i0, %o1 uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001bf8c: 80 a6 20 00 cmp %i0, 0 4001bf90: 12 80 00 26 bne 4001c028 4001bf94: 83 36 20 18 srl %i0, 0x18, %g1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001bf98: 21 10 00 ff sethi %hi(0x4003fc00), %l0 4001bf9c: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> 4001bfa0: 82 00 60 01 inc %g1 4001bfa4: c2 24 20 50 st %g1, [ %l0 + 0x50 ] Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001bfa8: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001bfac: d0 00 61 2c ld [ %g1 + 0x12c ], %o0 ! 4003fd2c <_Thread_Executing> Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001bfb0: c0 27 bf f4 clr [ %fp + -12 ] default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; 4001bfb4: c6 02 21 7c ld [ %o0 + 0x17c ], %g3 while (tvp) { 4001bfb8: 80 a0 e0 00 cmp %g3, 0 4001bfbc: 02 80 00 10 be 4001bffc 4001bfc0: 01 00 00 00 nop if (tvp->ptr == ptr) { 4001bfc4: c2 00 e0 04 ld [ %g3 + 4 ], %g1 4001bfc8: 80 a0 40 19 cmp %g1, %i1 4001bfcc: 32 80 00 09 bne,a 4001bff0 4001bfd0: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001bfd4: 10 80 00 5b b 4001c140 4001bfd8: c2 00 c0 00 ld [ %g3 ], %g1 return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { 4001bfdc: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001bfe0: 02 80 00 18 be 4001c040 <== NOT EXECUTED 4001bfe4: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001bfe8: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED _Workspace_Free(tvp); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } prev = tvp; tvp = (rtems_task_variable_t *)tvp->next; 4001bfec: c4 00 c0 00 ld [ %g3 ], %g2 <== NOT EXECUTED default: return RTEMS_INTERNAL_ERROR; case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { 4001bff0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001bff4: 32 bf ff fa bne,a 4001bfdc <== NOT EXECUTED 4001bff8: c2 00 a0 04 ld [ %g2 + 4 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001bffc: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 <== NOT EXECUTED 4001c000: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c004: c2 24 20 50 st %g1, [ %l0 + 0x50 ] <== NOT EXECUTED 4001c008: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 <== NOT EXECUTED 4001c00c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c010: 12 80 00 2d bne 4001c0c4 <== NOT EXECUTED 4001c014: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001c018: 7f ff c7 6f call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c01c: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001c020: 81 c7 e0 08 ret <== NOT EXECUTED 4001c024: 81 e8 00 00 restore <== NOT EXECUTED 4001c028: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001c02c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001c030: 08 80 00 2e bleu 4001c0e8 <== NOT EXECUTED 4001c034: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001c038: 81 c7 e0 08 ret <== NOT EXECUTED 4001c03c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: tvp = the_thread->task_variables; while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; 4001c040: c2 00 80 00 ld [ %g2 ], %g1 <== NOT EXECUTED 4001c044: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; if (_Thread_Is_executing(the_thread)) { 4001c048: 03 10 00 ff sethi %hi(0x4003fc00), %g1 4001c04c: c4 00 61 2c ld [ %g1 + 0x12c ], %g2 ! 4003fd2c <_Thread_Executing> 4001c050: 80 a2 00 02 cmp %o0, %g2 4001c054: 32 80 00 1e bne,a 4001c0cc 4001c058: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED if (tvp->dtor) 4001c05c: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 4001c060: 80 a0 a0 00 cmp %g2, 0 4001c064: 22 80 00 06 be,a 4001c07c 4001c068: c4 06 20 04 ld [ %i0 + 4 ], %g2 (*tvp->dtor)(*tvp->ptr); 4001c06c: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 4001c070: 9f c0 80 00 call %g2 <== NOT EXECUTED 4001c074: d0 00 40 00 ld [ %g1 ], %o0 <== NOT EXECUTED *tvp->ptr = tvp->gval; 4001c078: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED 4001c07c: c2 06 20 08 ld [ %i0 + 8 ], %g1 4001c080: c2 20 80 00 st %g1, [ %g2 ] RTEMS_INLINE_ROUTINE boolean _Workspace_Free( void *block ) { return _Heap_Free( &_Workspace_Area, block ); 4001c084: 92 10 00 18 mov %i0, %o1 4001c088: 11 10 00 ff sethi %hi(0x4003fc00), %o0 4001c08c: 7f ff bf 50 call 4000bdcc <_Heap_Free> 4001c090: 90 12 20 9c or %o0, 0x9c, %o0 ! 4003fc9c <_Workspace_Area> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c094: c2 04 20 50 ld [ %l0 + 0x50 ], %g1 4001c098: b0 10 20 00 clr %i0 4001c09c: 82 00 7f ff add %g1, -1, %g1 4001c0a0: c2 24 20 50 st %g1, [ %l0 + 0x50 ] 4001c0a4: c4 04 20 50 ld [ %l0 + 0x50 ], %g2 4001c0a8: 80 a0 a0 00 cmp %g2, 0 4001c0ac: 12 80 00 04 bne 4001c0bc 4001c0b0: 01 00 00 00 nop _Thread_Dispatch(); 4001c0b4: 7f ff c7 48 call 4000ddd4 <_Thread_Dispatch> 4001c0b8: 01 00 00 00 nop 4001c0bc: 81 c7 e0 08 ret 4001c0c0: 81 e8 00 00 restore 4001c0c4: 81 c7 e0 08 ret <== NOT EXECUTED 4001c0c8: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED } else { if (tvp->dtor) 4001c0cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c0d0: 22 bf ff ee be,a 4001c088 <== NOT EXECUTED 4001c0d4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED (*tvp->dtor)(tvp->tval); 4001c0d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001c0dc: d0 06 20 0c ld [ %i0 + 0xc ], %o0 <== NOT EXECUTED 4001c0e0: 10 bf ff ea b 4001c088 <== NOT EXECUTED 4001c0e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001c0e8: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001c0ec: 32 bf ff cd bne,a 4001c020 <== NOT EXECUTED 4001c0f0: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001c0f4: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c0f8: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001c0fc: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001c100: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001c104: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001c108: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c10c: 22 bf ff c5 be,a 4001c020 <== NOT EXECUTED 4001c110: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001c114: 7f ff c1 ac call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001c118: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; prev = NULL; the_thread = _Thread_Get (tid, &location); switch (location) { 4001c11c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001c120: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c124: 02 bf ff a4 be 4001bfb4 <== NOT EXECUTED 4001c128: 21 10 00 ff sethi %hi(0x4003fc00), %l0 <== NOT EXECUTED 4001c12c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001c130: 18 bf ff bc bgu 4001c020 <== NOT EXECUTED 4001c134: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001c138: 81 c7 e0 08 ret <== NOT EXECUTED 4001c13c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED while (tvp) { if (tvp->ptr == ptr) { if (prev) prev->next = tvp->next; else the_thread->task_variables = (rtems_task_variable_t *)tvp->next; 4001c140: b0 10 00 03 mov %g3, %i0 4001c144: 10 bf ff c1 b 4001c048 4001c148: c2 22 21 7c st %g1, [ %o0 + 0x17c ] 4001c14c : rtems_status_code rtems_task_variable_get( rtems_id tid, void **ptr, void **result ) { 4001c14c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED Thread_Control *the_thread; Objects_Locations location; rtems_task_variable_t *tvp; if ( !ptr ) 4001c150: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 4001c154: 02 80 00 3b be 4001c240 <== NOT EXECUTED 4001c158: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; if ( !result ) 4001c15c: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED 4001c160: 02 80 00 38 be 4001c240 <== NOT EXECUTED 4001c164: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED uint32_t the_api; uint32_t the_class; Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { 4001c168: 12 80 00 21 bne 4001c1ec <== NOT EXECUTED 4001c16c: 83 36 20 18 srl %i0, 0x18, %g1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4001c170: 05 10 00 ff sethi %hi(0x4003fc00), %g2 <== NOT EXECUTED 4001c174: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 ! 4003fc50 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4001c178: 82 00 60 01 inc %g1 <== NOT EXECUTED 4001c17c: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; tp = _Thread_Executing; 4001c180: 03 10 00 ff sethi %hi(0x4003fc00), %g1 <== NOT EXECUTED 4001c184: d0 00 61 2c ld [ %g1 + 0x12c ], %o0 ! 4003fd2c <_Thread_Executing> <== NOT EXECUTED Objects_Information *information; Thread_Control *tp = (Thread_Control *) 0; if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) { _Thread_Disable_dispatch(); *location = OBJECTS_LOCAL; 4001c188: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED /* * Figure out if the variable is in this task's list. */ tvp = the_thread->task_variables; 4001c18c: d0 02 21 7c ld [ %o0 + 0x17c ], %o0 <== NOT EXECUTED while (tvp) { 4001c190: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c194: 32 80 00 07 bne,a 4001c1b0 <== NOT EXECUTED 4001c198: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001c19c: 30 80 00 1a b,a 4001c204 <== NOT EXECUTED 4001c1a0: 90 90 60 00 orcc %g1, 0, %o0 <== NOT EXECUTED 4001c1a4: 02 80 00 18 be 4001c204 <== NOT EXECUTED 4001c1a8: 01 00 00 00 nop <== NOT EXECUTED if (tvp->ptr == ptr) { 4001c1ac: c2 02 20 04 ld [ %o0 + 4 ], %g1 <== NOT EXECUTED 4001c1b0: 80 a0 40 19 cmp %g1, %i1 <== NOT EXECUTED 4001c1b4: 32 bf ff fb bne,a 4001c1a0 <== NOT EXECUTED 4001c1b8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED /* * Should this return the current (i.e not the * saved) value if `tid' is the current task? */ *result = tvp->tval; 4001c1bc: c2 02 20 0c ld [ %o0 + 0xc ], %g1 <== NOT EXECUTED 4001c1c0: c2 26 80 00 st %g1, [ %i2 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c1c4: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED 4001c1c8: b0 10 20 00 clr %i0 <== NOT EXECUTED 4001c1cc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c1d0: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED 4001c1d4: c4 00 a0 50 ld [ %g2 + 0x50 ], %g2 <== NOT EXECUTED 4001c1d8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c1dc: 02 80 00 15 be 4001c230 <== NOT EXECUTED 4001c1e0: 01 00 00 00 nop <== NOT EXECUTED } _Thread_Enable_dispatch(); return RTEMS_INVALID_ADDRESS; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001c1e4: 81 c7 e0 08 ret <== NOT EXECUTED 4001c1e8: 81 e8 00 00 restore <== NOT EXECUTED 4001c1ec: 84 08 60 07 and %g1, 7, %g2 <== NOT EXECUTED tp = _Thread_Executing; goto done; } the_api = _Objects_Get_API( id ); if ( the_api && the_api > OBJECTS_APIS_LAST ) { 4001c1f0: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 4001c1f4: 08 80 00 15 bleu 4001c248 <== NOT EXECUTED 4001c1f8: 83 36 20 1b srl %i0, 0x1b, %g1 <== NOT EXECUTED 4001c1fc: 81 c7 e0 08 ret <== NOT EXECUTED 4001c200: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4001c204: c2 00 a0 50 ld [ %g2 + 0x50 ], %g1 <== NOT EXECUTED 4001c208: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001c20c: c2 20 a0 50 st %g1, [ %g2 + 0x50 ] <== NOT EXECUTED 4001c210: c4 00 a0 50 ld [ %g2 + 0x50 ], %g2 <== NOT EXECUTED 4001c214: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4001c218: 12 80 00 0a bne 4001c240 <== NOT EXECUTED 4001c21c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 4001c220: 7f ff c6 ed call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c224: b0 10 20 09 mov 9, %i0 ! 9 <== NOT EXECUTED 4001c228: 81 c7 e0 08 ret <== NOT EXECUTED 4001c22c: 81 e8 00 00 restore <== NOT EXECUTED 4001c230: 7f ff c6 e9 call 4000ddd4 <_Thread_Dispatch> <== NOT EXECUTED 4001c234: 01 00 00 00 nop <== NOT EXECUTED 4001c238: 81 c7 e0 08 ret <== NOT EXECUTED 4001c23c: 81 e8 00 00 restore <== NOT EXECUTED 4001c240: 81 c7 e0 08 ret <== NOT EXECUTED 4001c244: 91 e8 20 09 restore %g0, 9, %o0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } the_class = _Objects_Get_class( id ); if ( the_class != 1 ) { /* threads are always first class :) */ 4001c248: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 4001c24c: 32 bf ff e6 bne,a 4001c1e4 <== NOT EXECUTED 4001c250: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } information = _Objects_Information_table[ the_api ][ the_class ]; 4001c254: 83 28 a0 02 sll %g2, 2, %g1 <== NOT EXECUTED 4001c258: 05 10 00 fe sethi %hi(0x4003f800), %g2 <== NOT EXECUTED 4001c25c: 84 10 a3 b0 or %g2, 0x3b0, %g2 ! 4003fbb0 <_Objects_Information_table> <== NOT EXECUTED 4001c260: c6 00 80 01 ld [ %g2 + %g1 ], %g3 <== NOT EXECUTED 4001c264: d0 00 e0 04 ld [ %g3 + 4 ], %o0 <== NOT EXECUTED if ( !information ) { 4001c268: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001c26c: 22 bf ff de be,a 4001c1e4 <== NOT EXECUTED 4001c270: b0 10 20 04 mov 4, %i0 <== NOT EXECUTED *location = OBJECTS_ERROR; goto done; } tp = (Thread_Control *) _Objects_Get( information, id, location ); 4001c274: 7f ff c1 54 call 4000c7c4 <_Objects_Get> <== NOT EXECUTED 4001c278: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED if ( !result ) return RTEMS_INVALID_ADDRESS; the_thread = _Thread_Get (tid, &location); switch (location) { 4001c27c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4001c280: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001c284: 02 bf ff c2 be 4001c18c <== NOT EXECUTED 4001c288: 05 10 00 ff sethi %hi(0x4003fc00), %g2 <== NOT EXECUTED 4001c28c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4001c290: 18 bf ff d5 bgu 4001c1e4 <== NOT EXECUTED 4001c294: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) _Thread_Dispatch(); 4001c298: 81 c7 e0 08 ret <== NOT EXECUTED 4001c29c: 91 e8 20 04 restore %g0, 4, %o0 <== NOT EXECUTED 40004444 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 40004444: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004448: 05 10 00 6b sethi %hi(0x4001ac00), %g2 <== NOT EXECUTED int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 4000444c: d0 20 63 34 st %o0, [ %g1 + 0x334 ] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 40004450: d2 20 a3 38 st %o1, [ %g2 + 0x338 ] <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; 40004454: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } 40004458: 90 10 20 00 clr %o0 <== NOT EXECUTED 4000445c: 81 c3 e0 08 retl <== NOT EXECUTED 40004460: d4 20 63 3c st %o2, [ %g1 + 0x33c ] <== NOT EXECUTED 40005bf8 : } } rtems_status_code rtems_termios_close (void *arg) { 40005bf8: 9d e3 bf 98 save %sp, -104, %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); 40005bfc: 23 10 00 6f sethi %hi(0x4001bc00), %l1 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005c00: c2 06 00 00 ld [ %i0 ], %g1 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005c04: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005c08: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005c0c: 92 10 20 00 clr %o1 40005c10: 40 00 04 c6 call 40006f28 40005c14: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40005c18: 80 a2 20 00 cmp %o0, 0 40005c1c: 12 80 00 47 bne 40005d38 40005c20: 01 00 00 00 nop rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 40005c24: c2 04 20 08 ld [ %l0 + 8 ], %g1 40005c28: 82 00 7f ff add %g1, -1, %g1 40005c2c: 80 a0 60 00 cmp %g1, 0 40005c30: 12 80 00 3a bne 40005d18 40005c34: c2 24 20 08 st %g1, [ %l0 + 8 ] if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 40005c38: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 40005c3c: 03 10 00 6e sethi %hi(0x4001b800), %g1 40005c40: 82 10 62 88 or %g1, 0x288, %g1 ! 4001ba88 40005c44: 85 28 a0 05 sll %g2, 5, %g2 40005c48: 84 00 80 01 add %g2, %g1, %g2 40005c4c: c2 00 a0 04 ld [ %g2 + 4 ], %g1 40005c50: 80 a0 60 00 cmp %g1, 0 40005c54: 02 80 00 49 be 40005d78 40005c58: 01 00 00 00 nop /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40005c5c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005c60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED * default: just flush output buffer */ drainOutput (tty); } if (tty->device.outputUsesInterrupts 40005c64: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 40005c68: 80 a0 60 02 cmp %g1, 2 40005c6c: 22 80 00 47 be,a 40005d88 40005c70: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) 40005c74: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 40005c78: 80 a0 60 00 cmp %g1, 0 40005c7c: 22 80 00 07 be,a 40005c98 40005c80: c4 04 00 00 ld [ %l0 ], %g2 (*tty->device.lastClose)(tty->major, tty->minor, arg); 40005c84: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED 40005c88: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED 40005c8c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005c90: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED if (tty->forw == NULL) { 40005c94: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED 40005c98: 80 a0 a0 00 cmp %g2, 0 40005c9c: 22 80 00 30 be,a 40005d5c 40005ca0: c6 04 20 04 ld [ %l0 + 4 ], %g3 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 40005ca4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED 40005ca8: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED } if (tty->back == NULL) { 40005cac: c2 04 20 04 ld [ %l0 + 4 ], %g1 40005cb0: 80 a0 60 00 cmp %g1, 0 40005cb4: 22 80 00 25 be,a 40005d48 40005cb8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 40005cbc: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED } rtems_semaphore_delete (tty->isem); 40005cc0: 40 00 04 4f call 40006dfc 40005cc4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 rtems_semaphore_delete (tty->osem); 40005cc8: 40 00 04 4d call 40006dfc 40005ccc: d0 04 20 18 ld [ %l0 + 0x18 ], %o0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 40005cd0: 40 00 04 4b call 40006dfc 40005cd4: d0 04 20 8c ld [ %l0 + 0x8c ], %o0 if ((tty->device.pollRead == NULL) || 40005cd8: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1 40005cdc: 80 a0 60 00 cmp %g1, 0 40005ce0: 02 80 00 13 be 40005d2c 40005ce4: 01 00 00 00 nop 40005ce8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005cec: 80 a0 60 02 cmp %g1, 2 40005cf0: 02 80 00 0f be 40005d2c 40005cf4: 01 00 00 00 nop (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf); 40005cf8: 7f ff f5 ca call 40003420 40005cfc: d0 04 20 58 ld [ %l0 + 0x58 ], %o0 free (tty->rawOutBuf.theBuf); 40005d00: 7f ff f5 c8 call 40003420 40005d04: d0 04 20 7c ld [ %l0 + 0x7c ], %o0 free (tty->cbuf); 40005d08: 7f ff f5 c6 call 40003420 40005d0c: d0 04 20 1c ld [ %l0 + 0x1c ], %o0 free (tty); 40005d10: 7f ff f5 c4 call 40003420 40005d14: 90 10 00 10 mov %l0, %o0 } rtems_semaphore_release (rtems_termios_ttyMutex); 40005d18: d0 04 60 8c ld [ %l1 + 0x8c ], %o0 40005d1c: 40 00 05 52 call 40007264 40005d20: b0 10 20 00 clr %i0 return RTEMS_SUCCESSFUL; } 40005d24: 81 c7 e0 08 ret 40005d28: 81 e8 00 00 restore rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 40005d2c: 40 00 04 34 call 40006dfc <== NOT EXECUTED 40005d30: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40005d34: 30 bf ff f1 b,a 40005cf8 <== NOT EXECUTED struct rtems_termios_tty *tty = args->iop->data1; rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005d38: 40 00 07 99 call 40007b9c <== NOT EXECUTED 40005d3c: 01 00 00 00 nop <== NOT EXECUTED if (--tty->refcount == 0) { 40005d40: 10 bf ff ba b 40005c28 <== NOT EXECUTED 40005d44: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { 40005d48: 80 a0 a0 00 cmp %g2, 0 40005d4c: 02 bf ff dd be 40005cc0 40005d50: c4 20 60 94 st %g2, [ %g1 + 0x94 ] rtems_termios_ttyHead->back = NULL; 40005d54: 10 bf ff db b 40005cc0 <== NOT EXECUTED 40005d58: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if (tty->device.lastClose) (*tty->device.lastClose)(tty->major, tty->minor, arg); if (tty->forw == NULL) { rtems_termios_ttyTail = tty->back; 40005d5c: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if ( rtems_termios_ttyTail != NULL ) { 40005d60: 80 a0 e0 00 cmp %g3, 0 40005d64: 02 bf ff d2 be 40005cac 40005d68: c6 20 60 90 st %g3, [ %g1 + 0x90 ] rtems_termios_ttyTail->forw = NULL; 40005d6c: c0 20 c0 00 clr [ %g3 ] <== NOT EXECUTED 40005d70: 10 bf ff cf b 40005cac <== NOT EXECUTED 40005d74: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED } else { /* * default: just flush output buffer */ drainOutput (tty); 40005d78: 7f ff fd 66 call 40005310 40005d7c: 90 10 00 10 mov %l0, %o0 } if (tty->device.outputUsesInterrupts 40005d80: 10 bf ff ba b 40005c68 40005d84: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 40005d88: 40 00 02 ab call 40006834 <== NOT EXECUTED 40005d8c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005d90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005d94: 12 80 00 0c bne 40005dc4 <== NOT EXECUTED 40005d98: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 40005d9c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005da0: 40 00 02 a5 call 40006834 <== NOT EXECUTED 40005da4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 40005da8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005dac: 22 bf ff b3 be,a 40005c78 <== NOT EXECUTED 40005db0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005db4: 40 00 07 7a call 40007b9c <== NOT EXECUTED 40005db8: 01 00 00 00 nop <== NOT EXECUTED } if (tty->device.lastClose) 40005dbc: 10 bf ff af b 40005c78 <== NOT EXECUTED 40005dc0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40005dc4: 40 00 07 76 call 40007b9c <== NOT EXECUTED 40005dc8: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_event_send( 40005dcc: 10 bf ff f5 b 40005da0 <== NOT EXECUTED 40005dd0: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40004678 : * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 40004678: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4000467c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40004680: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 40004684: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED 40004688: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 4000468c: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40004690: 02 80 00 10 be 400046d0 <== NOT EXECUTED 40004694: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 40004698: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 4000469c: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED 400046a0: 02 80 00 04 be 400046b0 <== NOT EXECUTED 400046a4: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); 400046a8: 7f ff ff 75 call 4000447c <== NOT EXECUTED 400046ac: 81 e8 00 00 restore <== NOT EXECUTED } else if (tty->t_line == PPPDISC ) { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 400046b0: c2 00 63 3c ld [ %g1 + 0x33c ], %g1 <== NOT EXECUTED 400046b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400046b8: 02 80 00 04 be 400046c8 <== NOT EXECUTED 400046bc: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 400046c0: 9f c0 40 00 call %g1 <== NOT EXECUTED 400046c4: 01 00 00 00 nop <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 400046c8: 81 c7 e0 08 ret <== NOT EXECUTED 400046cc: 81 e8 00 00 restore <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 400046d0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED 400046d4: 40 00 08 58 call 40006834 <== NOT EXECUTED 400046d8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 400046dc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400046e0: 02 bf ff fa be 400046c8 <== NOT EXECUTED 400046e4: b0 10 20 00 clr %i0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400046e8: 40 00 0d 2d call 40007b9c <== NOT EXECUTED 400046ec: 01 00 00 00 nop <== NOT EXECUTED 400046f0: 30 bf ff f6 b,a 400046c8 <== NOT EXECUTED 400046f4 : * 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) { 400046f4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED char c; int dropped = 0; boolean flow_rcv = FALSE; /* TRUE, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 400046f8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 400046fc: 05 10 00 6e sethi %hi(0x4001b800), %g2 <== NOT EXECUTED 40004700: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004704: a0 10 a2 88 or %g2, 0x288, %l0 <== NOT EXECUTED 40004708: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 4000470c: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 40004710: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004714: 02 80 00 24 be 400047a4 <== NOT EXECUTED 40004718: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED while (len--) { 4000471c: 22 80 00 11 be,a 40004760 <== NOT EXECUTED 40004720: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40004724: b4 06 80 19 add %i2, %i1, %i2 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004728: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED boolean 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++; 4000472c: d0 0e 40 00 ldub [ %i1 ], %o0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_rint(c,tty); 40004730: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40004734: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40004738: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED 4000473c: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 40004740: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40004744: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004748: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED boolean 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++; 4000474c: b2 06 60 01 inc %i1 <== NOT EXECUTED int dropped = 0; boolean 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--) { 40004750: 80 a6 40 1a cmp %i1, %i2 <== NOT EXECUTED 40004754: 32 bf ff f6 bne,a 4000472c <== NOT EXECUTED 40004758: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4000475c: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED 40004760: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004764: 12 80 00 0e bne 4000479c <== NOT EXECUTED 40004768: a8 10 20 00 clr %l4 <== NOT EXECUTED 4000476c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40004770: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004774: 02 80 00 0a be 4000479c <== NOT EXECUTED 40004778: 01 00 00 00 nop <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4000477c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40004780: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004784: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40004788: a8 10 20 00 clr %l4 <== NOT EXECUTED 4000478c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004790: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; } 40004794: 81 c7 e0 08 ret <== NOT EXECUTED 40004798: 91 e8 00 14 restore %g0, %l4, %o0 <== NOT EXECUTED 4000479c: 81 c7 e0 08 ret <== NOT EXECUTED 400047a0: 91 e8 00 14 restore %g0, %l4, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400047a4: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED char c; int dropped = 0; boolean flow_rcv = FALSE; /* TRUE, if flow control char received */ rtems_interrupt_level level; if (rtems_termios_linesw[tty->t_line].l_rint != NULL) { 400047a8: a8 10 20 00 clr %l4 <== NOT EXECUTED 400047ac: a6 10 20 00 clr %l3 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 400047b0: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 400047b4: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 400047b8: 02 80 00 1c be 40004828 <== NOT EXECUTED 400047bc: ac 06 20 4a add %i0, 0x4a, %l6 <== NOT EXECUTED c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 400047c0: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400047c4: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400047c8: 02 80 00 0b be 400047f4 <== NOT EXECUTED 400047cc: e2 0e 40 00 ldub [ %i1 ], %l1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 400047d0: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED 400047d4: 83 2c 60 18 sll %l1, 0x18, %g1 <== NOT EXECUTED 400047d8: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED 400047dc: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED 400047e0: 02 80 00 63 be 4000496c <== NOT EXECUTED 400047e4: c2 0e 20 49 ldub [ %i0 + 0x49 ], %g1 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { 400047e8: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 400047ec: 02 80 00 68 be 4000498c <== NOT EXECUTED 400047f0: 01 00 00 00 nop <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = TRUE; } } if (flow_rcv) { 400047f4: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED 400047f8: 02 80 00 23 be 40004884 <== NOT EXECUTED 400047fc: 01 00 00 00 nop <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 40004800: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004804: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED 40004808: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED 4000480c: 02 80 00 0f be 40004848 <== NOT EXECUTED 40004810: 01 00 00 00 nop <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004814: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 40004818: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED 4000481c: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED 40004820: 12 bf ff e8 bne 400047c0 <== NOT EXECUTED 40004824: 01 00 00 00 nop <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004828: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 4000482c: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 40004830: 82 00 40 14 add %g1, %l4, %g1 <== NOT EXECUTED 40004834: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 40004838: 40 00 0a 8b call 40007264 <== NOT EXECUTED 4000483c: b0 10 00 14 mov %l4, %i0 <== NOT EXECUTED return dropped; } 40004840: 81 c7 e0 08 ret <== NOT EXECUTED 40004844: 81 e8 00 00 restore <== 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); 40004848: 7f ff f5 e8 call 40001fe8 <== NOT EXECUTED 4000484c: 01 00 00 00 nop <== NOT EXECUTED 40004850: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40004854: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004858: c4 06 20 94 ld [ %i0 + 0x94 ], %g2 <== 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; 4000485c: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40004860: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40004864: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004868: 12 80 00 55 bne 400049bc <== NOT EXECUTED 4000486c: 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); } /* reenable interrupts */ rtems_interrupt_enable(level); 40004870: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40004874: 7f ff f5 e1 call 40001ff8 <== NOT EXECUTED 40004878: b2 06 60 01 inc %i1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4000487c: 10 bf ff e8 b 4000481c <== NOT EXECUTED 40004880: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40004884: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED 40004888: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 4000488c: 40 00 4a 8e call 400172c4 <.urem> <== NOT EXECUTED 40004890: 90 02 20 01 inc %o0 <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 40004894: 7f ff f5 d5 call 40001fe8 <== NOT EXECUTED 40004898: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED 4000489c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 400048a0: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 400048a4: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED 400048a8: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED 400048ac: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED 400048b0: 40 00 4a 85 call 400172c4 <.urem> <== NOT EXECUTED 400048b4: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED 400048b8: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED 400048bc: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 400048c0: 08 80 00 13 bleu 4000490c <== NOT EXECUTED 400048c4: 01 00 00 00 nop <== NOT EXECUTED 400048c8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400048cc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400048d0: 12 80 00 0f bne 4000490c <== NOT EXECUTED 400048d4: 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; 400048d8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400048dc: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED 400048e0: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 400048e4: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED 400048e8: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED 400048ec: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED 400048f0: 02 80 00 45 be 40004a04 <== NOT EXECUTED 400048f4: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 400048f8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 400048fc: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED 40004900: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED 40004904: 02 80 00 36 be 400049dc <== NOT EXECUTED 40004908: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level); 4000490c: 7f ff f5 bb call 40001ff8 <== NOT EXECUTED 40004910: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { 40004914: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED 40004918: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 4000491c: 22 80 00 21 be,a 400049a0 <== NOT EXECUTED 40004920: a8 05 20 01 inc %l4 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 40004924: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED 40004928: e2 28 40 10 stb %l1, [ %g1 + %l0 ] <== 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 )) { 4000492c: c4 06 20 e4 ld [ %i0 + 0xe4 ], %g2 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 40004930: e0 26 20 60 st %l0, [ %i0 + 0x60 ] <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 40004934: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40004938: 32 bf ff b8 bne,a 40004818 <== NOT EXECUTED 4000493c: b2 06 60 01 inc %i1 <== NOT EXECUTED 40004940: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED 40004944: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004948: 22 bf ff b4 be,a 40004818 <== NOT EXECUTED 4000494c: b2 06 60 01 inc %i1 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40004950: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED 40004954: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004958: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4000495c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 40004960: b2 06 60 01 inc %i1 <== NOT EXECUTED /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); tty->tty_rcvwakeup = 1; 40004964: 10 bf ff ad b 40004818 <== NOT EXECUTED 40004968: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { 4000496c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40004970: 02 80 00 0e be 400049a8 <== NOT EXECUTED 40004974: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40004978: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 4000497c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40004980: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED 40004984: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 40004988: 30 bf ff 9e b,a 40004800 <== NOT EXECUTED flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4000498c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 40004990: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED flow_rcv = TRUE; } else if (c == tty->termios.c_cc[VSTART]) { /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 40004994: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED 40004998: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 4000499c: 30 bf ff 99 b,a 40004800 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 400049a0: 10 bf ff 9e b 40004818 <== NOT EXECUTED 400049a4: b2 06 60 01 inc %i1 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 400049a8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 400049ac: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 400049b0: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED 400049b4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED 400049b8: 30 bf ff 92 b,a 40004800 <== 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, 400049bc: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED 400049c0: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED 400049c4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 400049c8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400049cc: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 400049d0: 9f c0 80 00 call %g2 <== NOT EXECUTED 400049d4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400049d8: 30 bf ff a6 b,a 40004870 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 400049dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 400049e0: c4 06 20 ac ld [ %i0 + 0xac ], %g2 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 400049e4: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED 400049e8: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 400049ec: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400049f0: 02 bf ff c7 be 4000490c <== NOT EXECUTED 400049f4: 01 00 00 00 nop <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 400049f8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400049fc: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40004a00: 30 bf ff c3 b,a 4000490c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 40004a04: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004a08: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 40004a0c: 12 80 00 06 bne 40004a24 <== NOT EXECUTED 40004a10: 01 00 00 00 nop <== NOT EXECUTED 40004a14: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED 40004a18: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004a1c: 12 bf ff bc bne 4000490c <== NOT EXECUTED 40004a20: 01 00 00 00 nop <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 40004a24: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004a28: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 40004a2c: d0 06 20 10 ld [ %i0 + 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; 40004a30: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004a34: 92 10 00 16 mov %l6, %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; 40004a38: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004a3c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004a40: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40004a44: 30 bf ff b2 b,a 4000490c <== NOT EXECUTED 400043f4 : struct rtems_termios_tty *rtems_termios_ttyTail; rtems_id rtems_termios_ttyMutex; void rtems_termios_initialize (void) { 400043f4: 9d e3 bf 98 save %sp, -104, %sp rtems_status_code sc; /* * Create the mutex semaphore for the tty list */ if (!rtems_termios_ttyMutex) { 400043f8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400043fc: c4 00 60 8c ld [ %g1 + 0x8c ], %g2 ! 4001bc8c 40004400: 80 a0 a0 00 cmp %g2, 0 40004404: 02 80 00 04 be 40004414 40004408: 98 10 60 8c or %g1, 0x8c, %o4 4000440c: 81 c7 e0 08 ret 40004410: 81 e8 00 00 restore sc = rtems_semaphore_create ( 40004414: 11 15 14 9b sethi %hi(0x54526c00), %o0 40004418: 92 10 20 01 mov 1, %o1 4000441c: 90 12 21 69 or %o0, 0x169, %o0 40004420: 94 10 20 54 mov 0x54, %o2 40004424: 40 00 09 ea call 40006bcc 40004428: 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) 4000442c: 80 a2 20 00 cmp %o0, 0 40004430: 02 bf ff f7 be 4000440c 40004434: 01 00 00 00 nop rtems_fatal_error_occurred (sc); 40004438: 40 00 0d d9 call 40007b9c <== NOT EXECUTED 4000443c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 40004440: 01 00 00 00 nop 400057dc : } } rtems_status_code rtems_termios_ioctl (void *arg) { 400057dc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400057e0: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 400057e4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400057e8: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; 400057ec: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400057f0: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED } } rtems_status_code rtems_termios_ioctl (void *arg) { 400057f4: a4 10 00 18 mov %i0, %l2 <== NOT EXECUTED 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); 400057f8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400057fc: 40 00 05 cb call 40006f28 <== NOT EXECUTED 40005800: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) { 40005804: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 40005808: 22 80 00 05 be,a 4000581c <== NOT EXECUTED 4000580c: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED args->ioctl_return = sc; 40005810: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED 40005814: 81 c7 e0 08 ret <== NOT EXECUTED 40005818: 81 e8 00 00 restore <== NOT EXECUTED return sc; } switch (args->command) { 4000581c: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED 40005820: 22 80 00 27 be,a 400058bc <== NOT EXECUTED 40005824: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED 40005828: 18 80 00 0e bgu 40005860 <== NOT EXECUTED 4000582c: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED 40005830: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED 40005834: 22 80 00 61 be,a 400059b8 <== NOT EXECUTED 40005838: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED 4000583c: 08 80 00 4c bleu 4000596c <== NOT EXECUTED 40005840: 80 a0 a0 01 cmp %g2, 1 <== NOT EXECUTED if (tty->device.setAttributes) (*tty->device.setAttributes)(tty->minor, &tty->termios); break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 40005844: 7f ff fe b3 call 40005310 <== NOT EXECUTED 40005848: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); 4000584c: 40 00 06 86 call 40007264 <== NOT EXECUTED 40005850: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED args->ioctl_return = sc; 40005854: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED return sc; } 40005858: 81 c7 e0 08 ret <== NOT EXECUTED 4000585c: 81 e8 00 00 restore <== 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) { 40005860: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED 40005864: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005868: 02 80 00 48 be 40005988 <== NOT EXECUTED 4000586c: 01 00 00 00 nop <== NOT EXECUTED 40005870: 18 80 00 1b bgu 400058dc <== NOT EXECUTED 40005874: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED 40005878: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED 4000587c: 22 80 00 14 be,a 400058cc <== NOT EXECUTED 40005880: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 40005884: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED 40005888: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 4000588c: 82 10 62 88 or %g1, 0x288, %g1 ! 4001ba88 <== NOT EXECUTED 40005890: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005894: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40005898: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 <== NOT EXECUTED 4000589c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400058a0: 02 bf ff eb be 4000584c <== NOT EXECUTED 400058a4: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 400058a8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 400058ac: 9f c0 40 00 call %g1 <== NOT EXECUTED 400058b0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED 400058b4: 10 bf ff e6 b 4000584c <== NOT EXECUTED 400058b8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; break; case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 400058bc: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED 400058c0: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 400058c4: 10 bf ff e2 b 4000584c <== NOT EXECUTED 400058c8: c4 24 60 e0 st %g2, [ %l1 + 0xe0 ] <== NOT EXECUTED case RTEMS_IO_TCDRAIN: drainOutput (tty); break; case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 400058cc: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED 400058d0: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED 400058d4: 10 bf ff de b 4000584c <== NOT EXECUTED 400058d8: c4 24 60 d8 st %g2, [ %l1 + 0xd8 ] <== 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) { 400058dc: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED 400058e0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400058e4: 02 80 00 1e be 4000595c <== NOT EXECUTED 400058e8: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED 400058ec: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <== NOT EXECUTED 400058f0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400058f4: 32 bf ff e5 bne,a 40005888 <== NOT EXECUTED 400058f8: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 400058fc: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40005900: 05 10 00 6e sethi %hi(0x4001b800), %g2 <== NOT EXECUTED 40005904: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40005908: a0 10 a2 88 or %g2, 0x288, %l0 <== NOT EXECUTED 4000590c: 82 00 40 10 add %g1, %l0, %g1 <== NOT EXECUTED 40005910: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED 40005914: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005918: 22 80 00 06 be,a 40005930 <== NOT EXECUTED 4000591c: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 40005920: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005924: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40005928: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 4000592c: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED tty->t_sc = NULL; /* ensure that no more valid data */ 40005930: c0 24 60 d0 clr [ %l1 + 0xd0 ] <== 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); 40005934: c6 00 40 00 ld [ %g1 ], %g3 <== 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) { 40005938: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED 4000593c: c4 04 00 02 ld [ %l0 + %g2 ], %g2 <== NOT EXECUTED 40005940: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005944: 02 bf ff c2 be 4000584c <== NOT EXECUTED 40005948: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 4000594c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005950: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40005954: 10 bf ff be b 4000584c <== NOT EXECUTED 40005958: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED } break; case TIOCGETD: *(int*)(args->buffer)=tty->t_line; 4000595c: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED 40005960: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED 40005964: 10 bf ff ba b 4000584c <== NOT EXECUTED 40005968: c2 20 80 00 st %g1, [ %g2 ] <== 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) { 4000596c: 32 bf ff c7 bne,a 40005888 <== NOT EXECUTED 40005970: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 40005974: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED 40005978: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED 4000597c: 40 00 2b 52 call 400106c4 <== NOT EXECUTED 40005980: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 40005984: 30 bf ff b2 b,a 4000584c <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 40005988: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED 4000598c: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED if ( rawnc < 0 ) 40005990: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED 40005994: 0c 80 00 82 bneg 40005b9c <== NOT EXECUTED 40005998: 01 00 00 00 nop <== NOT EXECUTED rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 4000599c: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED 400059a0: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED 400059a4: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED 400059a8: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 400059ac: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED 400059b0: 10 bf ff a7 b 4000584c <== NOT EXECUTED 400059b4: c2 20 c0 00 st %g1, [ %g3 ] <== NOT EXECUTED case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; break; case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 400059b8: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED 400059bc: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 400059c0: 40 00 2b 41 call 400106c4 <== NOT EXECUTED 400059c4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 400059c8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400059cc: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED 400059d0: 02 80 00 19 be 40005a34 <== NOT EXECUTED 400059d4: 01 00 00 00 nop <== NOT EXECUTED 400059d8: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED 400059dc: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 400059e0: 12 80 00 15 bne 40005a34 <== NOT EXECUTED 400059e4: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 400059e8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 400059ec: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED 400059f0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 400059f4: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 400059f8: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED 400059fc: 02 80 00 0e be 40005a34 <== NOT EXECUTED 40005a00: 01 00 00 00 nop <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 40005a04: 7f ff f1 79 call 40001fe8 <== NOT EXECUTED 40005a08: 01 00 00 00 nop <== NOT EXECUTED 40005a0c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40005a10: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40005a14: c4 04 60 94 ld [ %l1 + 0x94 ], %g2 <== 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; 40005a18: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED 40005a1c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40005a20: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 40005a24: 12 80 00 6d bne 40005bd8 <== NOT EXECUTED 40005a28: 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); } /* reenable interrupts */ rtems_interrupt_enable(level); 40005a2c: 7f ff f1 73 call 40001ff8 <== NOT EXECUTED 40005a30: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED } } /* check for incoming XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXOF) && 40005a34: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005a38: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED 40005a3c: 02 80 00 0c be 40005a6c <== NOT EXECUTED 40005a40: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40005a44: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 40005a48: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40005a4c: 12 80 00 08 bne 40005a6c <== NOT EXECUTED 40005a50: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 40005a54: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005a58: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED 40005a5c: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 40005a60: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40005a64: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED 40005a68: c4 24 60 b8 st %g2, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 40005a6c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005a70: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40005a74: 12 80 00 22 bne 40005afc <== NOT EXECUTED 40005a78: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== 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) { 40005a7c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40005a80: 06 80 00 4a bl 40005ba8 <== NOT EXECUTED 40005a84: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_MDRTS; } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005a88: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED 40005a8c: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED 40005a90: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED 40005a94: 02 80 00 06 be 40005aac <== NOT EXECUTED 40005a98: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXOF; 40005a9c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005aa0: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED 40005aa4: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 40005aa8: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED 40005aac: 22 80 00 06 be,a 40005ac4 <== NOT EXECUTED 40005ab0: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_MDXON; 40005ab4: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005ab8: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED 40005abc: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED 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) { 40005ac0: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED 40005ac4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40005ac8: 02 80 00 23 be 40005b54 <== NOT EXECUTED 40005acc: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005ad0: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 40005ad4: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 40005ad8: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 40005adc: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED 40005ae0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005ae4: 02 bf ff 5a be 4000584c <== NOT EXECUTED 40005ae8: 01 00 00 00 nop <== NOT EXECUTED (*tty->device.setAttributes)(tty->minor, &tty->termios); 40005aec: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005af0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005af4: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED 40005af8: 30 bf ff 55 b,a 4000584c <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 40005afc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40005b00: 06 80 00 2a bl 40005ba8 <== NOT EXECUTED 40005b04: 01 00 00 00 nop <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 40005b08: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005b0c: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED 40005b10: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 40005b14: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED 40005b18: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40005b1c: 02 80 00 09 be 40005b40 <== NOT EXECUTED 40005b20: 01 00 00 00 nop <== NOT EXECUTED 40005b24: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED 40005b28: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005b2c: 02 80 00 05 be 40005b40 <== NOT EXECUTED 40005b30: 01 00 00 00 nop <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 40005b34: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005b38: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005b3c: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 40005b40: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005b44: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 40005b48: c2 24 60 b8 st %g1, [ %l1 + 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) { 40005b4c: 10 bf ff cd b 40005a80 <== NOT EXECUTED 40005b50: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); 40005b54: 40 00 02 24 call 400063e4 <== NOT EXECUTED 40005b58: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; 40005b5c: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED 40005b60: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED 40005b64: 40 00 44 f2 call 40016f2c <.umul> <== NOT EXECUTED 40005b68: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40005b6c: 40 00 45 2a call 40017014 <.udiv> <== NOT EXECUTED 40005b70: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME]) { 40005b74: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40005b78: 02 80 00 11 be 40005bbc <== NOT EXECUTED 40005b7c: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005b80: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED else { rtems_interval ticksPerSecond; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_PER_SECOND, &ticksPerSecond); tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 40005b84: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) 40005b88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005b8c: 12 bf ff d3 bne 40005ad8 <== NOT EXECUTED 40005b90: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; 40005b94: 10 bf ff d2 b 40005adc <== NOT EXECUTED 40005b98: d0 24 60 74 st %o0, [ %l1 + 0x74 ] <== NOT EXECUTED #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 40005b9c: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED 40005ba0: 10 bf ff 7f b 4000599c <== NOT EXECUTED 40005ba4: 88 01 00 01 add %g4, %g1, %g4 <== NOT EXECUTED /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { tty->flow_ctrl |= FL_MDRTS; 40005ba8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED 40005bac: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED 40005bb0: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 40005bb4: 10 bf ff b6 b 40005a8c <== NOT EXECUTED 40005bb8: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 40005bbc: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED 40005bc0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005bc4: 32 bf ff c4 bne,a 40005ad4 <== NOT EXECUTED 40005bc8: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 40005bcc: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40005bd0: 10 bf ff c3 b 40005adc <== NOT EXECUTED 40005bd4: c2 24 60 6c st %g1, [ %l1 + 0x6c ] <== 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, 40005bd8: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED 40005bdc: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED 40005be0: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED 40005be4: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED 40005be8: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 40005bec: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005bf0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 40005bf4: 30 bf ff 8e b,a 40005a2c <== NOT EXECUTED 40005dd4 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 40005dd4: 9d e3 bf 98 save %sp, -104, %sp struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 40005dd8: 29 10 00 6f sethi %hi(0x4001bc00), %l4 40005ddc: d0 05 20 8c ld [ %l4 + 0x8c ], %o0 ! 4001bc8c 40005de0: 92 10 20 00 clr %o1 40005de4: 40 00 04 51 call 40006f28 40005de8: 94 10 20 00 clr %o2 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40005dec: a4 92 20 00 orcc %o0, 0, %l2 40005df0: 32 80 00 1e bne,a 40005e68 40005df4: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 40005df8: 27 10 00 6f sethi %hi(0x4001bc00), %l3 40005dfc: e0 04 e0 94 ld [ %l3 + 0x94 ], %l0 ! 4001bc94 40005e00: 80 a4 20 00 cmp %l0, 0 40005e04: 32 80 00 08 bne,a 40005e24 40005e08: c2 04 20 0c ld [ %l0 + 0xc ], %g1 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005e0c: 10 80 00 19 b 40005e70 40005e10: 90 10 20 01 mov 1, %o0 */ 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) { 40005e14: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED 40005e18: 02 80 00 16 be 40005e70 <== NOT EXECUTED 40005e1c: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED if ((tty->major == major) && (tty->minor == minor)) 40005e20: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED 40005e24: 80 a0 40 18 cmp %g1, %i0 40005e28: 32 bf ff fb bne,a 40005e14 40005e2c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED 40005e30: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 40005e34: 80 a0 40 19 cmp %g1, %i1 40005e38: 32 bf ff f7 bne,a 40005e14 40005e3c: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { 40005e40: c2 04 20 08 ld [ %l0 + 8 ], %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005e44: c4 06 80 00 ld [ %i2 ], %g2 if (!tty->refcount++) { 40005e48: 82 00 60 01 inc %g1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 40005e4c: e0 20 a0 28 st %l0, [ %g2 + 0x28 ] if (!tty->refcount++) { 40005e50: 80 a0 60 01 cmp %g1, 1 40005e54: 02 80 00 1e be 40005ecc 40005e58: c2 24 20 08 st %g1, [ %l0 + 8 ] (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); 40005e5c: 40 00 05 02 call 40007264 40005e60: d0 05 20 8c ld [ %l4 + 0x8c ], %o0 return RTEMS_SUCCESSFUL; } 40005e64: b0 10 00 12 mov %l2, %i0 40005e68: 81 c7 e0 08 ret 40005e6c: 81 e8 00 00 restore static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005e70: 7f ff f6 33 call 4000373c 40005e74: 92 10 20 e8 mov 0xe8, %o1 if (tty == NULL) { 40005e78: a2 92 20 00 orcc %o0, 0, %l1 40005e7c: 12 80 00 06 bne 40005e94 40005e80: d0 05 20 8c ld [ %l4 + 0x8c ], %o0 */ 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); 40005e84: 40 00 04 f8 call 40007264 <== NOT EXECUTED 40005e88: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; } 40005e8c: 81 c7 e0 08 ret <== NOT EXECUTED 40005e90: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005e94: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005e98: c4 00 63 38 ld [ %g1 + 0x338 ], %g2 ! 4001af38 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 40005e9c: a0 10 00 11 mov %l1, %l0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 40005ea0: c4 24 60 64 st %g2, [ %l1 + 0x64 ] tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 40005ea4: d0 04 60 64 ld [ %l1 + 0x64 ], %o0 40005ea8: 7f ff f5 87 call 400034c4 40005eac: 01 00 00 00 nop if (tty->rawInBuf.theBuf == NULL) { 40005eb0: 80 a2 20 00 cmp %o0, 0 40005eb4: 12 80 00 25 bne 40005f48 40005eb8: d0 24 60 58 st %o0, [ %l1 + 0x58 ] free(tty); 40005ebc: 7f ff f5 59 call 40003420 <== NOT EXECUTED 40005ec0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005ec4: 10 bf ff f0 b 40005e84 <== NOT EXECUTED 40005ec8: d0 05 20 8c ld [ %l4 + 0x8c ], %o0 <== NOT EXECUTED c = 'a'; } args->iop->data1 = tty; if (!tty->refcount++) { if (tty->device.firstOpen) 40005ecc: c2 04 20 98 ld [ %l0 + 0x98 ], %g1 40005ed0: 80 a0 60 00 cmp %g1, 0 40005ed4: 02 80 00 05 be 40005ee8 40005ed8: 90 10 00 18 mov %i0, %o0 (*tty->device.firstOpen)(major, minor, arg); 40005edc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005ee0: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005ee4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 40005ee8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 40005eec: 80 a0 60 02 cmp %g1, 2 40005ef0: 12 bf ff db bne 40005e5c 40005ef4: 13 10 00 18 sethi %hi(0x40006000), %o1 sc = rtems_task_start(tty->rxTaskId, 40005ef8: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED 40005efc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40005f00: 40 00 06 26 call 40007798 <== NOT EXECUTED 40005f04: 92 12 62 a8 or %o1, 0x2a8, %o1 <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005f08: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f0c: 22 80 00 05 be,a 40005f20 <== NOT EXECUTED 40005f10: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005f14: 40 00 07 22 call 40007b9c <== NOT EXECUTED 40005f18: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_start(tty->txTaskId, 40005f1c: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED 40005f20: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED 40005f24: 13 10 00 18 sethi %hi(0x40006000), %o1 <== NOT EXECUTED 40005f28: 40 00 06 1c call 40007798 <== NOT EXECUTED 40005f2c: 92 12 63 38 or %o1, 0x338, %o1 ! 40006338 <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 40005f30: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005f34: 02 bf ff ca be 40005e5c <== NOT EXECUTED 40005f38: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40005f3c: 40 00 07 18 call 40007b9c <== NOT EXECUTED 40005f40: 01 00 00 00 nop <== NOT EXECUTED 40005f44: 30 bf ff c6 b,a 40005e5c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 40005f48: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005f4c: c4 00 63 3c ld [ %g1 + 0x33c ], %g2 ! 4001af3c 40005f50: c4 24 60 88 st %g2, [ %l1 + 0x88 ] tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 40005f54: d0 04 60 88 ld [ %l1 + 0x88 ], %o0 40005f58: 7f ff f5 5b call 400034c4 40005f5c: 01 00 00 00 nop if (tty->rawOutBuf.theBuf == NULL) { 40005f60: 80 a2 20 00 cmp %o0, 0 40005f64: 12 80 00 0b bne 40005f90 40005f68: d0 24 60 7c st %o0, [ %l1 + 0x7c ] free((void *)(tty->rawInBuf.theBuf)); 40005f6c: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 40005f70: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); if (tty->cbuf == NULL) { free((void *)(tty->rawOutBuf.theBuf)); free((void *)(tty->rawInBuf.theBuf)); 40005f74: 7f ff f5 2b call 40003420 <== NOT EXECUTED 40005f78: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED free(tty); 40005f7c: 7f ff f5 29 call 40003420 <== NOT EXECUTED 40005f80: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 40005f84: 40 00 04 b8 call 40007264 <== NOT EXECUTED 40005f88: d0 05 20 8c ld [ %l4 + 0x8c ], %o0 <== NOT EXECUTED 40005f8c: 30 bf ff b7 b,a 40005e68 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 40005f90: 03 10 00 6b sethi %hi(0x4001ac00), %g1 40005f94: 7f ff f5 4c call 400034c4 40005f98: d0 00 63 34 ld [ %g1 + 0x334 ], %o0 ! 4001af34 if (tty->cbuf == NULL) { 40005f9c: 80 a2 20 00 cmp %o0, 0 40005fa0: 12 80 00 07 bne 40005fbc 40005fa4: d0 24 60 1c st %o0, [ %l1 + 0x1c ] free((void *)(tty->rawOutBuf.theBuf)); 40005fa8: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED 40005fac: 7f ff f5 1d call 40003420 <== NOT EXECUTED 40005fb0: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 40005fb4: 10 bf ff f0 b 40005f74 <== NOT EXECUTED 40005fb8: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005fbc: c2 04 e0 94 ld [ %l3 + 0x94 ], %g1 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 40005fc0: c0 24 60 d4 clr [ %l1 + 0xd4 ] tty->tty_snd.sw_arg = NULL; 40005fc4: c0 24 60 d8 clr [ %l1 + 0xd8 ] tty->tty_rcv.sw_pfn = NULL; 40005fc8: c0 24 60 dc clr [ %l1 + 0xdc ] tty->tty_rcv.sw_arg = NULL; 40005fcc: c0 24 60 e0 clr [ %l1 + 0xe0 ] tty->tty_rcvwakeup = 0; 40005fd0: c0 24 60 e4 clr [ %l1 + 0xe4 ] /* * link tty */ tty->forw = rtems_termios_ttyHead; 40005fd4: c2 24 40 00 st %g1, [ %l1 ] tty->back = NULL; if (rtems_termios_ttyHead != NULL) 40005fd8: 80 a0 60 00 cmp %g1, 0 40005fdc: 02 80 00 03 be 40005fe8 40005fe0: c0 24 60 04 clr [ %l1 + 4 ] rtems_termios_ttyHead->back = tty; 40005fe4: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 40005fe8: 07 10 00 6f sethi %hi(0x4001bc00), %g3 40005fec: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2 ! 4001bc90 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 40005ff0: 03 10 00 6f sethi %hi(0x4001bc00), %g1 if (rtems_termios_ttyTail == NULL) 40005ff4: 80 a0 a0 00 cmp %g2, 0 40005ff8: 02 80 00 72 be 400061c0 40005ffc: e0 20 60 94 st %l0, [ %g1 + 0x94 ] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40006000: 27 10 00 6b sethi %hi(0x4001ac00), %l3 40006004: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 ! 4001af40 40006008: 11 15 14 9a sethi %hi(0x54526800), %o0 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 4000600c: f2 24 20 10 st %i1, [ %l0 + 0x10 ] tty->major = major; 40006010: f0 24 20 0c st %i0, [ %l0 + 0xc ] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 40006014: 90 12 21 00 or %o0, 0x100, %o0 40006018: 92 10 20 01 mov 1, %o1 4000601c: 90 10 40 08 or %g1, %o0, %o0 40006020: 94 10 20 54 mov 0x54, %o2 40006024: 96 10 20 00 clr %o3 40006028: 40 00 02 e9 call 40006bcc 4000602c: 98 04 20 14 add %l0, 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) 40006030: 80 a2 20 00 cmp %o0, 0 40006034: 12 80 00 99 bne 40006298 40006038: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4000603c: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 40006040: 11 15 14 9b sethi %hi(0x54526c00), %o0 40006044: 92 10 20 01 mov 1, %o1 40006048: 90 12 23 00 or %o0, 0x300, %o0 4000604c: 94 10 20 54 mov 0x54, %o2 40006050: 90 10 40 08 or %g1, %o0, %o0 40006054: 96 10 20 00 clr %o3 40006058: 40 00 02 dd call 40006bcc 4000605c: 98 04 20 18 add %l0, 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) 40006060: 80 a2 20 00 cmp %o0, 0 40006064: 12 80 00 89 bne 40006288 40006068: 01 00 00 00 nop rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 4000606c: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 40006070: 11 15 14 9e sethi %hi(0x54527800), %o0 40006074: 92 10 20 00 clr %o1 40006078: 90 10 40 08 or %g1, %o0, %o0 4000607c: 94 10 20 20 mov 0x20, %o2 40006080: 96 10 20 00 clr %o3 40006084: 40 00 02 d2 call 40006bcc 40006088: 98 04 20 8c add %l0, 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) 4000608c: 80 a2 20 00 cmp %o0, 0 40006090: 12 80 00 7a bne 40006278 40006094: 01 00 00 00 nop rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 40006098: c0 24 20 94 clr [ %l0 + 0x94 ] /* * Set callbacks */ tty->device = *callbacks; 4000609c: 92 10 00 1b mov %i3, %o1 400060a0: 90 04 20 98 add %l0, 0x98, %o0 400060a4: 40 00 29 88 call 400106c4 400060a8: 94 10 20 20 mov 0x20, %o2 /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 400060ac: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 400060b0: 80 a0 60 02 cmp %g1, 2 400060b4: 02 80 00 54 be 40006204 400060b8: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 400060bc: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 400060c0: 80 a0 60 00 cmp %g1, 0 400060c4: 02 80 00 41 be 400061c8 400060c8: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 400060cc: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1 400060d0: 80 a0 60 02 cmp %g1, 2 400060d4: 02 80 00 3d be 400061c8 400060d8: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 400060dc: c8 0c e3 40 ldub [ %l3 + 0x340 ], %g4 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; 400060e0: c0 24 60 b8 clr [ %l1 + 0xb8 ] /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 400060e4: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 400060e8: 88 01 20 01 inc %g4 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; 400060ec: da 04 60 64 ld [ %l1 + 0x64 ], %o5 /* 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; 400060f0: 83 30 60 01 srl %g1, 1, %g1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 400060f4: c8 2c e3 40 stb %g4, [ %l3 + 0x340 ] /* 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; 400060f8: c2 24 60 bc st %g1, [ %l1 + 0xbc ] } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 400060fc: 03 00 00 09 sethi %hi(0x2400), %g1 40006100: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40006104: 05 00 00 06 sethi %hi(0x1800), %g2 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 40006108: c2 24 60 30 st %g1, [ %l1 + 0x30 ] tty->termios.c_oflag = OPOST | ONLCR | XTABS; 4000610c: 84 10 a0 05 or %g2, 5, %g2 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 40006110: 03 00 00 20 sethi %hi(0x8000), %g1 40006114: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 40006118: c4 24 60 34 st %g2, [ %l1 + 0x34 ] tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 4000611c: c2 24 60 3c st %g1, [ %l1 + 0x3c ] tty->termios.c_cc[VINTR] = '\003'; 40006120: 84 10 20 03 mov 3, %g2 tty->termios.c_cc[VQUIT] = '\034'; 40006124: 82 10 20 1c mov 0x1c, %g1 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'; 40006128: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ] tty->termios.c_cc[VQUIT] = '\034'; 4000612c: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ] tty->termios.c_cc[VERASE] = '\177'; 40006130: 84 10 20 7f mov 0x7f, %g2 tty->termios.c_cc[VKILL] = '\025'; 40006134: 82 10 20 15 mov 0x15, %g1 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; 40006138: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ] tty->termios.c_cc[VKILL] = '\025'; 4000613c: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ] tty->termios.c_cc[VEOF] = '\004'; 40006140: 84 10 20 04 mov 4, %g2 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 40006144: 82 10 20 11 mov 0x11, %g1 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'; 40006148: 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'; 4000614c: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ] tty->termios.c_cc[VSTOP] = '\023'; 40006150: 84 10 20 13 mov 0x13, %g2 tty->termios.c_cc[VSUSP] = '\032'; 40006154: 82 10 20 1a mov 0x1a, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 40006158: 86 10 28 bd mov 0x8bd, %g3 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 4000615c: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ] tty->termios.c_cc[VSUSP] = '\032'; 40006160: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ] tty->termios.c_cc[VREPRINT] = '\022'; 40006164: 84 10 20 12 mov 0x12, %g2 tty->termios.c_cc[VDISCARD] = '\017'; 40006168: 82 10 20 0f mov 0xf, %g1 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 4000616c: c6 24 60 38 st %g3, [ %l1 + 0x38 ] 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'; 40006170: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ] tty->termios.c_cc[VDISCARD] = '\017'; 40006174: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ] tty->termios.c_cc[VWERASE] = '\027'; 40006178: 84 10 20 17 mov 0x17, %g2 tty->termios.c_cc[VLNEXT] = '\026'; 4000617c: 86 10 20 16 mov 0x16, %g3 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; 40006180: 83 2b 60 01 sll %o5, 1, %g1 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'; 40006184: c0 2c 60 4c clrb [ %l1 + 0x4c ] 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; 40006188: 82 00 40 0d add %g1, %o5, %g1 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'; tty->termios.c_cc[VEOL2] = '\000'; 4000618c: c0 2c 60 51 clrb [ %l1 + 0x51 ] 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; 40006190: 83 30 60 02 srl %g1, 2, %g1 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'; 40006194: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ] tty->termios.c_cc[VLNEXT] = '\026'; 40006198: c6 2c 60 50 stb %g3, [ %l1 + 0x50 ] tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 4000619c: 89 29 20 18 sll %g4, 0x18, %g4 400061a0: 89 39 20 18 sra %g4, 0x18, %g4 400061a4: 80 a1 20 7b cmp %g4, 0x7b 400061a8: 12 bf ff 26 bne 40005e40 400061ac: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ] c = 'a'; 400061b0: 84 10 20 61 mov 0x61, %g2 <== NOT EXECUTED 400061b4: 03 10 00 6b sethi %hi(0x4001ac00), %g1 <== NOT EXECUTED 400061b8: 10 bf ff 22 b 40005e40 <== NOT EXECUTED 400061bc: c4 28 63 40 stb %g2, [ %g1 + 0x340 ] ! 4001af40 <== NOT EXECUTED tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; 400061c0: 10 bf ff 90 b 40006000 400061c4: e0 20 e0 90 st %l0, [ %g3 + 0x90 ] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 400061c8: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED 400061cc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400061d0: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED 400061d4: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED 400061d8: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 400061dc: 96 10 20 00 clr %o3 <== NOT EXECUTED 400061e0: 40 00 02 7b call 40006bcc <== NOT EXECUTED 400061e4: 98 04 60 68 add %l1, 0x68, %o4 <== NOT EXECUTED rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 400061e8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400061ec: 22 bf ff bd be,a 400060e0 <== NOT EXECUTED 400061f0: c8 0c e3 40 ldub [ %l3 + 0x340 ], %g4 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 400061f4: 40 00 06 6a call 40007b9c <== NOT EXECUTED 400061f8: 01 00 00 00 nop <== NOT EXECUTED tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 400061fc: 10 bf ff b9 b 400060e0 <== NOT EXECUTED 40006200: c8 0c e3 40 ldub [ %l3 + 0x340 ], %g4 <== NOT EXECUTED /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 40006204: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED 40006208: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 4000620c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40006210: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 40006214: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40006218: 98 10 20 00 clr %o4 <== NOT EXECUTED 4000621c: 40 00 04 5f call 40007398 <== NOT EXECUTED 40006220: 9a 04 20 c8 add %l0, 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) 40006224: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006228: 02 80 00 05 be 4000623c <== NOT EXECUTED 4000622c: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40006230: 40 00 06 5b call 40007b9c <== NOT EXECUTED 40006234: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_task_create ( 40006238: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 <== NOT EXECUTED 4000623c: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED 40006240: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED 40006244: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED 40006248: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED 4000624c: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED 40006250: 98 10 20 00 clr %o4 <== NOT EXECUTED 40006254: 40 00 04 51 call 40007398 <== NOT EXECUTED 40006258: 9a 04 20 c4 add %l0, 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) 4000625c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006260: 22 bf ff 98 be,a 400060c0 <== NOT EXECUTED 40006264: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40006268: 40 00 06 4d call 40007b9c <== NOT EXECUTED 4000626c: 01 00 00 00 nop <== NOT EXECUTED } if ((tty->device.pollRead == NULL) || 40006270: 10 bf ff 94 b 400060c0 <== NOT EXECUTED 40006274: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40006278: 40 00 06 49 call 40007b9c <== NOT EXECUTED 4000627c: 01 00 00 00 nop <== NOT EXECUTED tty->rawOutBufState = rob_idle; 40006280: 10 bf ff 87 b 4000609c <== NOT EXECUTED 40006284: c0 24 20 94 clr [ %l0 + 0x94 ] <== NOT EXECUTED 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40006288: 40 00 06 45 call 40007b9c <== NOT EXECUTED 4000628c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 40006290: 10 bf ff 78 b 40006070 <== NOT EXECUTED 40006294: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 <== NOT EXECUTED 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); 40006298: 40 00 06 41 call 40007b9c <== NOT EXECUTED 4000629c: 01 00 00 00 nop <== NOT EXECUTED sc = rtems_semaphore_create ( 400062a0: 10 bf ff 68 b 40006040 <== NOT EXECUTED 400062a4: c2 4c e3 40 ldsb [ %l3 + 0x340 ], %g1 <== NOT EXECUTED 40004a48 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 40004a48: 9d e3 bf 98 save %sp, -104, %sp const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 40004a4c: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1 40004a50: 80 a0 60 00 cmp %g1, 0 40004a54: 22 80 00 4c be,a 40004b84 40004a58: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; 40004a5c: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED while (len) { 40004a60: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40004a64: 02 80 00 4c be 40004b94 <== NOT EXECUTED 40004a68: 01 00 00 00 nop <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 40004a6c: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED 40004a70: 40 00 4a 15 call 400172c4 <.urem> <== NOT EXECUTED 40004a74: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED rtems_interrupt_disable (level); 40004a78: 7f ff f5 5c call 40001fe8 <== NOT EXECUTED 40004a7c: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED 40004a80: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED while (newHead == tty->rawOutBuf.Tail) { 40004a84: e2 06 a0 84 ld [ %i2 + 0x84 ], %l1 <== NOT EXECUTED 40004a88: 80 a4 40 12 cmp %l1, %l2 <== NOT EXECUTED 40004a8c: 02 80 00 0a be 40004ab4 <== NOT EXECUTED 40004a90: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED 40004a94: 30 80 00 1b b,a 40004b00 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); 40004a98: 7f ff f5 54 call 40001fe8 <== NOT EXECUTED 40004a9c: 01 00 00 00 nop <== NOT EXECUTED 40004aa0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED * 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) { 40004aa4: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40004aa8: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40004aac: 12 80 00 15 bne 40004b00 <== NOT EXECUTED 40004ab0: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 40004ab4: c2 26 a0 94 st %g1, [ %i2 + 0x94 ] <== NOT EXECUTED rtems_interrupt_enable (level); 40004ab8: 7f ff f5 50 call 40001ff8 <== NOT EXECUTED 40004abc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 40004ac0: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED 40004ac4: 92 10 20 00 clr %o1 <== NOT EXECUTED 40004ac8: 40 00 09 18 call 40006f28 <== NOT EXECUTED 40004acc: 94 10 20 00 clr %o2 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 40004ad0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004ad4: 02 bf ff f1 be 40004a98 <== NOT EXECUTED 40004ad8: 01 00 00 00 nop <== NOT EXECUTED rtems_fatal_error_occurred (sc); 40004adc: 40 00 0c 30 call 40007b9c <== NOT EXECUTED 40004ae0: 01 00 00 00 nop <== NOT EXECUTED rtems_interrupt_disable (level); 40004ae4: 7f ff f5 41 call 40001fe8 <== NOT EXECUTED 40004ae8: 01 00 00 00 nop <== NOT EXECUTED 40004aec: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED * 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) { 40004af0: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED 40004af4: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED 40004af8: 02 bf ff ef be 40004ab4 <== NOT EXECUTED 40004afc: 82 10 20 02 mov 2, %g1 <== 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++; 40004b00: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED 40004b04: c4 0e 00 00 ldub [ %i0 ], %g2 <== NOT EXECUTED 40004b08: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40004b0c: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 40004b10: c6 06 a0 94 ld [ %i2 + 0x94 ], %g3 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; 40004b14: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 40004b18: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40004b1c: 12 80 00 0b bne 40004b48 <== NOT EXECUTED 40004b20: 01 00 00 00 nop <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 40004b24: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004b28: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED 40004b2c: 02 80 00 0d be 40004b60 <== NOT EXECUTED 40004b30: 01 00 00 00 nop <== NOT EXECUTED (*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; 40004b34: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED 40004b38: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED 40004b3c: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED } tty->rawOutBufState = rob_busy; 40004b40: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 40004b44: c2 26 a0 94 st %g1, [ %i2 + 0x94 ] <== NOT EXECUTED } rtems_interrupt_enable (level); 40004b48: 7f ff f5 2c call 40001ff8 <== NOT EXECUTED 40004b4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { 40004b50: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED 40004b54: 02 80 00 10 be 40004b94 <== NOT EXECUTED 40004b58: b0 06 20 01 inc %i0 <== NOT EXECUTED 40004b5c: 30 bf ff c4 b,a 40004a6c <== NOT EXECUTED 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, 40004b60: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED 40004b64: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED 40004b68: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED 40004b6c: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED 40004b70: 92 02 40 01 add %o1, %g1, %o1 <== NOT EXECUTED 40004b74: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004b78: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; 40004b7c: 10 bf ff f2 b 40004b44 <== NOT EXECUTED 40004b80: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); 40004b84: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1 40004b88: 92 10 00 18 mov %i0, %o1 40004b8c: 9f c0 40 00 call %g1 40004b90: 94 10 00 19 mov %i1, %o2 40004b94: 81 c7 e0 08 ret 40004b98: 81 e8 00 00 restore 400053c0 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 400053c0: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 400053c4: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED uint32_t count = args->count; 400053c8: e2 06 20 0c ld [ %i0 + 0xc ], %l1 <== 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; 400053cc: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; 400053d0: e4 06 20 08 ld [ %i0 + 8 ], %l2 <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 400053d4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 400053d8: a8 10 00 18 mov %i0, %l4 <== 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); 400053dc: 92 10 20 00 clr %o1 <== NOT EXECUTED 400053e0: 40 00 06 d2 call 40006f28 <== NOT EXECUTED 400053e4: 94 10 20 00 clr %o2 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 400053e8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 400053ec: 12 80 00 10 bne 4000542c <== NOT EXECUTED 400053f0: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 400053f4: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED 400053f8: 82 10 62 88 or %g1, 0x288, %g1 <== NOT EXECUTED 400053fc: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED 40005400: 84 00 80 01 add %g2, %g1, %g2 <== NOT EXECUTED 40005404: c2 00 a0 08 ld [ %g2 + 8 ], %g1 <== NOT EXECUTED 40005408: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000540c: 02 80 00 0a be 40005434 <== NOT EXECUTED 40005410: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40005414: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005418: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000541c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 40005420: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED 40005424: 40 00 07 90 call 40007264 <== NOT EXECUTED 40005428: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED 4000542c: 81 c7 e0 08 ret <== NOT EXECUTED 40005430: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { 40005434: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED 40005438: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000543c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005440: 22 80 00 20 be,a 400054c0 <== NOT EXECUTED 40005444: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005448: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000544c: 22 80 00 16 be,a 400054a4 <== NOT EXECUTED 40005450: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED 40005454: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED 40005458: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 4000545c: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED 40005460: 26 80 00 09 bl,a 40005484 <== NOT EXECUTED 40005464: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 40005468: 10 80 00 0f b 400054a4 <== NOT EXECUTED 4000546c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005470: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005474: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 40005478: 24 80 00 0b ble,a 400054a4 <== NOT EXECUTED 4000547c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005480: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005484: a2 84 7f ff addcc %l1, -1, %l1 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; 40005488: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED 4000548c: 86 00 e0 01 inc %g3 <== NOT EXECUTED 40005490: c4 2c 80 00 stb %g2, [ %l2 ] <== NOT EXECUTED 40005494: c6 24 20 24 st %g3, [ %l0 + 0x24 ] <== NOT EXECUTED else sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 40005498: 12 bf ff f6 bne 40005470 <== NOT EXECUTED 4000549c: a4 04 a0 01 inc %l2 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 400054a0: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED tty->tty_rcvwakeup = 0; 400054a4: 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; 400054a8: 82 20 40 11 sub %g1, %l1, %g1 <== NOT EXECUTED 400054ac: c2 25 20 14 st %g1, [ %l4 + 0x14 ] <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); 400054b0: 40 00 07 6d call 40007264 <== NOT EXECUTED 400054b4: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED return sc; } 400054b8: 81 c7 e0 08 ret <== NOT EXECUTED 400054bc: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 400054c0: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== 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; 400054c4: c2 24 20 2c st %g1, [ %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; 400054c8: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 400054cc: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400054d0: 02 80 00 06 be 400054e8 <== NOT EXECUTED 400054d4: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED 400054d8: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED 400054dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400054e0: 22 80 00 51 be,a 40005624 <== NOT EXECUTED 400054e4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== 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; 400054e8: e6 04 20 74 ld [ %l0 + 0x74 ], %l3 <== NOT EXECUTED 400054ec: aa 10 20 01 mov 1, %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400054f0: 2d 10 00 6b sethi %hi(0x4001ac00), %l6 <== 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, 400054f4: ae 04 20 49 add %l0, 0x49, %l7 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400054f8: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400054fc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40005500: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005504: 02 80 00 3e be 400055fc <== NOT EXECUTED 40005508: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 4000550c: c2 05 a3 34 ld [ %l6 + 0x334 ], %g1 <== NOT EXECUTED 40005510: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 40005514: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40005518: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4000551c: 16 80 00 38 bge 400055fc <== NOT EXECUTED 40005520: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 40005524: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED 40005528: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 4000552c: 40 00 47 66 call 400172c4 <.urem> <== NOT EXECUTED 40005530: 90 02 20 01 inc %o0 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 40005534: c2 04 20 58 ld [ %l0 + 0x58 ], %g1 <== 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; 40005538: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 4000553c: e6 08 40 08 ldub [ %g1 + %o0 ], %l3 <== NOT EXECUTED tty->rawInBuf.Head = newHead; 40005540: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 40005544: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 40005548: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED 4000554c: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED 40005550: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED 40005554: 40 00 47 5c call 400172c4 <.urem> <== NOT EXECUTED 40005558: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED 4000555c: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED 40005560: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED 40005564: 3a 80 00 18 bcc,a 400055c4 <== NOT EXECUTED 40005568: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 4000556c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005570: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED 40005574: 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)) 40005578: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED 4000557c: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED 40005580: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED 40005584: 22 80 00 88 be,a 400057a4 <== NOT EXECUTED 40005588: c2 04 20 94 ld [ %l0 + 0x94 ], %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) { 4000558c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 40005590: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED 40005594: 22 80 00 0c be,a 400055c4 <== NOT EXECUTED 40005598: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 4000559c: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 400055a0: c4 04 20 b0 ld [ %l0 + 0xb0 ], %g2 <== 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; 400055a4: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED 400055a8: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 400055ac: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 400055b0: 22 80 00 05 be,a 400055c4 <== NOT EXECUTED 400055b4: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 400055b8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400055bc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 400055c0: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 400055c4: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 400055c8: 02 80 00 63 be 40005754 <== NOT EXECUTED 400055cc: 90 0c e0 ff and %l3, 0xff, %o0 <== NOT EXECUTED if (siproc (c, tty)) 400055d0: 7f ff ff 07 call 400051ec <== NOT EXECUTED 400055d4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 400055d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400055dc: 32 80 00 02 bne,a 400055e4 <== NOT EXECUTED 400055e0: aa 10 20 00 clr %l5 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 400055e4: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED 400055e8: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED 400055ec: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400055f0: 12 bf ff c7 bne 4000550c <== NOT EXECUTED 400055f4: e6 04 20 70 ld [ %l0 + 0x70 ], %l3 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 400055f8: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED 400055fc: 02 bf ff 94 be 4000544c <== NOT EXECUTED 40005600: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 40005604: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED 40005608: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED 4000560c: 40 00 06 47 call 40006f28 <== NOT EXECUTED 40005610: 94 10 00 13 mov %l3, %o2 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 40005614: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005618: 02 bf ff b8 be 400054f8 <== NOT EXECUTED 4000561c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40005620: 30 bf ff 8b b,a 4000544c <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40005624: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED 40005628: 12 80 00 3a bne 40005710 <== NOT EXECUTED 4000562c: 01 00 00 00 nop <== NOT EXECUTED } } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 40005630: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 40005634: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005638: 12 80 00 07 bne 40005654 <== NOT EXECUTED 4000563c: aa 07 bf f4 add %fp, -12, %l5 <== NOT EXECUTED 40005640: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40005644: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005648: 12 80 00 3f bne 40005744 <== NOT EXECUTED 4000564c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40005650: aa 07 bf f4 add %fp, -12, %l5 <== NOT EXECUTED } } else { if (!tty->termios.c_cc[VTIME]) break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40005654: a6 07 bf f0 add %fp, -16, %l3 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005658: 9f c0 80 00 call %g2 <== NOT EXECUTED 4000565c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40005660: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005664: 26 80 00 17 bl,a 400056c0 <== NOT EXECUTED 40005668: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED } } rtems_task_wake_after (1); } else { siproc (n, tty); 4000566c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED 40005670: 7f ff fe df call 400051ec <== NOT EXECUTED 40005674: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 40005678: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 4000567c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005680: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005684: 16 bf ff 71 bge 40005448 <== NOT EXECUTED 40005688: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 4000568c: 22 80 00 07 be,a 400056a8 <== NOT EXECUTED 40005690: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED 40005694: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED 40005698: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000569c: 12 80 00 26 bne 40005734 <== NOT EXECUTED 400056a0: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED 400056a4: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); for (;;) { n = (*tty->device.pollRead)(tty->minor); 400056a8: 9f c0 80 00 call %g2 <== NOT EXECUTED 400056ac: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 400056b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 400056b4: 36 bf ff ef bge,a 40005670 <== NOT EXECUTED 400056b8: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 400056bc: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED 400056c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400056c4: 02 80 00 2c be 40005774 <== NOT EXECUTED 400056c8: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 400056cc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400056d0: 02 80 00 06 be 400056e8 <== NOT EXECUTED 400056d4: 01 00 00 00 nop <== NOT EXECUTED 400056d8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 400056dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400056e0: 12 80 00 28 bne 40005780 <== NOT EXECUTED 400056e4: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); if ((now - then) > tty->vtimeTicks) { break; } } rtems_task_wake_after (1); 400056e8: 40 00 08 6f call 400078a4 <== NOT EXECUTED 400056ec: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 400056f0: 10 bf ff da b 40005658 <== NOT EXECUTED 400056f4: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED n = (*tty->device.pollRead)(tty->minor); if (n < 0) { rtems_task_wake_after (1); } else { if (siproc (n, tty)) 400056f8: 7f ff fe bd call 400051ec <== NOT EXECUTED 400056fc: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 40005700: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40005704: 12 bf ff 52 bne 4000544c <== NOT EXECUTED 40005708: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 4000570c: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED { int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); 40005710: 9f c0 80 00 call %g2 <== NOT EXECUTED 40005714: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED if (n < 0) { 40005718: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000571c: 16 bf ff f7 bge 400056f8 <== NOT EXECUTED 40005720: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED rtems_task_wake_after (1); 40005724: 40 00 08 60 call 400078a4 <== NOT EXECUTED 40005728: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED 4000572c: 10 bf ff f9 b 40005710 <== NOT EXECUTED 40005730: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED else { siproc (n, tty); if (tty->ccount >= tty->termios.c_cc[VMIN]) break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40005734: 40 00 03 2c call 400063e4 <== NOT EXECUTED 40005738: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 4000573c: 10 bf ff db b 400056a8 <== NOT EXECUTED 40005740: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED } } else { rtems_interval then, now; if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &then); 40005744: 40 00 03 28 call 400063e4 <== NOT EXECUTED 40005748: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 4000574c: 10 bf ff c1 b 40005650 <== NOT EXECUTED 40005750: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED if (tty->termios.c_lflag & ICANON) { if (siproc (c, tty)) wait = 0; } else { siproc (c, tty); 40005754: 7f ff fe a6 call 400051ec <== NOT EXECUTED 40005758: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 4000575c: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED 40005760: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED 40005764: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED 40005768: 36 bf ff 9f bge,a 400055e4 <== NOT EXECUTED 4000576c: aa 10 20 00 clr %l5 <== NOT EXECUTED 40005770: 30 bf ff 9d b,a 400055e4 <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 40005774: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40005778: 02 bf ff 34 be 40005448 <== NOT EXECUTED 4000577c: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED break; rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now); 40005780: 40 00 03 19 call 400063e4 <== NOT EXECUTED 40005784: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 40005788: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000578c: c4 1f bf f0 ldd [ %fp + -16 ], %g2 <== NOT EXECUTED 40005790: 84 20 80 03 sub %g2, %g3, %g2 <== NOT EXECUTED 40005794: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 40005798: 08 bf ff d4 bleu 400056e8 <== NOT EXECUTED 4000579c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 400057a0: 30 bf ff 2b b,a 4000544c <== 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)) 400057a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400057a8: 22 80 00 07 be,a 400057c4 <== NOT EXECUTED 400057ac: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400057b0: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED 400057b4: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED 400057b8: 02 bf ff 75 be 4000558c <== NOT EXECUTED 400057bc: 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, 400057c0: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED 400057c4: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED 400057c8: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED 400057cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400057d0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 400057d4: 10 bf ff 7c b 400055c4 <== NOT EXECUTED 400057d8: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED 4000447c : * 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) { 4000447c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 40004480: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004484: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED 40004488: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED 4000448c: 22 80 00 41 be,a 40004590 <== NOT EXECUTED 40004490: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 40004494: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004498: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED 4000449c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400044a0: 22 80 00 4c be,a 400045d0 <== NOT EXECUTED 400044a4: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 400044a8: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED 400044ac: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED 400044b0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 400044b4: 22 80 00 2f be,a 40004570 <== NOT EXECUTED 400044b8: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; } rtems_interrupt_disable(level); 400044bc: 7f ff f6 cb call 40001fe8 <== NOT EXECUTED 400044c0: 01 00 00 00 nop <== NOT EXECUTED len = tty->t_dqlen; 400044c4: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED tty->t_dqlen = 0; 400044c8: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400044cc: 7f ff f6 cb call 40001ff8 <== NOT EXECUTED 400044d0: 01 00 00 00 nop <== NOT EXECUTED newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 400044d4: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED 400044d8: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED 400044dc: 40 00 4b 7a call 400172c4 <.urem> <== NOT EXECUTED 400044e0: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 400044e4: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 400044e8: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED if (tty->rawOutBufState == rob_wait) { 400044ec: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 400044f0: 02 80 00 54 be 40004640 <== NOT EXECUTED 400044f4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } if (newTail == tty->rawOutBuf.Head) { 400044f8: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 400044fc: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED 40004500: 22 80 00 44 be,a 40004610 <== NOT EXECUTED 40004504: c2 06 20 d4 ld [ %i0 + 0xd4 ], %g1 <== NOT EXECUTED if ( tty->tty_snd.sw_pfn != NULL) { (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 40004508: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 4000450c: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED 40004510: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED 40004514: 02 80 00 4e be 4000464c <== NOT EXECUTED 40004518: 01 00 00 00 nop <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 4000451c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004520: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED 40004524: 18 80 00 18 bgu 40004584 <== NOT EXECUTED 40004528: 01 00 00 00 nop <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4000452c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED 40004530: a2 20 40 10 sub %g1, %l0, %l1 <== NOT EXECUTED /* 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)) { 40004534: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED 40004538: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED 4000453c: 32 80 00 02 bne,a 40004544 <== NOT EXECUTED 40004540: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 40004544: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED 40004548: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED 4000454c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40004550: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED (*tty->device.write)(tty->minor, 40004554: 92 04 00 09 add %l0, %o1, %o1 <== NOT EXECUTED /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 40004558: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED (*tty->device.write)(tty->minor, 4000455c: 9f c0 80 00 call %g2 <== NOT EXECUTED 40004560: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004564: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED } return nToSend; } 40004568: 81 c7 e0 08 ret <== NOT EXECUTED 4000456c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 40004570: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40004574: 02 80 00 30 be 40004634 <== NOT EXECUTED 40004578: a2 10 20 00 clr %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4000457c: 81 c7 e0 08 ret <== NOT EXECUTED 40004580: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; 40004584: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED 40004588: 10 bf ff eb b 40004534 <== NOT EXECUTED 4000458c: a2 20 40 10 sub %g1, %l0, %l1 <== NOT EXECUTED /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 40004590: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 40004594: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED 40004598: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000459c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); 400045a0: 7f ff f6 92 call 40001fe8 <== NOT EXECUTED 400045a4: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400045a8: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400045ac: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== 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--; 400045b0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400045b4: 84 10 a0 02 or %g2, 2, %g2 <== 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--; 400045b8: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 400045bc: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 400045c0: 7f ff f6 8e call 40001ff8 <== NOT EXECUTED 400045c4: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 400045c8: 81 c7 e0 08 ret <== NOT EXECUTED 400045cc: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED * FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor, 400045d0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED 400045d4: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED 400045d8: 9f c0 40 00 call %g1 <== NOT EXECUTED 400045dc: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); 400045e0: 7f ff f6 82 call 40001fe8 <== NOT EXECUTED 400045e4: 01 00 00 00 nop <== NOT EXECUTED tty->t_dqlen--; 400045e8: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400045ec: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400045f0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400045f4: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 400045f8: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 400045fc: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED rtems_interrupt_enable(level); 40004600: 7f ff f6 7e call 40001ff8 <== NOT EXECUTED 40004604: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 40004608: 81 c7 e0 08 ret <== NOT EXECUTED 4000460c: 91 e8 00 11 restore %g0, %l1, %o0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 40004610: c0 26 20 94 clr [ %i0 + 0x94 ] <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 40004614: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004618: 02 bf ff d3 be 40004564 <== NOT EXECUTED 4000461c: a2 10 20 00 clr %l1 <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 40004620: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED 40004624: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004628: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4000462c: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED 40004630: 30 bf ff ce b,a 40004568 <== NOT EXECUTED */ if (tty->rawOutBufState == rob_wait) { /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40004634: 40 00 0b 0c call 40007264 <== NOT EXECUTED 40004638: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 4000463c: 30 bf ff d0 b,a 4000457c <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 40004640: 40 00 0b 09 call 40007264 <== NOT EXECUTED 40004644: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED 40004648: 30 bf ff ac b,a 400044f8 <== NOT EXECUTED /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 4000464c: 7f ff f6 67 call 40001fe8 <== NOT EXECUTED 40004650: 01 00 00 00 nop <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 40004654: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004658: 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; 4000465c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 40004660: c4 26 20 94 st %g2, [ %i0 + 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; 40004664: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level); 40004668: 7f ff f6 64 call 40001ff8 <== NOT EXECUTED 4000466c: a2 10 20 00 clr %l1 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 40004670: e0 26 20 84 st %l0, [ %i0 + 0x84 ] <== NOT EXECUTED 40004674: 30 bf ff bd b,a 40004568 <== NOT EXECUTED 400062a8 : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 400062a8: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 400062ac: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED 400062b0: a2 07 bf f7 add %fp, -9, %l1 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 400062b4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400062b8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400062bc: 94 10 20 00 clr %o2 <== NOT EXECUTED 400062c0: 40 00 00 cf call 400065fc <== NOT EXECUTED 400062c4: 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) { 400062c8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 400062cc: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400062d0: 32 80 00 16 bne,a 40006328 <== NOT EXECUTED 400062d4: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 400062d8: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED 400062dc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400062e0: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED if (c != EOF) { 400062e4: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED 400062e8: 02 bf ff f3 be 400062b4 <== NOT EXECUTED 400062ec: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; 400062f0: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 400062f4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED 400062f8: 7f ff f8 ff call 400046f4 <== NOT EXECUTED 400062fc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40006300: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006304: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40006308: 94 10 20 00 clr %o2 <== NOT EXECUTED 4000630c: 40 00 00 bc call 400065fc <== NOT EXECUTED 40006310: 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) { 40006314: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40006318: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 4000631c: 22 bf ff f0 be,a 400062dc <== NOT EXECUTED 40006320: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED tty->rxTaskId = 0; 40006324: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 40006328: 40 00 04 77 call 40007504 <== NOT EXECUTED 4000632c: 90 10 20 00 clr %o0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 40006330: 10 bf ff e2 b 400062b8 <== NOT EXECUTED 40006334: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40004464 : 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); 40004464: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED 40004468: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000446c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40004470: 40 00 08 f1 call 40006834 <== NOT EXECUTED 40004474: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40004478: 01 00 00 00 nop 40006338 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 40006338: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000633c: 03 10 00 6e sethi %hi(0x4001b800), %g1 <== NOT EXECUTED 40006340: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED 40006344: a2 10 62 88 or %g1, 0x288, %l1 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006348: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000634c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40006350: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 40006354: 40 00 00 aa call 400065fc <== NOT EXECUTED 40006358: 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) { 4000635c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 40006360: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 40006364: 12 80 00 16 bne 400063bc <== NOT EXECUTED 40006368: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4000636c: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED 40006370: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED 40006374: 82 00 40 11 add %g1, %l1, %g1 <== NOT EXECUTED 40006378: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED 4000637c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006380: 02 80 00 04 be 40006390 <== NOT EXECUTED 40006384: 01 00 00 00 nop <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 40006388: 9f c0 40 00 call %g1 <== NOT EXECUTED 4000638c: 01 00 00 00 nop <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 40006390: 7f ff f8 3b call 4000447c <== NOT EXECUTED 40006394: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 40006398: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 4000639c: 94 10 20 00 clr %o2 <== NOT EXECUTED 400063a0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED 400063a4: 40 00 00 96 call 400065fc <== NOT EXECUTED 400063a8: 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) { 400063ac: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 400063b0: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED 400063b4: 02 bf ff ee be 4000636c <== NOT EXECUTED 400063b8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED tty->txTaskId = 0; 400063bc: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 400063c0: 40 00 04 51 call 40007504 <== NOT EXECUTED 400063c4: 90 10 20 00 clr %o0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 400063c8: 10 bf ff e1 b 4000634c <== NOT EXECUTED 400063cc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40005238 : rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40005238: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4000523c: c2 06 00 00 ld [ %i0 ], %g1 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 40005240: a6 10 00 18 mov %i0, %l3 rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 40005244: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 40005248: 92 10 20 00 clr %o1 4000524c: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 40005250: 40 00 07 36 call 40006f28 40005254: 94 10 20 00 clr %o2 if (sc != RTEMS_SUCCESSFUL) 40005258: b0 92 20 00 orcc %o0, 0, %i0 4000525c: 12 80 00 0f bne 40005298 40005260: 03 10 00 6e sethi %hi(0x4001b800), %g1 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 40005264: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 40005268: 82 10 62 88 or %g1, 0x288, %g1 4000526c: 85 28 a0 05 sll %g2, 5, %g2 40005270: 84 00 80 01 add %g2, %g1, %g2 40005274: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 40005278: 80 a0 60 00 cmp %g1, 0 4000527c: 02 80 00 09 be 400052a0 40005280: 92 10 00 13 mov %l3, %o1 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 40005284: 9f c0 40 00 call %g1 <== NOT EXECUTED 40005288: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 4000528c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005290: 40 00 07 f5 call 40007264 <== NOT EXECUTED 40005294: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED 40005298: 81 c7 e0 08 ret <== NOT EXECUTED 4000529c: 81 e8 00 00 restore <== NOT EXECUTED return sc; } if (tty->termios.c_oflag & OPOST) { 400052a0: c2 04 60 34 ld [ %l1 + 0x34 ], %g1 400052a4: 80 88 60 01 btst 1, %g1 400052a8: 32 80 00 0c bne,a 400052d8 400052ac: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 while (count--) oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 400052b0: d0 04 e0 08 ld [ %l3 + 8 ], %o0 <== NOT EXECUTED 400052b4: d2 04 e0 0c ld [ %l3 + 0xc ], %o1 <== NOT EXECUTED 400052b8: 7f ff fd e4 call 40004a48 <== NOT EXECUTED 400052bc: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED args->bytes_moved = args->count; 400052c0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 <== NOT EXECUTED 400052c4: c2 24 e0 14 st %g1, [ %l3 + 0x14 ] } rtems_semaphore_release (tty->osem); 400052c8: 40 00 07 e7 call 40007264 400052cc: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 return sc; } 400052d0: 81 c7 e0 08 ret 400052d4: 81 e8 00 00 restore return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 400052d8: 80 a0 60 00 cmp %g1, 0 400052dc: 02 bf ff fa be 400052c4 400052e0: c4 04 e0 08 ld [ %l3 + 8 ], %g2 400052e4: a0 10 00 02 mov %g2, %l0 400052e8: a4 00 80 01 add %g2, %g1, %l2 oproc (*buffer++, tty); 400052ec: d0 0c 00 00 ldub [ %l0 ], %o0 400052f0: 7f ff fe 2b call 40004b9c 400052f4: 92 10 00 11 mov %l1, %o1 400052f8: a0 04 20 01 inc %l0 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 400052fc: 80 a4 00 12 cmp %l0, %l2 40005300: 32 bf ff fc bne,a 400052f0 40005304: d0 0c 00 00 ldub [ %l0 ], %o0 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; 40005308: 10 bf ff ef b 400052c4 4000530c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1 40013be8 : */ rtems_status_code rtems_timer_cancel( Objects_Id id ) { 40013be8: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013bec: 11 10 00 da sethi %hi(0x40036800), %o0 40013bf0: 92 10 00 18 mov %i0, %o1 40013bf4: 90 12 21 2c or %o0, 0x12c, %o0 40013bf8: 40 00 0a d2 call 40016740 <_Objects_Get> 40013bfc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013c00: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013c04: 80 a0 60 00 cmp %g1, 0 40013c08: 12 80 00 11 bne 40013c4c 40013c0c: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) 40013c10: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 40013c14: 80 a0 60 04 cmp %g1, 4 40013c18: 12 80 00 16 bne 40013c70 40013c1c: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013c20: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40013c24: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40013c28: b0 10 20 00 clr %i0 <== NOT EXECUTED 40013c2c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40013c30: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] <== NOT EXECUTED 40013c34: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 <== NOT EXECUTED 40013c38: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40013c3c: 02 80 00 09 be 40013c60 <== NOT EXECUTED 40013c40: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013c44: 81 c7 e0 08 ret <== NOT EXECUTED 40013c48: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013c4c: 80 a0 00 01 cmp %g0, %g1 40013c50: 84 60 20 00 subx %g0, 0, %g2 40013c54: b0 08 a0 15 and %g2, 0x15, %i0 40013c58: 81 c7 e0 08 ret 40013c5c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40013c60: 40 00 0f e0 call 40017be0 <_Thread_Dispatch> 40013c64: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013c68: 81 c7 e0 08 ret 40013c6c: 81 e8 00 00 restore case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: if ( !_Timer_Is_dormant_class( the_timer->the_class ) ) (void) _Watchdog_Remove( &the_timer->Ticker ); 40013c70: 40 00 16 a4 call 40019700 <_Watchdog_Remove> 40013c74: 90 02 20 10 add %o0, 0x10, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013c78: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40013c7c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013c80: b0 10 20 00 clr %i0 40013c84: 84 00 bf ff add %g2, -1, %g2 40013c88: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40013c8c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40013c90: 80 a0 e0 00 cmp %g3, 0 40013c94: 12 bf ff f5 bne 40013c68 40013c98: 01 00 00 00 nop 40013c9c: 30 bf ff f1 b,a 40013c60 40013d8c : */ rtems_status_code rtems_timer_delete( Objects_Id id ) { 40013d8c: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013d90: 21 10 00 da sethi %hi(0x40036800), %l0 40013d94: 92 10 00 18 mov %i0, %o1 40013d98: 94 07 bf f4 add %fp, -12, %o2 40013d9c: 40 00 0a 69 call 40016740 <_Objects_Get> 40013da0: 90 14 21 2c or %l0, 0x12c, %o0 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013da4: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013da8: 80 a0 60 00 cmp %g1, 0 40013dac: 12 80 00 1f bne 40013e28 40013db0: b0 10 00 08 mov %o0, %i0 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40013db4: a0 14 21 2c or %l0, 0x12c, %l0 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 40013db8: c2 02 20 08 ld [ %o0 + 8 ], %g1 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 40013dbc: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 40013dc0: 05 00 00 3f sethi %hi(0xfc00), %g2 40013dc4: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff 40013dc8: 82 08 40 02 and %g1, %g2, %g1 40013dcc: 80 a0 40 03 cmp %g1, %g3 40013dd0: 38 80 00 06 bgu,a 40013de8 40013dd4: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED information->local_table[ index ] = the_object; 40013dd8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40013ddc: 83 28 60 02 sll %g1, 2, %g1 40013de0: c0 20 80 01 clr [ %g2 + %g1 ] uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 40013de4: c0 26 20 0c clr [ %i0 + 0xc ] case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: _Objects_Close( &_Timer_Information, &the_timer->Object ); (void) _Watchdog_Remove( &the_timer->Ticker ); 40013de8: 40 00 16 46 call 40019700 <_Watchdog_Remove> 40013dec: 90 06 20 10 add %i0, 0x10, %o0 RTEMS_INLINE_ROUTINE void _Timer_Free ( Timer_Control *the_timer ) { _Objects_Free( &_Timer_Information, &the_timer->Object ); 40013df0: 90 10 00 10 mov %l0, %o0 40013df4: 40 00 09 fc call 400165e4 <_Objects_Free> 40013df8: 92 10 00 18 mov %i0, %o1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013dfc: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40013e00: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013e04: b0 10 20 00 clr %i0 40013e08: 84 00 bf ff add %g2, -1, %g2 40013e0c: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40013e10: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40013e14: 80 a0 e0 00 cmp %g3, 0 40013e18: 02 80 00 0a be 40013e40 40013e1c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013e20: 81 c7 e0 08 ret <== NOT EXECUTED 40013e24: 81 e8 00 00 restore <== NOT EXECUTED { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013e28: 82 18 60 02 xor %g1, 2, %g1 40013e2c: 80 a0 00 01 cmp %g0, %g1 40013e30: 84 60 20 00 subx %g0, 0, %g2 40013e34: b0 08 a0 15 and %g2, 0x15, %i0 40013e38: 81 c7 e0 08 ret 40013e3c: 91 ee 20 04 restore %i0, 4, %o0 _Thread_Dispatch(); 40013e40: 40 00 0f 68 call 40017be0 <_Thread_Dispatch> 40013e44: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013e48: 81 c7 e0 08 ret 40013e4c: 81 e8 00 00 restore 40013e50 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40013e50: 9d e3 bf 90 save %sp, -112, %sp 40013e54: a4 10 00 18 mov %i0, %l2 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( ticks == 0 ) 40013e58: 80 a6 60 00 cmp %i1, 0 40013e5c: 02 80 00 3e be 40013f54 40013e60: b0 10 20 0a mov 0xa, %i0 return RTEMS_INVALID_NUMBER; if ( !routine ) 40013e64: 80 a6 a0 00 cmp %i2, 0 40013e68: 02 80 00 3b be 40013f54 40013e6c: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 40013e70: 11 10 00 da sethi %hi(0x40036800), %o0 40013e74: 92 10 00 12 mov %l2, %o1 40013e78: 90 12 21 2c or %o0, 0x12c, %o0 40013e7c: 40 00 0a 31 call 40016740 <_Objects_Get> 40013e80: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013e84: c2 07 bf f4 ld [ %fp + -12 ], %g1 40013e88: 80 a0 60 00 cmp %g1, 0 40013e8c: 12 80 00 17 bne 40013ee8 40013e90: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 40013e94: a2 02 20 10 add %o0, 0x10, %l1 40013e98: 40 00 16 1a call 40019700 <_Watchdog_Remove> 40013e9c: 90 10 00 11 mov %l1, %o0 _ISR_Disable( level ); 40013ea0: 7f ff db 9a call 4000ad08 40013ea4: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 40013ea8: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40013eac: 80 a0 60 00 cmp %g1, 0 40013eb0: 22 80 00 14 be,a 40013f00 40013eb4: f4 24 20 2c st %i2, [ %l0 + 0x2c ] _ISR_Enable( level ); 40013eb8: 7f ff db 98 call 4000ad18 <== NOT EXECUTED 40013ebc: 01 00 00 00 nop <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40013ec0: 03 10 00 d7 sethi %hi(0x40035c00), %g1 <== NOT EXECUTED 40013ec4: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40013ec8: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 40013ecc: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] <== NOT EXECUTED 40013ed0: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 <== NOT EXECUTED 40013ed4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40013ed8: 02 80 00 1d be 40013f4c <== NOT EXECUTED 40013edc: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40013ee0: 81 c7 e0 08 ret <== NOT EXECUTED 40013ee4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if ( !routine ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40013ee8: 82 18 60 02 xor %g1, 2, %g1 40013eec: 80 a0 00 01 cmp %g0, %g1 40013ef0: 84 60 20 00 subx %g0, 0, %g2 40013ef4: b0 08 a0 15 and %g2, 0x15, %i0 40013ef8: 81 c7 e0 08 ret 40013efc: 91 ee 20 04 restore %i0, 4, %o0 void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 40013f00: e4 24 20 30 st %l2, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 40013f04: f6 24 20 34 st %i3, [ %l0 + 0x34 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL; 40013f08: c0 24 20 38 clr [ %l0 + 0x38 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40013f0c: c0 24 20 18 clr [ %l0 + 0x18 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); _ISR_Enable( level ); 40013f10: 7f ff db 82 call 4000ad18 40013f14: 01 00 00 00 nop ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013f18: 92 10 00 11 mov %l1, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40013f1c: f2 24 20 1c st %i1, [ %l0 + 0x1c ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40013f20: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40013f24: 40 00 15 8d call 40019558 <_Watchdog_Insert> 40013f28: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 40013f2c: 05 10 00 d7 sethi %hi(0x40035c00), %g2 40013f30: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 40013f34: 82 00 7f ff add %g1, -1, %g1 40013f38: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ] 40013f3c: c6 00 a2 f0 ld [ %g2 + 0x2f0 ], %g3 40013f40: 80 a0 e0 00 cmp %g3, 0 40013f44: 32 80 00 04 bne,a 40013f54 40013f48: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 40013f4c: 40 00 0f 25 call 40017be0 <_Thread_Dispatch> 40013f50: b0 10 20 00 clr %i0 40013f54: 81 c7 e0 08 ret 40013f58: 81 e8 00 00 restore 40009798 : rtems_status_code rtems_timer_get_information( Objects_Id id, rtems_timer_information *the_info ) { 40009798: 9d e3 bf 90 save %sp, -112, %sp 4000979c: 92 10 00 18 mov %i0, %o1 Timer_Control *the_timer; Objects_Locations location; if ( !the_info ) 400097a0: 80 a6 60 00 cmp %i1, 0 400097a4: 02 80 00 1b be 40009810 400097a8: b0 10 20 09 mov 9, %i0 RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (Timer_Control *) 400097ac: 11 10 00 87 sethi %hi(0x40021c00), %o0 400097b0: 94 07 bf f4 add %fp, -12, %o2 400097b4: 40 00 07 b6 call 4000b68c <_Objects_Get> 400097b8: 90 12 21 c8 or %o0, 0x1c8, %o0 return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400097bc: c2 07 bf f4 ld [ %fp + -12 ], %g1 400097c0: 80 a0 60 00 cmp %g1, 0 400097c4: 12 80 00 15 bne 40009818 400097c8: 82 18 60 02 xor %g1, 2, %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; the_info->initial = the_timer->Ticker.initial; 400097cc: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400097d0: c6 02 20 38 ld [ %o0 + 0x38 ], %g3 the_info->initial = the_timer->Ticker.initial; 400097d4: c2 26 60 04 st %g1, [ %i1 + 4 ] the_info->start_time = the_timer->Ticker.start_time; 400097d8: c4 02 20 24 ld [ %o0 + 0x24 ], %g2 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: the_info->the_class = the_timer->the_class; 400097dc: c6 26 40 00 st %g3, [ %i1 ] the_info->initial = the_timer->Ticker.initial; the_info->start_time = the_timer->Ticker.start_time; 400097e0: c4 26 60 08 st %g2, [ %i1 + 8 ] the_info->stop_time = the_timer->Ticker.stop_time; 400097e4: c2 02 20 28 ld [ %o0 + 0x28 ], %g1 400097e8: c2 26 60 0c st %g1, [ %i1 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400097ec: 07 10 00 87 sethi %hi(0x40021c00), %g3 400097f0: c2 00 e3 b0 ld [ %g3 + 0x3b0 ], %g1 ! 40021fb0 <_Thread_Dispatch_disable_level> 400097f4: b0 10 20 00 clr %i0 400097f8: 82 00 7f ff add %g1, -1, %g1 400097fc: c2 20 e3 b0 st %g1, [ %g3 + 0x3b0 ] 40009800: c4 00 e3 b0 ld [ %g3 + 0x3b0 ], %g2 40009804: 80 a0 a0 00 cmp %g2, 0 40009808: 02 80 00 09 be 4000982c 4000980c: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009810: 81 c7 e0 08 ret <== NOT EXECUTED 40009814: 81 e8 00 00 restore <== NOT EXECUTED if ( !the_info ) return RTEMS_INVALID_ADDRESS; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40009818: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 4000981c: 84 60 20 00 subx %g0, 0, %g2 <== NOT EXECUTED 40009820: b0 08 a0 15 and %g2, 0x15, %i0 <== NOT EXECUTED 40009824: 81 c7 e0 08 ret <== NOT EXECUTED 40009828: 91 ee 20 04 restore %i0, 4, %o0 <== NOT EXECUTED _Thread_Dispatch(); 4000982c: 40 00 0c c0 call 4000cb2c <_Thread_Dispatch> 40009830: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 40009834: 81 c7 e0 08 ret 40009838: 81 e8 00 00 restore 400146b4 : rtems_status_code rtems_timer_initiate_server( uint32_t priority, uint32_t stack_size, rtems_attribute attribute_set ) { 400146b4: 9d e3 bf 90 save %sp, -112, %sp /* * Make sure the requested priority is valid. */ _priority = priority; if ( priority == RTEMS_TIMER_SERVER_DEFAULT_PRIORITY ) 400146b8: 92 10 20 00 clr %o1 400146bc: 80 a6 3f ff cmp %i0, -1 400146c0: 02 80 00 07 be 400146dc 400146c4: 94 10 00 19 mov %i1, %o2 _priority = 0; else if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) 400146c8: 82 06 3f ff add %i0, -1, %g1 400146cc: 80 a0 60 fe cmp %g1, 0xfe 400146d0: 18 80 00 16 bgu 40014728 400146d4: a2 10 20 13 mov 0x13, %l1 400146d8: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400146dc: 21 10 00 d7 sethi %hi(0x40035c00), %l0 400146e0: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 ! 40035ef0 <_Thread_Dispatch_disable_level> 400146e4: 82 00 60 01 inc %g1 400146e8: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] * Just to make sure the test versus create/start operation are atomic. */ _Thread_Disable_dispatch(); if ( _Timer_Server ) { 400146ec: 33 10 00 da sethi %hi(0x40036800), %i1 400146f0: c2 06 61 78 ld [ %i1 + 0x178 ], %g1 ! 40036978 <_Timer_Server> 400146f4: 80 a0 60 00 cmp %g1, 0 400146f8: 02 80 00 0e be 40014730 400146fc: 19 00 00 20 sethi %hi(0x8000), %o4 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014700: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 <== NOT EXECUTED 40014704: a2 10 20 0e mov 0xe, %l1 <== NOT EXECUTED _Thread_Dispatch(); 40014708: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4001470c: c2 24 22 f0 st %g1, [ %l0 + 0x2f0 ] 40014710: c4 04 22 f0 ld [ %l0 + 0x2f0 ], %g2 40014714: 80 a0 a0 00 cmp %g2, 0 40014718: 12 80 00 04 bne 40014728 4001471c: 01 00 00 00 nop 40014720: 40 00 0d 30 call 40017be0 <_Thread_Dispatch> 40014724: 01 00 00 00 nop _Watchdog_Initialize( &_Timer_Server->Timer, _Thread_Delay_ended, id, NULL ); _Watchdog_Initialize( &_Timer_Seconds_timer, _Thread_Delay_ended, id, NULL ); _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } 40014728: 81 c7 e0 08 ret 4001472c: 91 e8 00 11 restore %g0, %l1, %o0 * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create( 40014730: 11 15 12 53 sethi %hi(0x54494c00), %o0 40014734: 98 16 80 0c or %i2, %o4, %o4 40014738: 90 12 21 45 or %o0, 0x145, %o0 4001473c: 96 10 21 00 mov 0x100, %o3 40014740: 7f ff f9 fc call 40012f30 40014744: 9a 07 bf f4 add %fp, -12, %o5 /* user may want floating point but we need */ /* system task specified for 0 priority */ attribute_set | RTEMS_SYSTEM_TASK, &id /* get the id back */ ); if (status) { 40014748: a2 92 20 00 orcc %o0, 0, %l1 4001474c: 02 80 00 05 be 40014760 40014750: d0 07 bf f4 ld [ %fp + -12 ], %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014754: c2 04 22 f0 ld [ %l0 + 0x2f0 ], %g1 40014758: 10 bf ff ed b 4001470c 4001475c: 82 00 7f ff add %g1, -1, %g1 _Thread_Enable_dispatch(); return status; } status = rtems_task_start( 40014760: 13 10 00 51 sethi %hi(0x40014400), %o1 40014764: 94 10 20 00 clr %o2 40014768: 7f ff fc 3d call 4001385c 4001476c: 92 12 61 60 or %o1, 0x160, %o1 id, /* the id from create */ (rtems_task_entry) _Timer_Server_body, /* the timer server entry point */ 0 /* there is no argument */ ); if (status) { 40014770: a2 92 20 00 orcc %o0, 0, %l1 40014774: 12 bf ff f8 bne 40014754 40014778: c8 07 bf f4 ld [ %fp + -12 ], %g4 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 4001477c: 03 10 00 d7 sethi %hi(0x40035c00), %g1 40014780: 9a 10 61 a0 or %g1, 0x1a0, %o5 ! 40035da0 <_RTEMS_tasks_Information> 40014784: c4 13 60 10 lduh [ %o5 + 0x10 ], %g2 40014788: 03 00 00 3f sethi %hi(0xfc00), %g1 4001478c: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 40014790: 86 09 00 01 and %g4, %g1, %g3 40014794: 80 a0 c0 02 cmp %g3, %g2 40014798: 18 80 00 05 bgu 400147ac 4001479c: 82 10 20 00 clr %g1 400147a0: c4 03 60 20 ld [ %o5 + 0x20 ], %g2 400147a4: 83 28 e0 02 sll %g3, 2, %g1 400147a8: c2 00 80 01 ld [ %g2 + %g1 ], %g1 ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data; 400147ac: c0 20 60 6c clr [ %g1 + 0x6c ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400147b0: c0 20 60 50 clr [ %g1 + 0x50 ] the_watchdog->routine = routine; the_watchdog->id = id; 400147b4: c8 20 60 68 st %g4, [ %g1 + 0x68 ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 400147b8: 07 10 00 5e sethi %hi(0x40017800), %g3 * * NOTE: Setting the pointer to the Timer Server TCB to a value other than * NULL indicates that task-based timer support is initialized. */ _Timer_Server = (Thread_Control *)_Objects_Get_local_object( 400147bc: c2 26 61 78 st %g1, [ %i1 + 0x178 ] 400147c0: 86 10 e3 3c or %g3, 0x33c, %g3 400147c4: c6 20 60 64 st %g3, [ %g1 + 0x64 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147c8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400147cc: 82 10 61 f0 or %g1, 0x1f0, %g1 ! 40035df0 <_Timer_Ticks_chain+0x4> */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400147d0: c2 20 7f fc st %g1, [ %g1 + -4 ] 400147d4: 82 00 7f fc add %g1, -4, %g1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147d8: 05 10 00 d7 sethi %hi(0x40035c00), %g2 Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400147dc: c2 20 60 08 st %g1, [ %g1 + 8 ] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400147e0: 84 10 a2 04 or %g2, 0x204, %g2 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400147e4: c0 20 60 04 clr [ %g1 + 4 ] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 400147e8: c4 20 bf fc st %g2, [ %g2 + -4 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 400147ec: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400147f0: 84 00 bf fc add %g2, -4, %g2 400147f4: 82 10 62 0c or %g1, 0x20c, %g1 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); 400147f8: c4 20 a0 08 st %g2, [ %g2 + 8 ] RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 400147fc: c0 20 a0 04 clr [ %g2 + 4 ] the_watchdog->routine = routine; 40014800: c6 20 60 1c st %g3, [ %g1 + 0x1c ] the_watchdog->id = id; 40014804: c8 20 60 20 st %g4, [ %g1 + 0x20 ] the_watchdog->user_data = user_data; 40014808: c0 20 60 24 clr [ %g1 + 0x24 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4001480c: 10 bf ff d2 b 40014754 40014810: c0 20 60 08 clr [ %g1 + 8 ] 400140a8 : */ rtems_status_code rtems_timer_reset( Objects_Id id ) { 400140a8: 9d e3 bf 90 save %sp, -112, %sp 400140ac: 11 10 00 da sethi %hi(0x40036800), %o0 400140b0: 92 10 00 18 mov %i0, %o1 400140b4: 90 12 21 2c or %o0, 0x12c, %o0 400140b8: 40 00 09 a2 call 40016740 <_Objects_Get> 400140bc: 94 07 bf f4 add %fp, -12, %o2 Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 400140c0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400140c4: 80 a0 60 00 cmp %g1, 0 400140c8: 12 80 00 18 bne 40014128 400140cc: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { 400140d0: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 400140d4: 80 a0 60 01 cmp %g1, 1 400140d8: 22 80 00 2f be,a 40014194 400140dc: 31 10 00 da sethi %hi(0x40036800), %i0 400140e0: 2a 80 00 18 bcs,a 40014140 400140e4: a0 02 20 10 add %o0, 0x10, %l0 400140e8: 80 a0 60 04 cmp %g1, 4 400140ec: 18 80 00 1b bgu 40014158 400140f0: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400140f4: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400140f8: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 400140fc: b0 10 20 0b mov 0xb, %i0 40014100: 84 00 bf ff add %g2, -1, %g2 40014104: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 40014108: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 4001410c: 80 a0 e0 00 cmp %g3, 0 40014110: 12 80 00 1f bne 4001418c 40014114: 01 00 00 00 nop _Thread_Dispatch(); 40014118: 40 00 0e b2 call 40017be0 <_Thread_Dispatch> 4001411c: 01 00 00 00 nop 40014120: 81 c7 e0 08 ret 40014124: 81 e8 00 00 restore { Timer_Control *the_timer; Objects_Locations location; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014128: 82 18 60 02 xor %g1, 2, %g1 4001412c: 80 a0 00 01 cmp %g0, %g1 40014130: 84 60 20 00 subx %g0, 0, %g2 40014134: b0 08 a0 15 and %g2, 0x15, %i0 40014138: 81 c7 e0 08 ret 4001413c: 91 ee 20 04 restore %i0, 4, %o0 return RTEMS_INVALID_ID; case OBJECTS_LOCAL: switch ( the_timer->the_class ) { case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); 40014140: 40 00 15 70 call 40019700 <_Watchdog_Remove> 40014144: 90 10 00 10 mov %l0, %o0 _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); 40014148: 11 10 00 d7 sethi %hi(0x40035c00), %o0 4001414c: 92 10 00 10 mov %l0, %o1 40014150: 40 00 15 02 call 40019558 <_Watchdog_Insert> 40014154: 90 12 23 ec or %o0, 0x3ec, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40014158: 03 10 00 d7 sethi %hi(0x40035c00), %g1 4001415c: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> 40014160: b0 10 20 00 clr %i0 40014164: 84 00 bf ff add %g2, -1, %g2 40014168: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 4001416c: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 40014170: 80 a0 e0 00 cmp %g3, 0 40014174: 02 80 00 04 be 40014184 40014178: 01 00 00 00 nop _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 4001417c: 81 c7 e0 08 ret <== NOT EXECUTED 40014180: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 40014184: 40 00 0e 97 call 40017be0 <_Thread_Dispatch> 40014188: 01 00 00 00 nop 4001418c: 81 c7 e0 08 ret 40014190: 81 e8 00 00 restore case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 40014194: d0 06 21 78 ld [ %i0 + 0x178 ], %o0 _Watchdog_Remove( &the_timer->Ticker ); 40014198: a2 04 20 10 add %l0, 0x10, %l1 case TIMER_INTERVAL: _Watchdog_Remove( &the_timer->Ticker ); _Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker ); break; case TIMER_INTERVAL_ON_TASK: _Timer_Server_stop_ticks_timer(); 4001419c: 40 00 15 59 call 40019700 <_Watchdog_Remove> 400141a0: 90 02 20 48 add %o0, 0x48, %o0 _Watchdog_Remove( &the_timer->Ticker ); 400141a4: 40 00 15 57 call 40019700 <_Watchdog_Remove> 400141a8: 90 10 00 11 mov %l1, %o0 _Timer_Server_process_ticks_chain(); 400141ac: 40 00 00 dc call 4001451c <_Timer_Server_process_ticks_chain> 400141b0: 21 10 00 d7 sethi %hi(0x40035c00), %l0 _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 400141b4: 92 10 00 11 mov %l1, %o1 400141b8: 40 00 14 e8 call 40019558 <_Watchdog_Insert> 400141bc: 90 14 21 ec or %l0, 0x1ec, %o0 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400141c0: c4 04 21 ec ld [ %l0 + 0x1ec ], %g2 400141c4: a0 14 21 ec or %l0, 0x1ec, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400141c8: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 400141cc: 80 a0 80 10 cmp %g2, %l0 400141d0: 02 bf ff e2 be 40014158 400141d4: c2 06 21 78 ld [ %i0 + 0x178 ], %g1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400141d8: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400141dc: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 400141e0: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 400141e4: 11 10 00 d7 sethi %hi(0x40035c00), %o0 400141e8: 40 00 14 dc call 40019558 <_Watchdog_Insert> 400141ec: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 400141f0: 30 bf ff da b,a 40014158 400141f4 : Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 400141f4: 9d e3 bf 90 save %sp, -112, %sp Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 400141f8: 23 10 00 da sethi %hi(0x40036800), %l1 400141fc: c2 04 61 78 ld [ %l1 + 0x178 ], %g1 ! 40036978 <_Timer_Server> Objects_Id id, rtems_interval ticks, rtems_timer_service_routine_entry routine, void *user_data ) { 40014200: a6 10 00 18 mov %i0, %l3 Timer_Control *the_timer; Objects_Locations location; ISR_Level level; if ( !_Timer_Server ) 40014204: 80 a0 60 00 cmp %g1, 0 40014208: 02 80 00 3b be 400142f4 4001420c: b0 10 20 0e mov 0xe, %i0 return RTEMS_INCORRECT_STATE; if ( !routine ) 40014210: 80 a6 a0 00 cmp %i2, 0 40014214: 02 80 00 38 be 400142f4 40014218: b0 10 20 09 mov 9, %i0 return RTEMS_INVALID_ADDRESS; if ( ticks == 0 ) 4001421c: 80 a6 60 00 cmp %i1, 0 40014220: 02 80 00 35 be 400142f4 40014224: b0 10 20 0a mov 0xa, %i0 40014228: 11 10 00 da sethi %hi(0x40036800), %o0 4001422c: 92 10 00 13 mov %l3, %o1 40014230: 90 12 21 2c or %o0, 0x12c, %o0 40014234: 40 00 09 43 call 40016740 <_Objects_Get> 40014238: 94 07 bf f4 add %fp, -12, %o2 return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 4001423c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40014240: 80 a0 60 00 cmp %g1, 0 40014244: 12 80 00 30 bne 40014304 40014248: a0 10 00 08 mov %o0, %l0 case OBJECTS_ERROR: return RTEMS_INVALID_ID; case OBJECTS_LOCAL: (void) _Watchdog_Remove( &the_timer->Ticker ); 4001424c: a4 02 20 10 add %o0, 0x10, %l2 40014250: 40 00 15 2c call 40019700 <_Watchdog_Remove> 40014254: 90 10 00 12 mov %l2, %o0 _ISR_Disable( level ); 40014258: 7f ff da ac call 4000ad08 4001425c: 01 00 00 00 nop /* * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { 40014260: c2 04 20 18 ld [ %l0 + 0x18 ], %g1 40014264: 80 a0 60 00 cmp %g1, 0 40014268: 12 80 00 2d bne 4001431c 4001426c: 82 10 20 01 mov 1, %g1 * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; 40014270: f2 24 20 1c st %i1, [ %l0 + 0x1c ] Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 40014274: f4 24 20 2c st %i2, [ %l0 + 0x2c ] the_watchdog->id = id; 40014278: e6 24 20 30 st %l3, [ %l0 + 0x30 ] the_watchdog->user_data = user_data; 4001427c: f6 24 20 34 st %i3, [ %l0 + 0x34 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 40014280: c0 24 20 18 clr [ %l0 + 0x18 ] /* * OK. Now we now the timer was not rescheduled by an interrupt * so we can atomically initialize it as in use. */ the_timer->the_class = TIMER_INTERVAL_ON_TASK; 40014284: c2 24 20 38 st %g1, [ %l0 + 0x38 ] _Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data ); the_timer->Ticker.initial = ticks; _ISR_Enable( level ); 40014288: 7f ff da a4 call 4000ad18 4001428c: 21 10 00 d7 sethi %hi(0x40035c00), %l0 _Timer_Server_stop_ticks_timer(); 40014290: d0 04 61 78 ld [ %l1 + 0x178 ], %o0 40014294: 40 00 15 1b call 40019700 <_Watchdog_Remove> 40014298: 90 02 20 48 add %o0, 0x48, %o0 _Timer_Server_process_ticks_chain(); 4001429c: 40 00 00 a0 call 4001451c <_Timer_Server_process_ticks_chain> 400142a0: 01 00 00 00 nop _Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker ); 400142a4: 90 14 21 ec or %l0, 0x1ec, %o0 400142a8: 40 00 14 ac call 40019558 <_Watchdog_Insert> 400142ac: 92 10 00 12 mov %l2, %o1 */ RTEMS_INLINE_ROUTINE boolean _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 400142b0: c4 04 21 ec ld [ %l0 + 0x1ec ], %g2 400142b4: a0 14 21 ec or %l0, 0x1ec, %l0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 400142b8: a0 04 20 04 add %l0, 4, %l0 _Timer_Server_reset_ticks_timer(); 400142bc: 80 a0 80 10 cmp %g2, %l0 400142c0: 12 80 00 1a bne 40014328 400142c4: c2 04 61 78 ld [ %l1 + 0x178 ], %g1 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400142c8: 03 10 00 d7 sethi %hi(0x40035c00), %g1 400142cc: c4 00 62 f0 ld [ %g1 + 0x2f0 ], %g2 ! 40035ef0 <_Thread_Dispatch_disable_level> _Thread_Dispatch(); 400142d0: b0 10 20 00 clr %i0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 400142d4: 84 00 bf ff add %g2, -1, %g2 400142d8: c4 20 62 f0 st %g2, [ %g1 + 0x2f0 ] 400142dc: c6 00 62 f0 ld [ %g1 + 0x2f0 ], %g3 400142e0: 80 a0 e0 00 cmp %g3, 0 400142e4: 12 80 00 06 bne 400142fc 400142e8: 01 00 00 00 nop _Thread_Dispatch(); 400142ec: 40 00 0e 3d call 40017be0 <_Thread_Dispatch> 400142f0: b0 10 20 00 clr %i0 ! 0 400142f4: 81 c7 e0 08 ret 400142f8: 81 e8 00 00 restore _Thread_Enable_dispatch(); return RTEMS_SUCCESSFUL; } return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */ } 400142fc: 81 c7 e0 08 ret <== NOT EXECUTED 40014300: 81 e8 00 00 restore <== NOT EXECUTED if ( ticks == 0 ) return RTEMS_INVALID_NUMBER; the_timer = _Timer_Get( id, &location ); switch ( location ) { 40014304: 82 18 60 02 xor %g1, 2, %g1 40014308: 80 a0 00 01 cmp %g0, %g1 4001430c: 84 60 20 00 subx %g0, 0, %g2 40014310: b0 08 a0 15 and %g2, 0x15, %i0 40014314: 81 c7 e0 08 ret 40014318: 91 ee 20 04 restore %i0, 4, %o0 * Check to see if the watchdog has just been inserted by a * higher priority interrupt. If so, abandon this insert. */ if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) { _ISR_Enable( level ); 4001431c: 7f ff da 7f call 4000ad18 <== NOT EXECUTED 40014320: 01 00 00 00 nop <== NOT EXECUTED 40014324: 30 bf ff e9 b,a 400142c8 <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014328: c4 00 a0 10 ld [ %g2 + 0x10 ], %g2 _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 4001432c: 92 00 60 48 add %g1, 0x48, %o1 Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 40014330: c4 20 60 54 st %g2, [ %g1 + 0x54 ] _Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog ); 40014334: 11 10 00 d7 sethi %hi(0x40035c00), %o0 40014338: 40 00 14 88 call 40019558 <_Watchdog_Insert> 4001433c: 90 12 23 ec or %o0, 0x3ec, %o0 ! 40035fec <_Watchdog_Ticks_chain> 40014340: 30 bf ff e2 b,a 400142c8 40009b7c : static int rtems_verror( uint32_t error_flag, const char *printf_format, va_list arglist ) { 40009b7c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 40009b80: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED 40009b84: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED 40009b88: 02 80 00 10 be 40009bc8 <== NOT EXECUTED 40009b8c: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED { if (rtems_panic_in_progress++) 40009b90: 07 10 00 b6 sethi %hi(0x4002d800), %g3 <== NOT EXECUTED 40009b94: c2 00 e1 64 ld [ %g3 + 0x164 ], %g1 ! 4002d964 <== NOT EXECUTED 40009b98: 82 00 60 01 inc %g1 <== NOT EXECUTED 40009b9c: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40009ba0: 02 80 00 0a be 40009bc8 <== NOT EXECUTED 40009ba4: c2 20 e1 64 st %g1, [ %g3 + 0x164 ] <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40009ba8: 03 10 00 b6 sethi %hi(0x4002d800), %g1 <== NOT EXECUTED 40009bac: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 4002db30 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40009bb0: 84 00 a0 01 inc %g2 <== NOT EXECUTED 40009bb4: c4 20 63 30 st %g2, [ %g1 + 0x330 ] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 40009bb8: c2 00 e1 64 ld [ %g3 + 0x164 ], %g1 <== NOT EXECUTED 40009bbc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 40009bc0: 14 80 00 3c bg 40009cb0 <== NOT EXECUTED 40009bc4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40009bc8: 25 10 00 b2 sethi %hi(0x4002c800), %l2 <== NOT EXECUTED 40009bcc: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %g1 ! 4002c9c8 <_impure_ptr> <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40009bd0: a2 10 20 00 clr %l1 <== NOT EXECUTED /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 40009bd4: 40 00 46 7b call 4001b5c0 <== NOT EXECUTED 40009bd8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; 40009bdc: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 40009be0: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED 40009be4: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED 40009be8: 12 80 00 3f bne 40009ce4 <== NOT EXECUTED 40009bec: a0 2c c0 01 andn %l3, %g1, %l0 <== 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); 40009bf0: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %g1 <== NOT EXECUTED 40009bf4: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED 40009bf8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40009bfc: 40 00 5f 30 call 400218bc <== NOT EXECUTED 40009c00: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED if (status) 40009c04: 80 a4 20 00 cmp %l0, 0 <== 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); 40009c08: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED if (status) 40009c0c: 12 80 00 2b bne 40009cb8 <== NOT EXECUTED 40009c10: 35 10 00 b2 sethi %hi(0x4002c800), %i2 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) 40009c14: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40009c18: 02 80 00 12 be 40009c60 <== NOT EXECUTED 40009c1c: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %g1 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 40009c20: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED 40009c24: 04 80 00 09 ble 40009c48 <== NOT EXECUTED 40009c28: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009c2c: 40 00 54 39 call 4001ed10 <== NOT EXECUTED 40009c30: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40009c34: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED 40009c38: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40009c3c: 12 80 00 2e bne 40009cf4 <== NOT EXECUTED 40009c40: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %g1 <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 40009c44: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009c48: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40009c4c: 92 12 62 c0 or %o1, 0x2c0, %o1 <== NOT EXECUTED 40009c50: 40 00 48 1d call 4001bcc4 <== NOT EXECUTED 40009c54: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED 40009c58: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 40009c5c: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %g1 <== NOT EXECUTED 40009c60: 13 10 00 a4 sethi %hi(0x40029000), %o1 <== NOT EXECUTED 40009c64: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40009c68: 40 00 48 17 call 4001bcc4 <== NOT EXECUTED 40009c6c: 92 12 61 38 or %o1, 0x138, %o1 <== NOT EXECUTED (void) fflush(stderr); 40009c70: c2 04 a1 c8 ld [ %l2 + 0x1c8 ], %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"); 40009c74: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED (void) fflush(stderr); 40009c78: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED 40009c7c: 40 00 46 51 call 4001b5c0 <== NOT EXECUTED 40009c80: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 40009c84: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED 40009c88: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED 40009c8c: 02 80 00 09 be 40009cb0 <== NOT EXECUTED 40009c90: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 40009c94: 02 80 00 23 be 40009d20 <== NOT EXECUTED 40009c98: 90 10 20 00 clr %o0 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 40009c9c: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009ca0: 40 00 00 33 call 40009d6c <== NOT EXECUTED 40009ca4: 92 12 62 d8 or %o1, 0x2d8, %o1 ! 40028ad8 <== NOT EXECUTED _exit(local_errno); 40009ca8: 40 00 02 8e call 4000a6e0 <_exit> <== NOT EXECUTED 40009cac: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED rtems_error(0, "fatal error, aborting"); abort(); } } return chars_written; } 40009cb0: 81 c7 e0 08 ret <== NOT EXECUTED 40009cb4: 81 e8 00 00 restore <== NOT EXECUTED #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 40009cb8: c2 06 a1 c8 ld [ %i2 + 0x1c8 ], %g1 <== NOT EXECUTED 40009cbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40009cc0: 7f ff ff a8 call 40009b60 <== NOT EXECUTED 40009cc4: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40009cc8: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009ccc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40009cd0: 92 12 62 a0 or %o1, 0x2a0, %o1 <== NOT EXECUTED 40009cd4: 40 00 47 fc call 4001bcc4 <== NOT EXECUTED 40009cd8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40009cdc: 10 bf ff ce b 40009c14 <== NOT EXECUTED 40009ce0: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ local_errno = errno; 40009ce4: 40 00 45 da call 4001b44c <__errno> <== NOT EXECUTED 40009ce8: 01 00 00 00 nop <== NOT EXECUTED 40009cec: 10 bf ff c1 b 40009bf0 <== NOT EXECUTED 40009cf0: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { if ((local_errno > 0) && *strerror(local_errno)) chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 40009cf4: c2 06 a1 c8 ld [ %i2 + 0x1c8 ], %g1 <== NOT EXECUTED 40009cf8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED 40009cfc: 40 00 54 05 call 4001ed10 <== NOT EXECUTED 40009d00: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED 40009d04: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009d08: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40009d0c: 92 12 62 b0 or %o1, 0x2b0, %o1 <== NOT EXECUTED 40009d10: 40 00 47 ed call 4001bcc4 <== NOT EXECUTED 40009d14: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 40009d18: 10 bf ff d1 b 40009c5c <== NOT EXECUTED 40009d1c: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED rtems_error(0, "fatal error, exiting"); _exit(local_errno); } else { rtems_error(0, "fatal error, aborting"); 40009d20: 13 10 00 a2 sethi %hi(0x40028800), %o1 <== NOT EXECUTED 40009d24: 40 00 00 12 call 40009d6c <== NOT EXECUTED 40009d28: 92 12 62 f0 or %o1, 0x2f0, %o1 ! 40028af0 <== NOT EXECUTED abort(); 40009d2c: 40 00 45 ba call 4001b414 <== NOT EXECUTED 40009d30: 01 00 00 00 nop 40009d34: 01 00 00 00 nop 40019d58 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 40019d58: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED 40019d5c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1 <== NOT EXECUTED 40019d60: a2 10 20 00 clr %l1 <== NOT EXECUTED 40019d64: a6 10 63 ff or %g1, 0x3ff, %l3 <== NOT EXECUTED 40019d68: a4 10 20 00 clr %l2 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40019d6c: 2b 10 00 fa sethi %hi(0x4003e800), %l5 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40019d70: 29 10 00 fa sethi %hi(0x4003e800), %l4 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40019d74: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40019d78: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40019d7c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019d80: 06 80 00 23 bl 40019e0c <== NOT EXECUTED 40019d84: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40019d88: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40019d8c: e0 08 40 00 ldub [ %g1 ], %l0 <== NOT EXECUTED 40019d90: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') 40019d94: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40019d98: 02 80 00 24 be 40019e28 <== NOT EXECUTED 40019d9c: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED break; if (sign == 0) { 40019da0: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40019da4: 12 80 00 06 bne 40019dbc <== NOT EXECUTED 40019da8: c2 05 20 98 ld [ %l4 + 0x98 ], %g1 <== NOT EXECUTED if (c == '-') { 40019dac: 80 a4 20 2d cmp %l0, 0x2d <== NOT EXECUTED 40019db0: 02 80 00 2f be 40019e6c <== NOT EXECUTED 40019db4: a4 10 20 01 mov 1, %l2 <== NOT EXECUTED limit++; continue; } sign = 1; } if (!isdigit(c)) 40019db8: c2 05 20 98 ld [ %l4 + 0x98 ], %g1 <== NOT EXECUTED 40019dbc: c4 08 40 10 ldub [ %g1 + %l0 ], %g2 <== NOT EXECUTED 40019dc0: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED 40019dc4: 02 80 00 28 be 40019e64 <== NOT EXECUTED 40019dc8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED return 0; d = c - '0'; if ((i > (limit / 10)) 40019dcc: 40 00 73 09 call 400369f0 <.udiv> <== NOT EXECUTED 40019dd0: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40019dd4: 80 a4 40 08 cmp %l1, %o0 <== NOT EXECUTED 40019dd8: 18 80 00 23 bgu 40019e64 <== NOT EXECUTED 40019ddc: 01 00 00 00 nop <== NOT EXECUTED 40019de0: 02 80 00 1b be 40019e4c <== NOT EXECUTED 40019de4: a0 04 3f d0 add %l0, -48, %l0 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 40019de8: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED 40019dec: 83 2c 60 01 sll %l1, 1, %g1 <== NOT EXECUTED 40019df0: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 40019df4: a2 04 00 01 add %l0, %g1, %l1 <== NOT EXECUTED unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 40019df8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40019dfc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40019e00: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019e04: 16 bf ff e1 bge 40019d88 <== NOT EXECUTED 40019e08: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40019e0c: d0 05 60 a0 ld [ %l5 + 0xa0 ], %o0 <== NOT EXECUTED 40019e10: 40 00 43 67 call 4002abac <__srget_r> <== NOT EXECUTED 40019e14: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 40019e18: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED if (c == ':') 40019e1c: 80 a4 20 3a cmp %l0, 0x3a <== NOT EXECUTED 40019e20: 12 bf ff e1 bne 40019da4 <== NOT EXECUTED 40019e24: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; } if (sign == 0) 40019e28: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED 40019e2c: 02 80 00 0e be 40019e64 <== NOT EXECUTED 40019e30: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED return 0; *val = i * sign; 40019e34: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 40019e38: 7f ff a4 8b call 40003064 <.umul> <== NOT EXECUTED 40019e3c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED 40019e40: d0 26 40 00 st %o0, [ %i1 ] <== NOT EXECUTED 40019e44: 81 c7 e0 08 ret <== NOT EXECUTED 40019e48: 81 e8 00 00 restore <== NOT EXECUTED sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 40019e4c: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40019e50: 40 00 73 94 call 40036ca0 <.urem> <== NOT EXECUTED 40019e54: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED 40019e58: 80 a4 00 08 cmp %l0, %o0 <== NOT EXECUTED 40019e5c: 08 bf ff e4 bleu 40019dec <== NOT EXECUTED 40019e60: 85 2c 60 03 sll %l1, 3, %g2 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 40019e64: 81 c7 e0 08 ret <== NOT EXECUTED 40019e68: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; limit++; 40019e6c: a6 04 e0 01 inc %l3 <== NOT EXECUTED 40019e70: 10 bf ff c1 b 40019d74 <== NOT EXECUTED 40019e74: a4 10 3f ff mov -1, %l2 <== NOT EXECUTED 40019e78 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 40019e78: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED int c; *name = *bufp; 40019e7c: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40019e80: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED for (;;) { c = getc(fp); 40019e84: 10 80 00 19 b 40019ee8 <== NOT EXECUTED 40019e88: 33 10 00 fa sethi %hi(0x4003e800), %i1 <== NOT EXECUTED 40019e8c: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED 40019e90: d0 08 40 00 ldub [ %g1 ], %o0 <== NOT EXECUTED 40019e94: 84 00 60 01 add %g1, 1, %g2 <== NOT EXECUTED if (c == ':') { 40019e98: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40019e9c: 02 80 00 1e be 40019f14 <== NOT EXECUTED 40019ea0: c4 26 00 00 st %g2, [ %i0 ] <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { 40019ea4: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40019ea8: 02 80 00 28 be 40019f48 <== NOT EXECUTED 40019eac: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED if (!nlFlag) return 0; break; } if (c == EOF) 40019eb0: 02 80 00 29 be 40019f54 <== NOT EXECUTED 40019eb4: 01 00 00 00 nop <== NOT EXECUTED return 0; if (*nleft < 2) 40019eb8: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED 40019ebc: 80 a0 60 01 cmp %g1, 1 <== NOT EXECUTED 40019ec0: 08 80 00 25 bleu 40019f54 <== NOT EXECUTED 40019ec4: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; 40019ec8: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40019ecc: d0 28 40 00 stb %o0, [ %g1 ] <== NOT EXECUTED ++(*bufp); 40019ed0: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40019ed4: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40019ed8: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40019edc: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 40019ee0: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40019ee4: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED { int c; *name = *bufp; for (;;) { c = getc(fp); 40019ee8: c2 06 20 04 ld [ %i0 + 4 ], %g1 <== NOT EXECUTED 40019eec: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40019ef0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40019ef4: 16 bf ff e6 bge 40019e8c <== NOT EXECUTED 40019ef8: c2 26 20 04 st %g1, [ %i0 + 4 ] <== NOT EXECUTED 40019efc: d0 06 60 a0 ld [ %i1 + 0xa0 ], %o0 <== NOT EXECUTED 40019f00: 40 00 43 2b call 4002abac <__srget_r> <== NOT EXECUTED 40019f04: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED if (c == ':') { 40019f08: 80 a2 20 3a cmp %o0, 0x3a <== NOT EXECUTED 40019f0c: 12 bf ff e7 bne 40019ea8 <== NOT EXECUTED 40019f10: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED if (nlFlag) 40019f14: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40019f18: 12 80 00 0f bne 40019f54 <== NOT EXECUTED 40019f1c: 01 00 00 00 nop <== NOT EXECUTED return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; 40019f20: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 40019f24: c0 28 40 00 clrb [ %g1 ] <== NOT EXECUTED ++(*bufp); 40019f28: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED --(*nleft); 40019f2c: c2 06 c0 00 ld [ %i3 ], %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40019f30: 84 00 a0 01 inc %g2 <== NOT EXECUTED --(*nleft); 40019f34: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 40019f38: c4 26 80 00 st %g2, [ %i2 ] <== NOT EXECUTED --(*nleft); 40019f3c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 40019f40: 81 c7 e0 08 ret <== NOT EXECUTED 40019f44: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED if (nlFlag) return 0; break; } if (c == '\n') { if (!nlFlag) 40019f48: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED 40019f4c: 32 bf ff f6 bne,a 40019f24 <== NOT EXECUTED 40019f50: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 40019f54: 81 c7 e0 08 ret <== NOT EXECUTED 40019f58: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 40006918 : scandir(dirname, namelist, select, dcomp) const char *dirname; struct dirent ***namelist; int (*select)(struct dirent *); int (*dcomp)(const struct dirent **, const struct dirent **); { 40006918: 9d e3 bf 48 save %sp, -184, %sp struct stat stb; long arraysz; DIR *dirp = NULL; int i; if ((dirp = opendir(dirname)) == NULL) 4000691c: 7f ff fd 7c call 40005f0c 40006920: 90 10 00 18 mov %i0, %o0 40006924: a4 92 20 00 orcc %o0, 0, %l2 40006928: 02 80 00 61 be 40006aac 4000692c: 92 10 3f ff mov -1, %o1 return(-1); if (fstat(dirp->dd_fd, &stb) < 0) 40006930: d0 04 80 00 ld [ %l2 ], %o0 40006934: aa 07 bf a8 add %fp, -88, %l5 40006938: 40 00 24 61 call 4000fabc 4000693c: 92 10 00 15 mov %l5, %o1 40006940: 80 a2 20 00 cmp %o0, 0 40006944: 06 80 00 6b bl 40006af0 40006948: d0 07 bf c8 ld [ %fp + -56 ], %o0 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); 4000694c: 40 00 44 15 call 400179a0 <.div> 40006950: 92 10 20 18 mov 0x18, %o1 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; 40006954: b0 10 20 00 clr %i0 /* * estimate the array size by taking the size of the directory file * and dividing it by a multiple of the minimum size entry. */ arraysz = (stb.st_size / 24); 40006958: a8 10 00 08 mov %o0, %l4 names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); 4000695c: 7f ff fa a2 call 400053e4 40006960: 91 2a 20 02 sll %o0, 2, %o0 if (names == NULL) 40006964: a6 92 20 00 orcc %o0, 0, %l3 40006968: 22 80 00 4c be,a 40006a98 4000696c: b0 10 20 00 clr %i0 goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 40006970: 7f ff ff 4e call 400066a8 40006974: 90 10 00 12 mov %l2, %o0 40006978: a0 92 20 00 orcc %o0, 0, %l0 4000697c: 02 80 00 29 be 40006a20 40006980: 80 a6 a0 00 cmp %i2, 0 if (select != NULL && !(*select)(d)) 40006984: 22 80 00 08 be,a 400069a4 40006988: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED 4000698c: 9f c6 80 00 call %i2 40006990: 01 00 00 00 nop 40006994: 80 a2 20 00 cmp %o0, 0 40006998: 02 bf ff f6 be 40006970 4000699c: 01 00 00 00 nop continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 400069a0: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 400069a4: 90 02 20 04 add %o0, 4, %o0 400069a8: 90 0a 3f fc and %o0, -4, %o0 400069ac: 7f ff fa 8e call 400053e4 400069b0: 90 02 20 0c add %o0, 0xc, %o0 if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069b4: 92 04 20 0c add %l0, 0xc, %o1 if (select != NULL && !(*select)(d)) continue; /* just selected names */ /* * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); 400069b8: a2 10 00 08 mov %o0, %l1 if (p == NULL) 400069bc: 80 a4 60 00 cmp %l1, 0 400069c0: 02 80 00 36 be 40006a98 400069c4: 90 02 20 0c add %o0, 0xc, %o0 goto cleanup_and_bail; p->d_ino = d->d_ino; p->d_reclen = d->d_reclen; p->d_namlen = d->d_namlen; 400069c8: c6 14 20 0a lduh [ %l0 + 0xa ], %g3 * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 400069cc: c2 04 00 00 ld [ %l0 ], %g1 p->d_reclen = d->d_reclen; 400069d0: c4 14 20 08 lduh [ %l0 + 8 ], %g2 p->d_namlen = d->d_namlen; strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069d4: 95 28 e0 10 sll %g3, 0x10, %o2 * Make a minimum size copy of the data */ p = (struct dirent *)malloc(DIRSIZ(d)); if (p == NULL) goto cleanup_and_bail; p->d_ino = d->d_ino; 400069d8: c2 24 40 00 st %g1, [ %l1 ] p->d_reclen = d->d_reclen; 400069dc: c4 34 60 08 sth %g2, [ %l1 + 8 ] p->d_namlen = d->d_namlen; 400069e0: c6 34 60 0a sth %g3, [ %l1 + 0xa ] strncpy(p->d_name, d->d_name, p->d_namlen + 1); 400069e4: 95 32 a0 10 srl %o2, 0x10, %o2 400069e8: 40 00 3a 15 call 4001523c 400069ec: 94 02 a0 01 inc %o2 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { 400069f0: b0 06 20 01 inc %i0 400069f4: 80 a6 00 14 cmp %i0, %l4 400069f8: 3a 80 00 1a bcc,a 40006a60 400069fc: d0 04 80 00 ld [ %l2 ], %o0 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; 40006a00: 83 2e 20 02 sll %i0, 2, %g1 40006a04: 82 00 40 13 add %g1, %l3, %g1 arraysz = (stb.st_size / 24); names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *)); if (names == NULL) goto cleanup_and_bail; while ((d = readdir(dirp)) != NULL) { 40006a08: 90 10 00 12 mov %l2, %o0 40006a0c: 7f ff ff 27 call 400066a8 40006a10: e2 20 7f fc st %l1, [ %g1 + -4 ] 40006a14: a0 92 20 00 orcc %o0, 0, %l0 40006a18: 12 bf ff db bne 40006984 40006a1c: 80 a6 a0 00 cmp %i2, 0 if (names == NULL) goto cleanup_and_bail; } names[nitems-1] = p; } closedir(dirp); 40006a20: 7f ff f7 77 call 400047fc 40006a24: 90 10 00 12 mov %l2, %o0 if (nitems && dcomp != NULL){ 40006a28: 80 a6 20 00 cmp %i0, 0 40006a2c: 02 80 00 0a be 40006a54 40006a30: 92 10 00 18 mov %i0, %o1 40006a34: 80 a6 e0 00 cmp %i3, 0 40006a38: 02 80 00 07 be 40006a54 40006a3c: 96 10 00 1b mov %i3, %o3 qsort(names, nitems, sizeof(struct dirent *), dcomp); 40006a40: 90 10 00 13 mov %l3, %o0 40006a44: 92 10 00 18 mov %i0, %o1 40006a48: 40 00 36 ce call 40014580 40006a4c: 94 10 20 04 mov 4, %o2 } *namelist = names; return(nitems); 40006a50: 92 10 00 18 mov %i0, %o1 } closedir(dirp); if (nitems && dcomp != NULL){ qsort(names, nitems, sizeof(struct dirent *), dcomp); } *namelist = names; 40006a54: e6 26 40 00 st %l3, [ %i1 ] free( names[i] ); free( names ); } return(-1); } 40006a58: 81 c7 e0 08 ret 40006a5c: 91 e8 00 09 restore %g0, %o1, %o0 /* * Check to make sure the array has space left and * realloc the maximum size. */ if (++nitems >= arraysz) { if (fstat(dirp->dd_fd, &stb) < 0) 40006a60: 40 00 24 17 call 4000fabc <== NOT EXECUTED 40006a64: 92 10 00 15 mov %l5, %o1 <== NOT EXECUTED 40006a68: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40006a6c: 06 80 00 0b bl 40006a98 <== NOT EXECUTED 40006a70: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED goto cleanup_and_bail; /* just might have grown */ arraysz = stb.st_size / 12; 40006a74: 40 00 43 cb call 400179a0 <.div> <== NOT EXECUTED 40006a78: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED 40006a7c: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED names = (struct dirent **)realloc((char *)names, 40006a80: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40006a84: 7f ff fa a9 call 40005528 <== NOT EXECUTED 40006a88: 93 2d 20 02 sll %l4, 2, %o1 <== NOT EXECUTED arraysz * sizeof(struct dirent *)); if (names == NULL) 40006a8c: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED 40006a90: 12 bf ff dd bne 40006a04 <== NOT EXECUTED 40006a94: 83 2e 20 02 sll %i0, 2, %g1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 40006a98: 7f ff f7 59 call 400047fc 40006a9c: 90 10 00 12 mov %l2, %o0 if ( names ) { 40006aa0: 80 a4 e0 00 cmp %l3, 0 40006aa4: 12 80 00 04 bne 40006ab4 40006aa8: 92 10 3f ff mov -1, %o1 free( names[i] ); free( names ); } return(-1); } 40006aac: 81 c7 e0 08 ret 40006ab0: 91 e8 00 09 restore %g0, %o1, %o0 if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40006ab4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED 40006ab8: 02 80 00 0a be 40006ae0 <== NOT EXECUTED 40006abc: 82 10 20 00 clr %g1 <== NOT EXECUTED 40006ac0: a0 10 20 00 clr %l0 <== NOT EXECUTED free( names[i] ); 40006ac4: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 40006ac8: d0 04 c0 01 ld [ %l3 + %g1 ], %o0 <== NOT EXECUTED 40006acc: 7f ff fa 1d call 40005340 <== NOT EXECUTED 40006ad0: a0 04 20 01 inc %l0 <== NOT EXECUTED if ( dirp ) closedir( dirp ); if ( names ) { for (i=0; i < nitems; i++ ) 40006ad4: 80 a4 00 18 cmp %l0, %i0 <== NOT EXECUTED 40006ad8: 12 bf ff fb bne 40006ac4 <== NOT EXECUTED 40006adc: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED free( names[i] ); free( names ); 40006ae0: 7f ff fa 18 call 40005340 <== NOT EXECUTED 40006ae4: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED 40006ae8: 10 bf ff f1 b 40006aac <== NOT EXECUTED 40006aec: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED return(nitems); cleanup_and_bail: if ( dirp ) closedir( dirp ); 40006af0: 7f ff f7 43 call 400047fc <== NOT EXECUTED 40006af4: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED 40006af8: 10 bf ff ed b 40006aac <== NOT EXECUTED 40006afc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED 40019f5c : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40019f5c: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40019f60: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 40019f64: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 40019f68: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40019f6c: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 40019f70: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 40019f74: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019f78: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40019f7c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019f80: 7f ff ff be call 40019e78 <== NOT EXECUTED 40019f84: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019f88: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019f8c: 12 80 00 04 bne 40019f9c <== NOT EXECUTED 40019f90: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; return 1; } 40019f94: 81 c7 e0 08 ret <== NOT EXECUTED 40019f98: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 40019f9c: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 40019fa0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019fa4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019fa8: 7f ff ff b4 call 40019e78 <== NOT EXECUTED 40019fac: 98 10 20 00 clr %o4 <== NOT EXECUTED 40019fb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019fb4: 02 bf ff f8 be 40019f94 <== NOT EXECUTED 40019fb8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019fbc: 7f ff ff 67 call 40019d58 <== NOT EXECUTED 40019fc0: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 40019fc4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019fc8: 02 bf ff f3 be 40019f94 <== NOT EXECUTED 40019fcc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 40019fd0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 40019fd4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 40019fd8: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 40019fdc: 7f ff ff a7 call 40019e78 <== NOT EXECUTED 40019fe0: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 40019fe4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40019fe8: 02 bf ff eb be 40019f94 <== NOT EXECUTED 40019fec: da 07 bf f0 ld [ %fp + -16 ], %o5 <== NOT EXECUTED || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) return 0; grp->gr_gid = grgid; 40019ff0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40019ff4: 86 10 00 0d mov %o5, %g3 <== NOT EXECUTED 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; 40019ff8: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 40019ffc: c4 0b 40 00 ldub [ %o5 ], %g2 <== NOT EXECUTED 4001a000: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED 4001a004: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a008: 02 80 00 0f be 4001a044 <== NOT EXECUTED 4001a00c: 88 10 20 17 mov 0x17, %g4 <== NOT EXECUTED 4001a010: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 4001a014: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4001a018: c4 08 c0 00 ldub [ %g3 ], %g2 <== NOT EXECUTED if(*cp == ',') 4001a01c: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED memcount++; 4001a020: 82 18 60 2c xor %g1, 0x2c, %g1 <== NOT EXECUTED 4001a024: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001a028: 83 28 a0 18 sll %g2, 0x18, %g1 <== NOT EXECUTED if(*cp == ',') memcount++; 4001a02c: 88 61 3f ff subx %g4, -1, %g4 <== NOT EXECUTED grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001a030: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a034: 32 bf ff f9 bne,a 4001a018 <== NOT EXECUTED 4001a038: 86 00 e0 01 inc %g3 <== NOT EXECUTED 4001a03c: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 4001a040: 88 00 60 13 add %g1, 0x13, %g4 <== NOT EXECUTED } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 4001a044: c2 07 a0 50 ld [ %fp + 0x50 ], %g1 <== NOT EXECUTED 4001a048: 80 a0 40 04 cmp %g1, %g4 <== NOT EXECUTED 4001a04c: 0a bf ff d2 bcs 40019f94 <== NOT EXECUTED 4001a050: c2 07 a0 4c ld [ %fp + 0x4c ], %g1 <== NOT EXECUTED return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 4001a054: 82 00 60 0f add %g1, 0xf, %g1 <== NOT EXECUTED 4001a058: 82 08 7f f0 and %g1, -16, %g1 <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 4001a05c: da 20 40 00 st %o5, [ %g1 ] <== NOT EXECUTED for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001a060: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED /* * 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); 4001a064: c2 26 60 0c st %g1, [ %i1 + 0xc ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001a068: c2 08 80 00 ldub [ %g2 ], %g1 <== NOT EXECUTED 4001a06c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4001a070: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a074: 02 80 00 15 be 4001a0c8 <== NOT EXECUTED 4001a078: 86 10 20 04 mov 4, %g3 <== NOT EXECUTED 4001a07c: 86 00 a0 01 add %g2, 1, %g3 <== NOT EXECUTED 4001a080: 10 80 00 07 b 4001a09c <== NOT EXECUTED 4001a084: 88 10 20 01 mov 1, %g4 <== NOT EXECUTED 4001a088: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED 4001a08c: 83 28 60 18 sll %g1, 0x18, %g1 <== NOT EXECUTED 4001a090: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001a094: 02 80 00 0c be 4001a0c4 <== NOT EXECUTED 4001a098: 86 00 e0 01 inc %g3 <== NOT EXECUTED if(*cp == ',') { 4001a09c: 83 38 60 18 sra %g1, 0x18, %g1 <== NOT EXECUTED 4001a0a0: 80 a0 60 2c cmp %g1, 0x2c <== NOT EXECUTED 4001a0a4: 32 bf ff fa bne,a 4001a08c <== NOT EXECUTED 4001a0a8: c2 08 c0 00 ldub [ %g3 ], %g1 <== NOT EXECUTED *cp = '\0'; 4001a0ac: c0 28 ff ff clrb [ %g3 + -1 ] <== NOT EXECUTED grp->gr_mem[memcount++] = cp + 1; 4001a0b0: c4 06 60 0c ld [ %i1 + 0xc ], %g2 <== NOT EXECUTED 4001a0b4: 83 29 20 02 sll %g4, 2, %g1 <== NOT EXECUTED 4001a0b8: 88 01 20 01 inc %g4 <== NOT EXECUTED 4001a0bc: 10 bf ff f3 b 4001a088 <== NOT EXECUTED 4001a0c0: c6 20 80 01 st %g3, [ %g2 + %g1 ] <== NOT EXECUTED /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 4001a0c4: 87 29 20 02 sll %g4, 2, %g3 <== NOT EXECUTED if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 4001a0c8: c2 06 60 0c ld [ %i1 + 0xc ], %g1 <== NOT EXECUTED 4001a0cc: c0 20 40 03 clr [ %g1 + %g3 ] <== NOT EXECUTED 4001a0d0: 81 c7 e0 08 ret <== NOT EXECUTED 4001a0d4: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 4001a124 : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4001a124: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4001a128: 98 10 20 00 clr %o4 <== NOT EXECUTED FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 4001a12c: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED 4001a130: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4001a134: b4 07 a0 50 add %fp, 0x50, %i2 <== NOT EXECUTED 4001a138: b6 07 a0 4c add %fp, 0x4c, %i3 <== NOT EXECUTED 4001a13c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a140: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 4001a144: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a148: 7f ff ff 4c call 40019e78 <== NOT EXECUTED 4001a14c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a150: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a154: 12 80 00 04 bne 4001a164 <== NOT EXECUTED 4001a158: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; } 4001a15c: 81 c7 e0 08 ret <== NOT EXECUTED 4001a160: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 4001a164: 92 06 60 04 add %i1, 4, %o1 <== NOT EXECUTED 4001a168: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a16c: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a170: 7f ff ff 42 call 40019e78 <== NOT EXECUTED 4001a174: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001a178: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a17c: 02 bf ff f8 be 4001a15c <== NOT EXECUTED 4001a180: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a184: 7f ff fe f5 call 40019d58 <== NOT EXECUTED 4001a188: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED 4001a18c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a190: 02 bf ff f3 be 4001a15c <== NOT EXECUTED 4001a194: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a198: 7f ff fe f0 call 40019d58 <== NOT EXECUTED 4001a19c: 92 07 bf f0 add %fp, -16, %o1 <== NOT EXECUTED 4001a1a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a1a4: 02 bf ff ee be 4001a15c <== NOT EXECUTED 4001a1a8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a1ac: 92 06 60 0c add %i1, 0xc, %o1 <== NOT EXECUTED 4001a1b0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a1b4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a1b8: 7f ff ff 30 call 40019e78 <== NOT EXECUTED 4001a1bc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001a1c0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a1c4: 02 bf ff e6 be 4001a15c <== NOT EXECUTED 4001a1c8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a1cc: 92 06 60 10 add %i1, 0x10, %o1 <== NOT EXECUTED 4001a1d0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a1d4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a1d8: 7f ff ff 28 call 40019e78 <== NOT EXECUTED 4001a1dc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001a1e0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a1e4: 02 bf ff de be 4001a15c <== NOT EXECUTED 4001a1e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a1ec: 92 06 60 14 add %i1, 0x14, %o1 <== NOT EXECUTED 4001a1f0: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a1f4: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a1f8: 7f ff ff 20 call 40019e78 <== NOT EXECUTED 4001a1fc: 98 10 20 00 clr %o4 <== NOT EXECUTED 4001a200: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a204: 02 bf ff d6 be 4001a15c <== NOT EXECUTED 4001a208: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001a20c: 94 10 00 1b mov %i3, %o2 <== NOT EXECUTED 4001a210: 96 10 00 1a mov %i2, %o3 <== NOT EXECUTED 4001a214: 92 06 60 18 add %i1, 0x18, %o1 <== NOT EXECUTED 4001a218: 7f ff ff 18 call 40019e78 <== NOT EXECUTED 4001a21c: 98 10 20 01 mov 1, %o4 <== NOT EXECUTED 4001a220: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a224: 02 bf ff ce be 4001a15c <== NOT EXECUTED 4001a228: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1)) return 0; pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; 4001a22c: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED || !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; 4001a230: c2 36 60 08 sth %g1, [ %i1 + 8 ] <== NOT EXECUTED pwd->pw_gid = pwgid; 4001a234: c4 36 60 0a sth %g2, [ %i1 + 0xa ] <== NOT EXECUTED 4001a238: 81 c7 e0 08 ret <== NOT EXECUTED 4001a23c: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED 400080f4 : */ int sched_get_priority_max( int policy ) { 400080f4: 9d e3 bf 98 save %sp, -104, %sp switch ( policy ) { 400080f8: 80 a6 20 03 cmp %i0, 3 400080fc: 08 80 00 06 bleu 40008114 40008100: b0 10 20 fe mov 0xfe, %i0 case SCHED_RR: case SCHED_SPORADIC: break; default: rtems_set_errno_and_return_minus_one( EINVAL ); 40008104: 40 00 26 8f call 40011b40 <__errno> <== NOT EXECUTED 40008108: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000810c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 40008110: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } return POSIX_SCHEDULER_MAXIMUM_PRIORITY; } 40008114: 81 c7 e0 08 ret 40008118: 81 e8 00 00 restore 40008154 : int sched_getparam( pid_t pid, const struct sched_param *param ) { 40008154: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008158: 40 00 26 7a call 40011b40 <__errno> <== NOT EXECUTED 4000815c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008160: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008164: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008168: 81 c7 e0 08 ret <== NOT EXECUTED 4000816c: 81 e8 00 00 restore <== NOT EXECUTED 4000811c : */ int sched_getscheduler( pid_t pid ) { 4000811c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008120: 40 00 26 88 call 40011b40 <__errno> <== NOT EXECUTED 40008124: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008128: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 4000812c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008130: 81 c7 e0 08 ret <== NOT EXECUTED 40008134: 81 e8 00 00 restore <== NOT EXECUTED 4000818c : int sched_rr_get_interval( pid_t pid, struct timespec *interval ) { 4000818c: 9d e3 bf 98 save %sp, -104, %sp /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 40008190: 80 a6 20 00 cmp %i0, 0 40008194: 12 80 00 0a bne 400081bc 40008198: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); if ( !interval ) 4000819c: 02 80 00 13 be 400081e8 400081a0: 03 10 00 7f sethi %hi(0x4001fc00), %g1 rtems_set_errno_and_return_minus_one( EINVAL ); _Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval ); 400081a4: d0 00 60 58 ld [ %g1 + 0x58 ], %o0 ! 4001fc58 <_Thread_Ticks_per_timeslice> 400081a8: 92 10 00 19 mov %i1, %o1 400081ac: 40 00 14 c1 call 4000d4b0 <_Timespec_From_ticks> 400081b0: b0 10 20 00 clr %i0 return 0; } 400081b4: 81 c7 e0 08 ret 400081b8: 81 e8 00 00 restore { /* * Only supported for the "calling process" (i.e. this node). */ if ( pid && pid != getpid() ) 400081bc: 7f ff f0 2a call 40004264 400081c0: 01 00 00 00 nop 400081c4: 80 a2 00 18 cmp %o0, %i0 400081c8: 02 bf ff f5 be 4000819c 400081cc: 80 a6 60 00 cmp %i1, 0 rtems_set_errno_and_return_minus_one( ESRCH ); 400081d0: 40 00 26 5c call 40011b40 <__errno> <== NOT EXECUTED 400081d4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400081d8: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED 400081dc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400081e0: 81 c7 e0 08 ret <== NOT EXECUTED 400081e4: 81 e8 00 00 restore <== NOT EXECUTED if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 400081e8: 40 00 26 56 call 40011b40 <__errno> <== NOT EXECUTED 400081ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 400081f0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 400081f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400081f8: 81 c7 e0 08 ret <== NOT EXECUTED 400081fc: 81 e8 00 00 restore <== NOT EXECUTED 40008170 : int sched_setparam( pid_t pid, const struct sched_param *param ) { 40008170: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 40008174: 40 00 26 73 call 40011b40 <__errno> <== NOT EXECUTED 40008178: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000817c: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008180: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 40008184: 81 c7 e0 08 ret <== NOT EXECUTED 40008188: 81 e8 00 00 restore <== NOT EXECUTED 40008138 : int sched_setscheduler( pid_t pid, int policy, const struct sched_param *param ) { 40008138: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOSYS ); 4000813c: 40 00 26 81 call 40011b40 <__errno> <== NOT EXECUTED 40008140: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008144: 82 10 20 58 mov 0x58, %g1 <== NOT EXECUTED 40008148: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED } 4000814c: 81 c7 e0 08 ret <== NOT EXECUTED 40008150: 81 e8 00 00 restore <== NOT EXECUTED 40008014 : */ int sem_close( sem_t *sem ) { 40008014: 9d e3 bf 90 save %sp, -112, %sp RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get ( sem_t *id, Objects_Locations *location ) { return (POSIX_Semaphore_Control *) 40008018: d2 06 00 00 ld [ %i0 ], %o1 4000801c: 11 10 00 86 sethi %hi(0x40021800), %o0 40008020: 94 07 bf f4 add %fp, -12, %o2 40008024: 40 00 0c 44 call 4000b134 <_Objects_Get> 40008028: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 4000802c: c2 07 bf f4 ld [ %fp + -12 ], %g1 40008030: 80 a0 60 01 cmp %g1, 1 40008034: 02 80 00 1c be 400080a4 40008038: 01 00 00 00 nop 4000803c: 2a 80 00 09 bcs,a 40008060 40008040: c2 02 20 1c ld [ %o0 + 0x1c ], %g1 40008044: 80 a0 60 02 cmp %g1, 2 40008048: 02 80 00 1d be 400080bc 4000804c: 01 00 00 00 nop the_semaphore->open_count -= 1; _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008050: 40 00 01 aa call 400086f8 <== NOT EXECUTED 40008054: 01 00 00 00 nop <== NOT EXECUTED } 40008058: 81 c7 e0 08 ret <== NOT EXECUTED 4000805c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: the_semaphore->open_count -= 1; 40008060: 82 00 7f ff add %g1, -1, %g1 _POSIX_Semaphore_Delete( the_semaphore ); 40008064: 40 00 21 b4 call 40010734 <_POSIX_Semaphore_Delete> 40008068: c2 22 20 1c st %g1, [ %o0 + 0x1c ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000806c: 07 10 00 85 sethi %hi(0x40021400), %g3 40008070: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 40008074: 90 10 20 00 clr %o0 40008078: 82 00 7f ff add %g1, -1, %g1 4000807c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] 40008080: c4 00 e2 30 ld [ %g3 + 0x230 ], %g2 40008084: 80 a0 a0 00 cmp %g2, 0 40008088: 12 bf ff f4 bne 40008058 4000808c: 01 00 00 00 nop _Thread_Dispatch(); 40008090: 40 00 11 15 call 4000c4e4 <_Thread_Dispatch> 40008094: 01 00 00 00 nop 40008098: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000809c: 81 c7 e0 08 ret 400080a0: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400080a4: 40 00 11 10 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400080a8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400080ac: 40 00 01 9d call 40008720 <== NOT EXECUTED 400080b0: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400080b4: 81 c7 e0 08 ret <== NOT EXECUTED 400080b8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 400080bc: 40 00 2a 78 call 40012a9c <__errno> 400080c0: 01 00 00 00 nop 400080c4: 82 10 20 16 mov 0x16, %g1 ! 16 400080c8: c2 22 00 00 st %g1, [ %o0 ] 400080cc: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400080d0: 81 c7 e0 08 ret 400080d4: 91 e8 00 08 restore %g0, %o0, %o0 400080d8 : */ int sem_destroy( sem_t *sem ) { 400080d8: 9d e3 bf 90 save %sp, -112, %sp 400080dc: d2 06 00 00 ld [ %i0 ], %o1 400080e0: 11 10 00 86 sethi %hi(0x40021800), %o0 400080e4: 94 07 bf f4 add %fp, -12, %o2 400080e8: 40 00 0c 13 call 4000b134 <_Objects_Get> 400080ec: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400080f0: c2 07 bf f4 ld [ %fp + -12 ], %g1 400080f4: 80 a0 60 01 cmp %g1, 1 400080f8: 02 80 00 2f be 400081b4 400080fc: 01 00 00 00 nop 40008100: 2a 80 00 09 bcs,a 40008124 40008104: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 40008108: 80 a0 60 02 cmp %g1, 2 4000810c: 02 80 00 23 be 40008198 40008110: 01 00 00 00 nop _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008114: 40 00 01 79 call 400086f8 <== NOT EXECUTED 40008118: 01 00 00 00 nop <== NOT EXECUTED } 4000811c: 81 c7 e0 08 ret <== NOT EXECUTED 40008120: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_LOCAL: /* * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { 40008124: 80 a0 60 01 cmp %g1, 1 40008128: 02 80 00 12 be 40008170 4000812c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } _POSIX_Semaphore_Delete( the_semaphore ); 40008130: 40 00 21 81 call 40010734 <_POSIX_Semaphore_Delete> 40008134: 01 00 00 00 nop #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008138: 03 10 00 85 sethi %hi(0x40021400), %g1 4000813c: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 40008140: 90 10 20 00 clr %o0 40008144: 84 00 bf ff add %g2, -1, %g2 40008148: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 4000814c: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 40008150: 80 a0 e0 00 cmp %g3, 0 40008154: 12 bf ff f2 bne 4000811c 40008158: 01 00 00 00 nop _Thread_Dispatch(); 4000815c: 40 00 10 e2 call 4000c4e4 <_Thread_Dispatch> 40008160: 01 00 00 00 nop 40008164: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008168: 81 c7 e0 08 ret 4000816c: 91 e8 00 08 restore %g0, %o0, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008170: 03 10 00 85 sethi %hi(0x40021400), %g1 <== NOT EXECUTED 40008174: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 40008178: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000817c: c4 20 62 30 st %g2, [ %g1 + 0x230 ] <== NOT EXECUTED 40008180: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 <== NOT EXECUTED 40008184: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 40008188: 12 80 00 04 bne 40008198 <== NOT EXECUTED 4000818c: 01 00 00 00 nop <== NOT EXECUTED _Thread_Dispatch(); 40008190: 40 00 10 d5 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008194: 01 00 00 00 nop <== NOT EXECUTED * Undefined operation on a named semaphore. */ if ( the_semaphore->named == TRUE ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 40008198: 40 00 2a 41 call 40012a9c <__errno> 4000819c: 01 00 00 00 nop 400081a0: 82 10 20 16 mov 0x16, %g1 ! 16 400081a4: c2 22 00 00 st %g1, [ %o0 ] 400081a8: 90 10 3f ff mov -1, %o0 _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400081ac: 81 c7 e0 08 ret 400081b0: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 400081b4: 40 00 10 cc call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 400081b8: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 400081bc: 40 00 01 59 call 40008720 <== NOT EXECUTED 400081c0: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Semaphore_Delete( the_semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 400081c4: 81 c7 e0 08 ret <== NOT EXECUTED 400081c8: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED 400081cc : int sem_getvalue( sem_t *sem, int *sval ) { 400081cc: 9d e3 bf 90 save %sp, -112, %sp 400081d0: d2 06 00 00 ld [ %i0 ], %o1 400081d4: 11 10 00 86 sethi %hi(0x40021800), %o0 400081d8: 94 07 bf f4 add %fp, -12, %o2 400081dc: 40 00 0b d6 call 4000b134 <_Objects_Get> 400081e0: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400081e4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400081e8: 80 a0 60 01 cmp %g1, 1 400081ec: 02 80 00 1a be 40008254 400081f0: 01 00 00 00 nop 400081f4: 2a 80 00 09 bcs,a 40008218 400081f8: c2 02 20 68 ld [ %o0 + 0x68 ], %g1 400081fc: 80 a0 60 02 cmp %g1, 2 40008200: 02 80 00 1b be 4000826c 40008204: 01 00 00 00 nop case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 40008208: 40 00 01 3c call 400086f8 <== NOT EXECUTED 4000820c: 01 00 00 00 nop <== NOT EXECUTED } 40008210: 81 c7 e0 08 ret <== NOT EXECUTED 40008214: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); 40008218: c2 26 40 00 st %g1, [ %i1 ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000821c: 07 10 00 85 sethi %hi(0x40021400), %g3 40008220: c2 00 e2 30 ld [ %g3 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 40008224: 90 10 20 00 clr %o0 40008228: 82 00 7f ff add %g1, -1, %g1 4000822c: c2 20 e2 30 st %g1, [ %g3 + 0x230 ] 40008230: c4 00 e2 30 ld [ %g3 + 0x230 ], %g2 40008234: 80 a0 a0 00 cmp %g2, 0 40008238: 12 bf ff f6 bne 40008210 4000823c: 01 00 00 00 nop _Thread_Dispatch(); 40008240: 40 00 10 a9 call 4000c4e4 <_Thread_Dispatch> 40008244: 01 00 00 00 nop 40008248: 90 10 20 00 clr %o0 ! 0 _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000824c: 81 c7 e0 08 ret 40008250: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 40008254: 40 00 10 a4 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008258: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 4000825c: 40 00 01 31 call 40008720 <== NOT EXECUTED 40008260: 01 00 00 00 nop <== NOT EXECUTED *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008264: 81 c7 e0 08 ret <== NOT EXECUTED 40008268: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000826c: 40 00 2a 0c call 40012a9c <__errno> 40008270: 01 00 00 00 nop 40008274: 82 10 20 16 mov 0x16, %g1 ! 16 40008278: c2 22 00 00 st %g1, [ %o0 ] 4000827c: 90 10 3f ff mov -1, %o0 *sval = _CORE_semaphore_Get_count( &the_semaphore->Semaphore ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008280: 81 c7 e0 08 ret 40008284: 91 e8 00 08 restore %g0, %o0, %o0 40008288 : int sem_init( sem_t *sem, int pshared, unsigned int value ) { 40008288: 9d e3 bf 90 save %sp, -112, %sp 4000828c: 92 10 00 19 mov %i1, %o1 int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) 40008290: 80 a6 20 00 cmp %i0, 0 40008294: 02 80 00 0c be 400082c4 40008298: 94 10 00 1a mov %i2, %o2 rtems_set_errno_and_return_minus_one( EINVAL ); status = _POSIX_Semaphore_Create_support( 4000829c: 90 10 20 00 clr %o0 400082a0: 40 00 20 b4 call 40010570 <_POSIX_Semaphore_Create_support> 400082a4: 96 07 bf f4 add %fp, -12, %o3 pshared, value, &the_semaphore ); if ( status != -1 ) 400082a8: 80 a2 3f ff cmp %o0, -1 400082ac: 02 80 00 04 be 400082bc 400082b0: c2 07 bf f4 ld [ %fp + -12 ], %g1 *sem = the_semaphore->Object.id; 400082b4: c4 00 60 08 ld [ %g1 + 8 ], %g2 400082b8: c4 26 00 00 st %g2, [ %i0 ] return status; } 400082bc: 81 c7 e0 08 ret 400082c0: 91 e8 00 08 restore %g0, %o0, %o0 { int status; POSIX_Semaphore_Control *the_semaphore; if ( !sem ) rtems_set_errno_and_return_minus_one( EINVAL ); 400082c4: 40 00 29 f6 call 40012a9c <__errno> <== NOT EXECUTED 400082c8: 01 00 00 00 nop <== NOT EXECUTED 400082cc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 400082d0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400082d4: 10 bf ff fa b 400082bc <== NOT EXECUTED 400082d8: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED 400082dc : int oflag, ... /* mode_t mode, */ /* unsigned int value */ ) { 400082dc: 9d e3 bf 88 save %sp, -120, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400082e0: 21 10 00 85 sethi %hi(0x40021400), %l0 400082e4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 400082e8: f4 27 a0 4c st %i2, [ %fp + 0x4c ] 400082ec: 82 00 60 01 inc %g1 400082f0: f6 27 a0 50 st %i3, [ %fp + 0x50 ] 400082f4: f8 27 a0 54 st %i4, [ %fp + 0x54 ] 400082f8: fa 27 a0 58 st %i5, [ %fp + 0x58 ] 400082fc: c2 24 22 30 st %g1, [ %l0 + 0x230 ] POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { 40008300: b8 8e 62 00 andcc %i1, 0x200, %i4 40008304: 12 80 00 42 bne 4000840c 40008308: f6 07 a0 50 ld [ %fp + 0x50 ], %i3 4000830c: b6 10 20 00 clr %i3 mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); va_end(arg); } status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 40008310: 90 10 00 18 mov %i0, %o0 40008314: 40 00 21 25 call 400107a8 <_POSIX_Semaphore_Name_to_id> 40008318: 92 07 bf f0 add %fp, -16, %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 ) { 4000831c: ba 92 20 00 orcc %o0, 0, %i5 40008320: 02 80 00 11 be 40008364 40008324: 82 0e 6a 00 and %i1, 0xa00, %g1 /* * 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) ) ) { 40008328: 80 a7 60 02 cmp %i5, 2 4000832c: 02 80 00 3b be 40008418 40008330: 80 a7 20 00 cmp %i4, 0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008334: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008338: 82 00 7f ff add %g1, -1, %g1 4000833c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008340: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008344: 80 a0 a0 00 cmp %g2, 0 40008348: 02 80 00 52 be 40008490 4000834c: 01 00 00 00 nop _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 40008350: 40 00 29 d3 call 40012a9c <__errno> <== NOT EXECUTED 40008354: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 40008358: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED 4000835c: 81 c7 e0 08 ret <== NOT EXECUTED 40008360: 81 e8 00 00 restore <== NOT EXECUTED /* * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { 40008364: 80 a0 6a 00 cmp %g1, 0xa00 40008368: 02 80 00 1c be 400083d8 4000836c: d2 07 bf f0 ld [ %fp + -16 ], %o1 40008370: 94 07 bf e8 add %fp, -24, %o2 40008374: 11 10 00 86 sethi %hi(0x40021800), %o0 40008378: 40 00 0b 6f call 4000b134 <_Objects_Get> 4000837c: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 400219b0 <_POSIX_Semaphore_Information> _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); } the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; 40008380: c2 02 20 1c ld [ %o0 + 0x1c ], %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 ); 40008384: d0 27 bf ec st %o0, [ %fp + -20 ] the_semaphore->open_count += 1; 40008388: 82 00 60 01 inc %g1 4000838c: c2 22 20 1c st %g1, [ %o0 + 0x1c ] 40008390: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008394: 3b 10 00 85 sethi %hi(0x40021400), %i5 40008398: 82 00 7f ff add %g1, -1, %g1 4000839c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 400083a0: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 400083a4: 80 a0 a0 00 cmp %g2, 0 400083a8: 02 80 00 34 be 40008478 400083ac: 01 00 00 00 nop 400083b0: c2 07 62 30 ld [ %i5 + 0x230 ], %g1 400083b4: 82 00 7f ff add %g1, -1, %g1 400083b8: c2 27 62 30 st %g1, [ %i5 + 0x230 ] 400083bc: c4 07 62 30 ld [ %i5 + 0x230 ], %g2 400083c0: 80 a0 a0 00 cmp %g2, 0 400083c4: 02 80 00 29 be 40008468 400083c8: 01 00 00 00 nop _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 400083cc: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED 400083d0: 81 c7 e0 08 ret 400083d4: 91 e8 60 08 restore %g1, 8, %o0 400083d8: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 400083dc: 82 00 7f ff add %g1, -1, %g1 400083e0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 400083e4: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 400083e8: 80 a0 a0 00 cmp %g2, 0 400083ec: 02 80 00 26 be 40008484 400083f0: 01 00 00 00 nop * Check for existence with creation. */ if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * ); 400083f4: 40 00 29 aa call 40012a9c <__errno> 400083f8: b0 10 3f ff mov -1, %i0 ! ffffffff 400083fc: 82 10 20 11 mov 0x11, %g1 40008400: c2 22 00 00 st %g1, [ %o0 ] 40008404: 81 c7 e0 08 ret 40008408: 81 e8 00 00 restore _Thread_Disable_dispatch(); if ( oflag & O_CREAT ) { va_start(arg, oflag); mode = (mode_t) va_arg( arg, unsigned int ); value = va_arg( arg, unsigned int ); 4000840c: 82 07 a0 54 add %fp, 0x54, %g1 40008410: 10 bf ff c0 b 40008310 40008414: c2 27 bf f4 st %g1, [ %fp + -12 ] /* * 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) ) ) { 40008418: 02 bf ff c7 be 40008334 4000841c: 90 10 00 18 mov %i0, %o0 /* * 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( 40008420: 94 10 00 1b mov %i3, %o2 40008424: 92 10 20 00 clr %o1 40008428: 40 00 20 52 call 40010570 <_POSIX_Semaphore_Create_support> 4000842c: 96 07 bf ec add %fp, -20, %o3 40008430: ba 10 00 08 mov %o0, %i5 40008434: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008438: 82 00 7f ff add %g1, -1, %g1 4000843c: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008440: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008444: 80 a0 a0 00 cmp %g2, 0 40008448: 02 80 00 19 be 400084ac 4000844c: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 40008450: 80 a7 7f ff cmp %i5, -1 <== NOT EXECUTED 40008454: 02 bf ff c2 be 4000835c 40008458: b0 10 3f ff mov -1, %i0 return SEM_FAILED; id = &the_semaphore->Object.id; return (sem_t *)id; 4000845c: c2 07 bf ec ld [ %fp + -20 ], %g1 } 40008460: 81 c7 e0 08 ret 40008464: 91 e8 60 08 restore %g1, 8, %o0 _Thread_Dispatch(); 40008468: 40 00 10 1f call 4000c4e4 <_Thread_Dispatch> 4000846c: 01 00 00 00 nop the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location ); the_semaphore->open_count += 1; _Thread_Enable_dispatch(); _Thread_Enable_dispatch(); id = &the_semaphore->Object.id; return (sem_t *)id; 40008470: 10 bf ff d8 b 400083d0 40008474: c2 07 bf ec ld [ %fp + -20 ], %g1 40008478: 40 00 10 1b call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 4000847c: 01 00 00 00 nop <== NOT EXECUTED 40008480: 30 bf ff cc b,a 400083b0 <== NOT EXECUTED 40008484: 40 00 10 18 call 4000c4e4 <_Thread_Dispatch> 40008488: 01 00 00 00 nop 4000848c: 30 bf ff da b,a 400083f4 40008490: 40 00 10 15 call 4000c4e4 <_Thread_Dispatch> 40008494: b0 10 3f ff mov -1, %i0 * and we are willing to create then it is an error. */ if ( !( status == ENOENT && (oflag & O_CREAT) ) ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one_cast( status, sem_t * ); 40008498: 40 00 29 81 call 40012a9c <__errno> 4000849c: 01 00 00 00 nop 400084a0: fa 22 00 00 st %i5, [ %o0 ] 400084a4: 81 c7 e0 08 ret 400084a8: 81 e8 00 00 restore 400084ac: 40 00 10 0e call 4000c4e4 <_Thread_Dispatch> 400084b0: 01 00 00 00 nop * errno was set by Create_support, so don't set it again. */ _Thread_Enable_dispatch(); if ( status == -1 ) 400084b4: 10 bf ff e8 b 40008454 400084b8: 80 a7 7f ff cmp %i5, -1 400084bc : */ int sem_post( sem_t *sem ) { 400084bc: 9d e3 bf 90 save %sp, -112, %sp 400084c0: d2 06 00 00 ld [ %i0 ], %o1 400084c4: 11 10 00 86 sethi %hi(0x40021800), %o0 400084c8: 94 07 bf f4 add %fp, -12, %o2 400084cc: 40 00 0b 1a call 4000b134 <_Objects_Get> 400084d0: 90 12 21 b0 or %o0, 0x1b0, %o0 register POSIX_Semaphore_Control *the_semaphore; Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { 400084d4: c2 07 bf f4 ld [ %fp + -12 ], %g1 400084d8: 80 a0 60 01 cmp %g1, 1 400084dc: 02 80 00 1c be 4000854c 400084e0: 01 00 00 00 nop 400084e4: 2a 80 00 09 bcs,a 40008508 400084e8: d2 02 20 08 ld [ %o0 + 8 ], %o1 400084ec: 80 a0 60 02 cmp %g1, 2 400084f0: 02 80 00 1d be 40008564 400084f4: 01 00 00 00 nop #endif ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); 400084f8: 40 00 00 80 call 400086f8 <== NOT EXECUTED 400084fc: 01 00 00 00 nop <== NOT EXECUTED } 40008500: 81 c7 e0 08 ret <== NOT EXECUTED 40008504: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case OBJECTS_REMOTE: _Thread_Dispatch(); return POSIX_MP_NOT_IMPLEMENTED(); rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _CORE_semaphore_Surrender( 40008508: 94 10 20 00 clr %o2 4000850c: 40 00 07 f8 call 4000a4ec <_CORE_semaphore_Surrender> 40008510: 90 02 20 20 add %o0, 0x20, %o0 #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008514: 03 10 00 85 sethi %hi(0x40021400), %g1 40008518: c4 00 62 30 ld [ %g1 + 0x230 ], %g2 ! 40021630 <_Thread_Dispatch_disable_level> 4000851c: 90 10 20 00 clr %o0 40008520: 84 00 bf ff add %g2, -1, %g2 40008524: c4 20 62 30 st %g2, [ %g1 + 0x230 ] 40008528: c6 00 62 30 ld [ %g1 + 0x230 ], %g3 4000852c: 80 a0 e0 00 cmp %g3, 0 40008530: 12 bf ff f4 bne 40008500 40008534: 01 00 00 00 nop _Thread_Dispatch(); 40008538: 40 00 0f eb call 4000c4e4 <_Thread_Dispatch> 4000853c: 01 00 00 00 nop 40008540: 90 10 20 00 clr %o0 ! 0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008544: 81 c7 e0 08 ret 40008548: 91 e8 00 08 restore %g0, %o0, %o0 the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_REMOTE: _Thread_Dispatch(); 4000854c: 40 00 0f e6 call 4000c4e4 <_Thread_Dispatch> <== NOT EXECUTED 40008550: 01 00 00 00 nop <== NOT EXECUTED return POSIX_MP_NOT_IMPLEMENTED(); 40008554: 40 00 00 73 call 40008720 <== NOT EXECUTED 40008558: 01 00 00 00 nop <== NOT EXECUTED ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 4000855c: 81 c7 e0 08 ret <== NOT EXECUTED 40008560: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED Objects_Locations location; the_semaphore = _POSIX_Semaphore_Get( sem, &location ); switch ( location ) { case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 40008564: 40 00 29 4e call 40012a9c <__errno> 40008568: 01 00 00 00 nop 4000856c: 82 10 20 16 mov 0x16, %g1 ! 16 40008570: c2 22 00 00 st %g1, [ %o0 ] 40008574: 90 10 3f ff mov -1, %o0 ); _Thread_Enable_dispatch(); return 0; } return POSIX_BOTTOM_REACHED(); } 40008578: 81 c7 e0 08 ret 4000857c: 91 e8 00 08 restore %g0, %o0, %o0 40008580 : int sem_timedwait( sem_t *sem, const struct timespec *abstime ) { 40008580: 9d e3 bf 90 save %sp, -112, %sp * So we check the abstime provided, and hold on to whether it * is valid or not. If it isn't correct and in the future, * then we do a polling operation and convert the UNSATISFIED * status into the appropriate error. */ status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks ); 40008584: 90 10 00 19 mov %i1, %o0 40008588: 40 00 1d 87 call 4000fba4 <_POSIX_Absolute_timeout_to_ticks> 4000858c: 92 07 bf f4 add %fp, -12, %o1 switch ( status ) { 40008590: 80 a2 20 02 cmp %o0, 2 40008594: 18 80 00 07 bgu 400085b0 40008598: d4 07 bf f4 ld [ %fp + -12 ], %o2 case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 4000859c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400085a0: 40 00 20 a1 call 40010824 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED 400085a4: 92 10 20 00 clr %o1 <== NOT EXECUTED break; } } return lock_status; } 400085a8: 81 c7 e0 08 ret <== NOT EXECUTED 400085ac: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE: do_wait = TRUE; break; } lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks ); 400085b0: 90 10 00 18 mov %i0, %o0 400085b4: 40 00 20 9c call 40010824 <_POSIX_Semaphore_Wait_support> 400085b8: 92 10 20 01 mov 1, %o1 break; } } return lock_status; } 400085bc: 81 c7 e0 08 ret 400085c0: 91 e8 00 08 restore %g0, %o0, %o0 400085dc : */ int sem_unlink( const char *name ) { 400085dc: 9d e3 bf 90 save %sp, -112, %sp rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 400085e0: 21 10 00 85 sethi %hi(0x40021400), %l0 400085e4: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 ! 40021630 <_Thread_Dispatch_disable_level> 400085e8: 90 10 00 18 mov %i0, %o0 400085ec: 82 00 60 01 inc %g1 400085f0: c2 24 22 30 st %g1, [ %l0 + 0x230 ] register POSIX_Semaphore_Control *the_semaphore; sem_t the_semaphore_id; _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); 400085f4: 40 00 20 6d call 400107a8 <_POSIX_Semaphore_Name_to_id> 400085f8: 92 07 bf f4 add %fp, -12, %o1 if ( status != 0 ) { 400085fc: b0 92 20 00 orcc %o0, 0, %i0 40008600: 12 80 00 1f bne 4000867c 40008604: 03 10 00 86 sethi %hi(0x40021800), %g1 RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object( Objects_Information *information, uint16_t index ) { if ( index > information->maximum ) 40008608: c4 07 bf f4 ld [ %fp + -12 ], %g2 4000860c: 88 10 61 b0 or %g1, 0x1b0, %g4 40008610: c6 11 20 10 lduh [ %g4 + 0x10 ], %g3 40008614: 03 00 00 3f sethi %hi(0xfc00), %g1 40008618: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000861c: 82 08 80 01 and %g2, %g1, %g1 40008620: 80 a0 40 03 cmp %g1, %g3 40008624: 18 80 00 05 bgu 40008638 40008628: 90 10 20 00 clr %o0 4000862c: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 40008630: 83 28 60 02 sll %g1, 2, %g1 40008634: d0 00 80 01 ld [ %g2 + %g1 ], %o0 if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) { _Objects_MP_Close( &_POSIX_Semaphore_Information, the_semaphore_id ); } #endif the_semaphore->linked = FALSE; 40008638: c0 22 20 18 clr [ %o0 + 0x18 ] _POSIX_Semaphore_Namespace_remove( the_semaphore ); _POSIX_Semaphore_Delete( the_semaphore ); 4000863c: 40 00 20 3e call 40010734 <_POSIX_Semaphore_Delete> 40008640: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40008644: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008648: b0 10 20 00 clr %i0 4000864c: 82 00 7f ff add %g1, -1, %g1 40008650: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008654: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 40008658: 80 a0 a0 00 cmp %g2, 0 4000865c: 02 80 00 04 be 4000866c 40008660: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 40008664: 81 c7 e0 08 ret <== NOT EXECUTED 40008668: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000866c: 40 00 0f 9e call 4000c4e4 <_Thread_Dispatch> 40008670: 01 00 00 00 nop 40008674: 81 c7 e0 08 ret 40008678: 81 e8 00 00 restore #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000867c: c2 04 22 30 ld [ %l0 + 0x230 ], %g1 40008680: 82 00 7f ff add %g1, -1, %g1 40008684: c2 24 22 30 st %g1, [ %l0 + 0x230 ] 40008688: c4 04 22 30 ld [ %l0 + 0x230 ], %g2 4000868c: 80 a0 a0 00 cmp %g2, 0 40008690: 02 80 00 07 be 400086ac 40008694: 01 00 00 00 nop _Thread_Disable_dispatch(); status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id ); if ( status != 0 ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( status ); 40008698: 40 00 29 01 call 40012a9c <__errno> 4000869c: 01 00 00 00 nop 400086a0: f0 22 00 00 st %i0, [ %o0 ] 400086a4: 81 c7 e0 08 ret 400086a8: 91 e8 3f ff restore %g0, -1, %o0 _Thread_Dispatch(); 400086ac: 40 00 0f 8e call 4000c4e4 <_Thread_Dispatch> 400086b0: 01 00 00 00 nop 400086b4: 30 bf ff f9 b,a 40008698 40019cf4 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 40019cf4: 03 10 00 f5 sethi %hi(0x4003d400), %g1 <== NOT EXECUTED 40019cf8: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4003d7f0 <== NOT EXECUTED 40019cfc: d0 30 a0 2a sth %o0, [ %g2 + 0x2a ] <== NOT EXECUTED return 0; } 40019d00: 81 c3 e0 08 retl <== NOT EXECUTED 40019d04: 90 10 20 00 clr %o0 <== NOT EXECUTED 4001a378 : return NULL; return &grent; } void setgrent(void) { 4001a378: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 4001a37c: 7f ff ff c4 call 4001a28c <== NOT EXECUTED 4001a380: 21 10 00 fc sethi %hi(0x4003f000), %l0 <== NOT EXECUTED if (group_fp != NULL) 4001a384: d0 04 22 b4 ld [ %l0 + 0x2b4 ], %o0 ! 4003f2b4 <== NOT EXECUTED 4001a388: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a38c: 22 80 00 05 be,a 4001a3a0 <== NOT EXECUTED 4001a390: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED fclose(group_fp); 4001a394: 40 00 35 10 call 400277d4 <== NOT EXECUTED 4001a398: 01 00 00 00 nop <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 4001a39c: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a3a0: 13 10 00 f2 sethi %hi(0x4003c800), %o1 <== NOT EXECUTED 4001a3a4: 90 12 22 c0 or %o0, 0x2c0, %o0 <== NOT EXECUTED 4001a3a8: 40 00 37 09 call 40027fcc <== NOT EXECUTED 4001a3ac: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 4001a3b0: d0 24 22 b4 st %o0, [ %l0 + 0x2b4 ] <== NOT EXECUTED } 4001a3b4: 81 c7 e0 08 ret <== NOT EXECUTED 4001a3b8: 81 e8 00 00 restore <== NOT EXECUTED 4001a57c : return NULL; return &pwent; } void setpwent(void) { 4001a57c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED init_etc_passwd_group(); 4001a580: 7f ff ff 43 call 4001a28c <== NOT EXECUTED 4001a584: 21 10 00 fc sethi %hi(0x4003f000), %l0 <== NOT EXECUTED if (passwd_fp != NULL) 4001a588: d0 04 21 cc ld [ %l0 + 0x1cc ], %o0 ! 4003f1cc <== NOT EXECUTED 4001a58c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001a590: 22 80 00 05 be,a 4001a5a4 <== NOT EXECUTED 4001a594: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED fclose(passwd_fp); 4001a598: 40 00 34 8f call 400277d4 <== NOT EXECUTED 4001a59c: 01 00 00 00 nop <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 4001a5a0: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED 4001a5a4: 13 10 00 f2 sethi %hi(0x4003c800), %o1 <== NOT EXECUTED 4001a5a8: 90 12 22 48 or %o0, 0x248, %o0 <== NOT EXECUTED 4001a5ac: 40 00 36 88 call 40027fcc <== NOT EXECUTED 4001a5b0: 92 12 62 68 or %o1, 0x268, %o1 <== NOT EXECUTED 4001a5b4: d0 24 21 cc st %o0, [ %l0 + 0x1cc ] <== NOT EXECUTED } 4001a5b8: 81 c7 e0 08 ret <== NOT EXECUTED 4001a5bc: 81 e8 00 00 restore <== NOT EXECUTED 4001a790 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 4001a790: 03 10 00 f5 sethi %hi(0x4003d400), %g1 <== NOT EXECUTED 4001a794: c4 00 63 f0 ld [ %g1 + 0x3f0 ], %g2 ! 4003d7f0 <== NOT EXECUTED 4001a798: d0 30 a0 28 sth %o0, [ %g2 + 0x28 ] <== NOT EXECUTED return 0; } 4001a79c: 81 c3 e0 08 retl <== NOT EXECUTED 4001a7a0: 90 10 20 00 clr %o0 <== NOT EXECUTED 400075f4 : int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 400075f4: 9d e3 bf 98 save %sp, -104, %sp ISR_Level level; if ( oact ) 400075f8: 80 a6 a0 00 cmp %i2, 0 400075fc: 02 80 00 0d be 40007630 40007600: 87 2e 20 02 sll %i0, 2, %g3 *oact = _POSIX_signals_Vectors[ sig ]; 40007604: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 40007608: 83 2e 20 04 sll %i0, 4, %g1 <== NOT EXECUTED 4000760c: 84 10 a1 64 or %g2, 0x164, %g2 <== NOT EXECUTED 40007610: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 40007614: c8 00 80 01 ld [ %g2 + %g1 ], %g4 <== NOT EXECUTED 40007618: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED 4000761c: c8 26 80 00 st %g4, [ %i2 ] <== NOT EXECUTED 40007620: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED 40007624: c4 26 a0 04 st %g2, [ %i2 + 4 ] <== NOT EXECUTED 40007628: c6 00 60 08 ld [ %g1 + 8 ], %g3 <== NOT EXECUTED 4000762c: c6 26 a0 08 st %g3, [ %i2 + 8 ] <== NOT EXECUTED if ( !sig ) 40007630: 80 a6 20 00 cmp %i0, 0 40007634: 02 80 00 33 be 40007700 40007638: b4 06 3f ff add %i0, -1, %i2 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 4000763c: 80 a6 a0 1f cmp %i2, 0x1f 40007640: 18 80 00 30 bgu 40007700 40007644: 80 a6 20 09 cmp %i0, 9 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 40007648: 02 80 00 2e be 40007700 4000764c: 80 a6 60 00 cmp %i1, 0 /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 40007650: 02 80 00 1a be 400076b8 40007654: 82 10 20 00 clr %g1 /* * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); 40007658: 7f ff eb e6 call 400025f0 4000765c: 01 00 00 00 nop 40007660: a0 10 00 08 mov %o0, %l0 if ( act->sa_handler == SIG_DFL ) { 40007664: c2 06 60 08 ld [ %i1 + 8 ], %g1 40007668: 80 a0 60 00 cmp %g1, 0 4000766c: 02 80 00 15 be 400076c0 40007670: 90 10 20 01 mov 1, %o0 _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; } else { _POSIX_signals_Clear_process_signals( signo_to_mask(sig) ); 40007674: 40 00 1e a9 call 4000f118 <_POSIX_signals_Clear_process_signals> 40007678: 91 2a 00 1a sll %o0, %i2, %o0 _POSIX_signals_Vectors[ sig ] = *act; 4000767c: da 06 40 00 ld [ %i1 ], %o5 40007680: 85 2e 20 02 sll %i0, 2, %g2 40007684: 83 2e 20 04 sll %i0, 4, %g1 40007688: 07 10 00 7d sethi %hi(0x4001f400), %g3 4000768c: 82 20 40 02 sub %g1, %g2, %g1 40007690: 86 10 e1 64 or %g3, 0x164, %g3 40007694: da 20 c0 01 st %o5, [ %g3 + %g1 ] 40007698: c8 06 60 04 ld [ %i1 + 4 ], %g4 4000769c: 82 00 40 03 add %g1, %g3, %g1 400076a0: c8 20 60 04 st %g4, [ %g1 + 4 ] 400076a4: c4 06 60 08 ld [ %i1 + 8 ], %g2 400076a8: c4 20 60 08 st %g2, [ %g1 + 8 ] } _ISR_Enable( level ); 400076ac: 7f ff eb d5 call 40002600 400076b0: 90 10 00 10 mov %l0, %o0 400076b4: 82 10 20 00 clr %g1 * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; } 400076b8: 81 c7 e0 08 ret 400076bc: 91 e8 00 01 restore %g0, %g1, %o0 * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 400076c0: 85 2e 20 02 sll %i0, 2, %g2 <== NOT EXECUTED 400076c4: 87 2e 20 04 sll %i0, 4, %g3 <== NOT EXECUTED 400076c8: 03 10 00 78 sethi %hi(0x4001e000), %g1 <== NOT EXECUTED 400076cc: 86 20 c0 02 sub %g3, %g2, %g3 <== NOT EXECUTED 400076d0: 82 10 62 0c or %g1, 0x20c, %g1 <== NOT EXECUTED 400076d4: c8 00 40 03 ld [ %g1 + %g3 ], %g4 <== NOT EXECUTED 400076d8: 82 00 c0 01 add %g3, %g1, %g1 <== NOT EXECUTED 400076dc: da 00 60 08 ld [ %g1 + 8 ], %o5 <== NOT EXECUTED 400076e0: d8 00 60 04 ld [ %g1 + 4 ], %o4 <== NOT EXECUTED 400076e4: 05 10 00 7d sethi %hi(0x4001f400), %g2 <== NOT EXECUTED 400076e8: 84 10 a1 64 or %g2, 0x164, %g2 ! 4001f564 <_POSIX_signals_Vectors> <== NOT EXECUTED 400076ec: c8 20 80 03 st %g4, [ %g2 + %g3 ] <== NOT EXECUTED 400076f0: 86 00 c0 02 add %g3, %g2, %g3 <== NOT EXECUTED 400076f4: da 20 e0 08 st %o5, [ %g3 + 8 ] <== NOT EXECUTED 400076f8: 10 bf ff ed b 400076ac <== NOT EXECUTED 400076fc: d8 20 e0 04 st %o4, [ %g3 + 4 ] <== NOT EXECUTED * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007700: 40 00 27 17 call 4001135c <__errno> 40007704: 01 00 00 00 nop 40007708: 82 10 20 16 mov 0x16, %g1 ! 16 4000770c: c2 22 00 00 st %g1, [ %o0 ] 40007710: 10 bf ff ea b 400076b8 40007714: 82 10 3f ff mov -1, %g1 40007a9c : int sigtimedwait( const sigset_t *set, siginfo_t *info, const struct timespec *timeout ) { 40007a9c: 9d e3 bf 88 save %sp, -120, %sp * NOTE: This is very specifically a RELATIVE not ABSOLUTE time * in the Open Group specification. */ interval = 0; if ( timeout ) { 40007aa0: 80 a6 a0 00 cmp %i2, 0 40007aa4: 02 80 00 0c be 40007ad4 40007aa8: a6 10 20 00 clr %l3 if ( !_Timespec_Is_valid( timeout ) ) 40007aac: 40 00 14 a3 call 4000cd38 <_Timespec_Is_valid> 40007ab0: 90 10 00 1a mov %i2, %o0 40007ab4: 80 a2 20 00 cmp %o0, 0 40007ab8: 02 80 00 76 be 40007c90 40007abc: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); 40007ac0: 40 00 14 c5 call 4000cdd4 <_Timespec_To_ticks> 40007ac4: 90 10 00 1a mov %i2, %o0 if ( !interval ) 40007ac8: a6 92 20 00 orcc %o0, 0, %l3 40007acc: 02 80 00 71 be 40007c90 40007ad0: 01 00 00 00 nop /* * Initialize local variables. */ the_info = ( info ) ? info : &signal_information; 40007ad4: 80 a6 60 00 cmp %i1, 0 40007ad8: 02 80 00 03 be 40007ae4 40007adc: a4 07 bf ec add %fp, -20, %l2 40007ae0: a4 10 00 19 mov %i1, %l2 the_thread = _Thread_Executing; 40007ae4: 29 10 00 7e sethi %hi(0x4001f800), %l4 40007ae8: f4 05 20 8c ld [ %l4 + 0x8c ], %i2 ! 4001f88c <_Thread_Executing> * What if they are already pending? */ /* API signals pending? */ _ISR_Disable( level ); 40007aec: 7f ff eb 88 call 4000290c 40007af0: f2 06 a1 70 ld [ %i2 + 0x170 ], %i1 40007af4: a0 10 00 08 mov %o0, %l0 if ( *set & api->signals_pending ) { 40007af8: c4 06 00 00 ld [ %i0 ], %g2 40007afc: c2 06 60 c8 ld [ %i1 + 0xc8 ], %g1 40007b00: 80 88 80 01 btst %g2, %g1 40007b04: 12 80 00 42 bne 40007c0c 40007b08: 01 00 00 00 nop return the_info->si_signo; } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { 40007b0c: 03 10 00 80 sethi %hi(0x40020000), %g1 40007b10: c2 00 60 10 ld [ %g1 + 0x10 ], %g1 ! 40020010 <_POSIX_signals_Pending> 40007b14: 80 88 80 01 btst %g2, %g1 40007b18: 12 80 00 2c bne 40007bc8 40007b1c: 23 10 00 7d sethi %hi(0x4001f400), %l1 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 40007b20: c2 04 63 b0 ld [ %l1 + 0x3b0 ], %g1 ! 4001f7b0 <_Thread_Dispatch_disable_level> the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return signo; } the_info->si_signo = -1; 40007b24: 84 10 3f ff mov -1, %g2 40007b28: 82 00 60 01 inc %g1 40007b2c: c4 24 80 00 st %g2, [ %l2 ] 40007b30: c2 24 63 b0 st %g1, [ %l1 + 0x3b0 ] _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; the_thread->Wait.return_code = EINTR; 40007b34: 82 10 20 04 mov 4, %g1 40007b38: c2 26 a0 34 st %g1, [ %i2 + 0x34 ] the_thread->Wait.option = *set; 40007b3c: c4 06 00 00 ld [ %i0 ], %g2 RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_QUEUE_NOTHING_HAPPENED; 40007b40: 82 10 20 01 mov 1, %g1 the_thread->Wait.return_argument = the_info; 40007b44: e4 26 a0 28 st %l2, [ %i2 + 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; 40007b48: c4 26 a0 30 st %g2, [ %i2 + 0x30 ] } the_info->si_signo = -1; _Thread_Disable_dispatch(); the_thread->Wait.queue = &_POSIX_signals_Wait_queue; 40007b4c: 21 10 00 7f sethi %hi(0x4001fc00), %l0 40007b50: a0 14 23 d0 or %l0, 0x3d0, %l0 ! 4001ffd0 <_POSIX_signals_Wait_queue> 40007b54: e0 26 a0 44 st %l0, [ %i2 + 0x44 ] 40007b58: c2 24 20 30 st %g1, [ %l0 + 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 ); 40007b5c: 7f ff eb 70 call 4000291c 40007b60: 01 00 00 00 nop _Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval ); 40007b64: 90 10 00 10 mov %l0, %o0 40007b68: 92 10 00 13 mov %l3, %o1 40007b6c: 15 10 00 31 sethi %hi(0x4000c400), %o2 40007b70: 40 00 11 86 call 4000c188 <_Thread_queue_Enqueue_with_handler> 40007b74: 94 12 a2 c8 or %o2, 0x2c8, %o2 ! 4000c6c8 <_Thread_queue_Timeout> #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 40007b78: c2 04 63 b0 ld [ %l1 + 0x3b0 ], %g1 40007b7c: 82 00 7f ff add %g1, -1, %g1 40007b80: c2 24 63 b0 st %g1, [ %l1 + 0x3b0 ] 40007b84: c4 04 63 b0 ld [ %l1 + 0x3b0 ], %g2 40007b88: 80 a0 a0 00 cmp %g2, 0 40007b8c: 02 80 00 31 be 40007c50 40007b90: 94 10 00 12 mov %l2, %o2 /* * 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 ); 40007b94: d2 04 80 00 ld [ %l2 ], %o1 <== NOT EXECUTED 40007b98: 96 10 20 00 clr %o3 <== NOT EXECUTED 40007b9c: 98 10 20 00 clr %o4 <== NOT EXECUTED 40007ba0: 40 00 1f 62 call 4000f928 <_POSIX_signals_Clear_signals> <== NOT EXECUTED 40007ba4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED errno = _Thread_Executing->Wait.return_code; 40007ba8: 40 00 27 c4 call 40011ab8 <__errno> <== NOT EXECUTED 40007bac: 01 00 00 00 nop <== NOT EXECUTED 40007bb0: c2 05 20 8c ld [ %l4 + 0x8c ], %g1 <== NOT EXECUTED 40007bb4: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 <== NOT EXECUTED 40007bb8: c4 22 00 00 st %g2, [ %o0 ] <== NOT EXECUTED return the_info->si_signo; 40007bbc: f0 04 80 00 ld [ %l2 ], %i0 <== NOT EXECUTED } 40007bc0: 81 c7 e0 08 ret <== NOT EXECUTED 40007bc4: 81 e8 00 00 restore <== NOT EXECUTED } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40007bc8: 7f ff ff 9a call 40007a30 <_POSIX_signals_Get_highest> 40007bcc: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40007bd0: 94 10 00 12 mov %l2, %o2 } /* Process pending signals? */ if ( *set & _POSIX_signals_Pending ) { signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending ); 40007bd4: b0 10 00 08 mov %o0, %i0 _POSIX_signals_Clear_signals( api, signo, the_info, TRUE, FALSE ); 40007bd8: 96 10 20 01 mov 1, %o3 40007bdc: 90 10 00 19 mov %i1, %o0 40007be0: 92 10 00 18 mov %i0, %o1 40007be4: 40 00 1f 51 call 4000f928 <_POSIX_signals_Clear_signals> 40007be8: 98 10 20 00 clr %o4 _ISR_Enable( level ); 40007bec: 7f ff eb 4c call 4000291c 40007bf0: 90 10 00 10 mov %l0, %o0 the_info->si_signo = signo; the_info->si_code = SI_USER; 40007bf4: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40007bf8: c0 24 a0 08 clr [ %l2 + 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; 40007bfc: f0 24 80 00 st %i0, [ %l2 ] the_info->si_code = SI_USER; 40007c00: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40007c04: 81 c7 e0 08 ret 40007c08: 81 e8 00 00 restore /* 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 ); 40007c0c: 7f ff ff 89 call 40007a30 <_POSIX_signals_Get_highest> 40007c10: 90 10 00 01 mov %g1, %o0 _POSIX_signals_Clear_signals( 40007c14: 94 10 00 12 mov %l2, %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 ); 40007c18: 92 10 00 08 mov %o0, %o1 _POSIX_signals_Clear_signals( 40007c1c: 96 10 20 00 clr %o3 40007c20: 90 10 00 19 mov %i1, %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 ); 40007c24: d2 24 80 00 st %o1, [ %l2 ] _POSIX_signals_Clear_signals( 40007c28: 40 00 1f 40 call 4000f928 <_POSIX_signals_Clear_signals> 40007c2c: 98 10 20 00 clr %o4 the_info->si_signo, the_info, FALSE, FALSE ); _ISR_Enable( level ); 40007c30: 7f ff eb 3b call 4000291c 40007c34: 90 10 00 10 mov %l0, %o0 the_info->si_code = SI_USER; the_info->si_value.sival_int = 0; return the_info->si_signo; 40007c38: f0 04 80 00 ld [ %l2 ], %i0 FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40007c3c: 82 10 20 01 mov 1, %g1 the_info->si_value.sival_int = 0; 40007c40: c0 24 a0 08 clr [ %l2 + 8 ] FALSE, FALSE ); _ISR_Enable( level ); the_info->si_code = SI_USER; 40007c44: c2 24 a0 04 st %g1, [ %l2 + 4 ] 40007c48: 81 c7 e0 08 ret 40007c4c: 81 e8 00 00 restore _Thread_Dispatch(); 40007c50: 40 00 0f de call 4000bbc8 <_Thread_Dispatch> 40007c54: 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 ); 40007c58: d2 04 80 00 ld [ %l2 ], %o1 40007c5c: 94 10 00 12 mov %l2, %o2 40007c60: 96 10 20 00 clr %o3 40007c64: 98 10 20 00 clr %o4 40007c68: 40 00 1f 30 call 4000f928 <_POSIX_signals_Clear_signals> 40007c6c: 90 10 00 19 mov %i1, %o0 errno = _Thread_Executing->Wait.return_code; 40007c70: 40 00 27 92 call 40011ab8 <__errno> 40007c74: 01 00 00 00 nop 40007c78: c2 05 20 8c ld [ %l4 + 0x8c ], %g1 40007c7c: c4 00 60 34 ld [ %g1 + 0x34 ], %g2 40007c80: c4 22 00 00 st %g2, [ %o0 ] return the_info->si_signo; 40007c84: f0 04 80 00 ld [ %l2 ], %i0 } 40007c88: 81 c7 e0 08 ret 40007c8c: 81 e8 00 00 restore rtems_set_errno_and_return_minus_one( EINVAL ); interval = _Timespec_To_ticks( timeout ); if ( !interval ) rtems_set_errno_and_return_minus_one( EINVAL ); 40007c90: 40 00 27 8a call 40011ab8 <__errno> 40007c94: b0 10 3f ff mov -1, %i0 40007c98: 82 10 20 16 mov 0x16, %g1 40007c9c: c2 22 00 00 st %g1, [ %o0 ] 40007ca0: 81 c7 e0 08 ret 40007ca4: 81 e8 00 00 restore 400099e0 : int sigwait( const sigset_t *set, int *sig ) { 400099e0: 9d e3 bf 98 save %sp, -104, %sp int status; status = sigtimedwait( set, NULL, NULL ); 400099e4: 92 10 20 00 clr %o1 400099e8: 90 10 00 18 mov %i0, %o0 400099ec: 7f ff ff 75 call 400097c0 400099f0: 94 10 20 00 clr %o2 if ( status != -1 ) { 400099f4: 80 a2 3f ff cmp %o0, -1 400099f8: 02 80 00 07 be 40009a14 400099fc: 80 a6 60 00 cmp %i1, 0 if ( sig ) 40009a00: 02 80 00 03 be 40009a0c 40009a04: b0 10 20 00 clr %i0 *sig = status; 40009a08: d0 26 40 00 st %o0, [ %i1 ] 40009a0c: 81 c7 e0 08 ret 40009a10: 81 e8 00 00 restore return 0; } return errno; 40009a14: 40 00 27 c5 call 40013928 <__errno> <== NOT EXECUTED 40009a18: 01 00 00 00 nop <== NOT EXECUTED 40009a1c: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED } 40009a20: 81 c7 e0 08 ret <== NOT EXECUTED 40009a24: 81 e8 00 00 restore <== NOT EXECUTED 400051ec : /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 400051ec: 9d e3 bf 98 save %sp, -104, %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)) { 400051f0: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED 400051f4: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED 400051f8: 32 80 00 05 bne,a 4000520c <== NOT EXECUTED 400051fc: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== 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); 40005200: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED 40005204: 7f ff ff 77 call 40004fe0 <== NOT EXECUTED 40005208: 81 e8 00 00 restore <== NOT EXECUTED /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 4000520c: 94 10 20 00 clr %o2 <== NOT EXECUTED 40005210: 40 00 07 46 call 40006f28 <== NOT EXECUTED 40005214: 92 10 20 00 clr %o1 <== NOT EXECUTED i = iproc (c, tty); 40005218: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED 4000521c: 7f ff ff 71 call 40004fe0 <== NOT EXECUTED 40005220: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED 40005224: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 40005228: 40 00 08 0f call 40007264 <== NOT EXECUTED 4000522c: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 40005230: 81 c7 e0 08 ret <== NOT EXECUTED 40005234: 81 e8 00 00 restore <== NOT EXECUTED 40007a00 : int _STAT_NAME( const char *path, struct stat *buf ) { 40007a00: 9d e3 bf 88 save %sp, -120, %sp /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 40007a04: 80 a6 60 00 cmp %i1, 0 40007a08: 02 80 00 32 be 40007ad0 40007a0c: 90 10 00 18 mov %i0, %o0 rtems_set_errno_and_return_minus_one( EFAULT ); status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); 40007a10: a0 07 bf e8 add %fp, -24, %l0 40007a14: 92 10 20 00 clr %o1 40007a18: 94 10 00 10 mov %l0, %o2 40007a1c: 96 10 20 01 mov 1, %o3 40007a20: 7f ff f9 8d call 40006054 40007a24: b0 10 3f ff mov -1, %i0 if ( status != 0 ) 40007a28: 80 a2 20 00 cmp %o0, 0 40007a2c: 12 80 00 27 bne 40007ac8 40007a30: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.handlers->fstat_h ){ 40007a34: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40007a38: 80 a0 60 00 cmp %g1, 0 40007a3c: 02 80 00 2b be 40007ae8 40007a40: 92 10 00 19 mov %i1, %o1 /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 40007a44: c0 26 40 00 clr [ %i1 ] 40007a48: c0 26 60 04 clr [ %i1 + 4 ] 40007a4c: c0 26 60 08 clr [ %i1 + 8 ] 40007a50: c0 26 60 0c clr [ %i1 + 0xc ] 40007a54: c0 26 60 10 clr [ %i1 + 0x10 ] 40007a58: c0 26 60 14 clr [ %i1 + 0x14 ] 40007a5c: c0 26 60 18 clr [ %i1 + 0x18 ] 40007a60: c0 26 60 1c clr [ %i1 + 0x1c ] 40007a64: c0 26 60 20 clr [ %i1 + 0x20 ] 40007a68: c0 26 60 24 clr [ %i1 + 0x24 ] 40007a6c: c0 26 60 28 clr [ %i1 + 0x28 ] 40007a70: c0 26 60 2c clr [ %i1 + 0x2c ] 40007a74: c0 26 60 30 clr [ %i1 + 0x30 ] 40007a78: c0 26 60 34 clr [ %i1 + 0x34 ] 40007a7c: c0 26 60 38 clr [ %i1 + 0x38 ] 40007a80: c0 26 60 3c clr [ %i1 + 0x3c ] 40007a84: c0 26 60 40 clr [ %i1 + 0x40 ] 40007a88: c0 26 60 44 clr [ %i1 + 0x44 ] 40007a8c: c0 26 60 48 clr [ %i1 + 0x48 ] 40007a90: c0 26 60 4c clr [ %i1 + 0x4c ] status = (*loc.handlers->fstat_h)( &loc, buf ); 40007a94: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1 40007a98: 9f c0 40 00 call %g1 40007a9c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 40007aa0: c2 07 bf f0 ld [ %fp + -16 ], %g1 40007aa4: 80 a0 60 00 cmp %g1, 0 40007aa8: 02 80 00 08 be 40007ac8 40007aac: b0 10 00 08 mov %o0, %i0 40007ab0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40007ab4: 80 a0 60 00 cmp %g1, 0 40007ab8: 02 80 00 1a be 40007b20 40007abc: 01 00 00 00 nop 40007ac0: 9f c0 40 00 call %g1 40007ac4: 90 10 00 10 mov %l0, %o0 return status; } 40007ac8: 81 c7 e0 08 ret 40007acc: 81 e8 00 00 restore /* * Check to see if we were passed a valid pointer. */ if ( !buf ) rtems_set_errno_and_return_minus_one( EFAULT ); 40007ad0: 40 00 7e eb call 4002767c <__errno> 40007ad4: b0 10 3f ff mov -1, %i0 40007ad8: 82 10 20 0e mov 0xe, %g1 40007adc: c2 22 00 00 st %g1, [ %o0 ] 40007ae0: 81 c7 e0 08 ret 40007ae4: 81 e8 00 00 restore status = rtems_filesystem_evaluate_path( path, 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) return -1; if ( !loc.handlers->fstat_h ){ rtems_filesystem_freenode( &loc ); 40007ae8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 40007aec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007af0: 02 80 00 08 be 40007b10 <== NOT EXECUTED 40007af4: 01 00 00 00 nop <== NOT EXECUTED 40007af8: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 40007afc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40007b00: 02 80 00 04 be 40007b10 <== NOT EXECUTED 40007b04: 01 00 00 00 nop <== NOT EXECUTED 40007b08: 9f c0 40 00 call %g1 <== NOT EXECUTED 40007b0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40007b10: 40 00 7e db call 4002767c <__errno> <== NOT EXECUTED 40007b14: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40007b18: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40007b1c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40007b20: 81 c7 e0 08 ret <== NOT EXECUTED 40007b24: 81 e8 00 00 restore <== NOT EXECUTED 40006508 : int symlink( const char *actualpath, const char *sympath ) { 40006508: 9d e3 bf 80 save %sp, -128, %sp rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4000650c: c2 4e 40 00 ldsb [ %i1 ], %g1 40006510: 80 a0 60 2f cmp %g1, 0x2f 40006514: 02 80 00 07 be 40006530 40006518: a0 10 00 18 mov %i0, %l0 4000651c: 80 a0 60 5c cmp %g1, 0x5c 40006520: 02 80 00 04 be 40006530 40006524: 80 a0 60 00 cmp %g1, 0 40006528: 12 80 00 2b bne 400065d4 4000652c: 03 10 00 6d sethi %hi(0x4001b400), %g1 40006530: 03 10 00 6d sethi %hi(0x4001b400), %g1 40006534: c6 00 61 58 ld [ %g1 + 0x158 ], %g3 ! 4001b558 40006538: 88 10 20 01 mov 1, %g4 4000653c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1 40006540: c2 27 bf e4 st %g1, [ %fp + -28 ] 40006544: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2 40006548: c4 27 bf e8 st %g2, [ %fp + -24 ] 4000654c: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 40006550: c2 27 bf ec st %g1, [ %fp + -20 ] 40006554: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2 40006558: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 4000655c: c2 07 bf ec ld [ %fp + -20 ], %g1 40006560: 90 06 40 04 add %i1, %g4, %o0 40006564: c4 00 60 04 ld [ %g1 + 4 ], %g2 40006568: b2 07 bf e4 add %fp, -28, %i1 4000656c: 94 07 bf f4 add %fp, -12, %o2 40006570: 92 10 00 19 mov %i1, %o1 40006574: 9f c0 80 00 call %g2 40006578: b0 10 3f ff mov -1, %i0 if ( result != 0 ) 4000657c: 80 a2 20 00 cmp %o0, 0 40006580: 12 80 00 13 bne 400065cc 40006584: c4 07 bf ec ld [ %fp + -20 ], %g2 return -1; if ( !loc.ops->symlink_h ) { 40006588: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1 4000658c: 80 a0 60 00 cmp %g1, 0 40006590: 02 80 00 1c be 40006600 40006594: d4 07 bf f4 ld [ %fp + -12 ], %o2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 40006598: 92 10 00 10 mov %l0, %o1 4000659c: 9f c0 40 00 call %g1 400065a0: 90 10 00 19 mov %i1, %o0 rtems_filesystem_freenode( &loc ); 400065a4: c2 07 bf ec ld [ %fp + -20 ], %g1 400065a8: 80 a0 60 00 cmp %g1, 0 400065ac: 02 80 00 08 be 400065cc 400065b0: b0 10 00 08 mov %o0, %i0 400065b4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400065b8: 80 a0 60 00 cmp %g1, 0 400065bc: 02 80 00 1b be 40006628 400065c0: 01 00 00 00 nop 400065c4: 9f c0 40 00 call %g1 400065c8: 90 10 00 19 mov %i1, %o0 return result; } 400065cc: 81 c7 e0 08 ret 400065d0: 81 e8 00 00 restore rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 400065d4: c6 00 61 58 ld [ %g1 + 0x158 ], %g3 400065d8: 88 10 20 00 clr %g4 400065dc: c2 00 e0 04 ld [ %g3 + 4 ], %g1 400065e0: c2 27 bf e4 st %g1, [ %fp + -28 ] 400065e4: c4 00 e0 08 ld [ %g3 + 8 ], %g2 400065e8: c4 27 bf e8 st %g2, [ %fp + -24 ] 400065ec: c2 00 e0 0c ld [ %g3 + 0xc ], %g1 400065f0: c2 27 bf ec st %g1, [ %fp + -20 ] 400065f4: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2 400065f8: 10 bf ff d9 b 4000655c 400065fc: c4 27 bf f0 st %g2, [ %fp + -16 ] result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); if ( result != 0 ) return -1; if ( !loc.ops->symlink_h ) { rtems_filesystem_freenode( &loc ); 40006600: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED 40006604: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40006608: 02 80 00 04 be 40006618 <== NOT EXECUTED 4000660c: 01 00 00 00 nop <== NOT EXECUTED 40006610: 9f c0 40 00 call %g1 <== NOT EXECUTED 40006614: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40006618: 40 00 32 c5 call 4001312c <__errno> <== NOT EXECUTED 4000661c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006620: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40006624: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006628: 81 c7 e0 08 ret <== NOT EXECUTED 4000662c: 81 e8 00 00 restore <== NOT EXECUTED 40016ab0 : int tcgetattr( int fd, struct termios *tp ) { 40016ab0: 94 10 00 09 mov %o1, %o2 <== NOT EXECUTED return ioctl( fd, RTEMS_IO_GET_ATTRIBUTES, tp ); 40016ab4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED 40016ab8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED 40016abc: 40 00 0f ba call 4001a9a4 <== NOT EXECUTED 40016ac0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED 40016ac4: 01 00 00 00 nop 40016ac8 : int tcsetattr( int fd, int opt, struct termios *tp ) { 40016ac8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED switch (opt) { 40016acc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED 40016ad0: 02 80 00 10 be 40016b10 <== NOT EXECUTED 40016ad4: 80 a6 60 01 cmp %i1, 1 <== NOT EXECUTED 40016ad8: 02 80 00 08 be 40016af8 <== NOT EXECUTED 40016adc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 40016ae0: 40 00 12 5b call 4001b44c <__errno> <== NOT EXECUTED 40016ae4: 01 00 00 00 nop <== NOT EXECUTED 40016ae8: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 40016aec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); } } 40016af0: 81 c7 e0 08 ret <== NOT EXECUTED 40016af4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED switch (opt) { default: rtems_set_errno_and_return_minus_one( ENOTSUP ); case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) 40016af8: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED 40016afc: 40 00 0f aa call 4001a9a4 <== NOT EXECUTED 40016b00: 94 10 20 00 clr %o2 <== NOT EXECUTED 40016b04: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40016b08: 06 bf ff fa bl 40016af0 <== NOT EXECUTED 40016b0c: 01 00 00 00 nop <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); 40016b10: 40 00 0f a5 call 4001a9a4 <== NOT EXECUTED 40016b14: 93 e8 20 02 restore %g0, 2, %o1 <== NOT EXECUTED 40016b18: 01 00 00 00 nop 40006c70 : #include long telldir( DIR *dirp ) { 40006c70: 9d e3 bf 98 save %sp, -104, %sp rtems_libio_t *iop; if ( !dirp ) 40006c74: 80 a6 20 00 cmp %i0, 0 40006c78: 02 80 00 1d be 40006cec 40006c7c: 03 10 00 6a sethi %hi(0x4001a800), %g1 /* * Get the file control block structure associated with the * file descriptor */ iop = rtems_libio_iop( dirp->dd_fd ); 40006c80: f0 06 00 00 ld [ %i0 ], %i0 40006c84: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 40006c88: 80 a6 00 02 cmp %i0, %g2 40006c8c: 1a 80 00 0e bcc 40006cc4 40006c90: 03 10 00 6e sethi %hi(0x4001b800), %g1 40006c94: c6 00 63 34 ld [ %g1 + 0x334 ], %g3 ! 4001bb34 40006c98: 85 2e 20 02 sll %i0, 2, %g2 40006c9c: 83 2e 20 04 sll %i0, 4, %g1 40006ca0: 82 20 40 02 sub %g1, %g2, %g1 40006ca4: 82 00 40 18 add %g1, %i0, %g1 40006ca8: 83 28 60 02 sll %g1, 2, %g1 if (iop == NULL) 40006cac: 82 80 40 03 addcc %g1, %g3, %g1 40006cb0: 02 80 00 06 be 40006cc8 40006cb4: 92 10 20 2c mov 0x2c, %o1 assert(0); return (long)( iop->offset ); 40006cb8: f0 00 60 08 ld [ %g1 + 8 ], %i0 } 40006cbc: 81 c7 e0 08 ret 40006cc0: 81 e8 00 00 restore */ iop = rtems_libio_iop( dirp->dd_fd ); if (iop == NULL) assert(0); 40006cc4: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED 40006cc8: 11 10 00 67 sethi %hi(0x40019c00), %o0 <== NOT EXECUTED 40006ccc: 15 10 00 66 sethi %hi(0x40019800), %o2 <== NOT EXECUTED 40006cd0: 90 12 21 78 or %o0, 0x178, %o0 <== NOT EXECUTED 40006cd4: 7f ff f6 7a call 400046bc <__assert> <== NOT EXECUTED 40006cd8: 94 12 a2 a0 or %o2, 0x2a0, %o2 <== NOT EXECUTED 40006cdc: 82 10 20 00 clr %g1 <== NOT EXECUTED return (long)( iop->offset ); 40006ce0: f0 00 60 08 ld [ %g1 + 8 ], %i0 <== NOT EXECUTED } 40006ce4: 81 c7 e0 08 ret <== NOT EXECUTED 40006ce8: 81 e8 00 00 restore <== NOT EXECUTED ) { rtems_libio_t *iop; if ( !dirp ) rtems_set_errno_and_return_minus_one( EBADF ); 40006cec: 40 00 32 10 call 4001352c <__errno> <== NOT EXECUTED 40006cf0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40006cf4: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 40006cf8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40006cfc: 81 c7 e0 08 ret <== NOT EXECUTED 40006d00: 81 e8 00 00 restore <== NOT EXECUTED 4000cab4 : int timer_create( clockid_t clock_id, struct sigevent *evp, timer_t *timerid ) { 4000cab4: 9d e3 bf 98 save %sp, -104, %sp POSIX_Timer_Control *ptimer; if ( clock_id != CLOCK_REALTIME ) 4000cab8: 80 a6 20 01 cmp %i0, 1 4000cabc: 12 80 00 4a bne 4000cbe4 4000cac0: 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) { 4000cac4: 02 80 00 0e be 4000cafc 4000cac8: 21 10 00 9c sethi %hi(0x40027000), %l0 /* The structure has data */ if ( ( evp->sigev_notify != SIGEV_NONE ) && 4000cacc: c2 06 40 00 ld [ %i1 ], %g1 4000cad0: 82 00 7f ff add %g1, -1, %g1 4000cad4: 80 a0 60 01 cmp %g1, 1 4000cad8: 18 80 00 43 bgu 4000cbe4 4000cadc: 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 ) 4000cae0: c2 06 60 04 ld [ %i1 + 4 ], %g1 4000cae4: 80 a0 60 00 cmp %g1, 0 4000cae8: 02 80 00 3f be 4000cbe4 4000caec: 82 00 7f ff add %g1, -1, %g1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) 4000caf0: 80 a0 60 1f cmp %g1, 0x1f 4000caf4: 18 80 00 3c bgu 4000cbe4 4000caf8: 01 00 00 00 nop rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 4000cafc: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000cb00: 82 00 60 01 inc %g1 4000cb04: c2 24 22 90 st %g1, [ %l0 + 0x290 ] * 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 ); 4000cb08: 31 10 00 9d sethi %hi(0x40027400), %i0 4000cb0c: 40 00 0b bd call 4000fa00 <_Objects_Allocate> 4000cb10: 90 16 22 5c or %i0, 0x25c, %o0 ! 4002765c <_POSIX_Timer_Information> /* * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { 4000cb14: 80 a2 20 00 cmp %o0, 0 4000cb18: 02 80 00 39 be 4000cbfc 4000cb1c: 82 10 20 02 mov 2, %g1 } /* 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; 4000cb20: 05 10 00 9c sethi %hi(0x40027000), %g2 rtems_set_errno_and_return_minus_one( EAGAIN ); } /* The data of the created timer are stored to use them later */ ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; 4000cb24: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ] ptimer->thread_id = _Thread_Executing->Object.id; 4000cb28: c6 00 a3 6c ld [ %g2 + 0x36c ], %g3 if ( evp != NULL ) { 4000cb2c: 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; 4000cb30: c2 00 e0 08 ld [ %g3 + 8 ], %g1 if ( evp != NULL ) { 4000cb34: 02 80 00 08 be 4000cb54 4000cb38: 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; 4000cb3c: 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; 4000cb40: c4 06 40 00 ld [ %i1 ], %g2 ptimer->inf.sigev_signo = evp->sigev_signo; 4000cb44: c6 06 60 04 ld [ %i1 + 4 ], %g3 ptimer->state = POSIX_TIMER_STATE_CREATE_NEW; ptimer->thread_id = _Thread_Executing->Object.id; if ( evp != NULL ) { ptimer->inf.sigev_notify = evp->sigev_notify; 4000cb48: c4 22 20 40 st %g2, [ %o0 + 0x40 ] ptimer->inf.sigev_signo = evp->sigev_signo; 4000cb4c: c6 22 20 44 st %g3, [ %o0 + 0x44 ] ptimer->inf.sigev_value = evp->sigev_value; 4000cb50: c2 22 20 48 st %g1, [ %o0 + 0x48 ] Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000cb54: 88 16 22 5c or %i0, 0x25c, %g4 ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, the_object ); 4000cb58: c6 02 20 08 ld [ %o0 + 8 ], %g3 Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000cb5c: c4 11 20 10 lduh [ %g4 + 0x10 ], %g2 } ptimer->overrun = 0; 4000cb60: c0 22 20 68 clr [ %o0 + 0x68 ] ptimer->timer_data.it_value.tv_sec = 0; 4000cb64: c0 22 20 5c clr [ %o0 + 0x5c ] ptimer->timer_data.it_value.tv_nsec = 0; 4000cb68: c0 22 20 60 clr [ %o0 + 0x60 ] ptimer->timer_data.it_interval.tv_sec = 0; 4000cb6c: c0 22 20 54 clr [ %o0 + 0x54 ] ptimer->timer_data.it_interval.tv_nsec = 0; 4000cb70: c0 22 20 58 clr [ %o0 + 0x58 ] Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000cb74: c0 22 20 18 clr [ %o0 + 0x18 ] the_watchdog->routine = routine; 4000cb78: c0 22 20 2c clr [ %o0 + 0x2c ] the_watchdog->id = id; 4000cb7c: c0 22 20 30 clr [ %o0 + 0x30 ] 4000cb80: 03 00 00 3f sethi %hi(0xfc00), %g1 4000cb84: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff 4000cb88: 82 08 c0 01 and %g3, %g1, %g1 4000cb8c: 80 a0 40 02 cmp %g1, %g2 4000cb90: 18 80 00 05 bgu 4000cba4 4000cb94: c0 22 20 34 clr [ %o0 + 0x34 ] information->local_table[ index ] = the_object; 4000cb98: c4 01 20 20 ld [ %g4 + 0x20 ], %g2 4000cb9c: 83 28 60 02 sll %g1, 2, %g1 4000cba0: d0 20 80 01 st %o0, [ %g2 + %g1 ] _Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL ); _Objects_Open(&_POSIX_Timer_Information, &ptimer->Object, (Objects_Name) 0); *timerid = ptimer->Object.id; 4000cba4: c6 26 80 00 st %g3, [ %i2 ] if ( information->is_string ) /* _Objects_Copy_name_string( name, the_object->name ); */ the_object->name = name; else /* _Objects_Copy_name_raw( name, the_object->name, information->name_length ); */ the_object->name = name; 4000cba8: c0 22 20 0c clr [ %o0 + 0xc ] #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000cbac: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 4000cbb0: b0 10 20 00 clr %i0 4000cbb4: 82 00 7f ff add %g1, -1, %g1 4000cbb8: c2 24 22 90 st %g1, [ %l0 + 0x290 ] 4000cbbc: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 4000cbc0: 80 a0 a0 00 cmp %g2, 0 4000cbc4: 02 80 00 04 be 4000cbd4 4000cbc8: 01 00 00 00 nop _Thread_Enable_dispatch(); return 0; } 4000cbcc: 81 c7 e0 08 ret <== NOT EXECUTED 4000cbd0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000cbd4: 40 00 11 c8 call 400112f4 <_Thread_Dispatch> 4000cbd8: 01 00 00 00 nop 4000cbdc: 81 c7 e0 08 ret 4000cbe0: 81 e8 00 00 restore if ( !evp->sigev_signo ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(evp->sigev_signo) ) rtems_set_errno_and_return_minus_one( EINVAL ); 4000cbe4: 40 00 2a e2 call 4001776c <__errno> <== NOT EXECUTED 4000cbe8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000cbec: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000cbf0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cbf4: 81 c7 e0 08 ret <== NOT EXECUTED 4000cbf8: 81 e8 00 00 restore <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000cbfc: c2 04 22 90 ld [ %l0 + 0x290 ], %g1 <== NOT EXECUTED 4000cc00: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000cc04: c2 24 22 90 st %g1, [ %l0 + 0x290 ] <== NOT EXECUTED 4000cc08: c4 04 22 90 ld [ %l0 + 0x290 ], %g2 <== NOT EXECUTED 4000cc0c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000cc10: 02 80 00 08 be 4000cc30 <== NOT EXECUTED 4000cc14: 01 00 00 00 nop <== NOT EXECUTED * Allocate a timer */ ptimer = _POSIX_Timer_Allocate(); if ( !ptimer ) { _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EAGAIN ); 4000cc18: 40 00 2a d5 call 4001776c <__errno> <== NOT EXECUTED 4000cc1c: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000cc20: 82 10 20 0b mov 0xb, %g1 <== NOT EXECUTED 4000cc24: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000cc28: 81 c7 e0 08 ret <== NOT EXECUTED 4000cc2c: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000cc30: 40 00 11 b1 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000cc34: 01 00 00 00 nop <== NOT EXECUTED 4000cc38: 30 bf ff f8 b,a 4000cc18 <== NOT EXECUTED 4000c9dc : */ int timer_delete( timer_t timerid ) { 4000c9dc: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000c9e0: 21 10 00 9d sethi %hi(0x40027400), %l0 <== NOT EXECUTED 4000c9e4: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000c9e8: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000c9ec: 40 00 0d 56 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c9f0: 90 14 22 5c or %l0, 0x25c, %o0 <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c9f4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c9f8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c9fc: 12 80 00 21 bne 4000ca80 <== NOT EXECUTED 4000ca00: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ca04: a0 14 22 5c or %l0, 0x25c, %l0 <== NOT EXECUTED ) { uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); 4000ca08: c2 02 20 08 ld [ %o0 + 8 ], %g1 <== NOT EXECUTED Objects_Information *information, uint16_t index, Objects_Control *the_object ) { if ( index <= information->maximum ) 4000ca0c: c6 14 20 10 lduh [ %l0 + 0x10 ], %g3 <== NOT EXECUTED 4000ca10: 05 00 00 3f sethi %hi(0xfc00), %g2 <== NOT EXECUTED 4000ca14: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <== NOT EXECUTED 4000ca18: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4000ca1c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4000ca20: 38 80 00 06 bgu,a 4000ca38 <== NOT EXECUTED 4000ca24: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED information->local_table[ index ] = the_object; 4000ca28: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED 4000ca2c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED 4000ca30: c0 20 80 01 clr [ %g2 + %g1 ] <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: _Objects_Close( &_POSIX_Timer_Information, &ptimer->Object ); ptimer->state = POSIX_TIMER_STATE_FREE; 4000ca34: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED uint32_t index; index = _Objects_Get_index( the_object->id ); _Objects_Set_local_object( information, index, NULL ); /* _Objects_Clear_name( the_object->name, information->name_length ); */ the_object->name = 0; 4000ca38: c0 26 20 0c clr [ %i0 + 0xc ] <== NOT EXECUTED 4000ca3c: c2 2e 20 3c stb %g1, [ %i0 + 0x3c ] <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); 4000ca40: 40 00 18 0d call 40012a74 <_Watchdog_Remove> <== NOT EXECUTED 4000ca44: 90 06 20 10 add %i0, 0x10, %o0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE void _POSIX_Timer_Free ( POSIX_Timer_Control *the_timer ) { _Objects_Free( &_POSIX_Timer_Information, &the_timer->Object ); 4000ca48: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000ca4c: 40 00 0c fb call 4000fe38 <_Objects_Free> <== NOT EXECUTED 4000ca50: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ca54: 07 10 00 9c sethi %hi(0x40027000), %g3 <== NOT EXECUTED 4000ca58: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ca5c: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000ca60: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000ca64: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] <== NOT EXECUTED 4000ca68: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 <== NOT EXECUTED 4000ca6c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000ca70: 02 80 00 0d be 4000caa4 <== NOT EXECUTED 4000ca74: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000ca78: 81 c7 e0 08 ret <== NOT EXECUTED 4000ca7c: 81 e8 00 00 restore <== NOT EXECUTED */ POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000ca80: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000ca84: 18 bf ff fd bgu 4000ca78 <== NOT EXECUTED 4000ca88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000ca8c: 40 00 2b 38 call 4001776c <__errno> <== NOT EXECUTED 4000ca90: 01 00 00 00 nop <== NOT EXECUTED 4000ca94: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000ca98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ca9c: 81 c7 e0 08 ret <== NOT EXECUTED 4000caa0: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000caa4: 40 00 12 14 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000caa8: 01 00 00 00 nop <== NOT EXECUTED _POSIX_Timer_Free( ptimer ); _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000caac: 81 c7 e0 08 ret <== NOT EXECUTED 4000cab0: 81 e8 00 00 restore <== NOT EXECUTED 4000c954 : */ int timer_getoverrun( timer_t timerid ) { 4000c954: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED 4000c958: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000c95c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED 4000c960: 90 12 22 5c or %o0, 0x25c, %o0 <== NOT EXECUTED 4000c964: 40 00 0d 78 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c968: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c96c: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c970: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c974: 12 80 00 0e bne 4000c9ac <== NOT EXECUTED 4000c978: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); case OBJECTS_LOCAL: overrun = ptimer->overrun; 4000c97c: f0 02 20 68 ld [ %o0 + 0x68 ], %i0 <== NOT EXECUTED ptimer->overrun = 0; 4000c980: c0 22 20 68 clr [ %o0 + 0x68 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000c984: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000c988: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c98c: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000c990: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000c994: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000c998: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000c99c: 02 80 00 0c be 4000c9cc <== NOT EXECUTED 4000c9a0: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000c9a4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9a8: 81 e8 00 00 restore <== NOT EXECUTED int overrun; POSIX_Timer_Control *ptimer; Objects_Locations location; ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c9ac: 18 bf ff fe bgu 4000c9a4 <== NOT EXECUTED 4000c9b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000c9b4: 40 00 2b 6e call 4001776c <__errno> <== NOT EXECUTED 4000c9b8: 01 00 00 00 nop <== NOT EXECUTED 4000c9bc: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000c9c0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c9c4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9c8: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000c9cc: 40 00 12 4a call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000c9d0: 01 00 00 00 nop <== NOT EXECUTED ptimer->overrun = 0; _Thread_Enable_dispatch(); return overrun; } return -1; /* unreached - only to remove warnings */ } 4000c9d4: 81 c7 e0 08 ret <== NOT EXECUTED 4000c9d8: 81 e8 00 00 restore <== NOT EXECUTED 4000c8a0 : int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000c8a0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED POSIX_Timer_Control *ptimer; Objects_Locations location; struct timespec current_time; /* Reads the current time */ _TOD_Get( ¤t_time ); 4000c8a4: a0 07 bf ec add %fp, -20, %l0 <== NOT EXECUTED 4000c8a8: 40 00 0a 94 call 4000f2f8 <_TOD_Get> <== NOT EXECUTED 4000c8ac: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED int timer_gettime( timer_t timerid, struct itimerspec *value ) { 4000c8b0: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000c8b4: 11 10 00 9d sethi %hi(0x40027400), %o0 <== NOT EXECUTED 4000c8b8: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED 4000c8bc: 40 00 0d a2 call 4000ff44 <_Objects_Get> <== NOT EXECUTED 4000c8c0: 90 12 22 5c or %o0, 0x25c, %o0 <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c8c4: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED 4000c8c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000c8cc: 12 80 00 15 bne 4000c920 <== NOT EXECUTED 4000c8d0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED case OBJECTS_LOCAL: /* Calculates the time left before the timer finishes */ _Timespec_Subtract( 4000c8d4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED 4000c8d8: 90 02 20 5c add %o0, 0x5c, %o0 <== NOT EXECUTED 4000c8dc: 40 00 17 04 call 400124ec <_Timespec_Subtract> <== NOT EXECUTED 4000c8e0: 94 06 60 08 add %i1, 8, %o2 <== NOT EXECUTED &ptimer->timer_data.it_value, ¤t_time, &value->it_value ); value->it_interval = ptimer->timer_data.it_interval; 4000c8e4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1 <== NOT EXECUTED 4000c8e8: c2 26 40 00 st %g1, [ %i1 ] <== NOT EXECUTED 4000c8ec: c4 06 20 58 ld [ %i0 + 0x58 ], %g2 <== NOT EXECUTED 4000c8f0: c4 26 60 04 st %g2, [ %i1 + 4 ] <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000c8f4: 07 10 00 9c sethi %hi(0x40027000), %g3 <== NOT EXECUTED 4000c8f8: c2 00 e2 90 ld [ %g3 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000c8fc: b0 10 20 00 clr %i0 <== NOT EXECUTED 4000c900: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 4000c904: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] <== NOT EXECUTED 4000c908: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2 <== NOT EXECUTED 4000c90c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED 4000c910: 02 80 00 0d be 4000c944 <== NOT EXECUTED 4000c914: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000c918: 81 c7 e0 08 ret <== NOT EXECUTED 4000c91c: 81 e8 00 00 restore <== NOT EXECUTED /* Reads the current time */ _TOD_Get( ¤t_time ); ptimer = _POSIX_Timer_Get( timerid, &location ); switch ( location ) { 4000c920: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED 4000c924: 18 bf ff fd bgu 4000c918 <== NOT EXECUTED 4000c928: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED _Thread_Dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); #endif case OBJECTS_ERROR: rtems_set_errno_and_return_minus_one( EINVAL ); 4000c92c: 40 00 2b 90 call 4001776c <__errno> <== NOT EXECUTED 4000c930: 01 00 00 00 nop <== NOT EXECUTED 4000c934: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 4000c938: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000c93c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c940: 81 e8 00 00 restore <== NOT EXECUTED _Thread_Dispatch(); 4000c944: 40 00 12 6c call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000c948: 01 00 00 00 nop <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } return -1; /* unreached - only to remove warnings */ } 4000c94c: 81 c7 e0 08 ret <== NOT EXECUTED 4000c950: 81 e8 00 00 restore <== NOT EXECUTED 4000cc3c : timer_t timerid, int flags, const struct itimerspec *value, struct itimerspec *ovalue ) { 4000cc3c: 9d e3 bf 90 save %sp, -112, %sp POSIX_Timer_Control *ptimer; Objects_Locations location; boolean activated; if ( value == NULL ) { 4000cc40: 80 a6 a0 00 cmp %i2, 0 4000cc44: 02 80 00 29 be 4000cce8 4000cc48: 92 10 00 18 mov %i0, %o1 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 ) || 4000cc4c: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 4000cc50: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1 4000cc54: 82 10 62 00 or %g1, 0x200, %g1 ! 3b9aca00 4000cc58: 80 a0 80 01 cmp %g2, %g1 4000cc5c: 18 80 00 23 bgu 4000cce8 4000cc60: 80 a6 60 04 cmp %i1, 4 rtems_set_errno_and_return_minus_one( EINVAL ); } /* XXX check for seconds in the past */ if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) { 4000cc64: 02 80 00 04 be 4000cc74 4000cc68: 80 a6 60 00 cmp %i1, 0 4000cc6c: 12 80 00 1f bne 4000cce8 4000cc70: 01 00 00 00 nop RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get ( Objects_Id id, Objects_Locations *location ) { return (POSIX_Timer_Control *) 4000cc74: 11 10 00 9d sethi %hi(0x40027400), %o0 4000cc78: 94 07 bf f4 add %fp, -12, %o2 4000cc7c: 40 00 0c b2 call 4000ff44 <_Objects_Get> 4000cc80: 90 12 22 5c or %o0, 0x25c, %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 ) { 4000cc84: c2 07 bf f4 ld [ %fp + -12 ], %g1 4000cc88: a0 10 00 08 mov %o0, %l0 4000cc8c: 80 a0 60 00 cmp %g1, 0 4000cc90: 12 80 00 1a bne 4000ccf8 4000cc94: b0 10 3f ff mov -1, %i0 case OBJECTS_ERROR: return -1; case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) { 4000cc98: c2 06 a0 08 ld [ %i2 + 8 ], %g1 4000cc9c: 80 a0 60 00 cmp %g1, 0 4000cca0: 12 80 00 06 bne 4000ccb8 4000cca4: 80 a6 60 00 cmp %i1, 0 4000cca8: c2 06 a0 0c ld [ %i2 + 0xc ], %g1 <== NOT EXECUTED 4000ccac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000ccb0: 02 80 00 5d be 4000ce24 <== NOT EXECUTED 4000ccb4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED _Thread_Enable_dispatch(); return 0; } /* absolute or relative? */ switch (flags) { 4000ccb8: 02 80 00 42 be 4000cdc0 4000ccbc: 80 a6 60 04 cmp %i1, 4 4000ccc0: 22 80 00 10 be,a 4000cd00 <== NOT EXECUTED 4000ccc4: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED #if ( CPU_INLINE_ENABLE_DISPATCH == TRUE ) RTEMS_INLINE_ROUTINE void _Thread_Enable_dispatch() { RTEMS_COMPILER_MEMORY_BARRIER(); if ( (--_Thread_Dispatch_disable_level) == 0 ) 4000ccc8: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000cccc: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000ccd0: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ccd4: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000ccd8: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000ccdc: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000cce0: 02 80 00 6d be 4000ce94 <== NOT EXECUTED 4000cce4: 01 00 00 00 nop <== NOT EXECUTED _TOD_Get( &ptimer->time ); _Thread_Enable_dispatch(); return 0; } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); 4000cce8: 40 00 2a a1 call 4001776c <__errno> <== NOT EXECUTED 4000ccec: b0 10 3f ff mov -1, %i0 ! ffffffff <== NOT EXECUTED 4000ccf0: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED 4000ccf4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4000ccf8: 81 c7 e0 08 ret <== NOT EXECUTED 4000ccfc: 81 e8 00 00 restore <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd00: 05 10 00 9c sethi %hi(0x40027000), %g2 <== NOT EXECUTED void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; the_watchdog->id = id; 4000cd04: c2 24 20 30 st %g1, [ %l0 + 0x30 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd08: c6 00 a3 48 ld [ %g2 + 0x348 ], %g3 <== NOT EXECUTED 4000cd0c: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; 4000cd10: c0 24 20 18 clr [ %l0 + 0x18 ] <== NOT EXECUTED Watchdog_Control *the_watchdog, Watchdog_Interval units ) { the_watchdog->initial = units; 4000cd14: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000cd18: c2 24 20 1c st %g1, [ %l0 + 0x1c ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000cd1c: 03 10 00 32 sethi %hi(0x4000c800), %g1 <== NOT EXECUTED 4000cd20: 82 10 60 18 or %g1, 0x18, %g1 ! 4000c818 <_POSIX_Timer_TSR> <== NOT EXECUTED the_watchdog->id = id; the_watchdog->user_data = user_data; 4000cd24: e0 24 20 34 st %l0, [ %l0 + 0x34 ] <== NOT EXECUTED Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; the_watchdog->routine = routine; 4000cd28: c2 24 20 2c st %g1, [ %l0 + 0x2c ] <== NOT EXECUTED ) { the_watchdog->initial = units; _Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog ); 4000cd2c: 11 10 00 9c sethi %hi(0x40027000), %o0 <== NOT EXECUTED 4000cd30: 92 04 20 10 add %l0, 0x10, %o1 <== NOT EXECUTED 4000cd34: 40 00 16 e6 call 400128cc <_Watchdog_Insert> <== NOT EXECUTED 4000cd38: 90 12 23 80 or %o0, 0x380, %o0 <== NOT EXECUTED &ptimer->Timer, value->it_value.tv_sec - _TOD_Seconds_since_epoch ); /* Returns the old ones in "ovalue" */ if ( ovalue ) 4000cd3c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000cd40: 22 80 00 0b be,a 4000cd6c <== NOT EXECUTED 4000cd44: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; 4000cd48: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000cd4c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000cd50: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000cd54: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000cd58: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000cd5c: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000cd60: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000cd64: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED ptimer->timer_data = *value; 4000cd68: c4 06 80 00 ld [ %i2 ], %g2 <== NOT EXECUTED /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; _TOD_Get( &ptimer->time ); 4000cd6c: 90 04 20 6c add %l0, 0x6c, %o0 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000cd70: c4 24 20 54 st %g2, [ %l0 + 0x54 ] 4000cd74: c2 06 a0 04 ld [ %i2 + 4 ], %g1 4000cd78: c2 24 20 58 st %g1, [ %l0 + 0x58 ] 4000cd7c: c4 06 a0 08 ld [ %i2 + 8 ], %g2 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000cd80: 82 10 20 03 mov 3, %g1 /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000cd84: c4 24 20 5c st %g2, [ %l0 + 0x5c ] 4000cd88: c6 06 a0 0c ld [ %i2 + 0xc ], %g3 /* Indicate that the time is running */ ptimer->state = POSIX_TIMER_STATE_CREATE_RUN; 4000cd8c: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] _TOD_Get( &ptimer->time ); 4000cd90: 40 00 09 5a call 4000f2f8 <_TOD_Get> 4000cd94: c6 24 20 60 st %g3, [ %l0 + 0x60 ] 4000cd98: 05 10 00 9c sethi %hi(0x40027000), %g2 4000cd9c: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 40027290 <_Thread_Dispatch_disable_level> 4000cda0: 82 00 7f ff add %g1, -1, %g1 4000cda4: c2 20 a2 90 st %g1, [ %g2 + 0x290 ] 4000cda8: c6 00 a2 90 ld [ %g2 + 0x290 ], %g3 4000cdac: 80 a0 e0 00 cmp %g3, 0 4000cdb0: 02 80 00 19 be 4000ce14 4000cdb4: 01 00 00 00 nop } _Thread_Enable_dispatch(); rtems_set_errno_and_return_minus_one( EINVAL ); } return -1; /* unreached - only to remove warnings */ } 4000cdb8: 81 c7 e0 08 ret <== NOT EXECUTED 4000cdbc: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000cdc0: 40 00 15 e1 call 40012544 <_Timespec_To_ticks> 4000cdc4: 90 06 a0 08 add %i2, 8, %o0 activated = _Watchdog_Insert_ticks_helper( 4000cdc8: d4 04 20 08 ld [ %l0 + 8 ], %o2 break; /* The fire time is relative: use "rtems_time_fire_after" */ case POSIX_TIMER_RELATIVE: /* First, convert from seconds and nanoseconds to ticks */ ptimer->ticks = _Timespec_To_ticks( &value->it_value ); 4000cdcc: 92 10 00 08 mov %o0, %o1 4000cdd0: d0 24 20 64 st %o0, [ %l0 + 0x64 ] activated = _Watchdog_Insert_ticks_helper( 4000cdd4: 17 10 00 32 sethi %hi(0x4000c800), %o3 4000cdd8: 90 04 20 10 add %l0, 0x10, %o0 4000cddc: 96 12 e0 18 or %o3, 0x18, %o3 4000cde0: 7f ff fe 73 call 4000c7ac <_Watchdog_Insert_ticks_helper> 4000cde4: 98 10 00 10 mov %l0, %o4 ptimer->ticks, ptimer->Object.id, _POSIX_Timer_TSR, ptimer ); if ( !activated ) { 4000cde8: 80 a2 20 00 cmp %o0, 0 4000cdec: 12 80 00 26 bne 4000ce84 4000cdf0: 80 a6 e0 00 cmp %i3, 0 4000cdf4: 03 10 00 9c sethi %hi(0x40027000), %g1 <== NOT EXECUTED 4000cdf8: c4 00 62 90 ld [ %g1 + 0x290 ], %g2 ! 40027290 <_Thread_Dispatch_disable_level> <== NOT EXECUTED 4000cdfc: 84 00 bf ff add %g2, -1, %g2 <== NOT EXECUTED 4000ce00: c4 20 62 90 st %g2, [ %g1 + 0x290 ] <== NOT EXECUTED 4000ce04: c6 00 62 90 ld [ %g1 + 0x290 ], %g3 <== NOT EXECUTED 4000ce08: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED 4000ce0c: 32 bf ff bb bne,a 4000ccf8 <== NOT EXECUTED 4000ce10: b0 10 20 00 clr %i0 <== NOT EXECUTED _Thread_Dispatch(); 4000ce14: 40 00 11 38 call 400112f4 <_Thread_Dispatch> 4000ce18: b0 10 20 00 clr %i0 4000ce1c: 81 c7 e0 08 ret 4000ce20: 81 e8 00 00 restore case OBJECTS_LOCAL: /* First, it verifies if the timer must be stopped */ if ( value->it_value.tv_sec == 0 && value->it_value.tv_nsec == 0 ) { /* Stop the timer */ (void) _Watchdog_Remove( &ptimer->Timer ); 4000ce24: 40 00 17 14 call 40012a74 <_Watchdog_Remove> <== NOT EXECUTED 4000ce28: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED /* The old data of the timer are returned */ if ( ovalue ) 4000ce2c: 80 a6 e0 00 cmp %i3, 0 <== NOT EXECUTED 4000ce30: 22 80 00 0b be,a 4000ce5c <== NOT EXECUTED 4000ce34: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; 4000ce38: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED 4000ce3c: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED 4000ce40: c4 04 20 58 ld [ %l0 + 0x58 ], %g2 <== NOT EXECUTED 4000ce44: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED 4000ce48: c2 04 20 5c ld [ %l0 + 0x5c ], %g1 <== NOT EXECUTED 4000ce4c: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED 4000ce50: c4 04 20 60 ld [ %l0 + 0x60 ], %g2 <== NOT EXECUTED 4000ce54: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED /* The new data are set */ ptimer->timer_data = *value; 4000ce58: c2 06 80 00 ld [ %i2 ], %g1 <== NOT EXECUTED 4000ce5c: c2 24 20 54 st %g1, [ %l0 + 0x54 ] <== NOT EXECUTED 4000ce60: c4 06 a0 04 ld [ %i2 + 4 ], %g2 <== NOT EXECUTED 4000ce64: c4 24 20 58 st %g2, [ %l0 + 0x58 ] <== NOT EXECUTED 4000ce68: c2 06 a0 08 ld [ %i2 + 8 ], %g1 <== NOT EXECUTED 4000ce6c: c2 24 20 5c st %g1, [ %l0 + 0x5c ] <== NOT EXECUTED 4000ce70: c4 06 a0 0c ld [ %i2 + 0xc ], %g2 <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000ce74: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED (void) _Watchdog_Remove( &ptimer->Timer ); /* The old data of the timer are returned */ if ( ovalue ) *ovalue = ptimer->timer_data; /* The new data are set */ ptimer->timer_data = *value; 4000ce78: c4 24 20 60 st %g2, [ %l0 + 0x60 ] <== NOT EXECUTED /* Indicates that the timer is created and stopped */ ptimer->state = POSIX_TIMER_STATE_CREATE_STOP; 4000ce7c: 10 bf ff c7 b 4000cd98 <== NOT EXECUTED 4000ce80: c2 2c 20 3c stb %g1, [ %l0 + 0x3c ] <== NOT EXECUTED return 0; } /* The timer has been started and is running */ /* return the old ones in "ovalue" */ if ( ovalue ) 4000ce84: 32 bf ff b2 bne,a 4000cd4c 4000ce88: c2 04 20 54 ld [ %l0 + 0x54 ], %g1 <== NOT EXECUTED *ovalue = ptimer->timer_data; ptimer->timer_data = *value; 4000ce8c: 10 bf ff b8 b 4000cd6c 4000ce90: c4 06 80 00 ld [ %i2 ], %g2 4000ce94: 40 00 11 18 call 400112f4 <_Thread_Dispatch> <== NOT EXECUTED 4000ce98: 01 00 00 00 nop <== NOT EXECUTED 4000ce9c: 30 bf ff 93 b,a 4000cce8 <== NOT EXECUTED 4001af00 : */ char *ttyname( int fd ) { 4001af00: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED if ( !ttyname_r( fd, ttyname_buf, sizeof(ttyname_buf) ) ) 4001af04: 21 10 00 f6 sethi %hi(0x4003d800), %l0 <== NOT EXECUTED 4001af08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001af0c: 94 10 24 06 mov 0x406, %o2 <== NOT EXECUTED 4001af10: 92 14 21 60 or %l0, 0x160, %o1 <== NOT EXECUTED 4001af14: 7f ff ff ba call 4001adfc <== NOT EXECUTED 4001af18: b0 14 21 60 or %l0, 0x160, %i0 <== NOT EXECUTED 4001af1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001af20: 12 80 00 04 bne 4001af30 <== NOT EXECUTED 4001af24: 01 00 00 00 nop <== NOT EXECUTED return ttyname_buf; return NULL; } 4001af28: 81 c7 e0 08 ret <== NOT EXECUTED 4001af2c: 81 e8 00 00 restore <== NOT EXECUTED 4001af30: 81 c7 e0 08 ret <== NOT EXECUTED 4001af34: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED 4001adfc : int ttyname_r( int fd, char *name, int namesize ) { 4001adfc: 9d e3 be d0 save %sp, -304, %sp <== NOT EXECUTED DIR *dp; struct stat dsb; char *rval; /* Must be a terminal. */ if (tcgetattr (fd, &tty) < 0) 4001ae00: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001ae04: 7f ff ff e3 call 4001ad90 <== NOT EXECUTED 4001ae08: 92 07 bf d4 add %fp, -44, %o1 <== NOT EXECUTED 4001ae0c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001ae10: 06 80 00 0d bl 4001ae44 <== NOT EXECUTED 4001ae14: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) 4001ae18: 40 00 28 79 call 40024ffc <== NOT EXECUTED 4001ae1c: 92 07 bf 80 add %fp, -128, %o1 <== NOT EXECUTED 4001ae20: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001ae24: 12 80 00 08 bne 4001ae44 <== NOT EXECUTED 4001ae28: c2 17 bf 8c lduh [ %fp + -116 ], %g1 <== NOT EXECUTED 4001ae2c: 05 00 00 3c sethi %hi(0xf000), %g2 <== NOT EXECUTED 4001ae30: 07 00 00 08 sethi %hi(0x2000), %g3 <== NOT EXECUTED 4001ae34: 82 08 40 02 and %g1, %g2, %g1 <== NOT EXECUTED 4001ae38: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED 4001ae3c: 02 80 00 08 be 4001ae5c <== NOT EXECUTED 4001ae40: 11 10 00 e9 sethi %hi(0x4003a400), %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) rtems_set_errno_and_return_minus_one(EBADF); 4001ae44: 40 00 32 0e call 4002767c <__errno> <== NOT EXECUTED 4001ae48: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001ae4c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED 4001ae50: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001ae54: 81 c7 e0 08 ret <== NOT EXECUTED 4001ae58: 81 e8 00 00 restore <== NOT EXECUTED for (rval = NULL; (dirp = readdir (dp)) != NULL ;) { if (dirp->d_ino != sb.st_ino) continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 4001ae5c: a0 06 60 05 add %i1, 5, %l0 <== NOT EXECUTED /* Must be a character device. */ if (fstat (fd, &sb) || !S_ISCHR (sb.st_mode)) rtems_set_errno_and_return_minus_one(EBADF); if ((dp = opendir (_PATH_DEV)) == NULL) 4001ae60: 90 12 23 00 or %o0, 0x300, %o0 <== NOT EXECUTED 4001ae64: 7f ff fe 7b call 4001a850 <== NOT EXECUTED 4001ae68: a2 07 bf 30 add %fp, -208, %l1 <== NOT EXECUTED 4001ae6c: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED 4001ae70: 02 bf ff f5 be 4001ae44 <== NOT EXECUTED 4001ae74: 01 00 00 00 nop <== NOT EXECUTED rtems_set_errno_and_return_minus_one(EBADF); for (rval = NULL; (dirp = readdir (dp)) != NULL ;) 4001ae78: 7f ff ff 38 call 4001ab58 <== NOT EXECUTED 4001ae7c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001ae80: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001ae84: 02 80 00 1a be 4001aeec <== NOT EXECUTED 4001ae88: c2 07 bf 88 ld [ %fp + -120 ], %g1 <== NOT EXECUTED { if (dirp->d_ino != sb.st_ino) 4001ae8c: c4 02 00 00 ld [ %o0 ], %g2 <== NOT EXECUTED 4001ae90: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001ae94: 12 bf ff f9 bne 4001ae78 <== NOT EXECUTED 4001ae98: 92 02 20 0c add %o0, 0xc, %o1 <== NOT EXECUTED continue; strcpy (name + sizeof (_PATH_DEV) - 1, dirp->d_name); 4001ae9c: 40 00 40 fe call 4002b294 <== NOT EXECUTED 4001aea0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED if (stat (name, &dsb) || sb.st_dev != dsb.st_dev || 4001aea4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED 4001aea8: 7f ff b2 d6 call 40007a00 <== NOT EXECUTED 4001aeac: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED 4001aeb0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4001aeb4: 12 bf ff f1 bne 4001ae78 <== NOT EXECUTED 4001aeb8: c4 07 bf 80 ld [ %fp + -128 ], %g2 <== NOT EXECUTED 4001aebc: c2 07 bf 30 ld [ %fp + -208 ], %g1 <== NOT EXECUTED 4001aec0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001aec4: 12 bf ff ed bne 4001ae78 <== NOT EXECUTED 4001aec8: c4 07 bf 84 ld [ %fp + -124 ], %g2 <== NOT EXECUTED 4001aecc: c2 07 bf 34 ld [ %fp + -204 ], %g1 <== NOT EXECUTED 4001aed0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001aed4: 12 bf ff e9 bne 4001ae78 <== NOT EXECUTED 4001aed8: c4 07 bf 88 ld [ %fp + -120 ], %g2 <== NOT EXECUTED 4001aedc: c2 07 bf 38 ld [ %fp + -200 ], %g1 <== NOT EXECUTED 4001aee0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED 4001aee4: 12 bf ff e5 bne 4001ae78 <== NOT EXECUTED 4001aee8: 01 00 00 00 nop <== NOT EXECUTED sb.st_ino != dsb.st_ino) continue; rval = name; break; } (void) closedir (dp); 4001aeec: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4001aef0: 7f ff f9 83 call 400194fc <== NOT EXECUTED 4001aef4: b0 10 20 00 clr %i0 <== NOT EXECUTED return 0; } 4001aef8: 81 c7 e0 08 ret <== NOT EXECUTED 4001aefc: 81 e8 00 00 restore <== NOT EXECUTED 4001af54 : #include int unlink( const char *path ) { 4001af54: 9d e3 bf 88 save %sp, -120, %sp /* * Get the node to be unlinked. */ result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); 4001af58: 92 10 20 00 clr %o1 4001af5c: 90 10 00 18 mov %i0, %o0 4001af60: a0 07 bf e8 add %fp, -24, %l0 4001af64: 96 10 20 00 clr %o3 4001af68: 7f ff ac 3b call 40006054 4001af6c: 94 10 00 10 mov %l0, %o2 if ( result != 0 ) 4001af70: 80 a2 20 00 cmp %o0, 0 4001af74: 02 80 00 04 be 4001af84 4001af78: 90 10 20 02 mov 2, %o0 result = (*loc.ops->unlink_h)( &loc ); rtems_filesystem_freenode( &loc ); return result; } 4001af7c: 81 c7 e0 08 ret 4001af80: 91 e8 3f ff restore %g0, -1, %o0 result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); 4001af84: 7f ff ac 04 call 40005f94 4001af88: 92 10 00 10 mov %l0, %o1 if (result != 0 && errno != ENOTSUP) { 4001af8c: 80 a2 20 00 cmp %o0, 0 4001af90: 12 80 00 1d bne 4001b004 4001af94: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); return -1; } if ( !loc.ops->node_type_h ) { 4001af98: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 4001af9c: 80 a0 60 00 cmp %g1, 0 4001afa0: 22 80 00 2b be,a 4001b04c 4001afa4: 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_DIRECTORY ) { 4001afa8: 9f c0 40 00 call %g1 4001afac: 90 10 00 10 mov %l0, %o0 4001afb0: 80 a2 20 01 cmp %o0, 1 4001afb4: 02 80 00 31 be 4001b078 4001afb8: c4 07 bf f0 ld [ %fp + -16 ], %g2 rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { 4001afbc: c2 00 a0 0c ld [ %g2 + 0xc ], %g1 4001afc0: 80 a0 60 00 cmp %g1, 0 4001afc4: 22 80 00 22 be,a 4001b04c 4001afc8: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->unlink_h)( &loc ); 4001afcc: 9f c0 40 00 call %g1 4001afd0: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &loc ); 4001afd4: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001afd8: 80 a0 60 00 cmp %g1, 0 4001afdc: 02 80 00 08 be 4001affc 4001afe0: b0 10 00 08 mov %o0, %i0 4001afe4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001afe8: 80 a0 60 00 cmp %g1, 0 4001afec: 02 80 00 31 be 4001b0b0 4001aff0: 01 00 00 00 nop 4001aff4: 9f c0 40 00 call %g1 4001aff8: 90 10 00 10 mov %l0, %o0 4001affc: 81 c7 e0 08 ret 4001b000: 81 e8 00 00 restore result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE ); if ( result != 0 ) return -1; result = rtems_filesystem_evaluate_parent(RTEMS_LIBIO_PERMS_WRITE, &loc ); if (result != 0 && errno != ENOTSUP) { 4001b004: 40 00 31 9e call 4002767c <__errno> <== NOT EXECUTED 4001b008: 01 00 00 00 nop <== NOT EXECUTED 4001b00c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED 4001b010: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED 4001b014: 02 bf ff e1 be 4001af98 <== NOT EXECUTED 4001b018: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 4001b01c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED 4001b020: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b024: 02 bf ff f6 be 4001affc <== NOT EXECUTED 4001b028: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b02c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED 4001b030: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b034: 02 bf ff f2 be 4001affc <== NOT EXECUTED 4001b038: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4001b03c: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001b040: 01 00 00 00 nop <== NOT EXECUTED 4001b044: 81 c7 e0 08 ret <== NOT EXECUTED 4001b048: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( EISDIR ); } if ( !loc.ops->unlink_h ) { rtems_filesystem_freenode( &loc ); 4001b04c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4001b050: 02 80 00 04 be 4001b060 <== NOT EXECUTED 4001b054: 01 00 00 00 nop <== NOT EXECUTED 4001b058: 9f c0 40 00 call %g1 <== NOT EXECUTED 4001b05c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4001b060: 40 00 31 87 call 4002767c <__errno> <== NOT EXECUTED 4001b064: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4001b068: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 4001b06c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 4001b070: 81 c7 e0 08 ret <== NOT EXECUTED 4001b074: 81 e8 00 00 restore <== NOT EXECUTED rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { rtems_filesystem_freenode( &loc ); 4001b078: c2 07 bf f0 ld [ %fp + -16 ], %g1 4001b07c: 80 a0 60 00 cmp %g1, 0 4001b080: 02 80 00 08 be 4001b0a0 4001b084: 01 00 00 00 nop 4001b088: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 4001b08c: 80 a0 60 00 cmp %g1, 0 4001b090: 02 80 00 04 be 4001b0a0 4001b094: 01 00 00 00 nop 4001b098: 9f c0 40 00 call %g1 4001b09c: 90 10 00 10 mov %l0, %o0 rtems_set_errno_and_return_minus_one( EISDIR ); 4001b0a0: 40 00 31 77 call 4002767c <__errno> 4001b0a4: b0 10 3f ff mov -1, %i0 4001b0a8: 82 10 20 15 mov 0x15, %g1 4001b0ac: c2 22 00 00 st %g1, [ %o0 ] 4001b0b0: 81 c7 e0 08 ret 4001b0b4: 81 e8 00 00 restore 40008688 : */ int unmount( const char *path ) { 40008688: 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, 0x0, &loc, TRUE ) ) 4000868c: 92 10 20 00 clr %o1 40008690: a2 07 bf e8 add %fp, -24, %l1 40008694: 90 10 00 18 mov %i0, %o0 40008698: 94 10 00 11 mov %l1, %o2 4000869c: 7f ff f0 51 call 400047e0 400086a0: 96 10 20 01 mov 1, %o3 400086a4: 80 a2 20 00 cmp %o0, 0 400086a8: 02 80 00 04 be 400086b8 400086ac: e0 07 bf f4 ld [ %fp + -12 ], %l0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 400086b0: 81 c7 e0 08 ret 400086b4: 91 e8 3f ff restore %g0, -1, %o0 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 400086b8: 92 10 00 11 mov %l1, %o1 if ( rtems_filesystem_evaluate_path( 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; 400086bc: a4 04 20 18 add %l0, 0x18, %l2 /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ 400086c0: 7f ff ff d3 call 4000860c 400086c4: 90 10 00 12 mov %l2, %o0 400086c8: 80 a2 20 00 cmp %o0, 0 400086cc: 02 80 00 4a be 400087f4 400086d0: c2 07 bf f0 ld [ %fp + -16 ], %g1 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 400086d4: 80 a0 60 00 cmp %g1, 0 400086d8: 22 80 00 09 be,a 400086fc 400086dc: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 400086e0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400086e4: 80 a0 60 00 cmp %g1, 0 400086e8: 22 80 00 05 be,a 400086fc 400086ec: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 <== NOT EXECUTED 400086f0: 9f c0 40 00 call %g1 400086f4: 90 10 00 11 mov %l1, %o0 /* * Verify Unmount is supported by both filesystems. */ if ( !fs_mount_loc->ops->unmount_h ) 400086f8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400086fc: c4 00 60 28 ld [ %g1 + 0x28 ], %g2 40008700: 80 a0 a0 00 cmp %g2, 0 40008704: 02 80 00 55 be 40008858 40008708: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) 4000870c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 40008710: c4 00 60 2c ld [ %g1 + 0x2c ], %g2 40008714: 80 a0 a0 00 cmp %g2, 0 40008718: 02 80 00 50 be 40008858 4000871c: 03 10 00 6d sethi %hi(0x4001b400), %g1 * 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 ) 40008720: c4 00 61 58 ld [ %g1 + 0x158 ], %g2 ! 4001b558 40008724: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3 40008728: 80 a0 c0 10 cmp %g3, %l0 4000872c: 02 80 00 2c be 400087dc 40008730: 90 10 00 18 mov %i0, %o0 /* * Verify there are no file systems below the path specified */ if ( file_systems_below_this_mountpoint( path, fs_root_loc, mt_entry ) != 0 ) 40008734: 92 10 00 12 mov %l2, %o1 40008738: 7f ff ff bb call 40008624 4000873c: 94 10 00 10 mov %l0, %o2 40008740: 80 a2 20 00 cmp %o0, 0 40008744: 12 80 00 26 bne 400087dc 40008748: 01 00 00 00 nop * 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 ) 4000874c: 7f ff f1 14 call 40004b9c 40008750: 90 10 00 10 mov %l0, %o0 40008754: 80 a2 20 01 cmp %o0, 1 40008758: 02 80 00 21 be 400087dc 4000875c: 01 00 00 00 nop * 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 ) 40008760: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 40008764: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1 40008768: 9f c0 40 00 call %g1 4000876c: 90 10 00 10 mov %l0, %o0 40008770: 80 a2 20 00 cmp %o0, 0 40008774: 12 bf ff cf bne 400086b0 40008778: 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){ 4000877c: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 40008780: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1 40008784: 9f c0 40 00 call %g1 40008788: 90 10 00 10 mov %l0, %o0 4000878c: 80 a2 20 00 cmp %o0, 0 40008790: 32 80 00 28 bne,a 40008830 40008794: c4 04 20 10 ld [ %l0 + 0x10 ], %g2 <== NOT EXECUTED /* * Extract the mount table entry from the chain */ Chain_Extract( ( Chain_Node * ) mt_entry ); 40008798: 40 00 06 f3 call 4000a364 <_Chain_Extract> 4000879c: 90 10 00 10 mov %l0, %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 ); 400087a0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1 400087a4: 80 a0 60 00 cmp %g1, 0 400087a8: 02 80 00 09 be 400087cc 400087ac: 90 10 00 10 mov %l0, %o0 400087b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 400087b4: 80 a0 60 00 cmp %g1, 0 400087b8: 02 80 00 05 be 400087cc 400087bc: 01 00 00 00 nop 400087c0: 9f c0 40 00 call %g1 400087c4: 90 04 20 08 add %l0, 8, %o0 free( mt_entry ); 400087c8: 90 10 00 10 mov %l0, %o0 400087cc: 7f ff f2 25 call 40005060 400087d0: b0 10 20 00 clr %i0 400087d4: 81 c7 e0 08 ret 400087d8: 81 e8 00 00 restore * descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY ); 400087dc: 40 00 2a 54 call 4001312c <__errno> 400087e0: b0 10 3f ff mov -1, %i0 400087e4: 82 10 20 10 mov 0x10, %g1 400087e8: c2 22 00 00 st %g1, [ %o0 ] 400087ec: 81 c7 e0 08 ret 400087f0: 81 e8 00 00 restore /* * 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 ); 400087f4: 80 a0 60 00 cmp %g1, 0 400087f8: 02 80 00 08 be 40008818 400087fc: 01 00 00 00 nop 40008800: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008804: 80 a0 60 00 cmp %g1, 0 40008808: 02 80 00 04 be 40008818 4000880c: 01 00 00 00 nop 40008810: 9f c0 40 00 call %g1 40008814: 90 10 00 11 mov %l1, %o0 rtems_set_errno_and_return_minus_one( EACCES ); 40008818: 40 00 2a 45 call 4001312c <__errno> 4000881c: b0 10 3f ff mov -1, %i0 40008820: 82 10 20 0d mov 0xd, %g1 40008824: c2 22 00 00 st %g1, [ %o0 ] 40008828: 81 c7 e0 08 ret 4000882c: 81 e8 00 00 restore * This was response was questionable but the best we could * come up with. */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 40008830: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED 40008834: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008838: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED 4000883c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40008840: 02 bf ff 9c be 400086b0 <== NOT EXECUTED 40008844: 90 10 20 00 clr %o0 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 40008848: 40 00 05 e5 call 40009fdc <== NOT EXECUTED 4000884c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008850: 81 c7 e0 08 ret <== NOT EXECUTED 40008854: 81 e8 00 00 restore <== NOT EXECUTED if ( !fs_mount_loc->ops->unmount_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( !fs_root_loc->ops->fsunmount_me_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008858: 40 00 2a 35 call 4001312c <__errno> <== NOT EXECUTED 4000885c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 40008860: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008864: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008868: 81 c7 e0 08 ret <== NOT EXECUTED 4000886c: 81 e8 00 00 restore <== NOT EXECUTED 4000d0f0 : int usleep( useconds_t useconds ) { 4000d0f0: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4000d0f4: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED 4000d0f8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d0fc: 7f ff d1 be call 400017f4 <.udiv> <== NOT EXECUTED 4000d100: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d104: 92 14 22 40 or %l0, 0x240, %o1 <== NOT EXECUTED { struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; 4000d108: d0 27 bf f0 st %o0, [ %fp + -16 ] <== NOT EXECUTED tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d10c: 40 00 5e af call 40024bc8 <.urem> <== NOT EXECUTED 4000d110: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 4000d114: 85 2a 20 02 sll %o0, 2, %g2 <== NOT EXECUTED 4000d118: 83 2a 20 07 sll %o0, 7, %g1 <== NOT EXECUTED 4000d11c: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED 4000d120: 82 00 40 08 add %g1, %o0, %g1 <== NOT EXECUTED 4000d124: 83 28 60 03 sll %g1, 3, %g1 <== NOT EXECUTED nanosleep( &tp, &tm ); 4000d128: 92 07 bf e8 add %fp, -24, %o1 <== NOT EXECUTED struct timespec tp; struct timespec tm; unsigned remaining; tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND; tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000; 4000d12c: c2 27 bf f4 st %g1, [ %fp + -12 ] <== NOT EXECUTED nanosleep( &tp, &tm ); 4000d130: 40 00 26 b5 call 40016c04 <== NOT EXECUTED 4000d134: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED remaining = tm.tv_sec * TOD_MICROSECONDS_PER_SECOND; 4000d138: c4 07 bf e8 ld [ %fp + -24 ], %g2 <== NOT EXECUTED 4000d13c: d0 07 bf ec ld [ %fp + -20 ], %o0 <== NOT EXECUTED 4000d140: 87 28 a0 03 sll %g2, 3, %g3 <== NOT EXECUTED 4000d144: 83 28 a0 08 sll %g2, 8, %g1 <== NOT EXECUTED 4000d148: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED 4000d14c: 92 10 23 e8 mov 0x3e8, %o1 <== NOT EXECUTED 4000d150: b1 28 60 06 sll %g1, 6, %i0 <== NOT EXECUTED 4000d154: b0 26 00 01 sub %i0, %g1, %i0 <== NOT EXECUTED 4000d158: 7f ff d1 a9 call 400017fc <.div> <== NOT EXECUTED 4000d15c: b0 06 00 02 add %i0, %g2, %i0 <== NOT EXECUTED 4000d160: b1 2e 20 06 sll %i0, 6, %i0 <== NOT EXECUTED remaining += tm.tv_nsec / 1000; return remaining; /* seconds remaining */ } 4000d164: 81 c7 e0 08 ret <== NOT EXECUTED 4000d168: 91 ea 00 18 restore %o0, %i0, %o0 <== NOT EXECUTED 400080e4 : int utime( const char *path, const struct utimbuf *times ) { 400080e4: 9d e3 bf 88 save %sp, -120, %sp rtems_filesystem_location_info_t temp_loc; int result; if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) 400080e8: 92 10 20 00 clr %o1 400080ec: 90 10 00 18 mov %i0, %o0 400080f0: a0 07 bf e8 add %fp, -24, %l0 400080f4: 96 10 20 01 mov 1, %o3 400080f8: 94 10 00 10 mov %l0, %o2 400080fc: 7f ff f0 18 call 4000415c 40008100: b0 10 3f ff mov -1, %i0 40008104: 80 a2 20 00 cmp %o0, 0 40008108: 12 80 00 14 bne 40008158 4000810c: c4 07 bf f0 ld [ %fp + -16 ], %g2 return -1; if ( !temp_loc.ops->utime_h ){ 40008110: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 40008114: 80 a0 60 00 cmp %g1, 0 40008118: 22 80 00 12 be,a 40008160 4000811c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED rtems_filesystem_freenode( &temp_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 40008120: d4 06 60 04 ld [ %i1 + 4 ], %o2 40008124: d2 06 40 00 ld [ %i1 ], %o1 40008128: 9f c0 40 00 call %g1 4000812c: 90 10 00 10 mov %l0, %o0 rtems_filesystem_freenode( &temp_loc ); 40008130: c2 07 bf f0 ld [ %fp + -16 ], %g1 40008134: 80 a0 60 00 cmp %g1, 0 40008138: 02 80 00 08 be 40008158 4000813c: b0 10 00 08 mov %o0, %i0 40008140: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 40008144: 80 a0 60 00 cmp %g1, 0 40008148: 02 80 00 0f be 40008184 4000814c: 01 00 00 00 nop 40008150: 9f c0 40 00 call %g1 40008154: 90 10 00 10 mov %l0, %o0 return result; } 40008158: 81 c7 e0 08 ret 4000815c: 81 e8 00 00 restore if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) ) return -1; if ( !temp_loc.ops->utime_h ){ rtems_filesystem_freenode( &temp_loc ); 40008160: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40008164: 02 80 00 04 be 40008174 <== NOT EXECUTED 40008168: 01 00 00 00 nop <== NOT EXECUTED 4000816c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40008170: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 40008174: 40 00 2a 7e call 40012b6c <__errno> <== NOT EXECUTED 40008178: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED 4000817c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED 40008180: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40008184: 81 c7 e0 08 ret <== NOT EXECUTED 40008188: 81 e8 00 00 restore <== NOT EXECUTED 400040f4 : | Arguments: as in printf: fmt - format string, ... - unnamed arguments. | Returns: Nothing. +--------------------------------------------------------------------------*/ void vprintk(const char *fmt, va_list ap) { 400040f4: 9d e3 bf 80 save %sp, -128, %sp char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400040f8: d0 0e 00 00 ldub [ %i0 ], %o0 400040fc: 91 2a 20 18 sll %o0, 0x18, %o0 40004100: 80 a2 20 00 cmp %o0, 0 40004104: 02 80 00 3a be 400041ec 40004108: 03 10 00 10 sethi %hi(0x40004000), %g1 4000410c: 05 10 00 67 sethi %hi(0x40019c00), %g2 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40004110: b4 10 60 20 or %g1, 0x20, %i2 40004114: b8 10 a2 88 or %g2, 0x288, %i4 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40004118: 3b 10 00 6a sethi %hi(0x4001a800), %i5 4000411c: ac 07 bf e4 add %fp, -28, %l6 lflag = 0; base = 0; sign = 0; width = 0; lead = ' '; if (*fmt == '%') 40004120: 91 3a 20 18 sra %o0, 0x18, %o0 40004124: 80 a2 20 25 cmp %o0, 0x25 40004128: 12 80 00 33 bne 400041f4 4000412c: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 { fmt++; 40004130: b0 06 20 01 inc %i0 if (*fmt == '0' ) { 40004134: d0 0e 00 00 ldub [ %i0 ], %o0 40004138: 87 2a 20 18 sll %o0, 0x18, %g3 4000413c: 83 38 e0 18 sra %g3, 0x18, %g1 40004140: 80 a0 60 30 cmp %g1, 0x30 40004144: 02 80 00 97 be 400043a0 40004148: b6 10 20 20 mov 0x20, %i3 lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4000414c: 82 02 3f d0 add %o0, -48, %g1 40004150: 82 08 60 ff and %g1, 0xff, %g1 40004154: 80 a0 60 09 cmp %g1, 9 40004158: 08 80 00 05 bleu 4000416c 4000415c: aa 10 20 00 clr %l5 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') 40004160: 10 80 00 11 b 400041a4 40004164: 83 38 e0 18 sra %g3, 0x18, %g1 40004168: 87 2a 20 18 sll %o0, 0x18, %g3 <== NOT EXECUTED fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { width *= 10; width += (*fmt - '0'); fmt++; 4000416c: b0 06 20 01 inc %i0 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004170: d0 0e 00 00 ldub [ %i0 ], %o0 width *= 10; width += (*fmt - '0'); 40004174: 85 2d 60 03 sll %l5, 3, %g2 40004178: 83 2d 60 01 sll %l5, 1, %g1 4000417c: 87 38 e0 18 sra %g3, 0x18, %g3 40004180: 82 00 40 02 add %g1, %g2, %g1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 40004184: 84 02 3f d0 add %o0, -48, %g2 width *= 10; width += (*fmt - '0'); 40004188: 82 00 40 03 add %g1, %g3, %g1 fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; } while (*fmt >= '0' && *fmt <= '9' ) { 4000418c: 84 08 a0 ff and %g2, 0xff, %g2 40004190: 80 a0 a0 09 cmp %g2, 9 40004194: 08 bf ff f5 bleu 40004168 40004198: aa 00 7f d0 add %g1, -48, %l5 4000419c: 87 2a 20 18 sll %o0, 0x18, %g3 width *= 10; width += (*fmt - '0'); fmt++; } if ((c = *fmt) == 'l') 400041a0: 83 38 e0 18 sra %g3, 0x18, %g1 400041a4: 80 a0 60 6c cmp %g1, 0x6c 400041a8: 22 80 00 83 be,a 400043b4 400041ac: b0 06 20 01 inc %i0 { lflag = 1; c = *++fmt; } switch (c) 400041b0: 82 02 3f bc add %o0, -68, %g1 400041b4: 82 08 60 ff and %g1, 0xff, %g1 400041b8: 80 a0 60 34 cmp %g1, 0x34 400041bc: 08 80 00 12 bleu 40004204 400041c0: 83 28 60 02 sll %g1, 2, %g1 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 400041c4: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 <== NOT EXECUTED 400041c8: 91 2a 20 18 sll %o0, 0x18, %o0 <== NOT EXECUTED 400041cc: 9f c0 40 00 call %g1 <== NOT EXECUTED 400041d0: 91 3a 20 18 sra %o0, 0x18, %o0 <== NOT EXECUTED vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400041d4: b0 06 20 01 inc %i0 <== NOT EXECUTED 400041d8: d0 0e 00 00 ldub [ %i0 ], %o0 400041dc: 91 2a 20 18 sll %o0, 0x18, %o0 400041e0: 80 a2 20 00 cmp %o0, 0 400041e4: 12 bf ff d0 bne 40004124 400041e8: 91 3a 20 18 sra %o0, 0x18, %o0 400041ec: 81 c7 e0 08 ret 400041f0: 81 e8 00 00 restore printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), base, sign, width, lead); } else { BSP_output_char(*fmt); 400041f4: 9f c0 40 00 call %g1 400041f8: b0 06 20 01 inc %i0 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 400041fc: 10 bf ff f8 b 400041dc 40004200: d0 0e 00 00 ldub [ %i0 ], %o0 if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40004204: c4 06 80 01 ld [ %i2 + %g1 ], %g2 40004208: 81 c0 80 00 jmp %g2 4000420c: 01 00 00 00 nop case 'd': case 'D': base = 10; sign = 1; break; case 'u': case 'U': base = 10; sign = 0; break; case 'x': case 'X': base = 16; sign = 0; break; case 'p': base = 16; sign = 0; break; case 's': for (str = va_arg(ap, char *); *str; str++) 40004210: e0 06 40 00 ld [ %i1 ], %l0 40004214: d0 0c 00 00 ldub [ %l0 ], %o0 40004218: 91 2a 20 18 sll %o0, 0x18, %o0 4000421c: 80 a2 20 00 cmp %o0, 0 40004220: 02 bf ff ed be 400041d4 40004224: b2 06 60 04 add %i1, 4, %i1 BSP_output_char(*str); 40004228: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 4000422c: 9f c0 40 00 call %g1 40004230: 91 3a 20 18 sra %o0, 0x18, %o0 case 'd': case 'D': base = 10; sign = 1; break; case 'u': case 'U': base = 10; sign = 0; break; case 'x': case 'X': base = 16; sign = 0; break; case 'p': base = 16; sign = 0; break; case 's': for (str = va_arg(ap, char *); *str; str++) 40004234: a0 04 20 01 inc %l0 40004238: d0 0c 00 00 ldub [ %l0 ], %o0 4000423c: 91 2a 20 18 sll %o0, 0x18, %o0 40004240: 80 a2 20 00 cmp %o0, 0 40004244: 12 bf ff fa bne 4000422c 40004248: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 4000424c: 10 bf ff e3 b 400041d8 40004250: b0 06 20 01 inc %i0 break; case 'c': BSP_output_char(va_arg(ap, int)); break; default: BSP_output_char(c); 40004254: 82 10 20 00 clr %g1 40004258: a4 10 20 10 mov 0x10, %l2 break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 4000425c: e2 06 40 00 ld [ %i1 ], %l1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40004260: 80 88 60 ff btst 0xff, %g1 BSP_output_char(c); break; } /* switch*/ if (base) printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int), 40004264: b2 06 60 04 add %i1, 4, %i1 { long unsigned int n; int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { 40004268: 02 80 00 0d be 4000429c 4000426c: a6 10 00 1d mov %i5, %l3 40004270: 80 a4 60 00 cmp %l1, 0 40004274: 16 80 00 0b bge 400042a0 40004278: 90 10 00 11 mov %l1, %o0 BSP_output_char('-'); 4000427c: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 <== NOT EXECUTED 40004280: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004284: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED num = -num; if (maxwidth) maxwidth--; 40004288: 82 1d 60 00 xor %l5, 0, %g1 <== NOT EXECUTED int count; char toPrint[20]; if ( (sign == 1) && ((long)num < 0) ) { BSP_output_char('-'); num = -num; 4000428c: a2 20 00 11 neg %l1 <== NOT EXECUTED if (maxwidth) maxwidth--; 40004290: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED 40004294: 84 40 20 00 addx %g0, 0, %g2 <== NOT EXECUTED 40004298: aa 25 40 02 sub %l5, %g2, %l5 <== NOT EXECUTED } count = 0; while ((n = num / base) > 0) { 4000429c: 90 10 00 11 mov %l1, %o0 400042a0: 92 10 00 12 mov %l2, %o1 400042a4: 40 00 4b 5c call 40017014 <.udiv> 400042a8: a8 10 20 00 clr %l4 400042ac: a0 92 20 00 orcc %o0, 0, %l0 400042b0: 12 80 00 05 bne 400042c4 400042b4: ae 10 00 16 mov %l6, %l7 400042b8: 10 80 00 41 b 400043bc 400042bc: a4 10 20 01 mov 1, %l2 400042c0: a0 10 00 08 mov %o0, %l0 toPrint[count++] = (num - (n*base)); 400042c4: 92 10 00 12 mov %l2, %o1 400042c8: 40 00 4b 19 call 40016f2c <.umul> 400042cc: 90 10 00 10 mov %l0, %o0 400042d0: 90 24 40 08 sub %l1, %o0, %o0 num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 400042d4: 92 10 00 12 mov %l2, %o1 toPrint[count++] = (num - (n*base)); 400042d8: d0 2d 00 16 stb %o0, [ %l4 + %l6 ] num = -num; if (maxwidth) maxwidth--; } count = 0; while ((n = num / base) > 0) { 400042dc: 90 10 00 10 mov %l0, %o0 400042e0: 40 00 4b 4d call 40017014 <.udiv> 400042e4: a8 05 20 01 inc %l4 400042e8: 80 a2 20 00 cmp %o0, 0 400042ec: 12 bf ff f5 bne 400042c0 400042f0: a2 10 00 10 mov %l0, %l1 400042f4: a4 05 20 01 add %l4, 1, %l2 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 400042f8: 84 07 bf f8 add %fp, -8, %g2 400042fc: 82 00 80 14 add %g2, %l4, %g1 40004300: e2 28 7f ec stb %l1, [ %g1 + -20 ] for (n=maxwidth ; n > count; n-- ) 40004304: 80 a5 40 12 cmp %l5, %l2 40004308: 08 80 00 0a bleu 40004330 4000430c: a0 10 00 15 mov %l5, %l0 40004310: a2 10 00 1b mov %i3, %l1 BSP_output_char(lead); 40004314: c2 04 e3 24 ld [ %l3 + 0x324 ], %g1 40004318: 9f c0 40 00 call %g1 4000431c: 90 10 00 11 mov %l1, %o0 toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) 40004320: a0 04 3f ff add %l0, -1, %l0 40004324: 80 a4 00 12 cmp %l0, %l2 40004328: 18 bf ff fc bgu 40004318 4000432c: c2 04 e3 24 ld [ %l3 + 0x324 ], %g1 40004330: 82 04 bf ff add %l2, -1, %g1 40004334: a2 10 20 00 clr %l1 40004338: a0 05 c0 01 add %l7, %g1, %l0 BSP_output_char(lead); for (n = 0; n < count; n++){ BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]); 4000433c: c2 4c 00 00 ldsb [ %l0 ], %g1 40004340: c4 04 e3 24 ld [ %l3 + 0x324 ], %g2 40004344: d0 4f 00 01 ldsb [ %i4 + %g1 ], %o0 40004348: 9f c0 80 00 call %g2 4000434c: a2 04 60 01 inc %l1 toPrint[count++] = num; for (n=maxwidth ; n > count; n-- ) BSP_output_char(lead); for (n = 0; n < count; n++){ 40004350: 80 a4 40 12 cmp %l1, %l2 40004354: 0a bf ff fa bcs 4000433c 40004358: a0 04 3f ff add %l0, -1, %l0 vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 4000435c: 10 bf ff 9f b 400041d8 40004360: b0 06 20 01 inc %i0 case 's': for (str = va_arg(ap, char *); *str; str++) BSP_output_char(*str); break; case 'c': BSP_output_char(va_arg(ap, int)); 40004364: d0 4e 60 03 ldsb [ %i1 + 3 ], %o0 <== NOT EXECUTED 40004368: c2 07 63 24 ld [ %i5 + 0x324 ], %g1 <== NOT EXECUTED 4000436c: 9f c0 40 00 call %g1 <== NOT EXECUTED 40004370: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED vprintk(const char *fmt, va_list ap) { char c, *str; int lflag, base, sign, width, lead; for (; *fmt != '\0'; fmt++) 40004374: 10 bf ff 99 b 400041d8 <== NOT EXECUTED 40004378: b0 06 20 01 inc %i0 <== NOT EXECUTED } switch (c) { case 'o': case 'O': base = 8; sign = 0; break; case 'i': case 'I': case 'd': case 'D': base = 10; sign = 1; break; 4000437c: 82 10 20 00 clr %g1 <== NOT EXECUTED 40004380: 10 bf ff b7 b 4000425c <== NOT EXECUTED 40004384: a4 10 20 0a mov 0xa, %l2 <== NOT EXECUTED if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; } switch (c) 40004388: 82 10 20 00 clr %g1 <== NOT EXECUTED 4000438c: 10 bf ff b4 b 4000425c <== NOT EXECUTED 40004390: a4 10 20 08 mov 8, %l2 <== NOT EXECUTED { case 'o': case 'O': base = 8; sign = 0; break; 40004394: 82 10 20 01 mov 1, %g1 40004398: 10 bf ff b1 b 4000425c 4000439c: a4 10 20 0a mov 0xa, %l2 if (*fmt == '%') { fmt++; if (*fmt == '0' ) { lead = '0'; fmt++; 400043a0: b0 06 20 01 inc %i0 400043a4: d0 0e 00 00 ldub [ %i0 ], %o0 400043a8: b6 10 20 30 mov 0x30, %i3 400043ac: 10 bf ff 68 b 4000414c 400043b0: 87 2a 20 18 sll %o0, 0x18, %g3 } if ((c = *fmt) == 'l') { lflag = 1; c = *++fmt; 400043b4: 10 bf ff 7f b 400041b0 400043b8: d0 0e 00 00 ldub [ %i0 ], %o0 count = 0; while ((n = num / base) > 0) { toPrint[count++] = (num - (n*base)); num = n ; } toPrint[count++] = num; 400043bc: 10 bf ff d0 b 400042fc 400043c0: 84 07 bf f8 add %fp, -8, %g2 400196bc : ssize_t write( int fd, const void *buffer, size_t count ) { 400196bc: 9d e3 bf 98 save %sp, -104, %sp ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400196c0: 03 10 00 6a sethi %hi(0x4001a800), %g1 400196c4: c4 00 62 2c ld [ %g1 + 0x22c ], %g2 ! 4001aa2c ssize_t write( int fd, const void *buffer, size_t count ) { 400196c8: 92 10 00 19 mov %i1, %o1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 400196cc: 80 a6 00 02 cmp %i0, %g2 400196d0: 1a 80 00 24 bcc 40019760 400196d4: 94 10 00 1a mov %i2, %o2 iop = rtems_libio_iop( fd ); 400196d8: 03 10 00 6f sethi %hi(0x4001bc00), %g1 400196dc: c6 00 60 18 ld [ %g1 + 0x18 ], %g3 ! 4001bc18 400196e0: 85 2e 20 02 sll %i0, 2, %g2 400196e4: 83 2e 20 04 sll %i0, 4, %g1 400196e8: 82 20 40 02 sub %g1, %g2, %g1 400196ec: 82 00 40 18 add %g1, %i0, %g1 400196f0: 83 28 60 02 sll %g1, 2, %g1 400196f4: b0 00 40 03 add %g1, %g3, %i0 rtems_libio_check_is_open(iop); 400196f8: c2 06 20 0c ld [ %i0 + 0xc ], %g1 400196fc: 80 88 61 00 btst 0x100, %g1 40019700: 02 80 00 18 be 40019760 40019704: 80 a6 60 00 cmp %i1, 0 rtems_libio_check_buffer( buffer ); 40019708: 02 80 00 1c be 40019778 4001970c: 80 a6 a0 00 cmp %i2, 0 rtems_libio_check_count( count ); 40019710: 02 80 00 12 be 40019758 40019714: 90 10 20 00 clr %o0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40019718: 80 88 60 04 btst 4, %g1 4001971c: 02 80 00 17 be 40019778 40019720: 01 00 00 00 nop /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 40019724: c2 06 20 30 ld [ %i0 + 0x30 ], %g1 40019728: c2 00 60 0c ld [ %g1 + 0xc ], %g1 4001972c: 80 a0 60 00 cmp %g1, 0 40019730: 02 80 00 18 be 40019790 40019734: 01 00 00 00 nop rtems_set_errno_and_return_minus_one( ENOTSUP ); rc = (*iop->handlers->write_h)( iop, buffer, count ); 40019738: 9f c0 40 00 call %g1 4001973c: 90 10 00 18 mov %i0, %o0 if ( rc > 0 ) 40019740: 80 a2 20 00 cmp %o0, 0 40019744: 04 80 00 05 ble 40019758 40019748: 01 00 00 00 nop iop->offset += rc; 4001974c: c2 06 20 08 ld [ %i0 + 8 ], %g1 40019750: 82 00 40 08 add %g1, %o0, %g1 40019754: c2 26 20 08 st %g1, [ %i0 + 8 ] return rc; } 40019758: 81 c7 e0 08 ret 4001975c: 91 e8 00 08 restore %g0, %o0, %o0 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); 40019760: 7f ff da 04 call 4000ff70 <__errno> <== NOT EXECUTED 40019764: 01 00 00 00 nop <== NOT EXECUTED 40019768: 82 10 20 09 mov 9, %g1 ! 9 <== NOT EXECUTED 4001976c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019770: 10 bf ff fa b 40019758 <== NOT EXECUTED 40019774: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 40019778: 7f ff d9 fe call 4000ff70 <__errno> <== NOT EXECUTED 4001977c: 01 00 00 00 nop <== NOT EXECUTED 40019780: 82 10 20 16 mov 0x16, %g1 ! 16 <== NOT EXECUTED 40019784: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 40019788: 10 bf ff f4 b 40019758 <== NOT EXECUTED 4001978c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 40019790: 7f ff d9 f8 call 4000ff70 <__errno> <== NOT EXECUTED 40019794: 01 00 00 00 nop <== NOT EXECUTED 40019798: 82 10 20 86 mov 0x86, %g1 ! 86 <== NOT EXECUTED 4001979c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED 400197a0: 10 bf ff ee b 40019758 <== NOT EXECUTED 400197a4: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED