RTEMS 4.9.6Annotated Report
Sun Jul 24 16:38:50 2011
020099e8 <IMFS_Set_handlers>:
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
20099e8: c2 02 00 00 ld [ %o0 ], %g1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
20099ec: c4 02 20 0c ld [ %o0 + 0xc ], %g2
switch( node->type ) {
20099f0: c2 00 60 48 ld [ %g1 + 0x48 ], %g1
20099f4: 80 a0 60 06 cmp %g1, 6
20099f8: 18 80 00 0a bgu 2009a20 <IMFS_Set_handlers+0x38> <== NEVER TAKEN
20099fc: c8 00 a0 2c ld [ %g2 + 0x2c ], %g4
2009a00: 83 28 60 02 sll %g1, 2, %g1
2009a04: 05 00 80 26 sethi %hi(0x2009800), %g2
2009a08: 84 10 a1 cc or %g2, 0x1cc, %g2 ! 20099cc <miniIMFS_initialize+0x24>
2009a0c: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2009a10: 81 c0 c0 00 jmp %g3
2009a14: 01 00 00 00 nop
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
2009a18: c2 01 20 08 ld [ %g4 + 8 ], %g1
2009a1c: c2 22 20 04 st %g1, [ %o0 + 4 ]
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
2009a20: 81 c3 e0 08 retl
2009a24: 90 10 20 00 clr %o0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
2009a28: c2 01 20 04 ld [ %g4 + 4 ], %g1
2009a2c: c2 22 20 04 st %g1, [ %o0 + 4 ]
break;
}
return 0;
}
2009a30: 81 c3 e0 08 retl
2009a34: 90 10 20 00 clr %o0
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
2009a38: 03 00 80 5a sethi %hi(0x2016800), %g1
2009a3c: 82 10 60 d4 or %g1, 0xd4, %g1 ! 20168d4 <IMFS_link_handlers>
2009a40: c2 22 20 04 st %g1, [ %o0 + 4 ]
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
2009a44: 81 c3 e0 08 retl
2009a48: 90 10 20 00 clr %o0
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
2009a4c: 03 00 80 5a sethi %hi(0x2016800), %g1
2009a50: 82 10 60 9c or %g1, 0x9c, %g1 ! 201689c <IMFS_device_handlers>
2009a54: c2 22 20 04 st %g1, [ %o0 + 4 ]
loc->handlers = fs_info->memfile_handlers;
break;
}
return 0;
}
2009a58: 81 c3 e0 08 retl
2009a5c: 90 10 20 00 clr %o0
0200b96c <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
200b96c: 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();
200b970: 40 00 04 7e call 200cb68 <geteuid>
200b974: f0 06 00 00 ld [ %i0 ], %i0
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
200b978: c2 16 20 38 lduh [ %i0 + 0x38 ], %g1
200b97c: 91 2a 20 10 sll %o0, 0x10, %o0
200b980: 91 32 20 10 srl %o0, 0x10, %o0
200b984: 80 a2 00 01 cmp %o0, %g1
200b988: 02 80 00 04 be 200b998 <IMFS_chown+0x2c> <== ALWAYS TAKEN
200b98c: 80 a2 20 00 cmp %o0, 0
200b990: 12 80 00 0c bne 200b9c0 <IMFS_chown+0x54> <== NOT EXECUTED
200b994: 01 00 00 00 nop <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
200b998: f2 36 20 38 sth %i1, [ %i0 + 0x38 ]
jnode->st_gid = group;
200b99c: f4 36 20 3a sth %i2, [ %i0 + 0x3a ]
IMFS_update_ctime( jnode );
200b9a0: 90 07 bf f0 add %fp, -16, %o0
200b9a4: 7f ff df ac call 2003854 <gettimeofday>
200b9a8: 92 10 20 00 clr %o1
200b9ac: c2 07 bf f0 ld [ %fp + -16 ], %g1
200b9b0: 84 10 20 00 clr %g2
200b9b4: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
return 0;
}
200b9b8: 81 c7 e0 08 ret
200b9bc: 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 );
200b9c0: 40 00 12 eb call 201056c <__errno> <== NOT EXECUTED
200b9c4: 01 00 00 00 nop <== NOT EXECUTED
200b9c8: 82 10 20 01 mov 1, %g1 ! 1 <PROM_START+0x1> <== NOT EXECUTED
200b9cc: 84 10 3f ff mov -1, %g2 <== NOT EXECUTED
200b9d0: 10 bf ff fa b 200b9b8 <IMFS_chown+0x4c> <== NOT EXECUTED
200b9d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
0200cdbc <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
200cdbc: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *node;
struct timeval tv;
IMFS_jnode_t *parent = NULL;
IMFS_fs_info_t *fs_info;
if ( parent_loc != NULL )
200cdc0: a2 96 20 00 orcc %i0, 0, %l1
200cdc4: 02 80 00 03 be 200cdd0 <IMFS_create_node+0x14>
200cdc8: a0 10 20 00 clr %l0
parent = parent_loc->node_access;
200cdcc: e0 04 40 00 ld [ %l1 ], %l0
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
200cdd0: 90 10 20 01 mov 1, %o0
200cdd4: 7f ff f6 b7 call 200a8b0 <calloc>
200cdd8: 92 10 20 5c mov 0x5c, %o1
if ( !node )
200cddc: b0 92 20 00 orcc %o0, 0, %i0
200cde0: 02 80 00 30 be 200cea0 <IMFS_create_node+0xe4> <== NEVER TAKEN
200cde4: 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 );
200cde8: 92 10 00 1a mov %i2, %o1
200cdec: 94 10 20 20 mov 0x20, %o2
/*
* Fill in the basic information
*/
node->st_nlink = 1;
200cdf0: c2 36 20 30 sth %g1, [ %i0 + 0x30 ]
node->type = type;
200cdf4: f2 26 20 48 st %i1, [ %i0 + 0x48 ]
strncpy( node->name, name, IMFS_NAME_MAX );
200cdf8: 40 00 08 88 call 200f018 <strncpy>
200cdfc: 90 06 20 0c add %i0, 0xc, %o0
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode & ~rtems_filesystem_umask;
200ce00: 05 00 80 5e sethi %hi(0x2017800), %g2
200ce04: c6 00 a1 54 ld [ %g2 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
200ce08: c2 10 e0 24 lduh [ %g3 + 0x24 ], %g1
200ce0c: 82 2e c0 01 andn %i3, %g1, %g1
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
200ce10: 7f ff f7 64 call 200aba0 <geteuid>
200ce14: c2 36 20 2e sth %g1, [ %i0 + 0x2e ]
node->st_gid = getegid();
200ce18: 7f ff f7 5e call 200ab90 <getegid>
200ce1c: d0 36 20 38 sth %o0, [ %i0 + 0x38 ]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200ce20: 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();
200ce24: d0 36 20 3a sth %o0, [ %i0 + 0x3a ]
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
200ce28: 7f ff f7 62 call 200abb0 <gettimeofday>
200ce2c: 90 07 bf f0 add %fp, -16, %o0
node->stat_atime = (time_t) tv.tv_sec;
200ce30: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Set the type specific information
*/
switch (type) {
200ce34: 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;
200ce38: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
200ce3c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
/*
* Set the type specific information
*/
switch (type) {
200ce40: 08 80 00 1a bleu 200cea8 <IMFS_create_node+0xec> <== ALWAYS TAKEN
200ce44: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
default:
assert(0);
200ce48: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200ce4c: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200ce50: 17 00 80 5a sethi %hi(0x2016800), %o3 <== NOT EXECUTED
200ce54: 90 12 20 f0 or %o0, 0xf0, %o0 <== NOT EXECUTED
200ce58: 94 12 a1 40 or %o2, 0x140, %o2 <== NOT EXECUTED
200ce5c: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED
200ce60: 7f ff d4 38 call 2001f40 <__assert_func> <== NOT EXECUTED
200ce64: 92 10 20 74 mov 0x74, %o1 <== NOT EXECUTED
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
200ce68: c2 07 00 00 ld [ %i4 ], %g1
200ce6c: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
/*
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
200ce70: 80 a4 20 00 cmp %l0, 0
200ce74: 02 80 00 0b be 200cea0 <IMFS_create_node+0xe4>
200ce78: 90 04 20 4c add %l0, 0x4c, %o0
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200ce7c: 7f ff e5 50 call 20063bc <_Chain_Append>
200ce80: 92 10 00 18 mov %i0, %o1
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
fs_info = parent_loc->mt_entry->fs_info;
200ce84: c2 04 60 0c ld [ %l1 + 0xc ], %g1
* If this node has a parent, then put it in that directory list.
*/
if ( parent ) {
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
node->Parent = parent;
200ce88: e0 26 20 08 st %l0, [ %i0 + 8 ]
fs_info = parent_loc->mt_entry->fs_info;
200ce8c: c6 00 60 2c ld [ %g1 + 0x2c ], %g3
node->st_ino = ++fs_info->ino_count;
200ce90: c4 00 c0 00 ld [ %g3 ], %g2
200ce94: 84 00 a0 01 inc %g2
200ce98: c4 20 c0 00 st %g2, [ %g3 ]
200ce9c: c4 26 20 34 st %g2, [ %i0 + 0x34 ]
}
return node;
}
200cea0: 81 c7 e0 08 ret
200cea4: 81 e8 00 00 restore
/*
* Set the type specific information
*/
switch (type) {
200cea8: 83 2e 60 02 sll %i1, 2, %g1
200ceac: 05 00 80 33 sethi %hi(0x200cc00), %g2
200ceb0: 84 10 a1 a0 or %g2, 0x1a0, %g2 ! 200cda0 <device_open+0x50>
200ceb4: c6 00 80 01 ld [ %g2 + %g1 ], %g3
200ceb8: 81 c0 c0 00 jmp %g3
200cebc: 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;
200cec0: c0 26 20 4c clr [ %i0 + 0x4c ] <== NOT EXECUTED
node->info.linearfile.direct = 0;
200cec4: c0 26 20 50 clr [ %i0 + 0x50 ] <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
200cec8: c0 26 20 4c clr [ %i0 + 0x4c ]
node->info.file.indirect = 0;
200cecc: c0 26 20 50 clr [ %i0 + 0x50 ]
node->info.file.doubly_indirect = 0;
200ced0: c0 26 20 54 clr [ %i0 + 0x54 ]
node->info.file.triply_indirect = 0;
200ced4: 10 bf ff e7 b 200ce70 <IMFS_create_node+0xb4>
200ced8: c0 26 20 58 clr [ %i0 + 0x58 ]
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
200cedc: c2 07 20 04 ld [ %i4 + 4 ], %g1
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
200cee0: c4 07 00 00 ld [ %i4 ], %g2
node->info.device.minor = info->device.minor;
200cee4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
200cee8: 10 bf ff e2 b 200ce70 <IMFS_create_node+0xb4>
200ceec: c4 26 20 4c st %g2, [ %i0 + 0x4c ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200cef0: 82 06 20 50 add %i0, 0x50, %g1
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200cef4: 84 06 20 4c add %i0, 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;
200cef8: c0 26 20 50 clr [ %i0 + 0x50 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200cefc: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200cf00: 10 bf ff dc b 200ce70 <IMFS_create_node+0xb4>
200cf04: c4 26 20 54 st %g2, [ %i0 + 0x54 ]
02003b48 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
2003b48: 9d e3 bf 98 save %sp, -104, %sp
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2003b4c: 80 a6 20 00 cmp %i0, 0
2003b50: 02 80 00 2c be 2003c00 <IMFS_dump_directory+0xb8> <== NEVER TAKEN
2003b54: 80 a6 60 00 cmp %i1, 0
assert( level >= 0 );
2003b58: 06 80 00 38 bl 2003c38 <IMFS_dump_directory+0xf0> <== NEVER TAKEN
2003b5c: 11 00 80 76 sethi %hi(0x201d800), %o0
assert( the_directory->type == IMFS_DIRECTORY );
2003b60: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
2003b64: 80 a0 60 01 cmp %g1, 1
2003b68: 12 80 00 2e bne 2003c20 <IMFS_dump_directory+0xd8> <== NEVER TAKEN
2003b6c: 15 00 80 76 sethi %hi(0x201d800), %o2
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
2003b70: 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;
2003b74: b0 06 20 50 add %i0, 0x50, %i0
!rtems_chain_is_tail( the_chain, the_node );
2003b78: 80 a4 40 18 cmp %l1, %i0
2003b7c: 02 80 00 1b be 2003be8 <IMFS_dump_directory+0xa0>
2003b80: 03 00 80 7e sethi %hi(0x201f800), %g1
2003b84: 05 00 80 76 sethi %hi(0x201d800), %g2
2003b88: a6 10 62 a8 or %g1, 0x2a8, %l3
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2003b8c: a4 10 a1 40 or %g2, 0x140, %l2
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
2003b90: a8 06 60 01 add %i1, 1, %l4
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
2003b94: a0 10 20 00 clr %l0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
2003b98: c2 04 c0 00 ld [ %l3 ], %g1
2003b9c: 90 10 00 12 mov %l2, %o0
2003ba0: d6 00 60 08 ld [ %g1 + 8 ], %o3
2003ba4: 92 10 20 01 mov 1, %o1
2003ba8: 40 00 3d de call 2013320 <fwrite>
2003bac: 94 10 20 04 mov 4, %o2
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
2003bb0: a0 04 20 01 inc %l0
2003bb4: 80 a6 40 10 cmp %i1, %l0
2003bb8: 36 bf ff f9 bge,a 2003b9c <IMFS_dump_directory+0x54>
2003bbc: c2 04 c0 00 ld [ %l3 ], %g1
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
2003bc0: 7f ff ff 85 call 20039d4 <IMFS_print_jnode>
2003bc4: 90 10 00 11 mov %l1, %o0
if ( the_jnode->type == IMFS_DIRECTORY )
2003bc8: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
2003bcc: 80 a0 60 01 cmp %g1, 1
2003bd0: 22 80 00 08 be,a 2003bf0 <IMFS_dump_directory+0xa8>
2003bd4: 90 10 00 11 mov %l1, %o0
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2003bd8: 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;
!rtems_chain_is_tail( the_chain, the_node );
2003bdc: 80 a4 40 18 cmp %l1, %i0
2003be0: 12 bf ff ee bne 2003b98 <IMFS_dump_directory+0x50>
2003be4: a0 10 20 00 clr %l0
2003be8: 81 c7 e0 08 ret
2003bec: 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 );
2003bf0: 7f ff ff d6 call 2003b48 <IMFS_dump_directory>
2003bf4: 92 10 00 14 mov %l4, %o1
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
2003bf8: 10 bf ff f9 b 2003bdc <IMFS_dump_directory+0x94>
2003bfc: e2 04 40 00 ld [ %l1 ], %l1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
2003c00: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED
2003c04: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED
2003c08: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED
2003c0c: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
2003c10: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
2003c14: 96 12 e0 f8 or %o3, 0xf8, %o3 <== NOT EXECUTED
2003c18: 40 00 01 c5 call 200432c <__assert_func> <== NOT EXECUTED
2003c1c: 92 10 20 7f mov 0x7f, %o1 <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
2003c20: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED
2003c24: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
2003c28: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
2003c2c: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
2003c30: 40 00 01 bf call 200432c <__assert_func> <== NOT EXECUTED
2003c34: 92 10 20 83 mov 0x83, %o1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
2003c38: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED
2003c3c: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED
2003c40: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
2003c44: 94 12 a1 f0 or %o2, 0x1f0, %o2 <== NOT EXECUTED
2003c48: 96 12 e1 08 or %o3, 0x108, %o3 <== NOT EXECUTED
2003c4c: 40 00 01 b8 call 200432c <__assert_func> <== NOT EXECUTED
2003c50: 92 10 20 81 mov 0x81, %o1 <== NOT EXECUTED
02009c30 <IMFS_eval_path>:
int IMFS_eval_path(
const char *pathname, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
2009c30: 9d e3 bf 70 save %sp, -144, %sp
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
2009c34: 80 8e 7f f8 btst -8, %i1
2009c38: 12 80 00 9c bne 2009ea8 <IMFS_eval_path+0x278> <== NEVER TAKEN
2009c3c: 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;
2009c40: e0 06 80 00 ld [ %i2 ], %l0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009c44: 03 00 80 5e sethi %hi(0x2017800), %g1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
2009c48: a4 10 20 00 clr %l2
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009c4c: ac 10 61 54 or %g1, 0x154, %l6
2009c50: a8 07 bf d0 add %fp, -48, %l4
2009c54: aa 07 bf f4 add %fp, -12, %l5
* 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 );
2009c58: 90 04 c0 12 add %l3, %l2, %o0
2009c5c: 92 10 00 14 mov %l4, %o1
2009c60: 40 00 01 ba call 200a348 <IMFS_get_token>
2009c64: 94 10 00 15 mov %l5, %o2
i += len;
if ( !pathloc->node_access )
2009c68: 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 );
2009c6c: a2 10 00 08 mov %o0, %l1
i += len;
if ( !pathloc->node_access )
2009c70: 80 a0 e0 00 cmp %g3, 0
2009c74: 02 80 00 57 be 2009dd0 <IMFS_eval_path+0x1a0> <== NEVER TAKEN
2009c78: 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 )
2009c7c: 80 a2 20 00 cmp %o0, 0
2009c80: 12 80 00 10 bne 2009cc0 <IMFS_eval_path+0x90>
2009c84: 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 ) {
2009c88: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1
2009c8c: 80 a0 60 01 cmp %g1, 1
2009c90: 12 80 00 6f bne 2009e4c <IMFS_eval_path+0x21c>
2009c94: 01 00 00 00 nop
if ( node->info.directory.mt_fs != NULL ) {
2009c98: c6 00 e0 58 ld [ %g3 + 0x58 ], %g3
2009c9c: 80 a0 e0 00 cmp %g3, 0
2009ca0: 02 80 00 6b be 2009e4c <IMFS_eval_path+0x21c>
2009ca4: 01 00 00 00 nop
newloc = node->info.directory.mt_fs->mt_fs_root;
2009ca8: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4
*pathloc = newloc;
2009cac: 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;
2009cb0: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009cb4: 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;
2009cb8: 10 80 00 59 b 2009e1c <IMFS_eval_path+0x1ec>
2009cbc: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
2009cc0: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009cc4: 80 a0 60 01 cmp %g1, 1
2009cc8: 02 80 00 3b be 2009db4 <IMFS_eval_path+0x184>
2009ccc: 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 ) {
2009cd0: 80 a4 60 03 cmp %l1, 3
2009cd4: 02 80 00 0b be 2009d00 <IMFS_eval_path+0xd0>
2009cd8: a0 10 00 03 mov %g3, %l0
2009cdc: 80 a4 60 04 cmp %l1, 4
2009ce0: 02 80 00 2f be 2009d9c <IMFS_eval_path+0x16c>
2009ce4: 80 a4 60 02 cmp %l1, 2
2009ce8: 02 80 00 1a be 2009d50 <IMFS_eval_path+0x120>
2009cec: 80 a4 60 04 cmp %l1, 4
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
2009cf0: 12 bf ff db bne 2009c5c <IMFS_eval_path+0x2c> <== ALWAYS TAKEN
2009cf4: 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 ) {
2009cf8: 10 bf ff e5 b 2009c8c <IMFS_eval_path+0x5c> <== NOT EXECUTED
2009cfc: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1 <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
2009d00: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1
2009d04: 80 a0 60 03 cmp %g1, 3
2009d08: 02 80 00 38 be 2009de8 <IMFS_eval_path+0x1b8>
2009d0c: 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 ) {
2009d10: 02 80 00 6e be 2009ec8 <IMFS_eval_path+0x298>
2009d14: 90 10 00 1a mov %i2, %o0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
2009d18: 80 a0 60 01 cmp %g1, 1
2009d1c: 12 80 00 57 bne 2009e78 <IMFS_eval_path+0x248>
2009d20: 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 ) {
2009d24: c6 04 20 58 ld [ %l0 + 0x58 ], %g3
2009d28: 80 a0 e0 00 cmp %g3, 0
2009d2c: 12 bf ff df bne 2009ca8 <IMFS_eval_path+0x78>
2009d30: 90 10 00 10 mov %l0, %o0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
2009d34: 40 00 01 57 call 200a290 <IMFS_find_match_in_dir>
2009d38: 92 10 00 14 mov %l4, %o1
if ( !node )
2009d3c: a0 92 20 00 orcc %o0, 0, %l0
2009d40: 02 80 00 24 be 2009dd0 <IMFS_eval_path+0x1a0>
2009d44: 01 00 00 00 nop
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
2009d48: 10 bf ff c4 b 2009c58 <IMFS_eval_path+0x28>
2009d4c: e0 26 80 00 st %l0, [ %i2 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009d50: c2 05 80 00 ld [ %l6 ], %g1
2009d54: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
2009d58: 80 a0 80 03 cmp %g2, %g3
2009d5c: 02 bf ff c0 be 2009c5c <IMFS_eval_path+0x2c>
2009d60: 90 04 c0 12 add %l3, %l2, %o0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
2009d64: d8 06 a0 0c ld [ %i2 + 0xc ], %o4
2009d68: c2 03 20 18 ld [ %o4 + 0x18 ], %g1
2009d6c: 80 a0 40 03 cmp %g1, %g3
2009d70: 22 80 00 27 be,a 2009e0c <IMFS_eval_path+0x1dc>
2009d74: c8 03 20 10 ld [ %o4 + 0x10 ], %g4
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
}
} else {
if ( !node->Parent )
2009d78: e0 00 e0 08 ld [ %g3 + 8 ], %l0
2009d7c: 80 a4 20 00 cmp %l0, 0
2009d80: 32 bf ff b7 bne,a 2009c5c <IMFS_eval_path+0x2c>
2009d84: e0 26 80 00 st %l0, [ %i2 ]
rtems_set_errno_and_return_minus_one( ENOENT );
2009d88: 40 00 0f 62 call 200db10 <__errno>
2009d8c: b0 10 3f ff mov -1, %i0
2009d90: e2 22 00 00 st %l1, [ %o0 ]
2009d94: 81 c7 e0 08 ret
2009d98: 81 e8 00 00 restore
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
2009d9c: 40 00 0f 5d call 200db10 <__errno>
2009da0: b0 10 3f ff mov -1, %i0
2009da4: 82 10 20 5b mov 0x5b, %g1
2009da8: c2 22 00 00 st %g1, [ %o0 ]
2009dac: 81 c7 e0 08 ret
2009db0: 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 ) )
2009db4: 7f ff ff 2b call 2009a60 <IMFS_evaluate_permission>
2009db8: 92 10 20 01 mov 1, %o1
2009dbc: 80 a2 20 00 cmp %o0, 0
2009dc0: 02 80 00 4b be 2009eec <IMFS_eval_path+0x2bc>
2009dc4: 01 00 00 00 nop
2009dc8: 10 bf ff c2 b 2009cd0 <IMFS_eval_path+0xa0>
2009dcc: c6 06 80 00 ld [ %i2 ], %g3
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
2009dd0: 40 00 0f 50 call 200db10 <__errno>
2009dd4: b0 10 3f ff mov -1, %i0
2009dd8: 82 10 20 02 mov 2, %g1
2009ddc: c2 22 00 00 st %g1, [ %o0 ]
2009de0: 81 c7 e0 08 ret
2009de4: 81 e8 00 00 restore
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
2009de8: 90 10 00 1a mov %i2, %o0
2009dec: 7f ff ff 3e call 2009ae4 <IMFS_evaluate_hard_link>
2009df0: 92 10 20 00 clr %o1
node = pathloc->node_access;
2009df4: e0 06 80 00 ld [ %i2 ], %l0
if ( !node )
2009df8: 80 a4 20 00 cmp %l0, 0
2009dfc: 02 80 00 1f be 2009e78 <IMFS_eval_path+0x248> <== NEVER TAKEN
2009e00: 01 00 00 00 nop
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
2009e04: 10 bf ff c5 b 2009d18 <IMFS_eval_path+0xe8>
2009e08: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
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;
2009e0c: c2 03 20 14 ld [ %o4 + 0x14 ], %g1
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),flags,pathloc);
2009e10: 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;
2009e14: c4 03 20 0c ld [ %o4 + 0xc ], %g2
2009e18: c6 03 20 08 ld [ %o4 + 8 ], %g3
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009e1c: 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;
2009e20: c2 26 a0 0c st %g1, [ %i2 + 0xc ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009e24: 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;
2009e28: c4 26 a0 04 st %g2, [ %i2 + 4 ]
2009e2c: c6 26 80 00 st %g3, [ %i2 ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009e30: 90 04 c0 08 add %l3, %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;
2009e34: c8 26 a0 08 st %g4, [ %i2 + 8 ]
return (*pathloc->ops->evalpath_h)( &pathname[i-len], flags, pathloc );
2009e38: 92 10 00 19 mov %i1, %o1
2009e3c: 9f c3 40 00 call %o5
2009e40: 94 10 00 1a mov %i2, %o2
2009e44: 81 c7 e0 08 ret
2009e48: 91 e8 00 08 restore %g0, %o0, %o0
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
2009e4c: 7f ff fe e7 call 20099e8 <IMFS_Set_handlers>
2009e50: 90 10 00 1a mov %i2, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
2009e54: 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 );
2009e58: b0 10 00 08 mov %o0, %i0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
2009e5c: 7f ff ff 01 call 2009a60 <IMFS_evaluate_permission>
2009e60: 90 10 00 1a mov %i2, %o0
2009e64: 80 a2 20 00 cmp %o0, 0
2009e68: 02 80 00 0a be 2009e90 <IMFS_eval_path+0x260>
2009e6c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
2009e70: 81 c7 e0 08 ret
2009e74: 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 );
2009e78: 40 00 0f 26 call 200db10 <__errno>
2009e7c: b0 10 3f ff mov -1, %i0
2009e80: 82 10 20 14 mov 0x14, %g1
2009e84: c2 22 00 00 st %g1, [ %o0 ]
2009e88: 81 c7 e0 08 ret
2009e8c: 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 );
2009e90: 40 00 0f 20 call 200db10 <__errno>
2009e94: b0 10 3f ff mov -1, %i0
2009e98: 82 10 20 0d mov 0xd, %g1
2009e9c: c2 22 00 00 st %g1, [ %o0 ]
return result;
}
2009ea0: 81 c7 e0 08 ret
2009ea4: 81 e8 00 00 restore
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
2009ea8: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED
2009eac: 15 00 80 59 sethi %hi(0x2016400), %o2 <== NOT EXECUTED
2009eb0: 17 00 80 5a sethi %hi(0x2016800), %o3 <== NOT EXECUTED
2009eb4: 90 12 23 b0 or %o0, 0x3b0, %o0 <== NOT EXECUTED
2009eb8: 94 12 a3 a0 or %o2, 0x3a0, %o2 <== NOT EXECUTED
2009ebc: 96 12 e0 00 mov %o3, %o3 <== NOT EXECUTED
2009ec0: 7f ff e0 20 call 2001f40 <__assert_func> <== NOT EXECUTED
2009ec4: 92 10 21 ea mov 0x1ea, %o1 <== NOT EXECUTED
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
2009ec8: 7f ff ff 22 call 2009b50 <IMFS_evaluate_sym_link>
2009ecc: 92 10 20 00 clr %o1
2009ed0: b0 10 00 08 mov %o0, %i0
node = pathloc->node_access;
if ( result == -1 )
2009ed4: 80 a2 3f ff cmp %o0, -1
2009ed8: 02 bf ff af be 2009d94 <IMFS_eval_path+0x164> <== NEVER TAKEN
2009edc: 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;
2009ee0: a0 10 00 08 mov %o0, %l0
2009ee4: 10 bf ff 8d b 2009d18 <IMFS_eval_path+0xe8>
2009ee8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
* 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 );
2009eec: 40 00 0f 09 call 200db10 <__errno>
2009ef0: b0 10 3f ff mov -1, %i0
2009ef4: 82 10 20 0d mov 0xd, %g1
2009ef8: c2 22 00 00 st %g1, [ %o0 ]
2009efc: 81 c7 e0 08 ret
2009f00: 81 e8 00 00 restore
02009fd0 <IMFS_evaluate_for_make>:
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
2009fd0: 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;
2009fd4: e2 06 40 00 ld [ %i1 ], %l1
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
2009fd8: a6 10 00 18 mov %i0, %l3
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009fdc: 03 00 80 5e sethi %hi(0x2017800), %g1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
2009fe0: b0 10 20 00 clr %i0
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
2009fe4: ac 10 61 54 or %g1, 0x154, %l6
2009fe8: a8 07 bf d0 add %fp, -48, %l4
2009fec: aa 07 bf f4 add %fp, -12, %l5
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
2009ff0: 90 04 c0 18 add %l3, %i0, %o0
2009ff4: 92 10 00 14 mov %l4, %o1
2009ff8: 40 00 00 d4 call 200a348 <IMFS_get_token>
2009ffc: 94 10 00 15 mov %l5, %o2
i += len;
if ( !pathloc->node_access )
200a000: c6 06 40 00 ld [ %i1 ], %g3
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
200a004: a0 10 00 08 mov %o0, %l0
i += len;
if ( !pathloc->node_access )
200a008: 80 a0 e0 00 cmp %g3, 0
200a00c: 02 80 00 5f be 200a188 <IMFS_evaluate_for_make+0x1b8> <== NEVER TAKEN
200a010: e4 07 bf f4 ld [ %fp + -12 ], %l2
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
200a014: 80 a2 20 00 cmp %o0, 0
200a018: 32 80 00 08 bne,a 200a038 <IMFS_evaluate_for_make+0x68>
200a01c: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
200a020: 40 00 0e bc call 200db10 <__errno>
200a024: a2 10 3f ff mov -1, %l1
200a028: 82 10 20 11 mov 0x11, %g1
200a02c: c2 22 00 00 st %g1, [ %o0 ]
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200a030: 81 c7 e0 08 ret
200a034: 91 e8 00 11 restore %g0, %l1, %o0
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
200a038: 80 a0 60 01 cmp %g1, 1
200a03c: 02 80 00 59 be 200a1a0 <IMFS_evaluate_for_make+0x1d0>
200a040: 90 10 00 19 mov %i1, %o0
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
i += len;
200a044: b0 06 00 12 add %i0, %l2, %i0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200a048: 80 a4 20 02 cmp %l0, 2
200a04c: 02 80 00 2c be 200a0fc <IMFS_evaluate_for_make+0x12c>
200a050: a2 10 00 03 mov %g3, %l1
200a054: 80 a4 20 02 cmp %l0, 2
200a058: 08 80 00 0d bleu 200a08c <IMFS_evaluate_for_make+0xbc>
200a05c: 80 a4 20 00 cmp %l0, 0
200a060: 80 a4 20 03 cmp %l0, 3
200a064: 02 80 00 0e be 200a09c <IMFS_evaluate_for_make+0xcc>
200a068: 80 a4 20 04 cmp %l0, 4
200a06c: 12 bf ff e2 bne 2009ff4 <IMFS_evaluate_for_make+0x24> <== NEVER TAKEN
200a070: 90 04 c0 18 add %l3, %i0, %o0
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200a074: 40 00 0e a7 call 200db10 <__errno>
200a078: a2 10 3f ff mov -1, %l1
200a07c: 82 10 20 5b mov 0x5b, %g1
200a080: c2 22 00 00 st %g1, [ %o0 ]
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200a084: 81 c7 e0 08 ret
200a088: 91 e8 00 11 restore %g0, %l1, %o0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
200a08c: 02 bf ff e5 be 200a020 <IMFS_evaluate_for_make+0x50> <== NEVER TAKEN
200a090: 90 04 c0 18 add %l3, %i0, %o0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], token, &len );
200a094: 10 bf ff d9 b 2009ff8 <IMFS_evaluate_for_make+0x28>
200a098: 92 10 00 14 mov %l4, %o1
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
200a09c: c2 00 e0 48 ld [ %g3 + 0x48 ], %g1
200a0a0: 80 a0 60 03 cmp %g1, 3
200a0a4: 02 80 00 6e be 200a25c <IMFS_evaluate_for_make+0x28c>
200a0a8: 80 a0 60 04 cmp %g1, 4
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
200a0ac: 02 80 00 6d be 200a260 <IMFS_evaluate_for_make+0x290>
200a0b0: 90 10 00 19 mov %i1, %o0
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
200a0b4: 80 a4 60 00 cmp %l1, 0
200a0b8: 02 80 00 53 be 200a204 <IMFS_evaluate_for_make+0x234> <== NEVER TAKEN
200a0bc: 01 00 00 00 nop
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
200a0c0: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
200a0c4: 80 a0 60 01 cmp %g1, 1
200a0c8: 12 80 00 4f bne 200a204 <IMFS_evaluate_for_make+0x234>
200a0cc: 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 ) {
200a0d0: c6 04 60 58 ld [ %l1 + 0x58 ], %g3
200a0d4: 80 a0 e0 00 cmp %g3, 0
200a0d8: 12 80 00 50 bne 200a218 <IMFS_evaluate_for_make+0x248>
200a0dc: 90 10 00 11 mov %l1, %o0
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
200a0e0: 40 00 00 6c call 200a290 <IMFS_find_match_in_dir>
200a0e4: 92 10 00 14 mov %l4, %o1
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
200a0e8: a2 92 20 00 orcc %o0, 0, %l1
200a0ec: 02 80 00 16 be 200a144 <IMFS_evaluate_for_make+0x174>
200a0f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
done = true;
else
pathloc->node_access = node;
200a0f4: 10 bf ff bf b 2009ff0 <IMFS_evaluate_for_make+0x20>
200a0f8: e2 26 40 00 st %l1, [ %i1 ]
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
200a0fc: c2 05 80 00 ld [ %l6 ], %g1
200a100: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
200a104: 80 a0 80 03 cmp %g2, %g3
200a108: 02 bf ff bb be 2009ff4 <IMFS_evaluate_for_make+0x24>
200a10c: 90 04 c0 18 add %l3, %i0, %o0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
200a110: d8 06 60 0c ld [ %i1 + 0xc ], %o4
200a114: c2 03 20 18 ld [ %o4 + 0x18 ], %g1
200a118: 80 a0 40 03 cmp %g1, %g3
200a11c: 22 80 00 58 be,a 200a27c <IMFS_evaluate_for_make+0x2ac>
200a120: c8 03 20 10 ld [ %o4 + 0x10 ], %g4
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
200a124: e2 00 e0 08 ld [ %g3 + 8 ], %l1
200a128: 80 a4 60 00 cmp %l1, 0
200a12c: 32 bf ff b2 bne,a 2009ff4 <IMFS_evaluate_for_make+0x24>
200a130: e2 26 40 00 st %l1, [ %i1 ]
rtems_set_errno_and_return_minus_one( ENOENT );
200a134: 40 00 0e 77 call 200db10 <__errno>
200a138: a2 10 3f ff mov -1, %l1
200a13c: 10 bf ff bd b 200a030 <IMFS_evaluate_for_make+0x60>
200a140: e0 22 00 00 st %l0, [ %o0 ]
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
200a144: 82 26 00 01 sub %i0, %g1, %g1
200a148: 82 04 c0 01 add %l3, %g1, %g1
200a14c: c2 26 80 00 st %g1, [ %i2 ]
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
200a150: c2 4c c0 18 ldsb [ %l3 + %i0 ], %g1
200a154: 80 a0 60 00 cmp %g1, 0
200a158: 12 80 00 07 bne 200a174 <IMFS_evaluate_for_make+0x1a4>
200a15c: 84 04 c0 18 add %l3, %i0, %g2
200a160: 30 80 00 17 b,a 200a1bc <IMFS_evaluate_for_make+0x1ec>
200a164: c2 48 a0 01 ldsb [ %g2 + 1 ], %g1
200a168: 80 a0 60 00 cmp %g1, 0
200a16c: 02 80 00 14 be 200a1bc <IMFS_evaluate_for_make+0x1ec>
200a170: 84 00 a0 01 inc %g2
if ( !IMFS_is_separator( path[ i ] ) )
200a174: 80 a0 60 2f cmp %g1, 0x2f
200a178: 02 bf ff fb be 200a164 <IMFS_evaluate_for_make+0x194>
200a17c: 80 a0 60 5c cmp %g1, 0x5c
200a180: 22 bf ff fa be,a 200a168 <IMFS_evaluate_for_make+0x198>
200a184: c2 48 a0 01 ldsb [ %g2 + 1 ], %g1
rtems_set_errno_and_return_minus_one( ENOENT );
200a188: 40 00 0e 62 call 200db10 <__errno>
200a18c: a2 10 3f ff mov -1, %l1
200a190: 82 10 20 02 mov 2, %g1
200a194: c2 22 00 00 st %g1, [ %o0 ]
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
200a198: 81 c7 e0 08 ret
200a19c: 91 e8 00 11 restore %g0, %l1, %o0
* 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 ) )
200a1a0: 7f ff fe 30 call 2009a60 <IMFS_evaluate_permission>
200a1a4: 92 10 20 01 mov 1, %o1
200a1a8: 80 a2 20 00 cmp %o0, 0
200a1ac: 02 80 00 11 be 200a1f0 <IMFS_evaluate_for_make+0x220>
200a1b0: 01 00 00 00 nop
200a1b4: 10 bf ff a4 b 200a044 <IMFS_evaluate_for_make+0x74>
200a1b8: c6 06 40 00 ld [ %i1 ], %g3
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
200a1bc: 7f ff fe 0b call 20099e8 <IMFS_Set_handlers>
200a1c0: 90 10 00 19 mov %i1, %o0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
200a1c4: c2 06 40 00 ld [ %i1 ], %g1
200a1c8: c4 00 60 48 ld [ %g1 + 0x48 ], %g2
200a1cc: 80 a0 a0 01 cmp %g2, 1
200a1d0: 12 80 00 0d bne 200a204 <IMFS_evaluate_for_make+0x234> <== NEVER TAKEN
200a1d4: a2 10 00 08 mov %o0, %l1
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
200a1d8: 90 10 00 19 mov %i1, %o0
200a1dc: 7f ff fe 21 call 2009a60 <IMFS_evaluate_permission>
200a1e0: 92 10 20 03 mov 3, %o1
200a1e4: 80 a2 20 00 cmp %o0, 0
200a1e8: 12 bf ff 92 bne 200a030 <IMFS_evaluate_for_make+0x60>
200a1ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
200a1f0: 40 00 0e 48 call 200db10 <__errno>
200a1f4: a2 10 3f ff mov -1, %l1 ! ffffffff <RAM_END+0xfdbfffff>
200a1f8: 82 10 20 0d mov 0xd, %g1
200a1fc: 10 bf ff 8d b 200a030 <IMFS_evaluate_for_make+0x60>
200a200: c2 22 00 00 st %g1, [ %o0 ]
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
200a204: 40 00 0e 43 call 200db10 <__errno>
200a208: a2 10 3f ff mov -1, %l1
200a20c: 82 10 20 14 mov 0x14, %g1
200a210: 10 bf ff 88 b 200a030 <IMFS_evaluate_for_make+0x60>
200a214: c2 22 00 00 st %g1, [ %o0 ]
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a218: c8 00 e0 20 ld [ %g3 + 0x20 ], %g4
*pathloc = newloc;
200a21c: c2 00 e0 24 ld [ %g3 + 0x24 ], %g1
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a220: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a224: da 01 20 04 ld [ %g4 + 4 ], %o5
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
200a228: c6 00 e0 18 ld [ %g3 + 0x18 ], %g3
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a22c: d0 07 bf f4 ld [ %fp + -12 ], %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a230: c2 26 60 0c st %g1, [ %i1 + 0xc ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a234: 90 26 00 08 sub %i0, %o0, %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a238: c4 26 60 04 st %g2, [ %i1 + 4 ]
200a23c: c6 26 40 00 st %g3, [ %i1 ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a240: 90 04 c0 08 add %l3, %o0, %o0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
200a244: c8 26 60 08 st %g4, [ %i1 + 8 ]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a248: 92 10 00 19 mov %i1, %o1
200a24c: 9f c3 40 00 call %o5
200a250: 94 10 00 1a mov %i2, %o2
200a254: 10 bf ff 77 b 200a030 <IMFS_evaluate_for_make+0x60>
200a258: a2 10 00 08 mov %o0, %l1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
200a25c: 90 10 00 19 mov %i1, %o0
200a260: 7f ff ff 29 call 2009f04 <IMFS_evaluate_link>
200a264: 92 10 20 00 clr %o1
if ( result == -1 )
200a268: 80 a2 3f ff cmp %o0, -1
200a26c: 02 bf ff 71 be 200a030 <IMFS_evaluate_for_make+0x60> <== NEVER TAKEN
200a270: a2 10 00 08 mov %o0, %l1
200a274: 10 bf ff 90 b 200a0b4 <IMFS_evaluate_for_make+0xe4>
200a278: e2 06 40 00 ld [ %i1 ], %l1
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
200a27c: c2 03 20 14 ld [ %o4 + 0x14 ], %g1
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
200a280: da 01 20 04 ld [ %g4 + 4 ], %o5
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
200a284: c4 03 20 0c ld [ %o4 + 0xc ], %g2
200a288: 10 bf ff e9 b 200a22c <IMFS_evaluate_for_make+0x25c>
200a28c: c6 03 20 08 ld [ %o4 + 8 ], %g3
02009ae4 <IMFS_evaluate_hard_link>:
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009ae4: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = node->node_access;
2009ae8: c4 06 00 00 ld [ %i0 ], %g2
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
2009aec: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
2009af0: 80 a0 60 03 cmp %g1, 3
2009af4: 12 80 00 14 bne 2009b44 <IMFS_evaluate_hard_link+0x60> <== NEVER TAKEN
2009af8: 90 10 00 18 mov %i0, %o0
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
2009afc: c2 00 a0 4c ld [ %g2 + 0x4c ], %g1
IMFS_Set_handlers( node );
2009b00: 7f ff ff ba call 20099e8 <IMFS_Set_handlers>
2009b04: c2 26 00 00 st %g1, [ %i0 ]
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
2009b08: 90 10 00 18 mov %i0, %o0
2009b0c: 92 10 00 19 mov %i1, %o1
2009b10: 7f ff ff d4 call 2009a60 <IMFS_evaluate_permission>
2009b14: b0 10 20 00 clr %i0
2009b18: 80 a2 20 00 cmp %o0, 0
2009b1c: 02 80 00 04 be 2009b2c <IMFS_evaluate_hard_link+0x48> <== NEVER TAKEN
2009b20: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
2009b24: 81 c7 e0 08 ret
2009b28: 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 );
2009b2c: 40 00 0f f9 call 200db10 <__errno> <== NOT EXECUTED
2009b30: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009b34: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
2009b38: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return result;
}
2009b3c: 81 c7 e0 08 ret <== NOT EXECUTED
2009b40: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
2009b44: 7f ff f1 0a call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2009b48: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
02009f04 <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009f04: 9d e3 bf 98 save %sp, -104, %sp
2009f08: 25 00 80 5e sethi %hi(0x2017800), %l2
2009f0c: 10 80 00 07 b 2009f28 <IMFS_evaluate_link+0x24>
2009f10: a2 14 a1 54 or %l2, 0x154, %l1 ! 2017954 <rtems_current_user_env>
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
2009f14: 02 80 00 23 be 2009fa0 <IMFS_evaluate_link+0x9c>
2009f18: 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 ) ) );
2009f1c: 80 a0 60 01 cmp %g1, 1
2009f20: 18 80 00 1c bgu 2009f90 <IMFS_evaluate_link+0x8c> <== ALWAYS TAKEN
2009f24: 90 10 20 00 clr %o0
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
2009f28: c4 04 40 00 ld [ %l1 ], %g2
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
2009f2c: e0 06 00 00 ld [ %i0 ], %l0
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
2009f30: c2 10 a0 26 lduh [ %g2 + 0x26 ], %g1
2009f34: 82 00 60 01 inc %g1
2009f38: c2 30 a0 26 sth %g1, [ %g2 + 0x26 ]
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
2009f3c: 83 28 60 10 sll %g1, 0x10, %g1
2009f40: 83 30 60 10 srl %g1, 0x10, %g1
2009f44: 80 a0 60 05 cmp %g1, 5
2009f48: 18 80 00 1b bgu 2009fb4 <IMFS_evaluate_link+0xb0>
2009f4c: 01 00 00 00 nop
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
2009f50: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009f54: 80 a0 60 03 cmp %g1, 3
2009f58: 12 bf ff ef bne 2009f14 <IMFS_evaluate_link+0x10>
2009f5c: 80 a0 60 04 cmp %g1, 4
result = IMFS_evaluate_hard_link( node, flags );
2009f60: 90 10 00 18 mov %i0, %o0
2009f64: 7f ff fe e0 call 2009ae4 <IMFS_evaluate_hard_link>
2009f68: 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 ) ) );
2009f6c: 80 a2 20 00 cmp %o0, 0
2009f70: 12 80 00 09 bne 2009f94 <IMFS_evaluate_link+0x90>
2009f74: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1
2009f78: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2009f7c: 82 00 7f fd add %g1, -3, %g1
2009f80: 80 a0 60 01 cmp %g1, 1
2009f84: 28 bf ff ea bleu,a 2009f2c <IMFS_evaluate_link+0x28> <== ALWAYS TAKEN
2009f88: c4 04 40 00 ld [ %l1 ], %g2
2009f8c: 90 10 20 00 clr %o0 <== NOT EXECUTED
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
2009f90: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1
2009f94: c0 30 60 26 clrh [ %g1 + 0x26 ]
return result;
}
2009f98: 81 c7 e0 08 ret
2009f9c: 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 );
2009fa0: 90 10 00 18 mov %i0, %o0
2009fa4: 7f ff fe eb call 2009b50 <IMFS_evaluate_sym_link>
2009fa8: 92 10 00 19 mov %i1, %o1
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
2009fac: 10 bf ff f1 b 2009f70 <IMFS_evaluate_link+0x6c>
2009fb0: 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 );
2009fb4: 40 00 0e d7 call 200db10 <__errno>
2009fb8: c0 30 a0 26 clrh [ %g2 + 0x26 ]
2009fbc: 82 10 20 5c mov 0x5c, %g1
2009fc0: c2 22 00 00 st %g1, [ %o0 ]
2009fc4: 90 10 3f ff mov -1, %o0
*/
rtems_filesystem_link_counts = 0;
return result;
}
2009fc8: 81 c7 e0 08 ret
2009fcc: 91 e8 00 08 restore %g0, %o0, %o0
02009a60 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
2009a60: 9d e3 bf 98 save %sp, -104, %sp
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
2009a64: 80 8e 7f f8 btst -8, %i1
2009a68: 12 80 00 19 bne 2009acc <IMFS_evaluate_permission+0x6c> <== NEVER TAKEN
2009a6c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
2009a70: 40 00 04 4c call 200aba0 <geteuid>
2009a74: e2 06 00 00 ld [ %i0 ], %l1
st_gid = getegid();
2009a78: 40 00 04 46 call 200ab90 <getegid>
2009a7c: a0 10 00 08 mov %o0, %l0
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
2009a80: c2 14 60 38 lduh [ %l1 + 0x38 ], %g1
2009a84: a1 2c 20 10 sll %l0, 0x10, %l0
2009a88: a1 34 20 10 srl %l0, 0x10, %l0
2009a8c: 80 a4 00 01 cmp %l0, %g1
2009a90: 02 80 00 09 be 2009ab4 <IMFS_evaluate_permission+0x54>
2009a94: b1 2e 60 06 sll %i1, 6, %i0
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
2009a98: c4 14 60 3a lduh [ %l1 + 0x3a ], %g2
2009a9c: 83 2a 20 10 sll %o0, 0x10, %g1
2009aa0: 83 30 60 10 srl %g1, 0x10, %g1
2009aa4: 80 a0 40 02 cmp %g1, %g2
2009aa8: 02 80 00 03 be 2009ab4 <IMFS_evaluate_permission+0x54> <== ALWAYS TAKEN
2009aac: b1 2e 60 03 sll %i1, 3, %i0
2009ab0: b0 10 00 19 mov %i1, %i0 <== NOT EXECUTED
flags_to_test <<= 3;
2009ab4: c2 14 60 2e lduh [ %l1 + 0x2e ], %g1
2009ab8: 82 2e 00 01 andn %i0, %g1, %g1
2009abc: 80 a0 00 01 cmp %g0, %g1
2009ac0: b0 60 3f ff subx %g0, -1, %i0
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
2009ac4: 81 c7 e0 08 ret
2009ac8: 81 e8 00 00 restore
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
2009acc: 40 00 10 11 call 200db10 <__errno> <== NOT EXECUTED
2009ad0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2009ad4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2009ad8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2009adc: 81 c7 e0 08 ret <== NOT EXECUTED
2009ae0: 81 e8 00 00 restore <== NOT EXECUTED
02009b50 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
2009b50: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *jnode = node->node_access;
2009b54: d0 06 00 00 ld [ %i0 ], %o0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
2009b58: c2 02 20 48 ld [ %o0 + 0x48 ], %g1
2009b5c: 80 a0 60 04 cmp %g1, 4
2009b60: 12 80 00 2f bne 2009c1c <IMFS_evaluate_sym_link+0xcc> <== NEVER TAKEN
2009b64: 01 00 00 00 nop
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
2009b68: c2 02 20 08 ld [ %o0 + 8 ], %g1
2009b6c: 80 a0 60 00 cmp %g1, 0
2009b70: 02 80 00 2d be 2009c24 <IMFS_evaluate_sym_link+0xd4> <== NEVER TAKEN
2009b74: 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;
2009b78: c2 26 00 00 st %g1, [ %i0 ]
rtems_filesystem_get_sym_start_loc(
2009b7c: d0 02 20 4c ld [ %o0 + 0x4c ], %o0
2009b80: c2 4a 00 00 ldsb [ %o0 ], %g1
2009b84: 80 a0 60 2f cmp %g1, 0x2f
2009b88: 02 80 00 06 be 2009ba0 <IMFS_evaluate_sym_link+0x50>
2009b8c: 80 a0 60 5c cmp %g1, 0x5c
2009b90: 02 80 00 04 be 2009ba0 <IMFS_evaluate_sym_link+0x50> <== NEVER TAKEN
2009b94: 80 a0 60 00 cmp %g1, 0
2009b98: 12 80 00 0d bne 2009bcc <IMFS_evaluate_sym_link+0x7c> <== ALWAYS TAKEN
2009b9c: 88 10 20 00 clr %g4
2009ba0: 03 00 80 5e sethi %hi(0x2017800), %g1
2009ba4: c6 00 61 54 ld [ %g1 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
2009ba8: 88 10 20 01 mov 1, %g4
2009bac: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
2009bb0: c2 26 00 00 st %g1, [ %i0 ]
2009bb4: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2
2009bb8: c4 26 20 04 st %g2, [ %i0 + 4 ]
2009bbc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2009bc0: c2 26 20 08 st %g1, [ %i0 + 8 ]
2009bc4: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2
2009bc8: c4 26 20 0c st %g2, [ %i0 + 0xc ]
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
2009bcc: 90 02 00 04 add %o0, %g4, %o0
2009bd0: 94 10 00 18 mov %i0, %o2
2009bd4: 40 00 00 17 call 2009c30 <IMFS_eval_path>
2009bd8: 92 10 00 19 mov %i1, %o1
2009bdc: a0 10 00 08 mov %o0, %l0
&jnode->info.sym_link.name[i],
flags,
node
);
IMFS_Set_handlers( node );
2009be0: 7f ff ff 82 call 20099e8 <IMFS_Set_handlers>
2009be4: 90 10 00 18 mov %i0, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
2009be8: 90 10 00 18 mov %i0, %o0
2009bec: 7f ff ff 9d call 2009a60 <IMFS_evaluate_permission>
2009bf0: 92 10 00 19 mov %i1, %o1
2009bf4: 80 a2 20 00 cmp %o0, 0
2009bf8: 02 80 00 04 be 2009c08 <IMFS_evaluate_sym_link+0xb8> <== NEVER TAKEN
2009bfc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
2009c00: 81 c7 e0 08 ret
2009c04: 91 e8 00 10 restore %g0, %l0, %o0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
2009c08: 40 00 0f c2 call 200db10 <__errno> <== NOT EXECUTED
2009c0c: a0 10 3f ff mov -1, %l0 <== NOT EXECUTED
2009c10: 82 10 20 0d mov 0xd, %g1 <== NOT EXECUTED
2009c14: 10 bf ff fb b 2009c00 <IMFS_evaluate_sym_link+0xb0> <== NOT EXECUTED
2009c18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
2009c1c: 7f ff f0 d4 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2009c20: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
2009c24: 7f ff f0 d2 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2009c28: 11 2e b4 00 sethi %hi(0xbad00000), %o0 <== NOT EXECUTED
0200cf08 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
200cf08: 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();
200cf0c: 7f ff f7 25 call 200aba0 <geteuid>
200cf10: e0 06 00 00 ld [ %i0 ], %l0
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
200cf14: c2 14 20 38 lduh [ %l0 + 0x38 ], %g1
200cf18: 91 2a 20 10 sll %o0, 0x10, %o0
200cf1c: 91 32 20 10 srl %o0, 0x10, %o0
200cf20: 80 a2 00 01 cmp %o0, %g1
200cf24: 02 80 00 04 be 200cf34 <IMFS_fchmod+0x2c> <== ALWAYS TAKEN
200cf28: 80 a2 20 00 cmp %o0, 0
200cf2c: 12 80 00 12 bne 200cf74 <IMFS_fchmod+0x6c> <== NOT EXECUTED
200cf30: 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 ) ) )
200cf34: 83 2e 60 10 sll %i1, 0x10, %g1
200cf38: 83 30 60 10 srl %g1, 0x10, %g1
200cf3c: 82 08 7e 00 and %g1, -512, %g1
200cf40: 80 a0 60 00 cmp %g1, 0
200cf44: 12 80 00 0c bne 200cf74 <IMFS_fchmod+0x6c>
200cf48: 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);
jnode->st_mode |= mode;
200cf4c: c2 14 20 2e lduh [ %l0 + 0x2e ], %g1
200cf50: 82 08 7e 00 and %g1, -512, %g1
200cf54: 82 16 40 01 or %i1, %g1, %g1
IMFS_update_ctime( jnode );
200cf58: 92 10 20 00 clr %o1
200cf5c: 7f ff f7 15 call 200abb0 <gettimeofday>
200cf60: c2 34 20 2e sth %g1, [ %l0 + 0x2e ]
200cf64: c2 07 bf f0 ld [ %fp + -16 ], %g1
200cf68: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
return 0;
}
200cf6c: 81 c7 e0 08 ret
200cf70: 91 e8 20 00 restore %g0, 0, %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 );
200cf74: 40 00 02 e7 call 200db10 <__errno>
200cf78: b0 10 3f ff mov -1, %i0
200cf7c: 82 10 20 01 mov 1, %g1
200cf80: c2 22 00 00 st %g1, [ %o0 ]
200cf84: 81 c7 e0 08 ret
200cf88: 81 e8 00 00 restore
0200a290 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
200a290: 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 );
200a294: 80 a6 20 00 cmp %i0, 0
200a298: 02 80 00 15 be 200a2ec <IMFS_find_match_in_dir+0x5c> <== NEVER TAKEN
200a29c: 80 a6 60 00 cmp %i1, 0
if ( !name )
200a2a0: 02 80 00 11 be 200a2e4 <IMFS_find_match_in_dir+0x54> <== NEVER TAKEN
200a2a4: 90 10 00 19 mov %i1, %o0
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
200a2a8: 13 00 80 5a sethi %hi(0x2016800), %o1
200a2ac: 40 00 12 e9 call 200ee50 <strcmp>
200a2b0: 92 12 60 70 or %o1, 0x70, %o1 ! 2016870 <dotname>
200a2b4: 80 a2 20 00 cmp %o0, 0
200a2b8: 02 80 00 09 be 200a2dc <IMFS_find_match_in_dir+0x4c> <== NEVER TAKEN
200a2bc: 90 10 00 19 mov %i1, %o0
return directory;
if ( !strcmp( name, dotdotname ) )
200a2c0: 13 00 80 5a sethi %hi(0x2016800), %o1
200a2c4: 40 00 12 e3 call 200ee50 <strcmp>
200a2c8: 92 12 60 78 or %o1, 0x78, %o1 ! 2016878 <dotdotname>
200a2cc: 80 a2 20 00 cmp %o0, 0
200a2d0: 32 80 00 0f bne,a 200a30c <IMFS_find_match_in_dir+0x7c> <== ALWAYS TAKEN
200a2d4: e0 06 20 4c ld [ %i0 + 0x4c ], %l0
return directory->Parent;
200a2d8: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200a2dc: 81 c7 e0 08 ret <== NOT EXECUTED
200a2e0: 81 e8 00 00 restore <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
200a2e4: 81 c7 e0 08 ret
200a2e8: 91 e8 20 00 restore %g0, 0, %o0
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
200a2ec: 11 00 80 5a sethi %hi(0x2016800), %o0 <== NOT EXECUTED
200a2f0: 15 00 80 5a sethi %hi(0x2016800), %o2 <== NOT EXECUTED
200a2f4: 17 00 80 5a sethi %hi(0x2016800), %o3 <== NOT EXECUTED
200a2f8: 90 12 20 08 or %o0, 8, %o0 <== NOT EXECUTED
200a2fc: 94 12 a0 80 or %o2, 0x80, %o2 <== NOT EXECUTED
200a300: 96 12 e0 60 or %o3, 0x60, %o3 <== NOT EXECUTED
200a304: 7f ff df 0f call 2001f40 <__assert_func> <== NOT EXECUTED
200a308: 92 10 20 2a mov 0x2a, %o1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200a30c: b0 06 20 50 add %i0, 0x50, %i0
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
200a310: 80 a4 00 18 cmp %l0, %i0
200a314: 12 80 00 06 bne 200a32c <IMFS_find_match_in_dir+0x9c>
200a318: 90 10 00 19 mov %i1, %o0
200a31c: 30 bf ff f2 b,a 200a2e4 <IMFS_find_match_in_dir+0x54>
200a320: 80 a4 00 18 cmp %l0, %i0
200a324: 02 bf ff f0 be 200a2e4 <IMFS_find_match_in_dir+0x54>
200a328: 90 10 00 19 mov %i1, %o0
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
200a32c: 40 00 12 c9 call 200ee50 <strcmp>
200a330: 92 04 20 0c add %l0, 0xc, %o1
200a334: 80 a2 20 00 cmp %o0, 0
200a338: 32 bf ff fa bne,a 200a320 <IMFS_find_match_in_dir+0x90>
200a33c: e0 04 00 00 ld [ %l0 ], %l0
200a340: 81 c7 e0 08 ret
200a344: 91 e8 00 10 restore %g0, %l0, %o0
0200c40c <IMFS_fsunmount>:
((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next))
int IMFS_fsunmount(
rtems_filesystem_mount_table_entry_t *temp_mt_entry
)
{
200c40c: 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;
200c410: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200c414: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
200c418: 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;
200c41c: e0 06 20 18 ld [ %i0 + 0x18 ], %l0
loc = temp_mt_entry->mt_fs_root;
200c420: c2 27 bf ec st %g1, [ %fp + -20 ]
200c424: 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;
200c428: c0 26 20 18 clr [ %i0 + 0x18 ]
200c42c: a2 07 bf e8 add %fp, -24, %l1
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
200c430: e0 27 bf e8 st %l0, [ %fp + -24 ]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
200c434: f0 04 20 08 ld [ %l0 + 8 ], %i0
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
200c438: 7f ff fd c9 call 200bb5c <IMFS_Set_handlers>
200c43c: 90 10 00 11 mov %l1, %o0
if ( jnode->type != IMFS_DIRECTORY ) {
200c440: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200c444: 80 a0 60 01 cmp %g1, 1
200c448: 12 80 00 17 bne 200c4a4 <IMFS_fsunmount+0x98>
200c44c: 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 ) ) {
200c450: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200c454: 80 a0 40 02 cmp %g1, %g2
200c458: 02 80 00 13 be 200c4a4 <IMFS_fsunmount+0x98>
200c45c: 01 00 00 00 nop
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
200c460: 80 a4 20 00 cmp %l0, 0
200c464: 02 80 00 0e be 200c49c <IMFS_fsunmount+0x90>
200c468: 01 00 00 00 nop
if ( jnode->type == IMFS_DIRECTORY ) {
200c46c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200c470: 80 a0 60 01 cmp %g1, 1
200c474: 32 bf ff f0 bne,a 200c434 <IMFS_fsunmount+0x28> <== NEVER TAKEN
200c478: e0 27 bf e8 st %l0, [ %fp + -24 ] <== NOT EXECUTED
if ( jnode_has_children( jnode ) )
200c47c: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
200c480: 82 04 20 50 add %l0, 0x50, %g1
200c484: 80 a0 80 01 cmp %g2, %g1
200c488: 22 bf ff eb be,a 200c434 <IMFS_fsunmount+0x28>
200c48c: e0 27 bf e8 st %l0, [ %fp + -24 ]
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200c490: a0 90 a0 00 orcc %g2, 0, %l0
200c494: 32 bf ff e8 bne,a 200c434 <IMFS_fsunmount+0x28> <== ALWAYS TAKEN
200c498: e0 27 bf e8 st %l0, [ %fp + -24 ]
return 0;
}
200c49c: 81 c7 e0 08 ret
200c4a0: 91 e8 20 00 restore %g0, 0, %o0
result = IMFS_unlink( &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( &loc );
200c4a4: 7f ff d9 86 call 2002abc <IMFS_unlink>
200c4a8: 90 10 00 11 mov %l1, %o0
if (result != 0)
200c4ac: 80 a2 20 00 cmp %o0, 0
200c4b0: 02 bf ff ec be 200c460 <IMFS_fsunmount+0x54> <== ALWAYS TAKEN
200c4b4: a0 10 00 18 mov %i0, %l0
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
200c4b8: 81 c7 e0 08 ret <== NOT EXECUTED
200c4bc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
0200a348 <IMFS_get_token>:
IMFS_token_types IMFS_get_token(
const char *path,
char *token,
int *token_len
)
{
200a348: 9d e3 bf 98 save %sp, -104, %sp
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
200a34c: c4 0e 00 00 ldub [ %i0 ], %g2
while ( (!IMFS_is_separator(c)) && (i <= IMFS_NAME_MAX) ) {
200a350: 87 28 a0 18 sll %g2, 0x18, %g3
200a354: 83 38 e0 18 sra %g3, 0x18, %g1
200a358: 80 a0 60 2f cmp %g1, 0x2f
200a35c: 02 80 00 28 be 200a3fc <IMFS_get_token+0xb4>
200a360: 80 a0 60 5c cmp %g1, 0x5c
200a364: 02 80 00 26 be 200a3fc <IMFS_get_token+0xb4>
200a368: 80 a0 60 00 cmp %g1, 0
200a36c: 02 80 00 2c be 200a41c <IMFS_get_token+0xd4>
200a370: 86 10 20 00 clr %g3
token[i] = c;
200a374: 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];
200a378: 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) ) {
200a37c: c2 4e 00 03 ldsb [ %i0 + %g3 ], %g1
200a380: 80 a0 60 2f cmp %g1, 0x2f
200a384: 02 80 00 07 be 200a3a0 <IMFS_get_token+0x58>
200a388: c4 0e 00 03 ldub [ %i0 + %g3 ], %g2
200a38c: 80 a0 60 5c cmp %g1, 0x5c
200a390: 02 80 00 04 be 200a3a0 <IMFS_get_token+0x58>
200a394: 80 a0 60 00 cmp %g1, 0
200a398: 12 80 00 12 bne 200a3e0 <IMFS_get_token+0x98>
200a39c: 80 a0 e0 20 cmp %g3, 0x20
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
200a3a0: 82 06 40 03 add %i1, %g3, %g1
200a3a4: c4 48 7f ff ldsb [ %g1 + -1 ], %g2
200a3a8: 80 a0 a0 00 cmp %g2, 0
200a3ac: 32 80 00 02 bne,a 200a3b4 <IMFS_get_token+0x6c> <== ALWAYS TAKEN
200a3b0: c0 2e 40 03 clrb [ %i1 + %g3 ]
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200a3b4: 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 )
200a3b8: 90 10 00 19 mov %i1, %o0
200a3bc: 13 00 80 59 sethi %hi(0x2016400), %o1
200a3c0: b0 10 20 02 mov 2, %i0
200a3c4: 40 00 12 a3 call 200ee50 <strcmp>
200a3c8: 92 12 61 30 or %o1, 0x130, %o1
200a3cc: 80 a2 20 00 cmp %o0, 0
200a3d0: 12 80 00 18 bne 200a430 <IMFS_get_token+0xe8>
200a3d4: 90 10 00 19 mov %i1, %o0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
200a3d8: 81 c7 e0 08 ret
200a3dc: 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) ) {
200a3e0: 14 bf ff f1 bg 200a3a4 <IMFS_get_token+0x5c> <== NEVER TAKEN
200a3e4: 82 06 40 03 add %i1, %g3, %g1
token[i] = c;
if ( i == IMFS_NAME_MAX )
200a3e8: 80 a0 e0 20 cmp %g3, 0x20
200a3ec: 12 bf ff e3 bne 200a378 <IMFS_get_token+0x30>
200a3f0: c4 2e 40 03 stb %g2, [ %i1 + %g3 ]
200a3f4: 81 c7 e0 08 ret
200a3f8: 91 e8 20 04 restore %g0, 4, %o0
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
200a3fc: c4 2e 40 00 stb %g2, [ %i1 ]
if ( token[i] != '\0' ) {
200a400: 80 a0 e0 00 cmp %g3, 0
200a404: 82 10 20 01 mov 1, %g1
200a408: 02 80 00 06 be 200a420 <IMFS_get_token+0xd8> <== NEVER TAKEN
200a40c: b0 10 20 01 mov 1, %i0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200a410: c2 26 80 00 st %g1, [ %i2 ]
200a414: 81 c7 e0 08 ret
200a418: 81 e8 00 00 restore
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
token[i] = c;
200a41c: c4 2e 40 00 stb %g2, [ %i1 ]
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
200a420: 82 10 20 00 clr %g1
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
200a424: c2 26 80 00 st %g1, [ %i2 ]
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
200a428: 81 c7 e0 08 ret
200a42c: 91 e8 20 00 restore %g0, 0, %o0
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
200a430: 13 00 80 5a sethi %hi(0x2016800), %o1
200a434: 40 00 12 87 call 200ee50 <strcmp>
200a438: 92 12 60 98 or %o1, 0x98, %o1 ! 2016898 <__func__.5202+0x18>
200a43c: 80 a0 00 08 cmp %g0, %o0
200a440: 82 60 20 00 subx %g0, 0, %g1
200a444: b0 08 60 02 and %g1, 2, %i0
type = IMFS_CURRENT_DIR;
}
return type;
}
200a448: 81 c7 e0 08 ret
200a44c: 91 ee 20 01 restore %i0, 1, %o0
0200a450 <IMFS_initialize_support>:
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
200a450: 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,
200a454: 03 00 80 5d sethi %hi(0x2017400), %g1
200a458: c6 00 60 3c ld [ %g1 + 0x3c ], %g3 ! 201743c <imfs_rq_memfile_bytes_per_block>
* 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) {
200a45c: 84 10 20 20 mov 0x20, %g2
200a460: 80 a0 e0 10 cmp %g3, 0x10
200a464: 02 80 00 09 be 200a488 <IMFS_initialize_support+0x38> <== NEVER TAKEN
200a468: 82 10 20 00 clr %g1
200a46c: 80 a0 c0 02 cmp %g3, %g2
200a470: 02 80 00 06 be 200a488 <IMFS_initialize_support+0x38>
200a474: 82 00 60 01 inc %g1
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16;
!is_valid && (bit_mask <= 512);
200a478: 80 a0 60 05 cmp %g1, 5
200a47c: 12 bf ff fc bne 200a46c <IMFS_initialize_support+0x1c> <== ALWAYS TAKEN
200a480: 85 28 a0 01 sll %g2, 1, %g2
200a484: 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)
200a488: 03 00 80 5f sethi %hi(0x2017c00), %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(
200a48c: 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)
200a490: c6 20 63 e4 st %g3, [ %g1 + 0x3e4 ]
* 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(
200a494: 92 10 20 01 mov 1, %o1
200a498: 90 10 20 00 clr %o0
200a49c: 15 00 80 59 sethi %hi(0x2016400), %o2
200a4a0: 17 00 00 10 sethi %hi(0x4000), %o3
200a4a4: 94 12 a0 a0 or %o2, 0xa0, %o2
200a4a8: 40 00 0a 45 call 200cdbc <IMFS_create_node>
200a4ac: 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;
200a4b0: 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(
200a4b4: 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;
200a4b8: f2 26 20 20 st %i1, [ %i0 + 0x20 ]
"",
( S_IFDIR | 0755 ),
NULL
);
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
200a4bc: 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;
200a4c0: 13 00 80 5b sethi %hi(0x2016c00), %o1
200a4c4: 90 06 20 30 add %i0, 0x30, %o0
200a4c8: 40 00 0f 84 call 200e2d8 <memcpy>
200a4cc: 92 12 60 c0 or %o1, 0xc0, %o1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
200a4d0: 90 10 20 01 mov 1, %o0
200a4d4: 40 00 00 f7 call 200a8b0 <calloc>
200a4d8: 92 10 20 0c mov 0xc, %o1
if ( !fs_info ){
200a4dc: 80 a2 20 00 cmp %o0, 0
200a4e0: 02 80 00 0a be 200a508 <IMFS_initialize_support+0xb8> <== NEVER TAKEN
200a4e4: 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;
200a4e8: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
/*
* Set st_ino for the root to 1.
*/
fs_info->ino_count = 1;
200a4ec: 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;
200a4f0: 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;
200a4f4: f6 22 20 08 st %i3, [ %o0 + 8 ]
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
200a4f8: 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;
200a4fc: 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;
}
200a500: 81 c7 e0 08 ret
200a504: 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);
200a508: d0 06 20 18 ld [ %i0 + 0x18 ], %o0 <== NOT EXECUTED
200a50c: 40 00 01 2f call 200a9c8 <free> <== NOT EXECUTED
200a510: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
200a514: 40 00 0d 7f call 200db10 <__errno> <== NOT EXECUTED
200a518: 01 00 00 00 nop <== NOT EXECUTED
200a51c: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200a520: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a524: 81 c7 e0 08 ret <== NOT EXECUTED
200a528: 81 e8 00 00 restore <== NOT EXECUTED
020027dc <IMFS_link>:
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
20027dc: 9d e3 bf 58 save %sp, -168, %sp
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
20027e0: c2 06 00 00 ld [ %i0 ], %g1
20027e4: c2 27 bf dc st %g1, [ %fp + -36 ]
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
20027e8: c4 10 60 30 lduh [ %g1 + 0x30 ], %g2
20027ec: 80 a0 a0 07 cmp %g2, 7
20027f0: 18 80 00 1b bgu 200285c <IMFS_link+0x80>
20027f4: 90 10 00 1a mov %i2, %o0
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, new_name, &i );
20027f8: a0 07 bf b8 add %fp, -72, %l0
20027fc: 94 07 bf f4 add %fp, -12, %o2
2002800: 40 00 27 5e call 200c578 <IMFS_get_token>
2002804: 92 10 00 10 mov %l0, %o1
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
2002808: 90 10 00 19 mov %i1, %o0
200280c: 94 10 00 10 mov %l0, %o2
2002810: 92 10 20 03 mov 3, %o1
2002814: 17 00 00 28 sethi %hi(0xa000), %o3
2002818: 98 07 bf dc add %fp, -36, %o4
200281c: 40 00 24 76 call 200b9f4 <IMFS_create_node>
2002820: 96 12 e1 ff or %o3, 0x1ff, %o3
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
2002824: 80 a2 20 00 cmp %o0, 0
2002828: 02 80 00 13 be 2002874 <IMFS_link+0x98> <== NEVER TAKEN
200282c: 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 );
2002830: 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++;
2002834: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1
IMFS_update_ctime( info.hard_link.link_node );
2002838: 92 10 20 00 clr %o1
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
200283c: 82 00 60 01 inc %g1
IMFS_update_ctime( info.hard_link.link_node );
2002840: 40 00 04 05 call 2003854 <gettimeofday>
2002844: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ]
2002848: c4 07 bf ec ld [ %fp + -20 ], %g2
200284c: c2 07 bf dc ld [ %fp + -36 ], %g1
2002850: c4 20 60 44 st %g2, [ %g1 + 0x44 ]
return 0;
}
2002854: 81 c7 e0 08 ret
2002858: 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 );
200285c: 40 00 37 44 call 201056c <__errno>
2002860: b0 10 3f ff mov -1, %i0
2002864: 82 10 20 1f mov 0x1f, %g1
2002868: c2 22 00 00 st %g1, [ %o0 ]
200286c: 81 c7 e0 08 ret
2002870: 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 );
2002874: 40 00 37 3e call 201056c <__errno> <== NOT EXECUTED
2002878: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200287c: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2002880: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002884: 81 c7 e0 08 ret <== NOT EXECUTED
2002888: 81 e8 00 00 restore <== NOT EXECUTED
0200ec38 <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200ec38: 9d e3 bf 98 save %sp, -104, %sp
200ec3c: 90 10 00 18 mov %i0, %o0
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
200ec40: 80 a6 20 00 cmp %i0, 0
200ec44: 02 80 00 17 be 200eca0 <IMFS_memfile_addblock+0x68> <== NEVER TAKEN
200ec48: 92 10 00 19 mov %i1, %o1
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200ec4c: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200ec50: 80 a0 60 05 cmp %g1, 5
200ec54: 32 80 00 1b bne,a 200ecc0 <IMFS_memfile_addblock+0x88> <== NEVER TAKEN
200ec58: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
200ec5c: 7f ff fe 71 call 200e620 <IMFS_memfile_get_block_pointer>
200ec60: 94 10 20 01 mov 1, %o2
if ( *block_entry_ptr )
200ec64: 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 );
200ec68: b2 10 00 08 mov %o0, %i1
if ( *block_entry_ptr )
200ec6c: 80 a0 60 00 cmp %g1, 0
200ec70: 02 80 00 04 be 200ec80 <IMFS_memfile_addblock+0x48>
200ec74: b0 10 20 00 clr %i0
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
200ec78: 81 c7 e0 08 ret
200ec7c: 81 e8 00 00 restore
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
200ec80: 7f ff fe 5b call 200e5ec <memfile_alloc_block>
200ec84: b0 10 20 01 mov 1, %i0
if ( !memory )
200ec88: 80 a2 20 00 cmp %o0, 0
200ec8c: 02 bf ff fb be 200ec78 <IMFS_memfile_addblock+0x40> <== NEVER TAKEN
200ec90: 01 00 00 00 nop
return 1;
*block_entry_ptr = memory;
200ec94: d0 26 40 00 st %o0, [ %i1 ]
return 0;
}
200ec98: 81 c7 e0 08 ret
200ec9c: 91 e8 20 00 restore %g0, 0, %o0
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
200eca0: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200eca4: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200eca8: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200ecac: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200ecb0: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
200ecb4: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200ecb8: 7f ff d0 20 call 2002d38 <__assert_func> <== NOT EXECUTED
200ecbc: 92 10 21 69 mov 0x169, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200ecc0: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200ecc4: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200ecc8: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200eccc: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
200ecd0: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED
200ecd4: 7f ff d0 19 call 2002d38 <__assert_func> <== NOT EXECUTED
200ecd8: 92 10 21 6d mov 0x16d, %o1 <== NOT EXECUTED
0200ece0 <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
200ece0: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200ece4: a6 96 20 00 orcc %i0, 0, %l3
200ece8: 02 80 00 44 be 200edf8 <IMFS_memfile_extend+0x118> <== NEVER TAKEN
200ecec: 11 00 80 5b sethi %hi(0x2016c00), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200ecf0: c2 04 e0 48 ld [ %l3 + 0x48 ], %g1
200ecf4: 80 a0 60 05 cmp %g1, 5
200ecf8: 12 80 00 47 bne 200ee14 <IMFS_memfile_extend+0x134> <== NEVER TAKEN
200ecfc: 03 00 80 5f sethi %hi(0x2017c00), %g1
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
200ed00: e2 00 62 9c ld [ %g1 + 0x29c ], %l1 ! 2017e9c <imfs_memfile_bytes_per_block>
200ed04: a1 34 60 02 srl %l1, 2, %l0
200ed08: 92 10 00 10 mov %l0, %o1
200ed0c: 40 00 16 31 call 20145d0 <.umul>
200ed10: 90 04 20 01 add %l0, 1, %o0
200ed14: 92 10 00 10 mov %l0, %o1
200ed18: 40 00 16 2e call 20145d0 <.umul>
200ed1c: 90 02 20 01 inc %o0
200ed20: 92 10 00 11 mov %l1, %o1
200ed24: 40 00 16 2b call 20145d0 <.umul>
200ed28: 90 02 3f ff add %o0, -1, %o0
200ed2c: 80 a6 40 08 cmp %i1, %o0
200ed30: 1a 80 00 2c bcc 200ede0 <IMFS_memfile_extend+0x100> <== NEVER TAKEN
200ed34: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
200ed38: e0 04 e0 4c ld [ %l3 + 0x4c ], %l0
200ed3c: 80 a6 40 10 cmp %i1, %l0
200ed40: 04 80 00 26 ble 200edd8 <IMFS_memfile_extend+0xf8>
200ed44: b0 10 20 00 clr %i0
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
200ed48: 92 10 00 11 mov %l1, %o1
200ed4c: 40 00 16 5d call 20146c0 <.div>
200ed50: 90 10 00 19 mov %i1, %o0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200ed54: 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;
200ed58: a4 10 00 08 mov %o0, %l2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
200ed5c: 40 00 16 59 call 20146c0 <.div>
200ed60: 90 10 00 10 mov %l0, %o0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
200ed64: 80 a4 80 08 cmp %l2, %o0
200ed68: 0a 80 00 0f bcs 200eda4 <IMFS_memfile_extend+0xc4> <== NEVER TAKEN
200ed6c: a2 10 00 08 mov %o0, %l1
200ed70: 10 80 00 05 b 200ed84 <IMFS_memfile_extend+0xa4>
200ed74: a0 10 00 08 mov %o0, %l0
200ed78: 80 a4 80 10 cmp %l2, %l0
200ed7c: 2a 80 00 0b bcs,a 200eda8 <IMFS_memfile_extend+0xc8>
200ed80: f2 24 e0 4c st %i1, [ %l3 + 0x4c ]
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
200ed84: 90 10 00 13 mov %l3, %o0
200ed88: 7f ff ff ac call 200ec38 <IMFS_memfile_addblock>
200ed8c: 92 10 00 10 mov %l0, %o1
200ed90: 80 a2 20 00 cmp %o0, 0
200ed94: 22 bf ff f9 be,a 200ed78 <IMFS_memfile_extend+0x98> <== ALWAYS TAKEN
200ed98: a0 04 20 01 inc %l0
for ( ; block>=old_blocks ; block-- ) {
200ed9c: 10 80 00 09 b 200edc0 <IMFS_memfile_extend+0xe0> <== NOT EXECUTED
200eda0: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
200eda4: f2 24 e0 4c st %i1, [ %l3 + 0x4c ] <== NOT EXECUTED
return 0;
}
200eda8: 81 c7 e0 08 ret
200edac: 91 e8 20 00 restore %g0, 0, %o0
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
200edb0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
200edb4: 7f ff fe cb call 200e8e0 <IMFS_memfile_remove_block> <== NOT EXECUTED
200edb8: 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-- ) {
200edbc: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED
200edc0: 08 bf ff fc bleu 200edb0 <IMFS_memfile_extend+0xd0> <== NOT EXECUTED
200edc4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
200edc8: 40 00 05 e9 call 201056c <__errno> <== NOT EXECUTED
200edcc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200edd0: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
200edd4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200edd8: 81 c7 e0 08 ret
200eddc: 81 e8 00 00 restore
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
200ede0: 40 00 05 e3 call 201056c <__errno> <== NOT EXECUTED
200ede4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ede8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200edec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200edf0: 81 c7 e0 08 ret <== NOT EXECUTED
200edf4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200edf8: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200edfc: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200ee00: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200ee04: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED
200ee08: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200ee0c: 7f ff cf cb call 2002d38 <__assert_func> <== NOT EXECUTED
200ee10: 92 10 21 31 mov 0x131, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200ee14: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200ee18: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200ee1c: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200ee20: 94 12 a2 20 or %o2, 0x220, %o2 <== NOT EXECUTED
200ee24: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED
200ee28: 7f ff cf c4 call 2002d38 <__assert_func> <== NOT EXECUTED
200ee2c: 92 10 21 35 mov 0x135, %o1 <== NOT EXECUTED
0200e620 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
200e620: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e624: 80 a6 20 00 cmp %i0, 0
200e628: 02 80 00 32 be 200e6f0 <IMFS_memfile_get_block_pointer+0xd0><== NEVER TAKEN
200e62c: 11 00 80 5b sethi %hi(0x2016c00), %o0
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e630: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200e634: 80 a0 60 05 cmp %g1, 5
200e638: 12 80 00 35 bne 200e70c <IMFS_memfile_get_block_pointer+0xec><== NEVER TAKEN
200e63c: 03 00 80 5f sethi %hi(0x2017c00), %g1
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
200e640: c4 00 62 9c ld [ %g1 + 0x29c ], %g2 ! 2017e9c <imfs_memfile_bytes_per_block>
200e644: a3 30 a0 02 srl %g2, 2, %l1
200e648: 82 04 7f ff add %l1, -1, %g1
200e64c: 80 a6 40 01 cmp %i1, %g1
200e650: 08 80 00 20 bleu 200e6d0 <IMFS_memfile_get_block_pointer+0xb0><== ALWAYS TAKEN
200e654: 80 a6 a0 00 cmp %i2, 0
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
200e658: 90 04 60 01 add %l1, 1, %o0 <== NOT EXECUTED
200e65c: 40 00 17 dd call 20145d0 <.umul> <== NOT EXECUTED
200e660: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200e664: 82 02 3f ff add %o0, -1, %g1 <== NOT EXECUTED
200e668: 80 a6 40 01 cmp %i1, %g1 <== NOT EXECUTED
200e66c: 18 80 00 3f bgu 200e768 <IMFS_memfile_get_block_pointer+0x148><== NOT EXECUTED
200e670: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
200e674: a0 26 40 11 sub %i1, %l1, %l0 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e678: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200e67c: 40 00 18 bb call 2014968 <.urem> <== NOT EXECUTED
200e680: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e684: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e688: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e68c: 40 00 18 0b call 20146b8 <.udiv> <== NOT EXECUTED
200e690: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
200e694: 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;
200e698: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
200e69c: 02 80 00 29 be 200e740 <IMFS_memfile_get_block_pointer+0x120><== NOT EXECUTED
200e6a0: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED
if ( !p ) {
200e6a4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e6a8: 02 80 00 6b be 200e854 <IMFS_memfile_get_block_pointer+0x234><== NOT EXECUTED
200e6ac: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
200e6b0: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED
200e6b4: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED
if ( !p1 ) {
200e6b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200e6bc: 02 80 00 5f be 200e838 <IMFS_memfile_get_block_pointer+0x218><== NOT EXECUTED
200e6c0: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ doubly ] = (block_p) p1;
}
return (block_p *)&p1[ singly ];
200e6c4: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED
200e6c8: 81 c7 e0 08 ret <== NOT EXECUTED
200e6cc: 91 e8 80 01 restore %g2, %g1, %o0 <== NOT EXECUTED
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
200e6d0: 02 80 00 16 be 200e728 <IMFS_memfile_get_block_pointer+0x108>
200e6d4: d0 06 20 50 ld [ %i0 + 0x50 ], %o0
if ( !p ) {
200e6d8: 80 a2 20 00 cmp %o0, 0
200e6dc: 02 80 00 50 be 200e81c <IMFS_memfile_get_block_pointer+0x1fc>
200e6e0: 01 00 00 00 nop
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
200e6e4: 83 2e 60 02 sll %i1, 2, %g1
200e6e8: 81 c7 e0 08 ret
200e6ec: 91 ea 00 01 restore %o0, %g1, %o0
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e6f0: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200e6f4: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200e6f8: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200e6fc: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED
200e700: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200e704: 7f ff d1 8d call 2002d38 <__assert_func> <== NOT EXECUTED
200e708: 92 10 23 86 mov 0x386, %o1 <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e70c: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200e710: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200e714: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200e718: 94 12 a1 80 or %o2, 0x180, %o2 <== NOT EXECUTED
200e71c: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED
200e720: 7f ff d1 86 call 2002d38 <__assert_func> <== NOT EXECUTED
200e724: 92 10 23 8a mov 0x38a, %o1 <== NOT EXECUTED
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
200e728: 83 2e 60 02 sll %i1, 2, %g1
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
200e72c: 80 a2 20 00 cmp %o0, 0
200e730: 02 80 00 0c be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NEVER TAKEN
200e734: b0 02 00 01 add %o0, %g1, %i0
/*
* This means the requested block number is out of range.
*/
return 0;
}
200e738: 81 c7 e0 08 ret
200e73c: 81 e8 00 00 restore
}
return (block_p *)&p1[ singly ];
}
if ( !p )
200e740: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e744: 02 80 00 07 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e748: 83 2c 20 02 sll %l0, 2, %g1 <== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
200e74c: c4 02 00 01 ld [ %o0 + %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 ];
200e750: 87 2c a0 02 sll %l2, 2, %g3 <== NOT EXECUTED
if ( !p )
return 0;
p = (block_p *)p[ doubly ];
if ( !p )
200e754: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200e758: 12 bf ff f8 bne 200e738 <IMFS_memfile_get_block_pointer+0x118><== NOT EXECUTED
200e75c: b0 00 80 03 add %g2, %g3, %i0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
200e760: 81 c7 e0 08 ret <== NOT EXECUTED
200e764: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
200e768: 90 02 20 01 inc %o0 <== NOT EXECUTED
200e76c: 40 00 17 99 call 20145d0 <.umul> <== NOT EXECUTED
200e770: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200e774: 90 02 3f ff add %o0, -1, %o0 <== NOT EXECUTED
200e778: 80 a6 40 08 cmp %i1, %o0 <== NOT EXECUTED
200e77c: 18 bf ff f9 bgu 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e780: a0 26 40 10 sub %i1, %l0, %l0 <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
200e784: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200e788: 40 00 18 78 call 2014968 <.urem> <== NOT EXECUTED
200e78c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e790: 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;
200e794: b2 10 00 08 mov %o0, %i1 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
200e798: 40 00 17 c8 call 20146b8 <.udiv> <== NOT EXECUTED
200e79c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
200e7a0: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
200e7a4: 40 00 17 c5 call 20146b8 <.udiv> <== NOT EXECUTED
200e7a8: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200e7ac: 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;
200e7b0: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
200e7b4: 40 00 18 6d call 2014968 <.urem> <== NOT EXECUTED
200e7b8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
200e7bc: 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;
200e7c0: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
200e7c4: 02 80 00 2b be 200e870 <IMFS_memfile_get_block_pointer+0x250><== NOT EXECUTED
200e7c8: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
if ( !p ) {
200e7cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e7d0: 02 80 00 3d be 200e8c4 <IMFS_memfile_get_block_pointer+0x2a4><== NOT EXECUTED
200e7d4: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
200e7d8: 83 2c a0 02 sll %l2, 2, %g1 <== NOT EXECUTED
200e7dc: c8 02 00 01 ld [ %o0 + %g1 ], %g4 <== NOT EXECUTED
if ( !p1 ) {
200e7e0: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
200e7e4: 02 80 00 31 be 200e8a8 <IMFS_memfile_get_block_pointer+0x288><== NOT EXECUTED
200e7e8: a0 02 00 01 add %o0, %g1, %l0 <== NOT EXECUTED
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
200e7ec: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED
200e7f0: d0 01 00 01 ld [ %g4 + %g1 ], %o0 <== NOT EXECUTED
if ( !p2 ) {
200e7f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e7f8: 12 bf ff bb bne 200e6e4 <IMFS_memfile_get_block_pointer+0xc4><== NOT EXECUTED
200e7fc: a0 01 00 01 add %g4, %g1, %l0 <== NOT EXECUTED
p2 = memfile_alloc_block();
200e800: 7f ff ff 7b call 200e5ec <memfile_alloc_block> <== NOT EXECUTED
200e804: 01 00 00 00 nop <== NOT EXECUTED
if ( !p2 )
200e808: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e80c: 02 bf ff d5 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e810: 01 00 00 00 nop <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
200e814: 10 bf ff b4 b 200e6e4 <IMFS_memfile_get_block_pointer+0xc4><== NOT EXECUTED
200e818: d0 24 00 00 st %o0, [ %l0 ] <== NOT EXECUTED
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200e81c: 7f ff ff 74 call 200e5ec <memfile_alloc_block>
200e820: 01 00 00 00 nop
if ( !p )
200e824: 80 a2 20 00 cmp %o0, 0
200e828: 02 bf ff ce be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NEVER TAKEN
200e82c: 01 00 00 00 nop
return 0;
info->indirect = p;
200e830: 10 bf ff ad b 200e6e4 <IMFS_memfile_get_block_pointer+0xc4>
200e834: d0 26 20 50 st %o0, [ %i0 + 0x50 ]
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200e838: 7f ff ff 6d call 200e5ec <memfile_alloc_block> <== NOT EXECUTED
200e83c: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
200e840: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
200e844: 02 bf ff c7 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e848: 01 00 00 00 nop <== NOT EXECUTED
return 0;
p[ doubly ] = (block_p) p1;
200e84c: 10 bf ff 9e b 200e6c4 <IMFS_memfile_get_block_pointer+0xa4><== NOT EXECUTED
200e850: c4 24 00 00 st %g2, [ %l0 ] <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200e854: 7f ff ff 66 call 200e5ec <memfile_alloc_block> <== NOT EXECUTED
200e858: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
200e85c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e860: 02 bf ff c0 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e864: 01 00 00 00 nop <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
200e868: 10 bf ff 92 b 200e6b0 <IMFS_memfile_get_block_pointer+0x90><== NOT EXECUTED
200e86c: d0 26 20 54 st %o0, [ %i0 + 0x54 ] <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
200e870: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e874: 02 bf ff bb be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e878: 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 ];
200e87c: d0 02 00 01 ld [ %o0 + %g1 ], %o0 <== NOT EXECUTED
if ( !p1 )
200e880: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e884: 02 bf ff b7 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e888: 83 2c 60 02 sll %l1, 2, %g1 <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
200e88c: c4 02 00 01 ld [ %o0 + %g1 ], %g2 <== NOT EXECUTED
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
200e890: 87 2e 60 02 sll %i1, 2, %g3 <== NOT EXECUTED
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
200e894: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
200e898: 02 bf ff b2 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e89c: b0 00 80 03 add %g2, %g3, %i0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
200e8a0: 81 c7 e0 08 ret <== NOT EXECUTED
200e8a4: 81 e8 00 00 restore <== NOT EXECUTED
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
200e8a8: 7f ff ff 51 call 200e5ec <memfile_alloc_block> <== NOT EXECUTED
200e8ac: 01 00 00 00 nop <== NOT EXECUTED
if ( !p1 )
200e8b0: 88 92 20 00 orcc %o0, 0, %g4 <== NOT EXECUTED
200e8b4: 02 bf ff ab be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e8b8: 01 00 00 00 nop <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
200e8bc: 10 bf ff cc b 200e7ec <IMFS_memfile_get_block_pointer+0x1cc><== NOT EXECUTED
200e8c0: c8 24 00 00 st %g4, [ %l0 ] <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
200e8c4: 7f ff ff 4a call 200e5ec <memfile_alloc_block> <== NOT EXECUTED
200e8c8: 01 00 00 00 nop <== NOT EXECUTED
if ( !p )
200e8cc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200e8d0: 02 bf ff a4 be 200e760 <IMFS_memfile_get_block_pointer+0x140><== NOT EXECUTED
200e8d4: 01 00 00 00 nop <== NOT EXECUTED
return 0;
info->triply_indirect = p;
200e8d8: 10 bf ff c0 b 200e7d8 <IMFS_memfile_get_block_pointer+0x1b8><== NOT EXECUTED
200e8dc: d0 26 20 58 st %o0, [ %i0 + 0x58 ] <== NOT EXECUTED
0200f26c <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
200f26c: 9d e3 bf 90 save %sp, -112, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200f270: a6 96 20 00 orcc %i0, 0, %l3
200f274: 02 80 00 8c be 200f4a4 <IMFS_memfile_read+0x238> <== NEVER TAKEN
200f278: 11 00 80 5b sethi %hi(0x2016c00), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
200f27c: c4 04 e0 48 ld [ %l3 + 0x48 ], %g2
200f280: 82 00 bf fb add %g2, -5, %g1
200f284: 80 a0 60 01 cmp %g1, 1
200f288: 18 80 00 95 bgu 200f4dc <IMFS_memfile_read+0x270> <== NEVER TAKEN
200f28c: 80 a6 a0 00 cmp %i2, 0
/*
* Error checks on arguments
*/
assert( dest );
200f290: 02 80 00 8c be 200f4c0 <IMFS_memfile_read+0x254> <== NEVER TAKEN
200f294: 80 a6 e0 00 cmp %i3, 0
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
200f298: 02 80 00 7d be 200f48c <IMFS_memfile_read+0x220> <== NEVER TAKEN
200f29c: 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) {
200f2a0: 02 80 00 57 be 200f3fc <IMFS_memfile_read+0x190> <== NEVER TAKEN
200f2a4: 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 )
200f2a8: c4 04 e0 4c ld [ %l3 + 0x4c ], %g2
200f2ac: 80 a0 40 02 cmp %g1, %g2
200f2b0: 08 80 00 3d bleu 200f3a4 <IMFS_memfile_read+0x138> <== NEVER TAKEN
200f2b4: a4 20 80 19 sub %g2, %i1, %l2
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2b8: 2b 00 80 5f sethi %hi(0x2017c00), %l5
200f2bc: f6 05 62 9c ld [ %l5 + 0x29c ], %i3 ! 2017e9c <imfs_memfile_bytes_per_block>
200f2c0: 90 10 00 19 mov %i1, %o0
200f2c4: 40 00 15 ab call 2014970 <.rem>
200f2c8: 92 10 00 1b mov %i3, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2cc: 92 10 00 1b mov %i3, %o1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2d0: b0 10 00 08 mov %o0, %i0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2d4: 40 00 14 fb call 20146c0 <.div>
200f2d8: 90 10 00 19 mov %i1, %o0
if ( start_offset ) {
200f2dc: 80 a6 20 00 cmp %i0, 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;
200f2e0: b2 10 00 08 mov %o0, %i1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2e4: a8 15 62 9c or %l5, 0x29c, %l4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
200f2e8: a2 10 00 1a mov %i2, %l1
200f2ec: 12 80 00 30 bne 200f3ac <IMFS_memfile_read+0x140>
200f2f0: a0 10 20 00 clr %l0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200f2f4: f6 05 62 9c ld [ %l5 + 0x29c ], %i3
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200f2f8: 80 a4 80 1b cmp %l2, %i3
200f2fc: 0a 80 00 15 bcs 200f350 <IMFS_memfile_read+0xe4>
200f300: 80 a4 a0 00 cmp %l2, 0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200f304: 90 10 00 13 mov %l3, %o0
200f308: 92 10 00 19 mov %i1, %o1
200f30c: 7f ff fc c5 call 200e620 <IMFS_memfile_get_block_pointer>
200f310: 94 10 20 00 clr %o2
assert( block_ptr );
200f314: 80 a2 20 00 cmp %o0, 0
200f318: 22 80 00 56 be,a 200f470 <IMFS_memfile_read+0x204> <== NEVER TAKEN
200f31c: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
200f320: d2 02 00 00 ld [ %o0 ], %o1
200f324: 94 10 00 1b mov %i3, %o2
200f328: 40 00 08 b9 call 201160c <memcpy>
200f32c: 90 10 00 11 mov %l1, %o0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200f330: c2 05 00 00 ld [ %l4 ], %g1
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
200f334: a4 24 80 1b sub %l2, %i3, %l2
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
200f338: a2 04 40 1b add %l1, %i3, %l1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200f33c: 80 a0 40 12 cmp %g1, %l2
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
200f340: 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 ) {
200f344: 08 bf ff f0 bleu 200f304 <IMFS_memfile_read+0x98>
200f348: a0 04 00 1b add %l0, %i3, %l0
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
200f34c: 80 a4 a0 00 cmp %l2, 0
200f350: 02 80 00 0d be 200f384 <IMFS_memfile_read+0x118>
200f354: b0 10 00 10 mov %l0, %i0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200f358: 92 10 00 19 mov %i1, %o1
200f35c: 90 10 00 13 mov %l3, %o0
200f360: 7f ff fc b0 call 200e620 <IMFS_memfile_get_block_pointer>
200f364: 94 10 20 00 clr %o2
assert( block_ptr );
200f368: 80 a2 20 00 cmp %o0, 0
200f36c: 02 80 00 6b be 200f518 <IMFS_memfile_read+0x2ac> <== NEVER TAKEN
200f370: b0 04 80 10 add %l2, %l0, %i0
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
200f374: d2 02 00 00 ld [ %o0 ], %o1
200f378: 90 10 00 11 mov %l1, %o0
200f37c: 40 00 08 a4 call 201160c <memcpy>
200f380: 94 10 00 12 mov %l2, %o2
copied += my_length;
}
IMFS_update_atime( the_jnode );
200f384: 90 07 bf f0 add %fp, -16, %o0
200f388: 7f ff d1 33 call 2003854 <gettimeofday>
200f38c: 92 10 20 00 clr %o1
200f390: c2 07 bf f0 ld [ %fp + -16 ], %g1
return copied;
200f394: 94 10 00 18 mov %i0, %o2
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
copied += my_length;
}
IMFS_update_atime( the_jnode );
200f398: c2 24 e0 3c st %g1, [ %l3 + 0x3c ]
return copied;
}
200f39c: 81 c7 e0 08 ret
200f3a0: 91 e8 00 0a restore %g0, %o2, %o0
* 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 )
200f3a4: 10 bf ff c5 b 200f2b8 <IMFS_memfile_read+0x4c> <== NOT EXECUTED
200f3a8: a4 10 00 1b mov %i3, %l2 <== 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 );
200f3ac: 90 10 00 13 mov %l3, %o0
200f3b0: 92 10 00 19 mov %i1, %o1
200f3b4: 7f ff fc 9b call 200e620 <IMFS_memfile_get_block_pointer>
200f3b8: 94 10 20 00 clr %o2
assert( block_ptr );
200f3bc: 80 a2 20 00 cmp %o0, 0
200f3c0: 02 80 00 4e be 200f4f8 <IMFS_memfile_read+0x28c> <== NEVER TAKEN
200f3c4: 92 26 c0 18 sub %i3, %i0, %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;
200f3c8: 80 a4 80 09 cmp %l2, %o1
200f3cc: 18 80 00 1e bgu 200f444 <IMFS_memfile_read+0x1d8>
200f3d0: 94 10 00 12 mov %l2, %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 );
200f3d4: d2 02 00 00 ld [ %o0 ], %o1
dest += to_copy;
200f3d8: a2 06 80 0a add %i2, %o2, %l1
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 );
200f3dc: 92 02 40 18 add %o1, %i0, %o1
dest += to_copy;
block++;
200f3e0: b2 06 60 01 inc %i1
my_length -= to_copy;
200f3e4: a4 24 80 0a sub %l2, %o2, %l2
200f3e8: a0 10 00 0a mov %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 );
200f3ec: 40 00 08 88 call 201160c <memcpy>
200f3f0: 90 10 00 1a mov %i2, %o0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200f3f4: 10 bf ff c1 b 200f2f8 <IMFS_memfile_read+0x8c>
200f3f8: f6 05 62 9c ld [ %l5 + 0x29c ], %i3
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))
200f3fc: c2 04 e0 4c ld [ %l3 + 0x4c ], %g1 <== NOT EXECUTED
200f400: b0 20 40 19 sub %g1, %i1, %i0 <== NOT EXECUTED
200f404: 80 a6 00 1b cmp %i0, %i3 <== NOT EXECUTED
200f408: 18 80 00 08 bgu 200f428 <IMFS_memfile_read+0x1bc> <== NOT EXECUTED
200f40c: d2 04 e0 50 ld [ %l3 + 0x50 ], %o1 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200f410: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200f414: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED
200f418: 40 00 08 7d call 201160c <memcpy> <== NOT EXECUTED
200f41c: 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 );
200f420: 10 bf ff da b 200f388 <IMFS_memfile_read+0x11c> <== NOT EXECUTED
200f424: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
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))
200f428: b0 10 00 1b mov %i3, %i0 <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
200f42c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
200f430: 92 02 40 19 add %o1, %i1, %o1 <== NOT EXECUTED
200f434: 40 00 08 76 call 201160c <memcpy> <== NOT EXECUTED
200f438: 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 );
200f43c: 10 bf ff d3 b 200f388 <IMFS_memfile_read+0x11c> <== NOT EXECUTED
200f440: 90 07 bf f0 add %fp, -16, %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;
200f444: 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 );
200f448: d2 02 00 00 ld [ %o0 ], %o1
dest += to_copy;
200f44c: a2 06 80 0a add %i2, %o2, %l1
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 );
200f450: 92 02 40 18 add %o1, %i0, %o1
dest += to_copy;
block++;
200f454: b2 06 60 01 inc %i1
my_length -= to_copy;
200f458: a4 24 80 0a sub %l2, %o2, %l2
200f45c: a0 10 00 0a mov %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 );
200f460: 40 00 08 6b call 201160c <memcpy>
200f464: 90 10 00 1a mov %i2, %o0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200f468: 10 bf ff a4 b 200f2f8 <IMFS_memfile_read+0x8c>
200f46c: f6 05 62 9c ld [ %l5 + 0x29c ], %i3
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
200f470: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f474: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f478: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f47c: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f480: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f484: 7f ff ce 2d call 2002d38 <__assert_func> <== NOT EXECUTED
200f488: 92 10 22 a5 mov 0x2a5, %o1 <== 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 );
200f48c: 40 00 04 38 call 201056c <__errno> <== NOT EXECUTED
200f490: 01 00 00 00 nop <== NOT EXECUTED
200f494: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
200f498: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
200f49c: 10 bf ff c0 b 200f39c <IMFS_memfile_read+0x130> <== NOT EXECUTED
200f4a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200f4a4: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f4a8: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f4ac: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f4b0: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f4b4: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200f4b8: 7f ff ce 20 call 2002d38 <__assert_func> <== NOT EXECUTED
200f4bc: 92 10 22 4a mov 0x24a, %o1 <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
200f4c0: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f4c4: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f4c8: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f4cc: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f4d0: 96 12 e1 78 or %o3, 0x178, %o3 <== NOT EXECUTED
200f4d4: 7f ff ce 19 call 2002d38 <__assert_func> <== NOT EXECUTED
200f4d8: 92 10 22 58 mov 0x258, %o1 <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
200f4dc: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f4e0: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f4e4: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f4e8: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f4ec: 96 12 e1 28 or %o3, 0x128, %o3 <== NOT EXECUTED
200f4f0: 7f ff ce 12 call 2002d38 <__assert_func> <== NOT EXECUTED
200f4f4: 92 10 22 4f mov 0x24f, %o1 <== 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 );
200f4f8: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200f4fc: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f500: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f504: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f508: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f50c: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f510: 7f ff ce 0a call 2002d38 <__assert_func> <== NOT EXECUTED
200f514: 92 10 22 94 mov 0x294, %o1 <== 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 );
200f518: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200f51c: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f520: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f524: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f528: 94 12 a1 b8 or %o2, 0x1b8, %o2 <== NOT EXECUTED
200f52c: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f530: 7f ff ce 02 call 2002d38 <__assert_func> <== NOT EXECUTED
200f534: 92 10 22 b7 mov 0x2b7, %o1 <== NOT EXECUTED
0200e994 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
200e994: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200e998: 80 a6 20 00 cmp %i0, 0
200e99c: 02 80 00 5f be 200eb18 <IMFS_memfile_remove+0x184> <== NEVER TAKEN
200e9a0: 11 00 80 5b sethi %hi(0x2016c00), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200e9a4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200e9a8: 80 a0 60 05 cmp %g1, 5
200e9ac: 12 80 00 62 bne 200eb34 <IMFS_memfile_remove+0x1a0> <== NEVER TAKEN
200e9b0: 23 00 80 5f sethi %hi(0x2017c00), %l1
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e9b4: 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;
200e9b8: c4 04 62 9c ld [ %l1 + 0x29c ], %g2
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e9bc: 80 a0 60 00 cmp %g1, 0
/*
* 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;
200e9c0: a5 30 a0 02 srl %g2, 2, %l2
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
200e9c4: 02 80 00 05 be 200e9d8 <IMFS_memfile_remove+0x44>
200e9c8: aa 14 62 9c or %l1, 0x29c, %l5
memfile_free_blocks_in_table( &info->indirect, to_free );
200e9cc: 90 06 20 50 add %i0, 0x50, %o0
200e9d0: 7f ff ff d0 call 200e910 <memfile_free_blocks_in_table>
200e9d4: 92 10 00 12 mov %l2, %o1
}
if ( info->doubly_indirect ) {
200e9d8: d0 06 20 54 ld [ %i0 + 0x54 ], %o0
200e9dc: 80 a2 20 00 cmp %o0, 0
200e9e0: 02 80 00 19 be 200ea44 <IMFS_memfile_remove+0xb0> <== ALWAYS TAKEN
200e9e4: c2 04 62 9c ld [ %l1 + 0x29c ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200e9e8: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200e9ec: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200e9f0: 02 80 00 12 be 200ea38 <IMFS_memfile_remove+0xa4> <== NOT EXECUTED
200e9f4: 82 10 20 00 clr %g1 <== NOT EXECUTED
200e9f8: 10 80 00 03 b 200ea04 <IMFS_memfile_remove+0x70> <== NOT EXECUTED
200e9fc: a0 10 20 00 clr %l0 <== NOT EXECUTED
200ea00: d0 06 20 54 ld [ %i0 + 0x54 ], %o0 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
200ea04: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED
200ea08: c2 02 00 02 ld [ %o0 + %g2 ], %g1 <== NOT EXECUTED
200ea0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ea10: 02 80 00 04 be 200ea20 <IMFS_memfile_remove+0x8c> <== NOT EXECUTED
200ea14: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table(
200ea18: 7f ff ff be call 200e910 <memfile_free_blocks_in_table> <== NOT EXECUTED
200ea1c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200ea20: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200ea24: a0 04 20 01 inc %l0 <== NOT EXECUTED
200ea28: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200ea2c: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
200ea30: 18 bf ff f4 bgu 200ea00 <IMFS_memfile_remove+0x6c> <== NOT EXECUTED
200ea34: 82 10 00 10 mov %l0, %g1 <== 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 );
200ea38: 90 06 20 54 add %i0, 0x54, %o0 <== NOT EXECUTED
200ea3c: 7f ff ff b5 call 200e910 <memfile_free_blocks_in_table> <== NOT EXECUTED
200ea40: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
200ea44: d0 06 20 58 ld [ %i0 + 0x58 ], %o0
200ea48: 80 a2 20 00 cmp %o0, 0
200ea4c: 02 80 00 31 be 200eb10 <IMFS_memfile_remove+0x17c> <== ALWAYS TAKEN
200ea50: c2 04 62 9c ld [ %l1 + 0x29c ], %g1
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200ea54: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200ea58: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ea5c: 22 80 00 2b be,a 200eb08 <IMFS_memfile_remove+0x174> <== NOT EXECUTED
200ea60: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
200ea64: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
200ea68: a8 10 20 00 clr %l4 <== NOT EXECUTED
200ea6c: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
200ea70: 02 80 00 25 be 200eb04 <IMFS_memfile_remove+0x170> <== NOT EXECUTED
200ea74: a6 10 20 00 clr %l3 <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200ea78: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200ea7c: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200ea80: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ea84: 02 80 00 11 be 200eac8 <IMFS_memfile_remove+0x134> <== NOT EXECUTED
200ea88: 82 10 20 00 clr %g1 <== NOT EXECUTED
200ea8c: a0 10 20 00 clr %l0 <== NOT EXECUTED
if ( p[j] ) {
200ea90: 85 28 60 02 sll %g1, 2, %g2 <== NOT EXECUTED
200ea94: c2 04 40 02 ld [ %l1 + %g2 ], %g1 <== NOT EXECUTED
200ea98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200ea9c: 02 80 00 04 be 200eaac <IMFS_memfile_remove+0x118> <== NOT EXECUTED
200eaa0: 90 04 40 02 add %l1, %g2, %o0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
200eaa4: 7f ff ff 9b call 200e910 <memfile_free_blocks_in_table> <== NOT EXECUTED
200eaa8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
200eaac: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200eab0: a0 04 20 01 inc %l0 <== NOT EXECUTED
200eab4: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200eab8: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
200eabc: 18 bf ff f5 bgu 200ea90 <IMFS_memfile_remove+0xfc> <== NOT EXECUTED
200eac0: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED
200eac4: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
200eac8: 90 02 00 13 add %o0, %l3, %o0 <== NOT EXECUTED
200eacc: 7f ff ff 91 call 200e910 <memfile_free_blocks_in_table> <== NOT EXECUTED
200ead0: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
200ead4: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
200ead8: a8 05 20 01 inc %l4 <== NOT EXECUTED
200eadc: 83 30 60 02 srl %g1, 2, %g1 <== NOT EXECUTED
200eae0: 80 a0 40 14 cmp %g1, %l4 <== NOT EXECUTED
200eae4: 08 80 00 09 bleu 200eb08 <IMFS_memfile_remove+0x174> <== NOT EXECUTED
200eae8: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
200eaec: d0 06 20 58 ld [ %i0 + 0x58 ], %o0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
200eaf0: a7 2d 20 02 sll %l4, 2, %l3 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
200eaf4: e2 02 00 13 ld [ %o0 + %l3 ], %l1 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
200eaf8: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
200eafc: 32 bf ff e0 bne,a 200ea7c <IMFS_memfile_remove+0xe8> <== NOT EXECUTED
200eb00: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
200eb04: 90 06 20 58 add %i0, 0x58, %o0 <== NOT EXECUTED
200eb08: 7f ff ff 82 call 200e910 <memfile_free_blocks_in_table> <== NOT EXECUTED
200eb0c: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
200eb10: 81 c7 e0 08 ret
200eb14: 91 e8 20 00 restore %g0, 0, %o0
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200eb18: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200eb1c: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200eb20: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200eb24: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED
200eb28: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200eb2c: 7f ff d0 83 call 2002d38 <__assert_func> <== NOT EXECUTED
200eb30: 92 10 21 ec mov 0x1ec, %o1 <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200eb34: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200eb38: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200eb3c: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200eb40: 94 12 a1 d0 or %o2, 0x1d0, %o2 <== NOT EXECUTED
200eb44: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED
200eb48: 7f ff d0 7c call 2002d38 <__assert_func> <== NOT EXECUTED
200eb4c: 92 10 21 f0 mov 0x1f0, %o1 <== NOT EXECUTED
0200e8e0 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
200e8e0: 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 );
200e8e4: 94 10 20 00 clr %o2 <== NOT EXECUTED
200e8e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200e8ec: 7f ff ff 4d call 200e620 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
200e8f0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
ptr = *block_entry_ptr;
200e8f4: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
*block_entry_ptr = 0;
memfile_free_block( ptr );
return 1;
}
200e8f8: 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;
200e8fc: c0 22 00 00 clr [ %o0 ] <== NOT EXECUTED
memfile_free_block( ptr );
200e900: 7f ff ff 32 call 200e5c8 <memfile_free_block> <== NOT EXECUTED
200e904: 90 10 00 01 mov %g1, %o0 <== NOT EXECUTED
return 1;
}
200e908: 81 c7 e0 08 ret <== NOT EXECUTED
200e90c: 81 e8 00 00 restore <== NOT EXECUTED
0200ef00 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
200ef00: 9d e3 bf 90 save %sp, -112, %sp
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200ef04: a2 96 20 00 orcc %i0, 0, %l1
200ef08: 02 80 00 83 be 200f114 <IMFS_memfile_write+0x214> <== NEVER TAKEN
200ef0c: 11 00 80 5b sethi %hi(0x2016c00), %o0
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200ef10: c2 04 60 48 ld [ %l1 + 0x48 ], %g1
200ef14: 80 a0 60 05 cmp %g1, 5
200ef18: 12 80 00 78 bne 200f0f8 <IMFS_memfile_write+0x1f8> <== NEVER TAKEN
200ef1c: 80 a6 a0 00 cmp %i2, 0
/*
* Error check arguments
*/
assert( source );
200ef20: 02 80 00 84 be 200f130 <IMFS_memfile_write+0x230> <== NEVER TAKEN
200ef24: 80 a6 e0 00 cmp %i3, 0
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
200ef28: 02 80 00 6e be 200f0e0 <IMFS_memfile_write+0x1e0> <== NEVER TAKEN
200ef2c: 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 ) {
200ef30: c2 04 60 4c ld [ %l1 + 0x4c ], %g1
200ef34: 80 a2 40 01 cmp %o1, %g1
200ef38: 18 80 00 4d bgu 200f06c <IMFS_memfile_write+0x16c> <== ALWAYS TAKEN
200ef3c: 27 00 80 5f sethi %hi(0x2017c00), %l3
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200ef40: e0 04 e2 9c ld [ %l3 + 0x29c ], %l0 ! 2017e9c <imfs_memfile_bytes_per_block>
200ef44: 90 10 00 19 mov %i1, %o0
200ef48: 40 00 16 8a call 2014970 <.rem>
200ef4c: 92 10 00 10 mov %l0, %o1
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200ef50: 92 10 00 10 mov %l0, %o1
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
200ef54: b0 10 00 08 mov %o0, %i0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
200ef58: 40 00 15 da call 20146c0 <.div>
200ef5c: 90 10 00 19 mov %i1, %o0
if ( start_offset ) {
200ef60: 80 a6 20 00 cmp %i0, 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;
200ef64: b2 10 00 08 mov %o0, %i1
if ( start_offset ) {
200ef68: 12 80 00 2e bne 200f020 <IMFS_memfile_write+0x120>
200ef6c: a4 14 e2 9c or %l3, 0x29c, %l2
200ef70: a0 10 00 1a mov %i2, %l0
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200ef74: f4 04 e2 9c ld [ %l3 + 0x29c ], %i2
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
200ef78: 80 a6 c0 1a cmp %i3, %i2
200ef7c: 0a 80 00 14 bcs 200efcc <IMFS_memfile_write+0xcc>
200ef80: 80 a6 e0 00 cmp %i3, 0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200ef84: 90 10 00 11 mov %l1, %o0
200ef88: 92 10 00 19 mov %i1, %o1
200ef8c: 7f ff fd a5 call 200e620 <IMFS_memfile_get_block_pointer>
200ef90: 94 10 20 00 clr %o2
assert( block_ptr );
200ef94: 80 a2 20 00 cmp %o0, 0
200ef98: 02 80 00 4a be 200f0c0 <IMFS_memfile_write+0x1c0> <== NEVER TAKEN
200ef9c: 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, to_copy );
200efa0: d0 02 00 00 ld [ %o0 ], %o0
200efa4: 40 00 09 9a call 201160c <memcpy>
200efa8: 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 ) {
200efac: c2 04 80 00 ld [ %l2 ], %g1
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++;
my_length -= to_copy;
200efb0: b6 26 c0 1a sub %i3, %i2, %i3
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
200efb4: 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 ) {
200efb8: 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++;
200efbc: 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 ) {
200efc0: 08 bf ff f1 bleu 200ef84 <IMFS_memfile_write+0x84> <== NEVER TAKEN
200efc4: b0 06 00 1a add %i0, %i2, %i0
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
200efc8: 80 a6 e0 00 cmp %i3, 0
200efcc: 02 80 00 0e be 200f004 <IMFS_memfile_write+0x104>
200efd0: 90 07 bf f0 add %fp, -16, %o0
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
200efd4: 92 10 00 19 mov %i1, %o1
200efd8: 90 10 00 11 mov %l1, %o0
200efdc: 7f ff fd 91 call 200e620 <IMFS_memfile_get_block_pointer>
200efe0: 94 10 20 00 clr %o2
assert( block_ptr );
200efe4: 80 a2 20 00 cmp %o0, 0
200efe8: 02 80 00 61 be 200f16c <IMFS_memfile_write+0x26c> <== NEVER TAKEN
200efec: b0 06 00 1b add %i0, %i3, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
200eff0: d0 02 00 00 ld [ %o0 ], %o0
200eff4: 92 10 00 10 mov %l0, %o1
200eff8: 40 00 09 85 call 201160c <memcpy>
200effc: 94 10 00 1b mov %i3, %o2
my_length = 0;
copied += to_copy;
}
IMFS_atime_mtime_update( the_jnode );
200f000: 90 07 bf f0 add %fp, -16, %o0
200f004: 7f ff d2 14 call 2003854 <gettimeofday>
200f008: 92 10 20 00 clr %o1
200f00c: c2 07 bf f0 ld [ %fp + -16 ], %g1
200f010: c2 24 60 3c st %g1, [ %l1 + 0x3c ]
200f014: c2 24 60 40 st %g1, [ %l1 + 0x40 ]
return copied;
}
200f018: 81 c7 e0 08 ret
200f01c: 81 e8 00 00 restore
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 );
200f020: 90 10 00 11 mov %l1, %o0
200f024: 92 10 00 19 mov %i1, %o1
200f028: 7f ff fd 7e call 200e620 <IMFS_memfile_get_block_pointer>
200f02c: 94 10 20 00 clr %o2
assert( block_ptr );
200f030: 80 a2 20 00 cmp %o0, 0
200f034: 02 80 00 46 be 200f14c <IMFS_memfile_write+0x24c> <== NEVER TAKEN
200f038: 94 24 00 18 sub %l0, %i0, %o2
*/
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;
200f03c: 80 a2 80 1b cmp %o2, %i3
200f040: 18 80 00 16 bgu 200f098 <IMFS_memfile_write+0x198> <== ALWAYS TAKEN
200f044: 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;
200f048: 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 );
200f04c: 90 02 00 18 add %o0, %i0, %o0 <== NOT EXECUTED
src += to_copy;
block++;
200f050: b2 06 60 01 inc %i1 <== NOT EXECUTED
my_length -= to_copy;
200f054: b6 26 c0 0a sub %i3, %o2, %i3 <== NOT EXECUTED
copied += to_copy;
200f058: b0 10 00 0a mov %o2, %i0 <== 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 );
200f05c: 40 00 09 6c call 201160c <memcpy> <== NOT EXECUTED
200f060: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200f064: 10 bf ff c5 b 200ef78 <IMFS_memfile_write+0x78> <== NOT EXECUTED
200f068: f4 04 e2 9c ld [ %l3 + 0x29c ], %i2 <== NOT EXECUTED
* 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 );
200f06c: 7f ff ff 1d call 200ece0 <IMFS_memfile_extend>
200f070: 90 10 00 11 mov %l1, %o0
if ( status )
200f074: 80 a2 20 00 cmp %o0, 0
200f078: 02 bf ff b2 be 200ef40 <IMFS_memfile_write+0x40> <== ALWAYS TAKEN
200f07c: 27 00 80 5f sethi %hi(0x2017c00), %l3
rtems_set_errno_and_return_minus_one( ENOSPC );
200f080: 40 00 05 3b call 201056c <__errno> <== NOT EXECUTED
200f084: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f088: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
200f08c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f090: 81 c7 e0 08 ret <== NOT EXECUTED
200f094: 81 e8 00 00 restore <== 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;
200f098: 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 );
200f09c: 90 02 00 18 add %o0, %i0, %o0
src += to_copy;
200f0a0: a0 06 80 0a add %i2, %o2, %l0
block++;
200f0a4: b2 06 60 01 inc %i1
my_length -= to_copy;
200f0a8: b6 26 c0 0a sub %i3, %o2, %i3
copied += to_copy;
200f0ac: b0 10 00 0a mov %o2, %i0
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
200f0b0: 40 00 09 57 call 201160c <memcpy>
200f0b4: 92 10 00 1a mov %i2, %o1
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
200f0b8: 10 bf ff b0 b 200ef78 <IMFS_memfile_write+0x78>
200f0bc: f4 04 e2 9c ld [ %l3 + 0x29c ], %i2
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
200f0c0: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200f0c4: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f0c8: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f0cc: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f0d0: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f0d4: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f0d8: 7f ff cf 18 call 2002d38 <__assert_func> <== NOT EXECUTED
200f0dc: 92 10 23 2e mov 0x32e, %o1 <== 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 );
200f0e0: 40 00 05 23 call 201056c <__errno> <== NOT EXECUTED
200f0e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f0e8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200f0ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f0f0: 81 c7 e0 08 ret <== NOT EXECUTED
200f0f4: 81 e8 00 00 restore <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
200f0f8: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f0fc: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f100: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f104: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f108: 96 12 e0 d8 or %o3, 0xd8, %o3 <== NOT EXECUTED
200f10c: 7f ff cf 0b call 2002d38 <__assert_func> <== NOT EXECUTED
200f110: 92 10 22 e5 mov 0x2e5, %o1 <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
200f114: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f118: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f11c: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f120: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f124: 96 12 e0 c8 or %o3, 0xc8, %o3 <== NOT EXECUTED
200f128: 7f ff cf 04 call 2002d38 <__assert_func> <== NOT EXECUTED
200f12c: 92 10 22 e1 mov 0x2e1, %o1 <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
200f130: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f134: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f138: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f13c: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f140: 96 12 e1 10 or %o3, 0x110, %o3 <== NOT EXECUTED
200f144: 7f ff ce fd call 2002d38 <__assert_func> <== NOT EXECUTED
200f148: 92 10 22 ed mov 0x2ed, %o1 <== 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 );
200f14c: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200f150: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f154: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f158: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f15c: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f160: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f164: 7f ff ce f5 call 2002d38 <__assert_func> <== NOT EXECUTED
200f168: 92 10 23 1a mov 0x31a, %o1 <== 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 );
200f16c: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200f170: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200f174: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200f178: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200f17c: 94 12 a1 a0 or %o2, 0x1a0, %o2 <== NOT EXECUTED
200f180: 96 12 e1 18 or %o3, 0x118, %o3 <== NOT EXECUTED
200f184: 7f ff ce ed call 2002d38 <__assert_func> <== NOT EXECUTED
200f188: 92 10 23 44 mov 0x344, %o1 <== NOT EXECUTED
0200a52c <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
200a52c: 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 );
200a530: 90 10 00 18 mov %i0, %o0
200a534: 94 07 bf f4 add %fp, -12, %o2
200a538: b0 07 bf c0 add %fp, -64, %i0
200a53c: 7f ff ff 83 call 200a348 <IMFS_get_token>
200a540: 92 10 00 18 mov %i0, %o1
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
200a544: b3 2e 60 10 sll %i1, 0x10, %i1
200a548: 03 00 00 3c sethi %hi(0xf000), %g1
200a54c: 97 36 60 10 srl %i1, 0x10, %o3
200a550: 05 00 00 10 sethi %hi(0x4000), %g2
200a554: 86 0a c0 01 and %o3, %g1, %g3
200a558: 80 a0 c0 02 cmp %g3, %g2
200a55c: 02 80 00 1f be 200a5d8 <IMFS_mknod+0xac>
200a560: 90 10 00 1c mov %i4, %o0
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
200a564: 03 00 00 20 sethi %hi(0x8000), %g1
200a568: 80 a0 c0 01 cmp %g3, %g1
200a56c: 02 80 00 12 be 200a5b4 <IMFS_mknod+0x88>
200a570: 92 10 20 05 mov 5, %o1
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
200a574: 03 00 00 18 sethi %hi(0x6000), %g1
200a578: 80 a0 c0 01 cmp %g3, %g1
200a57c: 02 80 00 0b be 200a5a8 <IMFS_mknod+0x7c> <== NEVER TAKEN
200a580: 03 00 00 08 sethi %hi(0x2000), %g1
200a584: 80 a0 c0 01 cmp %g3, %g1
200a588: 22 80 00 09 be,a 200a5ac <IMFS_mknod+0x80> <== ALWAYS TAKEN
200a58c: f4 27 bf e4 st %i2, [ %fp + -28 ]
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
} else {
rtems_set_errno_and_return_minus_one( EINVAL );
200a590: 40 00 0d 60 call 200db10 <__errno> <== NOT EXECUTED
200a594: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a598: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
200a59c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a5a0: 81 c7 e0 08 ret <== NOT EXECUTED
200a5a4: 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 );
200a5a8: f4 27 bf e4 st %i2, [ %fp + -28 ] <== NOT EXECUTED
200a5ac: f6 27 bf e8 st %i3, [ %fp + -24 ]
200a5b0: 92 10 20 02 mov 2, %o1
/*
* Allocate and fill in an IMFS jnode
*/
new_node = IMFS_create_node(
200a5b4: 94 10 00 18 mov %i0, %o2
200a5b8: 98 07 bf e4 add %fp, -28, %o4
200a5bc: 40 00 0a 00 call 200cdbc <IMFS_create_node>
200a5c0: b0 10 20 00 clr %i0
new_name,
mode,
&info
);
if ( !new_node )
200a5c4: 80 a2 20 00 cmp %o0, 0
200a5c8: 02 80 00 06 be 200a5e0 <IMFS_mknod+0xb4> <== NEVER TAKEN
200a5cc: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
200a5d0: 81 c7 e0 08 ret
200a5d4: 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 );
200a5d8: 10 bf ff f7 b 200a5b4 <IMFS_mknod+0x88>
200a5dc: 92 10 20 01 mov 1, %o1
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
200a5e0: 40 00 0d 4c call 200db10 <__errno> <== NOT EXECUTED
200a5e4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a5e8: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200a5ec: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
}
200a5f0: 81 c7 e0 08 ret <== NOT EXECUTED
200a5f4: 81 e8 00 00 restore <== NOT EXECUTED
02002958 <IMFS_mount>:
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002958: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
200295c: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002960: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
2002964: 80 a0 60 01 cmp %g1, 1
2002968: 12 80 00 05 bne 200297c <IMFS_mount+0x24> <== NEVER TAKEN
200296c: 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;
2002970: f0 20 a0 58 st %i0, [ %g2 + 0x58 ]
return 0;
}
2002974: 81 c7 e0 08 ret
2002978: 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 );
200297c: 40 00 36 fc call 201056c <__errno> <== NOT EXECUTED
2002980: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002984: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2002988: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200298c: 81 c7 e0 08 ret <== NOT EXECUTED
2002990: 81 e8 00 00 restore <== NOT EXECUTED
020039d4 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
20039d4: 9d e3 bf 98 save %sp, -104, %sp
assert( the_jnode );
20039d8: 80 a6 20 00 cmp %i0, 0
20039dc: 02 80 00 52 be 2003b24 <IMFS_print_jnode+0x150> <== NEVER TAKEN
20039e0: 21 00 80 7e sethi %hi(0x201f800), %l0
fprintf(stdout, "%s", the_jnode->name );
20039e4: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 ! 201faa8 <_impure_ptr>
20039e8: 90 06 20 0c add %i0, 0xc, %o0
20039ec: 40 00 3b 7d call 20127e0 <fputs>
20039f0: d2 00 60 08 ld [ %g1 + 8 ], %o1
switch( the_jnode->type ) {
20039f4: d4 06 20 48 ld [ %i0 + 0x48 ], %o2
20039f8: 80 a2 a0 06 cmp %o2, 6
20039fc: 08 80 00 0f bleu 2003a38 <IMFS_print_jnode+0x64> <== ALWAYS TAKEN
2003a00: 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 );
2003a04: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 <== NOT EXECUTED
2003a08: 13 00 80 76 sethi %hi(0x201d800), %o1 <== NOT EXECUTED
2003a0c: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2003a10: 40 00 3b 22 call 2012698 <fprintf> <== NOT EXECUTED
2003a14: 92 12 60 e8 or %o1, 0xe8, %o1 <== NOT EXECUTED
assert(0);
2003a18: 92 10 20 67 mov 0x67, %o1 <== NOT EXECUTED
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
assert(0);
2003a1c: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED
2003a20: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED
2003a24: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED
2003a28: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
2003a2c: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
2003a30: 40 00 02 3f call 200432c <__assert_func> <== NOT EXECUTED
2003a34: 96 12 e0 e0 or %o3, 0xe0, %o3 <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
2003a38: 05 00 80 0e sethi %hi(0x2003800), %g2
2003a3c: 84 10 a1 7c or %g2, 0x17c, %g2 ! 200397c <sparc_enable_interrupts+0x10>
2003a40: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2003a44: 81 c0 c0 00 jmp %g3
2003a48: 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)",
2003a4c: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 <== NOT EXECUTED
2003a50: d6 06 20 50 ld [ %i0 + 0x50 ], %o3 <== NOT EXECUTED
2003a54: d4 06 20 4c ld [ %i0 + 0x4c ], %o2 <== NOT EXECUTED
2003a58: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
2003a5c: 13 00 80 76 sethi %hi(0x201d800), %o1 <== NOT EXECUTED
2003a60: 40 00 3b 0e call 2012698 <fprintf> <== NOT EXECUTED
2003a64: 92 12 60 a8 or %o1, 0xa8, %o1 ! 201d8a8 <pollCallbacks.4788+0x388><== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2003a68: 31 00 80 75 sethi %hi(0x201d400), %i0 <== NOT EXECUTED
2003a6c: 40 00 42 2b call 2014318 <puts> <== NOT EXECUTED
2003a70: 91 ee 23 e0 restore %i0, 0x3e0, %o0 <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
2003a74: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1
2003a78: d4 06 20 4c ld [ %i0 + 0x4c ], %o2
2003a7c: d0 00 60 08 ld [ %g1 + 8 ], %o0
2003a80: 13 00 80 76 sethi %hi(0x201d800), %o1
2003a84: 40 00 3b 05 call 2012698 <fprintf>
2003a88: 92 12 60 b8 or %o1, 0xb8, %o1 ! 201d8b8 <pollCallbacks.4788+0x398>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2003a8c: 31 00 80 75 sethi %hi(0x201d400), %i0
2003a90: 40 00 42 22 call 2014318 <puts>
2003a94: 91 ee 23 e0 restore %i0, 0x3e0, %o0
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
2003a98: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 <== NOT EXECUTED
2003a9c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003aa0: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2003aa4: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED
2003aa8: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED
2003aac: 40 00 3e 1d call 2013320 <fwrite> <== NOT EXECUTED
2003ab0: 90 12 20 c8 or %o0, 0xc8, %o0 ! 201d8c8 <pollCallbacks.4788+0x3a8><== NOT EXECUTED
assert(0);
2003ab4: 10 bf ff da b 2003a1c <IMFS_print_jnode+0x48> <== NOT EXECUTED
2003ab8: 92 10 20 62 mov 0x62, %o1 <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
2003abc: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1 <== NOT EXECUTED
2003ac0: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003ac4: d6 00 60 08 ld [ %g1 + 8 ], %o3 <== NOT EXECUTED
2003ac8: 94 10 20 13 mov 0x13, %o2 <== NOT EXECUTED
2003acc: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED
2003ad0: 40 00 3e 14 call 2013320 <fwrite> <== NOT EXECUTED
2003ad4: 90 12 20 c8 or %o0, 0xc8, %o0 ! 201d8c8 <pollCallbacks.4788+0x3a8><== NOT EXECUTED
assert(0);
2003ad8: 10 bf ff d1 b 2003a1c <IMFS_print_jnode+0x48> <== NOT EXECUTED
2003adc: 92 10 20 5d mov 0x5d, %o1 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
2003ae0: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1
2003ae4: d6 06 20 50 ld [ %i0 + 0x50 ], %o3
2003ae8: d4 06 20 4c ld [ %i0 + 0x4c ], %o2
2003aec: d0 00 60 08 ld [ %g1 + 8 ], %o0
2003af0: 13 00 80 76 sethi %hi(0x201d800), %o1
2003af4: 40 00 3a e9 call 2012698 <fprintf>
2003af8: 92 12 60 90 or %o1, 0x90, %o1 ! 201d890 <pollCallbacks.4788+0x370>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2003afc: 31 00 80 75 sethi %hi(0x201d400), %i0
2003b00: 40 00 42 06 call 2014318 <puts>
2003b04: 91 ee 23 e0 restore %i0, 0x3e0, %o0
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
2003b08: c2 04 22 a8 ld [ %l0 + 0x2a8 ], %g1
2003b0c: 90 10 20 2f mov 0x2f, %o0
2003b10: d2 00 60 08 ld [ %g1 + 8 ], %o1
2003b14: 40 00 3a fb call 2012700 <fputc>
2003b18: 31 00 80 75 sethi %hi(0x201d400), %i0
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
2003b1c: 40 00 41 ff call 2014318 <puts>
2003b20: 91 ee 23 e0 restore %i0, 0x3e0, %o0
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
2003b24: 11 00 80 76 sethi %hi(0x201d800), %o0 <== NOT EXECUTED
2003b28: 15 00 80 76 sethi %hi(0x201d800), %o2 <== NOT EXECUTED
2003b2c: 17 00 80 76 sethi %hi(0x201d800), %o3 <== NOT EXECUTED
2003b30: 90 12 20 30 or %o0, 0x30, %o0 <== NOT EXECUTED
2003b34: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
2003b38: 96 12 e0 80 or %o3, 0x80, %o3 <== NOT EXECUTED
2003b3c: 40 00 01 fc call 200432c <__assert_func> <== NOT EXECUTED
2003b40: 92 10 20 38 mov 0x38, %o1 <== NOT EXECUTED
020029a0 <IMFS_readlink>:
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
20029a0: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
int i;
node = loc->node_access;
20029a4: c8 06 00 00 ld [ %i0 ], %g4
if ( node->type != IMFS_SYM_LINK )
20029a8: c2 01 20 48 ld [ %g4 + 0x48 ], %g1
20029ac: 80 a0 60 04 cmp %g1, 4
20029b0: 12 80 00 19 bne 2002a14 <IMFS_readlink+0x74> <== NEVER TAKEN
20029b4: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20029b8: 02 80 00 15 be 2002a0c <IMFS_readlink+0x6c> <== NEVER TAKEN
20029bc: 86 10 20 00 clr %g3
20029c0: c2 01 20 4c ld [ %g4 + 0x4c ], %g1
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
20029c4: b0 10 20 00 clr %i0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20029c8: c4 48 40 00 ldsb [ %g1 ], %g2
20029cc: 80 a0 a0 00 cmp %g2, 0
20029d0: 12 80 00 08 bne 20029f0 <IMFS_readlink+0x50> <== ALWAYS TAKEN
20029d4: c2 08 40 00 ldub [ %g1 ], %g1
20029d8: 30 80 00 13 b,a 2002a24 <IMFS_readlink+0x84> <== NOT EXECUTED
20029dc: c2 01 20 4c ld [ %g4 + 0x4c ], %g1
20029e0: c4 48 40 18 ldsb [ %g1 + %i0 ], %g2
20029e4: 80 a0 a0 00 cmp %g2, 0
20029e8: 02 80 00 07 be 2002a04 <IMFS_readlink+0x64>
20029ec: c2 08 40 18 ldub [ %g1 + %i0 ], %g1
buf[i] = node->info.sym_link.name[i];
20029f0: c2 2e 40 03 stb %g1, [ %i1 + %g3 ]
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
20029f4: b0 06 20 01 inc %i0
20029f8: 80 a6 80 18 cmp %i2, %i0
20029fc: 18 bf ff f8 bgu 20029dc <IMFS_readlink+0x3c>
2002a00: 86 10 00 18 mov %i0, %g3
buf[i] = node->info.sym_link.name[i];
return i;
}
2002a04: 81 c7 e0 08 ret
2002a08: 81 e8 00 00 restore
2002a0c: 81 c7 e0 08 ret <== NOT EXECUTED
2002a10: 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 );
2002a14: 40 00 36 d6 call 201056c <__errno> <== NOT EXECUTED
2002a18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002a1c: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002a20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002a24: 81 c7 e0 08 ret <== NOT EXECUTED
2002a28: 81 e8 00 00 restore <== NOT EXECUTED
0200a604 <IMFS_rmnod>:
*/
int IMFS_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200a604: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200a608: 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 ) {
200a60c: c2 04 20 08 ld [ %l0 + 8 ], %g1
200a610: 80 a0 60 00 cmp %g1, 0
200a614: 22 80 00 06 be,a 200a62c <IMFS_rmnod+0x28> <== NEVER TAKEN
200a618: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
200a61c: 40 00 06 6f call 200bfd8 <_Chain_Extract>
200a620: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200a624: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200a628: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
200a62c: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200a630: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200a634: 90 07 bf f0 add %fp, -16, %o0
200a638: 40 00 01 5e call 200abb0 <gettimeofday>
200a63c: c2 34 20 30 sth %g1, [ %l0 + 0x30 ]
200a640: 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) ) {
200a644: 90 10 00 10 mov %l0, %o0
200a648: 40 00 01 94 call 200ac98 <rtems_libio_is_file_open>
200a64c: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
200a650: 80 a2 20 00 cmp %o0, 0
200a654: 12 80 00 12 bne 200a69c <IMFS_rmnod+0x98> <== NEVER TAKEN
200a658: 01 00 00 00 nop
200a65c: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
200a660: 80 a0 60 00 cmp %g1, 0
200a664: 12 80 00 0e bne 200a69c <IMFS_rmnod+0x98> <== NEVER TAKEN
200a668: 03 00 80 5e sethi %hi(0x2017800), %g1
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
200a66c: c6 00 61 54 ld [ %g1 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
200a670: c4 06 00 00 ld [ %i0 ], %g2
200a674: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200a678: 80 a0 40 02 cmp %g1, %g2
200a67c: 22 80 00 02 be,a 200a684 <IMFS_rmnod+0x80> <== NEVER TAKEN
200a680: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
200a684: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200a688: 80 a0 60 04 cmp %g1, 4
200a68c: 22 80 00 06 be,a 200a6a4 <IMFS_rmnod+0xa0>
200a690: d0 04 20 4c ld [ %l0 + 0x4c ], %o0
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
200a694: 40 00 00 cd call 200a9c8 <free>
200a698: 90 10 00 10 mov %l0, %o0
}
return 0;
}
200a69c: 81 c7 e0 08 ret
200a6a0: 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 )
200a6a4: 80 a2 20 00 cmp %o0, 0
200a6a8: 02 bf ff fb be 200a694 <IMFS_rmnod+0x90> <== NEVER TAKEN
200a6ac: 01 00 00 00 nop
free( (void*) the_jnode->info.sym_link.name );
200a6b0: 40 00 00 c6 call 200a9c8 <free>
200a6b4: 01 00 00 00 nop
200a6b8: 30 bf ff f7 b,a 200a694 <IMFS_rmnod+0x90>
0200a6bc <IMFS_stat>:
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
200a6bc: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
200a6c0: f0 06 00 00 ld [ %i0 ], %i0
switch ( the_jnode->type ) {
200a6c4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200a6c8: 80 a0 60 04 cmp %g1, 4
200a6cc: 22 80 00 11 be,a 200a710 <IMFS_stat+0x54> <== NEVER TAKEN
200a6d0: c0 26 60 20 clr [ %i1 + 0x20 ] <== NOT EXECUTED
200a6d4: 14 80 00 0b bg 200a700 <IMFS_stat+0x44>
200a6d8: 80 a0 60 06 cmp %g1, 6
200a6dc: 80 a0 60 02 cmp %g1, 2
200a6e0: 22 80 00 21 be,a 200a764 <IMFS_stat+0xa8> <== ALWAYS TAKEN
200a6e4: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
200a6e8: 40 00 0d 0a call 200db10 <__errno> <== NOT EXECUTED
200a6ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200a6f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200a6f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200a6f8: 81 c7 e0 08 ret <== NOT EXECUTED
200a6fc: 81 e8 00 00 restore <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
200a700: 14 bf ff fa bg 200a6e8 <IMFS_stat+0x2c> <== NEVER TAKEN
200a704: 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;
200a708: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
200a70c: c2 26 60 20 st %g1, [ %i1 + 0x20 ]
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200a710: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
200a714: c4 16 20 2e lduh [ %i0 + 0x2e ], %g2
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
200a718: c2 26 60 08 st %g1, [ %i1 + 8 ]
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
200a71c: c4 36 60 0c sth %g2, [ %i1 + 0xc ]
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;
buf->st_atime = the_jnode->stat_atime;
200a720: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200a724: c4 16 20 30 lduh [ %i0 + 0x30 ], %g2
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;
200a728: c2 26 60 24 st %g1, [ %i1 + 0x24 ]
rtems_set_errno_and_return_minus_one( ENOTSUP );
break;
}
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
200a72c: c4 36 60 0e sth %g2, [ %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;
buf->st_mtime = the_jnode->stat_mtime;
200a730: c2 06 20 40 ld [ %i0 + 0x40 ], %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;
200a734: c4 16 20 38 lduh [ %i0 + 0x38 ], %g2
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
200a738: c2 26 60 2c st %g1, [ %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;
200a73c: c4 36 60 10 sth %g2, [ %i1 + 0x10 ]
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200a740: c8 06 20 44 ld [ %i0 + 0x44 ], %g4
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;
200a744: c6 16 20 3a lduh [ %i0 + 0x3a ], %g3
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200a748: 03 00 80 5d sethi %hi(0x2017400), %g1
200a74c: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 201743c <imfs_rq_memfile_bytes_per_block>
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;
200a750: c6 36 60 12 sth %g3, [ %i1 + 0x12 ]
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
200a754: c4 26 60 3c st %g2, [ %i1 + 0x3c ]
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
200a758: c8 26 60 34 st %g4, [ %i1 + 0x34 ]
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
return 0;
}
200a75c: 81 c7 e0 08 ret
200a760: 91 e8 20 00 restore %g0, 0, %o0
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
200a764: c4 06 20 4c ld [ %i0 + 0x4c ], %g2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_dev = rtems_filesystem_make_dev_t( io->major, io->minor );
200a768: c2 26 60 04 st %g1, [ %i1 + 4 ]
200a76c: 10 bf ff e9 b 200a710 <IMFS_stat+0x54>
200a770: c4 26 40 00 st %g2, [ %i1 ]
02002a2c <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
2002a2c: 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 );
2002a30: 94 07 bf f4 add %fp, -12, %o2
2002a34: a0 07 bf c0 add %fp, -64, %l0
2002a38: 90 10 00 1a mov %i2, %o0
2002a3c: 40 00 26 cf call 200c578 <IMFS_get_token>
2002a40: 92 10 00 10 mov %l0, %o1
/*
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
2002a44: 40 00 3e b8 call 2012524 <strdup>
2002a48: 90 10 00 19 mov %i1, %o0
2002a4c: d0 27 bf e4 st %o0, [ %fp + -28 ]
if (info.sym_link.name == NULL) {
2002a50: 80 a2 20 00 cmp %o0, 0
2002a54: 02 80 00 14 be 2002aa4 <IMFS_symlink+0x78> <== NEVER TAKEN
2002a58: 90 10 00 18 mov %i0, %o0
/*
* Create a new link node.
*/
new_node = IMFS_create_node(
2002a5c: 94 10 00 10 mov %l0, %o2
2002a60: 92 10 20 04 mov 4, %o1
2002a64: 17 00 00 28 sethi %hi(0xa000), %o3
2002a68: 98 07 bf e4 add %fp, -28, %o4
2002a6c: 96 12 e1 ff or %o3, 0x1ff, %o3
2002a70: 40 00 23 e1 call 200b9f4 <IMFS_create_node>
2002a74: b0 10 20 00 clr %i0
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
2002a78: 80 a2 20 00 cmp %o0, 0
2002a7c: 12 80 00 08 bne 2002a9c <IMFS_symlink+0x70> <== ALWAYS TAKEN
2002a80: d0 07 bf e4 ld [ %fp + -28 ], %o0
free( info.sym_link.name);
2002a84: 40 00 02 d3 call 20035d0 <free> <== NOT EXECUTED
2002a88: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM);
2002a8c: 40 00 36 b8 call 201056c <__errno> <== NOT EXECUTED
2002a90: 01 00 00 00 nop <== NOT EXECUTED
2002a94: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2002a98: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
return 0;
}
2002a9c: 81 c7 e0 08 ret
2002aa0: 81 e8 00 00 restore
* Duplicate link name
*/
info.sym_link.name = strdup( link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one( ENOMEM);
2002aa4: 40 00 36 b2 call 201056c <__errno> <== NOT EXECUTED
2002aa8: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002aac: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
2002ab0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002ab4: 81 c7 e0 08 ret <== NOT EXECUTED
2002ab8: 81 e8 00 00 restore <== NOT EXECUTED
02002abc <IMFS_unlink>:
#include <rtems/seterr.h>
int IMFS_unlink(
rtems_filesystem_location_info_t *loc /* IN */
)
{
2002abc: 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;
2002ac0: 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 ) {
2002ac4: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
2002ac8: 80 a0 60 03 cmp %g1, 3
2002acc: 32 80 00 1b bne,a 2002b38 <IMFS_unlink+0x7c>
2002ad0: c4 06 20 04 ld [ %i0 + 4 ], %g2
if ( !node->info.hard_link.link_node )
2002ad4: c8 04 20 4c ld [ %l0 + 0x4c ], %g4
2002ad8: 80 a1 20 00 cmp %g4, 0
2002adc: 02 80 00 1c be 2002b4c <IMFS_unlink+0x90> <== NEVER TAKEN
2002ae0: a2 07 bf e0 add %fp, -32, %l1
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
2002ae4: c2 06 20 04 ld [ %i0 + 4 ], %g1
2002ae8: c4 06 20 08 ld [ %i0 + 8 ], %g2
2002aec: c6 06 20 0c ld [ %i0 + 0xc ], %g3
2002af0: c2 27 bf e4 st %g1, [ %fp + -28 ]
2002af4: c4 3f bf e8 std %g2, [ %fp + -24 ]
the_link.node_access = node->info.hard_link.link_node;
2002af8: c8 27 bf e0 st %g4, [ %fp + -32 ]
IMFS_Set_handlers( &the_link );
2002afc: 40 00 24 18 call 200bb5c <IMFS_Set_handlers>
2002b00: 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)
2002b04: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
2002b08: c2 10 a0 30 lduh [ %g2 + 0x30 ], %g1
2002b0c: 80 a0 60 01 cmp %g1, 1
2002b10: 02 80 00 15 be 2002b64 <IMFS_unlink+0xa8>
2002b14: 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 );
2002b18: 90 07 bf f0 add %fp, -16, %o0
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
2002b1c: c2 30 a0 30 sth %g1, [ %g2 + 0x30 ]
IMFS_update_ctime( node->info.hard_link.link_node );
2002b20: 40 00 03 4d call 2003854 <gettimeofday>
2002b24: 92 10 20 00 clr %o1
2002b28: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
2002b2c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2002b30: c2 20 a0 44 st %g1, [ %g2 + 0x44 ]
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( loc );
2002b34: c4 06 20 04 ld [ %i0 + 4 ], %g2
2002b38: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1
2002b3c: 9f c0 40 00 call %g1
2002b40: 90 10 00 18 mov %i0, %o0
return result;
}
2002b44: 81 c7 e0 08 ret
2002b48: 91 e8 00 08 restore %g0, %o0, %o0
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
2002b4c: 40 00 36 88 call 201056c <__errno> <== NOT EXECUTED
2002b50: 01 00 00 00 nop <== NOT EXECUTED
2002b54: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2002b58: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002b5c: 10 bf ff fa b 2002b44 <IMFS_unlink+0x88> <== NOT EXECUTED
2002b60: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
* 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 );
2002b64: c2 07 bf e4 ld [ %fp + -28 ], %g1
2002b68: c4 00 60 34 ld [ %g1 + 0x34 ], %g2
2002b6c: 9f c0 80 00 call %g2
2002b70: 90 10 00 11 mov %l1, %o0
if ( result != 0 )
2002b74: 80 a2 20 00 cmp %o0, 0
2002b78: 02 bf ff ef be 2002b34 <IMFS_unlink+0x78>
2002b7c: 90 10 3f ff mov -1, %o0
2002b80: 30 bf ff f1 b,a 2002b44 <IMFS_unlink+0x88>
02002b84 <IMFS_unmount>:
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
2002b84: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
2002b88: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
2002b8c: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
2002b90: 80 a0 60 01 cmp %g1, 1
2002b94: 12 80 00 09 bne 2002bb8 <IMFS_unmount+0x34> <== NEVER TAKEN
2002b98: 01 00 00 00 nop
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
2002b9c: c2 00 a0 58 ld [ %g2 + 0x58 ], %g1
2002ba0: 80 a0 60 00 cmp %g1, 0
2002ba4: 02 80 00 0b be 2002bd0 <IMFS_unmount+0x4c> <== NEVER TAKEN
2002ba8: 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;
2002bac: c0 20 a0 58 clr [ %g2 + 0x58 ]
return 0;
}
2002bb0: 81 c7 e0 08 ret
2002bb4: 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 );
2002bb8: 40 00 36 6d call 201056c <__errno> <== NOT EXECUTED
2002bbc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002bc0: 82 10 20 14 mov 0x14, %g1 <== NOT EXECUTED
2002bc4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002bc8: 81 c7 e0 08 ret <== NOT EXECUTED
2002bcc: 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 */
2002bd0: 40 00 36 67 call 201056c <__errno> <== NOT EXECUTED
2002bd4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002bd8: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2002bdc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002be0: 81 c7 e0 08 ret <== NOT EXECUTED
2002be4: 81 e8 00 00 restore <== NOT EXECUTED
020022a4 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *start,
size_t length,
size_t sbrk_amount
)
{
20022a4: 9d e3 bf 98 save %sp, -104, %sp
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers )
20022a8: 03 00 80 5f sethi %hi(0x2017c00), %g1
20022ac: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 2017e94 <rtems_malloc_statistics_helpers>
20022b0: 80 a0 60 00 cmp %g1, 0
20022b4: 02 80 00 05 be 20022c8 <RTEMS_Malloc_Initialize+0x24> <== ALWAYS TAKEN
20022b8: 01 00 00 00 nop
(*rtems_malloc_statistics_helpers->initialize)();
20022bc: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
20022c0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20022c4: 01 00 00 00 nop <== NOT EXECUTED
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
20022c8: 40 00 23 24 call 200af58 <malloc_deferred_frees_initialize>
20022cc: a0 10 00 18 mov %i0, %l0
starting_address = start;
/*
* Initialize the optional sbrk support for extending the heap
*/
if (rtems_malloc_sbrk_helpers) {
20022d0: 03 00 80 5f sethi %hi(0x2017c00), %g1
20022d4: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 2017e98 <rtems_malloc_sbrk_helpers>
20022d8: 80 a0 60 00 cmp %g1, 0
20022dc: 02 80 00 06 be 20022f4 <RTEMS_Malloc_Initialize+0x50> <== ALWAYS TAKEN
20022e0: 90 10 00 18 mov %i0, %o0
starting_address = (*rtems_malloc_sbrk_helpers->initialize)(
20022e4: c2 00 40 00 ld [ %g1 ], %g1 <== NOT EXECUTED
20022e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20022ec: 92 10 00 1a mov %i2, %o1 <== NOT EXECUTED
20022f0: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if ( rtems_configuration_get_do_zero_of_workspace() )
20022f4: 03 00 80 60 sethi %hi(0x2018000), %g1
20022f8: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 20183ac <_Configuration_Table>
20022fc: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3
2002300: 80 a0 e0 00 cmp %g3, 0
2002304: 12 80 00 10 bne 2002344 <RTEMS_Malloc_Initialize+0xa0> <== NEVER TAKEN
2002308: 90 10 00 10 mov %l0, %o0
void *starting_address,
size_t size,
uint32_t page_size
)
{
return _Heap_Initialize( the_heap, starting_address, size, page_size );
200230c: 92 10 00 10 mov %l0, %o1
2002310: 11 00 80 60 sethi %hi(0x2018000), %o0
2002314: 94 10 00 19 mov %i1, %o2
2002318: 90 12 21 40 or %o0, 0x140, %o0
200231c: 40 00 11 95 call 2006970 <_Heap_Initialize>
2002320: 96 10 20 08 mov 8, %o3
&RTEMS_Malloc_Heap,
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
2002324: 80 a2 20 00 cmp %o0, 0
2002328: 02 80 00 0c be 2002358 <RTEMS_Malloc_Initialize+0xb4> <== NEVER TAKEN
200232c: 05 00 80 60 sethi %hi(0x2018000), %g2
rtems_print_buffer( (start + length) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
MSBUMP(space_available, length);
2002330: c2 00 a1 98 ld [ %g2 + 0x198 ], %g1 ! 2018198 <rtems_malloc_statistics>
2002334: 82 06 40 01 add %i1, %g1, %g1
2002338: c2 20 a1 98 st %g1, [ %g2 + 0x198 ]
}
200233c: 81 c7 e0 08 ret
2002340: 81 e8 00 00 restore
* 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_configuration_get_do_zero_of_workspace() )
memset( starting_address, 0, length );
2002344: 92 10 20 00 clr %o1 <== NOT EXECUTED
2002348: 40 00 30 1d call 200e3bc <memset> <== NOT EXECUTED
200234c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2002350: 10 bf ff f0 b 2002310 <RTEMS_Malloc_Initialize+0x6c> <== NOT EXECUTED
2002354: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
starting_address,
length,
CPU_HEAP_ALIGNMENT
);
if ( !status )
rtems_fatal_error_occurred( status );
2002358: 40 00 0f 05 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
02002768 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
2002768: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
200276c: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
2002770: 02 80 00 39 be 2002854 <Stack_check_Dump_threads_usage+0xec><== NOT EXECUTED
2002774: 2b 00 80 71 sethi %hi(0x201c400), %l5 <== NOT EXECUTED
return;
if ( !print_handler )
2002778: e8 05 60 14 ld [ %l5 + 0x14 ], %l4 ! 201c414 <print_handler><== NOT EXECUTED
200277c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
2002780: 02 80 00 35 be 2002854 <Stack_check_Dump_threads_usage+0xec><== NOT EXECUTED
2002784: 80 a6 3f ff cmp %i0, -1 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
2002788: 02 80 00 3b be 2002874 <Stack_check_Dump_threads_usage+0x10c><== NOT EXECUTED
200278c: a4 06 20 c4 add %i0, 0xc4, %l2 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
2002790: ec 06 21 50 ld [ %i0 + 0x150 ], %l6 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
2002794: e0 04 a0 04 ld [ %l2 + 4 ], %l0 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
2002798: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
200279c: a0 04 20 10 add %l0, 0x10, %l0 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
20027a0: a6 00 7f f0 add %g1, -16, %l3 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
20027a4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20027a8: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
20027ac: 7f ff ff d6 call 2002704 <Stack_check_find_high_water_mark><== NOT EXECUTED
20027b0: a0 04 00 13 add %l0, %l3, %l0 <== NOT EXECUTED
if ( high_water_mark )
20027b4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20027b8: 02 80 00 40 be 20028b8 <Stack_check_Dump_threads_usage+0x150><== NOT EXECUTED
20027bc: ae 24 00 08 sub %l0, %o0, %l7 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
20027c0: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
20027c4: 02 80 00 35 be 2002898 <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
20027c8: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED
(*print_handler)(
20027cc: e0 06 20 08 ld [ %i0 + 8 ], %l0 <== NOT EXECUTED
20027d0: e2 00 60 10 ld [ %g1 + 0x10 ], %l1 <== NOT EXECUTED
20027d4: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
20027d8: 92 10 20 05 mov 5, %o1 <== NOT EXECUTED
20027dc: b0 10 60 10 or %g1, 0x10, %i0 <== NOT EXECUTED
20027e0: 40 00 10 2b call 200688c <rtems_object_get_name> <== NOT EXECUTED
20027e4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
20027e8: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20027ec: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
20027f0: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
20027f4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20027f8: 9f c5 00 00 call %l4 <== NOT EXECUTED
20027fc: 92 12 62 78 or %o1, 0x278, %o1 <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
2002800: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
2002804: d4 04 a0 04 ld [ %l2 + 4 ], %o2 <== NOT EXECUTED
2002808: c4 05 60 14 ld [ %l5 + 0x14 ], %g2 <== NOT EXECUTED
200280c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
2002810: 96 02 ff ff add %o3, -1, %o3 <== NOT EXECUTED
2002814: 98 10 00 16 mov %l6, %o4 <== NOT EXECUTED
2002818: 96 02 80 0b add %o2, %o3, %o3 <== NOT EXECUTED
200281c: 9a 10 00 13 mov %l3, %o5 <== NOT EXECUTED
2002820: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
2002824: 9f c0 80 00 call %g2 <== NOT EXECUTED
2002828: 92 12 62 98 or %o1, 0x298, %o1 ! 2019a98 <pollCallbacks.4788+0x330><== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
200282c: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED
2002830: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 201c40c <Stack_check_Initialized><== NOT EXECUTED
2002834: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2002838: 02 80 00 09 be 200285c <Stack_check_Dump_threads_usage+0xf4><== NOT EXECUTED
200283c: c2 05 60 14 ld [ %l5 + 0x14 ], %g1 <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
2002840: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
2002844: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
2002848: 94 10 00 17 mov %l7, %o2 <== NOT EXECUTED
200284c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002850: 92 12 62 c8 or %o1, 0x2c8, %o1 <== NOT EXECUTED
2002854: 81 c7 e0 08 ret <== NOT EXECUTED
2002858: 81 e8 00 00 restore <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
200285c: d0 06 00 00 ld [ %i0 ], %o0 <== NOT EXECUTED
2002860: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
2002864: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002868: 92 12 62 b8 or %o1, 0x2b8, %o1 ! 2019ab8 <pollCallbacks.4788+0x350><== NOT EXECUTED
200286c: 81 c7 e0 08 ret <== NOT EXECUTED
2002870: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
2002874: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED
2002878: 82 10 62 a0 or %g1, 0x2a0, %g1 ! 201c6a0 <Stack_check_Interrupt_stack><== NOT EXECUTED
200287c: c4 00 60 04 ld [ %g1 + 4 ], %g2 <== NOT EXECUTED
2002880: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2002884: 02 bf ff f4 be 2002854 <Stack_check_Dump_threads_usage+0xec><== NOT EXECUTED
2002888: a4 10 00 01 mov %g1, %l2 <== NOT EXECUTED
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
current = 0;
}
else
return;
200288c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2002890: 10 bf ff c1 b 2002794 <Stack_check_Dump_threads_usage+0x2c><== NOT EXECUTED
2002894: ac 10 20 00 clr %l6 <== NOT EXECUTED
"0x%08" PRIx32 " %4s",
the_thread->Object.id,
rtems_object_get_name( the_thread->Object.id, sizeof(name), name )
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
2002898: d0 00 60 10 ld [ %g1 + 0x10 ], %o0 <== NOT EXECUTED
200289c: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20028a0: b0 10 60 10 or %g1, 0x10, %i0 <== NOT EXECUTED
20028a4: 92 12 62 88 or %o1, 0x288, %o1 <== NOT EXECUTED
20028a8: 9f c5 00 00 call %l4 <== NOT EXECUTED
20028ac: 94 10 3f ff mov -1, %o2 <== NOT EXECUTED
}
(*print_handler)(
20028b0: 10 bf ff d5 b 2002804 <Stack_check_Dump_threads_usage+0x9c><== NOT EXECUTED
20028b4: d6 04 80 00 ld [ %l2 ], %o3 <== NOT EXECUTED
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
if ( high_water_mark )
20028b8: 10 bf ff c2 b 20027c0 <Stack_check_Dump_threads_usage+0x58><== NOT EXECUTED
20028bc: ae 10 20 00 clr %l7 <== NOT EXECUTED
02002a94 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
2002a94: 9d e3 bf 98 save %sp, -104, %sp
uint32_t *p;
if (Stack_check_Initialized)
2002a98: 21 00 80 71 sethi %hi(0x201c400), %l0
2002a9c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 ! 201c40c <Stack_check_Initialized>
2002aa0: 80 a0 60 00 cmp %g1, 0
2002aa4: 12 80 00 22 bne 2002b2c <Stack_check_Initialize+0x98>
2002aa8: 03 00 80 72 sethi %hi(0x201c800), %g1
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
2002aac: c8 00 60 90 ld [ %g1 + 0x90 ], %g4 ! 201c890 <_CPU_Interrupt_stack_low>
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
2002ab0: 03 3f bb 7c sethi %hi(0xfeedf000), %g1
2002ab4: 82 10 60 0d or %g1, 0xd, %g1 ! feedf00d <RAM_END+0xfcadf00d>
2002ab8: 07 00 80 71 sethi %hi(0x201c400), %g3
2002abc: c2 20 e2 90 st %g1, [ %g3 + 0x290 ] ! 201c690 <Stack_check_Pattern>
p[1] = 0x0BAD0D06;
2002ac0: 03 02 eb 43 sethi %hi(0xbad0c00), %g1
2002ac4: 82 10 61 06 or %g1, 0x106, %g1 ! bad0d06 <RAM_END+0x96d0d06>
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
2002ac8: 86 10 e2 90 or %g3, 0x290, %g3
p[1] = 0x0BAD0D06;
p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
2002acc: 05 37 ab 7c sethi %hi(0xdeadf000), %g2
for ( p = Stack_check_Pattern.pattern;
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
p[1] = 0x0BAD0D06;
2002ad0: c2 20 e0 04 st %g1, [ %g3 + 4 ]
p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
2002ad4: 84 10 a0 0d or %g2, 0xd, %g2
p[3] = 0x600D0D06;
2002ad8: 03 18 03 43 sethi %hi(0x600d0c00), %g1
p < &Stack_check_Pattern.pattern[PATTERN_SIZE_WORDS];
p += 4
) {
p[0] = 0xFEEDF00D; /* FEED FOOD to BAD DOG */
p[1] = 0x0BAD0D06;
p[2] = 0xDEADF00D; /* DEAD FOOD GOOD DOG */
2002adc: c4 20 e0 08 st %g2, [ %g3 + 8 ]
p[3] = 0x600D0D06;
2002ae0: 82 10 61 06 or %g1, 0x106, %g1
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
2002ae4: 80 a1 20 00 cmp %g4, 0
2002ae8: 02 80 00 0f be 2002b24 <Stack_check_Initialize+0x90> <== NEVER TAKEN
2002aec: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
2002af0: 03 00 80 71 sethi %hi(0x201c400), %g1
2002af4: c4 00 63 dc ld [ %g1 + 0x3dc ], %g2 ! 201c7dc <_CPU_Interrupt_stack_high>
2002af8: 80 a0 a0 00 cmp %g2, 0
2002afc: 02 80 00 0a be 2002b24 <Stack_check_Initialize+0x90> <== NEVER TAKEN
2002b00: 84 20 80 04 sub %g2, %g4, %g2
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002b04: 03 00 80 71 sethi %hi(0x201c400), %g1
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
2002b08: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ] ! 201c6a0 <Stack_check_Interrupt_stack>
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002b0c: 82 10 62 a0 or %g1, 0x2a0, %g1
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002b10: 90 10 00 04 mov %g4, %o0
2002b14: 94 10 00 02 mov %g2, %o2
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
2002b18: c8 20 60 04 st %g4, [ %g1 + 4 ]
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
2002b1c: 40 00 34 2e call 200fbd4 <memset>
2002b20: 92 10 20 a5 mov 0xa5, %o1
}
#endif
Stack_check_Initialized = 1;
2002b24: 82 10 20 01 mov 1, %g1
2002b28: c2 24 20 0c st %g1, [ %l0 + 0xc ]
2002b2c: 81 c7 e0 08 ret
2002b30: 81 e8 00 00 restore
02002704 <Stack_check_find_high_water_mark>:
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
2002704: 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++)
2002708: 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;
200270c: 90 02 20 10 add %o0, 0x10, %o0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
2002710: 86 02 00 09 add %o0, %o1, %g3 <== NOT EXECUTED
2002714: 80 a2 00 03 cmp %o0, %g3 <== NOT EXECUTED
2002718: 3a 80 00 12 bcc,a 2002760 <Stack_check_find_high_water_mark+0x5c><== NOT EXECUTED
200271c: 90 10 20 00 clr %o0 <== NOT EXECUTED
if (*base != U32_PATTERN)
2002720: c4 00 60 10 ld [ %g1 + 0x10 ], %g2 <== NOT EXECUTED
2002724: 03 29 69 69 sethi %hi(0xa5a5a400), %g1 <== NOT EXECUTED
2002728: 82 10 61 a5 or %g1, 0x1a5, %g1 ! a5a5a5a5 <RAM_END+0xa365a5a5><== NOT EXECUTED
200272c: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2002730: 22 80 00 07 be,a 200274c <Stack_check_find_high_water_mark+0x48><== NOT EXECUTED
2002734: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED
2002738: 30 80 00 0a b,a 2002760 <Stack_check_find_high_water_mark+0x5c><== NOT EXECUTED
200273c: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
2002740: 12 80 00 08 bne 2002760 <Stack_check_find_high_water_mark+0x5c><== NOT EXECUTED
2002744: 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++)
2002748: 90 02 20 04 add %o0, 4, %o0 <== NOT EXECUTED
200274c: 80 a0 c0 08 cmp %g3, %o0 <== NOT EXECUTED
2002750: 38 bf ff fb bgu,a 200273c <Stack_check_find_high_water_mark+0x38><== NOT EXECUTED
2002754: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
2002758: 81 c3 e0 08 retl <== NOT EXECUTED
200275c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2002760: 81 c3 e0 08 retl <== NOT EXECUTED
02002934 <Stack_check_report_blown_task>:
*/
void Stack_check_report_blown_task(
Thread_Control *running,
bool pattern_ok
)
{
2002934: 9d e3 bf 98 save %sp, -104, %sp
Stack_Control *stack = &running->Start.Initial_stack;
printk(
2002938: d4 1e 20 08 ldd [ %i0 + 8 ], %o2
200293c: 92 10 00 18 mov %i0, %o1
2002940: 11 00 80 66 sethi %hi(0x2019800), %o0
2002944: 40 00 05 ba call 200402c <printk>
2002948: 90 12 23 38 or %o0, 0x338, %o0 ! 2019b38 <pollCallbacks.4788+0x3d0>
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
printk(
200294c: d4 06 20 c4 ld [ %i0 + 0xc4 ], %o2
2002950: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1
2002954: 96 10 00 0a mov %o2, %o3
2002958: 11 00 80 66 sethi %hi(0x2019800), %o0
200295c: 94 02 bf ff add %o2, -1, %o2
2002960: 90 12 23 78 or %o0, 0x378, %o0
2002964: 40 00 05 b2 call 200402c <printk>
2002968: 94 02 40 0a add %o1, %o2, %o2
stack->area,
stack->area + stack->size - 1,
stack->size
);
if ( !pattern_ok ) {
200296c: 80 8e 60 ff btst 0xff, %i1
2002970: 22 80 00 04 be,a 2002980 <Stack_check_report_blown_task+0x4c><== ALWAYS TAKEN
2002974: d2 06 20 c8 ld [ %i0 + 0xc8 ], %o1
" Damaged pattern begins at 0x%08lx and is %d bytes long\n",
(unsigned long) Stack_check_Get_pattern_area(stack),
PATTERN_SIZE_BYTES);
}
rtems_fatal_error_occurred( 0x81 );
2002978: 40 00 12 40 call 2007278 <rtems_fatal_error_occurred>
200297c: 90 10 20 81 mov 0x81, %o0
stack->area + stack->size - 1,
stack->size
);
if ( !pattern_ok ) {
printk(
2002980: 11 00 80 66 sethi %hi(0x2019800), %o0
2002984: 92 02 60 08 add %o1, 8, %o1
2002988: 90 12 23 a8 or %o0, 0x3a8, %o0
200298c: 40 00 05 a8 call 200402c <printk>
2002990: 94 10 20 10 mov 0x10, %o2
2002994: 30 bf ff f9 b,a 2002978 <Stack_check_report_blown_task+0x44>
02006208 <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
2006208: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
200620c: 03 00 80 61 sethi %hi(0x2018400), %g1
2006210: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 2018554 <_API_extensions_List>
2006214: 82 10 61 54 or %g1, 0x154, %g1
2006218: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
200621c: 80 a4 00 11 cmp %l0, %l1
2006220: 02 80 00 0c be 2006250 <_API_extensions_Run_postdriver+0x48><== NEVER TAKEN
2006224: 01 00 00 00 nop
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postdriver_hook )
2006228: c2 04 20 0c ld [ %l0 + 0xc ], %g1
200622c: 80 a0 60 00 cmp %g1, 0
2006230: 22 80 00 05 be,a 2006244 <_API_extensions_Run_postdriver+0x3c><== NEVER TAKEN
2006234: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postdriver_hook)();
2006238: 9f c0 40 00 call %g1
200623c: 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 ) {
2006240: 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 ) ;
2006244: 80 a4 00 11 cmp %l0, %l1
2006248: 32 bf ff f9 bne,a 200622c <_API_extensions_Run_postdriver+0x24>
200624c: c2 04 20 0c ld [ %l0 + 0xc ], %g1
2006250: 81 c7 e0 08 ret
2006254: 81 e8 00 00 restore
02006258 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
2006258: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
200625c: 03 00 80 61 sethi %hi(0x2018400), %g1
2006260: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 2018554 <_API_extensions_List>
2006264: 82 10 61 54 or %g1, 0x154, %g1
2006268: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
200626c: 80 a4 00 11 cmp %l0, %l1
2006270: 02 80 00 0d be 20062a4 <_API_extensions_Run_postswitch+0x4c><== NEVER TAKEN
2006274: 03 00 80 60 sethi %hi(0x2018000), %g1
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
(*the_extension->postswitch_hook)( _Thread_Executing );
2006278: a4 10 63 d4 or %g1, 0x3d4, %l2 ! 20183d4 <_Thread_Executing>
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->postswitch_hook )
200627c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2006280: 80 a0 60 00 cmp %g1, 0
2006284: 22 80 00 05 be,a 2006298 <_API_extensions_Run_postswitch+0x40><== NEVER TAKEN
2006288: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
(*the_extension->postswitch_hook)( _Thread_Executing );
200628c: 9f c0 40 00 call %g1
2006290: d0 04 80 00 ld [ %l2 ], %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 ) {
2006294: 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 ) ;
2006298: 80 a4 00 11 cmp %l0, %l1
200629c: 32 bf ff f9 bne,a 2006280 <_API_extensions_Run_postswitch+0x28>
20062a0: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20062a4: 81 c7 e0 08 ret
20062a8: 81 e8 00 00 restore
020061b8 <_API_extensions_Run_predriver>:
*
* _API_extensions_Run_predriver
*/
void _API_extensions_Run_predriver( void )
{
20061b8: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
20061bc: 03 00 80 61 sethi %hi(0x2018400), %g1
20061c0: e0 00 61 54 ld [ %g1 + 0x154 ], %l0 ! 2018554 <_API_extensions_List>
20061c4: 82 10 61 54 or %g1, 0x154, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20061c8: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
20061cc: 80 a4 00 11 cmp %l0, %l1
20061d0: 02 80 00 0c be 2006200 <_API_extensions_Run_predriver+0x48><== NEVER TAKEN
20061d4: 01 00 00 00 nop
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
if ( the_extension->predriver_hook )
20061d8: c2 04 20 08 ld [ %l0 + 8 ], %g1
20061dc: 80 a0 60 00 cmp %g1, 0
20061e0: 22 80 00 05 be,a 20061f4 <_API_extensions_Run_predriver+0x3c><== ALWAYS TAKEN
20061e4: e0 04 00 00 ld [ %l0 ], %l0
(*the_extension->predriver_hook)();
20061e8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20061ec: 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 ) {
20061f0: 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 ) ;
20061f4: 80 a4 00 11 cmp %l0, %l1
20061f8: 32 bf ff f9 bne,a 20061dc <_API_extensions_Run_predriver+0x24>
20061fc: c2 04 20 08 ld [ %l0 + 8 ], %g1
2006200: 81 c7 e0 08 ret
2006204: 81 e8 00 00 restore
02008500 <_CORE_RWLock_Obtain_for_reading>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
2008500: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
2008504: 03 00 80 6b sethi %hi(0x201ac00), %g1
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
2008508: 7f ff ea 55 call 2002e5c <sparc_disable_interrupts>
200850c: e0 00 62 b4 ld [ %g1 + 0x2b4 ], %l0 ! 201aeb4 <_Thread_Executing>
2008510: a2 10 00 08 mov %o0, %l1
switch ( the_rwlock->current_state ) {
2008514: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
2008518: 80 a0 60 00 cmp %g1, 0
200851c: 12 80 00 0c bne 200854c <_CORE_RWLock_Obtain_for_reading+0x4c>
2008520: 80 a0 60 01 cmp %g1, 1
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
2008524: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008528: 84 10 20 01 mov 1, %g2
the_rwlock->number_of_readers += 1;
200852c: 82 00 60 01 inc %g1
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
2008530: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
the_rwlock->number_of_readers += 1;
2008534: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
2008538: 7f ff ea 4d call 2002e6c <sparc_enable_interrupts>
200853c: 01 00 00 00 nop
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
2008540: c0 24 20 34 clr [ %l0 + 0x34 ]
2008544: 81 c7 e0 08 ret
2008548: 81 e8 00 00 restore
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
200854c: 02 80 00 15 be 20085a0 <_CORE_RWLock_Obtain_for_reading+0xa0>
2008550: 80 8e a0 ff btst 0xff, %i2
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
2008554: 02 80 00 0d be 2008588 <_CORE_RWLock_Obtain_for_reading+0x88>
2008558: 82 10 20 01 mov 1, %g1
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
200855c: f2 24 20 20 st %i1, [ %l0 + 0x20 ]
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
2008560: c0 24 20 34 clr [ %l0 + 0x34 ]
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
2008564: f0 24 20 44 st %i0, [ %l0 + 0x44 ]
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
2008568: c0 24 20 30 clr [ %l0 + 0x30 ]
200856c: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
2008570: 90 10 00 11 mov %l1, %o0
2008574: 7f ff ea 3e call 2002e6c <sparc_enable_interrupts>
2008578: 35 00 80 21 sethi %hi(0x2008400), %i2
_Thread_queue_Enqueue_with_handler(
200857c: b2 10 00 1b mov %i3, %i1
2008580: 40 00 06 eb call 200a12c <_Thread_queue_Enqueue_with_handler>
2008584: 95 ee a3 50 restore %i2, 0x350, %o2
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
_ISR_Enable( level );
2008588: 7f ff ea 39 call 2002e6c <sparc_enable_interrupts>
200858c: 90 10 00 11 mov %l1, %o0
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
2008590: 82 10 20 02 mov 2, %g1
2008594: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
2008598: 81 c7 e0 08 ret
200859c: 81 e8 00 00 restore
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
20085a0: 40 00 07 f6 call 200a578 <_Thread_queue_First>
20085a4: 90 10 00 18 mov %i0, %o0
if ( !waiter ) {
20085a8: 80 a2 20 00 cmp %o0, 0
20085ac: 12 bf ff ea bne 2008554 <_CORE_RWLock_Obtain_for_reading+0x54><== NEVER TAKEN
20085b0: 80 8e a0 ff btst 0xff, %i2
the_rwlock->number_of_readers += 1;
20085b4: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
20085b8: 82 00 60 01 inc %g1
20085bc: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
_ISR_Enable( level );
20085c0: 7f ff ea 2b call 2002e6c <sparc_enable_interrupts>
20085c4: 90 10 00 11 mov %l1, %o0
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
20085c8: c0 24 20 34 clr [ %l0 + 0x34 ]
20085cc: 81 c7 e0 08 ret
20085d0: 81 e8 00 00 restore
02008658 <_CORE_RWLock_Release>:
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
2008658: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
200865c: 03 00 80 6b sethi %hi(0x201ac00), %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 );
2008660: 7f ff e9 ff call 2002e5c <sparc_disable_interrupts>
2008664: e0 00 62 b4 ld [ %g1 + 0x2b4 ], %l0 ! 201aeb4 <_Thread_Executing>
2008668: 84 10 00 08 mov %o0, %g2
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
200866c: c2 06 20 44 ld [ %i0 + 0x44 ], %g1
2008670: 80 a0 60 00 cmp %g1, 0
2008674: 02 80 00 2d be 2008728 <_CORE_RWLock_Release+0xd0> <== NEVER TAKEN
2008678: 80 a0 60 01 cmp %g1, 1
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
200867c: 22 80 00 23 be,a 2008708 <_CORE_RWLock_Release+0xb0>
2008680: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
2008684: 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;
2008688: c0 26 20 44 clr [ %i0 + 0x44 ]
_ISR_Enable( level );
200868c: 7f ff e9 f8 call 2002e6c <sparc_enable_interrupts>
2008690: 90 10 00 02 mov %g2, %o0
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
2008694: 40 00 06 42 call 2009f9c <_Thread_queue_Dequeue>
2008698: 90 10 00 18 mov %i0, %o0
if ( next ) {
200869c: 80 a2 20 00 cmp %o0, 0
20086a0: 02 80 00 18 be 2008700 <_CORE_RWLock_Release+0xa8>
20086a4: 01 00 00 00 nop
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
20086a8: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
20086ac: 80 a0 60 01 cmp %g1, 1
20086b0: 02 80 00 24 be 2008740 <_CORE_RWLock_Release+0xe8>
20086b4: 84 10 20 01 mov 1, %g2
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
20086b8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
20086bc: 82 00 60 01 inc %g1
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
20086c0: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
20086c4: 10 80 00 0a b 20086ec <_CORE_RWLock_Release+0x94>
20086c8: 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 ||
20086cc: 80 a0 60 01 cmp %g1, 1
20086d0: 02 80 00 0c be 2008700 <_CORE_RWLock_Release+0xa8> <== NEVER TAKEN
20086d4: 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;
20086d8: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
20086dc: 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;
20086e0: 82 00 60 01 inc %g1
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
20086e4: 40 00 07 54 call 200a434 <_Thread_queue_Extract>
20086e8: 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 );
20086ec: 40 00 07 a3 call 200a578 <_Thread_queue_First>
20086f0: 90 10 00 18 mov %i0, %o0
if ( !next ||
20086f4: 80 a2 20 00 cmp %o0, 0
20086f8: 32 bf ff f5 bne,a 20086cc <_CORE_RWLock_Release+0x74>
20086fc: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
2008700: 81 c7 e0 08 ret
2008704: 91 e8 20 00 restore %g0, 0, %o0
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
2008708: 82 00 7f ff add %g1, -1, %g1
if ( the_rwlock->number_of_readers != 0 ) {
200870c: 80 a0 60 00 cmp %g1, 0
2008710: 02 bf ff dd be 2008684 <_CORE_RWLock_Release+0x2c>
2008714: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
/* must be unlocked again */
_ISR_Enable( level );
2008718: 7f ff e9 d5 call 2002e6c <sparc_enable_interrupts>
200871c: b0 10 20 00 clr %i0
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
2008720: 81 c7 e0 08 ret
2008724: 81 e8 00 00 restore
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
2008728: 7f ff e9 d1 call 2002e6c <sparc_enable_interrupts> <== NOT EXECUTED
200872c: b0 10 20 00 clr %i0 <== NOT EXECUTED
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
2008730: 82 10 20 02 mov 2, %g1 <== NOT EXECUTED
2008734: c2 24 20 34 st %g1, [ %l0 + 0x34 ] <== NOT EXECUTED
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
2008738: 81 c7 e0 08 ret <== NOT EXECUTED
200873c: 81 e8 00 00 restore <== NOT EXECUTED
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;
2008740: 82 10 20 02 mov 2, %g1
2008744: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
2008748: 81 c7 e0 08 ret
200874c: 91 e8 20 00 restore %g0, 0, %o0
02008750 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
2008750: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2008754: 90 10 00 18 mov %i0, %o0
2008758: 40 00 05 25 call 2009bec <_Thread_Get>
200875c: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2008760: c2 07 bf f4 ld [ %fp + -12 ], %g1
2008764: 80 a0 60 00 cmp %g1, 0
2008768: 12 80 00 08 bne 2008788 <_CORE_RWLock_Timeout+0x38> <== NEVER TAKEN
200876c: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2008770: 40 00 07 c9 call 200a694 <_Thread_queue_Process_timeout>
2008774: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2008778: 05 00 80 6b sethi %hi(0x201ac00), %g2
200877c: c2 00 a1 f0 ld [ %g2 + 0x1f0 ], %g1 ! 201adf0 <_Thread_Dispatch_disable_level>
2008780: 82 00 7f ff add %g1, -1, %g1
2008784: c2 20 a1 f0 st %g1, [ %g2 + 0x1f0 ]
2008788: 81 c7 e0 08 ret
200878c: 81 e8 00 00 restore
02007610 <_CORE_barrier_Wait>:
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
2007610: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
2007614: 03 00 80 67 sethi %hi(0x2019c00), %g1
2007618: e2 00 60 34 ld [ %g1 + 0x34 ], %l1 ! 2019c34 <_Thread_Executing>
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
200761c: b4 10 00 1c mov %i4, %i2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
2007620: c0 24 60 34 clr [ %l1 + 0x34 ]
_ISR_Disable( level );
2007624: 7f ff ec 4f call 2002760 <sparc_disable_interrupts>
2007628: a0 10 00 18 mov %i0, %l0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
200762c: a4 10 00 19 mov %i1, %l2
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
2007630: 86 10 00 08 mov %o0, %g3
the_barrier->number_of_waiting_threads++;
2007634: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
if ( the_barrier->number_of_waiting_threads ==
2007638: c4 06 20 44 ld [ %i0 + 0x44 ], %g2
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
200763c: 82 00 60 01 inc %g1
if ( the_barrier->number_of_waiting_threads ==
2007640: 80 a0 40 02 cmp %g1, %g2
2007644: 12 80 00 06 bne 200765c <_CORE_barrier_Wait+0x4c>
2007648: c2 26 20 48 st %g1, [ %i0 + 0x48 ]
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
200764c: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
2007650: 80 a0 60 00 cmp %g1, 0
2007654: 02 80 00 0d be 2007688 <_CORE_barrier_Wait+0x78> <== ALWAYS TAKEN
2007658: 82 10 20 01 mov 1, %g1
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
200765c: 82 10 20 01 mov 1, %g1
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
2007660: e4 24 60 20 st %l2, [ %l1 + 0x20 ]
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
2007664: e0 24 60 44 st %l0, [ %l1 + 0x44 ]
2007668: c2 24 20 30 st %g1, [ %l0 + 0x30 ]
executing->Wait.id = id;
_ISR_Enable( level );
200766c: 90 10 00 03 mov %g3, %o0
2007670: 7f ff ec 40 call 2002770 <sparc_enable_interrupts>
2007674: 35 00 80 25 sethi %hi(0x2009400), %i2
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
2007678: b0 10 00 10 mov %l0, %i0
200767c: b2 10 00 1b mov %i3, %i1
2007680: 40 00 07 41 call 2009384 <_Thread_queue_Enqueue_with_handler>
2007684: 95 ee a3 dc restore %i2, 0x3dc, %o2
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
2007688: c2 24 60 34 st %g1, [ %l1 + 0x34 ]
_ISR_Enable( level );
200768c: 7f ff ec 39 call 2002770 <sparc_enable_interrupts>
2007690: 01 00 00 00 nop
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
2007694: 40 00 17 3b call 200d380 <_CORE_barrier_Release>
2007698: 81 e8 00 00 restore
020127a4 <_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
)
{
20127a4: 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 ) {
20127a8: 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
)
{
20127ac: 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 ) {
20127b0: 80 a0 40 1a cmp %g1, %i2
20127b4: 0a 80 00 17 bcs 2012810 <_CORE_message_queue_Broadcast+0x6c><== NEVER TAKEN
20127b8: 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 ) {
20127bc: c2 04 a0 48 ld [ %l2 + 0x48 ], %g1
20127c0: 80 a0 60 00 cmp %g1, 0
20127c4: 02 80 00 0a be 20127ec <_CORE_message_queue_Broadcast+0x48><== ALWAYS TAKEN
20127c8: a2 10 20 00 clr %l1
*count = 0;
20127cc: c0 27 40 00 clr [ %i5 ] <== NOT EXECUTED
20127d0: 81 c7 e0 08 ret <== NOT EXECUTED
20127d4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
20127d8: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
20127dc: 40 00 23 f1 call 201b7a0 <memcpy>
20127e0: a2 04 60 01 inc %l1
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
20127e4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
20127e8: 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))) {
20127ec: 40 00 0a 40 call 20150ec <_Thread_queue_Dequeue>
20127f0: 90 10 00 12 mov %l2, %o0
20127f4: 92 10 00 19 mov %i1, %o1
20127f8: a0 10 00 08 mov %o0, %l0
20127fc: 80 a2 20 00 cmp %o0, 0
2012800: 12 bf ff f6 bne 20127d8 <_CORE_message_queue_Broadcast+0x34>
2012804: 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;
2012808: e2 27 40 00 st %l1, [ %i5 ]
201280c: b0 10 20 00 clr %i0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
2012810: 81 c7 e0 08 ret
2012814: 81 e8 00 00 restore
02012554 <_CORE_message_queue_Initialize>:
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
2012554: 9d e3 bf 98 save %sp, -104, %sp
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
the_message_queue->number_of_pending_messages = 0;
2012558: c0 26 20 48 clr [ %i0 + 0x48 ]
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
201255c: 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;
2012560: 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;
2012564: c0 26 20 60 clr [ %i0 + 0x60 ]
the_message_queue->notify_argument = the_argument;
2012568: 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)) {
201256c: 80 8e e0 03 btst 3, %i3
2012570: 02 80 00 09 be 2012594 <_CORE_message_queue_Initialize+0x40>
2012574: a0 10 00 1b mov %i3, %l0
allocated_message_size += sizeof(uint32_t);
2012578: 82 06 e0 04 add %i3, 4, %g1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
201257c: a0 08 7f fc and %g1, -4, %l0
}
if (allocated_message_size < maximum_message_size)
2012580: 80 a6 c0 10 cmp %i3, %l0
2012584: 08 80 00 05 bleu 2012598 <_CORE_message_queue_Initialize+0x44><== ALWAYS TAKEN
2012588: b6 04 20 14 add %l0, 0x14, %i3
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
201258c: 81 c7 e0 08 ret
2012590: 91 e8 20 00 restore %g0, 0, %o0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
2012594: b6 04 20 14 add %l0, 0x14, %i3
2012598: 92 10 00 1a mov %i2, %o1
201259c: 40 00 29 d0 call 201ccdc <.umul>
20125a0: 90 10 00 1b mov %i3, %o0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
20125a4: 80 a2 00 10 cmp %o0, %l0
20125a8: 0a bf ff f9 bcs 201258c <_CORE_message_queue_Initialize+0x38><== NEVER TAKEN
20125ac: 01 00 00 00 nop
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
20125b0: 7f ff f3 80 call 200f3b0 <_Workspace_Allocate>
20125b4: 01 00 00 00 nop
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
20125b8: 80 a2 20 00 cmp %o0, 0
20125bc: 02 bf ff f4 be 201258c <_CORE_message_queue_Initialize+0x38>
20125c0: d0 26 20 5c st %o0, [ %i0 + 0x5c ]
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
20125c4: 92 10 00 08 mov %o0, %o1
20125c8: 94 10 00 1a mov %i2, %o2
20125cc: 90 06 20 68 add %i0, 0x68, %o0
20125d0: 7f ff ff 73 call 201239c <_Chain_Initialize>
20125d4: 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(
20125d8: 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);
20125dc: 84 06 20 50 add %i0, 0x50, %g2
20125e0: 82 18 60 01 xor %g1, 1, %g1
20125e4: 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);
20125e8: 82 06 20 54 add %i0, 0x54, %g1
the_chain->permanent_null = NULL;
20125ec: c0 26 20 54 clr [ %i0 + 0x54 ]
20125f0: 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);
20125f4: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
20125f8: c4 26 20 58 st %g2, [ %i0 + 0x58 ]
20125fc: 92 60 3f ff subx %g0, -1, %o1
2012600: 94 10 20 80 mov 0x80, %o2
2012604: 96 10 20 06 mov 6, %o3
2012608: 7f ff ef c6 call 200e520 <_Thread_queue_Initialize>
201260c: b0 10 20 01 mov 1, %i0
2012610: 81 c7 e0 08 ret
2012614: 81 e8 00 00 restore
0200c2a0 <_CORE_message_queue_Submit>:
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
200c2a0: 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 ) {
200c2a4: 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,
bool wait,
Watchdog_Interval timeout
)
{
200c2a8: 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 ) {
200c2ac: 80 a0 40 1a cmp %g1, %i2
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
200c2b0: e4 0f a0 5f ldub [ %fp + 0x5f ], %l2
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
200c2b4: 0a 80 00 22 bcs 200c33c <_CORE_message_queue_Submit+0x9c>
200c2b8: 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 ) {
200c2bc: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
200c2c0: 80 a0 a0 00 cmp %g2, 0
200c2c4: 02 80 00 22 be 200c34c <_CORE_message_queue_Submit+0xac>
200c2c8: 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 <
200c2cc: c2 04 60 44 ld [ %l1 + 0x44 ], %g1
200c2d0: 80 a0 40 02 cmp %g1, %g2
200c2d4: 18 80 00 2b bgu 200c380 <_CORE_message_queue_Submit+0xe0>
200c2d8: 80 a4 a0 00 cmp %l2, 0
* 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 ) {
200c2dc: 02 80 00 18 be 200c33c <_CORE_message_queue_Submit+0x9c>
200c2e0: 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() ) {
200c2e4: 03 00 80 8a sethi %hi(0x2022800), %g1
200c2e8: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 2022ba0 <_ISR_Nest_level>
200c2ec: 80 a0 a0 00 cmp %g2, 0
200c2f0: 32 80 00 13 bne,a 200c33c <_CORE_message_queue_Submit+0x9c><== NEVER TAKEN
200c2f4: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
200c2f8: 03 00 80 8a sethi %hi(0x2022800), %g1
_ISR_Disable( level );
200c2fc: 7f ff e8 6d call 20064b0 <sparc_disable_interrupts>
200c300: e0 00 63 c4 ld [ %g1 + 0x3c4 ], %l0 ! 2022bc4 <_Thread_Executing>
200c304: 82 10 20 01 mov 1, %g1
200c308: c2 24 60 30 st %g1, [ %l1 + 0x30 ]
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
200c30c: 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;
200c310: f6 24 20 20 st %i3, [ %l0 + 0x20 ]
executing->Wait.return_argument_second.immutable_object = buffer;
200c314: f2 24 20 2c st %i1, [ %l0 + 0x2c ]
executing->Wait.option = (uint32_t) size;
200c318: 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;
200c31c: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
200c320: 7f ff e8 68 call 20064c0 <sparc_enable_interrupts>
200c324: b0 10 20 07 mov 7, %i0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
200c328: d2 07 a0 60 ld [ %fp + 0x60 ], %o1
200c32c: 90 10 00 11 mov %l1, %o0
200c330: 15 00 80 39 sethi %hi(0x200e400), %o2
200c334: 40 00 07 a4 call 200e1c4 <_Thread_queue_Enqueue_with_handler>
200c338: 94 12 a2 1c or %o2, 0x21c, %o2 ! 200e61c <_Thread_queue_Timeout>
200c33c: 81 c7 e0 08 ret
200c340: 81 e8 00 00 restore
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
}
200c344: 81 c7 e0 08 ret <== NOT EXECUTED
200c348: 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 );
200c34c: 40 00 07 3a call 200e034 <_Thread_queue_Dequeue>
200c350: 90 10 00 11 mov %l1, %o0
if ( the_thread ) {
200c354: a0 92 20 00 orcc %o0, 0, %l0
200c358: 02 80 00 1b be 200c3c4 <_CORE_message_queue_Submit+0x124>
200c35c: 92 10 00 19 mov %i1, %o1
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
200c360: d0 04 20 2c ld [ %l0 + 0x2c ], %o0
200c364: 40 00 22 07 call 2014b80 <memcpy>
200c368: 94 10 00 1a mov %i2, %o2
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
200c36c: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
the_thread->Wait.count = submit_type;
200c370: fa 24 20 24 st %i5, [ %l0 + 0x24 ]
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
200c374: f4 20 40 00 st %i2, [ %g1 ]
the_thread->Wait.count = submit_type;
200c378: 81 c7 e0 08 ret
200c37c: 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 *)
200c380: 40 00 17 f4 call 2012350 <_Chain_Get>
200c384: 90 04 60 68 add %l1, 0x68, %o0
/*
* NOTE: If the system is consistent, this error should never occur.
*/
if ( !the_message ) {
200c388: a0 92 20 00 orcc %o0, 0, %l0
200c38c: 02 bf ff ee be 200c344 <_CORE_message_queue_Submit+0xa4> <== NEVER TAKEN
200c390: 92 10 00 19 mov %i1, %o1
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
200c394: 94 10 00 1a mov %i2, %o2
200c398: 40 00 21 fa call 2014b80 <memcpy>
200c39c: 90 04 20 10 add %l0, 0x10, %o0
size
);
the_message->Contents.size = size;
the_message->priority = submit_type;
_CORE_message_queue_Insert_message(
200c3a0: 90 10 00 11 mov %l1, %o0
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
200c3a4: f4 24 20 0c st %i2, [ %l0 + 0xc ]
the_message->priority = submit_type;
200c3a8: fa 24 20 08 st %i5, [ %l0 + 8 ]
_CORE_message_queue_Insert_message(
200c3ac: 92 10 00 10 mov %l0, %o1
200c3b0: 94 10 00 1d mov %i5, %o2
200c3b4: 40 00 18 12 call 20123fc <_CORE_message_queue_Insert_message>
200c3b8: b0 10 20 00 clr %i0
200c3bc: 81 c7 e0 08 ret
200c3c0: 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 ) {
200c3c4: 10 bf ff c2 b 200c2cc <_CORE_message_queue_Submit+0x2c>
200c3c8: c4 04 60 48 ld [ %l1 + 0x48 ], %g2
020063fc <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
20063fc: 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;
2006400: 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
)
{
2006404: 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;
2006408: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
200640c: c4 06 60 04 ld [ %i1 + 4 ], %g2
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
2006410: 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;
2006414: c4 26 20 44 st %g2, [ %i0 + 0x44 ]
2006418: c6 06 60 08 ld [ %i1 + 8 ], %g3
200641c: c6 26 20 48 st %g3, [ %i0 + 0x48 ]
2006420: c2 06 60 0c ld [ %i1 + 0xc ], %g1
the_mutex->lock = initial_lock;
2006424: 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;
2006428: c2 26 20 4c st %g1, [ %i0 + 0x4c ]
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
200642c: 12 80 00 1f bne 20064a8 <_CORE_mutex_Initialize+0xac>
2006430: c0 26 20 58 clr [ %i0 + 0x58 ]
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
2006434: 03 00 80 60 sethi %hi(0x2018000), %g1
2006438: c8 00 63 d4 ld [ %g1 + 0x3d4 ], %g4 ! 20183d4 <_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;
200643c: 84 10 20 01 mov 1, %g2
2006440: c4 26 20 54 st %g2, [ %i0 + 0x54 ]
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
2006444: c2 01 20 08 ld [ %g4 + 8 ], %g1
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;
2006448: c8 26 20 5c st %g4, [ %i0 + 0x5c ]
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200644c: 80 a0 e0 02 cmp %g3, 2
2006450: 02 80 00 05 be 2006464 <_CORE_mutex_Initialize+0x68>
2006454: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
2006458: 80 a0 e0 03 cmp %g3, 3
200645c: 32 80 00 17 bne,a 20064b8 <_CORE_mutex_Initialize+0xbc> <== ALWAYS TAKEN
2006460: c2 06 60 08 ld [ %i1 + 8 ], %g1
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
2006464: c4 01 20 14 ld [ %g4 + 0x14 ], %g2
2006468: c2 02 20 4c ld [ %o0 + 0x4c ], %g1
200646c: 80 a0 80 01 cmp %g2, %g1
2006470: 0a 80 00 0c bcs 20064a0 <_CORE_mutex_Initialize+0xa4> <== NEVER TAKEN
2006474: b0 10 20 06 mov 6, %i0
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
2006478: c2 01 20 1c ld [ %g4 + 0x1c ], %g1
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
200647c: 94 10 24 00 mov 0x400, %o2
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
2006480: 82 00 60 01 inc %g1
2006484: c2 21 20 1c st %g1, [ %g4 + 0x1c ]
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
2006488: c2 06 60 08 ld [ %i1 + 8 ], %g1
200648c: 96 10 20 05 mov 5, %o3
2006490: 80 a0 00 01 cmp %g0, %g1
2006494: b0 10 20 00 clr %i0
2006498: 40 00 08 13 call 20084e4 <_Thread_queue_Initialize>
200649c: 92 40 20 00 addx %g0, 0, %o1
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
20064a0: 81 c7 e0 08 ret
20064a4: 81 e8 00 00 restore
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
20064a8: c0 26 20 54 clr [ %i0 + 0x54 ]
the_mutex->holder = NULL;
20064ac: c0 26 20 5c clr [ %i0 + 0x5c ]
the_mutex->holder_id = 0;
20064b0: c0 26 20 60 clr [ %i0 + 0x60 ]
}
_Thread_queue_Initialize(
20064b4: c2 06 60 08 ld [ %i1 + 8 ], %g1
20064b8: 94 10 24 00 mov 0x400, %o2
20064bc: 80 a0 00 01 cmp %g0, %g1
20064c0: 96 10 20 05 mov 5, %o3
20064c4: 92 40 20 00 addx %g0, 0, %o1
20064c8: 40 00 08 07 call 20084e4 <_Thread_queue_Initialize>
20064cc: b0 10 20 00 clr %i0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
20064d0: 81 c7 e0 08 ret
20064d4: 81 e8 00 00 restore
02006564 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
2006564: 9d e3 bf 98 save %sp, -104, %sp
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
2006568: 21 00 80 60 sethi %hi(0x2018000), %l0
200656c: c2 04 23 10 ld [ %l0 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
2006570: 80 a0 60 00 cmp %g1, 0
2006574: 02 80 00 05 be 2006588 <_CORE_mutex_Seize+0x24>
2006578: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200657c: 80 8e a0 ff btst 0xff, %i2
2006580: 12 80 00 1a bne 20065e8 <_CORE_mutex_Seize+0x84> <== ALWAYS TAKEN
2006584: 03 00 80 61 sethi %hi(0x2018400), %g1
2006588: 90 10 00 18 mov %i0, %o0
200658c: 40 00 16 c8 call 200c0ac <_CORE_mutex_Seize_interrupt_trylock>
2006590: 92 07 a0 54 add %fp, 0x54, %o1
2006594: 80 a2 20 00 cmp %o0, 0
2006598: 02 80 00 12 be 20065e0 <_CORE_mutex_Seize+0x7c>
200659c: 80 8e a0 ff btst 0xff, %i2
20065a0: 02 80 00 1a be 2006608 <_CORE_mutex_Seize+0xa4>
20065a4: 01 00 00 00 nop
20065a8: c2 04 23 10 ld [ %l0 + 0x310 ], %g1
20065ac: 05 00 80 60 sethi %hi(0x2018000), %g2
20065b0: c6 00 a3 d4 ld [ %g2 + 0x3d4 ], %g3 ! 20183d4 <_Thread_Executing>
20065b4: 82 00 60 01 inc %g1
20065b8: f2 20 e0 20 st %i1, [ %g3 + 0x20 ]
20065bc: c2 24 23 10 st %g1, [ %l0 + 0x310 ]
20065c0: f0 20 e0 44 st %i0, [ %g3 + 0x44 ]
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
20065c4: 82 10 20 01 mov 1, %g1
20065c8: c2 26 20 30 st %g1, [ %i0 + 0x30 ]
20065cc: 7f ff ee 0a call 2001df4 <sparc_enable_interrupts>
20065d0: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
20065d4: 90 10 00 18 mov %i0, %o0
20065d8: 7f ff ff c0 call 20064d8 <_CORE_mutex_Seize_interrupt_blocking>
20065dc: 92 10 00 1b mov %i3, %o1
20065e0: 81 c7 e0 08 ret
20065e4: 81 e8 00 00 restore
20065e8: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2
20065ec: 80 a0 a0 01 cmp %g2, 1
20065f0: 28 bf ff e7 bleu,a 200658c <_CORE_mutex_Seize+0x28>
20065f4: 90 10 00 18 mov %i0, %o0
20065f8: 90 10 20 00 clr %o0
20065fc: 92 10 20 00 clr %o1
2006600: 40 00 01 69 call 2006ba4 <_Internal_error_Occurred>
2006604: 94 10 20 13 mov 0x13, %o2
2006608: 7f ff ed fb call 2001df4 <sparc_enable_interrupts>
200660c: d0 07 a0 54 ld [ %fp + 0x54 ], %o0
2006610: 03 00 80 60 sethi %hi(0x2018000), %g1
2006614: c6 00 63 d4 ld [ %g1 + 0x3d4 ], %g3 ! 20183d4 <_Thread_Executing>
2006618: 84 10 20 01 mov 1, %g2
200661c: c4 20 e0 34 st %g2, [ %g3 + 0x34 ]
2006620: 81 c7 e0 08 ret
2006624: 81 e8 00 00 restore
0200c0ac <_CORE_mutex_Seize_interrupt_trylock>:
#if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__)
int _CORE_mutex_Seize_interrupt_trylock(
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
200c0ac: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
ISR_Level level = *level_p;
/* disabled when you get here */
executing = _Thread_Executing;
200c0b0: 03 00 80 60 sethi %hi(0x2018000), %g1
200c0b4: c6 00 63 d4 ld [ %g1 + 0x3d4 ], %g3 ! 20183d4 <_Thread_Executing>
CORE_mutex_Control *the_mutex,
ISR_Level *level_p
)
{
Thread_Control *executing;
ISR_Level level = *level_p;
200c0b8: d0 06 40 00 ld [ %i1 ], %o0
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL;
200c0bc: c0 20 e0 34 clr [ %g3 + 0x34 ]
if ( !_CORE_mutex_Is_locked( the_mutex ) ) {
200c0c0: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200c0c4: 80 a0 60 00 cmp %g1, 0
200c0c8: 22 80 00 12 be,a 200c110 <_CORE_mutex_Seize_interrupt_trylock+0x64>
200c0cc: c2 06 20 5c ld [ %i0 + 0x5c ], %g1
the_mutex->lock = CORE_MUTEX_LOCKED;
200c0d0: c0 26 20 50 clr [ %i0 + 0x50 ]
the_mutex->holder = executing;
the_mutex->holder_id = executing->Object.id;
200c0d4: c2 00 e0 08 ld [ %g3 + 8 ], %g1
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200c0d8: c4 06 20 48 ld [ %i0 + 0x48 ], %g2
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;
200c0dc: c2 26 20 60 st %g1, [ %i0 + 0x60 ]
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;
200c0e0: c6 26 20 5c st %g3, [ %i0 + 0x5c ]
the_mutex->holder_id = executing->Object.id;
the_mutex->nest_count = 1;
200c0e4: 82 10 20 01 mov 1, %g1
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
200c0e8: 80 a0 a0 02 cmp %g2, 2
200c0ec: 02 80 00 0e be 200c124 <_CORE_mutex_Seize_interrupt_trylock+0x78>
200c0f0: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
200c0f4: 80 a0 a0 03 cmp %g2, 3
200c0f8: 22 80 00 0d be,a 200c12c <_CORE_mutex_Seize_interrupt_trylock+0x80>
200c0fc: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
executing->resource_count++;
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
_ISR_Enable( level );
200c100: 7f ff d7 3d call 2001df4 <sparc_enable_interrupts>
200c104: b0 10 20 00 clr %i0
200c108: 81 c7 e0 08 ret
200c10c: 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 ) ) {
200c110: 80 a0 c0 01 cmp %g3, %g1
200c114: 22 80 00 2a be,a 200c1bc <_CORE_mutex_Seize_interrupt_trylock+0x110>
200c118: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p );
}
200c11c: 81 c7 e0 08 ret
200c120: 91 e8 20 01 restore %g0, 1, %o0
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200c124: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200c128: 80 a0 a0 03 cmp %g2, 3
_Chain_Prepend_unprotected( &executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = executing->current_priority;
#endif
executing->resource_count++;
200c12c: 82 00 60 01 inc %g1
}
if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
200c130: 12 bf ff f4 bne 200c100 <_CORE_mutex_Seize_interrupt_trylock+0x54>
200c134: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
*/
{
Priority_Control ceiling;
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
200c138: c4 06 20 4c ld [ %i0 + 0x4c ], %g2
current = executing->current_priority;
200c13c: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
if ( current == ceiling ) {
200c140: 80 a0 80 01 cmp %g2, %g1
200c144: 02 80 00 2f be 200c200 <_CORE_mutex_Seize_interrupt_trylock+0x154><== NEVER TAKEN
200c148: 01 00 00 00 nop
_ISR_Enable( level );
return 0;
}
if ( current > ceiling ) {
200c14c: 1a 80 00 11 bcc 200c190 <_CORE_mutex_Seize_interrupt_trylock+0xe4>
200c150: 82 10 20 06 mov 6, %g1 ! 6 <PROM_START+0x6>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200c154: 05 00 80 60 sethi %hi(0x2018000), %g2
200c158: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
200c15c: 82 00 60 01 inc %g1
200c160: c2 20 a3 10 st %g1, [ %g2 + 0x310 ]
_Thread_Disable_dispatch();
_ISR_Enable( level );
200c164: 7f ff d7 24 call 2001df4 <sparc_enable_interrupts>
200c168: 01 00 00 00 nop
_Thread_Change_priority(
200c16c: d2 06 20 4c ld [ %i0 + 0x4c ], %o1
200c170: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
200c174: 94 10 20 00 clr %o2
200c178: 7f ff ed 10 call 20075b8 <_Thread_Change_priority>
200c17c: b0 10 20 00 clr %i0
the_mutex->holder,
the_mutex->Attributes.priority_ceiling,
FALSE
);
_Thread_Enable_dispatch();
200c180: 7f ff ee a4 call 2007c10 <_Thread_Enable_dispatch>
200c184: 01 00 00 00 nop
200c188: 81 c7 e0 08 ret
200c18c: 81 e8 00 00 restore
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
200c190: c2 20 e0 34 st %g1, [ %g3 + 0x34 ]
the_mutex->lock = CORE_MUTEX_UNLOCKED;
the_mutex->nest_count = 0; /* undo locking above */
200c194: c0 26 20 54 clr [ %i0 + 0x54 ]
_Thread_Enable_dispatch();
return 0;
}
/* if ( current < ceiling ) */ {
executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED;
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200c198: 84 10 20 01 mov 1, %g2
200c19c: c4 26 20 50 st %g2, [ %i0 + 0x50 ]
the_mutex->nest_count = 0; /* undo locking above */
executing->resource_count--; /* undo locking above */
200c1a0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
200c1a4: 82 00 7f ff add %g1, -1, %g1
200c1a8: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
_ISR_Enable( level );
200c1ac: 7f ff d7 12 call 2001df4 <sparc_enable_interrupts>
200c1b0: b0 10 20 00 clr %i0
200c1b4: 81 c7 e0 08 ret
200c1b8: 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 ) ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
200c1bc: 80 a0 60 00 cmp %g1, 0
200c1c0: 22 80 00 0a be,a 200c1e8 <_CORE_mutex_Seize_interrupt_trylock+0x13c>
200c1c4: c2 06 20 54 ld [ %i0 + 0x54 ], %g1
200c1c8: 80 a0 60 01 cmp %g1, 1
200c1cc: 12 bf ff d4 bne 200c11c <_CORE_mutex_Seize_interrupt_trylock+0x70>
200c1d0: 82 10 20 02 mov 2, %g1
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;
200c1d4: c2 20 e0 34 st %g1, [ %g3 + 0x34 ]
_ISR_Enable( level );
200c1d8: 7f ff d7 07 call 2001df4 <sparc_enable_interrupts>
200c1dc: b0 10 20 00 clr %i0
200c1e0: 81 c7 e0 08 ret
200c1e4: 81 e8 00 00 restore
* 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++;
200c1e8: 82 00 60 01 inc %g1
200c1ec: c2 26 20 54 st %g1, [ %i0 + 0x54 ]
_ISR_Enable( level );
200c1f0: 7f ff d7 01 call 2001df4 <sparc_enable_interrupts>
200c1f4: b0 10 20 00 clr %i0
200c1f8: 81 c7 e0 08 ret
200c1fc: 81 e8 00 00 restore
Priority_Control current;
ceiling = the_mutex->Attributes.priority_ceiling;
current = executing->current_priority;
if ( current == ceiling ) {
_ISR_Enable( level );
200c200: 7f ff d6 fd call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200c204: b0 10 20 00 clr %i0 <== NOT EXECUTED
200c208: 81 c7 e0 08 ret <== NOT EXECUTED
200c20c: 81 e8 00 00 restore <== NOT EXECUTED
02006628 <_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
)
{
2006628: 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 ) {
200662c: c2 0e 20 44 ldub [ %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
)
{
2006630: 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 ) {
2006634: 80 a0 60 00 cmp %g1, 0
2006638: 02 80 00 07 be 2006654 <_CORE_mutex_Surrender+0x2c>
200663c: d0 06 20 5c ld [ %i0 + 0x5c ], %o0
if ( !_Thread_Is_executing( holder ) )
2006640: 03 00 80 60 sethi %hi(0x2018000), %g1
2006644: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
2006648: 80 a2 00 02 cmp %o0, %g2
200664c: 12 80 00 2e bne 2006704 <_CORE_mutex_Surrender+0xdc>
2006650: 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 )
2006654: c2 04 20 54 ld [ %l0 + 0x54 ], %g1
2006658: 80 a0 60 00 cmp %g1, 0
200665c: 02 80 00 22 be 20066e4 <_CORE_mutex_Surrender+0xbc>
2006660: 82 00 7f ff add %g1, -1, %g1
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
2006664: 80 a0 60 00 cmp %g1, 0
2006668: 12 80 00 21 bne 20066ec <_CORE_mutex_Surrender+0xc4>
200666c: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
*/
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_inherit_priority(
CORE_mutex_Attributes *the_attribute
)
{
return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
2006670: 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 ) ||
2006674: 80 a0 a0 02 cmp %g2, 2
2006678: 02 80 00 31 be 200673c <_CORE_mutex_Surrender+0x114>
200667c: 80 a0 a0 03 cmp %g2, 3
2006680: 22 80 00 30 be,a 2006740 <_CORE_mutex_Surrender+0x118>
2006684: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
}
the_mutex->holder = NULL;
2006688: 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 ) ||
200668c: 80 a0 a0 02 cmp %g2, 2
2006690: 02 80 00 1f be 200670c <_CORE_mutex_Surrender+0xe4>
2006694: c0 24 20 60 clr [ %l0 + 0x60 ]
2006698: 80 a0 a0 03 cmp %g2, 3
200669c: 22 80 00 1d be,a 2006710 <_CORE_mutex_Surrender+0xe8>
20066a0: 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 ) ) ) {
20066a4: 40 00 06 55 call 2007ff8 <_Thread_queue_Dequeue>
20066a8: 90 10 00 10 mov %l0, %o0
20066ac: 86 92 20 00 orcc %o0, 0, %g3
20066b0: 02 80 00 37 be 200678c <_CORE_mutex_Surrender+0x164>
20066b4: 82 10 20 01 mov 1, %g1
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
20066b8: c2 00 e0 08 ld [ %g3 + 8 ], %g1
the_mutex->nest_count = 1;
switch ( the_mutex->Attributes.discipline ) {
20066bc: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
} else
#endif
{
the_mutex->holder = the_thread;
the_mutex->holder_id = the_thread->Object.id;
20066c0: c2 24 20 60 st %g1, [ %l0 + 0x60 ]
} else
#endif
{
the_mutex->holder = the_thread;
20066c4: c6 24 20 5c st %g3, [ %l0 + 0x5c ]
the_mutex->holder_id = the_thread->Object.id;
the_mutex->nest_count = 1;
20066c8: 82 10 20 01 mov 1, %g1
switch ( the_mutex->Attributes.discipline ) {
20066cc: 80 a0 a0 02 cmp %g2, 2
20066d0: 02 80 00 2a be 2006778 <_CORE_mutex_Surrender+0x150>
20066d4: c2 24 20 54 st %g1, [ %l0 + 0x54 ]
20066d8: 80 a0 a0 03 cmp %g2, 3
20066dc: 22 80 00 1c be,a 200674c <_CORE_mutex_Surrender+0x124>
20066e0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
20066e4: 81 c7 e0 08 ret
20066e8: 91 e8 20 00 restore %g0, 0, %o0
return CORE_MUTEX_STATUS_SUCCESSFUL;
the_mutex->nest_count--;
if ( the_mutex->nest_count != 0 ) {
switch ( the_mutex->Attributes.lock_nesting_behavior ) {
20066ec: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
20066f0: 80 a0 60 00 cmp %g1, 0
20066f4: 02 bf ff fc be 20066e4 <_CORE_mutex_Surrender+0xbc> <== ALWAYS TAKEN
20066f8: 80 a0 60 01 cmp %g1, 1
20066fc: 12 bf ff dd bne 2006670 <_CORE_mutex_Surrender+0x48> <== NOT EXECUTED
2006700: b0 10 20 02 mov 2, %i0 <== NOT EXECUTED
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
2006704: 81 c7 e0 08 ret
2006708: 81 e8 00 00 restore
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
if(the_mutex->queue.priority_before != holder->current_priority)
_Thread_Change_priority(holder,the_mutex->queue.priority_before,TRUE);
#endif
if ( holder->resource_count == 0 &&
200670c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006710: 80 a0 60 00 cmp %g1, 0
2006714: 12 bf ff e4 bne 20066a4 <_CORE_mutex_Surrender+0x7c>
2006718: 01 00 00 00 nop
200671c: d2 02 20 18 ld [ %o0 + 0x18 ], %o1
2006720: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
2006724: 80 a2 40 01 cmp %o1, %g1
2006728: 02 bf ff df be 20066a4 <_CORE_mutex_Surrender+0x7c>
200672c: 01 00 00 00 nop
holder->real_priority != holder->current_priority ) {
_Thread_Change_priority( holder, holder->real_priority, TRUE );
2006730: 40 00 03 a2 call 20075b8 <_Thread_Change_priority>
2006734: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
2006738: 30 bf ff db b,a 20066a4 <_CORE_mutex_Surrender+0x7c>
the_mutex->nest_count++;
return CORE_MUTEX_RELEASE_NOT_ORDER;
}
first_node = _Chain_Get_first_unprotected(&holder->lock_mutex);
#endif
holder->resource_count--;
200673c: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006740: 82 00 7f ff add %g1, -1, %g1
2006744: 10 bf ff d1 b 2006688 <_CORE_mutex_Surrender+0x60>
2006748: c2 22 20 1c st %g1, [ %o0 + 0x1c ]
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
if (the_mutex->Attributes.priority_ceiling <
200674c: c4 00 e0 14 ld [ %g3 + 0x14 ], %g2
case CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
2006750: 82 00 60 01 inc %g1
2006754: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
if (the_mutex->Attributes.priority_ceiling <
2006758: d2 04 20 4c ld [ %l0 + 0x4c ], %o1
200675c: 80 a2 40 02 cmp %o1, %g2
2006760: 1a bf ff e1 bcc 20066e4 <_CORE_mutex_Surrender+0xbc> <== NEVER TAKEN
2006764: 94 10 20 00 clr %o2
the_thread->current_priority){
_Thread_Change_priority(
2006768: 40 00 03 94 call 20075b8 <_Thread_Change_priority>
200676c: b0 10 20 00 clr %i0
2006770: 81 c7 e0 08 ret
2006774: 81 e8 00 00 restore
case CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT:
#ifdef __RTEMS_STRICT_ORDER_MUTEX__
_Chain_Prepend_unprotected(&the_thread->lock_mutex,&the_mutex->queue.lock_queue);
the_mutex->queue.priority_before = the_thread->current_priority;
#endif
the_thread->resource_count++;
2006778: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
200677c: 82 00 60 01 inc %g1
2006780: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
2006784: 81 c7 e0 08 ret
2006788: 91 e8 20 00 restore %g0, 0, %o0
}
break;
}
}
} else
the_mutex->lock = CORE_MUTEX_UNLOCKED;
200678c: c2 24 20 50 st %g1, [ %l0 + 0x50 ]
2006790: 81 c7 e0 08 ret
2006794: 91 e8 20 00 restore %g0, 0, %o0
020067e4 <_CORE_semaphore_Surrender>:
CORE_semaphore_Status _CORE_semaphore_Surrender(
CORE_semaphore_Control *the_semaphore,
Objects_Id id,
CORE_semaphore_API_mp_support_callout api_semaphore_mp_support
)
{
20067e4: 9d e3 bf 98 save %sp, -104, %sp
20067e8: a0 10 00 18 mov %i0, %l0
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
20067ec: b0 10 20 00 clr %i0
20067f0: 40 00 06 02 call 2007ff8 <_Thread_queue_Dequeue>
20067f4: 90 10 00 10 mov %l0, %o0
20067f8: 80 a2 20 00 cmp %o0, 0
20067fc: 02 80 00 04 be 200680c <_CORE_semaphore_Surrender+0x28>
2006800: 01 00 00 00 nop
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
2006804: 81 c7 e0 08 ret
2006808: 81 e8 00 00 restore
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
200680c: 7f ff ed 76 call 2001de4 <sparc_disable_interrupts>
2006810: 01 00 00 00 nop
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
2006814: c4 04 20 48 ld [ %l0 + 0x48 ], %g2
2006818: c2 04 20 40 ld [ %l0 + 0x40 ], %g1
200681c: 80 a0 80 01 cmp %g2, %g1
2006820: 0a 80 00 06 bcs 2006838 <_CORE_semaphore_Surrender+0x54> <== ALWAYS TAKEN
2006824: b0 10 20 04 mov 4, %i0
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
2006828: 7f ff ed 73 call 2001df4 <sparc_enable_interrupts>
200682c: 01 00 00 00 nop
}
return status;
}
2006830: 81 c7 e0 08 ret
2006834: 81 e8 00 00 restore
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
2006838: 82 00 a0 01 add %g2, 1, %g1
200683c: b0 10 20 00 clr %i0
2006840: 10 bf ff fa b 2006828 <_CORE_semaphore_Surrender+0x44>
2006844: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
020071c8 <_CORE_spinlock_Release>:
*/
CORE_spinlock_Status _CORE_spinlock_Release(
CORE_spinlock_Control *the_spinlock
)
{
20071c8: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
20071cc: 7f ff ec dd call 2002540 <sparc_disable_interrupts>
20071d0: 01 00 00 00 nop
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
20071d4: c2 06 20 04 ld [ %i0 + 4 ], %g1
20071d8: 80 a0 60 00 cmp %g1, 0
20071dc: 02 80 00 0c be 200720c <_CORE_spinlock_Release+0x44>
20071e0: 03 00 80 50 sethi %hi(0x2014000), %g1
}
/*
* It must locked by the current thread before it can be unlocked.
*/
if ( the_spinlock->holder != _Thread_Executing->Object.id ) {
20071e4: c4 00 62 74 ld [ %g1 + 0x274 ], %g2 ! 2014274 <_Thread_Executing>
20071e8: c6 06 20 0c ld [ %i0 + 0xc ], %g3
20071ec: c2 00 a0 08 ld [ %g2 + 8 ], %g1
20071f0: 80 a0 c0 01 cmp %g3, %g1
20071f4: 02 80 00 0a be 200721c <_CORE_spinlock_Release+0x54> <== ALWAYS TAKEN
20071f8: 01 00 00 00 nop
_ISR_Enable( level );
20071fc: 7f ff ec d5 call 2002550 <sparc_enable_interrupts> <== NOT EXECUTED
2007200: b0 10 20 02 mov 2, %i0 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2007204: 81 c7 e0 08 ret <== NOT EXECUTED
2007208: 81 e8 00 00 restore <== NOT EXECUTED
/*
* It must locked before it can be unlocked.
*/
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
_ISR_Enable( level );
200720c: 7f ff ec d1 call 2002550 <sparc_enable_interrupts>
2007210: b0 10 20 06 mov 6, %i0
2007214: 81 c7 e0 08 ret
2007218: 81 e8 00 00 restore
}
/*
* Let it be unlocked.
*/
the_spinlock->users -= 1;
200721c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007220: 82 00 7f ff add %g1, -1, %g1
2007224: c2 26 20 08 st %g1, [ %i0 + 8 ]
the_spinlock->lock = CORE_SPINLOCK_UNLOCKED;
2007228: c0 26 20 04 clr [ %i0 + 4 ]
the_spinlock->holder = 0;
200722c: c0 26 20 0c clr [ %i0 + 0xc ]
_ISR_Enable( level );
2007230: 7f ff ec c8 call 2002550 <sparc_enable_interrupts>
2007234: b0 10 20 00 clr %i0
return CORE_SPINLOCK_SUCCESSFUL;
}
2007238: 81 c7 e0 08 ret
200723c: 81 e8 00 00 restore
02007240 <_CORE_spinlock_Wait>:
CORE_spinlock_Status _CORE_spinlock_Wait(
CORE_spinlock_Control *the_spinlock,
bool wait,
Watchdog_Interval timeout
)
{
2007240: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Watchdog_Interval limit = _Watchdog_Ticks_since_boot + timeout;
2007244: 05 00 80 50 sethi %hi(0x2014000), %g2
2007248: c2 00 a3 04 ld [ %g2 + 0x304 ], %g1 ! 2014304 <_Watchdog_Ticks_since_boot>
200724c: a2 10 a3 04 or %g2, 0x304, %l1
_ISR_Disable( level );
2007250: 7f ff ec bc call 2002540 <sparc_disable_interrupts>
2007254: a0 06 80 01 add %i2, %g1, %l0
2007258: 88 10 00 08 mov %o0, %g4
if ( (the_spinlock->lock == CORE_SPINLOCK_LOCKED) &&
200725c: c2 06 20 04 ld [ %i0 + 4 ], %g1
2007260: 80 a0 60 01 cmp %g1, 1
2007264: 02 80 00 34 be 2007334 <_CORE_spinlock_Wait+0xf4>
2007268: 03 00 80 50 sethi %hi(0x2014000), %g1
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
return CORE_SPINLOCK_HOLDER_RELOCKING;
}
the_spinlock->users += 1;
200726c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2007270: 82 00 60 01 inc %g1
2007274: c2 26 20 08 st %g1, [ %i0 + 8 ]
for ( ;; ) {
if ( the_spinlock->lock == CORE_SPINLOCK_UNLOCKED ) {
2007278: c4 06 20 04 ld [ %i0 + 4 ], %g2
200727c: 80 a0 a0 00 cmp %g2, 0
2007280: 02 80 00 1a be 20072e8 <_CORE_spinlock_Wait+0xa8>
2007284: 80 8e 60 ff btst 0xff, %i1
2007288: 03 00 80 50 sethi %hi(0x2014000), %g1
}
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
200728c: 02 80 00 22 be 2007314 <_CORE_spinlock_Wait+0xd4> <== NEVER TAKEN
2007290: b2 10 61 b0 or %g1, 0x1b0, %i1 ! 20141b0 <_Thread_Dispatch_disable_level>
}
/*
* They are willing to wait but there could be a timeout.
*/
if ( timeout && (limit <= _Watchdog_Ticks_since_boot) ) {
2007294: 80 a6 a0 00 cmp %i2, 0
2007298: 02 80 00 06 be 20072b0 <_CORE_spinlock_Wait+0x70> <== ALWAYS TAKEN
200729c: 01 00 00 00 nop
20072a0: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
20072a4: 80 a4 00 01 cmp %l0, %g1 <== NOT EXECUTED
20072a8: 08 80 00 2d bleu 200735c <_CORE_spinlock_Wait+0x11c> <== NOT EXECUTED
20072ac: 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 );
20072b0: 7f ff ec a8 call 2002550 <sparc_enable_interrupts>
20072b4: 90 10 00 04 mov %g4, %o0
/* An ISR could occur here */
_Thread_Enable_dispatch();
20072b8: 40 00 04 f5 call 200868c <_Thread_Enable_dispatch>
20072bc: 01 00 00 00 nop
20072c0: c2 06 40 00 ld [ %i1 ], %g1
20072c4: 82 00 60 01 inc %g1
20072c8: c2 26 40 00 st %g1, [ %i1 ]
/* Another thread could get dispatched here */
/* Reenter the critical sections so we can attempt the lock again. */
_Thread_Disable_dispatch();
_ISR_Disable( level );
20072cc: 7f ff ec 9d call 2002540 <sparc_disable_interrupts>
20072d0: 01 00 00 00 nop
20072d4: 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 ) {
20072d8: c2 06 20 04 ld [ %i0 + 4 ], %g1
20072dc: 80 a0 60 00 cmp %g1, 0
20072e0: 12 bf ff ee bne 2007298 <_CORE_spinlock_Wait+0x58>
20072e4: 80 a6 a0 00 cmp %i2, 0
the_spinlock->lock = CORE_SPINLOCK_LOCKED;
the_spinlock->holder = _Thread_Executing->Object.id;
20072e8: 03 00 80 50 sethi %hi(0x2014000), %g1
20072ec: c6 00 62 74 ld [ %g1 + 0x274 ], %g3 ! 2014274 <_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;
20072f0: 84 10 20 01 mov 1, %g2
20072f4: c4 26 20 04 st %g2, [ %i0 + 4 ]
the_spinlock->holder = _Thread_Executing->Object.id;
20072f8: c2 00 e0 08 ld [ %g3 + 8 ], %g1
20072fc: c2 26 20 0c st %g1, [ %i0 + 0xc ]
_ISR_Enable( level );
2007300: b0 10 20 00 clr %i0
2007304: 7f ff ec 93 call 2002550 <sparc_enable_interrupts>
2007308: 90 10 00 04 mov %g4, %o0
200730c: 81 c7 e0 08 ret
2007310: 81 e8 00 00 restore
/*
* Spinlock is unavailable. If not willing to wait, return.
*/
if ( !wait ) {
the_spinlock->users -= 1;
2007314: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2007318: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
200731c: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
_ISR_Enable( level );
2007320: b0 10 20 05 mov 5, %i0 <== NOT EXECUTED
2007324: 7f ff ec 8b call 2002550 <sparc_enable_interrupts> <== NOT EXECUTED
2007328: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED
200732c: 81 c7 e0 08 ret <== NOT EXECUTED
2007330: 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) &&
2007334: c4 00 62 74 ld [ %g1 + 0x274 ], %g2
2007338: c6 06 20 0c ld [ %i0 + 0xc ], %g3
200733c: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2007340: 80 a0 c0 01 cmp %g3, %g1
2007344: 12 bf ff ca bne 200726c <_CORE_spinlock_Wait+0x2c>
2007348: 01 00 00 00 nop
(the_spinlock->holder == _Thread_Executing->Object.id) ) {
_ISR_Enable( level );
200734c: 7f ff ec 81 call 2002550 <sparc_enable_interrupts>
2007350: b0 10 20 01 mov 1, %i0 ! 1 <PROM_START+0x1>
2007354: 81 c7 e0 08 ret
2007358: 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;
200735c: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
2007360: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2007364: c2 26 20 08 st %g1, [ %i0 + 8 ] <== NOT EXECUTED
_ISR_Enable( level );
2007368: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
200736c: 7f ff ec 79 call 2002550 <sparc_enable_interrupts> <== NOT EXECUTED
2007370: 90 10 00 04 mov %g4, %o0 <== NOT EXECUTED
2007374: 81 c7 e0 08 ret <== NOT EXECUTED
2007378: 81 e8 00 00 restore <== NOT EXECUTED
0200c04c <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
200c04c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
200c050: c0 26 20 04 clr [ %i0 + 4 ]
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
200c054: 90 10 00 1b mov %i3, %o0
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
200c058: 80 a6 a0 00 cmp %i2, 0
200c05c: 02 80 00 0f be 200c098 <_Chain_Initialize+0x4c> <== NEVER TAKEN
200c060: 84 10 00 18 mov %i0, %g2
200c064: b4 06 bf ff add %i2, -1, %i2
200c068: 82 10 00 19 mov %i1, %g1
200c06c: 92 10 00 1a mov %i2, %o1
current->next = next;
next->previous = current;
200c070: c4 20 60 04 st %g2, [ %g1 + 4 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
200c074: c2 20 80 00 st %g1, [ %g2 ]
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
200c078: 80 a6 a0 00 cmp %i2, 0
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
200c07c: 84 10 00 01 mov %g1, %g2
200c080: b4 06 bf ff add %i2, -1, %i2
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
200c084: 12 bf ff fb bne 200c070 <_Chain_Initialize+0x24>
200c088: 82 00 40 08 add %g1, %o0, %g1
200c08c: 40 00 21 32 call 2014554 <.umul>
200c090: 01 00 00 00 nop
200c094: 84 06 40 08 add %i1, %o0, %g2
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
200c098: 82 06 20 04 add %i0, 4, %g1
200c09c: c2 20 80 00 st %g1, [ %g2 ]
the_chain->last = current;
200c0a0: c4 26 20 08 st %g2, [ %i0 + 8 ]
}
200c0a4: 81 c7 e0 08 ret
200c0a8: 81 e8 00 00 restore
0200bf6c <_Debug_Is_enabled>:
*/
bool _Debug_Is_enabled(
rtems_debug_control level
)
{
200bf6c: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
200bf70: c4 00 63 d8 ld [ %g1 + 0x3d8 ], %g2 ! 20183d8 <_Debug_Level><== NOT EXECUTED
200bf74: 90 0a 00 02 and %o0, %g2, %o0 <== NOT EXECUTED
200bf78: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
return (_Debug_Level & level) ? true : false;
}
200bf7c: 81 c3 e0 08 retl <== NOT EXECUTED
200bf80: 90 40 20 00 addx %g0, 0, %o0 <== NOT EXECUTED
020051dc <_Event_Seize>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
20051dc: 9d e3 bf 98 save %sp, -104, %sp
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
20051e0: 03 00 80 60 sethi %hi(0x2018000), %g1
20051e4: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 20183d4 <_Thread_Executing>
executing->Wait.return_code = RTEMS_SUCCESSFUL;
20051e8: c0 24 20 34 clr [ %l0 + 0x34 ]
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
20051ec: 7f ff f2 fe call 2001de4 <sparc_disable_interrupts>
20051f0: e4 04 21 68 ld [ %l0 + 0x168 ], %l2
pending_events = api->pending_events;
20051f4: c2 04 80 00 ld [ %l2 ], %g1
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
20051f8: a2 8e 00 01 andcc %i0, %g1, %l1
20051fc: 02 80 00 07 be 2005218 <_Event_Seize+0x3c>
2005200: 80 8e 60 01 btst 1, %i1
2005204: 80 a6 00 11 cmp %i0, %l1
2005208: 02 80 00 23 be 2005294 <_Event_Seize+0xb8>
200520c: 80 8e 60 02 btst 2, %i1
2005210: 12 80 00 21 bne 2005294 <_Event_Seize+0xb8> <== ALWAYS TAKEN
2005214: 80 8e 60 01 btst 1, %i1
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
2005218: 12 80 00 18 bne 2005278 <_Event_Seize+0x9c>
200521c: 82 10 20 01 mov 1, %g1
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2005220: 23 00 80 63 sethi %hi(0x2018c00), %l1
executing->Wait.option = (uint32_t) option_set;
2005224: f2 24 20 30 st %i1, [ %l0 + 0x30 ]
executing->Wait.count = (uint32_t) event_in;
2005228: f0 24 20 24 st %i0, [ %l0 + 0x24 ]
executing->Wait.return_argument = event_out;
200522c: f6 24 20 28 st %i3, [ %l0 + 0x28 ]
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
return;
}
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2005230: c2 24 60 30 st %g1, [ %l1 + 0x30 ]
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_ISR_Enable( level );
2005234: 7f ff f2 f0 call 2001df4 <sparc_enable_interrupts>
2005238: 01 00 00 00 nop
if ( ticks ) {
200523c: 80 a6 a0 00 cmp %i2, 0
2005240: 32 80 00 1c bne,a 20052b0 <_Event_Seize+0xd4>
2005244: c2 04 20 08 ld [ %l0 + 8 ], %g1
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
2005248: 90 10 00 10 mov %l0, %o0
200524c: 40 00 0d 0f call 2008688 <_Thread_Set_state>
2005250: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
2005254: 7f ff f2 e4 call 2001de4 <sparc_disable_interrupts>
2005258: 01 00 00 00 nop
sync_state = _Event_Sync_state;
200525c: f0 04 60 30 ld [ %l1 + 0x30 ], %i0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
2005260: c0 24 60 30 clr [ %l1 + 0x30 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
2005264: 80 a6 20 01 cmp %i0, 1
2005268: 02 80 00 27 be 2005304 <_Event_Seize+0x128>
200526c: b2 10 00 10 mov %l0, %i1
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
2005270: 40 00 08 bb call 200755c <_Thread_blocking_operation_Cancel>
2005274: 95 e8 00 08 restore %g0, %o0, %o2
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
2005278: 7f ff f2 df call 2001df4 <sparc_enable_interrupts>
200527c: 01 00 00 00 nop
executing->Wait.return_code = RTEMS_UNSATISFIED;
2005280: 82 10 20 0d mov 0xd, %g1 ! d <PROM_START+0xd>
2005284: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
*event_out = seized_events;
2005288: e2 26 c0 00 st %l1, [ %i3 ]
200528c: 81 c7 e0 08 ret
2005290: 81 e8 00 00 restore
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
2005294: 82 28 40 11 andn %g1, %l1, %g1
2005298: c2 24 80 00 st %g1, [ %l2 ]
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
200529c: 7f ff f2 d6 call 2001df4 <sparc_enable_interrupts>
20052a0: 01 00 00 00 nop
*event_out = seized_events;
20052a4: e2 26 c0 00 st %l1, [ %i3 ]
20052a8: 81 c7 e0 08 ret
20052ac: 81 e8 00 00 restore
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20052b0: 92 04 20 48 add %l0, 0x48, %o1
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
20052b4: c2 24 20 68 st %g1, [ %l0 + 0x68 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20052b8: 03 00 80 15 sethi %hi(0x2005400), %g1
20052bc: 82 10 60 b0 or %g1, 0xb0, %g1 ! 20054b0 <_Event_Timeout>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20052c0: f4 24 20 54 st %i2, [ %l0 + 0x54 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20052c4: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20052c8: c0 24 20 50 clr [ %l0 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20052cc: c0 24 20 6c clr [ %l0 + 0x6c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
20052d0: 11 00 80 60 sethi %hi(0x2018000), %o0
20052d4: 40 00 0f 05 call 2008ee8 <_Watchdog_Insert>
20052d8: 90 12 23 f4 or %o0, 0x3f4, %o0 ! 20183f4 <_Watchdog_Ticks_chain>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
20052dc: 90 10 00 10 mov %l0, %o0
20052e0: 40 00 0c ea call 2008688 <_Thread_Set_state>
20052e4: 92 10 21 00 mov 0x100, %o1
_ISR_Disable( level );
20052e8: 7f ff f2 bf call 2001de4 <sparc_disable_interrupts>
20052ec: 01 00 00 00 nop
sync_state = _Event_Sync_state;
20052f0: f0 04 60 30 ld [ %l1 + 0x30 ], %i0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
20052f4: c0 24 60 30 clr [ %l1 + 0x30 ]
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
20052f8: 80 a6 20 01 cmp %i0, 1
20052fc: 12 bf ff dd bne 2005270 <_Event_Seize+0x94>
2005300: b2 10 00 10 mov %l0, %i1
_ISR_Enable( level );
2005304: 7f ff f2 bc call 2001df4 <sparc_enable_interrupts>
2005308: 91 e8 00 08 restore %g0, %o0, %o0
02005368 <_Event_Surrender>:
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
2005368: 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 ];
200536c: f2 06 21 68 ld [ %i0 + 0x168 ], %i1
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
2005370: 7f ff f2 9d call 2001de4 <sparc_disable_interrupts>
2005374: e2 06 20 30 ld [ %i0 + 0x30 ], %l1
2005378: a0 10 00 08 mov %o0, %l0
pending_events = api->pending_events;
200537c: c8 06 40 00 ld [ %i1 ], %g4
event_condition = (rtems_event_set) the_thread->Wait.count;
2005380: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
2005384: 9a 88 c0 04 andcc %g3, %g4, %o5
2005388: 02 80 00 28 be 2005428 <_Event_Surrender+0xc0>
200538c: 03 00 80 60 sethi %hi(0x2018000), %g1
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
2005390: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 20183b0 <_ISR_Nest_level>
2005394: 80 a0 a0 00 cmp %g2, 0
2005398: 22 80 00 08 be,a 20053b8 <_Event_Surrender+0x50>
200539c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20053a0: 03 00 80 60 sethi %hi(0x2018000), %g1
20053a4: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
20053a8: 80 a6 00 02 cmp %i0, %g2
20053ac: 02 80 00 2a be 2005454 <_Event_Surrender+0xec>
20053b0: 19 00 80 63 sethi %hi(0x2018c00), %o4
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
20053b4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20053b8: 80 88 61 00 btst 0x100, %g1
20053bc: 02 80 00 19 be 2005420 <_Event_Surrender+0xb8> <== NEVER TAKEN
20053c0: 80 a0 c0 0d cmp %g3, %o5
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
20053c4: 02 80 00 04 be 20053d4 <_Event_Surrender+0x6c>
20053c8: 80 8c 60 02 btst 2, %l1
20053cc: 02 80 00 15 be 2005420 <_Event_Surrender+0xb8> <== NEVER TAKEN
20053d0: 01 00 00 00 nop
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
20053d4: 82 29 00 0d andn %g4, %o5, %g1
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20053d8: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
20053dc: c2 26 40 00 st %g1, [ %i1 ]
the_thread->Wait.count = 0;
20053e0: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
20053e4: da 20 80 00 st %o5, [ %g2 ]
_ISR_Flash( level );
20053e8: 7f ff f2 83 call 2001df4 <sparc_enable_interrupts>
20053ec: 90 10 00 10 mov %l0, %o0
20053f0: 7f ff f2 7d call 2001de4 <sparc_disable_interrupts>
20053f4: 01 00 00 00 nop
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
20053f8: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
20053fc: 80 a0 60 02 cmp %g1, 2
2005400: 02 80 00 0c be 2005430 <_Event_Surrender+0xc8>
2005404: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
2005408: 90 10 00 10 mov %l0, %o0
200540c: 7f ff f2 7a call 2001df4 <sparc_enable_interrupts>
2005410: 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 );
2005414: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
2005418: 40 00 08 e5 call 20077ac <_Thread_Clear_state>
200541c: 81 e8 00 00 restore
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
2005420: 7f ff f2 75 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2005424: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
2005428: 7f ff f2 73 call 2001df4 <sparc_enable_interrupts>
200542c: 91 e8 00 08 restore %g0, %o0, %o0
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
2005430: c2 26 20 50 st %g1, [ %i0 + 0x50 ]
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
2005434: 7f ff f2 70 call 2001df4 <sparc_enable_interrupts>
2005438: 90 10 00 10 mov %l0, %o0
(void) _Watchdog_Remove( &the_thread->Timer );
200543c: 40 00 0f 16 call 2009094 <_Watchdog_Remove>
2005440: 90 06 20 48 add %i0, 0x48, %o0
2005444: 33 04 00 ff sethi %hi(0x1003fc00), %i1
2005448: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200544c: 40 00 08 d8 call 20077ac <_Thread_Clear_state>
2005450: 81 e8 00 00 restore
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
2005454: c2 03 20 30 ld [ %o4 + 0x30 ], %g1
2005458: 80 a0 60 01 cmp %g1, 1
200545c: 02 80 00 07 be 2005478 <_Event_Surrender+0x110>
2005460: 80 a0 c0 0d cmp %g3, %o5
2005464: c2 03 20 30 ld [ %o4 + 0x30 ], %g1
2005468: 80 a0 60 02 cmp %g1, 2
200546c: 32 bf ff d3 bne,a 20053b8 <_Event_Surrender+0x50> <== ALWAYS TAKEN
2005470: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
2005474: 80 a0 c0 0d cmp %g3, %o5 <== NOT EXECUTED
2005478: 02 80 00 04 be 2005488 <_Event_Surrender+0x120> <== ALWAYS TAKEN
200547c: 80 8c 60 02 btst 2, %l1
2005480: 02 80 00 09 be 20054a4 <_Event_Surrender+0x13c> <== NOT EXECUTED
2005484: 01 00 00 00 nop <== NOT EXECUTED
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2005488: 82 29 00 0d andn %g4, %o5, %g1
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
200548c: c4 06 20 28 ld [ %i0 + 0x28 ], %g2
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
2005490: c2 26 40 00 st %g1, [ %i1 ]
the_thread->Wait.count = 0;
2005494: c0 26 20 24 clr [ %i0 + 0x24 ]
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
2005498: 82 10 20 03 mov 3, %g1
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT)) ) {
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;
200549c: da 20 80 00 st %o5, [ %g2 ]
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
20054a0: c2 23 20 30 st %g1, [ %o4 + 0x30 ]
}
_ISR_Enable( level );
20054a4: 7f ff f2 54 call 2001df4 <sparc_enable_interrupts>
20054a8: 91 e8 00 10 restore %g0, %l0, %o0
020054b0 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
20054b0: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
20054b4: 90 10 00 18 mov %i0, %o0
20054b8: 40 00 09 e4 call 2007c48 <_Thread_Get>
20054bc: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
20054c0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20054c4: 80 a0 60 00 cmp %g1, 0
20054c8: 12 80 00 19 bne 200552c <_Event_Timeout+0x7c> <== NEVER TAKEN
20054cc: b0 10 00 08 mov %o0, %i0
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
20054d0: 7f ff f2 45 call 2001de4 <sparc_disable_interrupts>
20054d4: 01 00 00 00 nop
20054d8: 86 10 00 08 mov %o0, %g3
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
20054dc: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
20054e0: 80 a0 60 00 cmp %g1, 0
20054e4: 02 80 00 14 be 2005534 <_Event_Timeout+0x84> <== NEVER TAKEN
20054e8: 03 00 80 60 sethi %hi(0x2018000), %g1
_ISR_Enable( level );
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
20054ec: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
20054f0: 80 a6 00 02 cmp %i0, %g2
20054f4: 02 80 00 18 be 2005554 <_Event_Timeout+0xa4>
20054f8: c0 26 20 24 clr [ %i0 + 0x24 ]
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
20054fc: 82 10 20 06 mov 6, %g1
2005500: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
_ISR_Enable( level );
2005504: 7f ff f2 3c call 2001df4 <sparc_enable_interrupts>
2005508: 90 10 00 03 mov %g3, %o0
200550c: 90 10 00 18 mov %i0, %o0
2005510: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2005514: 40 00 08 a6 call 20077ac <_Thread_Clear_state>
2005518: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
200551c: 05 00 80 60 sethi %hi(0x2018000), %g2
2005520: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
2005524: 82 00 7f ff add %g1, -1, %g1
2005528: c2 20 a3 10 st %g1, [ %g2 + 0x310 ]
200552c: 81 c7 e0 08 ret
2005530: 81 e8 00 00 restore
2005534: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED
2005538: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level><== NOT EXECUTED
200553c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2005540: c2 20 a3 10 st %g1, [ %g2 + 0x310 ] <== NOT EXECUTED
_ISR_Disable( level );
if ( !the_thread->Wait.count ) { /* verify thread is waiting */
_Thread_Unnest_dispatch();
_ISR_Enable( level );
2005544: 7f ff f2 2c call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2005548: 01 00 00 00 nop <== NOT EXECUTED
200554c: 81 c7 e0 08 ret <== NOT EXECUTED
2005550: 81 e8 00 00 restore <== NOT EXECUTED
return;
}
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
Thread_blocking_operation_States sync = _Event_Sync_state;
2005554: 05 00 80 63 sethi %hi(0x2018c00), %g2
2005558: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 ! 2018c30 <_Event_Sync_state>
if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
200555c: 80 a0 60 01 cmp %g1, 1
2005560: 38 bf ff e8 bgu,a 2005500 <_Event_Timeout+0x50> <== NEVER TAKEN
2005564: 82 10 20 06 mov 6, %g1 <== NOT EXECUTED
(sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
2005568: 82 10 20 02 mov 2, %g1
200556c: c2 20 a0 30 st %g1, [ %g2 + 0x30 ]
}
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
2005570: 10 bf ff e4 b 2005500 <_Event_Timeout+0x50>
2005574: 82 10 20 06 mov 6, %g1
0200c274 <_Heap_Allocate>:
void *_Heap_Allocate(
Heap_Control *the_heap,
size_t size
)
{
200c274: 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 =
200c278: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200c27c: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
200c280: 90 10 00 19 mov %i1, %o0
200c284: 7f ff ea 08 call 2006aa4 <_Heap_Calc_block_size>
200c288: 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)
200c28c: 80 a2 20 00 cmp %o0, 0
200c290: 02 80 00 2c be 200c340 <_Heap_Allocate+0xcc> <== NEVER TAKEN
200c294: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200c298: 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;
200c29c: 80 a4 00 18 cmp %l0, %i0
200c2a0: 02 80 00 28 be 200c340 <_Heap_Allocate+0xcc>
200c2a4: b2 10 20 00 clr %i1
/* 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) {
200c2a8: c2 06 20 04 ld [ %i0 + 4 ], %g1
200c2ac: 80 a2 00 01 cmp %o0, %g1
200c2b0: 18 80 00 18 bgu 200c310 <_Heap_Allocate+0x9c>
200c2b4: a2 10 20 00 clr %l1
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
200c2b8: 94 10 00 08 mov %o0, %o2
200c2bc: 92 10 00 18 mov %i0, %o1
200c2c0: 7f ff ea 0d call 2006af4 <_Heap_Block_allocate>
200c2c4: 90 10 00 10 mov %l0, %o0
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200c2c8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
stats->searches += search_count + 1;
200c2cc: 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;
200c2d0: 82 00 60 01 inc %g1
stats->searches += search_count + 1;
200c2d4: 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;
200c2d8: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
stats->searches += search_count + 1;
200c2dc: 84 00 80 19 add %g2, %i1, %g2
200c2e0: b0 06 20 08 add %i0, 8, %i0
200c2e4: c4 24 20 4c st %g2, [ %l0 + 0x4c ]
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
200c2e8: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
200c2ec: 80 a0 40 11 cmp %g1, %l1
200c2f0: 2a 80 00 02 bcs,a 200c2f8 <_Heap_Allocate+0x84>
200c2f4: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
stats->max_search = search_count;
return ptr;
}
200c2f8: 81 c7 e0 08 ret
200c2fc: 81 e8 00 00 restore
/* 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) {
200c300: c2 06 20 04 ld [ %i0 + 4 ], %g1
200c304: 80 a2 00 01 cmp %o0, %g1
200c308: 08 80 00 10 bleu 200c348 <_Heap_Allocate+0xd4>
200c30c: 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)
200c310: 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;
200c314: 80 a4 00 18 cmp %l0, %i0
200c318: 12 bf ff fa bne 200c300 <_Heap_Allocate+0x8c>
200c31c: b2 06 60 01 inc %i1
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
200c320: c2 04 20 44 ld [ %l0 + 0x44 ], %g1
if(the_size == 0)
return NULL;
/* Find large enough free block. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
200c324: a2 10 00 19 mov %i1, %l1
_HAssert(_Heap_Is_aligned_ptr(ptr, the_heap->page_size));
break;
}
}
if(stats->max_search < search_count)
200c328: 80 a0 40 11 cmp %g1, %l1
200c32c: 1a bf ff f3 bcc 200c2f8 <_Heap_Allocate+0x84>
200c330: b0 10 20 00 clr %i0
stats->max_search = search_count;
200c334: e2 24 20 44 st %l1, [ %l0 + 0x44 ]
200c338: 81 c7 e0 08 ret
200c33c: 81 e8 00 00 restore
return ptr;
}
200c340: 81 c7 e0 08 ret
200c344: 91 e8 20 00 restore %g0, 0, %o0
_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 );
200c348: 92 10 00 18 mov %i0, %o1
200c34c: 7f ff e9 ea call 2006af4 <_Heap_Block_allocate>
200c350: 90 10 00 10 mov %l0, %o0
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
200c354: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
stats->searches += search_count + 1;
200c358: 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;
200c35c: 82 00 60 01 inc %g1
stats->searches += search_count + 1;
200c360: 84 00 a0 01 inc %g2
/* 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) {
200c364: a2 10 00 19 mov %i1, %l1
(void)_Heap_Block_allocate(the_heap, the_block, the_size );
ptr = _Heap_User_area(the_block);
stats->allocs += 1;
stats->searches += search_count + 1;
200c368: 84 00 80 19 add %g2, %i1, %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;
200c36c: c2 24 20 48 st %g1, [ %l0 + 0x48 ]
stats->searches += search_count + 1;
200c370: c4 24 20 4c st %g2, [ %l0 + 0x4c ]
200c374: 10 bf ff dd b 200c2e8 <_Heap_Allocate+0x74>
200c378: b0 06 20 08 add %i0, 8, %i0
02008bbc <_Heap_Allocate_aligned>:
void *_Heap_Allocate_aligned(
Heap_Control *the_heap,
size_t size,
uint32_t alignment
)
{
2008bbc: 9d e3 bf 98 save %sp, -104, %sp
uint32_t search_count;
Heap_Block *the_block;
void *user_ptr = NULL;
uint32_t const page_size = the_heap->page_size;
2008bc0: ec 06 20 10 ld [ %i0 + 0x10 ], %l6
Heap_Block *const tail = _Heap_Tail(the_heap);
uint32_t const end_to_user_offs = size - HEAP_BLOCK_HEADER_OFFSET;
uint32_t const the_size =
_Heap_Calc_block_size(size, page_size, the_heap->min_block_size);
2008bc4: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2008bc8: 90 10 00 19 mov %i1, %o0
2008bcc: 92 10 00 16 mov %l6, %o1
2008bd0: 40 00 01 82 call 20091d8 <_Heap_Calc_block_size>
2008bd4: aa 10 00 18 mov %i0, %l5
if(the_size == 0)
2008bd8: ae 92 20 00 orcc %o0, 0, %l7
2008bdc: 02 80 00 69 be 2008d80 <_Heap_Allocate_aligned+0x1c4> <== NEVER TAKEN
2008be0: b2 06 7f fc add %i1, -4, %i1
return NULL;
if(alignment == 0)
2008be4: 80 a6 a0 00 cmp %i2, 0
2008be8: 22 80 00 02 be,a 2008bf0 <_Heap_Allocate_aligned+0x34>
2008bec: b4 10 20 08 mov 8, %i2
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
2008bf0: e2 05 60 08 ld [ %l5 + 8 ], %l1
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
2008bf4: 80 a5 40 11 cmp %l5, %l1
2008bf8: 02 80 00 62 be 2008d80 <_Heap_Allocate_aligned+0x1c4> <== NEVER TAKEN
2008bfc: a8 10 20 00 clr %l4
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2008c00: c2 04 60 04 ld [ %l1 + 4 ], %g1
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
2008c04: 92 10 00 1a mov %i2, %o1
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2008c08: a4 08 7f fe and %g1, -2, %l2
/* Calculate 'aligned_user_addr' that will become the user pointer we
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
2008c0c: a6 04 40 12 add %l1, %l2, %l3
uint32_t const block_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));
if(block_size >= the_size) { /* the_block is large enough. */
2008c10: 80 a5 c0 12 cmp %l7, %l2
return. It should be at least 'end_to_user_offs' bytes less than the
the 'block_end' and should be aligned on 'alignment' boundary.
Calculations are from the 'block_end' as we are going to split free
block so that the upper part of the block becomes used block. */
_H_uptr_t const block_end = _H_p2u(the_block) + block_size;
aligned_user_addr = block_end - end_to_user_offs;
2008c14: a0 24 c0 19 sub %l3, %i1, %l0
uint32_t const block_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));
if(block_size >= the_size) { /* the_block is large enough. */
2008c18: 18 80 00 22 bgu 2008ca0 <_Heap_Allocate_aligned+0xe4>
2008c1c: 90 10 00 10 mov %l0, %o0
_H_uptr_t *value,
uint32_t alignment
)
{
_H_uptr_t v = *value;
*value = v - (v % alignment);
2008c20: 40 00 40 bb call 2018f0c <.urem>
2008c24: 01 00 00 00 nop
_H_uptr_t user_addr;
_H_uptr_t aligned_user_addr;
_H_uptr_t const user_area = _H_p2u(_Heap_User_area(the_block));
2008c28: 92 10 00 16 mov %l6, %o1
2008c2c: b0 24 00 08 sub %l0, %o0, %i0
2008c30: 40 00 40 b7 call 2018f0c <.urem>
2008c34: 90 10 00 18 mov %i0, %o0
2008c38: a0 04 60 08 add %l1, 8, %l0
2008c3c: 84 26 00 08 sub %i0, %o0, %g2
only at 'page_size' aligned addresses */
user_addr = aligned_user_addr;
_Heap_Align_down_uptr(&user_addr, page_size);
/* Make sure 'user_addr' calculated didn't run out of 'the_block'. */
if(user_addr >= user_area) {
2008c40: 80 a4 00 02 cmp %l0, %g2
2008c44: 38 80 00 18 bgu,a 2008ca4 <_Heap_Allocate_aligned+0xe8>
2008c48: e2 04 60 08 ld [ %l1 + 8 ], %l1
/* The block seems to be acceptable. Check if the remainder of
'the_block' is less than 'min_block_size' so that 'the_block' won't
actually be split at the address we assume. */
if(user_addr - user_area < the_heap->min_block_size) {
2008c4c: fa 05 60 14 ld [ %l5 + 0x14 ], %i5
2008c50: 82 20 80 10 sub %g2, %l0, %g1
2008c54: 80 a0 40 1d cmp %g1, %i5
2008c58: 1a 80 00 1e bcc 2008cd0 <_Heap_Allocate_aligned+0x114>
2008c5c: 80 a6 20 00 cmp %i0, 0
'aligned_user_addr' to be outside of [0,page_size) range. If we do,
we will need to store this distance somewhere to be able to
resurrect the block address from the user pointer. (Having the
distance within [0,page_size) range allows resurrection by
aligning user pointer down to the nearest 'page_size' boundary.) */
if(aligned_user_addr - user_addr >= page_size) {
2008c60: 82 26 00 10 sub %i0, %l0, %g1
uint32_t alignment
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
2008c64: 90 10 00 10 mov %l0, %o0
2008c68: 92 10 00 1a mov %i2, %o1
2008c6c: 80 a5 80 01 cmp %l6, %g1
2008c70: 18 80 00 17 bgu 2008ccc <_Heap_Allocate_aligned+0x110>
2008c74: 84 10 00 10 mov %l0, %g2
2008c78: 40 00 40 a5 call 2018f0c <.urem>
2008c7c: 01 00 00 00 nop
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
2008c80: 84 10 00 10 mov %l0, %g2
*value = r ? v - r + a : v;
2008c84: 88 92 20 00 orcc %o0, 0, %g4
2008c88: 86 10 20 00 clr %g3
2008c8c: 12 80 00 35 bne 2008d60 <_Heap_Allocate_aligned+0x1a4> <== ALWAYS TAKEN
2008c90: 90 10 00 10 mov %l0, %o0
2008c94: 80 a5 80 03 cmp %l6, %g3 <== NOT EXECUTED
2008c98: 38 80 00 0d bgu,a 2008ccc <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED
2008c9c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
the_block = the_block->next, ++search_count)
2008ca0: e2 04 60 08 ld [ %l1 + 8 ], %l1
alignment = CPU_ALIGNMENT;
/* Find large enough free block that satisfies the alignment requirements. */
for(the_block = _Heap_First(the_heap), search_count = 0;
the_block != tail;
2008ca4: 80 a5 40 11 cmp %l5, %l1
2008ca8: 12 bf ff d6 bne 2008c00 <_Heap_Allocate_aligned+0x44>
2008cac: a8 05 20 01 inc %l4
2008cb0: 90 10 20 00 clr %o0
}
}
}
}
if(stats->max_search < search_count)
2008cb4: c2 05 60 44 ld [ %l5 + 0x44 ], %g1
2008cb8: 80 a0 40 14 cmp %g1, %l4
2008cbc: 2a 80 00 02 bcs,a 2008cc4 <_Heap_Allocate_aligned+0x108>
2008cc0: e8 25 60 44 st %l4, [ %l5 + 0x44 ]
stats->max_search = search_count;
return user_ptr;
}
2008cc4: 81 c7 e0 08 ret
2008cc8: 91 e8 00 08 restore %g0, %o0, %o0
aligned_user_addr = 0;
}
}
}
if(aligned_user_addr) {
2008ccc: 80 a6 20 00 cmp %i0, 0
2008cd0: 22 bf ff f5 be,a 2008ca4 <_Heap_Allocate_aligned+0xe8> <== NEVER TAKEN
2008cd4: e2 04 60 08 ld [ %l1 + 8 ], %l1 <== NOT EXECUTED
/* The block is indeed acceptable: calculate the size of the block
to be allocated and perform allocation. */
uint32_t const alloc_size =
block_end - user_addr + HEAP_BLOCK_USER_OFFSET;
2008cd8: 82 04 e0 08 add %l3, 8, %g1
2008cdc: 88 20 40 02 sub %g1, %g2, %g4
Heap_Block *the_block,
uint32_t alloc_size)
{
Heap_Statistics *const stats = &the_heap->stats;
uint32_t const block_size = _Heap_Block_size(the_block);
uint32_t const the_rest = block_size - alloc_size;
2008ce0: 84 24 80 04 sub %l2, %g4, %g2
_HAssert(_Heap_Is_aligned(block_size, the_heap->page_size));
_HAssert(_Heap_Is_aligned(alloc_size, the_heap->page_size));
_HAssert(alloc_size <= block_size);
_HAssert(_Heap_Is_prev_used(the_block));
if(the_rest >= the_heap->min_block_size) {
2008ce4: 80 a0 80 1d cmp %g2, %i5
2008ce8: 2a 80 00 29 bcs,a 2008d8c <_Heap_Allocate_aligned+0x1d0>
2008cec: c6 04 60 08 ld [ %l1 + 8 ], %g3
/* Split the block so that lower part is still free, and upper part
becomes used. */
the_block->size = the_rest | HEAP_PREV_USED;
2008cf0: 82 10 a0 01 or %g2, 1, %g1
2008cf4: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
2008cf8: a2 04 40 02 add %l1, %g2, %l1
the_block = _Heap_Block_at(the_block, the_rest);
the_block->prev_size = the_rest;
2008cfc: c4 24 40 00 st %g2, [ %l1 ]
the_block->size = alloc_size;
2008d00: c8 24 60 04 st %g4, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2008d04: 84 04 40 04 add %l1, %g4, %g2
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
2008d08: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2008d0c: 82 10 60 01 or %g1, 1, %g1
2008d10: c2 20 a0 04 st %g1, [ %g2 + 4 ]
/* Update statistics */
stats->free_size -= alloc_size;
2008d14: c6 05 60 30 ld [ %l5 + 0x30 ], %g3
if(stats->min_free_size > stats->free_size)
2008d18: c2 05 60 34 ld [ %l5 + 0x34 ], %g1
stats->free_blocks -= 1;
}
/* Mark the block as used (in the next block). */
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
2008d1c: 86 20 c0 04 sub %g3, %g4, %g3
if(stats->min_free_size > stats->free_size)
2008d20: 80 a0 c0 01 cmp %g3, %g1
2008d24: 1a 80 00 03 bcc 2008d30 <_Heap_Allocate_aligned+0x174>
2008d28: c6 25 60 30 st %g3, [ %l5 + 0x30 ]
stats->min_free_size = stats->free_size;
2008d2c: c6 25 60 34 st %g3, [ %l5 + 0x34 ]
stats->used_blocks += 1;
2008d30: c2 05 60 40 ld [ %l5 + 0x40 ], %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008d34: c6 05 60 4c ld [ %l5 + 0x4c ], %g3
stats->allocs += 1;
2008d38: c4 05 60 48 ld [ %l5 + 0x48 ], %g2
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
2008d3c: 82 00 60 01 inc %g1
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008d40: 86 00 e0 01 inc %g3
stats->allocs += 1;
2008d44: 84 00 a0 01 inc %g2
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008d48: 86 00 c0 14 add %g3, %l4, %g3
_Heap_Block_at(the_block, alloc_size)->size |= HEAP_PREV_USED;
/* Update statistics */
stats->free_size -= alloc_size;
if(stats->min_free_size > stats->free_size)
stats->min_free_size = stats->free_size;
stats->used_blocks += 1;
2008d4c: c2 25 60 40 st %g1, [ %l5 + 0x40 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
stats->allocs += 1;
2008d50: c4 25 60 48 st %g2, [ %l5 + 0x48 ]
_HAssert(_Heap_Is_aligned_ptr((void*)aligned_user_addr, alignment));
the_block = block_allocate(the_heap, the_block, alloc_size);
stats->searches += search_count + 1;
2008d54: c6 25 60 4c st %g3, [ %l5 + 0x4c ]
stats->allocs += 1;
check_result(the_heap, the_block, user_addr,
aligned_user_addr, size);
user_ptr = (void*)aligned_user_addr;
2008d58: 10 bf ff d7 b 2008cb4 <_Heap_Allocate_aligned+0xf8>
2008d5c: 90 10 00 18 mov %i0, %o0
)
{
_H_uptr_t v = *value;
uint32_t a = alignment;
_H_uptr_t r = v % a;
*value = r ? v - r + a : v;
2008d60: 82 04 00 1a add %l0, %i2, %g1
2008d64: 90 20 40 04 sub %g1, %g4, %o0
2008d68: 86 22 00 10 sub %o0, %l0, %g3
/* The user pointer will be too far from 'user_addr'. See if we
can make 'aligned_user_addr' to be close enough to the
'user_addr'. */
aligned_user_addr = user_addr;
_Heap_Align_up_uptr(&aligned_user_addr, alignment);
if(aligned_user_addr - user_addr >= page_size) {
2008d6c: 80 a5 80 03 cmp %l6, %g3
2008d70: 28 bf ff cd bleu,a 2008ca4 <_Heap_Allocate_aligned+0xe8> <== ALWAYS TAKEN
2008d74: e2 04 60 08 ld [ %l1 + 8 ], %l1
2008d78: 10 bf ff d5 b 2008ccc <_Heap_Allocate_aligned+0x110> <== NOT EXECUTED
2008d7c: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
}
}
if(stats->max_search < search_count)
stats->max_search = search_count;
2008d80: 90 10 20 00 clr %o0 <== NOT EXECUTED
return user_ptr;
}
2008d84: 81 c7 e0 08 ret <== NOT EXECUTED
2008d88: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
2008d8c: c4 04 60 0c ld [ %l1 + 0xc ], %g2
/* Don't split the block as remainder is either zero or too small to be
used as a separate free block. Change 'alloc_size' to the size of the
block and remove the block from the list of free blocks. */
_Heap_Block_remove(the_block);
alloc_size = block_size;
stats->free_blocks -= 1;
2008d90: c2 05 60 38 ld [ %l5 + 0x38 ], %g1
prev->next = next;
next->prev = prev;
2008d94: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
2008d98: 82 00 7f ff add %g1, -1, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
2008d9c: c6 20 a0 08 st %g3, [ %g2 + 8 ]
2008da0: c2 25 60 38 st %g1, [ %l5 + 0x38 ]
2008da4: 10 bf ff d8 b 2008d04 <_Heap_Allocate_aligned+0x148>
2008da8: 88 10 00 12 mov %l2, %g4
0200ece4 <_Heap_Extend>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t *amount_extended
)
{
200ece4: 9d e3 bf 98 save %sp, -104, %sp
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
200ece8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200ecec: 80 a0 40 19 cmp %g1, %i1
200ecf0: 08 80 00 08 bleu 200ed10 <_Heap_Extend+0x2c>
200ecf4: a2 10 00 18 mov %i0, %l1
200ecf8: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
200ecfc: 80 a6 40 01 cmp %i1, %g1
200ed00: 02 80 00 0b be 200ed2c <_Heap_Extend+0x48> <== NEVER TAKEN
200ed04: b0 10 20 02 mov 2, %i0
stats->frees -= 1; /* Don't count subsequent call as actual free() */
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
return HEAP_EXTEND_SUCCESSFUL;
}
200ed08: 81 c7 e0 08 ret
200ed0c: 81 e8 00 00 restore
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( starting_address >= the_heap->begin && /* case 3 */
200ed10: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200ed14: 80 a6 40 01 cmp %i1, %g1
200ed18: 0a bf ff fc bcs 200ed08 <_Heap_Extend+0x24>
200ed1c: b0 10 20 01 mov 1, %i0
starting_address < the_heap->end
)
return HEAP_EXTEND_ERROR;
if ( starting_address != the_heap->end )
200ed20: 80 a6 40 01 cmp %i1, %g1
200ed24: 12 bf ff f9 bne 200ed08 <_Heap_Extend+0x24>
200ed28: b0 10 20 02 mov 2, %i0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
200ed2c: d2 04 60 10 ld [ %l1 + 0x10 ], %o1
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
200ed30: e4 04 60 24 ld [ %l1 + 0x24 ], %l2
200ed34: 82 06 40 1a add %i1, %i2, %g1
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200ed38: a0 20 40 12 sub %g1, %l2, %l0
* The basic trick is to make the extend area look like a used
* block and free it.
*/
old_final = the_heap->final;
the_heap->end = _Addresses_Add_offset( the_heap->end, size );
200ed3c: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
the_size = _Addresses_Subtract( the_heap->end, old_final ) - HEAP_OVERHEAD;
200ed40: a0 04 3f f8 add %l0, -8, %l0
200ed44: 40 00 28 72 call 2018f0c <.urem>
200ed48: 90 10 00 10 mov %l0, %o0
_Heap_Align_down( &the_size, the_heap->page_size );
*amount_extended = size;
200ed4c: f4 26 c0 00 st %i2, [ %i3 ]
if( the_size < the_heap->min_block_size )
200ed50: c2 04 60 14 ld [ %l1 + 0x14 ], %g1
200ed54: a0 24 00 08 sub %l0, %o0, %l0
200ed58: 80 a0 40 10 cmp %g1, %l0
200ed5c: 18 bf ff eb bgu 200ed08 <_Heap_Extend+0x24> <== NEVER TAKEN
200ed60: b0 10 20 00 clr %i0
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
200ed64: c2 04 a0 04 ld [ %l2 + 4 ], %g1
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
200ed68: 84 10 20 01 mov 1, %g2
*amount_extended = size;
if( the_size < the_heap->min_block_size )
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
200ed6c: 82 08 60 01 and %g1, 1, %g1
200ed70: 82 14 00 01 or %l0, %g1, %g1
200ed74: c2 24 a0 04 st %g1, [ %l2 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200ed78: 88 04 80 10 add %l2, %l0, %g4
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
200ed7c: c4 21 20 04 st %g2, [ %g4 + 4 ]
the_heap->final = new_final;
stats->size += size;
200ed80: c2 04 60 2c ld [ %l1 + 0x2c ], %g1
stats->used_blocks += 1;
200ed84: c4 04 60 40 ld [ %l1 + 0x40 ], %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200ed88: c6 04 60 50 ld [ %l1 + 0x50 ], %g3
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
stats->size += size;
200ed8c: 82 00 40 1a add %g1, %i2, %g1
stats->used_blocks += 1;
200ed90: 84 00 a0 01 inc %g2
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200ed94: 86 00 ff ff add %g3, -1, %g3
return HEAP_EXTEND_SUCCESSFUL;
old_final->size = the_size | (old_final->size & HEAP_PREV_USED);
new_final = _Heap_Block_at( old_final, the_size );
new_final->size = HEAP_PREV_USED;
the_heap->final = new_final;
200ed98: c8 24 60 24 st %g4, [ %l1 + 0x24 ]
stats->size += size;
200ed9c: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
stats->used_blocks += 1;
200eda0: c4 24 60 40 st %g2, [ %l1 + 0x40 ]
stats->frees -= 1; /* Don't count subsequent call as actual free() */
200eda4: c6 24 60 50 st %g3, [ %l1 + 0x50 ]
_Heap_Free( the_heap, _Heap_User_area( old_final ) );
200eda8: 90 10 00 11 mov %l1, %o0
200edac: 7f ff e8 42 call 2008eb4 <_Heap_Free>
200edb0: 92 04 a0 08 add %l2, 8, %o1
return HEAP_EXTEND_SUCCESSFUL;
}
200edb4: 81 c7 e0 08 ret
200edb8: 81 e8 00 00 restore
0200c37c <_Heap_Free>:
bool _Heap_Free(
Heap_Control *the_heap,
void *starting_address
)
{
200c37c: 9d e3 bf 98 save %sp, -104, %sp
uint32_t the_size;
uint32_t next_size;
Heap_Statistics *const stats = &the_heap->stats;
bool next_is_free;
if ( !_Addresses_Is_in_range(
200c380: e4 06 20 20 ld [ %i0 + 0x20 ], %l2
200c384: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
200c388: 80 a6 40 12 cmp %i1, %l2
200c38c: 84 60 3f ff subx %g0, -1, %g2
200c390: 80 a4 40 19 cmp %l1, %i1
200c394: 82 60 3f ff subx %g0, -1, %g1
200c398: 80 88 80 01 btst %g2, %g1
200c39c: 02 80 00 42 be 200c4a4 <_Heap_Free+0x128>
200c3a0: 01 00 00 00 nop
/* 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);
200c3a4: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200c3a8: 40 00 21 51 call 20148ec <.urem>
200c3ac: 90 10 00 19 mov %i1, %o0
200c3b0: a0 06 7f f8 add %i1, -8, %l0
200c3b4: 90 24 00 08 sub %l0, %o0, %o0
return( FALSE );
}
_Heap_Start_of_block( the_heap, starting_address, &the_block );
if ( !_Heap_Is_block_in( the_heap, the_block ) ) {
200c3b8: 80 a2 00 12 cmp %o0, %l2
200c3bc: 84 60 3f ff subx %g0, -1, %g2
200c3c0: 80 a4 40 08 cmp %l1, %o0
200c3c4: 82 60 3f ff subx %g0, -1, %g1
200c3c8: 80 88 80 01 btst %g2, %g1
200c3cc: 02 80 00 36 be 200c4a4 <_Heap_Free+0x128> <== NEVER TAKEN
200c3d0: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200c3d4: c6 02 20 04 ld [ %o0 + 4 ], %g3
200c3d8: 9a 08 ff fe and %g3, -2, %o5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200c3dc: 88 02 00 0d add %o0, %o5, %g4
}
the_size = _Heap_Block_size( the_block );
next_block = _Heap_Block_at( the_block, the_size );
if ( !_Heap_Is_block_in( the_heap, next_block ) ) {
200c3e0: 80 a1 00 12 cmp %g4, %l2
200c3e4: 84 60 3f ff subx %g0, -1, %g2
200c3e8: 80 a4 40 04 cmp %l1, %g4
200c3ec: 82 60 3f ff subx %g0, -1, %g1
200c3f0: 80 88 80 01 btst %g2, %g1
200c3f4: 02 80 00 2c be 200c4a4 <_Heap_Free+0x128> <== NEVER TAKEN
200c3f8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200c3fc: c2 01 20 04 ld [ %g4 + 4 ], %g1
_HAssert( FALSE );
return( FALSE );
}
if ( !_Heap_Is_prev_used( next_block ) ) {
200c400: 80 88 60 01 btst 1, %g1
200c404: 02 80 00 28 be 200c4a4 <_Heap_Free+0x128> <== NEVER TAKEN
200c408: 92 08 7f fe and %g1, -2, %o1
_HAssert( FALSE );
return( FALSE );
}
next_size = _Heap_Block_size( next_block );
next_is_free = next_block < the_heap->final &&
200c40c: 80 a4 40 04 cmp %l1, %g4
200c410: 08 80 00 06 bleu 200c428 <_Heap_Free+0xac>
200c414: 98 10 20 00 clr %o4
200c418: 84 01 00 09 add %g4, %o1, %g2
200c41c: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200c420: 82 18 60 01 xor %g1, 1, %g1
200c424: 98 08 60 01 and %g1, 1, %o4
!_Heap_Is_prev_used(_Heap_Block_at(next_block, next_size));
if ( !_Heap_Is_prev_used( the_block ) ) {
200c428: 80 88 e0 01 btst 1, %g3
200c42c: 12 80 00 20 bne 200c4ac <_Heap_Free+0x130>
200c430: 80 8b 20 ff btst 0xff, %o4
uint32_t const prev_size = the_block->prev_size;
200c434: d4 02 00 00 ld [ %o0 ], %o2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200c438: 96 22 00 0a sub %o0, %o2, %o3
Heap_Block *const prev_block = _Heap_Block_at( the_block, -prev_size );
if ( !_Heap_Is_block_in( the_heap, prev_block ) ) {
200c43c: 80 a2 c0 12 cmp %o3, %l2
200c440: 84 60 3f ff subx %g0, -1, %g2
200c444: 80 a4 40 0b cmp %l1, %o3
200c448: 82 60 3f ff subx %g0, -1, %g1
200c44c: 80 88 80 01 btst %g2, %g1
200c450: 02 80 00 15 be 200c4a4 <_Heap_Free+0x128> <== NEVER TAKEN
200c454: 01 00 00 00 nop
return( FALSE );
}
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
200c458: c2 02 e0 04 ld [ %o3 + 4 ], %g1
200c45c: 80 88 60 01 btst 1, %g1
200c460: 02 80 00 11 be 200c4a4 <_Heap_Free+0x128> <== NEVER TAKEN
200c464: 80 8b 20 ff btst 0xff, %o4
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
200c468: 02 80 00 3a be 200c550 <_Heap_Free+0x1d4>
200c46c: 86 03 40 0a add %o5, %o2, %g3
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
200c470: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200c474: c6 01 20 0c ld [ %g4 + 0xc ], %g3
Heap_Block *the_block
)
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
200c478: c4 01 20 08 ld [ %g4 + 8 ], %g2
200c47c: 82 00 7f ff add %g1, -1, %g1
200c480: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
200c484: c6 20 a0 0c st %g3, [ %g2 + 0xc ]
_HAssert( FALSE );
return( FALSE );
}
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
200c488: 82 03 40 09 add %o5, %o1, %g1
{
Heap_Block *block = the_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
200c48c: c4 20 e0 08 st %g2, [ %g3 + 8 ]
200c490: 82 00 40 0a add %g1, %o2, %g1
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
200c494: c2 22 c0 01 st %g1, [ %o3 + %g1 ]
if ( next_is_free ) { /* coalesce both */
uint32_t const size = the_size + prev_size + next_size;
_Heap_Block_remove( next_block );
stats->free_blocks -= 1;
prev_block->size = size | HEAP_PREV_USED;
200c498: 82 10 60 01 or %g1, 1, %g1
200c49c: 10 80 00 10 b 200c4dc <_Heap_Free+0x160>
200c4a0: c2 22 e0 04 st %g1, [ %o3 + 4 ]
stats->used_blocks -= 1;
stats->free_size += the_size;
stats->frees += 1;
return( TRUE );
}
200c4a4: 81 c7 e0 08 ret
200c4a8: 91 e8 20 00 restore %g0, 0, %o0
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = size;
}
}
else if ( next_is_free ) { /* coalesce next */
200c4ac: 02 80 00 17 be 200c508 <_Heap_Free+0x18c>
200c4b0: 82 13 60 01 or %o5, 1, %g1
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
200c4b4: c2 01 20 0c ld [ %g4 + 0xc ], %g1
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
200c4b8: c4 01 20 08 ld [ %g4 + 8 ], %g2
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
block->prev = prev;
200c4bc: c2 22 20 0c st %g1, [ %o0 + 0xc ]
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
200c4c0: c4 22 20 08 st %g2, [ %o0 + 8 ]
block->prev = prev;
next->prev = prev->next = block;
200c4c4: d0 20 60 08 st %o0, [ %g1 + 8 ]
200c4c8: d0 20 a0 0c st %o0, [ %g2 + 0xc ]
uint32_t const size = the_size + next_size;
200c4cc: 82 02 40 0d add %o1, %o5, %g1
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
next_block = _Heap_Block_at( the_block, size );
next_block->prev_size = size;
200c4d0: c2 22 00 01 st %g1, [ %o0 + %g1 ]
}
}
else if ( next_is_free ) { /* coalesce next */
uint32_t const size = the_size + next_size;
_Heap_Block_replace( next_block, the_block );
the_block->size = size | HEAP_PREV_USED;
200c4d4: 82 10 60 01 or %g1, 1, %g1
200c4d8: c2 22 20 04 st %g1, [ %o0 + 4 ]
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200c4dc: c2 06 20 40 ld [ %i0 + 0x40 ], %g1
stats->free_size += the_size;
200c4e0: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
stats->frees += 1;
200c4e4: c6 06 20 50 ld [ %i0 + 0x50 ], %g3
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
stats->free_size += the_size;
200c4e8: 84 00 80 0d add %g2, %o5, %g2
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200c4ec: 82 00 7f ff add %g1, -1, %g1
stats->free_size += the_size;
200c4f0: c4 26 20 30 st %g2, [ %i0 + 0x30 ]
stats->free_blocks += 1;
if ( stats->max_free_blocks < stats->free_blocks )
stats->max_free_blocks = stats->free_blocks;
}
stats->used_blocks -= 1;
200c4f4: c2 26 20 40 st %g1, [ %i0 + 0x40 ]
stats->free_size += the_size;
stats->frees += 1;
200c4f8: 86 00 e0 01 inc %g3
200c4fc: c6 26 20 50 st %g3, [ %i0 + 0x50 ]
200c500: 81 c7 e0 08 ret
200c504: 91 e8 20 01 restore %g0, 1, %o0
}
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
200c508: c2 22 20 04 st %g1, [ %o0 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200c50c: c4 01 20 04 ld [ %g4 + 4 ], %g2
)
{
Heap_Block *prev = prev_block;
Heap_Block *block = the_block;
Heap_Block *next = prev->next;
200c510: c6 06 20 08 ld [ %i0 + 8 ], %g3
next_block->prev_size = the_size;
200c514: da 22 00 0d st %o5, [ %o0 + %o5 ]
else { /* no coalesce */
/* Add 'the_block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200c518: 84 08 bf fe and %g2, -2, %g2
200c51c: c4 21 20 04 st %g2, [ %g4 + 4 ]
next_block->prev_size = the_size;
stats->free_blocks += 1;
200c520: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
block->next = next;
200c524: c6 22 20 08 st %g3, [ %o0 + 8 ]
block->prev = prev;
200c528: f0 22 20 0c st %i0, [ %o0 + 0xc ]
if ( stats->max_free_blocks < stats->free_blocks )
200c52c: c4 06 20 3c ld [ %i0 + 0x3c ], %g2
_Heap_Block_insert_after( _Heap_Head( the_heap), the_block );
the_block->size = the_size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
next_block->prev_size = the_size;
stats->free_blocks += 1;
200c530: 82 00 60 01 inc %g1
next->prev = prev->next = block;
200c534: d0 20 e0 0c st %o0, [ %g3 + 0xc ]
200c538: d0 26 20 08 st %o0, [ %i0 + 8 ]
if ( stats->max_free_blocks < stats->free_blocks )
200c53c: 80 a0 40 02 cmp %g1, %g2
200c540: 08 bf ff e7 bleu 200c4dc <_Heap_Free+0x160>
200c544: c2 26 20 38 st %g1, [ %i0 + 0x38 ]
stats->max_free_blocks = stats->free_blocks;
200c548: 10 bf ff e5 b 200c4dc <_Heap_Free+0x160>
200c54c: c2 26 20 3c st %g1, [ %i0 + 0x3c ]
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
200c550: 84 10 e0 01 or %g3, 1, %g2
200c554: c4 22 e0 04 st %g2, [ %o3 + 4 ]
next_block->size &= ~HEAP_PREV_USED;
200c558: c2 01 20 04 ld [ %g4 + 4 ], %g1
next_block->prev_size = size;
200c55c: c6 22 00 0d st %g3, [ %o0 + %o5 ]
next_block->prev_size = size;
}
else { /* coalesce prev */
uint32_t const size = the_size + prev_size;
prev_block->size = size | HEAP_PREV_USED;
next_block->size &= ~HEAP_PREV_USED;
200c560: 82 08 7f fe and %g1, -2, %g1
200c564: 10 bf ff de b 200c4dc <_Heap_Free+0x160>
200c568: c2 21 20 04 st %g1, [ %g4 + 4 ]
0200edbc <_Heap_Get_free_information>:
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200edbc: da 02 20 08 ld [ %o0 + 8 ], %o5
)
{
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Tail(the_heap);
info->number = 0;
200edc0: c0 22 40 00 clr [ %o1 ]
info->largest = 0;
200edc4: c0 22 60 04 clr [ %o1 + 4 ]
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
200edc8: 80 a2 00 0d cmp %o0, %o5
200edcc: 02 80 00 12 be 200ee14 <_Heap_Get_free_information+0x58> <== NEVER TAKEN
200edd0: c0 22 60 08 clr [ %o1 + 8 ]
200edd4: 88 10 20 00 clr %g4
200edd8: 86 10 20 00 clr %g3
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200eddc: c2 03 60 04 ld [ %o5 + 4 ], %g1
/* 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 )
200ede0: c4 02 60 04 ld [ %o1 + 4 ], %g2
200ede4: 82 08 7f fe and %g1, -2, %g1
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++;
200ede8: 88 01 20 01 inc %g4
info->total += the_size;
200edec: 86 00 c0 01 add %g3, %g1, %g3
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++;
200edf0: c8 22 40 00 st %g4, [ %o1 ]
info->total += the_size;
if ( info->largest < the_size )
200edf4: 80 a0 80 01 cmp %g2, %g1
200edf8: 1a 80 00 03 bcc 200ee04 <_Heap_Get_free_information+0x48> <== NEVER TAKEN
200edfc: c6 22 60 08 st %g3, [ %o1 + 8 ]
info->largest = the_size;
200ee00: c2 22 60 04 st %g1, [ %o1 + 4 ]
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
the_block = the_block->next)
200ee04: da 03 60 08 ld [ %o5 + 8 ], %o5
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_First(the_heap);
the_block != tail;
200ee08: 80 a2 00 0d cmp %o0, %o5
200ee0c: 32 bf ff f5 bne,a 200ede0 <_Heap_Get_free_information+0x24>
200ee10: c2 03 60 04 ld [ %o5 + 4 ], %g1
200ee14: 81 c3 e0 08 retl
0200ee1c <_Heap_Get_information>:
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
Heap_Block *const end = the_heap->final;
200ee1c: d6 02 20 24 ld [ %o0 + 0x24 ], %o3
Heap_Get_information_status _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->start;
200ee20: c2 02 20 20 ld [ %o0 + 0x20 ], %g1
Heap_Block *const end = the_heap->final;
_HAssert(the_block->prev_size == HEAP_PREV_USED);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
200ee24: c0 22 40 00 clr [ %o1 ]
the_info->Free.total = 0;
200ee28: c0 22 60 08 clr [ %o1 + 8 ]
the_info->Free.largest = 0;
200ee2c: c0 22 60 04 clr [ %o1 + 4 ]
the_info->Used.number = 0;
200ee30: c0 22 60 0c clr [ %o1 + 0xc ]
the_info->Used.total = 0;
200ee34: c0 22 60 14 clr [ %o1 + 0x14 ]
the_info->Used.largest = 0;
while ( the_block != end ) {
200ee38: 80 a0 40 0b cmp %g1, %o3
200ee3c: 02 80 00 26 be 200eed4 <_Heap_Get_information+0xb8> <== NEVER TAKEN
200ee40: c0 22 60 10 clr [ %o1 + 0x10 ]
200ee44: 10 80 00 0e b 200ee7c <_Heap_Get_information+0x60>
200ee48: d8 00 60 04 ld [ %g1 + 4 ], %o4
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
the_info->Used.total += the_size;
200ee4c: c4 02 60 14 ld [ %o1 + 0x14 ], %g2
if ( the_info->Used.largest < the_size )
200ee50: c6 02 60 10 ld [ %o1 + 0x10 ], %g3
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200ee54: 82 00 60 01 inc %g1
the_info->Used.total += the_size;
200ee58: 84 00 80 04 add %g2, %g4, %g2
while ( the_block != end ) {
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
the_info->Used.number++;
200ee5c: c2 22 60 0c st %g1, [ %o1 + 0xc ]
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
200ee60: 80 a0 c0 04 cmp %g3, %g4
200ee64: 1a 80 00 03 bcc 200ee70 <_Heap_Get_information+0x54>
200ee68: c4 22 60 14 st %g2, [ %o1 + 0x14 ]
the_info->Used.largest = the_size;
200ee6c: c8 22 60 10 st %g4, [ %o1 + 0x10 ]
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
200ee70: 80 a2 c0 0d cmp %o3, %o5
200ee74: 02 80 00 18 be 200eed4 <_Heap_Get_information+0xb8>
200ee78: 82 10 00 0d mov %o5, %g1
200ee7c: 88 0b 3f fe and %o4, -2, %g4
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200ee80: 9a 00 40 04 add %g1, %g4, %o5
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200ee84: d8 03 60 04 ld [ %o5 + 4 ], %o4
uint32_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
if ( _Heap_Is_prev_used(next_block) ) {
200ee88: 80 8b 20 01 btst 1, %o4
200ee8c: 32 bf ff f0 bne,a 200ee4c <_Heap_Get_information+0x30>
200ee90: c2 02 60 0c ld [ %o1 + 0xc ], %g1
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200ee94: c2 02 40 00 ld [ %o1 ], %g1
the_info->Free.total += the_size;
200ee98: c4 02 60 08 ld [ %o1 + 8 ], %g2
if ( the_info->Free.largest < the_size )
200ee9c: c6 02 60 04 ld [ %o1 + 4 ], %g3
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200eea0: 82 00 60 01 inc %g1
the_info->Free.total += the_size;
200eea4: 84 00 80 04 add %g2, %g4, %g2
the_info->Used.number++;
the_info->Used.total += the_size;
if ( the_info->Used.largest < the_size )
the_info->Used.largest = the_size;
} else {
the_info->Free.number++;
200eea8: c2 22 40 00 st %g1, [ %o1 ]
the_info->Free.total += the_size;
if ( the_info->Free.largest < the_size )
200eeac: 80 a0 c0 04 cmp %g3, %g4
200eeb0: 1a 80 00 03 bcc 200eebc <_Heap_Get_information+0xa0> <== NEVER TAKEN
200eeb4: c4 22 60 08 st %g2, [ %o1 + 8 ]
the_info->Free.largest = the_size;
200eeb8: c8 22 60 04 st %g4, [ %o1 + 4 ]
if ( the_size != next_block->prev_size )
200eebc: c2 03 40 00 ld [ %o5 ], %g1
200eec0: 80 a0 40 04 cmp %g1, %g4
200eec4: 02 bf ff ec be 200ee74 <_Heap_Get_information+0x58> <== ALWAYS TAKEN
200eec8: 80 a2 c0 0d cmp %o3, %o5
200eecc: 81 c3 e0 08 retl <== NOT EXECUTED
200eed0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
}
/* Handle the last dummy block. Don't consider this block to be
"used" as client never allocated it. Make 'Used.total' contain this
blocks' overhead though. */
the_info->Used.total += HEAP_OVERHEAD;
200eed4: c2 02 60 14 ld [ %o1 + 0x14 ], %g1
200eed8: 90 10 20 00 clr %o0
200eedc: 82 00 60 08 add %g1, 8, %g1
return HEAP_GET_INFORMATION_SUCCESSFUL;
}
200eee0: 81 c3 e0 08 retl
200eee4: c2 22 60 14 st %g1, [ %o1 + 0x14 ]
02006970 <_Heap_Initialize>:
Heap_Control *the_heap,
void *starting_address,
size_t size,
uint32_t page_size
)
{
2006970: 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)
2006974: 80 a6 e0 00 cmp %i3, 0
2006978: 12 80 00 43 bne 2006a84 <_Heap_Initialize+0x114>
200697c: 84 8e e0 07 andcc %i3, 7, %g2
2006980: b6 10 20 08 mov 8, %i3
2006984: a2 10 20 00 clr %l1
/* 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;
2006988: 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;
200698c: 92 10 00 1b mov %i3, %o1
2006990: 40 00 37 d7 call 20148ec <.urem>
2006994: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
2006998: 80 a2 20 00 cmp %o0, 0
200699c: 22 80 00 05 be,a 20069b0 <_Heap_Initialize+0x40>
20069a0: 82 06 e0 10 add %i3, 0x10, %g1
20069a4: 82 06 c0 10 add %i3, %l0, %g1
20069a8: a0 20 40 08 sub %g1, %o0, %l0
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
*value = r ? v - r + a : v;
20069ac: 82 06 e0 10 add %i3, 0x10, %g1
20069b0: 80 a4 60 00 cmp %l1, 0
_Heap_Align_up_uptr ( &aligned_start, page_size );
aligned_start -= HEAP_BLOCK_USER_OFFSET;
20069b4: a4 04 3f f8 add %l0, -8, %l2
20069b8: 12 80 00 03 bne 20069c4 <_Heap_Initialize+0x54>
20069bc: 82 20 40 11 sub %g1, %l1, %g1
20069c0: 82 10 20 10 mov 0x10, %g1
20069c4: 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);
20069c8: 82 24 80 19 sub %l2, %i1, %g1
20069cc: 82 00 60 08 add %g1, 8, %g1
if ( size < overhead )
20069d0: 80 a0 40 1a cmp %g1, %i2
20069d4: 18 80 00 2a bgu 2006a7c <_Heap_Initialize+0x10c> <== NEVER TAKEN
20069d8: a0 26 80 01 sub %i2, %g1, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
20069dc: 92 10 00 1b mov %i3, %o1
20069e0: 40 00 37 c3 call 20148ec <.urem>
20069e4: 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 )
20069e8: a0 a4 00 08 subcc %l0, %o0, %l0
20069ec: 02 80 00 24 be 2006a7c <_Heap_Initialize+0x10c>
20069f0: 09 00 80 5f sethi %hi(0x2017c00), %g4
return 0; /* Too small area for the heap */
the_heap->page_size = page_size;
20069f4: 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;
20069f8: f6 24 80 00 st %i3, [ %l2 ]
the_block->size = the_size | HEAP_PREV_USED;
20069fc: 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++;
2006a00: c6 01 23 dc ld [ %g4 + 0x3dc ], %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;
2006a04: c2 24 a0 04 st %g1, [ %l2 + 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 */
2006a08: e0 24 80 10 st %l0, [ %l2 + %l0 ]
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
void *base,
uint32_t offset
)
{
return (void *)((char *)base + offset);
2006a0c: 9a 04 80 10 add %l2, %l0, %o5
the_block->size = page_size;
2006a10: 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 );
2006a14: f0 24 a0 08 st %i0, [ %l2 + 8 ]
the_block->prev = _Heap_Head( the_heap );
2006a18: f0 24 a0 0c st %i0, [ %l2 + 0xc ]
stats->max_search = 0;
stats->allocs = 0;
stats->searches = 0;
stats->frees = 0;
stats->resizes = 0;
stats->instance = instance++;
2006a1c: 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;
2006a20: f4 26 20 2c st %i2, [ %i0 + 0x2c ]
stats->free_size = the_size;
2006a24: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
stats->min_free_size = the_size;
2006a28: e0 26 20 34 st %l0, [ %i0 + 0x34 ]
stats->free_blocks = 1;
stats->max_free_blocks = 1;
stats->used_blocks = 0;
2006a2c: c0 26 20 40 clr [ %i0 + 0x40 ]
stats->max_search = 0;
2006a30: c0 26 20 44 clr [ %i0 + 0x44 ]
stats->allocs = 0;
2006a34: c0 26 20 48 clr [ %i0 + 0x48 ]
stats->searches = 0;
2006a38: c0 26 20 4c clr [ %i0 + 0x4c ]
stats->frees = 0;
2006a3c: c0 26 20 50 clr [ %i0 + 0x50 ]
stats->resizes = 0;
2006a40: 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;
2006a44: 84 10 20 01 mov 1, %g2
stats->max_free_blocks = 1;
2006a48: 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;
2006a4c: 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;
2006a50: 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++;
2006a54: 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;
2006a58: 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;
2006a5c: 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;
2006a60: e4 26 20 08 st %l2, [ %i0 + 8 ]
_Heap_Tail(the_heap)->prev = the_block;
2006a64: e4 26 20 0c st %l2, [ %i0 + 0xc ]
the_heap->start = the_block;
2006a68: e4 26 20 20 st %l2, [ %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 */
2006a6c: 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++;
2006a70: c6 21 23 dc st %g3, [ %g4 + 0x3dc ]
return ( the_size - HEAP_BLOCK_USED_OVERHEAD );
2006a74: 81 c7 e0 08 ret
2006a78: 91 ec 3f fc restore %l0, -4, %o0
}
2006a7c: 81 c7 e0 08 ret
2006a80: 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;
2006a84: 02 80 00 04 be 2006a94 <_Heap_Initialize+0x124>
2006a88: 90 10 20 10 mov 0x10, %o0
2006a8c: 82 06 e0 08 add %i3, 8, %g1
2006a90: b6 20 40 02 sub %g1, %g2, %i3
2006a94: 40 00 37 96 call 20148ec <.urem>
2006a98: 92 10 00 1b mov %i3, %o1
2006a9c: 10 bf ff bb b 2006988 <_Heap_Initialize+0x18>
2006aa0: a2 10 00 08 mov %o0, %l1
02015a9c <_Heap_Resize_block>:
void *starting_address,
size_t size,
uint32_t *old_mem_size,
uint32_t *avail_mem_size
)
{
2015a9c: 9d e3 bf 98 save %sp, -104, %sp
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;
2015aa0: ec 06 20 14 ld [ %i0 + 0x14 ], %l6
uint32_t const page_size = the_heap->page_size;
2015aa4: ea 06 20 10 ld [ %i0 + 0x10 ], %l5
*old_mem_size = 0;
2015aa8: c0 26 c0 00 clr [ %i3 ]
*avail_mem_size = 0;
2015aac: c0 27 00 00 clr [ %i4 ]
/* 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);
2015ab0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
2015ab4: 7f ff fb 8e call 20148ec <.urem>
2015ab8: 90 10 00 19 mov %i1, %o0
RTEMS_INLINE_ROUTINE bool _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 );
2015abc: c8 06 20 20 ld [ %i0 + 0x20 ], %g4
2015ac0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
/* 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);
2015ac4: 82 06 7f f8 add %i1, -8, %g1
2015ac8: a2 20 40 08 sub %g1, %o0, %l1
_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))
2015acc: 80 a4 40 04 cmp %l1, %g4
2015ad0: 84 60 3f ff subx %g0, -1, %g2
2015ad4: 80 a0 c0 11 cmp %g3, %l1
2015ad8: 82 60 3f ff subx %g0, -1, %g1
2015adc: 80 88 80 01 btst %g2, %g1
2015ae0: 02 80 00 2f be 2015b9c <_Heap_Resize_block+0x100>
2015ae4: a6 10 00 18 mov %i0, %l3
return HEAP_RESIZE_FATAL_ERROR;
prev_used_flag = the_block->size & HEAP_PREV_USED;
2015ae8: da 04 60 04 ld [ %l1 + 4 ], %o5
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
2015aec: b0 0b 7f fe and %o5, -2, %i0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015af0: a4 04 40 18 add %l1, %i0, %l2
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) ||
2015af4: 80 a4 80 04 cmp %l2, %g4
2015af8: 84 60 3f ff subx %g0, -1, %g2
2015afc: 80 a0 c0 12 cmp %g3, %l2
2015b00: 82 60 3f ff subx %g0, -1, %g1
2015b04: 80 88 80 01 btst %g2, %g1
2015b08: 02 80 00 25 be 2015b9c <_Heap_Resize_block+0x100> <== NEVER TAKEN
2015b0c: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
2015b10: c2 04 a0 04 ld [ %l2 + 4 ], %g1
2015b14: 80 88 60 01 btst 1, %g1
2015b18: 02 80 00 21 be 2015b9c <_Heap_Resize_block+0x100> <== NEVER TAKEN
2015b1c: ae 08 7f fe and %g1, -2, %l7
!_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) ||
2015b20: 80 a0 c0 12 cmp %g3, %l2
2015b24: a8 10 20 01 mov 1, %l4
2015b28: 02 80 00 04 be 2015b38 <_Heap_Resize_block+0x9c> <== NEVER TAKEN
2015b2c: 82 04 80 17 add %l2, %l7, %g1
2015b30: c2 00 60 04 ld [ %g1 + 4 ], %g1
2015b34: a8 08 60 01 and %g1, 1, %l4
_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)
2015b38: 82 24 80 19 sub %l2, %i1, %g1
2015b3c: 82 00 60 04 add %g1, 4, %g1
+ HEAP_BLOCK_HEADER_OFFSET;
*old_mem_size = old_user_size;
2015b40: c2 26 c0 00 st %g1, [ %i3 ]
if (size > old_user_size) {
2015b44: 80 a0 40 1a cmp %g1, %i2
2015b48: 1a 80 00 17 bcc 2015ba4 <_Heap_Resize_block+0x108>
2015b4c: b6 0b 60 01 and %o5, 1, %i3
/* 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 */
2015b50: 80 8d 20 ff btst 0xff, %l4
2015b54: 12 80 00 10 bne 2015b94 <_Heap_Resize_block+0xf8>
2015b58: a0 26 80 01 sub %i2, %g1, %l0
uint32_t alignment
)
{
uint32_t v = *value;
uint32_t a = alignment;
uint32_t r = v % a;
2015b5c: 92 10 00 15 mov %l5, %o1
2015b60: 7f ff fb 63 call 20148ec <.urem>
2015b64: 90 10 00 10 mov %l0, %o0
*value = r ? v - r + a : v;
2015b68: 80 a2 20 00 cmp %o0, 0
2015b6c: 02 80 00 05 be 2015b80 <_Heap_Resize_block+0xe4> <== NEVER TAKEN
2015b70: 80 a4 00 16 cmp %l0, %l6
2015b74: 82 04 00 15 add %l0, %l5, %g1
2015b78: a0 20 40 08 sub %g1, %o0, %l0
2015b7c: 80 a4 00 16 cmp %l0, %l6
2015b80: 0a 80 00 2e bcs 2015c38 <_Heap_Resize_block+0x19c> <== ALWAYS TAKEN
2015b84: 90 10 00 10 mov %l0, %o0
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)
2015b88: 80 a5 c0 08 cmp %l7, %o0
2015b8c: 1a 80 00 32 bcc 2015c54 <_Heap_Resize_block+0x1b8> <== ALWAYS TAKEN
2015b90: 94 10 00 08 mov %o0, %o2
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
}
2015b94: 81 c7 e0 08 ret
2015b98: 91 e8 20 01 restore %g0, 1, %o0
}
}
}
++stats->resizes;
return HEAP_RESIZE_SUCCESSFUL;
2015b9c: 81 c7 e0 08 ret
2015ba0: 91 e8 20 02 restore %g0, 2, %o0
--stats->used_blocks;
}
} else {
/* Calculate how much memory we could free */
uint32_t free_block_size = old_user_size - size;
2015ba4: a0 20 40 1a sub %g1, %i2, %l0
uint32_t *value,
uint32_t alignment
)
{
uint32_t v = *value;
*value = v - (v % alignment);
2015ba8: 92 10 00 15 mov %l5, %o1
2015bac: 7f ff fb 50 call 20148ec <.urem>
2015bb0: 90 10 00 10 mov %l0, %o0
_Heap_Align_down(&free_block_size, page_size);
if (free_block_size > 0) {
2015bb4: a0 a4 00 08 subcc %l0, %o0, %l0
2015bb8: 22 80 00 1c be,a 2015c28 <_Heap_Resize_block+0x18c>
2015bbc: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
/* 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;
2015bc0: 84 26 00 10 sub %i0, %l0, %g2
if (new_block_size < min_block_size) {
2015bc4: 80 a5 80 02 cmp %l6, %g2
2015bc8: 18 80 00 1e bgu 2015c40 <_Heap_Resize_block+0x1a4>
2015bcc: 82 25 80 02 sub %l6, %g2, %g1
_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) {
2015bd0: 80 8d 20 ff btst 0xff, %l4
2015bd4: 12 80 00 2a bne 2015c7c <_Heap_Resize_block+0x1e0> <== NEVER TAKEN
2015bd8: 80 a5 80 10 cmp %l6, %l0
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;
2015bdc: 82 10 80 1b or %g2, %i3, %g1
2015be0: c2 24 60 04 st %g1, [ %l1 + 4 ]
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015be4: 86 04 40 02 add %l1, %g2, %g3
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
2015be8: d8 04 a0 0c ld [ %l2 + 0xc ], %o4
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;
2015bec: 88 04 00 17 add %l0, %l7, %g4
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *block = old_block;
Heap_Block *next = block->next;
2015bf0: da 04 a0 08 ld [ %l2 + 8 ], %o5
_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;
2015bf4: c8 24 80 17 st %g4, [ %l2 + %l7 ]
_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;
2015bf8: 84 11 20 01 or %g4, 1, %g2
2015bfc: c4 20 e0 04 st %g2, [ %g3 + 4 ]
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;
2015c00: c2 04 e0 30 ld [ %l3 + 0x30 ], %g1
Heap_Block *prev = block->prev;
block = new_block;
block->next = next;
2015c04: da 20 e0 08 st %o5, [ %g3 + 8 ]
2015c08: 82 00 40 10 add %g1, %l0, %g1
block->prev = prev;
2015c0c: d8 20 e0 0c st %o4, [ %g3 + 0xc ]
2015c10: c2 24 e0 30 st %g1, [ %l3 + 0x30 ]
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
2015c14: 88 01 3f fc add %g4, -4, %g4
next->prev = prev->next = block;
2015c18: c6 23 60 0c st %g3, [ %o5 + 0xc ]
2015c1c: c6 23 20 08 st %g3, [ %o4 + 8 ]
2015c20: c8 27 00 00 st %g4, [ %i4 ]
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
}
}
}
++stats->resizes;
2015c24: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
2015c28: 82 00 60 01 inc %g1
2015c2c: c2 24 e0 54 st %g1, [ %l3 + 0x54 ]
2015c30: 81 c7 e0 08 ret
2015c34: 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;
2015c38: 10 bf ff d4 b 2015b88 <_Heap_Resize_block+0xec>
2015c3c: 90 10 00 16 mov %l6, %o0
if (new_block_size < min_block_size) {
uint32_t delta = min_block_size - new_block_size;
_HAssert(free_block_size >= delta);
free_block_size -= delta;
if (free_block_size == 0) {
2015c40: a0 a4 00 01 subcc %l0, %g1, %l0
2015c44: 12 bf ff e3 bne 2015bd0 <_Heap_Resize_block+0x134> <== NEVER TAKEN
2015c48: 84 00 80 01 add %g2, %g1, %g2
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
}
}
}
++stats->resizes;
2015c4c: 10 bf ff f7 b 2015c28 <_Heap_Resize_block+0x18c>
2015c50: c2 04 e0 54 ld [ %l3 + 0x54 ], %g1
_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)
return HEAP_RESIZE_UNSATISFIED; /* Next block is too small or none. */
add_block_size =
2015c54: 92 10 00 12 mov %l2, %o1
2015c58: 7f ff c3 a7 call 2006af4 <_Heap_Block_allocate>
2015c5c: 90 10 00 13 mov %l3, %o0
_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;
2015c60: 90 02 00 18 add %o0, %i0, %o0
2015c64: 90 12 00 1b or %o0, %i3, %o0
2015c68: d0 24 60 04 st %o0, [ %l1 + 4 ]
--stats->used_blocks;
2015c6c: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1
2015c70: 82 00 7f ff add %g1, -1, %g1
2015c74: 10 bf ff ec b 2015c24 <_Heap_Resize_block+0x188>
2015c78: c2 24 e0 40 st %g1, [ %l3 + 0x40 ]
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;
*avail_mem_size = new_next_block_size - HEAP_BLOCK_USED_OVERHEAD;
} else if (free_block_size >= min_block_size) {
2015c7c: 38 bf ff eb bgu,a 2015c28 <_Heap_Resize_block+0x18c> <== NOT EXECUTED
2015c80: c2 04 e0 54 ld [ %l3 + 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;
2015c84: 82 10 80 1b or %g2, %i3, %g1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015c88: 92 04 40 02 add %l1, %g2, %o1 <== NOT EXECUTED
2015c8c: c2 24 60 04 st %g1, [ %l1 + 4 ] <== NOT EXECUTED
next_block = _Heap_Block_at(the_block, new_block_size);
next_block->size = free_block_size | HEAP_PREV_USED;
2015c90: 84 14 20 01 or %l0, 1, %g2 <== NOT EXECUTED
2015c94: c4 22 60 04 st %g2, [ %o1 + 4 ] <== NOT EXECUTED
++stats->used_blocks; /* We have created used block */
2015c98: c2 04 e0 40 ld [ %l3 + 0x40 ], %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015c9c: c4 04 e0 50 ld [ %l3 + 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 */
2015ca0: 82 00 60 01 inc %g1 <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015ca4: 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 */
2015ca8: c2 24 e0 40 st %g1, [ %l3 + 0x40 ] <== NOT EXECUTED
--stats->frees; /* Don't count next call in stats */
2015cac: c4 24 e0 50 st %g2, [ %l3 + 0x50 ] <== NOT EXECUTED
_Heap_Free(the_heap, _Heap_User_area(next_block));
2015cb0: 92 02 60 08 add %o1, 8, %o1 <== NOT EXECUTED
2015cb4: 7f ff d9 b2 call 200c37c <_Heap_Free> <== NOT EXECUTED
2015cb8: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
*avail_mem_size = free_block_size - HEAP_BLOCK_USED_OVERHEAD;
2015cbc: 82 04 3f fc add %l0, -4, %g1 <== NOT EXECUTED
2015cc0: 10 bf ff d9 b 2015c24 <_Heap_Resize_block+0x188> <== NOT EXECUTED
2015cc4: c2 27 00 00 st %g1, [ %i4 ] <== NOT EXECUTED
02015cc8 <_Heap_Size_of_user_area>:
bool _Heap_Size_of_user_area(
Heap_Control *the_heap,
void *starting_address,
size_t *size
)
{
2015cc8: 9d e3 bf 98 save %sp, -104, %sp
Heap_Block *the_block;
Heap_Block *next_block;
uint32_t the_size;
if ( !_Addresses_Is_in_range(
2015ccc: e0 06 20 20 ld [ %i0 + 0x20 ], %l0
2015cd0: e2 06 20 24 ld [ %i0 + 0x24 ], %l1
2015cd4: 80 a6 40 10 cmp %i1, %l0
2015cd8: 84 60 3f ff subx %g0, -1, %g2
2015cdc: 80 a4 40 19 cmp %l1, %i1
2015ce0: 82 60 3f ff subx %g0, -1, %g1
2015ce4: 80 88 80 01 btst %g2, %g1
2015ce8: 02 80 00 20 be 2015d68 <_Heap_Size_of_user_area+0xa0>
2015cec: 01 00 00 00 nop
/* 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);
2015cf0: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
2015cf4: 7f ff fa fe call 20148ec <.urem>
2015cf8: 90 10 00 19 mov %i1, %o0
2015cfc: 82 06 7f f8 add %i1, -8, %g1
2015d00: 86 20 40 08 sub %g1, %o0, %g3
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 ) )
2015d04: 80 a0 c0 10 cmp %g3, %l0
2015d08: 84 60 3f ff subx %g0, -1, %g2
2015d0c: 80 a4 40 03 cmp %l1, %g3
2015d10: 82 60 3f ff subx %g0, -1, %g1
2015d14: 80 88 80 01 btst %g2, %g1
2015d18: 02 80 00 14 be 2015d68 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015d1c: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
2015d20: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2015d24: 82 08 7f fe and %g1, -2, %g1
2015d28: 90 00 c0 01 add %g3, %g1, %o0
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 (
2015d2c: 80 a2 00 10 cmp %o0, %l0
2015d30: 84 60 3f ff subx %g0, -1, %g2
2015d34: 80 a4 40 08 cmp %l1, %o0
2015d38: 82 60 3f ff subx %g0, -1, %g1
2015d3c: 80 88 80 01 btst %g2, %g1
2015d40: 02 80 00 0a be 2015d68 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015d44: 01 00 00 00 nop
2015d48: c2 02 20 04 ld [ %o0 + 4 ], %g1
2015d4c: 80 88 60 01 btst 1, %g1
2015d50: 02 80 00 06 be 2015d68 <_Heap_Size_of_user_area+0xa0> <== NEVER TAKEN
2015d54: 82 22 00 19 sub %o0, %i1, %g1
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 )
2015d58: 82 00 60 04 add %g1, 4, %g1
2015d5c: c2 26 80 00 st %g1, [ %i2 ]
2015d60: 81 c7 e0 08 ret
2015d64: 91 e8 20 01 restore %g0, 1, %o0
+ HEAP_BLOCK_HEADER_OFFSET;
return( TRUE );
}
2015d68: 81 c7 e0 08 ret
2015d6c: 91 e8 20 00 restore %g0, 0, %o0
0200ef90 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *the_heap,
int source,
bool do_dump
)
{
200ef90: 9d e3 bf 98 save %sp, -104, %sp
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200ef94: 80 a6 60 00 cmp %i1, 0
Heap_Control *the_heap,
int source,
bool do_dump
)
{
Heap_Block *the_block = the_heap->start;
200ef98: e2 06 20 20 ld [ %i0 + 0x20 ], %l1
/*
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
200ef9c: 06 80 00 8c bl 200f1cc <_Heap_Walk+0x23c> <== NEVER TAKEN
200efa0: ec 06 20 24 ld [ %i0 + 0x24 ], %l6
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
200efa4: c2 04 60 04 ld [ %l1 + 4 ], %g1
200efa8: 80 88 60 01 btst 1, %g1
200efac: 02 80 00 81 be 200f1b0 <_Heap_Walk+0x220> <== NEVER TAKEN
200efb0: a6 10 20 00 clr %l3
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
200efb4: c4 04 40 00 ld [ %l1 ], %g2
200efb8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200efbc: 80 a0 80 01 cmp %g2, %g1
200efc0: 02 80 00 08 be 200efe0 <_Heap_Walk+0x50> <== ALWAYS TAKEN
200efc4: 80 a4 40 16 cmp %l1, %l6
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
200efc8: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED
200efcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200efd0: 90 12 22 e0 or %o0, 0x2e0, %o0 <== NOT EXECUTED
200efd4: 7f ff d7 3d call 2004cc8 <printk> <== NOT EXECUTED
200efd8: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
error = 1;
}
while ( the_block != end ) {
200efdc: 80 a4 40 16 cmp %l1, %l6 <== NOT EXECUTED
200efe0: 22 80 00 63 be,a 200f16c <_Heap_Walk+0x1dc> <== NEVER TAKEN
200efe4: a2 10 00 16 mov %l6, %l1 <== NOT EXECUTED
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
200efe8: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200efec: c8 04 60 04 ld [ %l1 + 4 ], %g4
200eff0: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200eff4: a4 09 3f fe and %g4, -2, %l2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
void *base,
uint32_t offset
)
{
return (Heap_Block *) _Addresses_Add_offset( base, offset );
200eff8: a0 04 40 12 add %l1, %l2, %l0
200effc: 80 a4 00 01 cmp %l0, %g1
200f000: 84 60 3f ff subx %g0, -1, %g2
200f004: 80 a0 c0 10 cmp %g3, %l0
200f008: 82 60 3f ff subx %g0, -1, %g1
200f00c: 80 88 80 01 btst %g2, %g1
200f010: 02 80 00 77 be 200f1ec <_Heap_Walk+0x25c> <== NEVER TAKEN
200f014: 03 00 80 6c sethi %hi(0x201b000), %g1
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
printk("PASS: %d !the_block not in the free list", source);
200f018: 05 00 80 6f sethi %hi(0x201bc00), %g2
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
200f01c: ba 10 60 b0 or %g1, 0xb0, %i5
printk("PASS: %d !the_block not in the free list", source);
200f020: ae 10 a3 a0 or %g2, 0x3a0, %l7
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
printk("PASS: %d !two consecutive blocks are free", source);
200f024: 03 00 80 6f sethi %hi(0x201bc00), %g1
if (!_Heap_Is_prev_used(next_block)) {
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200f028: 05 00 80 6f sethi %hi(0x201bc00), %g2
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200f02c: a8 09 20 01 and %g4, 1, %l4
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
printk("PASS: %d !two consecutive blocks are free", source);
200f030: b8 10 63 70 or %g1, 0x370, %i4
if (!_Heap_Is_prev_used(next_block)) {
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200f034: b6 10 a3 40 or %g2, 0x340, %i3
200f038: aa 10 00 10 mov %l0, %l5
printk("PASS: %d !block %p is out of heap\n", source, next_block);
error = 1;
break;
}
if (!_Heap_Is_prev_used(next_block)) {
200f03c: c2 04 20 04 ld [ %l0 + 4 ], %g1
200f040: 80 88 60 01 btst 1, %g1
200f044: 12 80 00 20 bne 200f0c4 <_Heap_Walk+0x134>
200f048: 80 a4 e0 00 cmp %l3, 0
if (do_dump)
printk( " prev %p next %p", the_block->prev, the_block->next);
if (_Heap_Block_size(the_block) != next_block->prev_size) {
200f04c: c2 04 00 00 ld [ %l0 ], %g1
200f050: 80 a0 40 12 cmp %g1, %l2
200f054: 02 80 00 07 be 200f070 <_Heap_Walk+0xe0> <== ALWAYS TAKEN
200f058: 80 8d 20 ff btst 0xff, %l4
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
200f05c: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200f060: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f064: 7f ff d7 19 call 2004cc8 <printk> <== NOT EXECUTED
200f068: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
error = 1;
}
if (!prev_used) {
200f06c: 80 8d 20 ff btst 0xff, %l4 <== NOT EXECUTED
200f070: 32 80 00 0a bne,a 200f098 <_Heap_Walk+0x108> <== ALWAYS TAKEN
200f074: c2 06 20 08 ld [ %i0 + 8 ], %g1
if (do_dump || error) printk("\n");
200f078: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
200f07c: 12 80 00 49 bne 200f1a0 <_Heap_Walk+0x210> <== NOT EXECUTED
200f080: 01 00 00 00 nop <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
200f084: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
200f088: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f08c: 7f ff d7 0f call 2004cc8 <printk> <== NOT EXECUTED
200f090: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_First (
Heap_Control *the_heap
)
{
return _Heap_Head(the_heap)->next;
200f094: c2 06 20 08 ld [ %i0 + 8 ], %g1 <== NOT EXECUTED
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
200f098: 80 a0 40 11 cmp %g1, %l1
200f09c: 02 80 00 0a be 200f0c4 <_Heap_Walk+0x134>
200f0a0: 80 a4 e0 00 cmp %l3, 0
200f0a4: 80 a6 00 01 cmp %i0, %g1
200f0a8: 02 80 00 58 be 200f208 <_Heap_Walk+0x278> <== NEVER TAKEN
200f0ac: 80 a0 40 11 cmp %g1, %l1
block = block->next;
200f0b0: c2 00 60 08 ld [ %g1 + 8 ], %g1
error = 1;
}
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
200f0b4: 80 a0 40 11 cmp %g1, %l1
200f0b8: 12 bf ff fc bne 200f0a8 <_Heap_Walk+0x118>
200f0bc: 80 a6 00 01 cmp %i0, %g1
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200f0c0: 80 a4 e0 00 cmp %l3, 0
200f0c4: 32 80 00 58 bne,a 200f224 <_Heap_Walk+0x294> <== NEVER TAKEN
200f0c8: 27 00 80 6c sethi %hi(0x201b000), %l3 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
200f0cc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200f0d0: 80 a0 40 12 cmp %g1, %l2
200f0d4: 18 80 00 40 bgu 200f1d4 <_Heap_Walk+0x244> <== NEVER TAKEN
200f0d8: 11 00 80 6f sethi %hi(0x201bc00), %o0
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
200f0dc: d2 06 20 10 ld [ %i0 + 0x10 ], %o1
200f0e0: 40 00 27 8b call 2018f0c <.urem>
200f0e4: 90 10 00 12 mov %l2, %o0
200f0e8: 80 a2 20 00 cmp %o0, 0
200f0ec: 12 80 00 15 bne 200f140 <_Heap_Walk+0x1b0> <== NEVER TAKEN
200f0f0: 80 a4 e0 00 cmp %l3, 0
printk("PASS: %d !block size is misaligned\n", source);
error = 1;
}
if (++passes > (do_dump ? 10 : 0) && error)
200f0f4: 12 80 00 17 bne 200f150 <_Heap_Walk+0x1c0> <== NEVER TAKEN
200f0f8: 80 a5 80 10 cmp %l6, %l0
if (the_block->prev_size != the_heap->page_size) {
printk("PASS: %d !prev_size of 1st block isn't page_size\n", source);
error = 1;
}
while ( the_block != end ) {
200f0fc: 02 80 00 1c be 200f16c <_Heap_Walk+0x1dc>
200f100: a2 10 00 16 mov %l6, %l1
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200f104: c8 04 20 04 ld [ %l0 + 4 ], %g4
printk(" prev_size %d", the_block->prev_size);
else
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
200f108: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
200f10c: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
200f110: a4 09 3f fe and %g4, -2, %l2
200f114: a0 04 00 12 add %l0, %l2, %l0
200f118: 80 a4 00 01 cmp %l0, %g1
200f11c: 84 60 3f ff subx %g0, -1, %g2
200f120: 80 a0 c0 10 cmp %g3, %l0
200f124: 82 60 3f ff subx %g0, -1, %g1
200f128: 80 88 80 01 btst %g2, %g1
200f12c: 02 80 00 2f be 200f1e8 <_Heap_Walk+0x258> <== NEVER TAKEN
200f130: a8 09 20 01 and %g4, 1, %l4
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200f134: a2 10 00 15 mov %l5, %l1
200f138: 10 bf ff c1 b 200f03c <_Heap_Walk+0xac>
200f13c: aa 10 00 10 mov %l0, %l5
printk("PASS: %d !block size is too small\n", source);
error = 1;
break;
}
if (!_Heap_Is_aligned( the_size, the_heap->page_size)) {
printk("PASS: %d !block size is misaligned\n", source);
200f140: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED
200f144: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f148: 7f ff d6 e0 call 2004cc8 <printk> <== NOT EXECUTED
200f14c: 90 12 23 f8 or %o0, 0x3f8, %o0 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200f150: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
200f154: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED
200f158: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f15c: 90 12 20 20 or %o0, 0x20, %o0 <== NOT EXECUTED
200f160: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
200f164: 7f ff d6 d9 call 2004cc8 <printk> <== NOT EXECUTED
200f168: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
source, the_block, end);
error = 1;
}
if (_Heap_Block_size(the_block) != the_heap->page_size) {
200f16c: d6 06 20 10 ld [ %i0 + 0x10 ], %o3
*/
RTEMS_INLINE_ROUTINE uint32_t _Heap_Block_size (
Heap_Block *the_block
)
{
return (the_block->size & ~HEAP_PREV_USED);
200f170: c2 04 60 04 ld [ %l1 + 4 ], %g1
200f174: 94 08 7f fe and %g1, -2, %o2
200f178: 80 a2 c0 0a cmp %o3, %o2
200f17c: 02 80 00 07 be 200f198 <_Heap_Walk+0x208> <== ALWAYS TAKEN
200f180: b0 10 00 13 mov %l3, %i0
printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
200f184: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f188: 11 00 80 70 sethi %hi(0x201c000), %o0 <== NOT EXECUTED
200f18c: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
200f190: 7f ff d6 ce call 2004cc8 <printk> <== NOT EXECUTED
200f194: 90 12 20 60 or %o0, 0x60, %o0 <== NOT EXECUTED
if(do_dump && error)
_Internal_error_Occurred( INTERNAL_ERROR_CORE, TRUE, 0xffff0000 );
return error;
}
200f198: 81 c7 e0 08 ret
200f19c: 81 e8 00 00 restore
if (do_dump) printk("\n");
printk("PASS: %d !front and back sizes don't match", source);
error = 1;
}
if (!prev_used) {
if (do_dump || error) printk("\n");
200f1a0: 7f ff d6 ca call 2004cc8 <printk> <== NOT EXECUTED
200f1a4: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printk("PASS: %d !two consecutive blocks are free", source);
200f1a8: 10 bf ff b8 b 200f088 <_Heap_Walk+0xf8> <== NOT EXECUTED
200f1ac: 90 10 00 1c mov %i4, %o0 <== NOT EXECUTED
/*
* Handle the 1st block
*/
if (!_Heap_Is_prev_used(the_block)) {
printk("PASS: %d !HEAP_PREV_USED flag of 1st block isn't set\n", source);
200f1b0: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED
200f1b4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f1b8: 90 12 22 a8 or %o0, 0x2a8, %o0 <== NOT EXECUTED
200f1bc: 7f ff d6 c3 call 2004cc8 <printk> <== NOT EXECUTED
200f1c0: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
error = 1;
}
if (the_block->prev_size != the_heap->page_size) {
200f1c4: 10 bf ff 7d b 200efb8 <_Heap_Walk+0x28> <== NOT EXECUTED
200f1c8: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) )
return TRUE;
*/
if (source < 0)
source = the_heap->stats.instance;
200f1cc: 10 bf ff 76 b 200efa4 <_Heap_Walk+0x14> <== NOT EXECUTED
200f1d0: f2 06 20 28 ld [ %i0 + 0x28 ], %i1 <== NOT EXECUTED
}
if (do_dump || error) printk("\n");
if (the_size < the_heap->min_block_size) {
printk("PASS: %d !block size is too small\n", source);
200f1d4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f1d8: 7f ff d6 bc call 2004cc8 <printk> <== NOT EXECUTED
200f1dc: 90 12 23 d0 or %o0, 0x3d0, %o0 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200f1e0: 10 bf ff dd b 200f154 <_Heap_Walk+0x1c4> <== NOT EXECUTED
200f1e4: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used (
Heap_Block *the_block
)
{
return (the_block->size & HEAP_PREV_USED);
200f1e8: a2 10 00 15 mov %l5, %l1 <== NOT EXECUTED
printk(" (prev_size) %d", the_block->prev_size);
}
if (!_Heap_Is_block_in(the_heap, next_block)) {
if (do_dump) printk("\n");
printk("PASS: %d !block %p is out of heap\n", source, next_block);
200f1ec: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
200f1f0: 11 00 80 6f sethi %hi(0x201bc00), %o0 <== NOT EXECUTED
200f1f4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200f1f8: 7f ff d6 b4 call 2004cc8 <printk> <== NOT EXECUTED
200f1fc: 90 12 23 18 or %o0, 0x318, %o0 <== NOT EXECUTED
the_block = next_block;
}
if (the_block != end) {
printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
200f200: 10 bf ff d5 b 200f154 <_Heap_Walk+0x1c4> <== NOT EXECUTED
200f204: 96 10 00 16 mov %l6, %o3 <== NOT EXECUTED
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
200f208: 02 bf ff ae be 200f0c0 <_Heap_Walk+0x130> <== NOT EXECUTED
200f20c: 80 a4 e0 00 cmp %l3, 0 <== NOT EXECUTED
if (do_dump || error) printk("\n");
200f210: 12 80 00 0a bne 200f238 <_Heap_Walk+0x2a8> <== NOT EXECUTED
200f214: 27 00 80 6c sethi %hi(0x201b000), %l3 <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
200f218: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
200f21c: 7f ff d6 ab call 2004cc8 <printk> <== NOT EXECUTED
200f220: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
error = 1;
}
}
}
if (do_dump || error) printk("\n");
200f224: 90 14 e0 b0 or %l3, 0xb0, %o0 <== NOT EXECUTED
200f228: 7f ff d6 a8 call 2004cc8 <printk> <== NOT EXECUTED
200f22c: a6 10 20 01 mov 1, %l3 <== NOT EXECUTED
if (the_size < the_heap->min_block_size) {
200f230: 10 bf ff a8 b 200f0d0 <_Heap_Walk+0x140> <== NOT EXECUTED
200f234: c2 06 20 14 ld [ %i0 + 0x14 ], %g1 <== NOT EXECUTED
{ /* Check if 'the_block' is in the free block list */
Heap_Block* block = _Heap_First(the_heap);
while(block != the_block && block != tail)
block = block->next;
if(block != the_block) {
if (do_dump || error) printk("\n");
200f238: 7f ff d6 a4 call 2004cc8 <printk> <== NOT EXECUTED
200f23c: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED
printk("PASS: %d !the_block not in the free list", source);
200f240: 10 bf ff f7 b 200f21c <_Heap_Walk+0x28c> <== NOT EXECUTED
200f244: 90 10 00 17 mov %l7, %o0 <== NOT EXECUTED
02005f90 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
2005f90: 9d e3 bf 98 save %sp, -104, %sp
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2005f94: 03 00 80 63 sethi %hi(0x2018c00), %g1
2005f98: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 ! 2018c74 <_IO_Number_of_drivers>
2005f9c: 80 a0 a0 00 cmp %g2, 0
2005fa0: 02 80 00 0c be 2005fd0 <_IO_Initialize_all_drivers+0x40> <== NEVER TAKEN
2005fa4: a2 10 60 74 or %g1, 0x74, %l1
2005fa8: a0 10 20 00 clr %l0
(void) rtems_io_initialize( major, 0, NULL );
2005fac: 90 10 00 10 mov %l0, %o0
2005fb0: 92 10 20 00 clr %o1
2005fb4: 40 00 17 f4 call 200bf84 <rtems_io_initialize>
2005fb8: 94 10 20 00 clr %o2
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
2005fbc: c2 04 40 00 ld [ %l1 ], %g1
2005fc0: a0 04 20 01 inc %l0
2005fc4: 80 a0 40 10 cmp %g1, %l0
2005fc8: 18 bf ff fa bgu 2005fb0 <_IO_Initialize_all_drivers+0x20>
2005fcc: 90 10 00 10 mov %l0, %o0
2005fd0: 81 c7 e0 08 ret
2005fd4: 81 e8 00 00 restore
02005fd8 <_IO_Manager_initialization>:
void _IO_Manager_initialization(
rtems_driver_address_table *driver_table,
uint32_t drivers_in_table,
uint32_t number_of_drivers
)
{
2005fd8: 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 )
2005fdc: 80 a6 80 19 cmp %i2, %i1
2005fe0: 18 80 00 08 bgu 2006000 <_IO_Manager_initialization+0x28>
2005fe4: 83 2e a0 03 sll %i2, 3, %g1
* 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;
2005fe8: 03 00 80 63 sethi %hi(0x2018c00), %g1
_IO_Number_of_drivers = number_of_drivers;
2005fec: 05 00 80 63 sethi %hi(0x2018c00), %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;
2005ff0: f0 20 60 78 st %i0, [ %g1 + 0x78 ]
_IO_Number_of_drivers = number_of_drivers;
2005ff4: f2 20 a0 74 st %i1, [ %g2 + 0x74 ]
2005ff8: 81 c7 e0 08 ret
2005ffc: 81 e8 00 00 restore
/*
* 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 *)
2006000: a1 2e a0 05 sll %i2, 5, %l0
2006004: a0 24 00 01 sub %l0, %g1, %l0
2006008: 40 00 0c 92 call 2009250 <_Workspace_Allocate_or_fatal_error>
200600c: 90 10 00 10 mov %l0, %o0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
2006010: 03 00 80 63 sethi %hi(0x2018c00), %g1
memset(
2006014: 94 10 00 10 mov %l0, %o2
_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;
2006018: f4 20 60 74 st %i2, [ %g1 + 0x74 ]
/*
* 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 *)
200601c: 21 00 80 63 sethi %hi(0x2018c00), %l0
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
2006020: 92 10 20 00 clr %o1
2006024: 40 00 20 e6 call 200e3bc <memset>
2006028: d0 24 20 78 st %o0, [ %l0 + 0x78 ]
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
200602c: 80 a6 60 00 cmp %i1, 0
2006030: 02 bf ff f2 be 2005ff8 <_IO_Manager_initialization+0x20> <== NEVER TAKEN
2006034: d4 04 20 78 ld [ %l0 + 0x78 ], %o2
_IO_Driver_address_table[index] = driver_table[index];
2006038: 96 10 20 00 clr %o3
200603c: 98 10 20 00 clr %o4
2006040: c2 06 00 0c ld [ %i0 + %o4 ], %g1
2006044: 9a 06 00 0c add %i0, %o4, %o5
2006048: c2 22 80 0c st %g1, [ %o2 + %o4 ]
200604c: c4 03 60 04 ld [ %o5 + 4 ], %g2
2006050: 86 02 80 0c add %o2, %o4, %g3
2006054: c4 20 e0 04 st %g2, [ %g3 + 4 ]
2006058: c2 03 60 08 ld [ %o5 + 8 ], %g1
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
200605c: 96 02 e0 01 inc %o3
_IO_Driver_address_table[index] = driver_table[index];
2006060: c2 20 e0 08 st %g1, [ %g3 + 8 ]
2006064: c4 03 60 0c ld [ %o5 + 0xc ], %g2
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2006068: 98 03 20 18 add %o4, 0x18, %o4
_IO_Driver_address_table[index] = driver_table[index];
200606c: c4 20 e0 0c st %g2, [ %g3 + 0xc ]
2006070: c8 03 60 10 ld [ %o5 + 0x10 ], %g4
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2006074: 80 a6 40 0b cmp %i1, %o3
_IO_Driver_address_table[index] = driver_table[index];
2006078: c8 20 e0 10 st %g4, [ %g3 + 0x10 ]
200607c: c2 03 60 14 ld [ %o5 + 0x14 ], %g1
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
2006080: 18 bf ff f0 bgu 2006040 <_IO_Manager_initialization+0x68>
2006084: c2 20 e0 14 st %g1, [ %g3 + 0x14 ]
2006088: 81 c7 e0 08 ret
200608c: 81 e8 00 00 restore
02006c64 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2006c64: 9d e3 bf 98 save %sp, -104, %sp
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2006c68: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
2006c6c: a0 10 00 18 mov %i0, %l0
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
2006c70: 80 a0 60 00 cmp %g1, 0
2006c74: 02 80 00 1d be 2006ce8 <_Objects_Allocate+0x84> <== NEVER TAKEN
2006c78: b0 10 20 00 clr %i0
/*
* OK. The manager should be initialized and configured to have objects.
* With any luck, it is safe to attempt to allocate an object.
*/
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2006c7c: a2 04 20 20 add %l0, 0x20, %l1
2006c80: 40 00 14 e0 call 200c000 <_Chain_Get>
2006c84: 90 10 00 11 mov %l1, %o0
if ( information->auto_extend ) {
2006c88: c2 0c 20 12 ldub [ %l0 + 0x12 ], %g1
2006c8c: 80 a0 60 00 cmp %g1, 0
2006c90: 02 80 00 16 be 2006ce8 <_Objects_Allocate+0x84>
2006c94: b0 10 00 08 mov %o0, %i0
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
2006c98: 80 a2 20 00 cmp %o0, 0
2006c9c: 02 80 00 15 be 2006cf0 <_Objects_Allocate+0x8c>
2006ca0: 01 00 00 00 nop
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
2006ca4: c4 06 20 08 ld [ %i0 + 8 ], %g2
2006ca8: d0 04 20 08 ld [ %l0 + 8 ], %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006cac: d2 04 20 14 ld [ %l0 + 0x14 ], %o1
}
if ( the_object ) {
uint32_t block;
block = _Objects_Get_index( the_object->id ) -
2006cb0: 03 00 00 3f sethi %hi(0xfc00), %g1
2006cb4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006cb8: 84 08 80 01 and %g2, %g1, %g2
2006cbc: 90 0a 00 01 and %o0, %g1, %o0
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006cc0: 40 00 36 5f call 201463c <.udiv>
2006cc4: 90 20 80 08 sub %g2, %o0, %o0
2006cc8: c6 04 20 30 ld [ %l0 + 0x30 ], %g3
2006ccc: 91 2a 20 02 sll %o0, 2, %o0
information->inactive--;
2006cd0: c2 14 20 2c lduh [ %l0 + 0x2c ], %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006cd4: c4 00 c0 08 ld [ %g3 + %o0 ], %g2
information->inactive--;
2006cd8: 82 00 7f ff add %g1, -1, %g1
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006cdc: 84 00 bf ff add %g2, -1, %g2
information->inactive--;
2006ce0: c2 34 20 2c sth %g1, [ %l0 + 0x2c ]
block = _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
2006ce4: c4 20 c0 08 st %g2, [ %g3 + %o0 ]
information->inactive--;
}
}
return the_object;
}
2006ce8: 81 c7 e0 08 ret
2006cec: 81 e8 00 00 restore
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
2006cf0: 40 00 00 14 call 2006d40 <_Objects_Extend_information>
2006cf4: 90 10 00 10 mov %l0, %o0
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
2006cf8: 40 00 14 c2 call 200c000 <_Chain_Get>
2006cfc: 90 10 00 11 mov %l1, %o0
}
if ( the_object ) {
2006d00: b0 92 20 00 orcc %o0, 0, %i0
2006d04: 32 bf ff e9 bne,a 2006ca8 <_Objects_Allocate+0x44> <== ALWAYS TAKEN
2006d08: c4 06 20 08 ld [ %i0 + 8 ], %g2
information->inactive--;
}
}
return the_object;
}
2006d0c: 81 c7 e0 08 ret <== NOT EXECUTED
2006d10: 81 e8 00 00 restore <== NOT EXECUTED
02006d40 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
2006d40: 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;
2006d44: 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 )
2006d48: ea 16 20 10 lduh [ %i0 + 0x10 ], %l5
2006d4c: 03 00 00 3f sethi %hi(0xfc00), %g1
2006d50: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006d54: a8 08 80 01 and %g2, %g1, %l4
2006d58: 80 a5 40 14 cmp %l5, %l4
2006d5c: 1a 80 00 79 bcc 2006f40 <_Objects_Extend_information+0x200>
2006d60: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
2006d64: a6 10 00 14 mov %l4, %l3
2006d68: a4 10 20 00 clr %l2
2006d6c: a2 10 20 00 clr %l1
2006d70: ac 10 20 01 mov 1, %l6
2006d74: 90 10 20 03 mov 3, %o0
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
2006d78: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2006d7c: 80 a0 60 00 cmp %g1, 0
2006d80: 12 80 00 8d bne 2006fb4 <_Objects_Extend_information+0x274>
2006d84: ba 04 00 15 add %l0, %l5, %i5
if ( !object_blocks )
return;
}
else {
object_blocks = (void**)
2006d88: 90 02 00 14 add %o0, %l4, %o0
2006d8c: 90 02 00 1d add %o0, %i5, %o0
2006d90: 40 00 09 30 call 2009250 <_Workspace_Allocate_or_fatal_error>
2006d94: 91 2a 20 02 sll %o0, 2, %o0
2006d98: ae 10 00 08 mov %o0, %l7
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2006d9c: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
2006da0: 85 2d a0 02 sll %l6, 2, %g2
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2006da4: 80 a0 40 14 cmp %g1, %l4
/*
* Break the block into the various sections.
*
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
2006da8: ac 05 c0 02 add %l7, %g2, %l6
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
2006dac: 18 80 00 94 bgu 2006ffc <_Objects_Extend_information+0x2bc>
2006db0: a0 05 80 02 add %l6, %g2, %l0
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2006db4: 80 a5 20 00 cmp %l4, 0
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2006db8: 84 10 20 00 clr %g2
else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
2006dbc: 02 80 00 08 be 2006ddc <_Objects_Extend_information+0x9c> <== NEVER TAKEN
2006dc0: ab 2c a0 02 sll %l2, 2, %l5
local_table[ index ] = NULL;
2006dc4: 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++ ) {
2006dc8: 84 00 a0 01 inc %g2
2006dcc: 80 a0 80 14 cmp %g2, %l4
2006dd0: 0a bf ff fd bcs 2006dc4 <_Objects_Extend_information+0x84><== NEVER TAKEN
2006dd4: c0 24 00 01 clr [ %l0 + %g1 ]
2006dd8: ab 2c a0 02 sll %l2, 2, %l5
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
2006ddc: c0 25 80 15 clr [ %l6 + %l5 ]
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006de0: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006de4: 86 04 c0 01 add %l3, %g1, %g3
2006de8: 80 a4 c0 03 cmp %l3, %g3
2006dec: 1a 80 00 0a bcc 2006e14 <_Objects_Extend_information+0xd4><== NEVER TAKEN
2006df0: c0 25 c0 15 clr [ %l7 + %l5 ]
2006df4: 83 2c e0 02 sll %l3, 2, %g1
2006df8: 84 04 00 01 add %l0, %g1, %g2
2006dfc: 82 10 00 13 mov %l3, %g1
index++ ) {
local_table[ index ] = NULL;
2006e00: c0 20 80 00 clr [ %g2 ]
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
2006e04: 82 00 60 01 inc %g1
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
2006e08: 80 a0 40 03 cmp %g1, %g3
2006e0c: 0a bf ff fd bcs 2006e00 <_Objects_Extend_information+0xc0>
2006e10: 84 00 a0 04 add %g2, 4, %g2
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
2006e14: 7f ff eb f4 call 2001de4 <sparc_disable_interrupts>
2006e18: 01 00 00 00 nop
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006e1c: c2 06 00 00 ld [ %i0 ], %g1
2006e20: c8 16 20 04 lduh [ %i0 + 4 ], %g4
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
2006e24: e0 26 20 1c st %l0, [ %i0 + 0x1c ]
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006e28: 89 29 20 1b sll %g4, 0x1b, %g4
2006e2c: 87 2f 60 10 sll %i5, 0x10, %g3
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
2006e30: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006e34: 87 30 e0 10 srl %g3, 0x10, %g3
2006e38: 05 00 00 40 sethi %hi(0x10000), %g2
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
2006e3c: ec 26 20 30 st %l6, [ %i0 + 0x30 ]
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006e40: 83 28 60 18 sll %g1, 0x18, %g1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
2006e44: fa 36 20 10 sth %i5, [ %i0 + 0x10 ]
information->maximum_id = _Objects_Build_id(
2006e48: 82 10 40 02 or %g1, %g2, %g1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
2006e4c: ee 26 20 34 st %l7, [ %i0 + 0x34 ]
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = maximum;
information->maximum_id = _Objects_Build_id(
2006e50: 82 10 40 04 or %g1, %g4, %g1
2006e54: 82 10 40 03 or %g1, %g3, %g1
2006e58: c2 26 20 0c st %g1, [ %i0 + 0xc ]
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
2006e5c: 7f ff eb e6 call 2001df4 <sparc_enable_interrupts>
2006e60: 01 00 00 00 nop
if ( old_tables )
2006e64: 80 a4 20 00 cmp %l0, 0
2006e68: 22 80 00 05 be,a 2006e7c <_Objects_Extend_information+0x13c>
2006e6c: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
_Workspace_Free( old_tables );
2006e70: 40 00 08 ea call 2009218 <_Workspace_Free>
2006e74: 90 10 00 10 mov %l0, %o0
2006e78: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
2006e7c: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2006e80: 80 a0 60 00 cmp %g1, 0
2006e84: 02 80 00 55 be 2006fd8 <_Objects_Extend_information+0x298>
2006e88: d2 06 20 18 ld [ %i0 + 0x18 ], %o1
information->object_blocks[ block ] =
2006e8c: 90 10 00 10 mov %l0, %o0
2006e90: 40 00 35 b1 call 2014554 <.umul>
2006e94: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
2006e98: 40 00 08 e7 call 2009234 <_Workspace_Allocate>
2006e9c: a9 2c 60 02 sll %l1, 2, %l4
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006ea0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
/*
* Allocate the name table, and the objects
*/
if ( information->auto_extend ) {
information->object_blocks[ block ] =
2006ea4: d0 24 00 14 st %o0, [ %l0 + %l4 ]
_Workspace_Allocate(
(information->allocation_size * information->size)
);
if ( !information->object_blocks[ block ] )
2006ea8: d2 00 40 14 ld [ %g1 + %l4 ], %o1
2006eac: 80 a2 60 00 cmp %o1, 0
2006eb0: 02 80 00 64 be 2007040 <_Objects_Extend_information+0x300><== NEVER TAKEN
2006eb4: 01 00 00 00 nop
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006eb8: d4 06 20 14 ld [ %i0 + 0x14 ], %o2
2006ebc: d6 06 20 18 ld [ %i0 + 0x18 ], %o3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006ec0: a0 10 00 13 mov %l3, %l0
2006ec4: a2 06 20 20 add %i0, 0x20, %l1
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006ec8: a6 07 bf ec add %fp, -20, %l3
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006ecc: 25 00 00 40 sethi %hi(0x10000), %l2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
2006ed0: 40 00 14 5f call 200c04c <_Chain_Initialize>
2006ed4: 90 10 00 13 mov %l3, %o0
2006ed8: 30 80 00 0c b,a 2006f08 <_Objects_Extend_information+0x1c8>
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006edc: c4 16 20 04 lduh [ %i0 + 4 ], %g2
2006ee0: 83 28 60 18 sll %g1, 0x18, %g1
2006ee4: 85 28 a0 1b sll %g2, 0x1b, %g2
2006ee8: 82 10 40 12 or %g1, %l2, %g1
2006eec: 82 10 40 02 or %g1, %g2, %g1
2006ef0: 82 10 40 10 or %g1, %l0, %g1
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006ef4: 92 10 00 08 mov %o0, %o1
index = index_base;
while ( (the_object = (Objects_Control *) _Chain_Get( &Inactive ) ) != NULL ) {
the_object->id = _Objects_Build_id(
2006ef8: c2 22 20 08 st %g1, [ %o0 + 8 ]
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
2006efc: a0 04 20 01 inc %l0
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
2006f00: 7f ff fd 2f call 20063bc <_Chain_Append>
2006f04: 90 10 00 11 mov %l1, %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 ) {
2006f08: 40 00 14 3e call 200c000 <_Chain_Get>
2006f0c: 90 10 00 13 mov %l3, %o0
2006f10: 80 a2 20 00 cmp %o0, 0
2006f14: 32 bf ff f2 bne,a 2006edc <_Objects_Extend_information+0x19c>
2006f18: c2 06 00 00 ld [ %i0 ], %g1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006f1c: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
2006f20: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
information->inactive += information->allocation_size;
2006f24: c8 16 20 2c lduh [ %i0 + 0x2c ], %g4
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
2006f28: c4 20 c0 14 st %g2, [ %g3 + %l4 ]
information->inactive += information->allocation_size;
2006f2c: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2006f30: 82 00 40 04 add %g1, %g4, %g1
2006f34: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2006f38: 81 c7 e0 08 ret
2006f3c: 81 e8 00 00 restore
block = 0;
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
2006f40: 90 10 00 15 mov %l5, %o0
2006f44: 40 00 35 be call 201463c <.udiv>
2006f48: 92 10 00 10 mov %l0, %o1
for ( ; block < block_count; block++ ) {
2006f4c: a4 92 20 00 orcc %o0, 0, %l2
2006f50: 02 80 00 3e be 2007048 <_Objects_Extend_information+0x308><== NEVER TAKEN
2006f54: a6 10 00 14 mov %l4, %l3
if ( information->object_blocks[ block ] == NULL )
2006f58: c4 06 20 34 ld [ %i0 + 0x34 ], %g2
2006f5c: c2 00 80 00 ld [ %g2 ], %g1
2006f60: 80 a0 60 00 cmp %g1, 0
2006f64: 12 80 00 08 bne 2006f84 <_Objects_Extend_information+0x244><== ALWAYS TAKEN
2006f68: a2 10 20 00 clr %l1
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
2006f6c: 10 80 00 0c b 2006f9c <_Objects_Extend_information+0x25c> <== NOT EXECUTED
2006f70: 80 a4 c0 15 cmp %l3, %l5 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
2006f74: c2 00 80 01 ld [ %g2 + %g1 ], %g1
2006f78: 80 a0 60 00 cmp %g1, 0
2006f7c: 02 80 00 08 be 2006f9c <_Objects_Extend_information+0x25c>
2006f80: 80 a4 c0 15 cmp %l3, %l5
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2006f84: a2 04 60 01 inc %l1
if ( information->object_blocks[ block ] == NULL )
break;
else
index_base += information->allocation_size;
2006f88: a6 04 c0 10 add %l3, %l0, %l3
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2006f8c: 80 a4 80 11 cmp %l2, %l1
2006f90: 18 bf ff f9 bgu 2006f74 <_Objects_Extend_information+0x234>
2006f94: 83 2c 60 02 sll %l1, 2, %g1
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
2006f98: 80 a4 c0 15 cmp %l3, %l5
2006f9c: 2a bf ff b9 bcs,a 2006e80 <_Objects_Extend_information+0x140>
2006fa0: c2 0e 20 12 ldub [ %i0 + 0x12 ], %g1
2006fa4: ac 04 a0 01 add %l2, 1, %l6
2006fa8: 83 2d a0 01 sll %l6, 1, %g1
2006fac: 10 bf ff 73 b 2006d78 <_Objects_Extend_information+0x38>
2006fb0: 90 00 40 16 add %g1, %l6, %o0
/*
* Allocate the tables and break it up.
*/
if ( information->auto_extend ) {
object_blocks = (void**)
2006fb4: 90 02 00 14 add %o0, %l4, %o0
2006fb8: 90 02 00 1d add %o0, %i5, %o0
2006fbc: 40 00 08 9e call 2009234 <_Workspace_Allocate>
2006fc0: 91 2a 20 02 sll %o0, 2, %o0
block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *))
);
if ( !object_blocks )
2006fc4: ae 92 20 00 orcc %o0, 0, %l7
2006fc8: 32 bf ff 76 bne,a 2006da0 <_Objects_Extend_information+0x60><== ALWAYS TAKEN
2006fcc: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2006fd0: 81 c7 e0 08 ret <== NOT EXECUTED
2006fd4: 81 e8 00 00 restore <== NOT EXECUTED
if ( !information->object_blocks[ block ] )
return;
}
else {
information->object_blocks[ block ] =
2006fd8: 90 10 00 10 mov %l0, %o0
2006fdc: 40 00 35 5e call 2014554 <.umul>
2006fe0: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
2006fe4: 40 00 08 9b call 2009250 <_Workspace_Allocate_or_fatal_error>
2006fe8: a9 2c 60 02 sll %l1, 2, %l4
2006fec: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
2006ff0: d0 24 00 14 st %o0, [ %l0 + %l4 ]
2006ff4: 10 bf ff b1 b 2006eb8 <_Objects_Extend_information+0x178>
2006ff8: d2 00 40 14 ld [ %g1 + %l4 ], %o1
/*
* 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,
2006ffc: d2 06 20 34 ld [ %i0 + 0x34 ], %o1
2007000: ab 2c a0 02 sll %l2, 2, %l5
2007004: 90 10 00 17 mov %l7, %o0
2007008: 40 00 1c b4 call 200e2d8 <memcpy>
200700c: 94 10 00 15 mov %l5, %o2
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
2007010: d2 06 20 30 ld [ %i0 + 0x30 ], %o1
2007014: 94 10 00 15 mov %l5, %o2
2007018: 40 00 1c b0 call 200e2d8 <memcpy>
200701c: 90 10 00 16 mov %l6, %o0
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
2007020: d4 16 20 10 lduh [ %i0 + 0x10 ], %o2
2007024: d2 06 20 1c ld [ %i0 + 0x1c ], %o1
2007028: 94 05 00 0a add %l4, %o2, %o2
200702c: 90 10 00 10 mov %l0, %o0
2007030: 40 00 1c aa call 200e2d8 <memcpy>
2007034: 95 2a a0 02 sll %o2, 2, %o2
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
2007038: 10 bf ff 6a b 2006de0 <_Objects_Extend_information+0xa0>
200703c: c0 25 80 15 clr [ %l6 + %l5 ]
2007040: 81 c7 e0 08 ret <== NOT EXECUTED
2007044: 81 e8 00 00 restore <== NOT EXECUTED
if ( information->maximum < minimum_index )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
2007048: 10 bf ff d4 b 2006f98 <_Objects_Extend_information+0x258> <== NOT EXECUTED
200704c: a2 10 20 00 clr %l1 <== NOT EXECUTED
02007100 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
2007100: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2007104: 82 06 3f ff add %i0, -1, %g1
2007108: 80 a0 60 03 cmp %g1, 3
200710c: 38 80 00 1e bgu,a 2007184 <_Objects_Get_information+0x84>
2007110: b0 10 20 00 clr %i0
int the_class_api_maximum;
if ( !_Objects_Is_api_valid( the_api ) )
return NULL;
if ( !the_class )
2007114: 80 a6 60 00 cmp %i1, 0
2007118: 12 80 00 04 bne 2007128 <_Objects_Get_information+0x28>
200711c: 01 00 00 00 nop
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
2007120: 81 c7 e0 08 ret
2007124: 91 e8 20 00 restore %g0, 0, %o0
return NULL;
if ( !the_class )
return NULL;
the_class_api_maximum = _Objects_API_maximum_class( the_api );
2007128: 40 00 15 11 call 200c56c <_Objects_API_maximum_class>
200712c: 90 10 00 18 mov %i0, %o0
if ( the_class_api_maximum < 0 ||
2007130: 80 a2 20 00 cmp %o0, 0
2007134: 06 bf ff fb bl 2007120 <_Objects_Get_information+0x20> <== NEVER TAKEN
2007138: 80 a2 00 19 cmp %o0, %i1
200713c: 2a 80 00 12 bcs,a 2007184 <_Objects_Get_information+0x84><== NEVER TAKEN
2007140: b0 10 20 00 clr %i0 <== NOT EXECUTED
the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
2007144: 85 2e 20 02 sll %i0, 2, %g2
2007148: 03 00 80 60 sethi %hi(0x2018000), %g1
200714c: 82 10 62 70 or %g1, 0x270, %g1 ! 2018270 <_Objects_Information_table>
2007150: c4 00 40 02 ld [ %g1 + %g2 ], %g2
2007154: 80 a0 a0 00 cmp %g2, 0
2007158: 02 80 00 0b be 2007184 <_Objects_Get_information+0x84> <== NEVER TAKEN
200715c: b0 10 20 00 clr %i0
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
2007160: 83 2e 60 02 sll %i1, 2, %g1
2007164: f0 00 80 01 ld [ %g2 + %g1 ], %i0
if ( !info )
2007168: 80 a6 20 00 cmp %i0, 0
200716c: 02 80 00 06 be 2007184 <_Objects_Get_information+0x84> <== NEVER TAKEN
2007170: 01 00 00 00 nop
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
2007174: c2 16 20 10 lduh [ %i0 + 0x10 ], %g1
2007178: 80 a0 60 00 cmp %g1, 0
200717c: 22 80 00 02 be,a 2007184 <_Objects_Get_information+0x84>
2007180: b0 10 20 00 clr %i0
return NULL;
#endif
return info;
}
2007184: 81 c7 e0 08 ret
2007188: 81 e8 00 00 restore
02008a7c <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
2008a7c: 9d e3 bf 88 save %sp, -120, %sp
2008a80: 90 10 00 18 mov %i0, %o0
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
2008a84: 80 a6 60 00 cmp %i1, 0
2008a88: 12 80 00 04 bne 2008a98 <_Objects_Get_name_as_string+0x1c>
2008a8c: b0 10 00 1a mov %i2, %i0
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
2008a90: 81 c7 e0 08 ret
2008a94: 91 e8 20 00 restore %g0, 0, %o0
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
2008a98: 80 a6 a0 00 cmp %i2, 0
2008a9c: 02 80 00 38 be 2008b7c <_Objects_Get_name_as_string+0x100>
2008aa0: b4 92 20 00 orcc %o0, 0, %i2
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2008aa4: 12 80 00 04 bne 2008ab4 <_Objects_Get_name_as_string+0x38>
2008aa8: 03 00 80 93 sethi %hi(0x2024c00), %g1
2008aac: c4 00 62 24 ld [ %g1 + 0x224 ], %g2 ! 2024e24 <_Thread_Executing>
2008ab0: f4 00 a0 08 ld [ %g2 + 8 ], %i2
information = _Objects_Get_information_id( tmpId );
2008ab4: 7f ff ff aa call 200895c <_Objects_Get_information_id>
2008ab8: 90 10 00 1a mov %i2, %o0
if ( !information )
2008abc: a0 92 20 00 orcc %o0, 0, %l0
2008ac0: 22 80 00 2f be,a 2008b7c <_Objects_Get_name_as_string+0x100>
2008ac4: b0 10 20 00 clr %i0
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
2008ac8: 92 10 00 1a mov %i2, %o1
2008acc: 40 00 00 38 call 2008bac <_Objects_Get>
2008ad0: 94 07 bf f4 add %fp, -12, %o2
switch ( location ) {
2008ad4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2008ad8: 80 a0 60 00 cmp %g1, 0
2008adc: 32 80 00 28 bne,a 2008b7c <_Objects_Get_name_as_string+0x100>
2008ae0: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
return NULL;
case OBJECTS_LOCAL:
if ( information->is_string ) {
2008ae4: c2 0c 20 38 ldub [ %l0 + 0x38 ], %g1
2008ae8: 80 a0 60 00 cmp %g1, 0
2008aec: 22 80 00 26 be,a 2008b84 <_Objects_Get_name_as_string+0x108>
2008af0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
s = the_object->name.name_p;
2008af4: d0 02 20 0c ld [ %o0 + 0xc ], %o0
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
2008af8: 80 a2 20 00 cmp %o0, 0
2008afc: 02 80 00 1e be 2008b74 <_Objects_Get_name_as_string+0xf8>
2008b00: 98 10 00 18 mov %i0, %o4
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2008b04: 96 86 7f ff addcc %i1, -1, %o3
2008b08: 02 80 00 1b be 2008b74 <_Objects_Get_name_as_string+0xf8> <== NEVER TAKEN
2008b0c: 98 10 00 18 mov %i0, %o4
2008b10: da 0a 00 00 ldub [ %o0 ], %o5
2008b14: 85 2b 60 18 sll %o5, 0x18, %g2
2008b18: 80 a0 a0 00 cmp %g2, 0
2008b1c: 02 80 00 16 be 2008b74 <_Objects_Get_name_as_string+0xf8>
2008b20: 03 00 80 71 sethi %hi(0x201c400), %g1
2008b24: 98 10 00 18 mov %i0, %o4
2008b28: 94 10 62 d0 or %g1, 0x2d0, %o2
2008b2c: 10 80 00 07 b 2008b48 <_Objects_Get_name_as_string+0xcc>
2008b30: 88 10 20 00 clr %g4
2008b34: da 0a 00 04 ldub [ %o0 + %g4 ], %o5
2008b38: 85 2b 60 18 sll %o5, 0x18, %g2
2008b3c: 80 a0 a0 00 cmp %g2, 0
2008b40: 02 80 00 0d be 2008b74 <_Objects_Get_name_as_string+0xf8>
2008b44: 01 00 00 00 nop
*d = (isprint(*s)) ? *s : '*';
2008b48: c2 02 80 00 ld [ %o2 ], %g1
2008b4c: 85 38 a0 18 sra %g2, 0x18, %g2
2008b50: c6 48 40 02 ldsb [ %g1 + %g2 ], %g3
2008b54: 80 88 e0 97 btst 0x97, %g3
2008b58: 12 80 00 03 bne 2008b64 <_Objects_Get_name_as_string+0xe8>
2008b5c: 88 01 20 01 inc %g4
2008b60: 9a 10 20 2a mov 0x2a, %o5
2008b64: da 2b 00 00 stb %o5, [ %o4 ]
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
2008b68: 80 a1 00 0b cmp %g4, %o3
2008b6c: 0a bf ff f2 bcs 2008b34 <_Objects_Get_name_as_string+0xb8>
2008b70: 98 03 20 01 inc %o4
*d = (isprint(*s)) ? *s : '*';
}
}
*d = '\0';
_Thread_Enable_dispatch();
2008b74: 40 00 02 63 call 2009500 <_Thread_Enable_dispatch>
2008b78: c0 2b 00 00 clrb [ %o4 ]
2008b7c: 81 c7 e0 08 ret
2008b80: 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';
2008b84: c0 2f bf ec clrb [ %fp + -20 ]
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2008b88: 85 30 60 18 srl %g1, 0x18, %g2
lname[ 1 ] = (u32_name >> 16) & 0xff;
2008b8c: 87 30 60 10 srl %g1, 0x10, %g3
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
2008b90: c2 2f bf eb stb %g1, [ %fp + -21 ]
if ( information->is_string ) {
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
2008b94: c4 2f bf e8 stb %g2, [ %fp + -24 ]
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
2008b98: 83 30 60 08 srl %g1, 8, %g1
s = the_object->name.name_p;
} else {
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
2008b9c: c6 2f bf e9 stb %g3, [ %fp + -23 ]
lname[ 2 ] = (u32_name >> 8) & 0xff;
2008ba0: c2 2f bf ea stb %g1, [ %fp + -22 ]
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
2008ba4: 10 bf ff d8 b 2008b04 <_Objects_Get_name_as_string+0x88>
2008ba8: 90 07 bf e8 add %fp, -24, %o0
020142b0 <_Objects_Get_no_protection>:
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
20142b0: c2 02 20 08 ld [ %o0 + 8 ], %g1
if ( information->maximum >= index ) {
20142b4: c4 12 20 10 lduh [ %o0 + 0x10 ], %g2
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
20142b8: 92 22 40 01 sub %o1, %g1, %o1
20142bc: 82 02 60 01 add %o1, 1, %g1
if ( information->maximum >= index ) {
20142c0: 80 a0 40 02 cmp %g1, %g2
20142c4: 18 80 00 09 bgu 20142e8 <_Objects_Get_no_protection+0x38>
20142c8: 83 28 60 02 sll %g1, 2, %g1
if ( (the_object = information->local_table[ index ]) != NULL ) {
20142cc: c4 02 20 1c ld [ %o0 + 0x1c ], %g2
20142d0: d0 00 80 01 ld [ %g2 + %g1 ], %o0
20142d4: 80 a2 20 00 cmp %o0, 0
20142d8: 02 80 00 05 be 20142ec <_Objects_Get_no_protection+0x3c> <== NEVER TAKEN
20142dc: 82 10 20 01 mov 1, %g1
*location = OBJECTS_LOCAL;
20142e0: 81 c3 e0 08 retl
20142e4: c0 22 80 00 clr [ %o2 ]
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
20142e8: 82 10 20 01 mov 1, %g1
20142ec: 90 10 20 00 clr %o0
return NULL;
}
20142f0: 81 c3 e0 08 retl
20142f4: c2 22 80 00 st %g1, [ %o2 ]
02008504 <_Objects_Id_to_name>:
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
2008504: 9d e3 bf 90 save %sp, -112, %sp
2008508: 92 10 00 18 mov %i0, %o1
Objects_Id tmpId;
Objects_Information *information;
Objects_Control *the_object = (Objects_Control *) 0;
Objects_Locations ignored_location;
if ( !name )
200850c: 80 a6 60 00 cmp %i1, 0
2008510: 02 80 00 24 be 20085a0 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
2008514: b0 10 20 01 mov 1, %i0
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2008518: 80 a2 60 00 cmp %o1, 0
200851c: 02 80 00 26 be 20085b4 <_Objects_Id_to_name+0xb0>
2008520: 03 00 80 72 sethi %hi(0x201c800), %g1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
2008524: 83 32 60 18 srl %o1, 0x18, %g1
2008528: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
200852c: 84 00 7f ff add %g1, -1, %g2
2008530: 80 a0 a0 03 cmp %g2, 3
2008534: 38 80 00 1b bgu,a 20085a0 <_Objects_Id_to_name+0x9c>
2008538: b0 10 20 03 mov 3, %i0
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
200853c: 85 28 60 02 sll %g1, 2, %g2
2008540: 03 00 80 72 sethi %hi(0x201c800), %g1
2008544: 82 10 60 80 or %g1, 0x80, %g1 ! 201c880 <_Objects_Information_table>
2008548: c4 00 40 02 ld [ %g1 + %g2 ], %g2
200854c: 80 a0 a0 00 cmp %g2, 0
2008550: 02 80 00 16 be 20085a8 <_Objects_Id_to_name+0xa4> <== NEVER TAKEN
2008554: 83 32 60 1b srl %o1, 0x1b, %g1
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
2008558: 83 28 60 02 sll %g1, 2, %g1
200855c: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !information )
2008560: 80 a2 20 00 cmp %o0, 0
2008564: 02 80 00 0f be 20085a0 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
2008568: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
if ( information->is_string )
200856c: c2 0a 20 38 ldub [ %o0 + 0x38 ], %g1
2008570: 80 a0 60 00 cmp %g1, 0
2008574: 12 80 00 0e bne 20085ac <_Objects_Id_to_name+0xa8> <== NEVER TAKEN
2008578: 01 00 00 00 nop
return OBJECTS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &ignored_location );
200857c: 7f ff ff c5 call 2008490 <_Objects_Get>
2008580: 94 07 bf f4 add %fp, -12, %o2
if ( !the_object )
2008584: 80 a2 20 00 cmp %o0, 0
2008588: 22 80 00 06 be,a 20085a0 <_Objects_Id_to_name+0x9c>
200858c: b0 10 20 03 mov 3, %i0
return OBJECTS_INVALID_ID;
*name = the_object->name;
2008590: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
2008594: b0 10 20 00 clr %i0
2008598: 40 00 02 77 call 2008f74 <_Thread_Enable_dispatch>
200859c: c2 26 40 00 st %g1, [ %i1 ]
20085a0: 81 c7 e0 08 ret
20085a4: 81 e8 00 00 restore
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
20085a8: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
}
20085ac: 81 c7 e0 08 ret <== NOT EXECUTED
20085b0: 81 e8 00 00 restore <== NOT EXECUTED
Objects_Locations ignored_location;
if ( !name )
return OBJECTS_INVALID_NAME;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
20085b4: c4 00 61 e4 ld [ %g1 + 0x1e4 ], %g2
20085b8: d2 00 a0 08 ld [ %g2 + 8 ], %o1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
20085bc: 83 32 60 18 srl %o1, 0x18, %g1
20085c0: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
20085c4: 84 00 7f ff add %g1, -1, %g2
20085c8: 80 a0 a0 03 cmp %g2, 3
20085cc: 38 bf ff f5 bgu,a 20085a0 <_Objects_Id_to_name+0x9c> <== NEVER TAKEN
20085d0: b0 10 20 03 mov 3, %i0 <== NOT EXECUTED
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
20085d4: 10 bf ff db b 2008540 <_Objects_Id_to_name+0x3c>
20085d8: 85 28 60 02 sll %g1, 2, %g2
02012b8c <_Objects_Name_to_id_string>:
Objects_Name_or_id_lookup_errors _Objects_Name_to_id_string(
Objects_Information *information,
const char *name,
Objects_Id *id
)
{
2012b8c: 9d e3 bf 98 save %sp, -104, %sp
2012b90: a8 10 00 18 mov %i0, %l4
uint32_t index;
uint32_t name_length;
/* ASSERT: information->is_string == TRUE */
if ( !id )
2012b94: 80 a6 a0 00 cmp %i2, 0
2012b98: 02 80 00 1d be 2012c0c <_Objects_Name_to_id_string+0x80> <== NEVER TAKEN
2012b9c: b0 10 20 02 mov 2, %i0
return OBJECTS_INVALID_ADDRESS;
if ( !name )
2012ba0: 80 a6 60 00 cmp %i1, 0
2012ba4: 22 80 00 1a be,a 2012c0c <_Objects_Name_to_id_string+0x80><== NEVER TAKEN
2012ba8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
2012bac: e6 15 20 10 lduh [ %l4 + 0x10 ], %l3
2012bb0: 80 a4 e0 00 cmp %l3, 0
2012bb4: 22 80 00 16 be,a 2012c0c <_Objects_Name_to_id_string+0x80><== NEVER TAKEN
2012bb8: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2012bbc: e4 05 20 1c ld [ %l4 + 0x1c ], %l2
2012bc0: a0 10 20 01 mov 1, %l0
the_object = information->local_table[ index ];
2012bc4: 83 2c 20 02 sll %l0, 2, %g1
2012bc8: e2 04 80 01 ld [ %l2 + %g1 ], %l1
if ( !the_object )
2012bcc: 80 a4 60 00 cmp %l1, 0
2012bd0: 02 80 00 0b be 2012bfc <_Objects_Name_to_id_string+0x70>
2012bd4: a0 04 20 01 inc %l0
continue;
if ( !the_object->name.name_p )
2012bd8: d2 04 60 0c ld [ %l1 + 0xc ], %o1
2012bdc: 80 a2 60 00 cmp %o1, 0
2012be0: 02 80 00 07 be 2012bfc <_Objects_Name_to_id_string+0x70>
2012be4: 90 10 00 19 mov %i1, %o0
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
2012be8: 40 00 0c e4 call 2015f78 <strncmp>
2012bec: d4 15 20 3a lduh [ %l4 + 0x3a ], %o2
2012bf0: 80 a2 20 00 cmp %o0, 0
2012bf4: 22 80 00 08 be,a 2012c14 <_Objects_Name_to_id_string+0x88>
2012bf8: c2 04 60 08 ld [ %l1 + 8 ], %g1
return OBJECTS_INVALID_NAME;
if ( information->maximum != 0 ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
2012bfc: 80 a4 00 13 cmp %l0, %l3
2012c00: 08 bf ff f2 bleu 2012bc8 <_Objects_Name_to_id_string+0x3c>
2012c04: 83 2c 20 02 sll %l0, 2, %g1
2012c08: b0 10 20 01 mov 1, %i0
}
}
}
return OBJECTS_INVALID_NAME;
}
2012c0c: 81 c7 e0 08 ret
2012c10: 81 e8 00 00 restore
if ( !the_object->name.name_p )
continue;
if (!strncmp( name, the_object->name.name_p, information->name_length)) {
*id = the_object->id;
2012c14: c2 26 80 00 st %g1, [ %i2 ]
2012c18: 81 c7 e0 08 ret
2012c1c: 91 e8 20 00 restore %g0, 0, %o0
02007384 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
2007384: 86 10 00 08 mov %o0, %g3
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == FALSE */
if ( !id )
2007388: 80 a2 e0 00 cmp %o3, 0
200738c: 02 80 00 20 be 200740c <_Objects_Name_to_id_u32+0x88>
2007390: 90 10 20 02 mov 2, %o0
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
2007394: 80 a2 60 00 cmp %o1, 0
2007398: 22 80 00 1d be,a 200740c <_Objects_Name_to_id_u32+0x88>
200739c: 90 10 20 01 mov 1, %o0
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
20073a0: c2 10 e0 10 lduh [ %g3 + 0x10 ], %g1
20073a4: 85 28 60 10 sll %g1, 0x10, %g2
20073a8: 80 a0 a0 00 cmp %g2, 0
20073ac: 22 80 00 18 be,a 200740c <_Objects_Name_to_id_u32+0x88> <== NEVER TAKEN
20073b0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
20073b4: 80 a2 a0 00 cmp %o2, 0
20073b8: 12 80 00 17 bne 2007414 <_Objects_Name_to_id_u32+0x90>
20073bc: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
20073c0: 89 30 a0 10 srl %g2, 0x10, %g4
20073c4: 80 a1 20 00 cmp %g4, 0
20073c8: 02 80 00 11 be 200740c <_Objects_Name_to_id_u32+0x88> <== NEVER TAKEN
20073cc: 90 10 20 01 mov 1, %o0
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
20073d0: d0 00 e0 1c ld [ %g3 + 0x1c ], %o0
20073d4: 86 10 20 01 mov 1, %g3
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
the_object = information->local_table[ index ];
20073d8: 83 28 e0 02 sll %g3, 2, %g1
20073dc: c4 02 00 01 ld [ %o0 + %g1 ], %g2
if ( !the_object )
20073e0: 80 a0 a0 00 cmp %g2, 0
20073e4: 02 80 00 06 be 20073fc <_Objects_Name_to_id_u32+0x78>
20073e8: 86 00 e0 01 inc %g3
continue;
if ( name == the_object->name.name_u32 ) {
20073ec: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
20073f0: 80 a0 40 09 cmp %g1, %o1
20073f4: 22 80 00 0f be,a 2007430 <_Objects_Name_to_id_u32+0xac>
20073f8: c2 00 a0 08 ld [ %g2 + 8 ], %g1
search_local_node = TRUE;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
20073fc: 80 a0 c0 04 cmp %g3, %g4
2007400: 08 bf ff f7 bleu 20073dc <_Objects_Name_to_id_u32+0x58>
2007404: 83 28 e0 02 sll %g3, 2, %g1
2007408: 90 10 20 01 mov 1, %o0
name_for_mp.name_u32 = name;
return _Objects_MP_Global_name_search( information, name_for_mp, node, id );
#else
return OBJECTS_INVALID_NAME;
#endif
}
200740c: 81 c3 e0 08 retl
2007410: 01 00 00 00 nop
if ( name == 0 )
return OBJECTS_INVALID_NAME;
search_local_node = FALSE;
if ( information->maximum != 0 &&
2007414: 82 10 63 ff or %g1, 0x3ff, %g1
2007418: 80 a2 80 01 cmp %o2, %g1
200741c: 02 bf ff e9 be 20073c0 <_Objects_Name_to_id_u32+0x3c>
2007420: 80 a2 a0 01 cmp %o2, 1
2007424: 02 bf ff e7 be 20073c0 <_Objects_Name_to_id_u32+0x3c>
2007428: 90 10 20 01 mov 1, %o0
200742c: 30 bf ff f8 b,a 200740c <_Objects_Name_to_id_u32+0x88>
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
2007430: 90 10 20 00 clr %o0
2007434: 81 c3 e0 08 retl
2007438: c2 22 c0 00 st %g1, [ %o3 ]
02007afc <_Objects_Set_name>:
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
2007afc: 9d e3 bf 98 save %sp, -104, %sp
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length ) + 1;
2007b00: d2 16 20 3a lduh [ %i0 + 0x3a ], %o1
2007b04: 40 00 22 78 call 20104e4 <strnlen>
2007b08: 90 10 00 1a mov %i2, %o0
if ( information->is_string ) {
2007b0c: c2 0e 20 38 ldub [ %i0 + 0x38 ], %g1
2007b10: 80 a0 60 00 cmp %g1, 0
2007b14: 12 80 00 21 bne 2007b98 <_Objects_Set_name+0x9c>
2007b18: a0 02 20 01 add %o0, 1, %l0
strncpy( d, name, length );
d[ length ] = '\0';
the_object->name.name_p = d;
} else {
the_object->name.name_u32 = _Objects_Build_name(
2007b1c: 03 08 08 08 sethi %hi(0x20202000), %g1
2007b20: 80 a4 20 00 cmp %l0, 0
2007b24: 02 80 00 19 be 2007b88 <_Objects_Set_name+0x8c> <== NEVER TAKEN
2007b28: 82 10 60 20 or %g1, 0x20, %g1
2007b2c: c4 4e 80 00 ldsb [ %i2 ], %g2
2007b30: 03 00 08 08 sethi %hi(0x202000), %g1
2007b34: 87 28 a0 18 sll %g2, 0x18, %g3
2007b38: 82 10 60 20 or %g1, 0x20, %g1
2007b3c: 80 a4 20 01 cmp %l0, 1
2007b40: 02 80 00 12 be 2007b88 <_Objects_Set_name+0x8c>
2007b44: 82 10 c0 01 or %g3, %g1, %g1
2007b48: c4 4e a0 01 ldsb [ %i2 + 1 ], %g2
2007b4c: 03 00 00 08 sethi %hi(0x2000), %g1
2007b50: 85 28 a0 10 sll %g2, 0x10, %g2
2007b54: 82 10 60 20 or %g1, 0x20, %g1
2007b58: 84 10 80 03 or %g2, %g3, %g2
2007b5c: 80 a4 20 02 cmp %l0, 2
2007b60: 02 80 00 0a be 2007b88 <_Objects_Set_name+0x8c>
2007b64: 82 10 80 01 or %g2, %g1, %g1
2007b68: c2 4e a0 02 ldsb [ %i2 + 2 ], %g1
2007b6c: 80 a4 20 03 cmp %l0, 3
2007b70: 83 28 60 08 sll %g1, 8, %g1
2007b74: 84 10 80 01 or %g2, %g1, %g2
2007b78: 02 80 00 04 be 2007b88 <_Objects_Set_name+0x8c>
2007b7c: 82 10 a0 20 or %g2, 0x20, %g1
2007b80: c2 4e a0 03 ldsb [ %i2 + 3 ], %g1
2007b84: 82 10 80 01 or %g2, %g1, %g1
2007b88: c2 26 60 0c st %g1, [ %i1 + 0xc ]
2007b8c: b0 10 20 01 mov 1, %i0
);
}
return TRUE;
}
2007b90: 81 c7 e0 08 ret
2007b94: 81 e8 00 00 restore
length = strnlen( name, information->name_length ) + 1;
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length );
2007b98: 90 10 00 10 mov %l0, %o0
2007b9c: 40 00 07 90 call 20099dc <_Workspace_Allocate>
2007ba0: b0 10 20 00 clr %i0
if ( !d )
2007ba4: a2 92 20 00 orcc %o0, 0, %l1
2007ba8: 02 bf ff fa be 2007b90 <_Objects_Set_name+0x94> <== NEVER TAKEN
2007bac: 01 00 00 00 nop
return FALSE;
if ( the_object->name.name_p ) {
2007bb0: d0 06 60 0c ld [ %i1 + 0xc ], %o0
2007bb4: 80 a2 20 00 cmp %o0, 0
2007bb8: 02 80 00 06 be 2007bd0 <_Objects_Set_name+0xd4>
2007bbc: 92 10 00 1a mov %i2, %o1
_Workspace_Free( (void *)the_object->name.name_p );
2007bc0: 40 00 07 80 call 20099c0 <_Workspace_Free>
2007bc4: 01 00 00 00 nop
the_object->name.name_p = NULL;
2007bc8: c0 26 60 0c clr [ %i1 + 0xc ]
}
strncpy( d, name, length );
2007bcc: 92 10 00 1a mov %i2, %o1
2007bd0: 90 10 00 11 mov %l1, %o0
2007bd4: 40 00 22 0a call 20103fc <strncpy>
2007bd8: 94 10 00 10 mov %l0, %o2
d[ length ] = '\0';
2007bdc: c0 2c 40 10 clrb [ %l1 + %l0 ]
the_object->name.name_p = d;
2007be0: e2 26 60 0c st %l1, [ %i1 + 0xc ]
2007be4: 81 c7 e0 08 ret
2007be8: 91 e8 20 01 restore %g0, 1, %o0
02007444 <_Objects_Shrink_information>:
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
2007444: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_index(
Objects_Id id
)
{
return (id >> OBJECTS_INDEX_START_BIT) & OBJECTS_INDEX_VALID_BITS;
2007448: 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;
200744c: e0 06 20 14 ld [ %i0 + 0x14 ], %l0
2007450: d0 16 20 10 lduh [ %i0 + 0x10 ], %o0
2007454: 03 00 00 3f sethi %hi(0xfc00), %g1
2007458: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200745c: 92 10 00 10 mov %l0, %o1
2007460: a4 08 80 01 and %g2, %g1, %l2
2007464: 40 00 34 76 call 201463c <.udiv>
2007468: 90 22 00 12 sub %o0, %l2, %o0
for ( block = 0; block < block_count; block++ ) {
200746c: 80 a2 20 00 cmp %o0, 0
2007470: 02 80 00 12 be 20074b8 <_Objects_Shrink_information+0x74> <== NEVER TAKEN
2007474: 84 10 20 00 clr %g2
if ( information->inactive_per_block[ block ] == information->allocation_size ) {
2007478: c6 06 20 30 ld [ %i0 + 0x30 ], %g3
200747c: c2 00 c0 00 ld [ %g3 ], %g1
2007480: 80 a4 00 01 cmp %l0, %g1
2007484: 12 80 00 09 bne 20074a8 <_Objects_Shrink_information+0x64><== ALWAYS TAKEN
2007488: a2 10 20 04 mov 4, %l1
200748c: 10 80 00 0d b 20074c0 <_Objects_Shrink_information+0x7c> <== NOT EXECUTED
2007490: a2 10 20 00 clr %l1 <== NOT EXECUTED
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
2007494: a4 04 80 10 add %l2, %l0, %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 ) {
2007498: 80 a4 00 01 cmp %l0, %g1
200749c: 02 80 00 09 be 20074c0 <_Objects_Shrink_information+0x7c>
20074a0: 82 04 60 04 add %l1, 4, %g1
20074a4: a2 10 00 01 mov %g1, %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++ ) {
20074a8: 84 00 a0 01 inc %g2
20074ac: 80 a2 00 02 cmp %o0, %g2
20074b0: 38 bf ff f9 bgu,a 2007494 <_Objects_Shrink_information+0x50>
20074b4: c2 00 c0 11 ld [ %g3 + %l1 ], %g1
20074b8: 81 c7 e0 08 ret
20074bc: 81 e8 00 00 restore
20074c0: 03 00 00 3f sethi %hi(0xfc00), %g1
/*
* 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;
20074c4: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
20074c8: 10 80 00 0f b 2007504 <_Objects_Shrink_information+0xc0>
20074cc: a6 10 63 ff or %g1, 0x3ff, %l3
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
20074d0: 82 04 80 01 add %l2, %g1, %g1
20074d4: 80 a0 40 03 cmp %g1, %g3
20074d8: 08 80 00 10 bleu 2007518 <_Objects_Shrink_information+0xd4>
20074dc: 90 10 00 02 mov %g2, %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 );
20074e0: 40 00 12 be call 200bfd8 <_Chain_Extract>
20074e4: e0 00 80 00 ld [ %g2 ], %l0
}
else {
the_object = (Objects_Control *) the_object->Node.next;
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
20074e8: 80 a4 20 00 cmp %l0, 0
20074ec: 22 80 00 10 be,a 200752c <_Objects_Shrink_information+0xe8><== NEVER TAKEN
20074f0: c2 06 20 34 ld [ %i0 + 0x34 ], %g1 <== NOT EXECUTED
20074f4: c2 04 00 00 ld [ %l0 ], %g1
20074f8: 80 a0 60 00 cmp %g1, 0
20074fc: 02 80 00 0b be 2007528 <_Objects_Shrink_information+0xe4>
2007500: 84 10 00 10 mov %l0, %g2
2007504: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2007508: 86 08 40 13 and %g1, %l3, %g3
*/
do {
index = _Objects_Get_index( the_object->id );
if ((index >= index_base) &&
200750c: 80 a0 c0 12 cmp %g3, %l2
2007510: 3a bf ff f0 bcc,a 20074d0 <_Objects_Shrink_information+0x8c>
2007514: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
the_object = NULL;
_Chain_Extract( &extract_me->Node );
}
else {
the_object = (Objects_Control *) the_object->Node.next;
2007518: e0 00 80 00 ld [ %g2 ], %l0
}
}
while ( the_object && !_Chain_Is_last( &the_object->Node ) );
200751c: 80 a4 20 00 cmp %l0, 0
2007520: 32 bf ff f6 bne,a 20074f8 <_Objects_Shrink_information+0xb4><== ALWAYS TAKEN
2007524: c2 04 00 00 ld [ %l0 ], %g1
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
2007528: c2 06 20 34 ld [ %i0 + 0x34 ], %g1
200752c: 40 00 07 3b call 2009218 <_Workspace_Free>
2007530: d0 00 40 11 ld [ %g1 + %l1 ], %o0
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
2007534: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
information->inactive -= information->allocation_size;
2007538: c2 16 20 2c lduh [ %i0 + 0x2c ], %g1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
200753c: c0 20 80 11 clr [ %g2 + %l1 ]
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007540: c6 06 20 34 ld [ %i0 + 0x34 ], %g3
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
2007544: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
2007548: c0 20 c0 11 clr [ %g3 + %l1 ]
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
200754c: 82 20 40 02 sub %g1, %g2, %g1
2007550: c2 36 20 2c sth %g1, [ %i0 + 0x2c ]
2007554: 81 c7 e0 08 ret
2007558: 81 e8 00 00 restore
02006090 <_POSIX_API_Initialize>:
void _POSIX_API_Initialize(
rtems_configuration_table *configuration_table
)
{
2006090: 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;
2006094: f0 06 20 44 ld [ %i0 + 0x44 ], %i0
if ( !api_configuration )
2006098: 80 a6 20 00 cmp %i0, 0
200609c: 02 80 00 1f be 2006118 <_POSIX_API_Initialize+0x88> <== NEVER TAKEN
20060a0: 03 00 80 59 sethi %hi(0x2016400), %g1
api_configuration = &_POSIX_Default_configuration;
_Objects_Information_table[OBJECTS_POSIX_API] = _POSIX_Objects;
_POSIX_signals_Manager_Initialization(
20060a4: 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;
20060a8: 05 00 80 60 sethi %hi(0x2018000), %g2
20060ac: 03 00 80 61 sethi %hi(0x2018400), %g1
20060b0: 82 10 63 e4 or %g1, 0x3e4, %g1 ! 20187e4 <_POSIX_Objects>
_POSIX_signals_Manager_Initialization(
20060b4: 40 00 15 1b call 200b520 <_POSIX_signals_Manager_Initialization>
20060b8: c2 20 a2 7c st %g1, [ %g2 + 0x27c ]
api_configuration->maximum_queued_signals
);
_POSIX_Threads_Manager_initialization(
20060bc: d2 06 20 2c ld [ %i0 + 0x2c ], %o1
20060c0: d4 06 20 30 ld [ %i0 + 0x30 ], %o2
20060c4: 40 00 15 a3 call 200b750 <_POSIX_Threads_Manager_initialization>
20060c8: 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(
20060cc: 40 00 14 be call 200b3c4 <_POSIX_Condition_variables_Manager_initialization>
20060d0: d0 06 20 08 ld [ %i0 + 8 ], %o0
api_configuration->maximum_condition_variables
);
_POSIX_Key_Manager_initialization( api_configuration->maximum_keys );
20060d4: 40 00 14 c9 call 200b3f8 <_POSIX_Key_Manager_initialization>
20060d8: d0 06 20 0c ld [ %i0 + 0xc ], %o0
_POSIX_Mutex_Manager_initialization(
20060dc: 40 00 14 ea call 200b484 <_POSIX_Mutex_Manager_initialization>
20060e0: d0 06 20 04 ld [ %i0 + 4 ], %o0
api_configuration->maximum_mutexes
);
_POSIX_Message_queue_Manager_initialization(
20060e4: 40 00 14 d2 call 200b42c <_POSIX_Message_queue_Manager_initialization>
20060e8: d0 06 20 18 ld [ %i0 + 0x18 ], %o0
api_configuration->maximum_message_queues
);
_POSIX_Semaphore_Manager_initialization(
20060ec: 40 00 16 60 call 200ba6c <_POSIX_Semaphore_Manager_initialization>
20060f0: d0 06 20 1c ld [ %i0 + 0x1c ], %o0
api_configuration->maximum_semaphores
);
_POSIX_Timer_Manager_initialization( api_configuration->maximum_timers );
20060f4: 40 00 16 51 call 200ba38 <_POSIX_Timer_Manager_initialization>
20060f8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
_POSIX_Barrier_Manager_initialization( api_configuration->maximum_barriers );
20060fc: 40 00 14 ef call 200b4b8 <_POSIX_Barrier_Manager_initialization>
2006100: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
_POSIX_RWLock_Manager_initialization( api_configuration->maximum_rwlocks );
2006104: 40 00 14 fa call 200b4ec <_POSIX_RWLock_Manager_initialization>
2006108: d0 06 20 24 ld [ %i0 + 0x24 ], %o0
_POSIX_Spinlock_Manager_initialization(api_configuration->maximum_spinlocks);
200610c: f0 06 20 28 ld [ %i0 + 0x28 ], %i0
2006110: 40 00 15 79 call 200b6f4 <_POSIX_Spinlock_Manager_initialization>
2006114: 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 )
2006118: 10 bf ff e3 b 20060a4 <_POSIX_API_Initialize+0x14> <== NOT EXECUTED
200611c: b0 10 63 00 or %g1, 0x300, %i0 <== NOT EXECUTED
02006204 <_POSIX_Condition_variables_Get>:
POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
pthread_cond_t *cond,
Objects_Locations *location
)
{
2006204: 9d e3 bf 98 save %sp, -104, %sp
Objects_Id *id = (Objects_Id *)cond;
int status;
if ( !id ) {
2006208: 80 a6 20 00 cmp %i0, 0
200620c: 02 80 00 12 be 2006254 <_POSIX_Condition_variables_Get+0x50>
2006210: b4 10 00 19 mov %i1, %i2
*location = OBJECTS_ERROR;
return (POSIX_Condition_variables_Control *) 0;
}
if ( *id == PTHREAD_COND_INITIALIZER ) {
2006214: f2 06 00 00 ld [ %i0 ], %i1
2006218: 80 a6 7f ff cmp %i1, -1
200621c: 02 80 00 05 be 2006230 <_POSIX_Condition_variables_Get+0x2c><== NEVER TAKEN
2006220: 90 10 00 18 mov %i0, %o0
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
2006224: 31 00 80 5e sethi %hi(0x2017800), %i0
2006228: 40 00 0c 52 call 2009370 <_Objects_Get>
200622c: 91 ee 22 44 restore %i0, 0x244, %o0
if ( *id == PTHREAD_COND_INITIALIZER ) {
/*
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
2006230: 40 00 00 0d call 2006264 <pthread_cond_init> <== NOT EXECUTED
2006234: 92 10 20 00 clr %o1 <== NOT EXECUTED
if ( status ) {
2006238: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200623c: 12 80 00 07 bne 2006258 <_POSIX_Condition_variables_Get+0x54><== NOT EXECUTED
2006240: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2006244: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
/*
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
2006248: 31 00 80 5e sethi %hi(0x2017800), %i0 <== NOT EXECUTED
200624c: 40 00 0c 49 call 2009370 <_Objects_Get> <== NOT EXECUTED
2006250: 91 ee 22 44 restore %i0, 0x244, %o0 <== NOT EXECUTED
* Do an "auto-create" here.
*/
status = pthread_cond_init( (pthread_cond_t *)id, 0 );
if ( status ) {
*location = OBJECTS_ERROR;
2006254: 82 10 20 01 mov 1, %g1
2006258: c2 26 80 00 st %g1, [ %i2 ]
* Now call Objects_Get()
*/
return (POSIX_Condition_variables_Control *)
_Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
}
200625c: 81 c7 e0 08 ret
2006260: 91 e8 20 00 restore %g0, 0, %o0
0200641c <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
200641c: 9d e3 bf 90 save %sp, -112, %sp
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
2006420: a0 07 bf f4 add %fp, -12, %l0
2006424: 90 10 00 19 mov %i1, %o0
2006428: 40 00 00 7f call 2006624 <_POSIX_Mutex_Get>
200642c: 92 10 00 10 mov %l0, %o1
2006430: 80 a2 20 00 cmp %o0, 0
2006434: 22 80 00 18 be,a 2006494 <_POSIX_Condition_variables_Wait_support+0x78>
2006438: b0 10 20 16 mov 0x16, %i0
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
200643c: 03 00 80 5d sethi %hi(0x2017400), %g1
2006440: c4 00 61 b0 ld [ %g1 + 0x1b0 ], %g2 ! 20175b0 <_Thread_Dispatch_disable_level>
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
2006444: 92 10 00 10 mov %l0, %o1
2006448: 84 00 bf ff add %g2, -1, %g2
200644c: 90 10 00 18 mov %i0, %o0
2006450: c4 20 61 b0 st %g2, [ %g1 + 0x1b0 ]
2006454: 7f ff ff 6c call 2006204 <_POSIX_Condition_variables_Get>
2006458: 01 00 00 00 nop
switch ( location ) {
200645c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006460: 80 a0 60 00 cmp %g1, 0
2006464: 12 80 00 1a bne 20064cc <_POSIX_Condition_variables_Wait_support+0xb0>
2006468: a2 10 00 08 mov %o0, %l1
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
200646c: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2006470: 80 a0 a0 00 cmp %g2, 0
2006474: 02 80 00 0a be 200649c <_POSIX_Condition_variables_Wait_support+0x80>
2006478: 01 00 00 00 nop
200647c: c2 06 40 00 ld [ %i1 ], %g1
2006480: 80 a0 80 01 cmp %g2, %g1
2006484: 02 80 00 06 be 200649c <_POSIX_Condition_variables_Wait_support+0x80><== ALWAYS TAKEN
2006488: 01 00 00 00 nop
_Thread_Enable_dispatch();
200648c: 40 00 0e 0e call 2009cc4 <_Thread_Enable_dispatch> <== NOT EXECUTED
2006490: b0 10 20 16 mov 0x16, %i0 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2006494: 81 c7 e0 08 ret
2006498: 81 e8 00 00 restore
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
200649c: 40 00 00 ff call 2006898 <pthread_mutex_unlock>
20064a0: 90 10 00 19 mov %i1, %o0
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
20064a4: 80 8e e0 ff btst 0xff, %i3
20064a8: 22 80 00 0b be,a 20064d4 <_POSIX_Condition_variables_Wait_support+0xb8>
20064ac: c2 06 40 00 ld [ %i1 ], %g1
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
20064b0: 40 00 0e 05 call 2009cc4 <_Thread_Enable_dispatch>
20064b4: b0 10 20 74 mov 0x74, %i0
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
20064b8: 40 00 00 d7 call 2006814 <pthread_mutex_lock>
20064bc: 90 10 00 19 mov %i1, %o0
if ( mutex_status )
20064c0: 80 a2 20 00 cmp %o0, 0
20064c4: 02 80 00 1c be 2006534 <_POSIX_Condition_variables_Wait_support+0x118>
20064c8: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20064cc: 81 c7 e0 08 ret
20064d0: 91 e8 20 16 restore %g0, 0x16, %o0
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
20064d4: 21 00 80 5d sethi %hi(0x2017400), %l0
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
20064d8: c2 24 60 14 st %g1, [ %l1 + 0x14 ]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
20064dc: c4 04 22 74 ld [ %l0 + 0x274 ], %g2
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
20064e0: c8 06 00 00 ld [ %i0 ], %g4
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;
20064e4: 86 04 60 18 add %l1, 0x18, %g3
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
20064e8: 82 10 20 01 mov 1, %g1
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
20064ec: 92 10 00 1a mov %i2, %o1
20064f0: 90 10 00 03 mov %g3, %o0
20064f4: 15 00 80 29 sethi %hi(0x200a400), %o2
20064f8: 94 12 a3 14 or %o2, 0x314, %o2 ! 200a714 <_Thread_queue_Timeout>
20064fc: c2 24 60 48 st %g1, [ %l1 + 0x48 ]
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;
_Thread_Executing->Wait.id = *cond;
2006500: c8 20 a0 20 st %g4, [ %g2 + 0x20 ]
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
2006504: c0 20 a0 34 clr [ %g2 + 0x34 ]
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
2006508: 40 00 0f 4d call 200a23c <_Thread_queue_Enqueue_with_handler>
200650c: c6 20 a0 44 st %g3, [ %g2 + 0x44 ]
_Thread_Enable_dispatch();
2006510: 40 00 0d ed call 2009cc4 <_Thread_Enable_dispatch>
2006514: 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;
2006518: c2 04 22 74 ld [ %l0 + 0x274 ], %g1
200651c: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
if ( status && status != ETIMEDOUT )
2006520: 80 a6 20 00 cmp %i0, 0
2006524: 02 bf ff e5 be 20064b8 <_POSIX_Condition_variables_Wait_support+0x9c>
2006528: 80 a6 20 74 cmp %i0, 0x74
200652c: 02 bf ff e3 be 20064b8 <_POSIX_Condition_variables_Wait_support+0x9c><== ALWAYS TAKEN
2006530: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2006534: 81 c7 e0 08 ret
2006538: 81 e8 00 00 restore
0200d134 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
200d134: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
200d138: 03 00 80 61 sethi %hi(0x2018400), %g1
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
200d13c: c6 06 20 08 ld [ %i0 + 8 ], %g3
200d140: a4 10 63 64 or %g1, 0x364, %l2
200d144: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1
200d148: 85 30 e0 18 srl %g3, 0x18, %g2
200d14c: 89 28 60 10 sll %g1, 0x10, %g4
200d150: 84 08 a0 07 and %g2, 7, %g2
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 ];
200d154: 03 00 00 3f sethi %hi(0xfc00), %g1
200d158: 84 00 a0 06 add %g2, 6, %g2
200d15c: 82 10 63 ff or %g1, 0x3ff, %g1
200d160: ab 28 a0 02 sll %g2, 2, %l5
200d164: 86 08 c0 01 and %g3, %g1, %g3
200d168: a8 10 20 00 clr %l4
200d16c: a7 28 e0 02 sll %g3, 2, %l3
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
200d170: 80 a1 20 00 cmp %g4, 0
200d174: 02 80 00 29 be 200d218 <_POSIX_Keys_Run_destructors+0xe4>
200d178: a0 10 20 01 mov 1, %l0
200d17c: a2 10 20 01 mov 1, %l1
the_key = (POSIX_Keys_Control *)
200d180: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
200d184: 83 2c 20 02 sll %l0, 2, %g1
200d188: f0 00 80 01 ld [ %g2 + %g1 ], %i0
_POSIX_Keys_Information.local_table[ index ];
if ( the_key && the_key->is_active && the_key->destructor ) {
200d18c: 80 a6 20 00 cmp %i0, 0
200d190: 02 80 00 16 be 200d1e8 <_POSIX_Keys_Run_destructors+0xb4>
200d194: a0 04 20 01 inc %l0
200d198: c2 0e 20 10 ldub [ %i0 + 0x10 ], %g1
200d19c: 80 a0 60 00 cmp %g1, 0
200d1a0: 22 80 00 13 be,a 200d1ec <_POSIX_Keys_Run_destructors+0xb8><== NEVER TAKEN
200d1a4: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED
200d1a8: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
200d1ac: 80 a0 e0 00 cmp %g3, 0
200d1b0: 22 80 00 0f be,a 200d1ec <_POSIX_Keys_Run_destructors+0xb8><== NEVER TAKEN
200d1b4: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED
value = the_key->Values[ thread_api ][ thread_index ];
200d1b8: c2 06 00 15 ld [ %i0 + %l5 ], %g1
200d1bc: c4 00 40 13 ld [ %g1 + %l3 ], %g2
if ( value ) {
200d1c0: 90 90 a0 00 orcc %g2, 0, %o0
200d1c4: 22 80 00 0a be,a 200d1ec <_POSIX_Keys_Run_destructors+0xb8><== NEVER TAKEN
200d1c8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1 <== NOT EXECUTED
(*the_key->destructor)( value );
200d1cc: 9f c0 c0 00 call %g3
200d1d0: 01 00 00 00 nop
if ( the_key->Values[ thread_api ][ thread_index ] )
200d1d4: c2 06 00 15 ld [ %i0 + %l5 ], %g1
200d1d8: c4 00 40 13 ld [ %g1 + %l3 ], %g2
200d1dc: 80 a0 00 02 cmp %g0, %g2
200d1e0: 82 40 3f ff addx %g0, -1, %g1
200d1e4: a2 0c 40 01 and %l1, %g1, %l1
for ( ; ; ) {
are_all_null = TRUE;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
200d1e8: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1
200d1ec: 89 28 60 10 sll %g1, 0x10, %g4
200d1f0: 83 31 20 10 srl %g4, 0x10, %g1
200d1f4: 80 a0 40 10 cmp %g1, %l0
200d1f8: 3a bf ff e3 bcc,a 200d184 <_POSIX_Keys_Run_destructors+0x50>
200d1fc: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
are_all_null = FALSE;
}
}
}
if ( are_all_null == TRUE )
200d200: 80 8c 60 ff btst 0xff, %l1
200d204: 12 80 00 05 bne 200d218 <_POSIX_Keys_Run_destructors+0xe4>
200d208: a8 05 20 01 inc %l4
* 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 )
200d20c: 80 a5 20 04 cmp %l4, 4
200d210: 12 bf ff d9 bne 200d174 <_POSIX_Keys_Run_destructors+0x40>
200d214: 80 a1 20 00 cmp %g4, 0
200d218: 81 c7 e0 08 ret
200d21c: 81 e8 00 00 restore
0201169c <_POSIX_Message_queue_Create_support>:
const char *name_arg,
int pshared,
struct mq_attr *attr_ptr,
POSIX_Message_queue_Control **message_queue
)
{
201169c: 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 );
20116a0: 92 10 20 ff mov 0xff, %o1
20116a4: 90 10 00 18 mov %i0, %o0
20116a8: 40 00 12 c4 call 20161b8 <strnlen>
20116ac: a8 10 00 18 mov %i0, %l4
if ( n > NAME_MAX )
20116b0: b0 10 20 5b mov 0x5b, %i0
20116b4: 80 a2 20 ff cmp %o0, 0xff
20116b8: 18 80 00 37 bgu 2011794 <_POSIX_Message_queue_Create_support+0xf8><== NEVER TAKEN
20116bc: a4 10 00 08 mov %o0, %l2
20116c0: 05 00 80 8a sethi %hi(0x2022800), %g2
20116c4: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 2022b00 <_Thread_Dispatch_disable_level>
20116c8: 82 00 60 01 inc %g1
20116cc: c2 20 a3 00 st %g1, [ %g2 + 0x300 ]
* 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 ) {
20116d0: 80 a6 a0 00 cmp %i2, 0
20116d4: 22 80 00 32 be,a 201179c <_POSIX_Message_queue_Create_support+0x100>
20116d8: b4 10 20 10 mov 0x10, %i2
attr.mq_maxmsg = 10;
attr.mq_msgsize = 16;
} else {
if ( attr_ptr->mq_maxmsg <= 0 ){
20116dc: e2 06 a0 04 ld [ %i2 + 4 ], %l1
20116e0: 80 a4 60 00 cmp %l1, 0
20116e4: 04 80 00 3d ble 20117d8 <_POSIX_Message_queue_Create_support+0x13c>
20116e8: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
20116ec: f4 06 a0 08 ld [ %i2 + 8 ], %i2
20116f0: 80 a6 a0 00 cmp %i2, 0
20116f4: 04 80 00 39 ble 20117d8 <_POSIX_Message_queue_Create_support+0x13c>
20116f8: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE
POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
{
return (POSIX_Message_queue_Control *)
20116fc: 27 00 80 8b sethi %hi(0x2022c00), %l3
2011700: 7f ff ed 6a call 200cca8 <_Objects_Allocate>
2011704: 90 14 e2 90 or %l3, 0x290, %o0 ! 2022e90 <_POSIX_Message_queue_Information>
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
2011708: a0 92 20 00 orcc %o0, 0, %l0
201170c: 02 80 00 3b be 20117f8 <_POSIX_Message_queue_Create_support+0x15c><== NEVER TAKEN
2011710: 84 10 20 01 mov 1, %g2
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
2011714: 82 10 20 01 mov 1, %g1
if ( !the_mq ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
2011718: f2 24 20 10 st %i1, [ %l0 + 0x10 ]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
201171c: 90 10 00 12 mov %l2, %o0
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
the_mq->open_count = 1;
the_mq->linked = TRUE;
2011720: c4 2c 20 15 stb %g2, [ %l0 + 0x15 ]
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq->process_shared = pshared;
the_mq->named = TRUE;
the_mq->open_count = 1;
2011724: c4 24 20 18 st %g2, [ %l0 + 0x18 ]
/*
* Make a copy of the user's string for name just in case it was
* dynamically constructed.
*/
name = _Workspace_Allocate(n);
2011728: 7f ff f7 22 call 200f3b0 <_Workspace_Allocate>
201172c: c2 2c 20 14 stb %g1, [ %l0 + 0x14 ]
if (!name) {
2011730: b2 92 20 00 orcc %o0, 0, %i1
2011734: 22 80 00 39 be,a 2011818 <_POSIX_Message_queue_Create_support+0x17c><== NEVER TAKEN
2011738: 90 14 e2 90 or %l3, 0x290, %o0 <== NOT EXECUTED
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOMEM );
}
strcpy( name, name_arg );
201173c: 40 00 10 34 call 201580c <strcpy>
2011740: 92 10 00 14 mov %l4, %o1
*/
the_mq_attr = &the_mq->Message_queue.Attributes;
the_mq_attr->discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
2011744: 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;
2011748: c0 24 20 5c clr [ %l0 + 0x5c ]
if ( ! _CORE_message_queue_Initialize(
201174c: 96 10 00 1a mov %i2, %o3
2011750: 90 04 20 1c add %l0, 0x1c, %o0
2011754: 40 00 03 80 call 2012554 <_CORE_message_queue_Initialize>
2011758: 92 04 20 5c add %l0, 0x5c, %o1
201175c: 80 8a 20 ff btst 0xff, %o0
2011760: 02 80 00 11 be 20117a4 <_POSIX_Message_queue_Create_support+0x108><== NEVER TAKEN
2011764: 82 14 e2 90 or %l3, 0x290, %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2011768: c4 04 20 08 ld [ %l0 + 8 ], %g2
201176c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2011770: 03 00 00 3f sethi %hi(0xfc00), %g1
2011774: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2011778: 84 08 80 01 and %g2, %g1, %g2
201177c: 85 28 a0 02 sll %g2, 2, %g2
2011780: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
2011784: f2 24 20 0c st %i1, [ %l0 + 0xc ]
&_POSIX_Message_queue_Information,
&the_mq->Object,
name
);
*message_queue = the_mq;
2011788: e0 26 c0 00 st %l0, [ %i3 ]
_Thread_Enable_dispatch();
201178c: 7f ff f1 30 call 200dc4c <_Thread_Enable_dispatch>
2011790: b0 10 20 00 clr %i0
return 0;
}
2011794: 81 c7 e0 08 ret
2011798: 81 e8 00 00 restore
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 );
201179c: 10 bf ff d8 b 20116fc <_POSIX_Message_queue_Create_support+0x60>
20117a0: a2 10 20 0a mov 0xa, %l1
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
20117a4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
20117a8: 7f ff ee 3b call 200d094 <_Objects_Free> <== NOT EXECUTED
20117ac: 90 14 e2 90 or %l3, 0x290, %o0 <== NOT EXECUTED
attr.mq_maxmsg,
attr.mq_msgsize
) ) {
_POSIX_Message_queue_Free( the_mq );
_Workspace_Free(name);
20117b0: 7f ff f6 f9 call 200f394 <_Workspace_Free> <== NOT EXECUTED
20117b4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20117b8: 7f ff f1 25 call 200dc4c <_Thread_Enable_dispatch> <== NOT EXECUTED
20117bc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
20117c0: 40 00 0a df call 201433c <__errno> <== NOT EXECUTED
20117c4: 01 00 00 00 nop <== NOT EXECUTED
20117c8: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c> <== NOT EXECUTED
20117cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20117d0: 81 c7 e0 08 ret <== NOT EXECUTED
20117d4: 81 e8 00 00 restore <== NOT EXECUTED
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( attr_ptr->mq_msgsize <= 0 ){
_Thread_Enable_dispatch();
20117d8: 7f ff f1 1d call 200dc4c <_Thread_Enable_dispatch>
20117dc: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EINVAL );
20117e0: 40 00 0a d7 call 201433c <__errno>
20117e4: 01 00 00 00 nop
20117e8: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
20117ec: c2 22 00 00 st %g1, [ %o0 ]
20117f0: 81 c7 e0 08 ret
20117f4: 81 e8 00 00 restore
attr = *attr_ptr;
}
the_mq = _POSIX_Message_queue_Allocate();
if ( !the_mq ) {
_Thread_Enable_dispatch();
20117f8: 7f ff f1 15 call 200dc4c <_Thread_Enable_dispatch> <== NOT EXECUTED
20117fc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENFILE );
2011800: 40 00 0a cf call 201433c <__errno> <== NOT EXECUTED
2011804: 01 00 00 00 nop <== NOT EXECUTED
2011808: 82 10 20 17 mov 0x17, %g1 ! 17 <PROM_START+0x17> <== NOT EXECUTED
201180c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011810: 81 c7 e0 08 ret <== NOT EXECUTED
2011814: 81 e8 00 00 restore <== NOT EXECUTED
2011818: 7f ff ee 1f call 200d094 <_Objects_Free> <== NOT EXECUTED
201181c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
*/
name = _Workspace_Allocate(n);
if (!name) {
_POSIX_Message_queue_Free( the_mq );
_Thread_Enable_dispatch();
2011820: 7f ff f1 0b call 200dc4c <_Thread_Enable_dispatch> <== NOT EXECUTED
2011824: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
2011828: 40 00 0a c5 call 201433c <__errno> <== NOT EXECUTED
201182c: 01 00 00 00 nop <== NOT EXECUTED
2011830: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
2011834: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2011838: 81 c7 e0 08 ret <== NOT EXECUTED
201183c: 81 e8 00 00 restore <== NOT EXECUTED
02009748 <_POSIX_Message_queue_Delete>:
*/
void _POSIX_Message_queue_Delete(
POSIX_Message_queue_Control *the_mq
)
{
2009748: 9d e3 bf 98 save %sp, -104, %sp
if ( !the_mq->linked && !the_mq->open_count ) {
200974c: c2 0e 20 15 ldub [ %i0 + 0x15 ], %g1
2009750: 80 a0 60 00 cmp %g1, 0
2009754: 12 80 00 16 bne 20097ac <_POSIX_Message_queue_Delete+0x64>
2009758: b2 10 00 18 mov %i0, %i1
200975c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2009760: 80 a0 60 00 cmp %g1, 0
2009764: 12 80 00 12 bne 20097ac <_POSIX_Message_queue_Delete+0x64>
2009768: 01 00 00 00 nop
/* the name memory may have been freed by unlink. */
Objects_Control *the_object = &the_mq->Object;
if ( the_object->name.name_p )
200976c: d0 06 20 0c ld [ %i0 + 0xc ], %o0
2009770: 80 a2 20 00 cmp %o0, 0
2009774: 02 80 00 04 be 2009784 <_POSIX_Message_queue_Delete+0x3c> <== ALWAYS TAKEN
2009778: 31 00 80 8b sethi %hi(0x2022c00), %i0
_Workspace_Free( (void *)the_object->name.name_p );
200977c: 40 00 17 06 call 200f394 <_Workspace_Free> <== NOT EXECUTED
2009780: 01 00 00 00 nop <== NOT EXECUTED
_Objects_Close( &_POSIX_Message_queue_Information, the_object );
2009784: 92 10 00 19 mov %i1, %o1
2009788: 40 00 0d 74 call 200cd58 <_Objects_Close>
200978c: 90 16 22 90 or %i0, 0x290, %o0
_CORE_message_queue_Close(
2009790: 90 06 60 1c add %i1, 0x1c, %o0
2009794: 92 10 20 00 clr %o1
2009798: 94 10 20 05 mov 5, %o2
200979c: 40 00 0a 5c call 200c10c <_CORE_message_queue_Close>
20097a0: b0 16 22 90 or %i0, 0x290, %i0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
20097a4: 40 00 0e 3c call 200d094 <_Objects_Free>
20097a8: 81 e8 00 00 restore
20097ac: 81 c7 e0 08 ret
20097b0: 81 e8 00 00 restore
02009b54 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
2009b54: 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 *)
2009b58: 11 00 80 8c sethi %hi(0x2023000), %o0
2009b5c: 94 07 bf f4 add %fp, -12, %o2
2009b60: 90 12 20 0c or %o0, 0xc, %o0
2009b64: 40 00 0d b9 call 200d248 <_Objects_Get>
2009b68: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
2009b6c: c2 07 bf f4 ld [ %fp + -12 ], %g1
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
2009b70: 94 10 00 19 mov %i1, %o2
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
2009b74: 80 a0 60 00 cmp %g1, 0
2009b78: 02 80 00 08 be 2009b98 <_POSIX_Message_queue_Receive_support+0x44>
2009b7c: 9a 10 00 1d mov %i5, %o5
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
2009b80: 40 00 29 ef call 201433c <__errno>
2009b84: b0 10 3f ff mov -1, %i0
2009b88: 82 10 20 09 mov 9, %g1
2009b8c: c2 22 00 00 st %g1, [ %o0 ]
}
2009b90: 81 c7 e0 08 ret
2009b94: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
2009b98: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2009b9c: 82 08 a0 03 and %g2, 3, %g1
2009ba0: 80 a0 60 01 cmp %g1, 1
2009ba4: 02 80 00 32 be 2009c6c <_POSIX_Message_queue_Receive_support+0x118>
2009ba8: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
2009bac: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
2009bb0: c2 02 20 68 ld [ %o0 + 0x68 ], %g1
2009bb4: 80 a0 40 1a cmp %g1, %i2
2009bb8: 18 80 00 1c bgu 2009c28 <_POSIX_Message_queue_Receive_support+0xd4>
2009bbc: 80 8f 20 ff btst 0xff, %i4
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
2009bc0: 12 80 00 16 bne 2009c18 <_POSIX_Message_queue_Receive_support+0xc4><== ALWAYS TAKEN
2009bc4: 98 10 20 00 clr %o4
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
2009bc8: 82 10 3f ff mov -1, %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
2009bcc: 90 02 20 1c add %o0, 0x1c, %o0
2009bd0: 92 10 00 18 mov %i0, %o1
2009bd4: 96 07 bf f0 add %fp, -16, %o3
2009bd8: 40 00 09 72 call 200c1a0 <_CORE_message_queue_Seize>
2009bdc: c2 27 bf f0 st %g1, [ %fp + -16 ]
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
2009be0: 40 00 10 1b call 200dc4c <_Thread_Enable_dispatch>
2009be4: 3b 00 80 8a sethi %hi(0x2022800), %i5
*msg_prio =
2009be8: c4 07 63 c4 ld [ %i5 + 0x3c4 ], %g2 ! 2022bc4 <_Thread_Executing>
2009bec: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
2009bf0: c8 00 a0 34 ld [ %g2 + 0x34 ], %g4
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
2009bf4: 87 38 60 1f sra %g1, 0x1f, %g3
2009bf8: 82 18 c0 01 xor %g3, %g1, %g1
2009bfc: 82 20 40 03 sub %g1, %g3, %g1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
2009c00: 80 a1 20 00 cmp %g4, 0
2009c04: 12 80 00 11 bne 2009c48 <_POSIX_Message_queue_Receive_support+0xf4>
2009c08: c2 26 c0 00 st %g1, [ %i3 ]
return length_out;
2009c0c: f0 07 bf f0 ld [ %fp + -16 ], %i0
2009c10: 81 c7 e0 08 ret
2009c14: 81 e8 00 00 restore
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
2009c18: 83 30 a0 0e srl %g2, 0xe, %g1
2009c1c: 82 18 60 01 xor %g1, 1, %g1
2009c20: 10 bf ff ea b 2009bc8 <_POSIX_Message_queue_Receive_support+0x74>
2009c24: 98 08 60 01 and %g1, 1, %o4
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
2009c28: 40 00 10 09 call 200dc4c <_Thread_Enable_dispatch>
2009c2c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EMSGSIZE );
2009c30: 40 00 29 c3 call 201433c <__errno>
2009c34: 01 00 00 00 nop
2009c38: 82 10 20 7a mov 0x7a, %g1 ! 7a <PROM_START+0x7a>
2009c3c: c2 22 00 00 st %g1, [ %o0 ]
2009c40: 81 c7 e0 08 ret
2009c44: 81 e8 00 00 restore
_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(
2009c48: 40 00 29 bd call 201433c <__errno>
2009c4c: b0 10 3f ff mov -1, %i0
2009c50: c2 07 63 c4 ld [ %i5 + 0x3c4 ], %g1
2009c54: a0 10 00 08 mov %o0, %l0
2009c58: 40 00 00 b2 call 2009f20 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
2009c5c: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
2009c60: d0 24 00 00 st %o0, [ %l0 ]
2009c64: 81 c7 e0 08 ret
2009c68: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
2009c6c: 40 00 0f f8 call 200dc4c <_Thread_Enable_dispatch>
2009c70: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EBADF );
2009c74: 40 00 29 b2 call 201433c <__errno>
2009c78: 01 00 00 00 nop
2009c7c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
2009c80: c2 22 00 00 st %g1, [ %o0 ]
2009c84: 81 c7 e0 08 ret
2009c88: 81 e8 00 00 restore
02009ca4 <_POSIX_Message_queue_Send_support>:
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
2009ca4: 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 )
2009ca8: 80 a6 e0 20 cmp %i3, 0x20
2009cac: 18 80 00 47 bgu 2009dc8 <_POSIX_Message_queue_Send_support+0x124>
2009cb0: 11 00 80 8c sethi %hi(0x2023000), %o0
2009cb4: 92 10 00 18 mov %i0, %o1
2009cb8: 90 12 20 0c or %o0, 0xc, %o0
2009cbc: 40 00 0d 63 call 200d248 <_Objects_Get>
2009cc0: 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 ) {
2009cc4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2009cc8: 80 a0 60 00 cmp %g1, 0
2009ccc: 12 80 00 31 bne 2009d90 <_POSIX_Message_queue_Send_support+0xec>
2009cd0: 01 00 00 00 nop
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
2009cd4: c4 02 20 14 ld [ %o0 + 0x14 ], %g2
2009cd8: 80 88 a0 03 btst 3, %g2
2009cdc: 02 80 00 41 be 2009de0 <_POSIX_Message_queue_Send_support+0x13c>
2009ce0: 80 8f 20 ff btst 0xff, %i4
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
2009ce4: d0 02 20 10 ld [ %o0 + 0x10 ], %o0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
2009ce8: 12 80 00 15 bne 2009d3c <_POSIX_Message_queue_Send_support+0x98><== ALWAYS TAKEN
2009cec: 82 10 20 00 clr %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
2009cf0: c2 23 a0 5c st %g1, [ %sp + 0x5c ] <== NOT EXECUTED
2009cf4: fa 23 a0 60 st %i5, [ %sp + 0x60 ] <== NOT EXECUTED
2009cf8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2009cfc: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
2009d00: 96 10 00 18 mov %i0, %o3 <== NOT EXECUTED
2009d04: 9a 20 00 1b neg %i3, %o5 <== NOT EXECUTED
2009d08: 98 10 20 00 clr %o4 <== NOT EXECUTED
2009d0c: 40 00 09 65 call 200c2a0 <_CORE_message_queue_Submit> <== NOT EXECUTED
2009d10: 90 02 20 1c add %o0, 0x1c, %o0 <== NOT EXECUTED
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
2009d14: 40 00 0f ce call 200dc4c <_Thread_Enable_dispatch> <== NOT EXECUTED
2009d18: ba 10 00 08 mov %o0, %i5 <== NOT EXECUTED
* 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 )
2009d1c: 80 a7 60 07 cmp %i5, 7 <== NOT EXECUTED
2009d20: 02 80 00 19 be 2009d84 <_POSIX_Message_queue_Send_support+0xe0><== NOT EXECUTED
2009d24: 03 00 80 8a sethi %hi(0x2022800), %g1 <== NOT EXECUTED
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
2009d28: 80 a7 60 00 cmp %i5, 0
2009d2c: 12 80 00 1f bne 2009da8 <_POSIX_Message_queue_Send_support+0x104>
2009d30: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
2009d34: 81 c7 e0 08 ret
2009d38: 81 e8 00 00 restore
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
2009d3c: 83 30 a0 0e srl %g2, 0xe, %g1
2009d40: 82 18 60 01 xor %g1, 1, %g1
2009d44: 82 08 60 01 and %g1, 1, %g1
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
2009d48: fa 23 a0 60 st %i5, [ %sp + 0x60 ]
2009d4c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2009d50: 92 10 00 19 mov %i1, %o1
2009d54: 94 10 00 1a mov %i2, %o2
2009d58: 96 10 00 18 mov %i0, %o3
2009d5c: 9a 20 00 1b neg %i3, %o5
2009d60: 98 10 20 00 clr %o4
2009d64: 40 00 09 4f call 200c2a0 <_CORE_message_queue_Submit>
2009d68: 90 02 20 1c add %o0, 0x1c, %o0
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
2009d6c: 40 00 0f b8 call 200dc4c <_Thread_Enable_dispatch>
2009d70: ba 10 00 08 mov %o0, %i5
* 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 )
2009d74: 80 a7 60 07 cmp %i5, 7
2009d78: 12 bf ff ed bne 2009d2c <_POSIX_Message_queue_Send_support+0x88>
2009d7c: 80 a7 60 00 cmp %i5, 0
msg_status = _Thread_Executing->Wait.return_code;
2009d80: 03 00 80 8a sethi %hi(0x2022800), %g1
2009d84: c4 00 63 c4 ld [ %g1 + 0x3c4 ], %g2 ! 2022bc4 <_Thread_Executing>
2009d88: 10 bf ff e8 b 2009d28 <_POSIX_Message_queue_Send_support+0x84>
2009d8c: fa 00 a0 34 ld [ %g2 + 0x34 ], %i5
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
2009d90: 40 00 29 6b call 201433c <__errno>
2009d94: b0 10 3f ff mov -1, %i0
2009d98: 82 10 20 09 mov 9, %g1
2009d9c: c2 22 00 00 st %g1, [ %o0 ]
}
2009da0: 81 c7 e0 08 ret
2009da4: 81 e8 00 00 restore
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
2009da8: 40 00 29 65 call 201433c <__errno>
2009dac: b0 10 3f ff mov -1, %i0
2009db0: a0 10 00 08 mov %o0, %l0
2009db4: 40 00 00 5b call 2009f20 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
2009db8: 90 10 00 1d mov %i5, %o0
2009dbc: d0 24 00 00 st %o0, [ %l0 ]
2009dc0: 81 c7 e0 08 ret
2009dc4: 81 e8 00 00 restore
* 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 );
2009dc8: 40 00 29 5d call 201433c <__errno>
2009dcc: b0 10 3f ff mov -1, %i0
2009dd0: 82 10 20 16 mov 0x16, %g1
2009dd4: c2 22 00 00 st %g1, [ %o0 ]
2009dd8: 81 c7 e0 08 ret
2009ddc: 81 e8 00 00 restore
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
2009de0: 40 00 0f 9b call 200dc4c <_Thread_Enable_dispatch>
2009de4: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EBADF );
2009de8: 40 00 29 55 call 201433c <__errno>
2009dec: 01 00 00 00 nop
2009df0: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
2009df4: c2 22 00 00 st %g1, [ %o0 ]
2009df8: 81 c7 e0 08 ret
2009dfc: 81 e8 00 00 restore
02007320 <_POSIX_Mutex_Get>:
POSIX_Mutex_Control *_POSIX_Mutex_Get (
pthread_mutex_t *mutex,
Objects_Locations *location
)
{
2007320: 9d e3 bf 98 save %sp, -104, %sp
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
2007324: 80 a6 20 00 cmp %i0, 0
2007328: 02 80 00 12 be 2007370 <_POSIX_Mutex_Get+0x50>
200732c: b4 10 00 19 mov %i1, %i2
2007330: f2 06 00 00 ld [ %i0 ], %i1
2007334: 80 a6 7f ff cmp %i1, -1
2007338: 02 80 00 05 be 200734c <_POSIX_Mutex_Get+0x2c> <== NEVER TAKEN
200733c: 90 10 00 18 mov %i0, %o0
return (POSIX_Mutex_Control *)
2007340: 31 00 80 66 sethi %hi(0x2019800), %i0
2007344: 40 00 0c 3b call 200a430 <_Objects_Get>
2007348: 91 ee 21 d0 restore %i0, 0x1d0, %o0
Objects_Locations *location
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
200734c: 40 00 00 20 call 20073cc <pthread_mutex_init> <== NOT EXECUTED
2007350: 92 10 20 00 clr %o1 <== NOT EXECUTED
2007354: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2007358: 12 80 00 07 bne 2007374 <_POSIX_Mutex_Get+0x54> <== NOT EXECUTED
200735c: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2007360: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
return (POSIX_Mutex_Control *)
2007364: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED
2007368: 40 00 0c 32 call 200a430 <_Objects_Get> <== NOT EXECUTED
200736c: 91 ee 21 d0 restore %i0, 0x1d0, %o0 <== NOT EXECUTED
Objects_Locations *location
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
2007370: 82 10 20 01 mov 1, %g1
2007374: c2 26 80 00 st %g1, [ %i2 ]
return (POSIX_Mutex_Control *)
_Objects_Get( &_POSIX_Mutex_Information, *id, location );
}
2007378: 81 c7 e0 08 ret
200737c: 91 e8 20 00 restore %g0, 0, %o0
020072b8 <_POSIX_Mutex_Get_interrupt_disable>:
POSIX_Mutex_Control *_POSIX_Mutex_Get_interrupt_disable (
pthread_mutex_t *mutex,
Objects_Locations *location,
ISR_Level *level
)
{
20072b8: 9d e3 bf 98 save %sp, -104, %sp
20072bc: a0 10 00 19 mov %i1, %l0
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
20072c0: 80 a6 20 00 cmp %i0, 0
20072c4: 02 80 00 13 be 2007310 <_POSIX_Mutex_Get_interrupt_disable+0x58><== NEVER TAKEN
20072c8: b6 10 00 1a mov %i2, %i3
20072cc: f2 06 00 00 ld [ %i0 ], %i1
20072d0: 80 a6 7f ff cmp %i1, -1
20072d4: 02 80 00 05 be 20072e8 <_POSIX_Mutex_Get_interrupt_disable+0x30><== NEVER TAKEN
20072d8: b4 10 00 10 mov %l0, %i2
return (POSIX_Mutex_Control *)
20072dc: 31 00 80 66 sethi %hi(0x2019800), %i0
20072e0: 40 00 0c 36 call 200a3b8 <_Objects_Get_isr_disable>
20072e4: 91 ee 21 d0 restore %i0, 0x1d0, %o0
ISR_Level *level
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
20072e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20072ec: 40 00 00 38 call 20073cc <pthread_mutex_init> <== NOT EXECUTED
20072f0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20072f4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20072f8: 12 80 00 06 bne 2007310 <_POSIX_Mutex_Get_interrupt_disable+0x58><== NOT EXECUTED
20072fc: b4 10 00 10 mov %l0, %i2 <== NOT EXECUTED
2007300: f2 06 00 00 ld [ %i0 ], %i1 <== NOT EXECUTED
return (POSIX_Mutex_Control *)
2007304: 31 00 80 66 sethi %hi(0x2019800), %i0 <== NOT EXECUTED
2007308: 40 00 0c 2c call 200a3b8 <_Objects_Get_isr_disable> <== NOT EXECUTED
200730c: 91 ee 21 d0 restore %i0, 0x1d0, %o0 <== NOT EXECUTED
ISR_Level *level
)
{
Objects_Id *id = (Objects_Id *)mutex;
___POSIX_Mutex_Get_support( id, location );
2007310: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2007314: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED
return (POSIX_Mutex_Control *)
_Objects_Get_isr_disable( &_POSIX_Mutex_Information, *id, location, level );
}
2007318: 81 c7 e0 08 ret <== NOT EXECUTED
200731c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200f0d0 <_POSIX_Semaphore_Create_support>:
const char *name,
int pshared,
unsigned int value,
POSIX_Semaphore_Control **the_sem
)
{
200f0d0: 9d e3 bf 98 save %sp, -104, %sp
200f0d4: 03 00 80 7a sethi %hi(0x201e800), %g1
200f0d8: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201eaa0 <_Thread_Dispatch_disable_level>
200f0dc: 84 00 a0 01 inc %g2
200f0e0: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ]
char *name_p = (char *)name;
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
200f0e4: 80 a6 60 00 cmp %i1, 0
200f0e8: 12 80 00 2e bne 200f1a0 <_POSIX_Semaphore_Create_support+0xd0>
200f0ec: 80 a6 20 00 cmp %i0, 0
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENOSYS );
}
if ( name ) {
200f0f0: 02 80 00 07 be 200f10c <_POSIX_Semaphore_Create_support+0x3c>
200f0f4: 21 00 80 7b sethi %hi(0x201ec00), %l0
if( strlen(name) > PATH_MAX ) {
200f0f8: 40 00 0f ec call 20130a8 <strlen>
200f0fc: 90 10 00 18 mov %i0, %o0
200f100: 80 a2 20 ff cmp %o0, 0xff
200f104: 18 80 00 2f bgu 200f1c0 <_POSIX_Semaphore_Create_support+0xf0><== NEVER TAKEN
200f108: 21 00 80 7b sethi %hi(0x201ec00), %l0
* _POSIX_Semaphore_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
{
return (POSIX_Semaphore_Control *)
200f10c: 7f ff eb 88 call 2009f2c <_Objects_Allocate>
200f110: 90 14 21 b0 or %l0, 0x1b0, %o0 ! 201edb0 <_POSIX_Semaphore_Information>
}
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
200f114: b2 92 20 00 orcc %o0, 0, %i1
200f118: 02 80 00 32 be 200f1e0 <_POSIX_Semaphore_Create_support+0x110>
200f11c: 80 a6 20 00 cmp %i0, 0
rtems_set_errno_and_return_minus_one( ENOSPC );
}
the_semaphore->process_shared = pshared;
if ( name ) {
200f120: 02 80 00 1c be 200f190 <_POSIX_Semaphore_Create_support+0xc0>
200f124: c0 26 60 10 clr [ %i1 + 0x10 ]
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
200f128: 84 10 20 01 mov 1, %g2
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
200f12c: 82 10 20 01 mov 1, %g1
the_semaphore->open_count = 1;
the_semaphore->linked = TRUE;
200f130: c4 2e 60 15 stb %g2, [ %i1 + 0x15 ]
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
the_semaphore->open_count = 1;
200f134: c4 26 60 18 st %g2, [ %i1 + 0x18 ]
}
the_semaphore->process_shared = pshared;
if ( name ) {
the_semaphore->named = TRUE;
200f138: c2 2e 60 14 stb %g1, [ %i1 + 0x14 ]
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200f13c: 82 10 3f ff mov -1, %g1
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200f140: 94 10 00 1a mov %i2, %o2
200f144: 90 06 60 1c add %i1, 0x1c, %o0
200f148: 92 06 60 5c add %i1, 0x5c, %o1
/*
* This effectively disables limit checking.
*/
the_sem_attr->maximum_count = 0xFFFFFFFF;
200f14c: c2 26 60 5c st %g1, [ %i1 + 0x5c ]
_CORE_semaphore_Initialize( &the_semaphore->Semaphore, the_sem_attr, value );
200f150: 7f ff ea 48 call 2009a70 <_CORE_semaphore_Initialize>
200f154: c0 26 60 60 clr [ %i1 + 0x60 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f158: 82 14 21 b0 or %l0, 0x1b0, %g1
200f15c: c4 06 60 08 ld [ %i1 + 8 ], %g2
200f160: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
200f164: 03 00 00 3f sethi %hi(0xfc00), %g1
200f168: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f16c: 84 08 80 01 and %g2, %g1, %g2
200f170: 85 28 a0 02 sll %g2, 2, %g2
200f174: f2 20 c0 02 st %i1, [ %g3 + %g2 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string */
the_object->name.name_p = name;
200f178: f0 26 60 0c st %i0, [ %i1 + 0xc ]
&_POSIX_Semaphore_Information,
&the_semaphore->Object,
name_p
);
*the_sem = the_semaphore;
200f17c: f2 26 c0 00 st %i1, [ %i3 ]
_Thread_Enable_dispatch();
200f180: 7f ff ef 28 call 200ae20 <_Thread_Enable_dispatch>
200f184: b0 10 20 00 clr %i0
return 0;
}
200f188: 81 c7 e0 08 ret
200f18c: 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;
200f190: c0 2e 60 14 clrb [ %i1 + 0x14 ]
the_semaphore->open_count = 0;
200f194: c0 26 60 18 clr [ %i1 + 0x18 ]
the_semaphore->linked = FALSE;
200f198: 10 bf ff e9 b 200f13c <_POSIX_Semaphore_Create_support+0x6c>
200f19c: c0 2e 60 15 clrb [ %i1 + 0x15 ]
_Thread_Disable_dispatch();
/* Sharing semaphores among processes is not currently supported */
if (pshared != 0) {
_Thread_Enable_dispatch();
200f1a0: 7f ff ef 20 call 200ae20 <_Thread_Enable_dispatch>
200f1a4: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( ENOSYS );
200f1a8: 40 00 08 f6 call 2011580 <__errno>
200f1ac: 01 00 00 00 nop
200f1b0: 82 10 20 58 mov 0x58, %g1 ! 58 <PROM_START+0x58>
200f1b4: c2 22 00 00 st %g1, [ %o0 ]
200f1b8: 81 c7 e0 08 ret
200f1bc: 81 e8 00 00 restore
}
if ( name ) {
if( strlen(name) > PATH_MAX ) {
_Thread_Enable_dispatch();
200f1c0: 7f ff ef 18 call 200ae20 <_Thread_Enable_dispatch> <== NOT EXECUTED
200f1c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
200f1c8: 40 00 08 ee call 2011580 <__errno> <== NOT EXECUTED
200f1cc: 01 00 00 00 nop <== NOT EXECUTED
200f1d0: 82 10 20 5b mov 0x5b, %g1 ! 5b <PROM_START+0x5b> <== NOT EXECUTED
200f1d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200f1d8: 81 c7 e0 08 ret <== NOT EXECUTED
200f1dc: 81 e8 00 00 restore <== NOT EXECUTED
}
the_semaphore = _POSIX_Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
200f1e0: 7f ff ef 10 call 200ae20 <_Thread_Enable_dispatch>
200f1e4: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( ENOSPC );
200f1e8: 40 00 08 e6 call 2011580 <__errno>
200f1ec: 01 00 00 00 nop
200f1f0: 82 10 20 1c mov 0x1c, %g1 ! 1c <PROM_START+0x1c>
200f1f4: c2 22 00 00 st %g1, [ %o0 ]
200f1f8: 81 c7 e0 08 ret
200f1fc: 81 e8 00 00 restore
0200b844 <_POSIX_Threads_Create_extension>:
bool _POSIX_Threads_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
200b844: 9d e3 bf 98 save %sp, -104, %sp
POSIX_API_Control *api;
POSIX_API_Control *executing_api;
api = _Workspace_Allocate( sizeof( POSIX_API_Control ) );
200b848: 90 10 20 e4 mov 0xe4, %o0
200b84c: 7f ff f6 7a call 2009234 <_Workspace_Allocate>
200b850: b0 10 20 00 clr %i0
if ( !api )
200b854: a2 92 20 00 orcc %o0, 0, %l1
200b858: 02 80 00 37 be 200b934 <_POSIX_Threads_Create_extension+0xf0><== NEVER TAKEN
200b85c: 21 00 80 5a sethi %hi(0x2016800), %l0
return false;
created->API_Extensions[ THREAD_API_POSIX ] = api;
200b860: e2 26 61 6c st %l1, [ %i1 + 0x16c ]
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
200b864: 94 10 20 38 mov 0x38, %o2
200b868: a0 14 23 78 or %l0, 0x378, %l0
200b86c: 40 00 0a 9b call 200e2d8 <memcpy>
200b870: 92 10 00 10 mov %l0, %o1
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
200b874: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
200b878: c4 04 20 1c ld [ %l0 + 0x1c ], %g2
200b87c: c6 04 20 20 ld [ %l0 + 0x20 ], %g3
200b880: c8 04 20 24 ld [ %l0 + 0x24 ], %g4
200b884: d8 04 20 2c ld [ %l0 + 0x2c ], %o4
200b888: da 04 20 28 ld [ %l0 + 0x28 ], %o5
200b88c: c2 24 60 80 st %g1, [ %l1 + 0x80 ]
200b890: c4 24 60 84 st %g2, [ %l1 + 0x84 ]
200b894: c6 24 60 88 st %g3, [ %l1 + 0x88 ]
200b898: c8 24 60 8c st %g4, [ %l1 + 0x8c ]
200b89c: da 24 60 90 st %o5, [ %l1 + 0x90 ]
200b8a0: d8 24 60 94 st %o4, [ %l1 + 0x94 ]
api->schedparam.sched_priority =
200b8a4: c6 06 60 14 ld [ %i1 + 0x14 ], %g3
created->API_Extensions[ THREAD_API_POSIX ] = api;
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
200b8a8: 84 10 20 01 mov 1, %g2
* If the thread is not a posix thread, then all posix signals are blocked
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
200b8ac: c0 24 60 c8 clr [ %l1 + 0xc8 ]
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
200b8b0: c8 06 60 08 ld [ %i1 + 8 ], %g4
created->API_Extensions[ THREAD_API_POSIX ] = api;
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
200b8b4: c4 24 60 7c st %g2, [ %l1 + 0x7c ]
created->API_Extensions[ THREAD_API_POSIX ] = api;
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
200b8b8: c4 24 60 38 st %g2, [ %l1 + 0x38 ]
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
api->schedparam.sched_priority =
200b8bc: 82 10 20 ff mov 0xff, %g1
200b8c0: 84 04 60 dc add %l1, 0xdc, %g2
200b8c4: 82 20 40 03 sub %g1, %g3, %g1
_POSIX_Priority_From_core( created->current_priority );
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
200b8c8: c0 24 60 d4 clr [ %l1 + 0xd4 ]
/* XXX check all fields are touched */
api->Attributes = _POSIX_Threads_Default_attributes;
api->detachstate = _POSIX_Threads_Default_attributes.detachstate;
api->schedpolicy = _POSIX_Threads_Default_attributes.schedpolicy;
api->schedparam = _POSIX_Threads_Default_attributes.schedparam;
api->schedparam.sched_priority =
200b8cc: c2 24 60 80 st %g1, [ %l1 + 0x80 ]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200b8d0: 86 04 60 d8 add %l1, 0xd8, %g3
/*
* POSIX 1003.1 1996, 18.2.2.2
*/
api->cancelation_requested = 0;
api->cancelability_state = PTHREAD_CANCEL_ENABLE;
200b8d4: c0 24 60 cc clr [ %l1 + 0xcc ]
api->cancelability_type = PTHREAD_CANCEL_DEFERRED;
200b8d8: c0 24 60 d0 clr [ %l1 + 0xd0 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
200b8dc: c0 24 60 dc clr [ %l1 + 0xdc ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
200b8e0: c4 24 60 d8 st %g2, [ %l1 + 0xd8 ]
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
200b8e4: 83 31 20 18 srl %g4, 0x18, %g1
200b8e8: 82 08 60 07 and %g1, 7, %g1
200b8ec: 80 a0 60 03 cmp %g1, 3
200b8f0: 02 80 00 13 be 200b93c <_POSIX_Threads_Create_extension+0xf8>
200b8f4: c6 24 60 e0 st %g3, [ %l1 + 0xe0 ]
_Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
} else {
api->signals_blocked = 0xffffffff;
200b8f8: 82 10 3f ff mov -1, %g1
200b8fc: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ]
}
_Thread_queue_Initialize(
200b900: 90 04 60 3c add %l1, 0x3c, %o0
200b904: 92 10 20 00 clr %o1
200b908: 15 00 00 04 sethi %hi(0x1000), %o2
200b90c: 7f ff f2 f6 call 20084e4 <_Thread_queue_Initialize>
200b910: 96 10 20 00 clr %o3
THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_JOIN_AT_EXIT,
0
);
_Watchdog_Initialize(
200b914: c2 06 60 08 ld [ %i1 + 8 ], %g1
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b918: f2 24 60 c0 st %i1, [ %l1 + 0xc0 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200b91c: c2 24 60 bc st %g1, [ %l1 + 0xbc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200b920: c0 24 60 a4 clr [ %l1 + 0xa4 ]
the_watchdog->routine = routine;
200b924: 03 00 80 2e sethi %hi(0x200b800), %g1
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200b928: b0 10 20 01 mov 1, %i0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200b92c: 82 10 61 b4 or %g1, 0x1b4, %g1
200b930: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ]
created->Object.id,
created
);
return true;
}
200b934: 81 c7 e0 08 ret
200b938: 81 e8 00 00 restore
* by default.
*/
/* XXX use signal constants */
api->signals_pending = 0;
if ( _Objects_Get_API( created->Object.id ) == OBJECTS_POSIX_API &&
200b93c: 83 31 20 1b srl %g4, 0x1b, %g1
200b940: 80 a0 60 01 cmp %g1, 1
200b944: 12 bf ff ee bne 200b8fc <_POSIX_Threads_Create_extension+0xb8><== NEVER TAKEN
200b948: 82 10 3f ff mov -1, %g1
_Objects_Get_class( created->Object.id ) == 1 ) {
executing_api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
api->signals_blocked = executing_api->signals_blocked;
200b94c: 03 00 80 60 sethi %hi(0x2018000), %g1
200b950: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
200b954: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3
200b958: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1
200b95c: 10 bf ff e9 b 200b900 <_POSIX_Threads_Create_extension+0xbc>
200b960: c2 24 60 c4 st %g1, [ %l1 + 0xc4 ]
020069b4 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body( void )
{
20069b4: 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;
20069b8: 03 00 80 72 sethi %hi(0x201c800), %g1
20069bc: e6 00 62 d0 ld [ %g1 + 0x2d0 ], %l3 ! 201cad0 <_POSIX_Threads_User_initialization_threads>
maximum = _POSIX_Threads_Number_of_initialization_threads;
20069c0: 03 00 80 72 sethi %hi(0x201c800), %g1
if ( !user_threads || maximum == 0 )
20069c4: 80 a4 e0 00 cmp %l3, 0
20069c8: 02 80 00 1c be 2006a38 <_POSIX_Threads_Initialize_user_threads_body+0x84><== NEVER TAKEN
20069cc: e8 00 63 88 ld [ %g1 + 0x388 ], %l4
20069d0: 80 a5 20 00 cmp %l4, 0
20069d4: 02 80 00 19 be 2006a38 <_POSIX_Threads_Initialize_user_threads_body+0x84><== NEVER TAKEN
20069d8: a2 10 20 00 clr %l1
return;
20069dc: a0 10 20 00 clr %l0
20069e0: a4 07 bf bc add %fp, -68, %l2
20069e4: aa 07 bf f4 add %fp, -12, %l5
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
20069e8: 40 00 1c ab call 200dc94 <pthread_attr_init>
20069ec: 90 10 00 12 mov %l2, %o0
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
20069f0: 92 10 20 02 mov 2, %o1
20069f4: 40 00 1c b3 call 200dcc0 <pthread_attr_setinheritsched>
20069f8: 90 10 00 12 mov %l2, %o0
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
20069fc: 82 04 c0 10 add %l3, %l0, %g1
2006a00: d2 00 60 04 ld [ %g1 + 4 ], %o1
2006a04: 40 00 1c c0 call 200dd04 <pthread_attr_setstacksize>
2006a08: 90 10 00 12 mov %l2, %o0
status = pthread_create(
2006a0c: d4 04 c0 10 ld [ %l3 + %l0 ], %o2
2006a10: 90 10 00 15 mov %l5, %o0
2006a14: 92 10 00 12 mov %l2, %o1
2006a18: 7f ff fe fc call 2006608 <pthread_create>
2006a1c: 96 10 20 00 clr %o3
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
2006a20: 80 a2 20 00 cmp %o0, 0
2006a24: 12 80 00 07 bne 2006a40 <_POSIX_Threads_Initialize_user_threads_body+0x8c>
2006a28: a2 04 60 01 inc %l1
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
2006a2c: 80 a5 00 11 cmp %l4, %l1
2006a30: 18 bf ff ee bgu 20069e8 <_POSIX_Threads_Initialize_user_threads_body+0x34><== NEVER TAKEN
2006a34: a0 04 20 08 add %l0, 8, %l0
2006a38: 81 c7 e0 08 ret
2006a3c: 81 e8 00 00 restore
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, TRUE, status );
2006a40: 94 10 00 08 mov %o0, %o2
2006a44: 92 10 20 01 mov 1, %o1
2006a48: 40 00 08 f0 call 2008e08 <_Internal_error_Occurred>
2006a4c: 90 10 20 02 mov 2, %o0
0200b9b4 <_POSIX_Threads_Sporadic_budget_TSR>:
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id,
void *argument
)
{
200b9b4: 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 ];
200b9b8: f0 06 61 6c ld [ %i1 + 0x16c ], %i0
ticks = _Timespec_To_ticks( &api->schedparam.ss_initial_budget );
200b9bc: 40 00 04 3f call 200cab8 <_Timespec_To_ticks>
200b9c0: 90 06 20 90 add %i0, 0x90, %o0
if ( !ticks )
200b9c4: 80 a2 20 00 cmp %o0, 0
200b9c8: 22 80 00 02 be,a 200b9d0 <_POSIX_Threads_Sporadic_budget_TSR+0x1c><== NEVER TAKEN
200b9cc: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
200b9d0: 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 ||
200b9d4: c6 06 60 1c ld [ %i1 + 0x1c ], %g3
200b9d8: 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;
200b9dc: d0 26 60 78 st %o0, [ %i1 + 0x78 ]
200b9e0: 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 ||
200b9e4: 80 a0 e0 00 cmp %g3, 0
200b9e8: 02 80 00 10 be 200ba28 <_POSIX_Threads_Sporadic_budget_TSR+0x74>
200b9ec: d2 26 60 18 st %o1, [ %i1 + 0x18 ]
200b9f0: c2 06 60 14 ld [ %i1 + 0x14 ], %g1
200b9f4: 80 a0 40 09 cmp %g1, %o1
200b9f8: 18 80 00 0d bgu 200ba2c <_POSIX_Threads_Sporadic_budget_TSR+0x78><== ALWAYS TAKEN
200b9fc: 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 );
200ba00: 40 00 04 2e call 200cab8 <_Timespec_To_ticks>
200ba04: 90 06 20 88 add %i0, 0x88, %o0
if ( !ticks )
200ba08: 80 a2 20 00 cmp %o0, 0
200ba0c: 22 80 00 02 be,a 200ba14 <_POSIX_Threads_Sporadic_budget_TSR+0x60><== NEVER TAKEN
200ba10: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200ba14: d0 26 20 a8 st %o0, [ %i0 + 0xa8 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200ba18: b2 06 20 9c add %i0, 0x9c, %i1
200ba1c: 31 00 80 60 sethi %hi(0x2018000), %i0
200ba20: 7f ff f5 32 call 2008ee8 <_Watchdog_Insert>
200ba24: 91 ee 23 f4 restore %i0, 0x3f4, %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 );
200ba28: 90 10 00 19 mov %i1, %o0
200ba2c: 7f ff ee e3 call 20075b8 <_Thread_Change_priority>
200ba30: 94 10 20 01 mov 1, %o2
200ba34: 30 bf ff f3 b,a 200ba00 <_POSIX_Threads_Sporadic_budget_TSR+0x4c>
0200b964 <_POSIX_Threads_Sporadic_budget_callout>:
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
200b964: c4 02 21 6c ld [ %o0 + 0x16c ], %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 ||
200b968: c8 02 20 1c ld [ %o0 + 0x1c ], %g4
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (255 - priority);
200b96c: 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 */
200b970: 82 10 3f ff mov -1, %g1
200b974: 84 10 20 ff mov 0xff, %g2
200b978: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
200b97c: 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 ||
200b980: 80 a1 20 00 cmp %g4, 0
200b984: 02 80 00 06 be 200b99c <_POSIX_Threads_Sporadic_budget_callout+0x38><== ALWAYS TAKEN
200b988: d2 22 20 18 st %o1, [ %o0 + 0x18 ]
200b98c: c2 02 20 14 ld [ %o0 + 0x14 ], %g1 <== NOT EXECUTED
200b990: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
200b994: 08 80 00 06 bleu 200b9ac <_POSIX_Threads_Sporadic_budget_callout+0x48><== NOT EXECUTED
200b998: 01 00 00 00 nop <== NOT EXECUTED
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, TRUE );
200b99c: 94 10 20 01 mov 1, %o2 ! 1 <PROM_START+0x1>
200b9a0: 82 13 c0 00 mov %o7, %g1
200b9a4: 7f ff ef 05 call 20075b8 <_Thread_Change_priority>
200b9a8: 9e 10 40 00 mov %g1, %o7
200b9ac: 81 c3 e0 08 retl <== NOT EXECUTED
0200d0c4 <_POSIX_Threads_cancel_run>:
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
200d0c4: 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 ];
200d0c8: e2 06 21 6c ld [ %i0 + 0x16c ], %l1
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
200d0cc: 82 10 20 01 mov 1, %g1
while ( !_Chain_Is_empty( handler_stack ) ) {
200d0d0: 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;
200d0d4: b0 04 60 dc add %l1, 0xdc, %i0
200d0d8: 80 a0 80 18 cmp %g2, %i0
200d0dc: 02 80 00 14 be 200d12c <_POSIX_Threads_cancel_run+0x68> <== ALWAYS TAKEN
200d0e0: c2 24 60 cc st %g1, [ %l1 + 0xcc ]
_ISR_Disable( level );
200d0e4: 7f ff d3 40 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
200d0e8: 01 00 00 00 nop <== NOT EXECUTED
handler = (POSIX_Cancel_Handler_control *)
200d0ec: e0 06 20 04 ld [ %i0 + 4 ], %l0 <== NOT EXECUTED
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200d0f0: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
previous = the_node->previous;
200d0f4: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
next->previous = previous;
previous->next = next;
200d0f8: 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;
200d0fc: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
200d100: 7f ff d3 3d call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200d104: 01 00 00 00 nop <== NOT EXECUTED
(*handler->routine)( handler->arg );
200d108: c2 04 20 08 ld [ %l0 + 8 ], %g1 <== NOT EXECUTED
200d10c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200d110: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED
_Workspace_Free( handler );
200d114: 7f ff f0 41 call 2009218 <_Workspace_Free> <== NOT EXECUTED
200d118: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
200d11c: c2 04 60 d8 ld [ %l1 + 0xd8 ], %g1 <== NOT EXECUTED
200d120: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED
200d124: 12 bf ff f0 bne 200d0e4 <_POSIX_Threads_cancel_run+0x20> <== NOT EXECUTED
200d128: 01 00 00 00 nop <== NOT EXECUTED
200d12c: 81 c7 e0 08 ret
200d130: 81 e8 00 00 restore
0200e0c8 <_POSIX_Timer_Insert_helper>:
Watchdog_Interval ticks,
Objects_Id id,
Watchdog_Service_routine_entry TSR,
void *arg
)
{
200e0c8: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
(void) _Watchdog_Remove( timer );
200e0cc: 7f ff f4 a5 call 200b360 <_Watchdog_Remove>
200e0d0: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200e0d4: 7f ff d2 ab call 2002b80 <sparc_disable_interrupts>
200e0d8: 01 00 00 00 nop
200e0dc: 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 ) {
200e0e0: c2 06 20 08 ld [ %i0 + 8 ], %g1
200e0e4: 80 a0 60 00 cmp %g1, 0
200e0e8: 12 80 00 0f bne 200e124 <_POSIX_Timer_Insert_helper+0x5c> <== NEVER TAKEN
200e0ec: 92 10 00 18 mov %i0, %o1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200e0f0: f6 26 20 1c st %i3, [ %i0 + 0x1c ]
the_watchdog->id = id;
200e0f4: f4 26 20 20 st %i2, [ %i0 + 0x20 ]
the_watchdog->user_data = user_data;
200e0f8: f8 26 20 24 st %i4, [ %i0 + 0x24 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200e0fc: f2 26 20 0c st %i1, [ %i0 + 0xc ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200e100: c0 26 20 08 clr [ %i0 + 8 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200e104: 11 00 80 74 sethi %hi(0x201d000), %o0
200e108: 7f ff f4 2b call 200b1b4 <_Watchdog_Insert>
200e10c: 90 12 21 c4 or %o0, 0x1c4, %o0 ! 201d1c4 <_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 );
200e110: b0 10 20 01 mov 1, %i0
200e114: 7f ff d2 9f call 2002b90 <sparc_enable_interrupts>
200e118: 90 10 00 10 mov %l0, %o0
return true;
}
200e11c: 81 c7 e0 08 ret
200e120: 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 ( timer->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
200e124: 7f ff d2 9b call 2002b90 <sparc_enable_interrupts> <== NOT EXECUTED
200e128: b0 10 20 00 clr %i0 <== NOT EXECUTED
200e12c: 81 c7 e0 08 ret <== NOT EXECUTED
200e130: 81 e8 00 00 restore <== NOT EXECUTED
02007184 <_POSIX_Timer_TSR>:
/*
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(Objects_Id timer, void *data)
{
2007184: 9d e3 bf 98 save %sp, -104, %sp
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2007188: c2 06 60 68 ld [ %i1 + 0x68 ], %g1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
200718c: c4 06 60 54 ld [ %i1 + 0x54 ], %g2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
2007190: 82 00 60 01 inc %g1
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
2007194: 80 a0 a0 00 cmp %g2, 0
2007198: 12 80 00 0e bne 20071d0 <_POSIX_Timer_TSR+0x4c> <== ALWAYS TAKEN
200719c: c2 26 60 68 st %g1, [ %i1 + 0x68 ]
20071a0: c2 06 60 58 ld [ %i1 + 0x58 ], %g1 <== NOT EXECUTED
20071a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20071a8: 32 80 00 0b bne,a 20071d4 <_POSIX_Timer_TSR+0x50> <== NOT EXECUTED
20071ac: 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;
20071b0: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED
20071b4: 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 ) ) {
20071b8: d0 06 60 38 ld [ %i1 + 0x38 ], %o0
20071bc: 40 00 1a e3 call 200dd48 <pthread_kill>
20071c0: 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;
20071c4: c0 26 60 68 clr [ %i1 + 0x68 ]
20071c8: 81 c7 e0 08 ret
20071cc: 81 e8 00 00 restore
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
20071d0: d2 06 60 64 ld [ %i1 + 0x64 ], %o1
20071d4: d4 06 60 08 ld [ %i1 + 8 ], %o2
20071d8: 90 06 60 10 add %i1, 0x10, %o0
20071dc: 17 00 80 1c sethi %hi(0x2007000), %o3
20071e0: 98 10 00 19 mov %i1, %o4
20071e4: 40 00 1b b9 call 200e0c8 <_POSIX_Timer_Insert_helper>
20071e8: 96 12 e1 84 or %o3, 0x184, %o3
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
20071ec: 80 8a 20 ff btst 0xff, %o0
20071f0: 02 bf ff f6 be 20071c8 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
20071f4: 01 00 00 00 nop
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
20071f8: 40 00 06 22 call 2008a80 <_TOD_Get>
20071fc: 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;
2007200: 82 10 20 03 mov 3, %g1
2007204: 10 bf ff ed b 20071b8 <_POSIX_Timer_TSR+0x34>
2007208: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
0200d220 <_POSIX_signals_Check_signal>:
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
200d220: 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,
200d224: 98 10 20 01 mov 1, %o4
200d228: 96 0e a0 ff and %i2, 0xff, %o3
200d22c: a0 07 bf ec add %fp, -20, %l0
200d230: 90 10 00 18 mov %i0, %o0
200d234: 92 10 00 19 mov %i1, %o1
200d238: 40 00 00 24 call 200d2c8 <_POSIX_signals_Clear_signals>
200d23c: 94 10 00 10 mov %l0, %o2
200d240: 80 8a 20 ff btst 0xff, %o0
200d244: 02 80 00 17 be 200d2a0 <_POSIX_signals_Check_signal+0x80>
200d248: 03 00 80 62 sethi %hi(0x2018800), %g1
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
200d24c: 85 2e 60 02 sll %i1, 2, %g2
200d250: 9a 10 60 e0 or %g1, 0xe0, %o5
200d254: 83 2e 60 04 sll %i1, 4, %g1
200d258: 84 20 40 02 sub %g1, %g2, %g2
200d25c: 86 03 40 02 add %o5, %g2, %g3
200d260: c8 00 e0 08 ld [ %g3 + 8 ], %g4
200d264: 80 a1 20 01 cmp %g4, 1
200d268: 02 80 00 0e be 200d2a0 <_POSIX_signals_Check_signal+0x80> <== NEVER TAKEN
200d26c: 01 00 00 00 nop
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
200d270: f4 06 20 c4 ld [ %i0 + 0xc4 ], %i2
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200d274: c2 00 e0 04 ld [ %g3 + 4 ], %g1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200d278: c4 03 40 02 ld [ %o5 + %g2 ], %g2
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
200d27c: 82 10 40 1a or %g1, %i2, %g1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
200d280: 80 a0 a0 02 cmp %g2, 2
200d284: 02 80 00 09 be 200d2a8 <_POSIX_signals_Check_signal+0x88>
200d288: 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 );
200d28c: 9f c1 00 00 call %g4
200d290: 90 10 00 19 mov %i1, %o0
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200d294: f4 26 20 c4 st %i2, [ %i0 + 0xc4 ]
200d298: 81 c7 e0 08 ret
200d29c: 91 e8 20 01 restore %g0, 1, %o0
return true;
}
200d2a0: 81 c7 e0 08 ret
200d2a4: 91 e8 20 00 restore %g0, 0, %o0
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
200d2a8: c2 00 e0 08 ld [ %g3 + 8 ], %g1
200d2ac: 90 10 00 19 mov %i1, %o0
200d2b0: 92 10 00 10 mov %l0, %o1
200d2b4: 9f c0 40 00 call %g1
200d2b8: 94 10 20 00 clr %o2
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
200d2bc: f4 26 20 c4 st %i2, [ %i0 + 0xc4 ]
200d2c0: 81 c7 e0 08 ret
200d2c4: 91 e8 20 01 restore %g0, 1, %o0
0200dab0 <_POSIX_signals_Clear_process_signals>:
*/
void _POSIX_signals_Clear_process_signals(
sigset_t mask
)
{
200dab0: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200dab4: 7f ff d0 cc call 2001de4 <sparc_disable_interrupts>
200dab8: 01 00 00 00 nop
_POSIX_signals_Pending &= ~mask;
200dabc: 05 00 80 62 sethi %hi(0x2018800), %g2
200dac0: c2 00 a2 ac ld [ %g2 + 0x2ac ], %g1 ! 2018aac <_POSIX_signals_Pending>
200dac4: b0 28 40 18 andn %g1, %i0, %i0
if ( !_POSIX_signals_Pending )
200dac8: 80 a6 20 00 cmp %i0, 0
200dacc: 12 80 00 06 bne 200dae4 <_POSIX_signals_Clear_process_signals+0x34><== NEVER TAKEN
200dad0: f0 20 a2 ac st %i0, [ %g2 + 0x2ac ]
_Thread_Do_post_task_switch_extension--;
200dad4: 05 00 80 60 sethi %hi(0x2018000), %g2
200dad8: c2 00 a3 b8 ld [ %g2 + 0x3b8 ], %g1 ! 20183b8 <_Thread_Do_post_task_switch_extension>
200dadc: 82 00 7f ff add %g1, -1, %g1
200dae0: c2 20 a3 b8 st %g1, [ %g2 + 0x3b8 ]
_ISR_Enable( level );
200dae4: 7f ff d0 c4 call 2001df4 <sparc_enable_interrupts>
200dae8: 91 e8 00 08 restore %g0, %o0, %o0
0200d2c8 <_POSIX_signals_Clear_signals>:
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
200d2c8: 9d e3 bf 98 save %sp, -104, %sp
sigset_t signals_blocked;
ISR_Level level;
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
200d2cc: 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 )
200d2d0: 80 8f 20 ff btst 0xff, %i4
sigset_t signals_blocked;
ISR_Level level;
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
200d2d4: 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 )
200d2d8: b8 10 3f ff mov -1, %i4
200d2dc: 02 80 00 04 be 200d2ec <_POSIX_signals_Clear_signals+0x24>
200d2e0: a1 28 40 02 sll %g1, %g2, %l0
signals_blocked = ~api->signals_blocked;
200d2e4: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1
200d2e8: 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 );
200d2ec: 7f ff d2 be call 2001de4 <sparc_disable_interrupts>
200d2f0: 01 00 00 00 nop
200d2f4: a2 10 00 08 mov %o0, %l1
if ( is_global ) {
200d2f8: 80 8e e0 ff btst 0xff, %i3
200d2fc: 22 80 00 33 be,a 200d3c8 <_POSIX_signals_Clear_signals+0x100>
200d300: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
200d304: 05 00 80 62 sethi %hi(0x2018800), %g2
200d308: c2 00 a2 ac ld [ %g2 + 0x2ac ], %g1 ! 2018aac <_POSIX_signals_Pending>
200d30c: 82 0c 00 01 and %l0, %g1, %g1
200d310: 80 88 40 1c btst %g1, %i4
200d314: 02 80 00 37 be 200d3f0 <_POSIX_signals_Clear_signals+0x128>
200d318: 85 2e 60 02 sll %i1, 2, %g2
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
200d31c: 87 2e 60 04 sll %i1, 4, %g3
200d320: 03 00 80 62 sethi %hi(0x2018800), %g1
200d324: 86 20 c0 02 sub %g3, %g2, %g3
200d328: 82 10 60 e0 or %g1, 0xe0, %g1
200d32c: c4 00 40 03 ld [ %g1 + %g3 ], %g2
200d330: 80 a0 a0 02 cmp %g2, 2
200d334: 12 80 00 34 bne 200d404 <_POSIX_signals_Clear_signals+0x13c>
200d338: 03 00 80 62 sethi %hi(0x2018800), %g1
psiginfo = (POSIX_signals_Siginfo_node *)
200d33c: 88 10 62 b0 or %g1, 0x2b0, %g4 ! 2018ab0 <_POSIX_signals_Siginfo>
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200d340: c4 00 c0 04 ld [ %g3 + %g4 ], %g2
200d344: 98 00 c0 04 add %g3, %g4, %o4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200d348: 9a 03 20 04 add %o4, 4, %o5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
200d34c: 80 a0 80 0d cmp %g2, %o5
200d350: 02 80 00 34 be 200d420 <_POSIX_signals_Clear_signals+0x158><== NEVER TAKEN
200d354: b8 10 20 00 clr %i4
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
200d358: c2 00 80 00 ld [ %g2 ], %g1
200d35c: b8 10 00 02 mov %g2, %i4
the_chain->first = new_first;
200d360: c2 20 c0 04 st %g1, [ %g3 + %g4 ]
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
if ( _Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
200d364: 80 a3 40 01 cmp %o5, %g1
200d368: 02 80 00 2e be 200d420 <_POSIX_signals_Clear_signals+0x158><== ALWAYS TAKEN
200d36c: d8 20 60 04 st %o4, [ %g1 + 4 ]
_POSIX_signals_Clear_process_signals( mask );
if ( psiginfo ) {
200d370: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
200d374: 02 80 00 1b be 200d3e0 <_POSIX_signals_Clear_signals+0x118><== NEVER TAKEN
200d378: b0 10 20 01 mov 1, %i0
*info = psiginfo->Info;
200d37c: c2 07 20 08 ld [ %i4 + 8 ], %g1
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
the_node->previous = old_last_node;
200d380: b0 10 20 01 mov 1, %i0
200d384: c2 26 80 00 st %g1, [ %i2 ]
200d388: c4 07 20 0c ld [ %i4 + 0xc ], %g2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200d38c: 03 00 80 62 sethi %hi(0x2018800), %g1
200d390: c4 26 a0 04 st %g2, [ %i2 + 4 ]
200d394: 82 10 62 64 or %g1, 0x264, %g1
200d398: c6 07 20 10 ld [ %i4 + 0x10 ], %g3
200d39c: c2 27 00 00 st %g1, [ %i4 ]
old_last_node = the_chain->last;
200d3a0: 82 00 7f fc add %g1, -4, %g1
200d3a4: c4 00 60 08 ld [ %g1 + 8 ], %g2
the_chain->last = the_node;
200d3a8: f8 20 60 08 st %i4, [ %g1 + 8 ]
200d3ac: c6 26 a0 08 st %g3, [ %i2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200d3b0: c4 27 20 04 st %g2, [ %i4 + 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;
200d3b4: f8 20 80 00 st %i4, [ %g2 ]
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
200d3b8: 7f ff d2 8f call 2001df4 <sparc_enable_interrupts>
200d3bc: 90 10 00 11 mov %l1, %o0
return do_callout;
}
200d3c0: 81 c7 e0 08 ret
200d3c4: 81 e8 00 00 restore
} else
_POSIX_signals_Clear_process_signals( mask );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
200d3c8: 82 0c 00 02 and %l0, %g2, %g1
200d3cc: 80 88 40 1c btst %g1, %i4
200d3d0: 02 80 00 08 be 200d3f0 <_POSIX_signals_Clear_signals+0x128>
200d3d4: 82 28 80 10 andn %g2, %l0, %g1
api->signals_pending &= ~mask;
200d3d8: c2 26 20 c8 st %g1, [ %i0 + 0xc8 ]
200d3dc: b0 10 20 01 mov 1, %i0
do_callout = true;
}
}
_ISR_Enable( level );
200d3e0: 7f ff d2 85 call 2001df4 <sparc_enable_interrupts>
200d3e4: 90 10 00 11 mov %l1, %o0
return do_callout;
}
200d3e8: 81 c7 e0 08 ret
200d3ec: 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;
200d3f0: b0 10 20 00 clr %i0
do_callout = true;
}
}
_ISR_Enable( level );
200d3f4: 7f ff d2 80 call 2001df4 <sparc_enable_interrupts>
200d3f8: 90 10 00 11 mov %l1, %o0
return do_callout;
}
200d3fc: 81 c7 e0 08 ret
200d400: 81 e8 00 00 restore
&psiginfo->Node
);
} else
do_callout = false;
} else
_POSIX_signals_Clear_process_signals( mask );
200d404: 90 10 00 10 mov %l0, %o0
200d408: 40 00 01 aa call 200dab0 <_POSIX_signals_Clear_process_signals>
200d40c: b0 10 20 01 mov 1, %i0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
200d410: 7f ff d2 79 call 2001df4 <sparc_enable_interrupts>
200d414: 90 10 00 11 mov %l1, %o0
return do_callout;
}
200d418: 81 c7 e0 08 ret
200d41c: 81 e8 00 00 restore
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 ] ) )
_POSIX_signals_Clear_process_signals( mask );
200d420: 40 00 01 a4 call 200dab0 <_POSIX_signals_Clear_process_signals>
200d424: 90 10 00 10 mov %l0, %o0
if ( psiginfo ) {
200d428: 10 bf ff d3 b 200d374 <_POSIX_signals_Clear_signals+0xac>
200d42c: 80 a7 20 00 cmp %i4, 0
020063a4 <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
20063a4: 86 10 00 08 mov %o0, %g3
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
20063a8: 84 10 20 01 mov 1, %g2
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
20063ac: 90 10 20 1b mov 0x1b, %o0
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) )
20063b0: 82 02 3f ff add %o0, -1, %g1
20063b4: 83 28 80 01 sll %g2, %g1, %g1
20063b8: 80 88 40 03 btst %g1, %g3
20063bc: 12 80 00 11 bne 2006400 <_POSIX_signals_Get_highest+0x5c> <== NEVER TAKEN
20063c0: 01 00 00 00 nop
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
20063c4: 90 02 20 01 inc %o0
20063c8: 80 a2 20 20 cmp %o0, 0x20
20063cc: 12 bf ff fa bne 20063b4 <_POSIX_signals_Get_highest+0x10>
20063d0: 82 02 3f ff add %o0, -1, %g1
20063d4: 90 10 20 01 mov 1, %o0
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) )
20063d8: 10 80 00 05 b 20063ec <_POSIX_signals_Get_highest+0x48>
20063dc: 84 10 20 01 mov 1, %g2
return signo;
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
20063e0: 80 a2 20 1b cmp %o0, 0x1b
20063e4: 02 80 00 09 be 2006408 <_POSIX_signals_Get_highest+0x64> <== NEVER TAKEN
20063e8: 01 00 00 00 nop
if ( set & signo_to_mask( signo ) )
20063ec: 82 02 3f ff add %o0, -1, %g1
20063f0: 83 28 80 01 sll %g2, %g1, %g1
20063f4: 80 88 40 03 btst %g1, %g3
20063f8: 22 bf ff fa be,a 20063e0 <_POSIX_signals_Get_highest+0x3c>
20063fc: 90 02 20 01 inc %o0
return signo;
}
return 0;
}
2006400: 81 c3 e0 08 retl
2006404: 01 00 00 00 nop
2006408: 81 c3 e0 08 retl <== NOT EXECUTED
200640c: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== NOT EXECUTED
0200b5e0 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
200b5e0: 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 ];
200b5e4: e0 06 21 6c ld [ %i0 + 0x16c ], %l0
if ( !api )
200b5e8: 80 a4 20 00 cmp %l0, 0
200b5ec: 02 80 00 3c be 200b6dc <_POSIX_signals_Post_switch_extension+0xfc><== NEVER TAKEN
200b5f0: 03 00 80 62 sethi %hi(0x2018800), %g1
200b5f4: a2 10 62 ac or %g1, 0x2ac, %l1 ! 2018aac <_POSIX_signals_Pending>
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
200b5f8: 7f ff d9 fb call 2001de4 <sparc_disable_interrupts>
200b5fc: 01 00 00 00 nop
200b600: b0 10 00 08 mov %o0, %i0
if ( !(~api->signals_blocked &
200b604: c2 04 40 00 ld [ %l1 ], %g1
200b608: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2
200b60c: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3
200b610: 82 10 40 02 or %g1, %g2, %g1
200b614: 80 a8 40 03 andncc %g1, %g3, %g0
200b618: 02 80 00 2f be 200b6d4 <_POSIX_signals_Post_switch_extension+0xf4>
200b61c: 01 00 00 00 nop
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
200b620: 7f ff d9 f5 call 2001df4 <sparc_enable_interrupts>
200b624: b0 10 20 1b mov 0x1b, %i0 ! 1b <PROM_START+0x1b>
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( _POSIX_signals_Check_signal( api, signo, false ) )
200b628: 92 10 00 18 mov %i0, %o1
200b62c: 94 10 20 00 clr %o2
200b630: 40 00 06 fc call 200d220 <_POSIX_signals_Check_signal>
200b634: 90 10 00 10 mov %l0, %o0
200b638: 80 8a 20 ff btst 0xff, %o0
200b63c: 12 bf ff ef bne 200b5f8 <_POSIX_signals_Post_switch_extension+0x18><== NEVER TAKEN
200b640: 92 10 00 18 mov %i0, %o1
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
200b644: 90 10 00 10 mov %l0, %o0
200b648: 94 10 20 01 mov 1, %o2
200b64c: 40 00 06 f5 call 200d220 <_POSIX_signals_Check_signal>
200b650: b0 06 20 01 inc %i0
200b654: 80 8a 20 ff btst 0xff, %o0
200b658: 12 bf ff e8 bne 200b5f8 <_POSIX_signals_Post_switch_extension+0x18><== NEVER TAKEN
200b65c: 80 a6 20 20 cmp %i0, 0x20
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
200b660: 12 bf ff f3 bne 200b62c <_POSIX_signals_Post_switch_extension+0x4c>
200b664: 92 10 00 18 mov %i0, %o1
200b668: 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 ) )
200b66c: 92 10 00 18 mov %i0, %o1
200b670: 94 10 20 00 clr %o2
200b674: 40 00 06 eb call 200d220 <_POSIX_signals_Check_signal>
200b678: 90 10 00 10 mov %l0, %o0
200b67c: 80 8a 20 ff btst 0xff, %o0
200b680: 12 bf ff de bne 200b5f8 <_POSIX_signals_Post_switch_extension+0x18>
200b684: 92 10 00 18 mov %i0, %o1
goto restart;
if ( _POSIX_signals_Check_signal( api, signo, true ) )
200b688: 90 10 00 10 mov %l0, %o0
200b68c: 94 10 20 01 mov 1, %o2
200b690: 40 00 06 e4 call 200d220 <_POSIX_signals_Check_signal>
200b694: b0 06 20 01 inc %i0
200b698: 80 8a 20 ff btst 0xff, %o0
200b69c: 12 bf ff d7 bne 200b5f8 <_POSIX_signals_Post_switch_extension+0x18>
200b6a0: 80 a6 20 1b cmp %i0, 0x1b
}
/* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
200b6a4: 12 bf ff f3 bne 200b670 <_POSIX_signals_Post_switch_extension+0x90><== ALWAYS TAKEN
200b6a8: 92 10 00 18 mov %i0, %o1
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
restart:
_ISR_Disable( level );
200b6ac: 7f ff d9 ce call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
200b6b0: 01 00 00 00 nop <== NOT EXECUTED
200b6b4: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
if ( !(~api->signals_blocked &
200b6b8: c2 04 40 00 ld [ %l1 ], %g1 <== NOT EXECUTED
200b6bc: c4 04 20 c8 ld [ %l0 + 0xc8 ], %g2 <== NOT EXECUTED
200b6c0: c6 04 20 c4 ld [ %l0 + 0xc4 ], %g3 <== NOT EXECUTED
200b6c4: 82 10 40 02 or %g1, %g2, %g1 <== NOT EXECUTED
200b6c8: 80 a8 40 03 andncc %g1, %g3, %g0 <== NOT EXECUTED
200b6cc: 12 bf ff d5 bne 200b620 <_POSIX_signals_Post_switch_extension+0x40><== NOT EXECUTED
200b6d0: 01 00 00 00 nop <== NOT EXECUTED
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
200b6d4: 7f ff d9 c8 call 2001df4 <sparc_enable_interrupts>
200b6d8: 81 e8 00 00 restore
200b6dc: 81 c7 e0 08 ret <== NOT EXECUTED
200b6e0: 81 e8 00 00 restore <== NOT EXECUTED
020194d0 <_POSIX_signals_Unblock_thread>:
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
20194d0: 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 ) ) {
20194d4: c8 06 20 10 ld [ %i0 + 0x10 ], %g4
20194d8: 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 );
20194dc: 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 ) ) {
20194e0: 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 );
20194e4: 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 ) ) {
20194e8: 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 );
20194ec: 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 ) ) {
20194f0: 02 80 00 25 be 2019584 <_POSIX_signals_Unblock_thread+0xb4>
20194f4: c6 06 21 6c ld [ %i0 + 0x16c ], %g3
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
20194f8: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1
20194fc: 80 a8 80 01 andncc %g2, %g1, %g0
2019500: 02 80 00 1f be 201957c <_POSIX_signals_Unblock_thread+0xac>
2019504: 03 04 00 00 sethi %hi(0x10000000), %g1
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
2019508: 80 89 00 01 btst %g4, %g1
201950c: 02 80 00 11 be 2019550 <_POSIX_signals_Unblock_thread+0x80>
2019510: da 2e 20 75 stb %o5, [ %i0 + 0x75 ]
the_thread->Wait.return_code = EINTR;
2019514: 82 10 20 04 mov 4, %g1
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
2019518: 80 89 20 08 btst 8, %g4
201951c: 02 80 00 18 be 201957c <_POSIX_signals_Unblock_thread+0xac><== NEVER TAKEN
2019520: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
if ( _Watchdog_Is_active( &the_thread->Timer ) )
2019524: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
2019528: 80 a0 60 02 cmp %g1, 2
201952c: 02 80 00 36 be 2019604 <_POSIX_signals_Unblock_thread+0x134><== ALWAYS TAKEN
2019530: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2019534: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2019538: 13 04 00 ff sethi %hi(0x1003fc00), %o1
201953c: b0 10 20 00 clr %i0
2019540: 7f ff be d7 call 200909c <_Thread_Clear_state>
2019544: 92 12 63 f8 or %o1, 0x3f8, %o1
2019548: 81 c7 e0 08 ret
201954c: 81 e8 00 00 restore
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
2019550: 80 a1 20 00 cmp %g4, 0
2019554: 12 80 00 0a bne 201957c <_POSIX_signals_Unblock_thread+0xac><== NEVER TAKEN
2019558: 03 00 80 93 sethi %hi(0x2024c00), %g1
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
201955c: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 2024e00 <_ISR_Nest_level>
2019560: 80 a0 a0 00 cmp %g2, 0
2019564: 02 80 00 06 be 201957c <_POSIX_signals_Unblock_thread+0xac>
2019568: 03 00 80 93 sethi %hi(0x2024c00), %g1
201956c: c4 00 62 24 ld [ %g1 + 0x224 ], %g2 ! 2024e24 <_Thread_Executing>
2019570: 80 a6 00 02 cmp %i0, %g2
2019574: 02 80 00 1c be 20195e4 <_POSIX_signals_Unblock_thread+0x114><== ALWAYS TAKEN
2019578: 03 00 80 93 sethi %hi(0x2024c00), %g1
_ISR_Signals_to_thread_executing = TRUE;
}
}
return false;
}
201957c: 81 c7 e0 08 ret
2019580: 91 e8 20 00 restore %g0, 0, %o0
* 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) ) {
2019584: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
2019588: 80 88 80 01 btst %g2, %g1
201958c: 22 80 00 12 be,a 20195d4 <_POSIX_signals_Unblock_thread+0x104>
2019590: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1
the_thread->Wait.return_code = EINTR;
2019594: 82 10 20 04 mov 4, %g1
2019598: c2 26 20 34 st %g1, [ %i0 + 0x34 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
201959c: 80 a6 a0 00 cmp %i2, 0
20195a0: 02 80 00 14 be 20195f0 <_POSIX_signals_Unblock_thread+0x120>
20195a4: 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;
20195a8: c2 06 80 00 ld [ %i2 ], %g1
20195ac: c2 20 c0 00 st %g1, [ %g3 ]
20195b0: c4 06 a0 04 ld [ %i2 + 4 ], %g2
20195b4: c4 20 e0 04 st %g2, [ %g3 + 4 ]
20195b8: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20195bc: c2 20 e0 08 st %g1, [ %g3 + 8 ]
}
_Thread_queue_Extract_with_proxy( the_thread );
20195c0: 90 10 00 18 mov %i0, %o0
20195c4: 7f ff c2 05 call 2009dd8 <_Thread_queue_Extract_with_proxy>
20195c8: b0 10 20 01 mov 1, %i0
20195cc: 81 c7 e0 08 ret
20195d0: 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) ) {
20195d4: 80 a8 80 01 andncc %g2, %g1, %g0
20195d8: 12 bf ff f0 bne 2019598 <_POSIX_signals_Unblock_thread+0xc8><== NEVER TAKEN
20195dc: 82 10 20 04 mov 4, %g1
20195e0: 30 bf ff e7 b,a 201957c <_POSIX_signals_Unblock_thread+0xac>
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE;
20195e4: da 28 62 b8 stb %o5, [ %g1 + 0x2b8 ]
20195e8: 81 c7 e0 08 ret
20195ec: 91 e8 20 00 restore %g0, 0, %o0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
20195f0: 82 10 20 01 mov 1, %g1
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
20195f4: f2 20 c0 00 st %i1, [ %g3 ]
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
20195f8: c0 20 e0 08 clr [ %g3 + 8 ]
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
20195fc: 10 bf ff f1 b 20195c0 <_POSIX_signals_Unblock_thread+0xf0>
2019600: c2 20 e0 04 st %g1, [ %g3 + 4 ]
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
2019604: 7f ff c6 75 call 200afd8 <_Watchdog_Remove>
2019608: 90 06 20 48 add %i0, 0x48, %o0
201960c: 10 bf ff cb b 2019538 <_POSIX_signals_Unblock_thread+0x68>
2019610: 90 10 00 18 mov %i0, %o0
02009ff4 <_Protected_heap_Get_information>:
bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
2009ff4: 9d e3 bf 98 save %sp, -104, %sp
Heap_Get_information_status status;
if ( !the_heap )
2009ff8: 80 a6 20 00 cmp %i0, 0
2009ffc: 02 80 00 10 be 200a03c <_Protected_heap_Get_information+0x48><== NEVER TAKEN
200a000: 80 a6 60 00 cmp %i1, 0
return false;
if ( !the_info )
200a004: 02 80 00 0e be 200a03c <_Protected_heap_Get_information+0x48><== NEVER TAKEN
200a008: 23 00 80 79 sethi %hi(0x201e400), %l1
return false;
_RTEMS_Lock_allocator();
200a00c: 7f ff f9 22 call 2008494 <_API_Mutex_Lock>
200a010: d0 04 61 cc ld [ %l1 + 0x1cc ], %o0 ! 201e5cc <_RTEMS_Allocator_Mutex>
status = _Heap_Get_information( the_heap, the_info );
200a014: 90 10 00 18 mov %i0, %o0
200a018: 40 00 13 81 call 200ee1c <_Heap_Get_information>
200a01c: 92 10 00 19 mov %i1, %o1
200a020: a0 10 00 08 mov %o0, %l0
_RTEMS_Unlock_allocator();
200a024: 7f ff f9 32 call 20084ec <_API_Mutex_Unlock>
200a028: d0 04 61 cc ld [ %l1 + 0x1cc ], %o0
if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
200a02c: 80 a0 00 10 cmp %g0, %l0
200a030: 82 60 3f ff subx %g0, -1, %g1
200a034: 81 c7 e0 08 ret
200a038: 91 e8 00 01 restore %g0, %g1, %o0
return true;
return false;
}
200a03c: 81 c7 e0 08 ret <== NOT EXECUTED
200a040: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
0200be58 <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
200be58: 9d e3 bf 98 save %sp, -104, %sp
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200be5c: 21 00 80 60 sethi %hi(0x2018000), %l0
200be60: c6 04 23 ac ld [ %l0 + 0x3ac ], %g3 ! 20183ac <_Configuration_Table>
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
200be64: b0 10 20 00 clr %i0
/*
* Notepads must be the last entry in the structure and they
* can be left off if disabled in the configuration.
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
200be68: c2 00 e0 40 ld [ %g3 + 0x40 ], %g1
200be6c: c4 08 60 04 ldub [ %g1 + 4 ], %g2
200be70: 80 a0 00 02 cmp %g0, %g2
200be74: 90 60 20 00 subx %g0, 0, %o0
200be78: 90 0a 20 40 and %o0, 0x40, %o0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
200be7c: 7f ff f4 ee call 2009234 <_Workspace_Allocate>
200be80: 90 02 20 20 add %o0, 0x20, %o0
if ( !api )
200be84: 80 a2 20 00 cmp %o0, 0
200be88: 02 80 00 17 be 200bee4 <_RTEMS_tasks_Create_extension+0x8c><== NEVER TAKEN
200be8c: c2 04 23 ac ld [ %l0 + 0x3ac ], %g1
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = true;
200be90: 84 10 20 01 mov 1, %g2
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
200be94: c6 00 60 40 ld [ %g1 + 0x40 ], %g3
200be98: c4 2a 20 08 stb %g2, [ %o0 + 8 ]
200be9c: c2 08 e0 04 ldub [ %g3 + 4 ], %g1
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
200bea0: c0 26 61 78 clr [ %i1 + 0x178 ]
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
200bea4: d0 26 61 68 st %o0, [ %i1 + 0x168 ]
api->pending_events = EVENT_SETS_NONE_PENDING;
200bea8: c0 22 00 00 clr [ %o0 ]
information->handler = NULL;
200beac: c0 22 20 0c clr [ %o0 + 0xc ]
information->mode_set = RTEMS_DEFAULT_MODES;
200beb0: c0 22 20 10 clr [ %o0 + 0x10 ]
information->signals_posted = 0;
200beb4: c0 22 20 14 clr [ %o0 + 0x14 ]
information->signals_pending = 0;
200beb8: c0 22 20 18 clr [ %o0 + 0x18 ]
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
200bebc: 80 a0 60 00 cmp %g1, 0
200bec0: 02 80 00 08 be 200bee0 <_RTEMS_tasks_Create_extension+0x88>
200bec4: c0 22 20 1c clr [ %o0 + 0x1c ]
200bec8: 84 10 20 00 clr %g2
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
200becc: 82 02 00 02 add %o0, %g2, %g1
200bed0: 84 00 a0 04 add %g2, 4, %g2
api->pending_events = EVENT_SETS_NONE_PENDING;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
200bed4: 80 a0 a0 40 cmp %g2, 0x40
200bed8: 12 bf ff fd bne 200becc <_RTEMS_tasks_Create_extension+0x74>
200bedc: c0 20 60 20 clr [ %g1 + 0x20 ]
200bee0: b0 10 20 01 mov 1, %i0
api->Notepads[i] = 0;
}
return true;
}
200bee4: 81 c7 e0 08 ret
200bee8: 81 e8 00 00 restore
02005c34 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
2005c34: 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;
2005c38: 03 00 80 60 sethi %hi(0x2018000), %g1
2005c3c: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 20183ac <_Configuration_Table>
2005c40: c6 00 a0 40 ld [ %g2 + 0x40 ], %g3
/*
* NOTE: This is slightly different from the Ada implementation.
*/
user_tasks = api_configuration->User_initialization_tasks_table;
2005c44: d0 00 e0 2c ld [ %g3 + 0x2c ], %o0
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
2005c48: 80 a2 20 00 cmp %o0, 0
2005c4c: 02 80 00 1b be 2005cb8 <_RTEMS_tasks_Initialize_user_tasks_body+0x84><== NEVER TAKEN
2005c50: e4 00 e0 28 ld [ %g3 + 0x28 ], %l2
2005c54: 80 a4 a0 00 cmp %l2, 0
2005c58: 02 80 00 18 be 2005cb8 <_RTEMS_tasks_Initialize_user_tasks_body+0x84><== NEVER TAKEN
2005c5c: a0 10 00 08 mov %o0, %l0
return;
2005c60: a2 10 20 00 clr %l1
2005c64: a6 07 bf f4 add %fp, -12, %l3
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
2005c68: d0 04 00 00 ld [ %l0 ], %o0
2005c6c: d2 04 20 08 ld [ %l0 + 8 ], %o1
2005c70: d4 04 20 04 ld [ %l0 + 4 ], %o2
2005c74: d6 04 20 14 ld [ %l0 + 0x14 ], %o3
2005c78: d8 04 20 0c ld [ %l0 + 0xc ], %o4
2005c7c: 7f ff ff 6c call 2005a2c <rtems_task_create>
2005c80: 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 ) )
2005c84: 80 a2 20 00 cmp %o0, 0
2005c88: 12 80 00 0f bne 2005cc4 <_RTEMS_tasks_Initialize_user_tasks_body+0x90>
2005c8c: 94 10 00 08 mov %o0, %o2
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
return_value = rtems_task_start(
2005c90: d0 07 bf f4 ld [ %fp + -12 ], %o0
2005c94: d2 04 20 10 ld [ %l0 + 0x10 ], %o1
2005c98: 40 00 00 0f call 2005cd4 <rtems_task_start>
2005c9c: d4 04 20 18 ld [ %l0 + 0x18 ], %o2
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
2005ca0: 80 a2 20 00 cmp %o0, 0
2005ca4: 12 80 00 07 bne 2005cc0 <_RTEMS_tasks_Initialize_user_tasks_body+0x8c>
2005ca8: a2 04 60 01 inc %l1
maximum = api_configuration->number_of_initialization_tasks;
if ( !user_tasks || maximum == 0 )
return;
for ( index=0 ; index < maximum ; index++ ) {
2005cac: 80 a4 80 11 cmp %l2, %l1
2005cb0: 18 bf ff ee bgu 2005c68 <_RTEMS_tasks_Initialize_user_tasks_body+0x34><== NEVER TAKEN
2005cb4: a0 04 20 1c add %l0, 0x1c, %l0
2005cb8: 81 c7 e0 08 ret
2005cbc: 81 e8 00 00 restore
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, TRUE, return_value );
2005cc0: 94 10 00 08 mov %o0, %o2
2005cc4: 92 10 20 01 mov 1, %o1
2005cc8: 40 00 03 b7 call 2006ba4 <_Internal_error_Occurred>
2005ccc: 90 10 20 01 mov 1, %o0
0200bd88 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
200bd88: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200bd8c: f0 06 21 68 ld [ %i0 + 0x168 ], %i0
if ( !api )
200bd90: 80 a6 20 00 cmp %i0, 0
200bd94: 02 80 00 1f be 200be10 <_RTEMS_tasks_Post_switch_extension+0x88><== NEVER TAKEN
200bd98: 01 00 00 00 nop
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
200bd9c: 7f ff d8 12 call 2001de4 <sparc_disable_interrupts>
200bda0: 01 00 00 00 nop
signal_set = asr->signals_posted;
200bda4: e4 06 20 14 ld [ %i0 + 0x14 ], %l2
asr->signals_posted = 0;
200bda8: c0 26 20 14 clr [ %i0 + 0x14 ]
_ISR_Enable( level );
200bdac: 7f ff d8 12 call 2001df4 <sparc_enable_interrupts>
200bdb0: 01 00 00 00 nop
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
200bdb4: 80 a4 a0 00 cmp %l2, 0
200bdb8: 32 80 00 04 bne,a 200bdc8 <_RTEMS_tasks_Post_switch_extension+0x40>
200bdbc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
200bdc0: 81 c7 e0 08 ret
200bdc4: 81 e8 00 00 restore
return;
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdc8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200bdcc: 82 00 60 01 inc %g1
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdd0: a2 07 bf f4 add %fp, -12, %l1
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
200bdd4: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdd8: 94 10 00 11 mov %l1, %o2
200bddc: 21 00 00 3f sethi %hi(0xfc00), %l0
200bde0: 40 00 05 b3 call 200d4ac <rtems_task_mode>
200bde4: 92 14 23 ff or %l0, 0x3ff, %o1 ! ffff <PROM_START+0xffff>
(*asr->handler)( signal_set );
200bde8: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200bdec: 9f c0 40 00 call %g1
200bdf0: 90 10 00 12 mov %l2, %o0
asr->nest_level -= 1;
200bdf4: c2 06 20 1c ld [ %i0 + 0x1c ], %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200bdf8: d0 07 bf f4 ld [ %fp + -12 ], %o0
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200bdfc: 82 00 7f ff add %g1, -1, %g1
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200be00: 92 14 23 ff or %l0, 0x3ff, %o1
asr->nest_level += 1;
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
(*asr->handler)( signal_set );
asr->nest_level -= 1;
200be04: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
200be08: 40 00 05 a9 call 200d4ac <rtems_task_mode>
200be0c: 94 10 00 11 mov %l1, %o2
200be10: 81 c7 e0 08 ret
200be14: 81 e8 00 00 restore
0200bcb0 <_RTEMS_tasks_Switch_extension>:
/*
* Per Task Variables
*/
tvp = executing->task_variables;
200bcb0: c8 02 21 78 ld [ %o0 + 0x178 ], %g4
while (tvp) {
200bcb4: 80 a1 20 00 cmp %g4, 0
200bcb8: 22 80 00 0b be,a 200bce4 <_RTEMS_tasks_Switch_extension+0x34>
200bcbc: d2 02 61 78 ld [ %o1 + 0x178 ], %o1
tvp->tval = *tvp->ptr;
200bcc0: c2 01 20 04 ld [ %g4 + 4 ], %g1
*tvp->ptr = tvp->gval;
200bcc4: c6 01 20 08 ld [ %g4 + 8 ], %g3
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
tvp->tval = *tvp->ptr;
200bcc8: c4 00 40 00 ld [ %g1 ], %g2
200bccc: c4 21 20 0c st %g2, [ %g4 + 0xc ]
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
200bcd0: c8 01 00 00 ld [ %g4 ], %g4
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
200bcd4: 80 a1 20 00 cmp %g4, 0
200bcd8: 12 bf ff fa bne 200bcc0 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
200bcdc: c6 20 40 00 st %g3, [ %g1 ]
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
200bce0: d2 02 61 78 ld [ %o1 + 0x178 ], %o1
while (tvp) {
200bce4: 80 a2 60 00 cmp %o1, 0
200bce8: 02 80 00 0a be 200bd10 <_RTEMS_tasks_Switch_extension+0x60>
200bcec: 01 00 00 00 nop
tvp->gval = *tvp->ptr;
200bcf0: c2 02 60 04 ld [ %o1 + 4 ], %g1
*tvp->ptr = tvp->tval;
200bcf4: c6 02 60 0c ld [ %o1 + 0xc ], %g3
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
tvp->gval = *tvp->ptr;
200bcf8: c4 00 40 00 ld [ %g1 ], %g2
200bcfc: c4 22 60 08 st %g2, [ %o1 + 8 ]
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
200bd00: d2 02 40 00 ld [ %o1 ], %o1
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
200bd04: 80 a2 60 00 cmp %o1, 0
200bd08: 12 bf ff fa bne 200bcf0 <_RTEMS_tasks_Switch_extension+0x40><== NEVER TAKEN
200bd0c: c6 20 40 00 st %g3, [ %g1 ]
200bd10: 81 c3 e0 08 retl
02006ec0 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
2006ec0: 9d e3 bf 90 save %sp, -112, %sp
2006ec4: 11 00 80 74 sethi %hi(0x201d000), %o0
2006ec8: 92 10 00 18 mov %i0, %o1
2006ecc: 90 12 22 3c or %o0, 0x23c, %o0
2006ed0: 40 00 08 19 call 2008f34 <_Objects_Get>
2006ed4: 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 ) {
2006ed8: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006edc: 80 a0 60 00 cmp %g1, 0
2006ee0: 12 80 00 11 bne 2006f24 <_Rate_monotonic_Timeout+0x64> <== NEVER TAKEN
2006ee4: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
the_thread = the_period->owner;
2006ee8: d0 02 20 50 ld [ %o0 + 0x50 ], %o0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2006eec: 03 00 00 10 sethi %hi(0x4000), %g1
2006ef0: c4 02 20 10 ld [ %o0 + 0x10 ], %g2
2006ef4: 80 88 80 01 btst %g2, %g1
2006ef8: 32 80 00 0d bne,a 2006f2c <_Rate_monotonic_Timeout+0x6c>
2006efc: c4 02 20 20 ld [ %o0 + 0x20 ], %g2
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
2006f00: c2 06 20 38 ld [ %i0 + 0x38 ], %g1
2006f04: 80 a0 60 01 cmp %g1, 1
2006f08: 02 80 00 12 be 2006f50 <_Rate_monotonic_Timeout+0x90> <== NEVER TAKEN
2006f0c: 82 10 20 04 mov 4, %g1
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
2006f10: 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;
2006f14: 05 00 80 74 sethi %hi(0x201d000), %g2
2006f18: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
2006f1c: 82 00 7f ff add %g1, -1, %g1
2006f20: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ]
2006f24: 81 c7 e0 08 ret
2006f28: 81 e8 00 00 restore
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
2006f2c: c2 06 20 08 ld [ %i0 + 8 ], %g1
2006f30: 80 a0 80 01 cmp %g2, %g1
2006f34: 32 bf ff f4 bne,a 2006f04 <_Rate_monotonic_Timeout+0x44> <== NEVER TAKEN
2006f38: 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 );
2006f3c: 13 04 00 ff sethi %hi(0x1003fc00), %o1
2006f40: 40 00 09 67 call 20094dc <_Thread_Clear_state>
2006f44: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
2006f48: 10 80 00 05 b 2006f5c <_Rate_monotonic_Timeout+0x9c>
2006f4c: 90 10 00 18 mov %i0, %o0
_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;
2006f50: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006f54: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
2006f58: c2 26 20 38 st %g1, [ %i0 + 0x38 ] <== NOT EXECUTED
_Rate_monotonic_Initiate_statistics( the_period );
2006f5c: 7f ff fe 2e call 2006814 <_Rate_monotonic_Initiate_statistics>
2006f60: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f64: c2 06 20 4c ld [ %i0 + 0x4c ], %g1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006f68: 92 06 20 10 add %i0, 0x10, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006f6c: c2 26 20 1c st %g1, [ %i0 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006f70: 11 00 80 75 sethi %hi(0x201d400), %o0
2006f74: 40 00 10 0e call 200afac <_Watchdog_Insert>
2006f78: 90 12 20 94 or %o0, 0x94, %o0 ! 201d494 <_Watchdog_Ticks_chain>
2006f7c: 30 bf ff e6 b,a 2006f14 <_Rate_monotonic_Timeout+0x54>
02006494 <_TOD_Validate>:
*/
bool _TOD_Validate(
rtems_time_of_day *the_tod
)
{
2006494: 9d e3 bf 98 save %sp, -104, %sp
uint32_t days_in_month;
if ((!the_tod) ||
2006498: 80 a6 20 00 cmp %i0, 0
200649c: 02 80 00 2f be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN
20064a0: 03 00 80 93 sethi %hi(0x2024c00), %g1
20064a4: d2 00 63 00 ld [ %g1 + 0x300 ], %o1 ! 2024f00 <_TOD_Microseconds_per_tick>
20064a8: 11 00 03 d0 sethi %hi(0xf4000), %o0
20064ac: 40 00 46 49 call 2017dd0 <.udiv>
20064b0: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
20064b4: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
20064b8: 80 a0 40 08 cmp %g1, %o0
20064bc: 1a 80 00 27 bcc 2006558 <_TOD_Validate+0xc4>
20064c0: 01 00 00 00 nop
20064c4: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
20064c8: 80 a0 60 3b cmp %g1, 0x3b
20064cc: 18 80 00 23 bgu 2006558 <_TOD_Validate+0xc4>
20064d0: 01 00 00 00 nop
20064d4: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
20064d8: 80 a0 60 3b cmp %g1, 0x3b
20064dc: 18 80 00 1f bgu 2006558 <_TOD_Validate+0xc4>
20064e0: 01 00 00 00 nop
20064e4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20064e8: 80 a0 60 17 cmp %g1, 0x17
20064ec: 18 80 00 1b bgu 2006558 <_TOD_Validate+0xc4>
20064f0: 01 00 00 00 nop
20064f4: c4 06 20 04 ld [ %i0 + 4 ], %g2
20064f8: 80 a0 a0 00 cmp %g2, 0
20064fc: 02 80 00 17 be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN
2006500: 80 a0 a0 0c cmp %g2, 0xc
2006504: 18 80 00 15 bgu 2006558 <_TOD_Validate+0xc4>
2006508: 01 00 00 00 nop
200650c: c2 06 00 00 ld [ %i0 ], %g1
2006510: 80 a0 67 c3 cmp %g1, 0x7c3
2006514: 08 80 00 11 bleu 2006558 <_TOD_Validate+0xc4>
2006518: 01 00 00 00 nop
200651c: f0 06 20 08 ld [ %i0 + 8 ], %i0
2006520: 80 a6 20 00 cmp %i0, 0
2006524: 02 80 00 0d be 2006558 <_TOD_Validate+0xc4> <== NEVER TAKEN
2006528: 80 88 60 03 btst 3, %g1
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
200652c: 32 80 00 0d bne,a 2006560 <_TOD_Validate+0xcc>
2006530: 85 28 a0 02 sll %g2, 2, %g2
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
2006534: 84 00 a0 0d add %g2, 0xd, %g2
2006538: 03 00 80 6a sethi %hi(0x201a800), %g1
200653c: 85 28 a0 02 sll %g2, 2, %g2
2006540: 82 10 61 58 or %g1, 0x158, %g1
2006544: c4 00 40 02 ld [ %g1 + %g2 ], %g2
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
2006548: 80 a0 80 18 cmp %g2, %i0
200654c: 82 60 3f ff subx %g0, -1, %g1
2006550: 81 c7 e0 08 ret
2006554: 91 e8 00 01 restore %g0, %g1, %o0
if ( the_tod->day > days_in_month )
return false;
return true;
}
2006558: 81 c7 e0 08 ret
200655c: 91 e8 20 00 restore %g0, 0, %o0
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
2006560: 03 00 80 6a sethi %hi(0x201a800), %g1
2006564: 82 10 61 58 or %g1, 0x158, %g1 ! 201a958 <_TOD_Days_per_month>
2006568: 10 bf ff f8 b 2006548 <_TOD_Validate+0xb4>
200656c: c4 00 40 02 ld [ %g1 + %g2 ], %g2
020075b8 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
20075b8: 9d e3 bf 98 save %sp, -104, %sp
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
20075bc: e2 06 20 10 ld [ %i0 + 0x10 ], %l1
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
20075c0: 40 00 04 94 call 2008810 <_Thread_Set_transient>
20075c4: 90 10 00 18 mov %i0, %o0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
20075c8: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
20075cc: a0 10 00 18 mov %i0, %l0
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
20075d0: 80 a0 40 19 cmp %g1, %i1
20075d4: 02 80 00 04 be 20075e4 <_Thread_Change_priority+0x2c>
20075d8: 92 10 00 19 mov %i1, %o1
_Thread_Set_priority( the_thread, new_priority );
20075dc: 40 00 04 11 call 2008620 <_Thread_Set_priority>
20075e0: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
20075e4: 7f ff ea 00 call 2001de4 <sparc_disable_interrupts>
20075e8: 01 00 00 00 nop
20075ec: b0 10 00 08 mov %o0, %i0
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
20075f0: f2 04 20 10 ld [ %l0 + 0x10 ], %i1
if ( state != STATES_TRANSIENT ) {
20075f4: 80 a6 60 04 cmp %i1, 4
20075f8: 02 80 00 10 be 2007638 <_Thread_Change_priority+0x80>
20075fc: 80 8c 60 04 btst 4, %l1
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
2007600: 12 80 00 03 bne 200760c <_Thread_Change_priority+0x54> <== NEVER TAKEN
2007604: 82 0e 7f fb and %i1, -5, %g1
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
2007608: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
_ISR_Enable( level );
200760c: 7f ff e9 fa call 2001df4 <sparc_enable_interrupts>
2007610: 90 10 00 18 mov %i0, %o0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
2007614: 03 00 00 ef sethi %hi(0x3bc00), %g1
2007618: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200761c: 80 8e 40 01 btst %i1, %g1
2007620: 32 80 00 04 bne,a 2007630 <_Thread_Change_priority+0x78>
2007624: f0 04 20 44 ld [ %l0 + 0x44 ], %i0
2007628: 81 c7 e0 08 ret
200762c: 81 e8 00 00 restore
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
2007630: 40 00 03 cc call 2008560 <_Thread_queue_Requeue>
2007634: 93 e8 00 10 restore %g0, %l0, %o1
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
2007638: 12 80 00 14 bne 2007688 <_Thread_Change_priority+0xd0> <== NEVER TAKEN
200763c: 23 00 80 60 sethi %hi(0x2018000), %l1
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2007640: c6 04 20 90 ld [ %l0 + 0x90 ], %g3
2007644: c4 14 20 96 lduh [ %l0 + 0x96 ], %g2
2007648: c2 10 c0 00 lduh [ %g3 ], %g1
* Interrupts are STILL disabled.
* We now know the thread will be in the READY state when we remove
* the TRANSIENT state. So we have to place it on the appropriate
* Ready Queue with interrupts off.
*/
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
200764c: c0 24 20 10 clr [ %l0 + 0x10 ]
2007650: 82 10 40 02 or %g1, %g2, %g1
2007654: c2 30 c0 00 sth %g1, [ %g3 ]
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007658: c4 14 63 c8 lduh [ %l1 + 0x3c8 ], %g2
200765c: c2 14 20 94 lduh [ %l0 + 0x94 ], %g1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
2007660: 80 8e a0 ff btst 0xff, %i2
2007664: 84 10 80 01 or %g2, %g1, %g2
2007668: c4 34 63 c8 sth %g2, [ %l1 + 0x3c8 ]
200766c: 02 80 00 49 be 2007790 <_Thread_Change_priority+0x1d8>
2007670: c2 04 20 8c ld [ %l0 + 0x8c ], %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2007674: c4 00 40 00 ld [ %g1 ], %g2
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2007678: c2 24 20 04 st %g1, [ %l0 + 4 ]
before_node = after_node->next;
after_node->next = the_node;
200767c: e0 20 40 00 st %l0, [ %g1 ]
the_node->next = before_node;
before_node->previous = the_node;
2007680: e0 20 a0 04 st %l0, [ %g2 + 4 ]
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
2007684: c4 24 00 00 st %g2, [ %l0 ]
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
2007688: 7f ff e9 db call 2001df4 <sparc_enable_interrupts>
200768c: 90 10 00 18 mov %i0, %o0
2007690: 7f ff e9 d5 call 2001de4 <sparc_disable_interrupts>
2007694: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
2007698: c2 14 63 c8 lduh [ %l1 + 0x3c8 ], %g1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
200769c: 05 00 80 60 sethi %hi(0x2018000), %g2
20076a0: 83 28 60 10 sll %g1, 0x10, %g1
20076a4: 87 30 60 10 srl %g1, 0x10, %g3
20076a8: 80 a0 e0 ff cmp %g3, 0xff
20076ac: 08 80 00 28 bleu 200774c <_Thread_Change_priority+0x194>
20076b0: d8 00 a2 64 ld [ %g2 + 0x264 ], %o4
20076b4: 05 00 80 59 sethi %hi(0x2016400), %g2
20076b8: 83 30 60 18 srl %g1, 0x18, %g1
20076bc: 88 10 a1 b0 or %g2, 0x1b0, %g4
20076c0: c2 09 00 01 ldub [ %g4 + %g1 ], %g1
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
20076c4: 05 00 80 61 sethi %hi(0x2018400), %g2
20076c8: 9b 28 60 10 sll %g1, 0x10, %o5
20076cc: 84 10 a0 40 or %g2, 0x40, %g2
20076d0: 83 33 60 0f srl %o5, 0xf, %g1
20076d4: c6 10 80 01 lduh [ %g2 + %g1 ], %g3
20076d8: 83 28 e0 10 sll %g3, 0x10, %g1
20076dc: 85 30 60 10 srl %g1, 0x10, %g2
20076e0: 80 a0 a0 ff cmp %g2, 0xff
20076e4: 18 80 00 29 bgu 2007788 <_Thread_Change_priority+0x1d0>
20076e8: 83 30 60 18 srl %g1, 0x18, %g1
20076ec: c2 09 00 02 ldub [ %g4 + %g2 ], %g1
20076f0: 82 00 60 08 add %g1, 8, %g1
20076f4: 87 33 60 0c srl %o5, 0xc, %g3
20076f8: 83 28 60 10 sll %g1, 0x10, %g1
20076fc: 83 30 60 10 srl %g1, 0x10, %g1
2007700: 82 00 40 03 add %g1, %g3, %g1
2007704: 85 28 60 04 sll %g1, 4, %g2
2007708: 83 28 60 02 sll %g1, 2, %g1
200770c: 84 20 80 01 sub %g2, %g1, %g2
2007710: c6 03 00 02 ld [ %o4 + %g2 ], %g3
* is also the heir thread, and FALSE otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
2007714: 03 00 80 60 sethi %hi(0x2018000), %g1
2007718: c2 00 63 d4 ld [ %g1 + 0x3d4 ], %g1 ! 20183d4 <_Thread_Executing>
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
200771c: 05 00 80 60 sethi %hi(0x2018000), %g2
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
2007720: 80 a0 c0 01 cmp %g3, %g1
2007724: 02 80 00 08 be 2007744 <_Thread_Change_priority+0x18c>
2007728: c6 20 a3 a0 st %g3, [ %g2 + 0x3a0 ]
200772c: c2 08 60 76 ldub [ %g1 + 0x76 ], %g1
2007730: 80 a0 60 00 cmp %g1, 0
2007734: 02 80 00 04 be 2007744 <_Thread_Change_priority+0x18c>
2007738: 84 10 20 01 mov 1, %g2
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = TRUE;
200773c: 03 00 80 60 sethi %hi(0x2018000), %g1
2007740: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ] ! 20183e4 <_Context_Switch_necessary>
_ISR_Enable( level );
2007744: 7f ff e9 ac call 2001df4 <sparc_enable_interrupts>
2007748: 81 e8 00 00 restore
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
200774c: 05 00 80 59 sethi %hi(0x2016400), %g2
2007750: 88 10 a1 b0 or %g2, 0x1b0, %g4 ! 20165b0 <__log2table>
2007754: c2 09 00 03 ldub [ %g4 + %g3 ], %g1
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007758: 05 00 80 61 sethi %hi(0x2018400), %g2
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
200775c: 82 00 60 08 add %g1, 8, %g1
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
2007760: 84 10 a0 40 or %g2, 0x40, %g2
2007764: 9b 28 60 10 sll %g1, 0x10, %o5
2007768: 83 33 60 0f srl %o5, 0xf, %g1
200776c: c6 10 80 01 lduh [ %g2 + %g1 ], %g3
2007770: 83 28 e0 10 sll %g3, 0x10, %g1
2007774: 85 30 60 10 srl %g1, 0x10, %g2
2007778: 80 a0 a0 ff cmp %g2, 0xff
200777c: 28 bf ff dd bleu,a 20076f0 <_Thread_Change_priority+0x138>
2007780: c2 09 00 02 ldub [ %g4 + %g2 ], %g1
2007784: 83 30 60 18 srl %g1, 0x18, %g1
2007788: 10 bf ff db b 20076f4 <_Thread_Change_priority+0x13c>
200778c: c2 09 00 01 ldub [ %g4 + %g1 ], %g1
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2007790: 84 00 60 04 add %g1, 4, %g2
2007794: c4 24 00 00 st %g2, [ %l0 ]
old_last_node = the_chain->last;
2007798: c6 00 60 08 ld [ %g1 + 8 ], %g3
the_chain->last = the_node;
200779c: e0 20 60 08 st %l0, [ %g1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
20077a0: c6 24 20 04 st %g3, [ %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;
20077a4: 10 bf ff b9 b 2007688 <_Thread_Change_priority+0xd0>
20077a8: e0 20 c0 00 st %l0, [ %g3 ]
020077ac <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
20077ac: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
20077b0: 7f ff e9 8d call 2001de4 <sparc_disable_interrupts>
20077b4: a0 10 00 19 mov %i1, %l0
20077b8: a2 10 00 08 mov %o0, %l1
current_state = the_thread->current_state;
20077bc: f2 06 20 10 ld [ %i0 + 0x10 ], %i1
if ( current_state & state ) {
20077c0: 80 8c 00 19 btst %l0, %i1
20077c4: 02 80 00 05 be 20077d8 <_Thread_Clear_state+0x2c>
20077c8: 82 2e 40 10 andn %i1, %l0, %g1
current_state =
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
20077cc: 80 a0 60 00 cmp %g1, 0
20077d0: 02 80 00 04 be 20077e0 <_Thread_Clear_state+0x34>
20077d4: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
20077d8: 7f ff e9 87 call 2001df4 <sparc_enable_interrupts>
20077dc: 91 e8 00 11 restore %g0, %l1, %o0
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
20077e0: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
20077e4: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
20077e8: 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);
20077ec: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
20077f0: 82 10 40 02 or %g1, %g2, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
20077f4: 1b 00 80 60 sethi %hi(0x2018000), %o5
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
20077f8: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
20077fc: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2007800: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4
2007804: c2 26 00 00 st %g1, [ %i0 ]
2007808: c4 13 63 c8 lduh [ %o5 + 0x3c8 ], %g2
old_last_node = the_chain->last;
200780c: c8 00 e0 08 ld [ %g3 + 8 ], %g4
the_chain->last = the_node;
2007810: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2007814: 84 10 80 0c or %g2, %o4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
2007818: c8 26 20 04 st %g4, [ %i0 + 4 ]
200781c: c4 33 63 c8 sth %g2, [ %o5 + 0x3c8 ]
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;
2007820: f0 21 00 00 st %i0, [ %g4 ]
_ISR_Flash( level );
2007824: 7f ff e9 74 call 2001df4 <sparc_enable_interrupts>
2007828: 01 00 00 00 nop
200782c: 7f ff e9 6e call 2001de4 <sparc_disable_interrupts>
2007830: 01 00 00 00 nop
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
2007834: 09 00 80 60 sethi %hi(0x2018000), %g4
2007838: c4 01 23 a0 ld [ %g4 + 0x3a0 ], %g2 ! 20183a0 <_Thread_Heir>
200783c: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
2007840: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
2007844: 80 a0 c0 01 cmp %g3, %g1
2007848: 1a bf ff e4 bcc 20077d8 <_Thread_Clear_state+0x2c>
200784c: 03 00 80 60 sethi %hi(0x2018000), %g1
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
2007850: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
2007854: f0 21 23 a0 st %i0, [ %g4 + 0x3a0 ]
if ( _Thread_Executing->is_preemptible ||
2007858: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1
200785c: 80 a0 60 00 cmp %g1, 0
2007860: 12 80 00 05 bne 2007874 <_Thread_Clear_state+0xc8>
2007864: 84 10 20 01 mov 1, %g2
2007868: 80 a0 e0 00 cmp %g3, 0
200786c: 12 bf ff db bne 20077d8 <_Thread_Clear_state+0x2c> <== ALWAYS TAKEN
2007870: 01 00 00 00 nop
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
2007874: 03 00 80 60 sethi %hi(0x2018000), %g1
2007878: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ] ! 20183e4 <_Context_Switch_necessary>
200787c: 30 bf ff d7 b,a 20077d8 <_Thread_Clear_state+0x2c>
02007968 <_Thread_Create_idle>:
*
* _Thread_Create_idle
*/
void _Thread_Create_idle( void )
{
2007968: 9d e3 bf 78 save %sp, -136, %sp
* This routine allocates an internal thread.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Internal_allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_Thread_Internal_information );
200796c: 35 00 80 61 sethi %hi(0x2018400), %i2
2007970: 7f ff fc bd call 2006c64 <_Objects_Allocate>
2007974: 90 16 a0 70 or %i2, 0x70, %o0 ! 2018470 <_Thread_Internal_information>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2007978: 37 00 80 60 sethi %hi(0x2018000), %i3
200797c: c2 06 e3 10 ld [ %i3 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
/*
* 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();
2007980: 39 00 80 61 sethi %hi(0x2018400), %i4
2007984: 82 00 60 01 inc %g1
2007988: d0 27 20 bc st %o0, [ %i4 + 0xbc ]
200798c: c2 26 e3 10 st %g1, [ %i3 + 0x310 ]
* that when _Thread_Initialize unnests dispatch that we do not
* do anything stupid.
*/
_Thread_Disable_dispatch();
_Thread_Initialize(
2007990: 33 00 80 60 sethi %hi(0x2018000), %i1
2007994: c2 06 63 ac ld [ %i1 + 0x3ac ], %g1 ! 20183ac <_Configuration_Table>
2007998: 05 00 80 5d sethi %hi(0x2017400), %g2
200799c: c6 00 60 18 ld [ %g1 + 0x18 ], %g3
20079a0: d6 00 a0 e0 ld [ %g2 + 0xe0 ], %o3
20079a4: 03 00 80 59 sethi %hi(0x2016400), %g1
20079a8: 82 10 63 48 or %g1, 0x348, %g1 ! 2016748 <_Status_Object_name_errors_to_status+0x14>
20079ac: c2 27 bf f4 st %g1, [ %fp + -12 ]
20079b0: 80 a2 c0 03 cmp %o3, %g3
20079b4: 1a 80 00 03 bcc 20079c0 <_Thread_Create_idle+0x58> <== ALWAYS TAKEN
20079b8: d2 07 20 bc ld [ %i4 + 0xbc ], %o1
20079bc: 96 10 00 03 mov %g3, %o3 <== NOT EXECUTED
20079c0: 03 00 80 5d sethi %hi(0x2017400), %g1
20079c4: da 08 60 e4 ldub [ %g1 + 0xe4 ], %o5 ! 20174e4 <rtems_maximum_priority>
20079c8: 84 07 bf f4 add %fp, -12, %g2
20079cc: 82 10 20 01 mov 1, %g1
20079d0: c0 23 a0 60 clr [ %sp + 0x60 ]
20079d4: c0 23 a0 64 clr [ %sp + 0x64 ]
20079d8: c0 23 a0 68 clr [ %sp + 0x68 ]
20079dc: 90 16 a0 70 or %i2, 0x70, %o0
20079e0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
20079e4: c4 23 a0 6c st %g2, [ %sp + 0x6c ]
20079e8: 94 10 20 00 clr %o2
20079ec: 40 00 00 c3 call 2007cf8 <_Thread_Initialize>
20079f0: 98 10 20 00 clr %o4
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
_Thread_Executing = _Thread_Idle;
_Thread_Start(
20079f4: c4 06 63 ac ld [ %i1 + 0x3ac ], %g2
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
20079f8: c2 06 e3 10 ld [ %i3 + 0x310 ], %g1
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
20079fc: c6 07 20 bc ld [ %i4 + 0xbc ], %g3
2007a00: 82 00 7f ff add %g1, -1, %g1
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007a04: f4 00 a0 14 ld [ %g2 + 0x14 ], %i2
2007a08: c2 26 e3 10 st %g1, [ %i3 + 0x310 ]
/*
* WARNING!!! This is necessary to "kick" start the system and
* MUST be done before _Thread_Start is invoked.
*/
_Thread_Heir =
2007a0c: 05 00 80 60 sethi %hi(0x2018000), %g2
2007a10: 03 00 80 60 sethi %hi(0x2018000), %g1
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007a14: 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 =
2007a18: c6 20 a3 d4 st %g3, [ %g2 + 0x3d4 ]
2007a1c: c6 20 63 a0 st %g3, [ %g1 + 0x3a0 ]
_Thread_Executing = _Thread_Idle;
_Thread_Start(
2007a20: b2 10 20 00 clr %i1
2007a24: b6 10 20 00 clr %i3
2007a28: 40 00 03 e0 call 20089a8 <_Thread_Start>
2007a2c: 99 e8 20 00 restore %g0, 0, %o4
02007a34 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored
)
{
2007a34: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
2007a38: 90 10 00 18 mov %i0, %o0
2007a3c: 40 00 00 83 call 2007c48 <_Thread_Get>
2007a40: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007a44: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007a48: 80 a0 60 00 cmp %g1, 0
2007a4c: 12 80 00 08 bne 2007a6c <_Thread_Delay_ended+0x38> <== NEVER TAKEN
2007a50: 13 04 00 ff sethi %hi(0x1003fc00), %o1
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
2007a54: 7f ff ff 56 call 20077ac <_Thread_Clear_state>
2007a58: 92 12 63 f8 or %o1, 0x3f8, %o1 ! 1003fff8 <RAM_END+0xdc3fff8>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2007a5c: 05 00 80 60 sethi %hi(0x2018000), %g2
2007a60: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
2007a64: 82 00 7f ff add %g1, -1, %g1
2007a68: c2 20 a3 10 st %g1, [ %g2 + 0x310 ]
2007a6c: 81 c7 e0 08 ret
2007a70: 81 e8 00 00 restore
02007a74 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
2007a74: 9d e3 bf 88 save %sp, -120, %sp
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
2007a78: 03 00 80 60 sethi %hi(0x2018000), %g1
2007a7c: e2 00 63 d4 ld [ %g1 + 0x3d4 ], %l1 ! 20183d4 <_Thread_Executing>
_ISR_Disable( level );
2007a80: 7f ff e8 d9 call 2001de4 <sparc_disable_interrupts>
2007a84: ae 10 63 d4 or %g1, 0x3d4, %l7
while ( _Context_Switch_necessary == TRUE ) {
2007a88: 05 00 80 60 sethi %hi(0x2018000), %g2
2007a8c: c2 08 a3 e4 ldub [ %g2 + 0x3e4 ], %g1 ! 20183e4 <_Context_Switch_necessary>
2007a90: aa 10 a3 e4 or %g2, 0x3e4, %l5
2007a94: 80 a0 60 00 cmp %g1, 0
2007a98: 03 00 80 60 sethi %hi(0x2018000), %g1
2007a9c: 02 80 00 4d be 2007bd0 <_Thread_Dispatch+0x15c>
2007aa0: b2 10 63 10 or %g1, 0x310, %i1 ! 2018310 <_Thread_Dispatch_disable_level>
2007aa4: 03 00 80 60 sethi %hi(0x2018000), %g1
2007aa8: 05 00 80 60 sethi %hi(0x2018000), %g2
2007aac: b4 10 63 a0 or %g1, 0x3a0, %i2
2007ab0: 03 00 80 60 sethi %hi(0x2018000), %g1
2007ab4: a4 10 a3 dc or %g2, 0x3dc, %l2
2007ab8: b6 10 63 9c or %g1, 0x39c, %i3
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007abc: 05 00 80 60 sethi %hi(0x2018000), %g2
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
2007ac0: 03 00 80 60 sethi %hi(0x2018000), %g1
2007ac4: b0 10 a2 68 or %g2, 0x268, %i0
2007ac8: ac 10 63 98 or %g1, 0x398, %l6
2007acc: a8 07 bf f0 add %fp, -16, %l4
2007ad0: a6 07 bf e8 add %fp, -24, %l3
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
2007ad4: b8 10 20 01 mov 1, %i4
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007ad8: 10 80 00 34 b 2007ba8 <_Thread_Dispatch+0x134>
2007adc: ba 10 00 12 mov %l2, %i5
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
2007ae0: 7f ff e8 c5 call 2001df4 <sparc_enable_interrupts>
2007ae4: 01 00 00 00 nop
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
2007ae8: 40 00 11 ca call 200c210 <_TOD_Get_uptime>
2007aec: 90 10 00 14 mov %l4, %o0
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
2007af0: 90 10 00 1d mov %i5, %o0
2007af4: 92 10 00 14 mov %l4, %o1
2007af8: 40 00 04 2d call 2008bac <_Timespec_Subtract>
2007afc: 94 10 00 13 mov %l3, %o2
_Timespec_Add_to( &executing->cpu_time_used, &ran );
2007b00: 92 10 00 13 mov %l3, %o1
2007b04: 40 00 04 10 call 2008b44 <_Timespec_Add_to>
2007b08: 90 04 60 84 add %l1, 0x84, %o0
_Thread_Time_of_last_context_switch = uptime;
2007b0c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2007b10: c4 07 bf f4 ld [ %fp + -12 ], %g2
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2007b14: c6 06 c0 00 ld [ %i3 ], %g3
{
struct timespec uptime, ran;
_TOD_Get_uptime( &uptime );
_Timespec_Subtract(&_Thread_Time_of_last_context_switch, &uptime, &ran);
_Timespec_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
2007b18: c2 24 80 00 st %g1, [ %l2 ]
2007b1c: c4 24 a0 04 st %g2, [ %l2 + 4 ]
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
2007b20: 90 10 00 11 mov %l1, %o0
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
2007b24: 80 a0 e0 00 cmp %g3, 0
2007b28: 02 80 00 06 be 2007b40 <_Thread_Dispatch+0xcc> <== NEVER TAKEN
2007b2c: 92 10 00 10 mov %l0, %o1
executing->libc_reent = *_Thread_libc_reent;
2007b30: c2 00 c0 00 ld [ %g3 ], %g1
2007b34: c2 24 61 64 st %g1, [ %l1 + 0x164 ]
*_Thread_libc_reent = heir->libc_reent;
2007b38: c4 04 21 64 ld [ %l0 + 0x164 ], %g2
2007b3c: c4 20 c0 00 st %g2, [ %g3 ]
}
_User_extensions_Thread_switch( executing, heir );
2007b40: 40 00 04 d8 call 2008ea0 <_User_extensions_Thread_switch>
2007b44: 01 00 00 00 nop
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
2007b48: 92 04 20 d8 add %l0, 0xd8, %o1
2007b4c: 40 00 06 2b call 20093f8 <_CPU_Context_switch>
2007b50: 90 04 60 d8 add %l1, 0xd8, %o0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
2007b54: c2 04 61 60 ld [ %l1 + 0x160 ], %g1
2007b58: 80 a0 60 00 cmp %g1, 0
2007b5c: 02 80 00 0d be 2007b90 <_Thread_Dispatch+0x11c>
2007b60: 01 00 00 00 nop
2007b64: d0 05 80 00 ld [ %l6 ], %o0
2007b68: 80 a4 40 08 cmp %l1, %o0
2007b6c: 02 80 00 09 be 2007b90 <_Thread_Dispatch+0x11c>
2007b70: 80 a2 20 00 cmp %o0, 0
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
2007b74: 02 80 00 04 be 2007b84 <_Thread_Dispatch+0x110>
2007b78: 01 00 00 00 nop
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
2007b7c: 40 00 05 e5 call 2009310 <_CPU_Context_save_fp>
2007b80: 90 02 21 60 add %o0, 0x160, %o0
_Context_Restore_fp( &executing->fp_context );
2007b84: 40 00 06 00 call 2009384 <_CPU_Context_restore_fp>
2007b88: 90 04 61 60 add %l1, 0x160, %o0
_Thread_Allocated_fp = executing;
2007b8c: e2 25 80 00 st %l1, [ %l6 ]
#endif
#endif
executing = _Thread_Executing;
_ISR_Disable( level );
2007b90: 7f ff e8 95 call 2001de4 <sparc_disable_interrupts>
2007b94: e2 05 c0 00 ld [ %l7 ], %l1
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
2007b98: c2 0d 40 00 ldub [ %l5 ], %g1
2007b9c: 80 a0 60 00 cmp %g1, 0
2007ba0: 02 80 00 0c be 2007bd0 <_Thread_Dispatch+0x15c>
2007ba4: 03 00 80 60 sethi %hi(0x2018000), %g1
heir = _Thread_Heir;
2007ba8: e0 06 80 00 ld [ %i2 ], %l0
_Thread_Dispatch_disable_level = 1;
2007bac: f8 26 40 00 st %i4, [ %i1 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2007bb0: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == TRUE ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = FALSE;
2007bb4: c0 2d 40 00 clrb [ %l5 ]
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
2007bb8: 80 a0 60 01 cmp %g1, 1
2007bbc: 12 bf ff c9 bne 2007ae0 <_Thread_Dispatch+0x6c>
2007bc0: e0 25 c0 00 st %l0, [ %l7 ]
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
2007bc4: c2 06 00 00 ld [ %i0 ], %g1
2007bc8: 10 bf ff c6 b 2007ae0 <_Thread_Dispatch+0x6c>
2007bcc: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
2007bd0: c0 20 63 10 clr [ %g1 + 0x310 ]
_ISR_Enable( level );
2007bd4: 7f ff e8 88 call 2001df4 <sparc_enable_interrupts>
2007bd8: 01 00 00 00 nop
if ( _Thread_Do_post_task_switch_extension ||
2007bdc: 03 00 80 60 sethi %hi(0x2018000), %g1
2007be0: c4 00 63 b8 ld [ %g1 + 0x3b8 ], %g2 ! 20183b8 <_Thread_Do_post_task_switch_extension>
2007be4: 80 a0 a0 00 cmp %g2, 0
2007be8: 12 80 00 06 bne 2007c00 <_Thread_Dispatch+0x18c>
2007bec: 01 00 00 00 nop
2007bf0: c2 0c 60 75 ldub [ %l1 + 0x75 ], %g1
2007bf4: 80 a0 60 00 cmp %g1, 0
2007bf8: 02 80 00 04 be 2007c08 <_Thread_Dispatch+0x194>
2007bfc: 01 00 00 00 nop
executing->do_post_task_switch_extension ) {
executing->do_post_task_switch_extension = false;
_API_extensions_Run_postswitch();
2007c00: 7f ff f9 96 call 2006258 <_API_extensions_Run_postswitch>
2007c04: c0 2c 60 75 clrb [ %l1 + 0x75 ]
2007c08: 81 c7 e0 08 ret
2007c0c: 81 e8 00 00 restore
0200d808 <_Thread_Evaluate_mode>:
bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
200d808: 03 00 80 60 sethi %hi(0x2018000), %g1
200d80c: c6 00 63 d4 ld [ %g1 + 0x3d4 ], %g3 ! 20183d4 <_Thread_Executing>
if ( !_States_Is_ready( executing->current_state ) ||
200d810: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
200d814: 80 a0 a0 00 cmp %g2, 0
200d818: 12 80 00 0b bne 200d844 <_Thread_Evaluate_mode+0x3c> <== NEVER TAKEN
200d81c: 84 10 20 01 mov 1, %g2
200d820: 03 00 80 60 sethi %hi(0x2018000), %g1
200d824: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 20183a0 <_Thread_Heir>
200d828: 80 a0 c0 02 cmp %g3, %g2
200d82c: 02 80 00 0b be 200d858 <_Thread_Evaluate_mode+0x50>
200d830: 01 00 00 00 nop
200d834: c2 08 e0 76 ldub [ %g3 + 0x76 ], %g1
200d838: 80 a0 60 00 cmp %g1, 0
200d83c: 02 80 00 07 be 200d858 <_Thread_Evaluate_mode+0x50> <== NEVER TAKEN
200d840: 84 10 20 01 mov 1, %g2
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = TRUE;
200d844: 03 00 80 60 sethi %hi(0x2018000), %g1
200d848: 90 10 20 01 mov 1, %o0
200d84c: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ]
200d850: 81 c3 e0 08 retl
200d854: 01 00 00 00 nop
return TRUE;
}
return FALSE;
}
200d858: 81 c3 e0 08 retl
200d85c: 90 10 20 00 clr %o0 ! 0 <PROM_START>
02007c48 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
2007c48: 86 10 00 08 mov %o0, %g3
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
2007c4c: 80 a2 20 00 cmp %o0, 0
2007c50: 02 80 00 1d be 2007cc4 <_Thread_Get+0x7c>
2007c54: 94 10 00 09 mov %o1, %o2
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
2007c58: 83 32 20 18 srl %o0, 0x18, %g1
2007c5c: 82 08 60 07 and %g1, 7, %g1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
2007c60: 84 00 7f ff add %g1, -1, %g2
2007c64: 80 a0 a0 03 cmp %g2, 3
2007c68: 38 80 00 14 bgu,a 2007cb8 <_Thread_Get+0x70>
2007c6c: 82 10 20 01 mov 1, %g1
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
2007c70: 89 32 20 1b srl %o0, 0x1b, %g4
2007c74: 80 a1 20 01 cmp %g4, 1
2007c78: 12 80 00 0f bne 2007cb4 <_Thread_Get+0x6c>
2007c7c: 85 28 60 02 sll %g1, 2, %g2
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
2007c80: 03 00 80 60 sethi %hi(0x2018000), %g1
2007c84: 82 10 62 70 or %g1, 0x270, %g1 ! 2018270 <_Objects_Information_table>
2007c88: c2 00 40 02 ld [ %g1 + %g2 ], %g1
if ( !api_information ) {
2007c8c: 80 a0 60 00 cmp %g1, 0
2007c90: 22 80 00 17 be,a 2007cec <_Thread_Get+0xa4>
2007c94: c8 22 80 00 st %g4, [ %o2 ]
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
2007c98: d0 00 60 04 ld [ %g1 + 4 ], %o0
if ( !information ) {
2007c9c: 80 a2 20 00 cmp %o0, 0
2007ca0: 02 80 00 11 be 2007ce4 <_Thread_Get+0x9c> <== NEVER TAKEN
2007ca4: 92 10 00 03 mov %g3, %o1
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
2007ca8: 82 13 c0 00 mov %o7, %g1
2007cac: 7f ff fd 56 call 2007204 <_Objects_Get>
2007cb0: 9e 10 40 00 mov %g1, %o7
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
2007cb4: 82 10 20 01 mov 1, %g1
2007cb8: 90 10 20 00 clr %o0
2007cbc: 81 c3 e0 08 retl
2007cc0: c2 22 80 00 st %g1, [ %o2 ]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2007cc4: 03 00 80 60 sethi %hi(0x2018000), %g1
2007cc8: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 2018310 <_Thread_Dispatch_disable_level>
2007ccc: 84 00 a0 01 inc %g2
2007cd0: c4 20 63 10 st %g2, [ %g1 + 0x310 ]
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;
2007cd4: 03 00 80 60 sethi %hi(0x2018000), %g1
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;
2007cd8: c0 22 40 00 clr [ %o1 ]
tp = _Thread_Executing;
2007cdc: 81 c3 e0 08 retl
2007ce0: d0 00 63 d4 ld [ %g1 + 0x3d4 ], %o0
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
2007ce4: 81 c3 e0 08 retl <== NOT EXECUTED
2007ce8: c8 22 80 00 st %g4, [ %o2 ] <== NOT EXECUTED
goto done;
}
api_information = _Objects_Information_table[ the_api ];
if ( !api_information ) {
*location = OBJECTS_ERROR;
2007cec: 81 c3 e0 08 retl
2007cf0: 90 10 20 00 clr %o0
0200d860 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
200d860: 9d e3 bf 98 save %sp, -104, %sp
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
200d864: 03 00 80 60 sethi %hi(0x2018000), %g1
200d868: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 20183d4 <_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();
200d86c: 3f 00 80 36 sethi %hi(0x200d800), %i7
200d870: be 17 e0 60 or %i7, 0x60, %i7 ! 200d860 <_Thread_Handler>
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
200d874: d0 04 20 b8 ld [ %l0 + 0xb8 ], %o0
_ISR_Set_level(level);
200d878: 7f ff d1 5f call 2001df4 <sparc_enable_interrupts>
200d87c: 91 2a 20 08 sll %o0, 8, %o0
#if defined(__USE_INIT_FINI__) || defined(__USE__MAIN__)
doneCons = doneConstructors;
200d880: 07 00 80 60 sethi %hi(0x2018000), %g3
doneConstructors = 1;
200d884: 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;
200d888: e4 08 e0 20 ldub [ %g3 + 0x20 ], %l2
doneConstructors = 1;
200d88c: c2 28 e0 20 stb %g1, [ %g3 + 0x20 ]
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) && !_Thread_Is_allocated_fp( executing ) ) {
200d890: c4 04 21 60 ld [ %l0 + 0x160 ], %g2
200d894: 80 a0 a0 00 cmp %g2, 0
200d898: 02 80 00 0b be 200d8c4 <_Thread_Handler+0x64>
200d89c: 23 00 80 60 sethi %hi(0x2018000), %l1
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
200d8a0: d0 04 63 98 ld [ %l1 + 0x398 ], %o0 ! 2018398 <_Thread_Allocated_fp>
200d8a4: 80 a4 00 08 cmp %l0, %o0
200d8a8: 02 80 00 07 be 200d8c4 <_Thread_Handler+0x64>
200d8ac: 80 a2 20 00 cmp %o0, 0
if ( _Thread_Allocated_fp != NULL )
200d8b0: 22 80 00 05 be,a 200d8c4 <_Thread_Handler+0x64>
200d8b4: e0 24 63 98 st %l0, [ %l1 + 0x398 ]
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
200d8b8: 7f ff ee 96 call 2009310 <_CPU_Context_save_fp>
200d8bc: 90 02 21 60 add %o0, 0x160, %o0
_Thread_Allocated_fp = executing;
200d8c0: e0 24 63 98 st %l0, [ %l1 + 0x398 ]
* 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 );
200d8c4: 7f ff ec f7 call 2008ca0 <_User_extensions_Thread_begin>
200d8c8: 90 10 00 10 mov %l0, %o0
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
200d8cc: 7f ff e8 d1 call 2007c10 <_Thread_Enable_dispatch>
200d8d0: 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) */
200d8d4: 83 2c a0 18 sll %l2, 0x18, %g1
200d8d8: 80 a0 60 00 cmp %g1, 0
200d8dc: 02 80 00 1e be 200d954 <_Thread_Handler+0xf4>
200d8e0: 01 00 00 00 nop
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
200d8e4: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200d8e8: 80 a0 60 01 cmp %g1, 1
200d8ec: 22 80 00 21 be,a 200d970 <_Thread_Handler+0x110>
200d8f0: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200d8f4: 80 a0 60 01 cmp %g1, 1
200d8f8: 1a 80 00 0c bcc 200d928 <_Thread_Handler+0xc8> <== NEVER TAKEN
200d8fc: 80 a0 60 02 cmp %g1, 2
case THREAD_START_NUMERIC:
executing->Wait.return_argument =
200d900: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200d904: 9f c0 40 00 call %g1
200d908: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0
200d90c: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
200d910: 7f ff ec f8 call 2008cf0 <_User_extensions_Thread_exitted>
200d914: 90 10 00 10 mov %l0, %o0
_Internal_error_Occurred(
200d918: 90 10 20 00 clr %o0
200d91c: 92 10 20 01 mov 1, %o1
200d920: 7f ff e4 a1 call 2006ba4 <_Internal_error_Occurred>
200d924: 94 10 20 06 mov 6, %o2
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
200d928: 22 80 00 16 be,a 200d980 <_Thread_Handler+0x120> <== NOT EXECUTED
200d92c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
200d930: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED
200d934: 12 bf ff f7 bne 200d910 <_Thread_Handler+0xb0> <== NOT EXECUTED
200d938: 01 00 00 00 nop <== NOT EXECUTED
executing->Start.pointer_argument,
executing->Start.numeric_argument
);
break;
case THREAD_START_BOTH_NUMERIC_FIRST:
executing->Wait.return_argument =
200d93c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
200d940: d0 04 20 a8 ld [ %l0 + 0xa8 ], %o0 <== NOT EXECUTED
200d944: 9f c0 40 00 call %g1 <== NOT EXECUTED
200d948: d2 04 20 a4 ld [ %l0 + 0xa4 ], %o1 <== NOT EXECUTED
200d94c: 10 bf ff f1 b 200d910 <_Thread_Handler+0xb0> <== NOT EXECUTED
200d950: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED
* 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 ();
200d954: 40 00 26 ab call 2017400 <_init>
200d958: 01 00 00 00 nop
#if defined(__USE__MAIN__)
if (!doneCons && _main)
__main ();
#endif
switch ( executing->Start.prototype ) {
200d95c: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
200d960: 80 a0 60 01 cmp %g1, 1
200d964: 12 bf ff e5 bne 200d8f8 <_Thread_Handler+0x98>
200d968: 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 =
200d96c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
200d970: 9f c0 40 00 call %g1
200d974: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0
200d978: 10 bf ff e6 b 200d910 <_Thread_Handler+0xb0>
200d97c: d0 24 20 28 st %o0, [ %l0 + 0x28 ]
(*(Thread_Entry_pointer) executing->Start.entry_point)(
executing->Start.pointer_argument
);
break;
case THREAD_START_BOTH_POINTER_FIRST:
executing->Wait.return_argument =
200d980: d0 04 20 a4 ld [ %l0 + 0xa4 ], %o0 <== NOT EXECUTED
200d984: 9f c0 40 00 call %g1 <== NOT EXECUTED
200d988: d2 04 20 a8 ld [ %l0 + 0xa8 ], %o1 <== NOT EXECUTED
200d98c: 10 bf ff e1 b 200d910 <_Thread_Handler+0xb0> <== NOT EXECUTED
200d990: d0 24 20 28 st %o0, [ %l0 + 0x28 ] <== NOT EXECUTED
02007cf8 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007cf8: 9d e3 bf 98 save %sp, -104, %sp
2007cfc: c2 07 a0 6c ld [ %fp + 0x6c ], %g1
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007d00: 80 a6 a0 00 cmp %i2, 0
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
2007d04: e4 00 40 00 ld [ %g1 ], %l2
2007d08: e6 07 a0 60 ld [ %fp + 0x60 ], %l3
/*
* Allocate and Initialize the stack for this thread.
*/
if ( !stack_area ) {
2007d0c: 02 80 00 69 be 2007eb0 <_Thread_Initialize+0x1b8> <== ALWAYS TAKEN
2007d10: e2 0f a0 5f ldub [ %fp + 0x5f ], %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;
2007d14: c0 2e 60 c0 clrb [ %i1 + 0xc0 ] <== NOT EXECUTED
2007d18: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
2007d1c: f4 26 60 c8 st %i2, [ %i1 + 0xc8 ]
the_stack->size = size;
2007d20: d0 26 60 c4 st %o0, [ %i1 + 0xc4 ]
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2007d24: 80 8f 20 ff btst 0xff, %i4
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area ) {
_Thread_Stack_Free( the_thread );
return FALSE;
2007d28: b4 10 20 00 clr %i2
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
2007d2c: 12 80 00 43 bne 2007e38 <_Thread_Initialize+0x140>
2007d30: 82 10 20 00 clr %g1
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007d34: 37 00 80 60 sethi %hi(0x2018000), %i3
2007d38: d0 06 e3 b4 ld [ %i3 + 0x3b4 ], %o0 ! 20183b4 <_Thread_Maximum_extensions>
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
2007d3c: c2 26 60 cc st %g1, [ %i1 + 0xcc ]
fp_area = _Context_Fp_start( fp_area, 0 );
} else
fp_area = NULL;
the_thread->fp_context = fp_area;
2007d40: c2 26 61 60 st %g1, [ %i1 + 0x160 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007d44: c0 26 60 50 clr [ %i1 + 0x50 ]
the_watchdog->routine = routine;
2007d48: c0 26 60 64 clr [ %i1 + 0x64 ]
the_watchdog->id = id;
2007d4c: c0 26 60 68 clr [ %i1 + 0x68 ]
the_watchdog->user_data = user_data;
2007d50: c0 26 60 6c clr [ %i1 + 0x6c ]
/*
* Clear the libc reent hook.
*/
the_thread->libc_reent = NULL;
2007d54: c0 26 61 64 clr [ %i1 + 0x164 ]
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
2007d58: 80 a2 20 00 cmp %o0, 0
2007d5c: 12 80 00 41 bne 2007e60 <_Thread_Initialize+0x168>
2007d60: b8 16 e3 b4 or %i3, 0x3b4, %i4
return FALSE;
}
} else
extensions_area = NULL;
the_thread->extensions = (void **) extensions_area;
2007d64: c0 26 61 74 clr [ %i1 + 0x174 ]
2007d68: a0 10 20 00 clr %l0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007d6c: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
2007d70: e2 2e 60 ac stb %l1, [ %i1 + 0xac ]
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007d74: c2 26 60 b4 st %g1, [ %i1 + 0xb4 ]
switch ( budget_algorithm ) {
2007d78: 80 a4 e0 02 cmp %l3, 2
2007d7c: 12 80 00 05 bne 2007d90 <_Thread_Initialize+0x98> <== ALWAYS TAKEN
2007d80: e6 26 60 b0 st %l3, [ %i1 + 0xb0 ]
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;
2007d84: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
2007d88: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 2018268 <_Thread_Ticks_per_timeslice><== NOT EXECUTED
2007d8c: c4 26 60 78 st %g2, [ %i1 + 0x78 ] <== NOT EXECUTED
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
2007d90: c2 07 a0 68 ld [ %fp + 0x68 ], %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007d94: 92 10 00 1d mov %i5, %o1
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
}
the_thread->Start.isr_level = isr_level;
2007d98: c2 26 60 b8 st %g1, [ %i1 + 0xb8 ]
the_thread->current_state = STATES_DORMANT;
2007d9c: 82 10 20 01 mov 1, %g1
the_thread->Wait.queue = NULL;
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007da0: 90 10 00 19 mov %i1, %o0
break;
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
2007da4: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_thread->Wait.queue = NULL;
2007da8: c0 26 60 44 clr [ %i1 + 0x44 ]
the_thread->resource_count = 0;
2007dac: c0 26 60 1c clr [ %i1 + 0x1c ]
the_thread->suspend_count = 0;
2007db0: c0 26 60 70 clr [ %i1 + 0x70 ]
the_thread->real_priority = priority;
2007db4: fa 26 60 18 st %i5, [ %i1 + 0x18 ]
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
2007db8: 40 00 02 1a call 2008620 <_Thread_Set_priority>
2007dbc: fa 26 60 bc st %i5, [ %i1 + 0xbc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007dc0: c4 06 60 08 ld [ %i1 + 8 ], %g2
2007dc4: c6 06 20 1c ld [ %i0 + 0x1c ], %g3
2007dc8: 03 00 00 3f sethi %hi(0xfc00), %g1
2007dcc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2007dd0: 84 08 80 01 and %g2, %g1, %g2
2007dd4: 85 28 a0 02 sll %g2, 2, %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2007dd8: e4 26 60 0c st %l2, [ %i1 + 0xc ]
/*
* Initialize the CPU usage statistics
*/
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
the_thread->cpu_time_used.tv_sec = 0;
2007ddc: c0 26 60 84 clr [ %i1 + 0x84 ]
the_thread->cpu_time_used.tv_nsec = 0;
2007de0: c0 26 60 88 clr [ %i1 + 0x88 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2007de4: f2 20 c0 02 st %i1, [ %g3 + %g2 ]
* enabled when we get here. We want to be able to run the
* user extensions with dispatching enabled. The Allocator
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
2007de8: 90 10 00 19 mov %i1, %o0
2007dec: 40 00 03 e9 call 2008d90 <_User_extensions_Thread_create>
2007df0: b0 10 20 01 mov 1, %i0
if ( !extension_status ) {
2007df4: 80 8a 20 ff btst 0xff, %o0
2007df8: 12 80 00 0e bne 2007e30 <_Thread_Initialize+0x138> <== ALWAYS TAKEN
2007dfc: 80 a4 20 00 cmp %l0, 0
if ( extensions_area )
2007e00: 02 80 00 05 be 2007e14 <_Thread_Initialize+0x11c> <== NOT EXECUTED
2007e04: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
(void) _Workspace_Free( extensions_area );
2007e08: 40 00 05 04 call 2009218 <_Workspace_Free> <== NOT EXECUTED
2007e0c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
2007e10: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2007e14: 02 80 00 05 be 2007e28 <_Thread_Initialize+0x130> <== NOT EXECUTED
2007e18: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
2007e1c: 40 00 04 ff call 2009218 <_Workspace_Free> <== NOT EXECUTED
2007e20: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
2007e24: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2007e28: 40 00 02 ba call 2008910 <_Thread_Stack_Free> <== NOT EXECUTED
2007e2c: b0 10 20 00 clr %i0 <== NOT EXECUTED
return FALSE;
}
return TRUE;
}
2007e30: 81 c7 e0 08 ret
2007e34: 81 e8 00 00 restore
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
2007e38: 40 00 04 ff call 2009234 <_Workspace_Allocate>
2007e3c: 90 10 20 88 mov 0x88, %o0
if ( !fp_area ) {
2007e40: b4 92 20 00 orcc %o0, 0, %i2
2007e44: 12 bf ff bc bne 2007d34 <_Thread_Initialize+0x3c> <== ALWAYS TAKEN
2007e48: 82 10 00 1a mov %i2, %g1
_Thread_Stack_Free( the_thread );
2007e4c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2007e50: 40 00 02 b0 call 2008910 <_Thread_Stack_Free> <== NOT EXECUTED
2007e54: b0 10 20 00 clr %i0 <== NOT EXECUTED
2007e58: 81 c7 e0 08 ret <== NOT EXECUTED
2007e5c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
2007e60: 90 02 20 01 inc %o0
2007e64: 40 00 04 f4 call 2009234 <_Workspace_Allocate>
2007e68: 91 2a 20 02 sll %o0, 2, %o0
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
2007e6c: a0 92 20 00 orcc %o0, 0, %l0
2007e70: 02 80 00 1b be 2007edc <_Thread_Initialize+0x1e4> <== NEVER TAKEN
2007e74: c2 06 e3 b4 ld [ %i3 + 0x3b4 ], %g1
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007e78: 80 a0 7f ff cmp %g1, -1
2007e7c: 02 bf ff bc be 2007d6c <_Thread_Initialize+0x74> <== NEVER TAKEN
2007e80: e0 26 61 74 st %l0, [ %i1 + 0x174 ]
2007e84: 86 10 20 00 clr %g3
2007e88: 88 10 00 10 mov %l0, %g4
2007e8c: c4 07 00 00 ld [ %i4 ], %g2
the_thread->extensions[i] = NULL;
2007e90: 83 28 e0 02 sll %g3, 2, %g1
* call.
*/
if ( the_thread->extensions ) {
uint32_t i;
for ( i = 0; i < (_Thread_Maximum_extensions + 1); i++ )
2007e94: 86 00 e0 01 inc %g3
2007e98: 84 00 a0 01 inc %g2
2007e9c: 80 a0 80 03 cmp %g2, %g3
2007ea0: 18 bf ff fb bgu 2007e8c <_Thread_Initialize+0x194>
2007ea4: c0 21 00 01 clr [ %g4 + %g1 ]
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
2007ea8: 10 bf ff b2 b 2007d70 <_Thread_Initialize+0x78>
2007eac: c2 07 a0 64 ld [ %fp + 0x64 ], %g1
*/
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
2007eb0: 90 10 00 19 mov %i1, %o0
2007eb4: 40 00 02 7b call 20088a0 <_Thread_Stack_Allocate>
2007eb8: 92 10 00 1b mov %i3, %o1
if ( !actual_stack_size || actual_stack_size < stack_size )
2007ebc: 80 a2 20 00 cmp %o0, 0
2007ec0: 02 80 00 0e be 2007ef8 <_Thread_Initialize+0x200>
2007ec4: 80 a6 c0 08 cmp %i3, %o0
2007ec8: 18 80 00 0c bgu 2007ef8 <_Thread_Initialize+0x200> <== NEVER TAKEN
2007ecc: 82 10 20 01 mov 1, %g1
return FALSE; /* stack allocation failed */
stack = the_thread->Start.stack;
2007ed0: f4 06 60 d0 ld [ %i1 + 0xd0 ], %i2
the_thread->Start.core_allocated_stack = TRUE;
2007ed4: 10 bf ff 92 b 2007d1c <_Thread_Initialize+0x24>
2007ed8: c2 2e 60 c0 stb %g1, [ %i1 + 0xc0 ]
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area ) {
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
2007edc: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
2007ee0: 02 80 00 04 be 2007ef0 <_Thread_Initialize+0x1f8> <== NOT EXECUTED
2007ee4: 01 00 00 00 nop <== NOT EXECUTED
(void) _Workspace_Free( fp_area );
2007ee8: 40 00 04 cc call 2009218 <_Workspace_Free> <== NOT EXECUTED
2007eec: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
#endif
_Thread_Stack_Free( the_thread );
2007ef0: 40 00 02 88 call 2008910 <_Thread_Stack_Free> <== NOT EXECUTED
2007ef4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2007ef8: 81 c7 e0 08 ret
2007efc: 91 e8 20 00 restore %g0, 0, %o0
0200d75c <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
200d75c: 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;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200d760: c4 1e 20 b0 ldd [ %i0 + 0xb0 ], %g2
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200d764: c2 0e 20 ac ldub [ %i0 + 0xac ], %g1
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
200d768: c4 26 20 7c st %g2, [ %i0 + 0x7c ]
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->suspend_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
200d76c: c2 2e 20 76 stb %g1, [ %i0 + 0x76 ]
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
200d770: c6 26 20 80 st %g3, [ %i0 + 0x80 ]
the_thread->Start.pointer_argument = pointer_argument;
200d774: f2 26 20 a4 st %i1, [ %i0 + 0xa4 ]
the_thread->Start.numeric_argument = numeric_argument;
200d778: f4 26 20 a8 st %i2, [ %i0 + 0xa8 ]
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
200d77c: c0 26 20 1c clr [ %i0 + 0x1c ]
the_thread->suspend_count = 0;
200d780: 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 ) ) {
200d784: 7f ff ee 2d call 2009038 <_Thread_queue_Extract_with_proxy>
200d788: 90 10 00 18 mov %i0, %o0
200d78c: 80 8a 20 ff btst 0xff, %o0
200d790: 32 80 00 07 bne,a 200d7ac <_Thread_Reset+0x50>
200d794: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
if ( _Watchdog_Is_active( &the_thread->Timer ) )
200d798: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200d79c: 80 a0 60 02 cmp %g1, 2
200d7a0: 02 80 00 0c be 200d7d0 <_Thread_Reset+0x74> <== NEVER TAKEN
200d7a4: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
200d7a8: f2 06 20 bc ld [ %i0 + 0xbc ], %i1
200d7ac: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
200d7b0: 80 a0 40 19 cmp %g1, %i1
200d7b4: 02 80 00 05 be 200d7c8 <_Thread_Reset+0x6c>
200d7b8: 01 00 00 00 nop
the_thread->real_priority = the_thread->Start.initial_priority;
200d7bc: f2 26 20 18 st %i1, [ %i0 + 0x18 ]
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
200d7c0: 7f ff ee a5 call 2009254 <_Thread_Set_priority>
200d7c4: 81 e8 00 00 restore
200d7c8: 81 c7 e0 08 ret
200d7cc: 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 );
200d7d0: 7f ff f1 53 call 2009d1c <_Watchdog_Remove> <== NOT EXECUTED
200d7d4: 90 06 20 48 add %i0, 0x48, %o0 <== NOT EXECUTED
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
200d7d8: 10 bf ff f5 b 200d7ac <_Thread_Reset+0x50> <== NOT EXECUTED
200d7dc: f2 06 20 bc ld [ %i0 + 0xbc ], %i1 <== NOT EXECUTED
0200ca10 <_Thread_Reset_timeslice>:
* ready chain
* select heir
*/
void _Thread_Reset_timeslice( void )
{
200ca10: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
200ca14: 03 00 80 60 sethi %hi(0x2018000), %g1
200ca18: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 20183d4 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
200ca1c: 7f ff d4 f2 call 2001de4 <sparc_disable_interrupts>
200ca20: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
200ca24: b0 10 00 08 mov %o0, %i0
if ( _Chain_Has_only_one_node( ready ) ) {
200ca28: c4 04 40 00 ld [ %l1 ], %g2
200ca2c: c2 04 60 08 ld [ %l1 + 8 ], %g1
200ca30: 80 a0 80 01 cmp %g2, %g1
200ca34: 02 80 00 18 be 200ca94 <_Thread_Reset_timeslice+0x84>
200ca38: 82 04 60 04 add %l1, 4, %g1
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200ca3c: c6 04 00 00 ld [ %l0 ], %g3
previous = the_node->previous;
200ca40: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
200ca44: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
200ca48: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200ca4c: 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;
200ca50: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
200ca54: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
200ca58: 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;
200ca5c: e0 20 40 00 st %l0, [ %g1 ]
return;
}
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
200ca60: 7f ff d4 e5 call 2001df4 <sparc_enable_interrupts>
200ca64: 01 00 00 00 nop
200ca68: 7f ff d4 df call 2001de4 <sparc_disable_interrupts>
200ca6c: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
200ca70: 07 00 80 60 sethi %hi(0x2018000), %g3
200ca74: c2 00 e3 a0 ld [ %g3 + 0x3a0 ], %g1 ! 20183a0 <_Thread_Heir>
200ca78: 80 a4 00 01 cmp %l0, %g1
200ca7c: 02 80 00 08 be 200ca9c <_Thread_Reset_timeslice+0x8c> <== ALWAYS TAKEN
200ca80: 84 10 20 01 mov 1, %g2
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
200ca84: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
200ca88: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ] ! 20183e4 <_Context_Switch_necessary><== NOT EXECUTED
_ISR_Enable( level );
200ca8c: 7f ff d4 da call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200ca90: 81 e8 00 00 restore <== NOT EXECUTED
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( _Chain_Has_only_one_node( ready ) ) {
_ISR_Enable( level );
200ca94: 7f ff d4 d8 call 2001df4 <sparc_enable_interrupts>
200ca98: 81 e8 00 00 restore
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
200ca9c: c2 04 40 00 ld [ %l1 ], %g1
200caa0: c2 20 e3 a0 st %g1, [ %g3 + 0x3a0 ]
_Context_Switch_necessary = TRUE;
200caa4: 03 00 80 60 sethi %hi(0x2018000), %g1
200caa8: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ] ! 20183e4 <_Context_Switch_necessary>
_ISR_Enable( level );
200caac: 7f ff d4 d2 call 2001df4 <sparc_enable_interrupts>
200cab0: 81 e8 00 00 restore
02009f68 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
2009f68: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
2009f6c: 7f ff e2 bb call 2002a58 <sparc_disable_interrupts>
2009f70: 01 00 00 00 nop
2009f74: a0 10 00 08 mov %o0, %l0
if ( force == TRUE )
2009f78: 80 8e 60 ff btst 0xff, %i1
2009f7c: 22 80 00 0d be,a 2009fb0 <_Thread_Resume+0x48> <== NEVER TAKEN
2009f80: c2 06 20 70 ld [ %i0 + 0x70 ], %g1 <== NOT EXECUTED
the_thread->suspend_count = 0;
2009f84: c0 26 20 70 clr [ %i0 + 0x70 ]
if ( the_thread->suspend_count > 0 ) {
_ISR_Enable( level );
return;
}
current_state = the_thread->current_state;
2009f88: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
if ( current_state & STATES_SUSPENDED ) {
2009f8c: 80 88 60 02 btst 2, %g1
2009f90: 02 80 00 06 be 2009fa8 <_Thread_Resume+0x40> <== NEVER TAKEN
2009f94: 01 00 00 00 nop
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
2009f98: 82 08 7f fd and %g1, -3, %g1
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
2009f9c: 80 a0 60 00 cmp %g1, 0
2009fa0: 02 80 00 0a be 2009fc8 <_Thread_Resume+0x60>
2009fa4: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
_Context_Switch_necessary = TRUE;
}
}
}
_ISR_Enable( level );
2009fa8: 7f ff e2 b0 call 2002a68 <sparc_enable_interrupts>
2009fac: 91 e8 00 10 restore %g0, %l0, %o0
_ISR_Disable( level );
if ( force == TRUE )
the_thread->suspend_count = 0;
else
the_thread->suspend_count--;
2009fb0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
if ( the_thread->suspend_count > 0 ) {
2009fb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2009fb8: 02 bf ff f4 be 2009f88 <_Thread_Resume+0x20> <== NOT EXECUTED
2009fbc: c2 26 20 70 st %g1, [ %i0 + 0x70 ] <== NOT EXECUTED
_ISR_Enable( level );
2009fc0: 7f ff e2 aa call 2002a68 <sparc_enable_interrupts> <== NOT EXECUTED
2009fc4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2009fc8: c8 06 20 90 ld [ %i0 + 0x90 ], %g4
2009fcc: c4 16 20 96 lduh [ %i0 + 0x96 ], %g2
2009fd0: 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);
2009fd4: c6 06 20 8c ld [ %i0 + 0x8c ], %g3
2009fd8: 82 10 40 02 or %g1, %g2, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2009fdc: 1b 00 80 93 sethi %hi(0x2024c00), %o5
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
2009fe0: c2 31 00 00 sth %g1, [ %g4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2009fe4: 82 00 e0 04 add %g3, 4, %g1
_Priority_Major_bit_map |= the_priority_map->ready_major;
2009fe8: d8 16 20 94 lduh [ %i0 + 0x94 ], %o4
2009fec: c2 26 00 00 st %g1, [ %i0 ]
2009ff0: c4 13 62 18 lduh [ %o5 + 0x218 ], %g2
old_last_node = the_chain->last;
2009ff4: c8 00 e0 08 ld [ %g3 + 8 ], %g4
the_chain->last = the_node;
2009ff8: f0 20 e0 08 st %i0, [ %g3 + 8 ]
2009ffc: 84 10 80 0c or %g2, %o4, %g2
old_last_node->next = the_node;
the_node->previous = old_last_node;
200a000: c8 26 20 04 st %g4, [ %i0 + 4 ]
200a004: c4 33 62 18 sth %g2, [ %o5 + 0x218 ]
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;
200a008: f0 21 00 00 st %i0, [ %g4 ]
_ISR_Flash( level );
200a00c: 7f ff e2 97 call 2002a68 <sparc_enable_interrupts>
200a010: 90 10 00 10 mov %l0, %o0
200a014: 7f ff e2 91 call 2002a58 <sparc_disable_interrupts>
200a018: 01 00 00 00 nop
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
200a01c: 09 00 80 93 sethi %hi(0x2024c00), %g4
200a020: c4 01 21 f0 ld [ %g4 + 0x1f0 ], %g2 ! 2024df0 <_Thread_Heir>
200a024: c6 06 20 14 ld [ %i0 + 0x14 ], %g3
200a028: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
200a02c: 80 a0 c0 01 cmp %g3, %g1
200a030: 1a bf ff de bcc 2009fa8 <_Thread_Resume+0x40>
200a034: 01 00 00 00 nop
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a038: 03 00 80 93 sethi %hi(0x2024c00), %g1
200a03c: c4 00 62 24 ld [ %g1 + 0x224 ], %g2 ! 2024e24 <_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;
200a040: f0 21 21 f0 st %i0, [ %g4 + 0x1f0 ]
if ( _Thread_Executing->is_preemptible ||
200a044: c2 08 a0 76 ldub [ %g2 + 0x76 ], %g1
200a048: 80 a0 60 00 cmp %g1, 0
200a04c: 02 80 00 06 be 200a064 <_Thread_Resume+0xfc>
200a050: 80 a0 e0 00 cmp %g3, 0
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
200a054: 84 10 20 01 mov 1, %g2
200a058: 03 00 80 93 sethi %hi(0x2024c00), %g1
200a05c: c4 28 62 34 stb %g2, [ %g1 + 0x234 ] ! 2024e34 <_Context_Switch_necessary>
200a060: 30 bf ff d2 b,a 2009fa8 <_Thread_Resume+0x40>
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
200a064: 12 bf ff d1 bne 2009fa8 <_Thread_Resume+0x40> <== ALWAYS TAKEN
200a068: 84 10 20 01 mov 1, %g2
the_thread->current_priority == 0 )
_Context_Switch_necessary = TRUE;
200a06c: 10 bf ff fc b 200a05c <_Thread_Resume+0xf4> <== NOT EXECUTED
200a070: 03 00 80 93 sethi %hi(0x2024c00), %g1 <== NOT EXECUTED
020088a0 <_Thread_Stack_Allocate>:
size_t _Thread_Stack_Allocate(
Thread_Control *the_thread,
size_t stack_size
)
{
20088a0: 9d e3 bf 98 save %sp, -104, %sp
20088a4: 03 00 80 5d sethi %hi(0x2017400), %g1
20088a8: c2 00 60 e0 ld [ %g1 + 0xe0 ], %g1 ! 20174e0 <rtems_minimum_stack_size>
20088ac: 80 a6 40 01 cmp %i1, %g1
20088b0: 2a 80 00 02 bcs,a 20088b8 <_Thread_Stack_Allocate+0x18>
20088b4: b2 10 00 01 mov %g1, %i1
* Call ONLY the CPU table stack allocate hook, _or_ the
* the RTEMS workspace allocate. This is so the stack free
* routine can call the correct deallocation routine.
*/
if ( _Configuration_Table->stack_allocate_hook ) {
20088b8: 03 00 80 60 sethi %hi(0x2018000), %g1
20088bc: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 20183ac <_Configuration_Table>
20088c0: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1
20088c4: 80 a0 60 00 cmp %g1, 0
20088c8: 22 80 00 0a be,a 20088f0 <_Thread_Stack_Allocate+0x50> <== ALWAYS TAKEN
20088cc: b2 06 60 10 add %i1, 0x10, %i1
stack_addr = (*_Configuration_Table->stack_allocate_hook)( the_stack_size );
20088d0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20088d4: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
20088d8: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ] <== NOT EXECUTED
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
20088dc: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
20088e0: b0 60 20 00 subx %g0, 0, %i0 <== NOT EXECUTED
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
20088e4: b0 0e 40 18 and %i1, %i0, %i0 <== NOT EXECUTED
20088e8: 81 c7 e0 08 ret <== NOT EXECUTED
20088ec: 81 e8 00 00 restore <== NOT EXECUTED
* get and keep the stack adjust factor, the stack alignment, and
* the context initialization sequence in sync.
*/
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
20088f0: 40 00 02 51 call 2009234 <_Workspace_Allocate>
20088f4: 90 10 00 19 mov %i1, %o0
}
if ( !stack_addr )
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
20088f8: d0 26 20 d0 st %o0, [ %i0 + 0xd0 ]
the_stack_size = _Stack_Adjust_size( the_stack_size );
stack_addr = _Workspace_Allocate( the_stack_size );
}
if ( !stack_addr )
20088fc: 80 a0 00 08 cmp %g0, %o0
2008900: b0 60 20 00 subx %g0, 0, %i0
the_stack_size = 0;
the_thread->Start.stack = stack_addr;
return the_stack_size;
}
2008904: b0 0e 40 18 and %i1, %i0, %i0
2008908: 81 c7 e0 08 ret
200890c: 81 e8 00 00 restore
02008910 <_Thread_Stack_Free>:
*/
void _Thread_Stack_Free(
Thread_Control *the_thread
)
{
2008910: 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 )
2008914: c2 0e 20 c0 ldub [ %i0 + 0xc0 ], %g1
2008918: 80 a0 60 00 cmp %g1, 0
200891c: 02 80 00 09 be 2008940 <_Thread_Stack_Free+0x30> <== NEVER TAKEN
2008920: 03 00 80 60 sethi %hi(0x2018000), %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 ( _Configuration_Table->stack_free_hook )
2008924: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 20183ac <_Configuration_Table>
2008928: c2 00 a0 24 ld [ %g2 + 0x24 ], %g1
200892c: 80 a0 60 00 cmp %g1, 0
2008930: 22 80 00 06 be,a 2008948 <_Thread_Stack_Free+0x38> <== ALWAYS TAKEN
2008934: f0 06 20 c8 ld [ %i0 + 0xc8 ], %i0
(*_Configuration_Table->stack_free_hook)(
2008938: 9f c0 40 00 call %g1 <== NOT EXECUTED
200893c: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED
2008940: 81 c7 e0 08 ret <== NOT EXECUTED
2008944: 81 e8 00 00 restore <== NOT EXECUTED
the_thread->Start.Initial_stack.area
);
else
_Workspace_Free( the_thread->Start.Initial_stack.area );
2008948: 40 00 02 34 call 2009218 <_Workspace_Free>
200894c: 81 e8 00 00 restore
020089f4 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
20089f4: 9d e3 bf 98 save %sp, -104, %sp
Thread_Control *executing;
executing = _Thread_Executing;
20089f8: 03 00 80 60 sethi %hi(0x2018000), %g1
20089fc: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 20183d4 <_Thread_Executing>
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
2008a00: c4 0c 20 76 ldub [ %l0 + 0x76 ], %g2
2008a04: 80 a0 a0 00 cmp %g2, 0
2008a08: 02 80 00 23 be 2008a94 <_Thread_Tickle_timeslice+0xa0>
2008a0c: 01 00 00 00 nop
return;
if ( !_States_Is_ready( executing->current_state ) )
2008a10: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2008a14: 80 a0 60 00 cmp %g1, 0
2008a18: 12 80 00 1f bne 2008a94 <_Thread_Tickle_timeslice+0xa0>
2008a1c: 01 00 00 00 nop
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
2008a20: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
2008a24: 80 a0 60 01 cmp %g1, 1
2008a28: 0a 80 00 07 bcs 2008a44 <_Thread_Tickle_timeslice+0x50>
2008a2c: 80 a0 60 02 cmp %g1, 2
2008a30: 28 80 00 10 bleu,a 2008a70 <_Thread_Tickle_timeslice+0x7c>
2008a34: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
2008a38: 80 a0 60 03 cmp %g1, 3
2008a3c: 22 80 00 04 be,a 2008a4c <_Thread_Tickle_timeslice+0x58> <== ALWAYS TAKEN
2008a40: c2 04 20 78 ld [ %l0 + 0x78 ], %g1
2008a44: 81 c7 e0 08 ret
2008a48: 81 e8 00 00 restore
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
}
break;
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
2008a4c: 82 00 7f ff add %g1, -1, %g1
2008a50: 80 a0 60 00 cmp %g1, 0
2008a54: 12 bf ff fc bne 2008a44 <_Thread_Tickle_timeslice+0x50>
2008a58: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
(*executing->budget_callout)( executing );
2008a5c: c2 04 20 80 ld [ %l0 + 0x80 ], %g1
2008a60: 9f c0 40 00 call %g1
2008a64: 90 10 00 10 mov %l0, %o0
2008a68: 81 c7 e0 08 ret
2008a6c: 81 e8 00 00 restore
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
break;
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
2008a70: 82 00 7f ff add %g1, -1, %g1
2008a74: 80 a0 60 00 cmp %g1, 0
2008a78: 14 bf ff f3 bg 2008a44 <_Thread_Tickle_timeslice+0x50>
2008a7c: c2 24 20 78 st %g1, [ %l0 + 0x78 ]
_Thread_Reset_timeslice();
2008a80: 40 00 0f e4 call 200ca10 <_Thread_Reset_timeslice>
2008a84: 01 00 00 00 nop
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
2008a88: 03 00 80 60 sethi %hi(0x2018000), %g1
2008a8c: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 2018268 <_Thread_Ticks_per_timeslice>
2008a90: c4 24 20 78 st %g2, [ %l0 + 0x78 ]
2008a94: 81 c7 e0 08 ret
2008a98: 81 e8 00 00 restore
02008a9c <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
2008a9c: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
2008aa0: 03 00 80 60 sethi %hi(0x2018000), %g1
2008aa4: e0 00 63 d4 ld [ %g1 + 0x3d4 ], %l0 ! 20183d4 <_Thread_Executing>
ready = executing->ready;
_ISR_Disable( level );
2008aa8: 7f ff e4 cf call 2001de4 <sparc_disable_interrupts>
2008aac: e2 04 20 8c ld [ %l0 + 0x8c ], %l1
2008ab0: b0 10 00 08 mov %o0, %i0
if ( !_Chain_Has_only_one_node( ready ) ) {
2008ab4: c4 04 40 00 ld [ %l1 ], %g2
2008ab8: c2 04 60 08 ld [ %l1 + 8 ], %g1
2008abc: 80 a0 80 01 cmp %g2, %g1
2008ac0: 02 80 00 19 be 2008b24 <_Thread_Yield_processor+0x88>
2008ac4: 82 04 60 04 add %l1, 4, %g1
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2008ac8: c6 04 00 00 ld [ %l0 ], %g3
previous = the_node->previous;
2008acc: c4 04 20 04 ld [ %l0 + 4 ], %g2
next->previous = previous;
previous->next = next;
2008ad0: c6 20 80 00 st %g3, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2008ad4: c2 24 00 00 st %g1, [ %l0 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2008ad8: 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;
2008adc: c2 04 60 08 ld [ %l1 + 8 ], %g1
the_chain->last = the_node;
2008ae0: e0 24 60 08 st %l0, [ %l1 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2008ae4: 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;
2008ae8: e0 20 40 00 st %l0, [ %g1 ]
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
2008aec: 7f ff e4 c2 call 2001df4 <sparc_enable_interrupts>
2008af0: 01 00 00 00 nop
2008af4: 7f ff e4 bc call 2001de4 <sparc_disable_interrupts>
2008af8: 01 00 00 00 nop
if ( _Thread_Is_heir( executing ) )
2008afc: 07 00 80 60 sethi %hi(0x2018000), %g3
2008b00: c2 00 e3 a0 ld [ %g3 + 0x3a0 ], %g1 ! 20183a0 <_Thread_Heir>
2008b04: 80 a4 00 01 cmp %l0, %g1
2008b08: 22 80 00 0d be,a 2008b3c <_Thread_Yield_processor+0xa0> <== ALWAYS TAKEN
2008b0c: c2 04 40 00 ld [ %l1 ], %g1
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = TRUE;
2008b10: 84 10 20 01 mov 1, %g2
2008b14: 03 00 80 60 sethi %hi(0x2018000), %g1
2008b18: c4 28 63 e4 stb %g2, [ %g1 + 0x3e4 ] ! 20183e4 <_Context_Switch_necessary>
_ISR_Enable( level );
2008b1c: 7f ff e4 b6 call 2001df4 <sparc_enable_interrupts>
2008b20: 81 e8 00 00 restore
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = TRUE;
}
else if ( !_Thread_Is_heir( executing ) )
2008b24: 03 00 80 60 sethi %hi(0x2018000), %g1
2008b28: c4 00 63 a0 ld [ %g1 + 0x3a0 ], %g2 ! 20183a0 <_Thread_Heir>
2008b2c: 80 a4 00 02 cmp %l0, %g2
2008b30: 12 bf ff f9 bne 2008b14 <_Thread_Yield_processor+0x78> <== NEVER TAKEN
2008b34: 84 10 20 01 mov 1, %g2
2008b38: 30 bf ff f9 b,a 2008b1c <_Thread_Yield_processor+0x80>
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
2008b3c: 10 bf ff f5 b 2008b10 <_Thread_Yield_processor+0x74>
2008b40: c2 20 e3 a0 st %g1, [ %g3 + 0x3a0 ]
02008220 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
2008220: 9d e3 bf 98 save %sp, -104, %sp
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
2008224: 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);
2008228: 82 06 60 3c add %i1, 0x3c, %g1
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
200822c: 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);
2008230: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_chain->permanent_null = NULL;
2008234: c0 26 60 3c clr [ %i1 + 0x3c ]
the_chain->last = _Chain_Head(the_chain);
2008238: c4 26 60 40 st %g2, [ %i1 + 0x40 ]
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
200823c: ac 10 00 18 mov %i0, %l6
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 ) )
2008240: 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);
2008244: 83 34 a0 06 srl %l2, 6, %g1
2008248: 12 80 00 30 bne 2008308 <_Thread_queue_Enqueue_priority+0xe8>
200824c: ea 06 20 38 ld [ %i0 + 0x38 ], %l5
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2008250: 85 28 60 04 sll %g1, 4, %g2
2008254: 83 28 60 02 sll %g1, 2, %g1
2008258: 82 20 80 01 sub %g2, %g1, %g1
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
200825c: b0 10 00 01 mov %g1, %i0
2008260: 82 05 80 01 add %l6, %g1, %g1
2008264: 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 );
2008268: 7f ff e6 df call 2001de4 <sparc_disable_interrupts>
200826c: 01 00 00 00 nop
2008270: a8 10 00 08 mov %o0, %l4
search_thread = (Thread_Control *) header->first;
2008274: e0 05 80 18 ld [ %l6 + %i0 ], %l0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
2008278: 80 a4 00 13 cmp %l0, %l3
200827c: 32 80 00 18 bne,a 20082dc <_Thread_queue_Enqueue_priority+0xbc>
2008280: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
2008284: 10 80 00 81 b 2008488 <_Thread_queue_Enqueue_priority+0x268>
2008288: a2 10 3f ff mov -1, %l1
if ( priority <= search_priority )
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.next;
if ( _Chain_Is_tail( header, (Chain_Node *)search_thread ) )
200828c: 80 a4 00 13 cmp %l0, %l3
2008290: 02 80 00 17 be 20082ec <_Thread_queue_Enqueue_priority+0xcc>
2008294: 90 10 00 14 mov %l4, %o0
break;
search_priority = search_thread->current_priority;
2008298: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority <= search_priority )
200829c: 80 a4 80 11 cmp %l2, %l1
20082a0: 28 80 00 14 bleu,a 20082f0 <_Thread_queue_Enqueue_priority+0xd0>
20082a4: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
break;
#endif
_ISR_Flash( level );
20082a8: 7f ff e6 d3 call 2001df4 <sparc_enable_interrupts>
20082ac: 90 10 00 14 mov %l4, %o0
20082b0: 7f ff e6 cd call 2001de4 <sparc_disable_interrupts>
20082b4: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
20082b8: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20082bc: 80 8d 40 01 btst %l5, %g1
20082c0: 02 80 00 6b be 200846c <_Thread_queue_Enqueue_priority+0x24c><== NEVER TAKEN
20082c4: 01 00 00 00 nop
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
20082c8: 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 ) ) {
20082cc: 80 a4 00 13 cmp %l0, %l3
20082d0: 02 80 00 07 be 20082ec <_Thread_queue_Enqueue_priority+0xcc>
20082d4: 90 10 00 14 mov %l4, %o0
search_priority = search_thread->current_priority;
20082d8: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority <= search_priority )
20082dc: 80 a4 80 11 cmp %l2, %l1
20082e0: 38 bf ff eb bgu,a 200828c <_Thread_queue_Enqueue_priority+0x6c>
20082e4: 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 ) ) {
20082e8: 90 10 00 14 mov %l4, %o0
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
20082ec: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
20082f0: 80 a6 20 01 cmp %i0, 1
20082f4: 02 80 00 47 be 2008410 <_Thread_queue_Enqueue_priority+0x1f0><== ALWAYS TAKEN
20082f8: 80 a4 80 11 cmp %l2, %l1
* For example, the blocking thread could have been given
* the mutex by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
*level_p = level;
20082fc: d0 26 80 00 st %o0, [ %i2 ] <== NOT EXECUTED
return the_thread_queue->sync_state;
}
2008300: 81 c7 e0 08 ret <== NOT EXECUTED
2008304: 81 e8 00 00 restore <== NOT EXECUTED
the_node->previous = previous_node;
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
2008308: 85 28 60 04 sll %g1, 4, %g2
200830c: 83 28 60 02 sll %g1, 2, %g1
2008310: 82 20 80 01 sub %g2, %g1, %g1
2008314: 05 00 80 5d sethi %hi(0x2017400), %g2
2008318: a6 06 00 01 add %i0, %g1, %l3
200831c: ae 10 a0 e4 or %g2, 0xe4, %l7
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
2008320: b0 10 00 13 mov %l3, %i0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2008324: c2 0d c0 00 ldub [ %l7 ], %g1
_ISR_Disable( level );
2008328: 7f ff e6 af call 2001de4 <sparc_disable_interrupts>
200832c: a2 00 60 01 add %g1, 1, %l1
2008330: a8 10 00 08 mov %o0, %l4
search_thread = (Thread_Control *) header->last;
2008334: e0 06 20 08 ld [ %i0 + 8 ], %l0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
2008338: 80 a4 c0 10 cmp %l3, %l0
200833c: 22 80 00 25 be,a 20083d0 <_Thread_queue_Enqueue_priority+0x1b0>
2008340: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
search_priority = search_thread->current_priority;
2008344: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority >= search_priority )
2008348: 80 a4 80 11 cmp %l2, %l1
200834c: 3a 80 00 21 bcc,a 20083d0 <_Thread_queue_Enqueue_priority+0x1b0>
2008350: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
2008354: e0 04 20 04 ld [ %l0 + 4 ], %l0
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
2008358: 80 a4 c0 10 cmp %l3, %l0
200835c: 32 80 00 19 bne,a 20083c0 <_Thread_queue_Enqueue_priority+0x1a0>
2008360: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
2008364: 10 80 00 1b b 20083d0 <_Thread_queue_Enqueue_priority+0x1b0>
2008368: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
200836c: 7f ff e6 a2 call 2001df4 <sparc_enable_interrupts>
2008370: 90 10 00 14 mov %l4, %o0
2008374: 7f ff e6 9c call 2001de4 <sparc_disable_interrupts>
2008378: 01 00 00 00 nop
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
200837c: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
2008380: 80 8d 40 01 btst %l5, %g1
2008384: 02 80 00 3d be 2008478 <_Thread_queue_Enqueue_priority+0x258><== NEVER TAKEN
2008388: 01 00 00 00 nop
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
200838c: 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 ) ) {
2008390: 80 a4 00 13 cmp %l0, %l3
2008394: 22 80 00 0f be,a 20083d0 <_Thread_queue_Enqueue_priority+0x1b0>
2008398: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
search_priority = search_thread->current_priority;
200839c: e2 04 20 14 ld [ %l0 + 0x14 ], %l1
if ( priority >= search_priority )
20083a0: 80 a4 80 11 cmp %l2, %l1
20083a4: 3a 80 00 0b bcc,a 20083d0 <_Thread_queue_Enqueue_priority+0x1b0><== ALWAYS TAKEN
20083a8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
break;
#if ( CPU_UNROLL_ENQUEUE_PRIORITY == TRUE )
search_thread = (Thread_Control *) search_thread->Object.Node.previous;
20083ac: e0 04 20 04 ld [ %l0 + 4 ], %l0 <== NOT EXECUTED
if ( _Chain_Is_head( header, (Chain_Node *)search_thread ) )
20083b0: 80 a4 00 13 cmp %l0, %l3 <== NOT EXECUTED
20083b4: 22 80 00 07 be,a 20083d0 <_Thread_queue_Enqueue_priority+0x1b0><== NOT EXECUTED
20083b8: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0 <== NOT EXECUTED
break;
search_priority = search_thread->current_priority;
20083bc: e2 04 20 14 ld [ %l0 + 0x14 ], %l1 <== NOT EXECUTED
if ( priority >= search_priority )
20083c0: 80 a4 80 11 cmp %l2, %l1
20083c4: 0a bf ff ea bcs 200836c <_Thread_queue_Enqueue_priority+0x14c>
20083c8: 01 00 00 00 nop
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
20083cc: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
20083d0: 80 a6 20 01 cmp %i0, 1
20083d4: 12 bf ff ca bne 20082fc <_Thread_queue_Enqueue_priority+0xdc><== NEVER TAKEN
20083d8: 90 10 00 14 mov %l4, %o0
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
20083dc: 80 a4 80 11 cmp %l2, %l1
20083e0: 02 80 00 18 be 2008440 <_Thread_queue_Enqueue_priority+0x220>
20083e4: c0 25 a0 30 clr [ %l6 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
20083e8: c2 04 00 00 ld [ %l0 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
20083ec: 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;
20083f0: 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;
20083f4: ec 26 60 44 st %l6, [ %i1 + 0x44 ]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
next_node->previous = the_node;
20083f8: f2 20 60 04 st %i1, [ %g1 + 4 ]
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;
20083fc: f2 24 00 00 st %i1, [ %l0 ]
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008400: 7f ff e6 7d call 2001df4 <sparc_enable_interrupts>
2008404: 01 00 00 00 nop
2008408: 81 c7 e0 08 ret
200840c: 81 e8 00 00 restore
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
2008410: 02 80 00 0c be 2008440 <_Thread_queue_Enqueue_priority+0x220>
2008414: c0 25 a0 30 clr [ %l6 + 0x30 ]
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
2008418: c2 04 20 04 ld [ %l0 + 4 ], %g1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
200841c: e0 26 40 00 st %l0, [ %i1 ]
the_node->previous = previous_node;
2008420: 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;
2008424: ec 26 60 44 st %l6, [ %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;
2008428: f2 20 40 00 st %i1, [ %g1 ]
search_node->previous = the_node;
200842c: f2 24 20 04 st %i1, [ %l0 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
2008430: 7f ff e6 71 call 2001df4 <sparc_enable_interrupts>
2008434: 90 10 00 14 mov %l4, %o0
2008438: 81 c7 e0 08 ret
200843c: 81 e8 00 00 restore
2008440: 82 04 20 3c add %l0, 0x3c, %g1
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
2008444: c4 00 60 04 ld [ %g1 + 4 ], %g2
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
2008448: c2 26 40 00 st %g1, [ %i1 ]
the_node->previous = previous_node;
200844c: 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;
2008450: ec 26 60 44 st %l6, [ %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;
2008454: f2 20 80 00 st %i1, [ %g2 ]
search_node->previous = the_node;
2008458: f2 20 60 04 st %i1, [ %g1 + 4 ]
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
200845c: 7f ff e6 66 call 2001df4 <sparc_enable_interrupts>
2008460: b0 10 20 01 mov 1, %i0
2008464: 81 c7 e0 08 ret
2008468: 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 );
200846c: 7f ff e6 62 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2008470: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
2008474: 30 bf ff 7d b,a 2008268 <_Thread_queue_Enqueue_priority+0x48><== NOT EXECUTED
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
2008478: 7f ff e6 5f call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200847c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
2008480: 10 bf ff aa b 2008328 <_Thread_queue_Enqueue_priority+0x108><== NOT EXECUTED
2008484: c2 0d c0 00 ldub [ %l7 ], %g1 <== NOT EXECUTED
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
2008488: 10 bf ff 9a b 20082f0 <_Thread_queue_Enqueue_priority+0xd0>
200848c: f0 05 a0 30 ld [ %l6 + 0x30 ], %i0
0200d994 <_Thread_queue_Extract_fifo>:
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
200d994: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200d998: 7f ff d1 13 call 2001de4 <sparc_disable_interrupts>
200d99c: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200d9a0: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200d9a4: 03 00 00 ef sethi %hi(0x3bc00), %g1
200d9a8: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200d9ac: 80 88 80 01 btst %g2, %g1
200d9b0: 02 80 00 19 be 200da14 <_Thread_queue_Extract_fifo+0x80> <== NEVER TAKEN
200d9b4: 01 00 00 00 nop
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
200d9b8: c2 06 40 00 ld [ %i1 ], %g1
previous = the_node->previous;
200d9bc: 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 ) ) {
200d9c0: c6 06 60 50 ld [ %i1 + 0x50 ], %g3
next->previous = previous;
previous->next = next;
200d9c4: c2 20 80 00 st %g1, [ %g2 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
200d9c8: c4 20 60 04 st %g2, [ %g1 + 4 ]
200d9cc: 80 a0 e0 02 cmp %g3, 2
200d9d0: 02 80 00 07 be 200d9ec <_Thread_queue_Extract_fifo+0x58>
200d9d4: c0 26 60 44 clr [ %i1 + 0x44 ]
_ISR_Enable( level );
200d9d8: 7f ff d1 07 call 2001df4 <sparc_enable_interrupts>
200d9dc: 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 );
200d9e0: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200d9e4: 7f ff e7 72 call 20077ac <_Thread_Clear_state>
200d9e8: 81 e8 00 00 restore
200d9ec: 82 10 20 03 mov 3, %g1
200d9f0: c2 26 60 50 st %g1, [ %i1 + 0x50 ]
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
200d9f4: 7f ff d1 00 call 2001df4 <sparc_enable_interrupts>
200d9f8: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_thread->Timer );
200d9fc: 7f ff ed a6 call 2009094 <_Watchdog_Remove>
200da00: 90 06 60 48 add %i1, 0x48, %o0
200da04: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200da08: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200da0c: 7f ff e7 68 call 20077ac <_Thread_Clear_state>
200da10: 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 );
200da14: 7f ff d0 f8 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200da18: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200c798 <_Thread_queue_Extract_priority_helper>:
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
bool requeuing
)
{
200c798: 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 );
200c79c: 7f ff d5 92 call 2001de4 <sparc_disable_interrupts>
200c7a0: b0 10 00 19 mov %i1, %i0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
200c7a4: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
200c7a8: 03 00 00 ef sethi %hi(0x3bc00), %g1
200c7ac: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
200c7b0: 80 88 80 01 btst %g2, %g1
200c7b4: 02 80 00 23 be 200c840 <_Thread_queue_Extract_priority_helper+0xa8><== NEVER TAKEN
200c7b8: 82 06 60 3c add %i1, 0x3c, %g1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200c7bc: 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;
200c7c0: c4 06 40 00 ld [ %i1 ], %g2
previous_node = the_node->previous;
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
200c7c4: 80 a0 c0 01 cmp %g3, %g1
200c7c8: 02 80 00 2a be 200c870 <_Thread_queue_Extract_priority_helper+0xd8>
200c7cc: c2 06 60 04 ld [ %i1 + 4 ], %g1
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
200c7d0: da 06 60 40 ld [ %i1 + 0x40 ], %o5
new_second_node = new_first_node->next;
200c7d4: c8 00 c0 00 ld [ %g3 ], %g4
previous_node->next = new_first_node;
next_node->previous = new_first_node;
200c7d8: 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;
200c7dc: c6 20 40 00 st %g3, [ %g1 ]
next_node->previous = new_first_node;
new_first_node->next = next_node;
200c7e0: c4 20 c0 00 st %g2, [ %g3 ]
new_first_node->previous = previous_node;
200c7e4: c2 20 e0 04 st %g1, [ %g3 + 4 ]
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
200c7e8: c4 06 60 38 ld [ %i1 + 0x38 ], %g2
200c7ec: c2 06 60 40 ld [ %i1 + 0x40 ], %g1
200c7f0: 80 a0 80 01 cmp %g2, %g1
200c7f4: 02 80 00 07 be 200c810 <_Thread_queue_Extract_priority_helper+0x78>
200c7f8: 82 00 e0 38 add %g3, 0x38, %g1
/* > two threads on 2-n */
new_second_node->previous =
200c7fc: c2 21 20 04 st %g1, [ %g4 + 4 ]
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
200c800: c8 20 e0 38 st %g4, [ %g3 + 0x38 ]
new_first_thread->Wait.Block2n.last = last_node;
200c804: da 20 e0 40 st %o5, [ %g3 + 0x40 ]
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
200c808: 82 00 e0 3c add %g3, 0x3c, %g1
200c80c: c2 23 40 00 st %g1, [ %o5 ]
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
200c810: 80 8e a0 ff btst 0xff, %i2
200c814: 12 80 00 0d bne 200c848 <_Thread_queue_Extract_priority_helper+0xb0>
200c818: 01 00 00 00 nop
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
200c81c: c2 06 20 50 ld [ %i0 + 0x50 ], %g1
200c820: 80 a0 60 02 cmp %g1, 2
200c824: 02 80 00 0b be 200c850 <_Thread_queue_Extract_priority_helper+0xb8>
200c828: 82 10 20 03 mov 3, %g1
_ISR_Enable( level );
200c82c: 7f ff d5 72 call 2001df4 <sparc_enable_interrupts>
200c830: 33 04 00 ff sethi %hi(0x1003fc00), %i1
200c834: b2 16 63 f8 or %i1, 0x3f8, %i1 ! 1003fff8 <RAM_END+0xdc3fff8>
200c838: 7f ff eb dd call 20077ac <_Thread_Clear_state>
200c83c: 81 e8 00 00 restore
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 );
200c840: 7f ff d5 6d call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200c844: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
200c848: 7f ff d5 6b call 2001df4 <sparc_enable_interrupts>
200c84c: 91 e8 00 08 restore %g0, %o0, %o0
200c850: 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 );
200c854: 7f ff d5 68 call 2001df4 <sparc_enable_interrupts>
200c858: 33 04 00 ff sethi %hi(0x1003fc00), %i1
(void) _Watchdog_Remove( &the_thread->Timer );
200c85c: 7f ff f2 0e call 2009094 <_Watchdog_Remove>
200c860: 90 06 20 48 add %i0, 0x48, %o0
200c864: b2 16 63 f8 or %i1, 0x3f8, %i1
200c868: 7f ff eb d1 call 20077ac <_Thread_Clear_state>
200c86c: 81 e8 00 00 restore
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;
200c870: 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;
200c874: 10 bf ff e7 b 200c810 <_Thread_queue_Extract_priority_helper+0x78>
200c878: c4 20 40 00 st %g2, [ %g1 ]
0200c87c <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
200c87c: 92 10 00 08 mov %o0, %o1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
200c880: d0 02 20 44 ld [ %o0 + 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_BLOCKING_OPERATION_SYNCHRONIZED &&
200c884: c6 02 20 30 ld [ %o0 + 0x30 ], %g3
200c888: 80 a0 e0 00 cmp %g3, 0
200c88c: 02 80 00 06 be 200c8a4 <_Thread_queue_Process_timeout+0x28>
200c890: 03 00 80 60 sethi %hi(0x2018000), %g1
200c894: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
200c898: 80 a2 40 02 cmp %o1, %g2
200c89c: 02 80 00 07 be 200c8b8 <_Thread_queue_Process_timeout+0x3c><== ALWAYS TAKEN
200c8a0: 80 a0 e0 03 cmp %g3, 3
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200c8a4: c2 02 20 3c ld [ %o0 + 0x3c ], %g1
200c8a8: c2 22 60 34 st %g1, [ %o1 + 0x34 ]
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
200c8ac: 82 13 c0 00 mov %o7, %g1
200c8b0: 7f ff ff af call 200c76c <_Thread_queue_Extract>
200c8b4: 9e 10 40 00 mov %g1, %o7
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
200c8b8: 02 80 00 06 be 200c8d0 <_Thread_queue_Process_timeout+0x54><== NEVER TAKEN
200c8bc: 84 10 20 02 mov 2, %g2
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
200c8c0: c2 02 20 3c ld [ %o0 + 0x3c ], %g1
200c8c4: c2 22 60 34 st %g1, [ %o1 + 0x34 ]
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
200c8c8: 81 c3 e0 08 retl
200c8cc: c4 22 20 30 st %g2, [ %o0 + 0x30 ]
200c8d0: 81 c3 e0 08 retl <== NOT EXECUTED
02008560 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
2008560: 9d e3 bf 90 save %sp, -112, %sp
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
2008564: 80 a6 20 00 cmp %i0, 0
2008568: 02 80 00 13 be 20085b4 <_Thread_queue_Requeue+0x54> <== NEVER TAKEN
200856c: 01 00 00 00 nop
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
2008570: e0 06 20 34 ld [ %i0 + 0x34 ], %l0
2008574: 80 a4 20 01 cmp %l0, 1
2008578: 02 80 00 04 be 2008588 <_Thread_queue_Requeue+0x28> <== ALWAYS TAKEN
200857c: 01 00 00 00 nop
2008580: 81 c7 e0 08 ret <== NOT EXECUTED
2008584: 81 e8 00 00 restore <== NOT EXECUTED
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
2008588: 7f ff e6 17 call 2001de4 <sparc_disable_interrupts>
200858c: 01 00 00 00 nop
2008590: a2 10 00 08 mov %o0, %l1
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
2008594: c4 06 60 10 ld [ %i1 + 0x10 ], %g2
2008598: 03 00 00 ef sethi %hi(0x3bc00), %g1
200859c: 82 10 62 e0 or %g1, 0x2e0, %g1 ! 3bee0 <PROM_START+0x3bee0>
20085a0: 80 88 80 01 btst %g2, %g1
20085a4: 12 80 00 06 bne 20085bc <_Thread_queue_Requeue+0x5c> <== ALWAYS TAKEN
20085a8: 90 10 00 18 mov %i0, %o0
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
20085ac: 7f ff e6 12 call 2001df4 <sparc_enable_interrupts>
20085b0: 90 10 00 11 mov %l1, %o0
20085b4: 81 c7 e0 08 ret
20085b8: 81 e8 00 00 restore
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, TRUE );
20085bc: 92 10 00 19 mov %i1, %o1
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
20085c0: e0 26 20 30 st %l0, [ %i0 + 0x30 ]
20085c4: 40 00 10 75 call 200c798 <_Thread_queue_Extract_priority_helper>
20085c8: 94 10 20 01 mov 1, %o2
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
20085cc: 90 10 00 18 mov %i0, %o0
20085d0: 92 10 00 19 mov %i1, %o1
20085d4: 7f ff ff 13 call 2008220 <_Thread_queue_Enqueue_priority>
20085d8: 94 07 bf f4 add %fp, -12, %o2
20085dc: 30 bf ff f4 b,a 20085ac <_Thread_queue_Requeue+0x4c>
020085e0 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored
)
{
20085e0: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
20085e4: 90 10 00 18 mov %i0, %o0
20085e8: 7f ff fd 98 call 2007c48 <_Thread_Get>
20085ec: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
20085f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
20085f4: 80 a0 60 00 cmp %g1, 0
20085f8: 12 80 00 08 bne 2008618 <_Thread_queue_Timeout+0x38> <== NEVER TAKEN
20085fc: 01 00 00 00 nop
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
2008600: 40 00 10 9f call 200c87c <_Thread_queue_Process_timeout>
2008604: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
2008608: 05 00 80 60 sethi %hi(0x2018000), %g2
200860c: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
2008610: 82 00 7f ff add %g1, -1, %g1
2008614: c2 20 a3 10 st %g1, [ %g2 + 0x310 ]
2008618: 81 c7 e0 08 ret
200861c: 81 e8 00 00 restore
02011c4c <_Timer_Server_body>:
* @param[in] ignored is the the task argument that is ignored
*/
Thread _Timer_Server_body(
uint32_t ignored
)
{
2011c4c: 9d e3 bf 88 save %sp, -120, %sp
2011c50: 05 00 80 c8 sethi %hi(0x2032000), %g2
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011c54: 19 00 80 c8 sethi %hi(0x2032000), %o4
2011c58: c6 03 23 e4 ld [ %o4 + 0x3e4 ], %g3 ! 20323e4 <_Watchdog_Ticks_since_boot>
2011c5c: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011c60: 17 00 80 c8 sethi %hi(0x2032000), %o3
2011c64: c8 02 e3 24 ld [ %o3 + 0x324 ], %g4 ! 2032324 <_TOD_Now>
2011c68: 82 00 60 01 inc %g1
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011c6c: 1b 00 80 c8 sethi %hi(0x2032000), %o5
2011c70: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2011c74: a2 07 bf ec add %fp, -20, %l1
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011c78: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011c7c: a4 07 bf f0 add %fp, -16, %l2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011c80: c0 27 bf f0 clr [ %fp + -16 ]
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011c84: c6 23 61 94 st %g3, [ %o5 + 0x194 ]
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011c88: c8 20 61 90 st %g4, [ %g1 + 0x190 ]
the_chain->last = _Chain_Head(the_chain);
2011c8c: e2 27 bf f4 st %l1, [ %fp + -12 ]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011c90: e4 27 bf ec st %l2, [ %fp + -20 ]
/*
* Initialize the "last time" markers to indicate the timer that
* the server was initiated.
*/
_Timer_Server_ticks_last_time = _Watchdog_Ticks_since_boot;
2011c94: b0 13 23 e4 or %o4, 0x3e4, %i0
2011c98: ac 13 61 94 or %o5, 0x194, %l6
_Timer_Server_seconds_last_time = _TOD_Seconds_since_epoch;
2011c9c: ae 10 61 90 or %g1, 0x190, %l7
2011ca0: b6 12 e3 24 or %o3, 0x324, %i3
2011ca4: a6 10 a2 90 or %g2, 0x290, %l3
/*
* Insert the timers that were inserted before we got to run.
* This should be done with dispatching disabled.
*/
_Thread_Disable_dispatch();
_Timer_Server_process_insertions();
2011ca8: 7f ff ff c3 call 2011bb4 <_Timer_Server_process_insertions>
2011cac: 01 00 00 00 nop
_Thread_Enable_dispatch();
2011cb0: 40 00 0c 15 call 2014d04 <_Thread_Enable_dispatch>
2011cb4: 01 00 00 00 nop
2011cb8: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011cbc: b8 10 61 88 or %g1, 0x188, %i4 ! 2032188 <_Timer_Ticks_chain+0x4>
2011cc0: 03 00 80 cb sethi %hi(0x2032c00), %g1
2011cc4: 05 00 80 c8 sethi %hi(0x2032000), %g2
2011cc8: a8 10 60 40 or %g1, 0x40, %l4
2011ccc: ba 10 a1 9c or %g2, 0x19c, %i5
2011cd0: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011cd4: b4 07 3f fc add %i4, -4, %i2
2011cd8: b2 07 7f fc add %i5, -4, %i1
2011cdc: aa 10 61 b0 or %g1, 0x1b0, %l5
2011ce0: c2 04 c0 00 ld [ %l3 ], %g1
2011ce4: 82 00 60 01 inc %g1
2011ce8: c2 24 c0 00 st %g1, [ %l3 ]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( _Timer_Server, STATES_DELAYING );
2011cec: d0 05 00 00 ld [ %l4 ], %o0
2011cf0: 40 00 0f 09 call 2015914 <_Thread_Set_state>
2011cf4: 92 10 20 08 mov 8, %o1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2011cf8: c2 06 80 00 ld [ %i2 ], %g1
_Timer_Server_reset_ticks_timer();
2011cfc: 80 a0 40 1c cmp %g1, %i4
2011d00: 02 80 00 0a be 2011d28 <_Timer_Server_body+0xdc>
2011d04: 05 00 80 cb sethi %hi(0x2032c00), %g2
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011d08: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
2011d0c: 84 10 a0 40 or %g2, 0x40, %g2
2011d10: d2 00 80 00 ld [ %g2 ], %o1
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2011d14: 11 00 80 c8 sethi %hi(0x2032000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011d18: c2 22 60 54 st %g1, [ %o1 + 0x54 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2011d1c: 90 12 23 74 or %o0, 0x374, %o0
2011d20: 40 00 12 18 call 2016580 <_Watchdog_Insert>
2011d24: 92 02 60 48 add %o1, 0x48, %o1
2011d28: c2 06 40 00 ld [ %i1 ], %g1
_Timer_Server_reset_seconds_timer();
2011d2c: 80 a0 40 1d cmp %g1, %i5
2011d30: 02 80 00 08 be 2011d50 <_Timer_Server_body+0x104>
2011d34: 01 00 00 00 nop
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011d38: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011d3c: 11 00 80 c8 sethi %hi(0x2032000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011d40: c2 25 60 0c st %g1, [ %l5 + 0xc ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011d44: 90 12 23 68 or %o0, 0x368, %o0
2011d48: 40 00 12 0e call 2016580 <_Watchdog_Insert>
2011d4c: 92 10 00 15 mov %l5, %o1
_Thread_Enable_dispatch();
2011d50: 40 00 0b ed call 2014d04 <_Thread_Enable_dispatch>
2011d54: 01 00 00 00 nop
2011d58: c2 04 c0 00 ld [ %l3 ], %g1
2011d5c: 82 00 60 01 inc %g1
2011d60: c2 24 c0 00 st %g1, [ %l3 ]
/*
* 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();
2011d64: d0 05 00 00 ld [ %l4 ], %o0
2011d68: 40 00 12 71 call 201672c <_Watchdog_Remove>
2011d6c: 90 02 20 48 add %o0, 0x48, %o0
_Timer_Server_stop_seconds_timer();
2011d70: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011d74: 40 00 12 6e call 201672c <_Watchdog_Remove>
2011d78: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 20321b0 <_Timer_Seconds_timer>
)
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
2011d7c: c6 06 00 00 ld [ %i0 ], %g3
if ( snapshot >= _Timer_Server_ticks_last_time )
2011d80: c4 05 80 00 ld [ %l6 ], %g2
ticks = snapshot - _Timer_Server_ticks_last_time;
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
2011d84: 82 38 00 02 xnor %g0, %g2, %g1
{
Watchdog_Interval snapshot;
Watchdog_Interval ticks;
snapshot = _Watchdog_Ticks_since_boot;
if ( snapshot >= _Timer_Server_ticks_last_time )
2011d88: 80 a0 c0 02 cmp %g3, %g2
2011d8c: 0a 80 00 03 bcs 2011d98 <_Timer_Server_body+0x14c> <== NEVER TAKEN
2011d90: 92 00 40 03 add %g1, %g3, %o1
ticks = snapshot - _Timer_Server_ticks_last_time;
2011d94: 92 20 c0 02 sub %g3, %g2, %o1
else
ticks = (0xFFFFFFFF - _Timer_Server_ticks_last_time) + snapshot;
_Timer_Server_ticks_last_time = snapshot;
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011d98: 94 10 00 11 mov %l1, %o2
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;
2011d9c: c6 25 80 00 st %g3, [ %l6 ]
_Watchdog_Adjust_to_chain( &_Timer_Ticks_chain, ticks, to_fire );
2011da0: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011da4: 40 00 11 c3 call 20164b0 <_Watchdog_Adjust_to_chain>
2011da8: 90 12 21 84 or %o0, 0x184, %o0 ! 2032184 <_Timer_Ticks_chain>
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011dac: d4 05 c0 00 ld [ %l7 ], %o2
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the _Timer_Seconds_chain to indicate this.
*/
snapshot = _TOD_Seconds_since_epoch;
2011db0: e0 06 c0 00 ld [ %i3 ], %l0
if ( snapshot > _Timer_Server_seconds_last_time ) {
2011db4: 80 a4 00 0a cmp %l0, %o2
2011db8: 18 80 00 1b bgu 2011e24 <_Timer_Server_body+0x1d8>
2011dbc: 92 24 00 0a sub %l0, %o2, %o1
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
} else if ( snapshot < _Timer_Server_seconds_last_time ) {
2011dc0: 0a 80 00 1e bcs 2011e38 <_Timer_Server_body+0x1ec>
2011dc4: 94 22 80 10 sub %o2, %l0, %o2
_Timer_Server_process_seconds_chain( &to_fire );
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011dc8: 7f ff ff 7b call 2011bb4 <_Timer_Server_process_insertions>
2011dcc: e0 25 c0 00 st %l0, [ %l7 ]
/*
* Enable dispatching to process the set that are ready "to fire."
*/
_Thread_Enable_dispatch();
2011dd0: 40 00 0b cd call 2014d04 <_Thread_Enable_dispatch>
2011dd4: 01 00 00 00 nop
2011dd8: 30 80 00 0a b,a 2011e00 <_Timer_Server_body+0x1b4>
if ( watch == NULL ) {
_ISR_Enable( level );
break;
}
watch->state = WATCHDOG_INACTIVE;
2011ddc: c0 24 20 08 clr [ %l0 + 8 ]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
2011de0: c2 27 bf ec st %g1, [ %fp + -20 ]
new_first->previous = _Chain_Head(the_chain);
2011de4: e2 20 60 04 st %l1, [ %g1 + 4 ]
_ISR_Enable( level );
2011de8: 7f ff e5 27 call 200b284 <sparc_enable_interrupts>
2011dec: 01 00 00 00 nop
(*watch->routine)( watch->id, watch->user_data );
2011df0: d2 04 20 24 ld [ %l0 + 0x24 ], %o1
2011df4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2011df8: 9f c0 40 00 call %g1
2011dfc: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
*/
while (1) {
Watchdog_Control *watch;
ISR_Level level;
_ISR_Disable( level );
2011e00: 7f ff e5 1d call 200b274 <sparc_disable_interrupts>
2011e04: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
2011e08: e0 07 bf ec ld [ %fp + -20 ], %l0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
2011e0c: 80 a4 80 10 cmp %l2, %l0
2011e10: 32 bf ff f3 bne,a 2011ddc <_Timer_Server_body+0x190>
2011e14: c2 04 00 00 ld [ %l0 ], %g1
watch = (Watchdog_Control *) _Chain_Get_unprotected( &to_fire );
if ( watch == NULL ) {
_ISR_Enable( level );
2011e18: 7f ff e5 1b call 200b284 <sparc_enable_interrupts>
2011e1c: 01 00 00 00 nop
2011e20: 30 bf ff b0 b,a 2011ce0 <_Timer_Server_body+0x94>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
ticks = snapshot - _Timer_Server_seconds_last_time;
_Watchdog_Adjust_to_chain( &_Timer_Seconds_chain, ticks, to_fire );
2011e24: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011e28: 94 10 00 11 mov %l1, %o2
2011e2c: 40 00 11 a1 call 20164b0 <_Watchdog_Adjust_to_chain>
2011e30: 90 12 21 98 or %o0, 0x198, %o0
2011e34: 30 bf ff e5 b,a 2011dc8 <_Timer_Server_body+0x17c>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
ticks = _Timer_Server_seconds_last_time - snapshot;
_Watchdog_Adjust( &_Timer_Seconds_chain, WATCHDOG_BACKWARD, ticks );
2011e38: 11 00 80 c8 sethi %hi(0x2032000), %o0
2011e3c: 92 10 20 01 mov 1, %o1
2011e40: 40 00 11 6c call 20163f0 <_Watchdog_Adjust>
2011e44: 90 12 21 98 or %o0, 0x198, %o0
2011e48: 30 bf ff e0 b,a 2011dc8 <_Timer_Server_body+0x17c>
02011bb4 <_Timer_Server_process_insertions>:
* onto one of the Timer Server chains.
*
* @note It is only to be called from the Timer Server task.
*/
static void _Timer_Server_process_insertions(void)
{
2011bb4: 9d e3 bf 98 save %sp, -104, %sp
2011bb8: 03 00 80 c8 sethi %hi(0x2032000), %g1
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011bbc: 05 00 80 c8 sethi %hi(0x2032000), %g2
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011bc0: a0 10 61 a4 or %g1, 0x1a4, %l0
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011bc4: 03 00 80 c8 sethi %hi(0x2032000), %g1
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011bc8: a4 10 a1 98 or %g2, 0x198, %l2
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011bcc: a2 10 61 84 or %g1, 0x184, %l1
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011bd0: 40 00 02 ca call 20126f8 <_Chain_Get>
2011bd4: 90 10 00 10 mov %l0, %o0
if ( the_timer == NULL )
2011bd8: 80 a2 20 00 cmp %o0, 0
2011bdc: 02 80 00 0f be 2011c18 <_Timer_Server_process_insertions+0x64>
2011be0: 01 00 00 00 nop
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
2011be4: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011be8: 80 a0 60 01 cmp %g1, 1
2011bec: 02 80 00 12 be 2011c34 <_Timer_Server_process_insertions+0x80>
2011bf0: 80 a0 60 03 cmp %g1, 3
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
2011bf4: 02 80 00 0b be 2011c20 <_Timer_Server_process_insertions+0x6c><== ALWAYS TAKEN
2011bf8: 92 02 20 10 add %o0, 0x10, %o1
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011bfc: 7f ff ff ee call 2011bb4 <_Timer_Server_process_insertions><== NOT EXECUTED
2011c00: 01 00 00 00 nop <== NOT EXECUTED
static void _Timer_Server_process_insertions(void)
{
Timer_Control *the_timer;
while ( 1 ) {
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
2011c04: 40 00 02 bd call 20126f8 <_Chain_Get>
2011c08: 90 10 00 10 mov %l0, %o0
if ( the_timer == NULL )
2011c0c: 80 a2 20 00 cmp %o0, 0
2011c10: 32 bf ff f6 bne,a 2011be8 <_Timer_Server_process_insertions+0x34><== NEVER TAKEN
2011c14: c2 02 20 38 ld [ %o0 + 0x38 ], %g1 <== NOT EXECUTED
2011c18: 81 c7 e0 08 ret
2011c1c: 81 e8 00 00 restore
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &_Timer_Seconds_chain, &the_timer->Ticker );
2011c20: 40 00 12 58 call 2016580 <_Watchdog_Insert>
2011c24: 90 10 00 12 mov %l2, %o0
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011c28: 7f ff ff e3 call 2011bb4 <_Timer_Server_process_insertions>
2011c2c: 01 00 00 00 nop
2011c30: 30 bf ff f5 b,a 2011c04 <_Timer_Server_process_insertions+0x50>
the_timer = (Timer_Control *) _Chain_Get( &_Timer_To_be_inserted );
if ( the_timer == NULL )
break;
if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &_Timer_Ticks_chain, &the_timer->Ticker );
2011c34: 92 02 20 10 add %o0, 0x10, %o1
2011c38: 40 00 12 52 call 2016580 <_Watchdog_Insert>
2011c3c: 90 10 00 11 mov %l1, %o0
}
/*
* Insert the timers that have been requested to be inserted.
*/
_Timer_Server_process_insertions();
2011c40: 7f ff ff dd call 2011bb4 <_Timer_Server_process_insertions>
2011c44: 01 00 00 00 nop
2011c48: 30 bf ff ef b,a 2011c04 <_Timer_Server_process_insertions+0x50>
0200a798 <_Timespec_Divide>:
const struct timespec *lhs,
const struct timespec *rhs,
uint32_t *ival_percentage,
uint32_t *fval_percentage
)
{
200a798: 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;
200a79c: c2 06 40 00 ld [ %i1 ], %g1
right += rhs->tv_nsec;
200a7a0: de 06 60 04 ld [ %i1 + 4 ], %o7
* 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;
200a7a4: 91 38 60 1f sra %g1, 0x1f, %o0
200a7a8: 92 10 00 01 mov %g1, %o1
200a7ac: 83 30 60 1d srl %g1, 0x1d, %g1
200a7b0: 87 2a 60 03 sll %o1, 3, %g3
200a7b4: 85 2a 20 03 sll %o0, 3, %g2
200a7b8: 84 10 40 02 or %g1, %g2, %g2
200a7bc: 83 30 e0 1b srl %g3, 0x1b, %g1
200a7c0: 99 28 a0 05 sll %g2, 5, %o4
200a7c4: 9b 28 e0 05 sll %g3, 5, %o5
200a7c8: 98 10 40 0c or %g1, %o4, %o4
200a7cc: 9a a3 40 03 subcc %o5, %g3, %o5
200a7d0: 83 33 60 1a srl %o5, 0x1a, %g1
200a7d4: 98 63 00 02 subx %o4, %g2, %o4
200a7d8: 97 2b 60 06 sll %o5, 6, %o3
200a7dc: 95 2b 20 06 sll %o4, 6, %o2
200a7e0: 96 a2 c0 0d subcc %o3, %o5, %o3
200a7e4: 94 10 40 0a or %g1, %o2, %o2
200a7e8: 94 62 80 0c subx %o2, %o4, %o2
200a7ec: 96 82 c0 09 addcc %o3, %o1, %o3
200a7f0: 94 42 80 08 addx %o2, %o0, %o2
200a7f4: 83 32 e0 1e srl %o3, 0x1e, %g1
200a7f8: 85 2a a0 02 sll %o2, 2, %g2
200a7fc: 84 10 40 02 or %g1, %g2, %g2
200a800: 87 2a e0 02 sll %o3, 2, %g3
200a804: 96 82 c0 03 addcc %o3, %g3, %o3
200a808: 94 42 80 02 addx %o2, %g2, %o2
200a80c: 83 32 e0 1e srl %o3, 0x1e, %g1
200a810: 85 2a a0 02 sll %o2, 2, %g2
200a814: 84 10 40 02 or %g1, %g2, %g2
200a818: 87 2a e0 02 sll %o3, 2, %g3
200a81c: 96 82 c0 03 addcc %o3, %g3, %o3
200a820: 94 42 80 02 addx %o2, %g2, %o2
200a824: 83 32 e0 1e srl %o3, 0x1e, %g1
200a828: 85 2a a0 02 sll %o2, 2, %g2
200a82c: 84 10 40 02 or %g1, %g2, %g2
200a830: 87 2a e0 02 sll %o3, 2, %g3
200a834: 96 82 c0 03 addcc %o3, %g3, %o3
200a838: 94 42 80 02 addx %o2, %g2, %o2
200a83c: 85 32 e0 17 srl %o3, 0x17, %g2
200a840: 83 2a a0 09 sll %o2, 9, %g1
200a844: 9b 2a e0 09 sll %o3, 9, %o5
200a848: 98 10 80 01 or %g2, %g1, %o4
right += rhs->tv_nsec;
200a84c: 96 83 40 0f addcc %o5, %o7, %o3
200a850: 85 3b e0 1f sra %o7, 0x1f, %g2
/*
* 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;
200a854: e4 06 20 04 ld [ %i0 + 4 ], %l2
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
200a858: 94 43 00 02 addx %o4, %g2, %o2
if ( right == 0 ) {
200a85c: 80 92 80 0b orcc %o2, %o3, %g0
200a860: 02 80 00 5d be 200a9d4 <_Timespec_Divide+0x23c> <== NEVER TAKEN
200a864: d0 06 00 00 ld [ %i0 ], %o0
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a868: 92 10 00 08 mov %o0, %o1
200a86c: 83 32 60 1d srl %o1, 0x1d, %g1
200a870: 9b 2a 60 03 sll %o1, 3, %o5
200a874: 91 3a 20 1f sra %o0, 0x1f, %o0
200a878: 99 2a 20 03 sll %o0, 3, %o4
200a87c: 98 10 40 0c or %g1, %o4, %o4
200a880: 83 33 60 1b srl %o5, 0x1b, %g1
200a884: 85 2b 20 05 sll %o4, 5, %g2
200a888: 87 2b 60 05 sll %o5, 5, %g3
200a88c: 84 10 40 02 or %g1, %g2, %g2
200a890: 86 a0 c0 0d subcc %g3, %o5, %g3
200a894: 83 30 e0 1a srl %g3, 0x1a, %g1
200a898: 84 60 80 0c subx %g2, %o4, %g2
200a89c: 9b 28 e0 06 sll %g3, 6, %o5
200a8a0: 99 28 a0 06 sll %g2, 6, %o4
200a8a4: 9a a3 40 03 subcc %o5, %g3, %o5
200a8a8: 98 10 40 0c or %g1, %o4, %o4
200a8ac: 98 63 00 02 subx %o4, %g2, %o4
200a8b0: 9a 83 40 09 addcc %o5, %o1, %o5
200a8b4: 83 33 60 1e srl %o5, 0x1e, %g1
200a8b8: 98 43 00 08 addx %o4, %o0, %o4
200a8bc: 87 2b 60 02 sll %o5, 2, %g3
200a8c0: 85 2b 20 02 sll %o4, 2, %g2
200a8c4: 9a 83 40 03 addcc %o5, %g3, %o5
200a8c8: 84 10 40 02 or %g1, %g2, %g2
200a8cc: 83 33 60 1e srl %o5, 0x1e, %g1
200a8d0: 98 43 00 02 addx %o4, %g2, %o4
200a8d4: 87 2b 60 02 sll %o5, 2, %g3
200a8d8: 85 2b 20 02 sll %o4, 2, %g2
200a8dc: 9a 83 40 03 addcc %o5, %g3, %o5
200a8e0: 84 10 40 02 or %g1, %g2, %g2
200a8e4: 83 33 60 1e srl %o5, 0x1e, %g1
200a8e8: 98 43 00 02 addx %o4, %g2, %o4
200a8ec: 87 2b 60 02 sll %o5, 2, %g3
200a8f0: 85 2b 20 02 sll %o4, 2, %g2
200a8f4: 9a 83 40 03 addcc %o5, %g3, %o5
200a8f8: 84 10 40 02 or %g1, %g2, %g2
200a8fc: 98 43 00 02 addx %o4, %g2, %o4
200a900: 83 2b 20 09 sll %o4, 9, %g1
200a904: 89 33 60 17 srl %o5, 0x17, %g4
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a908: a6 10 00 12 mov %l2, %l3
/*
* For math simplicity just convert the timespec to nanoseconds
* in a 64-bit integer.
*/
left = lhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
200a90c: a0 11 00 01 or %g4, %g1, %l0
200a910: a3 2b 60 09 sll %o5, 9, %l1
* Put it back in the timespec result.
*
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
200a914: a2 84 40 13 addcc %l1, %l3, %l1
200a918: 83 34 60 1e srl %l1, 0x1e, %g1
200a91c: 87 2c 60 02 sll %l1, 2, %g3
200a920: a5 3c a0 1f sra %l2, 0x1f, %l2
200a924: a0 44 00 12 addx %l0, %l2, %l0
200a928: 85 2c 20 02 sll %l0, 2, %g2
200a92c: 84 10 40 02 or %g1, %g2, %g2
200a930: 83 30 e0 1b srl %g3, 0x1b, %g1
200a934: 99 28 a0 05 sll %g2, 5, %o4
200a938: 9b 28 e0 05 sll %g3, 5, %o5
200a93c: 98 10 40 0c or %g1, %o4, %o4
200a940: 9a a3 40 03 subcc %o5, %g3, %o5
200a944: 98 63 00 02 subx %o4, %g2, %o4
200a948: 9a 83 40 11 addcc %o5, %l1, %o5
200a94c: 83 33 60 1e srl %o5, 0x1e, %g1
200a950: 98 43 00 10 addx %o4, %l0, %o4
200a954: 87 2b 60 02 sll %o5, 2, %g3
200a958: 85 2b 20 02 sll %o4, 2, %g2
200a95c: 9a 83 40 03 addcc %o5, %g3, %o5
200a960: 84 10 40 02 or %g1, %g2, %g2
200a964: 83 33 60 1e srl %o5, 0x1e, %g1
200a968: 87 2b 60 02 sll %o5, 2, %g3
200a96c: 98 43 00 02 addx %o4, %g2, %o4
200a970: 9a 83 40 03 addcc %o5, %g3, %o5
200a974: 85 2b 20 02 sll %o4, 2, %g2
200a978: 84 10 40 02 or %g1, %g2, %g2
200a97c: 83 33 60 1b srl %o5, 0x1b, %g1
200a980: 98 43 00 02 addx %o4, %g2, %o4
200a984: 99 2b 20 05 sll %o4, 5, %o4
200a988: 98 10 40 0c or %g1, %o4, %o4
200a98c: 93 2b 60 05 sll %o5, 5, %o1
200a990: 40 00 36 68 call 2018330 <__udivdi3>
200a994: 90 10 00 0c mov %o4, %o0
*ival_percentage = answer / 1000;
200a998: 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;
200a99c: a0 10 00 08 mov %o0, %l0
200a9a0: a2 10 00 09 mov %o1, %l1
*ival_percentage = answer / 1000;
200a9a4: 96 10 23 e8 mov 0x3e8, %o3
200a9a8: 40 00 36 62 call 2018330 <__udivdi3>
200a9ac: 90 10 00 10 mov %l0, %o0
*fval_percentage = answer % 1000;
200a9b0: 90 10 00 10 mov %l0, %o0
* TODO: Rounding on the last digit of the fval.
*/
answer = (left * 100000) / right;
*ival_percentage = answer / 1000;
200a9b4: d2 26 80 00 st %o1, [ %i2 ]
*fval_percentage = answer % 1000;
200a9b8: 94 10 20 00 clr %o2
200a9bc: 92 10 00 11 mov %l1, %o1
200a9c0: 40 00 37 38 call 20186a0 <__umoddi3>
200a9c4: 96 10 23 e8 mov 0x3e8, %o3
200a9c8: d2 26 c0 00 st %o1, [ %i3 ]
200a9cc: 81 c7 e0 08 ret
200a9d0: 81 e8 00 00 restore
left += lhs->tv_nsec;
right = rhs->tv_sec * (uint64_t)TOD_NANOSECONDS_PER_SECOND;
right += rhs->tv_nsec;
if ( right == 0 ) {
*ival_percentage = 0;
200a9d4: c0 26 80 00 clr [ %i2 ] <== NOT EXECUTED
*fval_percentage = 0;
200a9d8: c0 26 c0 00 clr [ %i3 ] <== NOT EXECUTED
200a9dc: 81 c7 e0 08 ret <== NOT EXECUTED
200a9e0: 81 e8 00 00 restore <== NOT EXECUTED
02008d3c <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
uint32_t the_error
)
{
2008d3c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2008d40: 03 00 80 61 sethi %hi(0x2018400), %g1
2008d44: 82 10 61 48 or %g1, 0x148, %g1 ! 2018548 <_User_extensions_List>
2008d48: e0 00 60 08 ld [ %g1 + 8 ], %l0
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
2008d4c: 80 a4 00 01 cmp %l0, %g1
2008d50: 02 80 00 0e be 2008d88 <_User_extensions_Fatal+0x4c> <== NEVER TAKEN
2008d54: 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 )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
2008d58: b2 0e 60 ff and %i1, 0xff, %i1
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
2008d5c: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
2008d60: 80 a0 60 00 cmp %g1, 0
2008d64: 02 80 00 05 be 2008d78 <_User_extensions_Fatal+0x3c>
2008d68: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
2008d6c: 92 10 00 19 mov %i1, %o1
2008d70: 9f c0 40 00 call %g1
2008d74: 94 10 00 1a mov %i2, %o2
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 ) {
2008d78: 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 ) ;
2008d7c: 80 a4 00 11 cmp %l0, %l1
2008d80: 32 bf ff f8 bne,a 2008d60 <_User_extensions_Fatal+0x24>
2008d84: c2 04 20 30 ld [ %l0 + 0x30 ], %g1
2008d88: 81 c7 e0 08 ret
2008d8c: 81 e8 00 00 restore
02008c04 <_User_extensions_Handler_initialization>:
void _User_extensions_Handler_initialization (
uint32_t number_of_extensions,
User_extensions_Table *initial_extensions
)
{
2008c04: 9d e3 bf 98 save %sp, -104, %sp
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2008c08: 07 00 80 61 sethi %hi(0x2018400), %g3
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2008c0c: 09 00 80 60 sethi %hi(0x2018000), %g4
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2008c10: 84 10 e1 48 or %g3, 0x148, %g2
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2008c14: 82 11 23 14 or %g4, 0x314, %g1
2008c18: 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;
2008c1c: c0 20 a0 04 clr [ %g2 + 4 ]
the_chain->last = _Chain_Head(the_chain);
2008c20: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2008c24: 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);
2008c28: 84 00 a0 04 add %g2, 4, %g2
2008c2c: 82 00 60 04 add %g1, 4, %g1
2008c30: c4 20 e1 48 st %g2, [ %g3 + 0x148 ]
uint32_t i;
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
2008c34: 80 a6 60 00 cmp %i1, 0
2008c38: 02 80 00 18 be 2008c98 <_User_extensions_Handler_initialization+0x94>
2008c3c: c2 21 23 14 st %g1, [ %g4 + 0x314 ]
extension = (User_extensions_Control *)
2008c40: 83 2e 20 02 sll %i0, 2, %g1
2008c44: a1 2e 20 04 sll %i0, 4, %l0
2008c48: a0 24 00 01 sub %l0, %g1, %l0
2008c4c: a0 04 00 18 add %l0, %i0, %l0
2008c50: a1 2c 20 02 sll %l0, 2, %l0
2008c54: 40 00 01 7f call 2009250 <_Workspace_Allocate_or_fatal_error>
2008c58: 90 10 00 10 mov %l0, %o0
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
2008c5c: 94 10 00 10 mov %l0, %o2
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
extension = (User_extensions_Control *)
2008c60: a2 10 00 08 mov %o0, %l1
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
2008c64: 40 00 15 d6 call 200e3bc <memset>
2008c68: 92 10 20 00 clr %o1
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
2008c6c: 80 a6 20 00 cmp %i0, 0
2008c70: 02 80 00 0a be 2008c98 <_User_extensions_Handler_initialization+0x94><== NEVER TAKEN
2008c74: a0 10 20 00 clr %l0
_User_extensions_Add_set (extension, &initial_extensions[i]);
2008c78: 90 10 00 11 mov %l1, %o0
2008c7c: 40 00 0f bb call 200cb68 <_User_extensions_Add_set>
2008c80: 92 10 00 19 mov %i1, %o1
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
2008c84: a0 04 20 01 inc %l0
_User_extensions_Add_set (extension, &initial_extensions[i]);
extension++;
2008c88: a2 04 60 34 add %l1, 0x34, %l1
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
2008c8c: 80 a6 00 10 cmp %i0, %l0
2008c90: 18 bf ff fa bgu 2008c78 <_User_extensions_Handler_initialization+0x74>
2008c94: b2 06 60 20 add %i1, 0x20, %i1
2008c98: 81 c7 e0 08 ret
2008c9c: 81 e8 00 00 restore
0200ae00 <_User_extensions_Remove_set>:
*/
void _User_extensions_Remove_set (
User_extensions_Control *the_extension
)
{
200ae00: 9d e3 bf 98 save %sp, -104, %sp
_Chain_Extract( &the_extension->Node );
200ae04: 40 00 0d 1e call 200e27c <_Chain_Extract>
200ae08: 90 10 00 18 mov %i0, %o0
/*
* If a switch handler is present, remove it.
*/
if ( the_extension->Callouts.thread_switch != NULL )
200ae0c: c2 06 20 24 ld [ %i0 + 0x24 ], %g1
200ae10: 80 a0 60 00 cmp %g1, 0
200ae14: 02 80 00 04 be 200ae24 <_User_extensions_Remove_set+0x24> <== ALWAYS TAKEN
200ae18: 01 00 00 00 nop
_Chain_Extract( &the_extension->Switch.Node );
200ae1c: 40 00 0d 18 call 200e27c <_Chain_Extract> <== NOT EXECUTED
200ae20: 91 ee 20 08 restore %i0, 8, %o0 <== NOT EXECUTED
200ae24: 81 c7 e0 08 ret
200ae28: 81 e8 00 00 restore
02008ca0 <_User_extensions_Thread_begin>:
*/
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
2008ca0: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
2008ca4: 03 00 80 61 sethi %hi(0x2018400), %g1
2008ca8: e0 00 61 48 ld [ %g1 + 0x148 ], %l0 ! 2018548 <_User_extensions_List>
2008cac: 82 10 61 48 or %g1, 0x148, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2008cb0: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008cb4: 80 a4 00 11 cmp %l0, %l1
2008cb8: 02 80 00 0c be 2008ce8 <_User_extensions_Thread_begin+0x48><== NEVER TAKEN
2008cbc: 01 00 00 00 nop
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
2008cc0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
2008cc4: 80 a0 60 00 cmp %g1, 0
2008cc8: 02 80 00 04 be 2008cd8 <_User_extensions_Thread_begin+0x38>
2008ccc: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_begin)( executing );
2008cd0: 9f c0 40 00 call %g1
2008cd4: 01 00 00 00 nop
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008cd8: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008cdc: 80 a4 00 11 cmp %l0, %l1
2008ce0: 32 bf ff f9 bne,a 2008cc4 <_User_extensions_Thread_begin+0x24>
2008ce4: c2 04 20 28 ld [ %l0 + 0x28 ], %g1
2008ce8: 81 c7 e0 08 ret
2008cec: 81 e8 00 00 restore
02008d90 <_User_extensions_Thread_create>:
*/
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
2008d90: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
2008d94: 03 00 80 61 sethi %hi(0x2018400), %g1
2008d98: e0 00 61 48 ld [ %g1 + 0x148 ], %l0 ! 2018548 <_User_extensions_List>
2008d9c: 82 10 61 48 or %g1, 0x148, %g1
2008da0: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008da4: 80 a4 00 11 cmp %l0, %l1
2008da8: 02 80 00 10 be 2008de8 <_User_extensions_Thread_create+0x58><== NEVER TAKEN
2008dac: 03 00 80 60 sethi %hi(0x2018000), %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
status = (*the_extension->Callouts.thread_create)(
2008db0: a4 10 63 d4 or %g1, 0x3d4, %l2 ! 20183d4 <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
2008db4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
2008db8: 80 a0 60 00 cmp %g1, 0
2008dbc: 02 80 00 07 be 2008dd8 <_User_extensions_Thread_create+0x48>
2008dc0: 92 10 00 18 mov %i0, %o1
status = (*the_extension->Callouts.thread_create)(
2008dc4: 9f c0 40 00 call %g1
2008dc8: d0 04 80 00 ld [ %l2 ], %o0
_Thread_Executing,
the_thread
);
if ( !status )
2008dcc: 80 8a 20 ff btst 0xff, %o0
2008dd0: 02 80 00 08 be 2008df0 <_User_extensions_Thread_create+0x60><== NEVER TAKEN
2008dd4: 01 00 00 00 nop
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008dd8: e0 04 00 00 ld [ %l0 ], %l0
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008ddc: 80 a4 00 11 cmp %l0, %l1
2008de0: 32 bf ff f6 bne,a 2008db8 <_User_extensions_Thread_create+0x28>
2008de4: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
return FALSE;
}
}
return TRUE;
}
2008de8: 81 c7 e0 08 ret
2008dec: 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 )
2008df0: 81 c7 e0 08 ret <== NOT EXECUTED
2008df4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02008df8 <_User_extensions_Thread_delete>:
*/
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
2008df8: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2008dfc: 03 00 80 61 sethi %hi(0x2018400), %g1
2008e00: 82 10 61 48 or %g1, 0x148, %g1 ! 2018548 <_User_extensions_List>
2008e04: e0 00 60 08 ld [ %g1 + 8 ], %l0
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
2008e08: 80 a4 00 01 cmp %l0, %g1
2008e0c: 02 80 00 0e be 2008e44 <_User_extensions_Thread_delete+0x4c><== NEVER TAKEN
2008e10: a4 10 00 01 mov %g1, %l2
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
(*the_extension->Callouts.thread_delete)(
2008e14: 03 00 80 60 sethi %hi(0x2018000), %g1
2008e18: a2 10 63 d4 or %g1, 0x3d4, %l1 ! 20183d4 <_Thread_Executing>
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
2008e1c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
2008e20: 80 a0 60 00 cmp %g1, 0
2008e24: 02 80 00 04 be 2008e34 <_User_extensions_Thread_delete+0x3c>
2008e28: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_delete)(
2008e2c: 9f c0 40 00 call %g1
2008e30: d0 04 40 00 ld [ %l1 ], %o0
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 ) {
2008e34: 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 ) ;
2008e38: 80 a4 00 12 cmp %l0, %l2
2008e3c: 32 bf ff f9 bne,a 2008e20 <_User_extensions_Thread_delete+0x28>
2008e40: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
2008e44: 81 c7 e0 08 ret
2008e48: 81 e8 00 00 restore
02008cf0 <_User_extensions_Thread_exitted>:
*/
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
2008cf0: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
2008cf4: 03 00 80 61 sethi %hi(0x2018400), %g1
2008cf8: 82 10 61 48 or %g1, 0x148, %g1 ! 2018548 <_User_extensions_List>
2008cfc: e0 00 60 08 ld [ %g1 + 8 ], %l0
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
2008d00: 80 a4 00 01 cmp %l0, %g1
2008d04: 02 80 00 0c be 2008d34 <_User_extensions_Thread_exitted+0x44><== NEVER TAKEN
2008d08: a2 10 00 01 mov %g1, %l1
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
2008d0c: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
2008d10: 80 a0 60 00 cmp %g1, 0
2008d14: 02 80 00 04 be 2008d24 <_User_extensions_Thread_exitted+0x34>
2008d18: 90 10 00 18 mov %i0, %o0
(*the_extension->Callouts.thread_exitted)( executing );
2008d1c: 9f c0 40 00 call %g1
2008d20: 01 00 00 00 nop
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 ) {
2008d24: 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 ) ;
2008d28: 80 a4 00 11 cmp %l0, %l1
2008d2c: 32 bf ff f9 bne,a 2008d10 <_User_extensions_Thread_exitted+0x20>
2008d30: c2 04 20 2c ld [ %l0 + 0x2c ], %g1
2008d34: 81 c7 e0 08 ret
2008d38: 81 e8 00 00 restore
02009a80 <_User_extensions_Thread_restart>:
*/
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
2009a80: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
2009a84: 03 00 80 70 sethi %hi(0x201c000), %g1
2009a88: e0 00 60 48 ld [ %g1 + 0x48 ], %l0 ! 201c048 <_User_extensions_List>
2009a8c: 82 10 60 48 or %g1, 0x48, %g1
2009a90: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2009a94: 80 a4 00 11 cmp %l0, %l1
2009a98: 02 80 00 0d be 2009acc <_User_extensions_Thread_restart+0x4c><== NEVER TAKEN
2009a9c: 03 00 80 6f sethi %hi(0x201bc00), %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
(*the_extension->Callouts.thread_restart)(
2009aa0: a4 10 62 d4 or %g1, 0x2d4, %l2 ! 201bed4 <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
2009aa4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2009aa8: 80 a0 60 00 cmp %g1, 0
2009aac: 02 80 00 04 be 2009abc <_User_extensions_Thread_restart+0x3c>
2009ab0: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_restart)(
2009ab4: 9f c0 40 00 call %g1
2009ab8: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2009abc: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2009ac0: 80 a4 00 11 cmp %l0, %l1
2009ac4: 32 bf ff f9 bne,a 2009aa8 <_User_extensions_Thread_restart+0x28>
2009ac8: c2 04 20 1c ld [ %l0 + 0x1c ], %g1
2009acc: 81 c7 e0 08 ret
2009ad0: 81 e8 00 00 restore
02008e4c <_User_extensions_Thread_start>:
*/
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
2008e4c: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
2008e50: 03 00 80 61 sethi %hi(0x2018400), %g1
2008e54: e0 00 61 48 ld [ %g1 + 0x148 ], %l0 ! 2018548 <_User_extensions_List>
2008e58: 82 10 61 48 or %g1, 0x148, %g1
2008e5c: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008e60: 80 a4 00 11 cmp %l0, %l1
2008e64: 02 80 00 0d be 2008e98 <_User_extensions_Thread_start+0x4c><== NEVER TAKEN
2008e68: 03 00 80 60 sethi %hi(0x2018000), %g1
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
(*the_extension->Callouts.thread_start)(
2008e6c: a4 10 63 d4 or %g1, 0x3d4, %l2 ! 20183d4 <_Thread_Executing>
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
2008e70: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2008e74: 80 a0 60 00 cmp %g1, 0
2008e78: 02 80 00 04 be 2008e88 <_User_extensions_Thread_start+0x3c>
2008e7c: 92 10 00 18 mov %i0, %o1
(*the_extension->Callouts.thread_start)(
2008e80: 9f c0 40 00 call %g1
2008e84: d0 04 80 00 ld [ %l2 ], %o0
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
2008e88: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
2008e8c: 80 a4 00 11 cmp %l0, %l1
2008e90: 32 bf ff f9 bne,a 2008e74 <_User_extensions_Thread_start+0x28>
2008e94: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2008e98: 81 c7 e0 08 ret
2008e9c: 81 e8 00 00 restore
02008ea0 <_User_extensions_Thread_switch>:
*/
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
2008ea0: 9d e3 bf 98 save %sp, -104, %sp
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
2008ea4: 03 00 80 60 sethi %hi(0x2018000), %g1
2008ea8: e0 00 63 14 ld [ %g1 + 0x314 ], %l0 ! 2018314 <_User_extensions_Switches_list>
2008eac: 82 10 63 14 or %g1, 0x314, %g1
2008eb0: a2 00 60 04 add %g1, 4, %l1
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
2008eb4: 80 a4 00 11 cmp %l0, %l1
2008eb8: 02 80 00 0a be 2008ee0 <_User_extensions_Thread_switch+0x40><== NEVER TAKEN
2008ebc: 01 00 00 00 nop
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
2008ec0: c2 04 20 08 ld [ %l0 + 8 ], %g1
2008ec4: 90 10 00 18 mov %i0, %o0
2008ec8: 9f c0 40 00 call %g1
2008ecc: 92 10 00 19 mov %i1, %o1
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
2008ed0: e0 04 00 00 ld [ %l0 ], %l0
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
2008ed4: 80 a4 00 11 cmp %l0, %l1
2008ed8: 32 bf ff fb bne,a 2008ec4 <_User_extensions_Thread_switch+0x24>
2008edc: c2 04 20 08 ld [ %l0 + 8 ], %g1
2008ee0: 81 c7 e0 08 ret
2008ee4: 81 e8 00 00 restore
0200ad6c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
200ad6c: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
_ISR_Disable( level );
200ad70: 7f ff df 3a call 2002a58 <sparc_disable_interrupts>
200ad74: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200ad78: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200ad7c: a0 06 20 04 add %i0, 4, %l0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
200ad80: 80 a0 80 10 cmp %g2, %l0
200ad84: 02 80 00 1f be 200ae00 <_Watchdog_Adjust+0x94>
200ad88: 80 a6 60 00 cmp %i1, 0
switch ( direction ) {
200ad8c: 12 80 00 1f bne 200ae08 <_Watchdog_Adjust+0x9c>
200ad90: 80 a6 60 01 cmp %i1, 1
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200ad94: 80 a6 a0 00 cmp %i2, 0
200ad98: 02 80 00 1a be 200ae00 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200ad9c: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200ada0: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1
200ada4: 80 a6 80 19 cmp %i2, %i1
200ada8: 1a 80 00 0b bcc 200add4 <_Watchdog_Adjust+0x68> <== ALWAYS TAKEN
200adac: a2 10 20 01 mov 1, %l1
_Watchdog_First( header )->delta_interval -= units;
200adb0: 10 80 00 1d b 200ae24 <_Watchdog_Adjust+0xb8> <== NOT EXECUTED
200adb4: 82 26 40 1a sub %i1, %i2, %g1 <== NOT EXECUTED
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
200adb8: b4 a6 80 19 subcc %i2, %i1, %i2
200adbc: 02 80 00 11 be 200ae00 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200adc0: 01 00 00 00 nop
if ( units < _Watchdog_First( header )->delta_interval ) {
200adc4: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1
200adc8: 80 a6 40 1a cmp %i1, %i2
200adcc: 18 80 00 16 bgu 200ae24 <_Watchdog_Adjust+0xb8>
200add0: 82 26 40 1a sub %i1, %i2, %g1
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
200add4: e2 20 a0 10 st %l1, [ %g2 + 0x10 ]
_ISR_Enable( level );
200add8: 7f ff df 24 call 2002a68 <sparc_enable_interrupts>
200addc: 01 00 00 00 nop
_Watchdog_Tickle( header );
200ade0: 40 00 00 b4 call 200b0b0 <_Watchdog_Tickle>
200ade4: 90 10 00 18 mov %i0, %o0
_ISR_Disable( level );
200ade8: 7f ff df 1c call 2002a58 <sparc_disable_interrupts>
200adec: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200adf0: c2 06 00 00 ld [ %i0 ], %g1
if ( _Chain_Is_empty( header ) )
200adf4: 80 a4 00 01 cmp %l0, %g1
200adf8: 12 bf ff f0 bne 200adb8 <_Watchdog_Adjust+0x4c>
200adfc: 84 10 00 01 mov %g1, %g2
}
break;
}
}
_ISR_Enable( level );
200ae00: 7f ff df 1a call 2002a68 <sparc_enable_interrupts>
200ae04: 91 e8 00 08 restore %g0, %o0, %o0
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
200ae08: 12 bf ff fe bne 200ae00 <_Watchdog_Adjust+0x94> <== NEVER TAKEN
200ae0c: 01 00 00 00 nop
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
200ae10: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200ae14: 82 00 40 1a add %g1, %i2, %g1
200ae18: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
}
break;
}
}
_ISR_Enable( level );
200ae1c: 7f ff df 13 call 2002a68 <sparc_enable_interrupts>
200ae20: 91 e8 00 08 restore %g0, %o0, %o0
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
200ae24: 10 bf ff f7 b 200ae00 <_Watchdog_Adjust+0x94>
200ae28: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
020164b0 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
20164b0: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval units = units_arg;
ISR_Level level;
Chain_Node *node;
if ( !units ) {
20164b4: a2 96 60 00 orcc %i1, 0, %l1
20164b8: 12 80 00 04 bne 20164c8 <_Watchdog_Adjust_to_chain+0x18>
20164bc: 01 00 00 00 nop
20164c0: 81 c7 e0 08 ret
20164c4: 81 e8 00 00 restore
return;
}
_ISR_Disable( level );
20164c8: 7f ff d3 6b call 200b274 <sparc_disable_interrupts>
20164cc: 01 00 00 00 nop
20164d0: a6 10 00 08 mov %o0, %l3
20164d4: c4 06 00 00 ld [ %i0 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20164d8: a0 06 20 04 add %i0, 4, %l0
if ( !_Chain_Is_empty( header ) ) {
20164dc: 80 a0 80 10 cmp %g2, %l0
20164e0: 02 80 00 25 be 2016574 <_Watchdog_Adjust_to_chain+0xc4>
20164e4: a4 06 a0 04 add %i2, 4, %l2
20164e8: f2 00 a0 10 ld [ %g2 + 0x10 ], %i1
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
20164ec: 80 a6 40 11 cmp %i1, %l1
20164f0: 18 80 00 20 bgu 2016570 <_Watchdog_Adjust_to_chain+0xc0>
20164f4: 82 26 40 11 sub %i1, %l1, %g1
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 0;
20164f8: 10 80 00 15 b 201654c <_Watchdog_Adjust_to_chain+0x9c>
20164fc: c0 20 a0 10 clr [ %g2 + 0x10 ]
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
2016500: c2 26 00 00 st %g1, [ %i0 ]
new_first->previous = _Chain_Head(the_chain);
2016504: f0 20 60 04 st %i0, [ %g1 + 4 ]
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
2016508: e4 20 80 00 st %l2, [ %g2 ]
old_last_node = the_chain->last;
201650c: c2 06 a0 08 ld [ %i2 + 8 ], %g1
the_chain->last = the_node;
2016510: c4 26 a0 08 st %g2, [ %i2 + 8 ]
old_last_node->next = the_node;
the_node->previous = old_last_node;
2016514: c2 20 a0 04 st %g1, [ %g2 + 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;
2016518: c4 20 40 00 st %g2, [ %g1 ]
do {
node = _Chain_Get_unprotected( header );
_Chain_Append_unprotected( to_fire, node );
_ISR_Flash( level );
201651c: 7f ff d3 5a call 200b284 <sparc_enable_interrupts>
2016520: 90 10 00 13 mov %l3, %o0
2016524: 7f ff d3 54 call 200b274 <sparc_disable_interrupts>
2016528: 01 00 00 00 nop
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
201652c: c4 06 00 00 ld [ %i0 ], %g2
} while ( !_Chain_Is_empty( header ) &&
_Watchdog_First( header )->delta_interval == 0 );
2016530: 80 a4 00 02 cmp %l0, %g2
2016534: 02 80 00 10 be 2016574 <_Watchdog_Adjust_to_chain+0xc4>
2016538: 01 00 00 00 nop
201653c: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2016540: 80 a0 60 00 cmp %g1, 0
2016544: 32 80 00 07 bne,a 2016560 <_Watchdog_Adjust_to_chain+0xb0>
2016548: a2 a4 40 19 subcc %l1, %i1, %l1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
201654c: 80 a4 00 02 cmp %l0, %g2
2016550: 32 bf ff ec bne,a 2016500 <_Watchdog_Adjust_to_chain+0x50><== ALWAYS TAKEN
2016554: c2 00 80 00 ld [ %g2 ], %g1
2016558: 10 bf ff ec b 2016508 <_Watchdog_Adjust_to_chain+0x58> <== NOT EXECUTED
201655c: 84 10 20 00 clr %g2 <== NOT EXECUTED
return;
}
_ISR_Disable( level );
if ( !_Chain_Is_empty( header ) ) {
while ( units ) {
2016560: 02 80 00 05 be 2016574 <_Watchdog_Adjust_to_chain+0xc4> <== ALWAYS TAKEN
2016564: 01 00 00 00 nop
2016568: 10 bf ff e1 b 20164ec <_Watchdog_Adjust_to_chain+0x3c> <== NOT EXECUTED
201656c: b2 10 00 01 mov %g1, %i1 <== NOT EXECUTED
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
2016570: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
break;
}
}
}
_ISR_Enable( level );
2016574: 7f ff d3 44 call 200b284 <sparc_enable_interrupts>
2016578: 91 e8 00 13 restore %g0, %l3, %o0
02008ee8 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
2008ee8: 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;
2008eec: 03 00 80 60 sethi %hi(0x2018000), %g1
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
2008ef0: 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;
2008ef4: e6 00 63 b0 ld [ %g1 + 0x3b0 ], %l3
_ISR_Disable( level );
2008ef8: 7f ff e3 bb call 2001de4 <sparc_disable_interrupts>
2008efc: 01 00 00 00 nop
2008f00: 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 ) {
2008f04: c2 06 60 08 ld [ %i1 + 8 ], %g1
2008f08: 80 a0 60 00 cmp %g1, 0
2008f0c: 12 80 00 4a bne 2009034 <_Watchdog_Insert+0x14c> <== NEVER TAKEN
2008f10: 01 00 00 00 nop
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
2008f14: 2b 00 80 61 sethi %hi(0x2018400), %l5
2008f18: c2 05 60 60 ld [ %l5 + 0x60 ], %g1 ! 2018460 <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
2008f1c: 84 10 20 01 mov 1, %g2
_Watchdog_Sync_count++;
2008f20: 82 00 60 01 inc %g1
2008f24: 2f 00 80 60 sethi %hi(0x2018000), %l7
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
2008f28: c4 26 60 08 st %g2, [ %i1 + 8 ]
2008f2c: a8 15 e3 d0 or %l7, 0x3d0, %l4
_Watchdog_Sync_count++;
2008f30: c2 25 60 60 st %g1, [ %l5 + 0x60 ]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
2008f34: ba 10 00 14 mov %l4, %i5
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
2008f38: 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 ;
2008f3c: e2 05 80 00 ld [ %l6 ], %l1
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
2008f40: 80 a4 a0 00 cmp %l2, 0
2008f44: 02 80 00 2b be 2008ff0 <_Watchdog_Insert+0x108> <== NEVER TAKEN
2008f48: 03 00 80 61 sethi %hi(0x2018400), %g1
2008f4c: c2 04 40 00 ld [ %l1 ], %g1
2008f50: 80 a0 60 00 cmp %g1, 0
2008f54: 02 80 00 27 be 2008ff0 <_Watchdog_Insert+0x108>
2008f58: 03 00 80 61 sethi %hi(0x2018400), %g1
break;
if ( delta_interval < after->delta_interval ) {
2008f5c: e0 04 60 10 ld [ %l1 + 0x10 ], %l0
2008f60: 80 a4 80 10 cmp %l2, %l0
2008f64: 1a 80 00 13 bcc 2008fb0 <_Watchdog_Insert+0xc8>
2008f68: 82 24 00 12 sub %l0, %l2, %g1
after->delta_interval -= delta_interval;
2008f6c: 10 80 00 20 b 2008fec <_Watchdog_Insert+0x104>
2008f70: c2 24 60 10 st %g1, [ %l1 + 0x10 ]
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
2008f74: c2 05 00 00 ld [ %l4 ], %g1
2008f78: 80 a4 c0 01 cmp %l3, %g1
2008f7c: 0a 80 00 30 bcs 200903c <_Watchdog_Insert+0x154>
2008f80: 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 ) )
2008f84: a4 a4 80 10 subcc %l2, %l0, %l2
2008f88: 02 80 00 19 be 2008fec <_Watchdog_Insert+0x104>
2008f8c: e2 04 40 00 ld [ %l1 ], %l1
2008f90: c2 04 40 00 ld [ %l1 ], %g1
2008f94: 80 a0 60 00 cmp %g1, 0
2008f98: 02 80 00 16 be 2008ff0 <_Watchdog_Insert+0x108>
2008f9c: 03 00 80 61 sethi %hi(0x2018400), %g1
break;
if ( delta_interval < after->delta_interval ) {
2008fa0: e0 04 60 10 ld [ %l1 + 0x10 ], %l0
2008fa4: 80 a4 00 12 cmp %l0, %l2
2008fa8: 18 80 00 10 bgu 2008fe8 <_Watchdog_Insert+0x100>
2008fac: 82 24 00 12 sub %l0, %l2, %g1
* 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 );
2008fb0: 7f ff e3 91 call 2001df4 <sparc_enable_interrupts>
2008fb4: 90 10 00 18 mov %i0, %o0
2008fb8: 7f ff e3 8b call 2001de4 <sparc_disable_interrupts>
2008fbc: 01 00 00 00 nop
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
2008fc0: c2 06 60 08 ld [ %i1 + 8 ], %g1
2008fc4: 80 a0 60 01 cmp %g1, 1
2008fc8: 02 bf ff eb be 2008f74 <_Watchdog_Insert+0x8c> <== ALWAYS TAKEN
2008fcc: 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;
2008fd0: e6 25 e3 d0 st %l3, [ %l7 + 0x3d0 ] <== NOT EXECUTED
_Watchdog_Sync_count--;
2008fd4: c2 05 60 60 ld [ %l5 + 0x60 ], %g1 <== NOT EXECUTED
2008fd8: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2008fdc: c2 25 60 60 st %g1, [ %l5 + 0x60 ] <== NOT EXECUTED
_ISR_Enable( level );
2008fe0: 7f ff e3 85 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2008fe4: 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;
2008fe8: c2 24 60 10 st %g1, [ %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;
2008fec: 03 00 80 61 sethi %hi(0x2018400), %g1
2008ff0: c6 00 60 64 ld [ %g1 + 0x64 ], %g3 ! 2018464 <_Watchdog_Ticks_since_boot>
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
2008ff4: c4 04 60 04 ld [ %l1 + 4 ], %g2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
2008ff8: c6 26 60 14 st %g3, [ %i1 + 0x14 ]
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
2008ffc: e4 26 60 10 st %l2, [ %i1 + 0x10 ]
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
2009000: 82 10 20 02 mov 2, %g1
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
2009004: 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;
2009008: e6 25 e3 d0 st %l3, [ %l7 + 0x3d0 ]
200900c: c2 26 60 08 st %g1, [ %i1 + 8 ]
_Watchdog_Sync_count--;
2009010: c2 05 60 60 ld [ %l5 + 0x60 ], %g1
after_node->next = the_node;
2009014: f2 20 80 00 st %i1, [ %g2 ]
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
2009018: c4 26 60 04 st %g2, [ %i1 + 4 ]
200901c: 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;
2009020: 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;
2009024: c8 26 40 00 st %g4, [ %i1 ]
2009028: c2 25 60 60 st %g1, [ %l5 + 0x60 ]
_ISR_Enable( level );
200902c: 7f ff e3 72 call 2001df4 <sparc_enable_interrupts>
2009030: 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 );
2009034: 7f ff e3 70 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2009038: 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;
200903c: e6 27 40 00 st %l3, [ %i5 ]
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
2009040: 10 bf ff bf b 2008f3c <_Watchdog_Insert+0x54>
2009044: e4 06 60 0c ld [ %i1 + 0xc ], %l2
02009094 <_Watchdog_Remove>:
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
2009094: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
2009098: 7f ff e3 53 call 2001de4 <sparc_disable_interrupts>
200909c: a0 10 00 18 mov %i0, %l0
previous_state = the_watchdog->state;
20090a0: f0 06 20 08 ld [ %i0 + 8 ], %i0
switch ( previous_state ) {
20090a4: 80 a6 20 01 cmp %i0, 1
20090a8: 02 80 00 2a be 2009150 <_Watchdog_Remove+0xbc> <== NEVER TAKEN
20090ac: 03 00 80 61 sethi %hi(0x2018400), %g1
20090b0: 1a 80 00 09 bcc 20090d4 <_Watchdog_Remove+0x40>
20090b4: 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;
20090b8: 03 00 80 61 sethi %hi(0x2018400), %g1
20090bc: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 2018464 <_Watchdog_Ticks_since_boot>
20090c0: c4 24 20 18 st %g2, [ %l0 + 0x18 ]
_ISR_Enable( level );
20090c4: 7f ff e3 4c call 2001df4 <sparc_enable_interrupts>
20090c8: 01 00 00 00 nop
return( previous_state );
}
20090cc: 81 c7 e0 08 ret
20090d0: 81 e8 00 00 restore
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
20090d4: 18 bf ff fa bgu 20090bc <_Watchdog_Remove+0x28> <== NEVER TAKEN
20090d8: 03 00 80 61 sethi %hi(0x2018400), %g1
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
20090dc: c8 04 00 00 ld [ %l0 ], %g4
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
20090e0: c0 24 20 08 clr [ %l0 + 8 ]
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
20090e4: c2 01 00 00 ld [ %g4 ], %g1
20090e8: 80 a0 60 00 cmp %g1, 0
20090ec: 02 80 00 07 be 2009108 <_Watchdog_Remove+0x74>
20090f0: 03 00 80 61 sethi %hi(0x2018400), %g1
next_watchdog->delta_interval += the_watchdog->delta_interval;
20090f4: c2 01 20 10 ld [ %g4 + 0x10 ], %g1
20090f8: c4 04 20 10 ld [ %l0 + 0x10 ], %g2
20090fc: 82 00 40 02 add %g1, %g2, %g1
2009100: c2 21 20 10 st %g1, [ %g4 + 0x10 ]
if ( _Watchdog_Sync_count )
2009104: 03 00 80 61 sethi %hi(0x2018400), %g1
2009108: c4 00 60 60 ld [ %g1 + 0x60 ], %g2 ! 2018460 <_Watchdog_Sync_count>
200910c: 80 a0 a0 00 cmp %g2, 0
2009110: 22 80 00 07 be,a 200912c <_Watchdog_Remove+0x98> <== ALWAYS TAKEN
2009114: c2 04 20 04 ld [ %l0 + 4 ], %g1
_Watchdog_Sync_level = _ISR_Nest_level;
2009118: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
200911c: c6 00 63 b0 ld [ %g1 + 0x3b0 ], %g3 ! 20183b0 <_ISR_Nest_level><== NOT EXECUTED
2009120: 05 00 80 60 sethi %hi(0x2018000), %g2 <== NOT EXECUTED
2009124: c6 20 a3 d0 st %g3, [ %g2 + 0x3d0 ] ! 20183d0 <_Watchdog_Sync_level><== NOT EXECUTED
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
2009128: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
next->previous = previous;
previous->next = next;
200912c: c8 20 40 00 st %g4, [ %g1 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2009130: c2 21 20 04 st %g1, [ %g4 + 4 ]
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
2009134: 03 00 80 61 sethi %hi(0x2018400), %g1
2009138: c4 00 60 64 ld [ %g1 + 0x64 ], %g2 ! 2018464 <_Watchdog_Ticks_since_boot>
200913c: c4 24 20 18 st %g2, [ %l0 + 0x18 ]
_ISR_Enable( level );
2009140: 7f ff e3 2d call 2001df4 <sparc_enable_interrupts>
2009144: 01 00 00 00 nop
return( previous_state );
}
2009148: 81 c7 e0 08 ret
200914c: 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;
2009150: c4 00 60 64 ld [ %g1 + 0x64 ], %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;
2009154: 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;
2009158: c4 24 20 18 st %g2, [ %l0 + 0x18 ] <== NOT EXECUTED
_ISR_Enable( level );
200915c: 7f ff e3 26 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2009160: 01 00 00 00 nop <== NOT EXECUTED
return( previous_state );
}
2009164: 81 c7 e0 08 ret <== NOT EXECUTED
2009168: 81 e8 00 00 restore <== NOT EXECUTED
0200916c <_Watchdog_Tickle>:
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
200916c: 9d e3 bf 98 save %sp, -104, %sp
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
2009170: 7f ff e3 1d call 2001de4 <sparc_disable_interrupts>
2009174: a4 10 00 18 mov %i0, %l2
2009178: b0 10 00 08 mov %o0, %i0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200917c: c4 04 80 00 ld [ %l2 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2009180: a6 04 a0 04 add %l2, 4, %l3
if ( _Chain_Is_empty( header ) )
2009184: 80 a0 80 13 cmp %g2, %l3
2009188: 02 80 00 0a be 20091b0 <_Watchdog_Tickle+0x44>
200918c: 01 00 00 00 nop
* to be inserted has already had its delta_interval adjusted to 0, and
* so is added to the head of the chain with a delta_interval of 0.
*
* Steven Johnson - 12/2005 (gcc-3.2.3 -O3 on powerpc)
*/
if (the_watchdog->delta_interval != 0) {
2009190: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2009194: 80 a0 60 00 cmp %g1, 0
2009198: 02 80 00 16 be 20091f0 <_Watchdog_Tickle+0x84> <== NEVER TAKEN
200919c: a2 10 00 02 mov %g2, %l1
the_watchdog->delta_interval--;
20091a0: 82 00 7f ff add %g1, -1, %g1
if ( the_watchdog->delta_interval != 0 )
20091a4: 80 a0 60 00 cmp %g1, 0
20091a8: 02 80 00 12 be 20091f0 <_Watchdog_Tickle+0x84>
20091ac: c2 20 a0 10 st %g1, [ %g2 + 0x10 ]
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
20091b0: 7f ff e3 11 call 2001df4 <sparc_enable_interrupts>
20091b4: 81 e8 00 00 restore
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
20091b8: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
20091bc: 9f c0 40 00 call %g1
20091c0: d0 04 60 20 ld [ %l1 + 0x20 ], %o0
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
20091c4: 7f ff e3 08 call 2001de4 <sparc_disable_interrupts>
20091c8: 01 00 00 00 nop
20091cc: b0 10 00 08 mov %o0, %i0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
20091d0: c2 04 80 00 ld [ %l2 ], %g1
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
20091d4: 80 a4 c0 01 cmp %l3, %g1
20091d8: 02 bf ff f6 be 20091b0 <_Watchdog_Tickle+0x44>
20091dc: a2 10 00 01 mov %g1, %l1
20091e0: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
20091e4: 80 a0 60 00 cmp %g1, 0
20091e8: 12 bf ff f2 bne 20091b0 <_Watchdog_Tickle+0x44>
20091ec: 01 00 00 00 nop
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
20091f0: 7f ff ff a9 call 2009094 <_Watchdog_Remove>
20091f4: 90 10 00 11 mov %l1, %o0
20091f8: a0 10 00 08 mov %o0, %l0
_ISR_Enable( level );
20091fc: 7f ff e2 fe call 2001df4 <sparc_enable_interrupts>
2009200: 90 10 00 18 mov %i0, %o0
switch( watchdog_state ) {
2009204: 80 a4 20 02 cmp %l0, 2
2009208: 12 bf ff ef bne 20091c4 <_Watchdog_Tickle+0x58> <== NEVER TAKEN
200920c: 01 00 00 00 nop
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
2009210: 10 bf ff ea b 20091b8 <_Watchdog_Tickle+0x4c>
2009214: d2 04 60 24 ld [ %l1 + 0x24 ], %o1
02009284 <_Workspace_Handler_initialization>:
*/
void _Workspace_Handler_initialization(
void *starting_address,
size_t size
)
{
2009284: 9d e3 bf 98 save %sp, -104, %sp
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
2009288: 80 a6 20 00 cmp %i0, 0
200928c: 02 80 00 15 be 20092e0 <_Workspace_Handler_initialization+0x5c>
2009290: 80 8e 20 07 btst 7, %i0
2009294: 12 80 00 14 bne 20092e4 <_Workspace_Handler_initialization+0x60><== NEVER TAKEN
2009298: 90 10 20 00 clr %o0
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
200929c: 03 00 80 60 sethi %hi(0x2018000), %g1
20092a0: c4 00 63 ac ld [ %g1 + 0x3ac ], %g2 ! 20183ac <_Configuration_Table>
20092a4: c6 08 a0 28 ldub [ %g2 + 0x28 ], %g3
20092a8: 80 a0 e0 00 cmp %g3, 0
20092ac: 32 80 00 11 bne,a 20092f0 <_Workspace_Handler_initialization+0x6c><== NEVER TAKEN
20092b0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
20092b4: 92 10 00 18 mov %i0, %o1
20092b8: 94 10 00 19 mov %i1, %o2
20092bc: 11 00 80 60 sethi %hi(0x2018000), %o0
20092c0: 96 10 20 08 mov 8, %o3
20092c4: 7f ff f5 ab call 2006970 <_Heap_Initialize>
20092c8: 90 12 23 34 or %o0, 0x334, %o0
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
20092cc: 80 a2 20 00 cmp %o0, 0
20092d0: 02 80 00 0d be 2009304 <_Workspace_Handler_initialization+0x80><== NEVER TAKEN
20092d4: 92 10 20 01 mov 1, %o1
20092d8: 81 c7 e0 08 ret
20092dc: 81 e8 00 00 restore
)
{
uint32_t memory_available;
if ( !starting_address || !_Addresses_Is_aligned( starting_address ) )
_Internal_error_Occurred(
20092e0: 90 10 20 00 clr %o0
20092e4: 92 10 20 01 mov 1, %o1
20092e8: 7f ff f6 2f call 2006ba4 <_Internal_error_Occurred>
20092ec: 94 10 20 02 mov 2, %o2
TRUE,
INTERNAL_ERROR_INVALID_WORKSPACE_ADDRESS
);
if ( _Configuration_Table->do_zero_of_workspace )
memset( starting_address, 0, size );
20092f0: 92 10 20 00 clr %o1 <== NOT EXECUTED
20092f4: 40 00 14 32 call 200e3bc <memset> <== NOT EXECUTED
20092f8: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
memory_available = _Heap_Initialize(
20092fc: 10 bf ff ef b 20092b8 <_Workspace_Handler_initialization+0x34><== NOT EXECUTED
2009300: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
2009304: 7f ff f6 28 call 2006ba4 <_Internal_error_Occurred> <== NOT EXECUTED
2009308: 94 10 20 03 mov 3, %o2 <== NOT EXECUTED
02001f88 <__assert>:
void __assert(
const char *file,
int line,
const char *failedexpr
)
{
2001f88: 96 10 00 0a mov %o2, %o3 <== NOT EXECUTED
__assert_func (file, line, NULL, failedexpr);
2001f8c: 94 10 20 00 clr %o2 <== NOT EXECUTED
2001f90: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2001f94: 7f ff ff eb call 2001f40 <__assert_func> <== NOT EXECUTED
2001f98: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02001f40 <__assert_func>:
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
2001f40: 9d e3 bf 98 save %sp, -104, %sp
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
2001f44: 03 00 80 59 sethi %hi(0x2016400), %g1
const char *file,
int line,
const char *func,
const char *failedexpr
)
{
2001f48: 9a 10 00 1a mov %i2, %o5
2001f4c: 94 10 00 18 mov %i0, %o2
2001f50: 96 10 00 19 mov %i1, %o3
2001f54: 92 10 00 1b mov %i3, %o1
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
2001f58: 80 a6 a0 00 cmp %i2, 0
2001f5c: 02 80 00 07 be 2001f78 <__assert_func+0x38> <== NEVER TAKEN
2001f60: 98 10 60 f0 or %g1, 0xf0, %o4
2001f64: 11 00 80 59 sethi %hi(0x2016400), %o0
2001f68: 40 00 04 1b call 2002fd4 <printk>
2001f6c: 90 12 21 00 or %o0, 0x100, %o0 ! 2016500 <pollCallbacks.4788+0x320>
file,
line,
(func) ? ", function: " : "",
(func) ? func : ""
);
rtems_fatal_error_occurred(0);
2001f70: 40 00 0f ff call 2005f6c <rtems_fatal_error_occurred>
2001f74: 90 10 20 00 clr %o0
int line,
const char *func,
const char *failedexpr
)
{
printk("assertion \"%s\" failed: file \"%s\", line %d%s%s\n",
2001f78: 03 00 80 59 sethi %hi(0x2016400), %g1 <== NOT EXECUTED
2001f7c: 9a 10 60 a0 or %g1, 0xa0, %o5 ! 20164a0 <pollCallbacks.4788+0x2c0><== NOT EXECUTED
2001f80: 10 bf ff f9 b 2001f64 <__assert_func+0x24> <== NOT EXECUTED
2001f84: 98 10 00 0d mov %o5, %o4 <== NOT EXECUTED
02015670 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
_fini();
2015670: 9d e3 bf 98 save %sp, -104, %sp
2015674: 40 00 07 6a call 201741c <_fini>
2015678: 01 00 00 00 nop
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
201567c: 7f ff ff e1 call 2015600 <libc_wrapup>
2015680: 01 00 00 00 nop
rtems_shutdown_executive(status);
2015684: 40 00 00 52 call 20157cc <rtems_shutdown_executive>
2015688: 90 10 00 18 mov %i0, %o0
201568c: 30 80 00 00 b,a 201568c <_exit+0x1c> <== NOT EXECUTED
020033c0 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
20033c0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
20033c4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
20033c8: 94 10 00 0b mov %o3, %o2 <== NOT EXECUTED
20033cc: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20033d0: 7f ff ff 6a call 2003178 <fcntl> <== NOT EXECUTED
20033d4: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02018c24 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr
)
{
return getpid();
}
2018c24: 81 c3 e0 08 retl <== NOT EXECUTED
2018c28: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
0200ac14 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
200ac14: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200ac18: 7f ff ff e6 call 200abb0 <gettimeofday> <== NOT EXECUTED
200ac1c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02003ea0 <_link_r>:
struct _reent *ptr,
const char *existing,
const char *new
)
{
return link( existing, new );
2003ea0: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2003ea4: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2003ea8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003eac: 7f ff ff 59 call 2003c10 <link> <== NOT EXECUTED
2003eb0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02015798 <_realloc_r>:
struct _reent *ignored,
void *ptr,
size_t size
)
{
return realloc( ptr, size );
2015798: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
201579c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
20157a0: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20157a4: 40 00 00 17 call 2015800 <realloc> <== NOT EXECUTED
20157a8: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004e38 <_stat_r>:
struct _reent *ptr,
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
2004e38: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
2004e3c: 92 10 00 0a mov %o2, %o1 <== NOT EXECUTED
2004e40: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2004e44: 7f ff ff b3 call 2004d10 <stat> <== NOT EXECUTED
2004e48: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020085a4 <_unlink_r>:
int _unlink_r(
struct _reent *ptr,
const char *path
)
{
return unlink( path );
20085a4: 90 10 00 09 mov %o1, %o0 <== NOT EXECUTED
20085a8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20085ac: 7f ff ff a5 call 2008440 <unlink> <== NOT EXECUTED
20085b0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200549c <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
200549c: 9d e3 bf 90 save %sp, -112, %sp
long adjustment;
/*
* Simple validations
*/
if ( !delta )
20054a0: a2 96 20 00 orcc %i0, 0, %l1
20054a4: 02 80 00 68 be 2005644 <adjtime+0x1a8>
20054a8: 03 00 03 d0 sethi %hi(0xf4000), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
20054ac: d8 04 60 04 ld [ %l1 + 4 ], %o4
20054b0: 82 10 62 3f or %g1, 0x23f, %g1
20054b4: 80 a3 00 01 cmp %o4, %g1
20054b8: 18 80 00 63 bgu 2005644 <adjtime+0x1a8>
20054bc: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
20054c0: 22 80 00 06 be,a 20054d8 <adjtime+0x3c>
20054c4: c6 04 40 00 ld [ %l1 ], %g3
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
20054c8: c0 26 60 04 clr [ %i1 + 4 ]
20054cc: d8 04 60 04 ld [ %l1 + 4 ], %o4
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
20054d0: c0 26 40 00 clr [ %i1 ]
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
20054d4: c6 04 40 00 ld [ %l1 ], %g3
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < _TOD_Microseconds_per_tick )
20054d8: 03 00 80 69 sethi %hi(0x201a400), %g1
20054dc: da 00 61 e0 ld [ %g1 + 0x1e0 ], %o5 ! 201a5e0 <_TOD_Microseconds_per_tick>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
20054e0: 89 28 e0 03 sll %g3, 3, %g4
20054e4: 85 28 e0 08 sll %g3, 8, %g2
20054e8: 84 20 80 04 sub %g2, %g4, %g2
20054ec: 83 28 a0 06 sll %g2, 6, %g1
20054f0: 82 20 40 02 sub %g1, %g2, %g1
20054f4: 82 00 40 03 add %g1, %g3, %g1
20054f8: 83 28 60 06 sll %g1, 6, %g1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < _TOD_Microseconds_per_tick )
20054fc: 82 03 00 01 add %o4, %g1, %g1
2005500: 80 a0 40 0d cmp %g1, %o5
2005504: 1a 80 00 04 bcc 2005514 <adjtime+0x78>
2005508: 05 00 80 69 sethi %hi(0x201a400), %g2
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
200550c: 81 c7 e0 08 ret
2005510: 91 e8 20 00 restore %g0, 0, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005514: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1
2005518: 82 00 60 01 inc %g1
200551c: c2 20 a0 40 st %g1, [ %g2 + 0x40 ]
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
2005520: a4 07 bf f0 add %fp, -16, %l2
2005524: 40 00 07 23 call 20071b0 <_TOD_Get>
2005528: 90 10 00 12 mov %l2, %o0
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
200552c: c4 04 60 04 ld [ %l1 + 4 ], %g2
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
2005530: c6 04 40 00 ld [ %l1 ], %g3
2005534: c2 07 bf f0 ld [ %fp + -16 ], %g1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2005538: da 07 bf f4 ld [ %fp + -12 ], %o5
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
200553c: b0 00 c0 01 add %g3, %g1, %i0
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
2005540: 89 28 a0 02 sll %g2, 2, %g4
2005544: 83 28 a0 07 sll %g2, 7, %g1
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
2005548: f0 27 bf f0 st %i0, [ %fp + -16 ]
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
200554c: 82 20 40 04 sub %g1, %g4, %g1
2005550: 82 00 40 02 add %g1, %g2, %g1
2005554: 83 28 60 03 sll %g1, 3, %g1
2005558: 9a 00 40 0d add %g1, %o5, %o5
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
200555c: 13 0e e6 b2 sethi %hi(0x3b9ac800), %o1
2005560: 82 12 61 ff or %o1, 0x1ff, %g1 ! 3b9ac9ff <RAM_END+0x395ac9ff>
2005564: 80 a3 40 01 cmp %o5, %g1
2005568: 08 80 00 1b bleu 20055d4 <adjtime+0x138>
200556c: da 27 bf f4 st %o5, [ %fp + -12 ]
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
2005570: 92 12 62 00 or %o1, 0x200, %o1
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
2005574: 21 31 19 4d sethi %hi(0xc4653400), %l0
2005578: a0 14 22 00 or %l0, 0x200, %l0 ! c4653600 <RAM_END+0xc2253600>
200557c: a0 03 40 10 add %o5, %l0, %l0
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
2005580: 40 00 43 7e call 2016378 <.udiv>
2005584: 90 10 00 10 mov %l0, %o0
2005588: 82 06 20 01 add %i0, 1, %g1
200558c: 87 2a 20 03 sll %o0, 3, %g3
2005590: 82 00 40 08 add %g1, %o0, %g1
2005594: 85 2a 20 08 sll %o0, 8, %g2
2005598: 84 20 80 03 sub %g2, %g3, %g2
200559c: c2 27 bf f0 st %g1, [ %fp + -16 ]
20055a0: 83 28 a0 06 sll %g2, 6, %g1
20055a4: 82 20 40 02 sub %g1, %g2, %g1
20055a8: 82 00 40 08 add %g1, %o0, %g1
20055ac: 85 28 60 02 sll %g1, 2, %g2
20055b0: 82 00 40 02 add %g1, %g2, %g1
20055b4: 87 28 60 02 sll %g1, 2, %g3
20055b8: 82 00 40 03 add %g1, %g3, %g1
20055bc: 85 28 60 02 sll %g1, 2, %g2
20055c0: 82 00 40 02 add %g1, %g2, %g1
20055c4: 83 28 60 09 sll %g1, 9, %g1
20055c8: a0 24 00 01 sub %l0, %g1, %l0
20055cc: e0 27 bf f4 st %l0, [ %fp + -12 ]
20055d0: 9a 10 00 10 mov %l0, %o5
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
20055d4: 03 31 19 4d sethi %hi(0xc4653400), %g1
20055d8: 82 10 62 00 or %g1, 0x200, %g1 ! c4653600 <RAM_END+0xc2253600>
20055dc: 80 a3 40 01 cmp %o5, %g1
20055e0: 18 80 00 0c bgu 2005610 <adjtime+0x174> <== NEVER TAKEN
20055e4: a0 10 00 0d mov %o5, %l0
20055e8: c4 07 bf f0 ld [ %fp + -16 ], %g2
20055ec: 86 10 00 01 mov %g1, %g3
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
20055f0: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1
20055f4: 82 10 62 00 or %g1, 0x200, %g1 ! 3b9aca00 <RAM_END+0x395aca00>
20055f8: a0 04 00 01 add %l0, %g1, %l0
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
20055fc: 80 a4 00 03 cmp %l0, %g3
2005600: 08 bf ff fe bleu 20055f8 <adjtime+0x15c>
2005604: 84 00 bf ff add %g2, -1, %g2
2005608: c4 27 bf f0 st %g2, [ %fp + -16 ]
200560c: e0 27 bf f4 st %l0, [ %fp + -12 ]
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
2005610: 40 00 07 10 call 2007250 <_TOD_Set>
2005614: 90 10 00 12 mov %l2, %o0
_Thread_Enable_dispatch();
2005618: 40 00 0b d2 call 2008560 <_Thread_Enable_dispatch>
200561c: 01 00 00 00 nop
/* set the user's output */
if ( olddelta )
2005620: 80 a6 60 00 cmp %i1, 0
2005624: 02 bf ff ba be 200550c <adjtime+0x70> <== NEVER TAKEN
2005628: 01 00 00 00 nop
*olddelta = *delta;
200562c: c4 04 40 00 ld [ %l1 ], %g2
2005630: c4 26 40 00 st %g2, [ %i1 ]
2005634: c2 04 60 04 ld [ %l1 + 4 ], %g1
2005638: c2 26 60 04 st %g1, [ %i1 + 4 ]
200563c: 81 c7 e0 08 ret
2005640: 91 e8 20 00 restore %g0, 0, %o0
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
2005644: 40 00 23 be call 200e53c <__errno>
2005648: b0 10 3f ff mov -1, %i0
200564c: 82 10 20 16 mov 0x16, %g1
2005650: c2 22 00 00 st %g1, [ %o0 ]
2005654: 81 c7 e0 08 ret
2005658: 81 e8 00 00 restore
020072cc <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
20072cc: 9d e3 bf 98 save %sp, -104, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
20072d0: 03 00 80 65 sethi %hi(0x2019400), %g1
20072d4: a2 10 62 8c or %g1, 0x28c, %l1 ! 201968c <_POSIX_signals_Alarm_timer>
20072d8: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
20072dc: 80 a0 a0 00 cmp %g2, 0
20072e0: 02 80 00 23 be 200736c <alarm+0xa0>
20072e4: a4 10 00 18 mov %i0, %l2
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
20072e8: 40 00 14 df call 200c664 <_Watchdog_Remove>
20072ec: 90 10 00 11 mov %l1, %o0
20072f0: 90 02 3f fe add %o0, -2, %o0
20072f4: 80 a2 20 01 cmp %o0, 1
20072f8: 08 80 00 09 bleu 200731c <alarm+0x50> <== ALWAYS TAKEN
20072fc: b0 10 20 00 clr %i0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007300: e4 24 60 0c st %l2, [ %l1 + 0xc ] <== NOT EXECUTED
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2007304: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
2007308: 11 00 80 66 sethi %hi(0x2019800), %o0 <== NOT EXECUTED
200730c: 40 00 14 6b call 200c4b8 <_Watchdog_Insert> <== NOT EXECUTED
2007310: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20198c8 <_Watchdog_Seconds_chain><== NOT EXECUTED
}
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
2007314: 81 c7 e0 08 ret <== NOT EXECUTED
2007318: 81 e8 00 00 restore <== NOT EXECUTED
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
200731c: c4 04 60 14 ld [ %l1 + 0x14 ], %g2
2007320: 03 00 80 66 sethi %hi(0x2019800), %g1
2007324: e0 04 60 18 ld [ %l1 + 0x18 ], %l0
2007328: d2 00 61 90 ld [ %g1 + 0x190 ], %o1
200732c: a0 24 00 02 sub %l0, %g2, %l0
2007330: 11 00 03 d0 sethi %hi(0xf4000), %o0
2007334: 40 00 37 2b call 2014fe0 <.udiv>
2007338: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
200733c: 92 10 00 08 mov %o0, %o1
2007340: 40 00 37 28 call 2014fe0 <.udiv>
2007344: 90 10 00 10 mov %l0, %o0
2007348: c2 04 60 0c ld [ %l1 + 0xc ], %g1
200734c: 92 10 00 11 mov %l1, %o1
2007350: b0 20 40 08 sub %g1, %o0, %i0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007354: e4 24 60 0c st %l2, [ %l1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2007358: 11 00 80 66 sethi %hi(0x2019800), %o0
200735c: 40 00 14 57 call 200c4b8 <_Watchdog_Insert>
2007360: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20198c8 <_Watchdog_Seconds_chain>
}
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
2007364: 81 c7 e0 08 ret
2007368: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200736c: 03 00 80 1c sethi %hi(0x2007000), %g1
2007370: 82 10 63 a4 or %g1, 0x3a4, %g1 ! 20073a4 <_POSIX_signals_Alarm_TSR>
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2007374: b0 10 20 00 clr %i0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007378: c0 24 60 08 clr [ %l1 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
200737c: c0 24 60 20 clr [ %l1 + 0x20 ]
the_watchdog->user_data = user_data;
2007380: c0 24 60 24 clr [ %l1 + 0x24 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007384: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2007388: e4 24 60 0c st %l2, [ %l1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
200738c: 92 10 00 11 mov %l1, %o1
2007390: 11 00 80 66 sethi %hi(0x2019800), %o0
2007394: 40 00 14 49 call 200c4b8 <_Watchdog_Insert>
2007398: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20198c8 <_Watchdog_Seconds_chain>
200739c: 81 c7 e0 08 ret
20073a0: 81 e8 00 00 restore
02005634 <alphasort>:
int
alphasort(
const void *d1,
const void *d2 )
{
return(strcmp((*(struct dirent **)d1)->d_name,
2005634: d0 02 00 00 ld [ %o0 ], %o0 <== NOT EXECUTED
2005638: d2 02 40 00 ld [ %o1 ], %o1 <== NOT EXECUTED
200563c: 90 02 20 0c add %o0, 0xc, %o0 <== NOT EXECUTED
2005640: 92 02 60 0c add %o1, 0xc, %o1 <== NOT EXECUTED
2005644: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2005648: 40 00 35 4f call 2012b84 <strcmp> <== NOT EXECUTED
200564c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200a8b0 <calloc>:
)
{
register char *cptr;
int length;
MSBUMP(calloc_calls, 1);
200a8b0: 9d e3 bf 98 save %sp, -104, %sp
200a8b4: 05 00 80 60 sethi %hi(0x2018000), %g2
200a8b8: a0 10 a1 98 or %g2, 0x198, %l0 ! 2018198 <rtems_malloc_statistics>
200a8bc: c2 04 20 14 ld [ %l0 + 0x14 ], %g1
length = nelem * elsize;
200a8c0: 92 10 00 18 mov %i0, %o1
)
{
register char *cptr;
int length;
MSBUMP(calloc_calls, 1);
200a8c4: 82 00 60 01 inc %g1
length = nelem * elsize;
200a8c8: 90 10 00 19 mov %i1, %o0
200a8cc: 40 00 27 22 call 2014554 <.umul>
200a8d0: c2 24 20 14 st %g1, [ %l0 + 0x14 ]
cptr = malloc( length );
200a8d4: 40 00 01 bc call 200afc4 <malloc>
200a8d8: b2 10 00 08 mov %o0, %i1
if ( cptr )
200a8dc: b0 92 20 00 orcc %o0, 0, %i0
200a8e0: 02 80 00 04 be 200a8f0 <calloc+0x40> <== NEVER TAKEN
200a8e4: 94 10 00 19 mov %i1, %o2
memset( cptr, '\0', length );
200a8e8: 40 00 0e b5 call 200e3bc <memset>
200a8ec: 92 10 20 00 clr %o1
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
200a8f0: c2 04 20 04 ld [ %l0 + 4 ], %g1
200a8f4: 82 00 7f ff add %g1, -1, %g1
200a8f8: c2 24 20 04 st %g1, [ %l0 + 4 ]
return cptr;
}
200a8fc: 81 c7 e0 08 ret
200a900: 81 e8 00 00 restore
0200bc68 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
200bc68: 9d e3 bf 88 save %sp, -120, %sp
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
200bc6c: 92 10 20 01 mov 1, %o1
200bc70: 90 10 00 18 mov %i0, %o0
200bc74: a0 07 bf e8 add %fp, -24, %l0
200bc78: 96 10 20 01 mov 1, %o3
200bc7c: 94 10 00 10 mov %l0, %o2
200bc80: 7f ff da e5 call 2002814 <rtems_filesystem_evaluate_path>
200bc84: b0 10 3f ff mov -1, %i0
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
200bc88: 80 a2 20 00 cmp %o0, 0
200bc8c: 12 80 00 2f bne 200bd48 <chdir+0xe0>
200bc90: c4 07 bf f0 ld [ %fp + -16 ], %g2
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
200bc94: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200bc98: 80 a0 60 00 cmp %g1, 0
200bc9c: 22 80 00 2d be,a 200bd50 <chdir+0xe8> <== NEVER TAKEN
200bca0: 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 ) {
200bca4: 9f c0 40 00 call %g1
200bca8: 90 10 00 10 mov %l0, %o0
200bcac: 80 a2 20 01 cmp %o0, 1
200bcb0: 12 80 00 19 bne 200bd14 <chdir+0xac>
200bcb4: 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 );
200bcb8: 21 00 80 57 sethi %hi(0x2015c00), %l0
200bcbc: d0 04 23 4c ld [ %l0 + 0x34c ], %o0 ! 2015f4c <rtems_current_user_env>
200bcc0: c2 02 20 0c ld [ %o0 + 0xc ], %g1
200bcc4: 80 a0 60 00 cmp %g1, 0
200bcc8: 22 80 00 09 be,a 200bcec <chdir+0x84> <== NEVER TAKEN
200bccc: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED
200bcd0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200bcd4: 80 a0 60 00 cmp %g1, 0
200bcd8: 22 80 00 05 be,a 200bcec <chdir+0x84> <== NEVER TAKEN
200bcdc: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED
200bce0: 9f c0 40 00 call %g1
200bce4: 90 02 20 04 add %o0, 4, %o0
rtems_filesystem_current = loc;
200bce8: c2 07 bf e8 ld [ %fp + -24 ], %g1
200bcec: c6 04 23 4c ld [ %l0 + 0x34c ], %g3
200bcf0: c2 20 e0 04 st %g1, [ %g3 + 4 ]
200bcf4: c4 07 bf ec ld [ %fp + -20 ], %g2
200bcf8: c4 20 e0 08 st %g2, [ %g3 + 8 ]
200bcfc: c2 07 bf f0 ld [ %fp + -16 ], %g1
200bd00: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
200bd04: c4 07 bf f4 ld [ %fp + -12 ], %g2
200bd08: c4 20 e0 10 st %g2, [ %g3 + 0x10 ]
return 0;
}
200bd0c: 81 c7 e0 08 ret
200bd10: 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 );
200bd14: 80 a0 60 00 cmp %g1, 0
200bd18: 02 80 00 08 be 200bd38 <chdir+0xd0> <== NEVER TAKEN
200bd1c: 01 00 00 00 nop
200bd20: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200bd24: 80 a0 60 00 cmp %g1, 0
200bd28: 02 80 00 04 be 200bd38 <chdir+0xd0> <== NEVER TAKEN
200bd2c: 01 00 00 00 nop
200bd30: 9f c0 40 00 call %g1
200bd34: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
200bd38: 40 00 0e 8e call 200f770 <__errno>
200bd3c: b0 10 3f ff mov -1, %i0
200bd40: 82 10 20 14 mov 0x14, %g1
200bd44: c2 22 00 00 st %g1, [ %o0 ]
200bd48: 81 c7 e0 08 ret
200bd4c: 81 e8 00 00 restore
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
200bd50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200bd54: 02 80 00 04 be 200bd64 <chdir+0xfc> <== NOT EXECUTED
200bd58: 01 00 00 00 nop <== NOT EXECUTED
200bd5c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200bd60: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200bd64: 40 00 0e 83 call 200f770 <__errno> <== NOT EXECUTED
200bd68: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200bd6c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200bd70: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200bd74: 81 c7 e0 08 ret <== NOT EXECUTED
200bd78: 81 e8 00 00 restore <== NOT EXECUTED
020044e0 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
20044e0: 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 );
20044e4: 92 10 20 00 clr %o1
20044e8: 90 10 00 18 mov %i0, %o0
20044ec: a0 07 bf e8 add %fp, -24, %l0
20044f0: 96 10 20 01 mov 1, %o3
20044f4: 94 10 00 10 mov %l0, %o2
20044f8: 40 00 00 96 call 2004750 <rtems_filesystem_evaluate_path>
20044fc: b0 10 3f ff mov -1, %i0
if ( status != 0 )
2004500: 80 a2 20 00 cmp %o0, 0
2004504: 12 80 00 16 bne 200455c <chmod+0x7c>
2004508: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !loc.handlers ){
200450c: 80 a0 60 00 cmp %g1, 0
2004510: 22 80 00 25 be,a 20045a4 <chmod+0xc4> <== NEVER TAKEN
2004514: 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 ){
2004518: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200451c: 80 a0 60 00 cmp %g1, 0
2004520: 02 80 00 11 be 2004564 <chmod+0x84> <== NEVER TAKEN
2004524: 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 );
2004528: 90 10 00 10 mov %l0, %o0
200452c: 9f c0 40 00 call %g1
2004530: 93 32 60 10 srl %o1, 0x10, %o1
rtems_filesystem_freenode( &loc );
2004534: c2 07 bf f0 ld [ %fp + -16 ], %g1
2004538: 80 a0 60 00 cmp %g1, 0
200453c: 02 80 00 08 be 200455c <chmod+0x7c> <== NEVER TAKEN
2004540: b0 10 00 08 mov %o0, %i0
2004544: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004548: 80 a0 60 00 cmp %g1, 0
200454c: 02 80 00 23 be 20045d8 <chmod+0xf8> <== NEVER TAKEN
2004550: 01 00 00 00 nop
2004554: 9f c0 40 00 call %g1
2004558: 90 10 00 10 mov %l0, %o0
return result;
}
200455c: 81 c7 e0 08 ret
2004560: 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 );
2004564: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004568: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200456c: 02 80 00 08 be 200458c <chmod+0xac> <== NOT EXECUTED
2004570: 01 00 00 00 nop <== NOT EXECUTED
2004574: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004578: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200457c: 02 80 00 04 be 200458c <chmod+0xac> <== NOT EXECUTED
2004580: 01 00 00 00 nop <== NOT EXECUTED
2004584: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004588: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200458c: 40 00 37 6c call 201233c <__errno> <== NOT EXECUTED
2004590: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004594: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004598: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200459c: 81 c7 e0 08 ret <== NOT EXECUTED
20045a0: 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 );
20045a4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20045a8: 02 80 00 08 be 20045c8 <chmod+0xe8> <== NOT EXECUTED
20045ac: 01 00 00 00 nop <== NOT EXECUTED
20045b0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20045b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20045b8: 02 80 00 04 be 20045c8 <chmod+0xe8> <== NOT EXECUTED
20045bc: 01 00 00 00 nop <== NOT EXECUTED
20045c0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20045c4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
20045c8: 40 00 37 5d call 201233c <__errno> <== NOT EXECUTED
20045cc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20045d0: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
20045d4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20045d8: 81 c7 e0 08 ret <== NOT EXECUTED
20045dc: 81 e8 00 00 restore <== NOT EXECUTED
020045e0 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
20045e0: 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 ) )
20045e4: 92 10 20 00 clr %o1
20045e8: 90 10 00 18 mov %i0, %o0
20045ec: a0 07 bf e8 add %fp, -24, %l0
20045f0: 96 10 20 01 mov 1, %o3
20045f4: 94 10 00 10 mov %l0, %o2
20045f8: 40 00 00 56 call 2004750 <rtems_filesystem_evaluate_path>
20045fc: b0 10 3f ff mov -1, %i0
2004600: 80 a2 20 00 cmp %o0, 0
2004604: 12 80 00 15 bne 2004658 <chown+0x78>
2004608: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
if ( !loc.ops->chown_h ) {
200460c: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2004610: 80 a0 a0 00 cmp %g2, 0
2004614: 02 80 00 13 be 2004660 <chown+0x80> <== NEVER TAKEN
2004618: 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 );
200461c: 95 2e a0 10 sll %i2, 0x10, %o2
2004620: 93 32 60 10 srl %o1, 0x10, %o1
2004624: 95 32 a0 10 srl %o2, 0x10, %o2
2004628: 9f c0 80 00 call %g2
200462c: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004630: c2 07 bf f0 ld [ %fp + -16 ], %g1
2004634: 80 a0 60 00 cmp %g1, 0
2004638: 02 80 00 08 be 2004658 <chown+0x78> <== NEVER TAKEN
200463c: b0 10 00 08 mov %o0, %i0
2004640: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004644: 80 a0 60 00 cmp %g1, 0
2004648: 02 80 00 10 be 2004688 <chown+0xa8> <== NEVER TAKEN
200464c: 01 00 00 00 nop
2004650: 9f c0 40 00 call %g1
2004654: 90 10 00 10 mov %l0, %o0
return result;
}
2004658: 81 c7 e0 08 ret
200465c: 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 );
2004660: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004664: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004668: 02 80 00 04 be 2004678 <chown+0x98> <== NOT EXECUTED
200466c: 01 00 00 00 nop <== NOT EXECUTED
2004670: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004674: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004678: 40 00 37 31 call 201233c <__errno> <== NOT EXECUTED
200467c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004680: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004684: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004688: 81 c7 e0 08 ret <== NOT EXECUTED
200468c: 81 e8 00 00 restore <== NOT EXECUTED
02002598 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
2002598: 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) {
200259c: 23 00 80 57 sethi %hi(0x2015c00), %l1
20025a0: e0 04 63 4c ld [ %l1 + 0x34c ], %l0 ! 2015f4c <rtems_current_user_env>
20025a4: 03 00 80 5b sethi %hi(0x2016c00), %g1
20025a8: 82 10 62 28 or %g1, 0x228, %g1 ! 2016e28 <rtems_global_user_env>
20025ac: 80 a4 00 01 cmp %l0, %g1
20025b0: 02 80 00 24 be 2002640 <chroot+0xa8> <== ALWAYS TAKEN
20025b4: 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);
20025b8: 40 00 25 ac call 200bc68 <chdir>
20025bc: 90 10 00 18 mov %i0, %o0
if (result) {
20025c0: 80 a2 20 00 cmp %o0, 0
20025c4: 12 80 00 2b bne 2002670 <chroot+0xd8> <== NEVER TAKEN
20025c8: 11 00 80 52 sethi %hi(0x2014800), %o0
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 0, &loc, 0)) {
20025cc: 92 10 20 00 clr %o1
20025d0: 90 12 23 68 or %o0, 0x368, %o0
20025d4: 94 07 bf e8 add %fp, -24, %o2
20025d8: 40 00 00 8f call 2002814 <rtems_filesystem_evaluate_path>
20025dc: 96 10 20 00 clr %o3
20025e0: 80 a2 20 00 cmp %o0, 0
20025e4: 12 80 00 23 bne 2002670 <chroot+0xd8> <== NEVER TAKEN
20025e8: d0 04 63 4c ld [ %l1 + 0x34c ], %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);
20025ec: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
20025f0: 80 a0 60 00 cmp %g1, 0
20025f4: 22 80 00 09 be,a 2002618 <chroot+0x80> <== NEVER TAKEN
20025f8: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED
20025fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002600: 80 a0 60 00 cmp %g1, 0
2002604: 22 80 00 05 be,a 2002618 <chroot+0x80> <== NEVER TAKEN
2002608: c2 07 bf e8 ld [ %fp + -24 ], %g1 <== NOT EXECUTED
200260c: 9f c0 40 00 call %g1
2002610: 90 02 20 14 add %o0, 0x14, %o0
rtems_filesystem_root = loc;
2002614: c2 07 bf e8 ld [ %fp + -24 ], %g1
2002618: c6 04 63 4c ld [ %l1 + 0x34c ], %g3
200261c: c2 20 e0 14 st %g1, [ %g3 + 0x14 ]
2002620: c4 07 bf ec ld [ %fp + -20 ], %g2
2002624: c4 20 e0 18 st %g2, [ %g3 + 0x18 ]
2002628: c2 07 bf f0 ld [ %fp + -16 ], %g1
200262c: c2 20 e0 1c st %g1, [ %g3 + 0x1c ]
2002630: c4 07 bf f4 ld [ %fp + -12 ], %g2
2002634: c4 20 e0 20 st %g2, [ %g3 + 0x20 ]
return 0;
}
2002638: 81 c7 e0 08 ret
200263c: 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*/
2002640: 40 00 06 22 call 2003ec8 <rtems_libio_set_private_env>
2002644: 01 00 00 00 nop
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
2002648: c2 04 63 4c ld [ %l1 + 0x34c ], %g1
200264c: 80 a0 40 10 cmp %g1, %l0
2002650: 12 bf ff da bne 20025b8 <chroot+0x20> <== ALWAYS TAKEN
2002654: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002658: 40 00 34 46 call 200f770 <__errno> <== NOT EXECUTED
200265c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
2002660: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2002664: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002668: 81 c7 e0 08 ret <== NOT EXECUTED
200266c: 81 e8 00 00 restore <== NOT EXECUTED
}
/* 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 );
2002670: 40 00 34 40 call 200f770 <__errno> <== NOT EXECUTED
2002674: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002678: 40 00 34 3e call 200f770 <__errno> <== NOT EXECUTED
200267c: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
2002680: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2002684: c2 24 00 00 st %g1, [ %l0 ] <== NOT EXECUTED
2002688: 81 c7 e0 08 ret <== NOT EXECUTED
200268c: 81 e8 00 00 restore <== NOT EXECUTED
02006378 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
2006378: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
200637c: 90 96 60 00 orcc %i1, 0, %o0
2006380: 02 80 00 1e be 20063f8 <clock_gettime+0x80>
2006384: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME )
2006388: 02 80 00 18 be 20063e8 <clock_gettime+0x70>
200638c: 80 a6 20 04 cmp %i0, 4
_TOD_Get(tp);
#ifdef CLOCK_MONOTONIC
else if ( clock_id == CLOCK_MONOTONIC )
2006390: 02 80 00 0c be 20063c0 <clock_gettime+0x48> <== NEVER TAKEN
2006394: 80 a6 20 02 cmp %i0, 2
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
2006398: 02 80 00 0a be 20063c0 <clock_gettime+0x48>
200639c: 80 a6 20 03 cmp %i0, 3
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
20063a0: 02 80 00 0c be 20063d0 <clock_gettime+0x58>
20063a4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
20063a8: 40 00 25 90 call 200f9e8 <__errno>
20063ac: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
20063b0: 82 10 20 16 mov 0x16, %g1
20063b4: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
20063b8: 81 c7 e0 08 ret
20063bc: 81 e8 00 00 restore
else if ( clock_id == CLOCK_MONOTONIC )
_TOD_Get_uptime(tp);
#endif
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
_TOD_Get_uptime(tp);
20063c0: 40 00 09 93 call 2008a0c <_TOD_Get_uptime>
20063c4: b0 10 20 00 clr %i0
20063c8: 81 c7 e0 08 ret
20063cc: 81 e8 00 00 restore
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
20063d0: 40 00 25 86 call 200f9e8 <__errno>
20063d4: b0 10 3f ff mov -1, %i0
20063d8: 82 10 20 58 mov 0x58, %g1
20063dc: c2 22 00 00 st %g1, [ %o0 ]
20063e0: 81 c7 e0 08 ret
20063e4: 81 e8 00 00 restore
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME )
_TOD_Get(tp);
20063e8: 40 00 09 70 call 20089a8 <_TOD_Get>
20063ec: b0 10 20 00 clr %i0
20063f0: 81 c7 e0 08 ret
20063f4: 81 e8 00 00 restore
clockid_t clock_id,
struct timespec *tp
)
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
20063f8: 40 00 25 7c call 200f9e8 <__errno>
20063fc: b0 10 3f ff mov -1, %i0
2006400: 82 10 20 16 mov 0x16, %g1
2006404: c2 22 00 00 st %g1, [ %o0 ]
2006408: 81 c7 e0 08 ret
200640c: 81 e8 00 00 restore
02006410 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
2006410: 9d e3 bf 98 save %sp, -104, %sp
if ( !tp )
2006414: 90 96 60 00 orcc %i1, 0, %o0
2006418: 02 80 00 23 be 20064a4 <clock_settime+0x94> <== NEVER TAKEN
200641c: 80 a6 20 01 cmp %i0, 1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
2006420: 02 80 00 12 be 2006468 <clock_settime+0x58>
2006424: 80 a6 20 02 cmp %i0, 2
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
2006428: 02 80 00 0a be 2006450 <clock_settime+0x40>
200642c: 80 a6 20 03 cmp %i0, 3
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
2006430: 02 80 00 08 be 2006450 <clock_settime+0x40>
2006434: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
2006438: 40 00 25 6c call 200f9e8 <__errno>
200643c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2006440: 82 10 20 16 mov 0x16, %g1
2006444: c2 22 00 00 st %g1, [ %o0 ]
return 0;
}
2006448: 81 c7 e0 08 ret
200644c: 81 e8 00 00 restore
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
2006450: 40 00 25 66 call 200f9e8 <__errno>
2006454: b0 10 3f ff mov -1, %i0
2006458: 82 10 20 58 mov 0x58, %g1
200645c: c2 22 00 00 st %g1, [ %o0 ]
2006460: 81 c7 e0 08 ret
2006464: 81 e8 00 00 restore
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
2006468: c4 02 00 00 ld [ %o0 ], %g2
200646c: 03 08 76 b9 sethi %hi(0x21dae400), %g1
2006470: 82 10 60 ff or %g1, 0xff, %g1 ! 21dae4ff <RAM_END+0x1f9ae4ff>
2006474: 80 a0 80 01 cmp %g2, %g1
2006478: 08 80 00 0b bleu 20064a4 <clock_settime+0x94>
200647c: 05 00 80 71 sethi %hi(0x201c400), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2006480: c2 00 a2 80 ld [ %g2 + 0x280 ], %g1 ! 201c680 <_Thread_Dispatch_disable_level>
2006484: 82 00 60 01 inc %g1
2006488: c2 20 a2 80 st %g1, [ %g2 + 0x280 ]
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
200648c: 40 00 09 88 call 2008aac <_TOD_Set>
2006490: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2006494: 40 00 0e 4a call 2009dbc <_Thread_Enable_dispatch>
2006498: 01 00 00 00 nop
200649c: 81 c7 e0 08 ret
20064a0: 81 e8 00 00 restore
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
20064a4: 40 00 25 51 call 200f9e8 <__errno>
20064a8: b0 10 3f ff mov -1, %i0
20064ac: 82 10 20 16 mov 0x16, %g1
20064b0: c2 22 00 00 st %g1, [ %o0 ]
20064b4: 81 c7 e0 08 ret
20064b8: 81 e8 00 00 restore
0200a904 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
200a904: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
200a908: 03 00 80 5d sethi %hi(0x2017400), %g1
200a90c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
200a910: 80 a6 00 02 cmp %i0, %g2
200a914: 1a 80 00 23 bcc 200a9a0 <close+0x9c>
200a918: 03 00 80 60 sethi %hi(0x2018000), %g1
iop = rtems_libio_iop(fd);
200a91c: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
200a920: 85 2e 20 02 sll %i0, 2, %g2
200a924: 83 2e 20 04 sll %i0, 4, %g1
200a928: 82 20 40 02 sub %g1, %g2, %g1
200a92c: 82 00 40 18 add %g1, %i0, %g1
200a930: 83 28 60 02 sll %g1, 2, %g1
200a934: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
200a938: c4 06 20 0c ld [ %i0 + 0xc ], %g2
200a93c: 80 88 a1 00 btst 0x100, %g2
200a940: 02 80 00 18 be 200a9a0 <close+0x9c>
200a944: 01 00 00 00 nop
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
200a948: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200a94c: c2 00 60 04 ld [ %g1 + 4 ], %g1
200a950: 80 a0 60 00 cmp %g1, 0
200a954: 02 80 00 05 be 200a968 <close+0x64> <== NEVER TAKEN
200a958: a0 10 20 00 clr %l0
rc = (*iop->handlers->close_h)( iop );
200a95c: 9f c0 40 00 call %g1
200a960: 90 10 00 18 mov %i0, %o0
200a964: a0 10 00 08 mov %o0, %l0
rtems_filesystem_freenode( &iop->pathinfo );
200a968: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200a96c: 80 a0 60 00 cmp %g1, 0
200a970: 02 80 00 08 be 200a990 <close+0x8c> <== NEVER TAKEN
200a974: 01 00 00 00 nop
200a978: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200a97c: 80 a0 60 00 cmp %g1, 0
200a980: 02 80 00 04 be 200a990 <close+0x8c>
200a984: 01 00 00 00 nop
200a988: 9f c0 40 00 call %g1
200a98c: 90 06 20 10 add %i0, 0x10, %o0
rtems_libio_free( iop );
200a990: 40 00 01 04 call 200ada0 <rtems_libio_free>
200a994: 90 10 00 18 mov %i0, %o0
return rc;
}
200a998: 81 c7 e0 08 ret
200a99c: 91 e8 00 10 restore %g0, %l0, %o0
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
200a9a0: 40 00 0c 5c call 200db10 <__errno>
200a9a4: a0 10 3f ff mov -1, %l0
200a9a8: 82 10 20 09 mov 9, %g1
200a9ac: 10 bf ff fb b 200a998 <close+0x94>
200a9b0: c2 22 00 00 st %g1, [ %o0 ]
020033d8 <closedir>:
* close a directory.
*/
int
closedir(
DIR *dirp )
{
20033d8: 9d e3 bf 98 save %sp, -104, %sp
int fd;
if ( !dirp )
20033dc: a0 96 20 00 orcc %i0, 0, %l0
20033e0: 02 80 00 0b be 200340c <closedir+0x34> <== NEVER TAKEN
20033e4: 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);
20033e8: d0 04 20 0c ld [ %l0 + 0xc ], %o0
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
fd = dirp->dd_fd;
20033ec: f0 04 00 00 ld [ %l0 ], %i0
dirp->dd_fd = -1;
dirp->dd_loc = 0;
20033f0: c0 24 20 04 clr [ %l0 + 4 ]
(void)free((void *)dirp->dd_buf);
20033f4: 40 00 00 cb call 2003720 <free>
20033f8: c2 24 00 00 st %g1, [ %l0 ]
(void)free((void *)dirp);
20033fc: 40 00 00 c9 call 2003720 <free>
2003400: 90 10 00 10 mov %l0, %o0
return(close(fd));
2003404: 40 00 00 08 call 2003424 <close>
2003408: 81 e8 00 00 restore
DIR *dirp )
{
int fd;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
200340c: 40 00 34 f1 call 20107d0 <__errno> <== NOT EXECUTED
2003410: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003414: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2003418: 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));
}
200341c: 81 c7 e0 08 ret <== NOT EXECUTED
2003420: 81 e8 00 00 restore <== NOT EXECUTED
0200cd04 <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
200cd04: 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;
200cd08: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
args.iop = iop;
200cd0c: f0 27 bf ec st %i0, [ %fp + -20 ]
args.flags = 0;
200cd10: c0 27 bf f0 clr [ %fp + -16 ]
args.mode = 0;
200cd14: c0 27 bf f4 clr [ %fp + -12 ]
status = rtems_io_close(
200cd18: d2 00 60 50 ld [ %g1 + 0x50 ], %o1
200cd1c: d0 00 60 4c ld [ %g1 + 0x4c ], %o0
200cd20: 94 07 bf ec add %fp, -20, %o2
200cd24: 40 00 02 4b call 200d650 <rtems_io_close>
200cd28: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
200cd2c: 80 a2 20 00 cmp %o0, 0
200cd30: 12 80 00 04 bne 200cd40 <device_close+0x3c> <== NEVER TAKEN
200cd34: 01 00 00 00 nop
return rtems_deviceio_errno(status);
}
return 0;
}
200cd38: 81 c7 e0 08 ret
200cd3c: 81 e8 00 00 restore
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
200cd40: 7f ff ff a1 call 200cbc4 <rtems_deviceio_errno> <== NOT EXECUTED
200cd44: 01 00 00 00 nop <== NOT EXECUTED
}
return 0;
}
200cd48: 81 c7 e0 08 ret <== NOT EXECUTED
200cd4c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cbf8 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
200cbf8: 9d e3 bf 88 save %sp, -120, %sp <== NOT EXECUTED
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
200cbfc: 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;
200cc00: f2 27 bf ec st %i1, [ %fp + -20 ] <== NOT EXECUTED
args.buffer = buffer;
200cc04: 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;
200cc08: 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(
200cc0c: d2 00 60 50 ld [ %g1 + 0x50 ], %o1 <== NOT EXECUTED
200cc10: d0 00 60 4c ld [ %g1 + 0x4c ], %o0 <== NOT EXECUTED
200cc14: 40 00 02 a5 call 200d6a8 <rtems_io_control> <== NOT EXECUTED
200cc18: 94 07 bf e8 add %fp, -24, %o2 <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cc1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cc20: 12 80 00 05 bne 200cc34 <device_ioctl+0x3c> <== NOT EXECUTED
200cc24: 01 00 00 00 nop <== NOT EXECUTED
return rtems_deviceio_errno(status);
return args.ioctl_return;
200cc28: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
}
200cc2c: 81 c7 e0 08 ret <== NOT EXECUTED
200cc30: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cc34: 7f ff ff e4 call 200cbc4 <rtems_deviceio_errno> <== NOT EXECUTED
200cc38: 01 00 00 00 nop <== NOT EXECUTED
return args.ioctl_return;
}
200cc3c: 81 c7 e0 08 ret <== NOT EXECUTED
200cc40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cd50 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200cd50: 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;
200cd54: 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;
200cd58: c4 06 20 2c ld [ %i0 + 0x2c ], %g2
args.iop = iop;
200cd5c: f0 27 bf ec st %i0, [ %fp + -20 ]
args.flags = iop->flags;
200cd60: c2 27 bf f0 st %g1, [ %fp + -16 ]
args.mode = mode;
200cd64: f6 27 bf f4 st %i3, [ %fp + -12 ]
status = rtems_io_open(
200cd68: d2 00 a0 50 ld [ %g2 + 0x50 ], %o1
200cd6c: d0 00 a0 4c ld [ %g2 + 0x4c ], %o0
200cd70: 94 07 bf ec add %fp, -20, %o2
200cd74: 40 00 02 63 call 200d700 <rtems_io_open>
200cd78: b0 10 20 00 clr %i0
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cd7c: 80 a2 20 00 cmp %o0, 0
200cd80: 12 80 00 04 bne 200cd90 <device_open+0x40> <== NEVER TAKEN
200cd84: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return 0;
}
200cd88: 81 c7 e0 08 ret
200cd8c: 81 e8 00 00 restore
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cd90: 7f ff ff 8d call 200cbc4 <rtems_deviceio_errno> <== NOT EXECUTED
200cd94: 01 00 00 00 nop <== NOT EXECUTED
return 0;
}
200cd98: 81 c7 e0 08 ret <== NOT EXECUTED
200cd9c: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cca4 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200cca4: 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;
200cca8: 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;
200ccac: 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;
200ccb0: c6 06 20 2c ld [ %i0 + 0x2c ], %g3 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
200ccb4: 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;
200ccb8: c2 27 bf e4 st %g1, [ %fp + -28 ] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
200ccbc: f4 27 bf ec st %i2, [ %fp + -20 ] <== NOT EXECUTED
args.flags = iop->flags;
200ccc0: 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;
200ccc4: 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;
200ccc8: c0 27 bf f4 clr [ %fp + -12 ] <== NOT EXECUTED
status = rtems_io_read(
200cccc: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1 <== NOT EXECUTED
200ccd0: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0 <== NOT EXECUTED
200ccd4: 40 00 02 a1 call 200d758 <rtems_io_read> <== NOT EXECUTED
200ccd8: 94 07 bf e0 add %fp, -32, %o2 <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200ccdc: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200cce0: 12 80 00 05 bne 200ccf4 <device_read+0x50> <== NOT EXECUTED
200cce4: 01 00 00 00 nop <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
200cce8: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
}
200ccec: 81 c7 e0 08 ret <== NOT EXECUTED
200ccf0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200ccf4: 7f ff ff b4 call 200cbc4 <rtems_deviceio_errno> <== NOT EXECUTED
200ccf8: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
200ccfc: 81 c7 e0 08 ret <== NOT EXECUTED
200cd00: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200cc44 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
200cc44: 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;
200cc48: 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;
200cc4c: 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;
200cc50: c6 06 20 2c ld [ %i0 + 0x2c ], %g3
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
200cc54: 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;
200cc58: c2 27 bf e4 st %g1, [ %fp + -28 ]
args.buffer = (void *) buffer;
args.count = count;
200cc5c: f4 27 bf ec st %i2, [ %fp + -20 ]
args.flags = iop->flags;
200cc60: 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;
200cc64: 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;
200cc68: c0 27 bf f4 clr [ %fp + -12 ]
status = rtems_io_write(
200cc6c: d2 00 e0 50 ld [ %g3 + 0x50 ], %o1
200cc70: d0 00 e0 4c ld [ %g3 + 0x4c ], %o0
200cc74: 40 00 02 cf call 200d7b0 <rtems_io_write>
200cc78: 94 07 bf e0 add %fp, -32, %o2
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
200cc7c: 80 a2 20 00 cmp %o0, 0
200cc80: 12 80 00 05 bne 200cc94 <device_write+0x50> <== NEVER TAKEN
200cc84: 01 00 00 00 nop
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
200cc88: d0 07 bf f4 ld [ %fp + -12 ], %o0
}
200cc8c: 81 c7 e0 08 ret
200cc90: 91 e8 00 08 restore %g0, %o0, %o0
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
200cc94: 7f ff ff cc call 200cbc4 <rtems_deviceio_errno> <== NOT EXECUTED
200cc98: 01 00 00 00 nop <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
200cc9c: 81 c7 e0 08 ret <== NOT EXECUTED
200cca0: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02003ebc <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
2003ebc: 9d e3 bf 98 save %sp, -104, %sp
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
2003ec0: c2 06 20 b4 ld [ %i0 + 0xb4 ], %g1
2003ec4: 80 a0 60 00 cmp %g1, 0
2003ec8: 12 80 00 04 bne 2003ed8 <drainOutput+0x1c> <== NEVER TAKEN
2003ecc: 01 00 00 00 nop
2003ed0: 81 c7 e0 08 ret
2003ed4: 81 e8 00 00 restore
rtems_interrupt_disable (level);
2003ed8: 7f ff f7 c3 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
2003edc: 01 00 00 00 nop <== NOT EXECUTED
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
2003ee0: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED
2003ee4: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2003ee8: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003eec: 02 80 00 14 be 2003f3c <drainOutput+0x80> <== NOT EXECUTED
2003ef0: 01 00 00 00 nop <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2003ef4: a0 10 20 02 mov 2, %l0 ! 2 <PROM_START+0x2> <== NOT EXECUTED
2003ef8: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
2003efc: 7f ff f7 be call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2003f00: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2003f04: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
2003f08: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003f0c: 40 00 06 55 call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
2003f10: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2003f14: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2003f18: 12 80 00 0b bne 2003f44 <drainOutput+0x88> <== NOT EXECUTED
2003f1c: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
2003f20: 7f ff f7 b1 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
2003f24: 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) {
2003f28: c4 06 20 84 ld [ %i0 + 0x84 ], %g2 <== NOT EXECUTED
2003f2c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2003f30: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003f34: 32 bf ff f2 bne,a 2003efc <drainOutput+0x40> <== NOT EXECUTED
2003f38: e0 26 20 94 st %l0, [ %i0 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
2003f3c: 7f ff f7 ae call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2003f40: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2003f44: 40 00 08 0a call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
02002eb0 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
2002eb0: 9d e3 bf 48 save %sp, -184, %sp
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2002eb4: a0 07 bf a8 add %fp, -88, %l0
2002eb8: 90 10 00 18 mov %i0, %o0
2002ebc: 40 00 01 f0 call 200367c <fstat>
2002ec0: 92 10 00 10 mov %l0, %o1
if ( status == -1 )
2002ec4: 80 a2 3f ff cmp %o0, -1
2002ec8: 32 80 00 05 bne,a 2002edc <dup2+0x2c> <== ALWAYS TAKEN
2002ecc: 92 10 00 10 mov %l0, %o1
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2002ed0: 90 10 3f ff mov -1, %o0
}
2002ed4: 81 c7 e0 08 ret
2002ed8: 91 e8 00 08 restore %g0, %o0, %o0
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
2002edc: 40 00 01 e8 call 200367c <fstat>
2002ee0: 90 10 00 19 mov %i1, %o0
if ( status == -1 )
2002ee4: 80 a2 3f ff cmp %o0, -1
2002ee8: 02 bf ff fa be 2002ed0 <dup2+0x20> <== ALWAYS TAKEN
2002eec: 90 10 00 18 mov %i0, %o0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
2002ef0: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
2002ef4: 40 00 00 a1 call 2003178 <fcntl> <== NOT EXECUTED
2002ef8: 92 10 20 00 clr %o1 <== NOT EXECUTED
2002efc: 30 bf ff f6 b,a 2002ed4 <dup2+0x24> <== NOT EXECUTED
02003904 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
2003904: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2003908: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
200390c: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2003910: 02 80 00 0d be 2003944 <echo+0x40> <== NOT EXECUTED
2003914: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED
2003918: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
200391c: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 ! 20179e8 <__ctype_ptr><== NOT EXECUTED
2003920: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED
2003924: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED
2003928: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
200392c: 02 80 00 06 be 2003944 <echo+0x40> <== NOT EXECUTED
2003930: 80 a2 20 09 cmp %o0, 9 <== NOT EXECUTED
2003934: 02 80 00 04 be 2003944 <echo+0x40> <== NOT EXECUTED
2003938: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED
200393c: 12 80 00 06 bne 2003954 <echo+0x50> <== NOT EXECUTED
2003940: 82 1e 20 40 xor %i0, 0x40, %g1 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
2003944: 7f ff ff 8f call 2003780 <oproc> <== NOT EXECUTED
2003948: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200394c: 81 c7 e0 08 ret <== NOT EXECUTED
2003950: 81 e8 00 00 restore <== 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] = '^';
2003954: 84 10 20 5e mov 0x5e, %g2 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
2003958: c2 2f bf f1 stb %g1, [ %fp + -15 ] <== 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] = '^';
200395c: c4 2f bf f0 stb %g2, [ %fp + -16 ] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
2003960: 90 07 bf f0 add %fp, -16, %o0 <== NOT EXECUTED
2003964: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2003968: 7f ff ff 38 call 2003648 <rtems_termios_puts> <== NOT EXECUTED
200396c: 94 10 00 19 mov %i1, %o2 <== NOT EXECUTED
tty->column += 2;
2003970: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
2003974: 82 00 60 02 add %g1, 2, %g1 <== NOT EXECUTED
2003978: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
200397c: 81 c7 e0 08 ret <== NOT EXECUTED
2003980: 81 e8 00 00 restore <== NOT EXECUTED
02003984 <erase>:
* 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)
{
2003984: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if (tty->ccount == 0)
2003988: c6 06 20 20 ld [ %i0 + 0x20 ], %g3 <== NOT EXECUTED
200398c: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2003990: 02 80 00 80 be 2003b90 <erase+0x20c> <== NOT EXECUTED
2003994: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
return;
if (lineFlag) {
2003998: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
200399c: 12 80 00 28 bne 2003a3c <erase+0xb8> <== NOT EXECUTED
20039a0: c8 06 20 3c ld [ %i0 + 0x3c ], %g4 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
20039a4: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
20039a8: 05 00 80 59 sethi %hi(0x2016400), %g2 <== NOT EXECUTED
20039ac: a4 10 61 e8 or %g1, 0x1e8, %l2 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
20039b0: a6 10 a1 78 or %g2, 0x178, %l3 <== NOT EXECUTED
20039b4: 03 00 80 59 sethi %hi(0x2016400), %g1 <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
20039b8: a2 10 61 70 or %g1, 0x170, %l1 ! 2016570 <pollCallbacks.4788+0x390><== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
20039bc: da 04 20 1c ld [ %l0 + 0x1c ], %o5 <== NOT EXECUTED
20039c0: 86 00 ff ff add %g3, -1, %g3 <== NOT EXECUTED
20039c4: c6 24 20 20 st %g3, [ %l0 + 0x20 ] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
20039c8: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED
20039cc: 02 80 00 13 be 2003a18 <erase+0x94> <== NOT EXECUTED
20039d0: c2 0b 40 03 ldub [ %o5 + %g3 ], %g1 <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
20039d4: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
20039d8: 12 80 00 05 bne 20039ec <erase+0x68> <== NOT EXECUTED
20039dc: b0 08 60 ff and %g1, 0xff, %i0 <== NOT EXECUTED
20039e0: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED
20039e4: 22 80 00 6d be,a 2003b98 <erase+0x214> <== NOT EXECUTED
20039e8: f0 0c 20 43 ldub [ %l0 + 0x43 ], %i0 <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
20039ec: 80 a6 20 09 cmp %i0, 9 <== NOT EXECUTED
20039f0: 02 80 00 3f be 2003aec <erase+0x168> <== NOT EXECUTED
20039f4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
20039f8: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
20039fc: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED
2003a00: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED
2003a04: 02 80 00 2f be 2003ac0 <erase+0x13c> <== NOT EXECUTED
2003a08: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED
2003a0c: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED
2003a10: 12 80 00 1a bne 2003a78 <erase+0xf4> <== NOT EXECUTED
2003a14: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2003a18: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003a1c: 02 80 00 5d be 2003b90 <erase+0x20c> <== NOT EXECUTED
2003a20: 01 00 00 00 nop <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
2003a24: c6 04 20 20 ld [ %l0 + 0x20 ], %g3 <== NOT EXECUTED
2003a28: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2003a2c: 02 80 00 59 be 2003b90 <erase+0x20c> <== NOT EXECUTED
2003a30: 01 00 00 00 nop <== NOT EXECUTED
2003a34: 10 bf ff e2 b 20039bc <erase+0x38> <== NOT EXECUTED
2003a38: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED
erase (struct rtems_termios_tty *tty, int lineFlag)
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
2003a3c: 80 89 20 08 btst 8, %g4 <== NOT EXECUTED
2003a40: 02 80 00 53 be 2003b8c <erase+0x208> <== NOT EXECUTED
2003a44: 80 89 20 10 btst 0x10, %g4 <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
2003a48: 12 bf ff d8 bne 20039a8 <erase+0x24> <== NOT EXECUTED
2003a4c: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
2003a50: 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;
2003a54: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2003a58: 7f ff ff ab call 2003904 <echo> <== NOT EXECUTED
2003a5c: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2003a60: c2 06 20 3c ld [ %i0 + 0x3c ], %g1 <== NOT EXECUTED
2003a64: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003a68: 02 80 00 4a be 2003b90 <erase+0x20c> <== NOT EXECUTED
2003a6c: b2 10 00 18 mov %i0, %i1 <== NOT EXECUTED
echo ('\n', tty);
2003a70: 7f ff ff a5 call 2003904 <echo> <== NOT EXECUTED
2003a74: 91 e8 20 0a restore %g0, 0xa, %o0 <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
2003a78: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2003a7c: 7f ff fe f3 call 2003648 <rtems_termios_puts> <== NOT EXECUTED
2003a80: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
2003a84: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003a88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003a8c: 22 80 00 05 be,a 2003aa0 <erase+0x11c> <== NOT EXECUTED
2003a90: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
tty->column--;
2003a94: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003a98: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
2003a9c: c2 04 80 00 ld [ %l2 ], %g1 <== NOT EXECUTED
2003aa0: c4 08 40 18 ldub [ %g1 + %i0 ], %g2 <== NOT EXECUTED
2003aa4: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED
2003aa8: 02 80 00 06 be 2003ac0 <erase+0x13c> <== NOT EXECUTED
2003aac: 11 00 80 59 sethi %hi(0x2016400), %o0 <== NOT EXECUTED
2003ab0: c8 04 20 3c ld [ %l0 + 0x3c ], %g4 <== NOT EXECUTED
2003ab4: 80 89 22 00 btst 0x200, %g4 <== NOT EXECUTED
2003ab8: 02 bf ff d9 be 2003a1c <erase+0x98> <== NOT EXECUTED
2003abc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
2003ac0: 92 10 20 03 mov 3, %o1 <== NOT EXECUTED
2003ac4: 90 12 21 78 or %o0, 0x178, %o0 <== NOT EXECUTED
2003ac8: 7f ff fe e0 call 2003648 <rtems_termios_puts> <== NOT EXECUTED
2003acc: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
if (tty->column)
2003ad0: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003ad4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003ad8: 02 bf ff d1 be 2003a1c <erase+0x98> <== NOT EXECUTED
2003adc: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
tty->column--;
2003ae0: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003ae4: 10 bf ff ce b 2003a1c <erase+0x98> <== NOT EXECUTED
2003ae8: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2003aec: 02 80 00 16 be 2003b44 <erase+0x1c0> <== NOT EXECUTED
2003af0: 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)) {
2003af4: d8 04 80 00 ld [ %l2 ], %o4 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2003af8: 88 09 22 00 and %g4, 0x200, %g4 <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2003afc: 10 80 00 07 b 2003b18 <erase+0x194> <== NOT EXECUTED
2003b00: 84 10 20 00 clr %g2 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2003b04: 32 80 00 02 bne,a 2003b0c <erase+0x188> <== NOT EXECUTED
2003b08: b0 06 20 02 add %i0, 2, %i0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2003b0c: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2003b10: 22 80 00 0e be,a 2003b48 <erase+0x1c4> <== NOT EXECUTED
2003b14: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
c = tty->cbuf[i++];
2003b18: c2 0b 40 02 ldub [ %o5 + %g2 ], %g1 <== NOT EXECUTED
if (c == '\t') {
2003b1c: 80 a0 60 09 cmp %g1, 9 <== NOT EXECUTED
2003b20: 02 80 00 18 be 2003b80 <erase+0x1fc> <== NOT EXECUTED
2003b24: 84 00 a0 01 inc %g2 <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
2003b28: c2 0b 00 01 ldub [ %o4 + %g1 ], %g1 <== NOT EXECUTED
2003b2c: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
2003b30: 12 bf ff f5 bne 2003b04 <erase+0x180> <== NOT EXECUTED
2003b34: 80 a1 20 00 cmp %g4, 0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
2003b38: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
2003b3c: 12 bf ff f7 bne 2003b18 <erase+0x194> <== NOT EXECUTED
2003b40: b0 06 20 01 inc %i0 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2003b44: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003b48: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED
2003b4c: 04 bf ff b4 ble 2003a1c <erase+0x98> <== NOT EXECUTED
2003b50: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
2003b54: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2003b58: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003b5c: 7f ff fe bb call 2003648 <rtems_termios_puts> <== NOT EXECUTED
2003b60: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
tty->column--;
2003b64: c2 04 20 28 ld [ %l0 + 0x28 ], %g1 <== NOT EXECUTED
2003b68: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
2003b6c: 80 a0 40 18 cmp %g1, %i0 <== NOT EXECUTED
2003b70: 14 bf ff f9 bg 2003b54 <erase+0x1d0> <== NOT EXECUTED
2003b74: c2 24 20 28 st %g1, [ %l0 + 0x28 ] <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
2003b78: 10 bf ff a9 b 2003a1c <erase+0x98> <== NOT EXECUTED
2003b7c: 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;
2003b80: 82 16 20 07 or %i0, 7, %g1 <== NOT EXECUTED
2003b84: 10 bf ff e2 b 2003b0c <erase+0x188> <== NOT EXECUTED
2003b88: b0 00 60 01 add %g1, 1, %i0 <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
2003b8c: c0 26 20 20 clr [ %i0 + 0x20 ] <== NOT EXECUTED
2003b90: 81 c7 e0 08 ret <== NOT EXECUTED
2003b94: 81 e8 00 00 restore <== 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);
2003b98: 7f ff ff 5b call 2003904 <echo> <== NOT EXECUTED
2003b9c: 93 e8 00 10 restore %g0, %l0, %o1 <== NOT EXECUTED
02003178 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
2003178: 9d e3 bf 90 save %sp, -112, %sp
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
200317c: 03 00 80 5d sethi %hi(0x2017400), %g1
2003180: c8 00 60 08 ld [ %g1 + 8 ], %g4 ! 2017408 <rtems_libio_number_iops>
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
2003184: 90 07 a0 4c add %fp, 0x4c, %o0
2003188: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200318c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2003190: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2003194: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
2003198: 80 a6 00 04 cmp %i0, %g4
200319c: 1a 80 00 7c bcc 200338c <fcntl+0x214> <== NEVER TAKEN
20031a0: d0 27 bf f4 st %o0, [ %fp + -12 ]
iop = rtems_libio_iop( fd );
20031a4: 39 00 80 60 sethi %hi(0x2018000), %i4
20031a8: da 07 20 b4 ld [ %i4 + 0xb4 ], %o5 ! 20180b4 <rtems_libio_iops>
20031ac: 85 2e 20 02 sll %i0, 2, %g2
20031b0: 83 2e 20 04 sll %i0, 4, %g1
20031b4: 82 20 40 02 sub %g1, %g2, %g1
20031b8: 82 00 40 18 add %g1, %i0, %g1
20031bc: 83 28 60 02 sll %g1, 2, %g1
20031c0: ba 03 40 01 add %o5, %g1, %i5
rtems_libio_check_is_open(iop);
20031c4: d8 07 60 0c ld [ %i5 + 0xc ], %o4
20031c8: 80 8b 21 00 btst 0x100, %o4
20031cc: 02 80 00 70 be 200338c <fcntl+0x214> <== NEVER TAKEN
20031d0: 80 a6 60 09 cmp %i1, 9
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
20031d4: 08 80 00 08 bleu 20031f4 <fcntl+0x7c>
20031d8: 83 2e 60 02 sll %i1, 2, %g1
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
20031dc: 40 00 34 e4 call 201056c <__errno>
20031e0: b0 10 3f ff mov -1, %i0
20031e4: 82 10 20 16 mov 0x16, %g1
20031e8: c2 22 00 00 st %g1, [ %o0 ]
20031ec: 81 c7 e0 08 ret
20031f0: 81 e8 00 00 restore
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
20031f4: 05 00 80 0c sethi %hi(0x2003000), %g2
20031f8: 84 10 a1 50 or %g2, 0x150, %g2 ! 2003150 <rtems_filesystem_evaluate_path+0x178>
20031fc: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2003200: 81 c0 c0 00 jmp %g3
2003204: 01 00 00 00 nop
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
2003208: 40 00 34 d9 call 201056c <__errno>
200320c: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff>
2003210: 82 10 20 86 mov 0x86, %g1
2003214: c2 22 00 00 st %g1, [ %o0 ]
2003218: 81 c7 e0 08 ret
200321c: 81 e8 00 00 restore
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 ) );
2003220: d0 02 00 00 ld [ %o0 ], %o0
2003224: 40 00 02 90 call 2003c64 <rtems_libio_fcntl_flags>
2003228: b0 10 20 00 clr %i0
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
200322c: c2 07 60 0c ld [ %i5 + 0xc ], %g1
2003230: 90 0a 22 01 and %o0, 0x201, %o0
2003234: 82 08 7d fe and %g1, -514, %g1
2003238: 90 12 00 01 or %o0, %g1, %o0
200323c: d0 27 60 0c st %o0, [ %i5 + 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) {
2003240: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
2003244: c2 00 60 30 ld [ %g1 + 0x30 ], %g1
2003248: 80 a0 60 00 cmp %g1, 0
200324c: 02 bf ff e8 be 20031ec <fcntl+0x74> <== NEVER TAKEN
2003250: 92 10 00 1d mov %i5, %o1
int err = (*iop->handlers->fcntl_h)( cmd, iop );
2003254: 9f c0 40 00 call %g1
2003258: 90 10 00 19 mov %i1, %o0
if (err) {
200325c: ba 92 20 00 orcc %o0, 0, %i5
2003260: 12 80 00 04 bne 2003270 <fcntl+0xf8> <== NEVER TAKEN
2003264: 01 00 00 00 nop
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
2003268: 81 c7 e0 08 ret
200326c: 81 e8 00 00 restore
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
2003270: 40 00 34 bf call 201056c <__errno> <== NOT EXECUTED
2003274: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003278: fa 22 00 00 st %i5, [ %o0 ] <== NOT EXECUTED
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
200327c: 81 c7 e0 08 ret <== NOT EXECUTED
2003280: 81 e8 00 00 restore <== 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 );
2003284: 40 00 01 ca call 20039ac <rtems_libio_to_fcntl_flags>
2003288: 90 10 00 0c mov %o4, %o0
200328c: b0 10 00 08 mov %o0, %i0
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
2003290: 80 a6 20 00 cmp %i0, 0
2003294: 36 bf ff ec bge,a 2003244 <fcntl+0xcc> <== ALWAYS TAKEN
2003298: c2 07 60 30 ld [ %i5 + 0x30 ], %g1
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
200329c: 81 c7 e0 08 ret <== NOT EXECUTED
20032a0: 81 e8 00 00 restore <== 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 ) )
20032a4: c2 02 00 00 ld [ %o0 ], %g1
20032a8: 80 a0 60 00 cmp %g1, 0
20032ac: 02 80 00 2d be 2003360 <fcntl+0x1e8> <== NEVER TAKEN
20032b0: 82 0b 37 ff and %o4, -2049, %g1
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
20032b4: 82 13 28 00 or %o4, 0x800, %g1
20032b8: b0 10 20 00 clr %i0
20032bc: 10 bf ff e1 b 2003240 <fcntl+0xc8>
20032c0: c2 27 60 0c st %g1, [ %i5 + 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);
20032c4: 83 33 20 0b srl %o4, 0xb, %g1
20032c8: 10 bf ff de b 2003240 <fcntl+0xc8>
20032cc: b0 08 60 01 and %g1, 1, %i0
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
20032d0: c6 02 00 00 ld [ %o0 ], %g3
if ( fd2 )
20032d4: 80 a0 e0 00 cmp %g3, 0
20032d8: 02 80 00 33 be 20033a4 <fcntl+0x22c> <== ALWAYS TAKEN
20032dc: 80 a1 00 03 cmp %g4, %g3
diop = rtems_libio_iop( fd2 );
20032e0: 90 10 20 00 clr %o0 <== NOT EXECUTED
20032e4: 18 80 00 22 bgu 200336c <fcntl+0x1f4> <== NOT EXECUTED
20032e8: 96 10 20 00 clr %o3 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
20032ec: c2 07 60 10 ld [ %i5 + 0x10 ], %g1
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
20032f0: c6 07 60 2c ld [ %i5 + 0x2c ], %g3
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
20032f4: c2 22 20 10 st %g1, [ %o0 + 0x10 ]
20032f8: c4 07 60 14 ld [ %i5 + 0x14 ], %g2
ret = (int) (diop - rtems_libio_iops);
20032fc: c8 07 20 b4 ld [ %i4 + 0xb4 ], %g4
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
2003300: c4 22 20 14 st %g2, [ %o0 + 0x14 ]
2003304: c2 07 60 18 ld [ %i5 + 0x18 ], %g1
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003308: da 07 60 30 ld [ %i5 + 0x30 ], %o5
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
200330c: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
2003310: c4 07 60 1c ld [ %i5 + 0x1c ], %g2
ret = (int) (diop - rtems_libio_iops);
2003314: 88 22 c0 04 sub %o3, %g4, %g4
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
2003318: c6 22 20 2c st %g3, [ %o0 + 0x2c ]
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
200331c: 89 39 20 02 sra %g4, 2, %g4
2003320: 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;
2003324: c4 22 20 1c st %g2, [ %o0 + 0x1c ]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
2003328: da 22 20 30 st %o5, [ %o0 + 0x30 ]
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
200332c: 85 29 20 06 sll %g4, 6, %g2
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
2003330: d8 22 20 0c st %o4, [ %o0 + 0xc ]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
2003334: 84 20 80 03 sub %g2, %g3, %g2
2003338: 83 28 a0 06 sll %g2, 6, %g1
200333c: 82 20 40 02 sub %g1, %g2, %g1
2003340: 87 28 60 0c sll %g1, 0xc, %g3
2003344: 82 00 40 03 add %g1, %g3, %g1
2003348: 82 00 40 04 add %g1, %g4, %g1
200334c: 83 28 60 04 sll %g1, 4, %g1
2003350: 82 20 40 04 sub %g1, %g4, %g1
2003354: 83 28 60 02 sll %g1, 2, %g1
2003358: 10 bf ff ce b 2003290 <fcntl+0x118>
200335c: b0 21 00 01 sub %g4, %g1, %i0
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
2003360: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003364: 10 bf ff b7 b 2003240 <fcntl+0xc8> <== NOT EXECUTED
2003368: c2 27 60 0c st %g1, [ %i5 + 0xc ] <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
200336c: 85 28 e0 02 sll %g3, 2, %g2 <== NOT EXECUTED
2003370: 83 28 e0 04 sll %g3, 4, %g1 <== NOT EXECUTED
2003374: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2003378: 82 00 40 03 add %g1, %g3, %g1 <== NOT EXECUTED
200337c: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
2003380: 90 03 40 01 add %o5, %g1, %o0 <== NOT EXECUTED
2003384: 10 bf ff da b 20032ec <fcntl+0x174> <== NOT EXECUTED
2003388: 96 10 00 08 mov %o0, %o3 <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
200338c: 40 00 34 78 call 201056c <__errno> <== NOT EXECUTED
2003390: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003394: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2003398: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200339c: 81 c7 e0 08 ret <== NOT EXECUTED
20033a0: 81 e8 00 00 restore <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
20033a4: 40 00 01 f2 call 2003b6c <rtems_libio_allocate>
20033a8: b0 10 3f ff mov -1, %i0
if ( diop == 0 ) {
20033ac: 80 a2 20 00 cmp %o0, 0
20033b0: 02 bf ff 8f be 20031ec <fcntl+0x74> <== NEVER TAKEN
20033b4: 96 10 00 08 mov %o0, %o3
20033b8: 10 bf ff cd b 20032ec <fcntl+0x174>
20033bc: d8 07 60 0c ld [ %i5 + 0xc ], %o4
020033dc <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
20033dc: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
20033e0: 03 00 80 5d sethi %hi(0x2017400), %g1
20033e4: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2017408 <rtems_libio_number_iops>
20033e8: 80 a6 00 02 cmp %i0, %g2
20033ec: 1a 80 00 18 bcc 200344c <fdatasync+0x70> <== NEVER TAKEN
20033f0: 03 00 80 60 sethi %hi(0x2018000), %g1
iop = rtems_libio_iop( fd );
20033f4: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 ! 20180b4 <rtems_libio_iops>
20033f8: 85 2e 20 02 sll %i0, 2, %g2
20033fc: 83 2e 20 04 sll %i0, 4, %g1
2003400: 82 20 40 02 sub %g1, %g2, %g1
2003404: 82 00 40 18 add %g1, %i0, %g1
2003408: 83 28 60 02 sll %g1, 2, %g1
200340c: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
2003410: c2 02 20 0c ld [ %o0 + 0xc ], %g1
2003414: 80 88 61 00 btst 0x100, %g1
2003418: 02 80 00 0d be 200344c <fdatasync+0x70> <== NEVER TAKEN
200341c: 80 88 60 04 btst 4, %g1
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2003420: 02 80 00 0b be 200344c <fdatasync+0x70>
2003424: 01 00 00 00 nop
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
2003428: c2 02 20 30 ld [ %o0 + 0x30 ], %g1
200342c: c2 00 60 2c ld [ %g1 + 0x2c ], %g1
2003430: 80 a0 60 00 cmp %g1, 0
2003434: 02 80 00 0c be 2003464 <fdatasync+0x88> <== ALWAYS TAKEN
2003438: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
200343c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003440: 01 00 00 00 nop <== NOT EXECUTED
}
2003444: 81 c7 e0 08 ret
2003448: 91 e8 00 08 restore %g0, %o0, %o0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
200344c: 40 00 34 48 call 201056c <__errno>
2003450: 01 00 00 00 nop
2003454: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
2003458: c2 22 00 00 st %g1, [ %o0 ]
200345c: 10 bf ff fa b 2003444 <fdatasync+0x68>
2003460: 90 10 3f ff mov -1, %o0
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2003464: 40 00 34 42 call 201056c <__errno>
2003468: 01 00 00 00 nop
200346c: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
2003470: c2 22 00 00 st %g1, [ %o0 ]
2003474: 10 bf ff f4 b 2003444 <fdatasync+0x68>
2003478: 90 10 3f ff mov -1, %o0
02007294 <file_systems_below_this_mountpoint>:
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2007294: 03 00 80 65 sethi %hi(0x2019400), %g1 <== NOT EXECUTED
2007298: c4 00 60 e8 ld [ %g1 + 0xe8 ], %g2 ! 20194e8 <rtems_filesystem_mount_table_control><== NOT EXECUTED
200729c: 82 10 60 e8 or %g1, 0xe8, %g1 <== NOT EXECUTED
20072a0: 86 00 60 04 add %g1, 4, %g3 <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
20072a4: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
20072a8: 02 80 00 10 be 20072e8 <file_systems_below_this_mountpoint+0x54><== NOT EXECUTED
20072ac: 01 00 00 00 nop <== 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 ) {
20072b0: d2 02 60 0c ld [ %o1 + 0xc ], %o1 <== NOT EXECUTED
20072b4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED
20072b8: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
20072bc: 32 80 00 08 bne,a 20072dc <file_systems_below_this_mountpoint+0x48><== NOT EXECUTED
20072c0: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
20072c4: 81 c3 e0 08 retl <== NOT EXECUTED
20072c8: 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 ) {
20072cc: 80 a0 40 09 cmp %g1, %o1 <== NOT EXECUTED
20072d0: 02 80 00 08 be 20072f0 <file_systems_below_this_mountpoint+0x5c><== NOT EXECUTED
20072d4: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
20072d8: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
20072dc: 80 a0 80 03 cmp %g2, %g3 <== NOT EXECUTED
20072e0: 32 bf ff fb bne,a 20072cc <file_systems_below_this_mountpoint+0x38><== NOT EXECUTED
20072e4: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1 <== NOT EXECUTED
return true;
}
}
return false;
}
20072e8: 81 c3 e0 08 retl <== NOT EXECUTED
20072ec: 90 10 20 00 clr %o0 <== NOT EXECUTED
20072f0: 81 c3 e0 08 retl <== NOT EXECUTED
020034ac <fpathconf>:
long fpathconf(
int fd,
int name
)
{
20034ac: 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);
20034b0: 03 00 80 5d sethi %hi(0x2017400), %g1
20034b4: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2017408 <rtems_libio_number_iops>
20034b8: 80 a6 00 02 cmp %i0, %g2
20034bc: 1a 80 00 3f bcc 20035b8 <fpathconf+0x10c>
20034c0: 03 00 80 60 sethi %hi(0x2018000), %g1
iop = rtems_libio_iop(fd);
20034c4: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 ! 20180b4 <rtems_libio_iops>
20034c8: 85 2e 20 02 sll %i0, 2, %g2
20034cc: 83 2e 20 04 sll %i0, 4, %g1
20034d0: 82 20 40 02 sub %g1, %g2, %g1
20034d4: 82 00 40 18 add %g1, %i0, %g1
20034d8: 83 28 60 02 sll %g1, 2, %g1
20034dc: 82 00 c0 01 add %g3, %g1, %g1
rtems_libio_check_is_open(iop);
20034e0: c4 00 60 0c ld [ %g1 + 0xc ], %g2
20034e4: 80 88 a1 00 btst 0x100, %g2
20034e8: 02 80 00 34 be 20035b8 <fpathconf+0x10c> <== NEVER TAKEN
20034ec: 80 a6 60 0b cmp %i1, 0xb
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
20034f0: 08 80 00 08 bleu 2003510 <fpathconf+0x64>
20034f4: 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 );
20034f8: 40 00 34 1d call 201056c <__errno>
20034fc: b0 10 3f ff mov -1, %i0
2003500: 82 10 20 16 mov 0x16, %g1
2003504: c2 22 00 00 st %g1, [ %o0 ]
break;
}
return return_value;
}
2003508: 81 c7 e0 08 ret
200350c: 81 e8 00 00 restore
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
2003510: 83 2e 60 02 sll %i1, 2, %g1
2003514: 05 00 80 0d sethi %hi(0x2003400), %g2
2003518: 84 10 a0 7c or %g2, 0x7c, %g2 ! 200347c <fdatasync+0xa0>
200351c: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2003520: 81 c0 c0 00 jmp %g3
2003524: 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;
2003528: f0 06 20 58 ld [ %i0 + 0x58 ], %i0
200352c: 81 c7 e0 08 ret
2003530: 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;
2003534: f0 06 20 54 ld [ %i0 + 0x54 ], %i0
2003538: 81 c7 e0 08 ret
200353c: 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;
2003540: f0 06 20 48 ld [ %i0 + 0x48 ], %i0
2003544: 81 c7 e0 08 ret
2003548: 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;
200354c: f0 06 20 5c ld [ %i0 + 0x5c ], %i0
2003550: 81 c7 e0 08 ret
2003554: 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;
2003558: f0 06 20 50 ld [ %i0 + 0x50 ], %i0
200355c: 81 c7 e0 08 ret
2003560: 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;
2003564: f0 06 20 4c ld [ %i0 + 0x4c ], %i0
2003568: 81 c7 e0 08 ret
200356c: 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;
2003570: f0 06 20 44 ld [ %i0 + 0x44 ], %i0
2003574: 81 c7 e0 08 ret
2003578: 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;
200357c: f0 06 20 40 ld [ %i0 + 0x40 ], %i0
2003580: 81 c7 e0 08 ret
2003584: 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;
2003588: f0 06 20 3c ld [ %i0 + 0x3c ], %i0
200358c: 81 c7 e0 08 ret
2003590: 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;
2003594: f0 06 20 38 ld [ %i0 + 0x38 ], %i0
2003598: 81 c7 e0 08 ret
200359c: 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;
20035a0: f0 06 20 34 ld [ %i0 + 0x34 ], %i0
20035a4: 81 c7 e0 08 ret
20035a8: 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;
20035ac: f0 06 20 30 ld [ %i0 + 0x30 ], %i0
20035b0: 81 c7 e0 08 ret
20035b4: 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);
20035b8: 40 00 33 ed call 201056c <__errno>
20035bc: b0 10 3f ff mov -1, %i0
20035c0: 82 10 20 09 mov 9, %g1
20035c4: c2 22 00 00 st %g1, [ %o0 ]
20035c8: 81 c7 e0 08 ret
20035cc: 81 e8 00 00 restore
0200a9c8 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
200a9c8: 9d e3 bf 98 save %sp, -104, %sp
200a9cc: 05 00 80 60 sethi %hi(0x2018000), %g2
200a9d0: 84 10 a1 98 or %g2, 0x198, %g2 ! 2018198 <rtems_malloc_statistics>
200a9d4: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
200a9d8: b2 10 00 18 mov %i0, %i1
200a9dc: 82 00 60 01 inc %g1
if ( !ptr )
200a9e0: 80 a6 20 00 cmp %i0, 0
200a9e4: 02 80 00 15 be 200aa38 <free+0x70>
200a9e8: c2 20 a0 0c st %g1, [ %g2 + 0xc ]
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200a9ec: 03 00 80 61 sethi %hi(0x2018400), %g1
200a9f0: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 ! 20184b4 <_System_state_Current>
200a9f4: 80 a0 a0 03 cmp %g2, 3
200a9f8: 02 80 00 17 be 200aa54 <free+0x8c> <== ALWAYS TAKEN
200a9fc: 03 00 80 5f sethi %hi(0x2017c00), %g1
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200aa00: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 2017e94 <rtems_malloc_statistics_helpers>
200aa04: 80 a0 60 00 cmp %g1, 0
200aa08: 02 80 00 06 be 200aa20 <free+0x58> <== ALWAYS TAKEN
200aa0c: 37 00 80 60 sethi %hi(0x2018000), %i3
(*rtems_malloc_statistics_helpers->at_free)(ptr);
200aa10: c2 00 60 08 ld [ %g1 + 8 ], %g1 <== NOT EXECUTED
200aa14: 9f c0 40 00 call %g1 <== NOT EXECUTED
200aa18: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
if ( !_Protected_heap_Free( &RTEMS_Malloc_Heap, ptr ) ) {
200aa1c: 37 00 80 60 sethi %hi(0x2018000), %i3 <== NOT EXECUTED
200aa20: 92 10 00 19 mov %i1, %o1
200aa24: 40 00 06 f1 call 200c5e8 <_Protected_heap_Free>
200aa28: 90 16 e1 40 or %i3, 0x140, %o0
200aa2c: 80 8a 20 ff btst 0xff, %o0
200aa30: 02 80 00 04 be 200aa40 <free+0x78> <== NEVER TAKEN
200aa34: 82 16 e1 40 or %i3, 0x140, %g1
200aa38: 81 c7 e0 08 ret
200aa3c: 81 e8 00 00 restore
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
200aa40: f6 00 60 1c ld [ %g1 + 0x1c ], %i3 <== NOT EXECUTED
200aa44: f4 00 60 18 ld [ %g1 + 0x18 ], %i2 <== NOT EXECUTED
200aa48: 31 00 80 5a sethi %hi(0x2016800), %i0 <== NOT EXECUTED
200aa4c: 7f ff e1 62 call 2002fd4 <printk> <== NOT EXECUTED
200aa50: 91 ee 21 20 restore %i0, 0x120, %o0 <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200aa54: 40 00 01 35 call 200af28 <malloc_is_system_state_OK>
200aa58: 01 00 00 00 nop
200aa5c: 80 8a 20 ff btst 0xff, %o0
200aa60: 12 bf ff e8 bne 200aa00 <free+0x38> <== ALWAYS TAKEN
200aa64: 03 00 80 5f sethi %hi(0x2017c00), %g1
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
200aa68: 40 00 01 43 call 200af74 <malloc_deferred_free> <== NOT EXECUTED
200aa6c: 81 e8 00 00 restore <== NOT EXECUTED
02003d9c <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
2003d9c: 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
2003da0: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
2003da4: 82 10 62 28 or %g1, 0x228, %g1 ! 2016e28 <rtems_global_user_env><== NOT EXECUTED
2003da8: 80 a6 00 01 cmp %i0, %g1 <== NOT EXECUTED
2003dac: 02 80 00 18 be 2003e0c <free_user_env+0x70> <== NOT EXECUTED
2003db0: 01 00 00 00 nop <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
2003db4: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
2003db8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003dbc: 22 80 00 09 be,a 2003de0 <free_user_env+0x44> <== NOT EXECUTED
2003dc0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003dc4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003dc8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003dcc: 22 80 00 05 be,a 2003de0 <free_user_env+0x44> <== NOT EXECUTED
2003dd0: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003dd4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003dd8: 90 06 20 04 add %i0, 4, %o0 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
2003ddc: c2 06 20 1c ld [ %i0 + 0x1c ], %g1 <== NOT EXECUTED
2003de0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003de4: 02 80 00 08 be 2003e04 <free_user_env+0x68> <== NOT EXECUTED
2003de8: 01 00 00 00 nop <== NOT EXECUTED
2003dec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003df0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003df4: 02 80 00 04 be 2003e04 <free_user_env+0x68> <== NOT EXECUTED
2003df8: 01 00 00 00 nop <== NOT EXECUTED
2003dfc: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003e00: 90 06 20 14 add %i0, 0x14, %o0 <== NOT EXECUTED
free(env);
2003e04: 7f ff fa e2 call 200298c <free> <== NOT EXECUTED
2003e08: 81 e8 00 00 restore <== NOT EXECUTED
2003e0c: 81 c7 e0 08 ret <== NOT EXECUTED
2003e10: 81 e8 00 00 restore <== NOT EXECUTED
02015354 <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
2015354: 9d e3 bf 98 save %sp, -104, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
2015358: 92 96 60 00 orcc %i1, 0, %o1
201535c: 02 80 00 3f be 2015458 <fstat+0x104>
2015360: 03 00 80 5d sethi %hi(0x2017400), %g1
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
2015364: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
2015368: 80 a6 00 02 cmp %i0, %g2
201536c: 1a 80 00 2f bcc 2015428 <fstat+0xd4>
2015370: 03 00 80 60 sethi %hi(0x2018000), %g1
2015374: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
2015378: 85 2e 20 02 sll %i0, 2, %g2
201537c: 83 2e 20 04 sll %i0, 4, %g1
2015380: 82 20 40 02 sub %g1, %g2, %g1
2015384: 82 00 40 18 add %g1, %i0, %g1
2015388: 83 28 60 02 sll %g1, 2, %g1
201538c: 86 00 c0 01 add %g3, %g1, %g3
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
2015390: c4 00 e0 0c ld [ %g3 + 0xc ], %g2
2015394: 80 88 a1 00 btst 0x100, %g2
2015398: 02 80 00 24 be 2015428 <fstat+0xd4> <== NEVER TAKEN
201539c: 01 00 00 00 nop
if ( !iop->handlers )
20153a0: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1
20153a4: 80 a0 60 00 cmp %g1, 0
20153a8: 02 80 00 20 be 2015428 <fstat+0xd4> <== NEVER TAKEN
20153ac: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
20153b0: c2 00 60 18 ld [ %g1 + 0x18 ], %g1
20153b4: 80 a0 60 00 cmp %g1, 0
20153b8: 02 80 00 22 be 2015440 <fstat+0xec> <== NEVER TAKEN
20153bc: 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) );
20153c0: c0 22 40 00 clr [ %o1 ]
20153c4: c0 22 60 04 clr [ %o1 + 4 ]
20153c8: c0 22 60 08 clr [ %o1 + 8 ]
20153cc: c0 22 60 0c clr [ %o1 + 0xc ]
20153d0: c0 22 60 10 clr [ %o1 + 0x10 ]
20153d4: c0 22 60 14 clr [ %o1 + 0x14 ]
20153d8: c0 22 60 18 clr [ %o1 + 0x18 ]
20153dc: c0 22 60 1c clr [ %o1 + 0x1c ]
20153e0: c0 22 60 20 clr [ %o1 + 0x20 ]
20153e4: c0 22 60 24 clr [ %o1 + 0x24 ]
20153e8: c0 22 60 28 clr [ %o1 + 0x28 ]
20153ec: c0 22 60 2c clr [ %o1 + 0x2c ]
20153f0: c0 22 60 30 clr [ %o1 + 0x30 ]
20153f4: c0 22 60 34 clr [ %o1 + 0x34 ]
20153f8: c0 22 60 38 clr [ %o1 + 0x38 ]
20153fc: c0 22 60 3c clr [ %o1 + 0x3c ]
2015400: c0 22 60 40 clr [ %o1 + 0x40 ]
2015404: c0 22 60 44 clr [ %o1 + 0x44 ]
2015408: c0 22 60 48 clr [ %o1 + 0x48 ]
201540c: c0 22 60 4c clr [ %o1 + 0x4c ]
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
2015410: c2 00 e0 30 ld [ %g3 + 0x30 ], %g1
2015414: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
2015418: 9f c0 80 00 call %g2
201541c: 90 00 e0 10 add %g3, 0x10, %o0
}
2015420: 81 c7 e0 08 ret
2015424: 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 );
2015428: 7f ff e1 ba call 200db10 <__errno>
201542c: 01 00 00 00 nop
2015430: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9>
2015434: c2 22 00 00 st %g1, [ %o0 ]
2015438: 10 bf ff fa b 2015420 <fstat+0xcc>
201543c: 90 10 3f ff mov -1, %o0
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
2015440: 7f ff e1 b4 call 200db10 <__errno> <== NOT EXECUTED
2015444: 01 00 00 00 nop <== NOT EXECUTED
2015448: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
201544c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015450: 10 bf ff f4 b 2015420 <fstat+0xcc> <== NOT EXECUTED
2015454: 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 );
2015458: 7f ff e1 ae call 200db10 <__errno>
201545c: 01 00 00 00 nop
2015460: 82 10 20 0e mov 0xe, %g1 ! e <PROM_START+0xe>
2015464: c2 22 00 00 st %g1, [ %o0 ]
2015468: 10 bf ff ee b 2015420 <fstat+0xcc>
201546c: 90 10 3f ff mov -1, %o0
020037b0 <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
20037b0: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
20037b4: 03 00 80 5d sethi %hi(0x2017400), %g1
20037b8: c4 00 60 08 ld [ %g1 + 8 ], %g2 ! 2017408 <rtems_libio_number_iops>
20037bc: 80 a6 00 02 cmp %i0, %g2
20037c0: 1a 80 00 19 bcc 2003824 <fsync+0x74> <== NEVER TAKEN
20037c4: 03 00 80 60 sethi %hi(0x2018000), %g1
iop = rtems_libio_iop( fd );
20037c8: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 ! 20180b4 <rtems_libio_iops>
20037cc: 85 2e 20 02 sll %i0, 2, %g2
20037d0: 83 2e 20 04 sll %i0, 4, %g1
20037d4: 82 20 40 02 sub %g1, %g2, %g1
20037d8: 82 00 40 18 add %g1, %i0, %g1
20037dc: 83 28 60 02 sll %g1, 2, %g1
20037e0: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
20037e4: c4 02 20 0c ld [ %o0 + 0xc ], %g2
20037e8: 80 88 a1 00 btst 0x100, %g2
20037ec: 02 80 00 0e be 2003824 <fsync+0x74> <== NEVER TAKEN
20037f0: 01 00 00 00 nop
/*
* Now process the fsync().
*/
if ( !iop->handlers )
20037f4: c4 02 20 30 ld [ %o0 + 0x30 ], %g2
20037f8: 80 a0 a0 00 cmp %g2, 0
20037fc: 02 80 00 0a be 2003824 <fsync+0x74> <== NEVER TAKEN
2003800: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
2003804: c4 00 a0 28 ld [ %g2 + 0x28 ], %g2
2003808: 80 a0 a0 00 cmp %g2, 0
200380c: 02 80 00 0c be 200383c <fsync+0x8c>
2003810: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
2003814: 9f c0 80 00 call %g2
2003818: 01 00 00 00 nop
}
200381c: 81 c7 e0 08 ret
2003820: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
2003824: 40 00 33 52 call 201056c <__errno> <== NOT EXECUTED
2003828: 01 00 00 00 nop <== NOT EXECUTED
200382c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
2003830: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003834: 10 bf ff fa b 200381c <fsync+0x6c> <== NOT EXECUTED
2003838: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
200383c: 40 00 33 4c call 201056c <__errno>
2003840: 01 00 00 00 nop
2003844: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86>
2003848: c2 22 00 00 st %g1, [ %o0 ]
200384c: 10 bf ff f4 b 200381c <fsync+0x6c>
2003850: 90 10 3f ff mov -1, %o0
0200aa74 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
200aa74: 9d e3 bf 88 save %sp, -120, %sp
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
200aa78: 03 00 80 5d sethi %hi(0x2017400), %g1
200aa7c: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
200aa80: 80 a6 00 02 cmp %i0, %g2
200aa84: 1a 80 00 2b bcc 200ab30 <ftruncate+0xbc> <== NEVER TAKEN
200aa88: 03 00 80 60 sethi %hi(0x2018000), %g1
iop = rtems_libio_iop( fd );
200aa8c: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
200aa90: 85 2e 20 02 sll %i0, 2, %g2
200aa94: 83 2e 20 04 sll %i0, 4, %g1
200aa98: 82 20 40 02 sub %g1, %g2, %g1
200aa9c: 82 00 40 18 add %g1, %i0, %g1
200aaa0: 83 28 60 02 sll %g1, 2, %g1
200aaa4: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
200aaa8: c4 06 20 0c ld [ %i0 + 0xc ], %g2
200aaac: 80 88 a1 00 btst 0x100, %g2
200aab0: 02 80 00 20 be 200ab30 <ftruncate+0xbc> <== NEVER TAKEN
200aab4: 01 00 00 00 nop
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
200aab8: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200aabc: c2 27 bf e8 st %g1, [ %fp + -24 ]
200aac0: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
200aac4: c4 27 bf ec st %g2, [ %fp + -20 ]
200aac8: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200aacc: c2 27 bf f0 st %g1, [ %fp + -16 ]
200aad0: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
if ( !loc.ops->node_type_h )
200aad4: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200aad8: 80 a0 60 00 cmp %g1, 0
200aadc: 02 80 00 21 be 200ab60 <ftruncate+0xec> <== NEVER TAKEN
200aae0: 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 )
200aae4: 9f c0 40 00 call %g1
200aae8: 90 07 bf e8 add %fp, -24, %o0
200aaec: 80 a2 20 01 cmp %o0, 1
200aaf0: 02 80 00 22 be 200ab78 <ftruncate+0x104>
200aaf4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
200aaf8: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200aafc: 80 88 60 04 btst 4, %g1
200ab00: 02 80 00 12 be 200ab48 <ftruncate+0xd4> <== NEVER TAKEN
200ab04: 01 00 00 00 nop
if ( !iop->handlers->ftruncate_h )
200ab08: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200ab0c: c2 00 60 20 ld [ %g1 + 0x20 ], %g1
200ab10: 80 a0 60 00 cmp %g1, 0
200ab14: 02 80 00 13 be 200ab60 <ftruncate+0xec> <== NEVER TAKEN
200ab18: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
200ab1c: 90 10 00 18 mov %i0, %o0
200ab20: 9f c0 40 00 call %g1
200ab24: 92 10 00 19 mov %i1, %o1
}
200ab28: 81 c7 e0 08 ret
200ab2c: 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);
200ab30: 40 00 0b f8 call 200db10 <__errno> <== NOT EXECUTED
200ab34: 01 00 00 00 nop <== NOT EXECUTED
200ab38: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
200ab3c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ab40: 10 bf ff fa b 200ab28 <ftruncate+0xb4> <== NOT EXECUTED
200ab44: 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 );
200ab48: 40 00 0b f2 call 200db10 <__errno> <== NOT EXECUTED
200ab4c: 01 00 00 00 nop <== NOT EXECUTED
200ab50: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
200ab54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ab58: 10 bf ff f4 b 200ab28 <ftruncate+0xb4> <== NOT EXECUTED
200ab5c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
200ab60: 40 00 0b ec call 200db10 <__errno> <== NOT EXECUTED
200ab64: 01 00 00 00 nop <== NOT EXECUTED
200ab68: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200ab6c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ab70: 10 bf ff ee b 200ab28 <ftruncate+0xb4> <== NOT EXECUTED
200ab74: 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 );
200ab78: 40 00 0b e6 call 200db10 <__errno>
200ab7c: 01 00 00 00 nop
200ab80: 82 10 20 15 mov 0x15, %g1 ! 15 <PROM_START+0x15>
200ab84: c2 22 00 00 st %g1, [ %o0 ]
200ab88: 10 bf ff e8 b 200ab28 <ftruncate+0xb4>
200ab8c: 90 10 3f ff mov -1, %o0
0200d42c <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
200d42c: 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 );
200d430: 03 00 80 60 sethi %hi(0x2018000), %g1
200d434: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2 ! 20180b8 <rtems_libio_number_iops>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
200d438: 88 10 00 18 mov %i0, %g4
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
200d43c: 80 a6 00 02 cmp %i0, %g2
200d440: 1a 80 00 0a bcc 200d468 <getdents+0x3c> <== NEVER TAKEN
200d444: b0 10 20 00 clr %i0
200d448: 03 00 80 63 sethi %hi(0x2018c00), %g1
200d44c: c6 00 62 28 ld [ %g1 + 0x228 ], %g3 ! 2018e28 <rtems_libio_iops>
200d450: 85 29 20 02 sll %g4, 2, %g2
200d454: 83 29 20 04 sll %g4, 4, %g1
200d458: 82 20 40 02 sub %g1, %g2, %g1
200d45c: 82 00 40 04 add %g1, %g4, %g1
200d460: 83 28 60 02 sll %g1, 2, %g1
200d464: b0 00 c0 01 add %g3, %g1, %i0
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
200d468: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200d46c: c2 27 bf e8 st %g1, [ %fp + -24 ]
200d470: c4 06 20 14 ld [ %i0 + 0x14 ], %g2
200d474: c4 27 bf ec st %g2, [ %fp + -20 ]
200d478: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
200d47c: c2 27 bf f0 st %g1, [ %fp + -16 ]
200d480: c4 06 20 1c ld [ %i0 + 0x1c ], %g2
if ( !loc.ops->node_type_h )
200d484: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200d488: 80 a0 60 00 cmp %g1, 0
200d48c: 02 80 00 17 be 200d4e8 <getdents+0xbc> <== NEVER TAKEN
200d490: 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 )
200d494: 9f c0 40 00 call %g1
200d498: 90 07 bf e8 add %fp, -24, %o0
200d49c: 80 a2 20 01 cmp %o0, 1
200d4a0: 12 80 00 0c bne 200d4d0 <getdents+0xa4>
200d4a4: 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 )
200d4a8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
200d4ac: c2 00 60 08 ld [ %g1 + 8 ], %g1
200d4b0: 80 a0 60 00 cmp %g1, 0
200d4b4: 02 80 00 0d be 200d4e8 <getdents+0xbc> <== NEVER TAKEN
200d4b8: 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 );
200d4bc: 90 10 00 18 mov %i0, %o0
200d4c0: 9f c0 40 00 call %g1
200d4c4: 94 10 00 1a mov %i2, %o2
}
200d4c8: 81 c7 e0 08 ret
200d4cc: 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 );
200d4d0: 40 00 0e bf call 2010fcc <__errno>
200d4d4: 01 00 00 00 nop
200d4d8: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200d4dc: c2 22 00 00 st %g1, [ %o0 ]
200d4e0: 10 bf ff fa b 200d4c8 <getdents+0x9c>
200d4e4: 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 );
200d4e8: 40 00 0e b9 call 2010fcc <__errno> <== NOT EXECUTED
200d4ec: 01 00 00 00 nop <== NOT EXECUTED
200d4f0: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200d4f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200d4f8: 10 bf ff f4 b 200d4c8 <getdents+0x9c> <== NOT EXECUTED
200d4fc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
0200abb0 <gettimeofday>:
int gettimeofday(
struct timeval *tp,
void * __tz
)
{
200abb0: 9d e3 bf 90 save %sp, -112, %sp
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
200abb4: 80 a6 20 00 cmp %i0, 0
200abb8: 02 80 00 11 be 200abfc <gettimeofday+0x4c> <== NEVER TAKEN
200abbc: 01 00 00 00 nop
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
200abc0: 7f ff dc 89 call 2001de4 <sparc_disable_interrupts>
200abc4: 01 00 00 00 nop
200abc8: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
200abcc: 7f ff ef 1f call 2006848 <_TOD_Get>
200abd0: 90 07 bf f0 add %fp, -16, %o0
_ISR_Enable(level);
200abd4: 7f ff dc 88 call 2001df4 <sparc_enable_interrupts>
200abd8: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
200abdc: d0 07 bf f4 ld [ %fp + -12 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
200abe0: c2 07 bf f0 ld [ %fp + -16 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
200abe4: 92 10 23 e8 mov 0x3e8, %o1
200abe8: 40 00 26 95 call 201463c <.udiv>
200abec: c2 26 00 00 st %g1, [ %i0 ]
200abf0: 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;
}
200abf4: 81 c7 e0 08 ret
200abf8: 91 e8 20 00 restore %g0, 0, %o0
void * __tz
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
200abfc: 40 00 0b c5 call 200db10 <__errno> <== NOT EXECUTED
200ac00: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200ac04: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
200ac08: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200ac0c: 81 c7 e0 08 ret <== NOT EXECUTED
200ac10: 81 e8 00 00 restore <== NOT EXECUTED
0200f74c <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
200f74c: c4 02 20 2c ld [ %o0 + 0x2c ], %g2
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200f750: 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 )
200f754: c2 00 a0 48 ld [ %g2 + 0x48 ], %g1
200f758: 80 a0 60 01 cmp %g1, 1
200f75c: 02 80 00 04 be 200f76c <imfs_dir_open+0x20> <== ALWAYS TAKEN
200f760: 90 10 3f ff mov -1, %o0
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
200f764: 81 c3 e0 08 retl <== NOT EXECUTED
200f768: 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;
200f76c: c0 20 e0 08 clr [ %g3 + 8 ]
return 0;
}
200f770: 81 c3 e0 08 retl
200f774: 90 10 20 00 clr %o0
0200f96c <imfs_dir_read>:
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200f96c: 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;
200f970: c2 06 20 2c ld [ %i0 + 0x2c ], %g1
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200f974: aa 10 00 18 mov %i0, %l5
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
200f978: 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;
200f97c: a8 00 60 50 add %g1, 0x50, %l4
200f980: 90 10 00 1a mov %i2, %o0
struct dirent tmp_dirent;
the_jnode = (IMFS_jnode_t *)iop->file_info;
the_chain = &the_jnode->info.directory.Entries;
if ( rtems_chain_is_empty( the_chain ) )
200f984: 80 a4 40 14 cmp %l1, %l4
200f988: 02 80 00 33 be 200fa54 <imfs_dir_read+0xe8>
200f98c: b0 10 20 00 clr %i0
/* Move to the first of the desired directory entries */
the_node = the_chain->first;
bytes_transferred = 0;
first_entry = iop->offset;
200f990: e6 05 60 08 ld [ %l5 + 8 ], %l3
/* 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);
200f994: 40 00 13 49 call 20146b8 <.udiv>
200f998: 92 10 21 0c mov 0x10c, %o1
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
200f99c: b0 10 20 00 clr %i0
bytes_transferred = 0;
first_entry = iop->offset;
/* protect against using sizes that are not exact multiples of the */
/* -dirent- size. These could result in unexpected results */
last_entry = first_entry + (count/sizeof(struct dirent)) * sizeof(struct dirent);
200f9a0: 83 2a 20 02 sll %o0, 2, %g1
200f9a4: 85 2a 20 06 sll %o0, 6, %g2
200f9a8: 82 00 40 02 add %g1, %g2, %g1
200f9ac: 82 20 40 08 sub %g1, %o0, %g1
200f9b0: 83 28 60 02 sll %g1, 2, %g1
200f9b4: a4 00 40 13 add %g1, %l3, %l2
/* The directory was not empty so try to move to the desired entry in chain*/
for (
current_entry = 0;
current_entry < last_entry;
200f9b8: 80 a4 a0 00 cmp %l2, 0
200f9bc: 04 80 00 26 ble 200fa54 <imfs_dir_read+0xe8> <== NEVER TAKEN
200f9c0: b4 10 20 00 clr %i2
}
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 );
200f9c4: ba 10 21 0c mov 0x10c, %i5
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 );
200f9c8: ae 07 be ec add %fp, -276, %l7
200f9cc: 10 80 00 08 b 200f9ec <imfs_dir_read+0x80>
200f9d0: 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;
200f9d4: 80 a4 80 1a cmp %l2, %i2
200f9d8: 04 80 00 1f ble 200fa54 <imfs_dir_read+0xe8> <== NEVER TAKEN
200f9dc: e2 04 40 00 ld [ %l1 ], %l1
current_entry = current_entry + sizeof(struct dirent) ){
if ( rtems_chain_is_tail( the_chain, the_node ) ){
200f9e0: 80 a4 40 14 cmp %l1, %l4
200f9e4: 02 80 00 1e be 200fa5c <imfs_dir_read+0xf0>
200f9e8: 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 ) {
200f9ec: 80 a4 c0 1a cmp %l3, %i2
200f9f0: 34 bf ff f9 bg,a 200f9d4 <imfs_dir_read+0x68>
200f9f4: b4 06 a1 0c add %i2, 0x10c, %i2
/* Move the entry to the return buffer */
tmp_dirent.d_off = current_entry;
200f9f8: 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;
200f9fc: c2 04 60 34 ld [ %l1 + 0x34 ], %g1
tmp_dirent.d_namlen = strlen( the_jnode->name );
200fa00: 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 );
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
200fa04: c2 27 be ec st %g1, [ %fp + -276 ]
}
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 );
200fa08: fa 37 be f4 sth %i5, [ %fp + -268 ]
the_jnode = (IMFS_jnode_t *) the_node;
tmp_dirent.d_ino = the_jnode->st_ino;
tmp_dirent.d_namlen = strlen( the_jnode->name );
200fa0c: 40 00 0a db call 2012578 <strlen>
200fa10: 90 10 00 10 mov %l0, %o0
strcpy( tmp_dirent.d_name, the_jnode->name );
200fa14: 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 );
200fa18: d0 37 be f6 sth %o0, [ %fp + -266 ]
strcpy( tmp_dirent.d_name, the_jnode->name );
200fa1c: 40 00 0a a0 call 201249c <strcpy>
200fa20: 90 10 00 16 mov %l6, %o0
memcpy(
200fa24: 90 06 40 18 add %i1, %i0, %o0
200fa28: 92 10 00 17 mov %l7, %o1
200fa2c: 40 00 06 f8 call 201160c <memcpy>
200fa30: 94 10 21 0c mov 0x10c, %o2
buffer + bytes_transferred,
(void *)&tmp_dirent,
sizeof( struct dirent )
);
iop->offset = iop->offset + sizeof(struct dirent);
200fa34: c2 05 60 08 ld [ %l5 + 8 ], %g1
ssize_t imfs_dir_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
200fa38: 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);
200fa3c: 82 00 61 0c add %g1, 0x10c, %g1
200fa40: c2 25 60 08 st %g1, [ %l5 + 8 ]
bytes_transferred = bytes_transferred + sizeof( struct dirent );
200fa44: b0 06 21 0c add %i0, 0x10c, %i0
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;
200fa48: 80 a4 80 1a cmp %l2, %i2
200fa4c: 14 bf ff e5 bg 200f9e0 <imfs_dir_read+0x74> <== NEVER TAKEN
200fa50: e2 04 40 00 ld [ %l1 ], %l1
the_node = the_node->next;
}
/* Success */
return bytes_transferred;
}
200fa54: 81 c7 e0 08 ret
200fa58: 81 e8 00 00 restore
200fa5c: 81 c7 e0 08 ret
200fa60: 81 e8 00 00 restore
0200f868 <imfs_dir_rmnod>:
*/
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200f868: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200f86c: e0 06 00 00 ld [ %i0 ], %l0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
200f870: c4 04 20 4c ld [ %l0 + 0x4c ], %g2
200f874: 82 04 20 50 add %l0, 0x50, %g1
200f878: 80 a0 80 01 cmp %g2, %g1
200f87c: 12 80 00 30 bne 200f93c <imfs_dir_rmnod+0xd4>
200f880: 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 )
200f884: c2 06 20 0c ld [ %i0 + 0xc ], %g1
200f888: c4 00 60 18 ld [ %g1 + 0x18 ], %g2
200f88c: 80 a4 00 02 cmp %l0, %g2
200f890: 02 80 00 31 be 200f954 <imfs_dir_rmnod+0xec>
200f894: 01 00 00 00 nop
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
200f898: c2 04 20 58 ld [ %l0 + 0x58 ], %g1
200f89c: 80 a0 60 00 cmp %g1, 0
200f8a0: 12 80 00 2d bne 200f954 <imfs_dir_rmnod+0xec> <== NEVER TAKEN
200f8a4: 01 00 00 00 nop
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
200f8a8: c2 04 20 08 ld [ %l0 + 8 ], %g1
200f8ac: 80 a0 60 00 cmp %g1, 0
200f8b0: 22 80 00 06 be,a 200f8c8 <imfs_dir_rmnod+0x60>
200f8b4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
200f8b8: 7f ff f8 76 call 200da90 <_Chain_Extract>
200f8bc: 90 10 00 10 mov %l0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200f8c0: c0 24 20 08 clr [ %l0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200f8c4: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
200f8c8: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200f8cc: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200f8d0: 90 07 bf f0 add %fp, -16, %o0
200f8d4: 7f ff cf e0 call 2003854 <gettimeofday>
200f8d8: c2 34 20 30 sth %g1, [ %l0 + 0x30 ]
200f8dc: 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) ) {
200f8e0: 90 10 00 10 mov %l0, %o0
200f8e4: 7f ff d0 49 call 2003a08 <rtems_libio_is_file_open>
200f8e8: c2 24 20 44 st %g1, [ %l0 + 0x44 ]
200f8ec: 80 a2 20 00 cmp %o0, 0
200f8f0: 12 80 00 11 bne 200f934 <imfs_dir_rmnod+0xcc>
200f8f4: 01 00 00 00 nop
200f8f8: c2 14 20 30 lduh [ %l0 + 0x30 ], %g1
200f8fc: 80 a0 60 00 cmp %g1, 0
200f900: 12 80 00 0d bne 200f934 <imfs_dir_rmnod+0xcc>
200f904: 03 00 80 5e sethi %hi(0x2017800), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
200f908: c6 00 61 24 ld [ %g1 + 0x124 ], %g3 ! 2017924 <rtems_current_user_env>
200f90c: c4 06 00 00 ld [ %i0 ], %g2
200f910: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200f914: 80 a0 40 02 cmp %g1, %g2
200f918: 22 80 00 02 be,a 200f920 <imfs_dir_rmnod+0xb8> <== NEVER TAKEN
200f91c: c0 20 e0 04 clr [ %g3 + 4 ] <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
200f920: 90 10 00 10 mov %l0, %o0
200f924: 7f ff cf 2b call 20035d0 <free>
200f928: b0 10 20 00 clr %i0
200f92c: 81 c7 e0 08 ret
200f930: 81 e8 00 00 restore
}
return 0;
}
200f934: 81 c7 e0 08 ret
200f938: 91 e8 20 00 restore %g0, 0, %o0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
200f93c: 40 00 03 0c call 201056c <__errno>
200f940: b0 10 3f ff mov -1, %i0
200f944: 82 10 20 5a mov 0x5a, %g1
200f948: c2 22 00 00 st %g1, [ %o0 ]
200f94c: 81 c7 e0 08 ret
200f950: 81 e8 00 00 restore
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
200f954: 40 00 03 06 call 201056c <__errno>
200f958: b0 10 3f ff mov -1, %i0
200f95c: 82 10 20 10 mov 0x10, %g1
200f960: c2 22 00 00 st %g1, [ %o0 ]
200f964: 81 c7 e0 08 ret
200f968: 81 e8 00 00 restore
0200e57c <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
200e57c: 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 );
200e580: 03 00 80 7d sethi %hi(0x201f400), %g1
200e584: c4 00 60 d8 ld [ %g1 + 0xd8 ], %g2 ! 201f4d8 <rtems_libio_number_iops>
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
200e588: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200e58c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200e590: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
200e594: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
200e598: 80 a6 00 02 cmp %i0, %g2
200e59c: 1a 80 00 1b bcc 200e608 <ioctl+0x8c> <== NEVER TAKEN
200e5a0: 92 10 00 19 mov %i1, %o1
iop = rtems_libio_iop( fd );
200e5a4: 03 00 80 82 sethi %hi(0x2020800), %g1
200e5a8: c6 00 62 04 ld [ %g1 + 0x204 ], %g3 ! 2020a04 <rtems_libio_iops>
200e5ac: 85 2e 20 02 sll %i0, 2, %g2
200e5b0: 83 2e 20 04 sll %i0, 4, %g1
200e5b4: 82 20 40 02 sub %g1, %g2, %g1
200e5b8: 82 00 40 18 add %g1, %i0, %g1
200e5bc: 83 28 60 02 sll %g1, 2, %g1
200e5c0: 90 00 c0 01 add %g3, %g1, %o0
rtems_libio_check_is_open(iop);
200e5c4: c4 02 20 0c ld [ %o0 + 0xc ], %g2
200e5c8: 80 88 a1 00 btst 0x100, %g2
200e5cc: 02 80 00 0f be 200e608 <ioctl+0x8c> <== NEVER TAKEN
200e5d0: 82 07 a0 50 add %fp, 0x50, %g1
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
200e5d4: 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 *);
200e5d8: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
200e5dc: 80 a0 a0 00 cmp %g2, 0
200e5e0: 02 80 00 0a be 200e608 <ioctl+0x8c> <== NEVER TAKEN
200e5e4: d4 07 a0 4c ld [ %fp + 0x4c ], %o2
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
200e5e8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
200e5ec: 80 a0 60 00 cmp %g1, 0
200e5f0: 02 80 00 0c be 200e620 <ioctl+0xa4> <== NEVER TAKEN
200e5f4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
200e5f8: 9f c0 40 00 call %g1
200e5fc: 01 00 00 00 nop
return rc;
}
200e600: 81 c7 e0 08 ret
200e604: 91 e8 00 08 restore %g0, %o0, %o0
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
200e608: 40 00 0d ce call 2011d40 <__errno> <== NOT EXECUTED
200e60c: 01 00 00 00 nop <== NOT EXECUTED
200e610: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
200e614: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e618: 10 bf ff fa b 200e600 <ioctl+0x84> <== NOT EXECUTED
200e61c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
200e620: 40 00 0d c8 call 2011d40 <__errno> <== NOT EXECUTED
200e624: 01 00 00 00 nop <== NOT EXECUTED
200e628: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200e62c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200e630: 10 bf ff f4 b 200e600 <ioctl+0x84> <== NOT EXECUTED
200e634: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02003ba4 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003ba4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
2003ba8: c6 06 60 30 ld [ %i1 + 0x30 ], %g3 <== NOT EXECUTED
2003bac: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED
2003bb0: 02 80 00 03 be 2003bbc <iproc+0x18> <== NOT EXECUTED
2003bb4: a0 10 00 18 mov %i0, %l0 <== NOT EXECUTED
c &= 0x7f;
2003bb8: a0 0e 20 7f and %i0, 0x7f, %l0 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
2003bbc: 80 88 e2 00 btst 0x200, %g3 <== NOT EXECUTED
2003bc0: 02 80 00 0b be 2003bec <iproc+0x48> <== NOT EXECUTED
2003bc4: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED
c = tolower (c);
2003bc8: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
2003bcc: c4 00 61 e8 ld [ %g1 + 0x1e8 ], %g2 ! 20179e8 <__ctype_ptr><== NOT EXECUTED
2003bd0: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003bd4: c2 08 80 08 ldub [ %g2 + %o0 ], %g1 <== NOT EXECUTED
2003bd8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2003bdc: 32 80 00 02 bne,a 2003be4 <iproc+0x40> <== NOT EXECUTED
2003be0: 90 02 20 20 add %o0, 0x20, %o0 <== NOT EXECUTED
2003be4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
if (c == '\r') {
2003be8: 82 0c 20 ff and %l0, 0xff, %g1 <== NOT EXECUTED
2003bec: 80 a0 60 0d cmp %g1, 0xd <== NOT EXECUTED
2003bf0: 02 80 00 41 be 2003cf4 <iproc+0x150> <== NOT EXECUTED
2003bf4: 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)) {
2003bf8: 02 80 00 14 be 2003c48 <iproc+0xa4> <== NOT EXECUTED
2003bfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2003c00: 32 80 00 16 bne,a 2003c58 <iproc+0xb4> <== NOT EXECUTED
2003c04: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
2003c08: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED
2003c0c: 05 00 80 5e sethi %hi(0x2017800), %g2 <== NOT EXECUTED
2003c10: c2 00 a1 44 ld [ %g2 + 0x144 ], %g1 ! 2017944 <rtems_termios_cbufsize><== NOT EXECUTED
2003c14: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
2003c18: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
2003c1c: 16 80 00 09 bge 2003c40 <iproc+0x9c> <== NOT EXECUTED
2003c20: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
2003c24: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2003c28: 80 88 60 08 btst 8, %g1 <== NOT EXECUTED
2003c2c: 12 80 00 3b bne 2003d18 <iproc+0x174> <== NOT EXECUTED
2003c30: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
2003c34: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
2003c38: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED
2003c3c: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
2003c40: 81 c7 e0 08 ret <== NOT EXECUTED
2003c44: 81 e8 00 00 restore <== 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)) {
2003c48: 80 88 e0 40 btst 0x40, %g3 <== NOT EXECUTED
2003c4c: 32 80 00 02 bne,a 2003c54 <iproc+0xb0> <== NOT EXECUTED
2003c50: a0 10 20 0d mov 0xd, %l0 <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
2003c54: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED
2003c58: 80 88 a0 02 btst 2, %g2 <== NOT EXECUTED
2003c5c: 22 bf ff ec be,a 2003c0c <iproc+0x68> <== NOT EXECUTED
2003c60: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
2003c64: c2 0e 60 43 ldub [ %i1 + 0x43 ], %g1 <== NOT EXECUTED
2003c68: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003c6c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2003c70: 22 80 00 34 be,a 2003d40 <iproc+0x19c> <== NOT EXECUTED
2003c74: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
2003c78: c2 0e 60 44 ldub [ %i1 + 0x44 ], %g1 <== NOT EXECUTED
2003c7c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2003c80: 22 80 00 41 be,a 2003d84 <iproc+0x1e0> <== NOT EXECUTED
2003c84: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
2003c88: c2 0e 60 45 ldub [ %i1 + 0x45 ], %g1 <== NOT EXECUTED
2003c8c: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2003c90: 02 bf ff ec be 2003c40 <iproc+0x9c> <== NOT EXECUTED
2003c94: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
2003c98: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED
2003c9c: 02 80 00 2e be 2003d54 <iproc+0x1b0> <== NOT EXECUTED
2003ca0: 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])
2003ca4: c2 0e 60 4c ldub [ %i1 + 0x4c ], %g1 <== NOT EXECUTED
2003ca8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2003cac: 02 80 00 07 be 2003cc8 <iproc+0x124> <== NOT EXECUTED
2003cb0: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
2003cb4: c2 0e 60 51 ldub [ %i1 + 0x51 ], %g1 <== NOT EXECUTED
2003cb8: 80 a0 40 08 cmp %g1, %o0 <== NOT EXECUTED
2003cbc: 32 bf ff d4 bne,a 2003c0c <iproc+0x68> <== NOT EXECUTED
2003cc0: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
2003cc4: 80 88 a0 08 btst 8, %g2 <== NOT EXECUTED
2003cc8: 22 80 00 05 be,a 2003cdc <iproc+0x138> <== NOT EXECUTED
2003ccc: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2003cd0: 7f ff ff 0d call 2003904 <echo> <== NOT EXECUTED
2003cd4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003cd8: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2003cdc: c4 06 60 1c ld [ %i1 + 0x1c ], %g2 <== NOT EXECUTED
2003ce0: 86 00 60 01 add %g1, 1, %g3 <== NOT EXECUTED
2003ce4: e0 28 80 01 stb %l0, [ %g2 + %g1 ] <== NOT EXECUTED
2003ce8: c6 26 60 20 st %g3, [ %i1 + 0x20 ] <== NOT EXECUTED
2003cec: 81 c7 e0 08 ret <== NOT EXECUTED
2003cf0: 91 e8 20 01 restore %g0, 1, %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)
2003cf4: 80 88 e0 80 btst 0x80, %g3 <== NOT EXECUTED
2003cf8: 02 80 00 04 be 2003d08 <iproc+0x164> <== NOT EXECUTED
2003cfc: 80 88 e1 00 btst 0x100, %g3 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
2003d00: 81 c7 e0 08 ret <== NOT EXECUTED
2003d04: 91 e8 20 00 restore %g0, 0, %o0 <== 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)
2003d08: 32 bf ff d3 bne,a 2003c54 <iproc+0xb0> <== NOT EXECUTED
2003d0c: 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)) {
2003d10: 10 bf ff d2 b 2003c58 <iproc+0xb4> <== NOT EXECUTED
2003d14: c4 06 60 3c ld [ %i1 + 0x3c ], %g2 <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
2003d18: 90 0c 20 ff and %l0, 0xff, %o0 <== NOT EXECUTED
2003d1c: 7f ff fe fa call 2003904 <echo> <== NOT EXECUTED
2003d20: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003d24: c6 06 60 20 ld [ %i1 + 0x20 ], %g3 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003d28: c2 06 60 1c ld [ %i1 + 0x1c ], %g1 <== NOT EXECUTED
2003d2c: 84 00 e0 01 add %g3, 1, %g2 <== NOT EXECUTED
2003d30: e0 28 40 03 stb %l0, [ %g1 + %g3 ] <== NOT EXECUTED
2003d34: c4 26 60 20 st %g2, [ %i1 + 0x20 ] <== NOT EXECUTED
2003d38: 81 c7 e0 08 ret <== NOT EXECUTED
2003d3c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
2003d40: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003d44: 7f ff ff 10 call 2003984 <erase> <== NOT EXECUTED
2003d48: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003d4c: 81 c7 e0 08 ret <== NOT EXECUTED
2003d50: 81 e8 00 00 restore <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
2003d54: 22 80 00 05 be,a 2003d68 <iproc+0x1c4> <== NOT EXECUTED
2003d58: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
echo (c, tty);
2003d5c: 7f ff fe ea call 2003904 <echo> <== NOT EXECUTED
2003d60: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
2003d64: c2 06 60 20 ld [ %i1 + 0x20 ], %g1 <== NOT EXECUTED
2003d68: c6 06 60 1c ld [ %i1 + 0x1c ], %g3 <== NOT EXECUTED
2003d6c: 84 10 20 0a mov 0xa, %g2 <== NOT EXECUTED
2003d70: c4 28 c0 01 stb %g2, [ %g3 + %g1 ] <== NOT EXECUTED
2003d74: 82 00 60 01 inc %g1 <== NOT EXECUTED
2003d78: c2 26 60 20 st %g1, [ %i1 + 0x20 ] <== NOT EXECUTED
2003d7c: 81 c7 e0 08 ret <== NOT EXECUTED
2003d80: 91 e8 20 01 restore %g0, 1, %o0 <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
2003d84: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003d88: 7f ff fe ff call 2003984 <erase> <== NOT EXECUTED
2003d8c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2003d90: 81 c7 e0 08 ret <== NOT EXECUTED
2003d94: 81 e8 00 00 restore <== NOT EXECUTED
02015488 <isatty>:
#include <sys/stat.h>
int isatty(
int fd
)
{
2015488: 9d e3 bf 48 save %sp, -184, %sp
struct stat buf;
if (fstat (fd, &buf) < 0)
201548c: 90 10 00 18 mov %i0, %o0
2015490: 92 07 bf a8 add %fp, -88, %o1
2015494: 7f ff ff b0 call 2015354 <fstat>
2015498: b0 10 20 00 clr %i0
201549c: 80 a2 20 00 cmp %o0, 0
20154a0: 06 80 00 08 bl 20154c0 <isatty+0x38> <== NEVER TAKEN
20154a4: c2 17 bf b4 lduh [ %fp + -76 ], %g1
20154a8: 05 00 00 3c sethi %hi(0xf000), %g2
20154ac: 07 00 00 08 sethi %hi(0x2000), %g3
20154b0: 82 08 40 02 and %g1, %g2, %g1
20154b4: 82 18 40 03 xor %g1, %g3, %g1
20154b8: 80 a0 00 01 cmp %g0, %g1
20154bc: b0 60 3f ff subx %g0, -1, %i0
if (S_ISCHR (buf.st_mode))
return 1;
return 0;
}
20154c0: 81 c7 e0 08 ret
20154c4: 81 e8 00 00 restore
02019120 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
2019120: 9d e3 bf 88 save %sp, -120, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
2019124: 7f ff fe be call 2018c1c <getpid>
2019128: 01 00 00 00 nop
201912c: 80 a2 00 18 cmp %o0, %i0
2019130: 12 80 00 c6 bne 2019448 <killinfo+0x328> <== NEVER TAKEN
2019134: 80 a6 60 00 cmp %i1, 0
/*
* Validate the signal passed.
*/
if ( !sig )
2019138: 02 80 00 ca be 2019460 <killinfo+0x340> <== NEVER TAKEN
201913c: 86 06 7f ff add %i1, -1, %g3
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2019140: 80 a0 e0 1f cmp %g3, 0x1f
2019144: 18 80 00 c7 bgu 2019460 <killinfo+0x340> <== NEVER TAKEN
2019148: 03 00 80 94 sethi %hi(0x2025000), %g1
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201914c: a1 2e 60 02 sll %i1, 2, %l0
2019150: a4 10 63 78 or %g1, 0x378, %l2
2019154: a3 2e 60 04 sll %i1, 4, %l1
2019158: 82 24 40 10 sub %l1, %l0, %g1
201915c: 82 04 80 01 add %l2, %g1, %g1
2019160: c4 00 60 08 ld [ %g1 + 8 ], %g2
2019164: 80 a0 a0 01 cmp %g2, 1
2019168: 02 80 00 95 be 20193bc <killinfo+0x29c>
201916c: 90 10 20 00 clr %o0
* P1003.1c/Draft 10, p. 33 says that certain signals should always
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
2019170: 80 a6 60 08 cmp %i1, 8
2019174: 02 80 00 94 be 20193c4 <killinfo+0x2a4>
2019178: 80 a6 60 04 cmp %i1, 4
201917c: 02 80 00 92 be 20193c4 <killinfo+0x2a4>
2019180: 80 a6 60 0b cmp %i1, 0xb
2019184: 02 80 00 90 be 20193c4 <killinfo+0x2a4>
2019188: 82 10 20 01 mov 1, %g1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
201918c: f2 27 bf ec st %i1, [ %fp + -20 ]
siginfo->si_code = SI_USER;
2019190: c2 27 bf f0 st %g1, [ %fp + -16 ]
if ( !value ) {
2019194: 80 a6 a0 00 cmp %i2, 0
2019198: 02 80 00 a3 be 2019424 <killinfo+0x304>
201919c: b1 28 40 03 sll %g1, %g3, %i0
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
20191a0: c2 06 80 00 ld [ %i2 ], %g1
20191a4: c2 27 bf f4 st %g1, [ %fp + -12 ]
20191a8: 05 00 80 93 sethi %hi(0x2024c00), %g2
20191ac: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 2024d60 <_Thread_Dispatch_disable_level>
20191b0: 82 00 60 01 inc %g1
20191b4: c2 20 a1 60 st %g1, [ %g2 + 0x160 ]
/*
* 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;
20191b8: 03 00 80 93 sethi %hi(0x2024c00), %g1
20191bc: c8 00 62 24 ld [ %g1 + 0x224 ], %g4 ! 2024e24 <_Thread_Executing>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
20191c0: c4 01 21 6c ld [ %g4 + 0x16c ], %g2
20191c4: c2 00 a0 c4 ld [ %g2 + 0xc4 ], %g1
20191c8: 80 ae 00 01 andncc %i0, %g1, %g0
20191cc: 12 80 00 69 bne 2019370 <killinfo+0x250>
20191d0: 03 00 80 95 sethi %hi(0x2025400), %g1
goto process_it;
20191d4: 98 10 61 04 or %g1, 0x104, %o4 ! 2025504 <_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 ;
20191d8: 96 03 20 30 add %o4, 0x30, %o3
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
20191dc: c4 03 00 00 ld [ %o4 ], %g2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
20191e0: 9a 03 20 04 add %o4, 4, %o5
!_Chain_Is_tail( the_chain, the_node ) ;
20191e4: 80 a0 80 0d cmp %g2, %o5
20191e8: 22 80 00 1a be,a 2019250 <killinfo+0x130>
20191ec: 98 03 20 0c add %o4, 0xc, %o4
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)) {
20191f0: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
20191f4: 88 10 00 02 mov %g2, %g4
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
20191f8: 80 8e 00 01 btst %i0, %g1
20191fc: 12 80 00 5d bne 2019370 <killinfo+0x250> <== ALWAYS TAKEN
2019200: c2 00 a1 6c ld [ %g2 + 0x16c ], %g1
2019204: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED
2019208: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED
201920c: 22 80 00 0d be,a 2019240 <killinfo+0x120> <== NOT EXECUTED
2019210: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
2019214: 10 80 00 58 b 2019374 <killinfo+0x254> <== NOT EXECUTED
2019218: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
201921c: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3 <== NOT EXECUTED
if ((the_thread->Wait.option & mask) || (~api->signals_blocked & mask)) {
2019220: 80 8e 00 01 btst %i0, %g1 <== NOT EXECUTED
2019224: 12 80 00 53 bne 2019370 <killinfo+0x250> <== NOT EXECUTED
2019228: 88 10 00 02 mov %g2, %g4 <== NOT EXECUTED
201922c: c2 00 e0 c4 ld [ %g3 + 0xc4 ], %g1 <== NOT EXECUTED
2019230: 80 ae 00 01 andncc %i0, %g1, %g0 <== NOT EXECUTED
2019234: 12 80 00 50 bne 2019374 <killinfo+0x254> <== NOT EXECUTED
2019238: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
201923c: c4 00 80 00 ld [ %g2 ], %g2 <== NOT EXECUTED
index++ ) {
the_chain = &_POSIX_signals_Wait_queue.Queues.Priority[ index ];
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
2019240: 80 a0 80 0d cmp %g2, %o5 <== NOT EXECUTED
2019244: 32 bf ff f6 bne,a 201921c <killinfo+0xfc> <== NOT EXECUTED
2019248: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1 <== NOT EXECUTED
201924c: 98 03 20 0c add %o4, 0xc, %o4 <== NOT EXECUTED
*/
/* XXX violation of visibility -- need to define thread queue support */
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
2019250: 80 a3 00 0b cmp %o4, %o3
2019254: 12 bf ff e2 bne 20191dc <killinfo+0xbc>
2019258: 03 00 80 70 sethi %hi(0x201c000), %g1
*
* + rtems internal threads do not receive signals.
*/
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
201925c: c4 08 61 84 ldub [ %g1 + 0x184 ], %g2 ! 201c184 <rtems_maximum_priority>
2019260: 90 10 20 00 clr %o0
2019264: 03 00 80 93 sethi %hi(0x2024c00), %g1
2019268: 84 00 a0 01 inc %g2
201926c: 94 10 60 c8 or %g1, 0xc8, %o2
* 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 )
2019270: 35 04 00 00 sethi %hi(0x10000000), %i2
2019274: 9e 02 a0 0c add %o2, 0xc, %o7
the_api++ ) {
/*
* Thie can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
2019278: c2 02 80 00 ld [ %o2 ], %g1
201927c: 80 a0 60 00 cmp %g1, 0
2019280: 22 80 00 35 be,a 2019354 <killinfo+0x234>
2019284: 9a 10 00 02 mov %g2, %o5
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
2019288: c2 00 60 04 ld [ %g1 + 4 ], %g1
/*
* This cannot happen in the current (as of Dec 2007) implementation
* of initialization but at some point, the object information
* structure for a particular manager may not be installed.
*/
if ( !the_info )
201928c: 80 a0 60 00 cmp %g1, 0
2019290: 22 80 00 31 be,a 2019354 <killinfo+0x234> <== NEVER TAKEN
2019294: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED
continue;
maximum = the_info->maximum;
2019298: d8 10 60 10 lduh [ %g1 + 0x10 ], %o4
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201929c: 80 a3 20 00 cmp %o4, 0
20192a0: 02 80 00 5f be 201941c <killinfo+0x2fc>
20192a4: d6 00 60 1c ld [ %g1 + 0x1c ], %o3
20192a8: 88 10 20 01 mov 1, %g4
the_thread = (Thread_Control *) object_table[ index ];
20192ac: 83 29 20 02 sll %g4, 2, %g1
20192b0: c6 02 c0 01 ld [ %o3 + %g1 ], %g3
if ( !the_thread )
20192b4: 80 a0 e0 00 cmp %g3, 0
20192b8: 02 80 00 23 be 2019344 <killinfo+0x224> <== NEVER TAKEN
20192bc: 9a 10 00 02 mov %g2, %o5
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
20192c0: da 00 e0 14 ld [ %g3 + 0x14 ], %o5
20192c4: 80 a3 40 02 cmp %o5, %g2
20192c8: 38 80 00 1f bgu,a 2019344 <killinfo+0x224> <== NEVER TAKEN
20192cc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
20192d0: c2 00 e1 6c ld [ %g3 + 0x16c ], %g1
if ( !api || !_POSIX_signals_Is_interested( api, mask ) )
20192d4: 80 a0 60 00 cmp %g1, 0
20192d8: 22 80 00 1b be,a 2019344 <killinfo+0x224> <== NEVER TAKEN
20192dc: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED
20192e0: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1
20192e4: 80 ae 00 01 andncc %i0, %g1, %g0
20192e8: 22 80 00 17 be,a 2019344 <killinfo+0x224>
20192ec: 9a 10 00 02 mov %g2, %o5
* 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 ) {
20192f0: 80 a3 40 02 cmp %o5, %g2
20192f4: 2a 80 00 0b bcs,a 2019320 <killinfo+0x200> <== ALWAYS TAKEN
20192f8: 88 01 20 01 inc %g4
* 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 ) )
20192fc: c2 02 20 10 ld [ %o0 + 0x10 ], %g1 <== NOT EXECUTED
2019300: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2019304: 22 80 00 10 be,a 2019344 <killinfo+0x224> <== NOT EXECUTED
2019308: 9a 10 00 02 mov %g2, %o5 <== 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 ) ) {
201930c: d2 00 e0 10 ld [ %g3 + 0x10 ], %o1 <== NOT EXECUTED
2019310: 80 a2 60 00 cmp %o1, 0 <== NOT EXECUTED
2019314: 12 80 00 46 bne 201942c <killinfo+0x30c> <== NOT EXECUTED
2019318: 80 88 40 1a btst %g1, %i2 <== NOT EXECUTED
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201931c: 88 01 20 01 inc %g4 <== NOT EXECUTED
2019320: 80 a3 00 04 cmp %o4, %g4
2019324: 0a 80 00 0c bcs 2019354 <killinfo+0x234> <== NEVER TAKEN
2019328: 90 10 00 03 mov %g3, %o0
the_thread = (Thread_Control *) object_table[ index ];
201932c: 83 29 20 02 sll %g4, 2, %g1
2019330: c6 02 c0 01 ld [ %o3 + %g1 ], %g3
if ( !the_thread )
2019334: 80 a0 e0 00 cmp %g3, 0
2019338: 12 bf ff e2 bne 20192c0 <killinfo+0x1a0>
201933c: 84 10 00 0d mov %o5, %g2
* 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 ) {
2019340: 9a 10 00 02 mov %g2, %o5
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
2019344: 88 01 20 01 inc %g4
2019348: 80 a3 00 04 cmp %o4, %g4
201934c: 1a bf ff f9 bcc 2019330 <killinfo+0x210>
2019350: 83 29 20 02 sll %g4, 2, %g1
2019354: 94 02 a0 04 add %o2, 4, %o2
interested_thread = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for ( the_api = OBJECTS_CLASSIC_API;
the_api <= OBJECTS_APIS_LAST;
2019358: 80 a2 80 0f cmp %o2, %o7
201935c: 12 bf ff c7 bne 2019278 <killinfo+0x158>
2019360: 84 10 00 0d mov %o5, %g2
interested_priority = the_thread->current_priority;
}
}
}
if ( interested_thread ) {
2019364: 80 a2 20 00 cmp %o0, 0
2019368: 02 80 00 0b be 2019394 <killinfo+0x274>
201936c: 88 10 00 08 mov %o0, %g4
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
2019370: 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 ) ) {
2019374: 90 10 00 04 mov %g4, %o0
2019378: 92 10 00 19 mov %i1, %o1
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
201937c: c2 29 20 75 stb %g1, [ %g4 + 0x75 ]
/*
* 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 ) ) {
2019380: 40 00 00 54 call 20194d0 <_POSIX_signals_Unblock_thread>
2019384: 94 07 bf ec add %fp, -20, %o2
2019388: 80 8a 20 ff btst 0xff, %o0
201938c: 12 80 00 09 bne 20193b0 <killinfo+0x290>
2019390: 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 );
2019394: 40 00 00 3f call 2019490 <_POSIX_signals_Set_process_signals>
2019398: 90 10 00 18 mov %i0, %o0
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
201939c: b4 24 40 10 sub %l1, %l0, %i2
20193a0: c2 04 80 1a ld [ %l2 + %i2 ], %g1
20193a4: 80 a0 60 02 cmp %g1, 2
20193a8: 02 80 00 0d be 20193dc <killinfo+0x2bc>
20193ac: 11 00 80 95 sethi %hi(0x2025400), %o0
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
20193b0: 7f ff c0 54 call 2009500 <_Thread_Enable_dispatch>
20193b4: 01 00 00 00 nop
20193b8: 90 10 20 00 clr %o0 ! 0 <PROM_START>
return 0;
}
20193bc: 81 c7 e0 08 ret
20193c0: 91 e8 00 08 restore %g0, %o0, %o0
* be directed to the executing thread such as those caused by hardware
* faults.
*/
if ( (sig == SIGFPE) || (sig == SIGILL) || (sig == SIGSEGV ) )
return pthread_kill( pthread_self(), sig );
20193c4: 40 00 00 d0 call 2019704 <pthread_self>
20193c8: 01 00 00 00 nop
20193cc: 40 00 00 92 call 2019614 <pthread_kill>
20193d0: 92 10 00 19 mov %i1, %o1
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
_Thread_Enable_dispatch();
return 0;
}
20193d4: 81 c7 e0 08 ret
20193d8: 91 e8 00 08 restore %g0, %o0, %o0
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
20193dc: 7f ff d3 0b call 200e008 <_Chain_Get>
20193e0: 90 12 20 f8 or %o0, 0xf8, %o0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
20193e4: 80 a2 20 00 cmp %o0, 0
20193e8: 02 80 00 24 be 2019478 <killinfo+0x358> <== NEVER TAKEN
20193ec: 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 );
20193f0: 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;
20193f4: c2 22 20 08 st %g1, [ %o0 + 8 ]
20193f8: c4 07 bf f0 ld [ %fp + -16 ], %g2
20193fc: c4 22 20 0c st %g2, [ %o0 + 0xc ]
2019400: c2 07 bf f4 ld [ %fp + -12 ], %g1
2019404: c2 22 20 10 st %g1, [ %o0 + 0x10 ]
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
2019408: 11 00 80 95 sethi %hi(0x2025400), %o0
201940c: 90 12 21 48 or %o0, 0x148, %o0 ! 2025548 <_POSIX_signals_Siginfo>
2019410: 7f ff b9 a1 call 2007a94 <_Chain_Append>
2019414: 90 02 00 1a add %o0, %i2, %o0
2019418: 30 bf ff e6 b,a 20193b0 <killinfo+0x290>
continue;
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
201941c: 10 bf ff ce b 2019354 <killinfo+0x234>
2019420: 9a 10 00 02 mov %g2, %o5
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
2019424: 10 bf ff 61 b 20191a8 <killinfo+0x88>
2019428: c0 27 bf f4 clr [ %fp + -12 ]
* 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 )
201942c: 32 bf ff c6 bne,a 2019344 <killinfo+0x224> <== NOT EXECUTED
2019430: 9a 10 00 02 mov %g2, %o5 <== 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 ) {
2019434: 80 8a 40 1a btst %o1, %i2 <== NOT EXECUTED
2019438: 32 bf ff ba bne,a 2019320 <killinfo+0x200> <== NOT EXECUTED
201943c: 88 01 20 01 inc %g4 <== NOT EXECUTED
2019440: 10 bf ff c1 b 2019344 <killinfo+0x224> <== NOT EXECUTED
2019444: 9a 10 00 02 mov %g2, %o5 <== NOT EXECUTED
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
2019448: 7f ff d8 ee call 200f800 <__errno> <== NOT EXECUTED
201944c: 01 00 00 00 nop <== NOT EXECUTED
2019450: 82 10 20 03 mov 3, %g1 ! 3 <PROM_START+0x3> <== NOT EXECUTED
2019454: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019458: 10 bf ff d9 b 20193bc <killinfo+0x29c> <== NOT EXECUTED
201945c: 90 10 3f ff mov -1, %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 );
2019460: 7f ff d8 e8 call 200f800 <__errno> <== NOT EXECUTED
2019464: 01 00 00 00 nop <== NOT EXECUTED
2019468: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
201946c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019470: 10 bf ff d3 b 20193bc <killinfo+0x29c> <== NOT EXECUTED
2019474: 90 10 3f ff mov -1, %o0 <== 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 );
2019478: 7f ff d8 e2 call 200f800 <__errno> <== NOT EXECUTED
201947c: 01 00 00 00 nop <== NOT EXECUTED
2019480: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb> <== NOT EXECUTED
2019484: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2019488: 10 bf ff cd b 20193bc <killinfo+0x29c> <== NOT EXECUTED
201948c: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02002608 <libc_create_hook>:
*/
bool libc_create_hook(
rtems_tcb *current_task,
rtems_tcb *creating_task
)
{
2002608: 9d e3 bf 98 save %sp, -104, %sp
ptr = (struct _reent *) calloc(1, sizeof(struct _reent));
#else
/* It is OK to allocate from the workspace because these
* hooks run with thread dispatching disabled.
*/
ptr = (struct _reent *) _Workspace_Allocate(sizeof(struct _reent));
200260c: 90 10 24 00 mov 0x400, %o0
2002610: 40 00 1b 09 call 2009234 <_Workspace_Allocate>
2002614: b0 10 20 00 clr %i0
#endif
if (ptr) {
2002618: a0 92 20 00 orcc %o0, 0, %l0
200261c: 02 80 00 63 be 20027a8 <libc_create_hook+0x1a0> <== NEVER TAKEN
2002620: 90 04 22 ec add %l0, 0x2ec, %o0
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
2002624: c0 24 00 00 clr [ %l0 ]
2002628: c0 24 20 10 clr [ %l0 + 0x10 ]
200262c: c0 24 20 14 clr [ %l0 + 0x14 ]
2002630: 82 04 23 48 add %l0, 0x348, %g1
2002634: d0 24 20 04 st %o0, [ %l0 + 4 ]
2002638: c2 24 20 08 st %g1, [ %l0 + 8 ]
200263c: 84 04 23 a4 add %l0, 0x3a4, %g2
2002640: c4 24 20 0c st %g2, [ %l0 + 0xc ]
2002644: 82 04 20 14 add %l0, 0x14, %g1
2002648: c0 28 60 18 clrb [ %g1 + 0x18 ]
200264c: c0 20 60 04 clr [ %g1 + 4 ]
2002650: c0 20 60 08 clr [ %g1 + 8 ]
2002654: c0 20 60 0c clr [ %g1 + 0xc ]
2002658: c0 20 60 10 clr [ %g1 + 0x10 ]
200265c: c0 20 60 14 clr [ %g1 + 0x14 ]
2002660: c0 24 20 30 clr [ %l0 + 0x30 ]
2002664: c0 24 20 38 clr [ %l0 + 0x38 ]
2002668: c0 24 20 3c clr [ %l0 + 0x3c ]
200266c: c0 24 20 40 clr [ %l0 + 0x40 ]
2002670: c0 24 20 44 clr [ %l0 + 0x44 ]
2002674: c0 24 20 48 clr [ %l0 + 0x48 ]
2002678: c0 24 20 4c clr [ %l0 + 0x4c ]
200267c: c0 24 20 50 clr [ %l0 + 0x50 ]
2002680: c0 24 20 54 clr [ %l0 + 0x54 ]
2002684: c0 24 20 58 clr [ %l0 + 0x58 ]
2002688: c0 24 20 5c clr [ %l0 + 0x5c ]
200268c: c0 2c 20 60 clrb [ %l0 + 0x60 ]
2002690: c0 24 20 7c clr [ %l0 + 0x7c ]
2002694: 03 00 80 59 sethi %hi(0x2016400), %g1
2002698: 82 10 61 38 or %g1, 0x138, %g1 ! 2016538 <pollCallbacks.4788+0x358>
200269c: c2 24 20 34 st %g1, [ %l0 + 0x34 ]
20026a0: 84 04 20 7c add %l0, 0x7c, %g2
20026a4: c0 20 a0 04 clr [ %g2 + 4 ]
20026a8: c0 20 a0 08 clr [ %g2 + 8 ]
20026ac: c0 20 a0 0c clr [ %g2 + 0xc ]
20026b0: c0 20 a0 10 clr [ %g2 + 0x10 ]
20026b4: c0 20 a0 14 clr [ %g2 + 0x14 ]
20026b8: c0 20 a0 18 clr [ %g2 + 0x18 ]
20026bc: c0 20 a0 1c clr [ %g2 + 0x1c ]
20026c0: c0 20 a0 20 clr [ %g2 + 0x20 ]
20026c4: 03 00 00 0c sethi %hi(0x3000), %g1
20026c8: 84 10 20 00 clr %g2
20026cc: 82 10 63 0e or %g1, 0x30e, %g1
20026d0: 86 10 20 01 mov 1, %g3
20026d4: c2 34 20 b0 sth %g1, [ %l0 + 0xb0 ]
20026d8: c4 3c 20 a8 std %g2, [ %l0 + 0xa8 ]
20026dc: 03 00 00 04 sethi %hi(0x1000), %g1
20026e0: 05 3f ff ea sethi %hi(0xffffa800), %g2
20026e4: 82 10 62 34 or %g1, 0x234, %g1
20026e8: 84 10 a3 cd or %g2, 0x3cd, %g2
20026ec: c2 34 20 b4 sth %g1, [ %l0 + 0xb4 ]
20026f0: c4 34 20 b2 sth %g2, [ %l0 + 0xb2 ]
20026f4: 03 3f ff f7 sethi %hi(0xffffdc00), %g1
20026f8: 05 3f ff f9 sethi %hi(0xffffe400), %g2
20026fc: 82 10 62 ec or %g1, 0x2ec, %g1
2002700: 84 10 a2 6d or %g2, 0x26d, %g2
2002704: c2 34 20 b8 sth %g1, [ %l0 + 0xb8 ]
2002708: c4 34 20 b6 sth %g2, [ %l0 + 0xb6 ]
200270c: 82 10 20 0b mov 0xb, %g1
2002710: 84 10 20 05 mov 5, %g2
2002714: c2 34 20 bc sth %g1, [ %l0 + 0xbc ]
2002718: c4 34 20 ba sth %g2, [ %l0 + 0xba ]
200271c: c0 24 20 a0 clr [ %l0 + 0xa0 ]
2002720: c0 24 20 c0 clr [ %l0 + 0xc0 ]
2002724: c0 24 20 c4 clr [ %l0 + 0xc4 ]
2002728: c0 24 20 c8 clr [ %l0 + 0xc8 ]
200272c: c0 24 20 cc clr [ %l0 + 0xcc ]
2002730: c0 24 20 d0 clr [ %l0 + 0xd0 ]
2002734: c0 24 20 d4 clr [ %l0 + 0xd4 ]
2002738: c0 24 20 fc clr [ %l0 + 0xfc ]
200273c: c0 24 21 00 clr [ %l0 + 0x100 ]
2002740: c0 24 21 04 clr [ %l0 + 0x104 ]
2002744: c0 24 21 08 clr [ %l0 + 0x108 ]
2002748: c0 24 21 0c clr [ %l0 + 0x10c ]
200274c: c0 24 21 10 clr [ %l0 + 0x110 ]
2002750: c0 24 21 14 clr [ %l0 + 0x114 ]
2002754: c0 24 21 18 clr [ %l0 + 0x118 ]
2002758: c0 24 21 1c clr [ %l0 + 0x11c ]
200275c: c0 24 21 20 clr [ %l0 + 0x120 ]
2002760: c0 2c 20 d8 clrb [ %l0 + 0xd8 ]
2002764: c0 2c 20 e0 clrb [ %l0 + 0xe0 ]
2002768: c0 24 20 f8 clr [ %l0 + 0xf8 ]
200276c: c0 24 21 48 clr [ %l0 + 0x148 ]
2002770: c0 24 21 4c clr [ %l0 + 0x14c ]
2002774: c0 24 21 50 clr [ %l0 + 0x150 ]
2002778: c0 24 21 54 clr [ %l0 + 0x154 ]
200277c: c0 24 22 d4 clr [ %l0 + 0x2d4 ]
2002780: c0 24 21 d4 clr [ %l0 + 0x1d4 ]
2002784: 92 10 20 00 clr %o1
2002788: c0 24 22 dc clr [ %l0 + 0x2dc ]
200278c: c0 24 22 e0 clr [ %l0 + 0x2e0 ]
2002790: c0 24 22 e4 clr [ %l0 + 0x2e4 ]
2002794: c0 24 22 e8 clr [ %l0 + 0x2e8 ]
2002798: 94 10 21 14 mov 0x114, %o2
200279c: 40 00 2f 08 call 200e3bc <memset>
20027a0: b0 10 20 01 mov 1, %i0
creating_task->libc_reent = ptr;
20027a4: e0 26 61 64 st %l0, [ %i1 + 0x164 ]
return true;
}
else
return false;
}
20027a8: 81 c7 e0 08 ret
20027ac: 81 e8 00 00 restore
02002548 <libc_delete_hook>:
rtems_extension libc_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
2002548: 9d e3 bf 98 save %sp, -104, %sp
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
200254c: 80 a6 00 19 cmp %i0, %i1
2002550: 02 80 00 16 be 20025a8 <libc_delete_hook+0x60>
2002554: 03 00 80 5e sethi %hi(0x2017800), %g1
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
2002558: e0 06 61 64 ld [ %i1 + 0x164 ], %l0
}
if (ptr && ptr != &libc_global_reent) {
200255c: 80 a4 20 00 cmp %l0, 0
2002560: 02 80 00 0b be 200258c <libc_delete_hook+0x44> <== NEVER TAKEN
2002564: 03 00 80 5d sethi %hi(0x2017400), %g1
2002568: 82 10 61 40 or %g1, 0x140, %g1 ! 2017540 <libc_global_reent>
200256c: 80 a4 00 01 cmp %l0, %g1
2002570: 02 80 00 07 be 200258c <libc_delete_hook+0x44>
2002574: 13 00 80 09 sethi %hi(0x2002400), %o1
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
2002578: 90 10 00 10 mov %l0, %o0
200257c: 40 00 2f 31 call 200e240 <_fwalk>
2002580: 92 12 61 b0 or %o1, 0x1b0, %o1
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
2002584: 40 00 1b 25 call 2009218 <_Workspace_Free>
2002588: 90 10 00 10 mov %l0, %o0
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
200258c: 80 a6 00 19 cmp %i0, %i1
2002590: 12 80 00 04 bne 20025a0 <libc_delete_hook+0x58>
2002594: c0 26 61 64 clr [ %i1 + 0x164 ]
_REENT = 0;
2002598: 03 00 80 5e sethi %hi(0x2017800), %g1
200259c: c0 20 61 f0 clr [ %g1 + 0x1f0 ] ! 20179f0 <_impure_ptr>
20025a0: 81 c7 e0 08 ret
20025a4: 81 e8 00 00 restore
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
20025a8: 10 bf ff ed b 200255c <libc_delete_hook+0x14>
20025ac: e0 00 61 f0 ld [ %g1 + 0x1f0 ], %l0
02015600 <libc_wrapup>:
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
2015600: 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()))
2015604: 03 00 80 61 sethi %hi(0x2018400), %g1
2015608: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 ! 20184b4 <_System_state_Current>
201560c: 80 a0 a0 03 cmp %g2, 3
2015610: 02 80 00 04 be 2015620 <libc_wrapup+0x20> <== ALWAYS TAKEN
2015614: 21 00 80 5e sethi %hi(0x2017800), %l0
2015618: 81 c7 e0 08 ret <== NOT EXECUTED
201561c: 81 e8 00 00 restore <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != &libc_global_reent) {
2015620: c4 04 21 f0 ld [ %l0 + 0x1f0 ], %g2
2015624: 03 00 80 5d sethi %hi(0x2017400), %g1
2015628: b0 10 61 40 or %g1, 0x140, %i0 ! 2017540 <libc_global_reent>
201562c: 80 a0 80 18 cmp %g2, %i0
2015630: 02 80 00 06 be 2015648 <libc_wrapup+0x48>
2015634: c2 04 21 f0 ld [ %l0 + 0x1f0 ], %g1
_wrapup_reent(&libc_global_reent);
2015638: 40 00 01 ce call 2015d70 <_wrapup_reent>
201563c: 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;
2015640: f0 24 21 f0 st %i0, [ %l0 + 0x1f0 ]
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
2015644: c2 04 21 f0 ld [ %l0 + 0x1f0 ], %g1
2015648: 7f ff e1 8a call 200dc70 <fclose>
201564c: d0 00 60 04 ld [ %g1 + 4 ], %o0
fclose (stdout);
2015650: c2 04 21 f0 ld [ %l0 + 0x1f0 ], %g1
2015654: 7f ff e1 87 call 200dc70 <fclose>
2015658: d0 00 60 08 ld [ %g1 + 8 ], %o0
fclose (stderr);
201565c: c2 04 21 f0 ld [ %l0 + 0x1f0 ], %g1
2015660: f0 00 60 0c ld [ %g1 + 0xc ], %i0
2015664: 7f ff e1 83 call 200dc70 <fclose>
2015668: 81 e8 00 00 restore
02003c10 <link>:
int link(
const char *existing,
const char *new
)
{
2003c10: 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 );
2003c14: 92 10 20 00 clr %o1
2003c18: 90 10 00 18 mov %i0, %o0
2003c1c: a0 07 bf e4 add %fp, -28, %l0
2003c20: 96 10 20 01 mov 1, %o3
2003c24: 94 10 00 10 mov %l0, %o2
2003c28: 7f ff fe 60 call 20035a8 <rtems_filesystem_evaluate_path>
2003c2c: b0 10 3f ff mov -1, %i0
if ( result != 0 )
2003c30: 80 a2 20 00 cmp %o0, 0
2003c34: 12 80 00 84 bne 2003e44 <link+0x234>
2003c38: 01 00 00 00 nop
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2003c3c: c2 4e 40 00 ldsb [ %i1 ], %g1
2003c40: 80 a0 60 2f cmp %g1, 0x2f
2003c44: 02 80 00 06 be 2003c5c <link+0x4c>
2003c48: 80 a0 60 5c cmp %g1, 0x5c
2003c4c: 02 80 00 04 be 2003c5c <link+0x4c> <== NEVER TAKEN
2003c50: 80 a0 60 00 cmp %g1, 0
2003c54: 12 80 00 3a bne 2003d3c <link+0x12c> <== ALWAYS TAKEN
2003c58: 03 00 80 63 sethi %hi(0x2018c00), %g1
2003c5c: 03 00 80 63 sethi %hi(0x2018c00), %g1
2003c60: c6 00 60 bc ld [ %g1 + 0xbc ], %g3 ! 2018cbc <rtems_current_user_env>
2003c64: 88 10 20 01 mov 1, %g4
2003c68: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
2003c6c: c2 27 bf d4 st %g1, [ %fp + -44 ]
2003c70: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2
2003c74: c4 27 bf d8 st %g2, [ %fp + -40 ]
2003c78: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2003c7c: c2 27 bf dc st %g1, [ %fp + -36 ]
2003c80: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2
2003c84: c4 27 bf e0 st %g2, [ %fp + -32 ]
if ( !parent_loc.ops->evalformake_h ) {
2003c88: c2 07 bf dc ld [ %fp + -36 ], %g1
2003c8c: c2 00 60 04 ld [ %g1 + 4 ], %g1
2003c90: 80 a0 60 00 cmp %g1, 0
2003c94: 02 80 00 5e be 2003e0c <link+0x1fc> <== NEVER TAKEN
2003c98: 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 );
2003c9c: a2 07 bf d4 add %fp, -44, %l1
2003ca0: 94 07 bf f4 add %fp, -12, %o2
2003ca4: 9f c0 40 00 call %g1
2003ca8: 92 10 00 11 mov %l1, %o1
if ( result != 0 ) {
2003cac: b2 92 20 00 orcc %o0, 0, %i1
2003cb0: 12 80 00 48 bne 2003dd0 <link+0x1c0>
2003cb4: c4 07 bf f0 ld [ %fp + -16 ], %g2
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
2003cb8: c2 07 bf e0 ld [ %fp + -32 ], %g1
2003cbc: 80 a0 40 02 cmp %g1, %g2
2003cc0: 12 80 00 2a bne 2003d68 <link+0x158>
2003cc4: 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 ) {
2003cc8: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2003ccc: 80 a0 60 00 cmp %g1, 0
2003cd0: 02 80 00 5f be 2003e4c <link+0x23c> <== NEVER TAKEN
2003cd4: 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 );
2003cd8: 90 10 00 10 mov %l0, %o0
2003cdc: 9f c0 40 00 call %g1
2003ce0: 92 10 00 11 mov %l1, %o1
rtems_filesystem_freenode( &existing_loc );
2003ce4: c2 07 bf ec ld [ %fp + -20 ], %g1
2003ce8: 80 a0 60 00 cmp %g1, 0
2003cec: 02 80 00 08 be 2003d0c <link+0xfc> <== NEVER TAKEN
2003cf0: b0 10 00 08 mov %o0, %i0
2003cf4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003cf8: 80 a0 60 00 cmp %g1, 0
2003cfc: 22 80 00 05 be,a 2003d10 <link+0x100> <== NEVER TAKEN
2003d00: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003d04: 9f c0 40 00 call %g1
2003d08: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &parent_loc );
2003d0c: c2 07 bf dc ld [ %fp + -36 ], %g1
2003d10: 80 a0 60 00 cmp %g1, 0
2003d14: 02 80 00 4c be 2003e44 <link+0x234> <== NEVER TAKEN
2003d18: 01 00 00 00 nop
2003d1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003d20: 80 a0 60 00 cmp %g1, 0
2003d24: 02 80 00 48 be 2003e44 <link+0x234> <== NEVER TAKEN
2003d28: 01 00 00 00 nop
2003d2c: 9f c0 40 00 call %g1
2003d30: 90 10 00 11 mov %l1, %o0
return result;
}
2003d34: 81 c7 e0 08 ret
2003d38: 81 e8 00 00 restore
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
2003d3c: c6 00 60 bc ld [ %g1 + 0xbc ], %g3
2003d40: 88 10 20 00 clr %g4
2003d44: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2003d48: c2 27 bf d4 st %g1, [ %fp + -44 ]
2003d4c: c4 00 e0 08 ld [ %g3 + 8 ], %g2
2003d50: c4 27 bf d8 st %g2, [ %fp + -40 ]
2003d54: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
2003d58: c2 27 bf dc st %g1, [ %fp + -36 ]
2003d5c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2003d60: 10 bf ff ca b 2003c88 <link+0x78>
2003d64: 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 );
2003d68: c2 07 bf ec ld [ %fp + -20 ], %g1
2003d6c: 80 a0 60 00 cmp %g1, 0
2003d70: 22 80 00 09 be,a 2003d94 <link+0x184> <== NEVER TAKEN
2003d74: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003d78: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003d7c: 80 a0 60 00 cmp %g1, 0
2003d80: 22 80 00 05 be,a 2003d94 <link+0x184> <== NEVER TAKEN
2003d84: c2 07 bf dc ld [ %fp + -36 ], %g1 <== NOT EXECUTED
2003d88: 9f c0 40 00 call %g1
2003d8c: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &parent_loc );
2003d90: c2 07 bf dc ld [ %fp + -36 ], %g1
2003d94: 80 a0 60 00 cmp %g1, 0
2003d98: 02 80 00 08 be 2003db8 <link+0x1a8> <== NEVER TAKEN
2003d9c: 01 00 00 00 nop
2003da0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003da4: 80 a0 60 00 cmp %g1, 0
2003da8: 02 80 00 04 be 2003db8 <link+0x1a8> <== NEVER TAKEN
2003dac: 01 00 00 00 nop
2003db0: 9f c0 40 00 call %g1
2003db4: 90 10 00 11 mov %l1, %o0
rtems_set_errno_and_return_minus_one( EXDEV );
2003db8: 40 00 32 86 call 20107d0 <__errno>
2003dbc: b0 10 3f ff mov -1, %i0
2003dc0: 82 10 20 12 mov 0x12, %g1
2003dc4: c2 22 00 00 st %g1, [ %o0 ]
2003dc8: 81 c7 e0 08 ret
2003dcc: 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 );
2003dd0: c2 07 bf ec ld [ %fp + -20 ], %g1
2003dd4: 80 a0 60 00 cmp %g1, 0
2003dd8: 02 80 00 08 be 2003df8 <link+0x1e8> <== NEVER TAKEN
2003ddc: 01 00 00 00 nop
2003de0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2003de4: 80 a0 60 00 cmp %g1, 0
2003de8: 02 80 00 04 be 2003df8 <link+0x1e8> <== NEVER TAKEN
2003dec: 01 00 00 00 nop
2003df0: 9f c0 40 00 call %g1
2003df4: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( result );
2003df8: 40 00 32 76 call 20107d0 <__errno>
2003dfc: b0 10 3f ff mov -1, %i0
2003e00: f2 22 00 00 st %i1, [ %o0 ]
2003e04: 81 c7 e0 08 ret
2003e08: 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 );
2003e0c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2003e10: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e14: 02 80 00 08 be 2003e34 <link+0x224> <== NOT EXECUTED
2003e18: 01 00 00 00 nop <== NOT EXECUTED
2003e1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003e20: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e24: 02 80 00 04 be 2003e34 <link+0x224> <== NOT EXECUTED
2003e28: 01 00 00 00 nop <== NOT EXECUTED
2003e2c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003e30: 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 );
2003e34: 40 00 32 67 call 20107d0 <__errno> <== NOT EXECUTED
2003e38: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2003e3c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2003e40: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2003e44: 81 c7 e0 08 ret
2003e48: 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 );
2003e4c: c2 07 bf ec ld [ %fp + -20 ], %g1 <== NOT EXECUTED
2003e50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e54: 02 80 00 0a be 2003e7c <link+0x26c> <== NOT EXECUTED
2003e58: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003e5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2003e60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e64: 02 80 00 06 be 2003e7c <link+0x26c> <== NOT EXECUTED
2003e68: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003e6c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003e70: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003e74: c4 07 bf dc ld [ %fp + -36 ], %g2 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2003e78: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003e7c: 02 bf ff ee be 2003e34 <link+0x224> <== NOT EXECUTED
2003e80: 01 00 00 00 nop <== NOT EXECUTED
2003e84: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2003e88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003e8c: 02 bf ff ea be 2003e34 <link+0x224> <== NOT EXECUTED
2003e90: 01 00 00 00 nop <== NOT EXECUTED
2003e94: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003e98: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2003e9c: 30 bf ff e6 b,a 2003e34 <link+0x224> <== NOT EXECUTED
020154c8 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
20154c8: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
20154cc: 03 00 80 5d sethi %hi(0x2017400), %g1
20154d0: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
off_t lseek(
int fd,
off_t offset,
int whence
)
{
20154d4: 92 10 00 19 mov %i1, %o1
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
20154d8: 80 a6 00 02 cmp %i0, %g2
20154dc: 1a 80 00 31 bcc 20155a0 <lseek+0xd8> <== NEVER TAKEN
20154e0: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
20154e4: 03 00 80 60 sethi %hi(0x2018000), %g1
20154e8: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
20154ec: 85 2e 20 02 sll %i0, 2, %g2
20154f0: 83 2e 20 04 sll %i0, 4, %g1
20154f4: 82 20 40 02 sub %g1, %g2, %g1
20154f8: 82 00 40 18 add %g1, %i0, %g1
20154fc: 83 28 60 02 sll %g1, 2, %g1
2015500: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open(iop);
2015504: c4 06 20 0c ld [ %i0 + 0xc ], %g2
2015508: 80 88 a1 00 btst 0x100, %g2
201550c: 02 80 00 25 be 20155a0 <lseek+0xd8> <== NEVER TAKEN
2015510: 01 00 00 00 nop
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
2015514: c4 06 20 30 ld [ %i0 + 0x30 ], %g2
2015518: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
201551c: 80 a0 60 00 cmp %g1, 0
2015520: 02 80 00 26 be 20155b8 <lseek+0xf0> <== NEVER TAKEN
2015524: 80 a6 a0 01 cmp %i2, 1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
2015528: 02 80 00 1b be 2015594 <lseek+0xcc>
201552c: f4 06 20 08 ld [ %i0 + 8 ], %i2
2015530: 80 a2 a0 02 cmp %o2, 2
2015534: 02 80 00 0d be 2015568 <lseek+0xa0>
2015538: 80 a2 a0 00 cmp %o2, 0
201553c: 12 80 00 0f bne 2015578 <lseek+0xb0>
2015540: 01 00 00 00 nop
case SEEK_SET:
iop->offset = offset;
2015544: 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 );
2015548: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
201554c: 9f c0 40 00 call %g1
2015550: 90 10 00 18 mov %i0, %o0
if ( status == (off_t) -1 )
2015554: 80 a2 3f ff cmp %o0, -1
2015558: 22 80 00 02 be,a 2015560 <lseek+0x98>
201555c: f4 26 20 08 st %i2, [ %i0 + 8 ]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
2015560: 81 c7 e0 08 ret
2015564: 91 e8 00 08 restore %g0, %o0, %o0
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
2015568: c2 06 20 04 ld [ %i0 + 4 ], %g1
201556c: 82 06 40 01 add %i1, %g1, %g1
2015570: 10 bf ff f6 b 2015548 <lseek+0x80>
2015574: c2 26 20 08 st %g1, [ %i0 + 8 ]
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2015578: 7f ff e1 66 call 200db10 <__errno>
201557c: 01 00 00 00 nop
2015580: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2015584: c2 22 00 00 st %g1, [ %o0 ]
2015588: 90 10 3f ff mov -1, %o0
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
201558c: 81 c7 e0 08 ret
2015590: 91 e8 00 08 restore %g0, %o0, %o0
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
2015594: 82 06 40 1a add %i1, %i2, %g1
2015598: 10 bf ff ec b 2015548 <lseek+0x80>
201559c: c2 26 20 08 st %g1, [ %i0 + 8 ]
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
20155a0: 7f ff e1 5c call 200db10 <__errno> <== NOT EXECUTED
20155a4: 01 00 00 00 nop <== NOT EXECUTED
20155a8: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
20155ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20155b0: 10 bf ff ec b 2015560 <lseek+0x98> <== NOT EXECUTED
20155b4: 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 );
20155b8: 7f ff e1 56 call 200db10 <__errno> <== NOT EXECUTED
20155bc: 01 00 00 00 nop <== NOT EXECUTED
20155c0: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
20155c4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20155c8: 10 bf ff e6 b 2015560 <lseek+0x98> <== NOT EXECUTED
20155cc: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
0200afc4 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
200afc4: 9d e3 bf 98 save %sp, -104, %sp
200afc8: 05 00 80 60 sethi %hi(0x2018000), %g2
200afcc: 84 10 a1 98 or %g2, 0x198, %g2 ! 2018198 <rtems_malloc_statistics>
200afd0: c2 00 a0 04 ld [ %g2 + 4 ], %g1
200afd4: a2 10 00 18 mov %i0, %l1
200afd8: 82 00 60 01 inc %g1
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
200afdc: 7f ff ff ed call 200af90 <malloc_deferred_frees_process>
200afe0: c2 20 a0 04 st %g1, [ %g2 + 4 ]
/*
* Validate the parameters
*/
if ( !size )
200afe4: 80 a6 20 00 cmp %i0, 0
200afe8: 02 80 00 23 be 200b074 <malloc+0xb0>
200afec: 03 00 80 61 sethi %hi(0x2018400), %g1
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200aff0: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 ! 20184b4 <_System_state_Current>
200aff4: 80 a0 a0 03 cmp %g2, 3
200aff8: 02 80 00 1a be 200b060 <malloc+0x9c>
200affc: 11 00 80 60 sethi %hi(0x2018000), %o0
* Try to give a segment in the current heap if there is not
* enough space then try to grow the heap.
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
200b000: 92 10 00 11 mov %l1, %o1
200b004: 40 00 05 6d call 200c5b8 <_Protected_heap_Allocate>
200b008: 90 12 21 40 or %o0, 0x140, %o0
if ( !return_this ) {
200b00c: b0 92 20 00 orcc %o0, 0, %i0
200b010: 02 80 00 1b be 200b07c <malloc+0xb8> <== NEVER TAKEN
200b014: a0 10 00 18 mov %i0, %l0
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
200b018: 03 00 80 5f sethi %hi(0x2017c00), %g1
200b01c: c2 00 62 9c ld [ %g1 + 0x29c ], %g1 ! 2017e9c <rtems_malloc_dirty_helper>
200b020: 80 a0 60 00 cmp %g1, 0
200b024: 02 80 00 04 be 200b034 <malloc+0x70> <== ALWAYS TAKEN
200b028: 92 10 00 11 mov %l1, %o1
(*rtems_malloc_dirty_helper)( return_this, size );
200b02c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b030: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
200b034: 03 00 80 5f sethi %hi(0x2017c00), %g1
200b038: c2 00 62 94 ld [ %g1 + 0x294 ], %g1 ! 2017e94 <rtems_malloc_statistics_helpers>
200b03c: 80 a0 60 00 cmp %g1, 0
200b040: 02 80 00 06 be 200b058 <malloc+0x94> <== ALWAYS TAKEN
200b044: b0 10 00 10 mov %l0, %i0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
200b048: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200b04c: b0 10 00 10 mov %l0, %i0 <== NOT EXECUTED
200b050: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b054: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200b058: 81 c7 e0 08 ret
200b05c: 81 e8 00 00 restore
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
200b060: 7f ff ff b2 call 200af28 <malloc_is_system_state_OK>
200b064: 01 00 00 00 nop
200b068: 80 8a 20 ff btst 0xff, %o0
200b06c: 12 bf ff e5 bne 200b000 <malloc+0x3c> <== ALWAYS TAKEN
200b070: 11 00 80 60 sethi %hi(0x2018000), %o0
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
200b074: 81 c7 e0 08 ret
200b078: 91 e8 20 00 restore %g0, 0, %o0
*/
return_this = _Protected_heap_Allocate( &RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
200b07c: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
200b080: c2 00 62 98 ld [ %g1 + 0x298 ], %g1 ! 2017e98 <rtems_malloc_sbrk_helpers><== NOT EXECUTED
200b084: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200b088: 02 80 00 08 be 200b0a8 <malloc+0xe4> <== NOT EXECUTED
200b08c: 01 00 00 00 nop <== NOT EXECUTED
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
200b090: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
200b094: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b098: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
if ( !return_this ) {
200b09c: a0 92 20 00 orcc %o0, 0, %l0 <== NOT EXECUTED
200b0a0: 12 bf ff df bne 200b01c <malloc+0x58> <== NOT EXECUTED
200b0a4: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
errno = ENOMEM;
200b0a8: 40 00 0a 9a call 200db10 <__errno> <== NOT EXECUTED
200b0ac: 01 00 00 00 nop <== NOT EXECUTED
200b0b0: 82 10 20 0c mov 0xc, %g1 ! c <PROM_START+0xc> <== NOT EXECUTED
200b0b4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b0b8: 81 c7 e0 08 ret <== NOT EXECUTED
200b0bc: 81 e8 00 00 restore <== NOT EXECUTED
0200af74 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
200af74: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200af78: 11 00 80 62 sethi %hi(0x2018800), %o0 <== NOT EXECUTED
200af7c: 90 12 20 c8 or %o0, 0xc8, %o0 ! 20188c8 <RTEMS_Malloc_GC_list><== NOT EXECUTED
200af80: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
200af84: 7f ff ed 0e call 20063bc <_Chain_Append> <== NOT EXECUTED
200af88: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200af90 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
200af90: 9d e3 bf 98 save %sp, -104, %sp
200af94: 03 00 80 62 sethi %hi(0x2018800), %g1
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
200af98: 10 80 00 04 b 200afa8 <malloc_deferred_frees_process+0x18>
200af9c: a0 10 60 c8 or %g1, 0xc8, %l0 ! 20188c8 <RTEMS_Malloc_GC_list>
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
free(to_be_freed);
200afa0: 7f ff fe 8a call 200a9c8 <free> <== NOT EXECUTED
200afa4: 01 00 00 00 nop <== NOT EXECUTED
200afa8: 40 00 04 16 call 200c000 <_Chain_Get>
200afac: 90 10 00 10 mov %l0, %o0
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
200afb0: 80 a2 20 00 cmp %o0, 0
200afb4: 12 bf ff fb bne 200afa0 <malloc_deferred_frees_process+0x10><== NEVER TAKEN
200afb8: 01 00 00 00 nop
free(to_be_freed);
}
200afbc: 81 c7 e0 08 ret
200afc0: 81 e8 00 00 restore
0200af28 <malloc_is_system_state_OK>:
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
200af28: 03 00 80 60 sethi %hi(0x2018000), %g1
200af2c: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 2018310 <_Thread_Dispatch_disable_level>
200af30: 80 a0 a0 00 cmp %g2, 0
200af34: 12 80 00 07 bne 200af50 <malloc_is_system_state_OK+0x28> <== NEVER TAKEN
200af38: 90 10 20 00 clr %o0
return false;
if ( _ISR_Nest_level > 0 )
200af3c: 03 00 80 60 sethi %hi(0x2018000), %g1
200af40: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 20183b0 <_ISR_Nest_level>
200af44: 80 a0 00 02 cmp %g0, %g2
200af48: 82 60 3f ff subx %g0, -1, %g1
200af4c: 90 10 00 01 mov %g1, %o0
return false;
return true;
}
200af50: 81 c3 e0 08 retl
0200e5ec <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
200e5ec: 9d e3 bf 98 save %sp, -104, %sp
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
200e5f0: 03 00 80 5f sethi %hi(0x2017c00), %g1
200e5f4: d2 00 62 9c ld [ %g1 + 0x29c ], %o1 ! 2017e9c <imfs_memfile_bytes_per_block>
200e5f8: 7f ff d1 e8 call 2002d98 <calloc>
200e5fc: 90 10 20 01 mov 1, %o0
if ( memory )
200e600: 80 a2 20 00 cmp %o0, 0
200e604: 02 80 00 05 be 200e618 <memfile_alloc_block+0x2c> <== NEVER TAKEN
200e608: 05 00 80 5f sethi %hi(0x2017c00), %g2
memfile_blocks_allocated++;
200e60c: c2 00 a3 a8 ld [ %g2 + 0x3a8 ], %g1 ! 2017fa8 <memfile_blocks_allocated>
200e610: 82 00 60 01 inc %g1
200e614: c2 20 a3 a8 st %g1, [ %g2 + 0x3a8 ]
return memory;
}
200e618: 81 c7 e0 08 ret
200e61c: 91 e8 00 08 restore %g0, %o0, %o0
0200eb54 <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
200eb54: 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) ) {
200eb58: 7f ff d3 ac call 2003a08 <rtems_libio_is_file_open>
200eb5c: 90 10 00 18 mov %i0, %o0
200eb60: 80 a2 20 00 cmp %o0, 0
200eb64: 12 80 00 13 bne 200ebb0 <memfile_check_rmnod+0x5c>
200eb68: 01 00 00 00 nop
200eb6c: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1
200eb70: 80 a0 60 00 cmp %g1, 0
200eb74: 12 80 00 0f bne 200ebb0 <memfile_check_rmnod+0x5c> <== NEVER TAKEN
200eb78: 03 00 80 5e sethi %hi(0x2017800), %g1
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
200eb7c: c2 00 61 24 ld [ %g1 + 0x124 ], %g1 ! 2017924 <rtems_current_user_env>
200eb80: c4 00 60 04 ld [ %g1 + 4 ], %g2
200eb84: 80 a0 80 18 cmp %g2, %i0
200eb88: 22 80 00 02 be,a 200eb90 <memfile_check_rmnod+0x3c> <== NEVER TAKEN
200eb8c: 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)
200eb90: c2 06 20 48 ld [ %i0 + 0x48 ], %g1
200eb94: 80 a0 60 06 cmp %g1, 6
200eb98: 02 80 00 04 be 200eba8 <memfile_check_rmnod+0x54> <== NEVER TAKEN
200eb9c: 01 00 00 00 nop
IMFS_memfile_remove( the_jnode );
200eba0: 7f ff ff 7d call 200e994 <IMFS_memfile_remove>
200eba4: 90 10 00 18 mov %i0, %o0
free( the_jnode );
200eba8: 7f ff d2 8a call 20035d0 <free>
200ebac: 90 10 00 18 mov %i0, %o0
}
return 0;
}
200ebb0: 81 c7 e0 08 ret
200ebb4: 91 e8 20 00 restore %g0, 0, %o0
0200e910 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
200e910: 9d e3 bf 98 save %sp, -104, %sp
/*
* Perform internal consistency checks
*/
assert( block_table );
200e914: 80 a6 20 00 cmp %i0, 0
200e918: 02 80 00 16 be 200e970 <memfile_free_blocks_in_table+0x60><== NEVER TAKEN
200e91c: 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<entries ; i++ ) {
200e920: 04 80 00 0f ble 200e95c <memfile_free_blocks_in_table+0x4c><== NEVER TAKEN
200e924: d0 06 00 00 ld [ %i0 ], %o0
200e928: a0 10 00 08 mov %o0, %l0
200e92c: a2 10 20 00 clr %l1
if ( b[i] ) {
200e930: d0 04 00 00 ld [ %l0 ], %o0
200e934: 80 a2 20 00 cmp %o0, 0
200e938: 02 80 00 05 be 200e94c <memfile_free_blocks_in_table+0x3c>
200e93c: a2 04 60 01 inc %l1
memfile_free_block( b[i] );
200e940: 7f ff ff 22 call 200e5c8 <memfile_free_block>
200e944: 01 00 00 00 nop
b[i] = 0;
200e948: c0 24 00 00 clr [ %l0 ]
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
200e94c: 80 a6 40 11 cmp %i1, %l1
200e950: 14 bf ff f8 bg 200e930 <memfile_free_blocks_in_table+0x20>
200e954: a0 04 20 04 add %l0, 4, %l0
200e958: d0 06 00 00 ld [ %i0 ], %o0
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
200e95c: 7f ff ff 1b call 200e5c8 <memfile_free_block>
200e960: 01 00 00 00 nop
*block_table = 0;
200e964: c0 26 00 00 clr [ %i0 ]
}
200e968: 81 c7 e0 08 ret
200e96c: 81 e8 00 00 restore
/*
* Perform internal consistency checks
*/
assert( block_table );
200e970: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200e974: 15 00 80 5b sethi %hi(0x2016c00), %o2 <== NOT EXECUTED
200e978: 17 00 80 5b sethi %hi(0x2016c00), %o3 <== NOT EXECUTED
200e97c: 90 12 20 78 or %o0, 0x78, %o0 <== NOT EXECUTED
200e980: 94 12 a1 e8 or %o2, 0x1e8, %o2 <== NOT EXECUTED
200e984: 96 12 e1 00 or %o3, 0x100, %o3 <== NOT EXECUTED
200e988: 7f ff d0 ec call 2002d38 <__assert_func> <== NOT EXECUTED
200e98c: 92 10 21 b1 mov 0x1b1, %o1 <== NOT EXECUTED
0200ee34 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
off_t length
)
{
200ee34: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200ee38: 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 )
200ee3c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200ee40: 80 a0 40 19 cmp %g1, %i1
200ee44: 06 80 00 0c bl 200ee74 <memfile_ftruncate+0x40> <== NEVER TAKEN
200ee48: 92 10 00 19 mov %i1, %o1
* 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;
200ee4c: f2 24 20 4c st %i1, [ %l0 + 0x4c ]
iop->size = the_jnode->info.file.size;
200ee50: f2 26 20 04 st %i1, [ %i0 + 4 ]
IMFS_update_atime( the_jnode );
200ee54: 90 07 bf f0 add %fp, -16, %o0
200ee58: 7f ff d2 7f call 2003854 <gettimeofday>
200ee5c: 92 10 20 00 clr %o1
200ee60: c2 07 bf f0 ld [ %fp + -16 ], %g1
200ee64: 90 10 20 00 clr %o0
200ee68: c2 24 20 3c st %g1, [ %l0 + 0x3c ]
return 0;
}
200ee6c: 81 c7 e0 08 ret
200ee70: 91 e8 00 08 restore %g0, %o0, %o0
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
return IMFS_memfile_extend( the_jnode, length );
200ee74: 7f ff ff 9b call 200ece0 <IMFS_memfile_extend> <== NOT EXECUTED
200ee78: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
200ee7c: 81 c7 e0 08 ret <== NOT EXECUTED
200ee80: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
0200ee84 <memfile_lseek>:
off_t memfile_lseek(
rtems_libio_t *iop,
off_t offset,
int whence
)
{
200ee84: 9d e3 bf 98 save %sp, -104, %sp
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
200ee88: e0 06 20 2c ld [ %i0 + 0x2c ], %l0
if (the_jnode->type == IMFS_LINEAR_FILE) {
200ee8c: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200ee90: 80 a0 60 06 cmp %g1, 6
200ee94: 12 80 00 0a bne 200eebc <memfile_lseek+0x38> <== ALWAYS TAKEN
200ee98: a2 10 00 18 mov %i0, %l1
if (iop->offset > the_jnode->info.linearfile.size)
200ee9c: d0 04 20 4c ld [ %l0 + 0x4c ], %o0 <== NOT EXECUTED
200eea0: f0 06 20 08 ld [ %i0 + 8 ], %i0 <== NOT EXECUTED
200eea4: 80 a6 00 08 cmp %i0, %o0 <== NOT EXECUTED
200eea8: 04 80 00 14 ble 200eef8 <memfile_lseek+0x74> <== NOT EXECUTED
200eeac: 01 00 00 00 nop <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
200eeb0: d0 24 60 08 st %o0, [ %l1 + 8 ] <== NOT EXECUTED
200eeb4: 81 c7 e0 08 ret <== NOT EXECUTED
200eeb8: 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 ))
200eebc: d2 06 20 08 ld [ %i0 + 8 ], %o1
200eec0: 7f ff ff 88 call 200ece0 <IMFS_memfile_extend>
200eec4: 90 10 00 10 mov %l0, %o0
200eec8: 80 a2 20 00 cmp %o0, 0
200eecc: 12 80 00 07 bne 200eee8 <memfile_lseek+0x64> <== NEVER TAKEN
200eed0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
200eed4: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200eed8: f0 06 20 08 ld [ %i0 + 8 ], %i0
200eedc: c2 24 60 04 st %g1, [ %l1 + 4 ]
}
return iop->offset;
}
200eee0: 81 c7 e0 08 ret
200eee4: 81 e8 00 00 restore
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
200eee8: 40 00 05 a1 call 201056c <__errno> <== NOT EXECUTED
200eeec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200eef0: 82 10 20 1c mov 0x1c, %g1 <== NOT EXECUTED
200eef4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200eef8: 81 c7 e0 08 ret <== NOT EXECUTED
200eefc: 81 e8 00 00 restore <== NOT EXECUTED
0200f1c0 <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200f1c0: 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))
200f1c4: c4 06 20 0c ld [ %i0 + 0xc ], %g2
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
200f1c8: 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))
200f1cc: 80 88 a2 04 btst 0x204, %g2
200f1d0: 02 80 00 06 be 200f1e8 <memfile_open+0x28>
200f1d4: e0 06 20 2c ld [ %i0 + 0x2c ], %l0
200f1d8: c2 04 20 48 ld [ %l0 + 0x48 ], %g1
200f1dc: 80 a0 60 06 cmp %g1, 6
200f1e0: 22 80 00 0b be,a 200f20c <memfile_open+0x4c> <== NEVER TAKEN
200f1e4: 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)
200f1e8: 80 88 a2 00 btst 0x200, %g2
200f1ec: 02 80 00 04 be 200f1fc <memfile_open+0x3c>
200f1f0: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
iop->offset = the_jnode->info.file.size;
200f1f4: c2 24 60 08 st %g1, [ %l1 + 8 ]
iop->size = the_jnode->info.file.size;
200f1f8: c2 04 20 4c ld [ %l0 + 0x4c ], %g1
200f1fc: b0 10 20 00 clr %i0
200f200: c2 24 60 04 st %g1, [ %l1 + 4 ]
return 0;
}
200f204: 81 c7 e0 08 ret
200f208: 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;
200f20c: d4 04 20 50 ld [ %l0 + 0x50 ], %o2 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
200f210: 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;
200f214: 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;
200f218: 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;
200f21c: 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;
200f220: 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)
200f224: 80 a2 e0 00 cmp %o3, 0 <== NOT EXECUTED
200f228: 12 80 00 08 bne 200f248 <memfile_open+0x88> <== NOT EXECUTED
200f22c: c2 24 20 48 st %g1, [ %l0 + 0x48 ] <== NOT EXECUTED
200f230: 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)
200f234: 80 88 a2 00 btst 0x200, %g2 <== NOT EXECUTED
200f238: 02 bf ff f1 be 200f1fc <memfile_open+0x3c> <== NOT EXECUTED
200f23c: c2 04 20 4c ld [ %l0 + 0x4c ], %g1 <== NOT EXECUTED
iop->offset = the_jnode->info.file.size;
200f240: 10 bf ff ee b 200f1f8 <memfile_open+0x38> <== NOT EXECUTED
200f244: 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)
200f248: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200f24c: 92 10 20 00 clr %o1 <== NOT EXECUTED
200f250: 7f ff ff 2c call 200ef00 <IMFS_memfile_write> <== NOT EXECUTED
200f254: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200f258: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
200f25c: 02 bf ff ea be 200f204 <memfile_open+0x44> <== NOT EXECUTED
200f260: 01 00 00 00 nop <== NOT EXECUTED
200f264: 10 bf ff f4 b 200f234 <memfile_open+0x74> <== NOT EXECUTED
200f268: c4 04 60 0c ld [ %l1 + 0xc ], %g2 <== NOT EXECUTED
0200ebb8 <memfile_rmnod>:
*/
int memfile_rmnod(
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
200ebb8: 9d e3 bf 90 save %sp, -112, %sp
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
200ebbc: 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 ) {
200ebc0: c2 06 20 08 ld [ %i0 + 8 ], %g1
200ebc4: 80 a0 60 00 cmp %g1, 0
200ebc8: 22 80 00 06 be,a 200ebe0 <memfile_rmnod+0x28> <== NEVER TAKEN
200ebcc: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1 <== NOT EXECUTED
200ebd0: 7f ff fb b0 call 200da90 <_Chain_Extract>
200ebd4: 90 10 00 18 mov %i0, %o0
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
200ebd8: c0 26 20 08 clr [ %i0 + 8 ]
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200ebdc: c2 16 20 30 lduh [ %i0 + 0x30 ], %g1
IMFS_update_ctime( the_jnode );
200ebe0: 92 10 20 00 clr %o1
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
200ebe4: 82 00 7f ff add %g1, -1, %g1
IMFS_update_ctime( the_jnode );
200ebe8: 90 07 bf f0 add %fp, -16, %o0
200ebec: 7f ff d3 1a call 2003854 <gettimeofday>
200ebf0: c2 36 20 30 sth %g1, [ %i0 + 0x30 ]
200ebf4: c2 07 bf f0 ld [ %fp + -16 ], %g1
return memfile_check_rmnod( the_jnode );
200ebf8: 90 10 00 18 mov %i0, %o0
200ebfc: 7f ff ff d6 call 200eb54 <memfile_check_rmnod>
200ec00: c2 26 20 44 st %g1, [ %i0 + 0x44 ]
}
200ec04: 81 c7 e0 08 ret
200ec08: 91 e8 00 08 restore %g0, %o0, %o0
02002364 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2002364: 9d e3 bf 80 save %sp, -128, %sp
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
2002368: 03 00 00 3c sethi %hi(0xf000), %g1
200236c: b3 2e 60 10 sll %i1, 0x10, %i1
2002370: b3 36 60 10 srl %i1, 0x10, %i1
2002374: 84 0e 40 01 and %i1, %g1, %g2
2002378: 03 00 00 10 sethi %hi(0x4000), %g1
200237c: 80 a0 80 01 cmp %g2, %g1
2002380: 02 80 00 17 be 20023dc <mknod+0x78>
2002384: 03 00 00 04 sethi %hi(0x1000), %g1
2002388: 04 80 00 0f ble 20023c4 <mknod+0x60>
200238c: 80 a0 80 01 cmp %g2, %g1
2002390: 03 00 00 18 sethi %hi(0x6000), %g1
2002394: 80 a0 80 01 cmp %g2, %g1
2002398: 02 80 00 10 be 20023d8 <mknod+0x74> <== NEVER TAKEN
200239c: 03 00 00 20 sethi %hi(0x8000), %g1
20023a0: 80 a0 80 01 cmp %g2, %g1
20023a4: 02 80 00 0e be 20023dc <mknod+0x78> <== ALWAYS TAKEN
20023a8: 03 00 00 04 sethi %hi(0x1000), %g1
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
20023ac: 40 00 2d d9 call 200db10 <__errno> <== NOT EXECUTED
20023b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20023b4: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
20023b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20023bc: 81 c7 e0 08 ret
20023c0: 81 e8 00 00 restore
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT) {
20023c4: 02 80 00 05 be 20023d8 <mknod+0x74>
20023c8: 03 00 00 08 sethi %hi(0x2000), %g1
20023cc: 80 a0 80 01 cmp %g2, %g1
20023d0: 12 bf ff f7 bne 20023ac <mknod+0x48> <== NEVER TAKEN
20023d4: 01 00 00 00 nop
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( S_ISFIFO(mode) )
20023d8: 03 00 00 04 sethi %hi(0x1000), %g1
20023dc: 80 a0 80 01 cmp %g2, %g1
20023e0: 02 80 00 18 be 2002440 <mknod+0xdc>
20023e4: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
20023e8: c2 4e 00 00 ldsb [ %i0 ], %g1
20023ec: 80 a0 60 2f cmp %g1, 0x2f
20023f0: 02 80 00 1a be 2002458 <mknod+0xf4>
20023f4: 80 a0 60 5c cmp %g1, 0x5c
20023f8: 02 80 00 18 be 2002458 <mknod+0xf4> <== NEVER TAKEN
20023fc: 80 a0 60 00 cmp %g1, 0
2002400: 02 80 00 17 be 200245c <mknod+0xf8> <== NEVER TAKEN
2002404: 03 00 80 5e sethi %hi(0x2017800), %g1
2002408: c6 00 61 54 ld [ %g1 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
200240c: 88 10 20 00 clr %g4
2002410: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2002414: c2 27 bf e4 st %g1, [ %fp + -28 ]
2002418: c4 00 e0 08 ld [ %g3 + 8 ], %g2
200241c: c4 27 bf e8 st %g2, [ %fp + -24 ]
2002420: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
2002424: c2 27 bf ec st %g1, [ %fp + -20 ]
if ( !temp_loc.ops->evalformake_h ) {
2002428: c2 07 bf ec ld [ %fp + -20 ], %g1
}
if ( S_ISFIFO(mode) )
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
200242c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
if ( !temp_loc.ops->evalformake_h ) {
2002430: c2 00 60 04 ld [ %g1 + 4 ], %g1
2002434: 80 a0 60 00 cmp %g1, 0
2002438: 12 80 00 17 bne 2002494 <mknod+0x130> <== ALWAYS TAKEN
200243c: 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 );
2002440: 40 00 2d b4 call 200db10 <__errno>
2002444: b0 10 3f ff mov -1, %i0
2002448: 82 10 20 86 mov 0x86, %g1
200244c: c2 22 00 00 st %g1, [ %o0 ]
2002450: 81 c7 e0 08 ret
2002454: 81 e8 00 00 restore
}
if ( S_ISFIFO(mode) )
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2002458: 03 00 80 5e sethi %hi(0x2017800), %g1
200245c: c6 00 61 54 ld [ %g1 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
2002460: 88 10 20 01 mov 1, %g4
2002464: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
2002468: c2 27 bf e4 st %g1, [ %fp + -28 ]
200246c: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2
2002470: c4 27 bf e8 st %g2, [ %fp + -24 ]
2002474: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
2002478: c2 27 bf ec st %g1, [ %fp + -20 ]
if ( !temp_loc.ops->evalformake_h ) {
200247c: c2 07 bf ec ld [ %fp + -20 ], %g1
}
if ( S_ISFIFO(mode) )
rtems_set_errno_and_return_minus_one( ENOTSUP );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
2002480: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2
if ( !temp_loc.ops->evalformake_h ) {
2002484: c2 00 60 04 ld [ %g1 + 4 ], %g1
2002488: 80 a0 60 00 cmp %g1, 0
200248c: 02 bf ff ed be 2002440 <mknod+0xdc> <== NEVER TAKEN
2002490: c4 27 bf f0 st %g2, [ %fp + -16 ]
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
2002494: 90 06 00 04 add %i0, %g4, %o0
2002498: a0 07 bf e4 add %fp, -28, %l0
200249c: 94 07 bf f4 add %fp, -12, %o2
20024a0: 92 10 00 10 mov %l0, %o1
20024a4: 9f c0 40 00 call %g1
20024a8: b0 10 3f ff mov -1, %i0
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
20024ac: 80 a2 20 00 cmp %o0, 0
20024b0: 12 bf ff c3 bne 20023bc <mknod+0x58>
20024b4: c2 07 bf ec ld [ %fp + -20 ], %g1
return -1;
if ( !temp_loc.ops->mknod_h ) {
20024b8: c4 00 60 14 ld [ %g1 + 0x14 ], %g2
20024bc: 80 a0 a0 00 cmp %g2, 0
20024c0: 02 80 00 13 be 200250c <mknod+0x1a8> <== NEVER TAKEN
20024c4: 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 );
20024c8: 92 10 00 19 mov %i1, %o1
20024cc: 94 10 00 1a mov %i2, %o2
20024d0: 96 10 00 1b mov %i3, %o3
20024d4: 9f c0 80 00 call %g2
20024d8: 98 10 00 10 mov %l0, %o4
rtems_filesystem_freenode( &temp_loc );
20024dc: c2 07 bf ec ld [ %fp + -20 ], %g1
20024e0: 80 a0 60 00 cmp %g1, 0
20024e4: 02 bf ff b6 be 20023bc <mknod+0x58> <== NEVER TAKEN
20024e8: b0 10 00 08 mov %o0, %i0
20024ec: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20024f0: 80 a0 60 00 cmp %g1, 0
20024f4: 02 80 00 04 be 2002504 <mknod+0x1a0>
20024f8: 01 00 00 00 nop
20024fc: 9f c0 40 00 call %g1
2002500: 90 10 00 10 mov %l0, %o0
return result;
}
2002504: 81 c7 e0 08 ret
2002508: 81 e8 00 00 restore
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
200250c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2002510: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002514: 02 bf ff cb be 2002440 <mknod+0xdc> <== NOT EXECUTED
2002518: 01 00 00 00 nop <== NOT EXECUTED
200251c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002520: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2002524: 30 bf ff c7 b,a 2002440 <mknod+0xdc> <== NOT EXECUTED
0200b108 <mount>:
const rtems_filesystem_operations_table *fs_ops,
rtems_filesystem_options_t options,
const char *device,
const char *mount_point
)
{
200b108: 9d e3 bf 88 save %sp, -120, %sp
/*
* Is there a file system operations table?
*/
if ( fs_ops == NULL ) {
200b10c: 80 a6 60 00 cmp %i1, 0
200b110: 02 80 00 a1 be 200b394 <mount+0x28c>
200b114: a4 10 00 18 mov %i0, %l2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
200b118: 80 a6 a0 01 cmp %i2, 1
200b11c: 18 80 00 9e bgu 200b394 <mount+0x28c>
200b120: 01 00 00 00 nop
errno = EINVAL;
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
200b124: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
200b128: 80 a0 60 00 cmp %g1, 0
200b12c: 02 80 00 35 be 200b200 <mount+0xf8> <== NEVER TAKEN
200b130: 80 a6 e0 00 cmp %i3, 0
/*
* Allocate a mount table entry
*/
size = sizeof(rtems_filesystem_mount_table_entry_t);
if ( device )
200b134: 02 80 00 05 be 200b148 <mount+0x40> <== ALWAYS TAKEN
200b138: 90 10 20 64 mov 0x64, %o0
size += strlen( device ) + 1;
200b13c: 40 00 0f 97 call 200ef98 <strlen> <== NOT EXECUTED
200b140: 90 10 00 1b mov %i3, %o0 <== NOT EXECUTED
200b144: 90 02 20 65 add %o0, 0x65, %o0 <== NOT EXECUTED
temp_mt_entry = malloc( size );
200b148: 7f ff ff 9f call 200afc4 <malloc>
200b14c: 01 00 00 00 nop
if ( !temp_mt_entry ) {
200b150: a0 92 20 00 orcc %o0, 0, %l0
200b154: 02 80 00 96 be 200b3ac <mount+0x2a4> <== NEVER TAKEN
200b158: a2 10 00 10 mov %l0, %l1
errno = ENOMEM;
return -1;
}
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
temp_mt_entry->options = options;
200b15c: f4 24 20 28 st %i2, [ %l0 + 0x28 ]
if ( device ) {
200b160: 80 a6 e0 00 cmp %i3, 0
200b164: 02 80 00 4b be 200b290 <mount+0x188> <== ALWAYS TAKEN
200b168: e0 24 20 24 st %l0, [ %l0 + 0x24 ]
temp_mt_entry->dev =
200b16c: 90 04 20 64 add %l0, 0x64, %o0 <== NOT EXECUTED
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
strcpy( temp_mt_entry->dev, device );
200b170: 92 10 00 1b mov %i3, %o1 <== NOT EXECUTED
200b174: 40 00 0f 67 call 200ef10 <strcpy> <== NOT EXECUTED
200b178: d0 24 20 60 st %o0, [ %l0 + 0x60 ] <== NOT EXECUTED
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( mount_point ) {
200b17c: 80 a7 20 00 cmp %i4, 0
200b180: 02 80 00 29 be 200b224 <mount+0x11c>
200b184: 90 10 00 1c mov %i4, %o0
if ( rtems_filesystem_evaluate_path(
200b188: b6 07 bf e8 add %fp, -24, %i3
200b18c: 92 10 20 07 mov 7, %o1
200b190: 94 10 00 1b mov %i3, %o2
200b194: 7f ff db b3 call 2002060 <rtems_filesystem_evaluate_path>
200b198: 96 10 20 01 mov 1, %o3
200b19c: 80 a2 3f ff cmp %o0, -1
200b1a0: 02 80 00 1c be 200b210 <mount+0x108> <== NEVER TAKEN
200b1a4: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
200b1a8: c2 00 60 10 ld [ %g1 + 0x10 ], %g1
200b1ac: 80 a0 60 00 cmp %g1, 0
200b1b0: 02 80 00 6d be 200b364 <mount+0x25c> <== NEVER TAKEN
200b1b4: 01 00 00 00 nop
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
200b1b8: 9f c0 40 00 call %g1
200b1bc: 90 10 00 1b mov %i3, %o0
200b1c0: 80 a2 20 01 cmp %o0, 1
200b1c4: 02 80 00 35 be 200b298 <mount+0x190>
200b1c8: 03 00 80 62 sethi %hi(0x2018800), %g1
errno = ENOTDIR;
200b1cc: 40 00 0a 51 call 200db10 <__errno>
200b1d0: 01 00 00 00 nop
200b1d4: 82 10 20 14 mov 0x14, %g1 ! 14 <PROM_START+0x14>
200b1d8: c2 22 00 00 st %g1, [ %o0 ]
return 0;
cleanup_and_bail:
free( temp_mt_entry );
200b1dc: 90 10 00 10 mov %l0, %o0
200b1e0: 7f ff fd fa call 200a9c8 <free>
200b1e4: b8 10 00 1b mov %i3, %i4
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
200b1e8: c2 07 20 08 ld [ %i4 + 8 ], %g1
200b1ec: 80 a0 60 00 cmp %g1, 0
200b1f0: 32 80 00 62 bne,a 200b378 <mount+0x270> <== ALWAYS TAKEN
200b1f4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
return -1;
}
200b1f8: 81 c7 e0 08 ret <== NOT EXECUTED
200b1fc: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
return -1;
}
/* Do they support being mounted at all ? */
if ( !fs_ops->fsmount_me_h ) {
errno = ENOTSUP;
200b200: 40 00 0a 44 call 200db10 <__errno> <== NOT EXECUTED
200b204: a2 10 20 00 clr %l1 <== NOT EXECUTED
200b208: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200b20c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
200b210: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
200b214: 7f ff fd ed call 200a9c8 <free> <== NOT EXECUTED
200b218: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b21c: 81 c7 e0 08 ret <== NOT EXECUTED
200b220: 81 e8 00 00 restore <== 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;
200b224: c0 24 20 18 clr [ %l0 + 0x18 ]
temp_mt_entry->mt_fs_root.handlers = NULL;
200b228: c0 24 20 1c clr [ %l0 + 0x1c ]
temp_mt_entry->mt_fs_root.ops = NULL;
200b22c: c0 24 20 20 clr [ %l0 + 0x20 ]
temp_mt_entry->mt_point_node.node_access = NULL;
200b230: c0 24 20 08 clr [ %l0 + 8 ]
temp_mt_entry->mt_point_node.handlers = NULL;
200b234: c0 24 20 0c clr [ %l0 + 0xc ]
temp_mt_entry->mt_point_node.ops = NULL;
200b238: c0 24 20 10 clr [ %l0 + 0x10 ]
temp_mt_entry->mt_point_node.mt_entry = NULL;
200b23c: c0 24 20 14 clr [ %l0 + 0x14 ]
200b240: b8 10 20 00 clr %i4
}
if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
200b244: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
200b248: 9f c0 40 00 call %g1
200b24c: 90 10 00 10 mov %l0, %o0
200b250: 80 a2 20 00 cmp %o0, 0
200b254: 02 80 00 35 be 200b328 <mount+0x220> <== ALWAYS TAKEN
200b258: c2 07 bf f0 ld [ %fp + -16 ], %g1
/* try to undo the mount operation */
if ( loc.ops->unmount_h ) {
200b25c: c2 00 60 28 ld [ %g1 + 0x28 ], %g1 <== NOT EXECUTED
200b260: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200b264: 02 80 00 04 be 200b274 <mount+0x16c> <== NOT EXECUTED
200b268: 01 00 00 00 nop <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
200b26c: 9f c0 40 00 call %g1 <== NOT EXECUTED
200b270: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( temp_mt_entry );
200b274: 7f ff fd d5 call 200a9c8 <free> <== NOT EXECUTED
200b278: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if ( loc_to_free )
200b27c: 80 a7 20 00 cmp %i4, 0 <== NOT EXECUTED
200b280: 32 bf ff db bne,a 200b1ec <mount+0xe4> <== NOT EXECUTED
200b284: c2 07 20 08 ld [ %i4 + 8 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
200b288: 81 c7 e0 08 ret <== NOT EXECUTED
200b28c: 91 e8 3f ff restore %g0, -1, %o0 <== 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;
200b290: 10 bf ff bb b 200b17c <mount+0x74>
200b294: c0 24 20 60 clr [ %l0 + 0x60 ]
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
200b298: c4 00 60 d4 ld [ %g1 + 0xd4 ], %g2
200b29c: 82 10 60 d4 or %g1, 0xd4, %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
200b2a0: 88 00 60 04 add %g1, 4, %g4
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
200b2a4: 80 a0 80 04 cmp %g2, %g4
200b2a8: 02 80 00 0e be 200b2e0 <mount+0x1d8> <== NEVER TAKEN
200b2ac: 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 )
200b2b0: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1
200b2b4: 80 a0 40 03 cmp %g1, %g3
200b2b8: 32 80 00 07 bne,a 200b2d4 <mount+0x1cc> <== ALWAYS TAKEN
200b2bc: c4 00 80 00 ld [ %g2 ], %g2
200b2c0: 30 80 00 24 b,a 200b350 <mount+0x248> <== NOT EXECUTED
200b2c4: 80 a0 40 03 cmp %g1, %g3
200b2c8: 02 80 00 22 be 200b350 <mount+0x248>
200b2cc: 01 00 00 00 nop
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
200b2d0: c4 00 80 00 ld [ %g2 ], %g2
/*
* For each mount table entry
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
200b2d4: 80 a0 80 04 cmp %g2, %g4
200b2d8: 32 bf ff fb bne,a 200b2c4 <mount+0x1bc>
200b2dc: 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;
200b2e0: 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;
200b2e4: c6 24 20 08 st %g3, [ %l0 + 8 ]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
200b2e8: 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;
200b2ec: 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 ){
200b2f0: 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;
200b2f4: c4 24 20 0c st %g2, [ %l0 + 0xc ]
temp_mt_entry->mt_point_node.ops = loc.ops;
temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
200b2f8: c6 24 20 14 st %g3, [ %l0 + 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 ){
200b2fc: 80 a1 20 00 cmp %g4, 0
200b300: 02 80 00 19 be 200b364 <mount+0x25c> <== NEVER TAKEN
200b304: c2 24 20 10 st %g1, [ %l0 + 0x10 ]
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( temp_mt_entry ) ) {
200b308: 90 10 00 10 mov %l0, %o0
200b30c: 9f c1 00 00 call %g4
200b310: b8 10 00 1b mov %i3, %i4
200b314: 80 a2 20 00 cmp %o0, 0
200b318: 22 bf ff cc be,a 200b248 <mount+0x140> <== ALWAYS TAKEN
200b31c: c2 06 60 24 ld [ %i1 + 0x24 ], %g1
return 0;
cleanup_and_bail:
free( temp_mt_entry );
200b320: 10 bf ff b0 b 200b1e0 <mount+0xd8> <== NOT EXECUTED
200b324: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
200b328: 11 00 80 62 sethi %hi(0x2018800), %o0
200b32c: 92 10 00 10 mov %l0, %o1
200b330: 7f ff ec 23 call 20063bc <_Chain_Append>
200b334: 90 12 20 d4 or %o0, 0xd4, %o0
*/
rtems_chain_append( &rtems_filesystem_mount_table_control,
&temp_mt_entry->Node );
if ( mt_entry )
200b338: 80 a4 a0 00 cmp %l2, 0
200b33c: 02 bf ff b8 be 200b21c <mount+0x114> <== NEVER TAKEN
200b340: b0 10 20 00 clr %i0
*mt_entry = temp_mt_entry;
200b344: e0 24 80 00 st %l0, [ %l2 ]
200b348: 81 c7 e0 08 ret
200b34c: 81 e8 00 00 restore
/*
* You can only mount one file system onto a single mount point.
*/
if ( Is_node_fs_root( &loc ) ){
errno = EBUSY;
200b350: 40 00 09 f0 call 200db10 <__errno>
200b354: 01 00 00 00 nop
200b358: 82 10 20 10 mov 0x10, %g1 ! 10 <PROM_START+0x10>
200b35c: 10 bf ff a0 b 200b1dc <mount+0xd4>
200b360: c2 22 00 00 st %g1, [ %o0 ]
* 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;
200b364: 40 00 09 eb call 200db10 <__errno> <== NOT EXECUTED
200b368: 01 00 00 00 nop <== NOT EXECUTED
200b36c: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
200b370: 10 bf ff 9b b 200b1dc <mount+0xd4> <== NOT EXECUTED
200b374: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
cleanup_and_bail:
free( temp_mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
200b378: 80 a0 60 00 cmp %g1, 0
200b37c: 02 bf ff a8 be 200b21c <mount+0x114> <== NEVER TAKEN
200b380: b0 10 3f ff mov -1, %i0
200b384: 9f c0 40 00 call %g1
200b388: 90 10 00 1c mov %i4, %o0
200b38c: 81 c7 e0 08 ret
200b390: 81 e8 00 00 restore
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
options != RTEMS_FILESYSTEM_READ_WRITE ) {
errno = EINVAL;
200b394: 40 00 09 df call 200db10 <__errno>
200b398: b0 10 3f ff mov -1, %i0
200b39c: 82 10 20 16 mov 0x16, %g1
200b3a0: c2 22 00 00 st %g1, [ %o0 ]
200b3a4: 81 c7 e0 08 ret
200b3a8: 81 e8 00 00 restore
if ( device )
size += strlen( device ) + 1;
temp_mt_entry = malloc( size );
if ( !temp_mt_entry ) {
errno = ENOMEM;
200b3ac: 40 00 09 d9 call 200db10 <__errno> <== NOT EXECUTED
200b3b0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200b3b4: 82 10 20 0c mov 0xc, %g1 <== NOT EXECUTED
200b3b8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200b3bc: 81 c7 e0 08 ret <== NOT EXECUTED
200b3c0: 81 e8 00 00 restore <== NOT EXECUTED
02009948 <mq_open>:
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
2009948: 9d e3 bf 88 save %sp, -120, %sp
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200994c: 05 00 80 8a sethi %hi(0x2022800), %g2
2009950: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1 ! 2022b00 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
2009954: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2009958: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
200995c: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2009960: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
2009964: 82 00 60 01 inc %g1
int oflag,
...
/* mode_t mode, */
/* struct mq_attr attr */
)
{
2009968: a0 10 00 18 mov %i0, %l0
200996c: c2 20 a3 00 st %g1, [ %g2 + 0x300 ]
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
2009970: b6 8e 62 00 andcc %i1, 0x200, %i3
2009974: 12 80 00 37 bne 2009a50 <mq_open+0x108>
2009978: 39 00 80 8c sethi %hi(0x2023000), %i4
200997c: 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 *)
2009980: 40 00 0c ca call 200cca8 <_Objects_Allocate>
2009984: 90 17 20 0c or %i4, 0xc, %o0
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 ) {
2009988: b0 92 20 00 orcc %o0, 0, %i0
200998c: 02 80 00 39 be 2009a70 <mq_open+0x128> <== NEVER TAKEN
2009990: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( ENFILE );
}
the_mq_fd->oflag = oflag;
2009994: f2 26 20 14 st %i1, [ %i0 + 0x14 ]
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
2009998: 90 10 00 10 mov %l0, %o0
200999c: 40 00 1f a9 call 2011840 <_POSIX_Message_queue_Name_to_id>
20099a0: 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 ) {
20099a4: ba 92 20 00 orcc %o0, 0, %i5
20099a8: 02 80 00 0f be 20099e4 <mq_open+0x9c>
20099ac: 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) ) ) {
20099b0: 80 a7 60 02 cmp %i5, 2
20099b4: 02 80 00 42 be 2009abc <mq_open+0x174>
20099b8: 80 a6 e0 00 cmp %i3, 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 );
20099bc: 92 10 00 18 mov %i0, %o1
20099c0: 40 00 0d b5 call 200d094 <_Objects_Free>
20099c4: 90 17 20 0c or %i4, 0xc, %o0
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
20099c8: 40 00 10 a1 call 200dc4c <_Thread_Enable_dispatch>
20099cc: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, mqd_t );
20099d0: 40 00 2a 5b call 201433c <__errno>
20099d4: 01 00 00 00 nop
20099d8: fa 22 00 00 st %i5, [ %o0 ]
20099dc: 81 c7 e0 08 ret
20099e0: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
20099e4: 80 a0 6a 00 cmp %g1, 0xa00
20099e8: 02 80 00 2a be 2009a90 <mq_open+0x148>
20099ec: d2 07 bf f0 ld [ %fp + -16 ], %o1
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control *)
20099f0: 94 07 bf e8 add %fp, -24, %o2
20099f4: 11 00 80 8b sethi %hi(0x2022c00), %o0
20099f8: 40 00 0e 14 call 200d248 <_Objects_Get>
20099fc: 90 12 22 90 or %o0, 0x290, %o0 ! 2022e90 <_POSIX_Message_queue_Information>
* 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;
2009a00: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2009a04: 86 17 20 0c or %i4, 0xc, %g3
2009a08: 82 00 60 01 inc %g1
2009a0c: c8 00 e0 1c ld [ %g3 + 0x1c ], %g4
2009a10: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
2009a14: c4 06 20 08 ld [ %i0 + 8 ], %g2
/*
* 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 );
2009a18: d0 27 bf ec st %o0, [ %fp + -20 ]
2009a1c: 03 00 00 3f sethi %hi(0xfc00), %g1
2009a20: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2009a24: 84 08 80 01 and %g2, %g1, %g2
2009a28: 85 28 a0 02 sll %g2, 2, %g2
2009a2c: f0 21 00 02 st %i0, [ %g4 + %g2 ]
the_mq->open_count += 1;
the_mq_fd->Queue = the_mq;
2009a30: d0 26 20 10 st %o0, [ %i0 + 0x10 ]
_Objects_Open_string(
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
2009a34: 40 00 10 86 call 200dc4c <_Thread_Enable_dispatch>
2009a38: c0 26 20 0c clr [ %i0 + 0xc ]
_Thread_Enable_dispatch();
2009a3c: 40 00 10 84 call 200dc4c <_Thread_Enable_dispatch>
2009a40: 01 00 00 00 nop
return (mqd_t)the_mq_fd->Object.id;
2009a44: f0 06 20 08 ld [ %i0 + 8 ], %i0
2009a48: 81 c7 e0 08 ret
2009a4c: 81 e8 00 00 restore
_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 * );
2009a50: 82 07 a0 54 add %fp, 0x54, %g1
2009a54: f4 07 a0 50 ld [ %fp + 0x50 ], %i2
2009a58: c2 27 bf f4 st %g1, [ %fp + -12 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *
_POSIX_Message_queue_Allocate_fd( void )
{
return (POSIX_Message_queue_Control_fd *)
2009a5c: 40 00 0c 93 call 200cca8 <_Objects_Allocate>
2009a60: 90 17 20 0c or %i4, 0xc, %o0
va_end(arg);
}
the_mq_fd = _POSIX_Message_queue_Allocate_fd();
if ( !the_mq_fd ) {
2009a64: b0 92 20 00 orcc %o0, 0, %i0
2009a68: 32 bf ff cc bne,a 2009998 <mq_open+0x50>
2009a6c: f2 26 20 14 st %i1, [ %i0 + 0x14 ]
_Thread_Enable_dispatch();
2009a70: 40 00 10 77 call 200dc4c <_Thread_Enable_dispatch>
2009a74: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( ENFILE );
2009a78: 40 00 2a 31 call 201433c <__errno>
2009a7c: 01 00 00 00 nop
2009a80: 82 10 20 17 mov 0x17, %g1 ! 17 <PROM_START+0x17>
2009a84: c2 22 00 00 st %g1, [ %o0 ]
2009a88: 81 c7 e0 08 ret
2009a8c: 81 e8 00 00 restore
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 );
2009a90: 92 10 00 18 mov %i0, %o1
2009a94: 40 00 0d 80 call 200d094 <_Objects_Free>
2009a98: 90 17 20 0c or %i4, 0xc, %o0
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
2009a9c: 40 00 10 6c call 200dc4c <_Thread_Enable_dispatch>
2009aa0: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, mqd_t );
2009aa4: 40 00 2a 26 call 201433c <__errno>
2009aa8: 01 00 00 00 nop
2009aac: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
2009ab0: c2 22 00 00 st %g1, [ %o0 ]
2009ab4: 81 c7 e0 08 ret
2009ab8: 81 e8 00 00 restore
/*
* 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) ) ) {
2009abc: 02 bf ff c1 be 20099c0 <mq_open+0x78>
2009ac0: 92 10 00 18 mov %i0, %o1
/*
* 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(
2009ac4: 90 10 00 10 mov %l0, %o0
2009ac8: 94 10 00 1a mov %i2, %o2
2009acc: 92 10 20 01 mov 1, %o1
2009ad0: 40 00 1e f3 call 201169c <_POSIX_Message_queue_Create_support>
2009ad4: 96 07 bf ec add %fp, -20, %o3
/*
* errno was set by Create_support, so don't set it again.
*/
if ( status == -1 ) {
2009ad8: 80 a2 3f ff cmp %o0, -1
2009adc: 12 80 00 0a bne 2009b04 <mq_open+0x1bc>
2009ae0: 82 17 20 0c or %i4, 0xc, %g1
_Thread_Enable_dispatch();
2009ae4: 40 00 10 5a call 200dc4c <_Thread_Enable_dispatch>
2009ae8: 01 00 00 00 nop
2009aec: 92 10 00 18 mov %i0, %o1
2009af0: 90 17 20 0c or %i4, 0xc, %o0
2009af4: 40 00 0d 68 call 200d094 <_Objects_Free>
2009af8: b0 10 3f ff mov -1, %i0
2009afc: 81 c7 e0 08 ret
2009b00: 81 e8 00 00 restore
2009b04: c4 06 20 08 ld [ %i0 + 8 ], %g2
2009b08: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2009b0c: 03 00 00 3f sethi %hi(0xfc00), %g1
2009b10: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2009b14: 84 08 80 01 and %g2, %g1, %g2
_POSIX_Message_queue_Free_fd( the_mq_fd );
return (mqd_t) -1;
}
the_mq_fd->Queue = the_mq;
2009b18: c2 07 bf ec ld [ %fp + -20 ], %g1
2009b1c: 85 28 a0 02 sll %g2, 2, %g2
2009b20: f0 20 c0 02 st %i0, [ %g3 + %g2 ]
2009b24: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
&_POSIX_Message_queue_Information_fds,
&the_mq_fd->Object,
NULL
);
_Thread_Enable_dispatch();
2009b28: 40 00 10 49 call 200dc4c <_Thread_Enable_dispatch>
2009b2c: c0 26 20 0c clr [ %i0 + 0xc ]
return (mqd_t) the_mq_fd->Object.id;
2009b30: f0 06 20 08 ld [ %i0 + 8 ], %i0
}
2009b34: 81 c7 e0 08 ret
2009b38: 81 e8 00 00 restore
02009ea0 <mq_timedreceive>:
char *msg_ptr,
size_t msg_len,
unsigned int *msg_prio,
const struct timespec *abstime
)
{
2009ea0: 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 ) ) {
2009ea4: 90 10 00 1c mov %i4, %o0
2009ea8: 40 00 00 4c call 2009fd8 <_POSIX_Absolute_timeout_to_ticks>
2009eac: 92 07 bf f4 add %fp, -12, %o1
2009eb0: 80 a2 20 02 cmp %o0, 2
2009eb4: 18 80 00 03 bgu 2009ec0 <mq_timedreceive+0x20> <== ALWAYS TAKEN
2009eb8: 98 10 20 01 mov 1, %o4
2009ebc: 98 10 20 00 clr %o4 <== NOT EXECUTED
default: /* only to silence warnings */
do_wait = TRUE;
break;
}
return _POSIX_Message_queue_Receive_support(
2009ec0: da 07 bf f4 ld [ %fp + -12 ], %o5
2009ec4: 90 10 00 18 mov %i0, %o0
2009ec8: 92 10 00 19 mov %i1, %o1
2009ecc: 94 10 00 1a mov %i2, %o2
2009ed0: 7f ff ff 21 call 2009b54 <_POSIX_Message_queue_Receive_support>
2009ed4: 96 10 00 1b mov %i3, %o3
msg_len,
msg_prio,
do_wait,
ticks
);
}
2009ed8: 81 c7 e0 08 ret
2009edc: 91 e8 00 08 restore %g0, %o0, %o0
02009ee0 <mq_timedsend>:
const char *msg_ptr,
size_t msg_len,
unsigned int msg_prio,
const struct timespec *abstime
)
{
2009ee0: 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 ) ) {
2009ee4: 90 10 00 1c mov %i4, %o0
2009ee8: 40 00 00 3c call 2009fd8 <_POSIX_Absolute_timeout_to_ticks>
2009eec: 92 07 bf f4 add %fp, -12, %o1
2009ef0: 80 a2 20 02 cmp %o0, 2
2009ef4: 18 80 00 03 bgu 2009f00 <mq_timedsend+0x20> <== ALWAYS TAKEN
2009ef8: 98 10 20 01 mov 1, %o4
2009efc: 98 10 20 00 clr %o4 <== NOT EXECUTED
default: /* only to silence warnings */
do_wait = TRUE;
break;
}
return _POSIX_Message_queue_Send_support(
2009f00: da 07 bf f4 ld [ %fp + -12 ], %o5
2009f04: 90 10 00 18 mov %i0, %o0
2009f08: 92 10 00 19 mov %i1, %o1
2009f0c: 94 10 00 1a mov %i2, %o2
2009f10: 7f ff ff 65 call 2009ca4 <_POSIX_Message_queue_Send_support>
2009f14: 96 10 00 1b mov %i3, %o3
msg_len,
msg_prio,
do_wait,
ticks
);
}
2009f18: 81 c7 e0 08 ret
2009f1c: 91 e8 00 08 restore %g0, %o0, %o0
02009f34 <mq_unlink>:
*/
int mq_unlink(
const char *name
)
{
2009f34: 9d e3 bf 90 save %sp, -112, %sp
2009f38: 03 00 80 8a sethi %hi(0x2022800), %g1
2009f3c: c4 00 63 00 ld [ %g1 + 0x300 ], %g2 ! 2022b00 <_Thread_Dispatch_disable_level>
2009f40: 90 10 00 18 mov %i0, %o0
2009f44: 84 00 a0 01 inc %g2
2009f48: c4 20 63 00 st %g2, [ %g1 + 0x300 ]
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 );
2009f4c: 40 00 1e 3d call 2011840 <_POSIX_Message_queue_Name_to_id>
2009f50: 92 07 bf f4 add %fp, -12, %o1
if ( status != 0 ) {
2009f54: b0 92 20 00 orcc %o0, 0, %i0
2009f58: 12 80 00 19 bne 2009fbc <mq_unlink+0x88>
2009f5c: 11 00 80 8b sethi %hi(0x2022c00), %o0
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
2009f60: c6 07 bf f4 ld [ %fp + -12 ], %g3
2009f64: 88 12 22 90 or %o0, 0x290, %g4
2009f68: c2 11 20 10 lduh [ %g4 + 0x10 ], %g1
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
2009f6c: 05 00 00 3f sethi %hi(0xfc00), %g2
2009f70: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
2009f74: 86 08 c0 02 and %g3, %g2, %g3
2009f78: 80 a0 c0 01 cmp %g3, %g1
2009f7c: 18 80 00 05 bgu 2009f90 <mq_unlink+0x5c> <== NEVER TAKEN
2009f80: b0 10 20 00 clr %i0
2009f84: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
2009f88: 83 28 e0 02 sll %g3, 2, %g1
2009f8c: f0 00 80 01 ld [ %g2 + %g1 ], %i0
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Namespace_remove(
2009f90: 92 10 00 18 mov %i0, %o1
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = FALSE;
2009f94: c0 2e 20 15 clrb [ %i0 + 0x15 ]
2009f98: 40 00 0c fe call 200d390 <_Objects_Namespace_remove>
2009f9c: 90 12 22 90 or %o0, 0x290, %o0
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
2009fa0: 90 10 00 18 mov %i0, %o0
2009fa4: 7f ff fd e9 call 2009748 <_POSIX_Message_queue_Delete>
2009fa8: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2009fac: 40 00 0f 28 call 200dc4c <_Thread_Enable_dispatch>
2009fb0: 01 00 00 00 nop
return 0;
}
2009fb4: 81 c7 e0 08 ret
2009fb8: 81 e8 00 00 restore
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
2009fbc: 40 00 0f 24 call 200dc4c <_Thread_Enable_dispatch>
2009fc0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( status );
2009fc4: 40 00 28 de call 201433c <__errno>
2009fc8: 01 00 00 00 nop
2009fcc: f0 22 00 00 st %i0, [ %o0 ]
2009fd0: 81 c7 e0 08 ret
2009fd4: 91 e8 3f ff restore %g0, -1, %o0
0200b9b8 <nanosleep>:
int nanosleep(
const struct timespec *rqtp,
struct timespec *rmtp
)
{
200b9b8: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval ticks;
if ( !_Timespec_Is_valid( rqtp ) )
200b9bc: 40 00 05 ce call 200d0f4 <_Timespec_Is_valid>
200b9c0: 90 10 00 18 mov %i0, %o0
200b9c4: 80 8a 20 ff btst 0xff, %o0
200b9c8: 02 80 00 43 be 200bad4 <nanosleep+0x11c>
200b9cc: 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 )
200b9d0: c2 06 00 00 ld [ %i0 ], %g1
200b9d4: 80 a0 60 00 cmp %g1, 0
200b9d8: 06 80 00 3f bl 200bad4 <nanosleep+0x11c> <== NEVER TAKEN
200b9dc: 01 00 00 00 nop
200b9e0: c2 06 20 04 ld [ %i0 + 4 ], %g1
200b9e4: 80 a0 60 00 cmp %g1, 0
200b9e8: 06 80 00 3b bl 200bad4 <nanosleep+0x11c> <== NEVER TAKEN
200b9ec: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
ticks = _Timespec_To_ticks( rqtp );
200b9f0: 40 00 05 d3 call 200d13c <_Timespec_To_ticks>
200b9f4: 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 ) {
200b9f8: b0 92 20 00 orcc %o0, 0, %i0
200b9fc: 12 80 00 10 bne 200ba3c <nanosleep+0x84>
200ba00: 05 00 80 63 sethi %hi(0x2018c00), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200ba04: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1 ! 2018c90 <_Thread_Dispatch_disable_level>
200ba08: 82 00 60 01 inc %g1
200ba0c: c2 20 a0 90 st %g1, [ %g2 + 0x90 ]
_Thread_Disable_dispatch();
_Thread_Yield_processor();
200ba10: 7f ff f5 33 call 2008edc <_Thread_Yield_processor>
200ba14: 01 00 00 00 nop
_Thread_Enable_dispatch();
200ba18: 7f ff f1 8e call 2008050 <_Thread_Enable_dispatch>
200ba1c: 01 00 00 00 nop
if ( rmtp ) {
200ba20: 80 a6 60 00 cmp %i1, 0
200ba24: 02 80 00 2a be 200bacc <nanosleep+0x114> <== NEVER TAKEN
200ba28: 01 00 00 00 nop
rmtp->tv_sec = 0;
rmtp->tv_nsec = 0;
200ba2c: c0 26 60 04 clr [ %i1 + 4 ]
if ( !ticks ) {
_Thread_Disable_dispatch();
_Thread_Yield_processor();
_Thread_Enable_dispatch();
if ( rmtp ) {
rmtp->tv_sec = 0;
200ba30: c0 26 40 00 clr [ %i1 ]
200ba34: 81 c7 e0 08 ret
200ba38: 81 e8 00 00 restore
200ba3c: c2 00 a0 90 ld [ %g2 + 0x90 ], %g1
200ba40: 82 00 60 01 inc %g1
200ba44: c2 20 a0 90 st %g1, [ %g2 + 0x90 ]
/*
* Block for the desired amount of time
*/
_Thread_Disable_dispatch();
_Thread_Set_state(
200ba48: 21 00 80 63 sethi %hi(0x2018c00), %l0
200ba4c: d0 04 21 54 ld [ %l0 + 0x154 ], %o0 ! 2018d54 <_Thread_Executing>
200ba50: 13 04 00 00 sethi %hi(0x10000000), %o1
200ba54: 7f ff f4 1d call 2008ac8 <_Thread_Set_state>
200ba58: 92 12 60 08 or %o1, 8, %o1 ! 10000008 <RAM_END+0xdc00008>
_Thread_Executing,
STATES_DELAYING | STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Watchdog_Initialize(
200ba5c: c4 04 21 54 ld [ %l0 + 0x154 ], %g2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200ba60: 11 00 80 63 sethi %hi(0x2018c00), %o0
200ba64: c2 00 a0 08 ld [ %g2 + 8 ], %g1
200ba68: 90 12 21 74 or %o0, 0x174, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200ba6c: c2 20 a0 68 st %g1, [ %g2 + 0x68 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200ba70: 92 00 a0 48 add %g2, 0x48, %o1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200ba74: 03 00 80 1f sethi %hi(0x2007c00), %g1
200ba78: 82 10 62 74 or %g1, 0x274, %g1 ! 2007e74 <_Thread_Delay_ended>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200ba7c: c0 20 a0 50 clr [ %g2 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200ba80: c0 20 a0 6c clr [ %g2 + 0x6c ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
200ba84: f0 20 a0 54 st %i0, [ %g2 + 0x54 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
200ba88: 7f ff f6 58 call 20093e8 <_Watchdog_Insert>
200ba8c: c2 20 a0 64 st %g1, [ %g2 + 0x64 ]
_Thread_Delay_ended,
_Thread_Executing->Object.id,
NULL
);
_Watchdog_Insert_ticks( &_Thread_Executing->Timer, ticks );
_Thread_Enable_dispatch();
200ba90: 7f ff f1 70 call 2008050 <_Thread_Enable_dispatch>
200ba94: 01 00 00 00 nop
/* calculate time remaining */
if ( rmtp ) {
200ba98: 80 a6 60 00 cmp %i1, 0
200ba9c: 02 80 00 0c be 200bacc <nanosleep+0x114> <== NEVER TAKEN
200baa0: c2 04 21 54 ld [ %l0 + 0x154 ], %g1
ticks -=
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
200baa4: 92 10 00 19 mov %i1, %o1
_Thread_Enable_dispatch();
/* calculate time remaining */
if ( rmtp ) {
ticks -=
200baa8: c4 00 60 60 ld [ %g1 + 0x60 ], %g2
200baac: e0 00 60 5c ld [ %g1 + 0x5c ], %l0
200bab0: a0 24 00 02 sub %l0, %g2, %l0
200bab4: a0 04 00 18 add %l0, %i0, %l0
_Thread_Executing->Timer.stop_time - _Thread_Executing->Timer.start_time;
_Timespec_From_ticks( ticks, rmtp );
200bab8: 40 00 05 7a call 200d0a0 <_Timespec_From_ticks>
200babc: 90 10 00 10 mov %l0, %o0
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
200bac0: 80 a4 20 00 cmp %l0, 0
200bac4: 12 80 00 0a bne 200baec <nanosleep+0x134>
200bac8: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINTR );
}
return 0;
}
200bacc: 81 c7 e0 08 ret
200bad0: 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 );
200bad4: 40 00 09 b8 call 200e1b4 <__errno>
200bad8: b0 10 3f ff mov -1, %i0
200badc: 82 10 20 16 mov 0x16, %g1
200bae0: c2 22 00 00 st %g1, [ %o0 ]
200bae4: 81 c7 e0 08 ret
200bae8: 81 e8 00 00 restore
/*
* If there is time remaining, then we were interrupted by a signal.
*/
if ( ticks )
rtems_set_errno_and_return_minus_one( EINTR );
200baec: 40 00 09 b2 call 200e1b4 <__errno>
200baf0: b0 10 3f ff mov -1, %i0
200baf4: 82 10 20 04 mov 4, %g1
200baf8: c2 22 00 00 st %g1, [ %o0 ]
200bafc: 81 c7 e0 08 ret
200bb00: 81 e8 00 00 restore
020025b0 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
20025b0: 9d e3 bf 98 save %sp, -104, %sp
switch ( fileno(fp) ) {
20025b4: 40 00 2e 38 call 200de94 <fileno>
20025b8: 90 10 00 18 mov %i0, %o0
20025bc: 80 a2 20 02 cmp %o0, 2
20025c0: 28 80 00 06 bleu,a 20025d8 <newlib_free_buffers+0x28> <== ALWAYS TAKEN
20025c4: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
20025c8: 40 00 2d aa call 200dc70 <fclose> <== NOT EXECUTED
20025cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
}
return 0;
}
20025d0: 81 c7 e0 08 ret
20025d4: 91 e8 20 00 restore %g0, 0, %o0
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
20025d8: 80 88 60 80 btst 0x80, %g1
20025dc: 02 bf ff fd be 20025d0 <newlib_free_buffers+0x20>
20025e0: 01 00 00 00 nop
free( fp->_bf._base );
20025e4: 40 00 20 f9 call 200a9c8 <free>
20025e8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0
fp->_flags &= ~__SMBF;
20025ec: c2 16 20 0c lduh [ %i0 + 0xc ], %g1
fp->_bf._base = fp->_p = (unsigned char *) NULL;
20025f0: c0 26 20 10 clr [ %i0 + 0x10 ]
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
20025f4: 82 08 7f 7f and %g1, -129, %g1
fp->_bf._base = fp->_p = (unsigned char *) NULL;
20025f8: c0 26 00 00 clr [ %i0 ]
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
20025fc: c2 36 20 0c sth %g1, [ %i0 + 0xc ]
break;
default:
fclose(fp);
}
return 0;
}
2002600: 81 c7 e0 08 ret
2002604: 91 e8 20 00 restore %g0, 0, %o0
0200281c <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
200281c: 9d e3 bf 98 save %sp, -104, %sp
rtems_device_driver status;
if ( !initialized ) {
2002820: 05 00 80 70 sethi %hi(0x201c000), %g2
2002824: c2 48 a0 84 ldsb [ %g2 + 0x84 ], %g1 ! 201c084 <initialized>
2002828: 80 a0 60 00 cmp %g1, 0
200282c: 02 80 00 04 be 200283c <null_initialize+0x20>
2002830: 82 10 20 01 mov 1, %g1
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
2002834: 81 c7 e0 08 ret
2002838: 91 e8 20 00 restore %g0, 0, %o0
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
200283c: 11 00 80 66 sethi %hi(0x2019800), %o0
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
2002840: c2 28 a0 84 stb %g1, [ %g2 + 0x84 ]
status = rtems_io_register_name(
2002844: 90 12 20 b8 or %o0, 0xb8, %o0
2002848: 92 10 00 18 mov %i0, %o1
200284c: 40 00 00 4e call 2002984 <rtems_io_register_name>
2002850: 94 10 20 00 clr %o2
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
2002854: 80 a2 20 00 cmp %o0, 0
2002858: 12 80 00 05 bne 200286c <null_initialize+0x50> <== NEVER TAKEN
200285c: 03 00 80 70 sethi %hi(0x201c000), %g1
rtems_fatal_error_occurred(status);
NULL_major = major;
2002860: f0 20 63 00 st %i0, [ %g1 + 0x300 ] ! 201c300 <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
2002864: 81 c7 e0 08 ret
2002868: 91 e8 20 00 restore %g0, 0, %o0
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
200286c: 40 00 11 10 call 2006cac <rtems_fatal_error_occurred> <== NOT EXECUTED
020027f8 <null_write>:
void *pargp
)
{
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
20027f8: 80 a2 a0 00 cmp %o2, 0
20027fc: 02 80 00 04 be 200280c <null_write+0x14> <== ALWAYS TAKEN
2002800: 01 00 00 00 nop
rw_args->bytes_moved = rw_args->count;
2002804: c2 02 a0 0c ld [ %o2 + 0xc ], %g1 <== NOT EXECUTED
2002808: c2 22 a0 14 st %g1, [ %o2 + 0x14 ] <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
200280c: 81 c3 e0 08 retl
2002810: 90 10 20 00 clr %o0
02002824 <open>:
int open(
const char *pathname,
int flags,
...
)
{
2002824: 9d e3 bf 80 save %sp, -128, %sp
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
2002828: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
200282c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2002830: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2002834: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2002838: 82 06 60 01 add %i1, 1, %g1
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
200283c: 80 88 60 02 btst 2, %g1
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
2002840: 82 08 60 01 and %g1, 1, %g1
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2002844: 02 80 00 03 be 2002850 <open+0x2c>
2002848: a1 28 60 02 sll %g1, 2, %l0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
200284c: a0 14 20 02 or %l0, 2, %l0
va_start(ap, flags);
mode = va_arg( ap, int );
2002850: 82 07 a0 50 add %fp, 0x50, %g1
2002854: f4 07 a0 4c ld [ %fp + 0x4c ], %i2
2002858: c2 27 bf f4 st %g1, [ %fp + -12 ]
* 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();
200285c: 40 00 21 68 call 200adfc <rtems_libio_allocate>
2002860: b8 10 20 17 mov 0x17, %i4
if ( iop == 0 ) {
2002864: ba 92 20 00 orcc %o0, 0, %i5
2002868: 02 80 00 3b be 2002954 <open+0x130>
200286c: 92 10 00 10 mov %l0, %o1
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2002870: b6 07 bf e4 add %fp, -28, %i3
2002874: 90 10 00 18 mov %i0, %o0
2002878: 94 10 00 1b mov %i3, %o2
200287c: 7f ff fd f9 call 2002060 <rtems_filesystem_evaluate_path>
2002880: 96 10 20 01 mov 1, %o3
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
2002884: 80 a2 3f ff cmp %o0, -1
2002888: 02 80 00 4d be 20029bc <open+0x198>
200288c: 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)) {
2002890: b8 10 20 11 mov 0x11, %i4
2002894: 80 a0 6a 00 cmp %g1, 0xa00
2002898: 02 80 00 69 be 2002a3c <open+0x218>
200289c: 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;
20028a0: c2 07 bf e8 ld [ %fp + -24 ], %g1
iop->file_info = loc.node_access;
20028a4: 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;
20028a8: c2 27 60 30 st %g1, [ %i5 + 0x30 ]
iop->file_info = loc.node_access;
20028ac: c4 27 60 2c st %g2, [ %i5 + 0x2c ]
iop->flags |= rtems_libio_fcntl_flags( flags );
20028b0: e0 07 60 0c ld [ %i5 + 0xc ], %l0
20028b4: 40 00 21 90 call 200aef4 <rtems_libio_fcntl_flags>
20028b8: 90 10 00 19 mov %i1, %o0
iop->pathinfo = loc;
20028bc: c2 07 bf e4 ld [ %fp + -28 ], %g1
if ( !iop->handlers->open_h ) {
20028c0: 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;
20028c4: c2 27 60 10 st %g1, [ %i5 + 0x10 ]
20028c8: c2 07 bf e8 ld [ %fp + -24 ], %g1
if ( !iop->handlers->open_h ) {
20028cc: 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;
20028d0: c2 27 60 14 st %g1, [ %i5 + 0x14 ]
20028d4: 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 );
20028d8: 90 12 00 10 or %o0, %l0, %o0
iop->pathinfo = loc;
20028dc: c2 27 60 18 st %g1, [ %i5 + 0x18 ]
20028e0: 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 );
20028e4: d0 27 60 0c st %o0, [ %i5 + 0xc ]
iop->pathinfo = loc;
if ( !iop->handlers->open_h ) {
20028e8: 80 a0 a0 00 cmp %g2, 0
20028ec: 02 80 00 52 be 2002a34 <open+0x210> <== NEVER TAKEN
20028f0: c2 27 60 1c st %g1, [ %i5 + 0x1c ]
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
20028f4: 92 10 00 18 mov %i0, %o1
20028f8: 96 10 00 1a mov %i2, %o3
20028fc: 90 10 00 1d mov %i5, %o0
2002900: 94 10 00 19 mov %i1, %o2
2002904: 9f c0 80 00 call %g2
2002908: a0 10 00 1b mov %i3, %l0
if ( rc )
200290c: 80 a2 20 00 cmp %o0, 0
2002910: 02 80 00 16 be 2002968 <open+0x144> <== ALWAYS TAKEN
2002914: b8 10 00 08 mov %o0, %i4
done:
va_end(ap);
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
2002918: 40 00 21 22 call 200ada0 <rtems_libio_free>
200291c: 90 10 00 1d mov %i5, %o0
if ( loc_to_free )
2002920: 80 a4 20 00 cmp %l0, 0
2002924: 02 80 00 0c be 2002954 <open+0x130>
2002928: 01 00 00 00 nop
rtems_filesystem_freenode( loc_to_free );
200292c: c2 04 20 08 ld [ %l0 + 8 ], %g1
2002930: 80 a0 60 00 cmp %g1, 0
2002934: 02 80 00 08 be 2002954 <open+0x130> <== NEVER TAKEN
2002938: 01 00 00 00 nop
200293c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2002940: 80 a0 60 00 cmp %g1, 0
2002944: 02 80 00 04 be 2002954 <open+0x130> <== NEVER TAKEN
2002948: 01 00 00 00 nop
200294c: 9f c0 40 00 call %g1
2002950: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( rc );
2002954: 40 00 2c 6f call 200db10 <__errno>
2002958: b0 10 3f ff mov -1, %i0
200295c: f8 22 00 00 st %i4, [ %o0 ]
2002960: 81 c7 e0 08 ret
2002964: 81 e8 00 00 restore
2002968: 03 00 80 60 sethi %hi(0x2018000), %g1
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
200296c: 80 8e 64 00 btst 0x400, %i1
2002970: 12 80 00 40 bne 2002a70 <open+0x24c>
2002974: a0 10 61 34 or %g1, 0x134, %l0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2002978: c6 04 00 00 ld [ %l0 ], %g3
200297c: 86 27 40 03 sub %i5, %g3, %g3
2002980: 87 38 e0 02 sra %g3, 2, %g3
2002984: 89 28 e0 02 sll %g3, 2, %g4
2002988: 85 28 e0 06 sll %g3, 6, %g2
200298c: 84 20 80 04 sub %g2, %g4, %g2
2002990: 83 28 a0 06 sll %g2, 6, %g1
2002994: 82 20 40 02 sub %g1, %g2, %g1
2002998: 89 28 60 0c sll %g1, 0xc, %g4
200299c: 82 00 40 04 add %g1, %g4, %g1
20029a0: 82 00 40 03 add %g1, %g3, %g1
20029a4: 83 28 60 04 sll %g1, 4, %g1
20029a8: 82 20 40 03 sub %g1, %g3, %g1
20029ac: 83 28 60 02 sll %g1, 2, %g1
20029b0: b0 20 c0 01 sub %g3, %g1, %i0
}
20029b4: 81 c7 e0 08 ret
20029b8: 81 e8 00 00 restore
status = rtems_filesystem_evaluate_path(
pathname, eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
20029bc: 40 00 2c 55 call 200db10 <__errno>
20029c0: 01 00 00 00 nop
20029c4: c2 02 00 00 ld [ %o0 ], %g1
20029c8: 80 a0 60 02 cmp %g1, 2
20029cc: 12 80 00 20 bne 2002a4c <open+0x228>
20029d0: 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) ) {
20029d4: b8 10 20 02 mov 2, %i4
20029d8: 02 80 00 19 be 2002a3c <open+0x218>
20029dc: 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 );
20029e0: 13 3f ff e0 sethi %hi(0xffff8000), %o1
20029e4: 90 10 00 18 mov %i0, %o0
20029e8: 92 16 80 09 or %i2, %o1, %o1
20029ec: 94 10 20 00 clr %o2
20029f0: 93 2a 60 10 sll %o1, 0x10, %o1
20029f4: 96 10 20 00 clr %o3
20029f8: 7f ff fe 5b call 2002364 <mknod>
20029fc: 93 32 60 10 srl %o1, 0x10, %o1
if ( rc ) {
2002a00: 80 a2 20 00 cmp %o0, 0
2002a04: 12 80 00 12 bne 2002a4c <open+0x228> <== NEVER TAKEN
2002a08: 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 );
2002a0c: 92 10 20 00 clr %o1
2002a10: 94 10 00 1b mov %i3, %o2
2002a14: 96 10 20 01 mov 1, %o3
2002a18: 7f ff fd 92 call 2002060 <rtems_filesystem_evaluate_path>
2002a1c: b8 10 20 0d mov 0xd, %i4
if ( status != 0 ) { /* The file did not exist */
2002a20: 80 a2 20 00 cmp %o0, 0
2002a24: 12 80 00 06 bne 2002a3c <open+0x218> <== NEVER TAKEN
2002a28: 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;
2002a2c: 10 bf ff 9e b 20028a4 <open+0x80>
2002a30: c2 07 bf e8 ld [ %fp + -24 ], %g1
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2002a34: a0 10 00 1b mov %i3, %l0 <== NOT EXECUTED
2002a38: b8 10 20 86 mov 0x86, %i4 <== NOT EXECUTED
done:
va_end(ap);
if ( rc ) {
if ( iop )
2002a3c: 80 a7 60 00 cmp %i5, 0
2002a40: 02 bf ff b9 be 2002924 <open+0x100> <== NEVER TAKEN
2002a44: 80 a4 20 00 cmp %l0, 0
2002a48: 30 bf ff b4 b,a 2002918 <open+0xf4>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
2002a4c: 40 00 2c 31 call 200db10 <__errno>
2002a50: 01 00 00 00 nop
2002a54: f8 02 00 00 ld [ %o0 ], %i4
2002a58: 03 00 80 60 sethi %hi(0x2018000), %g1
*/
done:
va_end(ap);
if ( rc ) {
2002a5c: 80 a7 20 00 cmp %i4, 0
2002a60: 02 bf ff c6 be 2002978 <open+0x154> <== NEVER TAKEN
2002a64: a0 10 61 34 or %g1, 0x134, %l0
2002a68: 10 bf ff f5 b 2002a3c <open+0x218>
2002a6c: a0 10 20 00 clr %l0
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
2002a70: c4 00 61 34 ld [ %g1 + 0x134 ], %g2
2002a74: 92 10 20 00 clr %o1
2002a78: 84 27 40 02 sub %i5, %g2, %g2
2002a7c: 85 38 a0 02 sra %g2, 2, %g2
2002a80: 87 28 a0 02 sll %g2, 2, %g3
2002a84: 83 28 a0 06 sll %g2, 6, %g1
2002a88: 82 20 40 03 sub %g1, %g3, %g1
2002a8c: 91 28 60 06 sll %g1, 6, %o0
2002a90: 90 22 00 01 sub %o0, %g1, %o0
2002a94: 87 2a 20 0c sll %o0, 0xc, %g3
2002a98: 90 02 00 03 add %o0, %g3, %o0
2002a9c: 90 02 00 02 add %o0, %g2, %o0
2002aa0: 91 2a 20 04 sll %o0, 4, %o0
2002aa4: 90 22 00 02 sub %o0, %g2, %o0
2002aa8: 91 2a 20 02 sll %o0, 2, %o0
2002aac: 40 00 1f f2 call 200aa74 <ftruncate>
2002ab0: 90 20 80 08 sub %g2, %o0, %o0
if ( rc ) {
2002ab4: b8 92 20 00 orcc %o0, 0, %i4
2002ab8: 22 bf ff b1 be,a 200297c <open+0x158> <== ALWAYS TAKEN
2002abc: c6 04 00 00 ld [ %l0 ], %g3
if(errno) rc = errno;
2002ac0: 40 00 2c 14 call 200db10 <__errno> <== NOT EXECUTED
2002ac4: 01 00 00 00 nop <== NOT EXECUTED
2002ac8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2002acc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002ad0: 12 80 00 15 bne 2002b24 <open+0x300> <== NOT EXECUTED
2002ad4: 01 00 00 00 nop <== NOT EXECUTED
close( iop - rtems_libio_iops );
2002ad8: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
2002adc: 84 27 40 02 sub %i5, %g2, %g2 <== NOT EXECUTED
2002ae0: 85 38 a0 02 sra %g2, 2, %g2 <== NOT EXECUTED
2002ae4: 87 28 a0 02 sll %g2, 2, %g3 <== NOT EXECUTED
2002ae8: 83 28 a0 06 sll %g2, 6, %g1 <== NOT EXECUTED
2002aec: 82 20 40 03 sub %g1, %g3, %g1 <== NOT EXECUTED
2002af0: 91 28 60 06 sll %g1, 6, %o0 <== NOT EXECUTED
2002af4: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
2002af8: 87 2a 20 0c sll %o0, 0xc, %g3 <== NOT EXECUTED
2002afc: ba 10 20 00 clr %i5 <== NOT EXECUTED
2002b00: 90 02 00 03 add %o0, %g3, %o0 <== NOT EXECUTED
2002b04: 90 02 00 02 add %o0, %g2, %o0 <== NOT EXECUTED
2002b08: 91 2a 20 04 sll %o0, 4, %o0 <== NOT EXECUTED
2002b0c: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED
2002b10: 91 2a 20 02 sll %o0, 2, %o0 <== NOT EXECUTED
2002b14: 40 00 1f 7c call 200a904 <close> <== NOT EXECUTED
2002b18: 90 20 80 08 sub %g2, %o0, %o0 <== NOT EXECUTED
2002b1c: 10 bf ff d0 b 2002a5c <open+0x238> <== NOT EXECUTED
2002b20: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
2002b24: 40 00 2b fb call 200db10 <__errno> <== NOT EXECUTED
2002b28: 01 00 00 00 nop <== NOT EXECUTED
2002b2c: 10 bf ff eb b 2002ad8 <open+0x2b4> <== NOT EXECUTED
2002b30: f8 02 00 00 ld [ %o0 ], %i4 <== NOT EXECUTED
020027b0 <open_dev_console>:
/*
* This is a replaceable stub
*/
void open_dev_console(void)
{
20027b0: 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) {
20027b4: 21 00 80 58 sethi %hi(0x2016000), %l0
20027b8: 92 10 20 00 clr %o1
20027bc: 90 14 21 b0 or %l0, 0x1b0, %o0
20027c0: 40 00 00 19 call 2002824 <open>
20027c4: 94 10 20 00 clr %o2
20027c8: 80 a2 3f ff cmp %o0, -1
20027cc: 02 80 00 0e be 2002804 <open_dev_console+0x54>
20027d0: 90 14 21 b0 or %l0, 0x1b0, %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)
20027d4: 92 10 20 01 mov 1, %o1
20027d8: 40 00 00 13 call 2002824 <open>
20027dc: 94 10 20 00 clr %o2
20027e0: 80 a2 3f ff cmp %o0, -1
20027e4: 02 80 00 0c be 2002814 <open_dev_console+0x64> <== NEVER TAKEN
20027e8: 92 10 20 01 mov 1, %o1
rtems_fatal_error_occurred( error_code | '1' );
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
20027ec: 90 14 21 b0 or %l0, 0x1b0, %o0
20027f0: 40 00 00 0d call 2002824 <open>
20027f4: 94 10 20 00 clr %o2
20027f8: 80 a2 3f ff cmp %o0, -1
20027fc: 02 80 00 04 be 200280c <open_dev_console+0x5c> <== NEVER TAKEN
2002800: 11 14 d5 11 sethi %hi(0x53544400), %o0
2002804: 81 c7 e0 08 ret
2002808: 81 e8 00 00 restore
rtems_fatal_error_occurred( error_code | '2' );
200280c: 40 00 0d d8 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2002810: 90 12 20 32 or %o0, 0x32, %o0 <== 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' );
2002814: 11 14 d5 11 sethi %hi(0x53544400), %o0 <== NOT EXECUTED
2002818: 40 00 0d d5 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
200281c: 90 12 20 31 or %o0, 0x31, %o0 ! 53544431 <RAM_END+0x51144431><== NOT EXECUTED
020048d4 <opendir>:
* open a directory.
*/
DIR *
opendir(
const char *name )
{
20048d4: 9d e3 bf 98 save %sp, -104, %sp
register DIR *dirp;
register int fd;
if ((fd = open(name, 0)) == -1)
20048d8: 92 10 20 00 clr %o1
20048dc: 90 10 00 18 mov %i0, %o0
20048e0: 40 00 00 21 call 2004964 <open>
20048e4: b0 10 20 00 clr %i0
20048e8: 80 a2 3f ff cmp %o0, -1
20048ec: 02 80 00 17 be 2004948 <opendir+0x74> <== NEVER TAKEN
20048f0: a0 10 00 08 mov %o0, %l0
return NULL;
if (fcntl(fd, F_SETFD, 1) == -1 ||
20048f4: 92 10 20 02 mov 2, %o1
20048f8: 40 00 21 4e call 200ce30 <fcntl>
20048fc: 94 10 20 01 mov 1, %o2
2004900: 80 a2 3f ff cmp %o0, -1
2004904: 02 80 00 14 be 2004954 <opendir+0x80> <== NEVER TAKEN
2004908: 90 10 00 10 mov %l0, %o0
200490c: 7f ff fd c2 call 2004014 <malloc>
2004910: 90 10 20 18 mov 0x18, %o0
2004914: b0 92 20 00 orcc %o0, 0, %i0
2004918: 02 80 00 0f be 2004954 <opendir+0x80> <== NEVER TAKEN
200491c: 90 10 00 10 mov %l0, %o0
* 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);
2004920: 7f ff fd bd call 2004014 <malloc>
2004924: 90 10 22 00 mov 0x200, %o0
dirp->dd_len = 512;
2004928: 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);
200492c: d0 26 20 0c st %o0, [ %i0 + 0xc ]
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
2004930: 80 a2 20 00 cmp %o0, 0
2004934: 02 80 00 07 be 2004950 <opendir+0x7c> <== NEVER TAKEN
2004938: c2 26 20 10 st %g1, [ %i0 + 0x10 ]
close (fd);
return NULL;
}
dirp->dd_fd = fd;
200493c: e0 26 00 00 st %l0, [ %i0 ]
dirp->dd_loc = 0;
2004940: c0 26 20 04 clr [ %i0 + 4 ]
dirp->dd_seek = 0;
2004944: c0 26 20 14 clr [ %i0 + 0x14 ]
/*
* Set up seek point for rewinddir.
*/
return dirp;
}
2004948: 81 c7 e0 08 ret
200494c: 81 e8 00 00 restore
*/
dirp->dd_buf = malloc (512);
dirp->dd_len = 512;
if (dirp->dd_buf == NULL) {
close (fd);
2004950: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004954: 7f ff fa b4 call 2003424 <close> <== NOT EXECUTED
2004958: b0 10 20 00 clr %i0 <== NOT EXECUTED
200495c: 81 c7 e0 08 ret <== NOT EXECUTED
2004960: 81 e8 00 00 restore <== NOT EXECUTED
02003780 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003780: 9d e3 bf 98 save %sp, -104, %sp
int i;
if (tty->termios.c_oflag & OPOST) {
2003784: c6 06 60 34 ld [ %i1 + 0x34 ], %g3
2003788: 80 88 e0 01 btst 1, %g3
200378c: 02 80 00 10 be 20037cc <oproc+0x4c> <== NEVER TAKEN
2003790: f0 2f a0 44 stb %i0, [ %fp + 0x44 ]
switch (c) {
2003794: b0 0e 20 ff and %i0, 0xff, %i0
2003798: 80 a6 20 09 cmp %i0, 9
200379c: 22 80 00 28 be,a 200383c <oproc+0xbc>
20037a0: c8 06 60 28 ld [ %i1 + 0x28 ], %g4
20037a4: 18 80 00 10 bgu 20037e4 <oproc+0x64> <== ALWAYS TAKEN
20037a8: 80 a6 20 0a cmp %i0, 0xa
20037ac: 80 a6 20 08 cmp %i0, 8 <== NOT EXECUTED
20037b0: 12 80 00 11 bne 20037f4 <oproc+0x74> <== NOT EXECUTED
20037b4: 80 88 e0 02 btst 2, %g3 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
20037b8: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
20037bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20037c0: 04 80 00 03 ble 20037cc <oproc+0x4c> <== NOT EXECUTED
20037c4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->column--;
20037c8: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
20037cc: 94 10 00 19 mov %i1, %o2
20037d0: 90 07 a0 44 add %fp, 0x44, %o0
20037d4: 7f ff ff 9d call 2003648 <rtems_termios_puts>
20037d8: 92 10 20 01 mov 1, %o1
20037dc: 81 c7 e0 08 ret
20037e0: 81 e8 00 00 restore
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
20037e4: 02 80 00 24 be 2003874 <oproc+0xf4>
20037e8: 80 a6 20 0d cmp %i0, 0xd
20037ec: 02 80 00 2f be 20038a8 <oproc+0x128> <== NEVER TAKEN
20037f0: 80 88 e0 02 btst 2, %g3
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
20037f4: 02 80 00 08 be 2003814 <oproc+0x94> <== ALWAYS TAKEN
20037f8: 07 00 80 5e sethi %hi(0x2017800), %g3
c = toupper(c);
20037fc: c4 00 e1 e8 ld [ %g3 + 0x1e8 ], %g2 ! 20179e8 <__ctype_ptr><== NOT EXECUTED
2003800: c2 08 80 18 ldub [ %g2 + %i0 ], %g1 <== NOT EXECUTED
2003804: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2003808: 32 80 00 02 bne,a 2003810 <oproc+0x90> <== NOT EXECUTED
200380c: b0 06 3f e0 add %i0, -32, %i0 <== NOT EXECUTED
2003810: f0 2f a0 44 stb %i0, [ %fp + 0x44 ] <== NOT EXECUTED
if (!iscntrl(c))
2003814: c2 00 e1 e8 ld [ %g3 + 0x1e8 ], %g1
2003818: c4 0f a0 44 ldub [ %fp + 0x44 ], %g2
200381c: c6 08 40 02 ldub [ %g1 + %g2 ], %g3
2003820: 80 88 e0 20 btst 0x20, %g3
2003824: 12 bf ff eb bne 20037d0 <oproc+0x50> <== NEVER TAKEN
2003828: 94 10 00 19 mov %i1, %o2
tty->column++;
200382c: c2 06 60 28 ld [ %i1 + 0x28 ], %g1
2003830: 82 00 60 01 inc %g1
2003834: 10 bf ff e7 b 20037d0 <oproc+0x50>
2003838: 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) {
200383c: 05 00 00 06 sethi %hi(0x1800), %g2
2003840: 82 08 c0 02 and %g3, %g2, %g1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
2003844: 86 09 20 07 and %g4, 7, %g3
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003848: 80 a0 40 02 cmp %g1, %g2
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
200384c: 82 10 20 08 mov 8, %g1
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2003850: 02 80 00 25 be 20038e4 <oproc+0x164> <== ALWAYS TAKEN
2003854: 92 20 40 03 sub %g1, %g3, %o1
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
2003858: 82 02 40 04 add %o1, %g4, %g1 <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
200385c: 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;
2003860: c2 26 60 28 st %g1, [ %i1 + 0x28 ] <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
2003864: 90 07 a0 44 add %fp, 0x44, %o0 <== NOT EXECUTED
2003868: 7f ff ff 78 call 2003648 <rtems_termios_puts> <== NOT EXECUTED
200386c: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
2003870: 30 80 00 23 b,a 20038fc <oproc+0x17c> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
2003874: 80 88 e0 20 btst 0x20, %g3
2003878: 32 80 00 02 bne,a 2003880 <oproc+0x100> <== NEVER TAKEN
200387c: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
tty->column = 0;
if (tty->termios.c_oflag & ONLCR) {
2003880: 80 88 e0 04 btst 4, %g3
2003884: 02 bf ff d3 be 20037d0 <oproc+0x50> <== NEVER TAKEN
2003888: 94 10 00 19 mov %i1, %o2
rtems_termios_puts ("\r", 1, tty);
200388c: 11 00 80 59 sethi %hi(0x2016400), %o0
2003890: 92 10 20 01 mov 1, %o1
2003894: 90 12 21 58 or %o0, 0x158, %o0
2003898: 7f ff ff 6c call 2003648 <rtems_termios_puts>
200389c: 94 10 00 19 mov %i1, %o2
tty->column = 0;
20038a0: 10 bf ff cb b 20037cc <oproc+0x4c>
20038a4: c0 26 60 28 clr [ %i1 + 0x28 ]
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
20038a8: 80 88 e0 10 btst 0x10, %g3 <== NOT EXECUTED
20038ac: 02 80 00 06 be 20038c4 <oproc+0x144> <== NOT EXECUTED
20038b0: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED
20038b4: c2 06 60 28 ld [ %i1 + 0x28 ], %g1 <== NOT EXECUTED
20038b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20038bc: 02 bf ff c8 be 20037dc <oproc+0x5c> <== NOT EXECUTED
20038c0: 80 88 e0 08 btst 8, %g3 <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
20038c4: 22 bf ff c2 be,a 20037cc <oproc+0x4c> <== NOT EXECUTED
20038c8: c0 26 60 28 clr [ %i1 + 0x28 ] <== NOT EXECUTED
c = '\n';
20038cc: 82 10 20 0a mov 0xa, %g1 <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
20038d0: 80 88 e0 20 btst 0x20, %g3 <== NOT EXECUTED
20038d4: 02 bf ff be be 20037cc <oproc+0x4c> <== NOT EXECUTED
20038d8: c2 2f a0 44 stb %g1, [ %fp + 0x44 ] <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
20038dc: 10 bf ff bc b 20037cc <oproc+0x4c> <== NOT EXECUTED
20038e0: 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;
20038e4: 82 02 40 04 add %o1, %g4, %g1
rtems_termios_puts ( " ", i, tty);
20038e8: 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;
20038ec: c2 26 60 28 st %g1, [ %i1 + 0x28 ]
rtems_termios_puts ( " ", i, tty);
20038f0: 11 00 80 59 sethi %hi(0x2016400), %o0
20038f4: 7f ff ff 55 call 2003648 <rtems_termios_puts>
20038f8: 90 12 21 60 or %o0, 0x160, %o0 ! 2016560 <pollCallbacks.4788+0x380>
20038fc: 81 c7 e0 08 ret
2003900: 81 e8 00 00 restore
02004804 <posix_memalign>:
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
2004804: 03 00 80 78 sethi %hi(0x201e000), %g1
2004808: 82 10 63 a0 or %g1, 0x3a0, %g1 ! 201e3a0 <rtems_malloc_statistics>
200480c: c4 00 60 08 ld [ %g1 + 8 ], %g2
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2004810: 86 02 7f ff add %o1, -1, %g3
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
2004814: 84 00 a0 01 inc %g2
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
2004818: 80 88 c0 09 btst %g3, %o1
200481c: 12 80 00 08 bne 200483c <posix_memalign+0x38> <== NEVER TAKEN
2004820: c4 20 60 08 st %g2, [ %g1 + 8 ]
2004824: 80 a2 60 03 cmp %o1, 3
2004828: 08 80 00 05 bleu 200483c <posix_memalign+0x38>
200482c: 01 00 00 00 nop
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
2004830: 82 13 c0 00 mov %o7, %g1
2004834: 40 00 01 8b call 2004e60 <rtems_memalign>
2004838: 9e 10 40 00 mov %g1, %o7
}
200483c: 81 c3 e0 08 retl
2004840: 90 10 20 16 mov 0x16, %o0
0200598c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
200598c: 9d e3 bf 88 save %sp, -120, %sp
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
2005990: 80 a6 20 00 cmp %i0, 0
2005994: 02 80 00 2a be 2005a3c <pthread_barrier_init+0xb0>
2005998: a0 10 00 19 mov %i1, %l0
return EINVAL;
if ( count == 0 )
200599c: 80 a6 a0 00 cmp %i2, 0
20059a0: 02 80 00 27 be 2005a3c <pthread_barrier_init+0xb0>
20059a4: 80 a6 60 00 cmp %i1, 0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
20059a8: 22 80 00 2b be,a 2005a54 <pthread_barrier_init+0xc8>
20059ac: 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 )
20059b0: c2 04 00 00 ld [ %l0 ], %g1
20059b4: 80 a0 60 00 cmp %g1, 0
20059b8: 02 80 00 21 be 2005a3c <pthread_barrier_init+0xb0>
20059bc: 01 00 00 00 nop
return EINVAL;
switch ( the_attr->process_shared ) {
20059c0: c2 04 20 04 ld [ %l0 + 4 ], %g1
20059c4: 80 a0 60 00 cmp %g1, 0
20059c8: 12 80 00 1d bne 2005a3c <pthread_barrier_init+0xb0> <== NEVER TAKEN
20059cc: 05 00 80 66 sethi %hi(0x2019800), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20059d0: c2 00 a3 70 ld [ %g2 + 0x370 ], %g1 ! 2019b70 <_Thread_Dispatch_disable_level>
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
20059d4: f4 27 bf f4 st %i2, [ %fp + -12 ]
20059d8: 82 00 60 01 inc %g1
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
20059dc: c0 27 bf f0 clr [ %fp + -16 ]
20059e0: c2 20 a3 70 st %g1, [ %g2 + 0x370 ]
* 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 *)
20059e4: 35 00 80 67 sethi %hi(0x2019c00), %i2
20059e8: 40 00 09 4c call 2007f18 <_Objects_Allocate>
20059ec: 90 16 a3 80 or %i2, 0x380, %o0 ! 2019f80 <_POSIX_Barrier_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
20059f0: a0 92 20 00 orcc %o0, 0, %l0
20059f4: 02 80 00 14 be 2005a44 <pthread_barrier_init+0xb8>
20059f8: 90 04 20 10 add %l0, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
20059fc: 40 00 06 f9 call 20075e0 <_CORE_barrier_Initialize>
2005a00: 92 07 bf f0 add %fp, -16, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005a04: c4 04 20 08 ld [ %l0 + 8 ], %g2
2005a08: 82 16 a3 80 or %i2, 0x380, %g1
2005a0c: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
2005a10: 03 00 00 3f sethi %hi(0xfc00), %g1
2005a14: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005a18: 82 08 80 01 and %g2, %g1, %g1
2005a1c: 83 28 60 02 sll %g1, 2, %g1
2005a20: e0 20 c0 01 st %l0, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2005a24: c0 24 20 0c clr [ %l0 + 0xc ]
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
2005a28: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
2005a2c: 40 00 0c f8 call 2008e0c <_Thread_Enable_dispatch>
2005a30: b0 10 20 00 clr %i0
2005a34: 81 c7 e0 08 ret
2005a38: 81 e8 00 00 restore
return 0;
}
2005a3c: 81 c7 e0 08 ret
2005a40: 91 e8 20 16 restore %g0, 0x16, %o0
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
2005a44: 40 00 0c f2 call 2008e0c <_Thread_Enable_dispatch>
2005a48: b0 10 20 0b mov 0xb, %i0
2005a4c: 81 c7 e0 08 ret
2005a50: 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 );
2005a54: 7f ff ff 98 call 20058b4 <pthread_barrierattr_init>
2005a58: 90 10 00 10 mov %l0, %o0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
2005a5c: 10 bf ff d6 b 20059b4 <pthread_barrier_init+0x28>
2005a60: c2 04 00 00 ld [ %l0 ], %g1
02004fd4 <pthread_cancel>:
*/
int pthread_cancel(
pthread_t thread
)
{
2004fd4: 9d e3 bf 90 save %sp, -112, %sp
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
2004fd8: 03 00 80 59 sethi %hi(0x2016400), %g1
2004fdc: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20165d0 <_ISR_Nest_level>
*/
int pthread_cancel(
pthread_t thread
)
{
2004fe0: 90 10 00 18 mov %i0, %o0
/*
* Don't even think about deleting a resource from an ISR.
*/
if ( _ISR_Is_in_progress() )
2004fe4: 80 a0 a0 00 cmp %g2, 0
2004fe8: 12 80 00 15 bne 200503c <pthread_cancel+0x68> <== NEVER TAKEN
2004fec: b0 10 20 47 mov 0x47, %i0
return EPROTO;
the_thread = _Thread_Get( thread, &location );
2004ff0: 40 00 0d 86 call 2008608 <_Thread_Get>
2004ff4: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2004ff8: c2 07 bf f4 ld [ %fp + -12 ], %g1
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
the_thread = _Thread_Get( thread, &location );
2004ffc: a0 10 00 08 mov %o0, %l0
switch ( location ) {
2005000: 80 a0 60 00 cmp %g1, 0
2005004: 12 80 00 0e bne 200503c <pthread_cancel+0x68> <== NEVER TAKEN
2005008: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
200500c: c6 02 21 6c ld [ %o0 + 0x16c ], %g3
thread_support->cancelation_requested = 1;
2005010: 82 10 20 01 mov 1, %g1
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005014: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2
2005018: 80 a0 a0 00 cmp %g2, 0
200501c: 12 80 00 06 bne 2005034 <pthread_cancel+0x60> <== NEVER TAKEN
2005020: c2 20 e0 d4 st %g1, [ %g3 + 0xd4 ]
2005024: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1
2005028: 80 a0 60 01 cmp %g1, 1
200502c: 02 80 00 06 be 2005044 <pthread_cancel+0x70>
2005030: 01 00 00 00 nop
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = true;
_Thread_Enable_dispatch();
2005034: 40 00 0d 67 call 20085d0 <_Thread_Enable_dispatch>
2005038: b0 10 20 00 clr %i0 ! 0 <PROM_START>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
200503c: 81 c7 e0 08 ret
2005040: 81 e8 00 00 restore
if (thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS)
cancel = true;
_Thread_Enable_dispatch();
2005044: 40 00 0d 63 call 20085d0 <_Thread_Enable_dispatch>
2005048: b0 10 20 00 clr %i0
if ( cancel )
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
200504c: 90 10 00 10 mov %l0, %o0
2005050: 40 00 00 cc call 2005380 <_POSIX_Thread_Exit>
2005054: 92 10 3f ff mov -1, %o1
2005058: 81 c7 e0 08 ret
200505c: 81 e8 00 00 restore
0200550c <pthread_cleanup_pop>:
*/
void pthread_cleanup_pop(
int execute
)
{
200550c: 9d e3 bf 98 save %sp, -104, %sp
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005510: 09 00 80 5c sethi %hi(0x2017000), %g4
POSIX_Cancel_Handler_control tmp_handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
2005514: 05 00 80 5c sethi %hi(0x2017000), %g2
2005518: c2 01 22 f0 ld [ %g4 + 0x2f0 ], %g1
200551c: c6 00 a3 b4 ld [ %g2 + 0x3b4 ], %g3
2005520: 82 00 60 01 inc %g1
2005524: e0 00 e1 6c ld [ %g3 + 0x16c ], %l0
2005528: c2 21 22 f0 st %g1, [ %g4 + 0x2f0 ]
*/
void pthread_cleanup_pop(
int execute
)
{
200552c: a4 10 00 18 mov %i0, %l2
* ensure that we do not get prempted and deleted while we are holding
* memory that needs to be freed.
*/
_Thread_Disable_dispatch();
_ISR_Disable( level );
2005530: 7f ff f3 bb call 200241c <sparc_disable_interrupts>
2005534: 01 00 00 00 nop
2005538: b0 10 00 08 mov %o0, %i0
if ( _Chain_Is_empty( handler_stack ) ) {
200553c: c2 04 20 d8 ld [ %l0 + 0xd8 ], %g1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
2005540: a0 04 20 dc add %l0, 0xdc, %l0
2005544: 80 a0 40 10 cmp %g1, %l0
2005548: 02 80 00 18 be 20055a8 <pthread_cleanup_pop+0x9c>
200554c: 01 00 00 00 nop
_Thread_Enable_dispatch();
_ISR_Enable( level );
return;
}
handler = (POSIX_Cancel_Handler_control *)
2005550: e0 04 20 04 ld [ %l0 + 4 ], %l0
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
2005554: c4 04 00 00 ld [ %l0 ], %g2
previous = the_node->previous;
2005558: c2 04 20 04 ld [ %l0 + 4 ], %g1
next->previous = previous;
previous->next = next;
200555c: c4 20 40 00 st %g2, [ %g1 ]
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
2005560: c2 20 a0 04 st %g1, [ %g2 + 4 ]
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
2005564: 7f ff f3 b2 call 200242c <sparc_enable_interrupts>
2005568: 01 00 00 00 nop
tmp_handler = *handler;
_Workspace_Free( handler );
200556c: 90 10 00 10 mov %l0, %o0
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
tmp_handler = *handler;
2005570: e2 04 20 0c ld [ %l0 + 0xc ], %l1
_Workspace_Free( handler );
2005574: 40 00 14 0e call 200a5ac <_Workspace_Free>
2005578: e0 04 20 08 ld [ %l0 + 8 ], %l0
_Thread_Enable_dispatch();
200557c: 40 00 0e 5e call 2008ef4 <_Thread_Enable_dispatch>
2005580: 01 00 00 00 nop
if ( execute )
2005584: 80 a4 a0 00 cmp %l2, 0
2005588: 12 80 00 04 bne 2005598 <pthread_cleanup_pop+0x8c> <== ALWAYS TAKEN
200558c: 01 00 00 00 nop
2005590: 81 c7 e0 08 ret <== NOT EXECUTED
2005594: 81 e8 00 00 restore <== NOT EXECUTED
(*tmp_handler.routine)( tmp_handler.arg );
2005598: 9f c4 00 00 call %l0
200559c: 90 10 00 11 mov %l1, %o0
20055a0: 81 c7 e0 08 ret
20055a4: 81 e8 00 00 restore
_Thread_Disable_dispatch();
_ISR_Disable( level );
if ( _Chain_Is_empty( handler_stack ) ) {
_Thread_Enable_dispatch();
20055a8: 40 00 0e 53 call 2008ef4 <_Thread_Enable_dispatch>
20055ac: 01 00 00 00 nop
_ISR_Enable( level );
20055b0: 7f ff f3 9f call 200242c <sparc_enable_interrupts>
20055b4: 81 e8 00 00 restore
020055bc <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
20055bc: 9d e3 bf 98 save %sp, -104, %sp
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
20055c0: 80 a6 20 00 cmp %i0, 0
20055c4: 02 80 00 12 be 200560c <pthread_cleanup_push+0x50>
20055c8: 05 00 80 5c sethi %hi(0x2017000), %g2
20055cc: c2 00 a2 f0 ld [ %g2 + 0x2f0 ], %g1 ! 20172f0 <_Thread_Dispatch_disable_level>
20055d0: 82 00 60 01 inc %g1
20055d4: c2 20 a2 f0 st %g1, [ %g2 + 0x2f0 ]
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
20055d8: 40 00 13 fc call 200a5c8 <_Workspace_Allocate>
20055dc: 90 10 20 10 mov 0x10, %o0
if ( handler ) {
20055e0: 92 92 20 00 orcc %o0, 0, %o1
20055e4: 02 80 00 08 be 2005604 <pthread_cleanup_push+0x48> <== NEVER TAKEN
20055e8: 03 00 80 5c sethi %hi(0x2017000), %g1
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
20055ec: c4 00 63 b4 ld [ %g1 + 0x3b4 ], %g2 ! 20173b4 <_Thread_Executing>
handler->routine = routine;
20055f0: f0 22 60 08 st %i0, [ %o1 + 8 ]
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
20055f4: d0 00 a1 6c ld [ %g2 + 0x16c ], %o0
handler->routine = routine;
handler->arg = arg;
20055f8: f2 22 60 0c st %i1, [ %o1 + 0xc ]
_Chain_Append( handler_stack, &handler->Node );
20055fc: 40 00 08 57 call 2007758 <_Chain_Append>
2005600: 90 02 20 d8 add %o0, 0xd8, %o0
}
_Thread_Enable_dispatch();
2005604: 40 00 0e 3c call 2008ef4 <_Thread_Enable_dispatch>
2005608: 81 e8 00 00 restore
200560c: 81 c7 e0 08 ret
2005610: 81 e8 00 00 restore
02006264 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
2006264: 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;
2006268: 03 00 80 56 sethi %hi(0x2015800), %g1
200626c: 80 a6 60 00 cmp %i1, 0
2006270: 02 80 00 03 be 200627c <pthread_cond_init+0x18>
2006274: a0 10 61 6c or %g1, 0x16c, %l0
2006278: a0 10 00 19 mov %i1, %l0
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
200627c: c2 04 20 04 ld [ %l0 + 4 ], %g1
2006280: 80 a0 60 01 cmp %g1, 1
2006284: 02 80 00 06 be 200629c <pthread_cond_init+0x38> <== NEVER TAKEN
2006288: 01 00 00 00 nop
return EINVAL;
if ( !the_attr->is_initialized )
200628c: c2 04 00 00 ld [ %l0 ], %g1
2006290: 80 a0 60 00 cmp %g1, 0
2006294: 12 80 00 04 bne 20062a4 <pthread_cond_init+0x40>
2006298: 05 00 80 5d sethi %hi(0x2017400), %g2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
200629c: 81 c7 e0 08 ret
20062a0: 91 e8 20 16 restore %g0, 0x16, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20062a4: c2 00 a1 b0 ld [ %g2 + 0x1b0 ], %g1
20062a8: 82 00 60 01 inc %g1
20062ac: c2 20 a1 b0 st %g1, [ %g2 + 0x1b0 ]
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
20062b0: 23 00 80 5e sethi %hi(0x2017800), %l1
20062b4: 40 00 0a c7 call 2008dd0 <_Objects_Allocate>
20062b8: 90 14 62 44 or %l1, 0x244, %o0 ! 2017a44 <_POSIX_Condition_variables_Information>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
20062bc: b2 92 20 00 orcc %o0, 0, %i1
20062c0: 02 80 00 17 be 200631c <pthread_cond_init+0xb8>
20062c4: 90 06 60 18 add %i1, 0x18, %o0
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
20062c8: c2 04 20 04 ld [ %l0 + 4 ], %g1
20062cc: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
20062d0: 92 10 20 00 clr %o1
20062d4: 94 10 28 00 mov 0x800, %o2
20062d8: 96 10 20 74 mov 0x74, %o3
20062dc: 40 00 10 cf call 200a618 <_Thread_queue_Initialize>
20062e0: c0 26 60 14 clr [ %i1 + 0x14 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20062e4: c4 06 60 08 ld [ %i1 + 8 ], %g2
20062e8: 82 14 62 44 or %l1, 0x244, %g1
20062ec: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20062f0: 03 00 00 3f sethi %hi(0xfc00), %g1
20062f4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20062f8: 82 08 80 01 and %g2, %g1, %g1
20062fc: 83 28 60 02 sll %g1, 2, %g1
2006300: f2 20 c0 01 st %i1, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2006304: c0 26 60 0c clr [ %i1 + 0xc ]
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
2006308: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
200630c: 40 00 0e 6e call 2009cc4 <_Thread_Enable_dispatch>
2006310: b0 10 20 00 clr %i0
2006314: 81 c7 e0 08 ret
2006318: 81 e8 00 00 restore
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
200631c: 40 00 0e 6a call 2009cc4 <_Thread_Enable_dispatch>
2006320: b0 10 20 0c mov 0xc, %i0
2006324: 81 c7 e0 08 ret
2006328: 81 e8 00 00 restore
020060d8 <pthread_condattr_destroy>:
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == FALSE )
20060d8: 80 a2 20 00 cmp %o0, 0
20060dc: 02 80 00 09 be 2006100 <pthread_condattr_destroy+0x28>
20060e0: 01 00 00 00 nop
20060e4: c2 02 00 00 ld [ %o0 ], %g1
20060e8: 80 a0 60 00 cmp %g1, 0
20060ec: 02 80 00 05 be 2006100 <pthread_condattr_destroy+0x28> <== NEVER TAKEN
20060f0: 01 00 00 00 nop
return EINVAL;
attr->is_initialized = FALSE;
20060f4: c0 22 00 00 clr [ %o0 ]
20060f8: 81 c3 e0 08 retl
20060fc: 90 10 20 00 clr %o0
return 0;
}
2006100: 81 c3 e0 08 retl
2006104: 90 10 20 16 mov 0x16, %o0
02006608 <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
2006608: 9d e3 bf 60 save %sp, -160, %sp
200660c: aa 10 00 18 mov %i0, %l5
POSIX_API_Control *api;
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
if ( !start_routine )
2006610: 80 a6 a0 00 cmp %i2, 0
2006614: 02 80 00 6f be 20067d0 <pthread_create+0x1c8>
2006618: b0 10 20 0e mov 0xe, %i0
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
200661c: 03 00 80 6a sethi %hi(0x201a800), %g1
2006620: 80 a6 60 00 cmp %i1, 0
2006624: 02 80 00 03 be 2006630 <pthread_create+0x28>
2006628: a2 10 60 18 or %g1, 0x18, %l1
200662c: a2 10 00 19 mov %i1, %l1
if ( !the_attr->is_initialized )
2006630: c2 04 40 00 ld [ %l1 ], %g1
2006634: 80 a0 60 00 cmp %g1, 0
2006638: 22 80 00 66 be,a 20067d0 <pthread_create+0x1c8>
200663c: b0 10 20 16 mov 0x16, %i0
* stack space if it is allowed to allocate it itself.
*
* NOTE: If the user provides the stack we will let it drop below
* twice the minimum.
*/
if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
2006640: c2 04 60 04 ld [ %l1 + 4 ], %g1
2006644: 80 a0 60 00 cmp %g1, 0
2006648: 02 80 00 07 be 2006664 <pthread_create+0x5c>
200664c: 03 00 80 6e sethi %hi(0x201b800), %g1
2006650: c4 04 60 08 ld [ %l1 + 8 ], %g2
2006654: c6 00 60 80 ld [ %g1 + 0x80 ], %g3
2006658: 80 a0 80 03 cmp %g2, %g3
200665c: 2a 80 00 5d bcs,a 20067d0 <pthread_create+0x1c8> <== ALWAYS TAKEN
2006660: b0 10 20 16 mov 0x16, %i0
* 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 ) {
2006664: c2 04 60 10 ld [ %l1 + 0x10 ], %g1
2006668: 80 a0 60 01 cmp %g1, 1
200666c: 02 80 00 5b be 20067d8 <pthread_create+0x1d0>
2006670: 80 a0 60 02 cmp %g1, 2
2006674: 22 80 00 04 be,a 2006684 <pthread_create+0x7c>
2006678: c4 04 60 18 ld [ %l1 + 0x18 ], %g2
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
200667c: 81 c7 e0 08 ret
2006680: 91 e8 20 16 restore %g0, 0x16, %o0
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
2006684: f2 04 60 14 ld [ %l1 + 0x14 ], %i1
schedparam = the_attr->schedparam;
2006688: c4 27 bf e0 st %g2, [ %fp + -32 ]
200668c: c2 04 60 1c ld [ %l1 + 0x1c ], %g1
2006690: c2 27 bf e4 st %g1, [ %fp + -28 ]
2006694: c4 04 60 20 ld [ %l1 + 0x20 ], %g2
2006698: c4 27 bf e8 st %g2, [ %fp + -24 ]
200669c: c2 04 60 24 ld [ %l1 + 0x24 ], %g1
20066a0: c2 27 bf ec st %g1, [ %fp + -20 ]
20066a4: c4 04 60 28 ld [ %l1 + 0x28 ], %g2
20066a8: c4 27 bf f0 st %g2, [ %fp + -16 ]
20066ac: c2 04 60 2c ld [ %l1 + 0x2c ], %g1
20066b0: 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 )
20066b4: c2 04 60 0c ld [ %l1 + 0xc ], %g1
20066b8: 80 a0 60 00 cmp %g1, 0
20066bc: 12 80 00 45 bne 20067d0 <pthread_create+0x1c8>
20066c0: b0 10 20 86 mov 0x86, %i0
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
20066c4: e8 07 bf e0 ld [ %fp + -32 ], %l4
20066c8: 82 05 3f ff add %l4, -1, %g1
20066cc: 80 a0 60 fd cmp %g1, 0xfd
20066d0: 18 bf ff eb bgu 200667c <pthread_create+0x74> <== NEVER TAKEN
20066d4: 80 a6 60 01 cmp %i1, 1
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
20066d8: 02 80 00 54 be 2006828 <pthread_create+0x220>
20066dc: a6 10 20 00 clr %l3
20066e0: 04 80 00 7c ble 20068d0 <pthread_create+0x2c8>
20066e4: 80 a6 60 02 cmp %i1, 2
20066e8: 02 80 00 4d be 200681c <pthread_create+0x214> <== NEVER TAKEN
20066ec: 80 a6 60 03 cmp %i1, 3
20066f0: 32 80 00 38 bne,a 20067d0 <pthread_create+0x1c8> <== NEVER TAKEN
20066f4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
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 ) <
20066f8: 40 00 11 eb call 200aea4 <_Timespec_To_ticks>
20066fc: 90 07 bf e8 add %fp, -24, %o0
2006700: a0 10 00 08 mov %o0, %l0
2006704: 40 00 11 e8 call 200aea4 <_Timespec_To_ticks>
2006708: 90 07 bf f0 add %fp, -16, %o0
200670c: 80 a4 00 08 cmp %l0, %o0
2006710: 0a 80 00 30 bcs 20067d0 <pthread_create+0x1c8>
2006714: b0 10 20 16 mov 0x16, %i0
_Timespec_To_ticks( &schedparam.ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( schedparam.ss_low_priority ) )
2006718: c2 07 bf e4 ld [ %fp + -28 ], %g1
200671c: 82 00 7f ff add %g1, -1, %g1
2006720: 80 a0 60 fd cmp %g1, 0xfd
2006724: 18 80 00 2b bgu 20067d0 <pthread_create+0x1c8>
2006728: a6 10 20 03 mov 3, %l3
200672c: 03 00 80 1b sethi %hi(0x2006c00), %g1
2006730: a0 10 60 90 or %g1, 0x90, %l0 ! 2006c90 <_POSIX_Threads_Sporadic_budget_callout>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
2006734: 2d 00 80 71 sethi %hi(0x201c400), %l6
2006738: d0 05 a3 3c ld [ %l6 + 0x33c ], %o0 ! 201c73c <_RTEMS_Allocator_Mutex>
200673c: 40 00 07 56 call 2008494 <_API_Mutex_Lock>
2006740: 31 00 80 72 sethi %hi(0x201c800), %i0
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
2006744: 40 00 09 e1 call 2008ec8 <_Objects_Allocate>
2006748: 90 16 21 10 or %i0, 0x110, %o0 ! 201c910 <_POSIX_Threads_Information>
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
200674c: a4 92 20 00 orcc %o0, 0, %l2
2006750: 02 80 00 1d be 20067c4 <pthread_create+0x1bc>
2006754: 03 00 80 6e sethi %hi(0x201b800), %g1
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
2006758: c6 04 60 08 ld [ %l1 + 8 ], %g3
200675c: c4 00 60 80 ld [ %g1 + 0x80 ], %g2
2006760: c0 27 bf dc clr [ %fp + -36 ]
2006764: 97 28 a0 01 sll %g2, 1, %o3
2006768: 80 a2 c0 03 cmp %o3, %g3
200676c: 1a 80 00 03 bcc 2006778 <pthread_create+0x170>
2006770: d4 04 60 04 ld [ %l1 + 4 ], %o2
2006774: 96 10 00 03 mov %g3, %o3
2006778: 82 07 bf dc add %fp, -36, %g1
200677c: e6 23 a0 60 st %l3, [ %sp + 0x60 ]
2006780: e0 23 a0 64 st %l0, [ %sp + 0x64 ]
2006784: c0 23 a0 68 clr [ %sp + 0x68 ]
2006788: 9a 10 20 ff mov 0xff, %o5
200678c: a6 10 20 01 mov 1, %l3
2006790: 9a 23 40 14 sub %o5, %l4, %o5
2006794: e6 23 a0 5c st %l3, [ %sp + 0x5c ]
2006798: c2 23 a0 6c st %g1, [ %sp + 0x6c ]
200679c: 90 16 21 10 or %i0, 0x110, %o0
20067a0: 92 10 00 12 mov %l2, %o1
20067a4: 40 00 0d d6 call 2009efc <_Thread_Initialize>
20067a8: 98 10 20 01 mov 1, %o4
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
20067ac: 80 8a 20 ff btst 0xff, %o0
20067b0: 12 80 00 20 bne 2006830 <pthread_create+0x228>
20067b4: 11 00 80 72 sethi %hi(0x201c800), %o0
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
20067b8: 92 10 00 12 mov %l2, %o1
20067bc: 40 00 0a be call 20092b4 <_Objects_Free>
20067c0: 90 12 21 10 or %o0, 0x110, %o0
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
20067c4: d0 05 a3 3c ld [ %l6 + 0x33c ], %o0
20067c8: 40 00 07 49 call 20084ec <_API_Mutex_Unlock>
20067cc: b0 10 20 0b mov 0xb, %i0
20067d0: 81 c7 e0 08 ret
20067d4: 81 e8 00 00 restore
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
20067d8: 03 00 80 71 sethi %hi(0x201c400), %g1
20067dc: c4 00 63 44 ld [ %g1 + 0x344 ], %g2 ! 201c744 <_Thread_Executing>
20067e0: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
20067e4: 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;
20067e8: f2 00 e0 7c ld [ %g3 + 0x7c ], %i1
schedparam = api->schedparam;
20067ec: c8 27 bf e0 st %g4, [ %fp + -32 ]
20067f0: c2 00 e0 84 ld [ %g3 + 0x84 ], %g1
20067f4: c2 27 bf e4 st %g1, [ %fp + -28 ]
20067f8: c4 00 e0 88 ld [ %g3 + 0x88 ], %g2
20067fc: c4 27 bf e8 st %g2, [ %fp + -24 ]
2006800: c2 00 e0 8c ld [ %g3 + 0x8c ], %g1
2006804: c2 27 bf ec st %g1, [ %fp + -20 ]
2006808: c4 00 e0 90 ld [ %g3 + 0x90 ], %g2
200680c: c4 27 bf f0 st %g2, [ %fp + -16 ]
2006810: c2 00 e0 94 ld [ %g3 + 0x94 ], %g1
2006814: 10 bf ff a8 b 20066b4 <pthread_create+0xac>
2006818: c2 27 bf f4 st %g1, [ %fp + -12 ]
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
200681c: a6 10 20 02 mov 2, %l3 <== NOT EXECUTED
2006820: 10 bf ff c5 b 2006734 <pthread_create+0x12c> <== NOT EXECUTED
2006824: a0 10 20 00 clr %l0 <== NOT EXECUTED
2006828: 10 bf ff c3 b 2006734 <pthread_create+0x12c>
200682c: a0 10 20 00 clr %l0
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2006830: e0 04 a1 6c ld [ %l2 + 0x16c ], %l0
api->Attributes = *the_attr;
2006834: 92 10 00 11 mov %l1, %o1
2006838: 94 10 20 38 mov 0x38, %o2
200683c: 40 00 26 83 call 2010248 <memcpy>
2006840: 90 10 00 10 mov %l0, %o0
api->detachstate = the_attr->detachstate;
2006844: c2 04 60 34 ld [ %l1 + 0x34 ], %g1
api->schedpolicy = schedpolicy;
2006848: f2 24 20 7c st %i1, [ %l0 + 0x7c ]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
200684c: c2 24 20 38 st %g1, [ %l0 + 0x38 ]
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
2006850: c2 07 bf e0 ld [ %fp + -32 ], %g1
* first run.
*
* NOTE: Since the thread starts with all unblocked, this is necessary.
*/
the_thread->do_post_task_switch_extension = true;
2006854: e6 2c a0 75 stb %l3, [ %l2 + 0x75 ]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
2006858: c2 24 20 80 st %g1, [ %l0 + 0x80 ]
200685c: c2 07 bf e4 ld [ %fp + -28 ], %g1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006860: 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;
2006864: c2 24 20 84 st %g1, [ %l0 + 0x84 ]
2006868: c2 07 bf e8 ld [ %fp + -24 ], %g1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
200686c: 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;
2006870: c2 24 20 88 st %g1, [ %l0 + 0x88 ]
2006874: c2 07 bf ec ld [ %fp + -20 ], %g1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006878: 90 10 00 12 mov %l2, %o0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
api->schedparam = schedparam;
200687c: c2 24 20 8c st %g1, [ %l0 + 0x8c ]
2006880: c2 07 bf f0 ld [ %fp + -16 ], %g1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006884: 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;
2006888: c2 24 20 90 st %g1, [ %l0 + 0x90 ]
200688c: c2 07 bf f4 ld [ %fp + -12 ], %g1
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
2006890: 98 10 20 00 clr %o4
2006894: 40 00 10 c6 call 200abac <_Thread_Start>
2006898: c2 24 20 94 st %g1, [ %l0 + 0x94 ]
start_routine,
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
200689c: 80 a6 60 03 cmp %i1, 3
20068a0: 02 80 00 19 be 2006904 <pthread_create+0x2fc>
20068a4: a2 10 00 08 mov %o0, %l1
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
20068a8: 80 8c 60 ff btst 0xff, %l1
20068ac: 12 80 00 0f bne 20068e8 <pthread_create+0x2e0> <== ALWAYS TAKEN
20068b0: 90 16 21 10 or %i0, 0x110, %o0
20068b4: 40 00 0a 80 call 20092b4 <_Objects_Free> <== NOT EXECUTED
20068b8: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
20068bc: d0 05 a3 3c ld [ %l6 + 0x33c ], %o0 <== NOT EXECUTED
20068c0: 40 00 07 0b call 20084ec <_API_Mutex_Unlock> <== NOT EXECUTED
20068c4: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
20068c8: 81 c7 e0 08 ret <== NOT EXECUTED
20068cc: 81 e8 00 00 restore <== NOT EXECUTED
*/
budget_callout = NULL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
switch ( schedpolicy ) {
20068d0: 80 a6 60 00 cmp %i1, 0
20068d4: a6 10 20 01 mov 1, %l3
20068d8: 02 bf ff 97 be 2006734 <pthread_create+0x12c>
20068dc: a0 10 20 00 clr %l0
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
20068e0: 81 c7 e0 08 ret
20068e4: 91 e8 20 16 restore %g0, 0x16, %o0
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
20068e8: c2 04 a0 08 ld [ %l2 + 8 ], %g1
_RTEMS_Unlock_allocator();
20068ec: d0 05 a3 3c ld [ %l6 + 0x33c ], %o0
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
20068f0: c2 25 40 00 st %g1, [ %l5 ]
_RTEMS_Unlock_allocator();
20068f4: 40 00 06 fe call 20084ec <_API_Mutex_Unlock>
20068f8: b0 10 20 00 clr %i0
20068fc: 81 c7 e0 08 ret
2006900: 81 e8 00 00 restore
arg,
0 /* unused */
);
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
2006904: 40 00 11 68 call 200aea4 <_Timespec_To_ticks>
2006908: 90 04 20 88 add %l0, 0x88, %o0
200690c: 92 04 20 9c add %l0, 0x9c, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006910: d0 24 20 a8 st %o0, [ %l0 + 0xa8 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006914: 11 00 80 71 sethi %hi(0x201c400), %o0
2006918: 40 00 12 78 call 200b2f8 <_Watchdog_Insert>
200691c: 90 12 23 64 or %o0, 0x364, %o0 ! 201c764 <_Watchdog_Ticks_chain>
*
* NOTE: This can only happen if someone slips in and touches the
* thread while we are creating it.
*/
if ( !status ) {
2006920: 10 bf ff e3 b 20068ac <pthread_create+0x2a4>
2006924: 80 8c 60 ff btst 0xff, %l1
02005558 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
2005558: 9d e3 bf 98 save %sp, -104, %sp
200555c: 05 00 80 59 sethi %hi(0x2016400), %g2
2005560: c2 00 a1 00 ld [ %g2 + 0x100 ], %g1 ! 2016500 <_Thread_Dispatch_disable_level>
2005564: 82 00 60 01 inc %g1
2005568: c2 20 a1 00 st %g1, [ %g2 + 0x100 ]
* _POSIX_Keys_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
200556c: 29 00 80 5a sethi %hi(0x2016800), %l4
2005570: 40 00 09 d4 call 2007cc0 <_Objects_Allocate>
2005574: 90 15 21 54 or %l4, 0x154, %o0 ! 2016954 <_POSIX_Keys_Information>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
2005578: a4 92 20 00 orcc %o0, 0, %l2
200557c: 02 80 00 2b be 2005628 <pthread_key_create+0xd0>
2005580: 03 00 80 59 sethi %hi(0x2016400), %g1
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
2005584: f2 24 a0 14 st %i1, [ %l2 + 0x14 ]
2005588: a2 10 00 12 mov %l2, %l1
200558c: a6 10 60 60 or %g1, 0x60, %l3
2005590: b2 10 20 01 mov 1, %i1
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
2005594: 83 2e 60 02 sll %i1, 2, %g1
2005598: c2 04 c0 01 ld [ %l3 + %g1 ], %g1
200559c: 80 a0 60 00 cmp %g1, 0
20055a0: 22 80 00 0e be,a 20055d8 <pthread_key_create+0x80>
20055a4: c0 24 60 1c clr [ %l1 + 0x1c ]
INTERNAL_ERROR_CORE,
TRUE,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
20055a8: c4 00 60 04 ld [ %g1 + 4 ], %g2
20055ac: c2 10 a0 10 lduh [ %g2 + 0x10 ], %g1
20055b0: 82 00 60 01 inc %g1
20055b4: a1 28 60 02 sll %g1, 2, %l0
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
20055b8: 40 00 13 64 call 200a348 <_Workspace_Allocate>
20055bc: 90 10 00 10 mov %l0, %o0
if ( !table ) {
20055c0: 82 92 20 00 orcc %o0, 0, %g1
20055c4: 02 80 00 1d be 2005638 <pthread_key_create+0xe0>
20055c8: 94 10 00 10 mov %l0, %o2
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
20055cc: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
memset( table, '\0', bytes_to_allocate );
20055d0: 40 00 27 74 call 200f3a0 <memset>
20055d4: 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++ ) {
20055d8: b2 06 60 01 inc %i1
* 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;
20055dc: 80 a6 60 05 cmp %i1, 5
20055e0: 12 bf ff ed bne 2005594 <pthread_key_create+0x3c>
20055e4: a2 04 60 04 add %l1, 4, %l1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20055e8: c4 04 a0 08 ld [ %l2 + 8 ], %g2
20055ec: 82 15 21 54 or %l4, 0x154, %g1
20055f0: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20055f4: 03 00 00 3f sethi %hi(0xfc00), %g1
20055f8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20055fc: 82 08 80 01 and %g2, %g1, %g1
2005600: 83 28 60 02 sll %g1, 2, %g1
2005604: e4 20 c0 01 st %l2, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
2005608: c0 24 a0 0c clr [ %l2 + 0xc ]
}
}
the_key->is_active = TRUE;
200560c: 82 10 20 01 mov 1, %g1
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
2005610: c4 26 00 00 st %g2, [ %i0 ]
}
}
the_key->is_active = TRUE;
2005614: c2 2c a0 10 stb %g1, [ %l2 + 0x10 ]
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
2005618: 40 00 0d 67 call 2008bb4 <_Thread_Enable_dispatch>
200561c: b0 10 20 00 clr %i0
return 0;
}
2005620: 81 c7 e0 08 ret
2005624: 81 e8 00 00 restore
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
2005628: 40 00 0d 63 call 2008bb4 <_Thread_Enable_dispatch>
200562c: b0 10 20 0b mov 0xb, %i0
2005630: 81 c7 e0 08 ret
2005634: 81 e8 00 00 restore
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;
2005638: a0 86 7f ff addcc %i1, -1, %l0
200563c: 02 80 00 0a be 2005664 <pthread_key_create+0x10c> <== ALWAYS TAKEN
2005640: 82 06 60 05 add %i1, 5, %g1
2005644: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
2005648: b2 04 80 01 add %l2, %g1, %i1 <== NOT EXECUTED
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
200564c: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
2005650: 40 00 13 37 call 200a32c <_Workspace_Free> <== NOT EXECUTED
2005654: b2 06 7f fc add %i1, -4, %i1 <== NOT EXECUTED
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;
2005658: a0 84 3f ff addcc %l0, -1, %l0 <== NOT EXECUTED
200565c: 32 bf ff fd bne,a 2005650 <pthread_key_create+0xf8> <== NOT EXECUTED
2005660: d0 06 40 00 ld [ %i1 ], %o0 <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
2005664: 90 15 21 54 or %l4, 0x154, %o0
2005668: 92 10 00 12 mov %l2, %o1
200566c: 40 00 0a 90 call 20080ac <_Objects_Free>
2005670: b0 10 20 0c mov 0xc, %i0
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
2005674: 40 00 0d 50 call 2008bb4 <_Thread_Enable_dispatch>
2005678: 01 00 00 00 nop
200567c: 81 c7 e0 08 ret
2005680: 81 e8 00 00 restore
02005684 <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
2005684: 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 *)
2005688: 23 00 80 5a sethi %hi(0x2016800), %l1
200568c: 92 10 00 18 mov %i0, %o1
2005690: 94 07 bf f4 add %fp, -12, %o2
2005694: 40 00 0a f3 call 2008260 <_Objects_Get>
2005698: 90 14 61 54 or %l1, 0x154, %o0
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
200569c: c2 07 bf f4 ld [ %fp + -12 ], %g1
20056a0: a0 10 00 08 mov %o0, %l0
20056a4: 80 a0 60 00 cmp %g1, 0
20056a8: 12 80 00 23 bne 2005734 <pthread_key_delete+0xb0>
20056ac: b0 10 20 16 mov 0x16, %i0
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
20056b0: 90 14 61 54 or %l1, 0x154, %o0
20056b4: 40 00 09 af call 2007d70 <_Objects_Close>
20056b8: 92 10 00 10 mov %l0, %o1
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
20056bc: d0 04 20 1c ld [ %l0 + 0x1c ], %o0
20056c0: 80 a2 20 00 cmp %o0, 0
20056c4: 02 80 00 04 be 20056d4 <pthread_key_delete+0x50> <== NEVER TAKEN
20056c8: c0 2c 20 10 clrb [ %l0 + 0x10 ]
_Workspace_Free( the_key->Values[ the_api ] );
20056cc: 40 00 13 18 call 200a32c <_Workspace_Free>
20056d0: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
20056d4: d0 04 20 20 ld [ %l0 + 0x20 ], %o0
20056d8: 80 a2 20 00 cmp %o0, 0
20056dc: 22 80 00 05 be,a 20056f0 <pthread_key_delete+0x6c> <== NEVER TAKEN
20056e0: d0 04 20 24 ld [ %l0 + 0x24 ], %o0 <== NOT EXECUTED
_Workspace_Free( the_key->Values[ the_api ] );
20056e4: 40 00 13 12 call 200a32c <_Workspace_Free>
20056e8: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
20056ec: d0 04 20 24 ld [ %l0 + 0x24 ], %o0
20056f0: 80 a2 20 00 cmp %o0, 0
20056f4: 22 80 00 05 be,a 2005708 <pthread_key_delete+0x84> <== NEVER TAKEN
20056f8: d0 04 20 28 ld [ %l0 + 0x28 ], %o0 <== NOT EXECUTED
_Workspace_Free( the_key->Values[ the_api ] );
20056fc: 40 00 13 0c call 200a32c <_Workspace_Free>
2005700: 01 00 00 00 nop
the_key->is_active = FALSE;
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ )
if ( the_key->Values[ the_api ] )
2005704: d0 04 20 28 ld [ %l0 + 0x28 ], %o0
2005708: 80 a2 20 00 cmp %o0, 0
200570c: 22 80 00 05 be,a 2005720 <pthread_key_delete+0x9c> <== ALWAYS TAKEN
2005710: 90 14 61 54 or %l1, 0x154, %o0
_Workspace_Free( the_key->Values[ the_api ] );
2005714: 40 00 13 06 call 200a32c <_Workspace_Free> <== NOT EXECUTED
2005718: 01 00 00 00 nop <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
200571c: 90 14 61 54 or %l1, 0x154, %o0 <== NOT EXECUTED
2005720: 92 10 00 10 mov %l0, %o1
2005724: 40 00 0a 62 call 20080ac <_Objects_Free>
2005728: b0 10 20 00 clr %i0
* NOTE: The destructor is not called and it is the responsibility
* of the application to free the memory.
*/
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
200572c: 40 00 0d 22 call 2008bb4 <_Thread_Enable_dispatch>
2005730: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2005734: 81 c7 e0 08 ret
2005738: 81 e8 00 00 restore
02019614 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
2019614: 9d e3 bf 90 save %sp, -112, %sp
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
2019618: 80 a6 60 00 cmp %i1, 0
201961c: 02 80 00 2e be 20196d4 <pthread_kill+0xc0> <== NEVER TAKEN
2019620: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2019624: a0 06 7f ff add %i1, -1, %l0
2019628: 80 a4 20 1f cmp %l0, 0x1f
201962c: 18 80 00 2a bgu 20196d4 <pthread_kill+0xc0>
2019630: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
the_thread = _Thread_Get( thread, &location );
2019634: 7f ff bf d7 call 2009590 <_Thread_Get>
2019638: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
201963c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2019640: 80 a0 60 00 cmp %g1, 0
2019644: 12 80 00 2a bne 20196ec <pthread_kill+0xd8> <== NEVER TAKEN
2019648: b0 10 00 08 mov %o0, %i0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
201964c: 87 2e 60 02 sll %i1, 2, %g3
2019650: 85 2e 60 04 sll %i1, 4, %g2
2019654: 03 00 80 94 sethi %hi(0x2025000), %g1
2019658: 84 20 80 03 sub %g2, %g3, %g2
201965c: 82 10 63 78 or %g1, 0x378, %g1
2019660: 82 00 40 02 add %g1, %g2, %g1
2019664: c6 00 60 08 ld [ %g1 + 8 ], %g3
2019668: 80 a0 e0 01 cmp %g3, 1
201966c: 02 80 00 14 be 20196bc <pthread_kill+0xa8> <== NEVER TAKEN
2019670: c8 02 21 6c ld [ %o0 + 0x16c ], %g4
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
2019674: c4 01 20 c8 ld [ %g4 + 0xc8 ], %g2
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
2019678: 92 10 00 19 mov %i1, %o1
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
201967c: b2 10 20 01 mov 1, %i1
2019680: 83 2e 40 10 sll %i1, %l0, %g1
2019684: 84 10 80 01 or %g2, %g1, %g2
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
2019688: 94 10 20 00 clr %o2
201968c: 7f ff ff 91 call 20194d0 <_POSIX_signals_Unblock_thread>
2019690: 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 ) )
2019694: 03 00 80 93 sethi %hi(0x2024c00), %g1
2019698: c4 00 62 00 ld [ %g1 + 0x200 ], %g2 ! 2024e00 <_ISR_Nest_level>
201969c: 80 a0 a0 00 cmp %g2, 0
20196a0: 02 80 00 07 be 20196bc <pthread_kill+0xa8>
20196a4: f2 2e 20 75 stb %i1, [ %i0 + 0x75 ]
20196a8: 03 00 80 93 sethi %hi(0x2024c00), %g1
20196ac: c4 00 62 24 ld [ %g1 + 0x224 ], %g2 ! 2024e24 <_Thread_Executing>
20196b0: 80 a6 00 02 cmp %i0, %g2
20196b4: 02 80 00 06 be 20196cc <pthread_kill+0xb8> <== NEVER TAKEN
20196b8: 03 00 80 93 sethi %hi(0x2024c00), %g1
_ISR_Signals_to_thread_executing = TRUE;
}
_Thread_Enable_dispatch();
20196bc: 7f ff bf 91 call 2009500 <_Thread_Enable_dispatch>
20196c0: b0 10 20 00 clr %i0
20196c4: 81 c7 e0 08 ret
20196c8: 81 e8 00 00 restore
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = TRUE;
20196cc: 10 bf ff fc b 20196bc <pthread_kill+0xa8> <== NOT EXECUTED
20196d0: f2 28 62 b8 stb %i1, [ %g1 + 0x2b8 ] <== 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 );
20196d4: 7f ff d8 4b call 200f800 <__errno>
20196d8: b0 10 3f ff mov -1, %i0
20196dc: 82 10 20 16 mov 0x16, %g1
20196e0: c2 22 00 00 st %g1, [ %o0 ]
20196e4: 81 c7 e0 08 ret
20196e8: 81 e8 00 00 restore
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
20196ec: 7f ff d8 45 call 200f800 <__errno> <== NOT EXECUTED
20196f0: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20196f4: 82 10 20 03 mov 3, %g1 <== NOT EXECUTED
20196f8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
20196fc: 81 c7 e0 08 ret <== NOT EXECUTED
2019700: 81 e8 00 00 restore <== NOT EXECUTED
020073cc <pthread_mutex_init>:
int pthread_mutex_init(
pthread_mutex_t *mutex,
const pthread_mutexattr_t *attr
)
{
20073cc: 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;
20073d0: 03 00 80 5e sethi %hi(0x2017800), %g1
20073d4: 80 a6 60 00 cmp %i1, 0
20073d8: 02 80 00 03 be 20073e4 <pthread_mutex_init+0x18>
20073dc: a0 10 61 6c or %g1, 0x16c, %l0
20073e0: a0 10 00 19 mov %i1, %l0
else the_attr = &_POSIX_Mutex_Default_attributes;
/* Check for NULL mutex */
if ( !mutex )
20073e4: 80 a6 20 00 cmp %i0, 0
20073e8: 02 80 00 17 be 2007444 <pthread_mutex_init+0x78>
20073ec: 01 00 00 00 nop
break;
}
}
#endif
if ( !the_attr->is_initialized )
20073f0: c2 04 00 00 ld [ %l0 ], %g1
20073f4: 80 a0 60 00 cmp %g1, 0
20073f8: 02 80 00 13 be 2007444 <pthread_mutex_init+0x78>
20073fc: 01 00 00 00 nop
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
2007400: c2 04 20 04 ld [ %l0 + 4 ], %g1
2007404: 80 a0 60 00 cmp %g1, 0
2007408: 12 80 00 4d bne 200753c <pthread_mutex_init+0x170> <== NEVER TAKEN
200740c: 11 00 80 5e sethi %hi(0x2017800), %o0
/*
* Determine the discipline of the mutex
*/
switch ( the_attr->protocol ) {
2007410: c2 04 20 0c ld [ %l0 + 0xc ], %g1
2007414: 80 a0 60 01 cmp %g1, 1
2007418: 02 80 00 37 be 20074f4 <pthread_mutex_init+0x128>
200741c: 80 a0 60 02 cmp %g1, 2
2007420: 02 80 00 3c be 2007510 <pthread_mutex_init+0x144>
2007424: 80 a0 60 00 cmp %g1, 0
2007428: 12 80 00 07 bne 2007444 <pthread_mutex_init+0x78>
200742c: a2 10 20 00 clr %l1
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
2007430: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007434: 82 00 7f ff add %g1, -1, %g1
2007438: 80 a0 60 fd cmp %g1, 0xfd
200743c: 08 80 00 04 bleu 200744c <pthread_mutex_init+0x80> <== ALWAYS TAKEN
2007440: 05 00 80 65 sethi %hi(0x2019400), %g2
*mutex = the_mutex->Object.id;
_Thread_Enable_dispatch();
return 0;
}
2007444: 81 c7 e0 08 ret
2007448: 91 e8 20 16 restore %g0, 0x16, %o0
200744c: c2 00 a2 00 ld [ %g2 + 0x200 ], %g1
2007450: 82 00 60 01 inc %g1
2007454: c2 20 a2 00 st %g1, [ %g2 + 0x200 ]
* _POSIX_Mutex_Allocate
*/
RTEMS_INLINE_ROUTINE POSIX_Mutex_Control *_POSIX_Mutex_Allocate( void )
{
return (POSIX_Mutex_Control *) _Objects_Allocate( &_POSIX_Mutex_Information );
2007458: 25 00 80 66 sethi %hi(0x2019800), %l2
200745c: 40 00 0a 8d call 2009e90 <_Objects_Allocate>
2007460: 90 14 a1 d0 or %l2, 0x1d0, %o0 ! 20199d0 <_POSIX_Mutex_Information>
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
2007464: b2 92 20 00 orcc %o0, 0, %i1
2007468: 02 80 00 31 be 200752c <pthread_mutex_init+0x160>
200746c: 01 00 00 00 nop
_Thread_Enable_dispatch();
return EAGAIN;
}
the_mutex->process_shared = the_attr->process_shared;
2007470: c2 04 20 04 ld [ %l0 + 4 ], %g1
2007474: c2 26 60 10 st %g1, [ %i1 + 0x10 ]
the_mutex_attr = &the_mutex->Mutex.Attributes;
if ( the_attr->recursive )
2007478: c4 04 20 10 ld [ %l0 + 0x10 ], %g2
200747c: 80 a0 a0 00 cmp %g2, 0
2007480: 32 80 00 04 bne,a 2007490 <pthread_mutex_init+0xc4> <== NEVER TAKEN
2007484: 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;
2007488: 82 10 20 01 mov 1, %g1
200748c: c2 26 60 54 st %g1, [ %i1 + 0x54 ]
the_mutex_attr->only_owner_release = TRUE;
the_mutex_attr->priority_ceiling =
2007490: 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;
2007494: 84 10 20 01 mov 1, %g2
the_mutex_attr->priority_ceiling =
2007498: 82 10 20 ff mov 0xff, %g1
200749c: 82 20 40 03 sub %g1, %g3, %g1
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
20074a0: 92 06 60 54 add %i1, 0x54, %o1
20074a4: 94 10 20 01 mov 1, %o2
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;
20074a8: c4 2e 60 58 stb %g2, [ %i1 + 0x58 ]
the_mutex_attr->priority_ceiling =
20074ac: c2 26 60 60 st %g1, [ %i1 + 0x60 ]
_POSIX_Priority_To_core( the_attr->prio_ceiling );
the_mutex_attr->discipline = the_discipline;
20074b0: e2 26 60 5c st %l1, [ %i1 + 0x5c ]
/*
* Must be initialized to unlocked.
*/
_CORE_mutex_Initialize(
20074b4: 40 00 08 35 call 2009588 <_CORE_mutex_Initialize>
20074b8: 90 06 60 14 add %i1, 0x14, %o0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20074bc: c4 06 60 08 ld [ %i1 + 8 ], %g2
20074c0: 82 14 a1 d0 or %l2, 0x1d0, %g1
20074c4: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20074c8: 03 00 00 3f sethi %hi(0xfc00), %g1
20074cc: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20074d0: 82 08 80 01 and %g2, %g1, %g1
20074d4: 83 28 60 02 sll %g1, 2, %g1
20074d8: f2 20 c0 01 st %i1, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
20074dc: c0 26 60 0c clr [ %i1 + 0xc ]
CORE_MUTEX_UNLOCKED
);
_Objects_Open_u32( &_POSIX_Mutex_Information, &the_mutex->Object, 0 );
*mutex = the_mutex->Object.id;
20074e0: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
20074e4: 40 00 0e 28 call 200ad84 <_Thread_Enable_dispatch>
20074e8: b0 10 20 00 clr %i0
20074ec: 81 c7 e0 08 ret
20074f0: 81 e8 00 00 restore
break;
default:
return EINVAL;
}
if ( !_POSIX_Priority_Is_valid( the_attr->prio_ceiling ) )
20074f4: c2 04 20 08 ld [ %l0 + 8 ], %g1
20074f8: 82 00 7f ff add %g1, -1, %g1
20074fc: 80 a0 60 fd cmp %g1, 0xfd
2007500: 18 bf ff d1 bgu 2007444 <pthread_mutex_init+0x78>
2007504: a2 10 20 02 mov 2, %l1
2007508: 10 bf ff d1 b 200744c <pthread_mutex_init+0x80>
200750c: 05 00 80 65 sethi %hi(0x2019400), %g2
2007510: c2 04 20 08 ld [ %l0 + 8 ], %g1
2007514: 82 00 7f ff add %g1, -1, %g1
2007518: 80 a0 60 fd cmp %g1, 0xfd
200751c: 18 bf ff ca bgu 2007444 <pthread_mutex_init+0x78> <== NEVER TAKEN
2007520: a2 10 20 03 mov 3, %l1
2007524: 10 bf ff ca b 200744c <pthread_mutex_init+0x80>
2007528: 05 00 80 65 sethi %hi(0x2019400), %g2
_Thread_Disable_dispatch();
the_mutex = _POSIX_Mutex_Allocate();
if ( !the_mutex ) {
_Thread_Enable_dispatch();
200752c: 40 00 0e 16 call 200ad84 <_Thread_Enable_dispatch>
2007530: b0 10 20 0b mov 0xb, %i0
2007534: 81 c7 e0 08 ret
2007538: 81 e8 00 00 restore
/*
* XXX: Be careful about attributes when global!!!
*/
assert( the_attr->process_shared == PTHREAD_PROCESS_PRIVATE );
200753c: 15 00 80 5e sethi %hi(0x2017800), %o2 <== NOT EXECUTED
2007540: 17 00 80 5e sethi %hi(0x2017800), %o3 <== NOT EXECUTED
2007544: 90 12 21 80 or %o0, 0x180, %o0 <== NOT EXECUTED
2007548: 94 12 a2 08 or %o2, 0x208, %o2 <== NOT EXECUTED
200754c: 96 12 e1 d0 or %o3, 0x1d0, %o3 <== NOT EXECUTED
2007550: 7f ff f2 93 call 2003f9c <__assert_func> <== NOT EXECUTED
2007554: 92 10 20 68 mov 0x68, %o1 <== NOT EXECUTED
020075cc <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
20075cc: 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 )
20075d0: 80 a6 a0 00 cmp %i2, 0
20075d4: 02 80 00 06 be 20075ec <pthread_mutex_setprioceiling+0x20>
20075d8: a0 10 00 18 mov %i0, %l0
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
20075dc: 82 06 7f ff add %i1, -1, %g1
20075e0: 80 a0 60 fd cmp %g1, 0xfd
20075e4: 08 80 00 04 bleu 20075f4 <pthread_mutex_setprioceiling+0x28>
20075e8: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20075ec: 81 c7 e0 08 ret
20075f0: 91 e8 20 16 restore %g0, 0x16, %o0
/*
* Must acquire the mutex before we can change it's ceiling
*/
status = pthread_mutex_lock( mutex );
20075f4: 7f ff ff da call 200755c <pthread_mutex_lock>
20075f8: 90 10 00 18 mov %i0, %o0
if ( status )
20075fc: b0 92 20 00 orcc %o0, 0, %i0
2007600: 12 80 00 14 bne 2007650 <pthread_mutex_setprioceiling+0x84>
2007604: 90 10 00 10 mov %l0, %o0
return status;
the_mutex = _POSIX_Mutex_Get( mutex, &location );
2007608: 7f ff ff 46 call 2007320 <_POSIX_Mutex_Get>
200760c: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007610: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007614: 80 a0 60 00 cmp %g1, 0
2007618: 32 80 00 0e bne,a 2007650 <pthread_mutex_setprioceiling+0x84><== NEVER TAKEN
200761c: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
2007620: c2 02 20 60 ld [ %o0 + 0x60 ], %g1
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
2007624: d2 02 20 08 ld [ %o0 + 8 ], %o1
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
2007628: 84 10 20 ff mov 0xff, %g2
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
200762c: 86 20 80 19 sub %g2, %i1, %g3
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
2007630: 84 20 80 01 sub %g2, %g1, %g2
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
2007634: c6 22 20 60 st %g3, [ %o0 + 0x60 ]
the_mutex = _POSIX_Mutex_Get( mutex, &location );
switch ( location ) {
case OBJECTS_LOCAL:
*old_ceiling = _POSIX_Priority_From_core(
2007638: c4 26 80 00 st %g2, [ %i2 ]
the_mutex->Mutex.Attributes.priority_ceiling
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
_CORE_mutex_Surrender(
200763c: 94 10 20 00 clr %o2
2007640: 40 00 08 5d call 20097b4 <_CORE_mutex_Surrender>
2007644: 90 02 20 14 add %o0, 0x14, %o0
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
2007648: 40 00 0d cf call 200ad84 <_Thread_Enable_dispatch>
200764c: 01 00 00 00 nop
2007650: 81 c7 e0 08 ret
2007654: 81 e8 00 00 restore
02007658 <pthread_mutex_timedlock>:
int pthread_mutex_timedlock(
pthread_mutex_t *mutex,
const struct timespec *abstime
)
{
2007658: 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 );
200765c: 90 10 00 19 mov %i1, %o0
2007660: 40 00 00 2f call 200771c <_POSIX_Absolute_timeout_to_ticks>
2007664: 92 07 bf f4 add %fp, -12, %o1
switch ( status ) {
2007668: 80 a2 20 02 cmp %o0, 2
200766c: 08 80 00 05 bleu 2007680 <pthread_mutex_timedlock+0x28> <== NEVER TAKEN
2007670: d4 07 bf f4 ld [ %fp + -12 ], %o2
2007674: 80 a2 20 03 cmp %o0, 3
2007678: 02 80 00 07 be 2007694 <pthread_mutex_timedlock+0x3c> <== ALWAYS TAKEN
200767c: 90 10 00 18 mov %i0, %o0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = TRUE;
break;
}
lock_status = _POSIX_Mutex_Lock_support(
2007680: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2007684: 7f ff ff bc call 2007574 <_POSIX_Mutex_Lock_support> <== NOT EXECUTED
2007688: 92 10 20 00 clr %o1 <== NOT EXECUTED
break;
}
}
return lock_status;
}
200768c: 81 c7 e0 08 ret <== NOT EXECUTED
2007690: 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(
2007694: 7f ff ff b8 call 2007574 <_POSIX_Mutex_Lock_support>
2007698: 92 10 20 01 mov 1, %o1
break;
}
}
return lock_status;
}
200769c: 81 c7 e0 08 ret
20076a0: 91 e8 00 08 restore %g0, %o0, %o0
02007204 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
if ( !attr || !attr->is_initialized )
2007204: 80 a2 20 00 cmp %o0, 0
2007208: 02 80 00 08 be 2007228 <pthread_mutexattr_setpshared+0x24>
200720c: 01 00 00 00 nop
2007210: c2 02 00 00 ld [ %o0 ], %g1
2007214: 80 a0 60 00 cmp %g1, 0
2007218: 02 80 00 04 be 2007228 <pthread_mutexattr_setpshared+0x24>
200721c: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
2007220: 28 80 00 04 bleu,a 2007230 <pthread_mutexattr_setpshared+0x2c><== ALWAYS TAKEN
2007224: d2 22 20 04 st %o1, [ %o0 + 4 ]
return 0;
default:
return EINVAL;
}
}
2007228: 81 c3 e0 08 retl
200722c: 90 10 20 16 mov 0x16, %o0
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2007230: 81 c3 e0 08 retl
2007234: 90 10 20 00 clr %o0
02006d64 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
2006d64: 9d e3 bf 90 save %sp, -112, %sp
if ( !once_control || !init_routine )
2006d68: a0 96 20 00 orcc %i0, 0, %l0
2006d6c: 02 80 00 0a be 2006d94 <pthread_once+0x30>
2006d70: 80 a6 60 00 cmp %i1, 0
2006d74: 02 80 00 08 be 2006d94 <pthread_once+0x30>
2006d78: 01 00 00 00 nop
return EINVAL;
if ( !once_control->init_executed ) {
2006d7c: c2 04 20 04 ld [ %l0 + 4 ], %g1
2006d80: 80 a0 60 00 cmp %g1, 0
2006d84: 02 80 00 06 be 2006d9c <pthread_once+0x38>
2006d88: b0 10 20 00 clr %i0
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
2006d8c: 81 c7 e0 08 ret
2006d90: 81 e8 00 00 restore
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
2006d94: 81 c7 e0 08 ret
2006d98: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
2006d9c: b0 07 bf f4 add %fp, -12, %i0
2006da0: 90 10 21 00 mov 0x100, %o0
2006da4: 92 10 21 00 mov 0x100, %o1
2006da8: 40 00 03 ba call 2007c90 <rtems_task_mode>
2006dac: 94 10 00 18 mov %i0, %o2
if ( !once_control->init_executed ) {
2006db0: c2 04 20 04 ld [ %l0 + 4 ], %g1
2006db4: 80 a0 60 00 cmp %g1, 0
2006db8: 02 80 00 09 be 2006ddc <pthread_once+0x78> <== ALWAYS TAKEN
2006dbc: 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);
2006dc0: d0 07 bf f4 ld [ %fp + -12 ], %o0 <== NOT EXECUTED
2006dc4: 94 10 00 18 mov %i0, %o2
2006dc8: 92 10 21 00 mov 0x100, %o1
2006dcc: 40 00 03 b1 call 2007c90 <rtems_task_mode>
2006dd0: b0 10 20 00 clr %i0
}
return 0;
}
2006dd4: 81 c7 e0 08 ret
2006dd8: 81 e8 00 00 restore
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;
2006ddc: c2 24 20 04 st %g1, [ %l0 + 4 ]
(*init_routine)();
2006de0: 9f c6 40 00 call %i1
2006de4: c2 24 00 00 st %g1, [ %l0 ]
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
2006de8: 10 bf ff f7 b 2006dc4 <pthread_once+0x60>
2006dec: d0 07 bf f4 ld [ %fp + -12 ], %o0
02006068 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
2006068: 9d e3 bf 88 save %sp, -120, %sp
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
200606c: 80 a6 20 00 cmp %i0, 0
2006070: 02 80 00 26 be 2006108 <pthread_rwlock_init+0xa0>
2006074: a0 10 00 19 mov %i1, %l0
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
2006078: 80 a6 60 00 cmp %i1, 0
200607c: 22 80 00 29 be,a 2006120 <pthread_rwlock_init+0xb8> <== NEVER TAKEN
2006080: 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 )
2006084: c2 04 00 00 ld [ %l0 ], %g1
2006088: 80 a0 60 00 cmp %g1, 0
200608c: 02 80 00 1f be 2006108 <pthread_rwlock_init+0xa0> <== NEVER TAKEN
2006090: 01 00 00 00 nop
return EINVAL;
switch ( the_attr->process_shared ) {
2006094: c2 04 20 04 ld [ %l0 + 4 ], %g1
2006098: 80 a0 60 00 cmp %g1, 0
200609c: 12 80 00 1b bne 2006108 <pthread_rwlock_init+0xa0> <== NEVER TAKEN
20060a0: 05 00 80 6b sethi %hi(0x201ac00), %g2
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20060a4: c2 00 a1 f0 ld [ %g2 + 0x1f0 ], %g1 ! 201adf0 <_Thread_Dispatch_disable_level>
20060a8: 82 00 60 01 inc %g1
20060ac: c2 20 a1 f0 st %g1, [ %g2 + 0x1f0 ]
* 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 *)
20060b0: 33 00 80 6c sethi %hi(0x201b000), %i1
20060b4: 40 00 0b 03 call 2008cc0 <_Objects_Allocate>
20060b8: 90 16 60 40 or %i1, 0x40, %o0 ! 201b040 <_POSIX_RWLock_Information>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
20060bc: a0 92 20 00 orcc %o0, 0, %l0
20060c0: 02 80 00 14 be 2006110 <pthread_rwlock_init+0xa8>
20060c4: 90 04 20 10 add %l0, 0x10, %o0
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
20060c8: 40 00 09 03 call 20084d4 <_CORE_RWLock_Initialize>
20060cc: 92 07 bf f4 add %fp, -12, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
20060d0: c4 04 20 08 ld [ %l0 + 8 ], %g2
20060d4: 82 16 60 40 or %i1, 0x40, %g1
20060d8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
20060dc: 03 00 00 3f sethi %hi(0xfc00), %g1
20060e0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20060e4: 82 08 80 01 and %g2, %g1, %g1
20060e8: 83 28 60 02 sll %g1, 2, %g1
20060ec: e0 20 c0 01 st %l0, [ %g3 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
20060f0: c0 24 20 0c clr [ %l0 + 0xc ]
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
20060f4: c4 26 00 00 st %g2, [ %i0 ]
_Thread_Enable_dispatch();
20060f8: 40 00 0e af call 2009bb4 <_Thread_Enable_dispatch>
20060fc: b0 10 20 00 clr %i0
2006100: 81 c7 e0 08 ret
2006104: 81 e8 00 00 restore
return 0;
}
2006108: 81 c7 e0 08 ret
200610c: 91 e8 20 16 restore %g0, 0x16, %o0
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
2006110: 40 00 0e a9 call 2009bb4 <_Thread_Enable_dispatch>
2006114: b0 10 20 0b mov 0xb, %i0
2006118: 81 c7 e0 08 ret
200611c: 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 );
2006120: 40 00 02 b5 call 2006bf4 <pthread_rwlockattr_init> <== NOT EXECUTED
2006124: 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 )
2006128: 10 bf ff d8 b 2006088 <pthread_rwlock_init+0x20> <== NOT EXECUTED
200612c: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
020061a0 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
20061a0: 9d e3 bf 90 save %sp, -112, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
20061a4: 80 a6 20 00 cmp %i0, 0
20061a8: 02 80 00 11 be 20061ec <pthread_rwlock_timedrdlock+0x4c>
20061ac: 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 );
20061b0: 92 07 bf f0 add %fp, -16, %o1
20061b4: 40 00 1e 08 call 200d9d4 <_POSIX_Absolute_timeout_to_ticks>
20061b8: a0 10 20 00 clr %l0
switch (status) {
20061bc: 80 a2 20 02 cmp %o0, 2
20061c0: 18 80 00 0e bgu 20061f8 <pthread_rwlock_timedrdlock+0x58>
20061c4: b2 10 00 08 mov %o0, %i1
20061c8: d2 06 00 00 ld [ %i0 ], %o1
20061cc: 11 00 80 6c sethi %hi(0x201b000), %o0
20061d0: 94 07 bf f4 add %fp, -12, %o2
20061d4: 40 00 0c 23 call 2009260 <_Objects_Get>
20061d8: 90 12 20 40 or %o0, 0x40, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
20061dc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20061e0: 80 a0 60 00 cmp %g1, 0
20061e4: 22 80 00 11 be,a 2006228 <pthread_rwlock_timedrdlock+0x88><== NEVER TAKEN
20061e8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
20061ec: 90 10 20 16 mov 0x16, %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20061f0: 81 c7 e0 08 ret
20061f4: 91 e8 00 08 restore %g0, %o0, %o0
* 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 );
switch (status) {
20061f8: 80 a2 20 03 cmp %o0, 3
20061fc: 12 bf ff f4 bne 20061cc <pthread_rwlock_timedrdlock+0x2c> <== NEVER TAKEN
2006200: d2 06 00 00 ld [ %i0 ], %o1
2006204: 11 00 80 6c sethi %hi(0x201b000), %o0
2006208: 94 07 bf f4 add %fp, -12, %o2
200620c: 40 00 0c 15 call 2009260 <_Objects_Get>
2006210: 90 12 20 40 or %o0, 0x40, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2006214: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006218: 80 a0 60 00 cmp %g1, 0
200621c: 12 bf ff f4 bne 20061ec <pthread_rwlock_timedrdlock+0x4c>
2006220: a0 10 20 01 mov 1, %l0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
2006224: d2 06 00 00 ld [ %i0 ], %o1
2006228: d6 07 bf f0 ld [ %fp + -16 ], %o3
200622c: a0 0c 20 ff and %l0, 0xff, %l0
2006230: 90 02 20 10 add %o0, 0x10, %o0
2006234: 94 10 00 10 mov %l0, %o2
2006238: 40 00 08 b2 call 2008500 <_CORE_RWLock_Obtain_for_reading>
200623c: 98 10 20 00 clr %o4
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2006240: 40 00 0e 5d call 2009bb4 <_Thread_Enable_dispatch>
2006244: 01 00 00 00 nop
2006248: 03 00 80 6b sethi %hi(0x201ac00), %g1
if ( !do_wait &&
200624c: 80 a4 20 00 cmp %l0, 0
2006250: 12 80 00 0f bne 200628c <pthread_rwlock_timedrdlock+0xec> <== ALWAYS TAKEN
2006254: 86 10 62 b4 or %g1, 0x2b4, %g3
2006258: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
200625c: c4 00 62 b4 ld [ %g1 + 0x2b4 ], %g2 ! 201aeb4 <_Thread_Executing><== NOT EXECUTED
2006260: 86 10 62 b4 or %g1, 0x2b4, %g3 <== NOT EXECUTED
2006264: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED
2006268: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200626c: 32 80 00 09 bne,a 2006290 <pthread_rwlock_timedrdlock+0xf0><== NOT EXECUTED
2006270: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
2006274: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2006278: 02 bf ff de be 20061f0 <pthread_rwlock_timedrdlock+0x50> <== NOT EXECUTED
200627c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
2006280: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED
2006284: 08 bf ff db bleu 20061f0 <pthread_rwlock_timedrdlock+0x50><== NOT EXECUTED
2006288: 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(
200628c: c2 00 c0 00 ld [ %g3 ], %g1
2006290: 40 00 00 44 call 20063a0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2006294: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2006298: 81 c7 e0 08 ret
200629c: 91 e8 00 08 restore %g0, %o0, %o0
020062a0 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
20062a0: 9d e3 bf 90 save %sp, -112, %sp
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
20062a4: 80 a6 20 00 cmp %i0, 0
20062a8: 02 80 00 11 be 20062ec <pthread_rwlock_timedwrlock+0x4c>
20062ac: 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 );
20062b0: 92 07 bf f0 add %fp, -16, %o1
20062b4: 40 00 1d c8 call 200d9d4 <_POSIX_Absolute_timeout_to_ticks>
20062b8: a0 10 20 00 clr %l0
switch (status) {
20062bc: 80 a2 20 02 cmp %o0, 2
20062c0: 18 80 00 0e bgu 20062f8 <pthread_rwlock_timedwrlock+0x58>
20062c4: b2 10 00 08 mov %o0, %i1
20062c8: d2 06 00 00 ld [ %i0 ], %o1
20062cc: 11 00 80 6c sethi %hi(0x201b000), %o0
20062d0: 94 07 bf f4 add %fp, -12, %o2
20062d4: 40 00 0b e3 call 2009260 <_Objects_Get>
20062d8: 90 12 20 40 or %o0, 0x40, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
20062dc: c2 07 bf f4 ld [ %fp + -12 ], %g1
20062e0: 80 a0 60 00 cmp %g1, 0
20062e4: 22 80 00 11 be,a 2006328 <pthread_rwlock_timedwrlock+0x88><== NEVER TAKEN
20062e8: d2 06 00 00 ld [ %i0 ], %o1 <== NOT EXECUTED
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
20062ec: 90 10 20 16 mov 0x16, %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
20062f0: 81 c7 e0 08 ret
20062f4: 91 e8 00 08 restore %g0, %o0, %o0
* 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 );
switch (status) {
20062f8: 80 a2 20 03 cmp %o0, 3
20062fc: 12 bf ff f4 bne 20062cc <pthread_rwlock_timedwrlock+0x2c> <== NEVER TAKEN
2006300: d2 06 00 00 ld [ %i0 ], %o1
2006304: 11 00 80 6c sethi %hi(0x201b000), %o0
2006308: 94 07 bf f4 add %fp, -12, %o2
200630c: 40 00 0b d5 call 2009260 <_Objects_Get>
2006310: 90 12 20 40 or %o0, 0x40, %o0
do_wait = TRUE;
break;
}
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
2006314: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006318: 80 a0 60 00 cmp %g1, 0
200631c: 12 bf ff f4 bne 20062ec <pthread_rwlock_timedwrlock+0x4c>
2006320: a0 10 20 01 mov 1, %l0
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
2006324: d2 06 00 00 ld [ %i0 ], %o1
2006328: d6 07 bf f0 ld [ %fp + -16 ], %o3
200632c: a0 0c 20 ff and %l0, 0xff, %l0
2006330: 90 02 20 10 add %o0, 0x10, %o0
2006334: 94 10 00 10 mov %l0, %o2
2006338: 40 00 08 a7 call 20085d4 <_CORE_RWLock_Obtain_for_writing>
200633c: 98 10 20 00 clr %o4
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
2006340: 40 00 0e 1d call 2009bb4 <_Thread_Enable_dispatch>
2006344: 01 00 00 00 nop
2006348: 03 00 80 6b sethi %hi(0x201ac00), %g1
if ( !do_wait &&
200634c: 80 a4 20 00 cmp %l0, 0
2006350: 12 80 00 0f bne 200638c <pthread_rwlock_timedwrlock+0xec> <== ALWAYS TAKEN
2006354: 86 10 62 b4 or %g1, 0x2b4, %g3
2006358: 03 00 80 6b sethi %hi(0x201ac00), %g1 <== NOT EXECUTED
200635c: c4 00 62 b4 ld [ %g1 + 0x2b4 ], %g2 ! 201aeb4 <_Thread_Executing><== NOT EXECUTED
2006360: 86 10 62 b4 or %g1, 0x2b4, %g3 <== NOT EXECUTED
2006364: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1 <== NOT EXECUTED
2006368: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
200636c: 32 80 00 09 bne,a 2006390 <pthread_rwlock_timedwrlock+0xf0><== NOT EXECUTED
2006370: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
2006374: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2006378: 02 bf ff de be 20062f0 <pthread_rwlock_timedwrlock+0x50> <== NOT EXECUTED
200637c: 90 10 20 16 mov 0x16, %o0 <== NOT EXECUTED
2006380: 80 a6 60 02 cmp %i1, 2 <== NOT EXECUTED
2006384: 08 bf ff db bleu 20062f0 <pthread_rwlock_timedwrlock+0x50><== NOT EXECUTED
2006388: 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(
200638c: c2 00 c0 00 ld [ %g3 ], %g1
2006390: 40 00 00 04 call 20063a0 <_POSIX_RWLock_Translate_core_RWLock_return_code>
2006394: d0 00 60 34 ld [ %g1 + 0x34 ], %o0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
2006398: 81 c7 e0 08 ret
200639c: 91 e8 00 08 restore %g0, %o0, %o0
02006c18 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
if ( !attr )
2006c18: 80 a2 20 00 cmp %o0, 0
2006c1c: 02 80 00 08 be 2006c3c <pthread_rwlockattr_setpshared+0x24>
2006c20: 01 00 00 00 nop
return EINVAL;
if ( !attr->is_initialized )
2006c24: c2 02 00 00 ld [ %o0 ], %g1
2006c28: 80 a0 60 00 cmp %g1, 0
2006c2c: 02 80 00 04 be 2006c3c <pthread_rwlockattr_setpshared+0x24>
2006c30: 80 a2 60 01 cmp %o1, 1
return EINVAL;
switch ( pshared ) {
2006c34: 28 80 00 04 bleu,a 2006c44 <pthread_rwlockattr_setpshared+0x2c><== ALWAYS TAKEN
2006c38: d2 22 20 04 st %o1, [ %o0 + 4 ]
return 0;
default:
return EINVAL;
}
}
2006c3c: 81 c3 e0 08 retl
2006c40: 90 10 20 16 mov 0x16, %o0
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
2006c44: 81 c3 e0 08 retl
2006c48: 90 10 20 00 clr %o0
020057b0 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
20057b0: 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() )
20057b4: 03 00 80 59 sethi %hi(0x2016400), %g1
20057b8: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20165d0 <_ISR_Nest_level>
int pthread_setcancelstate(
int state,
int *oldstate
)
{
20057bc: 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() )
20057c0: 80 a0 a0 00 cmp %g2, 0
20057c4: 12 80 00 1a bne 200582c <pthread_setcancelstate+0x7c> <== NEVER TAKEN
20057c8: b0 10 20 47 mov 0x47, %i0
return EPROTO;
if ( !oldstate )
20057cc: 80 a6 60 00 cmp %i1, 0
20057d0: 02 80 00 04 be 20057e0 <pthread_setcancelstate+0x30> <== NEVER TAKEN
20057d4: 80 a1 20 01 cmp %g4, 1
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
20057d8: 08 80 00 04 bleu 20057e8 <pthread_setcancelstate+0x38> <== ALWAYS TAKEN
20057dc: 07 00 80 59 sethi %hi(0x2016400), %g3
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
20057e0: 81 c7 e0 08 ret <== NOT EXECUTED
20057e4: 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 ];
20057e8: 31 00 80 59 sethi %hi(0x2016400), %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20057ec: c2 00 e1 30 ld [ %g3 + 0x130 ], %g1
20057f0: c4 06 21 f4 ld [ %i0 + 0x1f4 ], %g2
20057f4: 82 00 60 01 inc %g1
20057f8: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2
20057fc: c2 20 e1 30 st %g1, [ %g3 + 0x130 ]
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
2005800: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005804: 80 a1 20 00 cmp %g4, 0
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
2005808: c2 26 40 00 st %g1, [ %i1 ]
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
200580c: 12 80 00 06 bne 2005824 <pthread_setcancelstate+0x74> <== NEVER TAKEN
2005810: c8 20 a0 cc st %g4, [ %g2 + 0xcc ]
2005814: c2 00 a0 d0 ld [ %g2 + 0xd0 ], %g1
2005818: 80 a0 60 01 cmp %g1, 1
200581c: 22 80 00 06 be,a 2005834 <pthread_setcancelstate+0x84> <== NEVER TAKEN
2005820: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1 <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2005824: 40 00 0b 6b call 20085d0 <_Thread_Enable_dispatch>
2005828: b0 10 20 00 clr %i0
200582c: 81 c7 e0 08 ret
2005830: 81 e8 00 00 restore
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
thread_support->cancelability_state = state;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005834: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005838: 02 bf ff fb be 2005824 <pthread_setcancelstate+0x74> <== NOT EXECUTED
200583c: 01 00 00 00 nop <== NOT EXECUTED
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2005840: 40 00 0b 64 call 20085d0 <_Thread_Enable_dispatch> <== NOT EXECUTED
2005844: 01 00 00 00 nop <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
2005848: d0 06 21 f4 ld [ %i0 + 0x1f4 ], %o0 <== NOT EXECUTED
200584c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2005850: 7f ff fe cc call 2005380 <_POSIX_Thread_Exit> <== NOT EXECUTED
2005854: b0 10 20 00 clr %i0 <== NOT EXECUTED
2005858: 81 c7 e0 08 ret <== NOT EXECUTED
200585c: 81 e8 00 00 restore <== NOT EXECUTED
02005860 <pthread_setcanceltype>:
int pthread_setcanceltype(
int type,
int *oldtype
)
{
2005860: 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() )
2005864: 03 00 80 59 sethi %hi(0x2016400), %g1
2005868: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20165d0 <_ISR_Nest_level>
int pthread_setcanceltype(
int type,
int *oldtype
)
{
200586c: 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() )
2005870: 80 a0 a0 00 cmp %g2, 0
2005874: 12 80 00 1a bne 20058dc <pthread_setcanceltype+0x7c> <== NEVER TAKEN
2005878: b0 10 20 47 mov 0x47, %i0
return EPROTO;
if ( !oldtype )
200587c: 80 a6 60 00 cmp %i1, 0
2005880: 02 80 00 04 be 2005890 <pthread_setcanceltype+0x30> <== NEVER TAKEN
2005884: 80 a1 20 01 cmp %g4, 1
return EINVAL;
if ( type != PTHREAD_CANCEL_DEFERRED && type != PTHREAD_CANCEL_ASYNCHRONOUS )
2005888: 08 80 00 04 bleu 2005898 <pthread_setcanceltype+0x38> <== ALWAYS TAKEN
200588c: 07 00 80 59 sethi %hi(0x2016400), %g3
_Thread_Enable_dispatch();
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
return 0;
}
2005890: 81 c7 e0 08 ret <== NOT EXECUTED
2005894: 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 ];
2005898: 31 00 80 59 sethi %hi(0x2016400), %i0
200589c: c2 00 e1 30 ld [ %g3 + 0x130 ], %g1
20058a0: c4 06 21 f4 ld [ %i0 + 0x1f4 ], %g2
20058a4: 82 00 60 01 inc %g1
20058a8: c2 20 e1 30 st %g1, [ %g3 + 0x130 ]
20058ac: c6 00 a1 6c ld [ %g2 + 0x16c ], %g3
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
20058b0: c2 00 e0 d0 ld [ %g3 + 0xd0 ], %g1
20058b4: c2 26 40 00 st %g1, [ %i1 ]
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
20058b8: c4 00 e0 cc ld [ %g3 + 0xcc ], %g2
20058bc: 80 a0 a0 00 cmp %g2, 0
20058c0: 12 80 00 05 bne 20058d4 <pthread_setcanceltype+0x74> <== NEVER TAKEN
20058c4: c8 20 e0 d0 st %g4, [ %g3 + 0xd0 ]
20058c8: 80 a1 20 01 cmp %g4, 1
20058cc: 22 80 00 06 be,a 20058e4 <pthread_setcanceltype+0x84>
20058d0: c2 00 e0 d4 ld [ %g3 + 0xd4 ], %g1
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20058d4: 40 00 0b 3f call 20085d0 <_Thread_Enable_dispatch>
20058d8: b0 10 20 00 clr %i0
20058dc: 81 c7 e0 08 ret
20058e0: 81 e8 00 00 restore
_Thread_Disable_dispatch();
*oldtype = thread_support->cancelability_type;
thread_support->cancelability_type = type;
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
20058e4: 80 a0 60 00 cmp %g1, 0
20058e8: 02 bf ff fb be 20058d4 <pthread_setcanceltype+0x74> <== ALWAYS TAKEN
20058ec: 01 00 00 00 nop
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20058f0: 40 00 0b 38 call 20085d0 <_Thread_Enable_dispatch> <== NOT EXECUTED
20058f4: 01 00 00 00 nop <== NOT EXECUTED
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
20058f8: d0 06 21 f4 ld [ %i0 + 0x1f4 ], %o0 <== NOT EXECUTED
20058fc: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
2005900: 7f ff fe a0 call 2005380 <_POSIX_Thread_Exit> <== NOT EXECUTED
2005904: b0 10 20 00 clr %i0 <== NOT EXECUTED
2005908: 81 c7 e0 08 ret <== NOT EXECUTED
200590c: 81 e8 00 00 restore <== NOT EXECUTED
02007f90 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
2007f90: 9d e3 bf 90 save %sp, -112, %sp
/*
* Check all the parameters
*/
if ( !param )
2007f94: 80 a6 a0 00 cmp %i2, 0
2007f98: 22 80 00 41 be,a 200809c <pthread_setschedparam+0x10c>
2007f9c: b0 10 20 16 mov 0x16, %i0
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
2007fa0: c2 06 80 00 ld [ %i2 ], %g1
2007fa4: 82 00 7f ff add %g1, -1, %g1
2007fa8: 80 a0 60 fd cmp %g1, 0xfd
2007fac: 18 80 00 0a bgu 2007fd4 <pthread_setschedparam+0x44> <== NEVER TAKEN
2007fb0: 80 a6 60 01 cmp %i1, 1
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
2007fb4: 02 80 00 0a be 2007fdc <pthread_setschedparam+0x4c>
2007fb8: a4 10 20 00 clr %l2
2007fbc: 04 80 00 4d ble 20080f0 <pthread_setschedparam+0x160>
2007fc0: 80 a6 60 02 cmp %i1, 2
2007fc4: 02 80 00 48 be 20080e4 <pthread_setschedparam+0x154>
2007fc8: 80 a6 60 03 cmp %i1, 3
2007fcc: 02 80 00 36 be 20080a4 <pthread_setschedparam+0x114> <== ALWAYS TAKEN
2007fd0: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
2007fd4: 81 c7 e0 08 ret
2007fd8: 91 e8 20 16 restore %g0, 0x16, %o0
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
2007fdc: a6 10 20 00 clr %l3
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
2007fe0: 92 10 00 18 mov %i0, %o1
2007fe4: 11 00 80 66 sethi %hi(0x2019800), %o0
2007fe8: 94 07 bf f4 add %fp, -12, %o2
2007fec: 40 00 09 11 call 200a430 <_Objects_Get>
2007ff0: 90 12 20 90 or %o0, 0x90, %o0
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
2007ff4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007ff8: a2 10 00 08 mov %o0, %l1
2007ffc: 80 a0 60 00 cmp %g1, 0
2008000: 12 80 00 27 bne 200809c <pthread_setschedparam+0x10c>
2008004: b0 10 20 03 mov 3, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
2008008: e0 02 21 6c ld [ %o0 + 0x16c ], %l0
if ( api->schedpolicy == SCHED_SPORADIC )
200800c: c2 04 20 7c ld [ %l0 + 0x7c ], %g1
2008010: 80 a0 60 03 cmp %g1, 3
2008014: 02 80 00 46 be 200812c <pthread_setschedparam+0x19c>
2008018: 01 00 00 00 nop
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
200801c: f2 24 20 7c st %i1, [ %l0 + 0x7c ]
api->schedparam = *param;
2008020: c6 06 80 00 ld [ %i2 ], %g3
the_thread->budget_algorithm = budget_algorithm;
2008024: e4 24 60 7c st %l2, [ %l1 + 0x7c ]
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
2008028: c6 24 20 80 st %g3, [ %l0 + 0x80 ]
200802c: c2 06 a0 04 ld [ %i2 + 4 ], %g1
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
2008030: e6 24 60 80 st %l3, [ %l1 + 0x80 ]
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
2008034: c2 24 20 84 st %g1, [ %l0 + 0x84 ]
2008038: c4 06 a0 08 ld [ %i2 + 8 ], %g2
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
200803c: 80 a6 60 00 cmp %i1, 0
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
2008040: c4 24 20 88 st %g2, [ %l0 + 0x88 ]
2008044: c2 06 a0 0c ld [ %i2 + 0xc ], %g1
2008048: c2 24 20 8c st %g1, [ %l0 + 0x8c ]
200804c: c4 06 a0 10 ld [ %i2 + 0x10 ], %g2
2008050: c4 24 20 90 st %g2, [ %l0 + 0x90 ]
2008054: c2 06 a0 14 ld [ %i2 + 0x14 ], %g1
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2008058: 06 80 00 0f bl 2008094 <pthread_setschedparam+0x104> <== NEVER TAKEN
200805c: c2 24 20 94 st %g1, [ %l0 + 0x94 ]
2008060: 80 a6 60 02 cmp %i1, 2
2008064: 14 80 00 29 bg 2008108 <pthread_setschedparam+0x178>
2008068: 80 a6 60 03 cmp %i1, 3
200806c: 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;
2008070: 03 00 80 65 sethi %hi(0x2019400), %g1
2008074: c4 00 61 58 ld [ %g1 + 0x158 ], %g2 ! 2019558 <_Thread_Ticks_per_timeslice>
2008078: 92 10 20 ff mov 0xff, %o1
the_thread->real_priority =
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200807c: 90 10 00 11 mov %l1, %o0
2008080: 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;
2008084: c4 24 60 78 st %g2, [ %l1 + 0x78 ]
the_thread->real_priority =
2008088: d2 24 60 18 st %o1, [ %l1 + 0x18 ]
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
200808c: 40 00 09 a8 call 200a72c <_Thread_Change_priority>
2008090: 94 10 20 01 mov 1, %o2
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
2008094: 40 00 0b 3c call 200ad84 <_Thread_Enable_dispatch>
2008098: b0 10 20 00 clr %i0
200809c: 81 c7 e0 08 ret
20080a0: 81 e8 00 00 restore
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 ) <
20080a4: 40 00 0f 59 call 200be08 <_Timespec_To_ticks>
20080a8: 90 06 a0 08 add %i2, 8, %o0
20080ac: a0 10 00 08 mov %o0, %l0
20080b0: 40 00 0f 56 call 200be08 <_Timespec_To_ticks>
20080b4: 90 06 a0 10 add %i2, 0x10, %o0
20080b8: 80 a4 00 08 cmp %l0, %o0
20080bc: 2a bf ff f8 bcs,a 200809c <pthread_setschedparam+0x10c> <== NEVER TAKEN
20080c0: b0 10 20 16 mov 0x16, %i0 <== NOT EXECUTED
_Timespec_To_ticks( ¶m->ss_initial_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->ss_low_priority ) )
20080c4: c2 06 a0 04 ld [ %i2 + 4 ], %g1
20080c8: 82 00 7f ff add %g1, -1, %g1
20080cc: 80 a0 60 fd cmp %g1, 0xfd
20080d0: 18 bf ff c1 bgu 2007fd4 <pthread_setschedparam+0x44>
20080d4: 03 00 80 1f sethi %hi(0x2007c00), %g1
20080d8: a4 10 20 03 mov 3, %l2
20080dc: 10 bf ff c1 b 2007fe0 <pthread_setschedparam+0x50>
20080e0: a6 10 62 ac or %g1, 0x2ac, %l3
return EINVAL;
budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
budget_callout = NULL;
switch ( policy ) {
20080e4: a4 10 20 02 mov 2, %l2
20080e8: 10 bf ff be b 2007fe0 <pthread_setschedparam+0x50>
20080ec: a6 10 20 00 clr %l3
20080f0: 80 a6 60 00 cmp %i1, 0
20080f4: a4 10 20 01 mov 1, %l2
20080f8: 02 bf ff ba be 2007fe0 <pthread_setschedparam+0x50>
20080fc: a6 10 20 00 clr %l3
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
return 0;
2008100: 81 c7 e0 08 ret
2008104: 91 e8 20 16 restore %g0, 0x16, %o0
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
2008108: 12 bf ff e3 bne 2008094 <pthread_setschedparam+0x104> <== NEVER TAKEN
200810c: 01 00 00 00 nop
TRUE
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
2008110: c6 24 20 98 st %g3, [ %l0 + 0x98 ]
_Watchdog_Remove( &api->Sporadic_timer );
2008114: 40 00 10 bd call 200c408 <_Watchdog_Remove>
2008118: 90 04 20 9c add %l0, 0x9c, %o0
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
200811c: 92 10 00 11 mov %l1, %o1
2008120: 7f ff ff 77 call 2007efc <_POSIX_Threads_Sporadic_budget_TSR>
2008124: 90 10 20 00 clr %o0
2008128: 30 bf ff db b,a 2008094 <pthread_setschedparam+0x104>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
200812c: 40 00 10 b7 call 200c408 <_Watchdog_Remove>
2008130: 90 04 20 9c add %l0, 0x9c, %o0
api->schedpolicy = policy;
2008134: 10 bf ff bb b 2008020 <pthread_setschedparam+0x90>
2008138: f2 24 20 7c st %i1, [ %l0 + 0x7c ]
02005934 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
2005934: 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() )
2005938: 03 00 80 59 sethi %hi(0x2016400), %g1
200593c: c4 00 61 d0 ld [ %g1 + 0x1d0 ], %g2 ! 20165d0 <_ISR_Nest_level>
2005940: 80 a0 a0 00 cmp %g2, 0
2005944: 12 80 00 15 bne 2005998 <pthread_testcancel+0x64> <== NEVER TAKEN
2005948: 07 00 80 59 sethi %hi(0x2016400), %g3
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
200594c: 33 00 80 59 sethi %hi(0x2016400), %i1
2005950: c2 00 e1 30 ld [ %g3 + 0x130 ], %g1
2005954: c4 06 61 f4 ld [ %i1 + 0x1f4 ], %g2
2005958: 82 00 60 01 inc %g1
200595c: c4 00 a1 6c ld [ %g2 + 0x16c ], %g2
2005960: c2 20 e1 30 st %g1, [ %g3 + 0x130 ]
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
2005964: c2 00 a0 cc ld [ %g2 + 0xcc ], %g1
2005968: 80 a0 60 00 cmp %g1, 0
200596c: 12 80 00 0d bne 20059a0 <pthread_testcancel+0x6c> <== NEVER TAKEN
2005970: 01 00 00 00 nop
2005974: c2 00 a0 d4 ld [ %g2 + 0xd4 ], %g1
2005978: 80 a0 60 00 cmp %g1, 0
200597c: 02 80 00 09 be 20059a0 <pthread_testcancel+0x6c>
2005980: 01 00 00 00 nop
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
2005984: 40 00 0b 13 call 20085d0 <_Thread_Enable_dispatch>
2005988: 01 00 00 00 nop
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
200598c: f0 06 61 f4 ld [ %i1 + 0x1f4 ], %i0
2005990: 7f ff fe 7c call 2005380 <_POSIX_Thread_Exit>
2005994: 93 e8 3f ff restore %g0, -1, %o1
2005998: 81 c7 e0 08 ret <== NOT EXECUTED
200599c: 81 e8 00 00 restore <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
20059a0: 40 00 0b 0c call 20085d0 <_Thread_Enable_dispatch>
20059a4: 81 e8 00 00 restore
02015690 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
2015690: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2015694: 03 00 80 5d sethi %hi(0x2017400), %g1
2015698: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
201569c: 92 10 00 19 mov %i1, %o1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
20156a0: 80 a6 00 02 cmp %i0, %g2
20156a4: 1a 80 00 24 bcc 2015734 <read+0xa4> <== NEVER TAKEN
20156a8: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
20156ac: 03 00 80 60 sethi %hi(0x2018000), %g1
20156b0: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
20156b4: 85 2e 20 02 sll %i0, 2, %g2
20156b8: 83 2e 20 04 sll %i0, 4, %g1
20156bc: 82 20 40 02 sub %g1, %g2, %g1
20156c0: 82 00 40 18 add %g1, %i0, %g1
20156c4: 83 28 60 02 sll %g1, 2, %g1
20156c8: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open( iop );
20156cc: c2 06 20 0c ld [ %i0 + 0xc ], %g1
20156d0: 80 88 61 00 btst 0x100, %g1
20156d4: 02 80 00 18 be 2015734 <read+0xa4> <== NEVER TAKEN
20156d8: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
20156dc: 02 80 00 22 be 2015764 <read+0xd4> <== NEVER TAKEN
20156e0: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
20156e4: 02 80 00 12 be 201572c <read+0x9c> <== NEVER TAKEN
20156e8: 90 10 20 00 clr %o0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
20156ec: 80 88 60 02 btst 2, %g1
20156f0: 02 80 00 11 be 2015734 <read+0xa4> <== NEVER TAKEN
20156f4: 01 00 00 00 nop
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
20156f8: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
20156fc: c2 00 60 08 ld [ %g1 + 8 ], %g1
2015700: 80 a0 60 00 cmp %g1, 0
2015704: 02 80 00 12 be 201574c <read+0xbc> <== NEVER TAKEN
2015708: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
201570c: 9f c0 40 00 call %g1
2015710: 90 10 00 18 mov %i0, %o0
if ( rc > 0 )
2015714: 80 a2 20 00 cmp %o0, 0
2015718: 04 80 00 05 ble 201572c <read+0x9c>
201571c: 01 00 00 00 nop
iop->offset += rc;
2015720: c2 06 20 08 ld [ %i0 + 8 ], %g1
2015724: 82 00 40 08 add %g1, %o0, %g1
2015728: c2 26 20 08 st %g1, [ %i0 + 8 ]
return rc;
}
201572c: 81 c7 e0 08 ret
2015730: 91 e8 00 08 restore %g0, %o0, %o0
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
2015734: 7f ff e0 f7 call 200db10 <__errno> <== NOT EXECUTED
2015738: 01 00 00 00 nop <== NOT EXECUTED
201573c: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
2015740: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015744: 10 bf ff fa b 201572c <read+0x9c> <== NOT EXECUTED
2015748: 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 );
201574c: 7f ff e0 f1 call 200db10 <__errno> <== NOT EXECUTED
2015750: 01 00 00 00 nop <== NOT EXECUTED
2015754: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2015758: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
201575c: 10 bf ff f4 b 201572c <read+0x9c> <== NOT EXECUTED
2015760: 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_buffer( buffer );
2015764: 7f ff e0 eb call 200db10 <__errno> <== NOT EXECUTED
2015768: 01 00 00 00 nop <== NOT EXECUTED
201576c: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2015770: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015774: 10 bf ff ee b 201572c <read+0x9c> <== NOT EXECUTED
2015778: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
020053e4 <readdir>:
/*
* get next entry in a directory.
*/
struct dirent *
readdir( DIR *dirp )
{
20053e4: 9d e3 bf 98 save %sp, -104, %sp
register struct dirent *dp;
if ( !dirp )
20053e8: 80 a6 20 00 cmp %i0, 0
20053ec: 02 80 00 29 be 2005490 <readdir+0xac> <== NEVER TAKEN
20053f0: 88 10 20 00 clr %g4
20053f4: d2 06 20 0c ld [ %i0 + 0xc ], %o1
return NULL;
for (;;) {
if (dirp->dd_loc == 0) {
20053f8: c4 06 20 04 ld [ %i0 + 4 ], %g2
20053fc: 80 a0 a0 00 cmp %g2, 0
2005400: 22 80 00 1b be,a 200546c <readdir+0x88>
2005404: d0 06 00 00 ld [ %i0 ], %o0
dirp->dd_len);
if (dirp->dd_size <= 0)
return NULL;
}
if (dirp->dd_loc >= dirp->dd_size) {
2005408: c2 06 20 08 ld [ %i0 + 8 ], %g1
200540c: 80 a0 40 02 cmp %g1, %g2
2005410: 24 bf ff fa ble,a 20053f8 <readdir+0x14>
2005414: c0 26 20 04 clr [ %i0 + 4 ]
dirp->dd_loc = 0;
continue;
}
dp = (struct dirent *)(dirp->dd_buf + dirp->dd_loc);
2005418: 88 02 40 02 add %o1, %g2, %g4
if ((intptr_t)dp & 03) /* bogus pointer check */
200541c: 80 89 20 03 btst 3, %g4
2005420: 32 80 00 1c bne,a 2005490 <readdir+0xac> <== NEVER TAKEN
2005424: 88 10 20 00 clr %g4 <== NOT EXECUTED
return NULL;
if (dp->d_reclen <= 0 ||
2005428: c6 11 20 08 lduh [ %g4 + 8 ], %g3
200542c: 80 a0 e0 00 cmp %g3, 0
2005430: 02 80 00 17 be 200548c <readdir+0xa8> <== NEVER TAKEN
2005434: 9a 00 80 03 add %g2, %g3, %o5
2005438: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200543c: 82 00 60 01 inc %g1
2005440: 82 20 40 02 sub %g1, %g2, %g1
2005444: 80 a0 c0 01 cmp %g3, %g1
2005448: 34 80 00 12 bg,a 2005490 <readdir+0xac> <== NEVER TAKEN
200544c: 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;
2005450: da 26 20 04 st %o5, [ %i0 + 4 ]
if (dp->d_ino == 0)
2005454: c2 01 00 00 ld [ %g4 ], %g1
2005458: 80 a0 60 00 cmp %g1, 0
200545c: 22 bf ff e8 be,a 20053fc <readdir+0x18> <== NEVER TAKEN
2005460: c4 06 20 04 ld [ %i0 + 4 ], %g2 <== NOT EXECUTED
continue;
return (dp);
}
}
2005464: 81 c7 e0 08 ret
2005468: 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,
200546c: 40 00 1f f0 call 200d42c <getdents>
2005470: d4 06 20 10 ld [ %i0 + 0x10 ], %o2
dirp->dd_buf,
dirp->dd_len);
if (dirp->dd_size <= 0)
2005474: 80 a2 20 00 cmp %o0, 0
2005478: 04 80 00 05 ble 200548c <readdir+0xa8>
200547c: d0 26 20 08 st %o0, [ %i0 + 8 ]
2005480: c4 06 20 04 ld [ %i0 + 4 ], %g2
2005484: 10 bf ff e1 b 2005408 <readdir+0x24>
2005488: 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)
200548c: 88 10 20 00 clr %g4
continue;
return (dp);
}
}
2005490: 81 c7 e0 08 ret
2005494: 91 e8 00 04 restore %g0, %g4, %o0
020060c4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
20060c4: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
20060c8: 80 a6 60 00 cmp %i1, 0
20060cc: 02 80 00 27 be 2006168 <readlink+0xa4> <== NEVER TAKEN
20060d0: 90 10 00 18 mov %i0, %o0
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
20060d4: a0 07 bf e8 add %fp, -24, %l0
20060d8: 92 10 20 00 clr %o1
20060dc: 94 10 00 10 mov %l0, %o2
20060e0: 96 10 20 00 clr %o3
20060e4: 7f ff f9 9b call 2004750 <rtems_filesystem_evaluate_path>
20060e8: b0 10 3f ff mov -1, %i0
if ( result != 0 )
20060ec: 80 a2 20 00 cmp %o0, 0
20060f0: 12 80 00 1c bne 2006160 <readlink+0x9c> <== NEVER TAKEN
20060f4: c4 07 bf f0 ld [ %fp + -16 ], %g2
return -1;
if ( !loc.ops->node_type_h ){
20060f8: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
20060fc: 80 a0 60 00 cmp %g1, 0
2006100: 22 80 00 31 be,a 20061c4 <readlink+0x100> <== NEVER TAKEN
2006104: 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 ){
2006108: 9f c0 40 00 call %g1
200610c: 90 10 00 10 mov %l0, %o0
2006110: 80 a2 20 04 cmp %o0, 4
2006114: 12 80 00 1b bne 2006180 <readlink+0xbc>
2006118: 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 ){
200611c: c2 00 a0 3c ld [ %g2 + 0x3c ], %g1
2006120: 80 a0 60 00 cmp %g1, 0
2006124: 02 80 00 27 be 20061c0 <readlink+0xfc> <== NEVER TAKEN
2006128: 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 );
200612c: 94 10 00 1a mov %i2, %o2
2006130: 9f c0 40 00 call %g1
2006134: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2006138: c2 07 bf f0 ld [ %fp + -16 ], %g1
200613c: 80 a0 60 00 cmp %g1, 0
2006140: 02 80 00 08 be 2006160 <readlink+0x9c> <== NEVER TAKEN
2006144: b0 10 00 08 mov %o0, %i0
2006148: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200614c: 80 a0 60 00 cmp %g1, 0
2006150: 02 80 00 26 be 20061e8 <readlink+0x124> <== NEVER TAKEN
2006154: 01 00 00 00 nop
2006158: 9f c0 40 00 call %g1
200615c: 90 10 00 10 mov %l0, %o0
return result;
}
2006160: 81 c7 e0 08 ret
2006164: 81 e8 00 00 restore
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
2006168: 40 00 30 75 call 201233c <__errno> <== NOT EXECUTED
200616c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006170: 82 10 20 0e mov 0xe, %g1 <== NOT EXECUTED
2006174: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006178: 81 c7 e0 08 ret <== NOT EXECUTED
200617c: 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 );
2006180: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006184: 80 a0 60 00 cmp %g1, 0
2006188: 02 80 00 08 be 20061a8 <readlink+0xe4> <== NEVER TAKEN
200618c: 01 00 00 00 nop
2006190: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006194: 80 a0 60 00 cmp %g1, 0
2006198: 02 80 00 04 be 20061a8 <readlink+0xe4> <== NEVER TAKEN
200619c: 01 00 00 00 nop
20061a0: 9f c0 40 00 call %g1
20061a4: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EINVAL );
20061a8: 40 00 30 65 call 201233c <__errno>
20061ac: b0 10 3f ff mov -1, %i0
20061b0: 82 10 20 16 mov 0x16, %g1
20061b4: c2 22 00 00 st %g1, [ %o0 ]
20061b8: 81 c7 e0 08 ret
20061bc: 81 e8 00 00 restore
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
20061c0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
20061c4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20061c8: 02 80 00 04 be 20061d8 <readlink+0x114> <== NOT EXECUTED
20061cc: 01 00 00 00 nop <== NOT EXECUTED
20061d0: 9f c0 40 00 call %g1 <== NOT EXECUTED
20061d4: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20061d8: 40 00 30 59 call 201233c <__errno> <== NOT EXECUTED
20061dc: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20061e0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20061e4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20061e8: 81 c7 e0 08 ret <== NOT EXECUTED
20061ec: 81 e8 00 00 restore <== NOT EXECUTED
02015800 <realloc>:
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
2015800: 9d e3 bf 90 save %sp, -112, %sp
2015804: 03 00 80 60 sethi %hi(0x2018000), %g1
2015808: a2 10 61 98 or %g1, 0x198, %l1 ! 2018198 <rtems_malloc_statistics>
201580c: c4 04 60 10 ld [ %l1 + 0x10 ], %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
2015810: 03 00 80 61 sethi %hi(0x2018400), %g1
2015814: c6 00 60 b4 ld [ %g1 + 0xb4 ], %g3 ! 20184b4 <_System_state_Current>
{
size_t old_size;
char *new_area;
size_t resize;
MSBUMP(realloc_calls, 1);
2015818: 84 00 a0 01 inc %g2
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
201581c: 80 a0 e0 03 cmp %g3, 3
2015820: 02 80 00 3b be 201590c <realloc+0x10c> <== ALWAYS TAKEN
2015824: c4 24 60 10 st %g2, [ %l1 + 0x10 ]
}
/*
* Continue with realloc().
*/
if ( !ptr )
2015828: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
201582c: 02 80 00 13 be 2015878 <realloc+0x78> <== NEVER TAKEN
2015830: 80 a6 60 00 cmp %i1, 0
return malloc( size );
if ( !size ) {
2015834: 02 80 00 2b be 20158e0 <realloc+0xe0> <== NEVER TAKEN
2015838: 21 00 80 60 sethi %hi(0x2018000), %l0
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
201583c: 92 10 00 18 mov %i0, %o1
2015840: 90 14 21 40 or %l0, 0x140, %o0
2015844: 40 00 00 78 call 2015a24 <_Protected_heap_Get_block_size>
2015848: 94 07 bf f4 add %fp, -12, %o2
201584c: 80 8a 20 ff btst 0xff, %o0
2015850: 02 80 00 29 be 20158f4 <realloc+0xf4>
2015854: 90 14 21 40 or %l0, 0x140, %o0
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( &RTEMS_Malloc_Heap, ptr, resize ) ) {
2015858: 92 10 00 18 mov %i0, %o1
201585c: 40 00 00 7f call 2015a58 <_Protected_heap_Resize_block>
2015860: 94 10 00 19 mov %i1, %o2
2015864: 80 8a 20 ff btst 0xff, %o0
2015868: 02 80 00 08 be 2015888 <realloc+0x88>
201586c: 01 00 00 00 nop
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
2015870: 81 c7 e0 08 ret
2015874: 81 e8 00 00 restore
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
2015878: 7f ff d5 d3 call 200afc4 <malloc> <== NOT EXECUTED
201587c: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
2015880: 81 c7 e0 08 ret <== NOT EXECUTED
2015884: 91 e8 00 08 restore %g0, %o0, %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.
*/
new_area = malloc( size );
2015888: 7f ff d5 cf call 200afc4 <malloc>
201588c: 90 10 00 19 mov %i1, %o0
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
2015890: c2 04 60 04 ld [ %l1 + 4 ], %g1
* There used to be a free on this error case but it is wrong to
* free the memory per OpenGroup Single UNIX Specification V2
* and the C Standard.
*/
new_area = malloc( size );
2015894: a0 10 00 08 mov %o0, %l0
MSBUMP(malloc_calls, -1); /* subtract off the malloc */
2015898: 82 00 7f ff add %g1, -1, %g1
if ( !new_area ) {
201589c: 80 a2 20 00 cmp %o0, 0
20158a0: 02 80 00 24 be 2015930 <realloc+0x130> <== NEVER TAKEN
20158a4: c2 24 60 04 st %g1, [ %l1 + 4 ]
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
20158a8: c2 07 bf f4 ld [ %fp + -12 ], %g1
20158ac: 80 a6 40 01 cmp %i1, %g1
20158b0: 08 80 00 03 bleu 20158bc <realloc+0xbc> <== NEVER TAKEN
20158b4: 90 10 00 19 mov %i1, %o0
20158b8: 90 10 00 01 mov %g1, %o0
20158bc: 94 10 00 08 mov %o0, %o2
20158c0: 92 10 00 18 mov %i0, %o1
20158c4: 7f ff e2 85 call 200e2d8 <memcpy>
20158c8: 90 10 00 10 mov %l0, %o0
free( ptr );
20158cc: 90 10 00 18 mov %i0, %o0
20158d0: 7f ff d4 3e call 200a9c8 <free>
20158d4: b0 10 00 10 mov %l0, %i0
20158d8: 81 c7 e0 08 ret
20158dc: 81 e8 00 00 restore
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
20158e0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20158e4: 7f ff d4 39 call 200a9c8 <free> <== NOT EXECUTED
20158e8: b0 10 20 00 clr %i0 <== NOT EXECUTED
20158ec: 81 c7 e0 08 ret <== NOT EXECUTED
20158f0: 81 e8 00 00 restore <== NOT EXECUTED
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(&RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
20158f4: 7f ff e0 87 call 200db10 <__errno>
20158f8: b0 10 20 00 clr %i0
20158fc: 82 10 20 16 mov 0x16, %g1
2015900: c2 22 00 00 st %g1, [ %o0 ]
2015904: 81 c7 e0 08 ret
2015908: 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)
201590c: 03 00 80 60 sethi %hi(0x2018000), %g1
2015910: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 2018310 <_Thread_Dispatch_disable_level>
2015914: 80 a0 a0 00 cmp %g2, 0
2015918: 12 80 00 06 bne 2015930 <realloc+0x130> <== NEVER TAKEN
201591c: 03 00 80 60 sethi %hi(0x2018000), %g1
return (void *) 0;
if (_ISR_Nest_level > 0)
2015920: c4 00 63 b0 ld [ %g1 + 0x3b0 ], %g2 ! 20183b0 <_ISR_Nest_level>
2015924: 80 a0 a0 00 cmp %g2, 0
2015928: 02 bf ff c1 be 201582c <realloc+0x2c> <== ALWAYS TAKEN
201592c: 80 a6 20 00 cmp %i0, 0
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
2015930: 81 c7 e0 08 ret <== NOT EXECUTED
2015934: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02005498 <rewinddir>:
#include <unistd.h>
void rewinddir(
DIR *dirp
)
{
2005498: 9d e3 bf 98 save %sp, -104, %sp
off_t status;
if ( !dirp )
200549c: 80 a6 20 00 cmp %i0, 0
20054a0: 02 80 00 08 be 20054c0 <rewinddir+0x28>
20054a4: 92 10 20 00 clr %o1
return;
status = lseek( dirp->dd_fd, 0, SEEK_SET );
20054a8: d0 06 00 00 ld [ %i0 ], %o0
20054ac: 7f ff fa e2 call 2004034 <lseek>
20054b0: 94 10 20 00 clr %o2
if( status == -1 )
20054b4: 80 a2 3f ff cmp %o0, -1
20054b8: 32 80 00 02 bne,a 20054c0 <rewinddir+0x28> <== ALWAYS TAKEN
20054bc: c0 26 20 04 clr [ %i0 + 4 ]
20054c0: 81 c7 e0 08 ret
20054c4: 81 e8 00 00 restore
0200626c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
200626c: 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 );
2006270: 92 10 20 00 clr %o1
2006274: 90 10 00 18 mov %i0, %o0
2006278: a0 07 bf e8 add %fp, -24, %l0
200627c: 96 10 20 00 clr %o3
2006280: 7f ff f9 4d call 20047b4 <rtems_filesystem_evaluate_path>
2006284: 94 10 00 10 mov %l0, %o2
if ( result != 0 )
2006288: 80 a2 20 00 cmp %o0, 0
200628c: 02 80 00 04 be 200629c <rmdir+0x30>
2006290: 90 10 20 02 mov 2, %o0
result = (*loc.handlers->rmnod_h)( &loc );
rtems_filesystem_freenode( &loc );
return result;
}
2006294: 81 c7 e0 08 ret
2006298: 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 );
200629c: 7f ff f9 16 call 20046f4 <rtems_filesystem_evaluate_parent>
20062a0: 92 10 00 10 mov %l0, %o1
if (result != 0) {
20062a4: 80 a2 20 00 cmp %o0, 0
20062a8: 12 80 00 2d bne 200635c <rmdir+0xf0> <== NEVER TAKEN
20062ac: c4 07 bf f0 ld [ %fp + -16 ], %g2
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
20062b0: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
20062b4: 80 a0 60 00 cmp %g1, 0
20062b8: 22 80 00 35 be,a 200638c <rmdir+0x120> <== NEVER TAKEN
20062bc: 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 ){
20062c0: 9f c0 40 00 call %g1
20062c4: 90 10 00 10 mov %l0, %o0
20062c8: 80 a2 20 01 cmp %o0, 1
20062cc: 12 80 00 14 bne 200631c <rmdir+0xb0>
20062d0: c2 07 bf ec ld [ %fp + -20 ], %g1
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
20062d4: c2 00 60 34 ld [ %g1 + 0x34 ], %g1
20062d8: 80 a0 60 00 cmp %g1, 0
20062dc: 22 80 00 37 be,a 20063b8 <rmdir+0x14c> <== NEVER TAKEN
20062e0: 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 );
20062e4: 9f c0 40 00 call %g1
20062e8: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
20062ec: c2 07 bf f0 ld [ %fp + -16 ], %g1
20062f0: 80 a0 60 00 cmp %g1, 0
20062f4: 02 80 00 08 be 2006314 <rmdir+0xa8> <== NEVER TAKEN
20062f8: b0 10 00 08 mov %o0, %i0
20062fc: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006300: 80 a0 60 00 cmp %g1, 0
2006304: 02 80 00 2b be 20063b0 <rmdir+0x144> <== NEVER TAKEN
2006308: 01 00 00 00 nop
200630c: 9f c0 40 00 call %g1
2006310: 90 10 00 10 mov %l0, %o0
2006314: 81 c7 e0 08 ret
2006318: 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 );
200631c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006320: 80 a0 60 00 cmp %g1, 0
2006324: 02 80 00 08 be 2006344 <rmdir+0xd8> <== NEVER TAKEN
2006328: 01 00 00 00 nop
200632c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006330: 80 a0 60 00 cmp %g1, 0
2006334: 02 80 00 04 be 2006344 <rmdir+0xd8> <== NEVER TAKEN
2006338: 01 00 00 00 nop
200633c: 9f c0 40 00 call %g1
2006340: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( ENOTDIR );
2006344: 40 00 2e 7f call 2011d40 <__errno>
2006348: b0 10 3f ff mov -1, %i0
200634c: 82 10 20 14 mov 0x14, %g1
2006350: c2 22 00 00 st %g1, [ %o0 ]
2006354: 81 c7 e0 08 ret
2006358: 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 );
200635c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2006360: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006364: 02 bf ff ec be 2006314 <rmdir+0xa8> <== NOT EXECUTED
2006368: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200636c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2006370: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006374: 02 bf ff e8 be 2006314 <rmdir+0xa8> <== NOT EXECUTED
2006378: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
200637c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006380: 01 00 00 00 nop <== NOT EXECUTED
2006384: 81 c7 e0 08 ret <== NOT EXECUTED
2006388: 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 );
200638c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006390: 02 80 00 04 be 20063a0 <rmdir+0x134> <== NOT EXECUTED
2006394: 01 00 00 00 nop <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
2006398: 9f c0 40 00 call %g1 <== NOT EXECUTED
200639c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
20063a0: 40 00 2e 68 call 2011d40 <__errno> <== NOT EXECUTED
20063a4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20063a8: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20063ac: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20063b0: 81 c7 e0 08 ret <== NOT EXECUTED
20063b4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
20063b8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20063bc: 02 bf ff f9 be 20063a0 <rmdir+0x134> <== NOT EXECUTED
20063c0: 01 00 00 00 nop <== NOT EXECUTED
20063c4: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
20063c8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20063cc: 12 bf ff f3 bne 2006398 <rmdir+0x12c> <== NOT EXECUTED
20063d0: 01 00 00 00 nop <== NOT EXECUTED
20063d4: 30 bf ff f3 b,a 20063a0 <rmdir+0x134> <== NOT EXECUTED
0200cf8c <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200cf8c: 9d e3 bf 98 save %sp, -104, %sp
200cf90: a2 10 20 01 mov 1, %l1
200cf94: a4 10 00 18 mov %i0, %l2
200cf98: a0 10 20 00 clr %l0
200cf9c: 10 80 00 05 b 200cfb0 <rtems_assoc_local_by_remote_bitfield+0x24>
200cfa0: b0 10 20 00 clr %i0
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200cfa4: 80 a4 20 20 cmp %l0, 0x20
200cfa8: 02 80 00 0d be 200cfdc <rtems_assoc_local_by_remote_bitfield+0x50>
200cfac: a3 2c 60 01 sll %l1, 1, %l1
if (b & remote_value)
200cfb0: 80 8c 40 19 btst %l1, %i1
200cfb4: 22 bf ff fc be,a 200cfa4 <rtems_assoc_local_by_remote_bitfield+0x18>
200cfb8: a0 04 20 01 inc %l0
local_value |= rtems_assoc_local_by_remote(ap, b);
200cfbc: 92 10 00 11 mov %l1, %o1
200cfc0: 40 00 00 09 call 200cfe4 <rtems_assoc_local_by_remote>
200cfc4: 90 10 00 12 mov %l2, %o0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200cfc8: a0 04 20 01 inc %l0
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
200cfcc: b0 16 00 08 or %i0, %o0, %i0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
200cfd0: 80 a4 20 20 cmp %l0, 0x20
200cfd4: 12 bf ff f7 bne 200cfb0 <rtems_assoc_local_by_remote_bitfield+0x24><== ALWAYS TAKEN
200cfd8: a3 2c 60 01 sll %l1, 1, %l1
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
200cfdc: 81 c7 e0 08 ret
200cfe0: 81 e8 00 00 restore
0200ef64 <rtems_assoc_name_bad>:
const char *
rtems_assoc_name_bad(
uint32_t bad_value
)
{
200ef64: 11 00 80 71 sethi %hi(0x201c400), %o0 <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
200ef68: 81 c3 e0 08 retl <== NOT EXECUTED
200ef6c: 90 12 22 a8 or %o0, 0x2a8, %o0 ! 201c6a8 <bad_buffer.5040><== NOT EXECUTED
0200c6b8 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200c6b8: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
200c6bc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200c6c0: 40 00 00 0b call 200c6ec <rtems_assoc_ptr_by_local> <== NOT EXECUTED
200c6c4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
if (nap)
200c6c8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200c6cc: 02 80 00 05 be 200c6e0 <rtems_assoc_name_by_local+0x28> <== NOT EXECUTED
200c6d0: 01 00 00 00 nop <== NOT EXECUTED
return nap->name;
return rtems_assoc_name_bad(local_value);
}
200c6d4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
200c6d8: 81 c7 e0 08 ret <== NOT EXECUTED
200c6dc: 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);
200c6e0: 40 00 0a 21 call 200ef64 <rtems_assoc_name_bad> <== NOT EXECUTED
200c6e4: 91 e8 00 19 restore %g0, %i1, %o0 <== NOT EXECUTED
0200da20 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200da20: 9d e3 bf 98 save %sp, -104, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200da24: d0 06 00 00 ld [ %i0 ], %o0
200da28: 80 a2 20 00 cmp %o0, 0
200da2c: 02 80 00 1d be 200daa0 <rtems_assoc_ptr_by_local+0x80> <== NEVER TAKEN
200da30: 13 00 80 5b sethi %hi(0x2016c00), %o1
200da34: 40 00 05 07 call 200ee50 <strcmp>
200da38: 92 12 61 58 or %o1, 0x158, %o1 ! 2016d58 <__func__.5619+0x18>
200da3c: 80 a2 20 00 cmp %o0, 0
200da40: 02 80 00 11 be 200da84 <rtems_assoc_ptr_by_local+0x64> <== NEVER TAKEN
200da44: 86 10 20 00 clr %g3
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
200da48: c2 06 20 04 ld [ %i0 + 4 ], %g1
200da4c: 80 a0 40 19 cmp %g1, %i1
200da50: 32 80 00 07 bne,a 200da6c <rtems_assoc_ptr_by_local+0x4c>
200da54: b0 06 20 0c add %i0, 0xc, %i0
200da58: 30 80 00 14 b,a 200daa8 <rtems_assoc_ptr_by_local+0x88>
200da5c: 80 a0 40 19 cmp %g1, %i1
200da60: 02 80 00 12 be 200daa8 <rtems_assoc_ptr_by_local+0x88>
200da64: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200da68: b0 06 20 0c add %i0, 0xc, %i0
200da6c: c2 06 00 00 ld [ %i0 ], %g1
200da70: 80 a0 60 00 cmp %g1, 0
200da74: 32 bf ff fa bne,a 200da5c <rtems_assoc_ptr_by_local+0x3c>
200da78: c2 06 20 04 ld [ %i0 + 4 ], %g1
if (ap->local_value == local_value)
return ap;
return default_ap;
}
200da7c: 81 c7 e0 08 ret
200da80: 91 e8 00 03 restore %g0, %g3, %o0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200da84: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
200da88: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200da8c: 02 80 00 07 be 200daa8 <rtems_assoc_ptr_by_local+0x88> <== NOT EXECUTED
200da90: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED
200da94: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED
200da98: 10 bf ff ec b 200da48 <rtems_assoc_ptr_by_local+0x28> <== NOT EXECUTED
200da9c: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200daa0: 81 c7 e0 08 ret <== NOT EXECUTED
200daa4: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200daa8: 81 c7 e0 08 ret
200daac: 81 e8 00 00 restore
0200d00c <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
200d00c: 9d e3 bf 98 save %sp, -104, %sp
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200d010: d0 06 00 00 ld [ %i0 ], %o0
200d014: 80 a2 20 00 cmp %o0, 0
200d018: 02 80 00 1d be 200d08c <rtems_assoc_ptr_by_remote+0x80> <== NEVER TAKEN
200d01c: 13 00 80 5b sethi %hi(0x2016c00), %o1
200d020: 40 00 07 8c call 200ee50 <strcmp>
200d024: 92 12 61 58 or %o1, 0x158, %o1 ! 2016d58 <__func__.5619+0x18>
200d028: 80 a2 20 00 cmp %o0, 0
200d02c: 02 80 00 11 be 200d070 <rtems_assoc_ptr_by_remote+0x64> <== NEVER TAKEN
200d030: 86 10 20 00 clr %g3
default_ap = ap++;
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
200d034: c2 06 20 08 ld [ %i0 + 8 ], %g1
200d038: 80 a0 40 19 cmp %g1, %i1
200d03c: 32 80 00 07 bne,a 200d058 <rtems_assoc_ptr_by_remote+0x4c>
200d040: b0 06 20 0c add %i0, 0xc, %i0
200d044: 30 80 00 14 b,a 200d094 <rtems_assoc_ptr_by_remote+0x88>
200d048: 80 a0 40 19 cmp %g1, %i1
200d04c: 02 80 00 12 be 200d094 <rtems_assoc_ptr_by_remote+0x88>
200d050: 01 00 00 00 nop
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200d054: b0 06 20 0c add %i0, 0xc, %i0
200d058: c2 06 00 00 ld [ %i0 ], %g1
200d05c: 80 a0 60 00 cmp %g1, 0
200d060: 32 bf ff fa bne,a 200d048 <rtems_assoc_ptr_by_remote+0x3c>
200d064: c2 06 20 08 ld [ %i0 + 8 ], %g1
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
200d068: 81 c7 e0 08 ret
200d06c: 91 e8 00 03 restore %g0, %g3, %o0
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
200d070: c2 06 20 0c ld [ %i0 + 0xc ], %g1 <== NOT EXECUTED
200d074: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200d078: 02 80 00 07 be 200d094 <rtems_assoc_ptr_by_remote+0x88> <== NOT EXECUTED
200d07c: 84 06 20 0c add %i0, 0xc, %g2 <== NOT EXECUTED
200d080: 86 10 00 18 mov %i0, %g3 <== NOT EXECUTED
200d084: 10 bf ff ec b 200d034 <rtems_assoc_ptr_by_remote+0x28> <== NOT EXECUTED
200d088: b0 10 00 02 mov %g2, %i0 <== NOT EXECUTED
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
200d08c: 81 c7 e0 08 ret <== NOT EXECUTED
200d090: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
200d094: 81 c7 e0 08 ret
200d098: 81 e8 00 00 restore
0200d09c <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
200d09c: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
200d0a0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
200d0a4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
200d0a8: 40 00 02 5e call 200da20 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
200d0ac: b0 10 20 00 clr %i0 <== NOT EXECUTED
if (nap)
200d0b0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
200d0b4: 32 80 00 02 bne,a 200d0bc <rtems_assoc_remote_by_local+0x20><== NOT EXECUTED
200d0b8: f0 02 20 08 ld [ %o0 + 8 ], %i0 <== NOT EXECUTED
return nap->remote_value;
return 0;
}
200d0bc: 81 c7 e0 08 ret <== NOT EXECUTED
200d0c0: 81 e8 00 00 restore <== NOT EXECUTED
02005d1c <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
2005d1c: 9d e3 bf 90 save %sp, -112, %sp
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
2005d20: a2 96 20 00 orcc %i0, 0, %l1
2005d24: 02 80 00 25 be 2005db8 <rtems_barrier_create+0x9c> <== NEVER TAKEN
2005d28: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2005d2c: 80 a6 e0 00 cmp %i3, 0
2005d30: 02 80 00 22 be 2005db8 <rtems_barrier_create+0x9c> <== NEVER TAKEN
2005d34: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
2005d38: 80 8e 60 10 btst 0x10, %i1
2005d3c: 02 80 00 21 be 2005dc0 <rtems_barrier_create+0xa4>
2005d40: 80 a6 a0 00 cmp %i2, 0
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
2005d44: 02 80 00 1d be 2005db8 <rtems_barrier_create+0x9c>
2005d48: b0 10 20 0a mov 0xa, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005d4c: 05 00 80 71 sethi %hi(0x201c400), %g2
2005d50: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1 ! 201c5d0 <_Thread_Dispatch_disable_level>
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
2005d54: c0 27 bf f0 clr [ %fp + -16 ]
2005d58: 82 00 60 01 inc %g1
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
2005d5c: f4 27 bf f4 st %i2, [ %fp + -12 ]
2005d60: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ]
* 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 );
2005d64: 21 00 80 71 sethi %hi(0x201c400), %l0
2005d68: 40 00 08 13 call 2007db4 <_Objects_Allocate>
2005d6c: 90 14 20 54 or %l0, 0x54, %o0 ! 201c454 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
2005d70: b4 92 20 00 orcc %o0, 0, %i2
2005d74: 02 80 00 20 be 2005df4 <rtems_barrier_create+0xd8> <== NEVER TAKEN
2005d78: 90 06 a0 14 add %i2, 0x14, %o0
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
2005d7c: 92 07 bf f0 add %fp, -16, %o1
2005d80: 40 00 05 b4 call 2007450 <_CORE_barrier_Initialize>
2005d84: f2 26 a0 10 st %i1, [ %i2 + 0x10 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005d88: c4 06 a0 08 ld [ %i2 + 8 ], %g2
2005d8c: 82 14 20 54 or %l0, 0x54, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2005d90: e2 26 a0 0c st %l1, [ %i2 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005d94: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
2005d98: c4 26 c0 00 st %g2, [ %i3 ]
2005d9c: 03 00 00 3f sethi %hi(0xfc00), %g1
2005da0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005da4: 84 08 80 01 and %g2, %g1, %g2
2005da8: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
2005dac: b0 10 20 00 clr %i0
2005db0: 40 00 0b ec call 2008d60 <_Thread_Enable_dispatch>
2005db4: f4 20 c0 02 st %i2, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
2005db8: 81 c7 e0 08 ret
2005dbc: 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;
2005dc0: 82 10 20 01 mov 1, %g1
2005dc4: 05 00 80 71 sethi %hi(0x201c400), %g2
2005dc8: c2 27 bf f0 st %g1, [ %fp + -16 ]
2005dcc: c2 00 a1 d0 ld [ %g2 + 0x1d0 ], %g1
the_attributes.maximum_count = maximum_waiters;
2005dd0: f4 27 bf f4 st %i2, [ %fp + -12 ]
2005dd4: 82 00 60 01 inc %g1
2005dd8: c2 20 a1 d0 st %g1, [ %g2 + 0x1d0 ]
2005ddc: 21 00 80 71 sethi %hi(0x201c400), %l0
2005de0: 40 00 07 f5 call 2007db4 <_Objects_Allocate>
2005de4: 90 14 20 54 or %l0, 0x54, %o0 ! 201c454 <_Barrier_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
2005de8: b4 92 20 00 orcc %o0, 0, %i2
2005dec: 12 bf ff e4 bne 2005d7c <rtems_barrier_create+0x60>
2005df0: 90 06 a0 14 add %i2, 0x14, %o0
_Thread_Enable_dispatch();
2005df4: 40 00 0b db call 2008d60 <_Thread_Enable_dispatch>
2005df8: b0 10 20 05 mov 5, %i0
2005dfc: 81 c7 e0 08 ret
2005e00: 81 e8 00 00 restore
02005ea4 <rtems_barrier_release>:
rtems_status_code rtems_barrier_release(
rtems_id id,
uint32_t *released
)
{
2005ea4: 9d e3 bf 90 save %sp, -112, %sp
2005ea8: a0 10 00 18 mov %i0, %l0
Barrier_Control *the_barrier;
Objects_Locations location;
if ( !released )
2005eac: 80 a6 60 00 cmp %i1, 0
2005eb0: 02 80 00 12 be 2005ef8 <rtems_barrier_release+0x54> <== NEVER TAKEN
2005eb4: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
2005eb8: 11 00 80 71 sethi %hi(0x201c400), %o0
2005ebc: 92 10 00 10 mov %l0, %o1
2005ec0: 90 12 20 54 or %o0, 0x54, %o0
2005ec4: 40 00 09 24 call 2008354 <_Objects_Get>
2005ec8: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
2005ecc: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005ed0: 80 a0 60 00 cmp %g1, 0
2005ed4: 12 80 00 09 bne 2005ef8 <rtems_barrier_release+0x54>
2005ed8: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*released = _CORE_barrier_Release( &the_barrier->Barrier, id, NULL );
2005edc: 92 10 00 10 mov %l0, %o1
2005ee0: 94 10 20 00 clr %o2
2005ee4: 40 00 05 67 call 2007480 <_CORE_barrier_Release>
2005ee8: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
2005eec: b0 10 20 00 clr %i0
2005ef0: 40 00 0b 9c call 2008d60 <_Thread_Enable_dispatch>
2005ef4: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005ef8: 81 c7 e0 08 ret
2005efc: 81 e8 00 00 restore
02004ee8 <rtems_clock_get>:
rtems_status_code rtems_clock_get(
rtems_clock_get_options option,
void *time_buffer
)
{
2004ee8: 9d e3 bf 98 save %sp, -104, %sp
2004eec: 82 10 00 18 mov %i0, %g1
if ( !time_buffer )
2004ef0: 80 a6 60 00 cmp %i1, 0
2004ef4: 02 80 00 10 be 2004f34 <rtems_clock_get+0x4c> <== NEVER TAKEN
2004ef8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
2004efc: 80 a0 60 04 cmp %g1, 4
2004f00: 18 80 00 0d bgu 2004f34 <rtems_clock_get+0x4c>
2004f04: b0 10 20 0a mov 0xa, %i0
2004f08: 83 28 60 02 sll %g1, 2, %g1
2004f0c: 05 00 80 13 sethi %hi(0x2004c00), %g2
2004f10: 84 10 a2 d4 or %g2, 0x2d4, %g2 ! 2004ed4 <rtems_termios_rxdaemon+0x90>
2004f14: c6 00 80 01 ld [ %g2 + %g1 ], %g3
2004f18: 81 c0 c0 00 jmp %g3
2004f1c: 01 00 00 00 nop
*interval = rtems_clock_get_ticks_per_second();
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TIME_VALUE:
return rtems_clock_get_tod_timeval( (struct timeval *)time_buffer );
2004f20: 40 00 00 5a call 2005088 <rtems_clock_get_tod_timeval>
2004f24: 91 e8 00 19 restore %g0, %i1, %o0
return RTEMS_SUCCESSFUL;
}
case RTEMS_CLOCK_GET_TICKS_PER_SECOND: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_per_second();
2004f28: 40 00 00 1d call 2004f9c <rtems_clock_get_ticks_per_second>
2004f2c: b0 10 20 00 clr %i0
2004f30: d0 26 40 00 st %o0, [ %i1 ]
2004f34: 81 c7 e0 08 ret
2004f38: 81 e8 00 00 restore
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
case RTEMS_CLOCK_GET_TICKS_SINCE_BOOT: {
rtems_interval *interval = (rtems_interval *)time_buffer;
*interval = rtems_clock_get_ticks_since_boot();
2004f3c: 40 00 00 20 call 2004fbc <rtems_clock_get_ticks_since_boot>
2004f40: b0 10 20 00 clr %i0
2004f44: d0 26 40 00 st %o0, [ %i1 ]
2004f48: 81 c7 e0 08 ret
2004f4c: 81 e8 00 00 restore
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
case RTEMS_CLOCK_GET_SECONDS_SINCE_EPOCH:
return rtems_clock_get_seconds_since_epoch((rtems_interval *)time_buffer);
2004f50: 40 00 00 05 call 2004f64 <rtems_clock_get_seconds_since_epoch>
2004f54: 91 e8 00 19 restore %g0, %i1, %o0
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
switch ( option ) {
case RTEMS_CLOCK_GET_TOD:
return rtems_clock_get_tod( (rtems_time_of_day *)time_buffer );
2004f58: 40 00 00 1d call 2004fcc <rtems_clock_get_tod>
2004f5c: 91 e8 00 19 restore %g0, %i1, %o0
02004f64 <rtems_clock_get_seconds_since_epoch>:
rtems_status_code rtems_clock_get_seconds_since_epoch(
rtems_interval *the_interval
)
{
if ( !the_interval )
2004f64: 86 92 20 00 orcc %o0, 0, %g3
2004f68: 02 80 00 0b be 2004f94 <rtems_clock_get_seconds_since_epoch+0x30><== NEVER TAKEN
2004f6c: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004f70: 03 00 80 60 sethi %hi(0x2018000), %g1
2004f74: c4 08 63 24 ldub [ %g1 + 0x324 ], %g2 ! 2018324 <_TOD_Is_set>
2004f78: 80 a0 a0 00 cmp %g2, 0
2004f7c: 02 80 00 06 be 2004f94 <rtems_clock_get_seconds_since_epoch+0x30>
2004f80: 90 10 20 0b mov 0xb, %o0
return RTEMS_NOT_DEFINED;
*the_interval = _TOD_Seconds_since_epoch;
2004f84: 03 00 80 60 sethi %hi(0x2018000), %g1
2004f88: c4 00 63 a4 ld [ %g1 + 0x3a4 ], %g2 ! 20183a4 <_TOD_Now>
2004f8c: 90 10 20 00 clr %o0
2004f90: c4 20 c0 00 st %g2, [ %g3 ]
return RTEMS_SUCCESSFUL;
}
2004f94: 81 c3 e0 08 retl
02004fcc <rtems_clock_get_tod>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod(
rtems_time_of_day *time_buffer
)
{
2004fcc: 9d e3 bf 60 save %sp, -160, %sp
rtems_time_of_day *tmbuf = time_buffer;
struct tm time;
struct timeval now;
if ( !time_buffer )
2004fd0: a2 96 20 00 orcc %i0, 0, %l1
2004fd4: 02 80 00 2b be 2005080 <rtems_clock_get_tod+0xb4> <== NEVER TAKEN
2004fd8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2004fdc: 03 00 80 60 sethi %hi(0x2018000), %g1
2004fe0: c4 08 63 24 ldub [ %g1 + 0x324 ], %g2 ! 2018324 <_TOD_Is_set>
2004fe4: 80 a0 a0 00 cmp %g2, 0
2004fe8: 02 80 00 26 be 2005080 <rtems_clock_get_tod+0xb4>
2004fec: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
2004ff0: 7f ff f3 7d call 2001de4 <sparc_disable_interrupts>
2004ff4: 01 00 00 00 nop
2004ff8: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
2004ffc: 40 00 06 13 call 2006848 <_TOD_Get>
2005000: 90 07 bf e8 add %fp, -24, %o0
_ISR_Enable(level);
2005004: 7f ff f3 7c call 2001df4 <sparc_enable_interrupts>
2005008: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
200500c: c2 07 bf e8 ld [ %fp + -24 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2005010: d0 07 bf ec ld [ %fp + -20 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
2005014: c2 27 bf f0 st %g1, [ %fp + -16 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
2005018: 40 00 3d 89 call 201463c <.udiv>
200501c: 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 );
2005020: 92 07 bf c4 add %fp, -60, %o1
2005024: d0 27 bf f4 st %o0, [ %fp + -12 ]
2005028: 40 00 24 a7 call 200e2c4 <gmtime_r>
200502c: 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;
2005030: 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;
2005034: 03 00 80 61 sethi %hi(0x2018400), %g1
2005038: d0 07 bf f4 ld [ %fp + -12 ], %o0
200503c: d2 00 60 b0 ld [ %g1 + 0xb0 ], %o1
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;
2005040: c4 24 60 08 st %g2, [ %l1 + 8 ]
tmbuf->hour = time.tm_hour;
2005044: c2 07 bf cc ld [ %fp + -52 ], %g1
tmbuf->minute = time.tm_min;
2005048: 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;
200504c: c2 24 60 0c st %g1, [ %l1 + 0xc ]
tmbuf->minute = time.tm_min;
2005050: c4 24 60 10 st %g2, [ %l1 + 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;
2005054: c2 07 bf d8 ld [ %fp + -40 ], %g1
tmbuf->month = time.tm_mon + 1;
2005058: 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;
200505c: c6 07 bf c4 ld [ %fp + -60 ], %g3
/* 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;
2005060: 82 00 67 6c add %g1, 0x76c, %g1
tmbuf->month = time.tm_mon + 1;
2005064: 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;
2005068: c6 24 60 14 st %g3, [ %l1 + 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;
200506c: c2 24 40 00 st %g1, [ %l1 ]
tmbuf->month = time.tm_mon + 1;
2005070: c4 24 60 04 st %g2, [ %l1 + 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;
2005074: 40 00 3d 72 call 201463c <.udiv>
2005078: b0 10 20 00 clr %i0
200507c: d0 24 60 18 st %o0, [ %l1 + 0x18 ]
return RTEMS_SUCCESSFUL;
}
2005080: 81 c7 e0 08 ret
2005084: 81 e8 00 00 restore
02005088 <rtems_clock_get_tod_timeval>:
#include <rtems/score/watchdog.h>
rtems_status_code rtems_clock_get_tod_timeval(
struct timeval *time
)
{
2005088: 9d e3 bf 90 save %sp, -112, %sp
if ( !time )
200508c: a2 96 20 00 orcc %i0, 0, %l1
2005090: 02 80 00 15 be 20050e4 <rtems_clock_get_tod_timeval+0x5c> <== NEVER TAKEN
2005094: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Is_set )
2005098: 03 00 80 60 sethi %hi(0x2018000), %g1
200509c: c4 08 63 24 ldub [ %g1 + 0x324 ], %g2 ! 2018324 <_TOD_Is_set>
20050a0: 80 a0 a0 00 cmp %g2, 0
20050a4: 02 80 00 10 be 20050e4 <rtems_clock_get_tod_timeval+0x5c>
20050a8: b0 10 20 0b mov 0xb, %i0
)
{
ISR_Level level;
struct timespec now;
_ISR_Disable(level);
20050ac: 7f ff f3 4e call 2001de4 <sparc_disable_interrupts>
20050b0: 01 00 00 00 nop
20050b4: a0 10 00 08 mov %o0, %l0
_TOD_Get( &now );
20050b8: 40 00 05 e4 call 2006848 <_TOD_Get>
20050bc: 90 07 bf f0 add %fp, -16, %o0
_ISR_Enable(level);
20050c0: 7f ff f3 4d call 2001df4 <sparc_enable_interrupts>
20050c4: 90 10 00 10 mov %l0, %o0
time->tv_sec = now.tv_sec;
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
20050c8: d0 07 bf f4 ld [ %fp + -12 ], %o0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
20050cc: c2 07 bf f0 ld [ %fp + -16 ], %g1
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
20050d0: 92 10 23 e8 mov 0x3e8, %o1
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
time->tv_sec = now.tv_sec;
20050d4: c2 24 40 00 st %g1, [ %l1 ]
time->tv_usec = now.tv_nsec / TOD_NANOSECONDS_PER_MICROSECOND;
20050d8: 40 00 3d 59 call 201463c <.udiv>
20050dc: b0 10 20 00 clr %i0
20050e0: d0 24 60 04 st %o0, [ %l1 + 4 ]
return RTEMS_NOT_DEFINED;
_TOD_Get_timeval( time );
return RTEMS_SUCCESSFUL;
}
20050e4: 81 c7 e0 08 ret
20050e8: 81 e8 00 00 restore
020052e0 <rtems_clock_get_uptime>:
* error code - if unsuccessful
*/
rtems_status_code rtems_clock_get_uptime(
struct timespec *uptime
)
{
20052e0: 9d e3 bf 98 save %sp, -104, %sp
if ( !uptime )
20052e4: 90 96 20 00 orcc %i0, 0, %o0
20052e8: 02 80 00 04 be 20052f8 <rtems_clock_get_uptime+0x18> <== NEVER TAKEN
20052ec: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_TOD_Get_uptime( uptime );
20052f0: 40 00 06 6c call 2006ca0 <_TOD_Get_uptime>
20052f4: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
20052f8: 81 c7 e0 08 ret
20052fc: 81 e8 00 00 restore
020062d4 <rtems_clock_set>:
*/
rtems_status_code rtems_clock_set(
rtems_time_of_day *time_buffer
)
{
20062d4: 9d e3 bf 90 save %sp, -112, %sp
struct timespec newtime;
if ( !time_buffer )
20062d8: a0 96 20 00 orcc %i0, 0, %l0
20062dc: 02 80 00 08 be 20062fc <rtems_clock_set+0x28> <== NEVER TAKEN
20062e0: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
20062e4: 90 10 00 10 mov %l0, %o0
20062e8: 40 00 00 6b call 2006494 <_TOD_Validate>
20062ec: b0 10 20 14 mov 0x14, %i0
20062f0: 80 8a 20 ff btst 0xff, %o0
20062f4: 12 80 00 04 bne 2006304 <rtems_clock_set+0x30>
20062f8: 01 00 00 00 nop
_TOD_Set( &newtime );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
20062fc: 81 c7 e0 08 ret
2006300: 81 e8 00 00 restore
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
2006304: 40 00 00 2f call 20063c0 <_TOD_To_seconds>
2006308: 90 10 00 10 mov %l0, %o0
newtime.tv_nsec = time_buffer->ticks *
200630c: 03 00 80 93 sethi %hi(0x2024c00), %g1
if ( !time_buffer )
return RTEMS_INVALID_ADDRESS;
if ( _TOD_Validate( time_buffer ) ) {
newtime.tv_sec = _TOD_To_seconds( time_buffer );
2006310: d0 27 bf f0 st %o0, [ %fp + -16 ]
newtime.tv_nsec = time_buffer->ticks *
2006314: d2 00 63 00 ld [ %g1 + 0x300 ], %o1
2006318: 40 00 46 74 call 2017ce8 <.umul>
200631c: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2006320: 07 00 80 93 sethi %hi(0x2024c00), %g3
2006324: c4 00 e1 60 ld [ %g3 + 0x160 ], %g2 ! 2024d60 <_Thread_Dispatch_disable_level>
2006328: 89 2a 20 02 sll %o0, 2, %g4
200632c: 84 00 a0 01 inc %g2
2006330: 83 2a 20 07 sll %o0, 7, %g1
2006334: c4 20 e1 60 st %g2, [ %g3 + 0x160 ]
2006338: 82 20 40 04 sub %g1, %g4, %g1
200633c: 82 00 40 08 add %g1, %o0, %g1
2006340: 83 28 60 03 sll %g1, 3, %g1
2006344: c2 27 bf f4 st %g1, [ %fp + -12 ]
(_TOD_Microseconds_per_tick * TOD_NANOSECONDS_PER_MICROSECOND);
_Thread_Disable_dispatch();
_TOD_Set( &newtime );
2006348: 90 07 bf f0 add %fp, -16, %o0
200634c: 40 00 07 36 call 2008024 <_TOD_Set>
2006350: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2006354: 40 00 0c 6b call 2009500 <_Thread_Enable_dispatch>
2006358: 01 00 00 00 nop
return RTEMS_SUCCESSFUL;
}
return RTEMS_INVALID_CLOCK;
}
200635c: 81 c7 e0 08 ret
2006360: 81 e8 00 00 restore
020050ec <rtems_clock_set_nanoseconds_extension>:
*/
rtems_status_code rtems_clock_set_nanoseconds_extension(
rtems_nanoseconds_extension_routine routine
)
{
if ( !routine )
20050ec: 84 92 20 00 orcc %o0, 0, %g2
20050f0: 02 80 00 05 be 2005104 <rtems_clock_set_nanoseconds_extension+0x18><== NEVER TAKEN
20050f4: 90 10 20 09 mov 9, %o0
return RTEMS_INVALID_ADDRESS;
_Watchdog_Nanoseconds_since_tick_handler = routine;
20050f8: 03 00 80 61 sethi %hi(0x2018400), %g1
20050fc: 90 10 20 00 clr %o0
2005100: c4 20 60 b8 st %g2, [ %g1 + 0xb8 ]
return RTEMS_SUCCESSFUL;
}
2005104: 81 c3 e0 08 retl
02002a78 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2002a78: 9d e3 bf 60 save %sp, -160, %sp
struct timespec uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2002a7c: 80 a6 60 00 cmp %i1, 0
2002a80: 02 80 00 6e be 2002c38 <rtems_cpu_usage_report_with_plugin+0x1c0><== NEVER TAKEN
2002a84: 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 );
2002a88: 40 00 15 3f call 2007f84 <_TOD_Get_uptime>
2002a8c: 90 07 bf e8 add %fp, -24, %o0
_Timespec_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2002a90: 92 07 bf e8 add %fp, -24, %o1
2002a94: b4 07 bf e0 add %fp, -32, %i2
2002a98: 11 00 80 94 sethi %hi(0x2025000), %o0
2002a9c: 94 10 00 1a mov %i2, %o2
2002aa0: 40 00 1f d1 call 200a9e4 <_Timespec_Subtract>
2002aa4: 90 12 23 18 or %o0, 0x318, %o0
}
}
}
#endif
(*print)( context, "CPU Usage by thread\n"
2002aa8: 90 10 00 18 mov %i0, %o0
2002aac: 13 00 80 68 sethi %hi(0x201a000), %o1
2002ab0: 9f c6 40 00 call %i1
2002ab4: 92 12 62 f8 or %o1, 0x2f8, %o1 ! 201a2f8 <pollCallbacks.4788+0x310>
2002ab8: 03 00 80 93 sethi %hi(0x2024c00), %g1
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2002abc: 05 00 80 68 sethi %hi(0x201a000), %g2
}
}
}
#endif
(*print)( context, "CPU Usage by thread\n"
2002ac0: a6 10 60 c4 or %g1, 0xc4, %l3
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
(*print)(
2002ac4: b6 10 a3 40 or %g2, 0x340, %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 ) {
2002ac8: 03 00 80 93 sethi %hi(0x2024c00), %g1
/*
* Print the information
*/
(*print)( context,
2002acc: 05 00 80 68 sethi %hi(0x201a000), %g2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002ad0: a8 07 bf c0 add %fp, -64, %l4
/*
* 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 ) {
2002ad4: b8 10 62 24 or %g1, 0x224, %i4
/*
* Print the information
*/
(*print)( context,
2002ad8: ba 10 a3 58 or %g2, 0x358, %i5
2002adc: aa 07 bf d8 add %fp, -40, %l5
_Timespec_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002ae0: ae 07 bf f4 add %fp, -12, %l7
2002ae4: ac 07 bf f0 add %fp, -16, %l6
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
2002ae8: c2 04 c0 00 ld [ %l3 ], %g1
2002aec: 80 a0 60 00 cmp %g1, 0
2002af0: 22 80 00 44 be,a 2002c00 <rtems_cpu_usage_report_with_plugin+0x188>
2002af4: a6 04 e0 04 add %l3, 4, %l3
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2002af8: e4 00 60 04 ld [ %g1 + 4 ], %l2
if ( information ) {
2002afc: 80 a4 a0 00 cmp %l2, 0
2002b00: 22 80 00 40 be,a 2002c00 <rtems_cpu_usage_report_with_plugin+0x188><== NEVER TAKEN
2002b04: a6 04 e0 04 add %l3, 4, %l3 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
2002b08: c2 14 a0 10 lduh [ %l2 + 0x10 ], %g1
2002b0c: 86 90 60 00 orcc %g1, 0, %g3
2002b10: 02 80 00 3b be 2002bfc <rtems_cpu_usage_report_with_plugin+0x184>
2002b14: a2 10 20 01 mov 1, %l1
the_thread = (Thread_Control *)information->local_table[ i ];
2002b18: 10 80 00 17 b 2002b74 <rtems_cpu_usage_report_with_plugin+0xfc>
2002b1c: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
_Timespec_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002b20: 96 10 00 16 mov %l6, %o3
2002b24: 90 10 00 15 mov %l5, %o0
2002b28: 40 00 1f 1c call 200a798 <_Timespec_Divide>
2002b2c: 92 10 00 1a mov %i2, %o1
/*
* Print the information
*/
(*print)( context,
2002b30: d0 07 bf dc ld [ %fp + -36 ], %o0
2002b34: 40 00 54 a7 call 2017dd0 <.udiv>
2002b38: 92 10 23 e8 mov 0x3e8, %o1
2002b3c: d4 07 bf d8 ld [ %fp + -40 ], %o2
2002b40: d8 07 bf f4 ld [ %fp + -12 ], %o4
2002b44: da 07 bf f0 ld [ %fp + -16 ], %o5
2002b48: 96 10 00 08 mov %o0, %o3
2002b4c: 92 10 00 1d mov %i5, %o1
2002b50: 9f c6 40 00 call %i1
2002b54: 90 10 00 18 mov %i0, %o0
2002b58: c6 14 a0 10 lduh [ %l2 + 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++ ) {
2002b5c: 83 28 e0 10 sll %g3, 0x10, %g1
2002b60: 83 30 60 10 srl %g1, 0x10, %g1
2002b64: 80 a0 40 11 cmp %g1, %l1
2002b68: 2a 80 00 26 bcs,a 2002c00 <rtems_cpu_usage_report_with_plugin+0x188>
2002b6c: a6 04 e0 04 add %l3, 4, %l3
the_thread = (Thread_Control *)information->local_table[ i ];
2002b70: c4 04 a0 1c ld [ %l2 + 0x1c ], %g2
2002b74: 83 2c 60 02 sll %l1, 2, %g1
2002b78: e0 00 80 01 ld [ %g2 + %g1 ], %l0
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002b7c: 94 10 00 14 mov %l4, %o2
2002b80: 92 10 20 0d mov 0xd, %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 )
2002b84: 80 a4 20 00 cmp %l0, 0
2002b88: 02 bf ff f5 be 2002b5c <rtems_cpu_usage_report_with_plugin+0xe4><== NEVER TAKEN
2002b8c: a2 04 60 01 inc %l1
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2002b90: 40 00 0f 8f call 20069cc <rtems_object_get_name>
2002b94: d0 04 20 08 ld [ %l0 + 8 ], %o0
(*print)(
2002b98: d4 04 20 08 ld [ %l0 + 8 ], %o2
2002b9c: 90 10 00 18 mov %i0, %o0
2002ba0: 92 10 00 1b mov %i3, %o1
2002ba4: 9f c6 40 00 call %i1
2002ba8: 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;
2002bac: c4 04 20 84 ld [ %l0 + 0x84 ], %g2
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002bb0: c6 07 00 00 ld [ %i4 ], %g3
#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;
2002bb4: c4 27 bf d8 st %g2, [ %fp + -40 ]
2002bb8: c2 04 20 88 ld [ %l0 + 0x88 ], %g1
2002bbc: c2 27 bf dc st %g1, [ %fp + -36 ]
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2002bc0: c4 00 e0 08 ld [ %g3 + 8 ], %g2
2002bc4: c2 04 20 08 ld [ %l0 + 8 ], %g1
2002bc8: 80 a0 80 01 cmp %g2, %g1
2002bcc: 32 bf ff d5 bne,a 2002b20 <rtems_cpu_usage_report_with_plugin+0xa8>
2002bd0: 94 10 00 17 mov %l7, %o2
struct timespec used;
_Timespec_Subtract(
2002bd4: 92 07 bf e8 add %fp, -24, %o1
2002bd8: 94 07 bf d0 add %fp, -48, %o2
2002bdc: 11 00 80 93 sethi %hi(0x2024c00), %o0
2002be0: 40 00 1f 81 call 200a9e4 <_Timespec_Subtract>
2002be4: 90 12 22 2c or %o0, 0x22c, %o0 ! 2024e2c <_Thread_Time_of_last_context_switch>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timespec_Add_to( &ran, &used );
2002be8: 90 10 00 15 mov %l5, %o0
2002bec: 40 00 1e d1 call 200a730 <_Timespec_Add_to>
2002bf0: 92 07 bf d0 add %fp, -48, %o1
};
_Timespec_Divide( &ran, &total, &ival, &fval );
2002bf4: 10 bf ff cb b 2002b20 <rtems_cpu_usage_report_with_plugin+0xa8>
2002bf8: 94 10 00 17 mov %l7, %o2
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++ ) {
2002bfc: a6 04 e0 04 add %l3, 4, %l3
" ID NAME TICKS PERCENT\n"
#endif
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
2002c00: 03 00 80 93 sethi %hi(0x2024c00), %g1
2002c04: 82 10 60 d4 or %g1, 0xd4, %g1 ! 2024cd4 <_Objects_Information_table+0x14>
2002c08: 80 a4 c0 01 cmp %l3, %g1
2002c0c: 32 bf ff b8 bne,a 2002aec <rtems_cpu_usage_report_with_plugin+0x74>
2002c10: c2 04 c0 00 ld [ %l3 ], %g1
}
}
}
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
(*print)( context, "Time since last CPU Usage reset %" PRId32
2002c14: d0 07 bf e4 ld [ %fp + -28 ], %o0
2002c18: 40 00 54 6e call 2017dd0 <.udiv>
2002c1c: 92 10 23 e8 mov 0x3e8, %o1
2002c20: d4 07 bf e0 ld [ %fp + -32 ], %o2
2002c24: 96 10 00 08 mov %o0, %o3
2002c28: 13 00 80 68 sethi %hi(0x201a000), %o1
2002c2c: 90 10 00 18 mov %i0, %o0
2002c30: 9f c6 40 00 call %i1
2002c34: 92 12 63 70 or %o1, 0x370, %o1
2002c38: 81 c7 e0 08 ret
2002c3c: 81 e8 00 00 restore
0200cbc4 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
static int
rtems_deviceio_errno(rtems_status_code code)
{
200cbc4: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t) code)))
200cbc8: 11 00 80 5b sethi %hi(0x2016c00), %o0 <== NOT EXECUTED
200cbcc: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
200cbd0: 40 00 01 33 call 200d09c <rtems_assoc_remote_by_local> <== NOT EXECUTED
200cbd4: 90 12 20 3c or %o0, 0x3c, %o0 <== NOT EXECUTED
200cbd8: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
200cbdc: 02 80 00 05 be 200cbf0 <rtems_deviceio_errno+0x2c> <== NOT EXECUTED
200cbe0: 01 00 00 00 nop <== NOT EXECUTED
{
errno = rc;
200cbe4: 40 00 03 cb call 200db10 <__errno> <== NOT EXECUTED
200cbe8: 01 00 00 00 nop <== NOT EXECUTED
200cbec: f0 22 00 00 st %i0, [ %o0 ] <== NOT EXECUTED
return -1;
}
return -1;
}
200cbf0: 81 c7 e0 08 ret <== NOT EXECUTED
200cbf4: 91 e8 3f ff restore %g0, -1, %o0 <== NOT EXECUTED
02003078 <rtems_error>:
int rtems_error(
int error_flag,
const char *printf_format,
...
)
{
2003078: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
200307c: 94 07 a0 4c add %fp, 0x4c, %o2 <== NOT EXECUTED
2003080: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2003084: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
2003088: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
200308c: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
2003090: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003094: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003098: 7f ff ff 71 call 2002e5c <rtems_verror> <== NOT EXECUTED
200309c: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
20030a0: 81 c7 e0 08 ret <== NOT EXECUTED
20030a4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
02005168 <rtems_event_receive>:
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
2005168: 9d e3 bf 98 save %sp, -104, %sp
200516c: 90 10 00 18 mov %i0, %o0
2005170: 96 10 00 1b mov %i3, %o3
2005174: 92 10 00 19 mov %i1, %o1
2005178: 94 10 00 1a mov %i2, %o2
RTEMS_API_Control *api;
if ( !event_out )
200517c: 80 a6 e0 00 cmp %i3, 0
2005180: 02 80 00 15 be 20051d4 <rtems_event_receive+0x6c> <== NEVER TAKEN
2005184: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
2005188: 37 00 80 60 sethi %hi(0x2018000), %i3
200518c: c2 06 e3 d4 ld [ %i3 + 0x3d4 ], %g1 ! 20183d4 <_Thread_Executing>
if ( _Event_sets_Is_empty( event_in ) ) {
2005190: 80 a2 20 00 cmp %o0, 0
2005194: 12 80 00 06 bne 20051ac <rtems_event_receive+0x44>
2005198: c2 00 61 68 ld [ %g1 + 0x168 ], %g1
*event_out = api->pending_events;
200519c: c2 00 40 00 ld [ %g1 ], %g1
20051a0: c2 22 c0 00 st %g1, [ %o3 ]
20051a4: 81 c7 e0 08 ret
20051a8: 91 e8 20 00 restore %g0, 0, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20051ac: 03 00 80 60 sethi %hi(0x2018000), %g1
20051b0: c4 00 63 10 ld [ %g1 + 0x310 ], %g2 ! 2018310 <_Thread_Dispatch_disable_level>
20051b4: 84 00 a0 01 inc %g2
20051b8: c4 20 63 10 st %g2, [ %g1 + 0x310 ]
return RTEMS_SUCCESSFUL;
}
_Thread_Disable_dispatch();
_Event_Seize( event_in, option_set, ticks, event_out );
20051bc: 40 00 00 08 call 20051dc <_Event_Seize>
20051c0: 01 00 00 00 nop
_Thread_Enable_dispatch();
20051c4: 40 00 0a 93 call 2007c10 <_Thread_Enable_dispatch>
20051c8: 01 00 00 00 nop
return( _Thread_Executing->Wait.return_code );
20051cc: c2 06 e3 d4 ld [ %i3 + 0x3d4 ], %g1
20051d0: f0 00 60 34 ld [ %g1 + 0x34 ], %i0
}
20051d4: 81 c7 e0 08 ret
20051d8: 81 e8 00 00 restore
02001fa0 <rtems_filesystem_evaluate_parent>:
int rtems_filesystem_evaluate_parent(
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
2001fa0: 9d e3 bf 88 save %sp, -120, %sp
rtems_filesystem_location_info_t parent;
int result;
if ( !pathloc )
2001fa4: 80 a6 60 00 cmp %i1, 0
2001fa8: 02 80 00 28 be 2002048 <rtems_filesystem_evaluate_parent+0xa8><== NEVER TAKEN
2001fac: 92 10 00 18 mov %i0, %o1
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
2001fb0: c8 06 60 08 ld [ %i1 + 8 ], %g4
2001fb4: da 01 00 00 ld [ %g4 ], %o5
2001fb8: 80 a3 60 00 cmp %o5, 0
2001fbc: 02 80 00 1d be 2002030 <rtems_filesystem_evaluate_parent+0x90><== NEVER TAKEN
2001fc0: 11 00 80 59 sethi %hi(0x2016400), %o0
rtems_set_errno_and_return_minus_one( ENOTSUP );
parent = *pathloc;
2001fc4: c6 06 60 0c ld [ %i1 + 0xc ], %g3
2001fc8: c2 06 40 00 ld [ %i1 ], %g1
2001fcc: c4 06 60 04 ld [ %i1 + 4 ], %g2
2001fd0: c2 27 bf e8 st %g1, [ %fp + -24 ]
2001fd4: c4 27 bf ec st %g2, [ %fp + -20 ]
2001fd8: c8 27 bf f0 st %g4, [ %fp + -16 ]
2001fdc: c6 27 bf f4 st %g3, [ %fp + -12 ]
result = (*pathloc->ops->evalpath_h)( "..", flags, &parent );
2001fe0: b2 07 bf e8 add %fp, -24, %i1
2001fe4: 90 12 21 30 or %o0, 0x130, %o0
2001fe8: 9f c3 40 00 call %o5
2001fec: 94 10 00 19 mov %i1, %o2
if (result != 0){
2001ff0: b0 92 20 00 orcc %o0, 0, %i0
2001ff4: 12 80 00 0d bne 2002028 <rtems_filesystem_evaluate_parent+0x88><== NEVER TAKEN
2001ff8: c2 07 bf f0 ld [ %fp + -16 ], %g1
return -1;
}
rtems_filesystem_freenode( &parent );
2001ffc: 80 a0 60 00 cmp %g1, 0
2002000: 02 80 00 16 be 2002058 <rtems_filesystem_evaluate_parent+0xb8><== NEVER TAKEN
2002004: 01 00 00 00 nop
2002008: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
200200c: 80 a0 60 00 cmp %g1, 0
2002010: 02 80 00 12 be 2002058 <rtems_filesystem_evaluate_parent+0xb8><== NEVER TAKEN
2002014: 01 00 00 00 nop
2002018: 9f c0 40 00 call %g1
200201c: 90 10 00 19 mov %i1, %o0
return result;
}
2002020: 81 c7 e0 08 ret
2002024: 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){
2002028: 81 c7 e0 08 ret <== NOT EXECUTED
200202c: 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 );
2002030: 40 00 2e b8 call 200db10 <__errno> <== NOT EXECUTED
2002034: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002038: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200203c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002040: 81 c7 e0 08 ret <== NOT EXECUTED
2002044: 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 */
2002048: 40 00 2e b2 call 200db10 <__errno> <== NOT EXECUTED
200204c: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002050: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
2002054: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2002058: 81 c7 e0 08 ret <== NOT EXECUTED
200205c: 81 e8 00 00 restore <== NOT EXECUTED
02002060 <rtems_filesystem_evaluate_path>:
const char *pathname,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
2002060: 9d e3 bf 98 save %sp, -104, %sp
/*
* Verify Input parameters.
*/
if ( !pathname )
2002064: 80 a6 20 00 cmp %i0, 0
2002068: 02 80 00 50 be 20021a8 <rtems_filesystem_evaluate_path+0x148>
200206c: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
2002070: 02 80 00 54 be 20021c0 <rtems_filesystem_evaluate_path+0x160><== NEVER TAKEN
2002074: 01 00 00 00 nop
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
2002078: c2 4e 00 00 ldsb [ %i0 ], %g1
200207c: 80 a0 60 2f cmp %g1, 0x2f
2002080: 02 80 00 06 be 2002098 <rtems_filesystem_evaluate_path+0x38>
2002084: 80 a0 60 5c cmp %g1, 0x5c
2002088: 02 80 00 04 be 2002098 <rtems_filesystem_evaluate_path+0x38><== NEVER TAKEN
200208c: 80 a0 60 00 cmp %g1, 0
2002090: 12 80 00 27 bne 200212c <rtems_filesystem_evaluate_path+0xcc><== ALWAYS TAKEN
2002094: 03 00 80 5e sethi %hi(0x2017800), %g1
2002098: 03 00 80 5e sethi %hi(0x2017800), %g1
200209c: c6 00 61 54 ld [ %g1 + 0x154 ], %g3 ! 2017954 <rtems_current_user_env>
20020a0: 88 10 20 01 mov 1, %g4
20020a4: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
20020a8: c2 26 80 00 st %g1, [ %i2 ]
20020ac: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2
20020b0: c4 26 a0 04 st %g2, [ %i2 + 4 ]
20020b4: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
20020b8: c2 26 a0 08 st %g1, [ %i2 + 8 ]
20020bc: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2
20020c0: c4 26 a0 0c st %g2, [ %i2 + 0xc ]
if ( !pathloc->ops->evalpath_h )
20020c4: c2 06 a0 08 ld [ %i2 + 8 ], %g1
20020c8: c2 00 40 00 ld [ %g1 ], %g1
20020cc: 80 a0 60 00 cmp %g1, 0
20020d0: 02 80 00 30 be 2002190 <rtems_filesystem_evaluate_path+0x130><== NEVER TAKEN
20020d4: 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 );
20020d8: 92 10 00 19 mov %i1, %o1
20020dc: 9f c0 40 00 call %g1
20020e0: 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 ) {
20020e4: b0 92 20 00 orcc %o0, 0, %i0
20020e8: 12 80 00 0f bne 2002124 <rtems_filesystem_evaluate_path+0xc4>
20020ec: 80 a6 e0 00 cmp %i3, 0
20020f0: 02 80 00 38 be 20021d0 <rtems_filesystem_evaluate_path+0x170>
20020f4: 01 00 00 00 nop
if ( !pathloc->ops->node_type_h ){
20020f8: c4 06 a0 08 ld [ %i2 + 8 ], %g2
20020fc: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2002100: 80 a0 60 00 cmp %g1, 0
2002104: 22 80 00 1e be,a 200217c <rtems_filesystem_evaluate_path+0x11c><== NEVER TAKEN
2002108: 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 );
200210c: 9f c0 40 00 call %g1
2002110: 90 10 00 1a mov %i2, %o0
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
2002114: 90 02 3f fd add %o0, -3, %o0
2002118: 80 a2 20 01 cmp %o0, 1
200211c: 28 80 00 0f bleu,a 2002158 <rtems_filesystem_evaluate_path+0xf8>
2002120: c4 06 a0 08 ld [ %i2 + 8 ], %g2
}
}
return result;
}
2002124: 81 c7 e0 08 ret
2002128: 81 e8 00 00 restore
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
200212c: c6 00 61 54 ld [ %g1 + 0x154 ], %g3
2002130: 88 10 20 00 clr %g4
2002134: c2 00 e0 04 ld [ %g3 + 4 ], %g1
2002138: c2 26 80 00 st %g1, [ %i2 ]
200213c: c4 00 e0 08 ld [ %g3 + 8 ], %g2
2002140: c4 26 a0 04 st %g2, [ %i2 + 4 ]
2002144: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
2002148: c2 26 a0 08 st %g1, [ %i2 + 8 ]
200214c: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2002150: 10 bf ff dd b 20020c4 <rtems_filesystem_evaluate_path+0x64>
2002154: c4 26 a0 0c st %g2, [ %i2 + 0xc ]
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
2002158: c2 00 a0 34 ld [ %g2 + 0x34 ], %g1
200215c: 80 a0 60 00 cmp %g1, 0
2002160: 02 80 00 06 be 2002178 <rtems_filesystem_evaluate_path+0x118><== NEVER TAKEN
2002164: 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 );
2002168: 9f c0 40 00 call %g1
200216c: 92 10 00 19 mov %i1, %o1
}
}
return result;
}
2002170: 81 c7 e0 08 ret
2002174: 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 );
2002178: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
200217c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002180: 02 80 00 04 be 2002190 <rtems_filesystem_evaluate_path+0x130><== NOT EXECUTED
2002184: 01 00 00 00 nop <== NOT EXECUTED
2002188: 9f c0 40 00 call %g1 <== NOT EXECUTED
200218c: 90 10 00 1a mov %i2, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2002190: 40 00 2e 60 call 200db10 <__errno> <== NOT EXECUTED
2002194: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2002198: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
200219c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20021a0: 81 c7 e0 08 ret <== NOT EXECUTED
20021a4: 81 e8 00 00 restore <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
20021a8: 40 00 2e 5a call 200db10 <__errno>
20021ac: b0 10 3f ff mov -1, %i0
20021b0: 82 10 20 0e mov 0xe, %g1
20021b4: c2 22 00 00 st %g1, [ %o0 ]
20021b8: 81 c7 e0 08 ret
20021bc: 81 e8 00 00 restore
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
20021c0: 40 00 2e 54 call 200db10 <__errno> <== NOT EXECUTED
20021c4: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20021c8: 82 10 20 05 mov 5, %g1 <== NOT EXECUTED
20021cc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20021d0: 81 c7 e0 08 ret
20021d4: 81 e8 00 00 restore
0200a774 <rtems_filesystem_initialize>:
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
200a774: 9d e3 bf 80 save %sp, -128, %sp
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
200a778: 25 00 80 5e sethi %hi(0x2017800), %l2
200a77c: c4 04 a1 54 ld [ %l2 + 0x154 ], %g2 ! 2017954 <rtems_current_user_env>
200a780: 82 10 20 12 mov 0x12, %g1
init_fs_mount_table();
200a784: 40 00 02 59 call 200b0e8 <init_fs_mount_table>
200a788: c2 30 a0 24 sth %g1, [ %g2 + 0x24 ]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
200a78c: 03 00 80 58 sethi %hi(0x2016000), %g1
200a790: c4 00 60 6c ld [ %g1 + 0x6c ], %g2 ! 201606c <rtems_filesystem_mount_table_size>
200a794: 80 a0 a0 00 cmp %g2, 0
200a798: 02 80 00 3d be 200a88c <rtems_filesystem_initialize+0x118><== NEVER TAKEN
200a79c: 03 00 80 5d sethi %hi(0x2017400), %g1
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
200a7a0: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 2017440 <rtems_filesystem_mount_table>
status = mount(
200a7a4: 90 07 bf f4 add %fp, -12, %o0
200a7a8: d8 00 a0 0c ld [ %g2 + 0xc ], %o4
200a7ac: d2 00 80 00 ld [ %g2 ], %o1
200a7b0: d4 00 a0 04 ld [ %g2 + 4 ], %o2
200a7b4: 40 00 02 55 call 200b108 <mount>
200a7b8: d6 00 a0 08 ld [ %g2 + 8 ], %o3
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
200a7bc: 80 a2 3f ff cmp %o0, -1
200a7c0: 02 80 00 36 be 200a898 <rtems_filesystem_initialize+0x124><== NEVER TAKEN
200a7c4: c8 07 bf f4 ld [ %fp + -12 ], %g4
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
200a7c8: c2 04 a1 54 ld [ %l2 + 0x154 ], %g1
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200a7cc: 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;
200a7d0: 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;
200a7d4: c4 20 60 14 st %g2, [ %g1 + 0x14 ]
200a7d8: c6 01 20 1c ld [ %g4 + 0x1c ], %g3
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a7dc: 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;
200a7e0: c6 20 60 18 st %g3, [ %g1 + 0x18 ]
200a7e4: c4 01 20 20 ld [ %g4 + 0x20 ], %g2
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a7e8: 23 00 80 5a sethi %hi(0x2016800), %l1
* set_private_env() - but then: that's
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
rtems_filesystem_root = entry->mt_fs_root;
200a7ec: c4 20 60 1c st %g2, [ %g1 + 0x1c ]
200a7f0: c6 01 20 24 ld [ %g4 + 0x24 ], %g3
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a7f4: 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;
200a7f8: c6 20 60 20 st %g3, [ %g1 + 0x20 ]
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a7fc: 94 10 00 10 mov %l0, %o2
200a800: 96 10 20 00 clr %o3
200a804: 7f ff de 17 call 2002060 <rtems_filesystem_evaluate_path>
200a808: 90 14 61 10 or %l1, 0x110, %o0
rtems_filesystem_root = loc;
200a80c: c4 04 a1 54 ld [ %l2 + 0x154 ], %g2
200a810: c2 07 bf e4 ld [ %fp + -28 ], %g1
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a814: 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;
200a818: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
200a81c: c2 07 bf e8 ld [ %fp + -24 ], %g1
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a820: 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;
200a824: c2 20 a0 18 st %g1, [ %g2 + 0x18 ]
200a828: c2 07 bf ec ld [ %fp + -20 ], %g1
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a82c: 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;
200a830: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
200a834: c2 07 bf f0 ld [ %fp + -16 ], %g1
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
200a838: 90 14 61 10 or %l1, 0x110, %o0
200a83c: 7f ff de 09 call 2002060 <rtems_filesystem_evaluate_path>
200a840: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
rtems_filesystem_current = loc;
200a844: c2 07 bf e4 ld [ %fp + -28 ], %g1
200a848: c6 04 a1 54 ld [ %l2 + 0x154 ], %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);
200a84c: 11 00 80 5a sethi %hi(0x2016800), %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;
200a850: c2 20 e0 04 st %g1, [ %g3 + 4 ]
200a854: 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);
200a858: 90 12 21 18 or %o0, 0x118, %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;
200a85c: c2 20 e0 08 st %g1, [ %g3 + 8 ]
200a860: 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);
200a864: 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;
200a868: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
200a86c: 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);
200a870: 40 00 02 14 call 200b0c0 <mkdir>
200a874: c4 20 e0 10 st %g2, [ %g3 + 0x10 ]
if ( status != 0 )
200a878: 80 a2 20 00 cmp %o0, 0
200a87c: 12 80 00 0a bne 200a8a4 <rtems_filesystem_initialize+0x130><== NEVER TAKEN
200a880: 11 2a f3 40 sethi %hi(0xabcd0000), %o0
200a884: 81 c7 e0 08 ret
200a888: 81 e8 00 00 restore
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
200a88c: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
200a890: 7f ff ed b7 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
200a894: 90 12 20 01 or %o0, 1, %o0 ! abcd0001 <RAM_END+0xa98d0001><== NOT EXECUTED
status = mount(
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
200a898: 11 2a f3 40 sethi %hi(0xabcd0000), %o0 <== NOT EXECUTED
200a89c: 7f ff ed b4 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
200a8a0: 90 12 20 02 or %o0, 2, %o0 ! abcd0002 <RAM_END+0xa98d0002><== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
200a8a4: 7f ff ed b2 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
200a8a8: 90 12 20 03 or %o0, 3, %o0 <== NOT EXECUTED
0200727c <rtems_filesystem_nodes_equal>:
);
bool rtems_filesystem_nodes_equal(
const rtems_filesystem_location_info_t *loc1,
const rtems_filesystem_location_info_t *loc2
){
200727c: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
2007280: c4 02 40 00 ld [ %o1 ], %g2 <== NOT EXECUTED
2007284: 82 18 40 02 xor %g1, %g2, %g1 <== NOT EXECUTED
2007288: 80 a0 00 01 cmp %g0, %g1 <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access );
}
200728c: 81 c3 e0 08 retl <== NOT EXECUTED
2007290: 90 60 3f ff subx %g0, -1, %o0 <== NOT EXECUTED
02001e04 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
2001e04: 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 );
2001e08: 92 10 20 00 clr %o1 <== NOT EXECUTED
2001e0c: a2 07 bf e8 add %fp, -24, %l1 <== NOT EXECUTED
2001e10: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2001e14: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2001e18: 40 00 00 92 call 2002060 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
2001e1c: 96 10 20 01 mov 1, %o3 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
2001e20: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
2001e24: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
2001e28: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1 <== NOT EXECUTED
2001e2c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e30: 02 80 00 28 be 2001ed0 <rtems_io_lookup_name+0xcc> <== NOT EXECUTED
2001e34: e4 07 bf e8 ld [ %fp + -24 ], %l2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
2001e38: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001e3c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2001e40: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2001e44: 02 80 00 0e be 2001e7c <rtems_io_lookup_name+0x78> <== NOT EXECUTED
2001e48: 80 a2 20 02 cmp %o0, 2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2001e4c: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2001e50: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e54: 02 80 00 2b be 2001f00 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
2001e58: 01 00 00 00 nop <== NOT EXECUTED
2001e5c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2001e60: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001e64: 02 80 00 27 be 2001f00 <rtems_io_lookup_name+0xfc> <== NOT EXECUTED
2001e68: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2001e6c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001e70: b0 10 20 0d mov 0xd, %i0 <== NOT EXECUTED
2001e74: 81 c7 e0 08 ret <== NOT EXECUTED
2001e78: 81 e8 00 00 restore <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
2001e7c: 12 bf ff f5 bne 2001e50 <rtems_io_lookup_name+0x4c> <== NOT EXECUTED
2001e80: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
2001e84: f0 26 40 00 st %i0, [ %i1 ] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
2001e88: 40 00 34 44 call 200ef98 <strlen> <== NOT EXECUTED
2001e8c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2001e90: d0 26 60 04 st %o0, [ %i1 + 4 ] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
2001e94: c2 04 a0 4c ld [ %l2 + 0x4c ], %g1 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
2001e98: 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;
2001e9c: c2 26 60 08 st %g1, [ %i1 + 8 ] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
2001ea0: c4 04 a0 50 ld [ %l2 + 0x50 ], %g2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2001ea4: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2001ea8: 02 80 00 18 be 2001f08 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
2001eac: c4 26 60 0c st %g2, [ %i1 + 0xc ] <== NOT EXECUTED
2001eb0: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1 <== NOT EXECUTED
2001eb4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001eb8: 02 80 00 14 be 2001f08 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
2001ebc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2001ec0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001ec4: b0 10 20 00 clr %i0 <== NOT EXECUTED
2001ec8: 81 c7 e0 08 ret <== NOT EXECUTED
2001ecc: 81 e8 00 00 restore <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
2001ed0: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2001ed4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2001ed8: 02 80 00 04 be 2001ee8 <rtems_io_lookup_name+0xe4> <== NOT EXECUTED
2001edc: 01 00 00 00 nop <== NOT EXECUTED
2001ee0: 9f c0 40 00 call %g1 <== NOT EXECUTED
2001ee4: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2001ee8: 40 00 2f 0a call 200db10 <__errno> <== NOT EXECUTED
2001eec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2001ef0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2001ef4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2001ef8: 81 c7 e0 08 ret <== NOT EXECUTED
2001efc: 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 );
2001f00: 81 c7 e0 08 ret <== NOT EXECUTED
2001f04: 91 e8 20 0d restore %g0, 0xd, %o0 <== NOT EXECUTED
#endif
return RTEMS_SUCCESSFUL;
}
2001f08: 81 c7 e0 08 ret <== NOT EXECUTED
2001f0c: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
02006f84 <rtems_io_register_driver>:
{
/*
* Validate the pointer data and contents passed in
*/
if ( !driver_table )
2006f84: 9a 92 60 00 orcc %o1, 0, %o5
2006f88: 02 80 00 4d be 20070bc <rtems_io_register_driver+0x138>
2006f8c: 80 a2 a0 00 cmp %o2, 0
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
2006f90: 02 80 00 4c be 20070c0 <rtems_io_register_driver+0x13c>
2006f94: 82 10 20 09 mov 9, %g1
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
2006f98: c2 03 40 00 ld [ %o5 ], %g1
2006f9c: 80 a0 60 00 cmp %g1, 0
2006fa0: 22 80 00 44 be,a 20070b0 <rtems_io_register_driver+0x12c>
2006fa4: c2 03 60 04 ld [ %o5 + 4 ], %g1
*registered_major = 0;
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
2006fa8: 03 00 80 71 sethi %hi(0x201c400), %g1
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
return RTEMS_INVALID_ADDRESS;
*registered_major = 0;
2006fac: c0 22 80 00 clr [ %o2 ]
/*
* The requested major number is higher than what is configured.
*/
if ( major >= _IO_Number_of_drivers )
2006fb0: c8 00 63 30 ld [ %g1 + 0x330 ], %g4
2006fb4: 80 a1 00 08 cmp %g4, %o0
2006fb8: 08 80 00 39 bleu 200709c <rtems_io_register_driver+0x118>
2006fbc: 82 10 20 0a mov 0xa, %g1
/*
* Test for initialise/open being present to indicate the driver slot is
* in use.
*/
if ( major == 0 ) {
2006fc0: 80 a2 20 00 cmp %o0, 0
2006fc4: 12 80 00 29 bne 2007068 <rtems_io_register_driver+0xe4>
2006fc8: 03 00 80 71 sethi %hi(0x201c400), %g1
bool found = false;
for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) {
2006fcc: 90 81 3f ff addcc %g4, -1, %o0
2006fd0: 02 80 00 35 be 20070a4 <rtems_io_register_driver+0x120> <== NEVER TAKEN
2006fd4: 05 00 80 71 sethi %hi(0x201c400), %g2
2006fd8: c6 00 a3 34 ld [ %g2 + 0x334 ], %g3 ! 201c734 <_IO_Driver_address_table>
2006fdc: 85 29 20 03 sll %g4, 3, %g2
2006fe0: 83 29 20 05 sll %g4, 5, %g1
2006fe4: 82 20 40 02 sub %g1, %g2, %g1
2006fe8: 82 00 7f e8 add %g1, -24, %g1
2006fec: 10 80 00 05 b 2007000 <rtems_io_register_driver+0x7c>
2006ff0: 84 00 c0 01 add %g3, %g1, %g2
2006ff4: 90 82 3f ff addcc %o0, -1, %o0
2006ff8: 02 80 00 2b be 20070a4 <rtems_io_register_driver+0x120>
2006ffc: 84 00 bf e8 add %g2, -24, %g2
if ( !_IO_Driver_address_table[major].initialization_entry &&
2007000: c2 00 80 00 ld [ %g2 ], %g1
2007004: 80 a0 60 00 cmp %g1, 0
2007008: 12 bf ff fb bne 2006ff4 <rtems_io_register_driver+0x70>
200700c: 88 10 00 02 mov %g2, %g4
2007010: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2007014: 80 a0 60 00 cmp %g1, 0
2007018: 32 bf ff f8 bne,a 2006ff8 <rtems_io_register_driver+0x74><== NEVER TAKEN
200701c: 90 82 3f ff addcc %o0, -1, %o0 <== NOT EXECUTED
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;
2007020: c2 03 40 00 ld [ %o5 ], %g1
*registered_major = major;
2007024: d0 22 80 00 st %o0, [ %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;
2007028: c2 21 00 00 st %g1, [ %g4 ]
200702c: c4 03 60 04 ld [ %o5 + 4 ], %g2
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
2007030: 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;
2007034: c4 21 20 04 st %g2, [ %g4 + 4 ]
2007038: c2 03 60 08 ld [ %o5 + 8 ], %g1
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
200703c: 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;
2007040: c2 21 20 08 st %g1, [ %g4 + 8 ]
2007044: c4 03 60 0c ld [ %o5 + 0xc ], %g2
2007048: c4 21 20 0c st %g2, [ %g4 + 0xc ]
200704c: c2 03 60 10 ld [ %o5 + 0x10 ], %g1
2007050: c2 21 20 10 st %g1, [ %g4 + 0x10 ]
2007054: c4 03 60 14 ld [ %o5 + 0x14 ], %g2
2007058: c4 21 20 14 st %g2, [ %g4 + 0x14 ]
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
200705c: 82 13 c0 00 mov %o7, %g1
2007060: 7f ff ff 48 call 2006d80 <rtems_io_initialize>
2007064: 9e 10 40 00 mov %g1, %o7
if ( !found )
return RTEMS_TOO_MANY;
}
if ( _IO_Driver_address_table[major].initialization_entry ||
2007068: c8 00 63 34 ld [ %g1 + 0x334 ], %g4
200706c: 85 2a 20 03 sll %o0, 3, %g2
2007070: 83 2a 20 05 sll %o0, 5, %g1
2007074: 82 20 40 02 sub %g1, %g2, %g1
2007078: c6 01 00 01 ld [ %g4 + %g1 ], %g3
200707c: 80 a0 e0 00 cmp %g3, 0
2007080: 12 80 00 06 bne 2007098 <rtems_io_register_driver+0x114> <== ALWAYS TAKEN
2007084: 88 01 00 01 add %g4, %g1, %g4
2007088: c2 01 20 04 ld [ %g4 + 4 ], %g1 <== NOT EXECUTED
200708c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2007090: 22 bf ff e5 be,a 2007024 <rtems_io_register_driver+0xa0> <== NOT EXECUTED
2007094: c2 03 40 00 ld [ %o5 ], %g1 <== NOT EXECUTED
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
2007098: 82 10 20 0c mov 0xc, %g1
}
200709c: 81 c3 e0 08 retl
20070a0: 90 10 00 01 mov %g1, %o0
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
20070a4: 82 10 20 05 mov 5, %g1
}
20070a8: 81 c3 e0 08 retl
20070ac: 90 10 00 01 mov %g1, %o0
return RTEMS_INVALID_ADDRESS;
if ( !registered_major )
return RTEMS_INVALID_ADDRESS;
if ( !driver_table->initialization_entry && !driver_table->open_entry )
20070b0: 80 a0 60 00 cmp %g1, 0
20070b4: 12 bf ff be bne 2006fac <rtems_io_register_driver+0x28> <== NEVER TAKEN
20070b8: 03 00 80 71 sethi %hi(0x201c400), %g1
_IO_Driver_address_table[major] = *driver_table;
*registered_major = major;
return rtems_io_initialize( major, 0, NULL );
20070bc: 82 10 20 09 mov 9, %g1
}
20070c0: 81 c3 e0 08 retl
20070c4: 90 10 00 01 mov %g1, %o0
020070c8 <rtems_io_unregister_driver>:
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
20070c8: 9d e3 bf 98 save %sp, -104, %sp
if ( major < _IO_Number_of_drivers ) {
20070cc: 03 00 80 71 sethi %hi(0x201c400), %g1
20070d0: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 201c730 <_IO_Number_of_drivers>
*/
rtems_status_code rtems_io_unregister_driver(
rtems_device_major_number major
)
{
20070d4: 86 10 00 18 mov %i0, %g3
if ( major < _IO_Number_of_drivers ) {
20070d8: 80 a0 80 18 cmp %g2, %i0
20070dc: 08 80 00 0c bleu 200710c <rtems_io_unregister_driver+0x44><== NEVER TAKEN
20070e0: b0 10 20 0d mov 0xd, %i0
memset(
20070e4: 03 00 80 71 sethi %hi(0x201c400), %g1
20070e8: c4 00 63 34 ld [ %g1 + 0x334 ], %g2 ! 201c734 <_IO_Driver_address_table>
20070ec: 83 28 e0 03 sll %g3, 3, %g1
20070f0: 91 28 e0 05 sll %g3, 5, %o0
20070f4: 92 10 20 00 clr %o1
20070f8: 90 22 00 01 sub %o0, %g1, %o0
20070fc: 94 10 20 18 mov 0x18, %o2
2007100: 90 00 80 08 add %g2, %o0, %o0
2007104: 40 00 20 7e call 200f2fc <memset>
2007108: b0 10 20 00 clr %i0
sizeof( rtems_driver_address_table )
);
return RTEMS_SUCCESSFUL;
}
return RTEMS_UNSATISFIED;
}
200710c: 81 c7 e0 08 ret
2007110: 81 e8 00 00 restore
02008440 <rtems_iterate_over_all_threads>:
#include <rtems/system.h>
#include <rtems/score/thread.h>
void rtems_iterate_over_all_threads(rtems_per_thread_routine routine)
{
2008440: 9d e3 bf 98 save %sp, -104, %sp
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
2008444: 80 a6 20 00 cmp %i0, 0
2008448: 02 80 00 23 be 20084d4 <rtems_iterate_over_all_threads+0x94><== NEVER TAKEN
200844c: 03 00 80 93 sethi %hi(0x2024c00), %g1
return;
2008450: a4 10 60 c4 or %g1, 0xc4, %l2 ! 2024cc4 <_Objects_Information_table+0x4>
2008454: 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 ] )
2008458: c2 04 80 00 ld [ %l2 ], %g1
200845c: 80 a0 60 00 cmp %g1, 0
2008460: 22 80 00 1a be,a 20084c8 <rtems_iterate_over_all_threads+0x88>
2008464: a4 04 a0 04 add %l2, 4, %l2
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
2008468: e2 00 60 04 ld [ %g1 + 4 ], %l1
if ( information ) {
200846c: 80 a4 60 00 cmp %l1, 0
2008470: 22 80 00 16 be,a 20084c8 <rtems_iterate_over_all_threads+0x88><== NEVER TAKEN
2008474: a4 04 a0 04 add %l2, 4, %l2 <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
2008478: c2 14 60 10 lduh [ %l1 + 0x10 ], %g1
200847c: 86 90 60 00 orcc %g1, 0, %g3
2008480: 22 80 00 12 be,a 20084c8 <rtems_iterate_over_all_threads+0x88>
2008484: a4 04 a0 04 add %l2, 4, %l2
2008488: a0 10 20 01 mov 1, %l0
the_thread = (Thread_Control *)information->local_table[ i ];
200848c: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
2008490: 83 2c 20 02 sll %l0, 2, %g1
2008494: d0 00 80 01 ld [ %g2 + %g1 ], %o0
if ( !the_thread )
2008498: 80 a2 20 00 cmp %o0, 0
200849c: 02 80 00 05 be 20084b0 <rtems_iterate_over_all_threads+0x70><== NEVER TAKEN
20084a0: a0 04 20 01 inc %l0
continue;
(*routine)(the_thread);
20084a4: 9f c6 00 00 call %i0
20084a8: 01 00 00 00 nop
20084ac: 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++ ) {
20084b0: 83 28 e0 10 sll %g3, 0x10, %g1
20084b4: 83 30 60 10 srl %g1, 0x10, %g1
20084b8: 80 a0 40 10 cmp %g1, %l0
20084bc: 3a bf ff f5 bcc,a 2008490 <rtems_iterate_over_all_threads+0x50>
20084c0: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
20084c4: a4 04 a0 04 add %l2, 4, %l2
if ( !routine )
return;
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
20084c8: 80 a4 80 13 cmp %l2, %l3
20084cc: 32 bf ff e4 bne,a 200845c <rtems_iterate_over_all_threads+0x1c>
20084d0: c2 04 80 00 ld [ %l2 ], %g1
20084d4: 81 c7 e0 08 ret
20084d8: 81 e8 00 00 restore
0200adfc <rtems_libio_allocate>:
* 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 )
{
200adfc: 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 );
200ae00: 23 00 80 60 sethi %hi(0x2018000), %l1
200ae04: d0 04 61 3c ld [ %l1 + 0x13c ], %o0 ! 201813c <rtems_libio_semaphore>
200ae08: 92 10 20 00 clr %o1
200ae0c: 7f ff ea 95 call 2005860 <rtems_semaphore_obtain>
200ae10: 94 10 20 00 clr %o2
if (rtems_libio_iop_freelist) {
200ae14: 21 00 80 60 sethi %hi(0x2018000), %l0
200ae18: c4 04 21 38 ld [ %l0 + 0x138 ], %g2 ! 2018138 <rtems_libio_iop_freelist>
200ae1c: 80 a0 a0 00 cmp %g2, 0
200ae20: 12 80 00 07 bne 200ae3c <rtems_libio_allocate+0x40>
200ae24: 03 00 80 60 sethi %hi(0x2018000), %g1
}
failed:
iop = 0;
done:
200ae28: b0 10 20 00 clr %i0
rtems_semaphore_release( rtems_libio_semaphore );
200ae2c: 7f ff ea d5 call 2005980 <rtems_semaphore_release>
200ae30: d0 04 61 3c ld [ %l1 + 0x13c ], %o0
return iop;
}
200ae34: 81 c7 e0 08 ret
200ae38: 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(
200ae3c: c6 00 61 34 ld [ %g1 + 0x134 ], %g3
200ae40: 92 10 20 01 mov 1, %o1
200ae44: 86 20 80 03 sub %g2, %g3, %g3
200ae48: 87 38 e0 02 sra %g3, 2, %g3
200ae4c: 83 28 e0 02 sll %g3, 2, %g1
200ae50: 85 28 e0 06 sll %g3, 6, %g2
200ae54: 84 20 80 01 sub %g2, %g1, %g2
200ae58: 83 28 a0 06 sll %g2, 6, %g1
200ae5c: 82 20 40 02 sub %g1, %g2, %g1
200ae60: 85 28 60 0c sll %g1, 0xc, %g2
200ae64: 82 00 40 02 add %g1, %g2, %g1
200ae68: 82 00 40 03 add %g1, %g3, %g1
200ae6c: 83 28 60 04 sll %g1, 4, %g1
200ae70: 82 20 40 03 sub %g1, %g3, %g1
200ae74: 83 28 60 02 sll %g1, 2, %g1
200ae78: 86 20 c0 01 sub %g3, %g1, %g3
200ae7c: 94 10 20 54 mov 0x54, %o2
200ae80: 96 10 20 00 clr %o3
200ae84: 11 13 10 92 sethi %hi(0x4c424800), %o0
200ae88: 98 07 bf f4 add %fp, -12, %o4
200ae8c: 90 12 21 00 or %o0, 0x100, %o0
200ae90: 7f ff e9 cd call 20055c4 <rtems_semaphore_create>
200ae94: 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)
200ae98: 80 a2 20 00 cmp %o0, 0
200ae9c: 32 bf ff e4 bne,a 200ae2c <rtems_libio_allocate+0x30> <== NEVER TAKEN
200aea0: b0 10 20 00 clr %i0 <== NOT EXECUTED
goto failed;
iop = rtems_libio_iop_freelist;
200aea4: f0 04 21 38 ld [ %l0 + 0x138 ], %i0
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
200aea8: 84 10 21 00 mov 0x100, %g2
&sema
);
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
200aeac: c2 06 20 28 ld [ %i0 + 0x28 ], %g1
(void) memset( iop, 0, sizeof(rtems_libio_t) );
200aeb0: c0 26 20 20 clr [ %i0 + 0x20 ]
200aeb4: c0 26 00 00 clr [ %i0 ]
200aeb8: c0 26 20 04 clr [ %i0 + 4 ]
200aebc: c0 26 20 08 clr [ %i0 + 8 ]
200aec0: c0 26 20 10 clr [ %i0 + 0x10 ]
200aec4: c0 26 20 14 clr [ %i0 + 0x14 ]
200aec8: c0 26 20 18 clr [ %i0 + 0x18 ]
200aecc: c0 26 20 1c clr [ %i0 + 0x1c ]
200aed0: c0 26 20 24 clr [ %i0 + 0x24 ]
200aed4: c0 26 20 2c clr [ %i0 + 0x2c ]
200aed8: c0 26 20 30 clr [ %i0 + 0x30 ]
200aedc: c0 26 20 28 clr [ %i0 + 0x28 ]
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
200aee0: c2 24 21 38 st %g1, [ %l0 + 0x138 ]
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;
200aee4: c2 07 bf f4 ld [ %fp + -12 ], %g1
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;
200aee8: c4 26 20 0c st %g2, [ %i0 + 0xc ]
iop->sem = sema;
200aeec: 10 bf ff d0 b 200ae2c <rtems_libio_allocate+0x30>
200aef0: c2 26 20 20 st %g1, [ %i0 + 0x20 ]
0200ada0 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
200ada0: 9d e3 bf 98 save %sp, -104, %sp
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200ada4: 23 00 80 60 sethi %hi(0x2018000), %l1
200ada8: d0 04 61 3c ld [ %l1 + 0x13c ], %o0 ! 201813c <rtems_libio_semaphore>
200adac: 92 10 20 00 clr %o1
200adb0: 7f ff ea ac call 2005860 <rtems_semaphore_obtain>
200adb4: 94 10 20 00 clr %o2
if (iop->sem)
200adb8: d0 06 20 20 ld [ %i0 + 0x20 ], %o0
200adbc: 80 a2 20 00 cmp %o0, 0
200adc0: 02 80 00 04 be 200add0 <rtems_libio_free+0x30> <== NEVER TAKEN
200adc4: a0 10 00 18 mov %i0, %l0
rtems_semaphore_delete(iop->sem);
200adc8: 7f ff ea 79 call 20057ac <rtems_semaphore_delete>
200adcc: 01 00 00 00 nop
iop->flags &= ~LIBIO_FLAGS_OPEN;
200add0: c2 04 20 0c ld [ %l0 + 0xc ], %g1
iop->data1 = rtems_libio_iop_freelist;
200add4: 05 00 80 60 sethi %hi(0x2018000), %g2
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
200add8: f0 04 61 3c ld [ %l1 + 0x13c ], %i0
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
200addc: c6 00 a1 38 ld [ %g2 + 0x138 ], %g3
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200ade0: 82 08 7e ff and %g1, -257, %g1
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
200ade4: e0 20 a1 38 st %l0, [ %g2 + 0x138 ]
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
200ade8: c6 24 20 28 st %g3, [ %l0 + 0x28 ]
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
200adec: c2 24 20 0c st %g1, [ %l0 + 0xc ]
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_semaphore_release(rtems_libio_semaphore);
200adf0: 7f ff ea e4 call 2005980 <rtems_semaphore_release>
200adf4: 81 e8 00 00 restore
020021d8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
20021d8: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code rc;
int i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
20021dc: 21 00 80 5d sethi %hi(0x2017400), %l0
20021e0: d0 04 20 38 ld [ %l0 + 0x38 ], %o0 ! 2017438 <rtems_libio_number_iops>
20021e4: 80 a2 20 00 cmp %o0, 0
20021e8: 22 80 00 1e be,a 2002260 <rtems_libio_init+0x88>
20021ec: 11 13 10 92 sethi %hi(0x4c424800), %o0
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
20021f0: 40 00 21 b0 call 200a8b0 <calloc>
20021f4: 92 10 20 34 mov 0x34, %o1
20021f8: 03 00 80 60 sethi %hi(0x2018000), %g1
20021fc: d0 20 61 34 st %o0, [ %g1 + 0x134 ] ! 2018134 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
2002200: 80 a2 20 00 cmp %o0, 0
2002204: 02 80 00 23 be 2002290 <rtems_libio_init+0xb8> <== NEVER TAKEN
2002208: 84 10 00 08 mov %o0, %g2
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++)
200220c: c8 04 20 38 ld [ %l0 + 0x38 ], %g4
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
2002210: 03 00 80 60 sethi %hi(0x2018000), %g1
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
2002214: 80 a1 20 01 cmp %g4, 1
2002218: 02 80 00 10 be 2002258 <rtems_libio_init+0x80> <== NEVER TAKEN
200221c: d0 20 61 38 st %o0, [ %g1 + 0x138 ]
2002220: 82 02 20 34 add %o0, 0x34, %g1
2002224: 86 10 20 01 mov 1, %g3
iop->data1 = iop + 1;
2002228: c2 20 7f f4 st %g1, [ %g1 + -12 ]
200222c: 86 00 e0 01 inc %g3
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; i < (rtems_libio_number_iops - 1) ; i++, iop++)
2002230: 80 a0 c0 04 cmp %g3, %g4
2002234: 12 bf ff fd bne 2002228 <rtems_libio_init+0x50>
2002238: 82 00 60 34 add %g1, 0x34, %g1
200223c: 85 28 e0 02 sll %g3, 2, %g2
2002240: 83 28 e0 04 sll %g3, 4, %g1
2002244: 82 20 40 02 sub %g1, %g2, %g1
2002248: 82 00 40 03 add %g1, %g3, %g1
200224c: 83 28 60 02 sll %g1, 2, %g1
2002250: 82 00 7f cc add %g1, -52, %g1
2002254: 84 02 00 01 add %o0, %g1, %g2
iop->data1 = iop + 1;
iop->data1 = NULL;
2002258: c0 20 a0 28 clr [ %g2 + 0x28 ]
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
200225c: 11 13 10 92 sethi %hi(0x4c424800), %o0
2002260: 92 10 20 01 mov 1, %o1
2002264: 90 12 21 4f or %o0, 0x14f, %o0
2002268: 94 10 20 54 mov 0x54, %o2
200226c: 96 10 20 00 clr %o3
2002270: 19 00 80 60 sethi %hi(0x2018000), %o4
2002274: 40 00 0c d4 call 20055c4 <rtems_semaphore_create>
2002278: 98 13 21 3c or %o4, 0x13c, %o4 ! 201813c <rtems_libio_semaphore>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
200227c: 80 a2 20 00 cmp %o0, 0
2002280: 12 80 00 06 bne 2002298 <rtems_libio_init+0xc0> <== NEVER TAKEN
2002284: 01 00 00 00 nop
/*
* Initialize the base file system infrastructure.
*/
rtems_filesystem_initialize();
2002288: 40 00 21 3b call 200a774 <rtems_filesystem_initialize>
200228c: 81 e8 00 00 restore
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);
2002290: 40 00 0f 37 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2002294: 90 10 20 1a mov 0x1a, %o0 <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
2002298: 40 00 0f 35 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
0200ac98 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
200ac98: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
int result=0;
int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200ac9c: 21 00 80 60 sethi %hi(0x2018000), %l0
200aca0: d0 04 21 3c ld [ %l0 + 0x13c ], %o0 ! 201813c <rtems_libio_semaphore>
200aca4: 92 10 20 00 clr %o1
200aca8: 7f ff ea ee call 2005860 <rtems_semaphore_obtain>
200acac: 94 10 20 00 clr %o2
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200acb0: 03 00 80 5d sethi %hi(0x2017400), %g1
200acb4: c8 00 60 38 ld [ %g1 + 0x38 ], %g4 ! 2017438 <rtems_libio_number_iops>
200acb8: 03 00 80 60 sethi %hi(0x2018000), %g1
200acbc: 80 a1 20 00 cmp %g4, 0
200acc0: 02 80 00 0e be 200acf8 <rtems_libio_is_file_open+0x60> <== NEVER TAKEN
200acc4: c6 00 61 34 ld [ %g1 + 0x134 ], %g3
200acc8: 84 10 20 00 clr %g2
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200accc: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
200acd0: 80 88 61 00 btst 0x100, %g1
200acd4: 02 80 00 06 be 200acec <rtems_libio_is_file_open+0x54>
200acd8: 84 00 a0 01 inc %g2
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
200acdc: c2 00 e0 10 ld [ %g3 + 0x10 ], %g1
200ace0: 80 a0 40 18 cmp %g1, %i0
200ace4: 02 80 00 0a be 200ad0c <rtems_libio_is_file_open+0x74>
200ace8: d0 04 21 3c ld [ %l0 + 0x13c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200acec: 80 a0 80 04 cmp %g2, %g4
200acf0: 0a bf ff f7 bcs 200accc <rtems_libio_is_file_open+0x34>
200acf4: 86 00 e0 34 add %g3, 0x34, %g3
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
200acf8: d0 04 21 3c ld [ %l0 + 0x13c ], %o0
200acfc: 7f ff eb 21 call 2005980 <rtems_semaphore_release>
200ad00: b0 10 20 00 clr %i0
return result;
}
200ad04: 81 c7 e0 08 ret
200ad08: 81 e8 00 00 restore
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
200ad0c: 7f ff eb 1d call 2005980 <rtems_semaphore_release>
200ad10: b0 10 20 01 mov 1, %i0
return result;
}
200ad14: 81 c7 e0 08 ret
200ad18: 81 e8 00 00 restore
0200ad1c <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
200ad1c: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
int result = 0;
int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
200ad20: 21 00 80 60 sethi %hi(0x2018000), %l0
200ad24: d0 04 21 3c ld [ %l0 + 0x13c ], %o0 ! 201813c <rtems_libio_semaphore>
200ad28: 92 10 20 00 clr %o1
200ad2c: 7f ff ea cd call 2005860 <rtems_semaphore_obtain>
200ad30: 94 10 20 00 clr %o2
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200ad34: 03 00 80 5d sethi %hi(0x2017400), %g1
200ad38: c8 00 60 38 ld [ %g1 + 0x38 ], %g4 ! 2017438 <rtems_libio_number_iops>
200ad3c: 03 00 80 60 sethi %hi(0x2018000), %g1
200ad40: 80 a1 20 00 cmp %g4, 0
200ad44: 02 80 00 0e be 200ad7c <rtems_libio_is_open_files_in_fs+0x60><== NEVER TAKEN
200ad48: c6 00 61 34 ld [ %g1 + 0x134 ], %g3
200ad4c: 84 10 20 00 clr %g2
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
200ad50: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
200ad54: 80 88 61 00 btst 0x100, %g1
200ad58: 02 80 00 06 be 200ad70 <rtems_libio_is_open_files_in_fs+0x54>
200ad5c: 84 00 a0 01 inc %g2
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
200ad60: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
200ad64: 80 a0 40 18 cmp %g1, %i0
200ad68: 02 80 00 0a be 200ad90 <rtems_libio_is_open_files_in_fs+0x74>
200ad6c: d0 04 21 3c ld [ %l0 + 0x13c ], %o0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
200ad70: 80 a0 80 04 cmp %g2, %g4
200ad74: 0a bf ff f7 bcs 200ad50 <rtems_libio_is_open_files_in_fs+0x34>
200ad78: 86 00 e0 34 add %g3, 0x34, %g3
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
200ad7c: d0 04 21 3c ld [ %l0 + 0x13c ], %o0
200ad80: 7f ff eb 00 call 2005980 <rtems_semaphore_release>
200ad84: b0 10 20 00 clr %i0
return result;
}
200ad88: 81 c7 e0 08 ret
200ad8c: 81 e8 00 00 restore
break;
}
}
}
rtems_semaphore_release( rtems_libio_semaphore );
200ad90: 7f ff ea fc call 2005980 <rtems_semaphore_release>
200ad94: b0 10 20 01 mov 1, %i0
return result;
}
200ad98: 81 c7 e0 08 ret
200ad9c: 81 e8 00 00 restore
02003ec8 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
2003ec8: 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);
2003ecc: 90 10 20 00 clr %o0
2003ed0: 92 10 20 00 clr %o1
2003ed4: 40 00 0b 75 call 2006ca8 <rtems_task_ident>
2003ed8: 94 07 bf f4 add %fp, -12, %o2
if (sc != RTEMS_SUCCESSFUL) return sc;
2003edc: b0 92 20 00 orcc %o0, 0, %i0
2003ee0: 12 80 00 37 bne 2003fbc <rtems_libio_set_private_env+0xf4><== NEVER TAKEN
2003ee4: 25 00 80 57 sethi %hi(0x2015c00), %l2
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
2003ee8: c4 04 a3 4c ld [ %l2 + 0x34c ], %g2 ! 2015f4c <rtems_current_user_env>
2003eec: 03 00 80 5b sethi %hi(0x2016c00), %g1
2003ef0: a6 10 62 28 or %g1, 0x228, %l3 ! 2016e28 <rtems_global_user_env>
2003ef4: 80 a0 80 13 cmp %g2, %l3
2003ef8: 02 80 00 33 be 2003fc4 <rtems_libio_set_private_env+0xfc>
2003efc: a2 14 a3 4c or %l2, 0x34c, %l1
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
2003f00: d0 04 a3 4c ld [ %l2 + 0x34c ], %o0
2003f04: 92 10 00 13 mov %l3, %o1
2003f08: 40 00 30 26 call 200ffa0 <memcpy>
2003f0c: 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;
2003f10: 03 00 80 5b sethi %hi(0x2016c00), %g1
2003f14: c8 00 62 68 ld [ %g1 + 0x268 ], %g4 ! 2016e68 <rtems_filesystem_mount_table_control>
}
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*/
2003f18: c4 04 a3 4c ld [ %l2 + 0x34c ], %g2
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003f1c: 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);
2003f20: 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;
2003f24: 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*/
2003f28: c2 07 bf f4 ld [ %fp + -12 ], %g1
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003f2c: 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*/
2003f30: c2 20 80 00 st %g1, [ %g2 ]
/* get a clean root */
rtems_filesystem_root = THE_ROOT_FS_LOC;
2003f34: c6 20 a0 18 st %g3, [ %g2 + 0x18 ]
2003f38: 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);
2003f3c: 21 00 80 53 sethi %hi(0x2014c00), %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;
2003f40: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
2003f44: 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);
2003f48: 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;
2003f4c: 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);
2003f50: 94 10 00 11 mov %l1, %o2
2003f54: 96 10 20 00 clr %o3
2003f58: 7f ff fa 2f call 2002814 <rtems_filesystem_evaluate_path>
2003f5c: 90 14 20 70 or %l0, 0x70, %o0
rtems_filesystem_root = loc;
2003f60: c4 04 a3 4c ld [ %l2 + 0x34c ], %g2
2003f64: c2 07 bf e4 ld [ %fp + -28 ], %g1
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003f68: 90 14 20 70 or %l0, 0x70, %o0
* what we are trying to do here is forking off
* clones.
*/
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
rtems_filesystem_root = loc;
2003f6c: c2 20 a0 14 st %g1, [ %g2 + 0x14 ]
2003f70: c2 07 bf e8 ld [ %fp + -24 ], %g1
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003f74: 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;
2003f78: c2 20 a0 18 st %g1, [ %g2 + 0x18 ]
2003f7c: c2 07 bf ec ld [ %fp + -20 ], %g1
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003f80: 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;
2003f84: c2 20 a0 1c st %g1, [ %g2 + 0x1c ]
2003f88: c2 07 bf f0 ld [ %fp + -16 ], %g1
rtems_filesystem_evaluate_path("/", 0, &loc, 0);
2003f8c: 96 10 20 00 clr %o3
2003f90: 7f ff fa 21 call 2002814 <rtems_filesystem_evaluate_path>
2003f94: c2 20 a0 20 st %g1, [ %g2 + 0x20 ]
rtems_filesystem_current = loc;
2003f98: c2 07 bf e4 ld [ %fp + -28 ], %g1
2003f9c: c6 04 a3 4c ld [ %l2 + 0x34c ], %g3
2003fa0: c2 20 e0 04 st %g1, [ %g3 + 4 ]
2003fa4: c4 07 bf e8 ld [ %fp + -24 ], %g2
2003fa8: c4 20 e0 08 st %g2, [ %g3 + 8 ]
2003fac: c2 07 bf ec ld [ %fp + -20 ], %g1
2003fb0: c2 20 e0 0c st %g1, [ %g3 + 0xc ]
2003fb4: c4 07 bf f0 ld [ %fp + -16 ], %g2
2003fb8: c4 20 e0 10 st %g2, [ %g3 + 0x10 ]
return RTEMS_SUCCESSFUL;
}
2003fbc: 81 c7 e0 08 ret
2003fc0: 81 e8 00 00 restore
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
2003fc4: 7f ff fc 05 call 2002fd8 <malloc>
2003fc8: 90 10 20 40 mov 0x40, %o0
if (!tmp)
2003fcc: a0 92 20 00 orcc %o0, 0, %l0
2003fd0: 02 80 00 0b be 2003ffc <rtems_libio_set_private_env+0x134><== NEVER TAKEN
2003fd4: 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);
2003fd8: 90 10 20 00 clr %o0
2003fdc: 15 00 80 0f sethi %hi(0x2003c00), %o2
2003fe0: 40 00 0b 8d call 2006e14 <rtems_task_variable_add>
2003fe4: 94 12 a1 9c or %o2, 0x19c, %o2 ! 2003d9c <free_user_env>
if (sc != RTEMS_SUCCESSFUL) {
2003fe8: 82 92 20 00 orcc %o0, 0, %g1
2003fec: 32 80 00 06 bne,a 2004004 <rtems_libio_set_private_env+0x13c><== NEVER TAKEN
2003ff0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
2003ff4: 10 bf ff c3 b 2003f00 <rtems_libio_set_private_env+0x38>
2003ff8: e0 24 a3 4c st %l0, [ %l2 + 0x34c ]
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)
2003ffc: 81 c7 e0 08 ret <== NOT EXECUTED
2004000: 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);
2004004: 7f ff fa 62 call 200298c <free> <== NOT EXECUTED
2004008: b0 10 00 01 mov %g1, %i0 <== NOT EXECUTED
200400c: 81 c7 e0 08 ret <== NOT EXECUTED
2004010: 81 e8 00 00 restore <== NOT EXECUTED
02003e14 <rtems_libio_share_private_env>:
* 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) {
2003e14: 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);
2003e18: 90 10 20 00 clr %o0 <== NOT EXECUTED
2003e1c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003e20: 40 00 0b a2 call 2006ca8 <rtems_task_ident> <== NOT EXECUTED
2003e24: 94 07 bf f0 add %fp, -16, %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2003e28: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
2003e2c: 12 80 00 13 bne 2003e78 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
2003e30: 25 00 80 57 sethi %hi(0x2015c00), %l2 <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
2003e34: e2 04 a3 4c ld [ %l2 + 0x34c ], %l1 ! 2015f4c <rtems_current_user_env><== NOT EXECUTED
2003e38: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2003e3c: c4 04 40 00 ld [ %l1 ], %g2 <== NOT EXECUTED
2003e40: 86 14 a3 4c or %l2, 0x34c, %g3 <== NOT EXECUTED
2003e44: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003e48: 02 80 00 0e be 2003e80 <rtems_libio_share_private_env+0x6c><== NOT EXECUTED
2003e4c: 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,
2003e50: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
2003e54: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2003e58: 40 00 0c 4a call 2006f80 <rtems_task_variable_get> <== NOT EXECUTED
2003e5c: 94 07 bf f4 add %fp, -12, %o2 <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
2003e60: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
2003e64: 02 80 00 10 be 2003ea4 <rtems_libio_share_private_env+0x90><== NOT EXECUTED
2003e68: 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;
2003e6c: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
2003e70: 82 10 62 28 or %g1, 0x228, %g1 ! 2016e28 <rtems_global_user_env><== NOT EXECUTED
2003e74: c2 24 a3 4c st %g1, [ %l2 + 0x34c ] <== NOT EXECUTED
return sc;
}
2003e78: 81 c7 e0 08 ret <== NOT EXECUTED
2003e7c: 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);
2003e80: 40 00 0c 16 call 2006ed8 <rtems_task_variable_delete> <== NOT EXECUTED
2003e84: 92 10 00 03 mov %g3, %o1 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2003e88: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
2003e8c: 12 bf ff fb bne 2003e78 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
2003e90: 01 00 00 00 nop <== NOT EXECUTED
free_user_env(tmp);
2003e94: 7f ff ff c2 call 2003d9c <free_user_env> <== NOT EXECUTED
2003e98: 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,
2003e9c: 10 bf ff ee b 2003e54 <rtems_libio_share_private_env+0x40><== NOT EXECUTED
2003ea0: 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);
2003ea4: 15 00 80 0f sethi %hi(0x2003c00), %o2 <== NOT EXECUTED
2003ea8: 40 00 0b db call 2006e14 <rtems_task_variable_add> <== NOT EXECUTED
2003eac: 94 12 a1 9c or %o2, 0x19c, %o2 ! 2003d9c <free_user_env> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2003eb0: 84 92 20 00 orcc %o0, 0, %g2 <== NOT EXECUTED
2003eb4: 12 bf ff ef bne 2003e70 <rtems_libio_share_private_env+0x5c><== NOT EXECUTED
2003eb8: 03 00 80 5b sethi %hi(0x2016c00), %g1 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2003ebc: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2003ec0: 10 bf ff ee b 2003e78 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
2003ec4: c2 24 a3 4c st %g1, [ %l2 + 0x34c ] <== NOT EXECUTED
0200ac3c <rtems_libio_to_fcntl_flags>:
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
200ac3c: 84 10 00 08 mov %o0, %g2
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
200ac40: 82 08 a0 06 and %g2, 6, %g1
200ac44: 80 a0 60 06 cmp %g1, 6
200ac48: 02 80 00 06 be 200ac60 <rtems_libio_to_fcntl_flags+0x24> <== NEVER TAKEN
200ac4c: 90 10 20 02 mov 2, %o0
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
200ac50: 83 30 a0 02 srl %g2, 2, %g1
200ac54: 80 88 a0 02 btst 2, %g2
200ac58: 12 80 00 0e bne 200ac90 <rtems_libio_to_fcntl_flags+0x54> <== ALWAYS TAKEN
200ac5c: 90 08 60 01 and %g1, 1, %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 ) {
200ac60: 80 88 a0 01 btst 1, %g2
200ac64: 02 80 00 04 be 200ac74 <rtems_libio_to_fcntl_flags+0x38>
200ac68: 80 88 a2 00 btst 0x200, %g2
fcntl_flags |= O_NONBLOCK;
200ac6c: 03 00 00 10 sethi %hi(0x4000), %g1
200ac70: 90 12 00 01 or %o0, %g1, %o0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
200ac74: 32 80 00 02 bne,a 200ac7c <rtems_libio_to_fcntl_flags+0x40>
200ac78: 90 12 20 08 or %o0, 8, %o0
fcntl_flags |= O_APPEND;
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
200ac7c: 80 88 a4 00 btst 0x400, %g2
200ac80: 32 80 00 02 bne,a 200ac88 <rtems_libio_to_fcntl_flags+0x4c>
200ac84: 90 12 22 00 or %o0, 0x200, %o0
fcntl_flags |= O_CREAT;
}
return fcntl_flags;
}
200ac88: 81 c3 e0 08 retl
200ac8c: 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) {
200ac90: 10 bf ff f4 b 200ac60 <rtems_libio_to_fcntl_flags+0x24>
200ac94: 90 10 20 00 clr %o0 ! 0 <PROM_START>
02004e60 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
2004e60: 9d e3 bf 98 save %sp, -104, %sp
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
2004e64: a0 96 20 00 orcc %i0, 0, %l0
2004e68: 02 80 00 1f be 2004ee4 <rtems_memalign+0x84>
2004e6c: 03 00 80 79 sethi %hi(0x201e400), %g1
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2004e70: c4 00 62 b4 ld [ %g1 + 0x2b4 ], %g2 ! 201e6b4 <_System_state_Current>
2004e74: 80 a0 a0 03 cmp %g2, 3
2004e78: 02 80 00 16 be 2004ed0 <rtems_memalign+0x70> <== ALWAYS TAKEN
2004e7c: c0 24 00 00 clr [ %l0 ]
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2004e80: 7f ff fb 6d call 2003c34 <malloc_deferred_frees_process>
2004e84: b0 10 20 0c mov 0xc, %i0
/*
* Perform the aligned allocation requested
*/
return_this = _Protected_heap_Allocate_aligned(
2004e88: 92 10 00 1a mov %i2, %o1
2004e8c: 94 10 00 19 mov %i1, %o2
2004e90: 11 00 80 78 sethi %hi(0x201e000), %o0
2004e94: 40 00 14 0a call 2009ebc <_Protected_heap_Allocate_aligned>
2004e98: 90 12 23 48 or %o0, 0x348, %o0 ! 201e348 <RTEMS_Malloc_Heap>
&RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
2004e9c: b4 92 20 00 orcc %o0, 0, %i2
2004ea0: 02 80 00 12 be 2004ee8 <rtems_memalign+0x88>
2004ea4: 03 00 80 77 sethi %hi(0x201dc00), %g1
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
2004ea8: c2 00 60 04 ld [ %g1 + 4 ], %g1 ! 201dc04 <rtems_malloc_statistics_helpers>
2004eac: 80 a0 60 00 cmp %g1, 0
2004eb0: 22 80 00 06 be,a 2004ec8 <rtems_memalign+0x68> <== ALWAYS TAKEN
2004eb4: f4 24 00 00 st %i2, [ %l0 ]
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
2004eb8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
2004ebc: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004ec0: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
2004ec4: f4 24 00 00 st %i2, [ %l0 ] <== NOT EXECUTED
2004ec8: 81 c7 e0 08 ret
2004ecc: 91 e8 20 00 restore %g0, 0, %o0
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2004ed0: 7f ff fb 3f call 2003bcc <malloc_is_system_state_OK>
2004ed4: 01 00 00 00 nop
2004ed8: 80 8a 20 ff btst 0xff, %o0
2004edc: 12 bf ff e9 bne 2004e80 <rtems_memalign+0x20> <== ALWAYS TAKEN
2004ee0: 01 00 00 00 nop
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
2004ee4: b0 10 20 16 mov 0x16, %i0 ! 16 <PROM_START+0x16>
}
2004ee8: 81 c7 e0 08 ret
2004eec: 81 e8 00 00 restore
0200f21c <rtems_message_queue_create>:
uint32_t count,
size_t max_message_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f21c: 9d e3 bf 90 save %sp, -112, %sp
CORE_message_queue_Attributes the_msgq_attributes;
#if defined(RTEMS_MULTIPROCESSING)
bool is_global;
#endif
if ( !rtems_is_name_valid( name ) )
200f220: a2 96 20 00 orcc %i0, 0, %l1
200f224: 02 80 00 26 be 200f2bc <rtems_message_queue_create+0xa0>
200f228: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200f22c: 80 a7 20 00 cmp %i4, 0
200f230: 02 80 00 23 be 200f2bc <rtems_message_queue_create+0xa0> <== NEVER TAKEN
200f234: 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 )
200f238: 80 a6 60 00 cmp %i1, 0
200f23c: 02 80 00 20 be 200f2bc <rtems_message_queue_create+0xa0> <== NEVER TAKEN
200f240: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( max_message_size == 0 )
200f244: 80 a6 a0 00 cmp %i2, 0
200f248: 02 80 00 1d be 200f2bc <rtems_message_queue_create+0xa0> <== NEVER TAKEN
200f24c: b0 10 20 08 mov 8, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200f250: 05 00 80 c8 sethi %hi(0x2032000), %g2
200f254: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 2032290 <_Thread_Dispatch_disable_level>
200f258: 82 00 60 01 inc %g1
200f25c: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
#endif
#endif
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
200f260: 40 00 28 21 call 20192e4 <_Message_queue_Allocate>
200f264: 01 00 00 00 nop
if ( !the_message_queue ) {
200f268: a0 92 20 00 orcc %o0, 0, %l0
200f26c: 02 80 00 26 be 200f304 <rtems_message_queue_create+0xe8>
200f270: 80 8e e0 04 btst 4, %i3
}
#endif
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
200f274: 02 80 00 14 be 200f2c4 <rtems_message_queue_create+0xa8>
200f278: f6 24 20 10 st %i3, [ %l0 + 0x10 ]
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
200f27c: 82 10 20 01 mov 1, %g1
200f280: c2 27 bf f4 st %g1, [ %fp + -12 ]
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
if ( ! _CORE_message_queue_Initialize(
200f284: 94 10 00 19 mov %i1, %o2
200f288: 96 10 00 1a mov %i2, %o3
200f28c: 90 04 20 14 add %l0, 0x14, %o0
200f290: 40 00 0d 91 call 20128d4 <_CORE_message_queue_Initialize>
200f294: 92 07 bf f4 add %fp, -12, %o1
200f298: 80 8a 20 ff btst 0xff, %o0
200f29c: 12 80 00 0c bne 200f2cc <rtems_message_queue_create+0xb0>
200f2a0: 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 );
200f2a4: 11 00 80 ca sethi %hi(0x2032800), %o0
200f2a8: 90 12 23 bc or %o0, 0x3bc, %o0 ! 2032bbc <_Message_queue_Information>
200f2ac: 40 00 13 94 call 20140fc <_Objects_Free>
200f2b0: b0 10 20 0d mov 0xd, %i0
_Objects_MP_Close(
&_Message_queue_Information, the_message_queue->Object.id);
#endif
_Message_queue_Free( the_message_queue );
_Thread_Enable_dispatch();
200f2b4: 40 00 16 94 call 2014d04 <_Thread_Enable_dispatch>
200f2b8: 01 00 00 00 nop
200f2bc: 81 c7 e0 08 ret
200f2c0: 81 e8 00 00 restore
the_message_queue->attribute_set = attribute_set;
if (_Attributes_Is_priority( attribute_set ) )
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY;
else
the_msgq_attributes.discipline = CORE_MESSAGE_QUEUE_DISCIPLINES_FIFO;
200f2c4: 10 bf ff f0 b 200f284 <rtems_message_queue_create+0x68>
200f2c8: c0 27 bf f4 clr [ %fp + -12 ]
200f2cc: c4 04 20 08 ld [ %l0 + 8 ], %g2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f2d0: e2 24 20 0c st %l1, [ %l0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f2d4: 03 00 80 ca sethi %hi(0x2032800), %g1
200f2d8: c6 00 63 d8 ld [ %g1 + 0x3d8 ], %g3 ! 2032bd8 <_Message_queue_Information+0x1c>
&_Message_queue_Information,
&the_message_queue->Object,
(Objects_Name) name
);
*id = the_message_queue->Object.id;
200f2dc: c4 27 00 00 st %g2, [ %i4 ]
200f2e0: 03 00 00 3f sethi %hi(0xfc00), %g1
200f2e4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f2e8: 84 08 80 01 and %g2, %g1, %g2
200f2ec: 85 28 a0 02 sll %g2, 2, %g2
name,
0
);
#endif
_Thread_Enable_dispatch();
200f2f0: b0 10 20 00 clr %i0
200f2f4: 40 00 16 84 call 2014d04 <_Thread_Enable_dispatch>
200f2f8: e0 20 c0 02 st %l0, [ %g3 + %g2 ]
return RTEMS_SUCCESSFUL;
}
200f2fc: 81 c7 e0 08 ret
200f300: 81 e8 00 00 restore
_Thread_Disable_dispatch(); /* protects object pointer */
the_message_queue = _Message_queue_Allocate();
if ( !the_message_queue ) {
_Thread_Enable_dispatch();
200f304: 40 00 16 80 call 2014d04 <_Thread_Enable_dispatch>
200f308: b0 10 20 05 mov 5, %i0
200f30c: 81 c7 e0 08 ret
200f310: 81 e8 00 00 restore
0200f37c <rtems_message_queue_flush>:
rtems_status_code rtems_message_queue_flush(
Objects_Id id,
uint32_t *count
)
{
200f37c: 9d e3 bf 90 save %sp, -112, %sp
200f380: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f384: 80 a6 60 00 cmp %i1, 0
200f388: 02 80 00 0f be 200f3c4 <rtems_message_queue_flush+0x48> <== NEVER TAKEN
200f38c: 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 *)
200f390: 11 00 80 ca sethi %hi(0x2032800), %o0
200f394: 94 07 bf f4 add %fp, -12, %o2
200f398: 40 00 13 d8 call 20142f8 <_Objects_Get>
200f39c: 90 12 23 bc or %o0, 0x3bc, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f3a0: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f3a4: 80 a0 60 00 cmp %g1, 0
200f3a8: 12 80 00 07 bne 200f3c4 <rtems_message_queue_flush+0x48>
200f3ac: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = _CORE_message_queue_Flush( &the_message_queue->message_queue );
200f3b0: 40 00 0d 29 call 2012854 <_CORE_message_queue_Flush>
200f3b4: 90 02 20 14 add %o0, 0x14, %o0
_Thread_Enable_dispatch();
200f3b8: b0 10 20 00 clr %i0
200f3bc: 40 00 16 52 call 2014d04 <_Thread_Enable_dispatch>
200f3c0: d0 26 40 00 st %o0, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f3c4: 81 c7 e0 08 ret
200f3c8: 81 e8 00 00 restore
0200f3cc <rtems_message_queue_get_number_pending>:
rtems_status_code rtems_message_queue_get_number_pending(
Objects_Id id,
uint32_t *count
)
{
200f3cc: 9d e3 bf 90 save %sp, -112, %sp
200f3d0: 92 10 00 18 mov %i0, %o1
register Message_queue_Control *the_message_queue;
Objects_Locations location;
if ( !count )
200f3d4: 80 a6 60 00 cmp %i1, 0
200f3d8: 02 80 00 0e be 200f410 <rtems_message_queue_get_number_pending+0x44><== NEVER TAKEN
200f3dc: b0 10 20 09 mov 9, %i0
200f3e0: 11 00 80 ca sethi %hi(0x2032800), %o0
200f3e4: 94 07 bf f4 add %fp, -12, %o2
200f3e8: 40 00 13 c4 call 20142f8 <_Objects_Get>
200f3ec: 90 12 23 bc or %o0, 0x3bc, %o0
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f3f0: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f3f4: 80 a0 60 00 cmp %g1, 0
200f3f8: 12 80 00 06 bne 200f410 <rtems_message_queue_get_number_pending+0x44>
200f3fc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*count = the_message_queue->message_queue.number_of_pending_messages;
200f400: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
_Thread_Enable_dispatch();
200f404: b0 10 20 00 clr %i0
200f408: 40 00 16 3f call 2014d04 <_Thread_Enable_dispatch>
200f40c: c2 26 40 00 st %g1, [ %i1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f410: 81 c7 e0 08 ret
200f414: 81 e8 00 00 restore
0200f4dc <rtems_message_queue_send>:
rtems_status_code rtems_message_queue_send(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f4dc: 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 )
200f4e0: 80 a6 60 00 cmp %i1, 0
200f4e4: 02 80 00 0c be 200f514 <rtems_message_queue_send+0x38> <== NEVER TAKEN
200f4e8: 90 10 20 09 mov 9, %o0
200f4ec: 11 00 80 ca sethi %hi(0x2032800), %o0
200f4f0: 92 10 00 18 mov %i0, %o1
200f4f4: 90 12 23 bc or %o0, 0x3bc, %o0
200f4f8: 40 00 13 80 call 20142f8 <_Objects_Get>
200f4fc: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f500: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f504: 84 10 00 08 mov %o0, %g2
200f508: 80 a0 60 00 cmp %g1, 0
200f50c: 02 80 00 04 be 200f51c <rtems_message_queue_send+0x40>
200f510: 90 10 20 04 mov 4, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f514: 81 c7 e0 08 ret
200f518: 91 e8 00 08 restore %g0, %o0, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f51c: 96 10 00 18 mov %i0, %o3
200f520: 92 10 00 19 mov %i1, %o1
200f524: 94 10 00 1a mov %i2, %o2
200f528: 90 00 a0 14 add %g2, 0x14, %o0
200f52c: 98 10 20 00 clr %o4
200f530: c0 23 a0 5c clr [ %sp + 0x5c ]
200f534: c0 23 a0 60 clr [ %sp + 0x60 ]
200f538: 1b 1f ff ff sethi %hi(0x7ffffc00), %o5
200f53c: 40 00 0d 57 call 2012a98 <_CORE_message_queue_Submit>
200f540: 9a 13 63 ff or %o5, 0x3ff, %o5 ! 7fffffff <RAM_END+0x7dbfffff>
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f544: 40 00 15 f0 call 2014d04 <_Thread_Enable_dispatch>
200f548: a0 10 00 08 mov %o0, %l0
/*
* 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);
200f54c: 40 00 00 04 call 200f55c <_Message_queue_Translate_core_message_queue_return_code>
200f550: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f554: 81 c7 e0 08 ret
200f558: 91 e8 00 08 restore %g0, %o0, %o0
0200f570 <rtems_message_queue_urgent>:
rtems_status_code rtems_message_queue_urgent(
Objects_Id id,
const void *buffer,
size_t size
)
{
200f570: 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 )
200f574: 80 a6 60 00 cmp %i1, 0
200f578: 02 80 00 0c be 200f5a8 <rtems_message_queue_urgent+0x38> <== NEVER TAKEN
200f57c: 90 10 20 09 mov 9, %o0
200f580: 11 00 80 ca sethi %hi(0x2032800), %o0
200f584: 92 10 00 18 mov %i0, %o1
200f588: 90 12 23 bc or %o0, 0x3bc, %o0
200f58c: 40 00 13 5b call 20142f8 <_Objects_Get>
200f590: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_message_queue = _Message_queue_Get( id, &location );
switch ( location ) {
200f594: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f598: 84 10 00 08 mov %o0, %g2
200f59c: 80 a0 60 00 cmp %g1, 0
200f5a0: 02 80 00 04 be 200f5b0 <rtems_message_queue_urgent+0x40>
200f5a4: 90 10 20 04 mov 4, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f5a8: 81 c7 e0 08 ret
200f5ac: 91 e8 00 08 restore %g0, %o0, %o0
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support,
bool wait,
Watchdog_Interval timeout
)
{
return _CORE_message_queue_Submit(
200f5b0: 96 10 00 18 mov %i0, %o3
200f5b4: 92 10 00 19 mov %i1, %o1
200f5b8: 94 10 00 1a mov %i2, %o2
200f5bc: 90 00 a0 14 add %g2, 0x14, %o0
200f5c0: 98 10 20 00 clr %o4
200f5c4: 1b 20 00 00 sethi %hi(0x80000000), %o5
200f5c8: c0 23 a0 5c clr [ %sp + 0x5c ]
200f5cc: 40 00 0d 33 call 2012a98 <_CORE_message_queue_Submit>
200f5d0: c0 23 a0 60 clr [ %sp + 0x60 ]
id,
MESSAGE_QUEUE_MP_HANDLER,
FALSE, /* sender does not block */
0 /* no timeout */
);
_Thread_Enable_dispatch();
200f5d4: 40 00 15 cc call 2014d04 <_Thread_Enable_dispatch>
200f5d8: a0 10 00 08 mov %o0, %l0
/*
* 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);
200f5dc: 7f ff ff e0 call 200f55c <_Message_queue_Translate_core_message_queue_return_code>
200f5e0: 90 10 00 10 mov %l0, %o0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f5e4: 81 c7 e0 08 ret
200f5e8: 91 e8 00 08 restore %g0, %o0, %o0
02006f24 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
uint32_t the_api,
uint32_t the_class,
rtems_object_api_class_information *info
)
{
2006f24: 9d e3 bf 98 save %sp, -104, %sp
2006f28: 90 10 00 18 mov %i0, %o0
2006f2c: 92 10 00 19 mov %i1, %o1
uint32_t i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
2006f30: 80 a6 a0 00 cmp %i2, 0
2006f34: 02 80 00 1f be 2006fb0 <rtems_object_get_class_information+0x8c>
2006f38: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
2006f3c: 40 00 07 2f call 2008bf8 <_Objects_Get_information>
2006f40: b0 10 20 0a mov 0xa, %i0
if ( !obj_info )
2006f44: 80 a2 20 00 cmp %o0, 0
2006f48: 02 80 00 1a be 2006fb0 <rtems_object_get_class_information+0x8c>
2006f4c: 01 00 00 00 nop
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2006f50: c2 02 20 08 ld [ %o0 + 8 ], %g1
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
2006f54: da 12 20 10 lduh [ %o0 + 0x10 ], %o5
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
2006f58: c2 26 80 00 st %g1, [ %i2 ]
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
2006f5c: c4 0a 20 12 ldub [ %o0 + 0x12 ], %g2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2006f60: c2 02 20 0c ld [ %o0 + 0xc ], %g1
info->auto_extend = obj_info->auto_extend;
2006f64: c4 2e a0 0c stb %g2, [ %i2 + 0xc ]
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
2006f68: c2 26 a0 04 st %g1, [ %i2 + 4 ]
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
2006f6c: da 26 a0 08 st %o5, [ %i2 + 8 ]
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2006f70: 80 a3 60 00 cmp %o5, 0
2006f74: 02 80 00 0d be 2006fa8 <rtems_object_get_class_information+0x84><== NEVER TAKEN
2006f78: 88 10 20 00 clr %g4
2006f7c: d0 02 20 1c ld [ %o0 + 0x1c ], %o0
2006f80: 88 10 20 00 clr %g4
2006f84: 86 10 20 01 mov 1, %g3
if ( !obj_info->local_table[i] )
2006f88: 83 28 e0 02 sll %g3, 2, %g1
2006f8c: c4 02 00 01 ld [ %o0 + %g1 ], %g2
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2006f90: 86 00 e0 01 inc %g3
if ( !obj_info->local_table[i] )
unallocated++;
2006f94: 80 a0 00 02 cmp %g0, %g2
2006f98: 88 61 3f ff subx %g4, -1, %g4
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
2006f9c: 80 a3 40 03 cmp %o5, %g3
2006fa0: 1a bf ff fb bcc 2006f8c <rtems_object_get_class_information+0x68>
2006fa4: 83 28 e0 02 sll %g3, 2, %g1
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
2006fa8: c8 26 a0 10 st %g4, [ %i2 + 0x10 ]
2006fac: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2006fb0: 81 c7 e0 08 ret
2006fb4: 81 e8 00 00 restore
02005c00 <rtems_object_set_name>:
*/
rtems_status_code rtems_object_set_name(
rtems_id id,
const char *name
)
{
2005c00: 9d e3 bf 90 save %sp, -112, %sp
2005c04: 90 10 00 18 mov %i0, %o0
Objects_Information *information;
Objects_Locations location;
Objects_Control *the_object;
Objects_Id tmpId;
if ( !name )
2005c08: 80 a6 60 00 cmp %i1, 0
2005c0c: 02 80 00 16 be 2005c64 <rtems_object_set_name+0x64> <== NEVER TAKEN
2005c10: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2005c14: b0 92 20 00 orcc %o0, 0, %i0
2005c18: 02 80 00 18 be 2005c78 <rtems_object_set_name+0x78>
2005c1c: 03 00 80 6f sethi %hi(0x201bc00), %g1
information = _Objects_Get_information_id( tmpId );
2005c20: 40 00 06 c1 call 2007724 <_Objects_Get_information_id>
2005c24: 90 10 00 18 mov %i0, %o0
if ( !information )
2005c28: a0 92 20 00 orcc %o0, 0, %l0
2005c2c: 02 80 00 10 be 2005c6c <rtems_object_set_name+0x6c>
2005c30: 92 10 00 18 mov %i0, %o1
return RTEMS_INVALID_ID;
the_object = _Objects_Get( information, tmpId, &location );
2005c34: 40 00 07 50 call 2007974 <_Objects_Get>
2005c38: 94 07 bf f4 add %fp, -12, %o2
switch ( location ) {
2005c3c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2005c40: 80 a0 60 00 cmp %g1, 0
2005c44: 32 80 00 08 bne,a 2005c64 <rtems_object_set_name+0x64>
2005c48: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
_Objects_Set_name( information, the_object, name );
2005c4c: 92 10 00 08 mov %o0, %o1
2005c50: 94 10 00 19 mov %i1, %o2
2005c54: 40 00 07 aa call 2007afc <_Objects_Set_name>
2005c58: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
2005c5c: 40 00 09 d7 call 20083b8 <_Thread_Enable_dispatch>
2005c60: b0 10 20 00 clr %i0
2005c64: 81 c7 e0 08 ret
2005c68: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
2005c6c: b0 10 20 04 mov 4, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2005c70: 81 c7 e0 08 ret
2005c74: 81 e8 00 00 restore
Objects_Id tmpId;
if ( !name )
return RTEMS_INVALID_ADDRESS;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
2005c78: c4 00 63 04 ld [ %g1 + 0x304 ], %g2
2005c7c: 10 bf ff e9 b 2005c20 <rtems_object_set_name+0x20>
2005c80: f0 00 a0 08 ld [ %g2 + 8 ], %i0
02003044 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
2003044: 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);
2003048: 11 08 00 00 sethi %hi(0x20000000), %o0 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
200304c: 94 07 a0 48 add %fp, 0x48, %o2 <== NOT EXECUTED
2003050: f2 27 a0 48 st %i1, [ %fp + 0x48 ] <== NOT EXECUTED
2003054: f4 27 a0 4c st %i2, [ %fp + 0x4c ] <== NOT EXECUTED
2003058: f6 27 a0 50 st %i3, [ %fp + 0x50 ] <== NOT EXECUTED
200305c: f8 27 a0 54 st %i4, [ %fp + 0x54 ] <== NOT EXECUTED
2003060: fa 27 a0 58 st %i5, [ %fp + 0x58 ] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
2003064: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2003068: 7f ff ff 7d call 2002e5c <rtems_verror> <== NOT EXECUTED
200306c: d4 27 bf f4 st %o2, [ %fp + -12 ] <== NOT EXECUTED
va_end(arglist);
}
2003070: 81 c7 e0 08 ret <== NOT EXECUTED
2003074: 81 e8 00 00 restore <== NOT EXECUTED
0200f5ec <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
Objects_Id *id
)
{
200f5ec: 9d e3 bf 98 save %sp, -104, %sp
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
200f5f0: a4 96 20 00 orcc %i0, 0, %l2
200f5f4: 02 80 00 36 be 200f6cc <rtems_partition_create+0xe0>
200f5f8: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !starting_address )
200f5fc: 80 a6 60 00 cmp %i1, 0
200f600: 02 80 00 35 be 200f6d4 <rtems_partition_create+0xe8> <== NEVER TAKEN
200f604: 80 a7 60 00 cmp %i5, 0
return RTEMS_INVALID_ADDRESS;
if ( !id )
200f608: 02 80 00 33 be 200f6d4 <rtems_partition_create+0xe8> <== NEVER TAKEN
200f60c: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
200f610: 12 80 00 04 bne 200f620 <rtems_partition_create+0x34>
200f614: 80 a6 e0 00 cmp %i3, 0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
200f618: 81 c7 e0 08 ret
200f61c: 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 ||
200f620: 02 80 00 2b be 200f6cc <rtems_partition_create+0xe0>
200f624: b0 10 20 08 mov 8, %i0
200f628: 80 a6 80 1b cmp %i2, %i3
200f62c: 0a 80 00 28 bcs 200f6cc <rtems_partition_create+0xe0>
200f630: 80 8e e0 07 btst 7, %i3
200f634: 12 80 00 26 bne 200f6cc <rtems_partition_create+0xe0>
200f638: 80 8e 60 07 btst 7, %i1
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
200f63c: 12 80 00 26 bne 200f6d4 <rtems_partition_create+0xe8>
200f640: 05 00 80 c8 sethi %hi(0x2032000), %g2
200f644: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 2032290 <_Thread_Dispatch_disable_level>
200f648: 82 00 60 01 inc %g1
200f64c: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
200f650: 31 00 80 c8 sethi %hi(0x2032000), %i0
200f654: 40 00 11 af call 2013d10 <_Objects_Allocate>
200f658: 90 16 20 44 or %i0, 0x44, %o0 ! 2032044 <_Partition_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
200f65c: a2 92 20 00 orcc %o0, 0, %l1
200f660: 02 80 00 1f be 200f6dc <rtems_partition_create+0xf0>
200f664: 92 10 00 1b mov %i3, %o1
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
200f668: f8 24 60 1c st %i4, [ %l1 + 0x1c ]
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
200f66c: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
the_partition->length = length;
200f670: f4 24 60 14 st %i2, [ %l1 + 0x14 ]
the_partition->buffer_size = buffer_size;
200f674: f6 24 60 18 st %i3, [ %l1 + 0x18 ]
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
200f678: c0 24 60 20 clr [ %l1 + 0x20 ]
_Chain_Initialize( &the_partition->Memory, starting_address,
200f67c: 40 00 4f ed call 2023630 <.udiv>
200f680: 90 10 00 1a mov %i2, %o0
200f684: 92 10 00 19 mov %i1, %o1
200f688: 94 10 00 08 mov %o0, %o2
200f68c: 96 10 00 1b mov %i3, %o3
200f690: a0 04 60 24 add %l1, 0x24, %l0
200f694: 40 00 0c 2c call 2012744 <_Chain_Initialize>
200f698: 90 10 00 10 mov %l0, %o0
200f69c: c4 04 60 08 ld [ %l1 + 8 ], %g2
200f6a0: 82 16 20 44 or %i0, 0x44, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200f6a4: e4 24 60 0c st %l2, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200f6a8: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
200f6ac: c4 27 40 00 st %g2, [ %i5 ]
200f6b0: 03 00 00 3f sethi %hi(0xfc00), %g1
200f6b4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200f6b8: 84 08 80 01 and %g2, %g1, %g2
200f6bc: 85 28 a0 02 sll %g2, 2, %g2
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
200f6c0: b0 10 20 00 clr %i0
200f6c4: 40 00 15 90 call 2014d04 <_Thread_Enable_dispatch>
200f6c8: e2 20 c0 02 st %l1, [ %g3 + %g2 ]
200f6cc: 81 c7 e0 08 ret
200f6d0: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
200f6d4: 81 c7 e0 08 ret
200f6d8: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
200f6dc: 40 00 15 8a call 2014d04 <_Thread_Enable_dispatch>
200f6e0: b0 10 20 05 mov 5, %i0
200f6e4: 81 c7 e0 08 ret
200f6e8: 81 e8 00 00 restore
0200f760 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
Objects_Id id,
void **buffer
)
{
200f760: 9d e3 bf 90 save %sp, -112, %sp
200f764: 92 10 00 18 mov %i0, %o1
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
200f768: 80 a6 60 00 cmp %i1, 0
200f76c: 02 80 00 19 be 200f7d0 <rtems_partition_get_buffer+0x70> <== NEVER TAKEN
200f770: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
200f774: 11 00 80 c8 sethi %hi(0x2032000), %o0
200f778: 94 07 bf f4 add %fp, -12, %o2
200f77c: 40 00 12 df call 20142f8 <_Objects_Get>
200f780: 90 12 20 44 or %o0, 0x44, %o0
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
200f784: c2 07 bf f4 ld [ %fp + -12 ], %g1
200f788: a0 10 00 08 mov %o0, %l0
200f78c: 80 a0 60 00 cmp %g1, 0
200f790: 12 80 00 10 bne 200f7d0 <rtems_partition_get_buffer+0x70>
200f794: b0 10 20 04 mov 4, %i0
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
200f798: 40 00 0b d8 call 20126f8 <_Chain_Get>
200f79c: 90 02 20 24 add %o0, 0x24, %o0
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
200f7a0: b0 92 20 00 orcc %o0, 0, %i0
200f7a4: 02 80 00 09 be 200f7c8 <rtems_partition_get_buffer+0x68>
200f7a8: 01 00 00 00 nop
the_partition->number_of_used_blocks += 1;
200f7ac: c2 04 20 20 ld [ %l0 + 0x20 ], %g1
200f7b0: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
200f7b4: 40 00 15 54 call 2014d04 <_Thread_Enable_dispatch>
200f7b8: c2 24 20 20 st %g1, [ %l0 + 0x20 ]
*buffer = the_buffer;
200f7bc: f0 26 40 00 st %i0, [ %i1 ]
200f7c0: 81 c7 e0 08 ret
200f7c4: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
200f7c8: 40 00 15 4f call 2014d04 <_Thread_Enable_dispatch>
200f7cc: b0 10 20 0d mov 0xd, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200f7d0: 81 c7 e0 08 ret
200f7d4: 81 e8 00 00 restore
0200eb30 <rtems_port_create>:
void *internal_start,
void *external_start,
uint32_t length,
Objects_Id *id
)
{
200eb30: 9d e3 bf 98 save %sp, -104, %sp
register Dual_ported_memory_Control *the_port;
if ( !rtems_is_name_valid( name) )
200eb34: a0 96 20 00 orcc %i0, 0, %l0
200eb38: 02 80 00 22 be 200ebc0 <rtems_port_create+0x90>
200eb3c: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
200eb40: 80 a7 20 00 cmp %i4, 0
200eb44: 02 80 00 05 be 200eb58 <rtems_port_create+0x28> <== NEVER TAKEN
200eb48: 82 16 80 19 or %i2, %i1, %g1
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( internal_start ) ||
200eb4c: 80 88 60 07 btst 7, %g1
200eb50: 02 80 00 04 be 200eb60 <rtems_port_create+0x30>
200eb54: 05 00 80 c8 sethi %hi(0x2032000), %g2
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
200eb58: 81 c7 e0 08 ret
200eb5c: 91 e8 20 09 restore %g0, 9, %o0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200eb60: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1
200eb64: 82 00 60 01 inc %g1
200eb68: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
* of free port control blocks.
*/
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control
*_Dual_ported_memory_Allocate ( void )
{
return (Dual_ported_memory_Control *)
200eb6c: 31 00 80 c8 sethi %hi(0x2032000), %i0
200eb70: 40 00 14 68 call 2013d10 <_Objects_Allocate>
200eb74: 90 16 20 04 or %i0, 4, %o0 ! 2032004 <_Dual_ported_memory_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
200eb78: 80 a2 20 00 cmp %o0, 0
200eb7c: 02 80 00 13 be 200ebc8 <rtems_port_create+0x98>
200eb80: 82 16 20 04 or %i0, 4, %g1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb84: c4 02 20 08 ld [ %o0 + 8 ], %g2
200eb88: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
200eb8c: e0 22 20 0c st %l0, [ %o0 + 0xc ]
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
the_port->external_base = external_start;
the_port->length = length - 1;
200eb90: 82 06 ff ff add %i3, -1, %g1
200eb94: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
&_Dual_ported_memory_Information,
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
200eb98: c4 27 00 00 st %g2, [ %i4 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200eb9c: 03 00 00 3f sethi %hi(0xfc00), %g1
200eba0: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200eba4: 84 08 80 01 and %g2, %g1, %g2
200eba8: 85 28 a0 02 sll %g2, 2, %g2
if ( !the_port ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_port->internal_base = internal_start;
200ebac: f2 22 20 10 st %i1, [ %o0 + 0x10 ]
the_port->external_base = external_start;
200ebb0: f4 22 20 14 st %i2, [ %o0 + 0x14 ]
200ebb4: d0 20 c0 02 st %o0, [ %g3 + %g2 ]
&the_port->Object,
(Objects_Name) name
);
*id = the_port->Object.id;
_Thread_Enable_dispatch();
200ebb8: 40 00 18 53 call 2014d04 <_Thread_Enable_dispatch>
200ebbc: b0 10 20 00 clr %i0
200ebc0: 81 c7 e0 08 ret
200ebc4: 81 e8 00 00 restore
_Thread_Disable_dispatch(); /* to prevent deletion */
the_port = _Dual_ported_memory_Allocate();
if ( !the_port ) {
_Thread_Enable_dispatch();
200ebc8: 40 00 18 4f call 2014d04 <_Thread_Enable_dispatch>
200ebcc: b0 10 20 05 mov 5, %i0
200ebd0: 81 c7 e0 08 ret
200ebd4: 81 e8 00 00 restore
0200ec30 <rtems_port_external_to_internal>:
rtems_status_code rtems_port_external_to_internal(
Objects_Id id,
void *external,
void **internal
)
{
200ec30: 9d e3 bf 90 save %sp, -112, %sp
200ec34: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !internal )
200ec38: 80 a6 a0 00 cmp %i2, 0
200ec3c: 02 80 00 13 be 200ec88 <rtems_port_external_to_internal+0x58><== NEVER TAKEN
200ec40: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Dual_ported_memory_Control *_Dual_ported_memory_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Dual_ported_memory_Control *)
200ec44: 11 00 80 c8 sethi %hi(0x2032000), %o0
200ec48: 94 07 bf f4 add %fp, -12, %o2
200ec4c: 40 00 15 ab call 20142f8 <_Objects_Get>
200ec50: 90 12 20 04 or %o0, 4, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ec54: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ec58: 80 a0 60 00 cmp %g1, 0
200ec5c: 12 80 00 0b bne 200ec88 <rtems_port_external_to_internal+0x58>
200ec60: b0 10 20 04 mov 4, %i0
RTEMS_INLINE_ROUTINE uint32_t _Addresses_Subtract (
void *left,
void *right
)
{
return ((char *) left - (char *) right);
200ec64: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
200ec68: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ec6c: 86 26 40 01 sub %i1, %g1, %g3
200ec70: 80 a0 80 03 cmp %g2, %g3
200ec74: 3a 80 00 07 bcc,a 200ec90 <rtems_port_external_to_internal+0x60>
200ec78: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
*internal = external;
200ec7c: f2 26 80 00 st %i1, [ %i2 ]
else
*internal = _Addresses_Add_offset( the_port->internal_base,
ending );
_Thread_Enable_dispatch();
200ec80: 40 00 18 21 call 2014d04 <_Thread_Enable_dispatch>
200ec84: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ec88: 81 c7 e0 08 ret
200ec8c: 81 e8 00 00 restore
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( external, the_port->external_base );
if ( ending > the_port->length )
*internal = external;
else
*internal = _Addresses_Add_offset( the_port->internal_base,
200ec90: 82 00 40 03 add %g1, %g3, %g1
200ec94: 10 bf ff fb b 200ec80 <rtems_port_external_to_internal+0x50>
200ec98: c2 26 80 00 st %g1, [ %i2 ]
0200ecd0 <rtems_port_internal_to_external>:
rtems_status_code rtems_port_internal_to_external(
Objects_Id id,
void *internal,
void **external
)
{
200ecd0: 9d e3 bf 90 save %sp, -112, %sp
200ecd4: 92 10 00 18 mov %i0, %o1
register Dual_ported_memory_Control *the_port;
Objects_Locations location;
uint32_t ending;
if ( !external )
200ecd8: 80 a6 a0 00 cmp %i2, 0
200ecdc: 02 80 00 13 be 200ed28 <rtems_port_internal_to_external+0x58><== NEVER TAKEN
200ece0: b0 10 20 09 mov 9, %i0
200ece4: 11 00 80 c8 sethi %hi(0x2032000), %o0
200ece8: 94 07 bf f4 add %fp, -12, %o2
200ecec: 40 00 15 83 call 20142f8 <_Objects_Get>
200ecf0: 90 12 20 04 or %o0, 4, %o0
return RTEMS_INVALID_ADDRESS;
the_port = _Dual_ported_memory_Get( id, &location );
switch ( location ) {
200ecf4: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ecf8: 80 a0 60 00 cmp %g1, 0
200ecfc: 12 80 00 0b bne 200ed28 <rtems_port_internal_to_external+0x58>
200ed00: b0 10 20 04 mov 4, %i0
200ed04: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
200ed08: c4 02 20 18 ld [ %o0 + 0x18 ], %g2
200ed0c: 86 26 40 01 sub %i1, %g1, %g3
200ed10: 80 a0 80 03 cmp %g2, %g3
200ed14: 3a 80 00 07 bcc,a 200ed30 <rtems_port_internal_to_external+0x60>
200ed18: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
*external = internal;
200ed1c: f2 26 80 00 st %i1, [ %i2 ]
else
*external = _Addresses_Add_offset( the_port->external_base,
ending );
_Thread_Enable_dispatch();
200ed20: 40 00 17 f9 call 2014d04 <_Thread_Enable_dispatch>
200ed24: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ed28: 81 c7 e0 08 ret
200ed2c: 81 e8 00 00 restore
case OBJECTS_LOCAL:
ending = _Addresses_Subtract( internal, the_port->internal_base );
if ( ending > the_port->length )
*external = internal;
else
*external = _Addresses_Add_offset( the_port->external_base,
200ed30: 82 00 40 03 add %g1, %g3, %g1
200ed34: 10 bf ff fb b 200ed20 <rtems_port_internal_to_external+0x50>
200ed38: c2 26 80 00 st %g1, [ %i2 ]
020066f0 <rtems_rate_monotonic_create>:
rtems_status_code rtems_rate_monotonic_create(
rtems_name name,
Objects_Id *id
)
{
20066f0: 9d e3 bf 98 save %sp, -104, %sp
Rate_monotonic_Control *the_period;
if ( !rtems_is_name_valid( name ) )
20066f4: a2 96 20 00 orcc %i0, 0, %l1
20066f8: 02 80 00 33 be 20067c4 <rtems_rate_monotonic_create+0xd4>
20066fc: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
2006700: 80 a6 60 00 cmp %i1, 0
2006704: 02 80 00 30 be 20067c4 <rtems_rate_monotonic_create+0xd4> <== NEVER TAKEN
2006708: b0 10 20 09 mov 9, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200670c: 05 00 80 74 sethi %hi(0x201d000), %g2
2006710: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
2006714: 82 00 60 01 inc %g1
2006718: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ]
* This function allocates a period control block from
* the inactive chain of free period control blocks.
*/
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Allocate( void )
{
return (Rate_monotonic_Control *)
200671c: 21 00 80 74 sethi %hi(0x201d000), %l0
2006720: 40 00 08 51 call 2008864 <_Objects_Allocate>
2006724: 90 14 22 3c or %l0, 0x23c, %o0 ! 201d23c <_Rate_monotonic_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
2006728: 80 a2 20 00 cmp %o0, 0
200672c: 02 80 00 28 be 20067cc <rtems_rate_monotonic_create+0xdc>
2006730: 03 00 80 75 sethi %hi(0x201d400), %g1
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
2006734: c4 00 60 74 ld [ %g1 + 0x74 ], %g2 ! 201d474 <_Thread_Executing>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2006738: c0 22 20 30 clr [ %o0 + 0x30 ]
the_period->state = RATE_MONOTONIC_INACTIVE;
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
200673c: c0 22 20 54 clr [ %o0 + 0x54 ]
if ( !the_period ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_period->owner = _Thread_Executing;
2006740: c4 22 20 50 st %g2, [ %o0 + 0x50 ]
the_period->state = RATE_MONOTONIC_INACTIVE;
2006744: c0 22 20 38 clr [ %o0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006748: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
200674c: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006750: c0 22 20 34 clr [ %o0 + 0x34 ]
_Watchdog_Initialize( &the_period->Timer, NULL, 0, NULL );
_Rate_monotonic_Reset_statistics( the_period );
2006754: 82 02 20 54 add %o0, 0x54, %g1
2006758: c0 20 60 34 clr [ %g1 + 0x34 ]
200675c: c0 20 60 04 clr [ %g1 + 4 ]
2006760: c0 20 60 10 clr [ %g1 + 0x10 ]
2006764: c0 20 60 14 clr [ %g1 + 0x14 ]
2006768: c0 20 60 18 clr [ %g1 + 0x18 ]
200676c: c0 20 60 1c clr [ %g1 + 0x1c ]
2006770: c0 20 60 28 clr [ %g1 + 0x28 ]
2006774: c0 20 60 2c clr [ %g1 + 0x2c ]
2006778: c0 20 60 30 clr [ %g1 + 0x30 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200677c: c4 02 20 08 ld [ %o0 + 8 ], %g2
2006780: 86 14 22 3c or %l0, 0x23c, %g3
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2006784: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006788: c8 00 e0 1c ld [ %g3 + 0x1c ], %g4
200678c: 03 1f ff ff sethi %hi(0x7ffffc00), %g1
2006790: 82 10 63 ff or %g1, 0x3ff, %g1 ! 7fffffff <RAM_END+0x7dbfffff>
2006794: c2 22 20 78 st %g1, [ %o0 + 0x78 ]
2006798: c2 22 20 5c st %g1, [ %o0 + 0x5c ]
200679c: c2 22 20 60 st %g1, [ %o0 + 0x60 ]
20067a0: c2 22 20 74 st %g1, [ %o0 + 0x74 ]
&_Rate_monotonic_Information,
&the_period->Object,
(Objects_Name) name
);
*id = the_period->Object.id;
20067a4: c4 26 40 00 st %g2, [ %i1 ]
20067a8: 03 00 00 3f sethi %hi(0xfc00), %g1
20067ac: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
20067b0: 84 08 80 01 and %g2, %g1, %g2
20067b4: 85 28 a0 02 sll %g2, 2, %g2
_Thread_Enable_dispatch();
20067b8: b0 10 20 00 clr %i0
20067bc: 40 00 0c 61 call 2009940 <_Thread_Enable_dispatch>
20067c0: d0 21 00 02 st %o0, [ %g4 + %g2 ]
return RTEMS_SUCCESSFUL;
}
20067c4: 81 c7 e0 08 ret
20067c8: 81 e8 00 00 restore
_Thread_Disable_dispatch(); /* to prevent deletion */
the_period = _Rate_monotonic_Allocate();
if ( !the_period ) {
_Thread_Enable_dispatch();
20067cc: 40 00 0c 5d call 2009940 <_Thread_Enable_dispatch>
20067d0: b0 10 20 05 mov 5, %i0
20067d4: 81 c7 e0 08 ret
20067d8: 81 e8 00 00 restore
0200dd74 <rtems_rate_monotonic_get_statistics>:
rtems_status_code rtems_rate_monotonic_get_statistics(
Objects_Id id,
rtems_rate_monotonic_period_statistics *statistics
)
{
200dd74: 9d e3 bf 90 save %sp, -112, %sp
200dd78: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !statistics )
200dd7c: 80 a6 60 00 cmp %i1, 0
200dd80: 02 80 00 10 be 200ddc0 <rtems_rate_monotonic_get_statistics+0x4c><== NEVER TAKEN
200dd84: b0 10 20 09 mov 9, %i0
200dd88: 11 00 80 74 sethi %hi(0x201d000), %o0
200dd8c: 94 07 bf f4 add %fp, -12, %o2
200dd90: 7f ff ec 69 call 2008f34 <_Objects_Get>
200dd94: 90 12 22 3c or %o0, 0x23c, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200dd98: c2 07 bf f4 ld [ %fp + -12 ], %g1
200dd9c: 80 a0 60 00 cmp %g1, 0
200dda0: 12 80 00 08 bne 200ddc0 <rtems_rate_monotonic_get_statistics+0x4c>
200dda4: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
*statistics = the_period->Statistics;
200dda8: 92 02 20 54 add %o0, 0x54, %o1
200ddac: 94 10 20 38 mov 0x38, %o2
200ddb0: 40 00 09 7b call 201039c <memcpy>
200ddb4: 90 10 00 19 mov %i1, %o0
_Thread_Enable_dispatch();
200ddb8: 7f ff ee e2 call 2009940 <_Thread_Enable_dispatch>
200ddbc: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200ddc0: 81 c7 e0 08 ret
200ddc4: 81 e8 00 00 restore
0200ddc8 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
Objects_Id id,
rtems_rate_monotonic_period_status *status
)
{
200ddc8: 9d e3 bf 88 save %sp, -120, %sp
200ddcc: 92 10 00 18 mov %i0, %o1
Objects_Locations location;
Rate_monotonic_Control *the_period;
if ( !status )
200ddd0: 80 a6 60 00 cmp %i1, 0
200ddd4: 02 80 00 1b be 200de40 <rtems_rate_monotonic_get_status+0x78><== NEVER TAKEN
200ddd8: b0 10 20 09 mov 9, %i0
200dddc: 11 00 80 74 sethi %hi(0x201d000), %o0
200dde0: 94 07 bf f4 add %fp, -12, %o2
200dde4: 7f ff ec 54 call 2008f34 <_Objects_Get>
200dde8: 90 12 22 3c or %o0, 0x23c, %o0
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
200ddec: c2 07 bf f4 ld [ %fp + -12 ], %g1
200ddf0: a2 10 00 08 mov %o0, %l1
200ddf4: 80 a0 60 00 cmp %g1, 0
200ddf8: 12 80 00 12 bne 200de40 <rtems_rate_monotonic_get_status+0x78>
200ddfc: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200de00: c2 02 20 50 ld [ %o0 + 0x50 ], %g1
200de04: 80 a0 60 00 cmp %g1, 0
200de08: 02 80 00 03 be 200de14 <rtems_rate_monotonic_get_status+0x4c><== NEVER TAKEN
200de0c: 84 10 20 00 clr %g2
200de10: c4 00 60 08 ld [ %g1 + 8 ], %g2
status->state = the_period->state;
200de14: c2 04 60 38 ld [ %l1 + 0x38 ], %g1
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
status->owner = ((the_period->owner) ? the_period->owner->Object.id : 0);
200de18: c4 26 40 00 st %g2, [ %i1 ]
status->state = the_period->state;
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
200de1c: 80 a0 60 00 cmp %g1, 0
200de20: 12 80 00 0a bne 200de48 <rtems_rate_monotonic_get_status+0x80>
200de24: c2 26 60 04 st %g1, [ %i1 + 4 ]
#else
status->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;
200de28: c0 26 60 14 clr [ %i1 + 0x14 ]
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;
200de2c: c0 26 60 08 clr [ %i1 + 8 ]
status->since_last_period.tv_nsec = 0;
200de30: c0 26 60 0c clr [ %i1 + 0xc ]
#else
status->since_last_period = 0;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
status->executed_since_last_period.tv_sec = 0;
200de34: c0 26 60 10 clr [ %i1 + 0x10 ]
the_period->owner->cpu_time_used -
the_period->owner_executed_at_period;
#endif
}
_Thread_Enable_dispatch();
200de38: 7f ff ee c2 call 2009940 <_Thread_Enable_dispatch>
200de3c: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
200de40: 81 c7 e0 08 ret
200de44: 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 );
200de48: a0 07 bf ec add %fp, -20, %l0
200de4c: 7f ff e9 7f call 2008448 <_TOD_Get_uptime>
200de50: 90 10 00 10 mov %l0, %o0
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
_Timespec_Subtract(
200de54: 90 04 60 44 add %l1, 0x44, %o0
200de58: 92 10 00 10 mov %l0, %o1
200de5c: 7f ff f3 85 call 200ac70 <_Timespec_Subtract>
200de60: 94 06 60 08 add %i1, 8, %o2
status->since_last_period =
_Watchdog_Ticks_since_boot - the_period->time_at_period;
#endif
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
_Timespec_Subtract(
200de64: 92 10 00 10 mov %l0, %o1
200de68: 94 06 60 10 add %i1, 0x10, %o2
200de6c: 11 00 80 75 sethi %hi(0x201d400), %o0
200de70: 7f ff f3 80 call 200ac70 <_Timespec_Subtract>
200de74: 90 12 20 7c or %o0, 0x7c, %o0 ! 201d47c <_Thread_Time_of_last_context_switch>
200de78: 30 bf ff f0 b,a 200de38 <rtems_rate_monotonic_get_status+0x70>
020069ec <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
Objects_Id id,
rtems_interval length
)
{
20069ec: 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 *)
20069f0: 11 00 80 74 sethi %hi(0x201d000), %o0
20069f4: 92 10 00 18 mov %i0, %o1
20069f8: 90 12 22 3c or %o0, 0x23c, %o0
20069fc: 40 00 09 4e call 2008f34 <_Objects_Get>
2006a00: 94 07 bf f4 add %fp, -12, %o2
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
2006a04: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006a08: 80 a0 60 00 cmp %g1, 0
2006a0c: 02 80 00 04 be 2006a1c <rtems_rate_monotonic_period+0x30>
2006a10: a2 10 00 08 mov %o0, %l1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006a14: 81 c7 e0 08 ret
2006a18: 91 e8 20 04 restore %g0, 4, %o0
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
2006a1c: 25 00 80 75 sethi %hi(0x201d400), %l2
2006a20: c4 02 20 50 ld [ %o0 + 0x50 ], %g2
2006a24: c2 04 a0 74 ld [ %l2 + 0x74 ], %g1
2006a28: 80 a0 80 01 cmp %g2, %g1
2006a2c: 02 80 00 06 be 2006a44 <rtems_rate_monotonic_period+0x58>
2006a30: 80 a6 60 00 cmp %i1, 0
_Thread_Enable_dispatch();
2006a34: 40 00 0b c3 call 2009940 <_Thread_Enable_dispatch>
2006a38: b0 10 20 17 mov 0x17, %i0
2006a3c: 81 c7 e0 08 ret
2006a40: 81 e8 00 00 restore
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
2006a44: 12 80 00 0f bne 2006a80 <rtems_rate_monotonic_period+0x94>
2006a48: 01 00 00 00 nop
switch ( the_period->state ) {
2006a4c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2006a50: 80 a0 60 00 cmp %g1, 0
2006a54: 02 80 00 07 be 2006a70 <rtems_rate_monotonic_period+0x84>
2006a58: b0 10 20 0b mov 0xb, %i0
2006a5c: 82 00 7f fd add %g1, -3, %g1
2006a60: 80 a0 60 01 cmp %g1, 1
2006a64: 18 80 00 03 bgu 2006a70 <rtems_rate_monotonic_period+0x84>
2006a68: b0 10 20 00 clr %i0
2006a6c: b0 10 20 06 mov 6, %i0
);
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2006a70: 40 00 0b b4 call 2009940 <_Thread_Enable_dispatch>
2006a74: 01 00 00 00 nop
2006a78: 81 c7 e0 08 ret
2006a7c: 81 e8 00 00 restore
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
2006a80: 7f ff f0 66 call 2002c18 <sparc_disable_interrupts>
2006a84: 01 00 00 00 nop
2006a88: a0 10 00 08 mov %o0, %l0
switch ( the_period->state ) {
2006a8c: e6 04 60 38 ld [ %l1 + 0x38 ], %l3
2006a90: 80 a4 e0 02 cmp %l3, 2
2006a94: 02 80 00 1a be 2006afc <rtems_rate_monotonic_period+0x110>
2006a98: 80 a4 e0 04 cmp %l3, 4
2006a9c: 02 80 00 32 be 2006b64 <rtems_rate_monotonic_period+0x178>
2006aa0: 80 a4 e0 00 cmp %l3, 0
2006aa4: 12 bf ff dc bne 2006a14 <rtems_rate_monotonic_period+0x28><== NEVER TAKEN
2006aa8: 01 00 00 00 nop
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
2006aac: 7f ff f0 5f call 2002c28 <sparc_enable_interrupts>
2006ab0: 01 00 00 00 nop
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
2006ab4: 7f ff ff 58 call 2006814 <_Rate_monotonic_Initiate_statistics>
2006ab8: 90 10 00 11 mov %l1, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006abc: 84 10 20 02 mov 2, %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006ac0: 03 00 80 1b sethi %hi(0x2006c00), %g1
2006ac4: 82 10 62 c0 or %g1, 0x2c0, %g1 ! 2006ec0 <_Rate_monotonic_Timeout>
the_watchdog->id = id;
2006ac8: f0 24 60 30 st %i0, [ %l1 + 0x30 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006acc: 92 04 60 10 add %l1, 0x10, %o1
2006ad0: 11 00 80 75 sethi %hi(0x201d400), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006ad4: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006ad8: 90 12 20 94 or %o0, 0x94, %o0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006adc: c0 24 60 18 clr [ %l1 + 0x18 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006ae0: c0 24 60 34 clr [ %l1 + 0x34 ]
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
2006ae4: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
2006ae8: c4 24 60 38 st %g2, [ %l1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006aec: c2 24 60 2c st %g1, [ %l1 + 0x2c ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006af0: 40 00 11 2f call 200afac <_Watchdog_Insert>
2006af4: b0 10 20 00 clr %i0
2006af8: 30 bf ff de b,a 2006a70 <rtems_rate_monotonic_period+0x84>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
2006afc: 7f ff ff 62 call 2006884 <_Rate_monotonic_Update_statistics>
2006b00: 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;
2006b04: 82 10 20 01 mov 1, %g1
the_period->next_length = length;
2006b08: 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;
2006b0c: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
the_period->next_length = length;
_ISR_Enable( level );
2006b10: 7f ff f0 46 call 2002c28 <sparc_enable_interrupts>
2006b14: 90 10 00 10 mov %l0, %o0
_Thread_Executing->Wait.id = the_period->Object.id;
2006b18: c2 04 a0 74 ld [ %l2 + 0x74 ], %g1
2006b1c: c4 04 60 08 ld [ %l1 + 8 ], %g2
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2006b20: 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;
2006b24: c4 20 60 20 st %g2, [ %g1 + 0x20 ]
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
2006b28: 40 00 0e 3a call 200a410 <_Thread_Set_state>
2006b2c: 13 00 00 10 sethi %hi(0x4000), %o1
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
2006b30: 7f ff f0 3a call 2002c18 <sparc_disable_interrupts>
2006b34: 01 00 00 00 nop
local_state = the_period->state;
2006b38: e0 04 60 38 ld [ %l1 + 0x38 ], %l0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006b3c: e6 24 60 38 st %l3, [ %l1 + 0x38 ]
_ISR_Enable( level );
2006b40: 7f ff f0 3a call 2002c28 <sparc_enable_interrupts>
2006b44: 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 )
2006b48: 80 a4 20 03 cmp %l0, 3
2006b4c: 02 80 00 17 be 2006ba8 <rtems_rate_monotonic_period+0x1bc><== NEVER TAKEN
2006b50: d0 04 a0 74 ld [ %l2 + 0x74 ], %o0
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
2006b54: 40 00 0b 7b call 2009940 <_Thread_Enable_dispatch>
2006b58: b0 10 20 00 clr %i0
2006b5c: 81 c7 e0 08 ret
2006b60: 81 e8 00 00 restore
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
2006b64: 7f ff ff 48 call 2006884 <_Rate_monotonic_Update_statistics>
2006b68: 90 10 00 11 mov %l1, %o0
_ISR_Enable( level );
2006b6c: 7f ff f0 2f call 2002c28 <sparc_enable_interrupts>
2006b70: 90 10 00 10 mov %l0, %o0
the_period->state = RATE_MONOTONIC_ACTIVE;
2006b74: 82 10 20 02 mov 2, %g1
2006b78: 92 04 60 10 add %l1, 0x10, %o1
2006b7c: 11 00 80 75 sethi %hi(0x201d400), %o0
2006b80: 90 12 20 94 or %o0, 0x94, %o0 ! 201d494 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2006b84: f2 24 60 1c st %i1, [ %l1 + 0x1c ]
the_period->next_length = length;
2006b88: f2 24 60 4c st %i1, [ %l1 + 0x4c ]
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
2006b8c: c2 24 60 38 st %g1, [ %l1 + 0x38 ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006b90: 40 00 11 07 call 200afac <_Watchdog_Insert>
2006b94: b0 10 20 06 mov 6, %i0
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
2006b98: 40 00 0b 6a call 2009940 <_Thread_Enable_dispatch>
2006b9c: 01 00 00 00 nop
2006ba0: 81 c7 e0 08 ret
2006ba4: 81 e8 00 00 restore
/*
* 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 );
2006ba8: 40 00 0a 4d call 20094dc <_Thread_Clear_state> <== NOT EXECUTED
2006bac: 13 00 00 10 sethi %hi(0x4000), %o1 <== NOT EXECUTED
2006bb0: 30 bf ff e9 b,a 2006b54 <rtems_rate_monotonic_period+0x168><== NOT EXECUTED
02006bb4 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2006bb4: 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 )
2006bb8: 80 a6 60 00 cmp %i1, 0
2006bbc: 02 80 00 4a be 2006ce4 <rtems_rate_monotonic_report_statistics_with_plugin+0x130><== NEVER TAKEN
2006bc0: 90 10 00 18 mov %i0, %o0
return;
(*print)( context, "Period information by period\n" );
2006bc4: 13 00 80 6a sethi %hi(0x201a800), %o1
2006bc8: 9f c6 40 00 call %i1
2006bcc: 92 12 63 50 or %o1, 0x350, %o1 ! 201ab50 <rtems_status_assoc+0x1b8>
#if defined(RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS)
(*print)( context, "--- CPU times are in seconds ---\n" );
2006bd0: 90 10 00 18 mov %i0, %o0
2006bd4: 13 00 80 6a sethi %hi(0x201a800), %o1
2006bd8: 9f c6 40 00 call %i1
2006bdc: 92 12 63 70 or %o1, 0x370, %o1 ! 201ab70 <rtems_status_assoc+0x1d8>
#endif
#if defined(RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS)
(*print)( context, "--- Wall times are in seconds ---\n" );
2006be0: 90 10 00 18 mov %i0, %o0
2006be4: 13 00 80 6a sethi %hi(0x201a800), %o1
2006be8: 9f c6 40 00 call %i1
2006bec: 92 12 63 98 or %o1, 0x398, %o1 ! 201ab98 <rtems_status_assoc+0x200>
Be sure to test the various cases.
(*print)( context,"\
1234567890123456789012345678901234567890123456789012345678901234567890123456789\
\n");
*/
(*print)( context, " ID OWNER COUNT MISSED "
2006bf0: 90 10 00 18 mov %i0, %o0
2006bf4: 13 00 80 6a sethi %hi(0x201a800), %o1
2006bf8: 9f c6 40 00 call %i1
2006bfc: 92 12 63 c0 or %o1, 0x3c0, %o1 ! 201abc0 <rtems_status_assoc+0x228>
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
2006c00: 90 10 00 18 mov %i0, %o0
2006c04: 13 00 80 6b sethi %hi(0x201ac00), %o1
2006c08: 9f c6 40 00 call %i1
2006c0c: 92 12 60 10 or %o1, 0x10, %o1 ! 201ac10 <rtems_status_assoc+0x278>
/*
* 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 ;
2006c10: 03 00 80 74 sethi %hi(0x201d000), %g1
2006c14: a6 10 62 3c or %g1, 0x23c, %l3 ! 201d23c <_Rate_monotonic_Information>
2006c18: e4 04 e0 08 ld [ %l3 + 8 ], %l2
id <= _Rate_monotonic_Information.maximum_id ;
2006c1c: c2 04 e0 0c ld [ %l3 + 0xc ], %g1
2006c20: 80 a4 80 01 cmp %l2, %g1
2006c24: 18 80 00 30 bgu 2006ce4 <rtems_rate_monotonic_report_statistics_with_plugin+0x130><== NEVER TAKEN
2006c28: 03 00 80 6b sethi %hi(0x201ac00), %g1
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
2006c2c: 05 00 80 6a sethi %hi(0x201a800), %g2
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2006c30: b6 10 60 60 or %g1, 0x60, %i3
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
2006c34: b8 10 a3 90 or %g2, 0x390, %i4
2006c38: 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 );
2006c3c: ae 07 bf d0 add %fp, -48, %l7
2006c40: ac 07 bf f0 add %fp, -16, %l6
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006c44: ba 07 bf b0 add %fp, -80, %i5
2006c48: aa 07 bf e8 add %fp, -24, %l5
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
2006c4c: 10 80 00 06 b 2006c64 <rtems_rate_monotonic_report_statistics_with_plugin+0xb0>
2006c50: b4 07 bf c8 add %fp, -56, %i2
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
2006c54: 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 ;
2006c58: 80 a0 40 12 cmp %g1, %l2
2006c5c: 0a 80 00 22 bcs 2006ce4 <rtems_rate_monotonic_report_statistics_with_plugin+0x130>
2006c60: 01 00 00 00 nop
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
2006c64: 90 10 00 12 mov %l2, %o0
2006c68: 40 00 1c 43 call 200dd74 <rtems_rate_monotonic_get_statistics>
2006c6c: 92 10 00 14 mov %l4, %o1
if ( status != RTEMS_SUCCESSFUL )
2006c70: 80 a2 20 00 cmp %o0, 0
2006c74: 32 bf ff f8 bne,a 2006c54 <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
2006c78: 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 );
2006c7c: 92 10 00 17 mov %l7, %o1
2006c80: 40 00 1c 52 call 200ddc8 <rtems_rate_monotonic_get_status>
2006c84: 90 10 00 12 mov %l2, %o0
continue;
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
2006c88: d0 07 bf d0 ld [ %fp + -48 ], %o0
2006c8c: 80 a2 20 00 cmp %o0, 0
2006c90: 12 80 00 4b bne 2006dbc <rtems_rate_monotonic_report_statistics_with_plugin+0x208><== ALWAYS TAKEN
2006c94: c0 2f bf f0 clrb [ %fp + -16 ]
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2006c98: d8 1f bf 98 ldd [ %fp + -104 ], %o4 <== NOT EXECUTED
2006c9c: 94 10 00 12 mov %l2, %o2
2006ca0: 92 10 00 1b mov %i3, %o1
2006ca4: 96 10 00 16 mov %l6, %o3
2006ca8: 9f c6 40 00 call %i1
2006cac: 90 10 00 18 mov %i0, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2006cb0: c2 07 bf 98 ld [ %fp + -104 ], %g1
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006cb4: 94 10 00 15 mov %l5, %o2
2006cb8: 90 10 00 1d mov %i5, %o0
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
2006cbc: 80 a0 60 00 cmp %g1, 0
2006cc0: 12 80 00 0b bne 2006cec <rtems_rate_monotonic_report_statistics_with_plugin+0x138>
2006cc4: 92 10 00 1c mov %i4, %o1
(*print)( context, "\n" );
2006cc8: 9f c6 40 00 call %i1
2006ccc: 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 ;
2006cd0: c2 04 e0 0c ld [ %l3 + 0xc ], %g1
id++ ) {
2006cd4: 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 ;
2006cd8: 80 a0 40 12 cmp %g1, %l2
2006cdc: 1a bf ff e3 bcc 2006c68 <rtems_rate_monotonic_report_statistics_with_plugin+0xb4><== ALWAYS TAKEN
2006ce0: 90 10 00 12 mov %l2, %o0
2006ce4: 81 c7 e0 08 ret
2006ce8: 81 e8 00 00 restore
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_CPU_USAGE_STATISTICS
struct timespec cpu_average;
_Timespec_Divide_by_integer(
2006cec: 40 00 0f 78 call 200aacc <_Timespec_Divide_by_integer>
2006cf0: 92 10 00 01 mov %g1, %o1
&the_stats.total_cpu_time,
the_stats.count,
&cpu_average
);
(*print)( context,
2006cf4: d0 07 bf a4 ld [ %fp + -92 ], %o0
2006cf8: 40 00 44 f9 call 20180dc <.div>
2006cfc: 92 10 23 e8 mov 0x3e8, %o1
2006d00: a2 10 00 08 mov %o0, %l1
2006d04: d0 07 bf ac ld [ %fp + -84 ], %o0
2006d08: 40 00 44 f5 call 20180dc <.div>
2006d0c: 92 10 23 e8 mov 0x3e8, %o1
2006d10: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006d14: a0 10 00 08 mov %o0, %l0
2006d18: d0 07 bf ec ld [ %fp + -20 ], %o0
2006d1c: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2006d20: 40 00 44 ef call 20180dc <.div>
2006d24: 92 10 23 e8 mov 0x3e8, %o1
2006d28: d8 07 bf a8 ld [ %fp + -88 ], %o4
2006d2c: d4 07 bf a0 ld [ %fp + -96 ], %o2
2006d30: 96 10 00 11 mov %l1, %o3
2006d34: 9a 10 00 10 mov %l0, %o5
2006d38: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2006d3c: 13 00 80 6b sethi %hi(0x201ac00), %o1
2006d40: 90 10 00 18 mov %i0, %o0
2006d44: 9f c6 40 00 call %i1
2006d48: 92 12 60 78 or %o1, 0x78, %o1
* print Wall time part of statistics
*/
{
#ifdef RTEMS_ENABLE_NANOSECOND_RATE_MONOTONIC_STATISTICS
struct timespec wall_average;
_Timespec_Divide_by_integer(
2006d4c: d2 07 bf 98 ld [ %fp + -104 ], %o1
2006d50: 94 10 00 15 mov %l5, %o2
2006d54: 40 00 0f 5e call 200aacc <_Timespec_Divide_by_integer>
2006d58: 90 10 00 1a mov %i2, %o0
&the_stats.total_wall_time,
the_stats.count,
&wall_average
);
(*print)( context,
2006d5c: d0 07 bf bc ld [ %fp + -68 ], %o0
2006d60: 40 00 44 df call 20180dc <.div>
2006d64: 92 10 23 e8 mov 0x3e8, %o1
2006d68: a2 10 00 08 mov %o0, %l1
2006d6c: d0 07 bf c4 ld [ %fp + -60 ], %o0
2006d70: 40 00 44 db call 20180dc <.div>
2006d74: 92 10 23 e8 mov 0x3e8, %o1
2006d78: c2 07 bf e8 ld [ %fp + -24 ], %g1
2006d7c: a0 10 00 08 mov %o0, %l0
2006d80: d0 07 bf ec ld [ %fp + -20 ], %o0
2006d84: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2006d88: 40 00 44 d5 call 20180dc <.div>
2006d8c: 92 10 23 e8 mov 0x3e8, %o1
2006d90: d4 07 bf b8 ld [ %fp + -72 ], %o2
2006d94: d8 07 bf c0 ld [ %fp + -64 ], %o4
2006d98: d0 23 a0 60 st %o0, [ %sp + 0x60 ]
2006d9c: 96 10 00 11 mov %l1, %o3
2006da0: 9a 10 00 10 mov %l0, %o5
2006da4: 90 10 00 18 mov %i0, %o0
2006da8: 13 00 80 6b sethi %hi(0x201ac00), %o1
2006dac: 9f c6 40 00 call %i1
2006db0: 92 12 60 98 or %o1, 0x98, %o1 ! 201ac98 <rtems_status_assoc+0x300>
/*
* 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 ;
2006db4: 10 bf ff a8 b 2006c54 <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
2006db8: c2 04 e0 0c ld [ %l3 + 0xc ], %g1
#endif
name[ 0 ] = '\0';
if ( the_status.owner ) {
rtems_object_get_name( the_status.owner, sizeof(name), name );
2006dbc: 94 10 00 16 mov %l6, %o2
2006dc0: 40 00 00 70 call 2006f80 <rtems_object_get_name>
2006dc4: 92 10 20 05 mov 5, %o1
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
2006dc8: 10 bf ff b5 b 2006c9c <rtems_rate_monotonic_report_statistics_with_plugin+0xe8>
2006dcc: d8 1f bf 98 ldd [ %fp + -104 ], %o4
02006dec <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
2006dec: 9d e3 bf 98 save %sp, -104, %sp
2006df0: 05 00 80 74 sethi %hi(0x201d000), %g2
2006df4: c2 00 a3 b0 ld [ %g2 + 0x3b0 ], %g1 ! 201d3b0 <_Thread_Dispatch_disable_level>
2006df8: 82 00 60 01 inc %g1
2006dfc: c2 20 a3 b0 st %g1, [ %g2 + 0x3b0 ]
/*
* 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 ;
2006e00: 03 00 80 74 sethi %hi(0x201d000), %g1
2006e04: a2 10 62 3c or %g1, 0x23c, %l1 ! 201d23c <_Rate_monotonic_Information>
2006e08: e0 04 60 08 ld [ %l1 + 8 ], %l0
id <= _Rate_monotonic_Information.maximum_id ;
2006e0c: c2 04 60 0c ld [ %l1 + 0xc ], %g1
2006e10: 80 a4 00 01 cmp %l0, %g1
2006e14: 18 80 00 09 bgu 2006e38 <rtems_rate_monotonic_reset_all_statistics+0x4c><== NEVER TAKEN
2006e18: 01 00 00 00 nop
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
2006e1c: 40 00 00 0a call 2006e44 <rtems_rate_monotonic_reset_statistics>
2006e20: 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 ;
2006e24: c2 04 60 0c ld [ %l1 + 0xc ], %g1
id++ ) {
2006e28: 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 ;
2006e2c: 80 a0 40 10 cmp %g1, %l0
2006e30: 1a bf ff fb bcc 2006e1c <rtems_rate_monotonic_reset_all_statistics+0x30>
2006e34: 01 00 00 00 nop
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
2006e38: 40 00 0a c2 call 2009940 <_Thread_Enable_dispatch>
2006e3c: 81 e8 00 00 restore
02010148 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
Objects_Id id,
void *starting_address,
uint32_t length
)
{
2010148: 9d e3 bf 90 save %sp, -112, %sp
201014c: a0 10 00 18 mov %i0, %l0
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Region_Control *the_region;
if ( !starting_address )
2010150: 80 a6 60 00 cmp %i1, 0
2010154: 02 80 00 28 be 20101f4 <rtems_region_extend+0xac> <== NEVER TAKEN
2010158: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
201015c: 23 00 80 c8 sethi %hi(0x2032000), %l1
2010160: 40 00 09 38 call 2012640 <_API_Mutex_Lock>
2010164: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 ! 203234c <_RTEMS_Allocator_Mutex>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
2010168: 92 10 00 10 mov %l0, %o1
201016c: 11 00 80 c8 sethi %hi(0x2032000), %o0
2010170: 94 07 bf f0 add %fp, -16, %o2
2010174: 40 00 10 4f call 20142b0 <_Objects_Get_no_protection>
2010178: 90 12 20 c4 or %o0, 0xc4, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
201017c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010180: 80 a0 60 00 cmp %g1, 0
2010184: 12 80 00 16 bne 20101dc <rtems_region_extend+0x94>
2010188: a0 10 00 08 mov %o0, %l0
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
201018c: 92 10 00 19 mov %i1, %o1
2010190: 94 10 00 1a mov %i2, %o2
2010194: 90 02 20 68 add %o0, 0x68, %o0
2010198: 96 07 bf f4 add %fp, -12, %o3
201019c: 40 00 0c 6e call 2013354 <_Heap_Extend>
20101a0: b0 10 20 09 mov 9, %i0
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20101a4: 80 a2 20 01 cmp %o0, 1
20101a8: 02 80 00 11 be 20101ec <rtems_region_extend+0xa4>
20101ac: 01 00 00 00 nop
20101b0: 1a 80 00 13 bcc 20101fc <rtems_region_extend+0xb4>
20101b4: 80 a2 20 02 cmp %o0, 2
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20101b8: c6 07 bf f4 ld [ %fp + -12 ], %g3
20101bc: c4 04 20 54 ld [ %l0 + 0x54 ], %g2
the_region->maximum_segment_size += amount_extended;
20101c0: c2 04 20 5c ld [ %l0 + 0x5c ], %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20101c4: 84 00 80 03 add %g2, %g3, %g2
the_region->maximum_segment_size += amount_extended;
20101c8: 82 00 40 03 add %g1, %g3, %g1
&amount_extended
);
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
20101cc: c4 24 20 54 st %g2, [ %l0 + 0x54 ]
the_region->maximum_segment_size += amount_extended;
20101d0: c2 24 20 5c st %g1, [ %l0 + 0x5c ]
20101d4: 10 80 00 06 b 20101ec <rtems_region_extend+0xa4>
20101d8: b0 10 20 00 clr %i0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
20101dc: 80 a0 60 01 cmp %g1, 1
20101e0: 02 80 00 03 be 20101ec <rtems_region_extend+0xa4> <== ALWAYS TAKEN
20101e4: b0 10 20 04 mov 4, %i0
switch ( heap_status ) {
case HEAP_EXTEND_SUCCESSFUL:
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
break;
20101e8: b0 10 20 19 mov 0x19, %i0 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
20101ec: 40 00 09 2b call 2012698 <_API_Mutex_Unlock>
20101f0: d0 04 63 4c ld [ %l1 + 0x34c ], %o0
return return_status;
}
20101f4: 81 c7 e0 08 ret
20101f8: 81 e8 00 00 restore
starting_address,
length,
&amount_extended
);
switch ( heap_status ) {
20101fc: 12 bf ff fb bne 20101e8 <rtems_region_extend+0xa0> <== NEVER TAKEN
2010200: b0 10 20 18 mov 0x18, %i0
2010204: 30 bf ff fa b,a 20101ec <rtems_region_extend+0xa4>
0201030c <rtems_region_get_segment>:
uint32_t size,
rtems_option option_set,
rtems_interval timeout,
void **segment
)
{
201030c: 9d e3 bf 90 save %sp, -112, %sp
2010310: a6 10 00 18 mov %i0, %l3
Objects_Locations location;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
register Region_Control *the_region;
void *the_segment;
if ( !segment )
2010314: 80 a7 20 00 cmp %i4, 0
2010318: 02 80 00 1b be 2010384 <rtems_region_get_segment+0x78> <== NEVER TAKEN
201031c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
*segment = NULL;
2010320: c0 27 00 00 clr [ %i4 ]
if ( size == 0 )
2010324: 80 a6 60 00 cmp %i1, 0
2010328: 02 80 00 17 be 2010384 <rtems_region_get_segment+0x78> <== NEVER TAKEN
201032c: b0 10 20 08 mov 8, %i0
return RTEMS_INVALID_SIZE;
_RTEMS_Lock_allocator();
2010330: 23 00 80 c8 sethi %hi(0x2032000), %l1
2010334: 40 00 08 c3 call 2012640 <_API_Mutex_Lock>
2010338: d0 04 63 4c ld [ %l1 + 0x34c ], %o0 ! 203234c <_RTEMS_Allocator_Mutex>
executing = _Thread_Executing;
201033c: 03 00 80 c8 sethi %hi(0x2032000), %g1
2010340: 92 10 00 13 mov %l3, %o1
2010344: e4 00 63 54 ld [ %g1 + 0x354 ], %l2
2010348: 11 00 80 c8 sethi %hi(0x2032000), %o0
201034c: 94 07 bf f4 add %fp, -12, %o2
2010350: 40 00 0f d8 call 20142b0 <_Objects_Get_no_protection>
2010354: 90 12 20 c4 or %o0, 0xc4, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010358: c2 07 bf f4 ld [ %fp + -12 ], %g1
201035c: 80 a0 60 00 cmp %g1, 0
2010360: 02 80 00 0b be 201038c <rtems_region_get_segment+0x80>
2010364: a0 10 00 08 mov %o0, %l0
2010368: 82 18 60 01 xor %g1, 1, %g1
201036c: 80 a0 00 01 cmp %g0, %g1
2010370: 84 40 3f ff addx %g0, -1, %g2
2010374: b0 08 bf eb and %g2, -21, %i0
2010378: b0 06 20 19 add %i0, 0x19, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
201037c: 40 00 08 c7 call 2012698 <_API_Mutex_Unlock>
2010380: d0 04 63 4c ld [ %l1 + 0x34c ], %o0
return return_status;
}
2010384: 81 c7 e0 08 ret
2010388: 81 e8 00 00 restore
executing = _Thread_Executing;
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( size > the_region->maximum_segment_size )
201038c: c2 02 20 5c ld [ %o0 + 0x5c ], %g1
2010390: 80 a6 40 01 cmp %i1, %g1
2010394: 18 bf ff fa bgu 201037c <rtems_region_get_segment+0x70>
2010398: b0 10 20 08 mov 8, %i0
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uint32_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
201039c: 90 02 20 68 add %o0, 0x68, %o0
20103a0: 40 00 0b ab call 201324c <_Heap_Allocate>
20103a4: 92 10 00 19 mov %i1, %o1
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
20103a8: 80 a2 20 00 cmp %o0, 0
20103ac: 02 80 00 07 be 20103c8 <rtems_region_get_segment+0xbc>
20103b0: b0 10 20 00 clr %i0
the_region->number_of_used_blocks += 1;
20103b4: c2 04 20 64 ld [ %l0 + 0x64 ], %g1
*segment = the_segment;
20103b8: d0 27 00 00 st %o0, [ %i4 ]
the_segment = _Region_Allocate_segment( the_region, size );
_Region_Debug_Walk( the_region, 2 );
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
20103bc: 82 00 60 01 inc %g1
20103c0: 10 bf ff ef b 201037c <rtems_region_get_segment+0x70>
20103c4: c2 24 20 64 st %g1, [ %l0 + 0x64 ]
*segment = the_segment;
return_status = RTEMS_SUCCESSFUL;
}
else if ( _Options_Is_no_wait( option_set ) ) {
20103c8: 80 8e a0 01 btst 1, %i2
20103cc: 12 bf ff ec bne 201037c <rtems_region_get_segment+0x70>
20103d0: b0 10 20 0d mov 0xd, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
20103d4: 05 00 80 c8 sethi %hi(0x2032000), %g2
20103d8: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 2032290 <_Thread_Dispatch_disable_level>
20103dc: 82 00 60 01 inc %g1
20103e0: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
* 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();
20103e4: 40 00 08 ad call 2012698 <_API_Mutex_Unlock>
20103e8: d0 04 63 4c ld [ %l1 + 0x34c ], %o0
executing->Wait.queue = &the_region->Wait_queue;
20103ec: 84 04 20 10 add %l0, 0x10, %g2
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
20103f0: 82 10 20 01 mov 1, %g1
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 );
20103f4: 92 10 00 1b mov %i3, %o1
20103f8: 90 10 00 02 mov %g2, %o0
20103fc: 15 00 80 55 sethi %hi(0x2015400), %o2
2010400: 94 12 a2 d4 or %o2, 0x2d4, %o2 ! 20156d4 <_Thread_queue_Timeout>
* because this thread is going to block.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
executing->Wait.queue = &the_region->Wait_queue;
2010404: c4 24 a0 44 st %g2, [ %l2 + 0x44 ]
2010408: c2 24 20 40 st %g1, [ %l0 + 0x40 ]
executing->Wait.id = id;
201040c: e6 24 a0 20 st %l3, [ %l2 + 0x20 ]
executing->Wait.count = size;
2010410: f2 24 a0 24 st %i1, [ %l2 + 0x24 ]
executing->Wait.return_argument = segment;
_Thread_queue_Enter_critical_section( &the_region->Wait_queue );
_Thread_queue_Enqueue( &the_region->Wait_queue, timeout );
2010414: 40 00 13 9a call 201527c <_Thread_queue_Enqueue_with_handler>
2010418: f8 24 a0 28 st %i4, [ %l2 + 0x28 ]
_Thread_Enable_dispatch();
201041c: 40 00 12 3a call 2014d04 <_Thread_Enable_dispatch>
2010420: 01 00 00 00 nop
return (rtems_status_code) executing->Wait.return_code;
2010424: f0 04 a0 34 ld [ %l2 + 0x34 ], %i0
2010428: 81 c7 e0 08 ret
201042c: 81 e8 00 00 restore
02010504 <rtems_region_resize_segment>:
Objects_Id id,
void *segment,
size_t size,
size_t *old_size
)
{
2010504: 9d e3 bf 88 save %sp, -120, %sp
uint32_t osize;
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
2010508: 80 a6 e0 00 cmp %i3, 0
201050c: 02 80 00 2e be 20105c4 <rtems_region_resize_segment+0xc0>
2010510: 21 00 80 c8 sethi %hi(0x2032000), %l0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
2010514: 40 00 08 4b call 2012640 <_API_Mutex_Lock>
2010518: d0 04 23 4c ld [ %l0 + 0x34c ], %o0 ! 203234c <_RTEMS_Allocator_Mutex>
201051c: 92 10 00 18 mov %i0, %o1
2010520: 11 00 80 c8 sethi %hi(0x2032000), %o0
2010524: 94 07 bf f0 add %fp, -16, %o2
2010528: 40 00 0f 62 call 20142b0 <_Objects_Get_no_protection>
201052c: 90 12 20 c4 or %o0, 0xc4, %o0
the_region = _Region_Get( id, &location );
switch ( location ) {
2010530: c2 07 bf f0 ld [ %fp + -16 ], %g1
2010534: 80 a0 60 00 cmp %g1, 0
2010538: 12 80 00 14 bne 2010588 <rtems_region_resize_segment+0x84>
201053c: b0 10 00 08 mov %o0, %i0
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
2010540: 94 10 00 1a mov %i2, %o2
2010544: 92 10 00 19 mov %i1, %o1
2010548: 90 02 20 68 add %o0, 0x68, %o0
201054c: 96 07 bf ec add %fp, -20, %o3
2010550: 40 00 0d 0b call 201397c <_Heap_Resize_block>
2010554: 98 07 bf f4 add %fp, -12, %o4
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
2010558: c2 07 bf ec ld [ %fp + -20 ], %g1
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
201055c: b4 92 20 00 orcc %o0, 0, %i2
2010560: 12 80 00 13 bne 20105ac <rtems_region_resize_segment+0xa8><== ALWAYS TAKEN
2010564: c2 26 c0 00 st %g1, [ %i3 ]
2010568: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
201056c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2010570: 12 80 00 17 bne 20105cc <rtems_region_resize_segment+0xc8><== NOT EXECUTED
2010574: d0 04 23 4c ld [ %l0 + 0x34c ], %o0 <== NOT EXECUTED
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
2010578: 40 00 08 48 call 2012698 <_API_Mutex_Unlock> <== NOT EXECUTED
201057c: b0 10 20 00 clr %i0 <== NOT EXECUTED
2010580: 81 c7 e0 08 ret <== NOT EXECUTED
2010584: 81 e8 00 00 restore <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
2010588: d0 04 23 4c ld [ %l0 + 0x34c ], %o0
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
201058c: 82 18 60 01 xor %g1, 1, %g1
2010590: 80 a0 00 01 cmp %g0, %g1
2010594: 84 40 3f ff addx %g0, -1, %g2
2010598: b0 08 bf eb and %g2, -21, %i0
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
201059c: 40 00 08 3f call 2012698 <_API_Mutex_Unlock>
20105a0: b0 06 20 19 add %i0, 0x19, %i0
20105a4: 81 c7 e0 08 ret
20105a8: 81 e8 00 00 restore
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
20105ac: d0 04 23 4c ld [ %l0 + 0x34c ], %o0
20105b0: 40 00 08 3a call 2012698 <_API_Mutex_Unlock>
20105b4: b0 10 20 0d mov 0xd, %i0
return
20105b8: 80 a6 a0 01 cmp %i2, 1
20105bc: 02 80 00 07 be 20105d8 <rtems_region_resize_segment+0xd4> <== NEVER TAKEN
20105c0: 01 00 00 00 nop
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
20105c4: 81 c7 e0 08 ret
20105c8: 91 e8 20 09 restore %g0, 9, %o0
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL && avail_size > 0 )
_Region_Process_queue( the_region ); /* unlocks allocator */
20105cc: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20105d0: 40 00 23 72 call 2019398 <_Region_Process_queue> <== NOT EXECUTED
20105d4: b0 10 20 00 clr %i0 <== NOT EXECUTED
20105d8: 81 c7 e0 08 ret <== NOT EXECUTED
20105dc: 81 e8 00 00 restore <== NOT EXECUTED
020055c4 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
20055c4: 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 ) )
20055c8: a4 96 20 00 orcc %i0, 0, %l2
20055cc: 02 80 00 33 be 2005698 <rtems_semaphore_create+0xd4>
20055d0: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
20055d4: 80 a7 20 00 cmp %i4, 0
20055d8: 02 80 00 30 be 2005698 <rtems_semaphore_create+0xd4> <== NEVER TAKEN
20055dc: b0 10 20 09 mov 9, %i0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
20055e0: 82 8e a0 c0 andcc %i2, 0xc0, %g1
20055e4: 12 80 00 2f bne 20056a0 <rtems_semaphore_create+0xdc>
20055e8: a0 0e a0 30 and %i2, 0x30, %l0
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 ) )
20055ec: 80 a4 20 00 cmp %l0, 0
20055f0: 02 80 00 04 be 2005600 <rtems_semaphore_create+0x3c>
20055f4: 80 a6 60 01 cmp %i1, 1
20055f8: 18 80 00 28 bgu 2005698 <rtems_semaphore_create+0xd4>
20055fc: b0 10 20 0a mov 0xa, %i0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2005600: 05 00 80 60 sethi %hi(0x2018000), %g2
2005604: c2 00 a3 10 ld [ %g2 + 0x310 ], %g1 ! 2018310 <_Thread_Dispatch_disable_level>
2005608: 82 00 60 01 inc %g1
200560c: c2 20 a3 10 st %g1, [ %g2 + 0x310 ]
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
2005610: 31 00 80 60 sethi %hi(0x2018000), %i0
2005614: 40 00 05 94 call 2006c64 <_Objects_Allocate>
2005618: 90 16 21 d4 or %i0, 0x1d4, %o0 ! 20181d4 <_Semaphore_Information>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
200561c: a2 92 20 00 orcc %o0, 0, %l1
2005620: 02 80 00 4e be 2005758 <rtems_semaphore_create+0x194>
2005624: 80 a4 20 00 cmp %l0, 0
* 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 ) ) {
2005628: 02 80 00 2c be 20056d8 <rtems_semaphore_create+0x114>
200562c: f4 24 60 10 st %i2, [ %l1 + 0x10 ]
CORE_mutex_Status mutex_status;
if ( _Attributes_Is_inherit_priority( attribute_set ) )
2005630: 80 8e a0 40 btst 0x40, %i2
2005634: 02 80 00 44 be 2005744 <rtems_semaphore_create+0x180>
2005638: 80 8e a0 80 btst 0x80, %i2
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
200563c: 82 10 20 02 mov 2, %g1
2005640: 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 ) ) {
2005644: 80 a4 20 10 cmp %l0, 0x10
2005648: 02 80 00 48 be 2005768 <rtems_semaphore_create+0x1a4>
200564c: 82 10 20 02 mov 2, %g1
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;
2005650: c0 2f bf e4 clrb [ %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;
2005654: c2 27 bf e0 st %g1, [ %fp + -32 ]
the_mutex_attributes.only_owner_release = FALSE;
}
the_mutex_attributes.priority_ceiling = priority_ceiling;
mutex_status = _CORE_mutex_Initialize(
2005658: 82 1e 60 01 xor %i1, 1, %g1
200565c: 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;
2005660: f6 27 bf ec st %i3, [ %fp + -20 ]
mutex_status = _CORE_mutex_Initialize(
2005664: 94 60 3f ff subx %g0, -1, %o2
2005668: 90 04 60 14 add %l1, 0x14, %o0
200566c: 40 00 03 64 call 20063fc <_CORE_mutex_Initialize>
2005670: 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 ) {
2005674: 80 a2 20 06 cmp %o0, 6
2005678: 32 80 00 26 bne,a 2005710 <rtems_semaphore_create+0x14c> <== ALWAYS TAKEN
200567c: c4 04 60 08 ld [ %l1 + 8 ], %g2
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
2005680: 90 16 21 d4 or %i0, 0x1d4, %o0 <== NOT EXECUTED
2005684: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
2005688: 40 00 06 72 call 2007050 <_Objects_Free> <== NOT EXECUTED
200568c: b0 10 20 13 mov 0x13, %i0 <== NOT EXECUTED
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
2005690: 40 00 09 60 call 2007c10 <_Thread_Enable_dispatch> <== NOT EXECUTED
2005694: 01 00 00 00 nop <== NOT EXECUTED
2005698: 81 c7 e0 08 ret
200569c: 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 ) ||
20056a0: 80 a4 20 10 cmp %l0, 0x10
20056a4: 02 80 00 06 be 20056bc <rtems_semaphore_create+0xf8>
20056a8: 80 a4 20 20 cmp %l0, 0x20
20056ac: 02 80 00 05 be 20056c0 <rtems_semaphore_create+0xfc>
20056b0: 80 8e a0 04 btst 4, %i2
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
20056b4: 81 c7 e0 08 ret
20056b8: 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 ) ||
20056bc: 80 8e a0 04 btst 4, %i2
20056c0: 02 bf ff fd be 20056b4 <rtems_semaphore_create+0xf0>
20056c4: 80 a0 60 c0 cmp %g1, 0xc0
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
20056c8: 12 bf ff ca bne 20055f0 <rtems_semaphore_create+0x2c>
20056cc: 80 a4 20 00 cmp %l0, 0
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
20056d0: 81 c7 e0 08 ret
20056d4: 91 e8 20 0b restore %g0, 0xb, %o0
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
return RTEMS_INVALID_PRIORITY;
}
} else {
if ( _Attributes_Is_priority( attribute_set ) )
20056d8: 80 8e a0 04 btst 4, %i2
20056dc: 22 80 00 04 be,a 20056ec <rtems_semaphore_create+0x128>
20056e0: c0 27 bf f4 clr [ %fp + -12 ]
the_semaphore_attributes.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
20056e4: 82 10 20 01 mov 1, %g1
20056e8: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20056ec: 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;
20056f0: c0 27 bf e0 clr [ %fp + -32 ]
the_mutex_attributes.priority_ceiling = PRIORITY_MINIMUM;
20056f4: c0 27 bf ec clr [ %fp + -20 ]
_CORE_semaphore_Initialize(
20056f8: 94 10 00 19 mov %i1, %o2
/*
* This effectively disables limit checking.
*/
the_semaphore_attributes.maximum_count = 0xFFFFFFFF;
20056fc: 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(
2005700: 90 04 60 14 add %l1, 0x14, %o0
2005704: 40 00 04 29 call 20067a8 <_CORE_semaphore_Initialize>
2005708: 92 07 bf f0 add %fp, -16, %o1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200570c: c4 04 60 08 ld [ %l1 + 8 ], %g2
2005710: 82 16 21 d4 or %i0, 0x1d4, %g1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
2005714: e4 24 60 0c st %l2, [ %l1 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2005718: c6 00 60 1c ld [ %g1 + 0x1c ], %g3
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
200571c: c4 27 00 00 st %g2, [ %i4 ]
2005720: 03 00 00 3f sethi %hi(0xfc00), %g1
2005724: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2005728: 84 08 80 01 and %g2, %g1, %g2
200572c: 85 28 a0 02 sll %g2, 2, %g2
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
2005730: b0 10 20 00 clr %i0
2005734: 40 00 09 37 call 2007c10 <_Thread_Enable_dispatch>
2005738: e2 20 c0 02 st %l1, [ %g3 + %g2 ]
200573c: 81 c7 e0 08 ret
2005740: 81 e8 00 00 restore
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 ) )
2005744: 02 80 00 0f be 2005780 <rtems_semaphore_create+0x1bc>
2005748: 80 8e a0 04 btst 4, %i2
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
200574c: 82 10 20 03 mov 3, %g1
2005750: 10 bf ff bd b 2005644 <rtems_semaphore_create+0x80>
2005754: c2 27 bf e8 st %g1, [ %fp + -24 ]
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
2005758: 40 00 09 2e call 2007c10 <_Thread_Enable_dispatch>
200575c: b0 10 20 05 mov 5, %i0
2005760: 81 c7 e0 08 ret
2005764: 81 e8 00 00 restore
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
2005768: c2 07 bf e8 ld [ %fp + -24 ], %g1
200576c: 80 a0 60 01 cmp %g1, 1
2005770: 18 80 00 09 bgu 2005794 <rtems_semaphore_create+0x1d0>
2005774: c0 27 bf e0 clr [ %fp + -32 ]
case CORE_MUTEX_DISCIPLINES_FIFO:
case CORE_MUTEX_DISCIPLINES_PRIORITY:
the_mutex_attributes.only_owner_release = FALSE;
2005778: 10 bf ff b8 b 2005658 <rtems_semaphore_create+0x94>
200577c: c0 2f bf e4 clrb [ %fp + -28 ]
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 ) )
2005780: 22 bf ff b1 be,a 2005644 <rtems_semaphore_create+0x80>
2005784: c0 27 bf e8 clr [ %fp + -24 ]
the_mutex_attributes.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
2005788: 82 10 20 01 mov 1, %g1
200578c: 10 bf ff ae b 2005644 <rtems_semaphore_create+0x80>
2005790: c2 27 bf e8 st %g1, [ %fp + -24 ]
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attributes.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
switch ( the_mutex_attributes.discipline ) {
2005794: 80 a0 60 03 cmp %g1, 3
2005798: 18 bf ff b1 bgu 200565c <rtems_semaphore_create+0x98> <== NEVER TAKEN
200579c: 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;
20057a0: 82 10 20 01 mov 1, %g1
20057a4: 10 bf ff ad b 2005658 <rtems_semaphore_create+0x94>
20057a8: c2 2f bf e4 stb %g1, [ %fp + -28 ]
0201091c <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
201091c: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
2010920: 11 00 80 c8 sethi %hi(0x2032000), %o0
2010924: 92 10 00 18 mov %i0, %o1
2010928: 90 12 21 04 or %o0, 0x104, %o0
201092c: 40 00 0e 73 call 20142f8 <_Objects_Get>
2010930: 94 07 bf f4 add %fp, -12, %o2
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
2010934: c2 07 bf f4 ld [ %fp + -12 ], %g1
2010938: 80 a0 60 00 cmp %g1, 0
201093c: 12 80 00 0b bne 2010968 <rtems_semaphore_flush+0x4c>
2010940: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
2010944: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
2010948: 80 88 60 30 btst 0x30, %g1
201094c: 12 80 00 09 bne 2010970 <rtems_semaphore_flush+0x54> <== ALWAYS TAKEN
2010950: 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(
2010954: 92 10 20 00 clr %o1 <== NOT EXECUTED
2010958: 40 00 09 86 call 2012f70 <_CORE_semaphore_Flush> <== NOT EXECUTED
201095c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
2010960: 40 00 10 e9 call 2014d04 <_Thread_Enable_dispatch>
2010964: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010968: 81 c7 e0 08 ret
201096c: 81 e8 00 00 restore
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
_CORE_mutex_Flush(
2010970: 92 10 20 00 clr %o1
2010974: 40 00 08 94 call 2012bc4 <_CORE_mutex_Flush>
2010978: 94 10 20 01 mov 1, %o2
201097c: 30 bf ff f9 b,a 2010960 <rtems_semaphore_flush+0x44>
020157cc <rtems_shutdown_executive>:
*/
void rtems_shutdown_executive(
uint32_t result
)
{
20157cc: 9d e3 bf 10 save %sp, -240, %sp
if ( _System_state_Current != SYSTEM_STATE_SHUTDOWN ) {
20157d0: 05 00 80 61 sethi %hi(0x2018400), %g2
20157d4: c2 00 a0 b4 ld [ %g2 + 0xb4 ], %g1 ! 20184b4 <_System_state_Current>
20157d8: 80 a0 60 04 cmp %g1, 4
20157dc: 02 80 00 07 be 20157f8 <rtems_shutdown_executive+0x2c> <== NEVER TAKEN
20157e0: 82 10 20 04 mov 4, %g1
Context_Control *context_p = &context_area;
if ( _System_state_Is_up(_System_state_Get ()) )
context_p = &_Thread_Executing->Registers;
_Context_Switch( context_p, &_Thread_BSP_context );
20157e4: 13 00 80 60 sethi %hi(0x2018000), %o1
20157e8: c2 20 a0 b4 st %g1, [ %g2 + 0xb4 ]
20157ec: 92 12 62 88 or %o1, 0x288, %o1
20157f0: 7f ff cf 02 call 20093f8 <_CPU_Context_switch>
20157f4: 90 07 bf 70 add %fp, -144, %o0
20157f8: 81 c7 e0 08 ret <== NOT EXECUTED
20157fc: 81 e8 00 00 restore <== NOT EXECUTED
02010b80 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
Objects_Id id,
rtems_signal_set signal_set
)
{
2010b80: 9d e3 bf 90 save %sp, -112, %sp
2010b84: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
2010b88: 80 a6 60 00 cmp %i1, 0
2010b8c: 02 80 00 2f be 2010c48 <rtems_signal_send+0xc8> <== NEVER TAKEN
2010b90: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010b94: 40 00 10 6a call 2014d3c <_Thread_Get>
2010b98: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2010b9c: c2 07 bf f4 ld [ %fp + -12 ], %g1
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
2010ba0: a0 10 00 08 mov %o0, %l0
switch ( location ) {
2010ba4: 80 a0 60 00 cmp %g1, 0
2010ba8: 12 80 00 28 bne 2010c48 <rtems_signal_send+0xc8>
2010bac: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
2010bb0: f0 02 21 68 ld [ %o0 + 0x168 ], %i0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
2010bb4: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2010bb8: 80 a0 60 00 cmp %g1, 0
2010bbc: 02 80 00 25 be 2010c50 <rtems_signal_send+0xd0>
2010bc0: 01 00 00 00 nop
if ( asr->is_enabled ) {
2010bc4: c2 0e 20 08 ldub [ %i0 + 8 ], %g1
2010bc8: 80 a0 60 00 cmp %g1, 0
2010bcc: 02 80 00 16 be 2010c24 <rtems_signal_send+0xa4>
2010bd0: 01 00 00 00 nop
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010bd4: 7f ff e9 a8 call 200b274 <sparc_disable_interrupts>
2010bd8: 01 00 00 00 nop
*signal_set |= signals;
2010bdc: c2 06 20 14 ld [ %i0 + 0x14 ], %g1
2010be0: 82 10 40 19 or %g1, %i1, %g1
2010be4: c2 26 20 14 st %g1, [ %i0 + 0x14 ]
_ISR_Enable( _level );
2010be8: 7f ff e9 a7 call 200b284 <sparc_enable_interrupts>
2010bec: 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 ) )
2010bf0: 03 00 80 c8 sethi %hi(0x2032000), %g1
2010bf4: c4 00 63 30 ld [ %g1 + 0x330 ], %g2 ! 2032330 <_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;
2010bf8: 86 10 20 01 mov 1, %g3
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
2010bfc: 80 a0 a0 00 cmp %g2, 0
2010c00: 02 80 00 10 be 2010c40 <rtems_signal_send+0xc0>
2010c04: c6 2c 20 75 stb %g3, [ %l0 + 0x75 ]
2010c08: 03 00 80 c8 sethi %hi(0x2032000), %g1
2010c0c: c4 00 63 54 ld [ %g1 + 0x354 ], %g2 ! 2032354 <_Thread_Executing>
2010c10: 80 a4 00 02 cmp %l0, %g2
2010c14: 12 80 00 0b bne 2010c40 <rtems_signal_send+0xc0> <== NEVER TAKEN
2010c18: 03 00 80 c8 sethi %hi(0x2032000), %g1
_ISR_Signals_to_thread_executing = TRUE;
2010c1c: 10 80 00 09 b 2010c40 <rtems_signal_send+0xc0>
2010c20: c6 28 63 e8 stb %g3, [ %g1 + 0x3e8 ] ! 20323e8 <_ISR_Signals_to_thread_executing>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
2010c24: 7f ff e9 94 call 200b274 <sparc_disable_interrupts>
2010c28: 01 00 00 00 nop
*signal_set |= signals;
2010c2c: c2 06 20 18 ld [ %i0 + 0x18 ], %g1
2010c30: 82 10 40 19 or %g1, %i1, %g1
2010c34: c2 26 20 18 st %g1, [ %i0 + 0x18 ]
_ISR_Enable( _level );
2010c38: 7f ff e9 93 call 200b284 <sparc_enable_interrupts>
2010c3c: 01 00 00 00 nop
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
2010c40: 40 00 10 31 call 2014d04 <_Thread_Enable_dispatch>
2010c44: b0 10 20 00 clr %i0 ! 0 <PROM_START>
2010c48: 81 c7 e0 08 ret
2010c4c: 81 e8 00 00 restore
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2010c50: 40 00 10 2d call 2014d04 <_Thread_Enable_dispatch>
2010c54: b0 10 20 0b mov 0xb, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2010c58: 81 c7 e0 08 ret
2010c5c: 81 e8 00 00 restore
020026c4 <rtems_stack_checker_begin_extension>:
Thread_Control *the_thread
)
{
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
20026c4: c2 02 20 08 ld [ %o0 + 8 ], %g1
20026c8: 80 a0 60 00 cmp %g1, 0
20026cc: 02 80 00 0c be 20026fc <rtems_stack_checker_begin_extension+0x38><== NEVER TAKEN
20026d0: 07 00 80 71 sethi %hi(0x201c400), %g3
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
20026d4: c8 02 20 c8 ld [ %o0 + 0xc8 ], %g4
20026d8: c4 00 e2 90 ld [ %g3 + 0x290 ], %g2
20026dc: 86 10 e2 90 or %g3, 0x290, %g3
20026e0: c4 21 20 08 st %g2, [ %g4 + 8 ]
20026e4: c2 00 e0 04 ld [ %g3 + 4 ], %g1
20026e8: c2 21 20 0c st %g1, [ %g4 + 0xc ]
20026ec: c4 00 e0 08 ld [ %g3 + 8 ], %g2
20026f0: c4 21 20 10 st %g2, [ %g4 + 0x10 ]
20026f4: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
20026f8: c2 21 20 14 st %g1, [ %g4 + 0x14 ]
20026fc: 81 c3 e0 08 retl
02002b34 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running,
Thread_Control *the_thread
)
{
2002b34: 9d e3 bf 98 save %sp, -104, %sp
Stack_check_Initialize();
2002b38: 7f ff ff d7 call 2002a94 <Stack_check_Initialize>
2002b3c: 01 00 00 00 nop
if (the_thread)
2002b40: 80 a6 60 00 cmp %i1, 0
2002b44: 02 80 00 06 be 2002b5c <rtems_stack_checker_create_extension+0x28><== NEVER TAKEN
2002b48: 01 00 00 00 nop
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
2002b4c: d4 06 60 c4 ld [ %i1 + 0xc4 ], %o2
2002b50: d0 06 60 c8 ld [ %i1 + 0xc8 ], %o0
2002b54: 40 00 34 20 call 200fbd4 <memset>
2002b58: 92 10 20 a5 mov 0xa5, %o1
return true;
}
2002b5c: 81 c7 e0 08 ret
2002b60: 91 e8 20 01 restore %g0, 1, %o0
02002998 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
2002998: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
200299c: 21 00 80 72 sethi %hi(0x201c800), %l0 <== NOT EXECUTED
20029a0: c2 04 21 44 ld [ %l0 + 0x144 ], %g1 ! 201c944 <_Thread_Executing><== NOT EXECUTED
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
20029a4: d0 00 60 c8 ld [ %g1 + 0xc8 ], %o0 <== NOT EXECUTED
20029a8: 80 a7 80 08 cmp %fp, %o0 <== NOT EXECUTED
20029ac: 0a 80 00 07 bcs 20029c8 <rtems_stack_checker_is_blown+0x30><== NOT EXECUTED
20029b0: b0 10 20 00 clr %i0 <== NOT EXECUTED
20029b4: c2 00 60 c4 ld [ %g1 + 0xc4 ], %g1 <== NOT EXECUTED
20029b8: 82 02 00 01 add %o0, %g1, %g1 <== NOT EXECUTED
20029bc: 80 a0 40 1e cmp %g1, %fp <== NOT EXECUTED
20029c0: 84 60 3f ff subx %g0, -1, %g2 <== NOT EXECUTED
20029c4: 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 ) {
20029c8: 03 00 80 71 sethi %hi(0x201c400), %g1 <== NOT EXECUTED
20029cc: c4 00 60 0c ld [ %g1 + 0xc ], %g2 ! 201c40c <Stack_check_Initialized><== NOT EXECUTED
20029d0: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20029d4: 12 80 00 0d bne 2002a08 <rtems_stack_checker_is_blown+0x70><== NOT EXECUTED
20029d8: 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 )
20029dc: 80 8e 20 ff btst 0xff, %i0 <== NOT EXECUTED
20029e0: 02 80 00 05 be 20029f4 <rtems_stack_checker_is_blown+0x5c><== NOT EXECUTED
20029e4: 92 08 60 ff and %g1, 0xff, %o1 <== NOT EXECUTED
20029e8: 92 88 60 ff andcc %g1, 0xff, %o1 <== NOT EXECUTED
20029ec: 12 80 00 05 bne 2002a00 <rtems_stack_checker_is_blown+0x68><== NOT EXECUTED
20029f0: 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 );
20029f4: d0 04 21 44 ld [ %l0 + 0x144 ], %o0 <== NOT EXECUTED
20029f8: 7f ff ff cf call 2002934 <Stack_check_report_blown_task> <== NOT EXECUTED
20029fc: b0 10 20 01 mov 1, %i0 <== NOT EXECUTED
return true;
}
2002a00: 81 c7 e0 08 ret <== NOT EXECUTED
2002a04: 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(
2002a08: 90 02 20 08 add %o0, 8, %o0 <== NOT EXECUTED
2002a0c: 13 00 80 71 sethi %hi(0x201c400), %o1 <== NOT EXECUTED
2002a10: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
2002a14: 40 00 34 09 call 200fa38 <memcmp> <== NOT EXECUTED
2002a18: 92 12 62 90 or %o1, 0x290, %o1 <== NOT EXECUTED
2002a1c: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2002a20: 10 bf ff ef b 20029dc <rtems_stack_checker_is_blown+0x44> <== NOT EXECUTED
2002a24: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
02002918 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
2002918: 13 00 80 10 sethi %hi(0x2004000), %o1 <== NOT EXECUTED
200291c: 90 10 20 00 clr %o0 <== NOT EXECUTED
2002920: 92 12 60 5c or %o1, 0x5c, %o1 <== NOT EXECUTED
2002924: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2002928: 7f ff ff e6 call 20028c0 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
200292c: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
020028c0 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
20028c0: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
print_context = context;
20028c4: 23 00 80 71 sethi %hi(0x201c400), %l1 <== NOT EXECUTED
print_handler = print;
20028c8: 21 00 80 71 sethi %hi(0x201c400), %l0 <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
20028cc: f0 24 60 10 st %i0, [ %l1 + 0x10 ] <== NOT EXECUTED
print_handler = print;
20028d0: f2 24 20 14 st %i1, [ %l0 + 0x14 ] <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
20028d4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20028d8: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20028dc: 9f c6 40 00 call %i1 <== NOT EXECUTED
20028e0: 92 12 62 d0 or %o1, 0x2d0, %o1 ! 2019ad0 <pollCallbacks.4788+0x368><== NOT EXECUTED
(*print)( context,
20028e4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20028e8: 13 00 80 66 sethi %hi(0x2019800), %o1 <== NOT EXECUTED
20028ec: 9f c6 40 00 call %i1 <== NOT EXECUTED
20028f0: 92 12 62 e8 or %o1, 0x2e8, %o1 ! 2019ae8 <pollCallbacks.4788+0x380><== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
20028f4: 11 00 80 09 sethi %hi(0x2002400), %o0 <== NOT EXECUTED
20028f8: 40 00 15 c6 call 2008010 <rtems_iterate_over_all_threads> <== NOT EXECUTED
20028fc: 90 12 23 68 or %o0, 0x368, %o0 ! 2002768 <Stack_check_Dump_threads_usage><== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
2002900: 7f ff ff 9a call 2002768 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
2002904: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
print_context = NULL;
2002908: c0 24 60 10 clr [ %l1 + 0x10 ] <== NOT EXECUTED
print_handler = NULL;
200290c: c0 24 20 14 clr [ %l0 + 0x14 ] <== NOT EXECUTED
}
2002910: 81 c7 e0 08 ret <== NOT EXECUTED
2002914: 81 e8 00 00 restore <== NOT EXECUTED
02002a28 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running,
Thread_Control *heir
)
{
2002a28: 9d e3 bf 98 save %sp, -104, %sp
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
2002a2c: c4 06 20 c8 ld [ %i0 + 0xc8 ], %g2
)
{
void *sp = __builtin_frame_address(0);
#if defined(__GNUC__)
if ( sp < the_stack->area ) {
2002a30: 80 a7 80 02 cmp %fp, %g2
2002a34: 0a 80 00 07 bcs 2002a50 <rtems_stack_checker_switch_extension+0x28><== NEVER TAKEN
2002a38: 90 00 a0 08 add %g2, 8, %o0
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
2002a3c: c2 06 20 c4 ld [ %i0 + 0xc4 ], %g1
2002a40: 82 00 80 01 add %g2, %g1, %g1
2002a44: 80 a7 80 01 cmp %fp, %g1
2002a48: 28 80 00 0b bleu,a 2002a74 <rtems_stack_checker_switch_extension+0x4c><== ALWAYS TAKEN
2002a4c: 13 00 80 71 sethi %hi(0x201c400), %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,
2002a50: 13 00 80 71 sethi %hi(0x201c400), %o1 <== NOT EXECUTED
2002a54: 94 10 20 10 mov 0x10, %o2 <== NOT EXECUTED
2002a58: 40 00 33 f8 call 200fa38 <memcmp> <== NOT EXECUTED
2002a5c: 92 12 62 90 or %o1, 0x290, %o1 <== NOT EXECUTED
2002a60: 80 a0 00 08 cmp %g0, %o0 <== NOT EXECUTED
2002a64: 82 60 3f ff subx %g0, -1, %g1 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
2002a68: b2 08 60 01 and %g1, 1, %i1
2002a6c: 7f ff ff b2 call 2002934 <Stack_check_report_blown_task>
2002a70: 81 e8 00 00 restore
/*
* 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,
2002a74: 94 10 20 10 mov 0x10, %o2
2002a78: 40 00 33 f0 call 200fa38 <memcmp>
2002a7c: 92 12 62 90 or %o1, 0x290, %o1
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
2002a80: 80 a2 20 00 cmp %o0, 0
2002a84: 12 bf ff f9 bne 2002a68 <rtems_stack_checker_switch_extension+0x40>
2002a88: 82 10 20 00 clr %g1
2002a8c: 81 c7 e0 08 ret
2002a90: 81 e8 00 00 restore
02002e40 <rtems_status_text>:
const char *
rtems_status_text(
rtems_status_code status
)
{
2002e40: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002e44: 11 00 80 69 sethi %hi(0x201a400), %o0 <== NOT EXECUTED
2002e48: 90 12 23 68 or %o0, 0x368, %o0 ! 201a768 <rtems_status_assoc><== NOT EXECUTED
2002e4c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2002e50: 40 00 26 1a call 200c6b8 <rtems_assoc_name_by_local> <== NOT EXECUTED
2002e54: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02005a2c <rtems_task_create>:
size_t stack_size,
rtems_mode initial_modes,
rtems_attribute attribute_set,
Objects_Id *id
)
{
2005a2c: 9d e3 bf 78 save %sp, -136, %sp
2005a30: a4 10 00 18 mov %i0, %l2
Priority_Control core_priority;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !id )
2005a34: 80 a7 60 00 cmp %i5, 0
2005a38: 02 80 00 38 be 2005b18 <rtems_task_create+0xec> <== NEVER TAKEN
2005a3c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
2005a40: 80 a4 a0 00 cmp %l2, 0
2005a44: 02 80 00 35 be 2005b18 <rtems_task_create+0xec>
2005a48: b0 10 20 03 mov 3, %i0
/*
* Validate the RTEMS API priority and convert it to the core priority range.
*/
if ( !_Attributes_Is_system_task( the_attribute_set ) ) {
2005a4c: 03 00 00 20 sethi %hi(0x8000), %g1
2005a50: 80 8f 00 01 btst %i4, %g1
2005a54: 12 80 00 09 bne 2005a78 <rtems_task_create+0x4c>
2005a58: 80 a6 60 00 cmp %i1, 0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
2005a5c: 02 80 00 2f be 2005b18 <rtems_task_create+0xec>
2005a60: b0 10 20 13 mov 0x13, %i0
2005a64: 03 00 80 5d sethi %hi(0x2017400), %g1
2005a68: c4 08 60 e4 ldub [ %g1 + 0xe4 ], %g2 ! 20174e4 <rtems_maximum_priority>
2005a6c: 80 a6 40 02 cmp %i1, %g2
2005a70: 18 80 00 38 bgu 2005b50 <rtems_task_create+0x124> <== NEVER TAKEN
2005a74: 01 00 00 00 nop
*/
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
2005a78: 31 00 80 60 sethi %hi(0x2018000), %i0
2005a7c: d0 06 23 cc ld [ %i0 + 0x3cc ], %o0 ! 20183cc <_RTEMS_Allocator_Mutex>
2005a80: 40 00 02 2d call 2006334 <_API_Mutex_Lock>
2005a84: 23 00 80 60 sethi %hi(0x2018000), %l1
* This function allocates a task control block from
* the inactive chain of free task control blocks.
*/
RTEMS_INLINE_ROUTINE Thread_Control *_RTEMS_tasks_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
2005a88: 40 00 04 77 call 2006c64 <_Objects_Allocate>
2005a8c: 90 14 62 14 or %l1, 0x214, %o0 ! 2018214 <_RTEMS_tasks_Information>
* the event of an error.
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
2005a90: a0 92 20 00 orcc %o0, 0, %l0
2005a94: 02 80 00 2c be 2005b44 <rtems_task_create+0x118>
2005a98: 83 36 e0 08 srl %i3, 8, %g1
/*
* Initialize the core thread for this task.
*/
status = _Thread_Initialize(
2005a9c: 85 36 e0 09 srl %i3, 9, %g2
2005aa0: 82 18 60 01 xor %g1, 1, %g1
2005aa4: 84 08 a0 01 and %g2, 1, %g2
2005aa8: 82 08 60 01 and %g1, 1, %g1
2005aac: c4 23 a0 60 st %g2, [ %sp + 0x60 ]
2005ab0: c2 23 a0 5c st %g1, [ %sp + 0x5c ]
2005ab4: 84 07 bf f4 add %fp, -12, %g2
2005ab8: 82 0e e0 0f and %i3, 0xf, %g1
2005abc: e4 27 bf f4 st %l2, [ %fp + -12 ]
2005ac0: c0 23 a0 64 clr [ %sp + 0x64 ]
2005ac4: 90 14 62 14 or %l1, 0x214, %o0
2005ac8: 96 10 00 1a mov %i2, %o3
2005acc: 98 0f 20 01 and %i4, 1, %o4
2005ad0: 9a 10 00 19 mov %i1, %o5
2005ad4: c2 23 a0 68 st %g1, [ %sp + 0x68 ]
2005ad8: c4 23 a0 6c st %g2, [ %sp + 0x6c ]
2005adc: 92 10 00 10 mov %l0, %o1
2005ae0: 40 00 08 86 call 2007cf8 <_Thread_Initialize>
2005ae4: 94 10 20 00 clr %o2
NULL, /* no budget algorithm callout */
_Modes_Get_interrupt_level(initial_modes),
(Objects_Name) name
);
if ( !status ) {
2005ae8: 80 8a 20 ff btst 0xff, %o0
2005aec: 02 80 00 0d be 2005b20 <rtems_task_create+0xf4>
2005af0: d0 06 23 cc ld [ %i0 + 0x3cc ], %o0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
*id = the_thread->Object.id;
2005af4: c2 04 20 08 ld [ %l0 + 8 ], %g1
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
2005af8: c6 04 21 68 ld [ %l0 + 0x168 ], %g3
2005afc: 85 36 e0 0a srl %i3, 0xa, %g2
2005b00: 84 18 a0 01 xor %g2, 1, %g2
2005b04: 84 08 a0 01 and %g2, 1, %g2
*id = the_thread->Object.id;
2005b08: c2 27 40 00 st %g1, [ %i5 ]
}
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
asr->is_enabled = _Modes_Is_asr_disabled(initial_modes) ? false : true;
2005b0c: c4 28 e0 08 stb %g2, [ %g3 + 8 ]
);
}
#endif
_RTEMS_Unlock_allocator();
2005b10: 40 00 02 1f call 200638c <_API_Mutex_Unlock>
2005b14: b0 10 20 00 clr %i0
2005b18: 81 c7 e0 08 ret
2005b1c: 81 e8 00 00 restore
*/
RTEMS_INLINE_ROUTINE void _RTEMS_tasks_Free (
Thread_Control *the_task
)
{
_Objects_Free(
2005b20: 40 00 05 71 call 20070e4 <_Objects_Get_information_id>
2005b24: d0 04 20 08 ld [ %l0 + 8 ], %o0
2005b28: 40 00 05 4a call 2007050 <_Objects_Free>
2005b2c: 92 10 00 10 mov %l0, %o1
#if defined(RTEMS_MULTIPROCESSING)
if ( is_global )
_Objects_MP_Free_global_object( the_global_object );
#endif
_RTEMS_tasks_Free( the_thread );
_RTEMS_Unlock_allocator();
2005b30: d0 06 23 cc ld [ %i0 + 0x3cc ], %o0
2005b34: 40 00 02 16 call 200638c <_API_Mutex_Unlock>
2005b38: b0 10 20 0d mov 0xd, %i0
2005b3c: 81 c7 e0 08 ret
2005b40: 81 e8 00 00 restore
*/
the_thread = _RTEMS_tasks_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
2005b44: d0 06 23 cc ld [ %i0 + 0x3cc ], %o0
2005b48: 40 00 02 11 call 200638c <_API_Mutex_Unlock>
2005b4c: b0 10 20 05 mov 5, %i0
2005b50: 81 c7 e0 08 ret
2005b54: 81 e8 00 00 restore
020076f8 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
20076f8: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20076fc: 03 00 80 78 sethi %hi(0x201e000), %g1
2007700: c4 00 61 ac ld [ %g1 + 0x1ac ], %g2 ! 201e1ac <_Configuration_Table>
rtems_status_code rtems_task_get_note(
Objects_Id id,
uint32_t notepad,
uint32_t *note
)
{
2007704: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
2007708: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1
200770c: c4 08 60 04 ldub [ %g1 + 4 ], %g2
2007710: 80 a0 a0 00 cmp %g2, 0
2007714: 02 80 00 20 be 2007794 <rtems_task_get_note+0x9c> <== NEVER TAKEN
2007718: b0 10 20 16 mov 0x16, %i0
return RTEMS_NOT_CONFIGURED;
if ( !note )
200771c: 80 a6 a0 00 cmp %i2, 0
2007720: 02 80 00 1d be 2007794 <rtems_task_get_note+0x9c> <== NEVER TAKEN
2007724: 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 )
2007728: 80 a6 60 0f cmp %i1, 0xf
200772c: 18 80 00 1a bgu 2007794 <rtems_task_get_note+0x9c>
2007730: b0 10 20 0a mov 0xa, %i0
2007734: 03 00 80 78 sethi %hi(0x201e000), %g1
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
2007738: 80 a2 20 00 cmp %o0, 0
200773c: 02 80 00 18 be 200779c <rtems_task_get_note+0xa4>
2007740: 86 10 61 d4 or %g1, 0x1d4, %g3
2007744: 03 00 80 78 sethi %hi(0x201e000), %g1
2007748: c4 00 61 d4 ld [ %g1 + 0x1d4 ], %g2 ! 201e1d4 <_Thread_Executing>
200774c: 86 10 61 d4 or %g1, 0x1d4, %g3
2007750: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2007754: 80 a2 00 01 cmp %o0, %g1
2007758: 22 80 00 12 be,a 20077a0 <rtems_task_get_note+0xa8>
200775c: c4 00 c0 00 ld [ %g3 ], %g2
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007760: 40 00 08 f6 call 2009b38 <_Thread_Get>
2007764: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007768: c2 07 bf f4 ld [ %fp + -12 ], %g1
200776c: 80 a0 60 00 cmp %g1, 0
2007770: 12 80 00 09 bne 2007794 <rtems_task_get_note+0x9c>
2007774: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
2007778: c2 02 21 68 ld [ %o0 + 0x168 ], %g1
200777c: 84 06 60 08 add %i1, 8, %g2
2007780: 85 28 a0 02 sll %g2, 2, %g2
2007784: c6 00 40 02 ld [ %g1 + %g2 ], %g3
_Thread_Enable_dispatch();
2007788: b0 10 20 00 clr %i0
200778c: 40 00 08 dd call 2009b00 <_Thread_Enable_dispatch>
2007790: c6 26 80 00 st %g3, [ %i2 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007794: 81 c7 e0 08 ret
2007798: 81 e8 00 00 restore
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
200779c: c4 00 c0 00 ld [ %g3 ], %g2
20077a0: 82 06 60 08 add %i1, 8, %g1
20077a4: c6 00 a1 68 ld [ %g2 + 0x168 ], %g3
20077a8: 83 28 60 02 sll %g1, 2, %g1
20077ac: c4 00 c0 01 ld [ %g3 + %g1 ], %g2
20077b0: c4 26 80 00 st %g2, [ %i2 ]
20077b4: 81 c7 e0 08 ret
20077b8: 91 e8 20 00 restore %g0, 0, %o0
02005bd4 <rtems_task_ident>:
rtems_status_code rtems_task_ident(
rtems_name name,
uint32_t node,
Objects_Id *id
)
{
2005bd4: 9d e3 bf 98 save %sp, -104, %sp
2005bd8: 92 10 00 18 mov %i0, %o1
2005bdc: 96 10 00 1a mov %i2, %o3
2005be0: 94 10 00 19 mov %i1, %o2
Objects_Name_or_id_lookup_errors status;
if ( !id )
2005be4: 80 a6 a0 00 cmp %i2, 0
2005be8: 02 80 00 11 be 2005c2c <rtems_task_ident+0x58> <== NEVER TAKEN
2005bec: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( name == OBJECTS_ID_OF_SELF ) {
2005bf0: 80 a2 60 00 cmp %o1, 0
2005bf4: 12 80 00 07 bne 2005c10 <rtems_task_ident+0x3c>
2005bf8: 03 00 80 60 sethi %hi(0x2018000), %g1
*id = _Thread_Executing->Object.id;
2005bfc: c4 00 63 d4 ld [ %g1 + 0x3d4 ], %g2 ! 20183d4 <_Thread_Executing>
2005c00: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2005c04: c2 26 80 00 st %g1, [ %i2 ]
2005c08: 81 c7 e0 08 ret
2005c0c: 91 e8 20 00 restore %g0, 0, %o0
return RTEMS_SUCCESSFUL;
}
status = _Objects_Name_to_id_u32( &_RTEMS_tasks_Information, name, node, id );
2005c10: 11 00 80 60 sethi %hi(0x2018000), %o0
2005c14: 40 00 05 dc call 2007384 <_Objects_Name_to_id_u32>
2005c18: 90 12 22 14 or %o0, 0x214, %o0 ! 2018214 <_RTEMS_tasks_Information>
return _Status_Object_name_errors_to_status[ status ];
2005c1c: 03 00 80 59 sethi %hi(0x2016400), %g1
2005c20: 91 2a 20 02 sll %o0, 2, %o0
2005c24: 82 10 63 34 or %g1, 0x334, %g1
2005c28: f0 00 40 08 ld [ %g1 + %o0 ], %i0
}
2005c2c: 81 c7 e0 08 ret
2005c30: 81 e8 00 00 restore
02006258 <rtems_task_is_suspended>:
*/
rtems_status_code rtems_task_is_suspended(
Objects_Id id
)
{
2006258: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
200625c: 90 10 00 18 mov %i0, %o0
2006260: 40 00 07 fa call 2008248 <_Thread_Get>
2006264: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2006268: c2 07 bf f4 ld [ %fp + -12 ], %g1
200626c: 80 a0 60 00 cmp %g1, 0
2006270: 12 80 00 08 bne 2006290 <rtems_task_is_suspended+0x38> <== NEVER TAKEN
2006274: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
2006278: c2 02 20 10 ld [ %o0 + 0x10 ], %g1
200627c: 80 88 60 02 btst 2, %g1
2006280: 02 80 00 06 be 2006298 <rtems_task_is_suspended+0x40>
2006284: 01 00 00 00 nop
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
2006288: 40 00 07 e2 call 2008210 <_Thread_Enable_dispatch>
200628c: b0 10 20 0f mov 0xf, %i0 ! f <PROM_START+0xf>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006290: 81 c7 e0 08 ret
2006294: 81 e8 00 00 restore
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_States_Is_suspended( the_thread->current_state ) ) {
_Thread_Enable_dispatch();
2006298: 40 00 07 de call 2008210 <_Thread_Enable_dispatch>
200629c: b0 10 20 00 clr %i0
20062a0: 81 c7 e0 08 ret
20062a4: 81 e8 00 00 restore
0200d4ac <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
200d4ac: 9d e3 bf 98 save %sp, -104, %sp
200d4b0: a8 10 00 18 mov %i0, %l4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
200d4b4: 80 a6 a0 00 cmp %i2, 0
200d4b8: 02 80 00 44 be 200d5c8 <rtems_task_mode+0x11c> <== NEVER TAKEN
200d4bc: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
200d4c0: 03 00 80 60 sethi %hi(0x2018000), %g1
200d4c4: e4 00 63 d4 ld [ %g1 + 0x3d4 ], %l2 ! 20183d4 <_Thread_Executing>
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200d4c8: c4 0c a0 76 ldub [ %l2 + 0x76 ], %g2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200d4cc: c6 04 a0 7c ld [ %l2 + 0x7c ], %g3
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200d4d0: 80 a0 00 02 cmp %g0, %g2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
200d4d4: e6 04 a1 68 ld [ %l2 + 0x168 ], %l3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
200d4d8: 82 60 3f ff subx %g0, -1, %g1
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
200d4dc: 80 a0 e0 00 cmp %g3, 0
200d4e0: 12 80 00 3c bne 200d5d0 <rtems_task_mode+0x124>
200d4e4: a3 28 60 08 sll %g1, 8, %l1
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200d4e8: c2 0c e0 08 ldub [ %l3 + 8 ], %g1
200d4ec: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200d4f0: 7f ff f0 c7 call 200980c <_CPU_ISR_Get_level>
200d4f4: a0 60 3f ff subx %g0, -1, %l0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200d4f8: a1 2c 20 0a sll %l0, 0xa, %l0
200d4fc: a0 14 00 08 or %l0, %o0, %l0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200d500: a0 14 00 11 or %l0, %l1, %l0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200d504: 80 8e 61 00 btst 0x100, %i1
200d508: 02 80 00 06 be 200d520 <rtems_task_mode+0x74>
200d50c: e0 26 80 00 st %l0, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
200d510: 83 35 20 08 srl %l4, 8, %g1
200d514: 82 18 60 01 xor %g1, 1, %g1
200d518: 82 08 60 01 and %g1, 1, %g1
200d51c: c2 2c a0 76 stb %g1, [ %l2 + 0x76 ]
if ( mask & RTEMS_TIMESLICE_MASK ) {
200d520: 80 8e 62 00 btst 0x200, %i1
200d524: 02 80 00 0b be 200d550 <rtems_task_mode+0xa4>
200d528: 80 8e 60 0f btst 0xf, %i1
if ( _Modes_Is_timeslice(mode_set) ) {
200d52c: 80 8d 22 00 btst 0x200, %l4
200d530: 22 80 00 07 be,a 200d54c <rtems_task_mode+0xa0>
200d534: c0 24 a0 7c clr [ %l2 + 0x7c ]
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200d538: 03 00 80 60 sethi %hi(0x2018000), %g1
200d53c: c4 00 62 68 ld [ %g1 + 0x268 ], %g2 ! 2018268 <_Thread_Ticks_per_timeslice>
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200d540: 82 10 20 01 mov 1, %g1
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
200d544: c4 24 a0 78 st %g2, [ %l2 + 0x78 ]
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
200d548: c2 24 a0 7c st %g1, [ %l2 + 0x7c ]
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
200d54c: 80 8e 60 0f btst 0xf, %i1
200d550: 12 80 00 2d bne 200d604 <rtems_task_mode+0x158>
200d554: 01 00 00 00 nop
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200d558: 80 8e 64 00 btst 0x400, %i1
200d55c: 02 80 00 16 be 200d5b4 <rtems_task_mode+0x108>
200d560: a0 10 20 00 clr %l0
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200d564: c4 0c e0 08 ldub [ %l3 + 8 ], %g2
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200d568: 83 35 20 0a srl %l4, 0xa, %g1
200d56c: 82 18 60 01 xor %g1, 1, %g1
200d570: 82 08 60 01 and %g1, 1, %g1
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
200d574: 80 a0 80 01 cmp %g2, %g1
200d578: 22 80 00 10 be,a 200d5b8 <rtems_task_mode+0x10c>
200d57c: 03 00 80 61 sethi %hi(0x2018400), %g1
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
200d580: 7f ff d2 19 call 2001de4 <sparc_disable_interrupts>
200d584: c2 2c e0 08 stb %g1, [ %l3 + 8 ]
_signals = information->signals_pending;
200d588: c2 04 e0 18 ld [ %l3 + 0x18 ], %g1
information->signals_pending = information->signals_posted;
200d58c: c4 04 e0 14 ld [ %l3 + 0x14 ], %g2
information->signals_posted = _signals;
200d590: c2 24 e0 14 st %g1, [ %l3 + 0x14 ]
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
_signals = information->signals_pending;
information->signals_pending = information->signals_posted;
200d594: c4 24 e0 18 st %g2, [ %l3 + 0x18 ]
information->signals_posted = _signals;
_ISR_Enable( _level );
200d598: 7f ff d2 17 call 2001df4 <sparc_enable_interrupts>
200d59c: 01 00 00 00 nop
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
200d5a0: c2 04 e0 14 ld [ %l3 + 0x14 ], %g1
200d5a4: 80 a0 60 00 cmp %g1, 0
200d5a8: 12 80 00 27 bne 200d644 <rtems_task_mode+0x198>
200d5ac: 82 10 20 01 mov 1, %g1
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200d5b0: a0 10 20 00 clr %l0
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
200d5b4: 03 00 80 61 sethi %hi(0x2018400), %g1
200d5b8: c4 00 60 b4 ld [ %g1 + 0xb4 ], %g2 ! 20184b4 <_System_state_Current>
200d5bc: 80 a0 a0 03 cmp %g2, 3
200d5c0: 02 80 00 16 be 200d618 <rtems_task_mode+0x16c> <== ALWAYS TAKEN
200d5c4: b0 10 20 00 clr %i0
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
200d5c8: 81 c7 e0 08 ret
200d5cc: 81 e8 00 00 restore
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200d5d0: c2 0c e0 08 ldub [ %l3 + 8 ], %g1
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
200d5d4: a2 14 62 00 or %l1, 0x200, %l1
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200d5d8: 80 a0 00 01 cmp %g0, %g1
old_mode |= _ISR_Get_level();
200d5dc: 7f ff f0 8c call 200980c <_CPU_ISR_Get_level>
200d5e0: a0 60 3f ff subx %g0, -1, %l0
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
200d5e4: a1 2c 20 0a sll %l0, 0xa, %l0
200d5e8: a0 14 00 08 or %l0, %o0, %l0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
200d5ec: a0 14 00 11 or %l0, %l1, %l0
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
200d5f0: 80 8e 61 00 btst 0x100, %i1
200d5f4: 02 bf ff cb be 200d520 <rtems_task_mode+0x74>
200d5f8: e0 26 80 00 st %l0, [ %i2 ]
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? TRUE : FALSE;
200d5fc: 10 bf ff c6 b 200d514 <rtems_task_mode+0x68>
200d600: 83 35 20 08 srl %l4, 8, %g1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
200d604: 90 0d 20 0f and %l4, 0xf, %o0
200d608: 7f ff d1 fb call 2001df4 <sparc_enable_interrupts>
200d60c: 91 2a 20 08 sll %o0, 8, %o0
*/
is_asr_enabled = FALSE;
needs_asr_dispatching = FALSE;
if ( mask & RTEMS_ASR_MASK ) {
200d610: 10 bf ff d3 b 200d55c <rtems_task_mode+0xb0>
200d614: 80 8e 64 00 btst 0x400, %i1
}
}
}
if ( _System_state_Is_up(_System_state_Current) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
200d618: 40 00 00 7c call 200d808 <_Thread_Evaluate_mode>
200d61c: 01 00 00 00 nop
200d620: 80 8a 20 ff btst 0xff, %o0
200d624: 12 80 00 04 bne 200d634 <rtems_task_mode+0x188>
200d628: 80 8c 20 ff btst 0xff, %l0
200d62c: 22 bf ff e7 be,a 200d5c8 <rtems_task_mode+0x11c>
200d630: b0 10 20 00 clr %i0
_Thread_Dispatch();
200d634: 7f ff e9 10 call 2007a74 <_Thread_Dispatch>
200d638: b0 10 20 00 clr %i0
200d63c: 81 c7 e0 08 ret
200d640: 81 e8 00 00 restore
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
200d644: a0 10 20 01 mov 1, %l0
200d648: 10 bf ff db b 200d5b4 <rtems_task_mode+0x108>
200d64c: c2 2c a0 75 stb %g1, [ %l2 + 0x75 ]
020078c4 <rtems_task_set_note>:
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20078c4: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20078c8: 03 00 80 78 sethi %hi(0x201e000), %g1
20078cc: c4 00 61 ac ld [ %g1 + 0x1ac ], %g2 ! 201e1ac <_Configuration_Table>
rtems_status_code rtems_task_set_note(
Objects_Id id,
uint32_t notepad,
uint32_t note
)
{
20078d0: 90 10 00 18 mov %i0, %o0
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
20078d4: c2 00 a0 40 ld [ %g2 + 0x40 ], %g1
20078d8: c4 08 60 04 ldub [ %g1 + 4 ], %g2
20078dc: 80 a0 a0 00 cmp %g2, 0
20078e0: 02 80 00 1c be 2007950 <rtems_task_set_note+0x8c> <== NEVER TAKEN
20078e4: b0 10 20 16 mov 0x16, %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 )
20078e8: 80 a6 60 0f cmp %i1, 0xf
20078ec: 18 80 00 19 bgu 2007950 <rtems_task_set_note+0x8c>
20078f0: b0 10 20 0a mov 0xa, %i0
20078f4: 03 00 80 78 sethi %hi(0x201e000), %g1
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
20078f8: 80 a2 20 00 cmp %o0, 0
20078fc: 02 80 00 17 be 2007958 <rtems_task_set_note+0x94>
2007900: 86 10 61 d4 or %g1, 0x1d4, %g3
2007904: 03 00 80 78 sethi %hi(0x201e000), %g1
2007908: c4 00 61 d4 ld [ %g1 + 0x1d4 ], %g2 ! 201e1d4 <_Thread_Executing>
200790c: 86 10 61 d4 or %g1, 0x1d4, %g3
2007910: c2 00 a0 08 ld [ %g2 + 8 ], %g1
2007914: 80 a2 00 01 cmp %o0, %g1
2007918: 22 80 00 11 be,a 200795c <rtems_task_set_note+0x98> <== NEVER TAKEN
200791c: c2 00 c0 00 ld [ %g3 ], %g1 <== NOT EXECUTED
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
2007920: 40 00 08 86 call 2009b38 <_Thread_Get>
2007924: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2007928: c2 07 bf f4 ld [ %fp + -12 ], %g1
200792c: 80 a0 60 00 cmp %g1, 0
2007930: 12 80 00 08 bne 2007950 <rtems_task_set_note+0x8c>
2007934: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
2007938: c4 02 21 68 ld [ %o0 + 0x168 ], %g2
200793c: 82 06 60 08 add %i1, 8, %g1
2007940: 83 28 60 02 sll %g1, 2, %g1
_Thread_Enable_dispatch();
2007944: b0 10 20 00 clr %i0
2007948: 40 00 08 6e call 2009b00 <_Thread_Enable_dispatch>
200794c: f4 20 80 01 st %i2, [ %g2 + %g1 ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2007950: 81 c7 e0 08 ret
2007954: 81 e8 00 00 restore
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
api->Notepads[ notepad ] = note;
2007958: c2 00 c0 00 ld [ %g3 ], %g1
200795c: 84 06 60 08 add %i1, 8, %g2
2007960: c6 00 61 68 ld [ %g1 + 0x168 ], %g3
2007964: 85 28 a0 02 sll %g2, 2, %g2
2007968: f4 20 c0 02 st %i2, [ %g3 + %g2 ]
200796c: 81 c7 e0 08 ret
2007970: 91 e8 20 00 restore %g0, 0, %o0
02006e40 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
Objects_Id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
2006e40: 9d e3 bf 90 save %sp, -112, %sp
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
2006e44: 80 a6 60 00 cmp %i1, 0
2006e48: 02 80 00 07 be 2006e64 <rtems_task_set_priority+0x24>
2006e4c: 90 10 00 18 mov %i0, %o0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
2006e50: 03 00 80 6e sethi %hi(0x201b800), %g1
2006e54: c4 08 62 94 ldub [ %g1 + 0x294 ], %g2 ! 201ba94 <rtems_maximum_priority>
2006e58: 80 a6 40 02 cmp %i1, %g2
2006e5c: 18 80 00 1c bgu 2006ecc <rtems_task_set_priority+0x8c>
2006e60: b0 10 20 13 mov 0x13, %i0
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
2006e64: 80 a6 a0 00 cmp %i2, 0
2006e68: 02 80 00 19 be 2006ecc <rtems_task_set_priority+0x8c> <== NEVER TAKEN
2006e6c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
2006e70: 40 00 08 4f call 2008fac <_Thread_Get>
2006e74: 92 07 bf f4 add %fp, -12, %o1
switch ( location ) {
2006e78: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006e7c: 80 a0 60 00 cmp %g1, 0
2006e80: 12 80 00 13 bne 2006ecc <rtems_task_set_priority+0x8c>
2006e84: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
2006e88: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
2006e8c: 80 a6 60 00 cmp %i1, 0
2006e90: 02 80 00 0d be 2006ec4 <rtems_task_set_priority+0x84>
2006e94: c2 26 80 00 st %g1, [ %i2 ]
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
2006e98: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
2006e9c: 80 a0 60 00 cmp %g1, 0
2006ea0: 02 80 00 06 be 2006eb8 <rtems_task_set_priority+0x78>
2006ea4: f2 22 20 18 st %i1, [ %o0 + 0x18 ]
2006ea8: c2 02 20 14 ld [ %o0 + 0x14 ], %g1
2006eac: 80 a6 40 01 cmp %i1, %g1
2006eb0: 1a 80 00 05 bcc 2006ec4 <rtems_task_set_priority+0x84> <== ALWAYS TAKEN
2006eb4: 01 00 00 00 nop
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, FALSE );
2006eb8: 92 10 00 19 mov %i1, %o1
2006ebc: 40 00 06 98 call 200891c <_Thread_Change_priority>
2006ec0: 94 10 20 00 clr %o2
}
_Thread_Enable_dispatch();
2006ec4: 40 00 08 2c call 2008f74 <_Thread_Enable_dispatch>
2006ec8: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006ecc: 81 c7 e0 08 ret
2006ed0: 81 e8 00 00 restore
02006e14 <rtems_task_variable_add>:
rtems_status_code rtems_task_variable_add(
rtems_id tid,
void **ptr,
void (*dtor)(void *)
)
{
2006e14: 9d e3 bf 90 save %sp, -112, %sp
2006e18: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *new;
if ( !ptr )
2006e1c: 80 a6 60 00 cmp %i1, 0
2006e20: 02 80 00 18 be 2006e80 <rtems_task_variable_add+0x6c> <== NEVER TAKEN
2006e24: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
2006e28: 40 00 08 59 call 2008f8c <_Thread_Get>
2006e2c: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2006e30: c2 07 bf f4 ld [ %fp + -12 ], %g1
rtems_task_variable_t *tvp, *new;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
2006e34: a0 10 00 08 mov %o0, %l0
switch (location) {
2006e38: 80 a0 60 00 cmp %g1, 0
2006e3c: 12 80 00 11 bne 2006e80 <rtems_task_variable_add+0x6c> <== NEVER TAKEN
2006e40: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is already in this task's list.
*/
tvp = the_thread->task_variables;
2006e44: c4 02 21 78 ld [ %o0 + 0x178 ], %g2
while (tvp) {
2006e48: 80 a0 a0 00 cmp %g2, 0
2006e4c: 32 80 00 07 bne,a 2006e68 <rtems_task_variable_add+0x54>
2006e50: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2006e54: 30 80 00 0d b,a 2006e88 <rtems_task_variable_add+0x74>
2006e58: 80 a0 a0 00 cmp %g2, 0
2006e5c: 02 80 00 0b be 2006e88 <rtems_task_variable_add+0x74>
2006e60: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2006e64: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2006e68: 80 a0 40 19 cmp %g1, %i1
2006e6c: 32 bf ff fb bne,a 2006e58 <rtems_task_variable_add+0x44>
2006e70: c4 00 80 00 ld [ %g2 ], %g2
tvp->dtor = dtor;
2006e74: f4 20 a0 10 st %i2, [ %g2 + 0x10 ]
_Thread_Enable_dispatch();
2006e78: 40 00 08 37 call 2008f54 <_Thread_Enable_dispatch>
2006e7c: b0 10 20 00 clr %i0
2006e80: 81 c7 e0 08 ret
2006e84: 81 e8 00 00 restore
}
/*
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
2006e88: 40 00 0d 67 call 200a424 <_Workspace_Allocate>
2006e8c: 90 10 20 14 mov 0x14, %o0
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
2006e90: 80 a2 20 00 cmp %o0, 0
2006e94: 02 80 00 0d be 2006ec8 <rtems_task_variable_add+0xb4>
2006e98: 01 00 00 00 nop
}
new->gval = *ptr;
new->ptr = ptr;
new->dtor = dtor;
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
2006e9c: c4 04 21 78 ld [ %l0 + 0x178 ], %g2
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
2006ea0: 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;
2006ea4: d0 24 21 78 st %o0, [ %l0 + 0x178 ]
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
return RTEMS_NO_MEMORY;
}
new->gval = *ptr;
2006ea8: c2 22 20 08 st %g1, [ %o0 + 8 ]
new->ptr = ptr;
2006eac: f2 22 20 04 st %i1, [ %o0 + 4 ]
new->dtor = dtor;
2006eb0: f4 22 20 10 st %i2, [ %o0 + 0x10 ]
new->next = (struct rtems_task_variable_tt *)the_thread->task_variables;
2006eb4: c4 22 00 00 st %g2, [ %o0 ]
the_thread->task_variables = new;
_Thread_Enable_dispatch();
2006eb8: 40 00 08 27 call 2008f54 <_Thread_Enable_dispatch>
2006ebc: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006ec0: 81 c7 e0 08 ret
2006ec4: 81 e8 00 00 restore
* Now allocate memory for this task variable.
*/
new = (rtems_task_variable_t *)
_Workspace_Allocate(sizeof(rtems_task_variable_t));
if (new == NULL) {
_Thread_Enable_dispatch();
2006ec8: 40 00 08 23 call 2008f54 <_Thread_Enable_dispatch>
2006ecc: b0 10 20 1a mov 0x1a, %i0
2006ed0: 81 c7 e0 08 ret
2006ed4: 81 e8 00 00 restore
02006ed8 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
2006ed8: 9d e3 bf 90 save %sp, -112, %sp
2006edc: 90 10 00 18 mov %i0, %o0
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
2006ee0: 80 a6 60 00 cmp %i1, 0
2006ee4: 02 80 00 1c be 2006f54 <rtems_task_variable_delete+0x7c>
2006ee8: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
2006eec: 40 00 08 28 call 2008f8c <_Thread_Get>
2006ef0: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2006ef4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006ef8: 80 a0 60 00 cmp %g1, 0
2006efc: 12 80 00 16 bne 2006f54 <rtems_task_variable_delete+0x7c> <== NEVER TAKEN
2006f00: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
2006f04: d2 02 21 78 ld [ %o0 + 0x178 ], %o1
while (tvp) {
2006f08: 80 a2 60 00 cmp %o1, 0
2006f0c: 02 80 00 10 be 2006f4c <rtems_task_variable_delete+0x74>
2006f10: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2006f14: c2 02 60 04 ld [ %o1 + 4 ], %g1
2006f18: 80 a0 40 19 cmp %g1, %i1
2006f1c: 12 80 00 08 bne 2006f3c <rtems_task_variable_delete+0x64>
2006f20: 84 10 00 09 mov %o1, %g2
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2006f24: 10 80 00 15 b 2006f78 <rtems_task_variable_delete+0xa0>
2006f28: c2 02 40 00 ld [ %o1 ], %g1
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
2006f2c: 80 a0 40 19 cmp %g1, %i1
2006f30: 22 80 00 0b be,a 2006f5c <rtems_task_variable_delete+0x84>
2006f34: c2 02 40 00 ld [ %o1 ], %g1
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
2006f38: 84 10 00 09 mov %o1, %g2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
2006f3c: d2 02 40 00 ld [ %o1 ], %o1
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
2006f40: 80 a2 60 00 cmp %o1, 0
2006f44: 32 bf ff fa bne,a 2006f2c <rtems_task_variable_delete+0x54><== ALWAYS TAKEN
2006f48: c2 02 60 04 ld [ %o1 + 4 ], %g1
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2006f4c: 40 00 08 02 call 2008f54 <_Thread_Enable_dispatch>
2006f50: b0 10 20 09 mov 9, %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006f54: 81 c7 e0 08 ret
2006f58: 81 e8 00 00 restore
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
2006f5c: c2 20 80 00 st %g1, [ %g2 ]
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
2006f60: 40 00 00 2d call 2007014 <_RTEMS_Tasks_Invoke_task_variable_dtor>
2006f64: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2006f68: 40 00 07 fb call 2008f54 <_Thread_Enable_dispatch>
2006f6c: 01 00 00 00 nop
2006f70: 81 c7 e0 08 ret
2006f74: 81 e8 00 00 restore
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
2006f78: 10 bf ff fa b 2006f60 <rtems_task_variable_delete+0x88>
2006f7c: c2 22 21 78 st %g1, [ %o0 + 0x178 ]
02006f80 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
2006f80: 9d e3 bf 90 save %sp, -112, %sp
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
2006f84: 80 a6 60 00 cmp %i1, 0
2006f88: 02 80 00 1d be 2006ffc <rtems_task_variable_get+0x7c>
2006f8c: 90 10 00 18 mov %i0, %o0
return RTEMS_INVALID_ADDRESS;
if ( !result )
2006f90: 80 a6 a0 00 cmp %i2, 0
2006f94: 02 80 00 18 be 2006ff4 <rtems_task_variable_get+0x74>
2006f98: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
2006f9c: 40 00 07 fc call 2008f8c <_Thread_Get>
2006fa0: 92 07 bf f4 add %fp, -12, %o1
switch (location) {
2006fa4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006fa8: 80 a0 60 00 cmp %g1, 0
2006fac: 12 80 00 12 bne 2006ff4 <rtems_task_variable_get+0x74> <== NEVER TAKEN
2006fb0: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
2006fb4: d0 02 21 78 ld [ %o0 + 0x178 ], %o0
while (tvp) {
2006fb8: 80 a2 20 00 cmp %o0, 0
2006fbc: 32 80 00 07 bne,a 2006fd8 <rtems_task_variable_get+0x58>
2006fc0: c2 02 20 04 ld [ %o0 + 4 ], %g1
2006fc4: 30 80 00 10 b,a 2007004 <rtems_task_variable_get+0x84>
2006fc8: 80 a2 20 00 cmp %o0, 0
2006fcc: 02 80 00 0e be 2007004 <rtems_task_variable_get+0x84> <== NEVER TAKEN
2006fd0: 01 00 00 00 nop
if (tvp->ptr == ptr) {
2006fd4: c2 02 20 04 ld [ %o0 + 4 ], %g1
2006fd8: 80 a0 40 19 cmp %g1, %i1
2006fdc: 32 bf ff fb bne,a 2006fc8 <rtems_task_variable_get+0x48>
2006fe0: d0 02 00 00 ld [ %o0 ], %o0
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
2006fe4: c2 02 20 0c ld [ %o0 + 0xc ], %g1
_Thread_Enable_dispatch();
2006fe8: b0 10 20 00 clr %i0
2006fec: 40 00 07 da call 2008f54 <_Thread_Enable_dispatch>
2006ff0: c2 26 80 00 st %g1, [ %i2 ]
2006ff4: 81 c7 e0 08 ret
2006ff8: 81 e8 00 00 restore
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006ffc: 81 c7 e0 08 ret
2007000: 91 e8 20 09 restore %g0, 9, %o0
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
2007004: 40 00 07 d4 call 2008f54 <_Thread_Enable_dispatch>
2007008: b0 10 20 09 mov 9, %i0
200700c: 81 c7 e0 08 ret
2007010: 81 e8 00 00 restore
02007358 <rtems_task_wake_when>:
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2007358: 9d e3 bf 98 save %sp, -104, %sp
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
200735c: 03 00 80 70 sethi %hi(0x201c000), %g1
2007360: c4 08 62 a4 ldub [ %g1 + 0x2a4 ], %g2 ! 201c2a4 <_TOD_Is_set>
*/
rtems_status_code rtems_task_wake_when(
rtems_time_of_day *time_buffer
)
{
2007364: a0 10 00 18 mov %i0, %l0
Watchdog_Interval seconds;
if ( !_TOD_Is_set )
2007368: 80 a0 a0 00 cmp %g2, 0
200736c: 02 80 00 2e be 2007424 <rtems_task_wake_when+0xcc>
2007370: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !time_buffer )
2007374: 80 a4 20 00 cmp %l0, 0
2007378: 02 80 00 2b be 2007424 <rtems_task_wake_when+0xcc> <== NEVER TAKEN
200737c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
time_buffer->ticks = 0;
2007380: c0 24 20 18 clr [ %l0 + 0x18 ]
if ( !_TOD_Validate( time_buffer ) )
2007384: 7f ff fc bd call 2006678 <_TOD_Validate>
2007388: 90 10 00 10 mov %l0, %o0
200738c: 80 8a 20 ff btst 0xff, %o0
2007390: 12 80 00 04 bne 20073a0 <rtems_task_wake_when+0x48>
2007394: 01 00 00 00 nop
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
2007398: 81 c7 e0 08 ret
200739c: 91 e8 20 14 restore %g0, 0x14, %o0
time_buffer->ticks = 0;
if ( !_TOD_Validate( time_buffer ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( time_buffer );
20073a0: 7f ff fc 81 call 20065a4 <_TOD_To_seconds>
20073a4: 90 10 00 10 mov %l0, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
20073a8: 23 00 80 70 sethi %hi(0x201c000), %l1
20073ac: c2 04 63 24 ld [ %l1 + 0x324 ], %g1 ! 201c324 <_TOD_Now>
20073b0: 80 a2 00 01 cmp %o0, %g1
20073b4: 08 bf ff f9 bleu 2007398 <rtems_task_wake_when+0x40>
20073b8: b0 10 00 08 mov %o0, %i0
20073bc: 05 00 80 70 sethi %hi(0x201c000), %g2
20073c0: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 201c290 <_Thread_Dispatch_disable_level>
20073c4: 82 00 60 01 inc %g1
20073c8: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
return RTEMS_INVALID_CLOCK;
_Thread_Disable_dispatch();
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_TIME );
20073cc: 21 00 80 70 sethi %hi(0x201c000), %l0
20073d0: d0 04 23 54 ld [ %l0 + 0x354 ], %o0 ! 201c354 <_Thread_Executing>
20073d4: 40 00 0a 4c call 2009d04 <_Thread_Set_state>
20073d8: 92 10 20 10 mov 0x10, %o1
_Watchdog_Initialize(
20073dc: c4 04 23 54 ld [ %l0 + 0x354 ], %g2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20073e0: 11 00 80 70 sethi %hi(0x201c000), %o0
20073e4: c6 00 a0 08 ld [ %g2 + 8 ], %g3
20073e8: 90 12 23 68 or %o0, 0x368, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
20073ec: c6 20 a0 68 st %g3, [ %g2 + 0x68 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20073f0: c2 04 63 24 ld [ %l1 + 0x324 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20073f4: 92 00 a0 48 add %g2, 0x48, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
20073f8: 82 26 00 01 sub %i0, %g1, %g1
20073fc: c2 20 a0 54 st %g1, [ %g2 + 0x54 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007400: 03 00 80 24 sethi %hi(0x2009000), %g1
2007404: 82 10 60 b0 or %g1, 0xb0, %g1 ! 20090b0 <_Thread_Delay_ended>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2007408: c0 20 a0 50 clr [ %g2 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200740c: c0 20 a0 6c clr [ %g2 + 0x6c ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2007410: c2 20 a0 64 st %g1, [ %g2 + 0x64 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2007414: 40 00 0c 84 call 200a624 <_Watchdog_Insert>
2007418: b0 10 20 00 clr %i0
);
_Watchdog_Insert_seconds(
&_Thread_Executing->Timer,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
200741c: 40 00 07 9c call 200928c <_Thread_Enable_dispatch>
2007420: 01 00 00 00 nop
2007424: 81 c7 e0 08 ret
2007428: 81 e8 00 00 restore
02003054 <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
2003054: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
2003058: 05 00 80 5e sethi %hi(0x2017800), %g2 <== NOT EXECUTED
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
200305c: d0 20 61 44 st %o0, [ %g1 + 0x144 ] <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
2003060: d2 20 a1 48 st %o1, [ %g2 + 0x148 ] <== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
2003064: 03 00 80 5e sethi %hi(0x2017800), %g1 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
2003068: 90 10 20 00 clr %o0 <== NOT EXECUTED
200306c: 81 c3 e0 08 retl <== NOT EXECUTED
2003070: d4 20 61 4c st %o2, [ %g1 + 0x14c ] <== NOT EXECUTED
02004790 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
2004790: 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);
2004794: 23 00 80 60 sethi %hi(0x2018000), %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;
2004798: c2 06 00 00 ld [ %i0 ], %g1
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
200479c: d0 04 61 c8 ld [ %l1 + 0x1c8 ], %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;
20047a0: e0 00 60 28 ld [ %g1 + 0x28 ], %l0
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
20047a4: 92 10 20 00 clr %o1
20047a8: 40 00 04 2e call 2005860 <rtems_semaphore_obtain>
20047ac: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
20047b0: 80 a2 20 00 cmp %o0, 0
20047b4: 12 80 00 52 bne 20048fc <rtems_termios_close+0x16c> <== NEVER TAKEN
20047b8: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
20047bc: c2 04 20 08 ld [ %l0 + 8 ], %g1
20047c0: 82 00 7f ff add %g1, -1, %g1
20047c4: 80 a0 60 00 cmp %g1, 0
20047c8: 12 80 00 3a bne 20048b0 <rtems_termios_close+0x120>
20047cc: c2 24 20 08 st %g1, [ %l0 + 8 ]
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
20047d0: c4 04 20 cc ld [ %l0 + 0xcc ], %g2
20047d4: 03 00 80 5f sethi %hi(0x2017c00), %g1
20047d8: 85 28 a0 05 sll %g2, 5, %g2
20047dc: 82 10 62 dc or %g1, 0x2dc, %g1
20047e0: 82 00 40 02 add %g1, %g2, %g1
20047e4: c2 00 60 04 ld [ %g1 + 4 ], %g1
20047e8: 80 a0 60 00 cmp %g1, 0
20047ec: 02 80 00 46 be 2004904 <rtems_termios_close+0x174> <== ALWAYS TAKEN
20047f0: 01 00 00 00 nop
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
20047f4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20047f8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
* default: just flush output buffer
*/
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
20047fc: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED
2004800: 80 a0 60 02 cmp %g1, 2
2004804: 22 80 00 33 be,a 20048d0 <rtems_termios_close+0x140> <== NEVER TAKEN
2004808: 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)
200480c: c2 04 20 9c ld [ %l0 + 0x9c ], %g1
2004810: 80 a0 60 00 cmp %g1, 0
2004814: 22 80 00 07 be,a 2004830 <rtems_termios_close+0xa0> <== ALWAYS TAKEN
2004818: c4 04 00 00 ld [ %l0 ], %g2
(*tty->device.lastClose)(tty->major, tty->minor, arg);
200481c: d0 04 20 0c ld [ %l0 + 0xc ], %o0 <== NOT EXECUTED
2004820: d2 04 20 10 ld [ %l0 + 0x10 ], %o1 <== NOT EXECUTED
2004824: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004828: 94 10 00 18 mov %i0, %o2 <== NOT EXECUTED
if (tty->forw == NULL) {
200482c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
2004830: 80 a0 a0 00 cmp %g2, 0
2004834: 22 80 00 38 be,a 2004914 <rtems_termios_close+0x184> <== ALWAYS TAKEN
2004838: c4 04 20 04 ld [ %l0 + 4 ], %g2
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
200483c: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
2004840: c2 20 a0 04 st %g1, [ %g2 + 4 ] <== NOT EXECUTED
}
if (tty->back == NULL) {
2004844: c2 04 20 04 ld [ %l0 + 4 ], %g1 <== NOT EXECUTED
2004848: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200484c: 22 80 00 39 be,a 2004930 <rtems_termios_close+0x1a0> <== NOT EXECUTED
2004850: 03 00 80 60 sethi %hi(0x2018000), %g1 <== NOT EXECUTED
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
2004854: c4 20 40 00 st %g2, [ %g1 ] <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
2004858: 40 00 03 d5 call 20057ac <rtems_semaphore_delete>
200485c: d0 04 20 14 ld [ %l0 + 0x14 ], %o0
rtems_semaphore_delete (tty->osem);
2004860: 40 00 03 d3 call 20057ac <rtems_semaphore_delete>
2004864: d0 04 20 18 ld [ %l0 + 0x18 ], %o0
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
2004868: 40 00 03 d1 call 20057ac <rtems_semaphore_delete>
200486c: d0 04 20 8c ld [ %l0 + 0x8c ], %o0
if ((tty->device.pollRead == NULL) ||
2004870: c2 04 20 a0 ld [ %l0 + 0xa0 ], %g1
2004874: 80 a0 60 00 cmp %g1, 0
2004878: 02 80 00 13 be 20048c4 <rtems_termios_close+0x134> <== NEVER TAKEN
200487c: 01 00 00 00 nop
2004880: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
2004884: 80 a0 60 02 cmp %g1, 2
2004888: 02 80 00 0f be 20048c4 <rtems_termios_close+0x134> <== NEVER TAKEN
200488c: 01 00 00 00 nop
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
2004890: 40 00 18 4e call 200a9c8 <free>
2004894: d0 04 20 58 ld [ %l0 + 0x58 ], %o0
free (tty->rawOutBuf.theBuf);
2004898: 40 00 18 4c call 200a9c8 <free>
200489c: d0 04 20 7c ld [ %l0 + 0x7c ], %o0
free (tty->cbuf);
20048a0: 40 00 18 4a call 200a9c8 <free>
20048a4: d0 04 20 1c ld [ %l0 + 0x1c ], %o0
free (tty);
20048a8: 40 00 18 48 call 200a9c8 <free>
20048ac: 90 10 00 10 mov %l0, %o0
}
rtems_semaphore_release (rtems_termios_ttyMutex);
20048b0: d0 04 61 c8 ld [ %l1 + 0x1c8 ], %o0
20048b4: 40 00 04 33 call 2005980 <rtems_semaphore_release>
20048b8: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
20048bc: 81 c7 e0 08 ret
20048c0: 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);
20048c4: 40 00 03 ba call 20057ac <rtems_semaphore_delete> <== NOT EXECUTED
20048c8: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED
20048cc: 30 bf ff f1 b,a 2004890 <rtems_termios_close+0x100> <== NOT EXECUTED
if (tty->device.outputUsesInterrupts
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
20048d0: 40 00 02 90 call 2005310 <rtems_event_send> <== NOT EXECUTED
20048d4: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
20048d8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20048dc: 12 80 00 08 bne 20048fc <rtems_termios_close+0x16c> <== NOT EXECUTED
20048e0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
20048e4: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED
20048e8: 40 00 02 8a call 2005310 <rtems_event_send> <== NOT EXECUTED
20048ec: 92 10 20 01 mov 1, %o1 <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
20048f0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20048f4: 22 bf ff c7 be,a 2004810 <rtems_termios_close+0x80> <== NOT EXECUTED
20048f8: c2 04 20 9c ld [ %l0 + 0x9c ], %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
20048fc: 40 00 05 9c call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2004900: 01 00 00 00 nop <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
drainOutput (tty);
2004904: 7f ff fd 6e call 2003ebc <drainOutput>
2004908: 90 10 00 10 mov %l0, %o0
}
if (tty->device.outputUsesInterrupts
200490c: 10 bf ff bd b 2004800 <rtems_termios_close+0x70>
2004910: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
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;
2004914: 03 00 80 60 sethi %hi(0x2018000), %g1
if ( rtems_termios_ttyTail != NULL ) {
2004918: 80 a0 a0 00 cmp %g2, 0
200491c: 02 80 00 0a be 2004944 <rtems_termios_close+0x1b4> <== ALWAYS TAKEN
2004920: c4 20 61 cc st %g2, [ %g1 + 0x1cc ]
rtems_termios_ttyTail->forw = NULL;
2004924: c0 20 80 00 clr [ %g2 ] <== NOT EXECUTED
2004928: 10 bf ff c7 b 2004844 <rtems_termios_close+0xb4> <== NOT EXECUTED
200492c: c4 04 00 00 ld [ %l0 ], %g2 <== NOT EXECUTED
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
2004930: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004934: 02 bf ff c9 be 2004858 <rtems_termios_close+0xc8> <== NOT EXECUTED
2004938: c4 20 61 d0 st %g2, [ %g1 + 0x1d0 ] <== NOT EXECUTED
rtems_termios_ttyHead->back = NULL;
200493c: 10 bf ff c7 b 2004858 <rtems_termios_close+0xc8> <== NOT EXECUTED
2004940: c0 20 a0 04 clr [ %g2 + 4 ] <== NOT EXECUTED
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
2004944: 03 00 80 60 sethi %hi(0x2018000), %g1
2004948: 10 bf ff c4 b 2004858 <rtems_termios_close+0xc8>
200494c: c0 20 61 d0 clr [ %g1 + 0x1d0 ] ! 20181d0 <rtems_termios_ttyHead>
02003288 <rtems_termios_dequeue_characters>:
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
2003288: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
200328c: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2003290: c4 06 20 b4 ld [ %i0 + 0xb4 ], %g2 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
2003294: 82 00 40 19 add %g1, %i1, %g1 <== NOT EXECUTED
2003298: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
200329c: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED
20032a0: 02 80 00 10 be 20032e0 <rtems_termios_dequeue_characters+0x58><== NOT EXECUTED
20032a4: 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 ) {
20032a8: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
20032ac: 80 a0 60 05 cmp %g1, 5 <== NOT EXECUTED
20032b0: 12 80 00 0a bne 20032d8 <rtems_termios_dequeue_characters+0x50><== NOT EXECUTED
20032b4: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
20032b8: c2 00 63 90 ld [ %g1 + 0x390 ], %g1 ! 2017f90 <rtems_termios_linesw+0xb4><== NOT EXECUTED
20032bc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20032c0: 02 80 00 04 be 20032d0 <rtems_termios_dequeue_characters+0x48><== NOT EXECUTED
20032c4: 01 00 00 00 nop <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
20032c8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20032cc: 01 00 00 00 nop <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
20032d0: 81 c7 e0 08 ret <== NOT EXECUTED
20032d4: 91 e8 20 00 restore %g0, 0, %o0 <== 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);
20032d8: 7f ff ff 6d call 200308c <rtems_termios_refill_transmitter><== NOT EXECUTED
20032dc: 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,
20032e0: d0 06 20 c8 ld [ %i0 + 0xc8 ], %o0 <== NOT EXECUTED
20032e4: 40 00 08 0b call 2005310 <rtems_event_send> <== NOT EXECUTED
20032e8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
20032ec: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20032f0: 02 bf ff f8 be 20032d0 <rtems_termios_dequeue_characters+0x48><== NOT EXECUTED
20032f4: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
20032f8: 40 00 0b 1d call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
02003304 <rtems_termios_enqueue_raw_characters>:
* 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)
{
2003304: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
2003308: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
200330c: 05 00 80 5f sethi %hi(0x2017c00), %g2 <== NOT EXECUTED
2003310: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2003314: a2 10 a2 dc or %g2, 0x2dc, %l1 <== NOT EXECUTED
2003318: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED
200331c: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED
2003320: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003324: 02 80 00 22 be 20033ac <rtems_termios_enqueue_raw_characters+0xa8><== NOT EXECUTED
2003328: 80 a6 a0 00 cmp %i2, 0 <== NOT EXECUTED
while (len--) {
200332c: 22 80 00 0f be,a 2003368 <rtems_termios_enqueue_raw_characters+0x64><== NOT EXECUTED
2003330: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED
2003334: 10 80 00 05 b 2003348 <rtems_termios_enqueue_raw_characters+0x44><== NOT EXECUTED
2003338: a0 10 20 00 clr %l0 <== NOT EXECUTED
200333c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2003340: 82 00 60 10 add %g1, 0x10, %g1 <== NOT EXECUTED
2003344: c2 04 40 01 ld [ %l1 + %g1 ], %g1 <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
2003348: d0 4e 40 10 ldsb [ %i1 + %l0 ], %o0 <== NOT EXECUTED
200334c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003350: 92 10 00 18 mov %i0, %o1 <== NOT EXECUTED
2003354: a0 04 20 01 inc %l0 <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
2003358: 80 a4 00 1a cmp %l0, %i2 <== NOT EXECUTED
200335c: 32 bf ff f8 bne,a 200333c <rtems_termios_enqueue_raw_characters+0x38><== NOT EXECUTED
2003360: 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 )) {
2003364: c2 06 20 e4 ld [ %i0 + 0xe4 ], %g1 <== NOT EXECUTED
2003368: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200336c: 12 80 00 0e bne 20033a4 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
2003370: a6 10 20 00 clr %l3 <== NOT EXECUTED
2003374: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED
2003378: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200337c: 02 80 00 0a be 20033a4 <rtems_termios_enqueue_raw_characters+0xa0><== NOT EXECUTED
2003380: 01 00 00 00 nop <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2003384: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED
2003388: 9f c0 40 00 call %g1 <== NOT EXECUTED
200338c: 90 06 20 30 add %i0, 0x30, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2003390: a6 10 20 00 clr %l3 <== NOT EXECUTED
2003394: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2003398: c2 26 20 e4 st %g1, [ %i0 + 0xe4 ] <== NOT EXECUTED
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
200339c: 81 c7 e0 08 ret <== NOT EXECUTED
20033a0: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
20033a4: 81 c7 e0 08 ret <== NOT EXECUTED
20033a8: 91 e8 00 13 restore %g0, %l3, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
20033ac: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
20033b0: ac 06 20 4a add %i0, 0x4a, %l6 <== 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);
20033b4: aa 06 20 30 add %i0, 0x30, %l5 <== NOT EXECUTED
20033b8: a6 10 20 00 clr %l3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
20033bc: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED
20033c0: 02 80 00 1c be 2003430 <rtems_termios_enqueue_raw_characters+0x12c><== NOT EXECUTED
20033c4: a2 10 20 00 clr %l1 <== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
20033c8: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20033cc: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
20033d0: 02 80 00 0b be 20033fc <rtems_termios_enqueue_raw_characters+0xf8><== NOT EXECUTED
20033d4: e4 0e 40 00 ldub [ %i1 ], %l2 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
20033d8: c4 0e 20 4a ldub [ %i0 + 0x4a ], %g2 <== NOT EXECUTED
20033dc: 83 2c a0 18 sll %l2, 0x18, %g1 <== NOT EXECUTED
20033e0: 87 38 60 18 sra %g1, 0x18, %g3 <== NOT EXECUTED
20033e4: 80 a0 c0 02 cmp %g3, %g2 <== NOT EXECUTED
20033e8: 02 80 00 64 be 2003578 <rtems_termios_enqueue_raw_characters+0x274><== NOT EXECUTED
20033ec: 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]) {
20033f0: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
20033f4: 02 80 00 68 be 2003594 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
20033f8: 01 00 00 00 nop <== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
20033fc: 80 8c 60 ff btst 0xff, %l1 <== NOT EXECUTED
2003400: 02 80 00 24 be 2003490 <rtems_termios_enqueue_raw_characters+0x18c><== NOT EXECUTED
2003404: 01 00 00 00 nop <== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
2003408: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
200340c: 82 08 60 30 and %g1, 0x30, %g1 <== NOT EXECUTED
2003410: 80 a0 60 20 cmp %g1, 0x20 <== NOT EXECUTED
2003414: 02 80 00 0f be 2003450 <rtems_termios_enqueue_raw_characters+0x14c><== NOT EXECUTED
2003418: a2 10 20 01 mov 1, %l1 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
200341c: b2 06 60 01 inc %i1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2003420: b4 06 bf ff add %i2, -1, %i2 <== NOT EXECUTED
2003424: 80 a6 bf ff cmp %i2, -1 <== NOT EXECUTED
2003428: 12 bf ff e8 bne 20033c8 <rtems_termios_enqueue_raw_characters+0xc4><== NOT EXECUTED
200342c: 01 00 00 00 nop <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
2003430: c2 06 20 78 ld [ %i0 + 0x78 ], %g1 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003434: d0 06 20 68 ld [ %i0 + 0x68 ], %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
2003438: 82 00 40 13 add %g1, %l3, %g1 <== NOT EXECUTED
200343c: c2 26 20 78 st %g1, [ %i0 + 0x78 ] <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2003440: 40 00 09 50 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003444: b0 10 00 13 mov %l3, %i0 <== NOT EXECUTED
return dropped;
}
2003448: 81 c7 e0 08 ret <== NOT EXECUTED
200344c: 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);
2003450: 7f ff fa 65 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
2003454: 01 00 00 00 nop <== NOT EXECUTED
2003458: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
200345c: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
2003460: 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;
2003464: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED
2003468: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
200346c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003470: 12 80 00 53 bne 20035bc <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
2003474: 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);
2003478: a2 10 20 01 mov 1, %l1 ! 1 <PROM_START+0x1> <== NOT EXECUTED
200347c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003480: 7f ff fa 5d call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2003484: b2 06 60 01 inc %i1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
2003488: 10 bf ff e7 b 2003424 <rtems_termios_enqueue_raw_characters+0x120><== NOT EXECUTED
200348c: 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;
2003490: d0 06 20 60 ld [ %i0 + 0x60 ], %o0 <== NOT EXECUTED
2003494: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED
2003498: 40 00 45 15 call 20148ec <.urem> <== NOT EXECUTED
200349c: 90 02 20 01 inc %o0 <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
20034a0: 7f ff fa 51 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20034a4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
20034a8: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
20034ac: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
20034b0: d0 06 20 64 ld [ %i0 + 0x64 ], %o0 <== NOT EXECUTED
20034b4: d2 06 20 64 ld [ %i0 + 0x64 ], %o1 <== NOT EXECUTED
20034b8: 90 22 00 01 sub %o0, %g1, %o0 <== NOT EXECUTED
20034bc: 40 00 45 0c call 20148ec <.urem> <== NOT EXECUTED
20034c0: 90 02 00 10 add %o0, %l0, %o0 <== NOT EXECUTED
20034c4: c2 06 20 c0 ld [ %i0 + 0xc0 ], %g1 <== NOT EXECUTED
20034c8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
20034cc: 08 80 00 13 bleu 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
20034d0: 01 00 00 00 nop <== NOT EXECUTED
20034d4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20034d8: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
20034dc: 12 80 00 0f bne 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
20034e0: 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;
20034e4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20034e8: 82 10 60 01 or %g1, 1, %g1 <== NOT EXECUTED
20034ec: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
20034f0: c4 06 20 b8 ld [ %i0 + 0xb8 ], %g2 <== NOT EXECUTED
20034f4: 84 08 a4 02 and %g2, 0x402, %g2 <== NOT EXECUTED
20034f8: 80 a0 a4 00 cmp %g2, 0x400 <== NOT EXECUTED
20034fc: 02 80 00 38 be 20035dc <rtems_termios_enqueue_raw_characters+0x2d8><== NOT EXECUTED
2003500: 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))
2003504: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003508: 82 08 61 04 and %g1, 0x104, %g1 <== NOT EXECUTED
200350c: 80 a0 61 00 cmp %g1, 0x100 <== NOT EXECUTED
2003510: 02 80 00 44 be 2003620 <rtems_termios_enqueue_raw_characters+0x31c><== NOT EXECUTED
2003514: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
2003518: 7f ff fa 37 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200351c: 90 10 00 14 mov %l4, %o0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
2003520: c2 06 20 5c ld [ %i0 + 0x5c ], %g1 <== NOT EXECUTED
2003524: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
2003528: 22 80 00 1f be,a 20035a4 <rtems_termios_enqueue_raw_characters+0x2a0><== NOT EXECUTED
200352c: a6 04 e0 01 inc %l3 <== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
2003530: c2 06 20 58 ld [ %i0 + 0x58 ], %g1 <== NOT EXECUTED
2003534: e4 28 40 10 stb %l2, [ %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 )) {
2003538: 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;
200353c: 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 )) {
2003540: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003544: 32 bf ff b7 bne,a 2003420 <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003548: b2 06 60 01 inc %i1 <== NOT EXECUTED
200354c: c2 06 20 dc ld [ %i0 + 0xdc ], %g1 <== NOT EXECUTED
2003550: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003554: 22 bf ff b3 be,a 2003420 <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003558: b2 06 60 01 inc %i1 <== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
200355c: d2 06 20 e0 ld [ %i0 + 0xe0 ], %o1 <== NOT EXECUTED
2003560: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003564: 90 10 00 15 mov %l5, %o0 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2003568: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
200356c: 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;
2003570: 10 bf ff ac b 2003420 <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
2003574: 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]) {
2003578: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
200357c: 02 80 00 0c be 20035ac <rtems_termios_enqueue_raw_characters+0x2a8><== NOT EXECUTED
2003580: 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;
2003584: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003588: 82 10 60 10 or %g1, 0x10, %g1 <== NOT EXECUTED
200358c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
2003590: 30 bf ff 9e b,a 2003408 <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
2003594: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003598: 82 08 7f ef and %g1, -17, %g1 <== NOT EXECUTED
200359c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
20035a0: 30 bf ff 9a b,a 2003408 <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
20035a4: 10 bf ff 9f b 2003420 <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
20035a8: 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;
20035ac: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20035b0: 82 18 60 10 xor %g1, 0x10, %g1 <== NOT EXECUTED
20035b4: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
20035b8: 30 bf ff 94 b,a 2003408 <rtems_termios_enqueue_raw_characters+0x104><== 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,
20035bc: d2 06 20 84 ld [ %i0 + 0x84 ], %o1 <== NOT EXECUTED
20035c0: c2 06 20 7c ld [ %i0 + 0x7c ], %g1 <== NOT EXECUTED
20035c4: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED
20035c8: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
20035cc: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
20035d0: 9f c0 80 00 call %g2 <== NOT EXECUTED
20035d4: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
20035d8: 30 bf ff a8 b,a 2003478 <rtems_termios_enqueue_raw_characters+0x174><== 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) ||
20035dc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20035e0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20035e4: 12 80 00 06 bne 20035fc <rtems_termios_enqueue_raw_characters+0x2f8><== NOT EXECUTED
20035e8: 01 00 00 00 nop <== NOT EXECUTED
20035ec: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED
20035f0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20035f4: 12 bf ff c9 bne 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
20035f8: 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;
20035fc: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003600: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED
2003604: 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;
2003608: 82 10 60 02 or %g1, 2, %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
200360c: 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;
2003610: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003614: 9f c0 80 00 call %g2 <== NOT EXECUTED
2003618: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
200361c: 30 bf ff bf b,a 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
2003620: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2003624: 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;
2003628: 82 10 60 04 or %g1, 4, %g1 <== NOT EXECUTED
200362c: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
2003630: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2003634: 02 bf ff b9 be 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
2003638: 01 00 00 00 nop <== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
200363c: 9f c0 80 00 call %g2 <== NOT EXECUTED
2003640: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2003644: 30 bf ff b5 b,a 2003518 <rtems_termios_enqueue_raw_characters+0x214><== NOT EXECUTED
02003004 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
2003004: 9d e3 bf 98 save %sp, -104, %sp
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
2003008: 03 00 80 60 sethi %hi(0x2018000), %g1
200300c: c4 00 61 c8 ld [ %g1 + 0x1c8 ], %g2 ! 20181c8 <rtems_termios_ttyMutex>
2003010: 80 a0 a0 00 cmp %g2, 0
2003014: 02 80 00 04 be 2003024 <rtems_termios_initialize+0x20> <== ALWAYS TAKEN
2003018: 98 10 61 c8 or %g1, 0x1c8, %o4
200301c: 81 c7 e0 08 ret
2003020: 81 e8 00 00 restore
sc = rtems_semaphore_create (
2003024: 11 15 14 9b sethi %hi(0x54526c00), %o0
2003028: 92 10 20 01 mov 1, %o1
200302c: 90 12 21 69 or %o0, 0x169, %o0
2003030: 94 10 20 54 mov 0x54, %o2
2003034: 40 00 09 64 call 20055c4 <rtems_semaphore_create>
2003038: 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)
200303c: 80 a2 20 00 cmp %o0, 0
2003040: 02 bf ff f7 be 200301c <rtems_termios_initialize+0x18> <== ALWAYS TAKEN
2003044: 01 00 00 00 nop
rtems_fatal_error_occurred (sc);
2003048: 40 00 0b c9 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
0200437c <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
200437c: 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;
2004380: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
2004384: 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;
2004388: e2 00 60 28 ld [ %g1 + 0x28 ], %l1 <== NOT EXECUTED
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
200438c: 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);
2004390: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
2004394: 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);
2004398: 92 10 20 00 clr %o1 <== NOT EXECUTED
200439c: 40 00 05 31 call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
20043a0: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20043a4: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
20043a8: 32 80 00 12 bne,a 20043f0 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
20043ac: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
20043b0: c4 04 a0 04 ld [ %l2 + 4 ], %g2 <== NOT EXECUTED
20043b4: 80 a0 a0 04 cmp %g2, 4 <== NOT EXECUTED
20043b8: 22 80 00 27 be,a 2004454 <rtems_termios_ioctl+0xd8> <== NOT EXECUTED
20043bc: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
20043c0: 18 80 00 0e bgu 20043f8 <rtems_termios_ioctl+0x7c> <== NOT EXECUTED
20043c4: 03 10 01 19 sethi %hi(0x40046400), %g1 <== NOT EXECUTED
20043c8: 80 a0 a0 02 cmp %g2, 2 <== NOT EXECUTED
20043cc: 22 80 00 61 be,a 2004550 <rtems_termios_ioctl+0x1d4> <== NOT EXECUTED
20043d0: d2 04 a0 08 ld [ %l2 + 8 ], %o1 <== NOT EXECUTED
20043d4: 08 80 00 4c bleu 2004504 <rtems_termios_ioctl+0x188> <== NOT EXECUTED
20043d8: 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);
20043dc: 7f ff fe b8 call 2003ebc <drainOutput> <== NOT EXECUTED
20043e0: 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);
20043e4: 40 00 05 67 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
20043e8: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED
args->ioctl_return = sc;
20043ec: f0 24 a0 0c st %i0, [ %l2 + 0xc ] <== NOT EXECUTED
return sc;
}
20043f0: 81 c7 e0 08 ret <== NOT EXECUTED
20043f4: 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) {
20043f8: 82 10 62 7f or %g1, 0x27f, %g1 <== NOT EXECUTED
20043fc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004400: 02 80 00 48 be 2004520 <rtems_termios_ioctl+0x1a4> <== NOT EXECUTED
2004404: 01 00 00 00 nop <== NOT EXECUTED
2004408: 18 80 00 1b bgu 2004474 <rtems_termios_ioctl+0xf8> <== NOT EXECUTED
200440c: 03 10 01 1d sethi %hi(0x40047400), %g1 <== NOT EXECUTED
2004410: 80 a0 a0 05 cmp %g2, 5 <== NOT EXECUTED
2004414: 22 80 00 14 be,a 2004464 <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
2004418: c2 04 00 00 ld [ %l0 ], %g1 <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
200441c: c4 04 60 cc ld [ %l1 + 0xcc ], %g2 <== NOT EXECUTED
2004420: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
2004424: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
2004428: 82 10 62 dc or %g1, 0x2dc, %g1 <== NOT EXECUTED
200442c: 82 00 40 02 add %g1, %g2, %g1 <== NOT EXECUTED
2004430: c2 00 60 18 ld [ %g1 + 0x18 ], %g1 <== NOT EXECUTED
2004434: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004438: 02 bf ff eb be 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
200443c: b0 10 20 0a mov 0xa, %i0 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
2004440: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2004444: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004448: 92 10 00 12 mov %l2, %o1 <== NOT EXECUTED
200444c: 10 bf ff e6 b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
2004450: 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;
2004454: c2 24 60 dc st %g1, [ %l1 + 0xdc ] <== NOT EXECUTED
2004458: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED
200445c: 10 bf ff e2 b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
2004460: 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;
2004464: c2 24 60 d4 st %g1, [ %l1 + 0xd4 ] <== NOT EXECUTED
2004468: c4 04 20 04 ld [ %l0 + 4 ], %g2 <== NOT EXECUTED
200446c: 10 bf ff de b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
2004470: 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) {
2004474: 82 10 60 1a or %g1, 0x1a, %g1 <== NOT EXECUTED
2004478: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200447c: 02 80 00 1e be 20044f4 <rtems_termios_ioctl+0x178> <== NOT EXECUTED
2004480: 03 20 01 1d sethi %hi(0x80047400), %g1 <== NOT EXECUTED
2004484: 82 10 60 1b or %g1, 0x1b, %g1 ! 8004741b <RAM_END+0x7dc4741b><== NOT EXECUTED
2004488: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200448c: 32 bf ff e5 bne,a 2004420 <rtems_termios_ioctl+0xa4> <== NOT EXECUTED
2004490: 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) {
2004494: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED
2004498: 05 00 80 5f sethi %hi(0x2017c00), %g2 <== NOT EXECUTED
200449c: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
20044a0: a0 10 a2 dc or %g2, 0x2dc, %l0 <== NOT EXECUTED
20044a4: 82 04 00 01 add %l0, %g1, %g1 <== NOT EXECUTED
20044a8: c2 00 60 04 ld [ %g1 + 4 ], %g1 <== NOT EXECUTED
20044ac: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20044b0: 22 80 00 06 be,a 20044c8 <rtems_termios_ioctl+0x14c> <== NOT EXECUTED
20044b4: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
20044b8: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044bc: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20044c0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
20044c4: c2 04 a0 08 ld [ %l2 + 8 ], %g1 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
20044c8: 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);
20044cc: 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) {
20044d0: 85 28 e0 05 sll %g3, 5, %g2 <== NOT EXECUTED
20044d4: c2 04 00 02 ld [ %l0 + %g2 ], %g1 <== NOT EXECUTED
20044d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20044dc: 02 bf ff c2 be 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
20044e0: c6 24 60 cc st %g3, [ %l1 + 0xcc ] <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
20044e4: 9f c0 40 00 call %g1 <== NOT EXECUTED
20044e8: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
20044ec: 10 bf ff be b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
20044f0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
20044f4: c4 04 a0 08 ld [ %l2 + 8 ], %g2 <== NOT EXECUTED
20044f8: c2 04 60 cc ld [ %l1 + 0xcc ], %g1 <== NOT EXECUTED
20044fc: 10 bf ff ba b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
2004500: 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) {
2004504: 32 bf ff c7 bne,a 2004420 <rtems_termios_ioctl+0xa4> <== NOT EXECUTED
2004508: 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;
200450c: d0 04 a0 08 ld [ %l2 + 8 ], %o0 <== NOT EXECUTED
2004510: 92 04 60 30 add %l1, 0x30, %o1 <== NOT EXECUTED
2004514: 40 00 27 71 call 200e2d8 <memcpy> <== NOT EXECUTED
2004518: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
200451c: 30 bf ff b2 b,a 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
2004520: c4 04 60 60 ld [ %l1 + 0x60 ], %g2 <== NOT EXECUTED
2004524: c2 04 60 5c ld [ %l1 + 0x5c ], %g1 <== NOT EXECUTED
if ( rawnc < 0 )
2004528: 88 a0 80 01 subcc %g2, %g1, %g4 <== NOT EXECUTED
200452c: 0c 80 00 82 bneg 2004734 <rtems_termios_ioctl+0x3b8> <== NOT EXECUTED
2004530: 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;
2004534: c2 04 60 20 ld [ %l1 + 0x20 ], %g1 <== NOT EXECUTED
2004538: c4 04 60 24 ld [ %l1 + 0x24 ], %g2 <== NOT EXECUTED
200453c: c6 04 a0 08 ld [ %l2 + 8 ], %g3 <== NOT EXECUTED
2004540: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
2004544: 82 00 40 04 add %g1, %g4, %g1 <== NOT EXECUTED
2004548: 10 bf ff a7 b 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
200454c: 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;
2004550: a6 04 60 30 add %l1, 0x30, %l3 <== NOT EXECUTED
2004554: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
2004558: 40 00 27 60 call 200e2d8 <memcpy> <== NOT EXECUTED
200455c: 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) &&
2004560: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004564: 80 88 62 00 btst 0x200, %g1 <== NOT EXECUTED
2004568: 02 80 00 19 be 20045cc <rtems_termios_ioctl+0x250> <== NOT EXECUTED
200456c: 01 00 00 00 nop <== NOT EXECUTED
2004570: c2 04 60 30 ld [ %l1 + 0x30 ], %g1 <== NOT EXECUTED
2004574: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
2004578: 12 80 00 15 bne 20045cc <rtems_termios_ioctl+0x250> <== NOT EXECUTED
200457c: 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);
2004580: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004584: 82 08 7d ef and %g1, -529, %g1 <== NOT EXECUTED
2004588: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
200458c: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED
2004590: 80 88 a0 20 btst 0x20, %g2 <== NOT EXECUTED
2004594: 02 80 00 0e be 20045cc <rtems_termios_ioctl+0x250> <== NOT EXECUTED
2004598: 01 00 00 00 nop <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
200459c: 7f ff f6 12 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20045a0: 01 00 00 00 nop <== NOT EXECUTED
20045a4: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
20045a8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20045ac: 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;
20045b0: 82 08 7f df and %g1, -33, %g1 <== NOT EXECUTED
20045b4: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
20045b8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
20045bc: 12 80 00 6d bne 2004770 <rtems_termios_ioctl+0x3f4> <== NOT EXECUTED
20045c0: 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);
20045c4: 7f ff f6 0c call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
20045c8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
20045cc: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20045d0: 80 88 64 00 btst 0x400, %g1 <== NOT EXECUTED
20045d4: 02 80 00 0c be 2004604 <rtems_termios_ioctl+0x288> <== NOT EXECUTED
20045d8: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
20045dc: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
20045e0: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
20045e4: 12 80 00 08 bne 2004604 <rtems_termios_ioctl+0x288> <== NOT EXECUTED
20045e8: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
20045ec: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20045f0: 82 08 7b ff and %g1, -1025, %g1 <== NOT EXECUTED
20045f4: 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);
20045f8: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED
20045fc: 84 08 bf fd and %g2, -3, %g2 <== NOT EXECUTED
2004600: 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) &&
2004604: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004608: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
200460c: 12 80 00 22 bne 2004694 <rtems_termios_ioctl+0x318> <== NOT EXECUTED
2004610: 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) {
2004614: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2004618: 06 80 00 4a bl 2004740 <rtems_termios_ioctl+0x3c4> <== NOT EXECUTED
200461c: 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) {
2004620: c4 04 60 30 ld [ %l1 + 0x30 ], %g2 <== NOT EXECUTED
2004624: 03 00 00 04 sethi %hi(0x1000), %g1 <== NOT EXECUTED
2004628: 80 88 80 01 btst %g2, %g1 <== NOT EXECUTED
200462c: 02 80 00 06 be 2004644 <rtems_termios_ioctl+0x2c8> <== NOT EXECUTED
2004630: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXOF;
2004634: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004638: 82 10 64 00 or %g1, 0x400, %g1 <== NOT EXECUTED
200463c: 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) {
2004640: 80 88 a4 00 btst 0x400, %g2 <== NOT EXECUTED
2004644: 22 80 00 06 be,a 200465c <rtems_termios_ioctl+0x2e0> <== NOT EXECUTED
2004648: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_MDXON;
200464c: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004650: 82 10 62 00 or %g1, 0x200, %g1 <== NOT EXECUTED
2004654: 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) {
2004658: c2 04 60 3c ld [ %l1 + 0x3c ], %g1 <== NOT EXECUTED
200465c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2004660: 02 80 00 23 be 20046ec <rtems_termios_ioctl+0x370> <== NOT EXECUTED
2004664: 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;
2004668: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
200466c: c0 24 60 70 clr [ %l1 + 0x70 ] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
2004670: c0 24 60 74 clr [ %l1 + 0x74 ] <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
2004674: c2 04 60 a8 ld [ %l1 + 0xa8 ], %g1 <== NOT EXECUTED
2004678: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200467c: 02 bf ff 5a be 20043e4 <rtems_termios_ioctl+0x68> <== NOT EXECUTED
2004680: 01 00 00 00 nop <== NOT EXECUTED
(*tty->device.setAttributes)(tty->minor, &tty->termios);
2004684: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
2004688: 9f c0 40 00 call %g1 <== NOT EXECUTED
200468c: 92 10 00 13 mov %l3, %o1 <== NOT EXECUTED
2004690: 30 bf ff 55 b,a 20043e4 <rtems_termios_ioctl+0x68> <== 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) &&
2004694: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
2004698: 06 80 00 2a bl 2004740 <rtems_termios_ioctl+0x3c4> <== NOT EXECUTED
200469c: 01 00 00 00 nop <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
20046a0: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20046a4: 82 08 7e ff and %g1, -257, %g1 <== NOT EXECUTED
20046a8: c2 24 60 b8 st %g1, [ %l1 + 0xb8 ] <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
20046ac: c4 04 60 b8 ld [ %l1 + 0xb8 ], %g2 <== NOT EXECUTED
20046b0: 80 88 a0 04 btst 4, %g2 <== NOT EXECUTED
20046b4: 02 80 00 09 be 20046d8 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED
20046b8: 01 00 00 00 nop <== NOT EXECUTED
20046bc: c2 04 60 b0 ld [ %l1 + 0xb0 ], %g1 <== NOT EXECUTED
20046c0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20046c4: 02 80 00 05 be 20046d8 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED
20046c8: 01 00 00 00 nop <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
20046cc: 9f c0 40 00 call %g1 <== NOT EXECUTED
20046d0: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
20046d4: c6 04 60 38 ld [ %l1 + 0x38 ], %g3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
20046d8: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
20046dc: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
20046e0: 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) {
20046e4: 10 bf ff cd b 2004618 <rtems_termios_ioctl+0x29c> <== NOT EXECUTED
20046e8: 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);
20046ec: 40 00 01 ff call 2004ee8 <rtems_clock_get> <== NOT EXECUTED
20046f0: 90 10 20 03 mov 3, %o0 <== NOT EXECUTED
tty->vtimeTicks = tty->termios.c_cc[VTIME] * ticksPerSecond / 10;
20046f4: d2 07 bf f4 ld [ %fp + -12 ], %o1 <== NOT EXECUTED
20046f8: e0 0c 60 46 ldub [ %l1 + 0x46 ], %l0 <== NOT EXECUTED
20046fc: 40 00 3f 96 call 2014554 <.umul> <== NOT EXECUTED
2004700: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2004704: 40 00 3f ce call 201463c <.udiv> <== NOT EXECUTED
2004708: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME]) {
200470c: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2004710: 02 80 00 11 be 2004754 <rtems_termios_ioctl+0x3d8> <== NOT EXECUTED
2004714: d0 24 60 54 st %o0, [ %l1 + 0x54 ] <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2004718: 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;
200471c: c0 24 60 6c clr [ %l1 + 0x6c ] <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
2004720: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004724: 12 bf ff d3 bne 2004670 <rtems_termios_ioctl+0x2f4> <== NOT EXECUTED
2004728: d0 24 60 70 st %o0, [ %l1 + 0x70 ] <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
200472c: 10 bf ff d2 b 2004674 <rtems_termios_ioctl+0x2f8> <== NOT EXECUTED
2004730: 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;
2004734: c2 04 60 64 ld [ %l1 + 0x64 ], %g1 <== NOT EXECUTED
2004738: 10 bf ff 7f b 2004534 <rtems_termios_ioctl+0x1b8> <== NOT EXECUTED
200473c: 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;
2004740: c2 04 60 b8 ld [ %l1 + 0xb8 ], %g1 <== NOT EXECUTED
2004744: 82 10 61 00 or %g1, 0x100, %g1 <== NOT EXECUTED
2004748: 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) {
200474c: 10 bf ff b6 b 2004624 <rtems_termios_ioctl+0x2a8> <== NOT EXECUTED
2004750: 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]) {
2004754: c2 0c 60 47 ldub [ %l1 + 0x47 ], %g1 <== NOT EXECUTED
2004758: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200475c: 32 bf ff c4 bne,a 200466c <rtems_termios_ioctl+0x2f0> <== NOT EXECUTED
2004760: 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;
2004764: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
2004768: 10 bf ff c3 b 2004674 <rtems_termios_ioctl+0x2f8> <== NOT EXECUTED
200476c: 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,
2004770: d2 04 60 84 ld [ %l1 + 0x84 ], %o1 <== NOT EXECUTED
2004774: c2 04 60 7c ld [ %l1 + 0x7c ], %g1 <== NOT EXECUTED
2004778: c4 04 60 a4 ld [ %l1 + 0xa4 ], %g2 <== NOT EXECUTED
200477c: d0 04 60 10 ld [ %l1 + 0x10 ], %o0 <== NOT EXECUTED
2004780: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
2004784: 9f c0 80 00 call %g2 <== NOT EXECUTED
2004788: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
200478c: 30 bf ff 8e b,a 20045c4 <rtems_termios_ioctl+0x248> <== NOT EXECUTED
02004950 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
2004950: 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,
2004954: 29 00 80 60 sethi %hi(0x2018000), %l4
2004958: d0 05 21 c8 ld [ %l4 + 0x1c8 ], %o0 ! 20181c8 <rtems_termios_ttyMutex>
200495c: 92 10 20 00 clr %o1
2004960: 40 00 03 c0 call 2005860 <rtems_semaphore_obtain>
2004964: 94 10 20 00 clr %o2
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
2004968: a4 92 20 00 orcc %o0, 0, %l2
200496c: 32 80 00 29 bne,a 2004a10 <rtems_termios_open+0xc0> <== NEVER TAKEN
2004970: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
2004974: 27 00 80 60 sethi %hi(0x2018000), %l3
2004978: e0 04 e1 d0 ld [ %l3 + 0x1d0 ], %l0 ! 20181d0 <rtems_termios_ttyHead>
200497c: 80 a4 20 00 cmp %l0, 0
2004980: 32 80 00 08 bne,a 20049a0 <rtems_termios_open+0x50>
2004984: c2 04 20 0c ld [ %l0 + 0xc ], %g1
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004988: 10 80 00 24 b 2004a18 <rtems_termios_open+0xc8>
200498c: 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) {
2004990: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2004994: 02 80 00 21 be 2004a18 <rtems_termios_open+0xc8> <== NOT EXECUTED
2004998: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
if ((tty->major == major) && (tty->minor == minor))
200499c: c2 04 20 0c ld [ %l0 + 0xc ], %g1 <== NOT EXECUTED
20049a0: 80 a0 40 18 cmp %g1, %i0
20049a4: 32 bf ff fb bne,a 2004990 <rtems_termios_open+0x40> <== NEVER TAKEN
20049a8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
20049ac: c2 04 20 10 ld [ %l0 + 0x10 ], %g1
20049b0: 80 a0 40 19 cmp %g1, %i1
20049b4: 32 bf ff f7 bne,a 2004990 <rtems_termios_open+0x40> <== NEVER TAKEN
20049b8: e0 04 00 00 ld [ %l0 ], %l0 <== NOT EXECUTED
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
if (!tty->refcount++) {
20049bc: c2 04 20 08 ld [ %l0 + 8 ], %g1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20049c0: c4 06 80 00 ld [ %i2 ], %g2
if (!tty->refcount++) {
20049c4: 86 00 60 01 add %g1, 1, %g3
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
20049c8: e0 20 a0 28 st %l0, [ %g2 + 0x28 ]
if (!tty->refcount++) {
20049cc: 80 a0 60 00 cmp %g1, 0
20049d0: 12 80 00 0d bne 2004a04 <rtems_termios_open+0xb4>
20049d4: c6 24 20 08 st %g3, [ %l0 + 8 ]
if (tty->device.firstOpen)
20049d8: c2 04 20 98 ld [ %l0 + 0x98 ], %g1
20049dc: 80 a0 60 00 cmp %g1, 0
20049e0: 02 80 00 05 be 20049f4 <rtems_termios_open+0xa4> <== ALWAYS TAKEN
20049e4: 90 10 00 18 mov %i0, %o0
(*tty->device.firstOpen)(major, minor, arg);
20049e8: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
20049ec: 9f c0 40 00 call %g1 <== NOT EXECUTED
20049f0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
20049f4: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1
20049f8: 80 a0 60 02 cmp %g1, 2
20049fc: 22 80 00 a0 be,a 2004c7c <rtems_termios_open+0x32c> <== NEVER TAKEN
2004a00: d0 04 20 c4 ld [ %l0 + 0xc4 ], %o0 <== NOT EXECUTED
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
2004a04: 40 00 03 df call 2005980 <rtems_semaphore_release>
2004a08: d0 05 21 c8 ld [ %l4 + 0x1c8 ], %o0
return RTEMS_SUCCESSFUL;
}
2004a0c: b0 10 00 12 mov %l2, %i0
2004a10: 81 c7 e0 08 ret
2004a14: 81 e8 00 00 restore
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
2004a18: 40 00 17 a6 call 200a8b0 <calloc>
2004a1c: 92 10 20 e8 mov 0xe8, %o1
if (tty == NULL) {
2004a20: a2 92 20 00 orcc %o0, 0, %l1
2004a24: 02 80 00 a8 be 2004cc4 <rtems_termios_open+0x374> <== NEVER TAKEN
2004a28: a0 10 00 11 mov %l1, %l0
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
2004a2c: 03 00 80 5e sethi %hi(0x2017800), %g1
2004a30: c4 00 61 48 ld [ %g1 + 0x148 ], %g2 ! 2017948 <rtems_termios_raw_input_size>
2004a34: c4 24 60 64 st %g2, [ %l1 + 0x64 ]
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
2004a38: d0 04 60 64 ld [ %l1 + 0x64 ], %o0
2004a3c: 40 00 19 62 call 200afc4 <malloc>
2004a40: 01 00 00 00 nop
if (tty->rawInBuf.theBuf == NULL) {
2004a44: 80 a2 20 00 cmp %o0, 0
2004a48: 02 80 00 9d be 2004cbc <rtems_termios_open+0x36c> <== NEVER TAKEN
2004a4c: d0 24 60 58 st %o0, [ %l1 + 0x58 ]
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
2004a50: 03 00 80 5e sethi %hi(0x2017800), %g1
2004a54: c4 00 61 4c ld [ %g1 + 0x14c ], %g2 ! 201794c <rtems_termios_raw_output_size>
2004a58: c4 24 60 88 st %g2, [ %l1 + 0x88 ]
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
2004a5c: d0 04 60 88 ld [ %l1 + 0x88 ], %o0
2004a60: 40 00 19 59 call 200afc4 <malloc>
2004a64: 01 00 00 00 nop
if (tty->rawOutBuf.theBuf == NULL) {
2004a68: 80 a2 20 00 cmp %o0, 0
2004a6c: 02 80 00 9b be 2004cd8 <rtems_termios_open+0x388> <== NEVER TAKEN
2004a70: d0 24 60 7c st %o0, [ %l1 + 0x7c ]
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
2004a74: 03 00 80 5e sethi %hi(0x2017800), %g1
2004a78: 40 00 19 53 call 200afc4 <malloc>
2004a7c: d0 00 61 44 ld [ %g1 + 0x144 ], %o0 ! 2017944 <rtems_termios_cbufsize>
if (tty->cbuf == NULL) {
2004a80: 80 a2 20 00 cmp %o0, 0
2004a84: 02 80 00 ab be 2004d30 <rtems_termios_open+0x3e0> <== NEVER TAKEN
2004a88: d0 24 60 1c st %o0, [ %l1 + 0x1c ]
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2004a8c: c2 04 e1 d0 ld [ %l3 + 0x1d0 ], %g1
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
2004a90: c0 24 60 d4 clr [ %l1 + 0xd4 ]
tty->tty_snd.sw_arg = NULL;
2004a94: c0 24 60 d8 clr [ %l1 + 0xd8 ]
tty->tty_rcv.sw_pfn = NULL;
2004a98: c0 24 60 dc clr [ %l1 + 0xdc ]
tty->tty_rcv.sw_arg = NULL;
2004a9c: c0 24 60 e0 clr [ %l1 + 0xe0 ]
tty->tty_rcvwakeup = 0;
2004aa0: c0 24 60 e4 clr [ %l1 + 0xe4 ]
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
2004aa4: c2 24 40 00 st %g1, [ %l1 ]
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
2004aa8: 80 a0 60 00 cmp %g1, 0
2004aac: 02 80 00 03 be 2004ab8 <rtems_termios_open+0x168> <== ALWAYS TAKEN
2004ab0: c0 24 60 04 clr [ %l1 + 4 ]
rtems_termios_ttyHead->back = tty;
2004ab4: e2 20 60 04 st %l1, [ %g1 + 4 ] <== NOT EXECUTED
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
2004ab8: 05 00 80 60 sethi %hi(0x2018000), %g2
2004abc: c2 00 a1 cc ld [ %g2 + 0x1cc ], %g1 ! 20181cc <rtems_termios_ttyTail>
2004ac0: 80 a0 60 00 cmp %g1, 0
2004ac4: 02 80 00 b8 be 2004da4 <rtems_termios_open+0x454> <== ALWAYS TAKEN
2004ac8: e2 24 e1 d0 st %l1, [ %l3 + 0x1d0 ]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004acc: 27 00 80 5e sethi %hi(0x2017800), %l3
2004ad0: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1 ! 2017950 <c.6078>
2004ad4: 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;
2004ad8: f2 24 60 10 st %i1, [ %l1 + 0x10 ]
tty->major = major;
2004adc: f0 24 60 0c st %i0, [ %l1 + 0xc ]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
2004ae0: 90 12 21 00 or %o0, 0x100, %o0
2004ae4: 92 10 20 01 mov 1, %o1
2004ae8: 90 10 40 08 or %g1, %o0, %o0
2004aec: 94 10 20 54 mov 0x54, %o2
2004af0: 96 10 20 00 clr %o3
2004af4: 40 00 02 b4 call 20055c4 <rtems_semaphore_create>
2004af8: 98 04 60 14 add %l1, 0x14, %o4
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
2004afc: 80 a2 20 00 cmp %o0, 0
2004b00: 12 80 00 6d bne 2004cb4 <rtems_termios_open+0x364> <== NEVER TAKEN
2004b04: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
2004b08: 11 15 14 9b sethi %hi(0x54526c00), %o0
2004b0c: 92 10 20 01 mov 1, %o1
2004b10: 90 12 23 00 or %o0, 0x300, %o0
2004b14: 94 10 20 54 mov 0x54, %o2
2004b18: 90 10 40 08 or %g1, %o0, %o0
2004b1c: 96 10 20 00 clr %o3
2004b20: 40 00 02 a9 call 20055c4 <rtems_semaphore_create>
2004b24: 98 04 60 18 add %l1, 0x18, %o4
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
2004b28: 80 a2 20 00 cmp %o0, 0
2004b2c: 12 80 00 62 bne 2004cb4 <rtems_termios_open+0x364> <== NEVER TAKEN
2004b30: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
2004b34: 11 15 14 9e sethi %hi(0x54527800), %o0
2004b38: 92 10 20 00 clr %o1
2004b3c: 90 10 40 08 or %g1, %o0, %o0
2004b40: 94 10 20 20 mov 0x20, %o2
2004b44: 96 10 20 00 clr %o3
2004b48: 40 00 02 9f call 20055c4 <rtems_semaphore_create>
2004b4c: 98 04 60 8c add %l1, 0x8c, %o4
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
2004b50: 80 a2 20 00 cmp %o0, 0
2004b54: 12 80 00 58 bne 2004cb4 <rtems_termios_open+0x364> <== NEVER TAKEN
2004b58: 92 10 00 1b mov %i3, %o1
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
2004b5c: c0 24 60 94 clr [ %l1 + 0x94 ]
/*
* Set callbacks
*/
tty->device = *callbacks;
2004b60: 90 04 60 98 add %l1, 0x98, %o0
2004b64: 40 00 25 dd call 200e2d8 <memcpy>
2004b68: 94 10 20 20 mov 0x20, %o2
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
2004b6c: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1
2004b70: 80 a0 60 02 cmp %g1, 2
2004b74: 02 80 00 74 be 2004d44 <rtems_termios_open+0x3f4> <== NEVER TAKEN
2004b78: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
2004b7c: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1
2004b80: 80 a0 60 00 cmp %g1, 0
2004b84: 02 80 00 5e be 2004cfc <rtems_termios_open+0x3ac> <== NEVER TAKEN
2004b88: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1
2004b8c: c2 04 60 b4 ld [ %l1 + 0xb4 ], %g1
2004b90: 80 a0 60 02 cmp %g1, 2
2004b94: 02 80 00 5a be 2004cfc <rtems_termios_open+0x3ac> <== NEVER TAKEN
2004b98: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1
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;
2004b9c: c0 24 60 b8 clr [ %l1 + 0xb8 ]
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
2004ba0: c2 04 60 64 ld [ %l1 + 0x64 ], %g1
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
2004ba4: c8 0c e1 50 ldub [ %l3 + 0x150 ], %g4
/* 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;
2004ba8: 83 30 60 01 srl %g1, 1, %g1
2004bac: c2 24 60 bc st %g1, [ %l1 + 0xbc ]
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2004bb0: 03 00 00 09 sethi %hi(0x2400), %g1
2004bb4: 82 10 61 02 or %g1, 0x102, %g1 ! 2502 <PROM_START+0x2502>
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2004bb8: 05 00 00 06 sethi %hi(0x1800), %g2
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
2004bbc: c2 24 60 30 st %g1, [ %l1 + 0x30 ]
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2004bc0: 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;
2004bc4: 03 00 00 20 sethi %hi(0x8000), %g1
2004bc8: 82 10 62 3b or %g1, 0x23b, %g1 ! 823b <PROM_START+0x823b>
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
2004bcc: 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;
2004bd0: c2 24 60 3c st %g1, [ %l1 + 0x3c ]
tty->termios.c_cc[VINTR] = '\003';
2004bd4: 84 10 20 03 mov 3, %g2
tty->termios.c_cc[VQUIT] = '\034';
2004bd8: 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';
2004bdc: c4 2c 60 41 stb %g2, [ %l1 + 0x41 ]
tty->termios.c_cc[VQUIT] = '\034';
2004be0: c2 2c 60 42 stb %g1, [ %l1 + 0x42 ]
tty->termios.c_cc[VERASE] = '\177';
2004be4: 84 10 20 7f mov 0x7f, %g2
tty->termios.c_cc[VKILL] = '\025';
2004be8: 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';
2004bec: c4 2c 60 43 stb %g2, [ %l1 + 0x43 ]
tty->termios.c_cc[VKILL] = '\025';
2004bf0: c2 2c 60 44 stb %g1, [ %l1 + 0x44 ]
tty->termios.c_cc[VEOF] = '\004';
2004bf4: 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';
2004bf8: 82 10 20 11 mov 0x11, %g1
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;
2004bfc: da 04 60 64 ld [ %l1 + 0x64 ], %o5
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';
2004c00: 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';
2004c04: c2 2c 60 49 stb %g1, [ %l1 + 0x49 ]
tty->termios.c_cc[VSTOP] = '\023';
2004c08: 84 10 20 13 mov 0x13, %g2
tty->termios.c_cc[VSUSP] = '\032';
2004c0c: 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;
2004c10: 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';
2004c14: c4 2c 60 4a stb %g2, [ %l1 + 0x4a ]
tty->termios.c_cc[VSUSP] = '\032';
2004c18: c2 2c 60 4b stb %g1, [ %l1 + 0x4b ]
tty->termios.c_cc[VREPRINT] = '\022';
2004c1c: 84 10 20 12 mov 0x12, %g2
tty->termios.c_cc[VDISCARD] = '\017';
2004c20: 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;
2004c24: 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';
2004c28: c4 2c 60 4d stb %g2, [ %l1 + 0x4d ]
tty->termios.c_cc[VDISCARD] = '\017';
2004c2c: c2 2c 60 4e stb %g1, [ %l1 + 0x4e ]
tty->termios.c_cc[VWERASE] = '\027';
2004c30: 84 10 20 17 mov 0x17, %g2
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
2004c34: c0 2c 60 4c clrb [ %l1 + 0x4c ]
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';
2004c38: c4 2c 60 4f stb %g2, [ %l1 + 0x4f ]
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';
2004c3c: c0 2c 60 51 clrb [ %l1 + 0x51 ]
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
2004c40: 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;
2004c44: 83 2b 60 01 sll %o5, 1, %g1
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
2004c48: c6 2c 60 50 stb %g3, [ %l1 + 0x50 ]
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;
2004c4c: 82 00 40 0d add %g1, %o5, %g1
2004c50: 83 30 60 02 srl %g1, 2, %g1
2004c54: c2 24 60 c0 st %g1, [ %l1 + 0xc0 ]
/*
* Bump name characer
*/
if (c++ == 'z')
2004c58: 84 01 20 01 add %g4, 1, %g2
2004c5c: 89 29 20 18 sll %g4, 0x18, %g4
2004c60: 89 39 20 18 sra %g4, 0x18, %g4
2004c64: 80 a1 20 7a cmp %g4, 0x7a
2004c68: 12 bf ff 55 bne 20049bc <rtems_termios_open+0x6c> <== ALWAYS TAKEN
2004c6c: c4 2c e1 50 stb %g2, [ %l3 + 0x150 ]
c = 'a';
2004c70: 82 10 20 61 mov 0x61, %g1 <== NOT EXECUTED
2004c74: 10 bf ff 52 b 20049bc <rtems_termios_open+0x6c> <== NOT EXECUTED
2004c78: c2 2c e1 50 stb %g1, [ %l3 + 0x150 ] <== NOT EXECUTED
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
2004c7c: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED
2004c80: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
2004c84: 40 00 04 14 call 2005cd4 <rtems_task_start> <== NOT EXECUTED
2004c88: 92 12 62 44 or %o1, 0x244, %o1 <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004c8c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004c90: 12 80 00 09 bne 2004cb4 <rtems_termios_open+0x364> <== NOT EXECUTED
2004c94: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
2004c98: d0 04 20 c8 ld [ %l0 + 0xc8 ], %o0 <== NOT EXECUTED
2004c9c: 13 00 80 13 sethi %hi(0x2004c00), %o1 <== NOT EXECUTED
2004ca0: 40 00 04 0d call 2005cd4 <rtems_task_start> <== NOT EXECUTED
2004ca4: 92 12 61 ac or %o1, 0x1ac, %o1 ! 2004dac <rtems_termios_txdaemon><== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
2004ca8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004cac: 02 bf ff 56 be 2004a04 <rtems_termios_open+0xb4> <== NOT EXECUTED
2004cb0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2004cb4: 40 00 04 ae call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2004cb8: 01 00 00 00 nop <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
2004cbc: 40 00 17 43 call 200a9c8 <free> <== NOT EXECUTED
2004cc0: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
2004cc4: d0 05 21 c8 ld [ %l4 + 0x1c8 ], %o0 <== NOT EXECUTED
2004cc8: 40 00 03 2e call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2004ccc: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
2004cd0: 81 c7 e0 08 ret <== NOT EXECUTED
2004cd4: 91 e8 00 12 restore %g0, %l2, %o0 <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
2004cd8: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
2004cdc: 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));
2004ce0: 40 00 17 3a call 200a9c8 <free> <== NOT EXECUTED
2004ce4: b0 10 00 12 mov %l2, %i0 <== NOT EXECUTED
free(tty);
2004ce8: 40 00 17 38 call 200a9c8 <free> <== NOT EXECUTED
2004cec: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
2004cf0: 40 00 03 24 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2004cf4: d0 05 21 c8 ld [ %l4 + 0x1c8 ], %o0 <== NOT EXECUTED
2004cf8: 30 bf ff 46 b,a 2004a10 <rtems_termios_open+0xc0> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
2004cfc: 11 15 14 9c sethi %hi(0x54527000), %o0 <== NOT EXECUTED
2004d00: 92 10 20 00 clr %o1 <== NOT EXECUTED
2004d04: 90 12 22 00 or %o0, 0x200, %o0 <== NOT EXECUTED
2004d08: 94 10 20 24 mov 0x24, %o2 <== NOT EXECUTED
2004d0c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
2004d10: 96 10 20 00 clr %o3 <== NOT EXECUTED
2004d14: 40 00 02 2c call 20055c4 <rtems_semaphore_create> <== NOT EXECUTED
2004d18: 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)
2004d1c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004d20: 02 bf ff 9f be 2004b9c <rtems_termios_open+0x24c> <== NOT EXECUTED
2004d24: 01 00 00 00 nop <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2004d28: 40 00 04 91 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2004d2c: 01 00 00 00 nop <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
2004d30: d0 04 60 7c ld [ %l1 + 0x7c ], %o0 <== NOT EXECUTED
2004d34: 40 00 17 25 call 200a9c8 <free> <== NOT EXECUTED
2004d38: a4 10 20 1a mov 0x1a, %l2 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
2004d3c: 10 bf ff e9 b 2004ce0 <rtems_termios_open+0x390> <== NOT EXECUTED
2004d40: d0 04 60 58 ld [ %l1 + 0x58 ], %o0 <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
2004d44: 11 15 1e 15 sethi %hi(0x54785400), %o0 <== NOT EXECUTED
2004d48: 92 10 20 0a mov 0xa, %o1 <== NOT EXECUTED
2004d4c: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
2004d50: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
2004d54: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
2004d58: 98 10 20 00 clr %o4 <== NOT EXECUTED
2004d5c: 40 00 03 34 call 2005a2c <rtems_task_create> <== NOT EXECUTED
2004d60: 9a 04 60 c8 add %l1, 0xc8, %o5 <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
2004d64: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004d68: 12 bf ff d3 bne 2004cb4 <rtems_termios_open+0x364> <== NOT EXECUTED
2004d6c: c2 4c e1 50 ldsb [ %l3 + 0x150 ], %g1 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
2004d70: 11 14 9e 15 sethi %hi(0x52785400), %o0 <== NOT EXECUTED
2004d74: 92 10 20 09 mov 9, %o1 <== NOT EXECUTED
2004d78: 90 10 40 08 or %g1, %o0, %o0 <== NOT EXECUTED
2004d7c: 94 10 24 00 mov 0x400, %o2 <== NOT EXECUTED
2004d80: 96 10 25 00 mov 0x500, %o3 <== NOT EXECUTED
2004d84: 98 10 20 00 clr %o4 <== NOT EXECUTED
2004d88: 40 00 03 29 call 2005a2c <rtems_task_create> <== NOT EXECUTED
2004d8c: 9a 04 60 c4 add %l1, 0xc4, %o5 <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
2004d90: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004d94: 22 bf ff 7b be,a 2004b80 <rtems_termios_open+0x230> <== NOT EXECUTED
2004d98: c2 04 60 a0 ld [ %l1 + 0xa0 ], %g1 <== NOT EXECUTED
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
2004d9c: 40 00 04 74 call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2004da0: 01 00 00 00 nop <== 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;
2004da4: 10 bf ff 4a b 2004acc <rtems_termios_open+0x17c>
2004da8: e2 20 a1 cc st %l1, [ %g2 + 0x1cc ]
02003648 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
2003648: 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) {
200364c: c2 06 a0 b4 ld [ %i2 + 0xb4 ], %g1
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
2003650: 92 10 00 18 mov %i0, %o1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
2003654: 80 a0 60 00 cmp %g1, 0
2003658: 02 80 00 44 be 2003768 <rtems_termios_puts+0x120> <== ALWAYS TAKEN
200365c: a6 10 00 18 mov %i0, %l3
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
2003660: e4 06 a0 80 ld [ %i2 + 0x80 ], %l2 <== NOT EXECUTED
while (len) {
2003664: 80 a6 60 00 cmp %i1, 0 <== NOT EXECUTED
2003668: 02 80 00 44 be 2003778 <rtems_termios_puts+0x130> <== NOT EXECUTED
200366c: a2 10 20 02 mov 2, %l1 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
2003670: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
2003674: d2 06 a0 88 ld [ %i2 + 0x88 ], %o1 <== NOT EXECUTED
2003678: 40 00 44 9d call 20148ec <.urem> <== NOT EXECUTED
200367c: 90 04 a0 01 add %l2, 1, %o0 <== NOT EXECUTED
rtems_interrupt_disable (level);
2003680: 7f ff f9 d9 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
2003684: a4 10 00 08 mov %o0, %l2 <== NOT EXECUTED
2003688: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
while (newHead == tty->rawOutBuf.Tail) {
200368c: e0 06 a0 84 ld [ %i2 + 0x84 ], %l0 <== NOT EXECUTED
2003690: 80 a4 00 12 cmp %l0, %l2 <== NOT EXECUTED
2003694: 12 80 00 13 bne 20036e0 <rtems_termios_puts+0x98> <== NOT EXECUTED
2003698: 01 00 00 00 nop <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
200369c: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED
rtems_interrupt_enable (level);
20036a0: 7f ff f9 d5 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
20036a4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
20036a8: d0 06 a0 8c ld [ %i2 + 0x8c ], %o0 <== NOT EXECUTED
20036ac: 92 10 20 00 clr %o1 <== NOT EXECUTED
20036b0: 40 00 08 6c call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
20036b4: 94 10 20 00 clr %o2 <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
20036b8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20036bc: 12 80 00 20 bne 200373c <rtems_termios_puts+0xf4> <== NOT EXECUTED
20036c0: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
20036c4: 7f ff f9 c8 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20036c8: 01 00 00 00 nop <== NOT EXECUTED
20036cc: b0 10 00 08 mov %o0, %i0 <== 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) {
20036d0: c2 06 a0 84 ld [ %i2 + 0x84 ], %g1 <== NOT EXECUTED
20036d4: 80 a0 40 10 cmp %g1, %l0 <== NOT EXECUTED
20036d8: 22 bf ff f2 be,a 20036a0 <rtems_termios_puts+0x58> <== NOT EXECUTED
20036dc: e2 26 a0 94 st %l1, [ %i2 + 0x94 ] <== NOT EXECUTED
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
20036e0: c8 06 a0 80 ld [ %i2 + 0x80 ], %g4 <== NOT EXECUTED
20036e4: c4 0c c0 00 ldub [ %l3 ], %g2 <== NOT EXECUTED
20036e8: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED
20036ec: c4 28 40 04 stb %g2, [ %g1 + %g4 ] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
20036f0: 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;
20036f4: e4 26 a0 80 st %l2, [ %i2 + 0x80 ] <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
20036f8: 80 a0 e0 00 cmp %g3, 0 <== NOT EXECUTED
20036fc: 12 80 00 0a bne 2003724 <rtems_termios_puts+0xdc> <== NOT EXECUTED
2003700: 01 00 00 00 nop <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2003704: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
2003708: 80 88 60 10 btst 0x10, %g1 <== NOT EXECUTED
200370c: 02 80 00 0e be 2003744 <rtems_termios_puts+0xfc> <== NOT EXECUTED
2003710: 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;
2003714: c2 06 a0 b8 ld [ %i2 + 0xb8 ], %g1 <== NOT EXECUTED
2003718: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
200371c: c2 26 a0 b8 st %g1, [ %i2 + 0xb8 ] <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
2003720: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== NOT EXECUTED
}
rtems_interrupt_enable (level);
2003724: 7f ff f9 b4 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2003728: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
200372c: b2 86 7f ff addcc %i1, -1, %i1 <== NOT EXECUTED
2003730: 02 80 00 12 be 2003778 <rtems_termios_puts+0x130> <== NOT EXECUTED
2003734: a6 04 e0 01 inc %l3 <== NOT EXECUTED
2003738: 30 bf ff cf b,a 2003674 <rtems_termios_puts+0x2c> <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
200373c: 40 00 0a 0c call 2005f6c <rtems_fatal_error_occurred> <== NOT EXECUTED
2003740: 01 00 00 00 nop <== 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,
2003744: d2 06 a0 84 ld [ %i2 + 0x84 ], %o1 <== NOT EXECUTED
2003748: c2 06 a0 7c ld [ %i2 + 0x7c ], %g1 <== NOT EXECUTED
200374c: c4 06 a0 a4 ld [ %i2 + 0xa4 ], %g2 <== NOT EXECUTED
2003750: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0 <== NOT EXECUTED
2003754: 92 00 40 09 add %g1, %o1, %o1 <== NOT EXECUTED
2003758: 9f c0 80 00 call %g2 <== NOT EXECUTED
200375c: 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;
2003760: 10 bf ff f1 b 2003724 <rtems_termios_puts+0xdc> <== NOT EXECUTED
2003764: e8 26 a0 94 st %l4, [ %i2 + 0x94 ] <== 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);
2003768: d0 06 a0 10 ld [ %i2 + 0x10 ], %o0
200376c: c2 06 a0 a4 ld [ %i2 + 0xa4 ], %g1
2003770: 9f c0 40 00 call %g1
2003774: 94 10 00 19 mov %i1, %o2
2003778: 81 c7 e0 08 ret
200377c: 81 e8 00 00 restore
02003f50 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2003f50: 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;
2003f54: c2 06 00 00 ld [ %i0 ], %g1 <== NOT EXECUTED
uint32_t count = args->count;
2003f58: e4 06 20 0c ld [ %i0 + 0xc ], %l2 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003f5c: e0 00 60 28 ld [ %g1 + 0x28 ], %l0 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
2003f60: e6 06 20 08 ld [ %i0 + 8 ], %l3 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003f64: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
2003f68: ac 10 00 18 mov %i0, %l6 <== 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);
2003f6c: 92 10 20 00 clr %o1 <== NOT EXECUTED
2003f70: 40 00 06 3c call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
2003f74: 94 10 20 00 clr %o2 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
2003f78: b0 92 20 00 orcc %o0, 0, %i0 <== NOT EXECUTED
2003f7c: 12 80 00 10 bne 2003fbc <rtems_termios_read+0x6c> <== NOT EXECUTED
2003f80: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
2003f84: c4 04 20 cc ld [ %l0 + 0xcc ], %g2 <== NOT EXECUTED
2003f88: 85 28 a0 05 sll %g2, 5, %g2 <== NOT EXECUTED
2003f8c: 82 10 62 dc or %g1, 0x2dc, %g1 <== NOT EXECUTED
2003f90: 84 00 a0 08 add %g2, 8, %g2 <== NOT EXECUTED
2003f94: c2 00 40 02 ld [ %g1 + %g2 ], %g1 <== NOT EXECUTED
2003f98: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2003f9c: 02 80 00 0a be 2003fc4 <rtems_termios_read+0x74> <== NOT EXECUTED
2003fa0: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
2003fa4: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003fa8: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003fac: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2003fb0: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
2003fb4: 40 00 06 73 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003fb8: c0 24 20 e4 clr [ %l0 + 0xe4 ] <== NOT EXECUTED
2003fbc: 81 c7 e0 08 ret <== NOT EXECUTED
2003fc0: 81 e8 00 00 restore <== NOT EXECUTED
return sc;
}
if (tty->cindex == tty->ccount) {
2003fc4: c4 04 20 24 ld [ %l0 + 0x24 ], %g2 <== NOT EXECUTED
2003fc8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003fcc: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2003fd0: 22 80 00 20 be,a 2004050 <rtems_termios_read+0x100> <== NOT EXECUTED
2003fd4: 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)) {
2003fd8: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2003fdc: 22 80 00 16 be,a 2004034 <rtems_termios_read+0xe4> <== NOT EXECUTED
2003fe0: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
2003fe4: c6 04 20 24 ld [ %l0 + 0x24 ], %g3 <== NOT EXECUTED
2003fe8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2003fec: 80 a0 c0 01 cmp %g3, %g1 <== NOT EXECUTED
2003ff0: 26 80 00 09 bl,a 2004014 <rtems_termios_read+0xc4> <== NOT EXECUTED
2003ff4: c2 04 20 1c ld [ %l0 + 0x1c ], %g1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2003ff8: 10 80 00 0f b 2004034 <rtems_termios_read+0xe4> <== NOT EXECUTED
2003ffc: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
2004000: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2004004: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2004008: 24 80 00 0b ble,a 2004034 <rtems_termios_read+0xe4> <== NOT EXECUTED
200400c: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
2004010: 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)) {
2004014: a4 84 bf ff addcc %l2, -1, %l2 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
2004018: c4 08 40 03 ldub [ %g1 + %g3 ], %g2 <== NOT EXECUTED
200401c: 86 00 e0 01 inc %g3 <== NOT EXECUTED
2004020: c4 2c c0 00 stb %g2, [ %l3 ] <== NOT EXECUTED
2004024: 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)) {
2004028: 12 bf ff f6 bne 2004000 <rtems_termios_read+0xb0> <== NOT EXECUTED
200402c: a6 04 e0 01 inc %l3 <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
2004030: c2 05 a0 0c ld [ %l6 + 0xc ], %g1 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
2004034: 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;
2004038: 82 20 40 12 sub %g1, %l2, %g1 <== NOT EXECUTED
200403c: c2 25 a0 14 st %g1, [ %l6 + 0x14 ] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
2004040: 40 00 06 50 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2004044: d0 04 20 14 ld [ %l0 + 0x14 ], %o0 <== NOT EXECUTED
return sc;
}
2004048: 81 c7 e0 08 ret <== NOT EXECUTED
200404c: 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
2004050: 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;
2004054: 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;
2004058: c0 24 20 20 clr [ %l0 + 0x20 ] <== NOT EXECUTED
200405c: c0 24 20 24 clr [ %l0 + 0x24 ] <== NOT EXECUTED
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
2004060: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004064: 02 80 00 06 be 200407c <rtems_termios_read+0x12c> <== NOT EXECUTED
2004068: 86 10 00 02 mov %g2, %g3 <== NOT EXECUTED
200406c: c2 04 20 b4 ld [ %l0 + 0xb4 ], %g1 <== NOT EXECUTED
2004070: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004074: 22 80 00 69 be,a 2004218 <rtems_termios_read+0x2c8> <== NOT EXECUTED
2004078: 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;
200407c: e2 04 20 74 ld [ %l0 + 0x74 ], %l1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2004080: 03 00 80 5e sethi %hi(0x2017800), %g1 <== 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,
2004084: 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) &&
2004088: aa 10 61 44 or %g1, 0x144, %l5 <== 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,
200408c: a8 10 20 01 mov 1, %l4 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
2004090: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED
2004094: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2004098: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
200409c: 02 80 00 3e be 2004194 <rtems_termios_read+0x244> <== NOT EXECUTED
20040a0: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
20040a4: c2 05 40 00 ld [ %l5 ], %g1 <== NOT EXECUTED
20040a8: c4 04 20 20 ld [ %l0 + 0x20 ], %g2 <== NOT EXECUTED
20040ac: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
20040b0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20040b4: 16 80 00 38 bge 2004194 <rtems_termios_read+0x244> <== NOT EXECUTED
20040b8: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
20040bc: d0 04 20 5c ld [ %l0 + 0x5c ], %o0 <== NOT EXECUTED
20040c0: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
20040c4: 40 00 42 0a call 20148ec <.urem> <== NOT EXECUTED
20040c8: 90 02 20 01 inc %o0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
20040cc: 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;
20040d0: 84 10 00 08 mov %o0, %g2 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
20040d4: e2 08 40 08 ldub [ %g1 + %o0 ], %l1 <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
20040d8: d0 24 20 5c st %o0, [ %l0 + 0x5c ] <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
20040dc: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
20040e0: d0 04 20 64 ld [ %l0 + 0x64 ], %o0 <== NOT EXECUTED
20040e4: d2 04 20 64 ld [ %l0 + 0x64 ], %o1 <== NOT EXECUTED
20040e8: 90 02 00 01 add %o0, %g1, %o0 <== NOT EXECUTED
20040ec: 40 00 42 00 call 20148ec <.urem> <== NOT EXECUTED
20040f0: 90 22 00 02 sub %o0, %g2, %o0 <== NOT EXECUTED
20040f4: c2 04 20 bc ld [ %l0 + 0xbc ], %g1 <== NOT EXECUTED
20040f8: 80 a2 00 01 cmp %o0, %g1 <== NOT EXECUTED
20040fc: 3a 80 00 18 bcc,a 200415c <rtems_termios_read+0x20c> <== NOT EXECUTED
2004100: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
2004104: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004108: 82 08 7f fe and %g1, -2, %g1 <== NOT EXECUTED
200410c: 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))
2004110: c4 04 20 b8 ld [ %l0 + 0xb8 ], %g2 <== NOT EXECUTED
2004114: 84 08 a2 02 and %g2, 0x202, %g2 <== NOT EXECUTED
2004118: 80 a0 a2 02 cmp %g2, 0x202 <== NOT EXECUTED
200411c: 22 80 00 31 be,a 20041e0 <rtems_termios_read+0x290> <== NOT EXECUTED
2004120: 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) {
2004124: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
2004128: 80 88 61 00 btst 0x100, %g1 <== NOT EXECUTED
200412c: 22 80 00 0c be,a 200415c <rtems_termios_read+0x20c> <== NOT EXECUTED
2004130: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
2004134: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2004138: 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;
200413c: 82 08 7f fb and %g1, -5, %g1 <== NOT EXECUTED
2004140: c2 24 20 b8 st %g1, [ %l0 + 0xb8 ] <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
2004144: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2004148: 22 80 00 05 be,a 200415c <rtems_termios_read+0x20c> <== NOT EXECUTED
200414c: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
2004150: 9f c0 80 00 call %g2 <== NOT EXECUTED
2004154: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2004158: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
200415c: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
2004160: 02 80 00 17 be 20041bc <rtems_termios_read+0x26c> <== NOT EXECUTED
2004164: 90 0c 60 ff and %l1, 0xff, %o0 <== NOT EXECUTED
if (siproc (c, tty))
2004168: 7f ff ff 0c call 2003d98 <siproc> <== NOT EXECUTED
200416c: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2004170: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004174: 32 80 00 02 bne,a 200417c <rtems_termios_read+0x22c> <== NOT EXECUTED
2004178: a8 10 20 00 clr %l4 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
200417c: c4 04 20 5c ld [ %l0 + 0x5c ], %g2 <== NOT EXECUTED
2004180: c2 04 20 60 ld [ %l0 + 0x60 ], %g1 <== NOT EXECUTED
2004184: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
2004188: 12 bf ff c7 bne 20040a4 <rtems_termios_read+0x154> <== NOT EXECUTED
200418c: e2 04 20 70 ld [ %l0 + 0x70 ], %l1 <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
2004190: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
2004194: 02 bf ff 92 be 2003fdc <rtems_termios_read+0x8c> <== NOT EXECUTED
2004198: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
200419c: d0 04 20 68 ld [ %l0 + 0x68 ], %o0 <== NOT EXECUTED
20041a0: d2 04 20 6c ld [ %l0 + 0x6c ], %o1 <== NOT EXECUTED
20041a4: 40 00 05 af call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
20041a8: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
20041ac: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20041b0: 02 bf ff b8 be 2004090 <rtems_termios_read+0x140> <== NOT EXECUTED
20041b4: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
20041b8: 30 bf ff 89 b,a 2003fdc <rtems_termios_read+0x8c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
20041bc: 7f ff fe f7 call 2003d98 <siproc> <== NOT EXECUTED
20041c0: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
20041c4: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED
20041c8: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
20041cc: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20041d0: 06 bf ff eb bl 200417c <rtems_termios_read+0x22c> <== NOT EXECUTED
20041d4: 01 00 00 00 nop <== NOT EXECUTED
20041d8: 10 bf ff e9 b 200417c <rtems_termios_read+0x22c> <== NOT EXECUTED
20041dc: a8 10 20 00 clr %l4 ! 0 <PROM_START> <== 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))
20041e0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20041e4: 22 80 00 07 be,a 2004200 <rtems_termios_read+0x2b0> <== NOT EXECUTED
20041e8: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
20041ec: c2 04 20 b8 ld [ %l0 + 0xb8 ], %g1 <== NOT EXECUTED
20041f0: 80 88 60 20 btst 0x20, %g1 <== NOT EXECUTED
20041f4: 02 bf ff cc be 2004124 <rtems_termios_read+0x1d4> <== NOT EXECUTED
20041f8: 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,
20041fc: c2 04 20 a4 ld [ %l0 + 0xa4 ], %g1 <== NOT EXECUTED
2004200: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
2004204: 92 10 00 17 mov %l7, %o1 <== NOT EXECUTED
2004208: 9f c0 40 00 call %g1 <== NOT EXECUTED
200420c: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
2004210: 10 bf ff d3 b 200415c <rtems_termios_read+0x20c> <== NOT EXECUTED
2004214: c2 04 20 3c ld [ %l0 + 0x3c ], %g1 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2004218: 80 88 60 02 btst 2, %g1 <== NOT EXECUTED
200421c: 12 80 00 37 bne 20042f8 <rtems_termios_read+0x3a8> <== NOT EXECUTED
2004220: 01 00 00 00 nop <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
if (!tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
2004224: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004228: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200422c: 12 80 00 07 bne 2004248 <rtems_termios_read+0x2f8> <== NOT EXECUTED
2004230: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED
2004234: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
2004238: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200423c: 12 80 00 3f bne 2004338 <rtems_termios_read+0x3e8> <== NOT EXECUTED
2004240: 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);
2004244: a8 07 bf f4 add %fp, -12, %l4 <== NOT EXECUTED
}
}
else {
if (!tty->termios.c_cc[VTIME])
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
2004248: a2 07 bf f0 add %fp, -16, %l1 <== 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);
200424c: 9f c0 80 00 call %g2 <== NOT EXECUTED
2004250: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
2004254: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004258: 36 80 00 16 bge,a 20042b0 <rtems_termios_read+0x360> <== NOT EXECUTED
200425c: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
2004260: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
2004264: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004268: 02 80 00 38 be 2004348 <rtems_termios_read+0x3f8> <== NOT EXECUTED
200426c: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
2004270: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004274: 02 80 00 06 be 200428c <rtems_termios_read+0x33c> <== NOT EXECUTED
2004278: 01 00 00 00 nop <== NOT EXECUTED
200427c: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
2004280: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004284: 12 80 00 34 bne 2004354 <rtems_termios_read+0x404> <== NOT EXECUTED
2004288: 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);
200428c: 40 00 06 ad call 2005d40 <rtems_task_wake_after> <== NOT EXECUTED
2004290: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
2004294: 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);
2004298: 9f c0 80 00 call %g2 <== NOT EXECUTED
200429c: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
20042a0: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20042a4: 26 bf ff f0 bl,a 2004264 <rtems_termios_read+0x314> <== NOT EXECUTED
20042a8: c2 0c 20 47 ldub [ %l0 + 0x47 ], %g1 <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
20042ac: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
20042b0: 7f ff fe ba call 2003d98 <siproc> <== NOT EXECUTED
20042b4: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
20042b8: c4 0c 20 47 ldub [ %l0 + 0x47 ], %g2 <== NOT EXECUTED
20042bc: c2 04 20 20 ld [ %l0 + 0x20 ], %g1 <== NOT EXECUTED
20042c0: 80 a0 40 02 cmp %g1, %g2 <== NOT EXECUTED
20042c4: 16 bf ff 45 bge 2003fd8 <rtems_termios_read+0x88> <== NOT EXECUTED
20042c8: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
20042cc: 22 bf ff e0 be,a 200424c <rtems_termios_read+0x2fc> <== NOT EXECUTED
20042d0: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED
20042d4: c2 0c 20 46 ldub [ %l0 + 0x46 ], %g1 <== NOT EXECUTED
20042d8: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
20042dc: 12 80 00 13 bne 2004328 <rtems_termios_read+0x3d8> <== NOT EXECUTED
20042e0: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
20042e4: 10 bf ff da b 200424c <rtems_termios_read+0x2fc> <== NOT EXECUTED
20042e8: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
20042ec: 40 00 06 95 call 2005d40 <rtems_task_wake_after> <== NOT EXECUTED
20042f0: 90 10 20 01 mov 1, %o0 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
20042f4: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
20042f8: 9f c0 c0 00 call %g3 <== NOT EXECUTED
20042fc: d0 04 20 10 ld [ %l0 + 0x10 ], %o0 <== NOT EXECUTED
if (n < 0) {
2004300: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004304: 06 bf ff fa bl 20042ec <rtems_termios_read+0x39c> <== NOT EXECUTED
2004308: 90 0a 20 ff and %o0, 0xff, %o0 <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
200430c: 7f ff fe a3 call 2003d98 <siproc> <== NOT EXECUTED
2004310: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
2004314: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
2004318: 12 bf ff 31 bne 2003fdc <rtems_termios_read+0x8c> <== NOT EXECUTED
200431c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
2004320: 10 bf ff f6 b 20042f8 <rtems_termios_read+0x3a8> <== NOT EXECUTED
2004324: c6 04 20 a0 ld [ %l0 + 0xa0 ], %g3 <== 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);
2004328: 40 00 02 f0 call 2004ee8 <rtems_clock_get> <== NOT EXECUTED
200432c: 92 10 00 14 mov %l4, %o1 <== NOT EXECUTED
2004330: 10 bf ff c7 b 200424c <rtems_termios_read+0x2fc> <== NOT EXECUTED
2004334: 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);
2004338: 40 00 02 ec call 2004ee8 <rtems_clock_get> <== NOT EXECUTED
200433c: 92 07 bf f4 add %fp, -12, %o1 <== NOT EXECUTED
2004340: 10 bf ff c1 b 2004244 <rtems_termios_read+0x2f4> <== NOT EXECUTED
2004344: c4 04 20 a0 ld [ %l0 + 0xa0 ], %g2 <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
2004348: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200434c: 02 bf ff 23 be 2003fd8 <rtems_termios_read+0x88> <== NOT EXECUTED
2004350: 90 10 20 02 mov 2, %o0 <== NOT EXECUTED
break;
rtems_clock_get (RTEMS_CLOCK_GET_TICKS_SINCE_BOOT, &now);
2004354: 40 00 02 e5 call 2004ee8 <rtems_clock_get> <== NOT EXECUTED
2004358: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
200435c: c6 04 20 54 ld [ %l0 + 0x54 ], %g3 <== NOT EXECUTED
2004360: c4 07 bf f4 ld [ %fp + -12 ], %g2 <== NOT EXECUTED
2004364: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004368: 82 20 40 02 sub %g1, %g2, %g1 <== NOT EXECUTED
200436c: 80 a0 40 03 cmp %g1, %g3 <== NOT EXECUTED
2004370: 08 bf ff c7 bleu 200428c <rtems_termios_read+0x33c> <== NOT EXECUTED
2004374: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
2004378: 30 bf ff 19 b,a 2003fdc <rtems_termios_read+0x8c> <== NOT EXECUTED
0200308c <rtems_termios_refill_transmitter>:
* 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)
{
200308c: 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))
2003090: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003094: 82 08 64 03 and %g1, 0x403, %g1 <== NOT EXECUTED
2003098: 80 a0 64 01 cmp %g1, 0x401 <== NOT EXECUTED
200309c: 22 80 00 3e be,a 2003194 <rtems_termios_refill_transmitter+0x108><== NOT EXECUTED
20030a0: 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))
20030a4: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
20030a8: 82 08 60 03 and %g1, 3, %g1 <== NOT EXECUTED
20030ac: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
20030b0: 22 80 00 49 be,a 20031d4 <rtems_termios_refill_transmitter+0x148><== NOT EXECUTED
20030b4: c2 06 20 a4 ld [ %i0 + 0xa4 ], %g1 <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
20030b8: c4 06 20 80 ld [ %i0 + 0x80 ], %g2 <== NOT EXECUTED
20030bc: c2 06 20 84 ld [ %i0 + 0x84 ], %g1 <== NOT EXECUTED
20030c0: 80 a0 80 01 cmp %g2, %g1 <== NOT EXECUTED
20030c4: 22 80 00 2f be,a 2003180 <rtems_termios_refill_transmitter+0xf4><== NOT EXECUTED
20030c8: c2 06 20 94 ld [ %i0 + 0x94 ], %g1 <== NOT EXECUTED
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
20030cc: 7f ff fb 46 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20030d0: 01 00 00 00 nop <== NOT EXECUTED
len = tty->t_dqlen;
20030d4: e0 06 20 90 ld [ %i0 + 0x90 ], %l0 <== NOT EXECUTED
tty->t_dqlen = 0;
20030d8: c0 26 20 90 clr [ %i0 + 0x90 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
20030dc: 7f ff fb 46 call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
20030e0: 01 00 00 00 nop <== NOT EXECUTED
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
20030e4: d0 06 20 84 ld [ %i0 + 0x84 ], %o0 <== NOT EXECUTED
20030e8: d2 06 20 88 ld [ %i0 + 0x88 ], %o1 <== NOT EXECUTED
20030ec: 40 00 46 00 call 20148ec <.urem> <== NOT EXECUTED
20030f0: 90 04 00 08 add %l0, %o0, %o0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
20030f4: 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;
20030f8: d0 26 20 84 st %o0, [ %i0 + 0x84 ] <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
20030fc: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2003100: 02 80 00 54 be 2003250 <rtems_termios_refill_transmitter+0x1c4><== NOT EXECUTED
2003104: a2 10 00 08 mov %o0, %l1 <== NOT EXECUTED
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
2003108: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
200310c: 80 a0 40 11 cmp %g1, %l1 <== NOT EXECUTED
2003110: 22 80 00 41 be,a 2003214 <rtems_termios_refill_transmitter+0x188><== NOT EXECUTED
2003114: 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))
2003118: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
200311c: 82 08 62 10 and %g1, 0x210, %g1 <== NOT EXECUTED
2003120: 80 a0 62 10 cmp %g1, 0x210 <== NOT EXECUTED
2003124: 02 80 00 4e be 200325c <rtems_termios_refill_transmitter+0x1d0><== NOT EXECUTED
2003128: 01 00 00 00 nop <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
200312c: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
2003130: 80 a4 40 01 cmp %l1, %g1 <== NOT EXECUTED
2003134: 08 80 00 41 bleu 2003238 <rtems_termios_refill_transmitter+0x1ac><== NOT EXECUTED
2003138: 01 00 00 00 nop <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
200313c: c2 06 20 88 ld [ %i0 + 0x88 ], %g1 <== NOT EXECUTED
2003140: a0 20 40 11 sub %g1, %l1, %l0 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
2003144: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
2003148: 80 88 66 00 btst 0x600, %g1 <== NOT EXECUTED
200314c: 32 80 00 02 bne,a 2003154 <rtems_termios_refill_transmitter+0xc8><== NOT EXECUTED
2003150: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
2003154: d2 06 20 7c ld [ %i0 + 0x7c ], %o1 <== NOT EXECUTED
2003158: c4 06 20 a4 ld [ %i0 + 0xa4 ], %g2 <== NOT EXECUTED
200315c: 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*/
2003160: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2003164: 92 02 40 11 add %o1, %l1, %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*/
2003168: c2 26 20 94 st %g1, [ %i0 + 0x94 ] <== NOT EXECUTED
(*tty->device.write)(tty->minor,
200316c: 9f c0 80 00 call %g2 <== NOT EXECUTED
2003170: 94 10 00 10 mov %l0, %o2 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2003174: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED
}
return nToSend;
}
2003178: 81 c7 e0 08 ret <== NOT EXECUTED
200317c: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
2003180: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2003184: 02 80 00 30 be 2003244 <rtems_termios_refill_transmitter+0x1b8><== NOT EXECUTED
2003188: a0 10 20 00 clr %l0 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
200318c: 81 c7 e0 08 ret <== NOT EXECUTED
2003190: 91 e8 00 10 restore %g0, %l0, %o0 <== 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,
2003194: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
2003198: 92 06 20 4a add %i0, 0x4a, %o1 <== NOT EXECUTED
200319c: 9f c0 40 00 call %g1 <== NOT EXECUTED
20031a0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
20031a4: 7f ff fb 10 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20031a8: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
20031ac: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
20031b0: 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--;
20031b4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
20031b8: 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--;
20031bc: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
20031c0: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
20031c4: 7f ff fb 0c call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
20031c8: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
20031cc: 81 c7 e0 08 ret <== NOT EXECUTED
20031d0: 91 e8 00 10 restore %g0, %l0, %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,
20031d4: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
20031d8: 92 06 20 49 add %i0, 0x49, %o1 <== NOT EXECUTED
20031dc: 9f c0 40 00 call %g1 <== NOT EXECUTED
20031e0: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
20031e4: 7f ff fb 00 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
20031e8: 01 00 00 00 nop <== NOT EXECUTED
tty->t_dqlen--;
20031ec: c2 06 20 90 ld [ %i0 + 0x90 ], %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
20031f0: 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--;
20031f4: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
20031f8: 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--;
20031fc: c2 26 20 90 st %g1, [ %i0 + 0x90 ] <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2003200: c4 26 20 b8 st %g2, [ %i0 + 0xb8 ] <== NOT EXECUTED
rtems_interrupt_enable(level);
2003204: 7f ff fa fc call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
2003208: a0 10 20 01 mov 1, %l0 <== NOT EXECUTED
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
200320c: 81 c7 e0 08 ret <== NOT EXECUTED
2003210: 91 e8 00 10 restore %g0, %l0, %o0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2003214: 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) {
2003218: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200321c: 02 bf ff d6 be 2003174 <rtems_termios_refill_transmitter+0xe8><== NOT EXECUTED
2003220: a0 10 20 00 clr %l0 <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2003224: d2 06 20 d8 ld [ %i0 + 0xd8 ], %o1 <== NOT EXECUTED
2003228: 9f c0 40 00 call %g1 <== NOT EXECUTED
200322c: 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*/
2003230: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED
2003234: 30 bf ff d1 b,a 2003178 <rtems_termios_refill_transmitter+0xec><== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
2003238: c2 06 20 80 ld [ %i0 + 0x80 ], %g1 <== NOT EXECUTED
200323c: 10 bf ff c2 b 2003144 <rtems_termios_refill_transmitter+0xb8><== NOT EXECUTED
2003240: a0 20 40 11 sub %g1, %l1, %l0 <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2003244: 40 00 09 cf call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003248: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
200324c: 30 bf ff d0 b,a 200318c <rtems_termios_refill_transmitter+0x100><== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2003250: 40 00 09 cc call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003254: d0 06 20 8c ld [ %i0 + 0x8c ], %o0 <== NOT EXECUTED
2003258: 30 bf ff ac b,a 2003108 <rtems_termios_refill_transmitter+0x7c><== 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);
200325c: 7f ff fa e2 call 2001de4 <sparc_disable_interrupts> <== NOT EXECUTED
2003260: 01 00 00 00 nop <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
2003264: c2 06 20 b8 ld [ %i0 + 0xb8 ], %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2003268: 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;
200326c: 82 10 60 20 or %g1, 0x20, %g1 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2003270: 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;
2003274: c2 26 20 b8 st %g1, [ %i0 + 0xb8 ] <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
rtems_interrupt_enable(level);
2003278: 7f ff fa df call 2001df4 <sparc_enable_interrupts> <== NOT EXECUTED
200327c: a0 10 20 00 clr %l0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2003280: e2 26 20 84 st %l1, [ %i0 + 0x84 ] <== NOT EXECUTED
2003284: 30 bf ff bd b,a 2003178 <rtems_termios_refill_transmitter+0xec><== NOT EXECUTED
02004e44 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
2004e44: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
2004e48: a0 07 bf f0 add %fp, -16, %l0 <== NOT EXECUTED
2004e4c: 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 |
2004e50: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2004e54: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004e58: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004e5c: 40 00 00 c3 call 2005168 <rtems_event_receive> <== NOT EXECUTED
2004e60: 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) {
2004e64: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004e68: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004e6c: 32 80 00 16 bne,a 2004ec4 <rtems_termios_rxdaemon+0x80> <== NOT EXECUTED
2004e70: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
2004e74: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
2004e78: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004e7c: d0 06 20 10 ld [ %i0 + 0x10 ], %o0 <== NOT EXECUTED
if (c != EOF) {
2004e80: 80 a2 3f ff cmp %o0, -1 <== NOT EXECUTED
2004e84: 02 bf ff f3 be 2004e50 <rtems_termios_rxdaemon+0xc> <== NOT EXECUTED
2004e88: 92 10 00 11 mov %l1, %o1 <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
2004e8c: d0 2f bf f7 stb %o0, [ %fp + -9 ] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
2004e90: 94 10 20 01 mov 1, %o2 <== NOT EXECUTED
2004e94: 7f ff f9 1c call 2003304 <rtems_termios_enqueue_raw_characters><== NOT EXECUTED
2004e98: 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 |
2004e9c: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2004ea0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004ea4: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004ea8: 40 00 00 b0 call 2005168 <rtems_event_receive> <== NOT EXECUTED
2004eac: 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) {
2004eb0: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004eb4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004eb8: 22 bf ff f0 be,a 2004e78 <rtems_termios_rxdaemon+0x34> <== NOT EXECUTED
2004ebc: c2 06 20 a0 ld [ %i0 + 0xa0 ], %g1 <== NOT EXECUTED
tty->rxTaskId = 0;
2004ec0: c0 26 20 c4 clr [ %i0 + 0xc4 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2004ec4: 40 00 03 25 call 2005b58 <rtems_task_delete> <== NOT EXECUTED
2004ec8: 90 10 20 00 clr %o0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
2004ecc: 10 bf ff e2 b 2004e54 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
2004ed0: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
02003074 <rtems_termios_rxirq_occured>:
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);
2003074: d0 02 20 c4 ld [ %o0 + 0xc4 ], %o0 <== NOT EXECUTED
2003078: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
200307c: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
2003080: 40 00 08 a4 call 2005310 <rtems_event_send> <== NOT EXECUTED
2003084: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
02004dac <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
2004dac: 9d e3 bf 90 save %sp, -112, %sp <== NOT EXECUTED
2004db0: 03 00 80 5f sethi %hi(0x2017c00), %g1 <== NOT EXECUTED
2004db4: a0 07 bf f4 add %fp, -12, %l0 <== NOT EXECUTED
2004db8: a2 10 62 dc or %g1, 0x2dc, %l1 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004dbc: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004dc0: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004dc4: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2004dc8: 40 00 00 e8 call 2005168 <rtems_event_receive> <== NOT EXECUTED
2004dcc: 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) {
2004dd0: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004dd4: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004dd8: 12 80 00 16 bne 2004e30 <rtems_termios_txdaemon+0x84> <== NOT EXECUTED
2004ddc: 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) {
2004de0: c2 06 20 cc ld [ %i0 + 0xcc ], %g1 <== NOT EXECUTED
2004de4: 83 28 60 05 sll %g1, 5, %g1 <== NOT EXECUTED
2004de8: 82 04 40 01 add %l1, %g1, %g1 <== NOT EXECUTED
2004dec: c2 00 60 14 ld [ %g1 + 0x14 ], %g1 <== NOT EXECUTED
2004df0: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004df4: 02 80 00 04 be 2004e04 <rtems_termios_txdaemon+0x58> <== NOT EXECUTED
2004df8: 01 00 00 00 nop <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2004dfc: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004e00: 01 00 00 00 nop <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
2004e04: 7f ff f8 a2 call 200308c <rtems_termios_refill_transmitter><== NOT EXECUTED
2004e08: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004e0c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
2004e10: 94 10 20 00 clr %o2 <== NOT EXECUTED
2004e14: 96 10 00 10 mov %l0, %o3 <== NOT EXECUTED
2004e18: 40 00 00 d4 call 2005168 <rtems_event_receive> <== NOT EXECUTED
2004e1c: 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) {
2004e20: c2 07 bf f4 ld [ %fp + -12 ], %g1 <== NOT EXECUTED
2004e24: 80 88 60 01 btst 1, %g1 <== NOT EXECUTED
2004e28: 02 bf ff ee be 2004de0 <rtems_termios_txdaemon+0x34> <== NOT EXECUTED
2004e2c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
tty->txTaskId = 0;
2004e30: c0 26 20 c8 clr [ %i0 + 0xc8 ] <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
2004e34: 40 00 03 49 call 2005b58 <rtems_task_delete> <== NOT EXECUTED
2004e38: 90 10 20 00 clr %o0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
2004e3c: 10 bf ff e1 b 2004dc0 <rtems_termios_txdaemon+0x14> <== NOT EXECUTED
2004e40: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED
02003de4 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2003de4: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003de8: c2 06 00 00 ld [ %i0 ], %g1
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
2003dec: a8 10 00 18 mov %i0, %l4
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
2003df0: e2 00 60 28 ld [ %g1 + 0x28 ], %l1
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
2003df4: 92 10 20 00 clr %o1
2003df8: d0 04 60 18 ld [ %l1 + 0x18 ], %o0
2003dfc: 40 00 06 99 call 2005860 <rtems_semaphore_obtain>
2003e00: 94 10 20 00 clr %o2
if (sc != RTEMS_SUCCESSFUL)
2003e04: b0 92 20 00 orcc %o0, 0, %i0
2003e08: 12 80 00 0f bne 2003e44 <rtems_termios_write+0x60> <== NEVER TAKEN
2003e0c: 03 00 80 5f sethi %hi(0x2017c00), %g1
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
2003e10: c4 04 60 cc ld [ %l1 + 0xcc ], %g2
2003e14: 85 28 a0 05 sll %g2, 5, %g2
2003e18: 82 10 62 dc or %g1, 0x2dc, %g1
2003e1c: 82 00 40 02 add %g1, %g2, %g1
2003e20: c2 00 60 0c ld [ %g1 + 0xc ], %g1
2003e24: 80 a0 60 00 cmp %g1, 0
2003e28: 02 80 00 13 be 2003e74 <rtems_termios_write+0x90> <== ALWAYS TAKEN
2003e2c: 92 10 00 14 mov %l4, %o1
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
2003e30: 9f c0 40 00 call %g1 <== NOT EXECUTED
2003e34: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2003e38: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2003e3c: 40 00 06 d1 call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003e40: d0 04 60 18 ld [ %l1 + 0x18 ], %o0 <== NOT EXECUTED
2003e44: 81 c7 e0 08 ret <== NOT EXECUTED
2003e48: 81 e8 00 00 restore <== NOT EXECUTED
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
2003e4c: d0 05 20 08 ld [ %l4 + 8 ], %o0 <== NOT EXECUTED
2003e50: d2 05 20 0c ld [ %l4 + 0xc ], %o1 <== NOT EXECUTED
2003e54: 7f ff fd fd call 2003648 <rtems_termios_puts> <== NOT EXECUTED
2003e58: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
args->bytes_moved = args->count;
2003e5c: c2 05 20 0c ld [ %l4 + 0xc ], %g1 <== NOT EXECUTED
2003e60: c2 25 20 14 st %g1, [ %l4 + 0x14 ]
}
rtems_semaphore_release (tty->osem);
2003e64: 40 00 06 c7 call 2005980 <rtems_semaphore_release>
2003e68: d0 04 60 18 ld [ %l1 + 0x18 ], %o0
return sc;
}
2003e6c: 81 c7 e0 08 ret
2003e70: 81 e8 00 00 restore
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
2003e74: c2 04 60 34 ld [ %l1 + 0x34 ], %g1
2003e78: 80 88 60 01 btst 1, %g1
2003e7c: 02 bf ff f4 be 2003e4c <rtems_termios_write+0x68> <== NEVER TAKEN
2003e80: a0 10 20 00 clr %l0
uint32_t count = args->count;
2003e84: e6 05 20 0c ld [ %l4 + 0xc ], %l3
char *buffer = args->buffer;
2003e88: e4 05 20 08 ld [ %l4 + 8 ], %l2
while (count--)
2003e8c: 80 a4 e0 00 cmp %l3, 0
2003e90: 02 bf ff f4 be 2003e60 <rtems_termios_write+0x7c> <== NEVER TAKEN
2003e94: 82 10 20 00 clr %g1
oproc (*buffer++, tty);
2003e98: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0
2003e9c: 7f ff fe 39 call 2003780 <oproc>
2003ea0: 92 10 00 11 mov %l1, %o1
2003ea4: 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--)
2003ea8: 80 a4 c0 10 cmp %l3, %l0
2003eac: 32 bf ff fc bne,a 2003e9c <rtems_termios_write+0xb8>
2003eb0: d0 0c 80 10 ldub [ %l2 + %l0 ], %o0
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
2003eb4: 10 bf ff eb b 2003e60 <rtems_termios_write+0x7c>
2003eb8: c2 05 20 0c ld [ %l4 + 0xc ], %g1
020113e4 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
Objects_Id id
)
{
20113e4: 9d e3 bf 90 save %sp, -112, %sp
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
20113e8: 11 00 80 ca sethi %hi(0x2032800), %o0
20113ec: 92 10 00 18 mov %i0, %o1
20113f0: 90 12 23 fc or %o0, 0x3fc, %o0
20113f4: 40 00 0b c1 call 20142f8 <_Objects_Get>
20113f8: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20113fc: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011400: 80 a0 60 00 cmp %g1, 0
2011404: 12 80 00 0a bne 201142c <rtems_timer_cancel+0x48>
2011408: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
201140c: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
2011410: 80 a0 60 04 cmp %g1, 4
2011414: 02 80 00 04 be 2011424 <rtems_timer_cancel+0x40> <== NEVER TAKEN
2011418: 01 00 00 00 nop
(void) _Watchdog_Remove( &the_timer->Ticker );
201141c: 40 00 14 c4 call 201672c <_Watchdog_Remove>
2011420: 90 02 20 10 add %o0, 0x10, %o0
_Thread_Enable_dispatch();
2011424: 40 00 0e 38 call 2014d04 <_Thread_Enable_dispatch>
2011428: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
201142c: 81 c7 e0 08 ret
2011430: 81 e8 00 00 restore
020069b4 <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
Objects_Id *id
)
{
20069b4: 9d e3 bf 98 save %sp, -104, %sp
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
20069b8: a2 96 20 00 orcc %i0, 0, %l1
20069bc: 02 80 00 20 be 2006a3c <rtems_timer_create+0x88>
20069c0: b0 10 20 03 mov 3, %i0
return RTEMS_INVALID_NAME;
if ( !id )
20069c4: 80 a6 60 00 cmp %i1, 0
20069c8: 02 80 00 1d be 2006a3c <rtems_timer_create+0x88> <== NEVER TAKEN
20069cc: b0 10 20 09 mov 9, %i0
20069d0: 05 00 80 5c sethi %hi(0x2017000), %g2
20069d4: c2 00 a0 f0 ld [ %g2 + 0xf0 ], %g1 ! 20170f0 <_Thread_Dispatch_disable_level>
20069d8: 82 00 60 01 inc %g1
20069dc: c2 20 a0 f0 st %g1, [ %g2 + 0xf0 ]
* This function allocates a timer control block from
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Allocate( void )
{
return (Timer_Control *) _Objects_Allocate( &_Timer_Information );
20069e0: 21 00 80 5d sethi %hi(0x2017400), %l0
20069e4: 40 00 04 33 call 2007ab0 <_Objects_Allocate>
20069e8: 90 14 22 c4 or %l0, 0x2c4, %o0 ! 20176c4 <_Timer_Information>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
20069ec: 80 a2 20 00 cmp %o0, 0
20069f0: 02 80 00 15 be 2006a44 <rtems_timer_create+0x90>
20069f4: 82 14 22 c4 or %l0, 0x2c4, %g1
20069f8: c6 02 20 08 ld [ %o0 + 8 ], %g3
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
20069fc: e2 22 20 0c st %l1, [ %o0 + 0xc ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
2006a00: c8 00 60 1c ld [ %g1 + 0x1c ], %g4
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2006a04: c0 22 20 30 clr [ %o0 + 0x30 ]
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
2006a08: c6 26 40 00 st %g3, [ %i1 ]
if ( !the_timer ) {
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_timer->the_class = TIMER_DORMANT;
2006a0c: 84 10 20 04 mov 4, %g2
2006a10: 03 00 00 3f sethi %hi(0xfc00), %g1
2006a14: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2006a18: 86 08 c0 01 and %g3, %g1, %g3
2006a1c: 87 28 e0 02 sll %g3, 2, %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006a20: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
2006a24: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2006a28: c0 22 20 34 clr [ %o0 + 0x34 ]
2006a2c: c4 22 20 38 st %g2, [ %o0 + 0x38 ]
2006a30: d0 21 00 03 st %o0, [ %g4 + %g3 ]
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
2006a34: 40 00 07 dc call 20089a4 <_Thread_Enable_dispatch>
2006a38: b0 10 20 00 clr %i0
return RTEMS_SUCCESSFUL;
}
2006a3c: 81 c7 e0 08 ret
2006a40: 81 e8 00 00 restore
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
_Thread_Enable_dispatch();
2006a44: 40 00 07 d8 call 20089a4 <_Thread_Enable_dispatch>
2006a48: b0 10 20 05 mov 5, %i0
2006a4c: 81 c7 e0 08 ret
2006a50: 81 e8 00 00 restore
02006a54 <rtems_timer_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2006a54: 9d e3 bf 90 save %sp, -112, %sp
2006a58: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( ticks == 0 )
2006a5c: 80 a6 60 00 cmp %i1, 0
2006a60: 02 80 00 26 be 2006af8 <rtems_timer_fire_after+0xa4>
2006a64: b0 10 20 0a mov 0xa, %i0
return RTEMS_INVALID_NUMBER;
if ( !routine )
2006a68: 80 a6 a0 00 cmp %i2, 0
2006a6c: 02 80 00 23 be 2006af8 <rtems_timer_fire_after+0xa4> <== NEVER TAKEN
2006a70: b0 10 20 09 mov 9, %i0
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
2006a74: 11 00 80 5d sethi %hi(0x2017400), %o0
2006a78: 92 10 00 12 mov %l2, %o1
2006a7c: 90 12 22 c4 or %o0, 0x2c4, %o0
2006a80: 40 00 05 74 call 2008050 <_Objects_Get>
2006a84: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2006a88: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006a8c: a0 10 00 08 mov %o0, %l0
2006a90: 80 a0 60 00 cmp %g1, 0
2006a94: 12 80 00 19 bne 2006af8 <rtems_timer_fire_after+0xa4>
2006a98: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2006a9c: a2 02 20 10 add %o0, 0x10, %l1
2006aa0: 40 00 0d 12 call 2009ee8 <_Watchdog_Remove>
2006aa4: 90 10 00 11 mov %l1, %o0
_ISR_Disable( level );
2006aa8: 7f ff ee 89 call 20024cc <sparc_disable_interrupts>
2006aac: 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 ) {
2006ab0: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
2006ab4: 80 a0 60 00 cmp %g1, 0
2006ab8: 12 80 00 12 bne 2006b00 <rtems_timer_fire_after+0xac> <== NEVER TAKEN
2006abc: 01 00 00 00 nop
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2006ac0: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
the_watchdog->id = id;
2006ac4: e4 24 20 30 st %l2, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
2006ac8: 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;
2006acc: c0 24 20 38 clr [ %l0 + 0x38 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2006ad0: c0 24 20 18 clr [ %l0 + 0x18 ]
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_ISR_Enable( level );
2006ad4: 7f ff ee 82 call 20024dc <sparc_enable_interrupts>
2006ad8: b0 10 20 00 clr %i0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2006adc: 92 10 00 11 mov %l1, %o1
2006ae0: 11 00 80 5c sethi %hi(0x2017000), %o0
2006ae4: 90 12 21 d4 or %o0, 0x1d4, %o0 ! 20171d4 <_Watchdog_Ticks_chain>
2006ae8: 40 00 0c 95 call 2009d3c <_Watchdog_Insert>
2006aec: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
_Watchdog_Insert_ticks( &the_timer->Ticker, ticks );
_Thread_Enable_dispatch();
2006af0: 40 00 07 ad call 20089a4 <_Thread_Enable_dispatch>
2006af4: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2006af8: 81 c7 e0 08 ret
2006afc: 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_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
2006b00: 7f ff ee 77 call 20024dc <sparc_enable_interrupts> <== NOT EXECUTED
2006b04: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
2006b08: 40 00 07 a7 call 20089a4 <_Thread_Enable_dispatch> <== NOT EXECUTED
2006b0c: 01 00 00 00 nop <== NOT EXECUTED
2006b10: 81 c7 e0 08 ret <== NOT EXECUTED
2006b14: 81 e8 00 00 restore <== NOT EXECUTED
020115f8 <rtems_timer_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
20115f8: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
20115fc: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011600: c4 08 62 a4 ldub [ %g1 + 0x2a4 ], %g2 ! 20322a4 <_TOD_Is_set>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011604: a4 10 00 18 mov %i0, %l2
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
2011608: 80 a0 a0 00 cmp %g2, 0
201160c: 02 80 00 2f be 20116c8 <rtems_timer_fire_when+0xd0>
2011610: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
2011614: 7f ff f5 10 call 200ea54 <_TOD_Validate>
2011618: 90 10 00 19 mov %i1, %o0
201161c: 80 8a 20 ff btst 0xff, %o0
2011620: 02 80 00 0b be 201164c <rtems_timer_fire_when+0x54>
2011624: 80 a6 a0 00 cmp %i2, 0
return RTEMS_INVALID_CLOCK;
if ( !routine )
2011628: 02 80 00 28 be 20116c8 <rtems_timer_fire_when+0xd0> <== NEVER TAKEN
201162c: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
2011630: 7f ff f4 d4 call 200e980 <_TOD_To_seconds>
2011634: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011638: 27 00 80 c8 sethi %hi(0x2032000), %l3
201163c: c2 04 e3 24 ld [ %l3 + 0x324 ], %g1 ! 2032324 <_TOD_Now>
2011640: 80 a2 00 01 cmp %o0, %g1
2011644: 18 80 00 04 bgu 2011654 <rtems_timer_fire_when+0x5c>
2011648: a2 10 00 08 mov %o0, %l1
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
201164c: 81 c7 e0 08 ret
2011650: 91 e8 20 14 restore %g0, 0x14, %o0
2011654: 11 00 80 ca sethi %hi(0x2032800), %o0
2011658: 92 10 00 12 mov %l2, %o1
201165c: 90 12 23 fc or %o0, 0x3fc, %o0
2011660: 40 00 0b 26 call 20142f8 <_Objects_Get>
2011664: 94 07 bf f4 add %fp, -12, %o2
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011668: c2 07 bf f4 ld [ %fp + -12 ], %g1
201166c: b2 10 00 08 mov %o0, %i1
2011670: 80 a0 60 00 cmp %g1, 0
2011674: 12 80 00 15 bne 20116c8 <rtems_timer_fire_when+0xd0>
2011678: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
201167c: a0 02 20 10 add %o0, 0x10, %l0
2011680: 40 00 14 2b call 201672c <_Watchdog_Remove>
2011684: 90 10 00 10 mov %l0, %o0
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
2011688: e4 26 60 30 st %l2, [ %i1 + 0x30 ]
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
201168c: c2 04 e3 24 ld [ %l3 + 0x324 ], %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011690: 92 10 00 10 mov %l0, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2011694: 82 24 40 01 sub %l1, %g1, %g1
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
2011698: 11 00 80 c8 sethi %hi(0x2032000), %o0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
201169c: c2 26 60 1c st %g1, [ %i1 + 0x1c ]
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20116a0: 90 12 23 68 or %o0, 0x368, %o0
the_timer->the_class = TIMER_TIME_OF_DAY;
20116a4: 82 10 20 02 mov 2, %g1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20116a8: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
20116ac: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20116b0: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20116b4: c0 26 60 18 clr [ %i1 + 0x18 ]
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
20116b8: 40 00 13 b2 call 2016580 <_Watchdog_Insert>
20116bc: b0 10 20 00 clr %i0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch
);
_Thread_Enable_dispatch();
20116c0: 40 00 0d 91 call 2014d04 <_Thread_Enable_dispatch>
20116c4: 01 00 00 00 nop
20116c8: 81 c7 e0 08 ret
20116cc: 81 e8 00 00 restore
020116d0 <rtems_timer_get_information>:
rtems_status_code rtems_timer_get_information(
Objects_Id id,
rtems_timer_information *the_info
)
{
20116d0: 9d e3 bf 90 save %sp, -112, %sp
20116d4: 92 10 00 18 mov %i0, %o1
Timer_Control *the_timer;
Objects_Locations location;
if ( !the_info )
20116d8: 80 a6 60 00 cmp %i1, 0
20116dc: 02 80 00 14 be 201172c <rtems_timer_get_information+0x5c> <== NEVER TAKEN
20116e0: b0 10 20 09 mov 9, %i0
20116e4: 11 00 80 ca sethi %hi(0x2032800), %o0
20116e8: 94 07 bf f4 add %fp, -12, %o2
20116ec: 40 00 0b 03 call 20142f8 <_Objects_Get>
20116f0: 90 12 23 fc or %o0, 0x3fc, %o0
return RTEMS_INVALID_ADDRESS;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
20116f4: c2 07 bf f4 ld [ %fp + -12 ], %g1
20116f8: 80 a0 60 00 cmp %g1, 0
20116fc: 12 80 00 0c bne 201172c <rtems_timer_get_information+0x5c>
2011700: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
the_info->initial = the_timer->Ticker.initial;
2011704: c2 02 20 1c ld [ %o0 + 0x1c ], %g1
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
2011708: c6 02 20 38 ld [ %o0 + 0x38 ], %g3
the_info->initial = the_timer->Ticker.initial;
201170c: c2 26 60 04 st %g1, [ %i1 + 4 ]
the_info->start_time = the_timer->Ticker.start_time;
2011710: c4 02 20 24 ld [ %o0 + 0x24 ], %g2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_info->the_class = the_timer->the_class;
2011714: c6 26 40 00 st %g3, [ %i1 ]
the_info->initial = the_timer->Ticker.initial;
the_info->start_time = the_timer->Ticker.start_time;
2011718: c4 26 60 08 st %g2, [ %i1 + 8 ]
the_info->stop_time = the_timer->Ticker.stop_time;
201171c: c2 02 20 28 ld [ %o0 + 0x28 ], %g1
_Thread_Enable_dispatch();
2011720: b0 10 20 00 clr %i0
2011724: 40 00 0d 78 call 2014d04 <_Thread_Enable_dispatch>
2011728: c2 26 60 0c st %g1, [ %i1 + 0xc ]
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
201172c: 81 c7 e0 08 ret
2011730: 81 e8 00 00 restore
020119ec <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
20119ec: 9d e3 bf 90 save %sp, -112, %sp
20119f0: 92 96 20 00 orcc %i0, 0, %o1
20119f4: 12 80 00 05 bne 2011a08 <rtems_timer_initiate_server+0x1c>
20119f8: 03 00 80 b4 sethi %hi(0x202d000), %g1
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
20119fc: 90 10 20 13 mov 0x13, %o0
}
return status;
}
2011a00: 81 c7 e0 08 ret
2011a04: 91 e8 00 08 restore %g0, %o0, %o0
2011a08: c4 08 60 c4 ldub [ %g1 + 0xc4 ], %g2
2011a0c: 80 a2 40 02 cmp %o1, %g2
2011a10: 18 80 00 56 bgu 2011b68 <rtems_timer_initiate_server+0x17c><== ALWAYS TAKEN
2011a14: 80 a2 7f ff cmp %o1, -1
2011a18: b0 10 00 09 mov %o1, %i0 <== NOT EXECUTED
2011a1c: 05 00 80 c8 sethi %hi(0x2032000), %g2
2011a20: c2 00 a2 90 ld [ %g2 + 0x290 ], %g1 ! 2032290 <_Thread_Dispatch_disable_level>
2011a24: 82 00 60 01 inc %g1
2011a28: c2 20 a2 90 st %g1, [ %g2 + 0x290 ]
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011a2c: 23 00 80 b7 sethi %hi(0x202dc00), %l1
initialized = true;
2011a30: 82 10 20 01 mov 1, %g1
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
2011a34: e0 0c 60 0c ldub [ %l1 + 0xc ], %l0
initialized = true;
_Thread_Enable_dispatch();
2011a38: 40 00 0c b3 call 2014d04 <_Thread_Enable_dispatch>
2011a3c: c2 2c 60 0c stb %g1, [ %l1 + 0xc ]
if ( tmpInitialized )
2011a40: 80 a4 20 00 cmp %l0, 0
2011a44: 12 bf ff ef bne 2011a00 <rtems_timer_initiate_server+0x14>
2011a48: 90 10 20 0e mov 0xe, %o0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011a4c: 05 00 80 c8 sethi %hi(0x2032000), %g2
2011a50: 82 10 a1 a4 or %g2, 0x1a4, %g1 ! 20321a4 <_Timer_To_be_inserted>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011a54: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011a58: 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);
2011a5c: 82 00 60 04 add %g1, 4, %g1
* other library rules. For example, if using a TSR written in Ada the
* Server should run at the same priority as the priority Ada task.
* Otherwise, the priority ceiling for the mutex used to protect the
* GNAT run-time is violated.
*/
status = rtems_task_create(
2011a60: 92 10 00 18 mov %i0, %o1
2011a64: 94 10 00 19 mov %i1, %o2
2011a68: 19 00 00 20 sethi %hi(0x8000), %o4
2011a6c: c2 20 a1 a4 st %g1, [ %g2 + 0x1a4 ]
2011a70: 98 16 80 0c or %i2, %o4, %o4
2011a74: 11 15 12 53 sethi %hi(0x54494c00), %o0
2011a78: 96 10 21 00 mov 0x100, %o3
2011a7c: 90 12 21 45 or %o0, 0x145, %o0
2011a80: 7f ff fc 78 call 2010c60 <rtems_task_create>
2011a84: 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) {
2011a88: 80 a2 20 00 cmp %o0, 0
2011a8c: 12 80 00 34 bne 2011b5c <rtems_timer_initiate_server+0x170>
2011a90: 03 00 80 c8 sethi %hi(0x2032000), %g1
* to a TCB pointer from here out.
*
* 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(
2011a94: d6 07 bf f4 ld [ %fp + -12 ], %o3
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
2011a98: 86 10 61 44 or %g1, 0x144, %g3
2011a9c: c4 10 e0 10 lduh [ %g3 + 0x10 ], %g2
2011aa0: 03 00 00 3f sethi %hi(0xfc00), %g1
2011aa4: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
2011aa8: 82 0a c0 01 and %o3, %g1, %g1
2011aac: 80 a0 40 02 cmp %g1, %g2
2011ab0: 18 80 00 05 bgu 2011ac4 <rtems_timer_initiate_server+0xd8><== NEVER TAKEN
2011ab4: 98 10 20 00 clr %o4
2011ab8: c4 00 e0 1c ld [ %g3 + 0x1c ], %g2
2011abc: 83 28 60 02 sll %g1, 2, %g1
2011ac0: d8 00 80 01 ld [ %g2 + %g1 ], %o4
2011ac4: 09 00 80 c8 sethi %hi(0x2032000), %g4
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011ac8: 1b 00 80 c8 sethi %hi(0x2032000), %o5
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
2011acc: 84 11 21 84 or %g4, 0x184, %g2
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
2011ad0: 82 13 61 98 or %o5, 0x198, %g1
2011ad4: 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;
2011ad8: c0 20 a0 04 clr [ %g2 + 4 ]
the_chain->last = _Chain_Head(the_chain);
2011adc: c2 20 60 08 st %g1, [ %g1 + 8 ]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
2011ae0: 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);
2011ae4: 84 00 a0 04 add %g2, 4, %g2
2011ae8: 82 00 60 04 add %g1, 4, %g1
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011aec: c0 23 20 6c clr [ %o4 + 0x6c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011af0: c0 23 20 50 clr [ %o4 + 0x50 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011af4: d6 23 20 68 st %o3, [ %o4 + 0x68 ]
2011af8: c4 21 21 84 st %g2, [ %g4 + 0x184 ]
2011afc: c2 23 61 98 st %g1, [ %o5 + 0x198 ]
2011b00: 05 00 80 cb sethi %hi(0x2032c00), %g2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2011b04: 07 00 80 52 sethi %hi(0x2014800), %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011b08: 03 00 80 c8 sethi %hi(0x2032000), %g1
the_watchdog->routine = routine;
2011b0c: 86 10 e3 28 or %g3, 0x328, %g3
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011b10: 82 10 61 b0 or %g1, 0x1b0, %g1
the_watchdog->routine = routine;
2011b14: c6 23 20 64 st %g3, [ %o4 + 0x64 ]
2011b18: d8 20 a0 40 st %o4, [ %g2 + 0x40 ]
2011b1c: c6 20 60 1c st %g3, [ %g1 + 0x1c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
2011b20: c0 20 60 24 clr [ %g1 + 0x24 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2011b24: c0 20 60 08 clr [ %g1 + 8 ]
the_watchdog->routine = routine;
the_watchdog->id = id;
2011b28: d6 20 60 20 st %o3, [ %g1 + 0x20 ]
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011b2c: 05 00 80 46 sethi %hi(0x2011800), %g2
2011b30: 03 00 80 cb sethi %hi(0x2032c00), %g1
2011b34: 84 10 a3 78 or %g2, 0x378, %g2
/*
* Start the timer server
*/
status = rtems_task_start(
2011b38: 90 10 00 0b mov %o3, %o0
/*
* Initialize the pointer to the timer reset method so applications
* that do not use the Timer Server do not have to pull it in.
*/
_Timer_Server_schedule_operation = _Timer_Server_schedule_operation_method;
2011b3c: c4 20 60 3c st %g2, [ %g1 + 0x3c ]
/*
* Start the timer server
*/
status = rtems_task_start(
2011b40: 13 00 80 47 sethi %hi(0x2011c00), %o1
2011b44: 94 10 20 00 clr %o2
2011b48: 7f ff fd 9e call 20111c0 <rtems_task_start>
2011b4c: 92 12 60 4c or %o1, 0x4c, %o1
id, /* the id from create */
(rtems_task_entry) _Timer_Server_body, /* the timer server entry point */
0 /* there is no argument */
);
if (status) {
2011b50: 80 a2 20 00 cmp %o0, 0
2011b54: 02 bf ff ab be 2011a00 <rtems_timer_initiate_server+0x14> <== ALWAYS TAKEN
2011b58: 01 00 00 00 nop
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
2011b5c: c0 2c 60 0c clrb [ %l1 + 0xc ]
}
return status;
}
2011b60: 81 c7 e0 08 ret
2011b64: 91 e8 00 08 restore %g0, %o0, %o0
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
2011b68: 02 bf ff ad be 2011a1c <rtems_timer_initiate_server+0x30>
2011b6c: b0 10 20 00 clr %i0
* but there is actually no way (in normal circumstances) that the
* start can fail. The id and starting address are known to be
* be good. If this service fails, something is weirdly wrong on the
* target such as a stray write in an ISR or incorrect memory layout.
*/
initialized = false;
2011b70: 10 bf ff a4 b 2011a00 <rtems_timer_initiate_server+0x14>
2011b74: 90 10 20 13 mov 0x13, %o0
0201176c <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
Objects_Id id
)
{
201176c: 9d e3 bf 90 save %sp, -112, %sp
2011770: 11 00 80 ca sethi %hi(0x2032800), %o0
2011774: 92 10 00 18 mov %i0, %o1
2011778: 90 12 23 fc or %o0, 0x3fc, %o0
201177c: 40 00 0a df call 20142f8 <_Objects_Get>
2011780: 94 07 bf f4 add %fp, -12, %o2
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011784: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011788: a0 10 00 08 mov %o0, %l0
201178c: 80 a0 60 00 cmp %g1, 0
2011790: 12 80 00 11 bne 20117d4 <rtems_timer_reset+0x68>
2011794: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
2011798: c2 02 20 38 ld [ %o0 + 0x38 ], %g1
201179c: 80 a0 60 01 cmp %g1, 1
20117a0: 22 80 00 15 be,a 20117f4 <rtems_timer_reset+0x88>
20117a4: 31 00 80 cb sethi %hi(0x2032c00), %i0
20117a8: 1a 80 00 0d bcc 20117dc <rtems_timer_reset+0x70>
20117ac: 80 a0 60 04 cmp %g1, 4
case TIMER_INTERVAL:
_Watchdog_Remove( &the_timer->Ticker );
20117b0: a0 02 20 10 add %o0, 0x10, %l0
20117b4: 40 00 13 de call 201672c <_Watchdog_Remove>
20117b8: 90 10 00 10 mov %l0, %o0
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
20117bc: 11 00 80 c8 sethi %hi(0x2032000), %o0
20117c0: 92 10 00 10 mov %l0, %o1
20117c4: 40 00 13 6f call 2016580 <_Watchdog_Insert>
20117c8: 90 12 23 74 or %o0, 0x374, %o0
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
20117cc: 40 00 0d 4e call 2014d04 <_Thread_Enable_dispatch>
20117d0: b0 10 20 00 clr %i0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20117d4: 81 c7 e0 08 ret
20117d8: 81 e8 00 00 restore
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
switch ( the_timer->the_class ) {
20117dc: 18 bf ff fc bgu 20117cc <rtems_timer_reset+0x60> <== NEVER TAKEN
20117e0: 01 00 00 00 nop
(*_Timer_Server_schedule_operation)( the_timer );
break;
case TIMER_TIME_OF_DAY:
case TIMER_TIME_OF_DAY_ON_TASK:
case TIMER_DORMANT:
_Thread_Enable_dispatch();
20117e4: 40 00 0d 48 call 2014d04 <_Thread_Enable_dispatch>
20117e8: b0 10 20 0b mov 0xb, %i0 ! b <PROM_START+0xb>
20117ec: 81 c7 e0 08 ret
20117f0: 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:
if ( !_Timer_Server_schedule_operation ) {
20117f4: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
20117f8: 80 a0 60 00 cmp %g1, 0
20117fc: 02 80 00 08 be 201181c <rtems_timer_reset+0xb0> <== NEVER TAKEN
2011800: 01 00 00 00 nop
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
_Watchdog_Remove( &the_timer->Ticker );
2011804: 40 00 13 ca call 201672c <_Watchdog_Remove>
2011808: 90 02 20 10 add %o0, 0x10, %o0
(*_Timer_Server_schedule_operation)( the_timer );
201180c: c2 06 20 3c ld [ %i0 + 0x3c ], %g1
2011810: 9f c0 40 00 call %g1
2011814: 90 10 00 10 mov %l0, %o0
2011818: 30 bf ff ed b,a 20117cc <rtems_timer_reset+0x60>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
break;
case TIMER_INTERVAL_ON_TASK:
if ( !_Timer_Server_schedule_operation ) {
_Thread_Enable_dispatch();
201181c: 40 00 0d 3a call 2014d04 <_Thread_Enable_dispatch> <== NOT EXECUTED
2011820: b0 10 20 0e mov 0xe, %i0 <== NOT EXECUTED
2011824: 81 c7 e0 08 ret <== NOT EXECUTED
2011828: 81 e8 00 00 restore <== NOT EXECUTED
0201182c <rtems_timer_server_fire_after>:
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
201182c: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
2011830: 03 00 80 cb sethi %hi(0x2032c00), %g1
2011834: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 2032c40 <_Timer_Server>
Objects_Id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011838: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
if ( !_Timer_Server )
201183c: 80 a0 a0 00 cmp %g2, 0
2011840: 02 80 00 28 be 20118e0 <rtems_timer_server_fire_after+0xb4>
2011844: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !routine )
2011848: 80 a6 a0 00 cmp %i2, 0
201184c: 02 80 00 25 be 20118e0 <rtems_timer_server_fire_after+0xb4><== NEVER TAKEN
2011850: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
2011854: 80 a6 60 00 cmp %i1, 0
2011858: 02 80 00 22 be 20118e0 <rtems_timer_server_fire_after+0xb4>
201185c: b0 10 20 0a mov 0xa, %i0
2011860: 11 00 80 ca sethi %hi(0x2032800), %o0
2011864: 92 10 00 11 mov %l1, %o1
2011868: 90 12 23 fc or %o0, 0x3fc, %o0
201186c: 40 00 0a a3 call 20142f8 <_Objects_Get>
2011870: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011874: c2 07 bf f4 ld [ %fp + -12 ], %g1
2011878: a0 10 00 08 mov %o0, %l0
201187c: 80 a0 60 00 cmp %g1, 0
2011880: 12 80 00 18 bne 20118e0 <rtems_timer_server_fire_after+0xb4>
2011884: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
2011888: 40 00 13 a9 call 201672c <_Watchdog_Remove>
201188c: 90 02 20 10 add %o0, 0x10, %o0
_ISR_Disable( level );
2011890: 7f ff e6 79 call 200b274 <sparc_disable_interrupts>
2011894: 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 ) {
2011898: c2 04 20 18 ld [ %l0 + 0x18 ], %g1
201189c: 80 a0 60 00 cmp %g1, 0
20118a0: 12 80 00 12 bne 20118e8 <rtems_timer_server_fire_after+0xbc><== NEVER TAKEN
20118a4: 82 10 20 01 mov 1, %g1
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20118a8: f4 24 20 2c st %i2, [ %l0 + 0x2c ]
the_watchdog->id = id;
20118ac: e2 24 20 30 st %l1, [ %l0 + 0x30 ]
the_watchdog->user_data = user_data;
20118b0: f6 24 20 34 st %i3, [ %l0 + 0x34 ]
* 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;
20118b4: f2 24 20 1c st %i1, [ %l0 + 0x1c ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20118b8: 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;
20118bc: 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 );
20118c0: 7f ff e6 71 call 200b284 <sparc_enable_interrupts>
20118c4: b0 10 20 00 clr %i0
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20118c8: 03 00 80 cb sethi %hi(0x2032c00), %g1
20118cc: c4 00 60 3c ld [ %g1 + 0x3c ], %g2 ! 2032c3c <_Timer_Server_schedule_operation>
20118d0: 9f c0 80 00 call %g2
20118d4: 90 10 00 10 mov %l0, %o0
_Thread_Enable_dispatch();
20118d8: 40 00 0d 0b call 2014d04 <_Thread_Enable_dispatch>
20118dc: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
20118e0: 81 c7 e0 08 ret
20118e4: 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_timer->Ticker.state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
20118e8: 7f ff e6 67 call 200b284 <sparc_enable_interrupts> <== NOT EXECUTED
20118ec: b0 10 20 00 clr %i0 <== NOT EXECUTED
_Thread_Enable_dispatch();
20118f0: 40 00 0d 05 call 2014d04 <_Thread_Enable_dispatch> <== NOT EXECUTED
20118f4: 01 00 00 00 nop <== NOT EXECUTED
20118f8: 81 c7 e0 08 ret <== NOT EXECUTED
20118fc: 81 e8 00 00 restore <== NOT EXECUTED
02011900 <rtems_timer_server_fire_when>:
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
2011900: 9d e3 bf 90 save %sp, -112, %sp
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
2011904: 03 00 80 cb sethi %hi(0x2032c00), %g1
2011908: c4 00 60 40 ld [ %g1 + 0x40 ], %g2 ! 2032c40 <_Timer_Server>
Objects_Id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
201190c: a2 10 00 18 mov %i0, %l1
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_Timer_Server )
2011910: 80 a0 a0 00 cmp %g2, 0
2011914: 02 80 00 34 be 20119e4 <rtems_timer_server_fire_when+0xe4>
2011918: b0 10 20 0e mov 0xe, %i0
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
201191c: 03 00 80 c8 sethi %hi(0x2032000), %g1
2011920: c4 08 62 a4 ldub [ %g1 + 0x2a4 ], %g2 ! 20322a4 <_TOD_Is_set>
2011924: 80 a0 a0 00 cmp %g2, 0
2011928: 02 80 00 2f be 20119e4 <rtems_timer_server_fire_when+0xe4><== NEVER TAKEN
201192c: b0 10 20 0b mov 0xb, %i0
return RTEMS_NOT_DEFINED;
if ( !routine )
2011930: 80 a6 a0 00 cmp %i2, 0
2011934: 02 80 00 2c be 20119e4 <rtems_timer_server_fire_when+0xe4><== NEVER TAKEN
2011938: b0 10 20 09 mov 9, %i0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
201193c: 7f ff f4 46 call 200ea54 <_TOD_Validate>
2011940: 90 10 00 19 mov %i1, %o0
2011944: 80 8a 20 ff btst 0xff, %o0
2011948: 12 80 00 04 bne 2011958 <rtems_timer_server_fire_when+0x58>
201194c: 01 00 00 00 nop
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
2011950: 81 c7 e0 08 ret
2011954: 91 e8 20 14 restore %g0, 0x14, %o0
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
2011958: 7f ff f4 0a call 200e980 <_TOD_To_seconds>
201195c: 90 10 00 19 mov %i1, %o0
if ( seconds <= _TOD_Seconds_since_epoch )
2011960: 25 00 80 c8 sethi %hi(0x2032000), %l2
2011964: c2 04 a3 24 ld [ %l2 + 0x324 ], %g1 ! 2032324 <_TOD_Now>
2011968: 80 a2 00 01 cmp %o0, %g1
201196c: 08 bf ff f9 bleu 2011950 <rtems_timer_server_fire_when+0x50>
2011970: a0 10 00 08 mov %o0, %l0
2011974: 11 00 80 ca sethi %hi(0x2032800), %o0
2011978: 92 10 00 11 mov %l1, %o1
201197c: 90 12 23 fc or %o0, 0x3fc, %o0
2011980: 40 00 0a 5e call 20142f8 <_Objects_Get>
2011984: 94 07 bf f4 add %fp, -12, %o2
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
2011988: c2 07 bf f4 ld [ %fp + -12 ], %g1
201198c: b2 10 00 08 mov %o0, %i1
2011990: 80 a0 60 00 cmp %g1, 0
2011994: 12 80 00 14 bne 20119e4 <rtems_timer_server_fire_when+0xe4>
2011998: b0 10 20 04 mov 4, %i0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
201199c: 40 00 13 64 call 201672c <_Watchdog_Remove>
20119a0: 90 02 20 10 add %o0, 0x10, %o0
the_watchdog->routine = routine;
the_watchdog->id = id;
20119a4: e2 26 60 30 st %l1, [ %i1 + 0x30 ]
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20119a8: c4 04 a3 24 ld [ %l2 + 0x324 ], %g2
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20119ac: 03 00 80 cb sethi %hi(0x2032c00), %g1
20119b0: c6 00 60 3c ld [ %g1 + 0x3c ], %g3 ! 2032c3c <_Timer_Server_schedule_operation>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20119b4: 84 24 00 02 sub %l0, %g2, %g2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
20119b8: 82 10 20 03 mov 3, %g1
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20119bc: 90 10 00 19 mov %i1, %o0
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch;
20119c0: c4 26 60 1c st %g2, [ %i1 + 0x1c ]
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
20119c4: c2 26 60 38 st %g1, [ %i1 + 0x38 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
20119c8: f4 26 60 2c st %i2, [ %i1 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
20119cc: f6 26 60 34 st %i3, [ %i1 + 0x34 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
20119d0: c0 26 60 18 clr [ %i1 + 0x18 ]
/*
* _Timer_Server_schedule_operation != NULL because we checked that
* _Timer_Server was != NULL above. Both are set at the same time.
*/
(*_Timer_Server_schedule_operation)( the_timer );
20119d4: 9f c0 c0 00 call %g3
20119d8: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
20119dc: 40 00 0c ca call 2014d04 <_Thread_Enable_dispatch>
20119e0: 01 00 00 00 nop
20119e4: 81 c7 e0 08 ret
20119e8: 81 e8 00 00 restore
02002e5c <rtems_verror>:
static int rtems_verror(
uint32_t error_flag,
const char *printf_format,
va_list arglist
)
{
2002e5c: 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)
2002e60: 03 08 00 00 sethi %hi(0x20000000), %g1 <== NOT EXECUTED
2002e64: a8 8e 00 01 andcc %i0, %g1, %l4 <== NOT EXECUTED
2002e68: 02 80 00 10 be 2002ea8 <rtems_verror+0x4c> <== NOT EXECUTED
2002e6c: a6 10 00 18 mov %i0, %l3 <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
2002e70: 07 00 80 92 sethi %hi(0x2024800), %g3 <== NOT EXECUTED
2002e74: c4 00 e3 7c ld [ %g3 + 0x37c ], %g2 ! 2024b7c <rtems_panic_in_progress><== NOT EXECUTED
2002e78: 82 00 a0 01 add %g2, 1, %g1 <== NOT EXECUTED
2002e7c: 80 a0 a0 00 cmp %g2, 0 <== NOT EXECUTED
2002e80: 02 80 00 06 be 2002e98 <rtems_verror+0x3c> <== NOT EXECUTED
2002e84: c2 20 e3 7c st %g1, [ %g3 + 0x37c ] <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
2002e88: 05 00 80 93 sethi %hi(0x2024c00), %g2 <== NOT EXECUTED
2002e8c: c2 00 a1 60 ld [ %g2 + 0x160 ], %g1 ! 2024d60 <_Thread_Dispatch_disable_level><== NOT EXECUTED
2002e90: 82 00 60 01 inc %g1 <== NOT EXECUTED
2002e94: c2 20 a1 60 st %g1, [ %g2 + 0x160 ] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
2002e98: c2 00 e3 7c ld [ %g3 + 0x37c ], %g1 <== NOT EXECUTED
2002e9c: 80 a0 60 02 cmp %g1, 2 <== NOT EXECUTED
2002ea0: 34 80 00 3b bg,a 2002f8c <rtems_verror+0x130> <== NOT EXECUTED
2002ea4: b0 10 20 00 clr %i0 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
2002ea8: 25 00 80 71 sethi %hi(0x201c400), %l2 <== NOT EXECUTED
2002eac: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 ! 201c6d8 <_impure_ptr><== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002eb0: 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 */
2002eb4: 40 00 33 24 call 200fb44 <fflush> <== NOT EXECUTED
2002eb8: d0 00 60 08 ld [ %g1 + 8 ], %o0 <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
2002ebc: 03 1c 00 00 sethi %hi(0x70000000), %g1 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
2002ec0: 05 10 00 00 sethi %hi(0x40000000), %g2 <== NOT EXECUTED
2002ec4: 80 8c c0 02 btst %l3, %g2 <== NOT EXECUTED
2002ec8: 12 80 00 42 bne 2002fd0 <rtems_verror+0x174> <== NOT EXECUTED
2002ecc: 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);
2002ed0: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
2002ed4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2002ed8: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002edc: 40 00 47 25 call 2014b70 <vfprintf> <== NOT EXECUTED
2002ee0: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (status)
2002ee4: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2002ee8: 12 80 00 2b bne 2002f94 <rtems_verror+0x138> <== NOT EXECUTED
2002eec: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
2002ef0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2002ef4: 02 80 00 12 be 2002f3c <rtems_verror+0xe0> <== NOT EXECUTED
2002ef8: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
2002efc: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2002f00: 04 80 00 08 ble 2002f20 <rtems_verror+0xc4> <== NOT EXECUTED
2002f04: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
2002f08: 40 00 38 63 call 2011094 <strerror> <== NOT EXECUTED
2002f0c: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2002f10: c2 4a 00 00 ldsb [ %o0 ], %g1 <== NOT EXECUTED
2002f14: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2002f18: 12 80 00 3b bne 2003004 <rtems_verror+0x1a8> <== NOT EXECUTED
2002f1c: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
2002f20: 13 00 80 69 sethi %hi(0x201a400), %o1 <== NOT EXECUTED
2002f24: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002f28: 92 12 60 08 or %o1, 8, %o1 <== NOT EXECUTED
2002f2c: 40 00 33 f9 call 200ff10 <fprintf> <== NOT EXECUTED
2002f30: 94 10 00 11 mov %l1, %o2 <== NOT EXECUTED
2002f34: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
2002f38: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
2002f3c: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED
2002f40: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002f44: 40 00 33 f3 call 200ff10 <fprintf> <== NOT EXECUTED
2002f48: 92 12 61 f8 or %o1, 0x1f8, %o1 <== NOT EXECUTED
(void) fflush(stderr);
2002f4c: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %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");
2002f50: a0 10 00 08 mov %o0, %l0 <== NOT EXECUTED
(void) fflush(stderr);
2002f54: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002f58: 40 00 32 fb call 200fb44 <fflush> <== NOT EXECUTED
2002f5c: b0 04 00 18 add %l0, %i0, %i0 <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
2002f60: 03 0c 00 00 sethi %hi(0x30000000), %g1 <== NOT EXECUTED
2002f64: 80 8c c0 01 btst %l3, %g1 <== NOT EXECUTED
2002f68: 02 80 00 09 be 2002f8c <rtems_verror+0x130> <== NOT EXECUTED
2002f6c: 80 a5 20 00 cmp %l4, 0 <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
2002f70: 02 80 00 2f be 200302c <rtems_verror+0x1d0> <== NOT EXECUTED
2002f74: 90 10 20 00 clr %o0 <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
2002f78: 13 00 80 69 sethi %hi(0x201a400), %o1 <== NOT EXECUTED
2002f7c: 40 00 00 3f call 2003078 <rtems_error> <== NOT EXECUTED
2002f80: 92 12 60 20 or %o1, 0x20, %o1 ! 201a420 <pollCallbacks.4788+0x438><== NOT EXECUTED
_exit(local_errno);
2002f84: 40 00 01 c7 call 20036a0 <_exit> <== NOT EXECUTED
2002f88: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
2002f8c: 81 c7 e0 08 ret <== NOT EXECUTED
2002f90: 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));
2002f94: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002f98: 92 10 00 10 mov %l0, %o1 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002f9c: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fa0: 11 00 80 69 sethi %hi(0x201a400), %o0 <== NOT EXECUTED
2002fa4: 40 00 25 c5 call 200c6b8 <rtems_assoc_name_by_local> <== NOT EXECUTED
2002fa8: 90 12 23 68 or %o0, 0x368, %o0 ! 201a768 <rtems_status_assoc><== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fac: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED
const char *
rtems_status_text(
rtems_status_code status
)
{
return rtems_assoc_name_by_local(rtems_status_assoc, status);
2002fb0: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002fb4: 92 12 63 e8 or %o1, 0x3e8, %o1 <== NOT EXECUTED
2002fb8: 40 00 33 d6 call 200ff10 <fprintf> <== NOT EXECUTED
2002fbc: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
if (local_errno)
2002fc0: 80 a4 60 00 cmp %l1, 0 <== NOT EXECUTED
2002fc4: 02 bf ff dd be 2002f38 <rtems_verror+0xdc> <== NOT EXECUTED
2002fc8: b0 06 00 08 add %i0, %o0, %i0 <== NOT EXECUTED
2002fcc: 30 bf ff cd b,a 2002f00 <rtems_verror+0xa4> <== 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;
2002fd0: 40 00 32 0c call 200f800 <__errno> <== NOT EXECUTED
2002fd4: 01 00 00 00 nop <== 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);
2002fd8: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== 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;
2002fdc: e2 02 00 00 ld [ %o0 ], %l1 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
2002fe0: d0 00 60 0c ld [ %g1 + 0xc ], %o0 <== NOT EXECUTED
2002fe4: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2002fe8: 40 00 46 e2 call 2014b70 <vfprintf> <== NOT EXECUTED
2002fec: 94 10 00 1a mov %i2, %o2 <== NOT EXECUTED
if (status)
2002ff0: 80 a4 20 00 cmp %l0, 0 <== NOT EXECUTED
2002ff4: 02 bf ff bf be 2002ef0 <rtems_verror+0x94> <== NOT EXECUTED
2002ff8: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
2002ffc: 10 bf ff e7 b 2002f98 <rtems_verror+0x13c> <== NOT EXECUTED
2003000: c2 04 a2 d8 ld [ %l2 + 0x2d8 ], %g1 <== NOT EXECUTED
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
2003004: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
2003008: 40 00 38 23 call 2011094 <strerror> <== NOT EXECUTED
200300c: e0 00 60 0c ld [ %g1 + 0xc ], %l0 <== NOT EXECUTED
2003010: 13 00 80 68 sethi %hi(0x201a000), %o1 <== NOT EXECUTED
2003014: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED
2003018: 92 12 63 f8 or %o1, 0x3f8, %o1 <== NOT EXECUTED
200301c: 40 00 33 bd call 200ff10 <fprintf> <== NOT EXECUTED
2003020: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2003024: 10 bf ff c5 b 2002f38 <rtems_verror+0xdc> <== NOT EXECUTED
2003028: 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");
200302c: 13 00 80 69 sethi %hi(0x201a400), %o1 <== NOT EXECUTED
2003030: 40 00 00 12 call 2003078 <rtems_error> <== NOT EXECUTED
2003034: 92 12 60 38 or %o1, 0x38, %o1 ! 201a438 <pollCallbacks.4788+0x450><== NOT EXECUTED
abort();
2003038: 40 00 31 e4 call 200f7c8 <abort> <== NOT EXECUTED
020066e8 <rtems_workspace_allocate>:
*/
bool rtems_workspace_allocate(
uintptr_t bytes,
void **pointer
)
{
20066e8: 9d e3 bf 98 save %sp, -104, %sp
void *ptr;
/*
* check the arguments
*/
if ( !pointer )
20066ec: 80 a6 60 00 cmp %i1, 0
20066f0: 02 80 00 05 be 2006704 <rtems_workspace_allocate+0x1c> <== NEVER TAKEN
20066f4: 92 10 00 18 mov %i0, %o1
return false;
if ( !bytes )
20066f8: 80 a6 20 00 cmp %i0, 0
20066fc: 12 80 00 04 bne 200670c <rtems_workspace_allocate+0x24> <== ALWAYS TAKEN
2006700: 11 00 80 73 sethi %hi(0x201cc00), %o0
if (!ptr)
return false;
*pointer = ptr;
return true;
}
2006704: 81 c7 e0 08 ret <== NOT EXECUTED
2006708: 91 e8 20 00 restore %g0, 0, %o0 <== NOT EXECUTED
return false;
/*
* Allocate the memory
*/
ptr = _Protected_heap_Allocate( &_Workspace_Area, (intptr_t) bytes );
200670c: 40 00 05 fd call 2007f00 <_Protected_heap_Allocate>
2006710: 90 12 22 c4 or %o0, 0x2c4, %o0
if (!ptr)
2006714: 80 a2 20 00 cmp %o0, 0
2006718: 02 bf ff fb be 2006704 <rtems_workspace_allocate+0x1c> <== NEVER TAKEN
200671c: 01 00 00 00 nop
return false;
*pointer = ptr;
2006720: d0 26 40 00 st %o0, [ %i1 ]
2006724: 81 c7 e0 08 ret
2006728: 91 e8 20 01 restore %g0, 1, %o0
020066cc <rtems_workspace_free>:
* _Workspace_Allocate
*/
bool rtems_workspace_free(
void *pointer
)
{
20066cc: 92 10 00 08 mov %o0, %o1 <== NOT EXECUTED
return _Protected_heap_Free( &_Workspace_Area, pointer );
20066d0: 11 00 80 73 sethi %hi(0x201cc00), %o0 <== NOT EXECUTED
20066d4: 90 12 22 c4 or %o0, 0x2c4, %o0 ! 201cec4 <_Workspace_Area><== NOT EXECUTED
20066d8: 82 13 c0 00 mov %o7, %g1 <== NOT EXECUTED
20066dc: 40 00 06 15 call 2007f30 <_Protected_heap_Free> <== NOT EXECUTED
20066e0: 9e 10 40 00 mov %g1, %o7 <== NOT EXECUTED
0200672c <rtems_workspace_get_information>:
bool rtems_workspace_get_information(
Heap_Information_block *the_info
)
{
if ( !the_info )
200672c: 80 a2 20 00 cmp %o0, 0
2006730: 02 80 00 07 be 200674c <rtems_workspace_get_information+0x20><== NEVER TAKEN
2006734: 92 10 00 08 mov %o0, %o1
return false;
return _Protected_heap_Get_information( &_Workspace_Area, the_info );
2006738: 11 00 80 73 sethi %hi(0x201cc00), %o0
200673c: 90 12 22 c4 or %o0, 0x2c4, %o0 ! 201cec4 <_Workspace_Area>
2006740: 82 13 c0 00 mov %o7, %g1
2006744: 40 00 06 07 call 2007f60 <_Protected_heap_Get_information>
2006748: 9e 10 40 00 mov %g1, %o7
}
200674c: 81 c3 e0 08 retl <== NOT EXECUTED
02005654 <scandir>:
scandir(
const char *dirname,
struct dirent ***namelist,
int (*select)(struct dirent *),
int (*dcomp)(const struct dirent **, const struct dirent **))
{
2005654: 9d e3 bf 48 save %sp, -184, %sp
struct stat stb;
long arraysz;
DIR *dirp = NULL;
int i;
if ((dirp = opendir(dirname)) == NULL)
2005658: 7f ff fd 47 call 2004b74 <opendir>
200565c: 90 10 00 18 mov %i0, %o0
2005660: a4 92 20 00 orcc %o0, 0, %l2
2005664: 02 80 00 4d be 2005798 <scandir+0x144> <== NEVER TAKEN
2005668: 92 10 3f ff mov -1, %o1
return(-1);
if (fstat(dirp->dd_fd, &stb) < 0)
200566c: d0 04 80 00 ld [ %l2 ], %o0
2005670: ac 07 bf a8 add %fp, -88, %l6
2005674: 40 00 1e da call 200d1dc <fstat>
2005678: 92 10 00 16 mov %l6, %o1
200567c: 80 a2 20 00 cmp %o0, 0
2005680: 06 80 00 56 bl 20057d8 <scandir+0x184> <== NEVER TAKEN
2005684: 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);
2005688: 40 00 3d 96 call 2014ce0 <.div>
200568c: 92 10 20 18 mov 0x18, %o1
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
2005690: 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);
2005694: a8 10 00 08 mov %o0, %l4
names = (struct dirent **)realloc((char *)names,
arraysz * sizeof(struct dirent *));
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
2005698: aa 10 20 01 mov 1, %l5
/*
* 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);
names = (struct dirent **)malloc(arraysz * sizeof(struct dirent *));
200569c: 7f ff fb 06 call 20042b4 <malloc>
20056a0: 91 2a 20 02 sll %o0, 2, %o0
if (names == NULL)
20056a4: a6 92 20 00 orcc %o0, 0, %l3
20056a8: 02 80 00 4c be 20057d8 <scandir+0x184>
20056ac: 01 00 00 00 nop
goto cleanup_and_bail;
while ((d = readdir(dirp)) != NULL) {
20056b0: 7f ff ff 4d call 20053e4 <readdir>
20056b4: 90 10 00 12 mov %l2, %o0
20056b8: a0 92 20 00 orcc %o0, 0, %l0
20056bc: 02 80 00 29 be 2005760 <scandir+0x10c>
20056c0: 80 a6 a0 00 cmp %i2, 0
if (select != NULL && !(*select)(d))
20056c4: 22 80 00 08 be,a 20056e4 <scandir+0x90> <== NEVER TAKEN
20056c8: d0 14 20 0a lduh [ %l0 + 0xa ], %o0 <== NOT EXECUTED
20056cc: 9f c6 80 00 call %i2
20056d0: 01 00 00 00 nop
20056d4: 80 a2 20 00 cmp %o0, 0
20056d8: 02 bf ff f6 be 20056b0 <scandir+0x5c>
20056dc: 01 00 00 00 nop
continue; /* just selected names */
/*
* Make a minimum size copy of the data
*/
p = (struct dirent *)malloc(DIRSIZ(d));
20056e0: d0 14 20 0a lduh [ %l0 + 0xa ], %o0
20056e4: 90 02 20 04 add %o0, 4, %o0
20056e8: 90 0a 3f fc and %o0, -4, %o0
20056ec: 7f ff fa f2 call 20042b4 <malloc>
20056f0: 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);
20056f4: 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));
20056f8: a2 10 00 08 mov %o0, %l1
if (p == NULL)
20056fc: 80 a4 60 00 cmp %l1, 0
2005700: 02 80 00 3b be 20057ec <scandir+0x198> <== NEVER TAKEN
2005704: 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;
2005708: 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;
200570c: c2 04 00 00 ld [ %l0 ], %g1
p->d_reclen = d->d_reclen;
2005710: 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);
2005714: 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;
2005718: c2 24 40 00 st %g1, [ %l1 ]
p->d_reclen = d->d_reclen;
200571c: c4 34 60 08 sth %g2, [ %l1 + 8 ]
p->d_namlen = d->d_namlen;
2005720: c6 34 60 0a sth %g3, [ %l1 + 0xa ]
strncpy(p->d_name, d->d_name, p->d_namlen + 1);
2005724: 95 32 a0 10 srl %o2, 0x10, %o2
2005728: 40 00 35 9e call 2012da0 <strncpy>
200572c: 94 02 a0 01 inc %o2
/*
* Check to make sure the array has space left and
* realloc the maximum size.
*/
if (++nitems >= arraysz) {
2005730: b0 06 20 01 inc %i0
2005734: 80 a6 00 14 cmp %i0, %l4
2005738: 3a 80 00 1a bcc,a 20057a0 <scandir+0x14c> <== NEVER TAKEN
200573c: 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;
2005740: 82 26 00 15 sub %i0, %l5, %g1
2005744: 83 28 60 02 sll %g1, 2, %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) {
2005748: 90 10 00 12 mov %l2, %o0
200574c: 7f ff ff 26 call 20053e4 <readdir>
2005750: e2 24 c0 01 st %l1, [ %l3 + %g1 ]
2005754: a0 92 20 00 orcc %o0, 0, %l0
2005758: 12 bf ff db bne 20056c4 <scandir+0x70>
200575c: 80 a6 a0 00 cmp %i2, 0
if (names == NULL)
goto cleanup_and_bail;
}
names[nitems-1] = p;
}
closedir(dirp);
2005760: 7f ff f7 84 call 2003570 <closedir>
2005764: 90 10 00 12 mov %l2, %o0
if (nitems && dcomp != NULL){
2005768: 80 a6 20 00 cmp %i0, 0
200576c: 22 80 00 0a be,a 2005794 <scandir+0x140> <== NEVER TAKEN
2005770: e6 26 40 00 st %l3, [ %i1 ] <== NOT EXECUTED
2005774: 80 a6 e0 00 cmp %i3, 0
2005778: 02 80 00 06 be 2005790 <scandir+0x13c>
200577c: 96 10 00 1b mov %i3, %o3
qsort(names, nitems, sizeof(struct dirent *),
2005780: 90 10 00 13 mov %l3, %o0
2005784: 92 10 00 18 mov %i0, %o1
2005788: 40 00 32 7e call 2012180 <qsort>
200578c: 94 10 20 04 mov 4, %o2
(int (*)(const void *, const void *)) dcomp);
}
*namelist = names;
2005790: e6 26 40 00 st %l3, [ %i1 ]
return(nitems);
2005794: 92 10 00 18 mov %i0, %o1
free( names[i] );
free( names );
}
return(-1);
}
2005798: 81 c7 e0 08 ret
200579c: 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)
20057a0: 40 00 1e 8f call 200d1dc <fstat> <== NOT EXECUTED
20057a4: 92 10 00 16 mov %l6, %o1 <== NOT EXECUTED
20057a8: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20057ac: 06 80 00 10 bl 20057ec <scandir+0x198> <== NOT EXECUTED
20057b0: 92 10 20 0c mov 0xc, %o1 <== NOT EXECUTED
goto cleanup_and_bail; /* just might have grown */
arraysz = stb.st_size / 12;
20057b4: 40 00 3d 4b call 2014ce0 <.div> <== NOT EXECUTED
20057b8: d0 07 bf c8 ld [ %fp + -56 ], %o0 <== NOT EXECUTED
20057bc: a8 10 00 08 mov %o0, %l4 <== NOT EXECUTED
names = (struct dirent **)realloc((char *)names,
20057c0: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
20057c4: 40 00 1f 57 call 200d520 <realloc> <== NOT EXECUTED
20057c8: 93 2d 20 02 sll %l4, 2, %o1 <== NOT EXECUTED
arraysz * sizeof(struct dirent *));
if (names == NULL)
20057cc: a6 92 20 00 orcc %o0, 0, %l3 <== NOT EXECUTED
20057d0: 12 bf ff dd bne 2005744 <scandir+0xf0> <== NOT EXECUTED
20057d4: 82 26 00 15 sub %i0, %l5, %g1 <== NOT EXECUTED
return(nitems);
cleanup_and_bail:
if ( dirp )
closedir( dirp );
20057d8: 7f ff f7 66 call 2003570 <closedir>
20057dc: 90 10 00 12 mov %l2, %o0
20057e0: 92 10 3f ff mov -1, %o1
free( names[i] );
free( names );
}
return(-1);
}
20057e4: 81 c7 e0 08 ret
20057e8: 91 e8 00 09 restore %g0, %o1, %o0
return(nitems);
cleanup_and_bail:
if ( dirp )
closedir( dirp );
20057ec: 7f ff f7 61 call 2003570 <closedir> <== NOT EXECUTED
20057f0: 90 10 00 12 mov %l2, %o0 <== NOT EXECUTED
if ( names ) {
for (i=0; i < nitems; i++ )
20057f4: 80 a6 20 00 cmp %i0, 0 <== NOT EXECUTED
20057f8: 02 80 00 0a be 2005820 <scandir+0x1cc> <== NOT EXECUTED
20057fc: 82 10 20 00 clr %g1 <== NOT EXECUTED
2005800: a0 10 20 00 clr %l0 <== NOT EXECUTED
free( names[i] );
2005804: 83 28 60 02 sll %g1, 2, %g1 <== NOT EXECUTED
2005808: d0 04 c0 01 ld [ %l3 + %g1 ], %o0 <== NOT EXECUTED
200580c: 7f ff f8 ce call 2003b44 <free> <== NOT EXECUTED
2005810: a0 04 20 01 inc %l0 <== NOT EXECUTED
if ( dirp )
closedir( dirp );
if ( names ) {
for (i=0; i < nitems; i++ )
2005814: 80 a6 00 10 cmp %i0, %l0 <== NOT EXECUTED
2005818: 18 bf ff fb bgu 2005804 <scandir+0x1b0> <== NOT EXECUTED
200581c: 82 10 00 10 mov %l0, %g1 <== NOT EXECUTED
free( names[i] );
free( names );
2005820: 7f ff f8 c9 call 2003b44 <free> <== NOT EXECUTED
2005824: 90 10 00 13 mov %l3, %o0 <== NOT EXECUTED
2005828: 10 bf ff dc b 2005798 <scandir+0x144> <== NOT EXECUTED
200582c: 92 10 3f ff mov -1, %o1 <== NOT EXECUTED
02006e50 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
2006e50: 9d e3 bf 98 save %sp, -104, %sp
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2006e54: 80 a6 20 00 cmp %i0, 0
2006e58: 12 80 00 0a bne 2006e80 <sched_rr_get_interval+0x30> <== ALWAYS TAKEN
2006e5c: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
2006e60: 02 80 00 13 be 2006eac <sched_rr_get_interval+0x5c>
2006e64: 03 00 80 71 sethi %hi(0x201c400), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
2006e68: d0 00 61 d8 ld [ %g1 + 0x1d8 ], %o0 ! 201c5d8 <_Thread_Ticks_per_timeslice>
2006e6c: 92 10 00 19 mov %i1, %o1
2006e70: 40 00 0f d0 call 200adb0 <_Timespec_From_ticks>
2006e74: b0 10 20 00 clr %i0
return 0;
}
2006e78: 81 c7 e0 08 ret
2006e7c: 81 e8 00 00 restore
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
2006e80: 7f ff f1 aa call 2003528 <getpid>
2006e84: 01 00 00 00 nop
2006e88: 80 a2 00 18 cmp %o0, %i0
2006e8c: 02 bf ff f5 be 2006e60 <sched_rr_get_interval+0x10>
2006e90: 80 a6 60 00 cmp %i1, 0
rtems_set_errno_and_return_minus_one( ESRCH );
2006e94: 40 00 22 d5 call 200f9e8 <__errno>
2006e98: b0 10 3f ff mov -1, %i0
2006e9c: 82 10 20 03 mov 3, %g1
2006ea0: c2 22 00 00 st %g1, [ %o0 ]
2006ea4: 81 c7 e0 08 ret
2006ea8: 81 e8 00 00 restore
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
2006eac: 40 00 22 cf call 200f9e8 <__errno>
2006eb0: b0 10 3f ff mov -1, %i0
2006eb4: 82 10 20 16 mov 0x16, %g1
2006eb8: c2 22 00 00 st %g1, [ %o0 ]
2006ebc: 81 c7 e0 08 ret
2006ec0: 81 e8 00 00 restore
02005830 <seekdir>:
void seekdir(
DIR *dirp,
long loc
)
{
2005830: 9d e3 bf 98 save %sp, -104, %sp
off_t status;
if ( !dirp )
2005834: 80 a6 20 00 cmp %i0, 0
2005838: 02 80 00 08 be 2005858 <seekdir+0x28>
200583c: 92 10 00 19 mov %i1, %o1
return;
status = lseek( dirp->dd_fd, loc, SEEK_SET );
2005840: d0 06 00 00 ld [ %i0 ], %o0
2005844: 7f ff f9 fc call 2004034 <lseek>
2005848: 94 10 20 00 clr %o2
/*
* This is not a nice way to error out, but we have no choice here.
*/
if ( status == -1 )
200584c: 80 a2 3f ff cmp %o0, -1
2005850: 32 80 00 02 bne,a 2005858 <seekdir+0x28> <== ALWAYS TAKEN
2005854: c0 26 20 04 clr [ %i0 + 4 ]
2005858: 81 c7 e0 08 ret
200585c: 81 e8 00 00 restore
02007edc <sem_destroy>:
*/
int sem_destroy(
sem_t *sem
)
{
2007edc: 9d e3 bf 90 save %sp, -112, %sp
2007ee0: d2 06 00 00 ld [ %i0 ], %o1
2007ee4: 11 00 80 7b sethi %hi(0x201ec00), %o0
2007ee8: 94 07 bf f4 add %fp, -12, %o2
2007eec: 40 00 09 78 call 200a4cc <_Objects_Get>
2007ef0: 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 ) {
2007ef4: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007ef8: 80 a0 60 00 cmp %g1, 0
2007efc: 22 80 00 08 be,a 2007f1c <sem_destroy+0x40>
2007f00: c2 0a 20 14 ldub [ %o0 + 0x14 ], %g1
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
2007f04: 40 00 25 9f call 2011580 <__errno>
2007f08: b0 10 3f ff mov -1, %i0
2007f0c: 82 10 20 16 mov 0x16, %g1
2007f10: c2 22 00 00 st %g1, [ %o0 ]
}
2007f14: 81 c7 e0 08 ret
2007f18: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
2007f1c: 80 a0 60 00 cmp %g1, 0
2007f20: 12 80 00 08 bne 2007f40 <sem_destroy+0x64> <== NEVER TAKEN
2007f24: 01 00 00 00 nop
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EINVAL );
}
_POSIX_Semaphore_Delete( the_semaphore );
2007f28: 40 00 1c b6 call 200f200 <_POSIX_Semaphore_Delete>
2007f2c: b0 10 20 00 clr %i0 ! 0 <PROM_START>
_Thread_Enable_dispatch();
2007f30: 40 00 0b bc call 200ae20 <_Thread_Enable_dispatch>
2007f34: 01 00 00 00 nop
2007f38: 81 c7 e0 08 ret
2007f3c: 81 e8 00 00 restore
/*
* Undefined operation on a named semaphore.
*/
if ( the_semaphore->named == TRUE ) {
_Thread_Enable_dispatch();
2007f40: 40 00 0b b8 call 200ae20 <_Thread_Enable_dispatch> <== NOT EXECUTED
2007f44: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
2007f48: 40 00 25 8e call 2011580 <__errno> <== NOT EXECUTED
2007f4c: 01 00 00 00 nop <== NOT EXECUTED
2007f50: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2007f54: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2007f58: 81 c7 e0 08 ret <== NOT EXECUTED
2007f5c: 81 e8 00 00 restore <== NOT EXECUTED
02007fb4 <sem_init>:
int sem_init(
sem_t *sem,
int pshared,
unsigned int value
)
{
2007fb4: 9d e3 bf 90 save %sp, -112, %sp
2007fb8: 92 10 00 19 mov %i1, %o1
int status;
POSIX_Semaphore_Control *the_semaphore;
if ( !sem )
2007fbc: 80 a6 20 00 cmp %i0, 0
2007fc0: 02 80 00 0c be 2007ff0 <sem_init+0x3c> <== NEVER TAKEN
2007fc4: 94 10 00 1a mov %i2, %o2
rtems_set_errno_and_return_minus_one( EINVAL );
status = _POSIX_Semaphore_Create_support(
2007fc8: 90 10 20 00 clr %o0
2007fcc: 40 00 1c 41 call 200f0d0 <_POSIX_Semaphore_Create_support>
2007fd0: 96 07 bf f4 add %fp, -12, %o3
pshared,
value,
&the_semaphore
);
if ( status != -1 )
2007fd4: 80 a2 3f ff cmp %o0, -1
2007fd8: 02 80 00 04 be 2007fe8 <sem_init+0x34>
2007fdc: c2 07 bf f4 ld [ %fp + -12 ], %g1
*sem = the_semaphore->Object.id;
2007fe0: c4 00 60 08 ld [ %g1 + 8 ], %g2
2007fe4: c4 26 00 00 st %g2, [ %i0 ]
return status;
}
2007fe8: 81 c7 e0 08 ret
2007fec: 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 );
2007ff0: 40 00 25 64 call 2011580 <__errno> <== NOT EXECUTED
2007ff4: 01 00 00 00 nop <== NOT EXECUTED
2007ff8: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2007ffc: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2008000: 10 bf ff fa b 2007fe8 <sem_init+0x34> <== NOT EXECUTED
2008004: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED
02008008 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
2008008: 9d e3 bf 88 save %sp, -120, %sp
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
200800c: 05 00 80 7a sethi %hi(0x201e800), %g2
2008010: c2 00 a2 a0 ld [ %g2 + 0x2a0 ], %g1 ! 201eaa0 <_Thread_Dispatch_disable_level>
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
2008014: f4 27 a0 4c st %i2, [ %fp + 0x4c ]
2008018: 82 00 60 01 inc %g1
200801c: f6 27 a0 50 st %i3, [ %fp + 0x50 ]
2008020: f8 27 a0 54 st %i4, [ %fp + 0x54 ]
2008024: fa 27 a0 58 st %i5, [ %fp + 0x58 ]
2008028: c2 20 a2 a0 st %g1, [ %g2 + 0x2a0 ]
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
200802c: ba 8e 62 00 andcc %i1, 0x200, %i5
2008030: 12 80 00 26 bne 20080c8 <sem_open+0xc0>
2008034: 82 07 a0 54 add %fp, 0x54, %g1
2008038: b8 10 20 00 clr %i4
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 );
200803c: 90 10 00 18 mov %i0, %o0
2008040: 40 00 1c 86 call 200f258 <_POSIX_Semaphore_Name_to_id>
2008044: 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 ) {
2008048: a0 92 20 00 orcc %o0, 0, %l0
200804c: 02 80 00 0e be 2008084 <sem_open+0x7c>
2008050: 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) ) ) {
2008054: 80 a4 20 02 cmp %l0, 2
2008058: 12 80 00 04 bne 2008068 <sem_open+0x60> <== NEVER TAKEN
200805c: 80 a7 60 00 cmp %i5, 0
2008060: 12 80 00 25 bne 20080f4 <sem_open+0xec>
2008064: 94 10 00 1c mov %i4, %o2
_Thread_Enable_dispatch();
2008068: 40 00 0b 6e call 200ae20 <_Thread_Enable_dispatch>
200806c: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
2008070: 40 00 25 44 call 2011580 <__errno>
2008074: 01 00 00 00 nop
2008078: e0 22 00 00 st %l0, [ %o0 ]
200807c: 81 c7 e0 08 ret
2008080: 81 e8 00 00 restore
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
2008084: 80 a0 6a 00 cmp %g1, 0xa00
2008088: 02 80 00 13 be 20080d4 <sem_open+0xcc>
200808c: d2 07 bf f0 ld [ %fp + -16 ], %o1
2008090: 94 07 bf e8 add %fp, -24, %o2
2008094: 11 00 80 7b sethi %hi(0x201ec00), %o0
2008098: 40 00 09 0d call 200a4cc <_Objects_Get>
200809c: 90 12 21 b0 or %o0, 0x1b0, %o0 ! 201edb0 <_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;
20080a0: c2 02 20 18 ld [ %o0 + 0x18 ], %g1
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
20080a4: d0 27 bf ec st %o0, [ %fp + -20 ]
the_semaphore->open_count += 1;
20080a8: 82 00 60 01 inc %g1
_Thread_Enable_dispatch();
20080ac: 40 00 0b 5d call 200ae20 <_Thread_Enable_dispatch>
20080b0: c2 22 20 18 st %g1, [ %o0 + 0x18 ]
_Thread_Enable_dispatch();
20080b4: 40 00 0b 5b call 200ae20 <_Thread_Enable_dispatch>
20080b8: 01 00 00 00 nop
id = &the_semaphore->Object.id;
return (sem_t *)id;
20080bc: c2 07 bf ec ld [ %fp + -20 ], %g1
20080c0: 81 c7 e0 08 ret
20080c4: 91 e8 60 08 restore %g1, 8, %o0
_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 );
20080c8: f8 07 a0 50 ld [ %fp + 0x50 ], %i4
20080cc: 10 bf ff dc b 200803c <sem_open+0x34>
20080d0: c2 27 bf f4 st %g1, [ %fp + -12 ]
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
20080d4: 40 00 0b 53 call 200ae20 <_Thread_Enable_dispatch>
20080d8: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
20080dc: 40 00 25 29 call 2011580 <__errno>
20080e0: 01 00 00 00 nop
20080e4: 82 10 20 11 mov 0x11, %g1 ! 11 <PROM_START+0x11>
20080e8: c2 22 00 00 st %g1, [ %o0 ]
20080ec: 81 c7 e0 08 ret
20080f0: 81 e8 00 00 restore
/*
* 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(
20080f4: 90 10 00 18 mov %i0, %o0
20080f8: 92 10 20 00 clr %o1
20080fc: 40 00 1b f5 call 200f0d0 <_POSIX_Semaphore_Create_support>
2008100: 96 07 bf ec add %fp, -20, %o3
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
2008104: 40 00 0b 47 call 200ae20 <_Thread_Enable_dispatch>
2008108: a0 10 00 08 mov %o0, %l0
if ( status == -1 )
200810c: 80 a4 3f ff cmp %l0, -1
2008110: 02 bf ff db be 200807c <sem_open+0x74> <== NEVER TAKEN
2008114: b0 10 3f ff mov -1, %i0
return SEM_FAILED;
id = &the_semaphore->Object.id;
return (sem_t *)id;
2008118: c2 07 bf ec ld [ %fp + -20 ], %g1
200811c: b0 00 60 08 add %g1, 8, %i0
}
2008120: 81 c7 e0 08 ret
2008124: 81 e8 00 00 restore
02008184 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
2008184: 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 );
2008188: 90 10 00 19 mov %i1, %o0
200818c: 40 00 19 5c call 200e6fc <_POSIX_Absolute_timeout_to_ticks>
2008190: 92 07 bf f4 add %fp, -12, %o1
switch ( status ) {
2008194: 80 a2 20 02 cmp %o0, 2
2008198: 08 80 00 07 bleu 20081b4 <sem_timedwait+0x30> <== NEVER TAKEN
200819c: 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 );
20081a0: 90 10 00 18 mov %i0, %o0
20081a4: 40 00 1c 4b call 200f2d0 <_POSIX_Semaphore_Wait_support>
20081a8: 92 10 20 01 mov 1, %o1
break;
}
}
return lock_status;
}
20081ac: 81 c7 e0 08 ret
20081b0: 91 e8 00 08 restore %g0, %o0, %o0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
do_wait = true;
break;
}
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
20081b4: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20081b8: 40 00 1c 46 call 200f2d0 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
20081bc: 92 10 20 00 clr %o1 <== NOT EXECUTED
break;
}
}
return lock_status;
}
20081c0: 81 c7 e0 08 ret <== NOT EXECUTED
20081c4: 91 e8 00 08 restore %g0, %o0, %o0 <== NOT EXECUTED
020081e0 <sem_unlink>:
*/
int sem_unlink(
const char *name
)
{
20081e0: 9d e3 bf 90 save %sp, -112, %sp
20081e4: 03 00 80 7a sethi %hi(0x201e800), %g1
20081e8: c4 00 62 a0 ld [ %g1 + 0x2a0 ], %g2 ! 201eaa0 <_Thread_Dispatch_disable_level>
20081ec: 90 10 00 18 mov %i0, %o0
20081f0: 84 00 a0 01 inc %g2
20081f4: c4 20 62 a0 st %g2, [ %g1 + 0x2a0 ]
register POSIX_Semaphore_Control *the_semaphore;
sem_t the_semaphore_id;
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
20081f8: 40 00 1c 18 call 200f258 <_POSIX_Semaphore_Name_to_id>
20081fc: 92 07 bf f4 add %fp, -12, %o1
if ( status != 0 ) {
2008200: b0 92 20 00 orcc %o0, 0, %i0
2008204: 12 80 00 19 bne 2008268 <sem_unlink+0x88>
2008208: 11 00 80 7b sethi %hi(0x201ec00), %o0
RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
Objects_Information *information,
uint16_t index
)
{
if ( index > information->maximum )
200820c: c6 07 bf f4 ld [ %fp + -12 ], %g3
2008210: 88 12 21 b0 or %o0, 0x1b0, %g4
2008214: c2 11 20 10 lduh [ %g4 + 0x10 ], %g1
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_semaphore = (POSIX_Semaphore_Control *) _Objects_Get_local_object(
2008218: 05 00 00 3f sethi %hi(0xfc00), %g2
200821c: 84 10 a3 ff or %g2, 0x3ff, %g2 ! ffff <PROM_START+0xffff>
2008220: 86 08 c0 02 and %g3, %g2, %g3
2008224: 80 a0 c0 01 cmp %g3, %g1
2008228: 18 80 00 05 bgu 200823c <sem_unlink+0x5c> <== NEVER TAKEN
200822c: b0 10 20 00 clr %i0
2008230: c4 01 20 1c ld [ %g4 + 0x1c ], %g2
2008234: 83 28 e0 02 sll %g3, 2, %g1
2008238: f0 00 80 01 ld [ %g2 + %g1 ], %i0
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Namespace_remove(
200823c: 92 10 00 18 mov %i0, %o1
&_POSIX_Semaphore_Information,
_Objects_Get_index( the_semaphore_id )
);
the_semaphore->linked = FALSE;
2008240: c0 2e 20 15 clrb [ %i0 + 0x15 ]
2008244: 40 00 08 f4 call 200a614 <_Objects_Namespace_remove>
2008248: 90 12 21 b0 or %o0, 0x1b0, %o0
_POSIX_Semaphore_Namespace_remove( the_semaphore );
_POSIX_Semaphore_Delete( the_semaphore );
200824c: 90 10 00 18 mov %i0, %o0
2008250: 40 00 1b ec call 200f200 <_POSIX_Semaphore_Delete>
2008254: b0 10 20 00 clr %i0
_Thread_Enable_dispatch();
2008258: 40 00 0a f2 call 200ae20 <_Thread_Enable_dispatch>
200825c: 01 00 00 00 nop
return 0;
}
2008260: 81 c7 e0 08 ret
2008264: 81 e8 00 00 restore
_Thread_Disable_dispatch();
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
2008268: 40 00 0a ee call 200ae20 <_Thread_Enable_dispatch>
200826c: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( status );
2008270: 40 00 24 c4 call 2011580 <__errno>
2008274: 01 00 00 00 nop
2008278: f0 22 00 00 st %i0, [ %o0 ]
200827c: 81 c7 e0 08 ret
2008280: 91 e8 3f ff restore %g0, -1, %o0
02005f54 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
2005f54: 9d e3 bf 98 save %sp, -104, %sp
ISR_Level level;
if ( oact )
2005f58: 80 a6 a0 00 cmp %i2, 0
2005f5c: 02 80 00 0e be 2005f94 <sigaction+0x40>
2005f60: a0 10 00 18 mov %i0, %l0
*oact = _POSIX_signals_Vectors[ sig ];
2005f64: 87 2e 20 02 sll %i0, 2, %g3
2005f68: 05 00 80 6e sethi %hi(0x201b800), %g2
2005f6c: 83 2e 20 04 sll %i0, 4, %g1
2005f70: 84 10 a0 a0 or %g2, 0xa0, %g2
2005f74: 82 20 40 03 sub %g1, %g3, %g1
2005f78: c8 00 80 01 ld [ %g2 + %g1 ], %g4
2005f7c: 84 00 80 01 add %g2, %g1, %g2
2005f80: c8 26 80 00 st %g4, [ %i2 ]
2005f84: c2 00 a0 04 ld [ %g2 + 4 ], %g1
2005f88: c2 26 a0 04 st %g1, [ %i2 + 4 ]
2005f8c: c6 00 a0 08 ld [ %g2 + 8 ], %g3
2005f90: c6 26 a0 08 st %g3, [ %i2 + 8 ]
if ( !sig )
2005f94: 80 a4 20 00 cmp %l0, 0
2005f98: 02 80 00 33 be 2006064 <sigaction+0x110>
2005f9c: b4 04 3f ff add %l0, -1, %i2
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
2005fa0: 80 a6 a0 1f cmp %i2, 0x1f
2005fa4: 18 80 00 30 bgu 2006064 <sigaction+0x110>
2005fa8: 80 a4 20 09 cmp %l0, 9
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
2005fac: 02 80 00 2e be 2006064 <sigaction+0x110>
2005fb0: 80 a6 60 00 cmp %i1, 0
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
2005fb4: 02 80 00 1a be 200601c <sigaction+0xc8> <== NEVER TAKEN
2005fb8: b0 10 20 00 clr %i0
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
2005fbc: 7f ff f1 12 call 2002404 <sparc_disable_interrupts>
2005fc0: 01 00 00 00 nop
2005fc4: b0 10 00 08 mov %o0, %i0
if ( act->sa_handler == SIG_DFL ) {
2005fc8: c2 06 60 08 ld [ %i1 + 8 ], %g1
2005fcc: 80 a0 60 00 cmp %g1, 0
2005fd0: 02 80 00 15 be 2006024 <sigaction+0xd0>
2005fd4: 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) );
2005fd8: 40 00 1a ab call 200ca84 <_POSIX_signals_Clear_process_signals>
2005fdc: 91 2a 00 1a sll %o0, %i2, %o0
_POSIX_signals_Vectors[ sig ] = *act;
2005fe0: da 06 40 00 ld [ %i1 ], %o5
2005fe4: 85 2c 20 02 sll %l0, 2, %g2
2005fe8: 87 2c 20 04 sll %l0, 4, %g3
2005fec: 03 00 80 6e sethi %hi(0x201b800), %g1
2005ff0: 86 20 c0 02 sub %g3, %g2, %g3
2005ff4: 82 10 60 a0 or %g1, 0xa0, %g1
2005ff8: da 20 40 03 st %o5, [ %g1 + %g3 ]
2005ffc: c8 06 60 04 ld [ %i1 + 4 ], %g4
2006000: 82 00 40 03 add %g1, %g3, %g1
2006004: c8 20 60 04 st %g4, [ %g1 + 4 ]
2006008: c4 06 60 08 ld [ %i1 + 8 ], %g2
200600c: c4 20 60 08 st %g2, [ %g1 + 8 ]
}
_ISR_Enable( level );
2006010: 90 10 00 18 mov %i0, %o0
2006014: 7f ff f1 00 call 2002414 <sparc_enable_interrupts>
2006018: b0 10 20 00 clr %i0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
200601c: 81 c7 e0 08 ret
2006020: 81 e8 00 00 restore
* 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 ];
2006024: 85 2c 20 02 sll %l0, 2, %g2
2006028: 87 2c 20 04 sll %l0, 4, %g3
200602c: 03 00 80 66 sethi %hi(0x2019800), %g1
2006030: 86 20 c0 02 sub %g3, %g2, %g3
2006034: 82 10 61 08 or %g1, 0x108, %g1
2006038: c8 00 40 03 ld [ %g1 + %g3 ], %g4
200603c: 82 00 40 03 add %g1, %g3, %g1
2006040: da 00 60 08 ld [ %g1 + 8 ], %o5
2006044: d8 00 60 04 ld [ %g1 + 4 ], %o4
2006048: 05 00 80 6e sethi %hi(0x201b800), %g2
200604c: 84 10 a0 a0 or %g2, 0xa0, %g2 ! 201b8a0 <_POSIX_signals_Vectors>
2006050: c8 20 80 03 st %g4, [ %g2 + %g3 ]
2006054: 84 00 80 03 add %g2, %g3, %g2
2006058: da 20 a0 08 st %o5, [ %g2 + 8 ]
200605c: 10 bf ff ed b 2006010 <sigaction+0xbc>
2006060: d8 20 a0 04 st %o4, [ %g2 + 4 ]
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
2006064: 40 00 23 58 call 200edc4 <__errno>
2006068: b0 10 3f ff mov -1, %i0
200606c: 82 10 20 16 mov 0x16, %g1
2006070: c2 22 00 00 st %g1, [ %o0 ]
2006074: 81 c7 e0 08 ret
2006078: 81 e8 00 00 restore
020080e4 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
20080e4: 9d e3 bf 90 save %sp, -112, %sp
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
20080e8: 90 10 20 01 mov 1, %o0
20080ec: 92 10 00 18 mov %i0, %o1
20080f0: a0 07 bf f4 add %fp, -12, %l0
20080f4: 7f ff ff f1 call 20080b8 <sigprocmask>
20080f8: 94 10 00 10 mov %l0, %o2
(void) sigfillset( &all_signals );
20080fc: a2 07 bf f0 add %fp, -16, %l1
2008100: 7f ff ff b7 call 2007fdc <sigfillset>
2008104: 90 10 00 11 mov %l1, %o0
status = sigtimedwait( &all_signals, NULL, NULL );
2008108: 90 10 00 11 mov %l1, %o0
200810c: 92 10 20 00 clr %o1
2008110: 40 00 00 2e call 20081c8 <sigtimedwait>
2008114: 94 10 20 00 clr %o2
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
2008118: 92 10 00 10 mov %l0, %o1
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
(void) sigfillset( &all_signals );
status = sigtimedwait( &all_signals, NULL, NULL );
200811c: a2 10 00 08 mov %o0, %l1
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
2008120: 94 10 20 00 clr %o2
2008124: 7f ff ff e5 call 20080b8 <sigprocmask>
2008128: 90 10 20 00 clr %o0
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
200812c: 80 a4 7f ff cmp %l1, -1
2008130: 12 80 00 05 bne 2008144 <sigsuspend+0x60> <== ALWAYS TAKEN
2008134: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
2008138: b0 10 3f ff mov -1, %i0 ! ffffffff <RAM_END+0xfdbfffff> <== NOT EXECUTED
200813c: 81 c7 e0 08 ret <== NOT EXECUTED
2008140: 81 e8 00 00 restore <== NOT EXECUTED
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
2008144: 40 00 24 9f call 20113c0 <__errno>
2008148: b0 10 3f ff mov -1, %i0
200814c: 82 10 20 04 mov 4, %g1
2008150: c2 22 00 00 st %g1, [ %o0 ]
2008154: 81 c7 e0 08 ret
2008158: 81 e8 00 00 restore
02006410 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
2006410: 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 ) {
2006414: 80 a6 a0 00 cmp %i2, 0
2006418: 02 80 00 0c be 2006448 <sigtimedwait+0x38>
200641c: a4 10 20 00 clr %l2
if ( !_Timespec_Is_valid( timeout ) )
2006420: 40 00 0f 74 call 200a1f0 <_Timespec_Is_valid>
2006424: 90 10 00 1a mov %i2, %o0
2006428: 80 8a 20 ff btst 0xff, %o0
200642c: 02 80 00 62 be 20065b4 <sigtimedwait+0x1a4>
2006430: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
interval = _Timespec_To_ticks( timeout );
2006434: 40 00 0f 97 call 200a290 <_Timespec_To_ticks>
2006438: 90 10 00 1a mov %i2, %o0
if ( !interval )
200643c: a4 92 20 00 orcc %o0, 0, %l2
2006440: 02 80 00 5d be 20065b4 <sigtimedwait+0x1a4> <== NEVER TAKEN
2006444: 01 00 00 00 nop
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
2006448: 80 a6 60 00 cmp %i1, 0
200644c: 02 80 00 03 be 2006458 <sigtimedwait+0x48>
2006450: b4 07 bf ec add %fp, -20, %i2
2006454: b4 10 00 19 mov %i1, %i2
the_thread = _Thread_Executing;
2006458: 27 00 80 6e sethi %hi(0x201b800), %l3
200645c: f2 04 e3 d4 ld [ %l3 + 0x3d4 ], %i1 ! 201bbd4 <_Thread_Executing>
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
2006460: 7f ff f0 b8 call 2002740 <sparc_disable_interrupts>
2006464: e2 06 61 6c ld [ %i1 + 0x16c ], %l1
2006468: a0 10 00 08 mov %o0, %l0
if ( *set & api->signals_pending ) {
200646c: c4 06 00 00 ld [ %i0 ], %g2
2006470: c2 04 60 c8 ld [ %l1 + 0xc8 ], %g1
2006474: 80 88 80 01 btst %g2, %g1
2006478: 12 80 00 3e bne 2006570 <sigtimedwait+0x160>
200647c: 01 00 00 00 nop
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
2006480: 03 00 80 70 sethi %hi(0x201c000), %g1
2006484: c2 00 62 ac ld [ %g1 + 0x2ac ], %g1 ! 201c2ac <_POSIX_signals_Pending>
2006488: 80 88 80 01 btst %g2, %g1
200648c: 12 80 00 28 bne 200652c <sigtimedwait+0x11c>
2006490: 07 00 80 6e sethi %hi(0x201b800), %g3
2006494: c2 00 e3 10 ld [ %g3 + 0x310 ], %g1 ! 201bb10 <_Thread_Dispatch_disable_level>
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
return signo;
}
the_info->si_signo = -1;
2006498: 84 10 3f ff mov -1, %g2
200649c: 82 00 60 01 inc %g1
20064a0: c4 26 80 00 st %g2, [ %i2 ]
20064a4: c2 20 e3 10 st %g1, [ %g3 + 0x310 ]
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
20064a8: 82 10 20 04 mov 4, %g1
20064ac: c2 26 60 34 st %g1, [ %i1 + 0x34 ]
the_thread->Wait.option = *set;
20064b0: 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_BLOCKING_OPERATION_NOTHING_HAPPENED;
20064b4: 82 10 20 01 mov 1, %g1
the_thread->Wait.return_argument = the_info;
20064b8: f4 26 60 28 st %i2, [ %i1 + 0x28 ]
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
20064bc: c4 26 60 30 st %g2, [ %i1 + 0x30 ]
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
20064c0: 21 00 80 70 sethi %hi(0x201c000), %l0
20064c4: a0 14 22 6c or %l0, 0x26c, %l0 ! 201c26c <_POSIX_signals_Wait_queue>
20064c8: e0 26 60 44 st %l0, [ %i1 + 0x44 ]
20064cc: 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 );
20064d0: 7f ff f0 a0 call 2002750 <sparc_enable_interrupts>
20064d4: 01 00 00 00 nop
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
20064d8: 90 10 00 10 mov %l0, %o0
20064dc: 92 10 00 12 mov %l2, %o1
20064e0: 15 00 80 27 sethi %hi(0x2009c00), %o2
20064e4: 40 00 0c ba call 20097cc <_Thread_queue_Enqueue_with_handler>
20064e8: 94 12 a0 24 or %o2, 0x24, %o2 ! 2009c24 <_Thread_queue_Timeout>
_Thread_Enable_dispatch();
20064ec: 40 00 0b 5a call 2009254 <_Thread_Enable_dispatch>
20064f0: 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 );
20064f4: d2 06 80 00 ld [ %i2 ], %o1
20064f8: 94 10 00 1a mov %i2, %o2
20064fc: 96 10 20 00 clr %o3
2006500: 98 10 20 00 clr %o4
2006504: 40 00 1b 49 call 200d228 <_POSIX_signals_Clear_signals>
2006508: 90 10 00 11 mov %l1, %o0
errno = _Thread_Executing->Wait.return_code;
200650c: 40 00 23 f8 call 200f4ec <__errno>
2006510: 01 00 00 00 nop
2006514: c2 04 e3 d4 ld [ %l3 + 0x3d4 ], %g1
2006518: c4 00 60 34 ld [ %g1 + 0x34 ], %g2
200651c: c4 22 00 00 st %g2, [ %o0 ]
return the_info->si_signo;
2006520: f0 06 80 00 ld [ %i2 ], %i0
}
2006524: 81 c7 e0 08 ret
2006528: 81 e8 00 00 restore
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
200652c: 7f ff ff 9e call 20063a4 <_POSIX_signals_Get_highest>
2006530: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
2006534: 94 10 00 1a mov %i2, %o2
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
2006538: b0 10 00 08 mov %o0, %i0
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
200653c: 96 10 20 01 mov 1, %o3
2006540: 90 10 00 11 mov %l1, %o0
2006544: 92 10 00 18 mov %i0, %o1
2006548: 40 00 1b 38 call 200d228 <_POSIX_signals_Clear_signals>
200654c: 98 10 20 00 clr %o4
_ISR_Enable( level );
2006550: 7f ff f0 80 call 2002750 <sparc_enable_interrupts>
2006554: 90 10 00 10 mov %l0, %o0
the_info->si_signo = signo;
the_info->si_code = SI_USER;
2006558: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
200655c: c0 26 a0 08 clr [ %i2 + 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;
2006560: f0 26 80 00 st %i0, [ %i2 ]
the_info->si_code = SI_USER;
2006564: c2 26 a0 04 st %g1, [ %i2 + 4 ]
2006568: 81 c7 e0 08 ret
200656c: 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 );
2006570: 7f ff ff 8d call 20063a4 <_POSIX_signals_Get_highest>
2006574: 90 10 00 01 mov %g1, %o0
_POSIX_signals_Clear_signals(
2006578: 94 10 00 1a mov %i2, %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 );
200657c: 92 10 00 08 mov %o0, %o1
_POSIX_signals_Clear_signals(
2006580: 96 10 20 00 clr %o3
2006584: 90 10 00 11 mov %l1, %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 );
2006588: d2 26 80 00 st %o1, [ %i2 ]
_POSIX_signals_Clear_signals(
200658c: 40 00 1b 27 call 200d228 <_POSIX_signals_Clear_signals>
2006590: 98 10 20 00 clr %o4
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
2006594: 7f ff f0 6f call 2002750 <sparc_enable_interrupts>
2006598: 90 10 00 10 mov %l0, %o0
the_info->si_code = SI_USER;
200659c: 82 10 20 01 mov 1, %g1
the_info->si_value.sival_int = 0;
20065a0: c0 26 a0 08 clr [ %i2 + 8 ]
return the_info->si_signo;
20065a4: f0 06 80 00 ld [ %i2 ], %i0
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
20065a8: c2 26 a0 04 st %g1, [ %i2 + 4 ]
20065ac: 81 c7 e0 08 ret
20065b0: 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 );
20065b4: 40 00 23 ce call 200f4ec <__errno>
20065b8: b0 10 3f ff mov -1, %i0
20065bc: 82 10 20 16 mov 0x16, %g1
20065c0: c2 22 00 00 st %g1, [ %o0 ]
20065c4: 81 c7 e0 08 ret
20065c8: 81 e8 00 00 restore
02008398 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
2008398: 9d e3 bf 98 save %sp, -104, %sp
int status;
status = sigtimedwait( set, NULL, NULL );
200839c: 92 10 20 00 clr %o1
20083a0: 90 10 00 18 mov %i0, %o0
20083a4: 7f ff ff 89 call 20081c8 <sigtimedwait>
20083a8: 94 10 20 00 clr %o2
if ( status != -1 ) {
20083ac: 80 a2 3f ff cmp %o0, -1
20083b0: 02 80 00 07 be 20083cc <sigwait+0x34> <== NEVER TAKEN
20083b4: 80 a6 60 00 cmp %i1, 0
if ( sig )
20083b8: 02 80 00 03 be 20083c4 <sigwait+0x2c> <== NEVER TAKEN
20083bc: b0 10 20 00 clr %i0
*sig = status;
20083c0: d0 26 40 00 st %o0, [ %i1 ]
20083c4: 81 c7 e0 08 ret
20083c8: 81 e8 00 00 restore
return 0;
}
return errno;
20083cc: 40 00 23 fd call 20113c0 <__errno> <== NOT EXECUTED
20083d0: 01 00 00 00 nop <== NOT EXECUTED
20083d4: f0 02 00 00 ld [ %o0 ], %i0 <== NOT EXECUTED
}
20083d8: 81 c7 e0 08 ret <== NOT EXECUTED
20083dc: 81 e8 00 00 restore <== NOT EXECUTED
02003d98 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
2003d98: 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)) {
2003d9c: c2 06 60 3c ld [ %i1 + 0x3c ], %g1 <== NOT EXECUTED
2003da0: 80 88 6e 78 btst 0xe78, %g1 <== NOT EXECUTED
2003da4: 32 80 00 05 bne,a 2003db8 <siproc+0x20> <== NOT EXECUTED
2003da8: 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);
2003dac: b0 0e 20 ff and %i0, 0xff, %i0 <== NOT EXECUTED
2003db0: 7f ff ff 7d call 2003ba4 <iproc> <== NOT EXECUTED
2003db4: 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);
2003db8: 94 10 20 00 clr %o2 <== NOT EXECUTED
2003dbc: 40 00 06 a9 call 2005860 <rtems_semaphore_obtain> <== NOT EXECUTED
2003dc0: 92 10 20 00 clr %o1 <== NOT EXECUTED
i = iproc (c, tty);
2003dc4: 90 0e 20 ff and %i0, 0xff, %o0 <== NOT EXECUTED
2003dc8: 7f ff ff 77 call 2003ba4 <iproc> <== NOT EXECUTED
2003dcc: 92 10 00 19 mov %i1, %o1 <== NOT EXECUTED
2003dd0: b0 10 00 08 mov %o0, %i0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
2003dd4: 40 00 06 eb call 2005980 <rtems_semaphore_release> <== NOT EXECUTED
2003dd8: d0 06 60 18 ld [ %i1 + 0x18 ], %o0 <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
2003ddc: 81 c7 e0 08 ret <== NOT EXECUTED
2003de0: 81 e8 00 00 restore <== NOT EXECUTED
02004d10 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2004d10: 9d e3 bf 88 save %sp, -120, %sp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2004d14: 80 a6 60 00 cmp %i1, 0
2004d18: 02 80 00 32 be 2004de0 <stat+0xd0>
2004d1c: 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 );
2004d20: a0 07 bf e8 add %fp, -24, %l0
2004d24: 92 10 20 00 clr %o1
2004d28: 94 10 00 10 mov %l0, %o2
2004d2c: 96 10 20 01 mov 1, %o3
2004d30: 7f ff f8 aa call 2002fd8 <rtems_filesystem_evaluate_path>
2004d34: b0 10 3f ff mov -1, %i0
if ( status != 0 )
2004d38: 80 a2 20 00 cmp %o0, 0
2004d3c: 12 80 00 27 bne 2004dd8 <stat+0xc8>
2004d40: c4 07 bf ec ld [ %fp + -20 ], %g2
return -1;
if ( !loc.handlers->fstat_h ){
2004d44: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1
2004d48: 80 a0 60 00 cmp %g1, 0
2004d4c: 02 80 00 2b be 2004df8 <stat+0xe8> <== NEVER TAKEN
2004d50: 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) );
2004d54: c0 26 40 00 clr [ %i1 ]
2004d58: c0 26 60 04 clr [ %i1 + 4 ]
2004d5c: c0 26 60 08 clr [ %i1 + 8 ]
2004d60: c0 26 60 0c clr [ %i1 + 0xc ]
2004d64: c0 26 60 10 clr [ %i1 + 0x10 ]
2004d68: c0 26 60 14 clr [ %i1 + 0x14 ]
2004d6c: c0 26 60 18 clr [ %i1 + 0x18 ]
2004d70: c0 26 60 1c clr [ %i1 + 0x1c ]
2004d74: c0 26 60 20 clr [ %i1 + 0x20 ]
2004d78: c0 26 60 24 clr [ %i1 + 0x24 ]
2004d7c: c0 26 60 28 clr [ %i1 + 0x28 ]
2004d80: c0 26 60 2c clr [ %i1 + 0x2c ]
2004d84: c0 26 60 30 clr [ %i1 + 0x30 ]
2004d88: c0 26 60 34 clr [ %i1 + 0x34 ]
2004d8c: c0 26 60 38 clr [ %i1 + 0x38 ]
2004d90: c0 26 60 3c clr [ %i1 + 0x3c ]
2004d94: c0 26 60 40 clr [ %i1 + 0x40 ]
2004d98: c0 26 60 44 clr [ %i1 + 0x44 ]
2004d9c: c0 26 60 48 clr [ %i1 + 0x48 ]
2004da0: c0 26 60 4c clr [ %i1 + 0x4c ]
status = (*loc.handlers->fstat_h)( &loc, buf );
2004da4: c2 00 a0 18 ld [ %g2 + 0x18 ], %g1
2004da8: 9f c0 40 00 call %g1
2004dac: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
2004db0: c2 07 bf f0 ld [ %fp + -16 ], %g1
2004db4: 80 a0 60 00 cmp %g1, 0
2004db8: 02 80 00 08 be 2004dd8 <stat+0xc8> <== NEVER TAKEN
2004dbc: b0 10 00 08 mov %o0, %i0
2004dc0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2004dc4: 80 a0 60 00 cmp %g1, 0
2004dc8: 02 80 00 1a be 2004e30 <stat+0x120> <== NEVER TAKEN
2004dcc: 01 00 00 00 nop
2004dd0: 9f c0 40 00 call %g1
2004dd4: 90 10 00 10 mov %l0, %o0
return status;
}
2004dd8: 81 c7 e0 08 ret
2004ddc: 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 );
2004de0: 40 00 2d e3 call 201056c <__errno>
2004de4: b0 10 3f ff mov -1, %i0
2004de8: 82 10 20 0e mov 0xe, %g1
2004dec: c2 22 00 00 st %g1, [ %o0 ]
2004df0: 81 c7 e0 08 ret
2004df4: 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 );
2004df8: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
2004dfc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004e00: 02 80 00 08 be 2004e20 <stat+0x110> <== NOT EXECUTED
2004e04: 01 00 00 00 nop <== NOT EXECUTED
2004e08: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
2004e0c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2004e10: 02 80 00 04 be 2004e20 <stat+0x110> <== NOT EXECUTED
2004e14: 01 00 00 00 nop <== NOT EXECUTED
2004e18: 9f c0 40 00 call %g1 <== NOT EXECUTED
2004e1c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2004e20: 40 00 2d d3 call 201056c <__errno> <== NOT EXECUTED
2004e24: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2004e28: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2004e2c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2004e30: 81 c7 e0 08 ret <== NOT EXECUTED
2004e34: 81 e8 00 00 restore <== NOT EXECUTED
02005284 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
2005284: 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 );
2005288: c2 4e 40 00 ldsb [ %i1 ], %g1
200528c: 80 a0 60 2f cmp %g1, 0x2f
2005290: 02 80 00 07 be 20052ac <symlink+0x28>
2005294: a0 10 00 18 mov %i0, %l0
2005298: 80 a0 60 5c cmp %g1, 0x5c
200529c: 02 80 00 04 be 20052ac <symlink+0x28> <== NEVER TAKEN
20052a0: 80 a0 60 00 cmp %g1, 0
20052a4: 12 80 00 2b bne 2005350 <symlink+0xcc> <== ALWAYS TAKEN
20052a8: 03 00 80 63 sethi %hi(0x2018c00), %g1
20052ac: 03 00 80 63 sethi %hi(0x2018c00), %g1
20052b0: c6 00 60 bc ld [ %g1 + 0xbc ], %g3 ! 2018cbc <rtems_current_user_env>
20052b4: 88 10 20 01 mov 1, %g4
20052b8: c2 00 e0 14 ld [ %g3 + 0x14 ], %g1
20052bc: c2 27 bf e4 st %g1, [ %fp + -28 ]
20052c0: c4 00 e0 18 ld [ %g3 + 0x18 ], %g2
20052c4: c4 27 bf e8 st %g2, [ %fp + -24 ]
20052c8: c2 00 e0 1c ld [ %g3 + 0x1c ], %g1
20052cc: c2 27 bf ec st %g1, [ %fp + -20 ]
20052d0: c4 00 e0 20 ld [ %g3 + 0x20 ], %g2
20052d4: c4 27 bf f0 st %g2, [ %fp + -16 ]
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
20052d8: c2 07 bf ec ld [ %fp + -20 ], %g1
20052dc: 90 06 40 04 add %i1, %g4, %o0
20052e0: c4 00 60 04 ld [ %g1 + 4 ], %g2
20052e4: b2 07 bf e4 add %fp, -28, %i1
20052e8: 94 07 bf f4 add %fp, -12, %o2
20052ec: 92 10 00 19 mov %i1, %o1
20052f0: 9f c0 80 00 call %g2
20052f4: b0 10 3f ff mov -1, %i0
if ( result != 0 )
20052f8: 80 a2 20 00 cmp %o0, 0
20052fc: 12 80 00 13 bne 2005348 <symlink+0xc4>
2005300: c4 07 bf ec ld [ %fp + -20 ], %g2
return -1;
if ( !loc.ops->symlink_h ) {
2005304: c2 00 a0 38 ld [ %g2 + 0x38 ], %g1
2005308: 80 a0 60 00 cmp %g1, 0
200530c: 02 80 00 1c be 200537c <symlink+0xf8> <== NEVER TAKEN
2005310: 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);
2005314: 92 10 00 10 mov %l0, %o1
2005318: 9f c0 40 00 call %g1
200531c: 90 10 00 19 mov %i1, %o0
rtems_filesystem_freenode( &loc );
2005320: c2 07 bf ec ld [ %fp + -20 ], %g1
2005324: 80 a0 60 00 cmp %g1, 0
2005328: 02 80 00 08 be 2005348 <symlink+0xc4> <== NEVER TAKEN
200532c: b0 10 00 08 mov %o0, %i0
2005330: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2005334: 80 a0 60 00 cmp %g1, 0
2005338: 02 80 00 1b be 20053a4 <symlink+0x120> <== NEVER TAKEN
200533c: 01 00 00 00 nop
2005340: 9f c0 40 00 call %g1
2005344: 90 10 00 19 mov %i1, %o0
return result;
}
2005348: 81 c7 e0 08 ret
200534c: 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 );
2005350: c6 00 60 bc ld [ %g1 + 0xbc ], %g3
2005354: 88 10 20 00 clr %g4
2005358: c2 00 e0 04 ld [ %g3 + 4 ], %g1
200535c: c2 27 bf e4 st %g1, [ %fp + -28 ]
2005360: c4 00 e0 08 ld [ %g3 + 8 ], %g2
2005364: c4 27 bf e8 st %g2, [ %fp + -24 ]
2005368: c2 00 e0 0c ld [ %g3 + 0xc ], %g1
200536c: c2 27 bf ec st %g1, [ %fp + -20 ]
2005370: c4 00 e0 10 ld [ %g3 + 0x10 ], %g2
2005374: 10 bf ff d9 b 20052d8 <symlink+0x54>
2005378: 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 );
200537c: c2 00 a0 1c ld [ %g2 + 0x1c ], %g1 <== NOT EXECUTED
2005380: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2005384: 02 80 00 04 be 2005394 <symlink+0x110> <== NOT EXECUTED
2005388: 01 00 00 00 nop <== NOT EXECUTED
200538c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2005390: 90 10 00 19 mov %i1, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2005394: 40 00 2d 0f call 20107d0 <__errno> <== NOT EXECUTED
2005398: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
200539c: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20053a0: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20053a4: 81 c7 e0 08 ret <== NOT EXECUTED
20053a8: 81 e8 00 00 restore <== NOT EXECUTED
02004e50 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
2004e50: 9d e3 bf 98 save %sp, -104, %sp
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
2004e54: c4 06 21 64 ld [ %i0 + 0x164 ], %g2
if ( this_reent ) {
2004e58: 80 a0 a0 00 cmp %g2, 0
2004e5c: 02 80 00 0b be 2004e88 <sync_per_thread+0x38> <== NEVER TAKEN
2004e60: 21 00 80 60 sethi %hi(0x2018000), %l0
current_reent = _Thread_Executing->libc_reent;
2004e64: c2 04 23 64 ld [ %l0 + 0x364 ], %g1 ! 2018364 <_Thread_Executing>
_Thread_Executing->libc_reent = this_reent;
_fwalk (t->libc_reent, sync_wrapper);
2004e68: 13 00 80 13 sethi %hi(0x2004c00), %o1
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
current_reent = _Thread_Executing->libc_reent;
2004e6c: e2 00 61 64 ld [ %g1 + 0x164 ], %l1
_Thread_Executing->libc_reent = this_reent;
2004e70: c4 20 61 64 st %g2, [ %g1 + 0x164 ]
_fwalk (t->libc_reent, sync_wrapper);
2004e74: d0 06 21 64 ld [ %i0 + 0x164 ], %o0
2004e78: 40 00 31 38 call 2011358 <_fwalk>
2004e7c: 92 12 62 b8 or %o1, 0x2b8, %o1
_Thread_Executing->libc_reent = current_reent;
2004e80: c2 04 23 64 ld [ %l0 + 0x364 ], %g1
2004e84: e2 20 61 64 st %l1, [ %g1 + 0x164 ]
2004e88: 81 c7 e0 08 ret
2004e8c: 81 e8 00 00 restore
02005138 <sysconf>:
*/
long sysconf(
int name
)
{
2005138: 9d e3 bf 98 save %sp, -104, %sp
switch (name) {
200513c: 80 a6 20 08 cmp %i0, 8
2005140: 02 80 00 10 be 2005180 <sysconf+0x48>
2005144: 11 00 00 04 sethi %hi(0x1000), %o0
2005148: 80 a6 20 08 cmp %i0, 8
200514c: 04 80 00 0f ble 2005188 <sysconf+0x50>
2005150: 80 a6 20 02 cmp %i0, 2
2005154: 80 a6 20 33 cmp %i0, 0x33
2005158: 02 80 00 0a be 2005180 <sysconf+0x48>
200515c: 90 10 24 00 mov 0x400, %o0
2005160: 80 a6 22 03 cmp %i0, 0x203
2005164: 02 80 00 07 be 2005180 <sysconf+0x48> <== NEVER TAKEN
2005168: 90 10 20 00 clr %o0
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
200516c: 40 00 23 ad call 200e020 <__errno>
2005170: 01 00 00 00 nop
2005174: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16>
2005178: c2 22 00 00 st %g1, [ %o0 ]
200517c: 90 10 3f ff mov -1, %o0
}
2005180: 81 c7 e0 08 ret
2005184: 91 e8 00 08 restore %g0, %o0, %o0
long sysconf(
int name
)
{
switch (name) {
2005188: 02 80 00 07 be 20051a4 <sysconf+0x6c>
200518c: 80 a6 20 04 cmp %i0, 4
2005190: 12 bf ff f7 bne 200516c <sysconf+0x34>
2005194: 03 00 80 54 sethi %hi(0x2015000), %g1
case _SC_CLK_TCK:
return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick);
case _SC_OPEN_MAX: {
return rtems_libio_number_iops;
2005198: d0 00 60 48 ld [ %g1 + 0x48 ], %o0 ! 2015048 <rtems_libio_number_iops>
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
200519c: 81 c7 e0 08 ret
20051a0: 91 e8 00 08 restore %g0, %o0, %o0
)
{
switch (name) {
case _SC_CLK_TCK:
return (TOD_MICROSECONDS_PER_SECOND / _TOD_Microseconds_per_tick);
20051a4: 03 00 80 58 sethi %hi(0x2016000), %g1
20051a8: d2 00 60 90 ld [ %g1 + 0x90 ], %o1 ! 2016090 <_TOD_Microseconds_per_tick>
20051ac: 11 00 03 d0 sethi %hi(0xf4000), %o0
20051b0: 40 00 32 62 call 2011b38 <.udiv>
20051b4: 90 12 22 40 or %o0, 0x240, %o0 ! f4240 <PROM_START+0xf4240>
default:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
20051b8: 81 c7 e0 08 ret
20051bc: 91 e8 00 08 restore %g0, %o0, %o0
020059a0 <telldir>:
#include <rtems/seterr.h>
long telldir(
DIR *dirp
)
{
20059a0: 9d e3 bf 98 save %sp, -104, %sp
rtems_libio_t *iop;
if ( !dirp )
20059a4: 80 a6 20 00 cmp %i0, 0
20059a8: 02 80 00 1b be 2005a14 <telldir+0x74> <== NEVER TAKEN
20059ac: 03 00 80 60 sethi %hi(0x2018000), %g1
/*
* Get the file control block structure associated with the
* file descriptor
*/
iop = rtems_libio_iop( dirp->dd_fd );
20059b0: f0 06 00 00 ld [ %i0 ], %i0
20059b4: c4 00 60 b8 ld [ %g1 + 0xb8 ], %g2
20059b8: 80 a6 00 02 cmp %i0, %g2
20059bc: 1a 80 00 0f bcc 20059f8 <telldir+0x58> <== NEVER TAKEN
20059c0: 11 00 80 5c sethi %hi(0x2017000), %o0
20059c4: 03 00 80 63 sethi %hi(0x2018c00), %g1
20059c8: c6 00 62 28 ld [ %g1 + 0x228 ], %g3 ! 2018e28 <rtems_libio_iops>
20059cc: 85 2e 20 02 sll %i0, 2, %g2
20059d0: 83 2e 20 04 sll %i0, 4, %g1
20059d4: 82 20 40 02 sub %g1, %g2, %g1
20059d8: 82 00 40 18 add %g1, %i0, %g1
20059dc: 83 28 60 02 sll %g1, 2, %g1
if (iop == NULL)
20059e0: 86 80 c0 01 addcc %g3, %g1, %g3
20059e4: 02 80 00 06 be 20059fc <telldir+0x5c> <== NEVER TAKEN
20059e8: 15 00 80 5c sethi %hi(0x2017000), %o2
assert(0);
return (long)( iop->offset );
20059ec: f0 00 e0 08 ld [ %g3 + 8 ], %i0
}
20059f0: 81 c7 e0 08 ret
20059f4: 81 e8 00 00 restore
*/
iop = rtems_libio_iop( dirp->dd_fd );
if (iop == NULL)
assert(0);
20059f8: 15 00 80 5c sethi %hi(0x2017000), %o2 <== NOT EXECUTED
20059fc: 17 00 80 5c sethi %hi(0x2017000), %o3 <== NOT EXECUTED
2005a00: 90 12 22 98 or %o0, 0x298, %o0 <== NOT EXECUTED
2005a04: 94 12 a2 f0 or %o2, 0x2f0, %o2 <== NOT EXECUTED
2005a08: 96 12 e2 e8 or %o3, 0x2e8, %o3 <== NOT EXECUTED
2005a0c: 7f ff f6 67 call 20033a8 <__assert_func> <== NOT EXECUTED
2005a10: 92 10 20 2c mov 0x2c, %o1 <== NOT EXECUTED
)
{
rtems_libio_t *iop;
if ( !dirp )
rtems_set_errno_and_return_minus_one( EBADF );
2005a14: 40 00 2d 6e call 2010fcc <__errno> <== NOT EXECUTED
2005a18: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2005a1c: 82 10 20 09 mov 9, %g1 <== NOT EXECUTED
2005a20: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2005a24: 81 c7 e0 08 ret <== NOT EXECUTED
2005a28: 81 e8 00 00 restore <== NOT EXECUTED
0200ab30 <timer_create>:
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
200ab30: 9d e3 bf 98 save %sp, -104, %sp
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
200ab34: 80 a6 20 01 cmp %i0, 1
200ab38: 12 80 00 3f bne 200ac34 <timer_create+0x104>
200ab3c: 80 a6 a0 00 cmp %i2, 0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
200ab40: 02 80 00 3d be 200ac34 <timer_create+0x104>
200ab44: 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) {
200ab48: 02 80 00 0e be 200ab80 <timer_create+0x50>
200ab4c: 05 00 80 8a sethi %hi(0x2022800), %g2
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
200ab50: c2 06 40 00 ld [ %i1 ], %g1
200ab54: 82 00 7f ff add %g1, -1, %g1
200ab58: 80 a0 60 01 cmp %g1, 1
200ab5c: 18 80 00 36 bgu 200ac34 <timer_create+0x104> <== NEVER TAKEN
200ab60: 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 )
200ab64: c2 06 60 04 ld [ %i1 + 4 ], %g1
200ab68: 80 a0 60 00 cmp %g1, 0
200ab6c: 02 80 00 32 be 200ac34 <timer_create+0x104> <== NEVER TAKEN
200ab70: 82 00 7f ff add %g1, -1, %g1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
200ab74: 80 a0 60 1f cmp %g1, 0x1f
200ab78: 18 80 00 2f bgu 200ac34 <timer_create+0x104> <== NEVER TAKEN
200ab7c: 01 00 00 00 nop
200ab80: c2 00 a3 00 ld [ %g2 + 0x300 ], %g1
200ab84: 82 00 60 01 inc %g1
200ab88: c2 20 a3 00 st %g1, [ %g2 + 0x300 ]
* 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 );
200ab8c: 31 00 80 8b sethi %hi(0x2022c00), %i0
200ab90: 40 00 08 46 call 200cca8 <_Objects_Allocate>
200ab94: 90 16 22 50 or %i0, 0x250, %o0 ! 2022e50 <_POSIX_Timer_Information>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
200ab98: 80 a2 20 00 cmp %o0, 0
200ab9c: 02 80 00 2c be 200ac4c <timer_create+0x11c>
200aba0: 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;
200aba4: 05 00 80 8a sethi %hi(0x2022800), %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;
200aba8: c2 2a 20 3c stb %g1, [ %o0 + 0x3c ]
ptimer->thread_id = _Thread_Executing->Object.id;
200abac: c6 00 a3 c4 ld [ %g2 + 0x3c4 ], %g3
if ( evp != NULL ) {
200abb0: 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;
200abb4: c2 00 e0 08 ld [ %g3 + 8 ], %g1
if ( evp != NULL ) {
200abb8: 02 80 00 08 be 200abd8 <timer_create+0xa8>
200abbc: 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;
200abc0: 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;
200abc4: c4 06 40 00 ld [ %i1 ], %g2
ptimer->inf.sigev_signo = evp->sigev_signo;
200abc8: 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;
200abcc: c4 22 20 40 st %g2, [ %o0 + 0x40 ]
ptimer->inf.sigev_signo = evp->sigev_signo;
200abd0: c6 22 20 44 st %g3, [ %o0 + 0x44 ]
ptimer->inf.sigev_value = evp->sigev_value;
200abd4: c2 22 20 48 st %g1, [ %o0 + 0x48 ]
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
200abd8: c6 02 20 08 ld [ %o0 + 8 ], %g3
200abdc: 82 16 22 50 or %i0, 0x250, %g1
200abe0: c4 00 60 1c ld [ %g1 + 0x1c ], %g2
200abe4: 03 00 00 3f sethi %hi(0xfc00), %g1
200abe8: 82 10 63 ff or %g1, 0x3ff, %g1 ! ffff <PROM_START+0xffff>
200abec: 82 08 c0 01 and %g3, %g1, %g1
200abf0: 83 28 60 02 sll %g1, 2, %g1
200abf4: d0 20 80 01 st %o0, [ %g2 + %g1 ]
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == FALSE */
the_object->name.name_u32 = name;
200abf8: c0 22 20 0c clr [ %o0 + 0xc ]
}
ptimer->overrun = 0;
200abfc: c0 22 20 68 clr [ %o0 + 0x68 ]
ptimer->timer_data.it_value.tv_sec = 0;
200ac00: c0 22 20 5c clr [ %o0 + 0x5c ]
ptimer->timer_data.it_value.tv_nsec = 0;
200ac04: c0 22 20 60 clr [ %o0 + 0x60 ]
ptimer->timer_data.it_interval.tv_sec = 0;
200ac08: c0 22 20 54 clr [ %o0 + 0x54 ]
ptimer->timer_data.it_interval.tv_nsec = 0;
200ac0c: c0 22 20 58 clr [ %o0 + 0x58 ]
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
200ac10: c0 22 20 30 clr [ %o0 + 0x30 ]
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
200ac14: c6 26 80 00 st %g3, [ %i2 ]
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
200ac18: c0 22 20 18 clr [ %o0 + 0x18 ]
the_watchdog->routine = routine;
200ac1c: c0 22 20 2c clr [ %o0 + 0x2c ]
the_watchdog->id = id;
the_watchdog->user_data = user_data;
200ac20: c0 22 20 34 clr [ %o0 + 0x34 ]
_Thread_Enable_dispatch();
200ac24: 40 00 0c 0a call 200dc4c <_Thread_Enable_dispatch>
200ac28: b0 10 20 00 clr %i0
return 0;
}
200ac2c: 81 c7 e0 08 ret
200ac30: 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 );
200ac34: 40 00 25 c2 call 201433c <__errno>
200ac38: b0 10 3f ff mov -1, %i0
200ac3c: 82 10 20 16 mov 0x16, %g1
200ac40: c2 22 00 00 st %g1, [ %o0 ]
200ac44: 81 c7 e0 08 ret
200ac48: 81 e8 00 00 restore
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
_Thread_Enable_dispatch();
200ac4c: 40 00 0c 00 call 200dc4c <_Thread_Enable_dispatch>
200ac50: b0 10 3f ff mov -1, %i0
rtems_set_errno_and_return_minus_one( EAGAIN );
200ac54: 40 00 25 ba call 201433c <__errno>
200ac58: 01 00 00 00 nop
200ac5c: 82 10 20 0b mov 0xb, %g1 ! b <PROM_START+0xb>
200ac60: c2 22 00 00 st %g1, [ %o0 ]
200ac64: 81 c7 e0 08 ret
200ac68: 81 e8 00 00 restore
02006f40 <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
2006f40: 9d e3 bf 80 save %sp, -128, %sp
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
2006f44: 80 a6 a0 00 cmp %i2, 0
2006f48: 02 80 00 54 be 2007098 <timer_settime+0x158> <== NEVER TAKEN
2006f4c: 03 0e e6 b2 sethi %hi(0x3b9ac800), %g1
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
2006f50: c4 06 a0 0c ld [ %i2 + 0xc ], %g2
2006f54: 82 10 61 ff or %g1, 0x1ff, %g1
2006f58: 80 a0 80 01 cmp %g2, %g1
2006f5c: 18 80 00 4f bgu 2007098 <timer_settime+0x158>
2006f60: 01 00 00 00 nop
2006f64: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2006f68: 80 a0 80 01 cmp %g2, %g1
2006f6c: 18 80 00 4b bgu 2007098 <timer_settime+0x158> <== NEVER TAKEN
2006f70: 80 a0 a0 00 cmp %g2, 0
2006f74: 06 80 00 49 bl 2007098 <timer_settime+0x158> <== NEVER TAKEN
2006f78: 80 a6 60 04 cmp %i1, 4
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
2006f7c: 02 80 00 04 be 2006f8c <timer_settime+0x4c>
2006f80: 80 a6 60 00 cmp %i1, 0
2006f84: 12 80 00 45 bne 2007098 <timer_settime+0x158>
2006f88: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
2006f8c: c2 06 80 00 ld [ %i2 ], %g1
2006f90: c4 06 a0 04 ld [ %i2 + 4 ], %g2
2006f94: c6 06 a0 08 ld [ %i2 + 8 ], %g3
2006f98: c8 06 a0 0c ld [ %i2 + 0xc ], %g4
2006f9c: c2 27 bf e4 st %g1, [ %fp + -28 ]
2006fa0: c4 27 bf e8 st %g2, [ %fp + -24 ]
2006fa4: c6 27 bf ec st %g3, [ %fp + -20 ]
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
2006fa8: 80 a6 60 04 cmp %i1, 4
2006fac: 02 80 00 5c be 200711c <timer_settime+0x1dc>
2006fb0: c8 27 bf f0 st %g4, [ %fp + -16 ]
2006fb4: 92 10 00 18 mov %i0, %o1
2006fb8: 11 00 80 75 sethi %hi(0x201d400), %o0
2006fbc: 94 07 bf f4 add %fp, -12, %o2
2006fc0: 40 00 09 1f call 200943c <_Objects_Get>
2006fc4: 90 12 20 30 or %o0, 0x30, %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 ) {
2006fc8: c2 07 bf f4 ld [ %fp + -12 ], %g1
2006fcc: 80 a0 60 00 cmp %g1, 0
2006fd0: 12 80 00 67 bne 200716c <timer_settime+0x22c> <== NEVER TAKEN
2006fd4: b2 10 00 08 mov %o0, %i1
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
2006fd8: c2 07 bf ec ld [ %fp + -20 ], %g1
2006fdc: 80 a0 60 00 cmp %g1, 0
2006fe0: 12 80 00 05 bne 2006ff4 <timer_settime+0xb4>
2006fe4: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006fe8: 80 a0 60 00 cmp %g1, 0
2006fec: 02 80 00 31 be 20070b0 <timer_settime+0x170> <== ALWAYS TAKEN
2006ff0: 01 00 00 00 nop
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
2006ff4: 40 00 0f 8b call 200ae20 <_Timespec_To_ticks>
2006ff8: 90 10 00 1a mov %i2, %o0
2006ffc: d0 26 60 64 st %o0, [ %i1 + 0x64 ]
initial_period = _Timespec_To_ticks( &normalize.it_value );
2007000: 40 00 0f 88 call 200ae20 <_Timespec_To_ticks>
2007004: 90 07 bf ec add %fp, -20, %o0
activated = _POSIX_Timer_Insert_helper(
2007008: d4 06 60 08 ld [ %i1 + 8 ], %o2
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
initial_period = _Timespec_To_ticks( &normalize.it_value );
200700c: 92 10 00 08 mov %o0, %o1
activated = _POSIX_Timer_Insert_helper(
2007010: 17 00 80 1c sethi %hi(0x2007000), %o3
2007014: 90 06 60 10 add %i1, 0x10, %o0
2007018: 96 12 e1 84 or %o3, 0x184, %o3
200701c: 40 00 1c 2b call 200e0c8 <_POSIX_Timer_Insert_helper>
2007020: 98 10 00 19 mov %i1, %o4
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
2007024: 80 8a 20 ff btst 0xff, %o0
2007028: 02 80 00 18 be 2007088 <timer_settime+0x148> <== NEVER TAKEN
200702c: 80 a6 e0 00 cmp %i3, 0
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
2007030: 02 80 00 0b be 200705c <timer_settime+0x11c>
2007034: c2 07 bf e4 ld [ %fp + -28 ], %g1
*ovalue = ptimer->timer_data;
2007038: c2 06 60 54 ld [ %i1 + 0x54 ], %g1
200703c: c2 26 c0 00 st %g1, [ %i3 ]
2007040: c4 06 60 58 ld [ %i1 + 0x58 ], %g2
2007044: c4 26 e0 04 st %g2, [ %i3 + 4 ]
2007048: c2 06 60 5c ld [ %i1 + 0x5c ], %g1
200704c: c2 26 e0 08 st %g1, [ %i3 + 8 ]
2007050: c4 06 60 60 ld [ %i1 + 0x60 ], %g2
2007054: c4 26 e0 0c st %g2, [ %i3 + 0xc ]
ptimer->timer_data = normalize;
2007058: c2 07 bf e4 ld [ %fp + -28 ], %g1
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
200705c: 90 06 60 6c add %i1, 0x6c, %o0
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
2007060: c2 26 60 54 st %g1, [ %i1 + 0x54 ]
2007064: c4 07 bf e8 ld [ %fp + -24 ], %g2
2007068: c4 26 60 58 st %g2, [ %i1 + 0x58 ]
200706c: c2 07 bf ec ld [ %fp + -20 ], %g1
2007070: c2 26 60 5c st %g1, [ %i1 + 0x5c ]
2007074: c4 07 bf f0 ld [ %fp + -16 ], %g2
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
2007078: 82 10 20 03 mov 3, %g1
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
200707c: c4 26 60 60 st %g2, [ %i1 + 0x60 ]
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
2007080: 40 00 06 80 call 2008a80 <_TOD_Get>
2007084: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
_Thread_Enable_dispatch();
2007088: 40 00 0b 42 call 2009d90 <_Thread_Enable_dispatch>
200708c: b0 10 20 00 clr %i0
2007090: 81 c7 e0 08 ret
2007094: 81 e8 00 00 restore
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
rtems_set_errno_and_return_minus_one( EINVAL );
2007098: 40 00 23 fd call 201008c <__errno>
200709c: b0 10 3f ff mov -1, %i0
20070a0: 82 10 20 16 mov 0x16, %g1
20070a4: c2 22 00 00 st %g1, [ %o0 ]
20070a8: 81 c7 e0 08 ret
20070ac: 81 e8 00 00 restore
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
20070b0: 40 00 10 ac call 200b360 <_Watchdog_Remove>
20070b4: 90 02 20 10 add %o0, 0x10, %o0
/* The old data of the timer are returned */
if ( ovalue )
20070b8: 80 a6 e0 00 cmp %i3, 0
20070bc: 02 80 00 0b be 20070e8 <timer_settime+0x1a8> <== ALWAYS TAKEN
20070c0: c2 07 bf e4 ld [ %fp + -28 ], %g1
*ovalue = ptimer->timer_data;
20070c4: c2 06 60 54 ld [ %i1 + 0x54 ], %g1 <== NOT EXECUTED
20070c8: c2 26 c0 00 st %g1, [ %i3 ] <== NOT EXECUTED
20070cc: c4 06 60 58 ld [ %i1 + 0x58 ], %g2 <== NOT EXECUTED
20070d0: c4 26 e0 04 st %g2, [ %i3 + 4 ] <== NOT EXECUTED
20070d4: c2 06 60 5c ld [ %i1 + 0x5c ], %g1 <== NOT EXECUTED
20070d8: c2 26 e0 08 st %g1, [ %i3 + 8 ] <== NOT EXECUTED
20070dc: c4 06 60 60 ld [ %i1 + 0x60 ], %g2 <== NOT EXECUTED
20070e0: c4 26 e0 0c st %g2, [ %i3 + 0xc ] <== NOT EXECUTED
/* The new data are set */
ptimer->timer_data = normalize;
20070e4: c2 07 bf e4 ld [ %fp + -28 ], %g1 <== NOT EXECUTED
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
20070e8: b0 10 20 00 clr %i0
(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 = normalize;
20070ec: c2 26 60 54 st %g1, [ %i1 + 0x54 ]
20070f0: c4 07 bf e8 ld [ %fp + -24 ], %g2
20070f4: c4 26 60 58 st %g2, [ %i1 + 0x58 ]
20070f8: c2 07 bf ec ld [ %fp + -20 ], %g1
20070fc: c2 26 60 5c st %g1, [ %i1 + 0x5c ]
2007100: c4 07 bf f0 ld [ %fp + -16 ], %g2
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
2007104: 82 10 20 04 mov 4, %g1
(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 = normalize;
2007108: c4 26 60 60 st %g2, [ %i1 + 0x60 ]
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
/* Returns with success */
_Thread_Enable_dispatch();
200710c: 40 00 0b 21 call 2009d90 <_Thread_Enable_dispatch>
2007110: c2 2e 60 3c stb %g1, [ %i1 + 0x3c ]
2007114: 81 c7 e0 08 ret
2007118: 81 e8 00 00 restore
normalize = *value;
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &_TOD_Now, &normalize.it_value ) )
200711c: b2 07 bf ec add %fp, -20, %i1
2007120: 21 00 80 74 sethi %hi(0x201d000), %l0
2007124: 92 10 00 19 mov %i1, %o1
2007128: 40 00 0f 16 call 200ad80 <_Timespec_Greater_than>
200712c: 90 14 21 74 or %l0, 0x174, %o0
2007130: 80 8a 20 ff btst 0xff, %o0
2007134: 12 bf ff d9 bne 2007098 <timer_settime+0x158>
2007138: 92 10 00 19 mov %i1, %o1
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &_TOD_Now, &normalize.it_value, &normalize.it_value );
200713c: 94 10 00 19 mov %i1, %o2
2007140: 40 00 0f 22 call 200adc8 <_Timespec_Subtract>
2007144: 90 14 21 74 or %l0, 0x174, %o0
2007148: 92 10 00 18 mov %i0, %o1
200714c: 11 00 80 75 sethi %hi(0x201d400), %o0
2007150: 94 07 bf f4 add %fp, -12, %o2
2007154: 40 00 08 ba call 200943c <_Objects_Get>
2007158: 90 12 20 30 or %o0, 0x30, %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 ) {
200715c: c2 07 bf f4 ld [ %fp + -12 ], %g1
2007160: 80 a0 60 00 cmp %g1, 0
2007164: 02 bf ff 9d be 2006fd8 <timer_settime+0x98> <== ALWAYS TAKEN
2007168: b2 10 00 08 mov %o0, %i1
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
200716c: 40 00 23 c8 call 201008c <__errno> <== NOT EXECUTED
2007170: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2007174: 82 10 20 16 mov 0x16, %g1 <== NOT EXECUTED
2007178: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
}
200717c: 81 c7 e0 08 ret <== NOT EXECUTED
2007180: 81 e8 00 00 restore <== NOT EXECUTED
02005468 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
2005468: 9d e3 bf 90 save %sp, -112, %sp
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
200546c: 03 00 80 59 sethi %hi(0x2016400), %g1
2005470: a2 10 60 64 or %g1, 0x64, %l1 ! 2016464 <_POSIX_signals_Ualarm_timer>
2005474: c4 04 60 1c ld [ %l1 + 0x1c ], %g2
2005478: 80 a0 a0 00 cmp %g2, 0
200547c: 02 80 00 3c be 200556c <ualarm+0x104>
2005480: a4 10 00 18 mov %i0, %l2
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
switch ( _Watchdog_Remove( the_timer ) ) {
2005484: 40 00 10 dd call 20097f8 <_Watchdog_Remove>
2005488: 90 10 00 11 mov %l1, %o0
200548c: 90 02 3f fe add %o0, -2, %o0
2005490: 80 a2 20 01 cmp %o0, 1
2005494: 08 80 00 07 bleu 20054b0 <ualarm+0x48> <== ALWAYS TAKEN
2005498: b0 10 20 00 clr %i0
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
200549c: 80 a4 a0 00 cmp %l2, 0 <== NOT EXECUTED
20054a0: 12 80 00 1a bne 2005508 <ualarm+0xa0> <== NOT EXECUTED
20054a4: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
20054a8: 81 c7 e0 08 ret
20054ac: 81 e8 00 00 restore
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
20054b0: c2 04 60 0c ld [ %l1 + 0xc ], %g1
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20054b4: c4 04 60 18 ld [ %l1 + 0x18 ], %g2
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
20054b8: d0 04 60 14 ld [ %l1 + 0x14 ], %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20054bc: 92 07 bf f0 add %fp, -16, %o1
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
20054c0: 90 02 00 01 add %o0, %g1, %o0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
20054c4: 40 00 0f 31 call 2009188 <_Timespec_From_ticks>
20054c8: 90 22 00 02 sub %o0, %g2, %o0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20054cc: c4 07 bf f0 ld [ %fp + -16 ], %g2
remaining += tp.tv_nsec / 1000;
20054d0: d0 07 bf f4 ld [ %fp + -12 ], %o0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20054d4: 87 28 a0 03 sll %g2, 3, %g3
20054d8: 83 28 a0 08 sll %g2, 8, %g1
20054dc: 82 20 40 03 sub %g1, %g3, %g1
remaining += tp.tv_nsec / 1000;
20054e0: 92 10 23 e8 mov 0x3e8, %o1
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20054e4: a1 28 60 06 sll %g1, 6, %l0
20054e8: a0 24 00 01 sub %l0, %g1, %l0
remaining += tp.tv_nsec / 1000;
20054ec: 40 00 35 50 call 2012a2c <.div>
20054f0: a0 04 00 02 add %l0, %g2, %l0
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
20054f4: a1 2c 20 06 sll %l0, 6, %l0
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
20054f8: 80 a4 a0 00 cmp %l2, 0
20054fc: 02 bf ff eb be 20054a8 <ualarm+0x40> <== ALWAYS TAKEN
2005500: b0 02 00 10 add %o0, %l0, %i0
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2005504: 21 00 03 d0 sethi %hi(0xf4000), %l0 <== NOT EXECUTED
2005508: 90 10 00 12 mov %l2, %o0
200550c: 40 00 35 46 call 2012a24 <.udiv>
2005510: 92 14 22 40 or %l0, 0x240, %o1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
2005514: 92 14 22 40 or %l0, 0x240, %o1
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2005518: d0 27 bf f0 st %o0, [ %fp + -16 ]
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
200551c: 40 00 35 ee call 2012cd4 <.urem>
2005520: 90 10 00 12 mov %l2, %o0
2005524: 85 2a 20 02 sll %o0, 2, %g2
2005528: 83 2a 20 07 sll %o0, 7, %g1
200552c: 82 20 40 02 sub %g1, %g2, %g1
2005530: 82 00 40 08 add %g1, %o0, %g1
2005534: 83 28 60 03 sll %g1, 3, %g1
ticks = _Timespec_To_ticks( &tp );
2005538: a0 07 bf f0 add %fp, -16, %l0
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
200553c: c2 27 bf f4 st %g1, [ %fp + -12 ]
ticks = _Timespec_To_ticks( &tp );
2005540: 40 00 0f 3d call 2009234 <_Timespec_To_ticks>
2005544: 90 10 00 10 mov %l0, %o0
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
2005548: 40 00 0f 3b call 2009234 <_Timespec_To_ticks>
200554c: 90 10 00 10 mov %l0, %o0
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2005550: 92 10 00 11 mov %l1, %o1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
2005554: d0 24 60 0c st %o0, [ %l1 + 0xc ]
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
2005558: 11 00 80 59 sethi %hi(0x2016400), %o0
200555c: 40 00 10 3c call 200964c <_Watchdog_Insert>
2005560: 90 12 22 a4 or %o0, 0x2a4, %o0 ! 20166a4 <_Watchdog_Ticks_chain>
}
return remaining;
}
2005564: 81 c7 e0 08 ret
2005568: 81 e8 00 00 restore
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
200556c: 03 00 80 15 sethi %hi(0x2005400), %g1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
2005570: c0 24 60 08 clr [ %l1 + 8 ]
the_watchdog->routine = routine;
2005574: 82 10 61 98 or %g1, 0x198, %g1
the_watchdog->id = id;
2005578: c0 24 60 20 clr [ %l1 + 0x20 ]
the_watchdog->user_data = user_data;
200557c: c0 24 60 24 clr [ %l1 + 0x24 ]
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
2005580: c2 24 60 1c st %g1, [ %l1 + 0x1c ]
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
2005584: 80 a4 a0 00 cmp %l2, 0
2005588: 02 bf ff c8 be 20054a8 <ualarm+0x40> <== NEVER TAKEN
200558c: b0 10 20 00 clr %i0
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
2005590: 10 bf ff de b 2005508 <ualarm+0xa0>
2005594: 21 00 03 d0 sethi %hi(0xf4000), %l0
02008440 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
2008440: 9d e3 bf 88 save %sp, -120, %sp
/*
* Get the node to be unlinked.
*/
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
2008444: 92 10 20 00 clr %o1
2008448: 90 10 00 18 mov %i0, %o0
200844c: a0 07 bf e8 add %fp, -24, %l0
2008450: 96 10 20 00 clr %o3
2008454: 7f ff f0 d8 call 20047b4 <rtems_filesystem_evaluate_path>
2008458: 94 10 00 10 mov %l0, %o2
if ( result != 0 )
200845c: 80 a2 20 00 cmp %o0, 0
2008460: 02 80 00 04 be 2008470 <unlink+0x30>
2008464: 90 10 20 02 mov 2, %o0
result = (*loc.ops->unlink_h)( &loc );
rtems_filesystem_freenode( &loc );
return result;
}
2008468: 81 c7 e0 08 ret
200846c: 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 );
2008470: 7f ff f0 a1 call 20046f4 <rtems_filesystem_evaluate_parent>
2008474: 92 10 00 10 mov %l0, %o1
if (result != 0 && errno != ENOTSUP) {
2008478: 80 a2 20 00 cmp %o0, 0
200847c: 12 80 00 1d bne 20084f0 <unlink+0xb0> <== NEVER TAKEN
2008480: c4 07 bf f0 ld [ %fp + -16 ], %g2
rtems_filesystem_freenode( &loc );
return -1;
}
if ( !loc.ops->node_type_h ) {
2008484: c2 00 a0 10 ld [ %g2 + 0x10 ], %g1
2008488: 80 a0 60 00 cmp %g1, 0
200848c: 22 80 00 2b be,a 2008538 <unlink+0xf8> <== NEVER TAKEN
2008490: 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 ) {
2008494: 9f c0 40 00 call %g1
2008498: 90 10 00 10 mov %l0, %o0
200849c: 80 a2 20 01 cmp %o0, 1
20084a0: 02 80 00 31 be 2008564 <unlink+0x124>
20084a4: 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 ) {
20084a8: c2 00 a0 0c ld [ %g2 + 0xc ], %g1
20084ac: 80 a0 60 00 cmp %g1, 0
20084b0: 22 80 00 22 be,a 2008538 <unlink+0xf8> <== NEVER TAKEN
20084b4: 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 );
20084b8: 9f c0 40 00 call %g1
20084bc: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &loc );
20084c0: c2 07 bf f0 ld [ %fp + -16 ], %g1
20084c4: 80 a0 60 00 cmp %g1, 0
20084c8: 02 80 00 08 be 20084e8 <unlink+0xa8> <== NEVER TAKEN
20084cc: b0 10 00 08 mov %o0, %i0
20084d0: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20084d4: 80 a0 60 00 cmp %g1, 0
20084d8: 02 80 00 31 be 200859c <unlink+0x15c> <== NEVER TAKEN
20084dc: 01 00 00 00 nop
20084e0: 9f c0 40 00 call %g1
20084e4: 90 10 00 10 mov %l0, %o0
20084e8: 81 c7 e0 08 ret
20084ec: 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) {
20084f0: 40 00 26 14 call 2011d40 <__errno> <== NOT EXECUTED
20084f4: 01 00 00 00 nop <== NOT EXECUTED
20084f8: c2 02 00 00 ld [ %o0 ], %g1 <== NOT EXECUTED
20084fc: 80 a0 60 86 cmp %g1, 0x86 <== NOT EXECUTED
2008500: 02 bf ff e1 be 2008484 <unlink+0x44> <== NOT EXECUTED
2008504: c4 07 bf f0 ld [ %fp + -16 ], %g2 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
2008508: c2 07 bf f0 ld [ %fp + -16 ], %g1 <== NOT EXECUTED
200850c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2008510: 02 bf ff f6 be 20084e8 <unlink+0xa8> <== NOT EXECUTED
2008514: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2008518: c2 00 60 1c ld [ %g1 + 0x1c ], %g1 <== NOT EXECUTED
200851c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2008520: 02 bf ff f2 be 20084e8 <unlink+0xa8> <== NOT EXECUTED
2008524: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
2008528: 9f c0 40 00 call %g1 <== NOT EXECUTED
200852c: 01 00 00 00 nop <== NOT EXECUTED
2008530: 81 c7 e0 08 ret <== NOT EXECUTED
2008534: 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 );
2008538: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
200853c: 02 80 00 04 be 200854c <unlink+0x10c> <== NOT EXECUTED
2008540: 01 00 00 00 nop <== NOT EXECUTED
2008544: 9f c0 40 00 call %g1 <== NOT EXECUTED
2008548: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
200854c: 40 00 25 fd call 2011d40 <__errno> <== NOT EXECUTED
2008550: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2008554: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2008558: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
200855c: 81 c7 e0 08 ret <== NOT EXECUTED
2008560: 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 );
2008564: c2 07 bf f0 ld [ %fp + -16 ], %g1
2008568: 80 a0 60 00 cmp %g1, 0
200856c: 02 80 00 08 be 200858c <unlink+0x14c> <== NEVER TAKEN
2008570: 01 00 00 00 nop
2008574: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2008578: 80 a0 60 00 cmp %g1, 0
200857c: 02 80 00 04 be 200858c <unlink+0x14c> <== NEVER TAKEN
2008580: 01 00 00 00 nop
2008584: 9f c0 40 00 call %g1
2008588: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EISDIR );
200858c: 40 00 25 ed call 2011d40 <__errno>
2008590: b0 10 3f ff mov -1, %i0
2008594: 82 10 20 15 mov 0x15, %g1
2008598: c2 22 00 00 st %g1, [ %o0 ]
200859c: 81 c7 e0 08 ret
20085a0: 81 e8 00 00 restore
020072f8 <unmount>:
*/
int unmount(
const char *path
)
{
20072f8: 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 ) )
20072fc: 92 10 20 00 clr %o1
2007300: 90 10 00 18 mov %i0, %o0
2007304: a0 07 bf e8 add %fp, -24, %l0
2007308: 96 10 20 01 mov 1, %o3
200730c: 7f ff f0 a7 call 20035a8 <rtems_filesystem_evaluate_path>
2007310: 94 10 00 10 mov %l0, %o2
2007314: 80 a2 20 00 cmp %o0, 0
2007318: 12 80 00 3e bne 2007410 <unmount+0x118>
200731c: c2 07 bf e8 ld [ %fp + -24 ], %g1
return -1;
mt_entry = loc.mt_entry;
2007320: f0 07 bf f4 ld [ %fp + -12 ], %i0
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){
2007324: c4 06 20 18 ld [ %i0 + 0x18 ], %g2
2007328: 80 a0 80 01 cmp %g2, %g1
200732c: 12 80 00 41 bne 2007430 <unmount+0x138>
2007330: 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 );
2007334: 80 a0 60 00 cmp %g1, 0
2007338: 22 80 00 09 be,a 200735c <unmount+0x64> <== NEVER TAKEN
200733c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2007340: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007344: 80 a0 60 00 cmp %g1, 0
2007348: 22 80 00 05 be,a 200735c <unmount+0x64> <== NEVER TAKEN
200734c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1 <== NOT EXECUTED
2007350: 9f c0 40 00 call %g1
2007354: 90 10 00 10 mov %l0, %o0
/*
* Verify Unmount is supported by both filesystems.
*/
if ( !fs_mount_loc->ops->unmount_h )
2007358: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
200735c: c4 00 60 28 ld [ %g1 + 0x28 ], %g2
2007360: 80 a0 a0 00 cmp %g2, 0
2007364: 02 80 00 61 be 20074e8 <unmount+0x1f0> <== NEVER TAKEN
2007368: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
200736c: c2 06 20 20 ld [ %i0 + 0x20 ], %g1
2007370: c4 00 60 2c ld [ %g1 + 0x2c ], %g2
2007374: 80 a0 a0 00 cmp %g2, 0
2007378: 02 80 00 5c be 20074e8 <unmount+0x1f0> <== NEVER TAKEN
200737c: 03 00 80 63 sethi %hi(0x2018c00), %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 )
2007380: c4 00 60 bc ld [ %g1 + 0xbc ], %g2 ! 2018cbc <rtems_current_user_env>
2007384: c6 00 a0 10 ld [ %g2 + 0x10 ], %g3
2007388: 80 a0 c0 18 cmp %g3, %i0
200738c: 02 80 00 23 be 2007418 <unmount+0x120>
2007390: 03 00 80 65 sethi %hi(0x2019400), %g1
/*
* Search the mount table for any mount entries referencing this
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
2007394: c4 00 60 e8 ld [ %g1 + 0xe8 ], %g2 ! 20194e8 <rtems_filesystem_mount_table_control>
2007398: 82 10 60 e8 or %g1, 0xe8, %g1
200739c: 88 00 60 04 add %g1, 4, %g4
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
20073a0: 80 a1 00 02 cmp %g4, %g2
20073a4: 02 80 00 0f be 20073e0 <unmount+0xe8> <== NEVER TAKEN
20073a8: 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 ) {
20073ac: c6 06 20 24 ld [ %i0 + 0x24 ], %g3
20073b0: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
20073b4: 80 a0 40 03 cmp %g1, %g3
20073b8: 32 80 00 07 bne,a 20073d4 <unmount+0xdc> <== ALWAYS TAKEN
20073bc: c4 00 80 00 ld [ %g2 ], %g2
20073c0: 30 80 00 16 b,a 2007418 <unmount+0x120> <== NOT EXECUTED
20073c4: 80 a0 c0 01 cmp %g3, %g1
20073c8: 02 80 00 14 be 2007418 <unmount+0x120>
20073cc: 01 00 00 00 nop
* mount entry.
*/
for ( the_node = rtems_filesystem_mount_table_control.first;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
the_node = the_node->next ) {
20073d0: 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;
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node );
20073d4: 80 a1 00 02 cmp %g4, %g2
20073d8: 32 bf ff fb bne,a 20073c4 <unmount+0xcc>
20073dc: c2 00 a0 14 ld [ %g2 + 0x14 ], %g1
* 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 )
20073e0: 7f ff f1 89 call 2003a04 <rtems_libio_is_open_files_in_fs>
20073e4: 90 10 00 18 mov %i0, %o0
20073e8: 80 a2 20 01 cmp %o0, 1
20073ec: 02 80 00 0b be 2007418 <unmount+0x120>
20073f0: 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 )
20073f4: c4 06 20 10 ld [ %i0 + 0x10 ], %g2
20073f8: c2 00 a0 28 ld [ %g2 + 0x28 ], %g1
20073fc: 9f c0 40 00 call %g1
2007400: 90 10 00 18 mov %i0, %o0
2007404: 80 a2 20 00 cmp %o0, 0
2007408: 22 80 00 19 be,a 200746c <unmount+0x174> <== ALWAYS TAKEN
200740c: c4 06 20 20 ld [ %i0 + 0x20 ], %g2
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
2007410: 81 c7 e0 08 ret
2007414: 91 e8 3f ff restore %g0, -1, %o0
* 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 );
2007418: 40 00 24 ee call 20107d0 <__errno>
200741c: b0 10 3f ff mov -1, %i0
2007420: 82 10 20 10 mov 0x10, %g1
2007424: c2 22 00 00 st %g1, [ %o0 ]
2007428: 81 c7 e0 08 ret
200742c: 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 );
2007430: 80 a0 60 00 cmp %g1, 0
2007434: 02 80 00 08 be 2007454 <unmount+0x15c> <== NEVER TAKEN
2007438: 01 00 00 00 nop
200743c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2007440: 80 a0 60 00 cmp %g1, 0
2007444: 02 80 00 04 be 2007454 <unmount+0x15c> <== NEVER TAKEN
2007448: 01 00 00 00 nop
200744c: 9f c0 40 00 call %g1
2007450: 90 10 00 10 mov %l0, %o0
rtems_set_errno_and_return_minus_one( EACCES );
2007454: 40 00 24 df call 20107d0 <__errno>
2007458: b0 10 3f ff mov -1, %i0
200745c: 82 10 20 0d mov 0xd, %g1
2007460: c2 22 00 00 st %g1, [ %o0 ]
2007464: 81 c7 e0 08 ret
2007468: 81 e8 00 00 restore
* 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){
200746c: c2 00 a0 2c ld [ %g2 + 0x2c ], %g1
2007470: 9f c0 40 00 call %g1
2007474: 90 10 00 18 mov %i0, %o0
2007478: 80 a2 20 00 cmp %o0, 0
200747c: 32 80 00 13 bne,a 20074c8 <unmount+0x1d0> <== NEVER TAKEN
2007480: c4 06 20 10 ld [ %i0 + 0x10 ], %g2 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
2007484: 40 00 05 2e call 200893c <_Chain_Extract>
2007488: 90 10 00 18 mov %i0, %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 );
200748c: c2 06 20 10 ld [ %i0 + 0x10 ], %g1
2007490: 80 a0 60 00 cmp %g1, 0
2007494: 02 80 00 09 be 20074b8 <unmount+0x1c0> <== NEVER TAKEN
2007498: 90 10 00 18 mov %i0, %o0
200749c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
20074a0: 80 a0 60 00 cmp %g1, 0
20074a4: 02 80 00 05 be 20074b8 <unmount+0x1c0> <== NEVER TAKEN
20074a8: 01 00 00 00 nop
20074ac: 9f c0 40 00 call %g1
20074b0: 90 06 20 08 add %i0, 8, %o0
free( mt_entry );
20074b4: 90 10 00 18 mov %i0, %o0
20074b8: 7f ff f0 9a call 2003720 <free>
20074bc: b0 10 20 00 clr %i0
20074c0: 81 c7 e0 08 ret
20074c4: 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 )
20074c8: c2 00 a0 20 ld [ %g2 + 0x20 ], %g1 <== NOT EXECUTED
20074cc: 9f c0 40 00 call %g1 <== NOT EXECUTED
20074d0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED
20074d4: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED
20074d8: 02 bf ff ce be 2007410 <unmount+0x118> <== NOT EXECUTED
20074dc: 01 00 00 00 nop <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
20074e0: 40 00 03 f7 call 20084bc <rtems_fatal_error_occurred> <== NOT EXECUTED
20074e4: 90 10 20 00 clr %o0 ! 0 <PROM_START> <== 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 );
20074e8: 40 00 24 ba call 20107d0 <__errno> <== NOT EXECUTED
20074ec: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
20074f0: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
20074f4: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20074f8: 81 c7 e0 08 ret <== NOT EXECUTED
20074fc: 81 e8 00 00 restore <== NOT EXECUTED
02006dc0 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
2006dc0: 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 ) )
2006dc4: 92 10 20 00 clr %o1
2006dc8: 90 10 00 18 mov %i0, %o0
2006dcc: a0 07 bf e8 add %fp, -24, %l0
2006dd0: 96 10 20 01 mov 1, %o3
2006dd4: 94 10 00 10 mov %l0, %o2
2006dd8: 7f ff f0 80 call 2002fd8 <rtems_filesystem_evaluate_path>
2006ddc: b0 10 3f ff mov -1, %i0
2006de0: 80 a2 20 00 cmp %o0, 0
2006de4: 12 80 00 14 bne 2006e34 <utime+0x74>
2006de8: c4 07 bf f0 ld [ %fp + -16 ], %g2
return -1;
if ( !temp_loc.ops->utime_h ){
2006dec: c2 00 a0 30 ld [ %g2 + 0x30 ], %g1
2006df0: 80 a0 60 00 cmp %g1, 0
2006df4: 22 80 00 12 be,a 2006e3c <utime+0x7c> <== NEVER TAKEN
2006df8: 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 );
2006dfc: d4 06 60 04 ld [ %i1 + 4 ], %o2
2006e00: d2 06 40 00 ld [ %i1 ], %o1
2006e04: 9f c0 40 00 call %g1
2006e08: 90 10 00 10 mov %l0, %o0
rtems_filesystem_freenode( &temp_loc );
2006e0c: c2 07 bf f0 ld [ %fp + -16 ], %g1
2006e10: 80 a0 60 00 cmp %g1, 0
2006e14: 02 80 00 08 be 2006e34 <utime+0x74> <== NEVER TAKEN
2006e18: b0 10 00 08 mov %o0, %i0
2006e1c: c2 00 60 1c ld [ %g1 + 0x1c ], %g1
2006e20: 80 a0 60 00 cmp %g1, 0
2006e24: 02 80 00 0f be 2006e60 <utime+0xa0> <== NEVER TAKEN
2006e28: 01 00 00 00 nop
2006e2c: 9f c0 40 00 call %g1
2006e30: 90 10 00 10 mov %l0, %o0
return result;
}
2006e34: 81 c7 e0 08 ret
2006e38: 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 );
2006e3c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED
2006e40: 02 80 00 04 be 2006e50 <utime+0x90> <== NOT EXECUTED
2006e44: 01 00 00 00 nop <== NOT EXECUTED
2006e48: 9f c0 40 00 call %g1 <== NOT EXECUTED
2006e4c: 90 10 00 10 mov %l0, %o0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
2006e50: 40 00 25 c7 call 201056c <__errno> <== NOT EXECUTED
2006e54: b0 10 3f ff mov -1, %i0 <== NOT EXECUTED
2006e58: 82 10 20 86 mov 0x86, %g1 <== NOT EXECUTED
2006e5c: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2006e60: 81 c7 e0 08 ret <== NOT EXECUTED
2006e64: 81 e8 00 00 restore <== NOT EXECUTED
02002c24 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
2002c24: 9d e3 bf 80 save %sp, -128, %sp
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002c28: d0 0e 00 00 ldub [ %i0 ], %o0
2002c2c: 91 2a 20 18 sll %o0, 0x18, %o0
2002c30: 80 a2 20 00 cmp %o0, 0
2002c34: 02 80 00 44 be 2002d44 <vprintk+0x120> <== NEVER TAKEN
2002c38: 03 00 80 5d sethi %hi(0x2017400), %g1
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002c3c: 05 00 80 0a sethi %hi(0x2002800), %g2
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2002c40: a8 10 61 3c or %g1, 0x13c, %l4
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002c44: b4 10 a3 50 or %g2, 0x350, %i2
2002c48: 03 00 80 59 sethi %hi(0x2016400), %g1
count = 0;
while ((n = num / base) > 0) {
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
2002c4c: b6 07 bf f8 add %fp, -8, %i3
2002c50: b8 10 61 40 or %g1, 0x140, %i4
2002c54: ae 07 bf e0 add %fp, -32, %l7
base = 0;
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
2002c58: 91 3a 20 18 sra %o0, 0x18, %o0
2002c5c: 80 a2 20 25 cmp %o0, 0x25
2002c60: 32 80 00 3b bne,a 2002d4c <vprintk+0x128>
2002c64: c2 05 00 00 ld [ %l4 ], %g1
fmt++;
if (*fmt == '0' ) {
2002c68: d0 0e 20 01 ldub [ %i0 + 1 ], %o0
sign = 0;
width = 0;
minus = 0;
lead = ' ';
if (*fmt == '%') {
fmt++;
2002c6c: 88 06 20 01 add %i0, 1, %g4
if (*fmt == '0' ) {
2002c70: 87 2a 20 18 sll %o0, 0x18, %g3
2002c74: 83 38 e0 18 sra %g3, 0x18, %g1
2002c78: 80 a0 60 30 cmp %g1, 0x30
2002c7c: 02 80 00 b7 be 2002f58 <vprintk+0x334>
2002c80: ba 10 20 20 mov 0x20, %i5
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
2002c84: 83 38 e0 18 sra %g3, 0x18, %g1
2002c88: 80 a0 60 2d cmp %g1, 0x2d
2002c8c: 02 80 00 ae be 2002f44 <vprintk+0x320>
2002c90: ac 10 20 00 clr %l6
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002c94: 82 02 3f d0 add %o0, -48, %g1
2002c98: a0 10 20 00 clr %l0
2002c9c: 82 08 60 ff and %g1, 0xff, %g1
2002ca0: b0 10 00 04 mov %g4, %i0
2002ca4: 80 a0 60 09 cmp %g1, 9
2002ca8: 08 80 00 05 bleu 2002cbc <vprintk+0x98>
2002cac: aa 10 20 00 clr %l5
width *= 10;
width += (*fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2002cb0: 10 80 00 13 b 2002cfc <vprintk+0xd8>
2002cb4: 83 38 e0 18 sra %g3, 0x18, %g1
2002cb8: 87 2a 20 18 sll %o0, 0x18, %g3
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
width += (*fmt - '0');
fmt++;
2002cbc: 88 01 20 01 inc %g4
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002cc0: d0 09 00 00 ldub [ %g4 ], %o0
width *= 10;
width += (*fmt - '0');
2002cc4: 85 2c 20 03 sll %l0, 3, %g2
2002cc8: 83 2c 20 01 sll %l0, 1, %g1
2002ccc: 87 38 e0 18 sra %g3, 0x18, %g3
2002cd0: 82 00 40 02 add %g1, %g2, %g1
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002cd4: 84 02 3f d0 add %o0, -48, %g2
width *= 10;
width += (*fmt - '0');
2002cd8: 82 00 40 03 add %g1, %g3, %g1
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
2002cdc: 84 08 a0 ff and %g2, 0xff, %g2
2002ce0: 80 a0 a0 09 cmp %g2, 9
2002ce4: 08 bf ff f5 bleu 2002cb8 <vprintk+0x94>
2002ce8: a0 00 7f d0 add %g1, -48, %l0
2002cec: b0 10 00 04 mov %g4, %i0
2002cf0: aa 10 00 10 mov %l0, %l5
2002cf4: 87 2a 20 18 sll %o0, 0x18, %g3
width *= 10;
width += (*fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
2002cf8: 83 38 e0 18 sra %g3, 0x18, %g1
2002cfc: 80 a0 60 6c cmp %g1, 0x6c
2002d00: 22 80 00 9b be,a 2002f6c <vprintk+0x348>
2002d04: d0 09 20 01 ldub [ %g4 + 1 ], %o0
lflag = 1;
c = *++fmt;
}
switch (c) {
2002d08: 82 02 3f bc add %o0, -68, %g1
2002d0c: 82 08 60 ff and %g1, 0xff, %g1
2002d10: 80 a0 60 34 cmp %g1, 0x34
2002d14: 08 80 00 12 bleu 2002d5c <vprintk+0x138>
2002d18: 83 28 60 02 sll %g1, 2, %g1
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2002d1c: c2 05 00 00 ld [ %l4 ], %g1
2002d20: 91 2a 20 18 sll %o0, 0x18, %o0
2002d24: 9f c0 40 00 call %g1
2002d28: 91 3a 20 18 sra %o0, 0x18, %o0
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002d2c: b0 06 20 01 inc %i0
2002d30: d0 0e 00 00 ldub [ %i0 ], %o0
2002d34: 91 2a 20 18 sll %o0, 0x18, %o0
2002d38: 80 a2 20 00 cmp %o0, 0
2002d3c: 12 bf ff c8 bne 2002c5c <vprintk+0x38>
2002d40: 91 3a 20 18 sra %o0, 0x18, %o0
2002d44: 81 c7 e0 08 ret
2002d48: 81 e8 00 00 restore
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
base, sign, width, lead);
} else {
BSP_output_char(*fmt);
2002d4c: 9f c0 40 00 call %g1
2002d50: b0 06 20 01 inc %i0
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002d54: 10 bf ff f8 b 2002d34 <vprintk+0x110>
2002d58: d0 0e 00 00 ldub [ %i0 ], %o0
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002d5c: c4 06 80 01 ld [ %i2 + %g1 ], %g2
2002d60: 81 c0 80 00 jmp %g2
2002d64: 01 00 00 00 nop
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2002d68: 82 10 20 00 clr %g1 ! 0 <PROM_START> <== NOT EXECUTED
2002d6c: a6 10 20 08 mov 8, %l3 <== NOT EXECUTED
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
2002d70: e2 06 40 00 ld [ %i1 ], %l1
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
2002d74: 80 a4 60 00 cmp %l1, 0
2002d78: 06 80 00 3d bl 2002e6c <vprintk+0x248> <== NEVER TAKEN
2002d7c: b2 06 60 04 add %i1, 4, %i1
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
2002d80: 90 10 00 11 mov %l1, %o0
2002d84: 92 10 00 13 mov %l3, %o1
2002d88: 40 00 46 2d call 201463c <.udiv>
2002d8c: a0 10 20 00 clr %l0
2002d90: 80 a2 20 00 cmp %o0, 0
2002d94: 02 80 00 14 be 2002de4 <vprintk+0x1c0>
2002d98: a4 10 20 01 mov 1, %l2
2002d9c: a4 10 00 11 mov %l1, %l2
2002da0: a0 10 20 00 clr %l0
2002da4: 10 80 00 03 b 2002db0 <vprintk+0x18c>
2002da8: a2 10 00 08 mov %o0, %l1
2002dac: a2 10 00 08 mov %o0, %l1
toPrint[count++] = (num - (n*base));
2002db0: 92 10 00 13 mov %l3, %o1
2002db4: 40 00 45 e8 call 2014554 <.umul>
2002db8: 90 10 00 11 mov %l1, %o0
2002dbc: 90 24 80 08 sub %l2, %o0, %o0
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
2002dc0: 92 10 00 13 mov %l3, %o1
toPrint[count++] = (num - (n*base));
2002dc4: d0 2d c0 10 stb %o0, [ %l7 + %l0 ]
num = -num;
if (maxwidth) maxwidth--;
}
count = 0;
while ((n = num / base) > 0) {
2002dc8: 90 10 00 11 mov %l1, %o0
2002dcc: 40 00 46 1c call 201463c <.udiv>
2002dd0: a0 04 20 01 inc %l0
2002dd4: 80 a2 20 00 cmp %o0, 0
2002dd8: 12 bf ff f5 bne 2002dac <vprintk+0x188>
2002ddc: a4 10 00 11 mov %l1, %l2
2002de0: a4 04 20 01 add %l0, 1, %l2
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
2002de4: 82 06 c0 10 add %i3, %l0, %g1
2002de8: e2 28 7f e8 stb %l1, [ %g1 + -24 ]
for (n=maxwidth ; n > count; n-- )
2002dec: 80 a4 80 15 cmp %l2, %l5
2002df0: 1a 80 00 0a bcc 2002e18 <vprintk+0x1f4>
2002df4: a0 10 00 15 mov %l5, %l0
2002df8: a2 10 00 1d mov %i5, %l1
BSP_output_char(lead);
2002dfc: c2 05 00 00 ld [ %l4 ], %g1
2002e00: 9f c0 40 00 call %g1
2002e04: 90 10 00 11 mov %l1, %o0
toPrint[count++] = (num - (n*base));
num = n;
}
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
2002e08: a0 04 3f ff add %l0, -1, %l0
2002e0c: 80 a4 80 10 cmp %l2, %l0
2002e10: 2a bf ff fc bcs,a 2002e00 <vprintk+0x1dc>
2002e14: c2 05 00 00 ld [ %l4 ], %g1
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2002e18: 80 a4 a0 00 cmp %l2, 0
2002e1c: 02 bf ff c4 be 2002d2c <vprintk+0x108> <== NEVER TAKEN
2002e20: a2 06 c0 12 add %i3, %l2, %l1
2002e24: a0 10 20 00 clr %l0
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
2002e28: 82 24 40 10 sub %l1, %l0, %g1
2002e2c: c4 48 7f e7 ldsb [ %g1 + -25 ], %g2
2002e30: c6 05 00 00 ld [ %l4 ], %g3
2002e34: d0 4f 00 02 ldsb [ %i4 + %g2 ], %o0
2002e38: 9f c0 c0 00 call %g3
2002e3c: a0 04 20 01 inc %l0
toPrint[count++] = num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
2002e40: 80 a4 80 10 cmp %l2, %l0
2002e44: 18 bf ff fa bgu 2002e2c <vprintk+0x208>
2002e48: 82 24 40 10 sub %l1, %l0, %g1
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002e4c: 10 bf ff b9 b 2002d30 <vprintk+0x10c>
2002e50: b0 06 20 01 inc %i0
BSP_output_char(c);
break;
} /* switch*/
if (base)
printNum(lflag ? va_arg(ap, long int) : (long int)va_arg(ap, int),
2002e54: e2 06 40 00 ld [ %i1 ], %l1
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002e58: 82 10 20 01 mov 1, %g1
2002e5c: a6 10 20 0a mov 0xa, %l3
{
long unsigned int n;
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
2002e60: 80 a4 60 00 cmp %l1, 0
2002e64: 16 bf ff c7 bge 2002d80 <vprintk+0x15c> <== ALWAYS TAKEN
2002e68: b2 06 60 04 add %i1, 4, %i1
2002e6c: 80 88 60 ff btst 0xff, %g1 <== NOT EXECUTED
2002e70: 02 bf ff c5 be 2002d84 <vprintk+0x160> <== NOT EXECUTED
2002e74: 90 10 00 11 mov %l1, %o0 <== NOT EXECUTED
BSP_output_char('-');
2002e78: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
2002e7c: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002e80: 90 10 20 2d mov 0x2d, %o0 <== NOT EXECUTED
num = -num;
if (maxwidth) maxwidth--;
2002e84: 80 a0 00 15 cmp %g0, %l5 <== NOT EXECUTED
int count;
char toPrint[20];
if ( (sign == 1) && ((long)num < 0) ) {
BSP_output_char('-');
num = -num;
2002e88: a2 20 00 11 neg %l1 <== NOT EXECUTED
if (maxwidth) maxwidth--;
2002e8c: 10 bf ff bd b 2002d80 <vprintk+0x15c> <== NOT EXECUTED
2002e90: aa 65 60 00 subx %l5, 0, %l5 <== NOT EXECUTED
case 'p': base = 16; sign = 0; break;
case 's':
{ int i, len;
char *s;
str = va_arg(ap, char *);
2002e94: e6 06 40 00 ld [ %i1 ], %l3
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
2002e98: a4 10 20 00 clr %l2
2002e9c: c2 4c c0 00 ldsb [ %l3 ], %g1
2002ea0: 80 a0 60 00 cmp %g1, 0
2002ea4: 02 80 00 07 be 2002ec0 <vprintk+0x29c> <== NEVER TAKEN
2002ea8: b2 06 60 04 add %i1, 4, %i1
2002eac: a4 04 a0 01 inc %l2
2002eb0: c2 4c c0 12 ldsb [ %l3 + %l2 ], %g1
2002eb4: 80 a0 60 00 cmp %g1, 0
2002eb8: 32 bf ff fe bne,a 2002eb0 <vprintk+0x28c>
2002ebc: a4 04 a0 01 inc %l2
;
/* leading spaces */
if ( !minus )
2002ec0: 80 a5 a0 00 cmp %l6, 0
2002ec4: 02 80 00 36 be 2002f9c <vprintk+0x378>
2002ec8: 80 a4 00 12 cmp %l0, %l2
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
/* no width option */
if (width == 0) {
2002ecc: 80 a4 20 00 cmp %l0, 0
2002ed0: 22 80 00 02 be,a 2002ed8 <vprintk+0x2b4>
2002ed4: aa 10 00 12 mov %l2, %l5
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2002ed8: 80 a5 60 00 cmp %l5, 0
2002edc: 14 80 00 29 bg 2002f80 <vprintk+0x35c> <== ALWAYS TAKEN
2002ee0: 80 a5 a0 00 cmp %l6, 0
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2002ee4: 22 bf ff 93 be,a 2002d30 <vprintk+0x10c>
2002ee8: b0 06 20 01 inc %i0
for ( i=len ; i<width ; i++ )
2002eec: 80 a5 40 12 cmp %l5, %l2
2002ef0: 24 bf ff 90 ble,a 2002d30 <vprintk+0x10c> <== NEVER TAKEN
2002ef4: b0 06 20 01 inc %i0 <== NOT EXECUTED
2002ef8: a0 10 00 12 mov %l2, %l0
BSP_output_char(' ');
2002efc: c2 05 00 00 ld [ %l4 ], %g1
2002f00: 9f c0 40 00 call %g1
2002f04: 90 10 20 20 mov 0x20, %o0
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
2002f08: a0 04 20 01 inc %l0
2002f0c: 80 a5 40 10 cmp %l5, %l0
2002f10: 34 bf ff fc bg,a 2002f00 <vprintk+0x2dc>
2002f14: c2 05 00 00 ld [ %l4 ], %g1
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002f18: 10 bf ff 86 b 2002d30 <vprintk+0x10c>
2002f1c: b0 06 20 01 inc %i0
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
}
break;
case 'c':
BSP_output_char(va_arg(ap, int));
2002f20: d0 4e 60 03 ldsb [ %i1 + 3 ], %o0 <== NOT EXECUTED
2002f24: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
2002f28: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002f2c: b2 06 60 04 add %i1, 4, %i1 <== NOT EXECUTED
)
{
char c, *str;
int lflag, base, sign, width, lead, minus;
for (; *fmt != '\0'; fmt++) {
2002f30: 10 bf ff 80 b 2002d30 <vprintk+0x10c> <== NOT EXECUTED
2002f34: b0 06 20 01 inc %i0 <== NOT EXECUTED
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
}
switch (c) {
2002f38: 82 10 20 00 clr %g1
2002f3c: 10 bf ff 8d b 2002d70 <vprintk+0x14c>
2002f40: a6 10 20 0a mov 0xa, %l3
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = 1;
fmt++;
2002f44: 88 01 20 01 inc %g4
2002f48: d0 09 00 00 ldub [ %g4 ], %o0
2002f4c: ac 10 20 01 mov 1, %l6
2002f50: 10 bf ff 51 b 2002c94 <vprintk+0x70>
2002f54: 87 2a 20 18 sll %o0, 0x18, %g3
lead = ' ';
if (*fmt == '%') {
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
2002f58: d0 0e 20 02 ldub [ %i0 + 2 ], %o0
2002f5c: 88 06 20 02 add %i0, 2, %g4
2002f60: ba 10 20 30 mov 0x30, %i5
2002f64: 10 bf ff 48 b 2002c84 <vprintk+0x60>
2002f68: 87 2a 20 18 sll %o0, 0x18, %g3
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = 1;
c = *++fmt;
2002f6c: 10 bf ff 67 b 2002d08 <vprintk+0xe4>
2002f70: b0 01 20 01 add %g4, 1, %i0
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
2002f74: 91 3a 20 18 sra %o0, 0x18, %o0
2002f78: 9f c0 40 00 call %g1
2002f7c: a6 04 e0 01 inc %l3
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2002f80: d0 0c c0 00 ldub [ %l3 ], %o0
2002f84: 91 2a 20 18 sll %o0, 0x18, %o0
2002f88: 80 a2 20 00 cmp %o0, 0
2002f8c: 32 bf ff fa bne,a 2002f74 <vprintk+0x350>
2002f90: c2 05 00 00 ld [ %l4 ], %g1
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
2002f94: 10 bf ff d4 b 2002ee4 <vprintk+0x2c0>
2002f98: 80 a5 a0 00 cmp %l6, 0
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2002f9c: 04 bf ff cc ble 2002ecc <vprintk+0x2a8> <== ALWAYS TAKEN
2002fa0: a2 10 00 12 mov %l2, %l1
BSP_output_char(' ');
2002fa4: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
2002fa8: 9f c0 40 00 call %g1 <== NOT EXECUTED
2002fac: 90 10 20 20 mov 0x20, %o0 <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
2002fb0: a2 04 60 01 inc %l1 <== NOT EXECUTED
2002fb4: 80 a4 40 10 cmp %l1, %l0 <== NOT EXECUTED
2002fb8: 26 bf ff fc bl,a 2002fa8 <vprintk+0x384> <== NOT EXECUTED
2002fbc: c2 05 00 00 ld [ %l4 ], %g1 <== NOT EXECUTED
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
2002fc0: 10 bf ff c7 b 2002edc <vprintk+0x2b8> <== NOT EXECUTED
2002fc4: 80 a5 60 00 cmp %l5, 0 <== NOT EXECUTED
break;
case 'c':
BSP_output_char(va_arg(ap, int));
break;
default:
BSP_output_char(c);
2002fc8: 82 10 20 00 clr %g1
2002fcc: 10 bf ff 69 b 2002d70 <vprintk+0x14c>
2002fd0: a6 10 20 10 mov 0x10, %l3
02015938 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
2015938: 9d e3 bf 98 save %sp, -104, %sp
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
201593c: 03 00 80 5d sethi %hi(0x2017400), %g1
2015940: c4 00 60 38 ld [ %g1 + 0x38 ], %g2 ! 2017438 <rtems_libio_number_iops>
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
2015944: 92 10 00 19 mov %i1, %o1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2015948: 80 a6 00 02 cmp %i0, %g2
201594c: 1a 80 00 24 bcc 20159dc <write+0xa4> <== NEVER TAKEN
2015950: 94 10 00 1a mov %i2, %o2
iop = rtems_libio_iop( fd );
2015954: 03 00 80 60 sethi %hi(0x2018000), %g1
2015958: c6 00 61 34 ld [ %g1 + 0x134 ], %g3 ! 2018134 <rtems_libio_iops>
201595c: 85 2e 20 02 sll %i0, 2, %g2
2015960: 83 2e 20 04 sll %i0, 4, %g1
2015964: 82 20 40 02 sub %g1, %g2, %g1
2015968: 82 00 40 18 add %g1, %i0, %g1
201596c: 83 28 60 02 sll %g1, 2, %g1
2015970: b0 00 c0 01 add %g3, %g1, %i0
rtems_libio_check_is_open( iop );
2015974: c2 06 20 0c ld [ %i0 + 0xc ], %g1
2015978: 80 88 61 00 btst 0x100, %g1
201597c: 02 80 00 18 be 20159dc <write+0xa4> <== NEVER TAKEN
2015980: 80 a6 60 00 cmp %i1, 0
rtems_libio_check_buffer( buffer );
2015984: 02 80 00 22 be 2015a0c <write+0xd4> <== NEVER TAKEN
2015988: 80 a6 a0 00 cmp %i2, 0
rtems_libio_check_count( count );
201598c: 02 80 00 12 be 20159d4 <write+0x9c>
2015990: 90 10 20 00 clr %o0
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
2015994: 80 88 60 04 btst 4, %g1
2015998: 02 80 00 11 be 20159dc <write+0xa4> <== NEVER TAKEN
201599c: 01 00 00 00 nop
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
20159a0: c2 06 20 30 ld [ %i0 + 0x30 ], %g1
20159a4: c2 00 60 0c ld [ %g1 + 0xc ], %g1
20159a8: 80 a0 60 00 cmp %g1, 0
20159ac: 02 80 00 12 be 20159f4 <write+0xbc> <== NEVER TAKEN
20159b0: 01 00 00 00 nop
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
20159b4: 9f c0 40 00 call %g1
20159b8: 90 10 00 18 mov %i0, %o0
if ( rc > 0 )
20159bc: 80 a2 20 00 cmp %o0, 0
20159c0: 04 80 00 05 ble 20159d4 <write+0x9c> <== NEVER TAKEN
20159c4: 01 00 00 00 nop
iop->offset += rc;
20159c8: c2 06 20 08 ld [ %i0 + 8 ], %g1
20159cc: 82 00 40 08 add %g1, %o0, %g1
20159d0: c2 26 20 08 st %g1, [ %i0 + 8 ]
return rc;
}
20159d4: 81 c7 e0 08 ret
20159d8: 91 e8 00 08 restore %g0, %o0, %o0
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
rtems_libio_check_buffer( buffer );
rtems_libio_check_count( count );
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
20159dc: 7f ff e0 4d call 200db10 <__errno> <== NOT EXECUTED
20159e0: 01 00 00 00 nop <== NOT EXECUTED
20159e4: 82 10 20 09 mov 9, %g1 ! 9 <PROM_START+0x9> <== NOT EXECUTED
20159e8: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
20159ec: 10 bf ff fa b 20159d4 <write+0x9c> <== NOT EXECUTED
20159f0: 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 );
20159f4: 7f ff e0 47 call 200db10 <__errno> <== NOT EXECUTED
20159f8: 01 00 00 00 nop <== NOT EXECUTED
20159fc: 82 10 20 86 mov 0x86, %g1 ! 86 <PROM_START+0x86> <== NOT EXECUTED
2015a00: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015a04: 10 bf ff f4 b 20159d4 <write+0x9c> <== NOT EXECUTED
2015a08: 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_buffer( buffer );
2015a0c: 7f ff e0 41 call 200db10 <__errno> <== NOT EXECUTED
2015a10: 01 00 00 00 nop <== NOT EXECUTED
2015a14: 82 10 20 16 mov 0x16, %g1 ! 16 <PROM_START+0x16> <== NOT EXECUTED
2015a18: c2 22 00 00 st %g1, [ %o0 ] <== NOT EXECUTED
2015a1c: 10 bf ff ee b 20159d4 <write+0x9c> <== NOT EXECUTED
2015a20: 90 10 3f ff mov -1, %o0 <== NOT EXECUTED