RTEMS 4.11Annotated Report
Fri Jul 16 23:57:17 2010
00048d5c <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 ) {
48d5c: 7206 moveq #6,%d1
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
48d5e: 4e56 0000 linkw %fp,#0
48d62: 206e 0008 moveal %fp@(8),%a0
48d66: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
switch( node->type ) {
48d68: 2450 moveal %a0@,%a2
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
48d6a: 2268 0010 moveal %a0@(16),%a1
switch( node->type ) {
48d6e: 202a 0048 movel %a2@(72),%d0
48d72: 5380 subql #1,%d0
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
48d74: 2269 0034 moveal %a1@(52),%a1
switch( node->type ) {
48d78: b280 cmpl %d0,%d1
48d7a: 6546 bcss 48dc2 <IMFS_Set_handlers+0x66> <== NEVER TAKEN
48d7c: 303b 0a08 movew %pc@(48d86 <IMFS_Set_handlers+0x2a>,%d0:l:2),%d0
48d80: 48c0 extl %d0
48d82: 4efb 0802 jmp %pc@(48d86 <IMFS_Set_handlers+0x2a>,%d0:l)
48d86: 000e 016 <== NOT EXECUTED
48d88: 0016 026 <== NOT EXECUTED
48d8a: 0022 042 <== NOT EXECUTED
48d8c: 0022 042 <== NOT EXECUTED
48d8e: 002e 056 <== NOT EXECUTED
48d90: 002e 056 <== NOT EXECUTED
48d92: 0036 066 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
48d94: 2169 000c 0008 movel %a1@(12),%a0@(8)
break;
48d9a: 6026 bras 48dc2 <IMFS_Set_handlers+0x66>
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
48d9c: 203c 0005 b434 movel #373812,%d0
48da2: 2140 0008 movel %d0,%a0@(8)
break;
48da6: 601a bras 48dc2 <IMFS_Set_handlers+0x66>
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
48da8: 223c 0005 b4a4 movel #373924,%d1
48dae: 2141 0008 movel %d1,%a0@(8)
break;
48db2: 600e bras 48dc2 <IMFS_Set_handlers+0x66>
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
48db4: 2169 0008 0008 movel %a1@(8),%a0@(8)
break;
48dba: 6006 bras 48dc2 <IMFS_Set_handlers+0x66>
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
48dbc: 2169 0010 0008 movel %a1@(16),%a0@(8)
break;
}
return 0;
}
48dc2: 245f moveal %sp@+,%a2
48dc4: 4280 clrl %d0
48dc6: 4e5e unlk %fp <== NOT EXECUTED
00048b9c <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
48b9c: 4e56 fff8 linkw %fp,#-8
48ba0: 2f0a movel %a2,%sp@-
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
48ba2: 4878 0060 pea 60 <DBL_MANT_DIG+0x2b>
48ba6: 4878 0001 pea 1 <ADD>
48baa: 4eb9 0004 2444 jsr 42444 <calloc>
if ( !node )
48bb0: 508f addql #8,%sp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
48bb2: 2440 moveal %d0,%a2
if ( !node )
48bb4: 4a80 tstl %d0
48bb6: 6758 beqs 48c10 <IMFS_allocate_node+0x74> <== NEVER TAKEN
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
48bb8: 4878 0020 pea 20 <OPER2+0xc>
48bbc: 2f2e 000c movel %fp@(12),%sp@-
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
48bc0: 256e 0008 0048 movel %fp@(8),%a2@(72)
strncpy( node->name, name, IMFS_NAME_MAX );
48bc6: 486a 000c pea %a2@(12)
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
48bca: 7001 moveq #1,%d0
48bcc: 3540 0032 movew %d0,%a2@(50)
node->type = type;
strncpy( node->name, name, IMFS_NAME_MAX );
48bd0: 4eb9 0004 dec4 jsr 4dec4 <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
48bd6: 256e 0010 002e movel %fp@(16),%a2@(46)
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
48bdc: 4eb9 0004 98e0 jsr 498e0 <geteuid>
48be2: 3540 0038 movew %d0,%a2@(56)
node->st_gid = getegid();
48be6: 4eb9 0004 98cc jsr 498cc <getegid>
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
48bec: 42a7 clrl %sp@-
48bee: 486e fff8 pea %fp@(-8)
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
node->st_gid = getegid();
48bf2: 3540 003a movew %d0,%a2@(58)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
48bf6: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
48bfc: 202e fff8 movel %fp@(-8),%d0
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
return node;
48c00: 4fef 0014 lea %sp@(20),%sp
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
48c04: 2540 003c movel %d0,%a2@(60)
node->stat_mtime = (time_t) tv.tv_sec;
48c08: 2540 0040 movel %d0,%a2@(64)
node->stat_ctime = (time_t) tv.tv_sec;
48c0c: 2540 0044 movel %d0,%a2@(68)
return node;
}
48c10: 200a movel %a2,%d0
48c12: 246e fff4 moveal %fp@(-12),%a2
48c16: 4e5e unlk %fp <== NOT EXECUTED
00048b34 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
48b34: 4e56 ffe8 linkw %fp,#-24
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
48b38: 206e 0008 moveal %fp@(8),%a0
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
48b3c: 48d7 041c moveml %d2-%d4/%a2,%sp@
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
48b40: 2450 moveal %a0@,%a2
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
48b42: 4284 clrl %d4
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
48b44: 362e 000e movew %fp@(14),%d3
48b48: 342e 0012 movew %fp@(18),%d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
48b4c: 4eb9 0004 98e0 jsr 498e0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
48b52: 4281 clrl %d1
48b54: 3800 movew %d0,%d4
48b56: 322a 0038 movew %a2@(56),%d1
48b5a: b284 cmpl %d4,%d1
48b5c: 6714 beqs 48b72 <IMFS_chown+0x3e> <== ALWAYS TAKEN
48b5e: 4a40 tstw %d0 <== NOT EXECUTED
48b60: 6710 beqs 48b72 <IMFS_chown+0x3e> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
48b62: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
48b68: 2040 moveal %d0,%a0 <== NOT EXECUTED
48b6a: 7001 moveq #1,%d0 <== NOT EXECUTED
48b6c: 2080 movel %d0,%a0@ <== NOT EXECUTED
48b6e: 70ff moveq #-1,%d0 <== NOT EXECUTED
48b70: 601e bras 48b90 <IMFS_chown+0x5c> <== NOT EXECUTED
#endif
jnode->st_uid = owner;
48b72: 3543 0038 movew %d3,%a2@(56)
jnode->st_gid = group;
48b76: 3542 003a movew %d2,%a2@(58)
IMFS_update_ctime( jnode );
48b7a: 42a7 clrl %sp@-
48b7c: 486e fff8 pea %fp@(-8)
48b80: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
48b86: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
48b8c: 508f addql #8,%sp
48b8e: 4280 clrl %d0
}
48b90: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
48b96: 4e5e unlk %fp
...
00048c1a <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
48c1a: 4e56 ffec linkw %fp,#-20
48c1e: 206e 0008 moveal %fp@(8),%a0
48c22: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
48c26: 242e 000c movel %fp@(12),%d2
48c2a: 246e 0018 moveal %fp@(24),%a2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
48c2e: 4a88 tstl %a0
48c30: 6700 00e2 beqw 48d14 <IMFS_create_node+0xfa>
return NULL;
parent = parent_loc->node_access;
48c34: 2850 moveal %a0@,%a4
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
48c36: 7007 moveq #7,%d0
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
48c38: 2068 0010 moveal %a0@(16),%a0
48c3c: 2668 0034 moveal %a0@(52),%a3
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
48c40: b082 cmpl %d2,%d0
48c42: 660e bnes 48c52 <IMFS_create_node+0x38>
48c44: 223c 0005 b3c4 movel #373700,%d1
48c4a: b2ab 0010 cmpl %a3@(16),%d1
48c4e: 6700 00c4 beqw 48d14 <IMFS_create_node+0xfa>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
48c52: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
48c58: 2028 002c movel %a0@(44),%d0
48c5c: 4680 notl %d0
48c5e: c0ae 0014 andl %fp@(20),%d0
48c62: 2f00 movel %d0,%sp@-
48c64: 2f2e 0010 movel %fp@(16),%sp@-
48c68: 2f02 movel %d2,%sp@-
48c6a: 4eb9 0004 8b9c jsr 48b9c <IMFS_allocate_node>
if ( !node )
48c70: 4fef 000c lea %sp@(12),%sp
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
48c74: 2a40 moveal %d0,%a5
if ( !node )
48c76: 4a80 tstl %d0
48c78: 6700 009c beqw 48d16 <IMFS_create_node+0xfc>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
48c7c: 5382 subql #1,%d2
48c7e: 7006 moveq #6,%d0
48c80: b082 cmpl %d2,%d0
48c82: 656e bcss 48cf2 <IMFS_create_node+0xd8> <== NEVER TAKEN
48c84: 303b 2a08 movew %pc@(48c8e <IMFS_create_node+0x74>,%d2:l:2),%d0
48c88: 48c0 extl %d0
48c8a: 4efb 0802 jmp %pc@(48c8e <IMFS_create_node+0x74>,%d0:l)
48c8e: 000e 016 <== NOT EXECUTED
48c90: 002a 052 <== NOT EXECUTED
48c92: 0024 044 <== NOT EXECUTED
48c94: 0024 044 <== NOT EXECUTED
48c96: 0046 0106 <== NOT EXECUTED
48c98: 0036 066 <== NOT EXECUTED
48c9a: 0060 0140 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48c9c: 41ed 0050 lea %a5@(80),%a0
48ca0: 2b48 004c movel %a0,%a5@(76)
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
48ca4: 41ed 004c lea %a5@(76),%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48ca8: 42ad 0050 clrl %a5@(80)
48cac: 2b48 0054 movel %a0,%a5@(84)
48cb0: 6040 bras 48cf2 <IMFS_create_node+0xd8>
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;
48cb2: 2b52 004c movel %a2@,%a5@(76)
break;
48cb6: 603a bras 48cf2 <IMFS_create_node+0xd8>
case IMFS_DEVICE:
node->info.device.major = info->device.major;
48cb8: 2b52 004c movel %a2@,%a5@(76)
node->info.device.minor = info->device.minor;
48cbc: 2b6a 0004 0050 movel %a2@(4),%a5@(80)
break;
48cc2: 602e bras 48cf2 <IMFS_create_node+0xd8>
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
48cc4: 42ad 0054 clrl %a5@(84)
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
48cc8: 4280 clrl %d0
48cca: 4281 clrl %d1
48ccc: 2b40 004c movel %d0,%a5@(76)
48cd0: 2b41 0050 movel %d1,%a5@(80)
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
48cd4: 42ad 0054 clrl %a5@(84)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
48cd8: 4280 clrl %d0
48cda: 4281 clrl %d1
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
48cdc: 42ad 0058 clrl %a5@(88)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
48ce0: 2b40 004c movel %d0,%a5@(76)
48ce4: 2b41 0050 movel %d1,%a5@(80)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
48ce8: 42ad 005c clrl %a5@(92)
break;
48cec: 6004 bras 48cf2 <IMFS_create_node+0xd8>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
48cee: 42ad 004c clrl %a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
48cf2: 202b 0004 movel %a3@(4),%d0
48cf6: 5280 addql #1,%d0
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
48cf8: 2b4c 0008 movel %a4,%a5@(8)
node->st_ino = ++fs_info->ino_count;
48cfc: 2740 0004 movel %d0,%a3@(4)
48d00: 2b40 0034 movel %d0,%a5@(52)
48d04: 2f0d movel %a5,%sp@-
48d06: 486c 004c pea %a4@(76)
48d0a: 4eb9 0004 6114 jsr 46114 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
48d10: 508f addql #8,%sp
48d12: 6002 bras 48d16 <IMFS_create_node+0xfc>
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
48d14: 9bcd subal %a5,%a5
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
48d16: 200d movel %a5,%d0
48d18: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
48d1e: 4e5e unlk %fp <== NOT EXECUTED
00048d22 <IMFS_create_root_node>:
return node;
}
IMFS_jnode_t *IMFS_create_root_node(void)
{
48d22: 4e56 0000 linkw %fp,#0
IMFS_jnode_t *node;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( IMFS_DIRECTORY, "", (S_IFDIR | 0755) );
48d26: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee>
48d2a: 4879 0005 b214 pea 5b214 <rtems_filesystem_default_pathconf+0x40>
48d30: 4878 0001 pea 1 <ADD>
48d34: 4eb9 0004 8b9c jsr 48b9c <IMFS_allocate_node>
if ( !node )
48d3a: 4fef 000c lea %sp@(12),%sp
48d3e: 4a80 tstl %d0
48d40: 6716 beqs 48d58 <IMFS_create_root_node+0x36> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48d42: 2240 moveal %d0,%a1
48d44: 2040 moveal %d0,%a0
48d46: 43e9 0050 lea %a1@(80),%a1
48d4a: 2149 004c movel %a1,%a0@(76)
/*
* Set the type specific information
*
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
48d4e: 5989 subql #4,%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48d50: 42a8 0050 clrl %a0@(80)
48d54: 2149 0054 movel %a1,%a0@(84)
return node;
}
48d58: 4e5e unlk %fp <== NOT EXECUTED
00048e82 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
48e82: 4e56 ff9c linkw %fp,#-100
48e86: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
48e8a: 246e 0014 moveal %fp@(20),%a2
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
48e8e: 2a0e movel %fp,%d5
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
int i = 0;
48e90: 4282 clrl %d2
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
48e92: 0685 ffff ffc7 addil #-57,%d5
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
48e98: 2e3c 0004 944c movel #300108,%d7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
48e9e: 2a6e 0008 moveal %fp@(8),%a5
48ea2: 286e 000c moveal %fp@(12),%a4
48ea6: 282e 0010 movel %fp@(16),%d4
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
48eaa: 2652 moveal %a2@,%a3
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
48eac: 486e fffc pea %fp@(-4)
48eb0: 2f05 movel %d5,%sp@-
48eb2: 2f0c movel %a4,%sp@-
48eb4: 4875 2800 pea %a5@(00000000,%d2:l)
48eb8: 4eb9 0004 94c0 jsr 494c0 <IMFS_get_token>
pathnamelen -= len;
48ebe: 2c2e fffc movel %fp@(-4),%d6
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
48ec2: 2600 movel %d0,%d3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
48ec4: 4fef 0010 lea %sp@(16),%sp
48ec8: 4a92 tstl %a2@
48eca: 6700 00ea beqw 48fb6 <IMFS_eval_path+0x134>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
48ece: 4a80 tstl %d0
48ed0: 672c beqs 48efe <IMFS_eval_path+0x7c>
if ( node->type == IMFS_DIRECTORY )
48ed2: 7001 moveq #1,%d0
48ed4: b0ab 0048 cmpl %a3@(72),%d0
48ed8: 6624 bnes 48efe <IMFS_eval_path+0x7c>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
48eda: 4878 0001 pea 1 <ADD>
48ede: 2f0a movel %a2,%sp@-
48ee0: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
48ee6: 508f addql #8,%sp
48ee8: 4a80 tstl %d0
48eea: 6612 bnes 48efe <IMFS_eval_path+0x7c>
rtems_set_errno_and_return_minus_one( EACCES );
48eec: 4eb9 0004 ca54 jsr 4ca54 <__errno>
48ef2: 780d moveq #13,%d4
48ef4: 2040 moveal %d0,%a0
48ef6: 2084 movel %d4,%a0@
48ef8: 76ff moveq #-1,%d3
48efa: 6000 0162 braw 4905e <IMFS_eval_path+0x1dc>
node = pathloc->node_access;
48efe: 2652 moveal %a2@,%a3
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
48f00: 99c6 subal %d6,%a4
i += len;
48f02: d486 addl %d6,%d2
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
48f04: 7003 moveq #3,%d0
48f06: b083 cmpl %d3,%d0
48f08: 6742 beqs 48f4c <IMFS_eval_path+0xca>
48f0a: 7204 moveq #4,%d1
48f0c: b283 cmpl %d3,%d1
48f0e: 6700 00bc beqw 48fcc <IMFS_eval_path+0x14a>
48f12: 103c 0002 moveb #2,%d0
48f16: b083 cmpl %d3,%d0
48f18: 6600 00c2 bnew 48fdc <IMFS_eval_path+0x15a>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
48f1c: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
48f22: b7e8 0018 cmpal %a0@(24),%a3
48f26: 6784 beqs 48eac <IMFS_eval_path+0x2a>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
48f28: 206a 0010 moveal %a2@(16),%a0
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
48f2c: b7e8 001c cmpal %a0@(28),%a3
48f30: 6614 bnes 48f46 <IMFS_eval_path+0xc4>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
48f32: 4878 0014 pea 14 <OPER2>
48f36: 260e movel %fp,%d3
48f38: 4868 0008 pea %a0@(8)
48f3c: 0683 ffff ffe8 addil #-24,%d3
48f42: 6000 00c4 braw 49008 <IMFS_eval_path+0x186>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
48f46: 266b 0008 moveal %a3@(8),%a3
48f4a: 6066 bras 48fb2 <IMFS_eval_path+0x130>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
48f4c: 202b 0048 movel %a3@(72),%d0
48f50: 7203 moveq #3,%d1
48f52: b280 cmpl %d0,%d1
48f54: 6614 bnes 48f6a <IMFS_eval_path+0xe8>
IMFS_evaluate_hard_link( pathloc, 0 );
48f56: 42a7 clrl %sp@-
48f58: 2f0a movel %a2,%sp@-
48f5a: 4eb9 0004 8e28 jsr 48e28 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
48f60: 2652 moveal %a2@,%a3
if ( !node )
48f62: 508f addql #8,%sp
48f64: 4a8b tstl %a3
48f66: 661e bnes 48f86 <IMFS_eval_path+0x104> <== ALWAYS TAKEN
48f68: 6024 bras 48f8e <IMFS_eval_path+0x10c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
48f6a: 7204 moveq #4,%d1
48f6c: b280 cmpl %d0,%d1
48f6e: 6616 bnes 48f86 <IMFS_eval_path+0x104>
result = IMFS_evaluate_sym_link( pathloc, 0 );
48f70: 42a7 clrl %sp@-
48f72: 2f0a movel %a2,%sp@-
48f74: 4eb9 0004 906a jsr 4906a <IMFS_evaluate_sym_link>
node = pathloc->node_access;
48f7a: 2652 moveal %a2@,%a3
if ( result == -1 )
48f7c: 508f addql #8,%sp
48f7e: 72ff moveq #-1,%d1
48f80: b280 cmpl %d0,%d1
48f82: 6700 00d8 beqw 4905c <IMFS_eval_path+0x1da>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
48f86: 7001 moveq #1,%d0
48f88: b0ab 0048 cmpl %a3@(72),%d0
48f8c: 6710 beqs 48f9e <IMFS_eval_path+0x11c>
rtems_set_errno_and_return_minus_one( ENOTDIR );
48f8e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
48f94: 7614 moveq #20,%d3
48f96: 2040 moveal %d0,%a0
48f98: 2083 movel %d3,%a0@
48f9a: 6000 ff5c braw 48ef8 <IMFS_eval_path+0x76>
/*
* 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 ) {
48f9e: 206b 0058 moveal %a3@(88),%a0
48fa2: 4a88 tstl %a0
48fa4: 6652 bnes 48ff8 <IMFS_eval_path+0x176>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
48fa6: 2f05 movel %d5,%sp@-
48fa8: 2047 moveal %d7,%a0
48faa: 2f0b movel %a3,%sp@-
48fac: 4e90 jsr %a0@
if ( !node )
48fae: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
48fb0: 2640 moveal %d0,%a3
if ( !node )
48fb2: 4a8b tstl %a3
48fb4: 6610 bnes 48fc6 <IMFS_eval_path+0x144>
rtems_set_errno_and_return_minus_one( ENOENT );
48fb6: 4eb9 0004 ca54 jsr 4ca54 <__errno>
48fbc: 7402 moveq #2,%d2
48fbe: 2040 moveal %d0,%a0
48fc0: 2082 movel %d2,%a0@
48fc2: 6000 ff34 braw 48ef8 <IMFS_eval_path+0x76>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
48fc6: 248b movel %a3,%a2@
48fc8: 6000 fee2 braw 48eac <IMFS_eval_path+0x2a>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
48fcc: 4eb9 0004 ca54 jsr 4ca54 <__errno>
48fd2: 725b moveq #91,%d1
48fd4: 2040 moveal %d0,%a0
48fd6: 2081 movel %d1,%a0@
48fd8: 6000 ff1e braw 48ef8 <IMFS_eval_path+0x76>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
48fdc: 4a83 tstl %d3
48fde: 6708 beqs 48fe8 <IMFS_eval_path+0x166>
48fe0: 7004 moveq #4,%d0
48fe2: b083 cmpl %d3,%d0
48fe4: 6600 fec6 bnew 48eac <IMFS_eval_path+0x2a>
* 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 ) {
48fe8: 7201 moveq #1,%d1
48fea: b2ab 0048 cmpl %a3@(72),%d1
48fee: 664e bnes 4903e <IMFS_eval_path+0x1bc>
if ( node->info.directory.mt_fs != NULL ) {
48ff0: 206b 0058 moveal %a3@(88),%a0
48ff4: 4a88 tstl %a0
48ff6: 6746 beqs 4903e <IMFS_eval_path+0x1bc>
newloc = node->info.directory.mt_fs->mt_fs_root;
48ff8: 4878 0014 pea 14 <OPER2>
48ffc: 260e movel %fp,%d3
48ffe: 0683 ffff ffe8 addil #-24,%d3
49004: 4868 001c pea %a0@(28)
49008: 2f03 movel %d3,%sp@-
4900a: 47f9 0004 d300 lea 4d300 <memcpy>,%a3
49010: 4e93 jsr %a3@
*pathloc = newloc;
49012: 4878 0014 pea 14 <OPER2>
49016: 2f03 movel %d3,%sp@-
49018: 2f0a movel %a2,%sp@-
4901a: 4e93 jsr %a3@
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4901c: 226a 000c moveal %a2@(12),%a1
49020: 2f0a movel %a2,%sp@-
49022: 206e fffc moveal %fp@(-4),%a0
49026: 9488 subl %a0,%d2
49028: 2f04 movel %d4,%sp@-
4902a: 4874 8800 pea %a4@(00000000,%a0:l)
4902e: 4875 2800 pea %a5@(00000000,%d2:l)
49032: 2051 moveal %a1@,%a0
49034: 4e90 jsr %a0@
49036: 4fef 0028 lea %sp@(40),%sp
4903a: 2600 movel %d0,%d3
4903c: 6020 bras 4905e <IMFS_eval_path+0x1dc>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4903e: 2f0a movel %a2,%sp@-
49040: 4eb9 0004 8d5c jsr 48d5c <IMFS_Set_handlers>
49046: 2600 movel %d0,%d3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
49048: 2e84 movel %d4,%sp@
4904a: 2f0a movel %a2,%sp@-
4904c: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
49052: 508f addql #8,%sp
49054: 4a80 tstl %d0
49056: 6606 bnes 4905e <IMFS_eval_path+0x1dc>
49058: 6000 fe92 braw 48eec <IMFS_eval_path+0x6a>
4905c: 2600 movel %d0,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4905e: 2003 movel %d3,%d0
49060: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
49066: 4e5e unlk %fp <== NOT EXECUTED
0004919e <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 */
)
{
4919e: 4e56 ff9c linkw %fp,#-100
491a2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
491a6: 246e 000c moveal %fp@(12),%a2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
491aa: 2c0e movel %fp,%d6
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
int i = 0;
491ac: 4282 clrl %d2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
491ae: 0686 ffff ffc7 addil #-57,%d6
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
491b4: 2a3c 0004 9106 movel #299270,%d5
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
491ba: 286e 0008 moveal %fp@(8),%a4
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
491be: 2652 moveal %a2@,%a3
/*
* Get the path length.
*/
pathlen = strlen( path );
491c0: 2f0c movel %a4,%sp@-
int IMFS_evaluate_for_make(
const char *path, /* IN */
rtems_filesystem_location_info_t *pathloc, /* IN/OUT */
const char **name /* OUT */
)
{
491c2: 2a6e 0010 moveal %fp@(16),%a5
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
491c6: 4eb9 0004 deac jsr 4deac <strlen>
491cc: 588f addql #4,%sp
491ce: 2800 movel %d0,%d4
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
491d0: 486e fffc pea %fp@(-4)
491d4: 2f06 movel %d6,%sp@-
491d6: 2f04 movel %d4,%sp@-
491d8: 4874 2800 pea %a4@(00000000,%d2:l)
491dc: 4eb9 0004 94c0 jsr 494c0 <IMFS_get_token>
pathlen -= len;
491e2: 2e2e fffc movel %fp@(-4),%d7
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
491e6: 2600 movel %d0,%d3
pathlen -= len;
491e8: 9887 subl %d7,%d4
i += len;
if ( !pathloc->node_access )
491ea: 4fef 0010 lea %sp@(16),%sp
491ee: 4a92 tstl %a2@
491f0: 6700 0154 beqw 49346 <IMFS_evaluate_for_make+0x1a8>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
491f4: 4a80 tstl %d0
491f6: 671c beqs 49214 <IMFS_evaluate_for_make+0x76>
if ( node->type == IMFS_DIRECTORY )
491f8: 7001 moveq #1,%d0
491fa: b0ab 0048 cmpl %a3@(72),%d0
491fe: 6614 bnes 49214 <IMFS_evaluate_for_make+0x76>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
49200: 4878 0001 pea 1 <ADD>
49204: 2f0a movel %a2,%sp@-
49206: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
4920c: 508f addql #8,%sp
4920e: 4a80 tstl %d0
49210: 6700 017c beqw 4938e <IMFS_evaluate_for_make+0x1f0>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
49214: 2652 moveal %a2@,%a3
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
49216: d487 addl %d7,%d2
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
49218: 7002 moveq #2,%d0
4921a: b083 cmpl %d3,%d0
4921c: 671a beqs 49238 <IMFS_evaluate_for_make+0x9a>
4921e: 6508 bcss 49228 <IMFS_evaluate_for_make+0x8a>
49220: 4a83 tstl %d3
49222: 6700 00e4 beqw 49308 <IMFS_evaluate_for_make+0x16a>
49226: 60a8 bras 491d0 <IMFS_evaluate_for_make+0x32>
49228: 7203 moveq #3,%d1
4922a: b283 cmpl %d3,%d1
4922c: 6740 beqs 4926e <IMFS_evaluate_for_make+0xd0>
4922e: 7004 moveq #4,%d0
49230: b083 cmpl %d3,%d0
49232: 669c bnes 491d0 <IMFS_evaluate_for_make+0x32> <== NEVER TAKEN
49234: 6000 00e2 braw 49318 <IMFS_evaluate_for_make+0x17a>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
49238: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
4923e: b7e8 0018 cmpal %a0@(24),%a3
49242: 678c beqs 491d0 <IMFS_evaluate_for_make+0x32>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
49244: 206a 0010 moveal %a2@(16),%a0
49248: b7e8 001c cmpal %a0@(28),%a3
4924c: 6612 bnes 49260 <IMFS_evaluate_for_make+0xc2>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
4924e: 4878 0014 pea 14 <OPER2>
49252: 260e movel %fp,%d3
49254: 4868 0008 pea %a0@(8)
49258: 0683 ffff ffe8 addil #-24,%d3
4925e: 605c bras 492bc <IMFS_evaluate_for_make+0x11e>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
49260: 266b 0008 moveal %a3@(8),%a3
49264: 4a8b tstl %a3
49266: 6600 009a bnew 49302 <IMFS_evaluate_for_make+0x164>
4926a: 6000 00da braw 49346 <IMFS_evaluate_for_make+0x1a8>
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4926e: 202b 0048 movel %a3@(72),%d0
49272: 7203 moveq #3,%d1
49274: b280 cmpl %d0,%d1
49276: 6706 beqs 4927e <IMFS_evaluate_for_make+0xe0>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
49278: 7204 moveq #4,%d1
4927a: b280 cmpl %d0,%d1
4927c: 6614 bnes 49292 <IMFS_evaluate_for_make+0xf4>
result = IMFS_evaluate_link( pathloc, 0 );
4927e: 42a7 clrl %sp@-
49280: 2045 moveal %d5,%a0
49282: 2f0a movel %a2,%sp@-
49284: 4e90 jsr %a0@
if ( result == -1 )
49286: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
49288: 2600 movel %d0,%d3
if ( result == -1 )
4928a: 70ff moveq #-1,%d0
4928c: b083 cmpl %d3,%d0
4928e: 6700 010c beqw 4939c <IMFS_evaluate_for_make+0x1fe>
return -1;
}
node = pathloc->node_access;
49292: 2052 moveal %a2@,%a0
if ( !node )
49294: 4a88 tstl %a0
49296: 6700 00d6 beqw 4936e <IMFS_evaluate_for_make+0x1d0>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4929a: 7001 moveq #1,%d0
4929c: b0a8 0048 cmpl %a0@(72),%d0
492a0: 6600 00cc bnew 4936e <IMFS_evaluate_for_make+0x1d0>
/*
* 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 ) {
492a4: 2268 0058 moveal %a0@(88),%a1
492a8: 4a89 tstl %a1
492aa: 6744 beqs 492f0 <IMFS_evaluate_for_make+0x152>
newloc = node->info.directory.mt_fs->mt_fs_root;
492ac: 4878 0014 pea 14 <OPER2>
492b0: 260e movel %fp,%d3
492b2: 0683 ffff ffe8 addil #-24,%d3
492b8: 4869 001c pea %a1@(28)
492bc: 2f03 movel %d3,%sp@-
492be: 47f9 0004 d300 lea 4d300 <memcpy>,%a3
492c4: 4e93 jsr %a3@
*pathloc = newloc;
492c6: 4878 0014 pea 14 <OPER2>
492ca: 2f03 movel %d3,%sp@-
492cc: 2f0a movel %a2,%sp@-
492ce: 4e93 jsr %a3@
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
492d0: 206a 000c moveal %a2@(12),%a0
492d4: 94ae fffc subl %fp@(-4),%d2
492d8: 2f0d movel %a5,%sp@-
492da: 2f0a movel %a2,%sp@-
492dc: 4874 2800 pea %a4@(00000000,%d2:l)
492e0: 2068 0004 moveal %a0@(4),%a0
492e4: 4e90 jsr %a0@
492e6: 4fef 0024 lea %sp@(36),%sp
492ea: 2600 movel %d0,%d3
492ec: 6000 00ae braw 4939c <IMFS_evaluate_for_make+0x1fe>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
492f0: 2f06 movel %d6,%sp@-
492f2: 2f08 movel %a0,%sp@-
492f4: 4eb9 0004 944c jsr 4944c <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
492fa: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
492fc: 2640 moveal %d0,%a3
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
492fe: 4a80 tstl %d0
49300: 6724 beqs 49326 <IMFS_evaluate_for_make+0x188>
done = true;
else
pathloc->node_access = node;
49302: 248b movel %a3,%a2@
49304: 6000 feca braw 491d0 <IMFS_evaluate_for_make+0x32>
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
49308: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4930e: 7c11 moveq #17,%d6
49310: 2040 moveal %d0,%a0
49312: 2086 movel %d6,%a0@
49314: 6000 0084 braw 4939a <IMFS_evaluate_for_make+0x1fc>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
49318: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4931e: 7a5b moveq #91,%d5
49320: 2040 moveal %d0,%a0
49322: 2085 movel %d5,%a0@
49324: 6074 bras 4939a <IMFS_evaluate_for_make+0x1fc>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
49326: 2002 movel %d2,%d0
49328: 90ae fffc subl %fp@(-4),%d0
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
4932c: 47f9 0004 3558 lea 43558 <rtems_filesystem_is_separator>,%a3
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
49332: d08c addl %a4,%d0
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
49334: d9c2 addal %d2,%a4
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
49336: 2a80 movel %d0,%a5@
/*
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
49338: 601a bras 49354 <IMFS_evaluate_for_make+0x1b6>
if ( !IMFS_is_separator( path[ i ] ) )
4933a: 49c0 extbl %d0
4933c: 2f00 movel %d0,%sp@-
4933e: 4e93 jsr %a3@
49340: 588f addql #4,%sp
49342: 4a80 tstl %d0
49344: 660e bnes 49354 <IMFS_evaluate_for_make+0x1b6>
rtems_set_errno_and_return_minus_one( ENOENT );
49346: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4934c: 7802 moveq #2,%d4
4934e: 2040 moveal %d0,%a0
49350: 2084 movel %d4,%a0@
49352: 6046 bras 4939a <IMFS_evaluate_for_make+0x1fc>
/*
* 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++) {
49354: 101c moveb %a4@+,%d0
49356: 66e2 bnes 4933a <IMFS_evaluate_for_make+0x19c>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
49358: 2f0a movel %a2,%sp@-
4935a: 4eb9 0004 8d5c jsr 48d5c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
49360: 2052 moveal %a2@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
49362: 2600 movel %d0,%d3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
49364: 588f addql #4,%sp
49366: 7001 moveq #1,%d0
49368: b0a8 0048 cmpl %a0@(72),%d0
4936c: 670e beqs 4937c <IMFS_evaluate_for_make+0x1de> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
4936e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
49374: 7614 moveq #20,%d3
49376: 2040 moveal %d0,%a0
49378: 2083 movel %d3,%a0@
4937a: 601e bras 4939a <IMFS_evaluate_for_make+0x1fc>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
4937c: 4878 0003 pea 3 <DIVIDE>
49380: 2f0a movel %a2,%sp@-
49382: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
49388: 508f addql #8,%sp
4938a: 4a80 tstl %d0
4938c: 660e bnes 4939c <IMFS_evaluate_for_make+0x1fe>
rtems_set_errno_and_return_minus_one( EACCES );
4938e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
49394: 740d moveq #13,%d2
49396: 2040 moveal %d0,%a0
49398: 2082 movel %d2,%a0@
4939a: 76ff moveq #-1,%d3
return result;
}
4939c: 2003 movel %d3,%d0
4939e: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
493a4: 4e5e unlk %fp <== NOT EXECUTED
00048e28 <IMFS_evaluate_hard_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
48e28: 7003 moveq #3,%d0
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
48e2a: 4e56 0000 linkw %fp,#0
48e2e: 2f0a movel %a2,%sp@-
48e30: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = node->node_access;
48e34: 2052 moveal %a2@,%a0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
48e36: b0a8 0048 cmpl %a0@(72),%d0
48e3a: 670c beqs 48e48 <IMFS_evaluate_hard_link+0x20> <== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
48e3c: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED
48e42: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
48e48: 24a8 004c movel %a0@(76),%a2@
IMFS_Set_handlers( node );
48e4c: 2f0a movel %a2,%sp@-
48e4e: 4eb9 0004 8d5c jsr 48d5c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
48e54: 2f2e 000c movel %fp@(12),%sp@-
48e58: 2f0a movel %a2,%sp@-
48e5a: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
48e60: 4fef 000c lea %sp@(12),%sp
48e64: 4a80 tstl %d0
48e66: 6610 bnes 48e78 <IMFS_evaluate_hard_link+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
48e68: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
48e6e: 2040 moveal %d0,%a0 <== NOT EXECUTED
48e70: 700d moveq #13,%d0 <== NOT EXECUTED
48e72: 2080 movel %d0,%a0@ <== NOT EXECUTED
48e74: 70ff moveq #-1,%d0 <== NOT EXECUTED
48e76: 6002 bras 48e7a <IMFS_evaluate_hard_link+0x52> <== NOT EXECUTED
return result;
48e78: 4280 clrl %d0
}
48e7a: 246e fffc moveal %fp@(-4),%a2
48e7e: 4e5e unlk %fp <== NOT EXECUTED
00048dca <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
48dca: 4e56 fff4 linkw %fp,#-12
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
48dce: 206e 0008 moveal %fp@(8),%a0
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
48dd2: 48d7 040c moveml %d2-%d3/%a2,%sp@
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
48dd6: 2450 moveal %a0@,%a2
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
48dd8: 242e 000c movel %fp@(12),%d2
}
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
48ddc: 4eb9 0004 98e0 jsr 498e0 <geteuid>
48de2: 3600 movew %d0,%d3
st_gid = getegid();
48de4: 4eb9 0004 98cc jsr 498cc <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
48dea: 4281 clrl %d1
48dec: 0283 0000 ffff andil #65535,%d3
48df2: 322a 0038 movew %a2@(56),%d1
48df6: b283 cmpl %d3,%d1
48df8: 6604 bnes 48dfe <IMFS_evaluate_permission+0x34>
flags_to_test <<= 6;
48dfa: ed8a lsll #6,%d2
48dfc: 6012 bras 48e10 <IMFS_evaluate_permission+0x46>
else if ( st_gid == jnode->st_gid )
48dfe: 4281 clrl %d1
48e00: 0280 0000 ffff andil #65535,%d0
48e06: 322a 003a movew %a2@(58),%d1
48e0a: b280 cmpl %d0,%d1
48e0c: 6602 bnes 48e10 <IMFS_evaluate_permission+0x46> <== NEVER TAKEN
flags_to_test <<= 3;
48e0e: e78a lsll #3,%d2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
48e10: 2002 movel %d2,%d0
48e12: c0aa 002e andl %a2@(46),%d0
return 1;
return 0;
48e16: b480 cmpl %d0,%d2
48e18: 57c0 seq %d0
}
48e1a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
48e20: 4e5e unlk %fp
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
48e22: 49c0 extbl %d0
}
48e24: 4480 negl %d0 <== NOT EXECUTED
0004906a <IMFS_evaluate_sym_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4906a: 7004 moveq #4,%d0
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4906c: 4e56 ffec linkw %fp,#-20
49070: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
49074: 246e 0008 moveal %fp@(8),%a2
49078: 262e 000c movel %fp@(12),%d3
IMFS_jnode_t *jnode = node->node_access;
4907c: 2652 moveal %a2@,%a3
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4907e: b0ab 0048 cmpl %a3@(72),%d0
49082: 6708 beqs 4908c <IMFS_evaluate_sym_link+0x22> <== ALWAYS TAKEN
rtems_fatal_error_occurred (0xABCD0000);
49084: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED
4908a: 600c bras 49098 <IMFS_evaluate_sym_link+0x2e> <== NOT EXECUTED
if ( !jnode->Parent )
4908c: 202b 0008 movel %a3@(8),%d0
49090: 660c bnes 4909e <IMFS_evaluate_sym_link+0x34> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xBAD00000 );
49092: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED
49098: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
4909e: 2480 movel %d0,%a2@
rtems_filesystem_get_sym_start_loc(
490a0: 2f0a movel %a2,%sp@-
490a2: 486e fffc pea %fp@(-4)
490a6: 2f2b 004c movel %a3@(76),%sp@-
490aa: 4eb9 0004 9d50 jsr 49d50 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
490b0: 242b 004c movel %a3@(76),%d2
490b4: d4ae fffc addl %fp@(-4),%d2
490b8: 2f02 movel %d2,%sp@-
490ba: 4eb9 0004 deac jsr 4deac <strlen>
490c0: 2e8a movel %a2,%sp@
490c2: 2f03 movel %d3,%sp@-
490c4: 2f00 movel %d0,%sp@-
490c6: 2f02 movel %d2,%sp@-
490c8: 4eb9 0004 8e82 jsr 48e82 <IMFS_eval_path>
490ce: 2400 movel %d0,%d2
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
490d0: 2f0a movel %a2,%sp@-
490d2: 4eb9 0004 8d5c jsr 48d5c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
490d8: 4fef 001c lea %sp@(28),%sp
490dc: 2e83 movel %d3,%sp@
490de: 2f0a movel %a2,%sp@-
490e0: 4eb9 0004 8dca jsr 48dca <IMFS_evaluate_permission>
490e6: 508f addql #8,%sp
490e8: 4a80 tstl %d0
490ea: 660e bnes 490fa <IMFS_evaluate_sym_link+0x90> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
490ec: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
490f2: 74ff moveq #-1,%d2 <== NOT EXECUTED
490f4: 2040 moveal %d0,%a0 <== NOT EXECUTED
490f6: 700d moveq #13,%d0 <== NOT EXECUTED
490f8: 2080 movel %d0,%a0@ <== NOT EXECUTED
return result;
}
490fa: 2002 movel %d2,%d0
490fc: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
49102: 4e5e unlk %fp <== NOT EXECUTED
0004c170 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4c170: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
4c174: 206e 0008 moveal %fp@(8),%a0
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4c178: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
4c17a: 2450 moveal %a0@,%a2
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4c17c: 2f02 movel %d2,%sp@-
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4c17e: 4282 clrl %d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4c180: 4eb9 0004 98e0 jsr 498e0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4c186: 4281 clrl %d1
4c188: 3400 movew %d0,%d2
4c18a: 322a 0038 movew %a2@(56),%d1
4c18e: b282 cmpl %d2,%d1
4c190: 6714 beqs 4c1a6 <IMFS_fchmod+0x36> <== ALWAYS TAKEN
4c192: 4a40 tstw %d0 <== NOT EXECUTED
4c194: 6710 beqs 4c1a6 <IMFS_fchmod+0x36> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
4c196: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4c19c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4c19e: 7001 moveq #1,%d0 <== NOT EXECUTED
4c1a0: 2080 movel %d0,%a0@ <== NOT EXECUTED
4c1a2: 70ff moveq #-1,%d0 <== NOT EXECUTED
4c1a4: 6030 bras 4c1d6 <IMFS_fchmod+0x66> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4c1a6: 202a 002e movel %a2@(46),%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4c1aa: 222e 000c movel %fp@(12),%d1
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4c1ae: 0280 ffff f000 andil #-4096,%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4c1b4: 0281 0000 0fff andil #4095,%d1
4c1ba: 8280 orl %d0,%d1
4c1bc: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
4c1c0: 42a7 clrl %sp@-
4c1c2: 486e fff8 pea %fp@(-8)
4c1c6: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
4c1cc: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4c1d2: 508f addql #8,%sp
4c1d4: 4280 clrl %d0
}
4c1d6: 242e fff0 movel %fp@(-16),%d2
4c1da: 246e fff4 moveal %fp@(-12),%a2
4c1de: 4e5e unlk %fp
...
0004288a <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
4288a: 4e56 fff4 linkw %fp,#-12
4288e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
42892: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
42896: 266a 0018 moveal %a2@(24),%a3
int err = pipe_release(&JNODE2PIPE(jnode), iop);
4289a: 2f0a movel %a2,%sp@-
4289c: 486b 004c pea %a3@(76)
428a0: 4eb9 0004 ac5a jsr 4ac5a <pipe_release>
if (err == 0) {
428a6: 508f addql #8,%sp
rtems_libio_t *iop
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
428a8: 2400 movel %d0,%d2
if (err == 0) {
428aa: 6616 bnes 428c2 <IMFS_fifo_close+0x38> <== NEVER TAKEN
iop->flags &= ~LIBIO_FLAGS_OPEN;
428ac: 203c ffff feff movel #-257,%d0
428b2: c1aa 0014 andl %d0,%a2@(20)
IMFS_check_node_remove(jnode);
428b6: 2f0b movel %a3,%sp@-
428b8: 4eb9 0004 2e70 jsr 42e70 <IMFS_check_node_remove>
428be: 588f addql #4,%sp
428c0: 6012 bras 428d4 <IMFS_fifo_close+0x4a>
}
IMFS_FIFO_RETURN(err);
428c2: 4a80 tstl %d0 <== NOT EXECUTED
428c4: 6c0e bges 428d4 <IMFS_fifo_close+0x4a> <== NOT EXECUTED
428c6: 4eb9 0004 e314 jsr 4e314 <__errno> <== NOT EXECUTED
428cc: 4482 negl %d2 <== NOT EXECUTED
428ce: 2040 moveal %d0,%a0 <== NOT EXECUTED
428d0: 2082 movel %d2,%a0@ <== NOT EXECUTED
428d2: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
428d4: 2002 movel %d2,%d0
428d6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
428dc: 4e5e unlk %fp <== NOT EXECUTED
00042754 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
42754: 4e56 0000 linkw %fp,#0
42758: 206e 0008 moveal %fp@(8),%a0
4275c: 202e 000c movel %fp@(12),%d0
42760: 226e 0010 moveal %fp@(16),%a1
42764: 2f02 movel %d2,%sp@-
int err;
if (command == FIONBIO) {
42766: 0c80 8004 667e cmpil #-2147195266,%d0
4276c: 661a bnes 42788 <IMFS_fifo_ioctl+0x34>
if (buffer == NULL)
4276e: 4a89 tstl %a1
42770: 6734 beqs 427a6 <IMFS_fifo_ioctl+0x52>
err = -EFAULT;
else {
if (*(int *)buffer)
42772: 4a91 tstl %a1@
42774: 6708 beqs 4277e <IMFS_fifo_ioctl+0x2a>
iop->flags |= LIBIO_FLAGS_NO_DELAY;
42776: 7001 moveq #1,%d0
42778: 81a8 0014 orl %d0,%a0@(20)
4277c: 6006 bras 42784 <IMFS_fifo_ioctl+0x30>
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4277e: 70fe moveq #-2,%d0
42780: c1a8 0014 andl %d0,%a0@(20)
return 0;
42784: 4282 clrl %d2
42786: 602e bras 427b6 <IMFS_fifo_ioctl+0x62>
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
42788: 2f08 movel %a0,%sp@-
4278a: 2f09 movel %a1,%sp@-
4278c: 2f00 movel %d0,%sp@-
4278e: 2068 0018 moveal %a0@(24),%a0
42792: 2f28 004c movel %a0@(76),%sp@-
42796: 4eb9 0004 b360 jsr 4b360 <pipe_ioctl>
IMFS_FIFO_RETURN(err);
4279c: 4fef 0010 lea %sp@(16),%sp
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
427a0: 2400 movel %d0,%d2
IMFS_FIFO_RETURN(err);
427a2: 6c12 bges 427b6 <IMFS_fifo_ioctl+0x62> <== NEVER TAKEN
427a4: 6002 bras 427a8 <IMFS_fifo_ioctl+0x54>
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
427a6: 74f2 moveq #-14,%d2
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
427a8: 4eb9 0004 e314 jsr 4e314 <__errno>
427ae: 4482 negl %d2
427b0: 2040 moveal %d0,%a0
427b2: 2082 movel %d2,%a0@
427b4: 74ff moveq #-1,%d2
}
427b6: 2002 movel %d2,%d0
427b8: 242e fffc movel %fp@(-4),%d2
427bc: 4e5e unlk %fp <== NOT EXECUTED
000426fc <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
426fc: 4e56 0000 linkw %fp,#0
42700: 206e 0008 moveal %fp@(8),%a0
42704: 2f03 movel %d3,%sp@-
42706: 2f02 movel %d2,%sp@-
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
42708: 2f08 movel %a0,%sp@-
4270a: 2f2e 0014 movel %fp@(20),%sp@-
4270e: 2f2e 0010 movel %fp@(16),%sp@-
42712: 2f2e 000c movel %fp@(12),%sp@-
42716: 2068 0018 moveal %a0@(24),%a0
4271a: 2f28 004c movel %a0@(76),%sp@-
4271e: 4eb9 0004 b3c0 jsr 4b3c0 <pipe_lseek>
IMFS_FIFO_RETURN(err);
42724: 4fef 0014 lea %sp@(20),%sp
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
42728: 2600 movel %d0,%d3
4272a: 2400 movel %d0,%d2
4272c: 5bc1 smi %d1
4272e: 49c1 extbl %d1
IMFS_FIFO_RETURN(err);
42730: 4a81 tstl %d1
42732: 6a10 bpls 42744 <IMFS_fifo_lseek+0x48> <== NEVER TAKEN
42734: 4eb9 0004 e314 jsr 4e314 <__errno>
4273a: 4483 negl %d3
4273c: 2040 moveal %d0,%a0
4273e: 72ff moveq #-1,%d1
42740: 74ff moveq #-1,%d2
42742: 2083 movel %d3,%a0@
}
42744: 2001 movel %d1,%d0
42746: 2202 movel %d2,%d1
42748: 242e fff8 movel %fp@(-8),%d2
4274c: 262e fffc movel %fp@(-4),%d3
42750: 4e5e unlk %fp <== NOT EXECUTED
000427c0 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
427c0: 4e56 fff8 linkw %fp,#-8
427c4: 206e 0008 moveal %fp@(8),%a0
427c8: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
427ca: 2468 0018 moveal %a0@(24),%a2
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
427ce: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
427d0: 2f08 movel %a0,%sp@-
427d2: 2f2e 0010 movel %fp@(16),%sp@-
427d6: 2f2e 000c movel %fp@(12),%sp@-
427da: 2f2a 004c movel %a2@(76),%sp@-
427de: 4eb9 0004 b1ce jsr 4b1ce <pipe_write>
if (err > 0) {
427e4: 4fef 0010 lea %sp@(16),%sp
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
427e8: 2400 movel %d0,%d2
if (err > 0) {
427ea: 6f1c bles 42808 <IMFS_fifo_write+0x48> <== NEVER TAKEN
IMFS_mtime_ctime_update(jnode);
427ec: 42a7 clrl %sp@-
427ee: 486e fff8 pea %fp@(-8)
427f2: 4eb9 0004 3860 jsr 43860 <gettimeofday>
427f8: 202e fff8 movel %fp@(-8),%d0
427fc: 508f addql #8,%sp
427fe: 2540 0040 movel %d0,%a2@(64)
42802: 2540 0044 movel %d0,%a2@(68)
42806: 6012 bras 4281a <IMFS_fifo_write+0x5a>
}
IMFS_FIFO_RETURN(err);
42808: 4a80 tstl %d0
4280a: 670e beqs 4281a <IMFS_fifo_write+0x5a> <== NEVER TAKEN
4280c: 4eb9 0004 e314 jsr 4e314 <__errno>
42812: 4482 negl %d2
42814: 2040 moveal %d0,%a0
42816: 2082 movel %d2,%a0@
42818: 74ff moveq #-1,%d2
}
4281a: 2002 movel %d2,%d0
4281c: 242e fff0 movel %fp@(-16),%d2
42820: 246e fff4 moveal %fp@(-12),%a2
42824: 4e5e unlk %fp <== NOT EXECUTED
0004944c <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4944c: 4e56 fff0 linkw %fp,#-16
49450: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
49454: 246e 0008 moveal %fp@(8),%a2
49458: 242e 000c movel %fp@(12),%d2
#if defined(RTEMS_DEBUG)
assert( directory );
assert( name );
#endif
if ( !name )
4945c: 674e beqs 494ac <IMFS_find_match_in_dir+0x60> <== NEVER TAKEN
return 0;
if ( !directory )
4945e: 4a8a tstl %a2
49460: 6750 beqs 494b2 <IMFS_find_match_in_dir+0x66> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
49462: 4879 0005 b42c pea 5b42c <dotname>
49468: 49f9 0004 d954 lea 4d954 <strcmp>,%a4
4946e: 2f02 movel %d2,%sp@-
49470: 4e94 jsr %a4@
49472: 508f addql #8,%sp
49474: 4a80 tstl %d0
49476: 673a beqs 494b2 <IMFS_find_match_in_dir+0x66> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
49478: 4879 0005 b42e pea 5b42e <dotdotname>
4947e: 2f02 movel %d2,%sp@-
49480: 4e94 jsr %a4@
49482: 508f addql #8,%sp
49484: 4a80 tstl %d0
49486: 6606 bnes 4948e <IMFS_find_match_in_dir+0x42> <== ALWAYS TAKEN
return directory->Parent;
49488: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
4948c: 6024 bras 494b2 <IMFS_find_match_in_dir+0x66> <== NOT EXECUTED
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
4948e: 266a 004c moveal %a2@(76),%a3
49492: 45ea 0050 lea %a2@(80),%a2
49496: 6010 bras 494a8 <IMFS_find_match_in_dir+0x5c>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
if ( !strcmp( name, the_jnode->name ) )
49498: 486b 000c pea %a3@(12)
4949c: 2f02 movel %d2,%sp@-
4949e: 4e94 jsr %a4@
494a0: 508f addql #8,%sp
494a2: 4a80 tstl %d0
494a4: 670a beqs 494b0 <IMFS_find_match_in_dir+0x64>
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
494a6: 2653 moveal %a3@,%a3
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
494a8: b5cb cmpal %a3,%a2
494aa: 66ec bnes 49498 <IMFS_find_match_in_dir+0x4c>
#if defined(RTEMS_DEBUG)
assert( directory );
assert( name );
#endif
if ( !name )
return 0;
494ac: 95ca subal %a2,%a2
494ae: 6002 bras 494b2 <IMFS_find_match_in_dir+0x66>
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;
494b0: 244b moveal %a3,%a2
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
494b2: 200a movel %a2,%d0
494b4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
494ba: 4e5e unlk %fp
...
000493a8 <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
)
{
493a8: 4e56 ffd8 linkw %fp,#-40
493ac: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
493b0: 266e 0008 moveal %fp@(8),%a3
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
493b4: 240e movel %fp,%d2
493b6: 0682 ffff ffec addil #-20,%d2
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
493bc: 49f9 0004 8d5c lea 48d5c <IMFS_Set_handlers>,%a4
/*
* 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;
493c2: 246b 001c moveal %a3@(28),%a2
loc = temp_mt_entry->mt_fs_root;
493c6: 4878 0014 pea 14 <OPER2>
493ca: 486b 001c pea %a3@(28)
493ce: 2f02 movel %d2,%sp@-
493d0: 4eb9 0004 d300 jsr 4d300 <memcpy>
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
493d6: 4fef 000c lea %sp@(12),%sp
493da: 42ab 001c clrl %a3@(28)
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
493de: 47f9 0004 2160 lea 42160 <IMFS_unlink>,%a3
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
493e4: 262a 0008 movel %a2@(8),%d3
loc.node_access = (void *)jnode;
493e8: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
493ec: 2f02 movel %d2,%sp@-
493ee: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
493f0: 588f addql #4,%sp
493f2: 7001 moveq #1,%d0
493f4: b0aa 0048 cmpl %a2@(72),%d0
493f8: 660e bnes 49408 <IMFS_fsunmount+0x60>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
493fa: 200a movel %a2,%d0
493fc: 0680 0000 0050 addil #80,%d0
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
49402: b0aa 004c cmpl %a2@(76),%d0
49406: 660e bnes 49416 <IMFS_fsunmount+0x6e>
result = IMFS_unlink( NULL, &loc );
49408: 2f02 movel %d2,%sp@-
4940a: 42a7 clrl %sp@-
4940c: 4e93 jsr %a3@
if (result != 0)
4940e: 508f addql #8,%sp
49410: 4a80 tstl %d0
49412: 6626 bnes 4943a <IMFS_fsunmount+0x92> <== NEVER TAKEN
return -1;
jnode = next;
49414: 2443 moveal %d3,%a2
}
if ( jnode != NULL ) {
49416: 4a8a tstl %a2
49418: 6724 beqs 4943e <IMFS_fsunmount+0x96>
if ( jnode->type == IMFS_DIRECTORY ) {
4941a: 7001 moveq #1,%d0
4941c: b0aa 0048 cmpl %a2@(72),%d0
49420: 66c2 bnes 493e4 <IMFS_fsunmount+0x3c> <== NEVER TAKEN
49422: 200a movel %a2,%d0
49424: 0680 0000 0050 addil #80,%d0
if ( jnode_has_children( jnode ) )
4942a: b0aa 004c cmpl %a2@(76),%d0
4942e: 67b4 beqs 493e4 <IMFS_fsunmount+0x3c>
jnode = jnode_get_first_child( jnode );
49430: 246a 004c moveal %a2@(76),%a2
}
}
} while (jnode != NULL);
49434: 4a8a tstl %a2
49436: 66ac bnes 493e4 <IMFS_fsunmount+0x3c> <== ALWAYS TAKEN
49438: 6004 bras 4943e <IMFS_fsunmount+0x96> <== NOT EXECUTED
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
4943a: 70ff moveq #-1,%d0 <== NOT EXECUTED
4943c: 6002 bras 49440 <IMFS_fsunmount+0x98> <== NOT EXECUTED
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
return 0;
4943e: 4280 clrl %d0
}
49440: 4cee 1c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a4
49446: 4e5e unlk %fp
...
000494c0 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
494c0: 4e56 ffe4 linkw %fp,#-28
494c4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
494c8: 246e 0010 moveal %fp@(16),%a2
register int i = 0;
494cc: 4283 clrl %d3
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
494ce: 284a moveal %a2,%a4
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
494d0: 4bf9 0004 3558 lea 43558 <rtems_filesystem_is_separator>,%a5
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
494d6: 266e 0008 moveal %fp@(8),%a3
const char *path,
int pathlen,
char *token,
int *token_len
)
{
494da: 282e 000c movel %fp@(12),%d4
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
494de: 141b moveb %a3@+,%d2
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
494e0: 600c bras 494ee <IMFS_get_token+0x2e>
token[i] = c;
if ( i == IMFS_NAME_MAX )
494e2: 7020 moveq #32,%d0
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
494e4: 18c2 moveb %d2,%a4@+
if ( i == IMFS_NAME_MAX )
494e6: b083 cmpl %d3,%d0
494e8: 6772 beqs 4955c <IMFS_get_token+0x9c>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
494ea: 5283 addql #1,%d3
494ec: 141b moveb %a3@+,%d2
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
494ee: 1002 moveb %d2,%d0
494f0: 49c0 extbl %d0
494f2: 2f00 movel %d0,%sp@-
494f4: 4e95 jsr %a5@
494f6: 588f addql #4,%sp
494f8: 4a80 tstl %d0
494fa: 6604 bnes 49500 <IMFS_get_token+0x40>
494fc: b883 cmpl %d3,%d4
494fe: 6ee2 bgts 494e2 <IMFS_get_token+0x22>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
49500: 4a83 tstl %d3
49502: 660a bnes 4950e <IMFS_get_token+0x4e>
token[i] = c;
49504: 1482 moveb %d2,%a2@
if ( (token[i] != '\0') && pathlen ) {
49506: 6714 beqs 4951c <IMFS_get_token+0x5c>
49508: 4a84 tstl %d4
4950a: 6614 bnes 49520 <IMFS_get_token+0x60>
4950c: 600e bras 4951c <IMFS_get_token+0x5c>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
4950e: 4a32 38ff tstb %a2@(ffffffff,%d3:l)
49512: 6712 beqs 49526 <IMFS_get_token+0x66> <== NEVER TAKEN
token[i] = '\0';
49514: 4200 clrb %d0
49516: 1580 3800 moveb %d0,%a2@(00000000,%d3:l)
4951a: 600a bras 49526 <IMFS_get_token+0x66>
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
4951c: 4282 clrl %d2
4951e: 6008 bras 49528 <IMFS_get_token+0x68>
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
49520: 7401 moveq #1,%d2
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
49522: 7601 moveq #1,%d3
49524: 6002 bras 49528 <IMFS_get_token+0x68>
char *token,
int *token_len
)
{
register int i = 0;
IMFS_token_types type = IMFS_NAME;
49526: 7403 moveq #3,%d2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
49528: 206e 0014 moveal %fp@(20),%a0
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
4952c: 7003 moveq #3,%d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4952e: 2083 movel %d3,%a0@
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
49530: b082 cmpl %d2,%d0
49532: 6632 bnes 49566 <IMFS_get_token+0xa6>
if ( strcmp( token, "..") == 0 )
49534: 4879 0005 b431 pea 5b431 <dotdotname+0x3>
4953a: 47f9 0004 d954 lea 4d954 <strcmp>,%a3
49540: 2f0a movel %a2,%sp@-
49542: 4e93 jsr %a3@
49544: 508f addql #8,%sp
49546: 4a80 tstl %d0
49548: 6716 beqs 49560 <IMFS_get_token+0xa0>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4954a: 4879 0005 b432 pea 5b432 <dotdotname+0x4>
49550: 2f0a movel %a2,%sp@-
49552: 4e93 jsr %a3@
49554: 508f addql #8,%sp
49556: 4a80 tstl %d0
49558: 670a beqs 49564 <IMFS_get_token+0xa4>
4955a: 600a bras 49566 <IMFS_get_token+0xa6>
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
4955c: 7404 moveq #4,%d2
4955e: 6006 bras 49566 <IMFS_get_token+0xa6>
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
49560: 7402 moveq #2,%d2
49562: 6002 bras 49566 <IMFS_get_token+0xa6>
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
49564: 7401 moveq #1,%d2
}
return type;
}
49566: 2002 movel %d2,%d0
49568: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4956e: 4e5e unlk %fp
...
00041d80 <IMFS_initialize_support>:
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
41d80: 307c 0006 moveaw #6,%a0
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
41d84: 7210 moveq #16,%d1
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
41d86: 4e56 fff4 linkw %fp,#-12
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
41d8a: 2039 0005 c0e8 movel 5c0e8 <imfs_rq_memfile_bytes_per_block>,%d0
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
41d90: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
41d94: 246e 0008 moveal %fp@(8),%a2
41d98: 242e 0014 movel %fp@(20),%d2
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
41d9c: b081 cmpl %d1,%d0
41d9e: 670e beqs 41dae <IMFS_initialize_support+0x2e>
41da0: 5388 subql #1,%a0
41da2: d281 addl %d1,%d1
41da4: 4a88 tstl %a0
41da6: 66f4 bnes 41d9c <IMFS_initialize_support+0x1c> <== ALWAYS TAKEN
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
41da8: 203c 0000 0080 movel #128,%d0 <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
41dae: 23c0 0005 cff4 movel %d0,5cff4 <imfs_memfile_bytes_per_block>
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
41db4: 4eb9 0004 8d22 jsr 48d22 <IMFS_create_root_node>
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
temp_mt_entry->mt_fs_root.ops = op_table;
41dba: 256e 000c 0028 movel %fp@(12),%a2@(40)
/*
* Create the root node
*
* NOTE: UNIX root is 755 and owned by root/root (0/0).
*/
temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
41dc0: 2640 moveal %d0,%a3
41dc2: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
41dc6: 2542 0024 movel %d2,%a2@(36)
temp_mt_entry->mt_fs_root.ops = op_table;
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
41dca: 4878 0030 pea 30 <OPER2+0x1c>
41dce: 4879 0005 b3fc pea 5b3fc <IMFS_LIMITS_AND_OPTIONS>
41dd4: 486a 0038 pea %a2@(56)
41dd8: 4eb9 0004 d300 jsr 4d300 <memcpy>
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
41dde: 4878 0014 pea 14 <OPER2>
41de2: 4878 0001 pea 1 <ADD>
41de6: 4eb9 0004 2444 jsr 42444 <calloc>
if ( !fs_info ) {
41dec: 4fef 0014 lea %sp@(20),%sp
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
41df0: 2040 moveal %d0,%a0
if ( !fs_info ) {
41df2: 4a80 tstl %d0
41df4: 661a bnes 41e10 <IMFS_initialize_support+0x90> <== ALWAYS TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
41df6: 2f0b movel %a3,%sp@- <== NOT EXECUTED
41df8: 4eb9 0004 2830 jsr 42830 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
41dfe: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
41e04: 588f addql #4,%sp <== NOT EXECUTED
41e06: 2040 moveal %d0,%a0 <== NOT EXECUTED
41e08: 700c moveq #12,%d0 <== NOT EXECUTED
41e0a: 2080 movel %d0,%a0@ <== NOT EXECUTED
41e0c: 70ff moveq #-1,%d0 <== NOT EXECUTED
41e0e: 6030 bras 41e40 <IMFS_initialize_support+0xc0> <== NOT EXECUTED
}
temp_mt_entry->fs_info = fs_info;
41e10: 2540 0034 movel %d0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
41e14: 2039 0005 cff8 movel 5cff8 <imfs_instance.5838>,%d0
41e1a: 2080 movel %d0,%a0@
41e1c: 5280 addql #1,%d0
41e1e: 23c0 0005 cff8 movel %d0,5cff8 <imfs_instance.5838>
fs_info->ino_count = 1;
41e24: 7001 moveq #1,%d0
fs_info->memfile_handlers = memfile_handlers;
41e26: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
41e2c: 216e 0018 0010 movel %fp@(24),%a0@(16)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
41e32: 2140 0004 movel %d0,%a0@(4)
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
41e36: 2142 000c movel %d2,%a0@(12)
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
41e3a: 2740 0034 movel %d0,%a3@(52)
return 0;
41e3e: 4200 clrb %d0
}
41e40: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
41e46: 4e5e unlk %fp
...
00041e4c <IMFS_link>:
/*
* 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 )
41e4c: 4280 clrl %d0
41e4e: 7207 moveq #7,%d1
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
41e50: 4e56 ffbc linkw %fp,#-68
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
41e54: 206e 0008 moveal %fp@(8),%a0
41e58: 2050 moveal %a0@,%a0
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
41e5a: 2f03 movel %d3,%sp@-
41e5c: 262e 0010 movel %fp@(16),%d3
/*
* 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 )
41e60: 3028 0032 movew %a0@(50),%d0
int IMFS_link(
rtems_filesystem_location_info_t *to_loc, /* IN */
rtems_filesystem_location_info_t *parent_loc, /* IN */
const char *token /* IN */
)
{
41e64: 2f02 movel %d2,%sp@-
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
41e66: 2d48 ffe0 movel %a0,%fp@(-32)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
41e6a: b280 cmpl %d0,%d1
41e6c: 640e bccs 41e7c <IMFS_link+0x30>
rtems_set_errno_and_return_minus_one( EMLINK );
41e6e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
41e74: 721f moveq #31,%d1
41e76: 2040 moveal %d0,%a0
41e78: 2081 movel %d1,%a0@
41e7a: 6050 bras 41ecc <IMFS_link+0x80>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
41e7c: 2f03 movel %d3,%sp@-
41e7e: 240e movel %fp,%d2
41e80: 0682 ffff ffbf addil #-65,%d2
41e86: 4eb9 0004 deac jsr 4deac <strlen>
41e8c: 588f addql #4,%sp
41e8e: 486e fffc pea %fp@(-4)
41e92: 2f02 movel %d2,%sp@-
41e94: 2f00 movel %d0,%sp@-
41e96: 2f03 movel %d3,%sp@-
41e98: 4eb9 0004 94c0 jsr 494c0 <IMFS_get_token>
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
41e9e: 486e ffe0 pea %fp@(-32)
41ea2: 2f3c 0000 a1ff movel #41471,%sp@-
41ea8: 2f02 movel %d2,%sp@-
41eaa: 4878 0003 pea 3 <DIVIDE>
41eae: 2f2e 000c movel %fp@(12),%sp@-
41eb2: 4eb9 0004 8c1a jsr 48c1a <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
41eb8: 4fef 0024 lea %sp@(36),%sp
41ebc: 4a80 tstl %d0
41ebe: 6610 bnes 41ed0 <IMFS_link+0x84> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
41ec0: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
41ec6: 2040 moveal %d0,%a0 <== NOT EXECUTED
41ec8: 700c moveq #12,%d0 <== NOT EXECUTED
41eca: 2080 movel %d0,%a0@ <== NOT EXECUTED
41ecc: 70ff moveq #-1,%d0
41ece: 6028 bras 41ef8 <IMFS_link+0xac>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
41ed0: 206e ffe0 moveal %fp@(-32),%a0
41ed4: 3028 0032 movew %a0@(50),%d0
41ed8: 5280 addql #1,%d0
41eda: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( info.hard_link.link_node );
41ede: 42a7 clrl %sp@-
41ee0: 486e fff4 pea %fp@(-12)
41ee4: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
41eea: 206e ffe0 moveal %fp@(-32),%a0
return 0;
41eee: 508f addql #8,%sp
41ef0: 4280 clrl %d0
/*
* 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 );
41ef2: 216e fff4 0044 movel %fp@(-12),%a0@(68)
return 0;
}
41ef8: 242e ffb4 movel %fp@(-76),%d2
41efc: 262e ffb8 movel %fp@(-72),%d3
41f00: 4e5e unlk %fp <== NOT EXECUTED
0004b67a <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4b67a: 4e56 0000 linkw %fp,#0
4b67e: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4b680: 4878 0001 pea 1 <ADD>
4b684: 2f2e 000c movel %fp@(12),%sp@-
4b688: 2f2e 0008 movel %fp@(8),%sp@-
4b68c: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
4b692: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4b696: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
4b698: 4a92 tstl %a2@
4b69a: 660c bnes 4b6a8 <IMFS_memfile_addblock+0x2e>
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
4b69c: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !memory )
4b6a2: 4a80 tstl %d0
4b6a4: 6706 beqs 4b6ac <IMFS_memfile_addblock+0x32> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
4b6a6: 2480 movel %d0,%a2@
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
return 0;
4b6a8: 4280 clrl %d0
4b6aa: 6002 bras 4b6ae <IMFS_memfile_addblock+0x34>
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
4b6ac: 7001 moveq #1,%d0 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
4b6ae: 246e fffc moveal %fp@(-4),%a2
4b6b2: 4e5e unlk %fp <== NOT EXECUTED
0004b82c <IMFS_memfile_extend>:
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b82c: 4280 clrl %d0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4b82e: 4e56 ffdc linkw %fp,#-36
4b832: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b836: 2c39 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d6
4b83c: 2a06 movel %d6,%d5
4b83e: e48d lsrl #2,%d5
4b840: 2805 movel %d5,%d4
4b842: 5284 addql #1,%d4
4b844: 4c05 4800 mulsl %d5,%d4
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4b848: 242e 000c movel %fp@(12),%d2
4b84c: 262e 0010 movel %fp@(16),%d3
4b850: 246e 0008 moveal %fp@(8),%a2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4b854: 5284 addql #1,%d4
4b856: 4c05 4800 mulsl %d5,%d4
4b85a: 5384 subql #1,%d4
4b85c: 4c06 4800 mulsl %d6,%d4
4b860: 2204 movel %d4,%d1
4b862: 2802 movel %d2,%d4
4b864: 2a03 movel %d3,%d5
4b866: 9a81 subl %d1,%d5
4b868: 9980 subxl %d0,%d4
4b86a: 6d0e blts 4b87a <IMFS_memfile_extend+0x4e>
rtems_set_errno_and_return_minus_one( EINVAL );
4b86c: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4b872: 7416 moveq #22,%d2
4b874: 2040 moveal %d0,%a0
4b876: 2082 movel %d2,%a0@
4b878: 6078 bras 4b8f2 <IMFS_memfile_extend+0xc6>
if ( new_length <= the_jnode->info.file.size )
4b87a: 282a 004c movel %a2@(76),%d4
4b87e: 2a2a 0050 movel %a2@(80),%d5
4b882: 2002 movel %d2,%d0
4b884: 2203 movel %d3,%d1
4b886: 9285 subl %d5,%d1
4b888: 9184 subxl %d4,%d0
4b88a: 6f78 bles 4b904 <IMFS_memfile_extend+0xd8>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b88c: 47f9 0005 87e8 lea 587e8 <__divdi3>,%a3
4b892: 2e06 movel %d6,%d7
4b894: 5bc6 smi %d6
4b896: 49c6 extbl %d6
4b898: 2f07 movel %d7,%sp@-
4b89a: 2f06 movel %d6,%sp@-
4b89c: 2f03 movel %d3,%sp@-
4b89e: 2f02 movel %d2,%sp@-
4b8a0: 4e93 jsr %a3@
4b8a2: 4fef 0010 lea %sp@(16),%sp
4b8a6: 2841 moveal %d1,%a4
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b8a8: 2f07 movel %d7,%sp@-
4b8aa: 2f06 movel %d6,%sp@-
4b8ac: 2f05 movel %d5,%sp@-
4b8ae: 2f04 movel %d4,%sp@-
4b8b0: 4e93 jsr %a3@
4b8b2: 4fef 0010 lea %sp@(16),%sp
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4b8b6: 47f9 0004 b67a lea 4b67a <IMFS_memfile_addblock>,%a3
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b8bc: 2c01 movel %d1,%d6
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4b8be: 2801 movel %d1,%d4
4b8c0: 6036 bras 4b8f8 <IMFS_memfile_extend+0xcc>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4b8c2: 2f04 movel %d4,%sp@-
4b8c4: 2f0a movel %a2,%sp@-
4b8c6: 4e93 jsr %a3@
4b8c8: 508f addql #8,%sp
4b8ca: 4a80 tstl %d0
4b8cc: 6728 beqs 4b8f6 <IMFS_memfile_extend+0xca> <== ALWAYS TAKEN
4b8ce: 600c bras 4b8dc <IMFS_memfile_extend+0xb0> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
4b8d0: 2f04 movel %d4,%sp@- <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
4b8d2: 5384 subql #1,%d4 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4b8d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4b8d6: 4e93 jsr %a3@ <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
4b8d8: 508f addql #8,%sp <== NOT EXECUTED
4b8da: 6006 bras 4b8e2 <IMFS_memfile_extend+0xb6> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4b8dc: 47f9 0004 b7fa lea 4b7fa <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
4b8e2: bc84 cmpl %d4,%d6 <== NOT EXECUTED
4b8e4: 63ea blss 4b8d0 <IMFS_memfile_extend+0xa4> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4b8e6: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4b8ec: 721c moveq #28,%d1 <== NOT EXECUTED
4b8ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b8f0: 2081 movel %d1,%a0@ <== NOT EXECUTED
4b8f2: 70ff moveq #-1,%d0
4b8f4: 6010 bras 4b906 <IMFS_memfile_extend+0xda>
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4b8f6: 5284 addql #1,%d4
4b8f8: b9c4 cmpal %d4,%a4
4b8fa: 64c6 bccs 4b8c2 <IMFS_memfile_extend+0x96>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4b8fc: 2542 004c movel %d2,%a2@(76)
4b900: 2543 0050 movel %d3,%a2@(80)
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
return 0;
4b904: 4280 clrl %d0
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4b906: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
4b90c: 4e5e unlk %fp <== NOT EXECUTED
0004b338 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4b338: 4e56 fff0 linkw %fp,#-16
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4b33c: 2039 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d0
4b342: e488 lsrl #2,%d0
4b344: 2200 movel %d0,%d1
4b346: 5381 subql #1,%d1
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4b348: 48d7 041c moveml %d2-%d4/%a2,%sp@
4b34c: 246e 0008 moveal %fp@(8),%a2
4b350: 242e 000c movel %fp@(12),%d2
4b354: 206e 0010 moveal %fp@(16),%a0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4b358: b282 cmpl %d2,%d1
4b35a: 6536 bcss 4b392 <IMFS_memfile_get_block_pointer+0x5a>
p = info->indirect;
4b35c: 226a 0054 moveal %a2@(84),%a1
if ( malloc_it ) {
4b360: 4a88 tstl %a0
4b362: 6720 beqs 4b384 <IMFS_memfile_get_block_pointer+0x4c>
if ( !p ) {
4b364: 4a89 tstl %a1
4b366: 6610 bnes 4b378 <IMFS_memfile_get_block_pointer+0x40>
p = memfile_alloc_block();
4b368: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p )
4b36e: 4a80 tstl %d0
4b370: 6700 0118 beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
return 0;
info->indirect = p;
4b374: 2540 0054 movel %d0,%a2@(84)
}
return &info->indirect[ my_block ];
4b378: 206a 0054 moveal %a2@(84),%a0
4b37c: e58a lsll #2,%d2
4b37e: d1c2 addal %d2,%a0
4b380: 6000 010a braw 4b48c <IMFS_memfile_get_block_pointer+0x154>
}
if ( !p )
4b384: 4a89 tstl %a1
4b386: 6700 0102 beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
return 0;
return &info->indirect[ my_block ];
4b38a: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0
4b38e: 6000 00fc braw 4b48c <IMFS_memfile_get_block_pointer+0x154>
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4b392: 2200 movel %d0,%d1
4b394: 5281 addql #1,%d1
4b396: 4c00 1800 mulsl %d0,%d1
4b39a: 2241 moveal %d1,%a1
4b39c: 5389 subql #1,%a1
4b39e: b3c2 cmpal %d2,%a1
4b3a0: 6562 bcss 4b404 <IMFS_memfile_get_block_pointer+0xcc>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
4b3a2: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4b3a4: 4c40 2003 remul %d0,%d3,%d2
4b3a8: 4c40 2002 remul %d0,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4b3ac: 202a 0058 movel %a2@(88),%d0
if ( malloc_it ) {
4b3b0: 4a88 tstl %a0
4b3b2: 6736 beqs 4b3ea <IMFS_memfile_get_block_pointer+0xb2>
if ( !p ) {
4b3b4: 4a80 tstl %d0
4b3b6: 6610 bnes 4b3c8 <IMFS_memfile_get_block_pointer+0x90>
p = memfile_alloc_block();
4b3b8: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p )
4b3be: 4a80 tstl %d0
4b3c0: 6700 00c8 beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
return 0;
info->doubly_indirect = p;
4b3c4: 2540 0058 movel %d0,%a2@(88)
}
p1 = (block_p *)p[ doubly ];
4b3c8: 2040 moveal %d0,%a0
4b3ca: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4b3ce: 2012 movel %a2@,%d0
if ( !p1 ) {
4b3d0: 660e bnes 4b3e0 <IMFS_memfile_get_block_pointer+0xa8>
p1 = memfile_alloc_block();
4b3d2: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p1 )
4b3d8: 4a80 tstl %d0
4b3da: 6700 00ae beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
return 0;
p[ doubly ] = (block_p) p1;
4b3de: 2480 movel %d0,%a2@
}
return (block_p *)&p1[ singly ];
4b3e0: 2240 moveal %d0,%a1
4b3e2: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
4b3e6: 6000 00a4 braw 4b48c <IMFS_memfile_get_block_pointer+0x154>
}
if ( !p )
4b3ea: 4a80 tstl %d0
4b3ec: 6700 009c beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
return 0;
p = (block_p *)p[ doubly ];
4b3f0: 2240 moveal %d0,%a1
4b3f2: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p )
4b3f6: 4a88 tstl %a0
4b3f8: 6700 0090 beqw 4b48a <IMFS_memfile_get_block_pointer+0x152>
#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 ];
4b3fc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0
4b400: 6000 008a braw 4b48c <IMFS_memfile_get_block_pointer+0x154>
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4b404: 2601 movel %d1,%d3
4b406: 5283 addql #1,%d3
4b408: 4c00 3800 mulsl %d0,%d3
4b40c: 5383 subql #1,%d3
4b40e: b682 cmpl %d2,%d3
4b410: 6578 bcss 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4b412: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4b414: 4c40 2004 remul %d0,%d4,%d2
4b418: 4c40 2002 remul %d0,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
4b41c: 4c40 2003 remul %d0,%d3,%d2
4b420: 4c40 2002 remul %d0,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
4b424: 202a 005c movel %a2@(92),%d0
if ( malloc_it ) {
4b428: 4a88 tstl %a0
4b42a: 6746 beqs 4b472 <IMFS_memfile_get_block_pointer+0x13a>
if ( !p ) {
4b42c: 4a80 tstl %d0
4b42e: 660e bnes 4b43e <IMFS_memfile_get_block_pointer+0x106>
p = memfile_alloc_block();
4b430: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p )
4b436: 4a80 tstl %d0
4b438: 6750 beqs 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
return 0;
info->triply_indirect = p;
4b43a: 2540 005c movel %d0,%a2@(92)
}
p1 = (block_p *) p[ triply ];
4b43e: 2040 moveal %d0,%a0
4b440: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2
4b444: 2012 movel %a2@,%d0
if ( !p1 ) {
4b446: 660c bnes 4b454 <IMFS_memfile_get_block_pointer+0x11c>
p1 = memfile_alloc_block();
4b448: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p1 )
4b44e: 4a80 tstl %d0
4b450: 6738 beqs 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
return 0;
p[ triply ] = (block_p) p1;
4b452: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4b454: 2240 moveal %d0,%a1
4b456: 45f1 3c00 lea %a1@(00000000,%d3:l:4),%a2
4b45a: 2012 movel %a2@,%d0
if ( !p2 ) {
4b45c: 660c bnes 4b46a <IMFS_memfile_get_block_pointer+0x132>
p2 = memfile_alloc_block();
4b45e: 4eb9 0004 b314 jsr 4b314 <memfile_alloc_block>
if ( !p2 )
4b464: 4a80 tstl %d0
4b466: 6722 beqs 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
return 0;
p1[ doubly ] = (block_p) p2;
4b468: 2480 movel %d0,%a2@
}
return (block_p *)&p2[ singly ];
4b46a: 2240 moveal %d0,%a1
4b46c: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0
4b470: 601a bras 4b48c <IMFS_memfile_get_block_pointer+0x154>
}
if ( !p )
4b472: 4a80 tstl %d0
4b474: 6714 beqs 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
4b476: 2040 moveal %d0,%a0
4b478: 2270 2c00 moveal %a0@(00000000,%d2:l:4),%a1
if ( !p1 )
4b47c: 4a89 tstl %a1
4b47e: 670a beqs 4b48a <IMFS_memfile_get_block_pointer+0x152><== NEVER TAKEN
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
4b480: 2071 3c00 moveal %a1@(00000000,%d3:l:4),%a0
4b484: e58c lsll #2,%d4
4b486: d1c4 addal %d4,%a0
4b488: 6002 bras 4b48c <IMFS_memfile_get_block_pointer+0x154>
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
4b48a: 91c8 subal %a0,%a0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4b48c: 2008 movel %a0,%d0
4b48e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4b494: 4e5e unlk %fp <== NOT EXECUTED
0004b498 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4b498: 4e56 ffc8 linkw %fp,#-56
4b49c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b4a0: 246e 0008 moveal %fp@(8),%a2
4b4a4: 2e2e 0014 movel %fp@(20),%d7
4b4a8: 2c2e 0018 movel %fp@(24),%d6
4b4ac: 242e 000c movel %fp@(12),%d2
4b4b0: 262e 0010 movel %fp@(16),%d3
/*
* Error checks on arguments
*/
if ( !dest )
4b4b4: 4a87 tstl %d7
4b4b6: 6704 beqs 4b4bc <IMFS_memfile_read+0x24> <== NEVER TAKEN
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
4b4b8: 4a86 tstl %d6
4b4ba: 6612 bnes 4b4ce <IMFS_memfile_read+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
4b4bc: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4b4c2: 74ff moveq #-1,%d2 <== NOT EXECUTED
4b4c4: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b4c6: 7016 moveq #22,%d0 <== NOT EXECUTED
4b4c8: 2080 movel %d0,%a0@ <== NOT EXECUTED
4b4ca: 6000 017c braw 4b648 <IMFS_memfile_read+0x1b0> <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
4b4ce: 7006 moveq #6,%d0
4b4d0: b0aa 0048 cmpl %a2@(72),%d0
4b4d4: 6656 bnes 4b52c <IMFS_memfile_read+0x94>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
4b4d6: 2246 moveal %d6,%a1
4b4d8: 91c8 subal %a0,%a0
4b4da: 282a 004c movel %a2@(76),%d4
4b4de: 2a2a 0050 movel %a2@(80),%d5
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4b4e2: 266a 0054 moveal %a2@(84),%a3
if (my_length > (the_jnode->info.linearfile.size - start))
4b4e6: 2d44 fff0 movel %d4,%fp@(-16)
4b4ea: 2d45 fff4 movel %d5,%fp@(-12)
4b4ee: 9a83 subl %d3,%d5
4b4f0: 9982 subxl %d2,%d4
4b4f2: 2008 movel %a0,%d0
4b4f4: 2209 movel %a1,%d1
4b4f6: 9285 subl %d5,%d1
4b4f8: 9184 subxl %d4,%d0
4b4fa: 6f06 bles 4b502 <IMFS_memfile_read+0x6a> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4b4fc: 2c2e fff4 movel %fp@(-12),%d6
4b500: 9c83 subl %d3,%d6
memcpy(dest, &file_ptr[start], my_length);
4b502: 2f06 movel %d6,%sp@-
4b504: 4873 3800 pea %a3@(00000000,%d3:l)
IMFS_update_atime( the_jnode );
return my_length;
4b508: 2406 movel %d6,%d2
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
my_length = the_jnode->info.linearfile.size - start;
memcpy(dest, &file_ptr[start], my_length);
4b50a: 2f07 movel %d7,%sp@-
4b50c: 4eb9 0004 d300 jsr 4d300 <memcpy>
IMFS_update_atime( the_jnode );
4b512: 42a7 clrl %sp@-
4b514: 486e fff8 pea %fp@(-8)
4b518: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
4b51e: 256e fff8 003c movel %fp@(-8),%a2@(60)
return my_length;
4b524: 4fef 0014 lea %sp@(20),%sp
4b528: 6000 011e braw 4b648 <IMFS_memfile_read+0x1b0>
/*
* 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;
4b52c: 2043 moveal %d3,%a0
4b52e: 43f0 6800 lea %a0@(00000000,%d6:l),%a1
if ( last_byte > the_jnode->info.file.size )
4b532: 97cb subal %a3,%a3
4b534: 2849 moveal %a1,%a4
4b536: 202a 004c movel %a2@(76),%d0
4b53a: 222a 0050 movel %a2@(80),%d1
4b53e: 280b movel %a3,%d4
4b540: 2a0c movel %a4,%d5
4b542: 9a81 subl %d1,%d5
4b544: 9980 subxl %d0,%d4
4b546: 6f04 bles 4b54c <IMFS_memfile_read+0xb4>
my_length = the_jnode->info.file.size - start;
4b548: 2c01 movel %d1,%d6
4b54a: 9c83 subl %d3,%d6
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4b54c: 2879 0005 cff4 moveal 5cff4 <imfs_memfile_bytes_per_block>,%a4
4b552: 2a0c movel %a4,%d5
4b554: 5bc4 smi %d4
4b556: 49c4 extbl %d4
4b558: 2f05 movel %d5,%sp@-
4b55a: 2f04 movel %d4,%sp@-
4b55c: 2f03 movel %d3,%sp@-
4b55e: 2f02 movel %d2,%sp@-
4b560: 4eb9 0005 8bb4 jsr 58bb4 <__moddi3>
4b566: 4fef 0010 lea %sp@(16),%sp
4b56a: 2641 moveal %d1,%a3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b56c: 2f05 movel %d5,%sp@-
4b56e: 2f04 movel %d4,%sp@-
4b570: 2f03 movel %d3,%sp@-
4b572: 2f02 movel %d2,%sp@-
4b574: 4eb9 0005 87e8 jsr 587e8 <__divdi3>
4b57a: 4fef 0010 lea %sp@(16),%sp
4b57e: 2801 movel %d1,%d4
if ( start_offset ) {
4b580: 4a8b tstl %a3
4b582: 673c beqs 4b5c0 <IMFS_memfile_read+0x128>
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 );
4b584: 42a7 clrl %sp@-
4b586: 2f01 movel %d1,%sp@-
4b588: 2f0a movel %a2,%sp@-
4b58a: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b590: 4fef 000c lea %sp@(12),%sp
4b594: 4a80 tstl %d0
4b596: 6700 00ae beqw 4b646 <IMFS_memfile_read+0x1ae>
*/
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;
4b59a: 99cb subal %a3,%a4
4b59c: 2406 movel %d6,%d2
4b59e: b9c6 cmpal %d6,%a4
4b5a0: 6402 bccs 4b5a4 <IMFS_memfile_read+0x10c>
4b5a2: 240c movel %a4,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4b5a4: 2f02 movel %d2,%sp@-
4b5a6: 2040 moveal %d0,%a0
4b5a8: d7d0 addal %a0@,%a3
dest += to_copy;
block++;
4b5aa: 5284 addql #1,%d4
my_length -= to_copy;
4b5ac: 9c82 subl %d2,%d6
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4b5ae: 2f0b movel %a3,%sp@-
4b5b0: 2f07 movel %d7,%sp@-
dest += to_copy;
4b5b2: de82 addl %d2,%d7
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4b5b4: 4eb9 0004 d300 jsr 4d300 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4b5ba: 4fef 000c lea %sp@(12),%sp
4b5be: 6002 bras 4b5c2 <IMFS_memfile_read+0x12a>
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
4b5c0: 4282 clrl %d2
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4b5c2: 2679 0005 cff4 moveal 5cff4 <imfs_memfile_bytes_per_block>,%a3
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b5c8: 4bf9 0004 b338 lea 4b338 <IMFS_memfile_get_block_pointer>,%a5
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b5ce: 49f9 0004 d300 lea 4d300 <memcpy>,%a4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b5d4: 6026 bras 4b5fc <IMFS_memfile_read+0x164>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b5d6: 42a7 clrl %sp@-
4b5d8: 2f04 movel %d4,%sp@-
4b5da: 2f0a movel %a2,%sp@-
4b5dc: 4e95 jsr %a5@
if ( !block_ptr )
4b5de: 4fef 000c lea %sp@(12),%sp
4b5e2: 4a80 tstl %d0
4b5e4: 6762 beqs 4b648 <IMFS_memfile_read+0x1b0> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b5e6: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4b5e8: 5284 addql #1,%d4
my_length -= to_copy;
4b5ea: 9c8b subl %a3,%d6
copied += to_copy;
4b5ec: d48b addl %a3,%d2
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b5ee: 2f0b movel %a3,%sp@-
4b5f0: 2f10 movel %a0@,%sp@-
4b5f2: 2f07 movel %d7,%sp@-
dest += to_copy;
4b5f4: de8b addl %a3,%d7
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4b5f6: 4e94 jsr %a4@
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4b5f8: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4b5fc: bcb9 0005 cff4 cmpl 5cff4 <imfs_memfile_bytes_per_block>,%d6
4b602: 64d2 bccs 4b5d6 <IMFS_memfile_read+0x13e>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
4b604: 4a86 tstl %d6
4b606: 6728 beqs 4b630 <IMFS_memfile_read+0x198>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b608: 42a7 clrl %sp@-
4b60a: 2f04 movel %d4,%sp@-
4b60c: 2f0a movel %a2,%sp@-
4b60e: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b614: 4fef 000c lea %sp@(12),%sp
4b618: 4a80 tstl %d0
4b61a: 672c beqs 4b648 <IMFS_memfile_read+0x1b0> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4b61c: 2040 moveal %d0,%a0
copied += my_length;
4b61e: d486 addl %d6,%d2
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4b620: 2f06 movel %d6,%sp@-
4b622: 2f10 movel %a0@,%sp@-
4b624: 2f07 movel %d7,%sp@-
4b626: 4eb9 0004 d300 jsr 4d300 <memcpy>
copied += my_length;
4b62c: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4b630: 42a7 clrl %sp@-
4b632: 486e fff8 pea %fp@(-8)
4b636: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
4b63c: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
4b642: 508f addql #8,%sp
4b644: 6002 bras 4b648 <IMFS_memfile_read+0x1b0>
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 );
if ( !block_ptr )
return copied;
4b646: 4282 clrl %d2 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4b648: 2002 movel %d2,%d0
4b64a: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
4b650: 4e5e unlk %fp <== NOT EXECUTED
0004b71a <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4b71a: 4e56 ffe4 linkw %fp,#-28
4b71e: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
/*
* 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;
4b722: 2439 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d2
4b728: e48a lsrl #2,%d2
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4b72a: 246e 0008 moveal %fp@(8),%a2
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4b72e: 4aaa 0054 tstl %a2@(84)
4b732: 670e beqs 4b742 <IMFS_memfile_remove+0x28>
memfile_free_blocks_in_table( &info->indirect, to_free );
4b734: 2f02 movel %d2,%sp@-
4b736: 486a 0054 pea %a2@(84)
4b73a: 4eb9 0004 b6d0 jsr 4b6d0 <memfile_free_blocks_in_table>
4b740: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4b742: 4aaa 0058 tstl %a2@(88)
4b746: 673e beqs 4b786 <IMFS_memfile_remove+0x6c> <== ALWAYS TAKEN
4b748: 4283 clrl %d3 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
memfile_free_blocks_in_table(
4b74a: 47f9 0004 b6d0 lea 4b6d0 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED
4b750: 601a bras 4b76c <IMFS_memfile_remove+0x52> <== NOT EXECUTED
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
4b752: 2003 movel %d3,%d0 <== NOT EXECUTED
4b754: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED
4b758: e588 lsll #2,%d0 <== NOT EXECUTED
4b75a: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED
4b75e: 670a beqs 4b76a <IMFS_memfile_remove+0x50> <== NOT EXECUTED
memfile_free_blocks_in_table(
4b760: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b762: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
4b766: 4e93 jsr %a3@ <== NOT EXECUTED
4b768: 508f addql #8,%sp <== NOT EXECUTED
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4b76a: 5283 addql #1,%d3 <== NOT EXECUTED
4b76c: 2039 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d0<== NOT EXECUTED
4b772: e488 lsrl #2,%d0 <== NOT EXECUTED
4b774: b083 cmpl %d3,%d0 <== NOT EXECUTED
4b776: 62da bhis 4b752 <IMFS_memfile_remove+0x38> <== 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 );
4b778: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b77a: 486a 0058 pea %a2@(88) <== NOT EXECUTED
4b77e: 4eb9 0004 b6d0 jsr 4b6d0 <memfile_free_blocks_in_table> <== NOT EXECUTED
4b784: 508f addql #8,%sp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
4b786: 4aaa 005c tstl %a2@(92)
4b78a: 6762 beqs 4b7ee <IMFS_memfile_remove+0xd4> <== ALWAYS TAKEN
4b78c: 4283 clrl %d3 <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4b78e: 49f9 0004 b6d0 lea 4b6d0 <memfile_free_blocks_in_table>,%a4<== NOT EXECUTED
4b794: 603e bras 4b7d4 <IMFS_memfile_remove+0xba> <== NOT EXECUTED
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
4b796: 2a03 movel %d3,%d5 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4b798: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED
}
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
4b79c: e58d lsll #2,%d5 <== NOT EXECUTED
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4b79e: 2670 5800 moveal %a0@(00000000,%d5:l),%a3 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4b7a2: 4a8b tstl %a3 <== NOT EXECUTED
4b7a4: 673a beqs 4b7e0 <IMFS_memfile_remove+0xc6> <== NOT EXECUTED
4b7a6: 4284 clrl %d4 <== NOT EXECUTED
4b7a8: 6010 bras 4b7ba <IMFS_memfile_remove+0xa0> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
4b7aa: 4a93 tstl %a3@ <== NOT EXECUTED
4b7ac: 6708 beqs 4b7b6 <IMFS_memfile_remove+0x9c> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4b7ae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b7b0: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4b7b2: 4e94 jsr %a4@ <== NOT EXECUTED
4b7b4: 508f addql #8,%sp <== 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++ ) {
4b7b6: 5284 addql #1,%d4 <== NOT EXECUTED
4b7b8: 588b addql #4,%a3 <== NOT EXECUTED
4b7ba: 2039 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d0<== NOT EXECUTED
4b7c0: e488 lsrl #2,%d0 <== NOT EXECUTED
4b7c2: b084 cmpl %d4,%d0 <== NOT EXECUTED
4b7c4: 62e4 bhis 4b7aa <IMFS_memfile_remove+0x90> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4b7c6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b7c8: daaa 005c addl %a2@(92),%d5 <== NOT EXECUTED
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4b7cc: 5283 addql #1,%d3 <== NOT EXECUTED
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4b7ce: 2f05 movel %d5,%sp@- <== NOT EXECUTED
4b7d0: 4e94 jsr %a4@ <== 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++ ) {
4b7d2: 508f addql #8,%sp <== NOT EXECUTED
4b7d4: 2039 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d0<== NOT EXECUTED
4b7da: e488 lsrl #2,%d0 <== NOT EXECUTED
4b7dc: b083 cmpl %d3,%d0 <== NOT EXECUTED
4b7de: 62b6 bhis 4b796 <IMFS_memfile_remove+0x7c> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4b7e0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b7e2: 486a 005c pea %a2@(92) <== NOT EXECUTED
4b7e6: 4eb9 0004 b6d0 jsr 4b6d0 <memfile_free_blocks_in_table> <== NOT EXECUTED
4b7ec: 508f addql #8,%sp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
4b7ee: 4280 clrl %d0
4b7f0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4b7f6: 4e5e unlk %fp <== NOT EXECUTED
0004b7fa <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4b7fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b7fe: 42a7 clrl %sp@- <== NOT EXECUTED
4b800: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
4b804: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
4b808: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
4b80e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4b812: 4a80 tstl %d0 <== NOT EXECUTED
4b814: 6710 beqs 4b826 <IMFS_memfile_remove_block+0x2c> <== NOT EXECUTED
ptr = *block_ptr;
4b816: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b818: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
4b81a: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
4b81c: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4b81e: 4eb9 0004 b6b6 jsr 4b6b6 <memfile_free_block> <== NOT EXECUTED
4b824: 588f addql #4,%sp <== NOT EXECUTED
}
return 1;
}
4b826: 7001 moveq #1,%d0 <== NOT EXECUTED
4b828: 4e5e unlk %fp <== NOT EXECUTED
0004b910 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4b910: 4e56 ffd0 linkw %fp,#-48
4b914: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b918: 246e 0008 moveal %fp@(8),%a2
4b91c: 2e2e 0014 movel %fp@(20),%d7
4b920: 2c2e 0018 movel %fp@(24),%d6
4b924: 242e 000c movel %fp@(12),%d2
4b928: 262e 0010 movel %fp@(16),%d3
/*
* Error check arguments
*/
if ( !source )
4b92c: 4a87 tstl %d7
4b92e: 6704 beqs 4b934 <IMFS_memfile_write+0x24> <== NEVER TAKEN
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
4b930: 4a86 tstl %d6
4b932: 660e bnes 4b942 <IMFS_memfile_write+0x32> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
4b934: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4b93a: 7816 moveq #22,%d4 <== NOT EXECUTED
4b93c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b93e: 2084 movel %d4,%a0@ <== NOT EXECUTED
4b940: 6036 bras 4b978 <IMFS_memfile_write+0x68> <== NOT EXECUTED
/*
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
4b942: 2046 moveal %d6,%a0
4b944: d1c3 addal %d3,%a0
if ( last_byte > the_jnode->info.file.size ) {
4b946: 2208 movel %a0,%d1
4b948: 4280 clrl %d0
4b94a: 282a 004c movel %a2@(76),%d4
4b94e: 2a2a 0050 movel %a2@(80),%d5
4b952: 9a81 subl %d1,%d5
4b954: 9980 subxl %d0,%d4
4b956: 6c28 bges 4b980 <IMFS_memfile_write+0x70> <== NEVER TAKEN
status = IMFS_memfile_extend( the_jnode, last_byte );
4b958: 2f08 movel %a0,%sp@-
4b95a: 2f00 movel %d0,%sp@-
4b95c: 2f0a movel %a2,%sp@-
4b95e: 4eb9 0004 b82c jsr 4b82c <IMFS_memfile_extend>
if ( status )
4b964: 4fef 000c lea %sp@(12),%sp
4b968: 4a80 tstl %d0
4b96a: 6714 beqs 4b980 <IMFS_memfile_write+0x70>
rtems_set_errno_and_return_minus_one( ENOSPC );
4b96c: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4b972: 761c moveq #28,%d3
4b974: 2040 moveal %d0,%a0
4b976: 2083 movel %d3,%a0@
4b978: 387c ffff moveaw #-1,%a4
4b97c: 6000 0102 braw 4ba80 <IMFS_memfile_write+0x170>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4b980: 2879 0005 cff4 moveal 5cff4 <imfs_memfile_bytes_per_block>,%a4
4b986: 2a0c movel %a4,%d5
4b988: 5bc4 smi %d4
4b98a: 49c4 extbl %d4
4b98c: 2f05 movel %d5,%sp@-
4b98e: 2f04 movel %d4,%sp@-
4b990: 2f03 movel %d3,%sp@-
4b992: 2f02 movel %d2,%sp@-
4b994: 4eb9 0005 8bb4 jsr 58bb4 <__moddi3>
4b99a: 4fef 0010 lea %sp@(16),%sp
4b99e: 2641 moveal %d1,%a3
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4b9a0: 2f05 movel %d5,%sp@-
4b9a2: 2f04 movel %d4,%sp@-
4b9a4: 2f03 movel %d3,%sp@-
4b9a6: 2f02 movel %d2,%sp@-
4b9a8: 4eb9 0005 87e8 jsr 587e8 <__divdi3>
4b9ae: 4fef 0010 lea %sp@(16),%sp
4b9b2: 2401 movel %d1,%d2
if ( start_offset ) {
4b9b4: 4a8b tstl %a3
4b9b6: 673a beqs 4b9f2 <IMFS_memfile_write+0xe2>
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 );
4b9b8: 42a7 clrl %sp@-
4b9ba: 2f01 movel %d1,%sp@-
4b9bc: 2f0a movel %a2,%sp@-
4b9be: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4b9c4: 4fef 000c lea %sp@(12),%sp
4b9c8: 4a80 tstl %d0
4b9ca: 6700 00b2 beqw 4ba7e <IMFS_memfile_write+0x16e>
*/
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;
4b9ce: 99cb subal %a3,%a4
4b9d0: bc8c cmpl %a4,%d6
4b9d2: 6402 bccs 4b9d6 <IMFS_memfile_write+0xc6> <== ALWAYS TAKEN
4b9d4: 2846 moveal %d6,%a4 <== NOT EXECUTED
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b9d6: 2f0c movel %a4,%sp@-
4b9d8: 2040 moveal %d0,%a0
src += to_copy;
block++;
4b9da: 5282 addql #1,%d2
my_length -= to_copy;
4b9dc: 9c8c subl %a4,%d6
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b9de: 2f07 movel %d7,%sp@-
4b9e0: d7d0 addal %a0@,%a3
src += to_copy;
4b9e2: de8c addl %a4,%d7
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4b9e4: 2f0b movel %a3,%sp@-
4b9e6: 4eb9 0004 d300 jsr 4d300 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4b9ec: 4fef 000c lea %sp@(12),%sp
4b9f0: 6002 bras 4b9f4 <IMFS_memfile_write+0xe4>
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
4b9f2: 99cc subal %a4,%a4
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
4b9f4: 2839 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%d4
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4b9fa: 4bf9 0004 b338 lea 4b338 <IMFS_memfile_get_block_pointer>,%a5
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4ba00: 47f9 0004 d300 lea 4d300 <memcpy>,%a3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4ba06: 6026 bras 4ba2e <IMFS_memfile_write+0x11e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4ba08: 42a7 clrl %sp@-
4ba0a: 2f02 movel %d2,%sp@-
4ba0c: 2f0a movel %a2,%sp@-
4ba0e: 4e95 jsr %a5@
if ( !block_ptr )
4ba10: 4fef 000c lea %sp@(12),%sp
4ba14: 4a80 tstl %d0
4ba16: 6768 beqs 4ba80 <IMFS_memfile_write+0x170> <== NEVER TAKEN
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 );
4ba18: 2f04 movel %d4,%sp@-
4ba1a: 2040 moveal %d0,%a0
src += to_copy;
block++;
4ba1c: 5282 addql #1,%d2
my_length -= to_copy;
4ba1e: 9c84 subl %d4,%d6
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4ba20: d9c4 addal %d4,%a4
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 );
4ba22: 2f07 movel %d7,%sp@-
4ba24: 2f10 movel %a0@,%sp@-
src += to_copy;
4ba26: de84 addl %d4,%d7
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4ba28: 4e93 jsr %a3@
*
* This routine writes the specified data buffer into the in memory
* file pointed to by the_jnode. The file is extended as needed.
*/
MEMFILE_STATIC ssize_t IMFS_memfile_write(
4ba2a: 4fef 000c lea %sp@(12),%sp
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4ba2e: bcb9 0005 cff4 cmpl 5cff4 <imfs_memfile_bytes_per_block>,%d6
4ba34: 64d2 bccs 4ba08 <IMFS_memfile_write+0xf8>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
4ba36: 4a86 tstl %d6
4ba38: 6728 beqs 4ba62 <IMFS_memfile_write+0x152>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4ba3a: 42a7 clrl %sp@-
4ba3c: 2f02 movel %d2,%sp@-
4ba3e: 2f0a movel %a2,%sp@-
4ba40: 4eb9 0004 b338 jsr 4b338 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4ba46: 4fef 000c lea %sp@(12),%sp
4ba4a: 4a80 tstl %d0
4ba4c: 6732 beqs 4ba80 <IMFS_memfile_write+0x170> <== NEVER TAKEN
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 );
4ba4e: 2f06 movel %d6,%sp@-
4ba50: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4ba52: d9c6 addal %d6,%a4
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 );
4ba54: 2f07 movel %d7,%sp@-
4ba56: 2f10 movel %a0@,%sp@-
4ba58: 4eb9 0004 d300 jsr 4d300 <memcpy>
my_length = 0;
copied += to_copy;
4ba5e: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4ba62: 42a7 clrl %sp@-
4ba64: 486e fff8 pea %fp@(-8)
4ba68: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
4ba6e: 202e fff8 movel %fp@(-8),%d0
return copied;
4ba72: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4ba74: 2540 0040 movel %d0,%a2@(64)
4ba78: 2540 0044 movel %d0,%a2@(68)
return copied;
4ba7c: 6002 bras 4ba80 <IMFS_memfile_write+0x170>
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 );
if ( !block_ptr )
return copied;
4ba7e: 99cc subal %a4,%a4 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4ba80: 200c movel %a4,%d0
4ba82: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
4ba88: 4e5e unlk %fp <== NOT EXECUTED
00041f04 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
41f04: 4e56 ffb4 linkw %fp,#-76
41f08: 48d7 003c moveml %d2-%d5,%sp@
41f0c: 262e 0008 movel %fp@(8),%d3
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
41f10: 2f03 movel %d3,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
41f12: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
41f16: 4eb9 0004 deac jsr 4deac <strlen>
41f1c: 588f addql #4,%sp
41f1e: 486e fffc pea %fp@(-4)
41f22: 486e ffc7 pea %fp@(-57)
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
41f26: 2a2e 0010 movel %fp@(16),%d5
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
41f2a: 2f00 movel %d0,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
41f2c: 282e 0014 movel %fp@(20),%d4
IMFS_jnode_t *new_node;
int result;
char new_name[ IMFS_NAME_MAX + 1 ];
IMFS_types_union info;
IMFS_get_token( token, strlen( token ), new_name, &result );
41f30: 2f03 movel %d3,%sp@-
41f32: 4eb9 0004 94c0 jsr 494c0 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
41f38: 4fef 0010 lea %sp@(16),%sp
41f3c: 2002 movel %d2,%d0
41f3e: 0280 0000 f000 andil #61440,%d0
41f44: 0c80 0000 4000 cmpil #16384,%d0
41f4a: 673a beqs 41f86 <IMFS_mknod+0x82>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
41f4c: 0c80 0000 8000 cmpil #32768,%d0
41f52: 6736 beqs 41f8a <IMFS_mknod+0x86>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
41f54: 0c80 0000 6000 cmpil #24576,%d0
41f5a: 6708 beqs 41f64 <IMFS_mknod+0x60>
41f5c: 0c80 0000 2000 cmpil #8192,%d0
41f62: 660c bnes 41f70 <IMFS_mknod+0x6c>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
41f64: 2d45 ffe8 movel %d5,%fp@(-24)
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
41f68: 7002 moveq #2,%d0
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
41f6a: 2d44 ffec movel %d4,%fp@(-20)
41f6e: 6020 bras 41f90 <IMFS_mknod+0x8c>
}
else if (S_ISFIFO(mode))
41f70: 0c80 0000 1000 cmpil #4096,%d0
41f76: 6716 beqs 41f8e <IMFS_mknod+0x8a> <== ALWAYS TAKEN
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
41f78: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
41f7e: 7216 moveq #22,%d1 <== NOT EXECUTED
41f80: 2040 moveal %d0,%a0 <== NOT EXECUTED
41f82: 2081 movel %d1,%a0@ <== NOT EXECUTED
41f84: 6034 bras 41fba <IMFS_mknod+0xb6> <== NOT EXECUTED
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
41f86: 7001 moveq #1,%d0
41f88: 6006 bras 41f90 <IMFS_mknod+0x8c>
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
41f8a: 7005 moveq #5,%d0
41f8c: 6002 bras 41f90 <IMFS_mknod+0x8c>
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
type = IMFS_FIFO;
41f8e: 7007 moveq #7,%d0
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
41f90: 486e ffe8 pea %fp@(-24)
41f94: 2f02 movel %d2,%sp@-
41f96: 486e ffc7 pea %fp@(-57)
41f9a: 2f00 movel %d0,%sp@-
41f9c: 2f2e 0018 movel %fp@(24),%sp@-
41fa0: 4eb9 0004 8c1a jsr 48c1a <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
41fa6: 4fef 0014 lea %sp@(20),%sp
41faa: 4a80 tstl %d0
41fac: 6610 bnes 41fbe <IMFS_mknod+0xba>
rtems_set_errno_and_return_minus_one( ENOMEM );
41fae: 4eb9 0004 ca54 jsr 4ca54 <__errno>
41fb4: 2040 moveal %d0,%a0
41fb6: 700c moveq #12,%d0
41fb8: 2080 movel %d0,%a0@
41fba: 70ff moveq #-1,%d0
41fbc: 6002 bras 41fc0 <IMFS_mknod+0xbc>
return 0;
41fbe: 4280 clrl %d0
}
41fc0: 4cee 003c ffb4 moveml %fp@(-76),%d2-%d5
41fc6: 4e5e unlk %fp
...
00041fcc <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
41fcc: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
41fce: 4e56 0000 linkw %fp,#0
41fd2: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
41fd6: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
41fda: b0a8 0048 cmpl %a0@(72),%d0
41fde: 6710 beqs 41ff0 <IMFS_mount+0x24> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
41fe0: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
41fe6: 2040 moveal %d0,%a0 <== NOT EXECUTED
41fe8: 7014 moveq #20,%d0 <== NOT EXECUTED
41fea: 2080 movel %d0,%a0@ <== NOT EXECUTED
41fec: 70ff moveq #-1,%d0 <== NOT EXECUTED
41fee: 6006 bras 41ff6 <IMFS_mount+0x2a> <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
41ff0: 2149 0058 movel %a1,%a0@(88)
return 0;
41ff4: 4280 clrl %d0
}
41ff6: 4e5e unlk %fp
...
00043938 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
43938: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
4393c: 2079 0006 0d74 moveal 60d74 <_impure_ptr>,%a0
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
43942: 2f0a movel %a2,%sp@-
43944: 246e 0008 moveal %fp@(8),%a2
43948: 2f02 movel %d2,%sp@-
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
4394a: 2f28 0008 movel %a0@(8),%sp@-
switch( the_jnode->type ) {
4394e: 7406 moveq #6,%d2
{
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
43950: 486a 000c pea %a2@(12)
43954: 4eb9 0004 fec8 jsr 4fec8 <fputs>
switch( the_jnode->type ) {
4395a: 202a 0048 movel %a2@(72),%d0
4395e: 2200 movel %d0,%d1
43960: 508f addql #8,%sp
43962: 5381 subql #1,%d1
43964: b481 cmpl %d1,%d2
43966: 6500 009c bcsw 43a04 <IMFS_print_jnode+0xcc>
4396a: 2079 0006 0d74 moveal 60d74 <_impure_ptr>,%a0
43970: 303b 1a08 movew %pc@(4397a <IMFS_print_jnode+0x42>,%d1:l:2),%d0
43974: 48c0 extl %d0
43976: 4efb 0802 jmp %pc@(4397a <IMFS_print_jnode+0x42>,%d0:l)
4397a: 000e 016 <== NOT EXECUTED
4397c: 0022 042 <== NOT EXECUTED
4397e: 006a 0152 <== NOT EXECUTED
43980: 006a 0152 <== NOT EXECUTED
43982: 0050 0120 <== NOT EXECUTED
43984: 0032 062 <== NOT EXECUTED
43986: 0076 0166 <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
43988: 2f28 0008 movel %a0@(8),%sp@-
4398c: 4878 002f pea 2f <OPER2+0x1b>
43990: 4eb9 0004 fdf8 jsr 4fdf8 <fputc>
break;
43996: 508f addql #8,%sp
43998: 6000 0088 braw 43a22 <IMFS_print_jnode+0xea>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
4399c: 2f2a 0050 movel %a2@(80),%sp@-
439a0: 2f2a 004c movel %a2@(76),%sp@-
439a4: 4879 0005 f542 pea 5f542 <IntUartPollCallbacks.6236+0x20>
439aa: 600e bras 439ba <IMFS_print_jnode+0x82>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
439ac: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED
439b0: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED
439b4: 4879 0005 f555 pea 5f555 <IntUartPollCallbacks.6236+0x33> <== NOT EXECUTED
439ba: 2f28 0008 movel %a0@(8),%sp@-
439be: 4eb9 0004 fd7a jsr 4fd7a <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
439c4: 4fef 0010 lea %sp@(16),%sp
439c8: 6058 bras 43a22 <IMFS_print_jnode+0xea>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
439ca: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED
439ce: 4879 0005 f564 pea 5f564 <IntUartPollCallbacks.6236+0x42> <== NOT EXECUTED
439d4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439d8: 4eb9 0004 fd7a jsr 4fd7a <fprintf> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
439de: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
439e2: 603e bras 43a22 <IMFS_print_jnode+0xea> <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
439e4: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439e8: 4879 0005 f570 pea 5f570 <IntUartPollCallbacks.6236+0x4e> <== NOT EXECUTED
439ee: 600a bras 439fa <IMFS_print_jnode+0xc2> <== NOT EXECUTED
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
439f0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
439f4: 4879 0005 f584 pea 5f584 <IntUartPollCallbacks.6236+0x62> <== NOT EXECUTED
439fa: 4eb9 0004 fec8 jsr 4fec8 <fputs> <== NOT EXECUTED
return;
43a00: 508f addql #8,%sp <== NOT EXECUTED
43a02: 6038 bras 43a3c <IMFS_print_jnode+0x104> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
43a04: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43a06: 4879 0005 f597 pea 5f597 <IntUartPollCallbacks.6236+0x75> <== NOT EXECUTED
43a0c: 2079 0006 0d74 moveal 60d74 <_impure_ptr>,%a0 <== NOT EXECUTED
43a12: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
43a16: 4eb9 0004 fd7a jsr 4fd7a <fprintf> <== NOT EXECUTED
return;
43a1c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
43a20: 601a bras 43a3c <IMFS_print_jnode+0x104> <== NOT EXECUTED
}
puts("");
}
43a22: 242e fff8 movel %fp@(-8),%d2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
43a26: 203c 0005 fbd8 movel #392152,%d0
}
43a2c: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
43a30: 2d40 0008 movel %d0,%fp@(8)
}
43a34: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
43a36: 4ef9 0005 16de jmp 516de <puts>
}
43a3c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
43a40: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
43a44: 4e5e unlk %fp <== NOT EXECUTED
00042010 <IMFS_readlink>:
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
42010: 7004 moveq #4,%d0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
42012: 4e56 0000 linkw %fp,#0
IMFS_jnode_t *node;
int i;
node = loc->node_access;
42016: 206e 0008 moveal %fp@(8),%a0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4201a: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node;
int i;
node = loc->node_access;
4201c: 2250 moveal %a0@,%a1
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4201e: 2f02 movel %d2,%sp@-
42020: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
42024: b0a9 0048 cmpl %a1@(72),%d0
42028: 6608 bnes 42032 <IMFS_readlink+0x22> <== NEVER TAKEN
4202a: 206e 000c moveal %fp@(12),%a0
4202e: 4200 clrb %d0
42030: 6014 bras 42046 <IMFS_readlink+0x36>
rtems_set_errno_and_return_minus_one( EINVAL );
42032: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42038: 2040 moveal %d0,%a0 <== NOT EXECUTED
4203a: 7016 moveq #22,%d0 <== NOT EXECUTED
4203c: 2080 movel %d0,%a0@ <== NOT EXECUTED
4203e: 70ff moveq #-1,%d0 <== NOT EXECUTED
42040: 6012 bras 42054 <IMFS_readlink+0x44> <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
42042: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
42044: 10c1 moveb %d1,%a0@+
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++ )
42046: b480 cmpl %d0,%d2
42048: 630a blss 42054 <IMFS_readlink+0x44>
4204a: 2469 004c moveal %a1@(76),%a2
4204e: 1232 0800 moveb %a2@(00000000,%d0:l),%d1
42052: 66ee bnes 42042 <IMFS_readlink+0x32>
buf[i] = node->info.sym_link.name[i];
return i;
}
42054: 242e fff8 movel %fp@(-8),%d2
42058: 246e fffc moveal %fp@(-4),%a2
4205c: 4e5e unlk %fp <== NOT EXECUTED
00042060 <IMFS_rename>:
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42060: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42064: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42068: 2f0a movel %a2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
4206a: 2450 moveal %a0@,%a2 <== NOT EXECUTED
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
4206c: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
42070: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
42074: 486a 000c pea %a2@(12) <== NOT EXECUTED
42078: 4eb9 0004 dec4 jsr 4dec4 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
4207e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
42082: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED
42086: 670a beqs 42092 <IMFS_rename+0x32> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
42088: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4208a: 4eb9 0004 614c jsr 4614c <_Chain_Extract> <== NOT EXECUTED
42090: 588f addql #4,%sp <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
42092: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED
42096: 2050 moveal %a0@,%a0 <== NOT EXECUTED
the_jnode->Parent = new_parent;
42098: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4209c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4209e: 4868 004c pea %a0@(76) <== NOT EXECUTED
420a2: 4eb9 0004 6114 jsr 46114 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
420a8: 42a7 clrl %sp@- <== NOT EXECUTED
420aa: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
420ae: 4eb9 0004 28b8 jsr 428b8 <gettimeofday> <== NOT EXECUTED
420b4: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED
return 0;
}
420ba: 4280 clrl %d0 <== NOT EXECUTED
420bc: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED
420c0: 4e5e unlk %fp <== NOT EXECUTED
0004964c <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4964c: 7205 moveq #5,%d1
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4964e: 4e56 0000 linkw %fp,#0
49652: 206e 000c moveal %fp@(12),%a0
49656: 2f0a movel %a2,%sp@-
49658: 246e 0008 moveal %fp@(8),%a2
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
4965c: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4965e: 2029 0048 movel %a1@(72),%d0
49662: 5580 subql #2,%d0
49664: b280 cmpl %d0,%d1
49666: 653e bcss 496a6 <IMFS_stat+0x5a> <== NEVER TAKEN
49668: 303b 0a08 movew %pc@(49672 <IMFS_stat+0x26>,%d0:l:2),%d0
4966c: 48c0 extl %d0
4966e: 4efb 0802 jmp %pc@(49672 <IMFS_stat+0x26>,%d0:l)
49672: 000c 014 <== NOT EXECUTED
49674: 0034 064 <== NOT EXECUTED
49676: 0026 046 <== NOT EXECUTED
49678: 001c 034 <== NOT EXECUTED
4967a: 001c 034 <== NOT EXECUTED
4967c: 0026 046 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4967e: 2029 0050 movel %a1@(80),%d0
49682: 2169 004c 0016 movel %a1@(76),%a0@(22)
49688: 2140 001a movel %d0,%a0@(26)
break;
4968c: 602a bras 496b8 <IMFS_stat+0x6c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
4968e: 2029 004c movel %a1@(76),%d0
49692: 2229 0050 movel %a1@(80),%d1
49696: 6004 bras 4969c <IMFS_stat+0x50>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
49698: 4280 clrl %d0
4969a: 4281 clrl %d1
4969c: 2140 001e movel %d0,%a0@(30)
496a0: 2141 0022 movel %d1,%a0@(34)
break;
496a4: 6012 bras 496b8 <IMFS_stat+0x6c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
496a6: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
496ac: 2040 moveal %d0,%a0 <== NOT EXECUTED
496ae: 70ff moveq #-1,%d0 <== NOT EXECUTED
496b0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
496b6: 6046 bras 496fe <IMFS_stat+0xb2> <== NOT EXECUTED
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
496b8: 246a 0010 moveal %a2@(16),%a2
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
496bc: 246a 0034 moveal %a2@(52),%a2
496c0: 2012 movel %a2@,%d0
buf->st_mode = the_jnode->st_mode;
496c2: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
496c8: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
496ce: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
496d4: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
496da: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
496e0: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
496e6: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
496ec: 2169 0044 0036 movel %a1@(68),%a0@(54)
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
496f2: 2140 0004 movel %d0,%a0@(4)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
496f6: 4280 clrl %d0
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
496f8: 20bc 0000 fffe movel #65534,%a0@
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
496fe: 246e fffc moveal %fp@(-4),%a2
49702: 4e5e unlk %fp
...
000420c4 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
420c4: 4e56 ffc4 linkw %fp,#-60
420c8: 2f03 movel %d3,%sp@-
420ca: 262e 0010 movel %fp@(16),%d3
420ce: 2f02 movel %d2,%sp@-
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
420d0: 240e movel %fp,%d2
420d2: 0682 ffff ffc7 addil #-57,%d2
420d8: 2f03 movel %d3,%sp@-
420da: 4eb9 0004 deac jsr 4deac <strlen>
420e0: 588f addql #4,%sp
420e2: 486e fffc pea %fp@(-4)
420e6: 2f02 movel %d2,%sp@-
420e8: 2f00 movel %d0,%sp@-
420ea: 2f03 movel %d3,%sp@-
420ec: 4eb9 0004 94c0 jsr 494c0 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
420f2: 2f2e 000c movel %fp@(12),%sp@-
420f6: 4eb9 0004 da1c jsr 4da1c <strdup>
if (info.sym_link.name == NULL) {
420fc: 4fef 0014 lea %sp@(20),%sp
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
42100: 2d40 ffe8 movel %d0,%fp@(-24)
if (info.sym_link.name == NULL) {
42104: 660e bnes 42114 <IMFS_symlink+0x50> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one(ENOMEM);
42106: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4210c: 720c moveq #12,%d1 <== NOT EXECUTED
4210e: 2040 moveal %d0,%a0 <== NOT EXECUTED
42110: 2081 movel %d1,%a0@ <== NOT EXECUTED
42112: 603a bras 4214e <IMFS_symlink+0x8a> <== NOT EXECUTED
* was ONLY passed a NULL when we created the root node. We
* added a new IMFS_create_root_node() so this path no longer
* existed. The result was simpler code which should not have
* this path.
*/
new_node = IMFS_create_node(
42114: 486e ffe8 pea %fp@(-24)
42118: 2f3c 0000 a1ff movel #41471,%sp@-
4211e: 2f02 movel %d2,%sp@-
42120: 4878 0004 pea 4 <CONTEXT_ARG>
42124: 2f2e 0008 movel %fp@(8),%sp@-
42128: 4eb9 0004 8c1a jsr 48c1a <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
4212e: 4fef 0014 lea %sp@(20),%sp
42132: 4a80 tstl %d0
42134: 661c bnes 42152 <IMFS_symlink+0x8e> <== ALWAYS TAKEN
free(info.sym_link.name);
42136: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED
4213a: 4eb9 0004 2830 jsr 42830 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
42140: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42146: 588f addql #4,%sp <== NOT EXECUTED
42148: 2040 moveal %d0,%a0 <== NOT EXECUTED
4214a: 700c moveq #12,%d0 <== NOT EXECUTED
4214c: 2080 movel %d0,%a0@ <== NOT EXECUTED
4214e: 70ff moveq #-1,%d0 <== NOT EXECUTED
42150: 6002 bras 42154 <IMFS_symlink+0x90> <== NOT EXECUTED
}
return 0;
42152: 4280 clrl %d0
}
42154: 242e ffbc movel %fp@(-68),%d2
42158: 262e ffc0 movel %fp@(-64),%d3
4215c: 4e5e unlk %fp <== NOT EXECUTED
00042160 <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42160: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
42162: 4e56 ffd0 linkw %fp,#-48
42166: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
4216a: 246e 000c moveal %fp@(12),%a2
4216e: 262e 0008 movel %fp@(8),%d3
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
42172: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42174: b0ab 0048 cmpl %a3@(72),%d0
42178: 6600 0082 bnew 421fc <IMFS_unlink+0x9c>
if ( !node->info.hard_link.link_node )
4217c: 282b 004c movel %a3@(76),%d4
42180: 660e bnes 42190 <IMFS_unlink+0x30> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
42182: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42188: 2040 moveal %d0,%a0 <== NOT EXECUTED
4218a: 7016 moveq #22,%d0 <== NOT EXECUTED
4218c: 2080 movel %d0,%a0@ <== NOT EXECUTED
4218e: 607e bras 4220e <IMFS_unlink+0xae> <== NOT EXECUTED
the_link = *loc;
42190: 4878 0014 pea 14 <OPER2>
42194: 240e movel %fp,%d2
42196: 0682 ffff ffe4 addil #-28,%d2
4219c: 2f0a movel %a2,%sp@-
4219e: 2f02 movel %d2,%sp@-
421a0: 4eb9 0004 d300 jsr 4d300 <memcpy>
the_link.node_access = node->info.hard_link.link_node;
421a6: 2d44 ffe4 movel %d4,%fp@(-28)
/*
* If removing the last hard link to a node, then we need
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
421aa: 7801 moveq #1,%d4
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
421ac: 2f02 movel %d2,%sp@-
421ae: 4eb9 0004 8d5c jsr 48d5c <IMFS_Set_handlers>
/*
* 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)
421b4: 206b 004c moveal %a3@(76),%a0
421b8: 4281 clrl %d1
421ba: 4fef 0010 lea %sp@(16),%sp
421be: 3028 0032 movew %a0@(50),%d0
421c2: 3200 movew %d0,%d1
421c4: b881 cmpl %d1,%d4
421c6: 6616 bnes 421de <IMFS_unlink+0x7e>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
421c8: 2f02 movel %d2,%sp@-
421ca: 206e ffec moveal %fp@(-20),%a0
421ce: 2f03 movel %d3,%sp@-
421d0: 2068 0034 moveal %a0@(52),%a0
421d4: 4e90 jsr %a0@
if ( result != 0 )
421d6: 508f addql #8,%sp
421d8: 4a80 tstl %d0
421da: 6720 beqs 421fc <IMFS_unlink+0x9c>
421dc: 6030 bras 4220e <IMFS_unlink+0xae>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
421de: 5380 subql #1,%d0
421e0: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
421e4: 42a7 clrl %sp@-
421e6: 486e fff8 pea %fp@(-8)
421ea: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
421f0: 206b 004c moveal %a3@(76),%a0
421f4: 508f addql #8,%sp
421f6: 216e fff8 0044 movel %fp@(-8),%a0@(68)
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
421fc: 206a 0008 moveal %a2@(8),%a0
42200: 2f0a movel %a2,%sp@-
42202: 2f03 movel %d3,%sp@-
42204: 2068 0034 moveal %a0@(52),%a0
42208: 4e90 jsr %a0@
return result;
4220a: 508f addql #8,%sp
4220c: 6002 bras 42210 <IMFS_unlink+0xb0>
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
if ( result != 0 )
return -1;
4220e: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42210: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3
42216: 4e5e unlk %fp
...
0004221c <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4221c: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
4221e: 4e56 0000 linkw %fp,#0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
42222: 206e 0008 moveal %fp@(8),%a0
42226: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4222a: b0a8 0048 cmpl %a0@(72),%d0
4222e: 670e beqs 4223e <IMFS_unmount+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTDIR );
42230: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42236: 7214 moveq #20,%d1 <== NOT EXECUTED
42238: 2040 moveal %d0,%a0 <== NOT EXECUTED
4223a: 2081 movel %d1,%a0@ <== NOT EXECUTED
4223c: 6012 bras 42250 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
4223e: 4aa8 0058 tstl %a0@(88)
42242: 6610 bnes 42254 <IMFS_unmount+0x38> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
42244: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4224a: 2040 moveal %d0,%a0 <== NOT EXECUTED
4224c: 7016 moveq #22,%d0 <== NOT EXECUTED
4224e: 2080 movel %d0,%a0@ <== NOT EXECUTED
42250: 70ff moveq #-1,%d0 <== NOT EXECUTED
42252: 6006 bras 4225a <IMFS_unmount+0x3e> <== NOT EXECUTED
/*
* Set the mt_fs pointer to indicate that there is no longer
* a file system mounted to this point.
*/
node->info.directory.mt_fs = NULL;
42254: 42a8 0058 clrl %a0@(88)
return 0;
42258: 4280 clrl %d0
}
4225a: 4e5e unlk %fp
...
00041d28 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
41d28: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
41d2a: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED
41d2e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED
41d32: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
41d36: b08a cmpl %a2,%d0 <== NOT EXECUTED
41d38: 660c bnes 41d46 <Stack_check_Dump_threads_usage+0x1e><== NOT EXECUTED
if (!Stack_check_Interrupt_stack.area)
41d3a: 4ab9 0005 dc9c tstl 5dc9c <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED
41d40: 6700 00a0 beqw 41de2 <Stack_check_Dump_threads_usage+0xba><== NOT EXECUTED
return;
stack = &Stack_check_Interrupt_stack;
the_thread = 0;
41d44: 95ca subal %a2,%a2 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
41d46: 2439 0005 dc98 movel 5dc98 <Stack_check_Interrupt_stack>,%d2<== NOT EXECUTED
41d4c: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
41d52: 2679 0005 d488 moveal 5d488 <print_handler>,%a3 <== NOT EXECUTED
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
41d58: 4a8a tstl %a2 <== NOT EXECUTED
41d5a: 672c beqs 41d88 <Stack_check_Dump_threads_usage+0x60><== NOT EXECUTED
(*print_handler)(
41d5c: 486e fffb pea %fp@(-5) <== NOT EXECUTED
41d60: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED
41d64: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
41d68: 4eb9 0004 5804 jsr 45804 <rtems_object_get_name> <== NOT EXECUTED
41d6e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
41d70: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED
41d74: 4879 0005 afec pea 5afec <IntUartPollCallbacks.6236+0x20> <== NOT EXECUTED
41d7a: 2f39 0005 d484 movel 5d484 <print_context>,%sp@- <== NOT EXECUTED
41d80: 4e93 jsr %a3@ <== NOT EXECUTED
41d82: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
41d86: 6016 bras 41d9e <Stack_check_Dump_threads_usage+0x76><== 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 );
41d88: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
41d8c: 4879 0005 aff9 pea 5aff9 <IntUartPollCallbacks.6236+0x2d> <== NOT EXECUTED
41d92: 2f39 0005 d484 movel 5d484 <print_context>,%sp@- <== NOT EXECUTED
41d98: 4e93 jsr %a3@ <== NOT EXECUTED
41d9a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
(*print_handler)(
41d9e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
41da0: 2039 0005 dc98 movel 5dc98 <Stack_check_Interrupt_stack>,%d0<== NOT EXECUTED
41da6: 5380 subql #1,%d0 <== NOT EXECUTED
41da8: 2079 0005 dc9c moveal 5dc9c <Stack_check_Interrupt_stack+0x4>,%a0<== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
41dae: 42a7 clrl %sp@- <== NOT EXECUTED
41db0: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
41db4: 2f08 movel %a0,%sp@- <== NOT EXECUTED
41db6: 4879 0005 b007 pea 5b007 <IntUartPollCallbacks.6236+0x3b> <== NOT EXECUTED
41dbc: 2f39 0005 d484 movel 5d484 <print_context>,%sp@- <== NOT EXECUTED
41dc2: 2079 0005 d488 moveal 5d488 <print_handler>,%a0 <== NOT EXECUTED
41dc8: 4e90 jsr %a0@ <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
41dca: 4879 0005 b025 pea 5b025 <IntUartPollCallbacks.6236+0x59> <== NOT EXECUTED
41dd0: 2f39 0005 d484 movel 5d484 <print_context>,%sp@- <== NOT EXECUTED
41dd6: 2079 0005 d488 moveal 5d488 <print_handler>,%a0 <== NOT EXECUTED
41ddc: 4e90 jsr %a0@ <== NOT EXECUTED
41dde: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
41de2: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED
41de8: 4e5e unlk %fp <== NOT EXECUTED
00041dec <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
41dec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
41df0: 4e5e unlk %fp <== NOT EXECUTED
00041e4a <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
41e4a: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED
41e4e: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
41e52: 266e 0008 moveal %fp@(8),%a3 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
41e56: 45f9 0004 3790 lea 43790 <printk>,%a2 <== NOT EXECUTED
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
41e5c: 286b 00c2 moveal %a3@(194),%a4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
41e60: 4879 0005 b032 pea 5b032 <IntUartPollCallbacks.6236+0x66> <== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
41e66: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
41e6a: 4e92 jsr %a2@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
41e6c: 2f0b movel %a3,%sp@- <== NOT EXECUTED
41e6e: 4879 0005 b042 pea 5b042 <IntUartPollCallbacks.6236+0x76> <== NOT EXECUTED
41e74: 4e92 jsr %a2@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
41e76: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
41e7a: 4879 0005 b05f pea 5b05f <IntUartPollCallbacks.6236+0x93> <== NOT EXECUTED
41e80: 4e92 jsr %a2@ <== NOT EXECUTED
printk(
41e82: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED
41e86: 4879 0005 b071 pea 5b071 <IntUartPollCallbacks.6236+0xa5> <== NOT EXECUTED
41e8c: 4e92 jsr %a2@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
41e8e: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED
41e92: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
41e96: 2f2b 0008 movel %a3@(8),%sp@- <== NOT EXECUTED
41e9a: 4eb9 0004 5804 jsr 45804 <rtems_object_get_name> <== NOT EXECUTED
41ea0: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED
41ea4: 2e80 movel %d0,%sp@ <== NOT EXECUTED
41ea6: 4879 0005 b085 pea 5b085 <IntUartPollCallbacks.6236+0xb9> <== NOT EXECUTED
41eac: 4e92 jsr %a2@ <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
41eae: 206b 00c2 moveal %a3@(194),%a0 <== NOT EXECUTED
41eb2: 202b 00be movel %a3@(190),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
41eb6: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED
41eba: 2f08 movel %a0,%sp@- <== NOT EXECUTED
41ebc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
41ebe: 4879 0005 b09b pea 5b09b <IntUartPollCallbacks.6236+0xcf> <== NOT EXECUTED
41ec4: 4e92 jsr %a2@ <== NOT EXECUTED
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
41ec6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
41eca: 4a02 tstb %d2 <== NOT EXECUTED
41ecc: 6618 bnes 41ee6 <Stack_check_report_blown_task+0x9c><== NOT EXECUTED
printk(
41ece: 486c 0018 pea %a4@(24) <== NOT EXECUTED
41ed2: 486c 0008 pea %a4@(8) <== NOT EXECUTED
41ed6: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED
41eda: 4879 0005 b0cc pea 5b0cc <IntUartPollCallbacks.6236+0x100> <== NOT EXECUTED
41ee0: 4e92 jsr %a2@ <== NOT EXECUTED
41ee2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
41ee6: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED
41eea: 4eb9 0004 608c jsr 4608c <rtems_fatal_error_occurred> <== NOT EXECUTED
000460e0 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
460e0: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
460e4: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
460ea: 5280 addql #1,%d0
460ec: 206e 0008 moveal %fp@(8),%a0
460f0: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
460f6: 42a7 clrl %sp@-
460f8: 2f28 0008 movel %a0@(8),%sp@-
460fc: 4868 0010 pea %a0@(16)
46100: 4eb9 0004 6364 jsr 46364 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
46106: 4fef 000c lea %sp@(12),%sp
}
4610a: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4610c: 4ef9 0004 7696 jmp 47696 <_Thread_Enable_dispatch>
...
000480fc <_CORE_RWLock_Obtain_for_reading>:
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
480fc: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
48102: 4e56 ffe8 linkw %fp,#-24
48106: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4810a: 246e 0008 moveal %fp@(8),%a2
4810e: 282e 000c movel %fp@(12),%d4
48112: 262e 0014 movel %fp@(20),%d3
48116: 1a2e 0013 moveb %fp@(19),%d5
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
4811a: 2679 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a3
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
48120: 40c2 movew %sr,%d2
48122: 8082 orl %d2,%d0
48124: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
48126: 202a 0044 movel %a2@(68),%d0
4812a: 6708 beqs 48134 <_CORE_RWLock_Obtain_for_reading+0x38>
4812c: 7201 moveq #1,%d1
4812e: b280 cmpl %d0,%d1
48130: 662a bnes 4815c <_CORE_RWLock_Obtain_for_reading+0x60>
48132: 600e bras 48142 <_CORE_RWLock_Obtain_for_reading+0x46>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
48134: 7001 moveq #1,%d0
the_rwlock->number_of_readers += 1;
48136: 52aa 0048 addql #1,%a2@(72)
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
4813a: 2540 0044 movel %d0,%a2@(68)
the_rwlock->number_of_readers += 1;
_ISR_Enable( level );
4813e: 46c2 movew %d2,%sr
48140: 6014 bras 48156 <_CORE_RWLock_Obtain_for_reading+0x5a>
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
return;
case CORE_RWLOCK_LOCKED_FOR_READING: {
Thread_Control *waiter;
waiter = _Thread_queue_First( &the_rwlock->Wait_queue );
48142: 2f0a movel %a2,%sp@-
48144: 4eb9 0004 9cb8 jsr 49cb8 <_Thread_queue_First>
if ( !waiter ) {
4814a: 588f addql #4,%sp
4814c: 4a80 tstl %d0
4814e: 660c bnes 4815c <_CORE_RWLock_Obtain_for_reading+0x60><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
48150: 52aa 0048 addql #1,%a2@(72)
_ISR_Enable( level );
48154: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
48156: 42ab 0034 clrl %a3@(52)
return;
4815a: 6046 bras 481a2 <_CORE_RWLock_Obtain_for_reading+0xa6>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
4815c: 4a05 tstb %d5
4815e: 660a bnes 4816a <_CORE_RWLock_Obtain_for_reading+0x6e>
_ISR_Enable( level );
48160: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
48162: 7202 moveq #2,%d1
48164: 2741 0034 movel %d1,%a3@(52)
48168: 6038 bras 481a2 <_CORE_RWLock_Obtain_for_reading+0xa6>
4816a: 7001 moveq #1,%d0
4816c: 2540 0030 movel %d0,%a2@(48)
/*
* 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;
48170: 274a 0044 movel %a2,%a3@(68)
executing->Wait.id = id;
48174: 2744 0020 movel %d4,%a3@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
48178: 42ab 0030 clrl %a3@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4817c: 42ab 0034 clrl %a3@(52)
_ISR_Enable( level );
48180: 46c2 movew %d2,%sr
_Thread_queue_Enqueue_with_handler(
48182: 2d43 000c movel %d3,%fp@(12)
48186: 223c 0004 82ec movel #295660,%d1
4818c: 2d4a 0008 movel %a2,%fp@(8)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
48190: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
48196: 2d41 0010 movel %d1,%fp@(16)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4819a: 4e5e unlk %fp
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
4819c: 4ef9 0004 99ac jmp 499ac <_Thread_queue_Enqueue_with_handler>
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
481a2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
481a8: 4e5e unlk %fp <== NOT EXECUTED
00048238 <_CORE_RWLock_Release>:
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
48238: 223c 0000 0700 movel #1792,%d1
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
4823e: 4e56 fff0 linkw %fp,#-16
ISR_Level level;
Thread_Control *executing = _Thread_Executing;
48242: 2079 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
48248: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
4824c: 246e 0008 moveal %fp@(8),%a2
* Otherwise, we have to block.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
48250: 40c0 movew %sr,%d0
48252: 8280 orl %d0,%d1
48254: 46c1 movew %d1,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
48256: 222a 0044 movel %a2@(68),%d1
4825a: 660a bnes 48266 <_CORE_RWLock_Release+0x2e>
_ISR_Enable( level );
4825c: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
4825e: 7002 moveq #2,%d0
48260: 2140 0034 movel %d0,%a0@(52)
return CORE_RWLOCK_SUCCESSFUL;
48264: 6078 bras 482de <_CORE_RWLock_Release+0xa6>
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
48266: 7401 moveq #1,%d2
48268: b481 cmpl %d1,%d2
4826a: 6610 bnes 4827c <_CORE_RWLock_Release+0x44>
the_rwlock->number_of_readers -= 1;
4826c: 222a 0048 movel %a2@(72),%d1
48270: 5381 subql #1,%d1
48272: 2541 0048 movel %d1,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
48276: 6704 beqs 4827c <_CORE_RWLock_Release+0x44>
/* must be unlocked again */
_ISR_Enable( level );
48278: 46c0 movew %d0,%sr
return CORE_RWLOCK_SUCCESSFUL;
4827a: 6062 bras 482de <_CORE_RWLock_Release+0xa6>
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4827c: 42a8 0034 clrl %a0@(52)
/*
* Implicitly transition to "unlocked" and find another thread interested
* in obtaining this rwlock.
*/
the_rwlock->current_state = CORE_RWLOCK_UNLOCKED;
48280: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
48284: 46c0 movew %d0,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
48286: 2f0a movel %a2,%sp@-
48288: 4eb9 0004 9870 jsr 49870 <_Thread_queue_Dequeue>
if ( next ) {
4828e: 588f addql #4,%sp
48290: 4a80 tstl %d0
48292: 674a beqs 482de <_CORE_RWLock_Release+0xa6>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
48294: 7201 moveq #1,%d1
48296: 2040 moveal %d0,%a0
48298: b2a8 0030 cmpl %a0@(48),%d1
4829c: 6608 bnes 482a6 <_CORE_RWLock_Release+0x6e>
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
4829e: 7002 moveq #2,%d0
482a0: 2540 0044 movel %d0,%a2@(68)
return CORE_RWLOCK_SUCCESSFUL;
482a4: 6038 bras 482de <_CORE_RWLock_Release+0xa6>
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
482a6: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
482a8: 52aa 0048 addql #1,%a2@(72)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
482ac: 49f9 0004 9cb8 lea 49cb8 <_Thread_queue_First>,%a4
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
482b2: 47f9 0004 9b8c lea 49b8c <_Thread_queue_Extract>,%a3
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
482b8: 2541 0044 movel %d1,%a2@(68)
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
482bc: 2f0a movel %a2,%sp@-
482be: 4e94 jsr %a4@
if ( !next ||
482c0: 588f addql #4,%sp
482c2: 4a80 tstl %d0
482c4: 6718 beqs 482de <_CORE_RWLock_Release+0xa6>
482c6: 7401 moveq #1,%d2
482c8: 2040 moveal %d0,%a0
482ca: b4a8 0030 cmpl %a0@(48),%d2
482ce: 670e beqs 482de <_CORE_RWLock_Release+0xa6> <== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
482d0: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
482d4: 2f00 movel %d0,%sp@-
482d6: 2f0a movel %a2,%sp@-
482d8: 4e93 jsr %a3@
}
482da: 508f addql #8,%sp
482dc: 60de bras 482bc <_CORE_RWLock_Release+0x84>
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
482de: 4280 clrl %d0
482e0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
482e6: 4e5e unlk %fp
...
000482ec <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
482ec: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
482f0: 486e fffc pea %fp@(-4)
482f4: 2f2e 0008 movel %fp@(8),%sp@-
482f8: 4eb9 0004 954c jsr 4954c <_Thread_Get>
switch ( location ) {
482fe: 508f addql #8,%sp
48300: 4aae fffc tstl %fp@(-4)
48304: 6618 bnes 4831e <_CORE_RWLock_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
48306: 2f00 movel %d0,%sp@-
48308: 4eb9 0004 9db8 jsr 49db8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4830e: 588f addql #4,%sp
48310: 2039 0006 0350 movel 60350 <_Thread_Dispatch_disable_level>,%d0
48316: 5380 subql #1,%d0
48318: 23c0 0006 0350 movel %d0,60350 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
4831e: 4e5e unlk %fp
...
00047178 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
47178: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4717e: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
47182: 2279 0005 f3c0 moveal 5f3c0 <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
47188: 48d7 001c moveml %d2-%d4,%sp@
4718c: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
47190: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
47194: 242e 000c movel %fp@(12),%d2
47198: 262e 0014 movel %fp@(20),%d3
4719c: 282e 0018 movel %fp@(24),%d4
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
471a0: 40c1 movew %sr,%d1
471a2: 8081 orl %d1,%d0
471a4: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
471a6: 2028 0048 movel %a0@(72),%d0
471aa: 5280 addql #1,%d0
471ac: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
471b0: 4aa8 0040 tstl %a0@(64)
471b4: 6626 bnes 471dc <_CORE_barrier_Wait+0x64>
if ( the_barrier->number_of_waiting_threads ==
471b6: b0a8 0044 cmpl %a0@(68),%d0
471ba: 6620 bnes 471dc <_CORE_barrier_Wait+0x64>
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
471bc: 7001 moveq #1,%d0
471be: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
471c2: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
471c4: 2d44 0010 movel %d4,%fp@(16)
471c8: 2d42 000c movel %d2,%fp@(12)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
471cc: 4cd7 001c moveml %sp@,%d2-%d4
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
471d0: 2d48 0008 movel %a0,%fp@(8)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
471d4: 4e5e unlk %fp
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
471d6: 4ef9 0004 ba94 jmp 4ba94 <_CORE_barrier_Release>
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;
471dc: 7001 moveq #1,%d0
471de: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
471e2: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
471e6: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
471ea: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
471ec: 2d43 000c movel %d3,%fp@(12)
471f0: 203c 0004 8e1c movel #298524,%d0
471f6: 2d48 0008 movel %a0,%fp@(8)
}
471fa: 4cd7 001c moveml %sp@,%d2-%d4
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
471fe: 2d40 0010 movel %d0,%fp@(16)
}
47202: 4e5e unlk %fp
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
47204: 4ef9 0004 8b0c jmp 48b0c <_Thread_queue_Enqueue_with_handler>
...
00052d38 <_CORE_message_queue_Broadcast>:
Objects_Id id __attribute__((unused)),
CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)),
#endif
uint32_t *count
)
{
52d38: 4e56 ffe0 linkw %fp,#-32
52d3c: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
52d40: 246e 0008 moveal %fp@(8),%a2
52d44: 2a2e 000c movel %fp@(12),%d5
52d48: 262e 0010 movel %fp@(16),%d3
52d4c: 286e 001c moveal %fp@(28),%a4
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
52d50: b6aa 004c cmpl %a2@(76),%d3
52d54: 6244 bhis 52d9a <_CORE_message_queue_Broadcast+0x62><== NEVER TAKEN
* 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 ) {
52d56: 4aaa 0048 tstl %a2@(72)
52d5a: 6610 bnes 52d6c <_CORE_message_queue_Broadcast+0x34>
52d5c: 4282 clrl %d2
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
52d5e: 283c 0005 51b4 movel #348596,%d4
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
52d64: 4bf9 0005 a9e0 lea 5a9e0 <memcpy>,%a5
52d6a: 601a bras 52d86 <_CORE_message_queue_Broadcast+0x4e>
* send and receive and this ensures that we are broadcasting
* the message to threads waiting to receive -- not to send.
*/
if ( the_message_queue->number_of_pending_messages != 0 ) {
*count = 0;
52d6c: 4294 clrl %a4@
52d6e: 6026 bras 52d96 <_CORE_message_queue_Broadcast+0x5e>
52d70: 2f03 movel %d3,%sp@-
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
52d72: 5282 addql #1,%d2
52d74: 2f05 movel %d5,%sp@-
52d76: 2f2b 002c movel %a3@(44),%sp@-
52d7a: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
52d7c: 206b 0028 moveal %a3@(40),%a0
52d80: 4fef 000c lea %sp@(12),%sp
52d84: 2083 movel %d3,%a0@
/*
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
52d86: 2f0a movel %a2,%sp@-
52d88: 2044 moveal %d4,%a0
52d8a: 4e90 jsr %a0@
52d8c: 588f addql #4,%sp
52d8e: 2640 moveal %d0,%a3
52d90: 4a80 tstl %d0
52d92: 66dc bnes 52d70 <_CORE_message_queue_Broadcast+0x38>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
52d94: 2882 movel %d2,%a4@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
52d96: 4280 clrl %d0
52d98: 6002 bras 52d9c <_CORE_message_queue_Broadcast+0x64>
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
52d9a: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
52d9c: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
52da2: 4e5e unlk %fp
...
0004dfac <_CORE_message_queue_Initialize>:
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4dfac: 7003 moveq #3,%d0
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Attributes *the_message_queue_attributes,
uint32_t maximum_pending_messages,
size_t maximum_message_size
)
{
4dfae: 4e56 fff4 linkw %fp,#-12
4dfb2: 222e 0014 movel %fp@(20),%d1
4dfb6: 48d7 040c moveml %d2-%d3/%a2,%sp@
4dfba: 246e 0008 moveal %fp@(8),%a2
4dfbe: 242e 0010 movel %fp@(16),%d2
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4dfc2: c081 andl %d1,%d0
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
4dfc4: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
4dfc8: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
4dfcc: 2541 004c movel %d1,%a2@(76)
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Notify_Handler the_handler,
void *the_argument
)
{
the_message_queue->notify_handler = the_handler;
4dfd0: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
4dfd4: 42aa 0064 clrl %a2@(100)
/*
* Round size up to multiple of a pointer for chain init and
* check for overflow on adding overhead to each message.
*/
allocated_message_size = maximum_message_size;
if (allocated_message_size & (sizeof(uint32_t) - 1)) {
4dfd8: 4a80 tstl %d0
4dfda: 670e beqs 4dfea <_CORE_message_queue_Initialize+0x3e>
allocated_message_size += sizeof(uint32_t);
4dfdc: 2001 movel %d1,%d0
4dfde: 5880 addql #4,%d0
allocated_message_size &= ~(sizeof(uint32_t) - 1);
4dfe0: 76fc moveq #-4,%d3
4dfe2: c083 andl %d3,%d0
}
if (allocated_message_size < maximum_message_size)
4dfe4: b280 cmpl %d0,%d1
4dfe6: 6272 bhis 4e05a <_CORE_message_queue_Initialize+0xae><== NEVER TAKEN
4dfe8: 6002 bras 4dfec <_CORE_message_queue_Initialize+0x40>
/*
* 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)) {
4dfea: 2001 movel %d1,%d0
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
4dfec: 2600 movel %d0,%d3
4dfee: 0683 0000 0014 addil #20,%d3
/*
* Calculate how much total memory is required for message buffering and
* check for overflow on the multiplication.
*/
message_buffering_required = (size_t) maximum_pending_messages *
4dff4: 2203 movel %d3,%d1
4dff6: 4c02 1800 mulsl %d2,%d1
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
4dffa: b081 cmpl %d1,%d0
4dffc: 625c bhis 4e05a <_CORE_message_queue_Initialize+0xae><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
4dffe: 2f01 movel %d1,%sp@-
4e000: 4eb9 0005 0a10 jsr 50a10 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
4e006: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
4e008: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
4e00c: 674c beqs 4e05a <_CORE_message_queue_Initialize+0xae>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
4e00e: 2f03 movel %d3,%sp@-
4e010: 2f02 movel %d2,%sp@-
4e012: 2f00 movel %d0,%sp@-
4e014: 486a 0068 pea %a2@(104)
4e018: 4eb9 0005 2be0 jsr 52be0 <_Chain_Initialize>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4e01e: 41ea 0054 lea %a2@(84),%a0
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
4e022: 7001 moveq #1,%d0
4e024: 2548 0050 movel %a0,%a2@(80)
the_message_queue->message_buffers,
(size_t) maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
4e028: 41ea 0050 lea %a2@(80),%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4e02c: 42aa 0054 clrl %a2@(84)
4e030: 2548 0058 movel %a0,%a2@(88)
_Thread_queue_Initialize(
4e034: 4878 0006 pea 6 <EXTENDSFDF>
4e038: 206e 000c moveal %fp@(12),%a0
4e03c: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b>
4e040: b090 cmpl %a0@,%d0
4e042: 57c0 seq %d0
4e044: 49c0 extbl %d0
4e046: 4480 negl %d0
4e048: 2f00 movel %d0,%sp@-
4e04a: 2f0a movel %a2,%sp@-
4e04c: 4eb9 0004 fee4 jsr 4fee4 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
4e052: 4fef 0020 lea %sp@(32),%sp
4e056: 7001 moveq #1,%d0
4e058: 6002 bras 4e05c <_CORE_message_queue_Initialize+0xb0>
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
4e05a: 4200 clrb %d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
4e05c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4e062: 4e5e unlk %fp
...
000462c0 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
462c0: 4e56 0000 linkw %fp,#0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
462c4: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
462ca: 2f0a movel %a2,%sp@-
462cc: 246e 0008 moveal %fp@(8),%a2
462d0: 2f02 movel %d2,%sp@-
462d2: 142e 0013 moveb %fp@(19),%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
462d6: 4a80 tstl %d0
462d8: 671c beqs 462f6 <_CORE_mutex_Seize+0x36>
462da: 4a02 tstb %d2
462dc: 6718 beqs 462f6 <_CORE_mutex_Seize+0x36> <== NEVER TAKEN
462de: 7001 moveq #1,%d0
462e0: b0b9 0005 daba cmpl 5daba <_System_state_Current>,%d0
462e6: 640e bccs 462f6 <_CORE_mutex_Seize+0x36>
462e8: 4878 0012 pea 12 <INVALID_OPERATION+0x2>
462ec: 42a7 clrl %sp@-
462ee: 42a7 clrl %sp@-
462f0: 4eb9 0004 6928 jsr 46928 <_Internal_error_Occurred>
462f6: 486e 0018 pea %fp@(24)
462fa: 2f0a movel %a2,%sp@-
462fc: 4eb9 0004 aa84 jsr 4aa84 <_CORE_mutex_Seize_interrupt_trylock>
46302: 508f addql #8,%sp
46304: 4a80 tstl %d0
46306: 6750 beqs 46358 <_CORE_mutex_Seize+0x98>
46308: 4a02 tstb %d2
4630a: 6614 bnes 46320 <_CORE_mutex_Seize+0x60>
4630c: 202e 0018 movel %fp@(24),%d0
46310: 46c0 movew %d0,%sr
46312: 2079 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a0
46318: 7001 moveq #1,%d0
4631a: 2140 0034 movel %d0,%a0@(52)
4631e: 6038 bras 46358 <_CORE_mutex_Seize+0x98>
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;
46320: 7001 moveq #1,%d0
46322: 2079 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a0
46328: 2540 0030 movel %d0,%a2@(48)
4632c: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
46332: 5280 addql #1,%d0
46334: 216e 000c 0020 movel %fp@(12),%a0@(32)
4633a: 214a 0044 movel %a2,%a0@(68)
4633e: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
46344: 202e 0018 movel %fp@(24),%d0
46348: 46c0 movew %d0,%sr
4634a: 2f2e 0014 movel %fp@(20),%sp@-
4634e: 2f0a movel %a2,%sp@-
46350: 4eb9 0004 625c jsr 4625c <_CORE_mutex_Seize_interrupt_blocking>
46356: 508f addql #8,%sp
}
46358: 242e fff8 movel %fp@(-8),%d2
4635c: 246e fffc moveal %fp@(-4),%a2
46360: 4e5e unlk %fp <== NOT EXECUTED
0004649c <_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
)
{
4649c: 4e56 0000 linkw %fp,#0
464a0: 2f0a movel %a2,%sp@-
464a2: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
464a6: 2f0a movel %a2,%sp@-
464a8: 4eb9 0004 79e0 jsr 479e0 <_Thread_queue_Dequeue>
464ae: 588f addql #4,%sp
464b0: 4a80 tstl %d0
464b2: 6624 bnes 464d8 <_CORE_semaphore_Surrender+0x3c>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
464b4: 303c 0700 movew #1792,%d0
464b8: 40c1 movew %sr,%d1
464ba: 8081 orl %d1,%d0
464bc: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
464be: 202a 0048 movel %a2@(72),%d0
464c2: b0aa 0040 cmpl %a2@(64),%d0
464c6: 640a bccs 464d2 <_CORE_semaphore_Surrender+0x36> <== NEVER TAKEN
the_semaphore->count += 1;
464c8: 5280 addql #1,%d0
464ca: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
464ce: 4280 clrl %d0
464d0: 6002 bras 464d4 <_CORE_semaphore_Surrender+0x38>
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
464d2: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
464d4: 46c1 movew %d1,%sr
464d6: 6002 bras 464da <_CORE_semaphore_Surrender+0x3e>
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
464d8: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
464da: 246e fffc moveal %fp@(-4),%a2
464de: 4e5e unlk %fp
...
0004521c <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
4521c: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
45222: 4e56 ffec linkw %fp,#-20
45226: 226e 0010 moveal %fp@(16),%a1
4522a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
4522e: 2479 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
45234: 242e 0008 movel %fp@(8),%d2
45238: 262e 000c movel %fp@(12),%d3
4523c: 206e 0014 moveal %fp@(20),%a0
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
45240: 42aa 0034 clrl %a2@(52)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
45244: 266a 010a moveal %a2@(266),%a3
_ISR_Disable( level );
45248: 40c1 movew %sr,%d1
4524a: 8081 orl %d1,%d0
4524c: 46c0 movew %d0,%sr
pending_events = api->pending_events;
4524e: 2813 movel %a3@,%d4
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
45250: 2002 movel %d2,%d0
45252: c084 andl %d4,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
45254: 6716 beqs 4526c <_Event_Seize+0x50>
45256: b480 cmpl %d0,%d2
45258: 6706 beqs 45260 <_Event_Seize+0x44>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
4525a: 0803 0001 btst #1,%d3
4525e: 670c beqs 4526c <_Event_Seize+0x50> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
45260: 2400 movel %d0,%d2
45262: 4682 notl %d2
45264: c484 andl %d4,%d2
45266: 2682 movel %d2,%a3@
api->pending_events =
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
45268: 46c1 movew %d1,%sr
4526a: 600e bras 4527a <_Event_Seize+0x5e>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
4526c: 0803 0000 btst #0,%d3
45270: 670e beqs 45280 <_Event_Seize+0x64>
_ISR_Enable( level );
45272: 46c1 movew %d1,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
45274: 720d moveq #13,%d1
45276: 2541 0034 movel %d1,%a2@(52)
*event_out = seized_events;
4527a: 2080 movel %d0,%a0@
return;
4527c: 6000 0096 braw 45314 <_Event_Seize+0xf8>
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
executing->Wait.count = (uint32_t) event_in;
45280: 2542 0024 movel %d2,%a2@(36)
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
45284: 7401 moveq #1,%d2
* set properly when we are marked as in the event critical section.
*
* NOTE: Since interrupts are disabled, this isn't that much of an
* issue but better safe than sorry.
*/
executing->Wait.option = (uint32_t) option_set;
45286: 2543 0030 movel %d3,%a2@(48)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
4528a: 2548 0028 movel %a0,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4528e: 23c2 0005 e18a movel %d2,5e18a <_Event_Sync_state>
_ISR_Enable( level );
45294: 46c1 movew %d1,%sr
if ( ticks ) {
45296: 4a89 tstl %a1
45298: 6730 beqs 452ca <_Event_Seize+0xae>
_Watchdog_Initialize(
4529a: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4529e: 223c 0004 5478 movel #283768,%d1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
452a4: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
452a8: 2541 0064 movel %d1,%a2@(100)
the_watchdog->id = id;
452ac: 2540 0068 movel %d0,%a2@(104)
the_watchdog->user_data = user_data;
452b0: 42aa 006c clrl %a2@(108)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
452b4: 2549 0054 movel %a1,%a2@(84)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
452b8: 486a 0048 pea %a2@(72)
452bc: 4879 0005 da0e pea 5da0e <_Watchdog_Ticks_chain>
452c2: 4eb9 0004 8614 jsr 48614 <_Watchdog_Insert>
452c8: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
452ca: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
452ce: 2f0a movel %a2,%sp@-
452d0: 4eb9 0004 7ed4 jsr 47ed4 <_Thread_Set_state>
_ISR_Disable( level );
452d6: 203c 0000 0700 movel #1792,%d0
452dc: 40c1 movew %sr,%d1
452de: 8081 orl %d1,%d0
452e0: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
452e2: 7401 moveq #1,%d2
452e4: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
452e6: 2039 0005 e18a movel 5e18a <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
452ec: 42b9 0005 e18a clrl 5e18a <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
452f2: b480 cmpl %d0,%d2
452f4: 6604 bnes 452fa <_Event_Seize+0xde>
_ISR_Enable( level );
452f6: 46c1 movew %d1,%sr
452f8: 601a bras 45314 <_Event_Seize+0xf8>
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
452fa: 2d4a 000c movel %a2,%fp@(12)
452fe: 2d41 0010 movel %d1,%fp@(16)
}
45302: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
45308: 2d40 0008 movel %d0,%fp@(8)
}
4530c: 4e5e unlk %fp
* An interrupt completed the thread's blocking request.
* The blocking thread was satisfied by an ISR or timed out.
*
* WARNING! Returning with interrupts disabled!
*/
_Thread_blocking_operation_Cancel( sync_state, executing, level );
4530e: 4ef9 0004 7160 jmp 47160 <_Thread_blocking_operation_Cancel>
}
45314: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
4531a: 4e5e unlk %fp
...
00045374 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
45374: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4537a: 4e56 ffe8 linkw %fp,#-24
4537e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
45382: 246e 0008 moveal %fp@(8),%a2
rtems_event_set event_condition;
rtems_event_set seized_events;
rtems_option option_set;
RTEMS_API_Control *api;
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
45386: 206a 010a moveal %a2@(266),%a0
option_set = (rtems_option) the_thread->Wait.option;
4538a: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
4538e: 40c1 movew %sr,%d1
45390: 8081 orl %d1,%d0
45392: 46c0 movew %d0,%sr
pending_events = api->pending_events;
event_condition = (rtems_event_set) the_thread->Wait.count;
45394: 262a 0024 movel %a2@(36),%d3
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Get(
rtems_event_set the_event_set,
rtems_event_set the_event_condition
)
{
return ( the_event_set & the_event_condition );
45398: 2003 movel %d3,%d0
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
pending_events = api->pending_events;
4539a: 2410 movel %a0@,%d2
4539c: c082 andl %d2,%d0
seized_events = _Event_sets_Get( pending_events, event_condition );
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
4539e: 6606 bnes 453a6 <_Event_Surrender+0x32>
_ISR_Enable( level );
453a0: 46c1 movew %d1,%sr
return;
453a2: 6000 00ca braw 4546e <_Event_Surrender+0xfa>
/*
* 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() &&
453a6: 4ab9 0005 ddd8 tstl 5ddd8 <_Per_CPU_Information+0x8>
453ac: 674a beqs 453f8 <_Event_Surrender+0x84>
453ae: b5f9 0005 dddc cmpal 5dddc <_Per_CPU_Information+0xc>,%a2
453b4: 6642 bnes 453f8 <_Event_Surrender+0x84>
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
453b6: 2279 0005 e18a moveal 5e18a <_Event_Sync_state>,%a1
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
453bc: 7a02 moveq #2,%d5
453be: ba89 cmpl %a1,%d5
453c0: 670e beqs 453d0 <_Event_Surrender+0x5c> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
453c2: 2279 0005 e18a moveal 5e18a <_Event_Sync_state>,%a1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
453c8: 1a3c 0001 moveb #1,%d5
453cc: ba89 cmpl %a1,%d5
453ce: 6628 bnes 453f8 <_Event_Surrender+0x84>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
453d0: b680 cmpl %d0,%d3
453d2: 6706 beqs 453da <_Event_Surrender+0x66>
453d4: 0804 0001 btst #1,%d4
453d8: 671a beqs 453f4 <_Event_Surrender+0x80> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
453da: 2600 movel %d0,%d3
453dc: 4683 notl %d3
453de: c682 andl %d2,%d3
453e0: 2083 movel %d3,%a0@
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;
453e2: 206a 0028 moveal %a2@(40),%a0
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
453e6: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
453ea: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
453ec: 7003 moveq #3,%d0
453ee: 23c0 0005 e18a movel %d0,5e18a <_Event_Sync_state>
}
_ISR_Enable( level );
453f4: 46c1 movew %d1,%sr
return;
453f6: 6076 bras 4546e <_Event_Surrender+0xfa>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
453f8: 2a2a 0010 movel %a2@(16),%d5
453fc: 0285 0000 0100 andil #256,%d5
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
45402: 6768 beqs 4546c <_Event_Surrender+0xf8>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
45404: b680 cmpl %d0,%d3
45406: 6706 beqs 4540e <_Event_Surrender+0x9a>
45408: 0804 0001 btst #1,%d4
4540c: 675e beqs 4546c <_Event_Surrender+0xf8> <== NEVER TAKEN
4540e: 2600 movel %d0,%d3
45410: 4683 notl %d3
45412: c682 andl %d2,%d3
45414: 2083 movel %d3,%a0@
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;
45416: 206a 0028 moveal %a2@(40),%a0
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
4541a: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4541e: 2080 movel %d0,%a0@
_ISR_Flash( level );
45420: 203c 0000 0700 movel #1792,%d0
45426: 46c1 movew %d1,%sr
45428: 8081 orl %d1,%d0
4542a: 46c0 movew %d0,%sr
4542c: 47f9 0004 72f0 lea 472f0 <_Thread_Clear_state>,%a3
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
45432: 7a02 moveq #2,%d5
45434: baaa 0050 cmpl %a2@(80),%d5
45438: 6710 beqs 4544a <_Event_Surrender+0xd6>
_ISR_Enable( level );
4543a: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4543c: 2f3c 1003 fff8 movel #268697592,%sp@-
45442: 2f0a movel %a2,%sp@-
45444: 4e93 jsr %a3@
45446: 508f addql #8,%sp
45448: 6024 bras 4546e <_Event_Surrender+0xfa>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4544a: 7003 moveq #3,%d0
4544c: 2540 0050 movel %d0,%a2@(80)
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
45450: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
45452: 486a 0048 pea %a2@(72)
45456: 4eb9 0004 8730 jsr 48730 <_Watchdog_Remove>
4545c: 2f3c 1003 fff8 movel #268697592,%sp@-
45462: 2f0a movel %a2,%sp@-
45464: 4e93 jsr %a3@
45466: 4fef 000c lea %sp@(12),%sp
4546a: 6002 bras 4546e <_Event_Surrender+0xfa>
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4546c: 46c1 movew %d1,%sr
}
4546e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
45474: 4e5e unlk %fp <== NOT EXECUTED
00045478 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
45478: 4e56 fffc linkw %fp,#-4
4547c: 2f03 movel %d3,%sp@-
4547e: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
45480: 486e fffc pea %fp@(-4)
45484: 2f2e 0008 movel %fp@(8),%sp@-
45488: 4eb9 0004 76bc jsr 476bc <_Thread_Get>
switch ( location ) {
4548e: 508f addql #8,%sp
45490: 4aae fffc tstl %fp@(-4)
45494: 6656 bnes 454ec <_Event_Timeout+0x74> <== NEVER TAKEN
*
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
_ISR_Disable( level );
45496: 223c 0000 0700 movel #1792,%d1
4549c: 40c2 movew %sr,%d2
4549e: 8282 orl %d2,%d1
454a0: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
454a2: 2040 moveal %d0,%a0
454a4: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
454a8: b0b9 0005 dddc cmpl 5dddc <_Per_CPU_Information+0xc>,%d0
454ae: 6614 bnes 454c4 <_Event_Timeout+0x4c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
454b0: 2239 0005 e18a movel 5e18a <_Event_Sync_state>,%d1
454b6: 7601 moveq #1,%d3
454b8: b681 cmpl %d1,%d3
454ba: 6608 bnes 454c4 <_Event_Timeout+0x4c>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
454bc: 7202 moveq #2,%d1
454be: 23c1 0005 e18a movel %d1,5e18a <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
454c4: 7606 moveq #6,%d3
454c6: 2040 moveal %d0,%a0
454c8: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
454cc: 46c2 movew %d2,%sr
454ce: 2f3c 1003 fff8 movel #268697592,%sp@-
454d4: 2f00 movel %d0,%sp@-
454d6: 4eb9 0004 72f0 jsr 472f0 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
454dc: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
454de: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
454e4: 5380 subql #1,%d0
454e6: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
454ec: 242e fff4 movel %fp@(-12),%d2
454f0: 262e fff8 movel %fp@(-8),%d3
454f4: 4e5e unlk %fp <== NOT EXECUTED
0004abe8 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4abe8: 4e56 ffbc linkw %fp,#-68
4abec: 202e 000c movel %fp@(12),%d0
4abf0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4abf4: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
4abf8: 2e00 movel %d0,%d7
4abfa: 5887 addql #4,%d7
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4abfc: 222e 0010 movel %fp@(16),%d1
4ac00: 2a2e 0014 movel %fp@(20),%d5
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4ac04: 206a 0008 moveal %a2@(8),%a0
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
4ac08: 2c2a 0010 movel %a2@(16),%d6
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4ac0c: b087 cmpl %d7,%d0
4ac0e: 6200 013e bhiw 4ad4e <_Heap_Allocate_aligned_with_boundary+0x166>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4ac12: 4a85 tstl %d5
4ac14: 670c beqs 4ac22 <_Heap_Allocate_aligned_with_boundary+0x3a>
if ( boundary < alloc_size ) {
4ac16: b085 cmpl %d5,%d0
4ac18: 6200 0134 bhiw 4ad4e <_Heap_Allocate_aligned_with_boundary+0x166>
return NULL;
}
if ( alignment == 0 ) {
4ac1c: 4a81 tstl %d1
4ac1e: 6602 bnes 4ac22 <_Heap_Allocate_aligned_with_boundary+0x3a>
alignment = page_size;
4ac20: 2206 movel %d6,%d1
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4ac22: 2406 movel %d6,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4ac24: 7804 moveq #4,%d4
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4ac26: 5e82 addql #7,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4ac28: 9880 subl %d0,%d4
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
alignment = page_size;
4ac2a: 4283 clrl %d3
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4ac2c: 2d42 fff8 movel %d2,%fp@(-8)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4ac30: 2d44 fff4 movel %d4,%fp@(-12)
4ac34: 2d47 ffe4 movel %d7,%fp@(-28)
4ac38: 2d46 ffec movel %d6,%fp@(-20)
4ac3c: 6000 00fa braw 4ad38 <_Heap_Allocate_aligned_with_boundary+0x150>
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4ac40: 2428 0004 movel %a0@(4),%d2
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4ac44: 5283 addql #1,%d3
/*
* The HEAP_PREV_BLOCK_USED flag is always set in the block size_and_flag
* field. Thus the value is about one unit larger than the real block
* size. The greater than operator takes this into account.
*/
if ( block->size_and_flag > block_size_floor ) {
4ac46: b4ae ffe4 cmpl %fp@(-28),%d2
4ac4a: 6300 00e8 blsw 4ad34 <_Heap_Allocate_aligned_with_boundary+0x14c>
4ac4e: 43e8 0008 lea %a0@(8),%a1
if ( alignment == 0 ) {
4ac52: 4a81 tstl %d1
4ac54: 6606 bnes 4ac5c <_Heap_Allocate_aligned_with_boundary+0x74>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4ac56: 2409 movel %a1,%d2
4ac58: 6000 00b6 braw 4ad10 <_Heap_Allocate_aligned_with_boundary+0x128>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4ac5c: 7cfe moveq #-2,%d6
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4ac5e: 266a 0014 moveal %a2@(20),%a3
4ac62: c486 andl %d6,%d2
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
4ac64: 282e fff8 movel %fp@(-8),%d4
4ac68: 988b subl %a3,%d4
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
4ac6a: d488 addl %a0,%d2
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4ac6c: 2c04 movel %d4,%d6
4ac6e: dc82 addl %d2,%d6
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4ac70: d4ae fff4 addl %fp@(-12),%d2
4ac74: 2d42 fffc movel %d2,%fp@(-4)
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4ac78: 4c41 2007 remul %d1,%d7,%d2
4ac7c: 242e fffc movel %fp@(-4),%d2
4ac80: 9487 subl %d7,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4ac82: bc82 cmpl %d2,%d6
4ac84: 640a bccs 4ac90 <_Heap_Allocate_aligned_with_boundary+0xa8>
4ac86: 2806 movel %d6,%d4
4ac88: 4c41 4002 remul %d1,%d2,%d4
4ac8c: 9c82 subl %d2,%d6
4ac8e: 2406 movel %d6,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4ac90: 4a85 tstl %d5
4ac92: 675c beqs 4acf0 <_Heap_Allocate_aligned_with_boundary+0x108>
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4ac94: 2c02 movel %d2,%d6
4ac96: dc80 addl %d0,%d6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4ac98: 49f1 0800 lea %a1@(00000000,%d0:l),%a4
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
alloc_begin = _Heap_Align_down( alloc_begin_ceiling, alignment );
}
alloc_end = alloc_begin + alloc_size;
4ac9c: 2d46 fff0 movel %d6,%fp@(-16)
4aca0: 2a6e fff0 moveal %fp@(-16),%a5
4aca4: 4c45 6004 remul %d5,%d4,%d6
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4aca8: 2d4c fffc movel %a4,%fp@(-4)
4acac: 2e2e ffe4 movel %fp@(-28),%d7
4acb0: 9bc4 subal %d4,%a5
4acb2: 284d moveal %a5,%a4
4acb4: 2d43 ffe8 movel %d3,%fp@(-24)
4acb8: 282e fff0 movel %fp@(-16),%d4
4acbc: 6022 bras 4ace0 <_Heap_Allocate_aligned_with_boundary+0xf8>
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4acbe: b9ee fffc cmpal %fp@(-4),%a4
4acc2: 6568 bcss 4ad2c <_Heap_Allocate_aligned_with_boundary+0x144>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4acc4: 240c movel %a4,%d2
4acc6: 9480 subl %d0,%d2
4acc8: 2802 movel %d2,%d4
4acca: 4c41 4003 remul %d1,%d3,%d4
4acce: 9483 subl %d3,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4acd0: 2802 movel %d2,%d4
4acd2: d880 addl %d0,%d4
4acd4: 2c04 movel %d4,%d6
4acd6: 2a44 moveal %d4,%a5
4acd8: 4c45 6003 remul %d5,%d3,%d6
4acdc: 9bc3 subal %d3,%a5
4acde: 284d moveal %a5,%a4
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
4ace0: b9c2 cmpal %d2,%a4
4ace2: 6304 blss 4ace8 <_Heap_Allocate_aligned_with_boundary+0x100>
4ace4: b88c cmpl %a4,%d4
4ace6: 62d6 bhis 4acbe <_Heap_Allocate_aligned_with_boundary+0xd6>
4ace8: 262e ffe8 movel %fp@(-24),%d3
4acec: 2d47 ffe4 movel %d7,%fp@(-28)
boundary_line = _Heap_Align_down( alloc_end, boundary );
}
}
/* Ensure that the we have a valid new block at the beginning */
if ( alloc_begin >= alloc_begin_floor ) {
4acf0: b3c2 cmpal %d2,%a1
4acf2: 6240 bhis 4ad34 <_Heap_Allocate_aligned_with_boundary+0x14c>
4acf4: 2c2e ffec movel %fp@(-20),%d6
4acf8: 2802 movel %d2,%d4
4acfa: 327c fff8 moveaw #-8,%a1
4acfe: 93c8 subal %a0,%a1
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4ad00: d3c2 addal %d2,%a1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4ad02: 4c46 4007 remul %d6,%d7,%d4
uintptr_t const alloc_block_begin =
(uintptr_t) _Heap_Block_of_alloc_area( alloc_begin, page_size );
uintptr_t const free_size = alloc_block_begin - block_begin;
4ad06: 93c7 subal %d7,%a1
if ( free_size >= min_block_size || free_size == 0 ) {
4ad08: b7c9 cmpal %a1,%a3
4ad0a: 6304 blss 4ad10 <_Heap_Allocate_aligned_with_boundary+0x128>
4ad0c: 4a89 tstl %a1
4ad0e: 6624 bnes 4ad34 <_Heap_Allocate_aligned_with_boundary+0x14c>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4ad10: 4a82 tstl %d2
4ad12: 6720 beqs 4ad34 <_Heap_Allocate_aligned_with_boundary+0x14c><== NEVER TAKEN
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4ad14: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4ad18: 2f00 movel %d0,%sp@-
4ad1a: 2f02 movel %d2,%sp@-
4ad1c: 2f08 movel %a0,%sp@-
4ad1e: 2f0a movel %a2,%sp@-
4ad20: 4eb9 0004 6834 jsr 46834 <_Heap_Block_allocate>
4ad26: 4fef 0010 lea %sp@(16),%sp
4ad2a: 6014 bras 4ad40 <_Heap_Allocate_aligned_with_boundary+0x158>
4ad2c: 262e ffe8 movel %fp@(-24),%d3
4ad30: 2d47 ffe4 movel %d7,%fp@(-28)
if ( alloc_begin != 0 ) {
break;
}
block = block->next;
4ad34: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4ad38: b5c8 cmpal %a0,%a2
4ad3a: 6600 ff04 bnew 4ac40 <_Heap_Allocate_aligned_with_boundary+0x58>
4ad3e: 4282 clrl %d2
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
4ad40: b6aa 0044 cmpl %a2@(68),%d3
4ad44: 6304 blss 4ad4a <_Heap_Allocate_aligned_with_boundary+0x162>
stats->max_search = search_count;
4ad46: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
4ad4a: 2002 movel %d2,%d0
4ad4c: 6002 bras 4ad50 <_Heap_Allocate_aligned_with_boundary+0x168>
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
4ad4e: 4280 clrl %d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4ad50: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5
4ad56: 4e5e unlk %fp
...
0004b040 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
4b040: 4e56 ffcc linkw %fp,#-52
4b044: 202e 0010 movel %fp@(16),%d0
4b048: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b04c: 246e 0008 moveal %fp@(8),%a2
4b050: 262e 000c movel %fp@(12),%d3
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
4b054: 2403 movel %d3,%d2
4b056: d480 addl %d0,%d2
uintptr_t const free_size = stats->free_size;
4b058: 206a 0030 moveal %a2@(48),%a0
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
4b05c: 282a 0020 movel %a2@(32),%d4
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
Heap_Block *extend_last_block = NULL;
uintptr_t const page_size = heap->page_size;
4b060: 2a2a 0010 movel %a2@(16),%d5
uintptr_t const min_block_size = heap->min_block_size;
4b064: 222a 0014 movel %a2@(20),%d1
Heap_Block *start_block = first_block;
Heap_Block *merge_below_block = NULL;
Heap_Block *merge_above_block = NULL;
Heap_Block *link_below_block = NULL;
Heap_Block *link_above_block = NULL;
Heap_Block *extend_first_block = NULL;
4b068: 42ae fffc clrl %fp@(-4)
Heap_Block *extend_last_block = NULL;
4b06c: 42ae fff8 clrl %fp@(-8)
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr;
uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
uintptr_t const free_size = stats->free_size;
4b070: 2d48 fff4 movel %a0,%fp@(-12)
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
4b074: b682 cmpl %d2,%d3
4b076: 6200 01aa bhiw 4b222 <_Heap_Extend+0x1e2>
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
4b07a: 486e fff8 pea %fp@(-8)
4b07e: 486e fffc pea %fp@(-4)
4b082: 2f01 movel %d1,%sp@-
4b084: 2f05 movel %d5,%sp@-
4b086: 2f00 movel %d0,%sp@-
4b088: 2f03 movel %d3,%sp@-
4b08a: 4eb9 0004 68f4 jsr 468f4 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
4b090: 4fef 0018 lea %sp@(24),%sp
4b094: 4a00 tstb %d0
4b096: 6700 018a beqw 4b222 <_Heap_Extend+0x1e2>
4b09a: 2044 moveal %d4,%a0
4b09c: 9bcd subal %a5,%a5
4b09e: 4281 clrl %d1
4b0a0: 97cb subal %a3,%a3
4b0a2: 99cc subal %a4,%a4
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4b0a4: b888 cmpl %a0,%d4
4b0a6: 6704 beqs 4b0ac <_Heap_Extend+0x6c>
4b0a8: 2248 moveal %a0,%a1
4b0aa: 6004 bras 4b0b0 <_Heap_Extend+0x70>
4b0ac: 226a 0018 moveal %a2@(24),%a1
uintptr_t const sub_area_end = start_block->prev_size;
4b0b0: 2010 movel %a0@,%d0
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
4b0b2: b680 cmpl %d0,%d3
4b0b4: 6406 bccs 4b0bc <_Heap_Extend+0x7c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
4b0b6: b3c2 cmpal %d2,%a1
4b0b8: 6500 0168 bcsw 4b222 <_Heap_Extend+0x1e2>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4b0bc: b3c2 cmpal %d2,%a1
4b0be: 6706 beqs 4b0c6 <_Heap_Extend+0x86>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4b0c0: b082 cmpl %d2,%d0
4b0c2: 6206 bhis 4b0ca <_Heap_Extend+0x8a>
4b0c4: 6006 bras 4b0cc <_Heap_Extend+0x8c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4b0c6: 2848 moveal %a0,%a4
4b0c8: 6002 bras 4b0cc <_Heap_Extend+0x8c>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4b0ca: 2208 movel %a0,%d1
4b0cc: 2e00 movel %d0,%d7
4b0ce: 2240 moveal %d0,%a1
4b0d0: 5189 subql #8,%a1
4b0d2: 4c45 7006 remul %d5,%d6,%d7
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4b0d6: 93c6 subal %d6,%a1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
4b0d8: b680 cmpl %d0,%d3
4b0da: 6606 bnes 4b0e2 <_Heap_Extend+0xa2>
start_block->prev_size = extend_area_end;
4b0dc: 2082 movel %d2,%a0@
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4b0de: 2649 moveal %a1,%a3
4b0e0: 6006 bras 4b0e8 <_Heap_Extend+0xa8>
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
4b0e2: b680 cmpl %d0,%d3
4b0e4: 6302 blss 4b0e8 <_Heap_Extend+0xa8>
4b0e6: 2a49 moveal %a1,%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4b0e8: 70fe moveq #-2,%d0
4b0ea: c0a9 0004 andl %a1@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4b0ee: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4b0f2: b888 cmpl %a0,%d4
4b0f4: 66ae bnes 4b0a4 <_Heap_Extend+0x64>
if ( extend_area_begin < heap->area_begin ) {
4b0f6: b6aa 0018 cmpl %a2@(24),%d3
4b0fa: 6406 bccs 4b102 <_Heap_Extend+0xc2>
heap->area_begin = extend_area_begin;
4b0fc: 2543 0018 movel %d3,%a2@(24)
4b100: 600a bras 4b10c <_Heap_Extend+0xcc>
} else if ( heap->area_end < extend_area_end ) {
4b102: b4aa 001c cmpl %a2@(28),%d2
4b106: 6304 blss 4b10c <_Heap_Extend+0xcc>
heap->area_end = extend_area_end;
4b108: 2542 001c movel %d2,%a2@(28)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4b10c: 206e fff8 moveal %fp@(-8),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4b110: 2008 movel %a0,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4b112: 7801 moveq #1,%d4
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4b114: 226e fffc moveal %fp@(-4),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4b118: 9089 subl %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4b11a: 8880 orl %d0,%d4
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4b11c: 2282 movel %d2,%a1@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4b11e: 2344 0004 movel %d4,%a1@(4)
extend_last_block->prev_size = extend_first_block_size;
4b122: 2080 movel %d0,%a0@
extend_last_block->size_and_flag = 0;
4b124: 42a8 0004 clrl %a0@(4)
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4b128: b3ea 0020 cmpal %a2@(32),%a1
4b12c: 6406 bccs 4b134 <_Heap_Extend+0xf4>
heap->first_block = extend_first_block;
4b12e: 2549 0020 movel %a1,%a2@(32)
4b132: 600a bras 4b13e <_Heap_Extend+0xfe>
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
4b134: b1ea 0024 cmpal %a2@(36),%a0
4b138: 6304 blss 4b13e <_Heap_Extend+0xfe>
heap->last_block = extend_last_block;
4b13a: 2548 0024 movel %a0,%a2@(36)
}
if ( merge_below_block != NULL ) {
4b13e: 4a8c tstl %a4
4b140: 6732 beqs 4b174 <_Heap_Extend+0x134>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
4b142: 202a 0010 movel %a2@(16),%d0
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
4b146: 5083 addql #8,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4b148: 2803 movel %d3,%d4
4b14a: 4c40 4001 remul %d0,%d1,%d4
if ( remainder != 0 ) {
4b14e: 4a81 tstl %d1
4b150: 6704 beqs 4b156 <_Heap_Extend+0x116> <== ALWAYS TAKEN
return value - remainder + alignment;
4b152: d680 addl %d0,%d3 <== NOT EXECUTED
4b154: 9681 subl %d1,%d3 <== NOT EXECUTED
uintptr_t const new_first_block_begin =
4b156: 2043 moveal %d3,%a0
4b158: 5188 subql #8,%a0
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
4b15a: 200c movel %a4,%d0
4b15c: 9088 subl %a0,%d0
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4b15e: 7201 moveq #1,%d1
4b160: 8280 orl %d0,%d1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
4b162: 2094 movel %a4@,%a0@
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4b164: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, new_first_block );
4b168: 2f08 movel %a0,%sp@-
4b16a: 2f0a movel %a2,%sp@-
4b16c: 4eba feb6 jsr %pc@(4b024 <_Heap_Free_block>)
4b170: 508f addql #8,%sp
4b172: 6012 bras 4b186 <_Heap_Extend+0x146>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
4b174: 4a81 tstl %d1
4b176: 670e beqs 4b186 <_Heap_Extend+0x146>
_Heap_Link_below(
4b178: 206e fff8 moveal %fp@(-8),%a0
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
4b17c: 7801 moveq #1,%d4
4b17e: 9288 subl %a0,%d1
4b180: 8881 orl %d1,%d4
4b182: 2144 0004 movel %d4,%a0@(4)
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
4b186: 4a8b tstl %a3
4b188: 6734 beqs 4b1be <_Heap_Extend+0x17e>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
4b18a: 5182 subql #8,%d2
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
4b18c: 948b subl %a3,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4b18e: 2202 movel %d2,%d1
4b190: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
4b196: 7201 moveq #1,%d1
4b198: 9480 subl %d0,%d2
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
4b19a: 202b 0004 movel %a3@(4),%d0
4b19e: 9082 subl %d2,%d0
| HEAP_PREV_BLOCK_USED;
4b1a0: 8280 orl %d0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4b1a2: 7001 moveq #1,%d0
4b1a4: 2781 2804 movel %d1,%a3@(00000004,%d2:l)
4b1a8: c0ab 0004 andl %a3@(4),%d0
block->size_and_flag = size | flag;
4b1ac: 8480 orl %d0,%d2
4b1ae: 2742 0004 movel %d2,%a3@(4)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
4b1b2: 2f0b movel %a3,%sp@-
4b1b4: 2f0a movel %a2,%sp@-
4b1b6: 4eba fe6c jsr %pc@(4b024 <_Heap_Free_block>)
4b1ba: 508f addql #8,%sp
4b1bc: 6020 bras 4b1de <_Heap_Extend+0x19e>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
4b1be: 4a8d tstl %a5
4b1c0: 671c beqs 4b1de <_Heap_Extend+0x19e>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4b1c2: 7001 moveq #1,%d0
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
4b1c4: 7801 moveq #1,%d4
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
4b1c6: 222e fffc movel %fp@(-4),%d1
4b1ca: 928d subl %a5,%d1
4b1cc: c0ad 0004 andl %a5@(4),%d0
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
4b1d0: 206e fff8 moveal %fp@(-8),%a0
block->size_and_flag = size | flag;
4b1d4: 8280 orl %d0,%d1
4b1d6: 2b41 0004 movel %d1,%a5@(4)
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
4b1da: 89a8 0004 orl %d4,%a0@(4)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4b1de: 4a8c tstl %a4
4b1e0: 6610 bnes 4b1f2 <_Heap_Extend+0x1b2>
4b1e2: 4a8b tstl %a3
4b1e4: 660c bnes 4b1f2 <_Heap_Extend+0x1b2>
_Heap_Free_block( heap, extend_first_block );
4b1e6: 2f2e fffc movel %fp@(-4),%sp@-
4b1ea: 2f0a movel %a2,%sp@-
4b1ec: 4eba fe36 jsr %pc@(4b024 <_Heap_Free_block>)
4b1f0: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
heap->last_block,
(uintptr_t) heap->first_block - (uintptr_t) heap->last_block
4b1f2: 206a 0024 moveal %a2@(36),%a0
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4b1f6: 7001 moveq #1,%d0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
4b1f8: 222a 0020 movel %a2@(32),%d1
4b1fc: 9288 subl %a0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4b1fe: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
4b202: 8280 orl %d0,%d1
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
4b204: 202a 0030 movel %a2@(48),%d0
4b208: 90ae fff4 subl %fp@(-12),%d0
4b20c: 2141 0004 movel %d1,%a0@(4)
/* Statistics */
stats->size += extended_size;
4b210: d1aa 002c addl %d0,%a2@(44)
if ( extended_size_ptr != NULL )
4b214: 4aae 0014 tstl %fp@(20)
4b218: 670c beqs 4b226 <_Heap_Extend+0x1e6> <== NEVER TAKEN
*extended_size_ptr = extended_size;
4b21a: 206e 0014 moveal %fp@(20),%a0
4b21e: 2080 movel %d0,%a0@
4b220: 6004 bras 4b226 <_Heap_Extend+0x1e6>
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
4b222: 4200 clrb %d0
4b224: 6002 bras 4b228 <_Heap_Extend+0x1e8>
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4b226: 7001 moveq #1,%d0
}
4b228: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
4b22e: 4e5e unlk %fp
...
0004ad5c <_Heap_Free>:
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
4ad5c: 4e56 ffe8 linkw %fp,#-24
4ad60: 202e 000c movel %fp@(12),%d0
4ad64: 2240 moveal %d0,%a1
4ad66: 5189 subql #8,%a1
4ad68: 206e 0008 moveal %fp@(8),%a0
4ad6c: 4c68 0001 0010 remul %a0@(16),%d1,%d0
4ad72: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4ad76: 2828 0020 movel %a0@(32),%d4
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4ad7a: 93c1 subal %d1,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4ad7c: b889 cmpl %a1,%d4
4ad7e: 620c bhis 4ad8c <_Heap_Free+0x30>
4ad80: b3e8 0024 cmpal %a0@(36),%a1
4ad84: 53c0 sls %d0
4ad86: 49c0 extbl %d0
4ad88: 4480 negl %d0
4ad8a: 6002 bras 4ad8e <_Heap_Free+0x32>
4ad8c: 4280 clrl %d0
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
uintptr_t next_block_size = 0;
bool next_is_free = false;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
4ad8e: 4a00 tstb %d0
4ad90: 6700 012c beqw 4aebe <_Heap_Free+0x162>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4ad94: 2629 0004 movel %a1@(4),%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4ad98: 70fe moveq #-2,%d0
4ad9a: c083 andl %d3,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4ad9c: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4ada0: b88a cmpl %a2,%d4
4ada2: 620c bhis 4adb0 <_Heap_Free+0x54> <== NEVER TAKEN
4ada4: b5e8 0024 cmpal %a0@(36),%a2
4ada8: 53c1 sls %d1
4adaa: 49c1 extbl %d1
4adac: 4481 negl %d1
4adae: 6002 bras 4adb2 <_Heap_Free+0x56>
4adb0: 4281 clrl %d1 <== NOT EXECUTED
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
4adb2: 4a01 tstb %d1
4adb4: 6700 0108 beqw 4aebe <_Heap_Free+0x162>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4adb8: 242a 0004 movel %a2@(4),%d2
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4adbc: 0802 0000 btst #0,%d2
4adc0: 6700 00fc beqw 4aebe <_Heap_Free+0x162>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4adc4: 72fe moveq #-2,%d1
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4adc6: 2668 0024 moveal %a0@(36),%a3
4adca: c481 andl %d1,%d2
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4adcc: b7ca cmpal %a2,%a3
4adce: 670c beqs 4addc <_Heap_Free+0x80>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4add0: 7201 moveq #1,%d1
4add2: c2b2 2804 andl %a2@(00000004,%d2:l),%d1
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4add6: 5381 subql #1,%d1
4add8: 4481 negl %d1
4adda: 6002 bras 4adde <_Heap_Free+0x82>
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4addc: 4281 clrl %d1
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4adde: 1a01 moveb %d1,%d5
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
if ( !_Heap_Is_prev_used( block ) ) {
4ade0: 0803 0000 btst #0,%d3
4ade4: 6662 bnes 4ae48 <_Heap_Free+0xec>
uintptr_t const prev_size = block->prev_size;
4ade6: 2611 movel %a1@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4ade8: 93c3 subal %d3,%a1
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4adea: b889 cmpl %a1,%d4
4adec: 620a bhis 4adf8 <_Heap_Free+0x9c> <== NEVER TAKEN
4adee: b3cb cmpal %a3,%a1
4adf0: 53c1 sls %d1
4adf2: 49c1 extbl %d1
4adf4: 4481 negl %d1
4adf6: 6002 bras 4adfa <_Heap_Free+0x9e>
4adf8: 4281 clrl %d1 <== NOT EXECUTED
Heap_Block * const prev_block = _Heap_Block_at( block, -prev_size );
if ( !_Heap_Is_block_in_heap( heap, prev_block ) ) {
4adfa: 4a01 tstb %d1
4adfc: 6700 00c0 beqw 4aebe <_Heap_Free+0x162>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4ae00: 7201 moveq #1,%d1
4ae02: c2a9 0004 andl %a1@(4),%d1
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) ) {
4ae06: 6700 00b6 beqw 4aebe <_Heap_Free+0x162>
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4ae0a: 4a05 tstb %d5
4ae0c: 6726 beqs 4ae34 <_Heap_Free+0xd8>
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4ae0e: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
4ae12: d480 addl %d0,%d2
4ae14: d682 addl %d2,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae16: 7401 moveq #1,%d2
Heap_Block *prev = block->prev;
4ae18: 246a 000c moveal %a2@(12),%a2
prev->next = next;
4ae1c: 254b 0008 movel %a3,%a2@(8)
4ae20: 8483 orl %d3,%d2
next->prev = prev;
4ae22: 274a 000c movel %a2,%a3@(12)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4ae26: 53a8 0038 subql #1,%a0@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4ae2a: 2383 3800 movel %d3,%a1@(00000000,%d3:l)
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae2e: 2342 0004 movel %d2,%a1@(4)
4ae32: 607a bras 4aeae <_Heap_Free+0x152>
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4ae34: d680 addl %d0,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae36: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae38: 74fe moveq #-2,%d2
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae3a: 8283 orl %d3,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4ae3c: 2483 movel %d3,%a2@
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae3e: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae42: c5aa 0004 andl %d2,%a2@(4)
4ae46: 6066 bras 4aeae <_Heap_Free+0x152>
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4ae48: 4a01 tstb %d1
4ae4a: 672a beqs 4ae76 <_Heap_Free+0x11a>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4ae4c: 266a 0008 moveal %a2@(8),%a3
uintptr_t const size = block_size + next_block_size;
4ae50: 2202 movel %d2,%d1
4ae52: d280 addl %d0,%d1
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae54: 7401 moveq #1,%d2
Heap_Block *prev = old_block->prev;
4ae56: 246a 000c moveal %a2@(12),%a2
new_block->next = next;
4ae5a: 234b 0008 movel %a3,%a1@(8)
4ae5e: 8481 orl %d1,%d2
new_block->prev = prev;
4ae60: 234a 000c movel %a2,%a1@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4ae64: 2381 1800 movel %d1,%a1@(00000000,%d1:l)
next->prev = new_block;
4ae68: 2749 000c movel %a1,%a3@(12)
prev->next = new_block;
4ae6c: 2549 0008 movel %a1,%a2@(8)
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
uintptr_t const size = block_size + next_block_size;
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ae70: 2342 0004 movel %d2,%a1@(4)
4ae74: 6038 bras 4aeae <_Heap_Free+0x152>
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4ae76: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae78: 74fe moveq #-2,%d2
next_block->prev_size = size;
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4ae7a: 8280 orl %d0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4ae7c: 2668 0008 moveal %a0@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4ae80: 2348 000c movel %a0,%a1@(12)
4ae84: 2341 0004 movel %d1,%a1@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4ae88: 2228 0038 movel %a0@(56),%d1
4ae8c: 5281 addql #1,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4ae8e: 234b 0008 movel %a3,%a1@(8)
} else { /* no coalesce */
/* Add 'block' to the head of the free blocks list as it tends to
produce less fragmentation than adding to the tail. */
_Heap_Free_list_insert_after( _Heap_Free_list_head( heap), block );
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ae92: c5aa 0004 andl %d2,%a2@(4)
new_block->prev = block_before;
block_before->next = new_block;
next->prev = new_block;
4ae96: 2749 000c movel %a1,%a3@(12)
next_block->prev_size = block_size;
4ae9a: 2480 movel %d0,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4ae9c: 2149 0008 movel %a1,%a0@(8)
/* Statistics */
++stats->free_blocks;
4aea0: 2141 0038 movel %d1,%a0@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4aea4: b2a8 003c cmpl %a0@(60),%d1
4aea8: 6304 blss 4aeae <_Heap_Free+0x152>
stats->max_free_blocks = stats->free_blocks;
4aeaa: 2141 003c movel %d1,%a0@(60)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4aeae: d1a8 0030 addl %d0,%a0@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4aeb2: 53a8 0040 subql #1,%a0@(64)
++stats->frees;
4aeb6: 52a8 0050 addql #1,%a0@(80)
stats->free_size += block_size;
return( true );
4aeba: 7001 moveq #1,%d0
4aebc: 6002 bras 4aec0 <_Heap_Free+0x164>
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
4aebe: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4aec0: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
4aec4: 4e5e unlk %fp <== NOT EXECUTED
0005a5a4 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5a5a4: 4e56 0000 linkw %fp,#0
5a5a8: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5a5ac: 2040 moveal %d0,%a0
5a5ae: 5188 subql #8,%a0
5a5b0: 226e 0008 moveal %fp@(8),%a1
5a5b4: 2f02 movel %d2,%sp@-
5a5b6: 2400 movel %d0,%d2
5a5b8: 4c69 2001 0010 remul %a1@(16),%d1,%d2
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
5a5be: 2429 0020 movel %a1@(32),%d2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5a5c2: 91c1 subal %d1,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a5c4: b488 cmpl %a0,%d2
5a5c6: 620c bhis 5a5d4 <_Heap_Size_of_alloc_area+0x30>
5a5c8: b1e9 0024 cmpal %a1@(36),%a0
5a5cc: 53c1 sls %d1
5a5ce: 49c1 extbl %d1
5a5d0: 4481 negl %d1
5a5d2: 6002 bras 5a5d6 <_Heap_Size_of_alloc_area+0x32>
5a5d4: 4281 clrl %d1
uintptr_t const alloc_begin = (uintptr_t) alloc_begin_ptr;
Heap_Block *block = _Heap_Block_of_alloc_area( alloc_begin, page_size );
Heap_Block *next_block = NULL;
uintptr_t block_size = 0;
if ( !_Heap_Is_block_in_heap( heap, block ) ) {
5a5d6: 4a01 tstb %d1
5a5d8: 6738 beqs 5a612 <_Heap_Size_of_alloc_area+0x6e>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
5a5da: 72fe moveq #-2,%d1
5a5dc: c2a8 0004 andl %a0@(4),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5a5e0: d1c1 addal %d1,%a0
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5a5e2: b488 cmpl %a0,%d2
5a5e4: 620c bhis 5a5f2 <_Heap_Size_of_alloc_area+0x4e> <== NEVER TAKEN
5a5e6: b1e9 0024 cmpal %a1@(36),%a0
5a5ea: 53c1 sls %d1
5a5ec: 49c1 extbl %d1
5a5ee: 4481 negl %d1
5a5f0: 6002 bras 5a5f4 <_Heap_Size_of_alloc_area+0x50>
5a5f2: 4281 clrl %d1 <== NOT EXECUTED
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5a5f4: 4a01 tstb %d1
5a5f6: 671a beqs 5a612 <_Heap_Size_of_alloc_area+0x6e> <== NEVER TAKEN
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
5a5f8: 7201 moveq #1,%d1
5a5fa: c2a8 0004 andl %a0@(4),%d1
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5a5fe: 6712 beqs 5a612 <_Heap_Size_of_alloc_area+0x6e> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5a600: 7204 moveq #4,%d1
5a602: 9280 subl %d0,%d1
5a604: 2001 movel %d1,%d0
5a606: d088 addl %a0,%d0
5a608: 226e 0010 moveal %fp@(16),%a1
5a60c: 2280 movel %d0,%a1@
return true;
5a60e: 7001 moveq #1,%d0
5a610: 6002 bras 5a614 <_Heap_Size_of_alloc_area+0x70>
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
5a612: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
5a614: 241f movel %sp@+,%d2
5a616: 4e5e unlk %fp
...
0004730a <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
4730a: 4e56 ffd0 linkw %fp,#-48
4730e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
47312: 266e 0008 moveal %fp@(8),%a3
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
47316: 45fa ffac lea %pc@(472c4 <_Heap_Walk_print_nothing>),%a2
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
4731a: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
4731e: 282b 0010 movel %a3@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
47322: 2a2b 0014 movel %a3@(20),%d5
Heap_Block *const first_block = heap->first_block;
47326: 2c2b 0020 movel %a3@(32),%d6
Heap_Block *const last_block = heap->last_block;
4732a: 2e2b 0024 movel %a3@(36),%d7
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4732e: 4a2e 0013 tstb %fp@(19)
47332: 6704 beqs 47338 <_Heap_Walk+0x2e>
47334: 45fa ff96 lea %pc@(472cc <_Heap_Walk_print>),%a2
if ( !_System_state_Is_up( _System_state_Get() ) ) {
47338: 7003 moveq #3,%d0
4733a: b0b9 0005 fe12 cmpl 5fe12 <_System_state_Current>,%d0
47340: 6600 02fc bnew 4763e <_Heap_Walk+0x334>
Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
(*printer)(
47344: 2f2b 000c movel %a3@(12),%sp@-
47348: 2f2b 0008 movel %a3@(8),%sp@-
4734c: 2f07 movel %d7,%sp@-
4734e: 2f06 movel %d6,%sp@-
47350: 2f2b 001c movel %a3@(28),%sp@-
47354: 2f2b 0018 movel %a3@(24),%sp@-
47358: 2f05 movel %d5,%sp@-
4735a: 2f04 movel %d4,%sp@-
4735c: 4879 0005 c1ad pea 5c1ad <C.0.4004+0x57>
47362: 42a7 clrl %sp@-
47364: 2f02 movel %d2,%sp@-
47366: 4e92 jsr %a2@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
47368: 4fef 002c lea %sp@(44),%sp
4736c: 4a84 tstl %d4
4736e: 6608 bnes 47378 <_Heap_Walk+0x6e>
(*printer)( source, true, "page size is zero\n" );
47370: 4879 0005 c23e pea 5c23e <C.0.4004+0xe8>
47376: 6050 bras 473c8 <_Heap_Walk+0xbe>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
47378: 7003 moveq #3,%d0
4737a: c084 andl %d4,%d0
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
4737c: 670c beqs 4738a <_Heap_Walk+0x80>
(*printer)(
4737e: 2f04 movel %d4,%sp@-
47380: 4879 0005 c251 pea 5c251 <C.0.4004+0xfb>
47386: 6000 02ca braw 47652 <_Heap_Walk+0x348>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
4738a: 2205 movel %d5,%d1
4738c: 4c44 1000 remul %d4,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
47390: 4a80 tstl %d0
47392: 670c beqs 473a0 <_Heap_Walk+0x96>
(*printer)(
47394: 2f05 movel %d5,%sp@-
47396: 4879 0005 c26f pea 5c26f <C.0.4004+0x119>
4739c: 6000 02b4 braw 47652 <_Heap_Walk+0x348>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
473a0: 2006 movel %d6,%d0
473a2: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
473a4: 4c44 0001 remul %d4,%d1,%d0
);
return false;
}
if (
473a8: 4a81 tstl %d1
473aa: 670c beqs 473b8 <_Heap_Walk+0xae>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
473ac: 2f06 movel %d6,%sp@-
473ae: 4879 0005 c293 pea 5c293 <C.0.4004+0x13d>
473b4: 6000 029c braw 47652 <_Heap_Walk+0x348>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
473b8: 7001 moveq #1,%d0
473ba: 2046 moveal %d6,%a0
473bc: c0a8 0004 andl %a0@(4),%d0
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
473c0: 6616 bnes 473d8 <_Heap_Walk+0xce>
(*printer)(
473c2: 4879 0005 c2c4 pea 5c2c4 <C.0.4004+0x16e>
473c8: 4878 0001 pea 1 <ADD>
473cc: 2f02 movel %d2,%sp@-
473ce: 4e92 jsr %a2@
473d0: 4fef 000c lea %sp@(12),%sp
473d4: 6000 00ba braw 47490 <_Heap_Walk+0x186>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
473d8: 70fe moveq #-2,%d0
473da: 2047 moveal %d7,%a0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
473dc: 2847 moveal %d7,%a4
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
473de: c0a8 0004 andl %a0@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
473e2: d9c0 addal %d0,%a4
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
473e4: 7001 moveq #1,%d0
473e6: c0ac 0004 andl %a4@(4),%d0
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
473ea: 6608 bnes 473f4 <_Heap_Walk+0xea>
(*printer)(
473ec: 4879 0005 c2f2 pea 5c2f2 <C.0.4004+0x19c>
473f2: 60d4 bras 473c8 <_Heap_Walk+0xbe>
);
return false;
}
if (
473f4: bc8c cmpl %a4,%d6
473f6: 6708 beqs 47400 <_Heap_Walk+0xf6> <== ALWAYS TAKEN
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
473f8: 4879 0005 c307 pea 5c307 <C.0.4004+0x1b1> <== NOT EXECUTED
473fe: 60c8 bras 473c8 <_Heap_Walk+0xbe> <== NOT EXECUTED
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
47400: 262b 0010 movel %a3@(16),%d3
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
47404: 220b movel %a3,%d1
block = next_block;
} while ( block != first_block );
return true;
}
47406: 206b 0008 moveal %a3@(8),%a0
4740a: 2d44 fff8 movel %d4,%fp@(-8)
4740e: 2d43 fffc movel %d3,%fp@(-4)
47412: 6000 0088 braw 4749c <_Heap_Walk+0x192>
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
47416: b1eb 0020 cmpal %a3@(32),%a0
4741a: 650c bcss 47428 <_Heap_Walk+0x11e>
4741c: b1eb 0024 cmpal %a3@(36),%a0
47420: 53c0 sls %d0
47422: 49c0 extbl %d0
47424: 4480 negl %d0
47426: 6002 bras 4742a <_Heap_Walk+0x120>
47428: 4280 clrl %d0
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
if ( !_Heap_Is_block_in_heap( heap, free_block ) ) {
4742a: 4a00 tstb %d0
4742c: 660c bnes 4743a <_Heap_Walk+0x130>
(*printer)(
4742e: 2f08 movel %a0,%sp@-
47430: 4879 0005 c336 pea 5c336 <C.0.4004+0x1e0>
47436: 6000 021a braw 47652 <_Heap_Walk+0x348>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4743a: 4be8 0008 lea %a0@(8),%a5
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
4743e: 200d movel %a5,%d0
47440: 262e fffc movel %fp@(-4),%d3
47444: 4c43 0004 remul %d3,%d4,%d0
);
return false;
}
if (
47448: 4a84 tstl %d4
4744a: 670c beqs 47458 <_Heap_Walk+0x14e>
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4744c: 2f08 movel %a0,%sp@-
4744e: 4879 0005 c356 pea 5c356 <C.0.4004+0x200>
47454: 6000 01fc braw 47652 <_Heap_Walk+0x348>
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
47458: 70fe moveq #-2,%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
4745a: 7601 moveq #1,%d3
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4745c: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
47460: c6b0 0804 andl %a0@(00000004,%d0:l),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
47464: 670c beqs 47472 <_Heap_Walk+0x168>
(*printer)(
47466: 2f08 movel %a0,%sp@-
47468: 4879 0005 c386 pea 5c386 <C.0.4004+0x230>
4746e: 6000 01e2 braw 47652 <_Heap_Walk+0x348>
);
return false;
}
if ( free_block->prev != prev_block ) {
47472: 2028 000c movel %a0@(12),%d0
47476: b280 cmpl %d0,%d1
47478: 671c beqs 47496 <_Heap_Walk+0x18c>
(*printer)(
4747a: 2f00 movel %d0,%sp@-
4747c: 2f08 movel %a0,%sp@-
4747e: 4879 0005 c3a2 pea 5c3a2 <C.0.4004+0x24c>
47484: 4878 0001 pea 1 <ADD>
47488: 2f02 movel %d2,%sp@-
4748a: 4e92 jsr %a2@
4748c: 4fef 0014 lea %sp@(20),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
47490: 4200 clrb %d0
47492: 6000 01ac braw 47640 <_Heap_Walk+0x336>
return false;
}
prev_block = free_block;
free_block = free_block->next;
47496: 2208 movel %a0,%d1
47498: 2068 0008 moveal %a0@(8),%a0
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *const first_free_block = _Heap_Free_list_first( heap );
const Heap_Block *prev_block = free_list_tail;
const Heap_Block *free_block = first_free_block;
while ( free_block != free_list_tail ) {
4749c: b7c8 cmpal %a0,%a3
4749e: 6600 ff76 bnew 47416 <_Heap_Walk+0x10c>
474a2: 282e fff8 movel %fp@(-8),%d4
474a6: 6002 bras 474aa <_Heap_Walk+0x1a0>
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
474a8: 284d moveal %a5,%a4
return true;
}
474aa: 202c 0004 movel %a4@(4),%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
474ae: 76fe moveq #-2,%d3
474b0: c680 andl %d0,%d3
474b2: 2d40 fffc movel %d0,%fp@(-4)
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
474b6: 4bf4 3800 lea %a4@(00000000,%d3:l),%a5
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
474ba: bbeb 0020 cmpal %a3@(32),%a5
474be: 650c bcss 474cc <_Heap_Walk+0x1c2> <== NEVER TAKEN
474c0: bbeb 0024 cmpal %a3@(36),%a5
474c4: 53c0 sls %d0
474c6: 49c0 extbl %d0
474c8: 4480 negl %d0
474ca: 6002 bras 474ce <_Heap_Walk+0x1c4>
474cc: 4280 clrl %d0 <== NOT EXECUTED
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
474ce: 4a00 tstb %d0
474d0: 660c bnes 474de <_Heap_Walk+0x1d4>
(*printer)(
474d2: 2f0d movel %a5,%sp@-
474d4: 2f0c movel %a4,%sp@-
474d6: 4879 0005 c3d4 pea 5c3d4 <C.0.4004+0x27e>
474dc: 60a6 bras 47484 <_Heap_Walk+0x17a>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
474de: be8c cmpl %a4,%d7
474e0: 56c0 sne %d0
474e2: 2200 movel %d0,%d1
474e4: 4481 negl %d1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
474e6: 2003 movel %d3,%d0
474e8: 1d41 fffb moveb %d1,%fp@(-5)
474ec: 4c44 0001 remul %d4,%d1,%d0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
474f0: 4a81 tstl %d1
474f2: 6714 beqs 47508 <_Heap_Walk+0x1fe>
474f4: 4a2e fffb tstb %fp@(-5)
474f8: 670e beqs 47508 <_Heap_Walk+0x1fe>
(*printer)(
474fa: 2f03 movel %d3,%sp@-
474fc: 2f0c movel %a4,%sp@-
474fe: 4879 0005 c401 pea 5c401 <C.0.4004+0x2ab>
47504: 6000 ff7e braw 47484 <_Heap_Walk+0x17a>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
47508: ba83 cmpl %d3,%d5
4750a: 6322 blss 4752e <_Heap_Walk+0x224>
4750c: 4a2e fffb tstb %fp@(-5)
47510: 671c beqs 4752e <_Heap_Walk+0x224> <== NEVER TAKEN
(*printer)(
47512: 2f05 movel %d5,%sp@-
47514: 2f03 movel %d3,%sp@-
47516: 2f0c movel %a4,%sp@-
47518: 4879 0005 c42f pea 5c42f <C.0.4004+0x2d9>
4751e: 4878 0001 pea 1 <ADD>
47522: 2f02 movel %d2,%sp@-
47524: 4e92 jsr %a2@
block,
block_size,
min_block_size
);
return false;
47526: 4fef 0018 lea %sp@(24),%sp
4752a: 6000 ff64 braw 47490 <_Heap_Walk+0x186>
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
4752e: b9cd cmpal %a5,%a4
47530: 6514 bcss 47546 <_Heap_Walk+0x23c>
47532: 4a2e fffb tstb %fp@(-5)
47536: 670e beqs 47546 <_Heap_Walk+0x23c>
(*printer)(
47538: 2f0d movel %a5,%sp@-
4753a: 2f0c movel %a4,%sp@-
4753c: 4879 0005 c45a pea 5c45a <C.0.4004+0x304>
47542: 6000 ff40 braw 47484 <_Heap_Walk+0x17a>
block->size_and_flag = size | flag;
}
RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block )
{
return block->size_and_flag & HEAP_PREV_BLOCK_USED;
47546: 7001 moveq #1,%d0
47548: c0ae fffc andl %fp@(-4),%d0
4754c: 2d40 fffc movel %d0,%fp@(-4)
47550: 7001 moveq #1,%d0
47552: c0ad 0004 andl %a5@(4),%d0
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
47556: 6600 00ae bnew 47606 <_Heap_Walk+0x2fc>
block = next_block;
} while ( block != first_block );
return true;
}
4755a: 222b 0008 movel %a3@(8),%d1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
4755e: 43f9 0005 c17a lea 5c17a <C.0.4004+0x24>,%a1
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
47564: 206c 0008 moveal %a4@(8),%a0
block = next_block;
} while ( block != first_block );
return true;
}
47568: 2d41 fff8 movel %d1,%fp@(-8)
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
4756c: b1eb 000c cmpal %a3@(12),%a0
47570: 6710 beqs 47582 <_Heap_Walk+0x278>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
47572: 43f9 0005 c0b4 lea 5c0b4 <rtems_filesystem_default_pathconf+0x40>,%a1
47578: b7c8 cmpal %a0,%a3
4757a: 6606 bnes 47582 <_Heap_Walk+0x278>
4757c: 43f9 0005 c189 lea 5c189 <C.0.4004+0x33>,%a1
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
47582: 202c 000c movel %a4@(12),%d0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
47586: 223c 0005 c193 movel #377235,%d1
4758c: b0ae fff8 cmpl %fp@(-8),%d0
47590: 6710 beqs 475a2 <_Heap_Walk+0x298>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
47592: 223c 0005 c0b4 movel #377012,%d1
47598: b7c0 cmpal %d0,%a3
4759a: 6606 bnes 475a2 <_Heap_Walk+0x298>
4759c: 223c 0005 c1a3 movel #377251,%d1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
475a2: 2f09 movel %a1,%sp@-
475a4: 2f08 movel %a0,%sp@-
475a6: 2f01 movel %d1,%sp@-
475a8: 2f00 movel %d0,%sp@-
475aa: 2f03 movel %d3,%sp@-
475ac: 2f0c movel %a4,%sp@-
475ae: 4879 0005 c48e pea 5c48e <C.0.4004+0x338>
475b4: 42a7 clrl %sp@-
475b6: 2f02 movel %d2,%sp@-
475b8: 4e92 jsr %a2@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
475ba: 2015 movel %a5@,%d0
475bc: 4fef 0024 lea %sp@(36),%sp
475c0: b083 cmpl %d3,%d0
475c2: 671e beqs 475e2 <_Heap_Walk+0x2d8>
(*printer)(
475c4: 2f0d movel %a5,%sp@-
475c6: 2f00 movel %d0,%sp@-
475c8: 2f03 movel %d3,%sp@-
475ca: 2f0c movel %a4,%sp@-
475cc: 4879 0005 c4c3 pea 5c4c3 <C.0.4004+0x36d>
475d2: 4878 0001 pea 1 <ADD>
475d6: 2f02 movel %d2,%sp@-
475d8: 4e92 jsr %a2@
475da: 4fef 001c lea %sp@(28),%sp
475de: 6000 feb0 braw 47490 <_Heap_Walk+0x186>
);
return false;
}
if ( !prev_used ) {
475e2: 4aae fffc tstl %fp@(-4)
475e6: 660a bnes 475f2 <_Heap_Walk+0x2e8>
(*printer)(
475e8: 2f0c movel %a4,%sp@-
475ea: 4879 0005 c4fc pea 5c4fc <C.0.4004+0x3a6>
475f0: 6060 bras 47652 <_Heap_Walk+0x348>
block = next_block;
} while ( block != first_block );
return true;
}
475f2: 206b 0008 moveal %a3@(8),%a0
475f6: 6008 bras 47600 <_Heap_Walk+0x2f6>
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
if ( free_block == block ) {
475f8: b9c8 cmpal %a0,%a4
475fa: 673c beqs 47638 <_Heap_Walk+0x32e>
return true;
}
free_block = free_block->next;
475fc: 2068 0008 moveal %a0@(8),%a0
)
{
const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
const Heap_Block *free_block = _Heap_Free_list_first( heap );
while ( free_block != free_list_tail ) {
47600: b7c8 cmpal %a0,%a3
47602: 66f4 bnes 475f8 <_Heap_Walk+0x2ee>
47604: 6044 bras 4764a <_Heap_Walk+0x340>
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
47606: 4aae fffc tstl %fp@(-4)
4760a: 6716 beqs 47622 <_Heap_Walk+0x318>
(*printer)(
4760c: 2f03 movel %d3,%sp@-
4760e: 2f0c movel %a4,%sp@-
47610: 4879 0005 c52b pea 5c52b <C.0.4004+0x3d5>
47616: 42a7 clrl %sp@-
47618: 2f02 movel %d2,%sp@-
4761a: 4e92 jsr %a2@
4761c: 4fef 0014 lea %sp@(20),%sp
47620: 6016 bras 47638 <_Heap_Walk+0x32e>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
47622: 2f14 movel %a4@,%sp@-
47624: 2f03 movel %d3,%sp@-
47626: 2f0c movel %a4,%sp@-
47628: 4879 0005 c542 pea 5c542 <C.0.4004+0x3ec>
4762e: 42a7 clrl %sp@-
47630: 2f02 movel %d2,%sp@-
47632: 4e92 jsr %a2@
47634: 4fef 0018 lea %sp@(24),%sp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
47638: bc8d cmpl %a5,%d6
4763a: 6600 fe6c bnew 474a8 <_Heap_Walk+0x19e>
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
4763e: 7001 moveq #1,%d0
block = next_block;
} while ( block != first_block );
return true;
}
47640: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
47646: 4e5e unlk %fp
47648: 4e75 rts
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4764a: 2f0c movel %a4,%sp@-
4764c: 4879 0005 c567 pea 5c567 <C.0.4004+0x411>
47652: 4878 0001 pea 1 <ADD>
47656: 2f02 movel %d2,%sp@-
47658: 4e92 jsr %a2@
4765a: 4fef 0010 lea %sp@(16),%sp
4765e: 6000 fe30 braw 47490 <_Heap_Walk+0x186>
...
00046928 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
46928: 4e56 0000 linkw %fp,#0
4692c: 222e 000c movel %fp@(12),%d1
46930: 2f02 movel %d2,%sp@-
46932: 242e 0010 movel %fp@(16),%d2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
46936: 13c1 0005 d9e6 moveb %d1,5d9e6 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
4693c: 2f02 movel %d2,%sp@-
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
4693e: 202e 0008 movel %fp@(8),%d0
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
46942: 0281 0000 00ff andil #255,%d1
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
46948: 23c0 0005 d9e2 movel %d0,5d9e2 <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
4694e: 2f01 movel %d1,%sp@-
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
46950: 23c2 0005 d9e8 movel %d2,5d9e8 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
46956: 2f00 movel %d0,%sp@-
46958: 4eb9 0004 84ca jsr 484ca <_User_extensions_Fatal>
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
4695e: 7005 moveq #5,%d0 <== NOT EXECUTED
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
46960: 2042 moveal %d2,%a0 <== NOT EXECUTED
46962: 243c 0000 0700 movel #1792,%d2 <== NOT EXECUTED
46968: 23c0 0005 daba movel %d0,5daba <_System_state_Current> <== NOT EXECUTED
4696e: 40c0 movew %sr,%d0 <== NOT EXECUTED
46970: 8082 orl %d2,%d0 <== NOT EXECUTED
46972: 46c0 movew %d0,%sr <== NOT EXECUTED
46974: 2008 movel %a0,%d0 <== NOT EXECUTED
46976: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED
4697c: 4ac8 halt <== NOT EXECUTED
4697e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
46982: 60fe bras 46982 <_Internal_error_Occurred+0x5a> <== NOT EXECUTED
000469e4 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
469e4: 4e56 fff0 linkw %fp,#-16
469e8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
469ec: 246e 0008 moveal %fp@(8),%a2
* If the application is using the optional manager stubs and
* still attempts to create the object, the information block
* should be all zeroed out because it is in the BSS. So let's
* check that code for this manager is even present.
*/
if ( information->size == 0 )
469f0: 4aaa 0014 tstl %a2@(20)
469f4: 675e beqs 46a54 <_Objects_Allocate+0x70> <== NEVER TAKEN
/*
* 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 );
469f6: 240a movel %a2,%d2
469f8: 0682 0000 001c addil #28,%d2
469fe: 47f9 0004 6174 lea 46174 <_Chain_Get>,%a3
46a04: 2f02 movel %d2,%sp@-
46a06: 4e93 jsr %a3@
if ( information->auto_extend ) {
46a08: 588f addql #4,%sp
46a0a: 4a2a 0010 tstb %a2@(16)
46a0e: 6746 beqs 46a56 <_Objects_Allocate+0x72>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
46a10: 4a80 tstl %d0
46a12: 6612 bnes 46a26 <_Objects_Allocate+0x42>
_Objects_Extend_information( information );
46a14: 2f0a movel %a2,%sp@-
46a16: 4eb9 0004 6a8c jsr 46a8c <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
46a1c: 2f02 movel %d2,%sp@-
46a1e: 4e93 jsr %a3@
}
if ( the_object ) {
46a20: 508f addql #8,%sp
46a22: 4a80 tstl %d0
46a24: 6730 beqs 46a56 <_Objects_Allocate+0x72>
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
46a26: 2040 moveal %d0,%a0
46a28: 4281 clrl %d1
46a2a: 4282 clrl %d2
46a2c: 3228 000a movew %a0@(10),%d1
46a30: 342a 0008 movew %a2@(8),%d2
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
46a34: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
46a38: 9282 subl %d2,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
46a3a: 342a 0012 movew %a2@(18),%d2
46a3e: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
46a42: e589 lsll #2,%d1
46a44: d1c1 addal %d1,%a0
46a46: 5390 subql #1,%a0@
information->inactive--;
46a48: 322a 0028 movew %a2@(40),%d1
46a4c: 5381 subql #1,%d1
46a4e: 3541 0028 movew %d1,%a2@(40)
46a52: 6002 bras 46a56 <_Objects_Allocate+0x72>
* 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 )
return NULL;
46a54: 4280 clrl %d0 <== NOT EXECUTED
);
}
#endif
return the_object;
}
46a56: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
46a5c: 4e5e unlk %fp <== NOT EXECUTED
00046a60 <_Objects_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
46a60: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
46a62: 4e56 0000 linkw %fp,#0
46a66: 226e 000c moveal %fp@(12),%a1
46a6a: 206e 0008 moveal %fp@(8),%a0
46a6e: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46a70: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
46a74: 3029 000a movew %a1@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46a78: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
46a7c: 245f moveal %sp@+,%a2
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
46a7e: 2d49 000c movel %a1,%fp@(12)
}
46a82: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
46a84: 4ef9 0004 6f8c jmp 46f8c <_Objects_Namespace_remove>
...
00046d88 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
46d88: 4e56 0000 linkw %fp,#0
46d8c: 2f03 movel %d3,%sp@-
46d8e: 262e 0008 movel %fp@(8),%d3
46d92: 2f02 movel %d2,%sp@-
46d94: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
46d98: 6734 beqs 46dce <_Objects_Get_information+0x46> <== NEVER TAKEN
/*
* This call implicitly validates the_api so we do not call
* _Objects_Is_api_valid above here.
*/
the_class_api_maximum = _Objects_API_maximum_class( the_api );
46d9a: 2f03 movel %d3,%sp@-
46d9c: 4eb9 0004 aec8 jsr 4aec8 <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
46da2: 588f addql #4,%sp
46da4: 4a80 tstl %d0
46da6: 6726 beqs 46dce <_Objects_Get_information+0x46> <== NEVER TAKEN
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
46da8: b082 cmpl %d2,%d0
46daa: 6522 bcss 46dce <_Objects_Get_information+0x46> <== NEVER TAKEN
return NULL;
if ( !_Objects_Information_table[ the_api ] )
46dac: 41f9 0005 d908 lea 5d908 <_Objects_Information_table>,%a0
46db2: 2070 3c00 moveal %a0@(00000000,%d3:l:4),%a0
46db6: 4a88 tstl %a0
46db8: 6714 beqs 46dce <_Objects_Get_information+0x46> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
46dba: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
46dbe: 6710 beqs 46dd0 <_Objects_Get_information+0x48> <== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
46dc0: 2040 moveal %d0,%a0
46dc2: 4a68 000e tstw %a0@(14)
46dc6: 56c1 sne %d1
46dc8: 49c1 extbl %d1
46dca: c081 andl %d1,%d0
46dcc: 6002 bras 46dd0 <_Objects_Get_information+0x48>
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
return NULL;
46dce: 4280 clrl %d0
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
46dd0: 242e fff8 movel %fp@(-8),%d2
46dd4: 262e fffc movel %fp@(-4),%d3
46dd8: 4e5e unlk %fp <== NOT EXECUTED
00046fc0 <_Objects_Get_next>:
Objects_Information *information,
Objects_Id id,
Objects_Locations *location_p,
Objects_Id *next_id_p
)
{
46fc0: 4e56 ffec linkw %fp,#-20
46fc4: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
46fc8: 266e 0008 moveal %fp@(8),%a3
46fcc: 242e 000c movel %fp@(12),%d2
46fd0: 246e 0010 moveal %fp@(16),%a2
46fd4: 286e 0014 moveal %fp@(20),%a4
Objects_Control *object;
Objects_Id next_id;
if ( !information )
46fd8: 4a8b tstl %a3
46fda: 6744 beqs 47020 <_Objects_Get_next+0x60> <== NEVER TAKEN
return NULL;
if ( !location_p )
46fdc: 4a8a tstl %a2
46fde: 6740 beqs 47020 <_Objects_Get_next+0x60> <== NEVER TAKEN
return NULL;
if ( !next_id_p )
46fe0: 4a8c tstl %a4
46fe2: 673c beqs 47020 <_Objects_Get_next+0x60> <== NEVER TAKEN
return NULL;
if (_Objects_Get_index(id) == OBJECTS_ID_INITIAL_INDEX)
46fe4: 4a42 tstw %d2
46fe6: 6604 bnes 46fec <_Objects_Get_next+0x2c>
next_id = information->minimum_id;
46fe8: 242b 0006 movel %a3@(6),%d2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
46fec: 4bf9 0004 702c lea 4702c <_Objects_Get>,%a5
else
next_id = id;
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
46ff2: 4281 clrl %d1
46ff4: 4280 clrl %d0
46ff6: 322b 000e movew %a3@(14),%d1
46ffa: 3002 movew %d2,%d0
46ffc: b081 cmpl %d1,%d0
46ffe: 630a blss 4700a <_Objects_Get_next+0x4a>
{
*location_p = OBJECTS_ERROR;
47000: 7201 moveq #1,%d1
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
47002: 70ff moveq #-1,%d0
do {
/* walked off end of list? */
if (_Objects_Get_index(next_id) > information->maximum)
{
*location_p = OBJECTS_ERROR;
47004: 2481 movel %d1,%a2@
*next_id_p = next_id;
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
47006: 2880 movel %d0,%a4@
47008: 6016 bras 47020 <_Objects_Get_next+0x60>
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
4700a: 2f0a movel %a2,%sp@-
4700c: 2f02 movel %d2,%sp@-
next_id++;
4700e: 5282 addql #1,%d2
*location_p = OBJECTS_ERROR;
goto final;
}
/* try to grab one */
object = _Objects_Get(information, next_id, location_p);
47010: 2f0b movel %a3,%sp@-
47012: 4e95 jsr %a5@
next_id++;
} while (*location_p != OBJECTS_LOCAL);
47014: 4fef 000c lea %sp@(12),%sp
47018: 4a92 tstl %a2@
4701a: 66d6 bnes 46ff2 <_Objects_Get_next+0x32> <== NEVER TAKEN
*next_id_p = next_id;
4701c: 2882 movel %d2,%a4@
return object;
4701e: 6002 bras 47022 <_Objects_Get_next+0x62>
if ( !location_p )
return NULL;
if ( !next_id_p )
return NULL;
47020: 4280 clrl %d0
return object;
final:
*next_id_p = OBJECTS_ID_FINAL;
return 0;
}
47022: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
47028: 4e5e unlk %fp <== NOT EXECUTED
000545d0 <_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;
545d0: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
545d2: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
545d4: 4e56 0000 linkw %fp,#0
545d8: 206e 0008 moveal %fp@(8),%a0
/*
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
545dc: 90a8 0006 subl %a0@(6),%d0
545e0: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
545e4: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
545e8: 226e 0010 moveal %fp@(16),%a1
* You can't just extract the index portion or you can get tricked
* by a value between 1 and maximum.
*/
index = id - information->minimum_id + 1;
if ( information->maximum >= index ) {
545ec: b081 cmpl %d1,%d0
545ee: 620e bhis 545fe <_Objects_Get_no_protection+0x2e>
if ( (the_object = information->local_table[ index ]) != NULL ) {
545f0: 2068 0018 moveal %a0@(24),%a0
545f4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
545f8: 6704 beqs 545fe <_Objects_Get_no_protection+0x2e><== NEVER TAKEN
*location = OBJECTS_LOCAL;
545fa: 4291 clrl %a1@
return the_object;
545fc: 6006 bras 54604 <_Objects_Get_no_protection+0x34>
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
545fe: 7001 moveq #1,%d0
54600: 2280 movel %d0,%a1@
return NULL;
54602: 4280 clrl %d0
}
54604: 4e5e unlk %fp <== NOT EXECUTED
00047d60 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
47d60: 4e56 fffc linkw %fp,#-4
47d64: 222e 0008 movel %fp@(8),%d1
47d68: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
47d6a: 4a81 tstl %d1
47d6c: 660a bnes 47d78 <_Objects_Id_to_name+0x18>
47d6e: 2079 0005 f2a4 moveal 5f2a4 <_Per_CPU_Information+0xc>,%a0
47d74: 2228 0008 movel %a0@(8),%d1
47d78: 7418 moveq #24,%d2
47d7a: 2001 movel %d1,%d0
47d7c: e4a8 lsrl %d2,%d0
47d7e: 143c 0007 moveb #7,%d2
47d82: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
47d84: 143c 0002 moveb #2,%d2
47d88: 2040 moveal %d0,%a0
47d8a: 5388 subql #1,%a0
47d8c: b488 cmpl %a0,%d2
47d8e: 6540 bcss 47dd0 <_Objects_Id_to_name+0x70>
47d90: 6048 bras 47dda <_Objects_Id_to_name+0x7a>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
47d92: 2001 movel %d1,%d0
47d94: 741b moveq #27,%d2
47d96: e4a8 lsrl %d2,%d0
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
47d98: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
47d9c: 4a88 tstl %a0
47d9e: 6730 beqs 47dd0 <_Objects_Id_to_name+0x70> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
47da0: 4a28 0032 tstb %a0@(50)
47da4: 662a bnes 47dd0 <_Objects_Id_to_name+0x70> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
47da6: 486e fffc pea %fp@(-4)
47daa: 2f01 movel %d1,%sp@-
47dac: 2f08 movel %a0,%sp@-
47dae: 4eb9 0004 7d00 jsr 47d00 <_Objects_Get>
if ( !the_object )
47db4: 4fef 000c lea %sp@(12),%sp
47db8: 4a80 tstl %d0
47dba: 6714 beqs 47dd0 <_Objects_Id_to_name+0x70>
return OBJECTS_INVALID_ID;
*name = the_object->name;
47dbc: 206e 000c moveal %fp@(12),%a0
47dc0: 2240 moveal %d0,%a1
47dc2: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
47dc6: 4eb9 0004 85ee jsr 485ee <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
47dcc: 4280 clrl %d0
47dce: 6002 bras 47dd2 <_Objects_Id_to_name+0x72>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
47dd0: 7003 moveq #3,%d0
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
47dd2: 242e fff8 movel %fp@(-8),%d2
47dd6: 4e5e unlk %fp
47dd8: 4e75 rts
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
47dda: 41f9 0005 edd0 lea 5edd0 <_Objects_Information_table>,%a0
47de0: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
47de4: 4a88 tstl %a0
47de6: 66aa bnes 47d92 <_Objects_Id_to_name+0x32> <== ALWAYS TAKEN
47de8: 60e6 bras 47dd0 <_Objects_Id_to_name+0x70> <== NOT EXECUTED
...
000473a8 <_Objects_Set_name>:
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
473a8: 4280 clrl %d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
473aa: 4e56 ffec linkw %fp,#-20
473ae: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
473b2: 2a6e 0008 moveal %fp@(8),%a5
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
473b6: 302d 0034 movew %a5@(52),%d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
473ba: 246e 0010 moveal %fp@(16),%a2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
473be: 2f00 movel %d0,%sp@-
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
473c0: 286e 000c moveal %fp@(12),%a4
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
473c4: 2f0a movel %a2,%sp@-
473c6: 4eb9 0004 e628 jsr 4e628 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
473cc: 508f addql #8,%sp
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
473ce: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
473d0: 4a2d 0032 tstb %a5@(50)
473d4: 6744 beqs 4741a <_Objects_Set_name+0x72>
char *d;
d = _Workspace_Allocate( length + 1 );
473d6: 486b 0001 pea %a3@(1)
473da: 4eb9 0004 8cd0 jsr 48cd0 <_Workspace_Allocate>
if ( !d )
473e0: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
473e2: 2a40 moveal %d0,%a5
if ( !d )
473e4: 4a80 tstl %d0
473e6: 6700 0082 beqw 4746a <_Objects_Set_name+0xc2>
return false;
if ( the_object->name.name_p ) {
473ea: 202c 000c movel %a4@(12),%d0
473ee: 670e beqs 473fe <_Objects_Set_name+0x56>
_Workspace_Free( (void *)the_object->name.name_p );
473f0: 2f00 movel %d0,%sp@-
473f2: 4eb9 0004 8cec jsr 48cec <_Workspace_Free>
the_object->name.name_p = NULL;
473f8: 588f addql #4,%sp
473fa: 42ac 000c clrl %a4@(12)
}
strncpy( d, name, length );
473fe: 2f0b movel %a3,%sp@-
47400: 2f0a movel %a2,%sp@-
47402: 2f0d movel %a5,%sp@-
47404: 4eb9 0004 e5a4 jsr 4e5a4 <strncpy>
d[length] = '\0';
the_object->name.name_p = d;
4740a: 4fef 000c lea %sp@(12),%sp
_Workspace_Free( (void *)the_object->name.name_p );
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
4740e: 4200 clrb %d0
47410: 1b80 b800 moveb %d0,%a5@(00000000,%a3:l)
the_object->name.name_p = d;
47414: 294d 000c movel %a5,%a4@(12)
47418: 604c bras 47466 <_Objects_Set_name+0xbe>
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
4741a: 7418 moveq #24,%d2
4741c: 1212 moveb %a2@,%d1
4741e: 7020 moveq #32,%d0
47420: 4840 swap %d0
47422: 49c1 extbl %d1
47424: e5a9 lsll %d2,%d1
47426: 143c 0001 moveb #1,%d2
4742a: b48b cmpl %a3,%d2
4742c: 640a bccs 47438 <_Objects_Set_name+0x90>
4742e: 102a 0001 moveb %a2@(1),%d0
47432: 49c0 extbl %d0
47434: 4840 swap %d0
47436: 4240 clrw %d0
47438: 7402 moveq #2,%d2
4743a: 8280 orl %d0,%d1
4743c: 203c 0000 2000 movel #8192,%d0
47442: b48b cmpl %a3,%d2
47444: 6408 bccs 4744e <_Objects_Set_name+0xa6>
47446: 102a 0002 moveb %a2@(2),%d0
4744a: 49c0 extbl %d0
4744c: e188 lsll #8,%d0
4744e: 8081 orl %d1,%d0
47450: 7203 moveq #3,%d1
47452: b28b cmpl %a3,%d1
47454: 6408 bccs 4745e <_Objects_Set_name+0xb6>
47456: 142a 0003 moveb %a2@(3),%d2
4745a: 49c2 extbl %d2
4745c: 6002 bras 47460 <_Objects_Set_name+0xb8>
4745e: 7420 moveq #32,%d2
47460: 8082 orl %d2,%d0
47462: 2940 000c movel %d0,%a4@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
47466: 7001 moveq #1,%d0
47468: 6002 bras 4746c <_Objects_Set_name+0xc4>
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
4746a: 4200 clrb %d0 <== NOT EXECUTED
);
}
return true;
}
4746c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
47472: 4e5e unlk %fp
...
000463e8 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
463e8: 4e56 ffe4 linkw %fp,#-28
463ec: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
463f0: 240e movel %fp,%d2
463f2: 5982 subql #4,%d2
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
463f4: 246e 000c moveal %fp@(12),%a2
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
463f8: 2f02 movel %d2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
463fa: 286e 0008 moveal %fp@(8),%a4
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
463fe: 2f0a movel %a2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
46400: 162e 0017 moveb %fp@(23),%d3
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
46404: 4eb9 0004 6540 jsr 46540 <_POSIX_Mutex_Get>
4640a: 508f addql #8,%sp
4640c: 4a80 tstl %d0
4640e: 6700 00aa beqw 464ba <_POSIX_Condition_variables_Wait_support+0xd2>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
46412: 2039 0005 fe4c movel 5fe4c <_Thread_Dispatch_disable_level>,%d0
46418: 5380 subql #1,%d0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
4641a: 2f02 movel %d2,%sp@-
4641c: 23c0 0005 fe4c movel %d0,5fe4c <_Thread_Dispatch_disable_level>
46422: 2f0c movel %a4,%sp@-
46424: 4eb9 0004 621c jsr 4621c <_POSIX_Condition_variables_Get>
switch ( location ) {
4642a: 508f addql #8,%sp
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
4642c: 2640 moveal %d0,%a3
switch ( location ) {
4642e: 4aae fffc tstl %fp@(-4)
46432: 6600 0086 bnew 464ba <_POSIX_Condition_variables_Wait_support+0xd2>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
46436: 202b 0014 movel %a3@(20),%d0
4643a: 670c beqs 46448 <_POSIX_Condition_variables_Wait_support+0x60>
4643c: b092 cmpl %a2@,%d0
4643e: 6708 beqs 46448 <_POSIX_Condition_variables_Wait_support+0x60>
_Thread_Enable_dispatch();
46440: 4eb9 0004 92ce jsr 492ce <_Thread_Enable_dispatch>
46446: 6072 bras 464ba <_POSIX_Condition_variables_Wait_support+0xd2>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
46448: 2f0a movel %a2,%sp@-
4644a: 4bf9 0004 92ce lea 492ce <_Thread_Enable_dispatch>,%a5
46450: 4eb9 0004 6798 jsr 46798 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
46456: 588f addql #4,%sp
46458: 4a03 tstb %d3
4645a: 664c bnes 464a8 <_POSIX_Condition_variables_Wait_support+0xc0>
the_cond->Mutex = *mutex;
4645c: 2752 0014 movel %a2@,%a3@(20)
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;
46460: 7001 moveq #1,%d0
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
46462: 2079 0006 02dc moveal 602dc <_Per_CPU_Information+0xc>,%a0
46468: 2740 0048 movel %d0,%a3@(72)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
4646c: 47eb 0018 lea %a3@(24),%a3
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
46470: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
46474: 2154 0020 movel %a4@,%a0@(32)
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
46478: 214b 0044 movel %a3,%a0@(68)
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
4647c: 4879 0004 9ac4 pea 49ac4 <_Thread_queue_Timeout>
46482: 2f2e 0010 movel %fp@(16),%sp@-
46486: 2f0b movel %a3,%sp@-
46488: 4eb9 0004 9754 jsr 49754 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
4648e: 4e95 jsr %a5@
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
46490: 2079 0006 02dc moveal 602dc <_Per_CPU_Information+0xc>,%a0
if ( status && status != ETIMEDOUT )
46496: 4fef 000c lea %sp@(12),%sp
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
4649a: 2428 0034 movel %a0@(52),%d2
if ( status && status != ETIMEDOUT )
4649e: 670c beqs 464ac <_POSIX_Condition_variables_Wait_support+0xc4>
464a0: 7074 moveq #116,%d0
464a2: b082 cmpl %d2,%d0
464a4: 6616 bnes 464bc <_POSIX_Condition_variables_Wait_support+0xd4><== NEVER TAKEN
464a6: 6004 bras 464ac <_POSIX_Condition_variables_Wait_support+0xc4>
return status;
} else {
_Thread_Enable_dispatch();
464a8: 4e95 jsr %a5@
status = ETIMEDOUT;
464aa: 7474 moveq #116,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
464ac: 2f0a movel %a2,%sp@-
464ae: 4eb9 0004 6700 jsr 46700 <pthread_mutex_lock>
if ( mutex_status )
464b4: 588f addql #4,%sp
464b6: 4a80 tstl %d0
464b8: 6702 beqs 464bc <_POSIX_Condition_variables_Wait_support+0xd4>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
464ba: 7416 moveq #22,%d2
}
464bc: 2002 movel %d2,%d0
464be: 4cee 3c0c ffe4 moveml %fp@(-28),%d2-%d3/%a2-%a5
464c4: 4e5e unlk %fp <== NOT EXECUTED
00049e1c <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
49e1c: 4e56 ffe4 linkw %fp,#-28
49e20: 48d7 043c moveml %d2-%d5/%a2,%sp@
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
49e24: 486e fffc pea %fp@(-4)
49e28: 242e 0008 movel %fp@(8),%d2
49e2c: 2f02 movel %d2,%sp@-
49e2e: 4879 0006 5f76 pea 65f76 <_POSIX_Message_queue_Information_fds>
49e34: 162e 001b moveb %fp@(27),%d3
49e38: 4eb9 0004 cb78 jsr 4cb78 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
49e3e: 4fef 000c lea %sp@(12),%sp
49e42: 4aae fffc tstl %fp@(-4)
49e46: 6600 00c0 bnew 49f08 <_POSIX_Message_queue_Receive_support+0xec>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
49e4a: 2040 moveal %d0,%a0
49e4c: 7803 moveq #3,%d4
49e4e: 7a01 moveq #1,%d5
49e50: 2228 0014 movel %a0@(20),%d1
49e54: c881 andl %d1,%d4
49e56: ba84 cmpl %d4,%d5
49e58: 660a bnes 49e64 <_POSIX_Message_queue_Receive_support+0x48>
_Thread_Enable_dispatch();
49e5a: 4eb9 0004 d3e6 jsr 4d3e6 <_Thread_Enable_dispatch>
49e60: 6000 00a6 braw 49f08 <_POSIX_Message_queue_Receive_support+0xec>
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
49e64: 2240 moveal %d0,%a1
49e66: 2069 0010 moveal %a1@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
49e6a: 2028 0066 movel %a0@(102),%d0
49e6e: b0ae 0010 cmpl %fp@(16),%d0
49e72: 6316 blss 49e8a <_POSIX_Message_queue_Receive_support+0x6e>
_Thread_Enable_dispatch();
49e74: 4eb9 0004 d3e6 jsr 4d3e6 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
49e7a: 4eb9 0005 2e80 jsr 52e80 <__errno>
49e80: 727a moveq #122,%d1
49e82: 2040 moveal %d0,%a0
49e84: 2081 movel %d1,%a0@
49e86: 6000 008c braw 49f14 <_POSIX_Message_queue_Receive_support+0xf8>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
49e8a: 70ff moveq #-1,%d0
49e8c: 2d40 fff8 movel %d0,%fp@(-8)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
49e90: 4a03 tstb %d3
49e92: 670a beqs 49e9e <_POSIX_Message_queue_Receive_support+0x82><== NEVER TAKEN
do_wait = (the_mq_fd->oflag & O_NONBLOCK) ? false : true;
49e94: 0801 000e btst #14,%d1
49e98: 57c0 seq %d0
49e9a: 4480 negl %d0
49e9c: 6002 bras 49ea0 <_POSIX_Message_queue_Receive_support+0x84>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
49e9e: 4200 clrb %d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
49ea0: 2f2e 001c movel %fp@(28),%sp@-
49ea4: 0280 0000 00ff andil #255,%d0
49eaa: 2f00 movel %d0,%sp@-
49eac: 486e fff8 pea %fp@(-8)
49eb0: 2f2e 000c movel %fp@(12),%sp@-
49eb4: 2f02 movel %d2,%sp@-
49eb6: 4868 001a pea %a0@(26)
49eba: 4eb9 0004 bc84 jsr 4bc84 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
49ec0: 4eb9 0004 d3e6 jsr 4d3e6 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
49ec6: 2079 0006 5fe8 moveal 65fe8 <_Per_CPU_Information+0xc>,%a0
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
49ecc: 2028 0024 movel %a0@(36),%d0
49ed0: 6c02 bges 49ed4 <_POSIX_Message_queue_Receive_support+0xb8>
49ed2: 4480 negl %d0
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
49ed4: 226e 0014 moveal %fp@(20),%a1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
49ed8: 4fef 0018 lea %sp@(24),%sp
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
49edc: 2280 movel %d0,%a1@
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
49ede: 4aa8 0034 tstl %a0@(52)
49ee2: 6606 bnes 49eea <_POSIX_Message_queue_Receive_support+0xce>
return length_out;
49ee4: 202e fff8 movel %fp@(-8),%d0
49ee8: 602c bras 49f16 <_POSIX_Message_queue_Receive_support+0xfa>
rtems_set_errno_and_return_minus_one(
49eea: 4eb9 0005 2e80 jsr 52e80 <__errno>
49ef0: 2079 0006 5fe8 moveal 65fe8 <_Per_CPU_Information+0xc>,%a0
49ef6: 2440 moveal %d0,%a2
49ef8: 2f28 0034 movel %a0@(52),%sp@-
49efc: 4eb9 0004 a130 jsr 4a130 <_POSIX_Message_queue_Translate_core_message_queue_return_code>
49f02: 588f addql #4,%sp
49f04: 2480 movel %d0,%a2@
49f06: 600c bras 49f14 <_POSIX_Message_queue_Receive_support+0xf8>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
49f08: 4eb9 0005 2e80 jsr 52e80 <__errno>
49f0e: 2040 moveal %d0,%a0
49f10: 7009 moveq #9,%d0
49f12: 2080 movel %d0,%a0@
49f14: 70ff moveq #-1,%d0
}
49f16: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2
49f1c: 4e5e unlk %fp <== NOT EXECUTED
0004dfec <_POSIX_Semaphore_Delete>:
*/
void _POSIX_Semaphore_Delete(
POSIX_Semaphore_Control *the_semaphore
)
{
4dfec: 4e56 0000 linkw %fp,#0
4dff0: 2f0a movel %a2,%sp@-
4dff2: 246e 0008 moveal %fp@(8),%a2
if ( !the_semaphore->linked && !the_semaphore->open_count ) {
4dff6: 4a2a 0015 tstb %a2@(21)
4dffa: 6636 bnes 4e032 <_POSIX_Semaphore_Delete+0x46> <== NEVER TAKEN
4dffc: 4aaa 0016 tstl %a2@(22)
4e000: 6630 bnes 4e032 <_POSIX_Semaphore_Delete+0x46>
_Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
4e002: 2f0a movel %a2,%sp@-
4e004: 4879 0006 2af4 pea 62af4 <_POSIX_Semaphore_Information>
4e00a: 4eb9 0004 a09c jsr 4a09c <_Objects_Close>
_CORE_semaphore_Flush(
4e010: 4878 ffff pea ffffffff <LESS>
4e014: 42a7 clrl %sp@-
4e016: 486a 001a pea %a2@(26)
4e01a: 4eb9 0004 9a84 jsr 49a84 <_CORE_semaphore_Flush>
RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
POSIX_Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
4e020: 2f0a movel %a2,%sp@-
4e022: 4879 0006 2af4 pea 62af4 <_POSIX_Semaphore_Information>
4e028: 4eb9 0004 a314 jsr 4a314 <_Objects_Free>
4e02e: 4fef 001c lea %sp@(28),%sp
-1
);
_POSIX_Semaphore_Free( the_semaphore );
}
}
4e032: 246e fffc moveal %fp@(-4),%a2
4e036: 4e5e unlk %fp
...
0004a0c4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4a0c4: 4e56 0000 linkw %fp,#0
4a0c8: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a0cc: 2069 010e moveal %a1@(270),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4a0d0: 4aa8 00d4 tstl %a0@(212)
4a0d4: 662e bnes 4a104 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40><== NEVER TAKEN
4a0d6: 7001 moveq #1,%d0
4a0d8: b0a8 00d8 cmpl %a0@(216),%d0
4a0dc: 6626 bnes 4a104 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40>
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
4a0de: 4aa8 00dc tstl %a0@(220)
4a0e2: 6720 beqs 4a104 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x40>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4a0e4: 4878 ffff pea ffffffff <LESS>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4a0e8: 2039 0005 dfc0 movel 5dfc0 <_Thread_Dispatch_disable_level>,%d0
4a0ee: 5380 subql #1,%d0
4a0f0: 2f09 movel %a1,%sp@-
4a0f2: 23c0 0005 dfc0 movel %d0,5dfc0 <_Thread_Dispatch_disable_level>
4a0f8: 4eb9 0004 a898 jsr 4a898 <_POSIX_Thread_Exit>
4a0fe: 508f addql #8,%sp
} else
_Thread_Enable_dispatch();
}
4a100: 4e5e unlk %fp
4a102: 4e75 rts
4a104: 4e5e unlk %fp
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
4a106: 4ef9 0004 79ba jmp 479ba <_Thread_Enable_dispatch>
0004b304 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4b304: 4e56 ffec linkw %fp,#-20
4b308: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4b30c: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4b310: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4b312: 242e 0008 movel %fp@(8),%d2
4b316: 266e 0010 moveal %fp@(16),%a3
4b31a: 286e 0014 moveal %fp@(20),%a4
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4b31e: 4eb9 0004 b2e0 jsr 4b2e0 <_POSIX_Priority_Is_valid>
4b324: 588f addql #4,%sp
4b326: 4a00 tstb %d0
4b328: 6778 beqs 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4b32a: 4293 clrl %a3@
*budget_callout = NULL;
4b32c: 4294 clrl %a4@
if ( policy == SCHED_OTHER ) {
4b32e: 4a82 tstl %d2
4b330: 6606 bnes 4b338 <_POSIX_Thread_Translate_sched_param+0x34>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4b332: 7201 moveq #1,%d1
4b334: 2681 movel %d1,%a3@
4b336: 6066 bras 4b39e <_POSIX_Thread_Translate_sched_param+0x9a>
return 0;
}
if ( policy == SCHED_FIFO ) {
4b338: 7001 moveq #1,%d0
4b33a: b082 cmpl %d2,%d0
4b33c: 6760 beqs 4b39e <_POSIX_Thread_Translate_sched_param+0x9a>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4b33e: 103c 0002 moveb #2,%d0
4b342: b082 cmpl %d2,%d0
4b344: 6606 bnes 4b34c <_POSIX_Thread_Translate_sched_param+0x48>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4b346: 2680 movel %d0,%a3@
return 0;
4b348: 4200 clrb %d0
4b34a: 6058 bras 4b3a4 <_POSIX_Thread_Translate_sched_param+0xa0>
}
if ( policy == SCHED_SPORADIC ) {
4b34c: 7004 moveq #4,%d0
4b34e: b082 cmpl %d2,%d0
4b350: 6650 bnes 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e>
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4b352: 4aaa 0008 tstl %a2@(8)
4b356: 6606 bnes 4b35e <_POSIX_Thread_Translate_sched_param+0x5a>
4b358: 4aaa 000c tstl %a2@(12)
4b35c: 6744 beqs 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4b35e: 4aaa 0010 tstl %a2@(16)
4b362: 6606 bnes 4b36a <_POSIX_Thread_Translate_sched_param+0x66>
4b364: 4aaa 0014 tstl %a2@(20)
4b368: 6738 beqs 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4b36a: 486a 0008 pea %a2@(8)
4b36e: 4bf9 0004 9278 lea 49278 <_Timespec_To_ticks>,%a5
4b374: 4e95 jsr %a5@
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4b376: 486a 0010 pea %a2@(16)
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4b37a: 2400 movel %d0,%d2
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4b37c: 4e95 jsr %a5@
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4b37e: 508f addql #8,%sp
4b380: b082 cmpl %d2,%d0
4b382: 621e bhis 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4b384: 2f2a 0004 movel %a2@(4),%sp@-
4b388: 4eb9 0004 b2e0 jsr 4b2e0 <_POSIX_Priority_Is_valid>
4b38e: 588f addql #4,%sp
4b390: 4a00 tstb %d0
4b392: 670e beqs 4b3a2 <_POSIX_Thread_Translate_sched_param+0x9e>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4b394: 7003 moveq #3,%d0
4b396: 2680 movel %d0,%a3@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4b398: 28bc 0004 5de4 movel #286180,%a4@
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
4b39e: 4280 clrl %d0
4b3a0: 6002 bras 4b3a4 <_POSIX_Thread_Translate_sched_param+0xa0>
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
4b3a2: 7016 moveq #22,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4b3a4: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4b3aa: 4e5e unlk %fp
...
00045b14 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
45b14: 4e56 ff9c linkw %fp,#-100
45b18: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
uint32_t maximum;
posix_initialization_threads_table *user_threads;
pthread_t thread_id;
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
45b1c: 2479 0005 d25e moveal 5d25e <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
45b22: 2839 0005 d25a movel 5d25a <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
45b28: 4a8a tstl %a2
45b2a: 676a beqs 45b96 <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN
45b2c: 4a84 tstl %d4
45b2e: 6766 beqs 45b96 <_POSIX_Threads_Initialize_user_threads_body+0x82><== NEVER TAKEN
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
45b30: 240e movel %fp,%d2
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
status = pthread_create(
45b32: 2a0e movel %fp,%d5
pthread_attr_t attr;
user_threads = Configuration_POSIX_API.User_initialization_threads_table;
maximum = Configuration_POSIX_API.number_of_initialization_threads;
if ( !user_threads || maximum == 0 )
45b34: 4283 clrl %d3
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
45b36: 0682 ffff ffc0 addil #-64,%d2
45b3c: 2c3c 0004 b3b0 movel #308144,%d6
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
45b42: 4bf9 0004 b3dc lea 4b3dc <pthread_attr_setinheritsched>,%a5
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
45b48: 49f9 0004 b414 lea 4b414 <pthread_attr_setstacksize>,%a4
status = pthread_create(
45b4e: 5985 subql #4,%d5
45b50: 47f9 0004 5868 lea 45868 <pthread_create>,%a3
for ( index=0 ; index < maximum ; index++ ) {
/*
* There is no way for these calls to fail in this situation.
*/
(void) pthread_attr_init( &attr );
45b56: 2f02 movel %d2,%sp@-
45b58: 2046 moveal %d6,%a0
45b5a: 4e90 jsr %a0@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
45b5c: 4878 0002 pea 2 <DOUBLE_FLOAT>
45b60: 2f02 movel %d2,%sp@-
45b62: 4e95 jsr %a5@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
45b64: 2f2a 0004 movel %a2@(4),%sp@-
45b68: 2f02 movel %d2,%sp@-
45b6a: 4e94 jsr %a4@
status = pthread_create(
45b6c: 42a7 clrl %sp@-
45b6e: 2f12 movel %a2@,%sp@-
45b70: 2f02 movel %d2,%sp@-
45b72: 2f05 movel %d5,%sp@-
45b74: 4e93 jsr %a3@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
45b76: 4fef 0024 lea %sp@(36),%sp
45b7a: 4a80 tstl %d0
45b7c: 6710 beqs 45b8e <_POSIX_Threads_Initialize_user_threads_body+0x7a>
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
45b7e: 2f00 movel %d0,%sp@-
45b80: 4878 0001 pea 1 <ADD>
45b84: 4878 0002 pea 2 <DOUBLE_FLOAT>
45b88: 4eb9 0004 7834 jsr 47834 <_Internal_error_Occurred>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
45b8e: 5283 addql #1,%d3
45b90: 508a addql #8,%a2
45b92: b883 cmpl %d3,%d4
45b94: 62c0 bhis 45b56 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
45b96: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5
45b9c: 4e5e unlk %fp <== NOT EXECUTED
0004a450 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4a450: 4e56 0000 linkw %fp,#0
4a454: 2f0b movel %a3,%sp@-
4a456: 2f0a movel %a2,%sp@-
4a458: 246e 000c moveal %fp@(12),%a2
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a45c: 266a 010e moveal %a2@(270),%a3
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4a460: 486b 0094 pea %a3@(148)
4a464: 4eb9 0004 b240 jsr 4b240 <_Timespec_To_ticks>
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4a46a: 588f addql #4,%sp
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
4a46c: 2540 0076 movel %d0,%a2@(118)
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4a470: 4280 clrl %d0
4a472: 1039 0005 c192 moveb 5c192 <rtems_maximum_priority>,%d0
4a478: 90ab 0084 subl %a3@(132),%d0
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4a47c: 2540 0018 movel %d0,%a2@(24)
*/
#if 0
printk( "TSR %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4a480: 4aaa 001c tstl %a2@(28)
4a484: 6618 bnes 4a49e <_POSIX_Threads_Sporadic_budget_TSR+0x4e><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
4a486: b0aa 0014 cmpl %a2@(20),%d0
4a48a: 6412 bccs 4a49e <_POSIX_Threads_Sporadic_budget_TSR+0x4e>
_Thread_Change_priority( the_thread, new_priority, true );
4a48c: 4878 0001 pea 1 <ADD>
4a490: 2f00 movel %d0,%sp@-
4a492: 2f0a movel %a2,%sp@-
4a494: 4eb9 0004 71b0 jsr 471b0 <_Thread_Change_priority>
4a49a: 4fef 000c lea %sp@(12),%sp
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
4a49e: 486b 008c pea %a3@(140)
4a4a2: 4eb9 0004 b240 jsr 4b240 <_Timespec_To_ticks>
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4a4a8: 246e fff8 moveal %fp@(-8),%a2
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4a4ac: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4a4ae: 2740 00b0 movel %d0,%a3@(176)
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4a4b2: 47eb 00a4 lea %a3@(164),%a3
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4a4b6: 203c 0005 da0e movel #383502,%d0
4a4bc: 2d4b 000c movel %a3,%fp@(12)
}
4a4c0: 266e fffc moveal %fp@(-4),%a3
4a4c4: 2d40 0008 movel %d0,%fp@(8)
4a4c8: 4e5e unlk %fp
4a4ca: 4ef9 0004 8614 jmp 48614 <_Watchdog_Insert>
0004a4d0 <_POSIX_Threads_Sporadic_budget_callout>:
/*
* 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 */
4a4d0: 70ff moveq #-1,%d0
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4a4d2: 4e56 0000 linkw %fp,#0
4a4d6: 206e 0008 moveal %fp@(8),%a0
/*
* 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 */
4a4da: 2140 0076 movel %d0,%a0@(118)
4a4de: 4280 clrl %d0
4a4e0: 1039 0005 c192 moveb 5c192 <rtems_maximum_priority>,%d0
)
{
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4a4e6: 2268 010e moveal %a0@(270),%a1
4a4ea: 90a9 0088 subl %a1@(136),%d0
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4a4ee: 2140 0018 movel %d0,%a0@(24)
*/
#if 0
printk( "callout %d %d %d\n", the_thread->resource_count,
the_thread->current_priority, new_priority );
#endif
if ( the_thread->resource_count == 0 ) {
4a4f2: 4aa8 001c tstl %a0@(28)
4a4f6: 6618 bnes 4a510 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN
/*
* Make sure we are actually lowering it. If they have lowered it
* to logically lower than sched_ss_low_priority, then we do not want to
* change it.
*/
if ( the_thread->current_priority < new_priority ) {
4a4f8: b0a8 0014 cmpl %a0@(20),%d0
4a4fc: 6312 blss 4a510 <_POSIX_Threads_Sporadic_budget_callout+0x40><== NEVER TAKEN
_Thread_Change_priority( the_thread, new_priority, true );
4a4fe: 4878 0001 pea 1 <ADD>
4a502: 2f00 movel %d0,%sp@-
4a504: 2f08 movel %a0,%sp@-
4a506: 4eb9 0004 71b0 jsr 471b0 <_Thread_Change_priority>
4a50c: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4a510: 4e5e unlk %fp <== NOT EXECUTED
000456b0 <_POSIX_Timer_TSR>:
* This is the operation that is run when a timer expires
*/
void _POSIX_Timer_TSR(
Objects_Id timer __attribute__((unused)),
void *data)
{
456b0: 4e56 0000 linkw %fp,#0
456b4: 2f0a movel %a2,%sp@-
456b6: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
456ba: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
456be: 4aaa 0052 tstl %a2@(82)
456c2: 6606 bnes 456ca <_POSIX_Timer_TSR+0x1a>
456c4: 4aaa 0056 tstl %a2@(86)
456c8: 6736 beqs 45700 <_POSIX_Timer_TSR+0x50> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
456ca: 2f0a movel %a2,%sp@-
456cc: 4879 0004 56b0 pea 456b0 <_POSIX_Timer_TSR>
456d2: 2f2a 0008 movel %a2@(8),%sp@-
456d6: 2f2a 0062 movel %a2@(98),%sp@-
456da: 486a 0010 pea %a2@(16)
456de: 4eb9 0004 adc4 jsr 4adc4 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
456e4: 4fef 0014 lea %sp@(20),%sp
456e8: 4a00 tstb %d0
456ea: 672e beqs 4571a <_POSIX_Timer_TSR+0x6a> <== NEVER TAKEN
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
456ec: 486a 006a pea %a2@(106)
456f0: 4eb9 0004 6bd0 jsr 46bd0 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
456f6: 588f addql #4,%sp
456f8: 7003 moveq #3,%d0
456fa: 1540 003c moveb %d0,%a2@(60)
456fe: 6006 bras 45706 <_POSIX_Timer_TSR+0x56>
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
45700: 7004 moveq #4,%d0 <== NOT EXECUTED
45702: 1540 003c moveb %d0,%a2@(60) <== 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 ) ) {
45706: 2f2a 0042 movel %a2@(66),%sp@-
4570a: 2f2a 0038 movel %a2@(56),%sp@-
4570e: 4eb9 0004 a9ac jsr 4a9ac <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
45714: 508f addql #8,%sp
45716: 42aa 0066 clrl %a2@(102)
}
4571a: 246e fffc moveal %fp@(-4),%a2
4571e: 4e5e unlk %fp
...
0004c3b0 <_POSIX_signals_Check_signal>:
)
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c3b0: 4280 clrl %d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c3b2: 4e56 ffe4 linkw %fp,#-28
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c3b6: 102e 0013 moveb %fp@(19),%d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c3ba: 48d7 041c moveml %d2-%d4/%a2,%sp@
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c3be: 4878 0001 pea 1 <ADD>
4c3c2: 260e movel %fp,%d3
4c3c4: 0683 ffff fff4 addil #-12,%d3
4c3ca: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c3cc: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c3d0: 2f03 movel %d3,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4c3d2: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4c3d6: 2f02 movel %d2,%sp@-
4c3d8: 2f0a movel %a2,%sp@-
4c3da: 4eb9 0004 c448 jsr 4c448 <_POSIX_signals_Clear_signals>
4c3e0: 4fef 0014 lea %sp@(20),%sp
4c3e4: 4a00 tstb %d0
4c3e6: 6754 beqs 4c43c <_POSIX_signals_Check_signal+0x8c>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4c3e8: 2202 movel %d2,%d1
4c3ea: 2002 movel %d2,%d0
4c3ec: e589 lsll #2,%d1
4c3ee: e988 lsll #4,%d0
4c3f0: 9081 subl %d1,%d0
4c3f2: 2240 moveal %d0,%a1
4c3f4: d3fc 0005 ddea addal #384490,%a1
4c3fa: 7201 moveq #1,%d1
4c3fc: 2069 0008 moveal %a1@(8),%a0
4c400: b288 cmpl %a0,%d1
4c402: 6738 beqs 4c43c <_POSIX_signals_Check_signal+0x8c><== NEVER TAKEN
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4c404: 2229 0004 movel %a1@(4),%d1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4c408: 43f9 0005 ddea lea 5ddea <_POSIX_signals_Vectors>,%a1
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
4c40e: 282a 00cc movel %a2@(204),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4c412: 8284 orl %d4,%d1
4c414: 2541 00cc movel %d1,%a2@(204)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4c418: 7202 moveq #2,%d1
4c41a: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1
4c41e: 660e bnes 4c42e <_POSIX_signals_Check_signal+0x7e>
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4c420: 42a7 clrl %sp@-
4c422: 2f03 movel %d3,%sp@-
4c424: 2f02 movel %d2,%sp@-
4c426: 4e90 jsr %a0@
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
4c428: 4fef 000c lea %sp@(12),%sp
4c42c: 6006 bras 4c434 <_POSIX_signals_Check_signal+0x84>
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4c42e: 2f02 movel %d2,%sp@-
4c430: 4e90 jsr %a0@
break;
4c432: 588f addql #4,%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4c434: 2544 00cc movel %d4,%a2@(204)
return true;
4c438: 7001 moveq #1,%d0
4c43a: 6002 bras 4c43e <_POSIX_signals_Check_signal+0x8e>
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return false;
4c43c: 4200 clrb %d0
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
4c43e: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2
4c444: 4e5e unlk %fp <== NOT EXECUTED
0004c9c8 <_POSIX_signals_Clear_process_signals>:
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4c9c8: 203c 0000 0700 movel #1792,%d0
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
4c9ce: 4e56 0000 linkw %fp,#0
4c9d2: 222e 0008 movel %fp@(8),%d1
4c9d6: 2f03 movel %d3,%sp@-
4c9d8: 2f02 movel %d2,%sp@-
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4c9da: 40c2 movew %sr,%d2
4c9dc: 8082 orl %d2,%d0
4c9de: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4c9e0: 2601 movel %d1,%d3
4c9e2: 2001 movel %d1,%d0
4c9e4: 41f9 0005 ddea lea 5ddea <_POSIX_signals_Vectors>,%a0
4c9ea: e58b lsll #2,%d3
4c9ec: e988 lsll #4,%d0
4c9ee: 9083 subl %d3,%d0
4c9f0: 7602 moveq #2,%d3
4c9f2: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3
4c9f6: 6614 bnes 4ca0c <_POSIX_signals_Clear_process_signals+0x44>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4c9f8: 2040 moveal %d0,%a0
4c9fa: d1fc 0005 dfe6 addal #384998,%a0
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
4ca00: 43f9 0005 dfe2 lea 5dfe2 <_POSIX_signals_Siginfo>,%a1
4ca06: b1f1 0800 cmpal %a1@(00000000,%d0:l),%a0
4ca0a: 660e bnes 4ca1a <_POSIX_signals_Clear_process_signals+0x52><== NEVER TAKEN
4ca0c: 5381 subql #1,%d1
4ca0e: 7001 moveq #1,%d0
4ca10: e3a8 lsll %d1,%d0
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
4ca12: 4680 notl %d0
4ca14: c1b9 0005 dfde andl %d0,5dfde <_POSIX_signals_Pending>
}
_ISR_Enable( level );
4ca1a: 46c2 movew %d2,%sr
}
4ca1c: 241f movel %sp@+,%d2
4ca1e: 261f movel %sp@+,%d3
4ca20: 4e5e unlk %fp <== NOT EXECUTED
000461ac <_POSIX_signals_Get_highest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
461ac: 701b moveq #27,%d0
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
461ae: 4e56 fff4 linkw %fp,#-12
461b2: 48d7 001c moveml %d2-%d4,%sp@
461b6: 242e 0008 movel %fp@(8),%d2
461ba: 7601 moveq #1,%d3
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
461bc: 2200 movel %d0,%d1
461be: 5381 subql #1,%d1
461c0: 2803 movel %d3,%d4
461c2: e3ac lsll %d1,%d4
461c4: 2204 movel %d4,%d1
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
461c6: c282 andl %d2,%d1
461c8: 6626 bnes 461f0 <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
461ca: 5280 addql #1,%d0
461cc: 123c 0020 moveb #32,%d1
461d0: b280 cmpl %d0,%d1
461d2: 66e8 bnes 461bc <_POSIX_signals_Get_highest+0x10>
461d4: 7001 moveq #1,%d0
461d6: 7601 moveq #1,%d3
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
461d8: 2200 movel %d0,%d1
461da: 5381 subql #1,%d1
461dc: 2803 movel %d3,%d4
461de: e3ac lsll %d1,%d4
461e0: 2204 movel %d4,%d1
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
461e2: c282 andl %d2,%d1
461e4: 660a bnes 461f0 <_POSIX_signals_Get_highest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
461e6: 5280 addql #1,%d0
461e8: 123c 001b moveb #27,%d1
461ec: b280 cmpl %d0,%d1
461ee: 66e8 bnes 461d8 <_POSIX_signals_Get_highest+0x2c><== ALWAYS TAKEN
* a return 0. This routine will NOT be called unless a signal
* is pending in the set passed in.
*/
found_it:
return signo;
}
461f0: 4cd7 001c moveml %sp@,%d2-%d4
461f4: 4e5e unlk %fp <== NOT EXECUTED
0005a288 <_POSIX_signals_Unblock_thread>:
5a288: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5a28a: 4e56 fff4 linkw %fp,#-12
5a28e: 226e 0010 moveal %fp@(16),%a1
5a292: 48d7 040c moveml %d2-%d3/%a2,%sp@
5a296: 242e 000c movel %fp@(12),%d2
5a29a: 2202 movel %d2,%d1
5a29c: 5381 subql #1,%d1
5a29e: 246e 0008 moveal %fp@(8),%a2
5a2a2: e3a8 lsll %d1,%d0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5a2a4: 222a 0010 movel %a2@(16),%d1
5a2a8: 2601 movel %d1,%d3
5a2aa: 0283 1000 8000 andil #268468224,%d3
{
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5a2b0: 206a 010e moveal %a2@(270),%a0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5a2b4: 0c83 1000 8000 cmpil #268468224,%d3
5a2ba: 6652 bnes 5a30e <_POSIX_signals_Unblock_thread+0x86>
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
5a2bc: 2200 movel %d0,%d1
5a2be: c2aa 0030 andl %a2@(48),%d1
5a2c2: 660c bnes 5a2d0 <_POSIX_signals_Unblock_thread+0x48>
5a2c4: 2228 00cc movel %a0@(204),%d1
5a2c8: 4681 notl %d1
5a2ca: c081 andl %d1,%d0
5a2cc: 6700 009e beqw 5a36c <_POSIX_signals_Unblock_thread+0xe4>
the_thread->Wait.return_code = EINTR;
5a2d0: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5a2d2: 206a 0028 moveal %a2@(40),%a0
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
the_thread->Wait.return_code = EINTR;
5a2d6: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5a2da: 4a89 tstl %a1
5a2dc: 6610 bnes 5a2ee <_POSIX_signals_Unblock_thread+0x66>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
5a2de: 103c 0001 moveb #1,%d0
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
5a2e2: 2082 movel %d2,%a0@
the_info->si_code = SI_USER;
5a2e4: 2140 0004 movel %d0,%a0@(4)
the_info->si_value.sival_int = 0;
5a2e8: 42a8 0008 clrl %a0@(8)
5a2ec: 6012 bras 5a300 <_POSIX_signals_Unblock_thread+0x78>
} else {
*the_info = *info;
5a2ee: 4878 000c pea c <OPER1>
5a2f2: 2f09 movel %a1,%sp@-
5a2f4: 2f08 movel %a0,%sp@-
5a2f6: 4eb9 0004 d300 jsr 4d300 <memcpy>
5a2fc: 4fef 000c lea %sp@(12),%sp
}
_Thread_queue_Extract_with_proxy( the_thread );
5a300: 2f0a movel %a2,%sp@-
5a302: 4eb9 0004 7cfc jsr 47cfc <_Thread_queue_Extract_with_proxy>
return true;
5a308: 588f addql #4,%sp
5a30a: 7001 moveq #1,%d0
5a30c: 6060 bras 5a36e <_POSIX_signals_Unblock_thread+0xe6>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
5a30e: 2428 00cc movel %a0@(204),%d2
5a312: 4682 notl %d2
5a314: c082 andl %d2,%d0
5a316: 6754 beqs 5a36c <_POSIX_signals_Unblock_thread+0xe4>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
5a318: 0801 001c btst #28,%d1
5a31c: 6732 beqs 5a350 <_POSIX_signals_Unblock_thread+0xc8>
the_thread->Wait.return_code = EINTR;
5a31e: 7004 moveq #4,%d0
5a320: 2540 0034 movel %d0,%a2@(52)
#if 0
if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) )
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
5a324: 44c1 movew %d1,%ccr
5a326: 6a44 bpls 5a36c <_POSIX_signals_Unblock_thread+0xe4><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
5a328: 103c 0002 moveb #2,%d0
5a32c: b0aa 0050 cmpl %a2@(80),%d0
5a330: 660c bnes 5a33e <_POSIX_signals_Unblock_thread+0xb6><== NEVER TAKEN
(void) _Watchdog_Remove( &the_thread->Timer );
5a332: 486a 0048 pea %a2@(72)
5a336: 4eb9 0004 8730 jsr 48730 <_Watchdog_Remove>
5a33c: 588f addql #4,%sp
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
5a33e: 2f3c 1003 fff8 movel #268697592,%sp@-
5a344: 2f0a movel %a2,%sp@-
5a346: 4eb9 0004 72f0 jsr 472f0 <_Thread_Clear_state>
5a34c: 508f addql #8,%sp
5a34e: 601c bras 5a36c <_POSIX_signals_Unblock_thread+0xe4>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
5a350: 4a81 tstl %d1
5a352: 6618 bnes 5a36c <_POSIX_signals_Unblock_thread+0xe4><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5a354: 4ab9 0005 ddd8 tstl 5ddd8 <_Per_CPU_Information+0x8>
5a35a: 6710 beqs 5a36c <_POSIX_signals_Unblock_thread+0xe4>
5a35c: b5f9 0005 dddc cmpal 5dddc <_Per_CPU_Information+0xc>,%a2
5a362: 6608 bnes 5a36c <_POSIX_signals_Unblock_thread+0xe4><== NEVER TAKEN
_Context_Switch_necessary = true;
5a364: 7001 moveq #1,%d0
5a366: 13c0 0005 dde8 moveb %d0,5dde8 <_Per_CPU_Information+0x18>
}
}
return false;
5a36c: 4200 clrb %d0
}
5a36e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5a374: 4e5e unlk %fp <== NOT EXECUTED
0004a7f4 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4a7f4: 4e56 ffec linkw %fp,#-20
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4a7f8: 206e 0008 moveal %fp@(8),%a0
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4a7fc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
RTEMS_API_Control *api;
ASR_Information *asr;
rtems_signal_set signal_set;
Modes_Control prev_mode;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4a800: 2468 010a moveal %a0@(266),%a2
if ( !api )
4a804: 4a8a tstl %a2
4a806: 6754 beqs 4a85c <_RTEMS_tasks_Post_switch_extension+0x68><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4a808: 203c 0000 0700 movel #1792,%d0
4a80e: 40c1 movew %sr,%d1
4a810: 8081 orl %d1,%d0
4a812: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4a814: 262a 0012 movel %a2@(18),%d3
asr->signals_posted = 0;
4a818: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4a81c: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4a81e: 4a83 tstl %d3
4a820: 673a beqs 4a85c <_RTEMS_tasks_Post_switch_extension+0x68>
return;
asr->nest_level += 1;
4a822: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4a826: 240e movel %fp,%d2
4a828: 5982 subql #4,%d2
4a82a: 47f9 0004 c5cc lea 4c5cc <rtems_task_mode>,%a3
4a830: 2f02 movel %d2,%sp@-
4a832: 2f3c 0000 ffff movel #65535,%sp@-
4a838: 2f2a 000e movel %a2@(14),%sp@-
4a83c: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4a83e: 2f03 movel %d3,%sp@-
4a840: 206a 000a moveal %a2@(10),%a0
4a844: 4e90 jsr %a0@
asr->nest_level -= 1;
4a846: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4a84a: 2f02 movel %d2,%sp@-
4a84c: 2f3c 0000 ffff movel #65535,%sp@-
4a852: 2f2e fffc movel %fp@(-4),%sp@-
4a856: 4e93 jsr %a3@
4a858: 4fef 001c lea %sp@(28),%sp
}
4a85c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4a862: 4e5e unlk %fp <== NOT EXECUTED
000581e0 <_Region_Process_queue>:
*/
void _Region_Process_queue(
Region_Control *the_region
)
{
581e0: 4e56 ffe4 linkw %fp,#-28
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
581e4: 2039 0007 6510 movel 76510 <_Thread_Dispatch_disable_level>,%d0
581ea: 5280 addql #1,%d0
581ec: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
581f0: 266e 0008 moveal %fp@(8),%a3
581f4: 23c0 0007 6510 movel %d0,76510 <_Thread_Dispatch_disable_level>
* NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context
* switch could occur.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
581fa: 2f39 0007 65b2 movel 765b2 <_RTEMS_Allocator_Mutex>,%sp@-
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
58200: 240b movel %a3,%d2
RTEMS_INLINE_ROUTINE void *_Region_Allocate_segment (
Region_Control *the_region,
uintptr_t size
)
{
return _Heap_Allocate( &the_region->Memory, size );
58202: 260b movel %a3,%d3
58204: 0682 0000 0010 addil #16,%d2
5820a: 0683 0000 0068 addil #104,%d3
58210: 4bf9 0005 36a8 lea 536a8 <_Heap_Allocate_aligned_with_boundary>,%a5
if ( the_segment == NULL )
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
58216: 49f9 0005 8848 lea 58848 <_Thread_queue_Extract>,%a4
* NOTE: Be sure to disable dispatching before unlocking the mutex
* since we do not want to open a window where a context
* switch could occur.
*/
_Thread_Disable_dispatch();
_RTEMS_Unlock_allocator();
5821c: 4eb9 0005 2c30 jsr 52c30 <_API_Mutex_Unlock>
58222: 588f addql #4,%sp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
58224: 283c 0005 8948 movel #362824,%d4
5822a: 2f02 movel %d2,%sp@-
5822c: 2044 moveal %d4,%a0
5822e: 4e90 jsr %a0@
if ( the_thread == NULL )
58230: 588f addql #4,%sp
/*
* NOTE: The following loop is O(n) where n is the number of
* threads whose memory request is satisfied.
*/
for ( ; ; ) {
the_thread = _Thread_queue_First( &the_region->Wait_queue );
58232: 2440 moveal %d0,%a2
if ( the_thread == NULL )
58234: 4a80 tstl %d0
58236: 672c beqs 58264 <_Region_Process_queue+0x84>
58238: 42a7 clrl %sp@-
5823a: 42a7 clrl %sp@-
5823c: 2f2a 0024 movel %a2@(36),%sp@-
58240: 2f03 movel %d3,%sp@-
58242: 4e95 jsr %a5@
the_segment = (void **) _Region_Allocate_segment(
the_region,
the_thread->Wait.count
);
if ( the_segment == NULL )
58244: 4fef 0010 lea %sp@(16),%sp
58248: 4a80 tstl %d0
5824a: 6718 beqs 58264 <_Region_Process_queue+0x84>
break;
*(void **)the_thread->Wait.return_argument = the_segment;
5824c: 206a 0028 moveal %a2@(40),%a0
58250: 2080 movel %d0,%a0@
the_region->number_of_used_blocks += 1;
58252: 52ab 0064 addql #1,%a3@(100)
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
58256: 2f0a movel %a2,%sp@-
58258: 2f02 movel %d2,%sp@-
5825a: 4e94 jsr %a4@
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
5825c: 508f addql #8,%sp
break;
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
5825e: 42aa 0034 clrl %a2@(52)
}
58262: 60c6 bras 5822a <_Region_Process_queue+0x4a>
_Thread_Enable_dispatch();
}
58264: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
5826a: 4e5e unlk %fp
*(void **)the_thread->Wait.return_argument = the_segment;
the_region->number_of_used_blocks += 1;
_Thread_queue_Extract( &the_region->Wait_queue, the_thread );
the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5826c: 4ef9 0005 4e6a jmp 54e6a <_Thread_Enable_dispatch>
...
00046178 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46178: 4e56 0000 linkw %fp,#0
4617c: 206e 0008 moveal %fp@(8),%a0
46180: 2f03 movel %d3,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
46182: 2039 0005 e350 movel 5e350 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
46188: 2f02 movel %d2,%sp@-
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
4618a: 4a88 tstl %a0
4618c: 6762 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
4618e: 243c 000f 4240 movel #1000000,%d2
46194: 4c40 2002 remul %d0,%d2,%d2
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
46198: b4a8 0018 cmpl %a0@(24),%d2
4619c: 6352 blss 461f0 <_TOD_Validate+0x78>
(the_tod->ticks >= ticks_per_second) ||
4619e: 763b moveq #59,%d3
461a0: b6a8 0014 cmpl %a0@(20),%d3
461a4: 654a bcss 461f0 <_TOD_Validate+0x78>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
461a6: b6a8 0010 cmpl %a0@(16),%d3
461aa: 6544 bcss 461f0 <_TOD_Validate+0x78>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
461ac: 7017 moveq #23,%d0
461ae: b0a8 000c cmpl %a0@(12),%d0
461b2: 653c bcss 461f0 <_TOD_Validate+0x78>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
461b4: 2028 0004 movel %a0@(4),%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
461b8: 6736 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->month == 0) ||
461ba: 720c moveq #12,%d1
461bc: b280 cmpl %d0,%d1
461be: 6530 bcss 461f0 <_TOD_Validate+0x78>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
461c0: 2410 movel %a0@,%d2
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
461c2: 0c82 0000 07c3 cmpil #1987,%d2
461c8: 6326 blss 461f0 <_TOD_Validate+0x78>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
461ca: 2228 0008 movel %a0@(8),%d1
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
461ce: 6720 beqs 461f0 <_TOD_Validate+0x78> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
461d0: 163c 0003 moveb #3,%d3
461d4: 41f9 0005 d2fa lea 5d2fa <_TOD_Days_per_month>,%a0
461da: c483 andl %d3,%d2
461dc: 6606 bnes 461e4 <_TOD_Validate+0x6c>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
461de: 2030 0c34 movel %a0@(00000034,%d0:l:4),%d0
461e2: 6004 bras 461e8 <_TOD_Validate+0x70>
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
461e4: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
461e8: b081 cmpl %d1,%d0
461ea: 54c0 scc %d0
461ec: 4480 negl %d0
461ee: 6002 bras 461f2 <_TOD_Validate+0x7a>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
461f0: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
461f2: 241f movel %sp@+,%d2
461f4: 261f movel %sp@+,%d3
461f6: 4e5e unlk %fp
...
000471b0 <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
471b0: 4e56 fff0 linkw %fp,#-16
471b4: 48d7 041c moveml %d2-%d4/%a2,%sp@
471b8: 246e 0008 moveal %fp@(8),%a2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
471bc: 242a 0010 movel %a2@(16),%d2
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
471c0: 262e 000c movel %fp@(12),%d3
/*
* 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 );
471c4: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
471c6: 182e 0013 moveb %fp@(19),%d4
/*
* Set a transient state for the thread so it is pulled off the Ready chains.
* This will prevent it from being scheduled no matter what happens in an
* ISR.
*/
_Thread_Set_transient( the_thread );
471ca: 4eb9 0004 7fbc jsr 47fbc <_Thread_Set_transient>
/*
* Do not bother recomputing all the priority related information if
* we are not REALLY changing priority.
*/
if ( the_thread->current_priority != new_priority )
471d0: 588f addql #4,%sp
471d2: b6aa 0014 cmpl %a2@(20),%d3
471d6: 670c beqs 471e4 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
471d8: 2f03 movel %d3,%sp@-
471da: 2f0a movel %a2,%sp@-
471dc: 4eb9 0004 7e64 jsr 47e64 <_Thread_Set_priority>
471e2: 508f addql #8,%sp
_ISR_Disable( level );
471e4: 223c 0000 0700 movel #1792,%d1
471ea: 40c0 movew %sr,%d0
471ec: 8280 orl %d0,%d1
471ee: 46c1 movew %d1,%sr
471f0: 7604 moveq #4,%d3
/*
* If the thread has more than STATES_TRANSIENT set, then it is blocked,
* If it is blocked on a thread queue, then we need to requeue it.
*/
state = the_thread->current_state;
471f2: 222a 0010 movel %a2@(16),%d1
471f6: c483 andl %d3,%d2
if ( state != STATES_TRANSIENT ) {
471f8: b681 cmpl %d1,%d3
471fa: 6730 beqs 4722c <_Thread_Change_priority+0x7c>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
471fc: 4a82 tstl %d2
471fe: 6608 bnes 47208 <_Thread_Change_priority+0x58> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
47200: 74fb moveq #-5,%d2
47202: c481 andl %d1,%d2
47204: 2542 0010 movel %d2,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
47208: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4720a: 0281 0003 bee0 andil #245472,%d1
if ( _States_Is_waiting_on_thread_queue( state ) ) {
47210: 6700 00d2 beqw 472e4 <_Thread_Change_priority+0x134>
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
47214: 2d4a 000c movel %a2,%fp@(12)
47218: 2d6a 0044 0008 movel %a2@(68),%fp@(8)
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4721e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
47224: 4e5e unlk %fp
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
if ( _States_Is_waiting_on_thread_queue( state ) ) {
_Thread_queue_Requeue( the_thread->Wait.queue, the_thread );
47226: 4ef9 0004 7dc8 jmp 47dc8 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4722c: 4a82 tstl %d2
4722e: 6650 bnes 47280 <_Thread_Change_priority+0xd0> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
47230: 206a 008e moveal %a2@(142),%a0
47234: 322a 0094 movew %a2@(148),%d1
47238: 3410 movew %a0@,%d2
* 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 );
4723a: 42aa 0010 clrl %a2@(16)
4723e: 8282 orl %d2,%d1
47240: 3081 movew %d1,%a0@
47242: 206a 008a moveal %a2@(138),%a0
_Priority_Major_bit_map |= the_priority_map->ready_major;
47246: 3239 0005 d9ec movew 5d9ec <_Priority_Major_bit_map>,%d1
4724c: 342a 0092 movew %a2@(146),%d2
47250: 8282 orl %d2,%d1
47252: 33c1 0005 d9ec movew %d1,5d9ec <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
47258: 4a04 tstb %d4
4725a: 6710 beqs 4726c <_Thread_Change_priority+0xbc>
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
4725c: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
4725e: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next;
after_node->next = the_node;
47262: 208a movel %a2,%a0@
the_node->next = before_node;
before_node->previous = the_node;
47264: 234a 0004 movel %a2,%a1@(4)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
47268: 2489 movel %a1,%a2@
4726a: 6014 bras 47280 <_Thread_Change_priority+0xd0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4726c: 2608 movel %a0,%d3
4726e: 5883 addql #4,%d3
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
47270: 2268 0008 moveal %a0@(8),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
47274: 2483 movel %d3,%a2@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
47276: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node;
4727a: 228a movel %a2,%a1@
the_node->previous = old_last_node;
4727c: 2549 0004 movel %a1,%a2@(4)
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
47280: 223c 0000 0700 movel #1792,%d1
47286: 46c0 movew %d0,%sr
47288: 8280 orl %d0,%d1
4728a: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE Priority_Control _Priority_Get_highest( void )
{
Priority_Bit_map_control minor;
Priority_Bit_map_control major;
_Bitfield_Find_first_bit( _Priority_Major_bit_map, major );
4728c: 3239 0005 d9ec movew 5d9ec <_Priority_Major_bit_map>,%d1
47292: 4841 swap %d1
47294: 04c1 ff1 %d1
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
47296: 4282 clrl %d2
47298: 41f9 0005 da54 lea 5da54 <_Priority_Bit_map>,%a0
4729e: 3401 movew %d1,%d2
472a0: 3230 2a00 movew %a0@(00000000,%d2:l:2),%d1
472a4: 4841 swap %d1
472a6: 04c1 ff1 %d1
return (_Priority_Bits_index( major ) << 4) +
472a8: 4283 clrl %d3
472aa: e98a lsll #4,%d2
472ac: 3601 movew %d1,%d3
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
472ae: 2079 0005 d900 moveal 5d900 <_Thread_Ready_chain>,%a0
472b4: 2202 movel %d2,%d1
472b6: d283 addl %d3,%d1
472b8: 2401 movel %d1,%d2
472ba: e58a lsll #2,%d2
472bc: e989 lsll #4,%d1
472be: 91c2 subal %d2,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
472c0: 2230 1800 movel %a0@(00000000,%d1:l),%d1
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
472c4: 2079 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
472ca: 23c1 0005 dde0 movel %d1,5dde0 <_Per_CPU_Information+0x10>
* 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() &&
472d0: b288 cmpl %a0,%d1
472d2: 670e beqs 472e2 <_Thread_Change_priority+0x132>
472d4: 4a28 0074 tstb %a0@(116)
472d8: 6708 beqs 472e2 <_Thread_Change_priority+0x132>
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
472da: 7201 moveq #1,%d1
472dc: 13c1 0005 dde8 moveb %d1,5dde8 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
472e2: 46c0 movew %d0,%sr
}
472e4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
472ea: 4e5e unlk %fp
...
000472f0 <_Thread_Clear_state>:
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
472f0: 4e56 fff0 linkw %fp,#-16
472f4: 206e 0008 moveal %fp@(8),%a0
472f8: 48d7 041c moveml %d2-%d4/%a2,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
472fc: 263c 0000 0700 movel #1792,%d3
47302: 2203 movel %d3,%d1
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
47304: 202e 000c movel %fp@(12),%d0
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
47308: 40c2 movew %sr,%d2
4730a: 8282 orl %d2,%d1
4730c: 46c1 movew %d1,%sr
current_state = the_thread->current_state;
4730e: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
47312: 2800 movel %d0,%d4
47314: c881 andl %d1,%d4
47316: 6778 beqs 47390 <_Thread_Clear_state+0xa0>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
47318: 4680 notl %d0
4731a: c081 andl %d1,%d0
current_state =
the_thread->current_state = _States_Clear( state, current_state );
4731c: 2140 0010 movel %d0,%a0@(16)
if ( _States_Is_ready( current_state ) ) {
47320: 666e bnes 47390 <_Thread_Clear_state+0xa0>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
47322: 2268 008e moveal %a0@(142),%a1
47326: 3028 0094 movew %a0@(148),%d0
4732a: 3211 movew %a1@,%d1
4732c: 8081 orl %d1,%d0
4732e: 3280 movew %d0,%a1@
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
47330: 2268 008a moveal %a0@(138),%a1
_Priority_Major_bit_map |= the_priority_map->ready_major;
47334: 3039 0005 d9ec movew 5d9ec <_Priority_Major_bit_map>,%d0
4733a: 3228 0092 movew %a0@(146),%d1
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4733e: 2469 0008 moveal %a1@(8),%a2
47342: 8081 orl %d1,%d0
47344: 33c0 0005 d9ec movew %d0,5d9ec <_Priority_Major_bit_map>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4734a: 2009 movel %a1,%d0
4734c: 5880 addql #4,%d0
4734e: 2080 movel %d0,%a0@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
47350: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node;
47354: 2488 movel %a0,%a2@
the_node->previous = old_last_node;
47356: 214a 0004 movel %a2,%a0@(4)
_ISR_Flash( level );
4735a: 2003 movel %d3,%d0
4735c: 46c2 movew %d2,%sr
4735e: 8082 orl %d2,%d0
47360: 46c0 movew %d0,%sr
* a context switch.
* Pseudo-ISR case:
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
47362: 2028 0014 movel %a0@(20),%d0
47366: 2279 0005 dde0 moveal 5dde0 <_Per_CPU_Information+0x10>,%a1
4736c: b0a9 0014 cmpl %a1@(20),%d0
47370: 641e bccs 47390 <_Thread_Clear_state+0xa0>
_Thread_Heir = the_thread;
47372: 23c8 0005 dde0 movel %a0,5dde0 <_Per_CPU_Information+0x10>
if ( _Thread_Executing->is_preemptible ||
47378: 2079 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a0
4737e: 4a28 0074 tstb %a0@(116)
47382: 6604 bnes 47388 <_Thread_Clear_state+0x98>
47384: 4a80 tstl %d0
47386: 6608 bnes 47390 <_Thread_Clear_state+0xa0> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
47388: 7001 moveq #1,%d0
4738a: 13c0 0005 dde8 moveb %d0,5dde8 <_Per_CPU_Information+0x18>
}
}
}
_ISR_Enable( level );
47390: 46c2 movew %d2,%sr
}
47392: 4cd7 041c moveml %sp@,%d2-%d4/%a2
47396: 4e5e unlk %fp
...
0004751c <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
4751c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
47520: 486e fffc pea %fp@(-4)
47524: 2f2e 0008 movel %fp@(8),%sp@-
47528: 4eb9 0004 76bc jsr 476bc <_Thread_Get>
switch ( location ) {
4752e: 508f addql #8,%sp
47530: 4aae fffc tstl %fp@(-4)
47534: 661e bnes 47554 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
47536: 2f3c 1000 0018 movel #268435480,%sp@-
4753c: 2f00 movel %d0,%sp@-
4753e: 4eb9 0004 72f0 jsr 472f0 <_Thread_Clear_state>
47544: 508f addql #8,%sp
47546: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
4754c: 5380 subql #1,%d0
4754e: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
47554: 4e5e unlk %fp <== NOT EXECUTED
00047558 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
47558: 4e56 ffc8 linkw %fp,#-56
4755c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
47560: 283c 0000 0700 movel #1792,%d4
47566: 2204 movel %d4,%d1
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
47568: 2479 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
4756e: 40c0 movew %sr,%d0
47570: 8280 orl %d0,%d1
47572: 46c1 movew %d1,%sr
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
47574: 260e movel %fp,%d3
_Timestamp_Subtract(
47576: 240e movel %fp,%d2
_ISR_Enable( level );
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
47578: 5183 subql #8,%d3
_Timestamp_Subtract(
4757a: 0682 ffff fff0 addil #-16,%d2
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
47580: 2e3c 0004 8328 movel #295720,%d7
if ( _Thread_libc_reent ) {
executing->libc_reent = *_Thread_libc_reent;
*_Thread_libc_reent = heir->libc_reent;
}
_User_extensions_Thread_switch( executing, heir );
47586: 2c3c 0004 85dc movel #296412,%d6
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
4758c: 2a3c 0004 88f0 movel #297200,%d5
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
_Context_Restore_fp( &executing->fp_context );
47592: 4bf9 0004 8a58 lea 48a58 <_CPU_Context_restore_fp>,%a5
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
47598: 49f9 0004 8a36 lea 48a36 <_CPU_Context_save_fp>,%a4
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
4759e: 6000 00d4 braw 47674 <_Thread_Dispatch+0x11c>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
475a2: 7201 moveq #1,%d1
475a4: 23c1 0005 d94c movel %d1,5d94c <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
475aa: 2679 0005 dde0 moveal 5dde0 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
475b0: 4201 clrb %d1
_Thread_Executing = heir;
475b2: 23cb 0005 dddc movel %a3,5dddc <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
475b8: 13c1 0005 dde8 moveb %d1,5dde8 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
475be: b5cb cmpal %a3,%a2
475c0: 6700 00bc beqw 4767e <_Thread_Dispatch+0x126>
*/
#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 )
475c4: 7201 moveq #1,%d1
475c6: b2ab 007a cmpl %a3@(122),%d1
475ca: 660a bnes 475d6 <_Thread_Dispatch+0x7e>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
475cc: 41f9 0005 d904 lea 5d904 <_Thread_Ticks_per_timeslice>,%a0
475d2: 2750 0076 movel %a0@,%a3@(118)
_ISR_Enable( level );
475d6: 46c0 movew %d0,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
475d8: 2f03 movel %d3,%sp@-
475da: 4eb9 0004 ab7c jsr 4ab7c <_TOD_Get_uptime>
_Timestamp_Subtract(
475e0: 2f02 movel %d2,%sp@-
475e2: 2f03 movel %d3,%sp@-
475e4: 4879 0005 d9fa pea 5d9fa <_Thread_Time_of_last_context_switch>
475ea: 4eb9 0004 8360 jsr 48360 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
475f0: 2047 moveal %d7,%a0
475f2: 2f02 movel %d2,%sp@-
475f4: 486a 0082 pea %a2@(130)
475f8: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
475fa: 2079 0005 d9d2 moveal 5d9d2 <_Thread_libc_reent>,%a0
47600: 4fef 0018 lea %sp@(24),%sp
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
_Thread_Time_of_last_context_switch = uptime;
47604: 202e fff8 movel %fp@(-8),%d0
47608: 222e fffc movel %fp@(-4),%d1
4760c: 23c0 0005 d9fa movel %d0,5d9fa <_Thread_Time_of_last_context_switch>
47612: 23c1 0005 d9fe movel %d1,5d9fe <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
47618: 4a88 tstl %a0
4761a: 6708 beqs 47624 <_Thread_Dispatch+0xcc> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
4761c: 2550 0106 movel %a0@,%a2@(262)
*_Thread_libc_reent = heir->libc_reent;
47620: 20ab 0106 movel %a3@(262),%a0@
}
_User_extensions_Thread_switch( executing, heir );
47624: 2f0b movel %a3,%sp@-
47626: 2046 moveal %d6,%a0
47628: 2f0a movel %a2,%sp@-
4762a: 4e90 jsr %a0@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
4762c: 486b 00ce pea %a3@(206)
47630: 2045 moveal %d5,%a0
47632: 486a 00ce pea %a2@(206)
47636: 4e90 jsr %a0@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
47638: 4fef 0010 lea %sp@(16),%sp
4763c: 4aaa 0102 tstl %a2@(258)
47640: 6724 beqs 47666 <_Thread_Dispatch+0x10e>
#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 );
47642: 2079 0005 d9ce moveal 5d9ce <_Thread_Allocated_fp>,%a0
47648: b1ca cmpal %a2,%a0
4764a: 671a beqs 47666 <_Thread_Dispatch+0x10e>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4764c: 4a88 tstl %a0
4764e: 6708 beqs 47658 <_Thread_Dispatch+0x100>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
47650: 4868 0102 pea %a0@(258)
47654: 4e94 jsr %a4@
47656: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
47658: 486a 0102 pea %a2@(258)
4765c: 4e95 jsr %a5@
_Thread_Allocated_fp = executing;
4765e: 588f addql #4,%sp
47660: 23ca 0005 d9ce movel %a2,5d9ce <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
47666: 2479 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
4766c: 2204 movel %d4,%d1
4766e: 40c0 movew %sr,%d0
47670: 8280 orl %d0,%d1
47672: 46c1 movew %d1,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
47674: 1239 0005 dde8 moveb 5dde8 <_Per_CPU_Information+0x18>,%d1
4767a: 6600 ff26 bnew 475a2 <_Thread_Dispatch+0x4a>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
4767e: 42b9 0005 d94c clrl 5d94c <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
47684: 46c0 movew %d0,%sr
_API_extensions_Run_postswitch();
47686: 4eb9 0004 5fe4 jsr 45fe4 <_API_extensions_Run_postswitch>
}
4768c: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5
47692: 4e5e unlk %fp <== NOT EXECUTED
000476bc <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
476bc: 4e56 0000 linkw %fp,#0
476c0: 202e 0008 movel %fp@(8),%d0
476c4: 2f03 movel %d3,%sp@-
476c6: 206e 000c moveal %fp@(12),%a0
476ca: 2f02 movel %d2,%sp@-
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
476cc: 4a80 tstl %d0
476ce: 6618 bnes 476e8 <_Thread_Get+0x2c>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
476d0: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
476d6: 5280 addql #1,%d0
476d8: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
476de: 4290 clrl %a0@
tp = _Thread_Executing;
476e0: 2039 0005 dddc movel 5dddc <_Per_CPU_Information+0xc>,%d0
goto done;
476e6: 6044 bras 4772c <_Thread_Get+0x70>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
476e8: 7418 moveq #24,%d2
476ea: 2200 movel %d0,%d1
476ec: e4a9 lsrl %d2,%d1
476ee: 7607 moveq #7,%d3
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
476f0: 143c 0002 moveb #2,%d2
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
476f4: c283 andl %d3,%d1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
476f6: 2241 moveal %d1,%a1
476f8: 5389 subql #1,%a1
476fa: b489 cmpl %a1,%d2
476fc: 643a bccs 47738 <_Thread_Get+0x7c>
476fe: 6014 bras 47714 <_Thread_Get+0x58>
if ( the_class != 1 ) { /* threads are always first class :) */
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
47700: 43f9 0005 d908 lea 5d908 <_Objects_Information_table>,%a1
47706: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1
if ( !api_information ) {
4770a: 4a89 tstl %a1
4770c: 6706 beqs 47714 <_Thread_Get+0x58> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
4770e: 2229 0004 movel %a1@(4),%d1
if ( !information ) {
47712: 6608 bnes 4771c <_Thread_Get+0x60>
*location = OBJECTS_ERROR;
47714: 7001 moveq #1,%d0
47716: 2080 movel %d0,%a0@
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
47718: 4280 clrl %d0
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
goto done;
4771a: 6010 bras 4772c <_Thread_Get+0x70>
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
4771c: 2f08 movel %a0,%sp@-
4771e: 2f00 movel %d0,%sp@-
47720: 2f01 movel %d1,%sp@-
47722: 4eb9 0004 6e34 jsr 46e34 <_Objects_Get>
47728: 4fef 000c lea %sp@(12),%sp
done:
return tp;
}
4772c: 242e fff8 movel %fp@(-8),%d2
47730: 262e fffc movel %fp@(-4),%d3
47734: 4e5e unlk %fp
47736: 4e75 rts
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
47738: 761b moveq #27,%d3
4773a: 2400 movel %d0,%d2
4773c: e6aa lsrl %d3,%d2
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
4773e: 163c 0001 moveb #1,%d3
47742: b682 cmpl %d2,%d3
47744: 67ba beqs 47700 <_Thread_Get+0x44>
47746: 60cc bras 47714 <_Thread_Get+0x58>
0004c86c <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4c86c: 4e56 0000 linkw %fp,#0
4c870: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4c872: 2479 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4c878: 2f02 movel %d2,%sp@-
/*
* have to put level into a register for those cpu's that use
* inline asm here
*/
level = executing->Start.isr_level;
4c87a: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4c87e: 40c0 movew %sr,%d0
4c880: e189 lsll #8,%d1
4c882: 0280 0000 f8ff andil #63743,%d0
4c888: 8081 orl %d1,%d0
4c88a: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4c88c: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4c88e: 1439 0005 d108 moveb 5d108 <doneConstructors.3256>,%d2
doneConstructors = 1;
4c894: 13c0 0005 d108 moveb %d0,5d108 <doneConstructors.3256>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4c89a: 4aaa 0102 tstl %a2@(258)
4c89e: 6720 beqs 4c8c0 <_Thread_Handler+0x54>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE bool _Thread_Is_allocated_fp (
const Thread_Control *the_thread
)
{
return ( the_thread == _Thread_Allocated_fp );
4c8a0: 2079 0005 d9ce moveal 5d9ce <_Thread_Allocated_fp>,%a0
4c8a6: b1ca cmpal %a2,%a0
4c8a8: 6716 beqs 4c8c0 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4c8aa: 4a88 tstl %a0
4c8ac: 670c beqs 4c8ba <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4c8ae: 4868 0102 pea %a0@(258)
4c8b2: 4eb9 0004 8a36 jsr 48a36 <_CPU_Context_save_fp>
4c8b8: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4c8ba: 23ca 0005 d9ce movel %a2,5d9ce <_Thread_Allocated_fp>
/*
* Take care that 'begin' extensions get to complete before
* 'switch' extensions can run. This means must keep dispatch
* disabled until all 'begin' extensions complete.
*/
_User_extensions_Thread_begin( executing );
4c8c0: 2f0a movel %a2,%sp@-
4c8c2: 4eb9 0004 8458 jsr 48458 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4c8c8: 4eb9 0004 7696 jsr 47696 <_Thread_Enable_dispatch>
/*
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
4c8ce: 588f addql #4,%sp
4c8d0: 4a02 tstb %d2
4c8d2: 6606 bnes 4c8da <_Thread_Handler+0x6e>
INIT_NAME ();
4c8d4: 4eb9 0005 a6b0 jsr 5a6b0 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4c8da: 202a 009e movel %a2@(158),%d0
4c8de: 6606 bnes 4c8e6 <_Thread_Handler+0x7a>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4c8e0: 2f2a 00a6 movel %a2@(166),%sp@-
4c8e4: 600a bras 4c8f0 <_Thread_Handler+0x84>
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
4c8e6: 7201 moveq #1,%d1
4c8e8: b280 cmpl %d0,%d1
4c8ea: 6610 bnes 4c8fc <_Thread_Handler+0x90> <== NEVER TAKEN
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
4c8ec: 2f2a 00a2 movel %a2@(162),%sp@-
4c8f0: 206a 009a moveal %a2@(154),%a0
4c8f4: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
4c8f6: 588f addql #4,%sp
4c8f8: 2540 0028 movel %d0,%a2@(40)
* was placed in return_argument. This assumed that if it returned
* anything (which is not supporting in all APIs), then it would be
* able to fit in a (void *).
*/
_User_extensions_Thread_exitted( executing );
4c8fc: 2f0a movel %a2,%sp@-
4c8fe: 4eb9 0004 8490 jsr 48490 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4c904: 4878 0005 pea 5 <COMPARE>
4c908: 4878 0001 pea 1 <ADD>
4c90c: 42a7 clrl %sp@-
4c90e: 4eb9 0004 6928 jsr 46928 <_Internal_error_Occurred>
0004861c <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
4861c: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4861e: 4e56 0000 linkw %fp,#0
48622: 2f0a movel %a2,%sp@-
48624: 246e 0008 moveal %fp@(8),%a2
48628: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
4862c: 6664 bnes 48692 <_Thread_Restart+0x76>
_Thread_Set_transient( the_thread );
4862e: 2f0a movel %a2,%sp@-
48630: 4eb9 0004 87f8 jsr 487f8 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
48636: 2f2e 0010 movel %fp@(16),%sp@-
4863a: 2f2e 000c movel %fp@(12),%sp@-
4863e: 2f0a movel %a2,%sp@-
48640: 4eb9 0004 babc jsr 4babc <_Thread_Reset>
_Thread_Load_environment( the_thread );
48646: 2f0a movel %a2,%sp@-
48648: 4eb9 0004 b768 jsr 4b768 <_Thread_Load_environment>
_Thread_Ready( the_thread );
4864e: 2f0a movel %a2,%sp@-
48650: 4eb9 0004 b9fc jsr 4b9fc <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
48656: 2f0a movel %a2,%sp@-
48658: 4eb9 0004 8dd8 jsr 48dd8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
4865e: 4fef 001c lea %sp@(28),%sp
48662: b5f9 0005 e914 cmpal 5e914 <_Per_CPU_Information+0xc>,%a2
48668: 662c bnes 48696 <_Thread_Restart+0x7a>
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
4866a: 4aaa 0102 tstl %a2@(258)
4866e: 670c beqs 4867c <_Thread_Restart+0x60>
_Context_Restore_fp( &_Thread_Executing->fp_context );
48670: 486a 0102 pea %a2@(258)
48674: 4eb9 0004 92d4 jsr 492d4 <_CPU_Context_restore_fp>
4867a: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
4867c: 2079 0005 e914 moveal 5e914 <_Per_CPU_Information+0xc>,%a0
48682: 41e8 00ce lea %a0@(206),%a0
48686: 2f08 movel %a0,%sp@-
48688: 4eb9 0004 9182 jsr 49182 <_CPU_Context_Restart_self>
4868e: 588f addql #4,%sp <== NOT EXECUTED
48690: 6004 bras 48696 <_Thread_Restart+0x7a> <== NOT EXECUTED
_Thread_Restart_self();
return true;
}
return false;
48692: 4200 clrb %d0
48694: 6002 bras 48698 <_Thread_Restart+0x7c>
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
48696: 7001 moveq #1,%d0
}
return false;
}
48698: 246e fffc moveal %fp@(-4),%a2
4869c: 4e5e unlk %fp <== NOT EXECUTED
0004ac94 <_Thread_Resume>:
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4ac94: 4e56 fff4 linkw %fp,#-12
4ac98: 206e 0008 moveal %fp@(8),%a0
4ac9c: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4aca0: 243c 0000 0700 movel #1792,%d2
4aca6: 2002 movel %d2,%d0
4aca8: 40c1 movew %sr,%d1
4acaa: 8081 orl %d1,%d0
4acac: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
4acae: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4acb2: 0800 0001 btst #1,%d0
4acb6: 6778 beqs 4ad30 <_Thread_Resume+0x9c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4acb8: 76fd moveq #-3,%d3
4acba: c083 andl %d3,%d0
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
4acbc: 2140 0010 movel %d0,%a0@(16)
if ( _States_Is_ready( current_state ) ) {
4acc0: 666e bnes 4ad30 <_Thread_Resume+0x9c>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4acc2: 2268 008e moveal %a0@(142),%a1
4acc6: 3028 0094 movew %a0@(148),%d0
4acca: 3611 movew %a1@,%d3
4accc: 8083 orl %d3,%d0
4acce: 3280 movew %d0,%a1@
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4acd0: 2268 008a moveal %a0@(138),%a1
_Priority_Major_bit_map |= the_priority_map->ready_major;
4acd4: 3039 0006 0e34 movew 60e34 <_Priority_Major_bit_map>,%d0
4acda: 3628 0092 movew %a0@(146),%d3
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4acde: 2469 0008 moveal %a1@(8),%a2
4ace2: 8083 orl %d3,%d0
4ace4: 33c0 0006 0e34 movew %d0,60e34 <_Priority_Major_bit_map>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4acea: 2009 movel %a1,%d0
4acec: 5880 addql #4,%d0
4acee: 2080 movel %d0,%a0@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
4acf0: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node;
4acf4: 2488 movel %a0,%a2@
the_node->previous = old_last_node;
4acf6: 214a 0004 movel %a2,%a0@(4)
_ISR_Flash( level );
4acfa: 2002 movel %d2,%d0
4acfc: 46c1 movew %d1,%sr
4acfe: 8081 orl %d1,%d0
4ad00: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4ad02: 2028 0014 movel %a0@(20),%d0
4ad06: 2279 0006 1228 moveal 61228 <_Per_CPU_Information+0x10>,%a1
4ad0c: b0a9 0014 cmpl %a1@(20),%d0
4ad10: 641e bccs 4ad30 <_Thread_Resume+0x9c>
_Thread_Heir = the_thread;
4ad12: 23c8 0006 1228 movel %a0,61228 <_Per_CPU_Information+0x10>
if ( _Thread_Executing->is_preemptible ||
4ad18: 2079 0006 1224 moveal 61224 <_Per_CPU_Information+0xc>,%a0
4ad1e: 4a28 0074 tstb %a0@(116)
4ad22: 6604 bnes 4ad28 <_Thread_Resume+0x94>
4ad24: 4a80 tstl %d0
4ad26: 6608 bnes 4ad30 <_Thread_Resume+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4ad28: 7601 moveq #1,%d3
4ad2a: 13c3 0006 1230 moveb %d3,61230 <_Per_CPU_Information+0x18>
}
}
}
_ISR_Enable( level );
4ad30: 46c1 movew %d1,%sr
}
4ad32: 4cd7 040c moveml %sp@,%d2-%d3/%a2
4ad36: 4e5e unlk %fp
...
00048240 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
48240: 4e56 0000 linkw %fp,#0
48244: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
48246: 2479 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
4824c: 4a2a 0074 tstb %a2@(116)
48250: 6756 beqs 482a8 <_Thread_Tickle_timeslice+0x68>
return;
if ( !_States_Is_ready( executing->current_state ) )
48252: 4aaa 0010 tstl %a2@(16)
48256: 6650 bnes 482a8 <_Thread_Tickle_timeslice+0x68>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
48258: 202a 007a movel %a2@(122),%d0
4825c: 7201 moveq #1,%d1
4825e: b280 cmpl %d0,%d1
48260: 6246 bhis 482a8 <_Thread_Tickle_timeslice+0x68>
48262: 123c 0002 moveb #2,%d1
48266: b280 cmpl %d0,%d1
48268: 640a bccs 48274 <_Thread_Tickle_timeslice+0x34>
4826a: 123c 0003 moveb #3,%d1
4826e: b280 cmpl %d0,%d1
48270: 6636 bnes 482a8 <_Thread_Tickle_timeslice+0x68> <== NEVER TAKEN
48272: 601e bras 48292 <_Thread_Tickle_timeslice+0x52>
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
#endif
if ( (int)(--executing->cpu_time_budget) <= 0 ) {
48274: 202a 0076 movel %a2@(118),%d0
48278: 5380 subql #1,%d0
4827a: 2540 0076 movel %d0,%a2@(118)
4827e: 6e28 bgts 482a8 <_Thread_Tickle_timeslice+0x68>
* at the priority of the currently executing thread, then the
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Thread_Yield_processor();
48280: 4eb9 0004 82b0 jsr 482b0 <_Thread_Yield_processor>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
48286: 41f9 0005 d904 lea 5d904 <_Thread_Ticks_per_timeslice>,%a0
4828c: 2550 0076 movel %a0@,%a2@(118)
48290: 6016 bras 482a8 <_Thread_Tickle_timeslice+0x68>
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
48292: 202a 0076 movel %a2@(118),%d0
48296: 5380 subql #1,%d0
48298: 2540 0076 movel %d0,%a2@(118)
4829c: 660a bnes 482a8 <_Thread_Tickle_timeslice+0x68>
(*executing->budget_callout)( executing );
4829e: 2f0a movel %a2,%sp@-
482a0: 206a 007e moveal %a2@(126),%a0
482a4: 4e90 jsr %a0@
482a6: 588f addql #4,%sp
break;
#endif
}
}
482a8: 246e fffc moveal %fp@(-4),%a2
482ac: 4e5e unlk %fp <== NOT EXECUTED
00047160 <_Thread_blocking_operation_Cancel>:
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
47160: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
47162: 4e56 0000 linkw %fp,#0
47166: 202e 0010 movel %fp@(16),%d0
4716a: 2f0a movel %a2,%sp@-
4716c: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
47170: 42aa 0044 clrl %a2@(68)
/*
* If the sync state is timed out, this is very likely not needed.
* But better safe than sorry when it comes to critical sections.
*/
if ( _Watchdog_Is_active( &the_thread->Timer ) ) {
47174: b2aa 0050 cmpl %a2@(80),%d1
47178: 6618 bnes 47192 <_Thread_blocking_operation_Cancel+0x32>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4717a: 123c 0003 moveb #3,%d1
4717e: 2541 0050 movel %d1,%a2@(80)
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
47182: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
47184: 486a 0048 pea %a2@(72)
47188: 4eb9 0004 8730 jsr 48730 <_Watchdog_Remove>
4718e: 588f addql #4,%sp
47190: 6002 bras 47194 <_Thread_blocking_operation_Cancel+0x34>
} else
_ISR_Enable( level );
47192: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47194: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
47198: 246e fffc moveal %fp@(-4),%a2
4719c: 203c 1003 fff8 movel #268697592,%d0
471a2: 2d40 000c movel %d0,%fp@(12)
471a6: 4e5e unlk %fp
471a8: 4ef9 0004 72f0 jmp 472f0 <_Thread_Clear_state>
...
0004c914 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4c914: 223c 0000 0700 movel #1792,%d1
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4c91a: 4e56 0000 linkw %fp,#0
4c91e: 2f0a movel %a2,%sp@-
4c920: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4c924: 40c0 movew %sr,%d0
4c926: 8280 orl %d0,%d1
4c928: 46c1 movew %d1,%sr
4c92a: 222a 0010 movel %a2@(16),%d1
4c92e: 0281 0003 bee0 andil #245472,%d1
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4c934: 660a bnes 4c940 <_Thread_queue_Extract_fifo+0x2c>
_ISR_Enable( level );
4c936: 46c0 movew %d0,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c938: 246e fffc moveal %fp@(-4),%a2
4c93c: 4e5e unlk %fp
4c93e: 4e75 rts
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4c940: 2252 moveal %a2@,%a1
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c942: 7202 moveq #2,%d1
previous = the_node->previous;
4c944: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4c948: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4c94c: 2089 movel %a1,%a0@
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4c94e: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4c952: b2aa 0050 cmpl %a2@(80),%d1
4c956: 6704 beqs 4c95c <_Thread_queue_Extract_fifo+0x48>
_ISR_Enable( level );
4c958: 46c0 movew %d0,%sr
4c95a: 6014 bras 4c970 <_Thread_queue_Extract_fifo+0x5c>
4c95c: 7203 moveq #3,%d1
4c95e: 2541 0050 movel %d1,%a2@(80)
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4c962: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4c964: 486a 0048 pea %a2@(72)
4c968: 4eb9 0004 8730 jsr 48730 <_Watchdog_Remove>
4c96e: 588f addql #4,%sp
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4c970: 2d4a 0008 movel %a2,%fp@(8)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4c974: 246e fffc moveal %fp@(-4),%a2
4c978: 203c 1003 fff8 movel #268697592,%d0
4c97e: 2d40 000c movel %d0,%fp@(12)
4c982: 4e5e unlk %fp
4c984: 4ef9 0004 72f0 jmp 472f0 <_Thread_Clear_state>
...
0004b074 <_Thread_queue_Extract_priority_helper>:
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4b074: 223c 0000 0700 movel #1792,%d1
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4b07a: 4e56 ffec linkw %fp,#-20
4b07e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
4b082: 246e 000c moveal %fp@(12),%a2
4b086: 142e 0013 moveb %fp@(19),%d2
Chain_Node *new_first_node;
Chain_Node *new_second_node;
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
4b08a: 40c0 movew %sr,%d0
4b08c: 8280 orl %d0,%d1
4b08e: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4b090: 222a 0010 movel %a2@(16),%d1
4b094: 0281 0003 bee0 andil #245472,%d1
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4b09a: 6606 bnes 4b0a2 <_Thread_queue_Extract_priority_helper+0x2e>
_ISR_Enable( level );
4b09c: 46c0 movew %d0,%sr
return;
4b09e: 6000 0090 braw 4b130 <_Thread_queue_Extract_priority_helper+0xbc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4b0a2: 220a movel %a2,%d1
4b0a4: 0681 0000 003c addil #60,%d1
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4b0aa: 2252 moveal %a2@,%a1
previous_node = the_node->previous;
4b0ac: 266a 0004 moveal %a2@(4),%a3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b0b0: 206a 0038 moveal %a2@(56),%a0
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4b0b4: b288 cmpl %a0,%d1
4b0b6: 672e beqs 4b0e6 <_Thread_queue_Extract_priority_helper+0x72>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
4b0b8: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4b0bc: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4b0be: 2348 0004 movel %a0,%a1@(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;
4b0c2: 2688 movel %a0,%a3@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4b0c4: 214b 0004 movel %a3,%a0@(4)
last_node = the_thread->Wait.Block2n.last;
new_second_node = new_first_node->next;
previous_node->next = new_first_node;
next_node->previous = new_first_node;
new_first_node->next = next_node;
4b0c8: 2089 movel %a1,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4b0ca: b9c8 cmpal %a0,%a4
4b0cc: 671e beqs 4b0ec <_Thread_queue_Extract_priority_helper+0x78>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
4b0ce: 43e8 0038 lea %a0@(56),%a1
4b0d2: 2b49 0004 movel %a1,%a5@(4)
new_first_thread->Wait.Block2n.first = new_second_node;
4b0d6: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4b0da: 214c 0040 movel %a4,%a0@(64)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4b0de: 41e8 003c lea %a0@(60),%a0
4b0e2: 2888 movel %a0,%a4@
4b0e4: 6006 bras 4b0ec <_Thread_queue_Extract_priority_helper+0x78>
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
4b0e6: 2689 movel %a1,%a3@
next_node->previous = previous_node;
4b0e8: 234b 0004 movel %a3,%a1@(4)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4b0ec: 4a02 tstb %d2
4b0ee: 6704 beqs 4b0f4 <_Thread_queue_Extract_priority_helper+0x80>
_ISR_Enable( level );
4b0f0: 46c0 movew %d0,%sr
4b0f2: 603c bras 4b130 <_Thread_queue_Extract_priority_helper+0xbc>
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4b0f4: 7202 moveq #2,%d1
4b0f6: b2aa 0050 cmpl %a2@(80),%d1
4b0fa: 6704 beqs 4b100 <_Thread_queue_Extract_priority_helper+0x8c><== NEVER TAKEN
_ISR_Enable( level );
4b0fc: 46c0 movew %d0,%sr
4b0fe: 6014 bras 4b114 <_Thread_queue_Extract_priority_helper+0xa0>
4b100: 7203 moveq #3,%d1 <== NOT EXECUTED
4b102: 2541 0050 movel %d1,%a2@(80) <== NOT EXECUTED
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4b106: 46c0 movew %d0,%sr <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
4b108: 486a 0048 pea %a2@(72) <== NOT EXECUTED
4b10c: 4eb9 0004 8730 jsr 48730 <_Watchdog_Remove> <== NOT EXECUTED
4b112: 588f addql #4,%sp <== NOT EXECUTED
4b114: 2d4a 0008 movel %a2,%fp@(8)
4b118: 227c 1003 fff8 moveal #268697592,%a1
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4b11e: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4b124: 2d49 000c movel %a1,%fp@(12)
4b128: 4e5e unlk %fp
4b12a: 4ef9 0004 72f0 jmp 472f0 <_Thread_Clear_state>
4b130: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
4b136: 4e5e unlk %fp
...
0004b13c <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4b13c: 4e56 0000 linkw %fp,#0
4b140: 226e 0008 moveal %fp@(8),%a1
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4b144: 2069 0044 moveal %a1@(68),%a0
* 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 &&
4b148: 2028 0030 movel %a0@(48),%d0
4b14c: 671c beqs 4b16a <_Thread_queue_Process_timeout+0x2e>
4b14e: b3f9 0005 dddc cmpal 5dddc <_Per_CPU_Information+0xc>,%a1
4b154: 6614 bnes 4b16a <_Thread_queue_Process_timeout+0x2e><== NEVER TAKEN
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4b156: 7203 moveq #3,%d1
4b158: b280 cmpl %d0,%d1
4b15a: 6720 beqs 4b17c <_Thread_queue_Process_timeout+0x40>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4b15c: 7002 moveq #2,%d0
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4b15e: 2368 003c 0034 movel %a0@(60),%a1@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4b164: 2140 0030 movel %d0,%a0@(48)
4b168: 6012 bras 4b17c <_Thread_queue_Process_timeout+0x40>
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4b16a: 2368 003c 0034 movel %a0@(60),%a1@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4b170: 2f09 movel %a1,%sp@-
4b172: 2f08 movel %a0,%sp@-
4b174: 4eb9 0004 b03c jsr 4b03c <_Thread_queue_Extract>
4b17a: 508f addql #8,%sp
}
}
4b17c: 4e5e unlk %fp <== NOT EXECUTED
00047dc8 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
47dc8: 4e56 fff0 linkw %fp,#-16
47dcc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
47dd0: 246e 0008 moveal %fp@(8),%a2
47dd4: 266e 000c moveal %fp@(12),%a3
/*
* Just in case the thread really wasn't blocked on a thread queue
* when we get here.
*/
if ( !the_thread_queue )
47dd8: 4a8a tstl %a2
47dda: 6746 beqs 47e22 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN
/*
* If queueing by FIFO, there is nothing to do. This only applies to
* priority blocking discipline.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
47ddc: 7001 moveq #1,%d0
47dde: b0aa 0034 cmpl %a2@(52),%d0
47de2: 663e bnes 47e22 <_Thread_queue_Requeue+0x5a> <== NEVER TAKEN
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
47de4: 303c 0700 movew #1792,%d0
47de8: 40c2 movew %sr,%d2
47dea: 8082 orl %d2,%d0
47dec: 46c0 movew %d0,%sr
47dee: 202b 0010 movel %a3@(16),%d0
47df2: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
47df8: 6726 beqs 47e20 <_Thread_queue_Requeue+0x58> <== NEVER TAKEN
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;
47dfa: 7001 moveq #1,%d0
47dfc: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
47e00: 4878 0001 pea 1 <ADD>
47e04: 2f0b movel %a3,%sp@-
47e06: 2f0a movel %a2,%sp@-
47e08: 4eb9 0004 b074 jsr 4b074 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
47e0e: 486e fffc pea %fp@(-4)
47e12: 2f0b movel %a3,%sp@-
47e14: 2f0a movel %a2,%sp@-
47e16: 4eb9 0004 7bb4 jsr 47bb4 <_Thread_queue_Enqueue_priority>
47e1c: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
47e20: 46c2 movew %d2,%sr
}
}
47e22: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
47e28: 4e5e unlk %fp <== NOT EXECUTED
00047e2c <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
47e2c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
47e30: 486e fffc pea %fp@(-4)
47e34: 2f2e 0008 movel %fp@(8),%sp@-
47e38: 4eb9 0004 76bc jsr 476bc <_Thread_Get>
switch ( location ) {
47e3e: 508f addql #8,%sp
47e40: 4aae fffc tstl %fp@(-4)
47e44: 6618 bnes 47e5e <_Thread_queue_Timeout+0x32> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_queue_Process_timeout( the_thread );
47e46: 2f00 movel %d0,%sp@-
47e48: 4eb9 0004 b13c jsr 4b13c <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47e4e: 588f addql #4,%sp
47e50: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
47e56: 5380 subql #1,%d0
47e58: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
47e5e: 4e5e unlk %fp
...
000521d2 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
521d2: 4e56 ffb4 linkw %fp,#-76
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
521d6: 200e movel %fp,%d0
521d8: 0680 ffff fff4 addil #-12,%d0
521de: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
521e2: 246e 0008 moveal %fp@(8),%a2
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
521e6: 41ea 0008 lea %a2@(8),%a0
521ea: 2e0e movel %fp,%d7
521ec: 260e movel %fp,%d3
521ee: 280e movel %fp,%d4
521f0: 5187 subql #8,%d7
521f2: 0683 ffff ffe8 addil #-24,%d3
521f8: 0684 ffff ffec addil #-20,%d4
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
521fe: 2c0a movel %a2,%d6
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
52200: 240a movel %a2,%d2
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
52202: 0686 0000 0030 addil #48,%d6
52208: 49f9 0005 6034 lea 56034 <_Watchdog_Adjust_to_chain>,%a4
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
5220e: 0682 0000 0068 addil #104,%d2
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
52214: 4bf9 0005 2cc4 lea 52cc4 <_Chain_Get>,%a5
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5221a: 47f9 0005 60c4 lea 560c4 <_Watchdog_Insert>,%a3
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
52220: 2d48 ffe4 movel %a0,%fp@(-28)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
52224: 41ea 0040 lea %a2@(64),%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
52228: 2d47 fff4 movel %d7,%fp@(-12)
the_chain->permanent_null = NULL;
5222c: 42ae fff8 clrl %fp@(-8)
{
Timer_server_Control *ts = (Timer_server_Control *) arg;
Chain_Control insert_chain;
Chain_Control fire_chain;
_Chain_Initialize_empty( &insert_chain );
52230: 2d40 fffc movel %d0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
52234: 2d44 ffe8 movel %d4,%fp@(-24)
the_chain->permanent_null = NULL;
52238: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
5223c: 2d43 fff0 movel %d3,%fp@(-16)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
52240: 2d48 ffe0 movel %a0,%fp@(-32)
{
/*
* Afterwards all timer inserts are directed to this chain and the interval
* and TOD chains will be no more modified by other parties.
*/
ts->insert_chain = insert_chain;
52244: 41ee fff4 lea %fp@(-12),%a0
52248: 2548 0078 movel %a0,%a2@(120)
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
5224c: 2039 0007 663c movel 7663c <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
52252: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
52256: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
5225a: 486e ffe8 pea %fp@(-24)
5225e: 9081 subl %d1,%d0
52260: 2f00 movel %d0,%sp@-
52262: 2f06 movel %d6,%sp@-
52264: 4e94 jsr %a4@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
52266: 2039 0007 659a movel 7659a <_TOD_Now>,%d0
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
5226c: 4fef 000c lea %sp@(12),%sp
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
52270: 222a 0074 movel %a2@(116),%d1
/*
* Process the seconds chain. Start by checking that the Time
* of Day (TOD) has not been set backwards. If it has then
* we want to adjust the watchdogs->Chain to indicate this.
*/
if ( snapshot > last_snapshot ) {
52274: b280 cmpl %d0,%d1
52276: 6414 bccs 5228c <_Timer_server_Body+0xba>
/*
* This path is for normal forward movement and cases where the
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
52278: 486e ffe8 pea %fp@(-24)
5227c: 2a00 movel %d0,%d5
5227e: 9a81 subl %d1,%d5
52280: 2f05 movel %d5,%sp@-
52282: 2d40 ffdc movel %d0,%fp@(-36)
52286: 2f02 movel %d2,%sp@-
52288: 4e94 jsr %a4@
5228a: 6018 bras 522a4 <_Timer_server_Body+0xd2>
} else if ( snapshot < last_snapshot ) {
5228c: b280 cmpl %d0,%d1
5228e: 631c blss 522ac <_Timer_server_Body+0xda>
/*
* The current TOD is before the last TOD which indicates that
* TOD has been set backwards.
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
52290: 9280 subl %d0,%d1
52292: 2f01 movel %d1,%sp@-
52294: 4878 0001 pea 1 <ADD>
52298: 2d40 ffdc movel %d0,%fp@(-36)
5229c: 2f02 movel %d2,%sp@-
5229e: 4eb9 0005 5fb4 jsr 55fb4 <_Watchdog_Adjust>
522a4: 202e ffdc movel %fp@(-36),%d0
522a8: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
522ac: 2540 0074 movel %d0,%a2@(116)
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
522b0: 202a 0078 movel %a2@(120),%d0
522b4: 2f00 movel %d0,%sp@-
522b6: 4e95 jsr %a5@
if ( timer == NULL ) {
522b8: 588f addql #4,%sp
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
522ba: 2040 moveal %d0,%a0
if ( timer == NULL ) {
522bc: 4a80 tstl %d0
522be: 6724 beqs 522e4 <_Timer_server_Body+0x112> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
522c0: 2028 0038 movel %a0@(56),%d0 <== NOT EXECUTED
522c4: 7201 moveq #1,%d1 <== NOT EXECUTED
522c6: b280 cmpl %d0,%d1 <== NOT EXECUTED
522c8: 6608 bnes 522d2 <_Timer_server_Body+0x100> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
522ca: 4868 0010 pea %a0@(16) <== NOT EXECUTED
522ce: 2f06 movel %d6,%sp@- <== NOT EXECUTED
522d0: 600c bras 522de <_Timer_server_Body+0x10c> <== NOT EXECUTED
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
522d2: 7a03 moveq #3,%d5 <== NOT EXECUTED
522d4: ba80 cmpl %d0,%d5 <== NOT EXECUTED
522d6: 66d8 bnes 522b0 <_Timer_server_Body+0xde> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
522d8: 4868 0010 pea %a0@(16) <== NOT EXECUTED
522dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
522de: 4e93 jsr %a3@ <== NOT EXECUTED
522e0: 508f addql #8,%sp <== NOT EXECUTED
522e2: 60cc bras 522b0 <_Timer_server_Body+0xde> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
522e4: 203c 0000 0700 movel #1792,%d0
522ea: 40c1 movew %sr,%d1
522ec: 8081 orl %d1,%d0
522ee: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
522f0: beae fff4 cmpl %fp@(-12),%d7
522f4: 6614 bnes 5230a <_Timer_server_Body+0x138> <== NEVER TAKEN
ts->insert_chain = NULL;
522f6: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
522fa: 46c1 movew %d1,%sr
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
522fc: 2a3c 0000 0700 movel #1792,%d5
_Chain_Initialize_empty( &fire_chain );
while ( true ) {
_Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain );
if ( !_Chain_Is_empty( &fire_chain ) ) {
52302: b8ae ffe8 cmpl %fp@(-24),%d4
52306: 6608 bnes 52310 <_Timer_server_Body+0x13e>
52308: 6042 bras 5234c <_Timer_server_Body+0x17a>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
5230a: 46c1 movew %d1,%sr <== NOT EXECUTED
5230c: 6000 ff3e braw 5224c <_Timer_server_Body+0x7a> <== NOT EXECUTED
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
52310: 2205 movel %d5,%d1
52312: 40c0 movew %sr,%d0
52314: 8280 orl %d0,%d1
52316: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
52318: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
5231c: b888 cmpl %a0,%d4
5231e: 6726 beqs 52346 <_Timer_server_Body+0x174>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
52320: 2250 moveal %a0@,%a1
the_chain->first = new_first;
52322: 2d49 ffe8 movel %a1,%fp@(-24)
new_first->previous = _Chain_Head(the_chain);
52326: 2343 0004 movel %d3,%a1@(4)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
5232a: 4a88 tstl %a0
5232c: 6718 beqs 52346 <_Timer_server_Body+0x174> <== NEVER TAKEN
watchdog->state = WATCHDOG_INACTIVE;
5232e: 42a8 0008 clrl %a0@(8)
_ISR_Enable( level );
52332: 46c0 movew %d0,%sr
/*
* The timer server may block here and wait for resources or time.
* The system watchdogs are inactive and will remain inactive since
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
52334: 2f28 0024 movel %a0@(36),%sp@-
52338: 2f28 0020 movel %a0@(32),%sp@-
5233c: 2068 001c moveal %a0@(28),%a0
52340: 4e90 jsr %a0@
}
52342: 508f addql #8,%sp
52344: 60ca bras 52310 <_Timer_server_Body+0x13e>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
52346: 46c0 movew %d0,%sr
52348: 6000 fefa braw 52244 <_Timer_server_Body+0x72>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
5234c: 4200 clrb %d0
5234e: 1540 007c moveb %d0,%a2@(124)
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
52352: 4eba fda4 jsr %pc@(520f8 <_Thread_Disable_dispatch>)
_Thread_Set_state( ts->thread, STATES_DELAYING );
52356: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
5235a: 2f12 movel %a2@,%sp@-
5235c: 4eb9 0005 57d4 jsr 557d4 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
52362: 2f0a movel %a2,%sp@-
52364: 4eba fda8 jsr %pc@(5210e <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
52368: 2f0a movel %a2,%sp@-
5236a: 4eba fe02 jsr %pc@(5216e <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5236e: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
ts->active = true;
52374: 7201 moveq #1,%d1
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
52376: 41f9 0005 61e0 lea 561e0 <_Watchdog_Remove>,%a0
_Thread_Set_state( ts->thread, STATES_DELAYING );
_Timer_server_Reset_interval_system_watchdog( ts );
_Timer_server_Reset_tod_system_watchdog( ts );
_Thread_Enable_dispatch();
ts->active = true;
5237c: 1541 007c moveb %d1,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
52380: 2f2e ffe4 movel %fp@(-28),%sp@-
52384: 2d48 ffdc movel %a0,%fp@(-36)
52388: 4e90 jsr %a0@
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5238a: 2f2e ffe0 movel %fp@(-32),%sp@-
5238e: 206e ffdc moveal %fp@(-36),%a0
52392: 4e90 jsr %a0@
52394: 4fef 0018 lea %sp@(24),%sp
52398: 6000 feaa braw 52244 <_Timer_server_Body+0x72>
0005239c <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
5239c: 4e56 fff0 linkw %fp,#-16
523a0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
523a4: 246e 0008 moveal %fp@(8),%a2
523a8: 266e 000c moveal %fp@(12),%a3
if ( ts->insert_chain == NULL ) {
523ac: 202a 0078 movel %a2@(120),%d0
523b0: 6600 00ea bnew 5249c <_Timer_server_Schedule_operation_method+0x100>
* is the reference point for the delta chain. Thus if we do not update the
* reference point we have to add DT to the initial delta of the watchdog
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
523b4: 4eba fd42 jsr %pc@(520f8 <_Thread_Disable_dispatch>)
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
523b8: 202b 0038 movel %a3@(56),%d0
523bc: 7201 moveq #1,%d1
523be: b280 cmpl %d0,%d1
523c0: 665c bnes 5241e <_Timer_server_Schedule_operation_method+0x82>
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
523c2: 203c 0000 0700 movel #1792,%d0
523c8: 40c2 movew %sr,%d2
523ca: 8082 orl %d2,%d0
523cc: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
523ce: 2039 0007 663c movel 7663c <_Watchdog_Ticks_since_boot>,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
523d4: 43ea 0034 lea %a2@(52),%a1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
523d8: 222a 003c movel %a2@(60),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
523dc: 206a 0030 moveal %a2@(48),%a0
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
523e0: b3c8 cmpal %a0,%a1
523e2: 6716 beqs 523fa <_Timer_server_Schedule_operation_method+0x5e>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
523e4: 2240 moveal %d0,%a1
523e6: 93c1 subal %d1,%a1
delta_interval = first_watchdog->delta_interval;
523e8: 2228 0010 movel %a0@(16),%d1
if (delta_interval > delta) {
523ec: b3c1 cmpal %d1,%a1
523ee: 6404 bccs 523f4 <_Timer_server_Schedule_operation_method+0x58>
delta_interval -= delta;
523f0: 9289 subl %a1,%d1
523f2: 6002 bras 523f6 <_Timer_server_Schedule_operation_method+0x5a>
} else {
delta_interval = 0;
523f4: 4281 clrl %d1
}
first_watchdog->delta_interval = delta_interval;
523f6: 2141 0010 movel %d1,%a0@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
523fa: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
523fe: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
52400: 486b 0010 pea %a3@(16)
52404: 486a 0030 pea %a2@(48)
52408: 4eb9 0005 60c4 jsr 560c4 <_Watchdog_Insert>
if ( !ts->active ) {
5240e: 508f addql #8,%sp
52410: 102a 007c moveb %a2@(124),%d0
52414: 6678 bnes 5248e <_Timer_server_Schedule_operation_method+0xf2>
_Timer_server_Reset_interval_system_watchdog( ts );
52416: 2f0a movel %a2,%sp@-
52418: 4eba fcf4 jsr %pc@(5210e <_Timer_server_Reset_interval_system_watchdog>)
5241c: 606e bras 5248c <_Timer_server_Schedule_operation_method+0xf0>
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
5241e: 7203 moveq #3,%d1
52420: b280 cmpl %d0,%d1
52422: 666a bnes 5248e <_Timer_server_Schedule_operation_method+0xf2>
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
52424: 203c 0000 0700 movel #1792,%d0
5242a: 40c2 movew %sr,%d2
5242c: 8082 orl %d2,%d0
5242e: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
52430: 200a movel %a2,%d0
52432: 0680 0000 006c addil #108,%d0
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
52438: 2239 0007 659a movel 7659a <_TOD_Now>,%d1
last_snapshot = ts->TOD_watchdogs.last_snapshot;
5243e: 226a 0074 moveal %a2@(116),%a1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
52442: 206a 0068 moveal %a2@(104),%a0
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
52446: b088 cmpl %a0,%d0
52448: 6720 beqs 5246a <_Timer_server_Schedule_operation_method+0xce>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5244a: 2028 0010 movel %a0@(16),%d0
if ( snapshot > last_snapshot ) {
5244e: b3c1 cmpal %d1,%a1
52450: 640c bccs 5245e <_Timer_server_Schedule_operation_method+0xc2>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
52452: 2841 moveal %d1,%a4
52454: 99c9 subal %a1,%a4
if (delta_interval > delta) {
52456: b9c0 cmpal %d0,%a4
52458: 640a bccs 52464 <_Timer_server_Schedule_operation_method+0xc8><== NEVER TAKEN
delta_interval -= delta;
5245a: 908c subl %a4,%d0
5245c: 6008 bras 52466 <_Timer_server_Schedule_operation_method+0xca>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
5245e: d089 addl %a1,%d0
delta_interval += delta;
52460: 9081 subl %d1,%d0
52462: 6002 bras 52466 <_Timer_server_Schedule_operation_method+0xca>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
52464: 4280 clrl %d0 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
52466: 2140 0010 movel %d0,%a0@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5246a: 2541 0074 movel %d1,%a2@(116)
_ISR_Enable( level );
5246e: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
52470: 486b 0010 pea %a3@(16)
52474: 486a 0068 pea %a2@(104)
52478: 4eb9 0005 60c4 jsr 560c4 <_Watchdog_Insert>
if ( !ts->active ) {
5247e: 508f addql #8,%sp
52480: 102a 007c moveb %a2@(124),%d0
52484: 6608 bnes 5248e <_Timer_server_Schedule_operation_method+0xf2>
_Timer_server_Reset_tod_system_watchdog( ts );
52486: 2f0a movel %a2,%sp@-
52488: 4eba fce4 jsr %pc@(5216e <_Timer_server_Reset_tod_system_watchdog>)
5248c: 588f addql #4,%sp
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
}
}
5248e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
52494: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
52496: 4ef9 0005 4e6a jmp 54e6a <_Thread_Enable_dispatch>
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
5249c: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
524a0: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED
}
}
524a4: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
524aa: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
524ae: 4e5e unlk %fp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
524b0: 4ef9 0005 2c64 jmp 52c64 <_Chain_Append> <== NOT EXECUTED
000484ca <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
484ca: 4e56 fff0 linkw %fp,#-16
484ce: 48d7 041c moveml %d2-%d4/%a2,%sp@
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
484d2: 4282 clrl %d2
484d4: 142e 000f moveb %fp@(15),%d2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
484d8: 282e 0008 movel %fp@(8),%d4
484dc: 262e 0010 movel %fp@(16),%d3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
484e0: 2479 0005 daca moveal 5daca <_User_extensions_List+0x8>,%a2
484e6: 6018 bras 48500 <_User_extensions_Fatal+0x36>
!_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 )
484e8: 206a 0030 moveal %a2@(48),%a0
484ec: 4a88 tstl %a0
484ee: 670c beqs 484fc <_User_extensions_Fatal+0x32>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
484f0: 2f03 movel %d3,%sp@-
484f2: 2f02 movel %d2,%sp@-
484f4: 2f04 movel %d4,%sp@-
484f6: 4e90 jsr %a0@
484f8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
484fc: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
48500: b5fc 0005 dac2 cmpal #383682,%a2
48506: 66e0 bnes 484e8 <_User_extensions_Fatal+0x1e> <== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
48508: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
4850e: 4e5e unlk %fp <== NOT EXECUTED
...
000483a4 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
483a4: 4e56 ffe8 linkw %fp,#-24
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
483a8: 203c 0005 dac6 movel #383686,%d0
483ae: 23c0 0005 dac2 movel %d0,5dac2 <_User_extensions_List>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
483b4: 203c 0005 dac2 movel #383682,%d0
483ba: 23c0 0005 daca movel %d0,5daca <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
483c0: 203c 0005 d954 movel #383316,%d0
483c6: 23c0 0005 d950 movel %d0,5d950 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
483cc: 203c 0005 d950 movel #383312,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
483d2: 42b9 0005 dac6 clrl 5dac6 <_User_extensions_List+0x4>
483d8: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
User_extensions_Control *extension;
uint32_t i;
uint32_t number_of_extensions;
User_extensions_Table *initial_extensions;
number_of_extensions = Configuration.number_of_initial_extensions;
483dc: 2839 0005 c1ca movel 5c1ca <Configuration+0x36>,%d4
initial_extensions = Configuration.User_extension_table;
483e2: 2639 0005 c1ce movel 5c1ce <Configuration+0x3a>,%d3
483e8: 42b9 0005 d954 clrl 5d954 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
483ee: 23c0 0005 d958 movel %d0,5d958 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
483f4: 4a83 tstl %d3
483f6: 6754 beqs 4844c <_User_extensions_Handler_initialization+0xa8><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
483f8: 7434 moveq #52,%d2
483fa: 4c04 2800 mulsl %d4,%d2
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
483fe: 49f9 0004 d300 lea 4d300 <memcpy>,%a4
_User_extensions_Add_set( extension );
48404: 47f9 0004 b290 lea 4b290 <_User_extensions_Add_set>,%a3
4840a: 2f02 movel %d2,%sp@-
4840c: 4eb9 0004 88bc jsr 488bc <_Workspace_Allocate_or_fatal_error>
48412: 2440 moveal %d0,%a2
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
48414: 2f02 movel %d2,%sp@-
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
48416: 4282 clrl %d2
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
48418: 42a7 clrl %sp@-
4841a: 2f00 movel %d0,%sp@-
4841c: 4eb9 0004 d370 jsr 4d370 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
48422: 4fef 0010 lea %sp@(16),%sp
48426: 6020 bras 48448 <_User_extensions_Handler_initialization+0xa4>
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
48428: 4878 0020 pea 20 <OPER2+0xc>
4842c: 5282 addql #1,%d2
4842e: 2f03 movel %d3,%sp@-
48430: 486a 0014 pea %a2@(20)
48434: 0683 0000 0020 addil #32,%d3
4843a: 4e94 jsr %a4@
_User_extensions_Add_set( extension );
4843c: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
4843e: 45ea 0034 lea %a2@(52),%a2
48442: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
48444: 4fef 0010 lea %sp@(16),%sp
48448: b882 cmpl %d2,%d4
4844a: 62dc bhis 48428 <_User_extensions_Handler_initialization+0x84>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
4844c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
48452: 4e5e unlk %fp
...
00049b90 <_Watchdog_Adjust>:
Watchdog_Interval units
)
{
ISR_Level level;
_ISR_Disable( level );
49b90: 327c 0700 moveaw #1792,%a1
49b94: 2209 movel %a1,%d1
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
49b96: 4e56 ffe8 linkw %fp,#-24
49b9a: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
49b9e: 266e 0008 moveal %fp@(8),%a3
49ba2: 262e 000c movel %fp@(12),%d3
49ba6: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
49baa: 40c0 movew %sr,%d0
49bac: 8280 orl %d0,%d1
49bae: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
49bb0: 244b moveal %a3,%a2
49bb2: 205a moveal %a2@+,%a0
* hence the compiler must not assume *header to remain
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
49bb4: b5c8 cmpal %a0,%a2
49bb6: 674c beqs 49c04 <_Watchdog_Adjust+0x74>
switch ( direction ) {
49bb8: 4a83 tstl %d3
49bba: 673c beqs 49bf8 <_Watchdog_Adjust+0x68>
49bbc: 7201 moveq #1,%d1
49bbe: b283 cmpl %d3,%d1
49bc0: 6642 bnes 49c04 <_Watchdog_Adjust+0x74> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
49bc2: d5a8 0010 addl %d2,%a0@(16)
break;
49bc6: 603c bras 49c04 <_Watchdog_Adjust+0x74>
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49bc8: 2053 moveal %a3@,%a0
case WATCHDOG_FORWARD:
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
49bca: 2628 0010 movel %a0@(16),%d3
49bce: b682 cmpl %d2,%d3
49bd0: 6308 blss 49bda <_Watchdog_Adjust+0x4a>
_Watchdog_First( header )->delta_interval -= units;
49bd2: 9682 subl %d2,%d3
49bd4: 2143 0010 movel %d3,%a0@(16)
break;
49bd8: 602a bras 49c04 <_Watchdog_Adjust+0x74>
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
49bda: 7201 moveq #1,%d1
49bdc: 2141 0010 movel %d1,%a0@(16)
_ISR_Enable( level );
49be0: 46c0 movew %d0,%sr
_Watchdog_Tickle( header );
49be2: 2f0b movel %a3,%sp@-
49be4: 4e94 jsr %a4@
_ISR_Disable( level );
49be6: 2204 movel %d4,%d1
49be8: 40c0 movew %sr,%d0
49bea: 8280 orl %d0,%d1
49bec: 46c1 movew %d1,%sr
if ( _Chain_Is_empty( header ) )
49bee: 588f addql #4,%sp
49bf0: b5d3 cmpal %a3@,%a2
49bf2: 6710 beqs 49c04 <_Watchdog_Adjust+0x74>
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
49bf4: 9483 subl %d3,%d2
49bf6: 6008 bras 49c00 <_Watchdog_Adjust+0x70>
_Watchdog_First( header )->delta_interval = 1;
_ISR_Enable( level );
_Watchdog_Tickle( header );
49bf8: 49f9 0004 9da8 lea 49da8 <_Watchdog_Tickle>,%a4
_ISR_Disable( level );
49bfe: 2809 movel %a1,%d4
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
49c00: 4a82 tstl %d2
49c02: 66c4 bnes 49bc8 <_Watchdog_Adjust+0x38> <== ALWAYS TAKEN
}
break;
}
}
_ISR_Enable( level );
49c04: 46c0 movew %d0,%sr
}
49c06: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
49c0c: 4e5e unlk %fp <== NOT EXECUTED
00048730 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
48730: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
48736: 4e56 0000 linkw %fp,#0
4873a: 206e 0008 moveal %fp@(8),%a0
4873e: 2f0a movel %a2,%sp@-
48740: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
48742: 40c1 movew %sr,%d1
48744: 8081 orl %d1,%d0
48746: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
48748: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
4874c: 7401 moveq #1,%d2
4874e: b480 cmpl %d0,%d2
48750: 670c beqs 4875e <_Watchdog_Remove+0x2e>
48752: 6242 bhis 48796 <_Watchdog_Remove+0x66>
48754: 143c 0003 moveb #3,%d2
48758: b480 cmpl %d0,%d2
4875a: 653a bcss 48796 <_Watchdog_Remove+0x66> <== NEVER TAKEN
4875c: 6006 bras 48764 <_Watchdog_Remove+0x34>
/*
* It is not actually on the chain so just change the state and
* the Insert operation we interrupted will be aborted.
*/
the_watchdog->state = WATCHDOG_INACTIVE;
4875e: 42a8 0008 clrl %a0@(8)
break;
48762: 6032 bras 48796 <_Watchdog_Remove+0x66>
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
48764: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
48766: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
4876a: 4a91 tstl %a1@
4876c: 6708 beqs 48776 <_Watchdog_Remove+0x46>
next_watchdog->delta_interval += the_watchdog->delta_interval;
4876e: 2428 0010 movel %a0@(16),%d2
48772: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
48776: 2479 0005 da74 moveal 5da74 <_Watchdog_Sync_count>,%a2
4877c: 4a8a tstl %a2
4877e: 670c beqs 4878c <_Watchdog_Remove+0x5c>
_Watchdog_Sync_level = _ISR_Nest_level;
48780: 45f9 0005 ddd8 lea 5ddd8 <_Per_CPU_Information+0x8>,%a2
48786: 23d2 0005 d9f2 movel %a2@,5d9f2 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4878c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
48790: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
48794: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
48796: 2279 0005 da78 moveal 5da78 <_Watchdog_Ticks_since_boot>,%a1
4879c: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
487a0: 46c1 movew %d1,%sr
return( previous_state );
}
487a2: 241f movel %sp@+,%d2
487a4: 245f moveal %sp@+,%a2
487a6: 4e5e unlk %fp
...
00049788 <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
49788: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4978e: 4e56 ffec linkw %fp,#-20
49792: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
49796: 242e 0008 movel %fp@(8),%d2
4979a: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4979e: 40c3 movew %sr,%d3
497a0: 8083 orl %d3,%d0
497a2: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
497a4: 2f0b movel %a3,%sp@-
497a6: 49f9 0004 3e7c lea 43e7c <printk>,%a4
497ac: 2f02 movel %d2,%sp@-
497ae: 4879 0005 ce9a pea 5ce9a <C.0.4004+0xe>
497b4: 4e94 jsr %a4@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
497b6: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
497b8: 4fef 000c lea %sp@(12),%sp
497bc: b7ca cmpal %a2,%a3
497be: 6726 beqs 497e6 <_Watchdog_Report_chain+0x5e>
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
497c0: 49f9 0004 97fc lea 497fc <_Watchdog_Report>,%a4
497c6: 2f0a movel %a2,%sp@-
497c8: 42a7 clrl %sp@-
497ca: 4e94 jsr %a4@
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
node != _Chain_Tail(header) ;
node = node->next )
497cc: 2452 moveal %a2@,%a2
Chain_Node *node;
_ISR_Disable( level );
printk( "Watchdog Chain: %s %p\n", name, header );
if ( !_Chain_Is_empty( header ) ) {
for ( node = header->first ;
497ce: 508f addql #8,%sp
497d0: b7ca cmpal %a2,%a3
497d2: 66f2 bnes 497c6 <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
497d4: 2f02 movel %d2,%sp@-
497d6: 4879 0005 ceb1 pea 5ceb1 <C.0.4004+0x25>
497dc: 4eb9 0004 3e7c jsr 43e7c <printk>
497e2: 508f addql #8,%sp
497e4: 600a bras 497f0 <_Watchdog_Report_chain+0x68>
} else {
printk( "Chain is empty\n" );
497e6: 4879 0005 cec0 pea 5cec0 <C.0.4004+0x34>
497ec: 4e94 jsr %a4@
497ee: 588f addql #4,%sp
}
_ISR_Enable( level );
497f0: 46c3 movew %d3,%sr
}
497f2: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
497f8: 4e5e unlk %fp <== NOT EXECUTED
000487ac <_Watchdog_Tickle>:
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
487ac: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
487b2: 4e56 ffe8 linkw %fp,#-24
487b6: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
487ba: 286e 0008 moveal %fp@(8),%a4
* See the comment in watchdoginsert.c and watchdogadjust.c
* about why it's safe not to declare header a pointer to
* volatile data - till, 2003/7
*/
_ISR_Disable( level );
487be: 40c2 movew %sr,%d2
487c0: 8082 orl %d2,%d0
487c2: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
487c4: 264c moveal %a4,%a3
487c6: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
487c8: b7ca cmpal %a2,%a3
487ca: 674c beqs 48818 <_Watchdog_Tickle+0x6c>
* 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) {
487cc: 202a 0010 movel %a2@(16),%d0
487d0: 6708 beqs 487da <_Watchdog_Tickle+0x2e>
the_watchdog->delta_interval--;
487d2: 5380 subql #1,%d0
487d4: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
487d8: 663e bnes 48818 <_Watchdog_Tickle+0x6c>
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
487da: 4bf9 0004 8730 lea 48730 <_Watchdog_Remove>,%a5
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
487e0: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
487e6: 2f0a movel %a2,%sp@-
487e8: 4e95 jsr %a5@
_ISR_Enable( level );
487ea: 46c2 movew %d2,%sr
switch( watchdog_state ) {
487ec: 7202 moveq #2,%d1
487ee: 588f addql #4,%sp
487f0: b280 cmpl %d0,%d1
487f2: 6610 bnes 48804 <_Watchdog_Tickle+0x58> <== NEVER TAKEN
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
487f4: 2f2a 0024 movel %a2@(36),%sp@-
487f8: 2f2a 0020 movel %a2@(32),%sp@-
487fc: 206a 001c moveal %a2@(28),%a0
48800: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
48802: 508f addql #8,%sp
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
48804: 2003 movel %d3,%d0
48806: 40c2 movew %sr,%d2
48808: 8082 orl %d2,%d0
4880a: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
4880c: 2454 moveal %a4@,%a2
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
4880e: b7ca cmpal %a2,%a3
48810: 6706 beqs 48818 <_Watchdog_Tickle+0x6c>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
48812: 4aaa 0010 tstl %a2@(16)
48816: 67ce beqs 487e6 <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
48818: 46c2 movew %d2,%sr
}
4881a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5
48820: 4e5e unlk %fp <== NOT EXECUTED
00059ba0 <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
59ba0: 4e56 0000 linkw %fp,#0
59ba4: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
59ba8: 2d6e 0010 000c movel %fp@(16),%fp@(12)
59bae: 2d40 0008 movel %d0,%fp@(8)
}
59bb2: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
59bb4: 4ef9 0004 2444 jmp 42444 <calloc>
...
00049800 <_close_r>:
int _close_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
49800: 4e56 0000 linkw %fp,#0
return close( fd );
49804: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
4980a: 4e5e unlk %fp
int _close_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return close( fd );
4980c: 4ef9 0004 9790 jmp 49790 <close>
...
00042fe4 <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
42fe4: 4e56 0000 linkw %fp,#0
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
42fe8: 4eb9 0005 a6c4 jsr 5a6c4 <_fini>
* We need to do the exit processing on the global reentrancy structure.
* This has already been done on the per task reentrancy structure
* associated with this task.
*/
libc_wrapup();
42fee: 4eb9 0004 2f80 jsr 42f80 <libc_wrapup>
rtems_shutdown_executive(status);
42ff4: 2f2e 0008 movel %fp@(8),%sp@-
42ff8: 4eb9 0004 5da4 jsr 45da4 <rtems_shutdown_executive>
42ffe: 588f addql #4,%sp <== NOT EXECUTED
43000: 60fe bras 43000 <_exit+0x1c> <== NOT EXECUTED
...
00059bbc <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
59bbc: 4e56 0000 linkw %fp,#0
free( ptr );
59bc0: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
59bc6: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
59bc8: 4ef9 0004 2830 jmp 42830 <free>
...
00059c90 <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
59c90: 4e56 0000 linkw %fp,#0
return isatty( fd );
59c94: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
59c9a: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
59c9c: 4ef9 0005 a61c jmp 5a61c <isatty>
...
00044c1c <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
44c1c: 4e56 0000 linkw %fp,#0
44c20: 202e 000c movel %fp@(12),%d0
return link( existing, new );
44c24: 2d6e 0010 000c movel %fp@(16),%fp@(12)
44c2a: 2d40 0008 movel %d0,%fp@(8)
}
44c2e: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
44c30: 4ef9 0004 4b44 jmp 44b44 <link>
...
00059d7c <_lseek_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
off_t offset,
int whence
)
{
59d7c: 4e56 0000 linkw %fp,#0
59d80: 206e 000c moveal %fp@(12),%a0
59d84: 202e 0010 movel %fp@(16),%d0
59d88: 222e 0014 movel %fp@(20),%d1
return lseek( fd, offset, whence );
59d8c: 2d6e 0018 0014 movel %fp@(24),%fp@(20)
59d92: 2d40 000c movel %d0,%fp@(12)
59d96: 2d41 0010 movel %d1,%fp@(16)
59d9a: 2d48 0008 movel %a0,%fp@(8)
}
59d9e: 4e5e unlk %fp
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
59da0: 4ef9 0005 9ca4 jmp 59ca4 <lseek>
...
00059da8 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
59da8: 4e56 0000 linkw %fp,#0
return malloc( size );
59dac: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
59db2: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
59db4: 4ef9 0004 2b18 jmp 42b18 <malloc>
...
00059e58 <_read_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
void *buf,
size_t nbytes
)
{
59e58: 4e56 0000 linkw %fp,#0
59e5c: 222e 0010 movel %fp@(16),%d1
59e60: 202e 000c movel %fp@(12),%d0
return read( fd, buf, nbytes );
59e64: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
59e6a: 2d41 000c movel %d1,%fp@(12)
59e6e: 2d40 0008 movel %d0,%fp@(8)
}
59e72: 4e5e unlk %fp
int fd,
void *buf,
size_t nbytes
)
{
return read( fd, buf, nbytes );
59e74: 4ef9 0005 9dbc jmp 59dbc <read>
...
00059e7c <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
59e7c: 4e56 0000 linkw %fp,#0
59e80: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
59e84: 2d6e 0010 000c movel %fp@(16),%fp@(12)
59e8a: 2d40 0008 movel %d0,%fp@(8)
}
59e8e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
59e90: 4ef9 0005 9edc jmp 59edc <realloc>
...
0004593c <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
4593c: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED
45940: 48d7 047c moveml %d2-%d6/%a2,%sp@ <== NOT EXECUTED
45944: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED
45948: 2c2e 0010 movel %fp@(16),%d6 <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
4594c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4594e: 4eb9 0004 46ce jsr 446ce <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
45954: 588f addql #4,%sp <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
45956: 2440 moveal %d0,%a2 <== NOT EXECUTED
45958: 200e movel %fp,%d0 <== NOT EXECUTED
4595a: 0680 ffff ffd0 addil #-48,%d0 <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
45960: 4a8a tstl %a2 <== NOT EXECUTED
45962: 6616 bnes 4597a <_rename_r+0x3e> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
45964: 2f00 movel %d0,%sp@- <== NOT EXECUTED
45966: 486e fffc pea %fp@(-4) <== NOT EXECUTED
rtems_filesystem_location_info_t old_parent_loc;
rtems_filesystem_location_info_t new_parent_loc;
int i;
int result;
const char *name;
bool free_old_parentloc = false;
4596a: 4204 clrb %d4 <== NOT EXECUTED
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
4596c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4596e: 4eb9 0004 5c98 jsr 45c98 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
45974: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
45978: 601e bras 45998 <_rename_r+0x5c> <== NOT EXECUTED
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
4597a: 42a7 clrl %sp@- <== NOT EXECUTED
4597c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4597e: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
45982: 2f0a movel %a2,%sp@- <== NOT EXECUTED
45984: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45986: 4eb9 0004 4656 jsr 44656 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
4598c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
45990: 4a80 tstl %d0 <== NOT EXECUTED
45992: 6600 012e bnew 45ac2 <_rename_r+0x186> <== NOT EXECUTED
return -1;
free_old_parentloc = true;
45996: 7801 moveq #1,%d4 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
45998: 4878 0014 pea 14 <OPER2> <== NOT EXECUTED
4599c: 240e movel %fp,%d2 <== NOT EXECUTED
4599e: 0682 ffff ffd0 addil #-48,%d2 <== NOT EXECUTED
459a4: 2a0e movel %fp,%d5 <== NOT EXECUTED
459a6: 0685 ffff ffe4 addil #-28,%d5 <== NOT EXECUTED
name = old + old_parent_pathlen;
459ac: d68a addl %a2,%d3 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
459ae: 45f9 0005 235c lea 5235c <strlen>,%a2 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
459b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
459b6: 2f05 movel %d5,%sp@- <== NOT EXECUTED
459b8: 4eb9 0005 0c38 jsr 50c38 <memcpy> <== NOT EXECUTED
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
459be: 2f03 movel %d3,%sp@- <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
459c0: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
459c4: 4e92 jsr %a2@ <== NOT EXECUTED
459c6: 2e80 movel %d0,%sp@ <== NOT EXECUTED
459c8: 2f03 movel %d3,%sp@- <== NOT EXECUTED
459ca: 4eb9 0004 4710 jsr 44710 <rtems_filesystem_prefix_separators><== NOT EXECUTED
459d0: d680 addl %d0,%d3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
459d2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
459d4: 2d43 fff8 movel %d3,%fp@(-8) <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
459d8: 4e92 jsr %a2@ <== NOT EXECUTED
459da: 4297 clrl %sp@ <== NOT EXECUTED
459dc: 2f05 movel %d5,%sp@- <== NOT EXECUTED
459de: 42a7 clrl %sp@- <== NOT EXECUTED
459e0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
459e2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
459e4: 4eb9 0004 45bc jsr 445bc <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false );
if ( result != 0 ) {
459ea: 4fef 0028 lea %sp@(40),%sp <== NOT EXECUTED
459ee: 4a80 tstl %d0 <== NOT EXECUTED
459f0: 670a beqs 459fc <_rename_r+0xc0> <== NOT EXECUTED
if ( free_old_parentloc )
459f2: 4a04 tstb %d4 <== NOT EXECUTED
459f4: 6700 00cc beqw 45ac2 <_rename_r+0x186> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
459f8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
459fa: 604e bras 45a4a <_rename_r+0x10e> <== NOT EXECUTED
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
459fc: 260e movel %fp,%d3 <== NOT EXECUTED
459fe: 0683 ffff ffbc addil #-68,%d3 <== NOT EXECUTED
45a04: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45a06: 486e fffc pea %fp@(-4) <== NOT EXECUTED
45a0a: 2f06 movel %d6,%sp@- <== NOT EXECUTED
45a0c: 4eb9 0004 5c98 jsr 45c98 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
45a12: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
45a16: dcae fffc addl %fp@(-4),%d6 <== NOT EXECUTED
45a1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45a1c: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED
45a20: 2f06 movel %d6,%sp@- <== NOT EXECUTED
45a22: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED
45a26: 4e90 jsr %a0@ <== NOT EXECUTED
if ( result != 0 ) {
45a28: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
45a2c: 4a80 tstl %d0 <== NOT EXECUTED
45a2e: 6722 beqs 45a52 <_rename_r+0x116> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
45a30: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45a32: 45f9 0004 474c lea 4474c <rtems_filesystem_freenode>,%a2 <== NOT EXECUTED
45a38: 4e92 jsr %a2@ <== NOT EXECUTED
if ( free_old_parentloc )
45a3a: 588f addql #4,%sp <== NOT EXECUTED
45a3c: 4a04 tstb %d4 <== NOT EXECUTED
45a3e: 6706 beqs 45a46 <_rename_r+0x10a> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
45a40: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45a42: 4e92 jsr %a2@ <== NOT EXECUTED
45a44: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
45a46: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
45a4a: 4eb9 0004 474c jsr 4474c <rtems_filesystem_freenode> <== NOT EXECUTED
45a50: 6036 bras 45a88 <_rename_r+0x14c> <== NOT EXECUTED
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
45a52: 202e ffcc movel %fp@(-52),%d0 <== NOT EXECUTED
45a56: 45f9 0004 474c lea 4474c <rtems_filesystem_freenode>,%a2 <== NOT EXECUTED
45a5c: b0ae ffe0 cmpl %fp@(-32),%d0 <== NOT EXECUTED
45a60: 672a beqs 45a8c <_rename_r+0x150> <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
45a62: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45a64: 4e92 jsr %a2@ <== NOT EXECUTED
if ( free_old_parentloc )
45a66: 588f addql #4,%sp <== NOT EXECUTED
45a68: 4a04 tstb %d4 <== NOT EXECUTED
45a6a: 6706 beqs 45a72 <_rename_r+0x136> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
45a6c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45a6e: 4e92 jsr %a2@ <== NOT EXECUTED
45a70: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
45a72: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
45a76: 4eb9 0004 474c jsr 4474c <rtems_filesystem_freenode> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
45a7c: 4eb9 0004 f3a4 jsr 4f3a4 <__errno> <== NOT EXECUTED
45a82: 2040 moveal %d0,%a0 <== NOT EXECUTED
45a84: 7012 moveq #18,%d0 <== NOT EXECUTED
45a86: 2080 movel %d0,%a0@ <== NOT EXECUTED
45a88: 588f addql #4,%sp <== NOT EXECUTED
45a8a: 6036 bras 45ac2 <_rename_r+0x186> <== NOT EXECUTED
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
45a8c: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
45a90: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED
45a94: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45a96: 2f05 movel %d5,%sp@- <== NOT EXECUTED
45a98: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45a9a: 2068 0040 moveal %a0@(64),%a0 <== NOT EXECUTED
45a9e: 4e90 jsr %a0@ <== NOT EXECUTED
45aa0: 2a00 movel %d0,%d5 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
45aa2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45aa4: 4e92 jsr %a2@ <== NOT EXECUTED
if ( free_old_parentloc )
45aa6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
45aaa: 4a04 tstb %d4 <== NOT EXECUTED
45aac: 6706 beqs 45ab4 <_rename_r+0x178> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
45aae: 2f02 movel %d2,%sp@- <== NOT EXECUTED
45ab0: 4e92 jsr %a2@ <== NOT EXECUTED
45ab2: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
45ab4: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
45ab8: 4eb9 0004 474c jsr 4474c <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
45abe: 588f addql #4,%sp <== NOT EXECUTED
45ac0: 6002 bras 45ac4 <_rename_r+0x188> <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
return -1;
45ac2: 7aff moveq #-1,%d5 <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
45ac4: 2005 movel %d5,%d0 <== NOT EXECUTED
45ac6: 4cee 047c ffa4 moveml %fp@(-92),%d2-%d6/%a2 <== NOT EXECUTED
45acc: 4e5e unlk %fp <== NOT EXECUTED
0004459c <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
4459c: 4e56 0000 linkw %fp,#0
445a0: 202e 000c movel %fp@(12),%d0
return _STAT_NAME( path, buf );
445a4: 2d6e 0010 000c movel %fp@(16),%fp@(12)
445aa: 2d40 0008 movel %d0,%fp@(8)
}
445ae: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
445b0: 4ef9 0004 4514 jmp 44514 <stat>
...
0004513c <_times_r>:
clock_t _times_r(
struct _reent *ptr __attribute__((unused)),
struct tms *ptms
)
{
4513c: 4e56 0000 linkw %fp,#0
return _times( ptms );
45140: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
45146: 4e5e unlk %fp
clock_t _times_r(
struct _reent *ptr __attribute__((unused)),
struct tms *ptms
)
{
return _times( ptms );
45148: 4ef9 0004 5098 jmp 45098 <_times>
...
00045d98 <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
45d98: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return unlink( path );
45d9c: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED
}
45da2: 4e5e unlk %fp <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
45da4: 4ef9 0004 5c74 jmp 45c74 <unlink> <== NOT EXECUTED
...
00059e98 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
59e98: 4e56 0000 linkw %fp,#0
59e9c: 222e 0010 movel %fp@(16),%d1
59ea0: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
59ea4: 2d6e 0014 0010 movel %fp@(20),%fp@(16)
59eaa: 2d41 000c movel %d1,%fp@(12)
59eae: 2d40 0008 movel %d0,%fp@(8)
}
59eb2: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
59eb4: 4ef9 0005 9fbc jmp 59fbc <write>
...
00042698 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42698: 4e56 ffe0 linkw %fp,#-32
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) {
4269c: 203c 0005 df44 movel #384836,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
426a2: 48d7 0c04 moveml %d2/%a2-%a3,%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) {
426a6: b0b9 0005 c908 cmpl 5c908 <rtems_current_user_env>,%d0
426ac: 6624 bnes 426d2 <chroot+0x3a> <== NEVER TAKEN
rtems_libio_set_private_env(); /* try to set a new private env*/
426ae: 4eb9 0004 3ac8 jsr 43ac8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
426b4: 41f9 0005 df44 lea 5df44 <rtems_global_user_env>,%a0
426ba: b1f9 0005 c908 cmpal 5c908 <rtems_current_user_env>,%a0
426c0: 6610 bnes 426d2 <chroot+0x3a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
426c2: 4eb9 0004 d1d0 jsr 4d1d0 <__errno> <== NOT EXECUTED
426c8: 2040 moveal %d0,%a0 <== NOT EXECUTED
426ca: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
426d0: 6020 bras 426f2 <chroot+0x5a> <== NOT EXECUTED
}
result = chdir(pathname);
426d2: 2f2e 0008 movel %fp@(8),%sp@-
426d6: 4eb9 0004 a218 jsr 4a218 <chdir>
if (result) {
426dc: 588f addql #4,%sp
426de: 4a80 tstl %d0
426e0: 6714 beqs 426f6 <chroot+0x5e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( errno );
426e2: 45f9 0004 d1d0 lea 4d1d0 <__errno>,%a2 <== NOT EXECUTED
426e8: 4e92 jsr %a2@ <== NOT EXECUTED
426ea: 2640 moveal %d0,%a3 <== NOT EXECUTED
426ec: 4e92 jsr %a2@ <== NOT EXECUTED
426ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
426f0: 2690 movel %a0@,%a3@ <== NOT EXECUTED
426f2: 70ff moveq #-1,%d0 <== NOT EXECUTED
426f4: 6056 bras 4274c <chroot+0xb4> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
426f6: 42a7 clrl %sp@-
426f8: 240e movel %fp,%d2
426fa: 0682 ffff ffec addil #-20,%d2
42700: 2f02 movel %d2,%sp@-
42702: 42a7 clrl %sp@-
42704: 4878 0001 pea 1 <ADD>
42708: 4879 0005 bbdc pea 5bbdc <dotdotname+0x4>
4270e: 4eb9 0004 2a72 jsr 42a72 <rtems_filesystem_evaluate_path>
42714: 4fef 0014 lea %sp@(20),%sp
42718: 4a80 tstl %d0
4271a: 66c6 bnes 426e2 <chroot+0x4a> <== NEVER TAKEN
/* 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);
4271c: 2079 0005 c908 moveal 5c908 <rtems_current_user_env>,%a0
42722: 41e8 0018 lea %a0@(24),%a0
42726: 2f08 movel %a0,%sp@-
42728: 4eb9 0004 2b68 jsr 42b68 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
4272e: 4878 0014 pea 14 <OPER2>
42732: 2079 0005 c908 moveal 5c908 <rtems_current_user_env>,%a0
42738: 41e8 0018 lea %a0@(24),%a0
4273c: 2f02 movel %d2,%sp@-
4273e: 2f08 movel %a0,%sp@-
42740: 4eb9 0004 da7c jsr 4da7c <memcpy>
return 0;
42746: 4fef 0010 lea %sp@(16),%sp
4274a: 4280 clrl %d0
}
4274c: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
42752: 4e5e unlk %fp
...
000455e8 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
455e8: 4e56 0000 linkw %fp,#0
455ec: 222e 0008 movel %fp@(8),%d1
455f0: 202e 000c movel %fp@(12),%d0
455f4: 2f02 movel %d2,%sp@-
if ( !tp )
455f6: 4a80 tstl %d0
455f8: 6608 bnes 45602 <clock_gettime+0x1a>
rtems_set_errno_and_return_minus_one( EINVAL );
455fa: 4eb9 0004 d8cc jsr 4d8cc <__errno>
45600: 6042 bras 45644 <clock_gettime+0x5c>
if ( clock_id == CLOCK_REALTIME ) {
45602: 7401 moveq #1,%d2
45604: b481 cmpl %d1,%d2
45606: 660a bnes 45612 <clock_gettime+0x2a>
_TOD_Get(tp);
45608: 2f00 movel %d0,%sp@-
4560a: 4eb9 0004 7248 jsr 47248 <_TOD_Get>
45610: 6014 bras 45626 <clock_gettime+0x3e>
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
45612: 7404 moveq #4,%d2
45614: b481 cmpl %d1,%d2
45616: 6706 beqs 4561e <clock_gettime+0x36> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
45618: 7402 moveq #2,%d2
4561a: b481 cmpl %d1,%d2
4561c: 660e bnes 4562c <clock_gettime+0x44>
_TOD_Get_uptime_as_timespec( tp );
4561e: 2f00 movel %d0,%sp@-
45620: 4eb9 0004 72b4 jsr 472b4 <_TOD_Get_uptime_as_timespec>
return 0;
45626: 588f addql #4,%sp
45628: 4280 clrl %d0
4562a: 6020 bras 4564c <clock_gettime+0x64>
4562c: 41f9 0004 d8cc lea 4d8cc <__errno>,%a0
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
45632: 7003 moveq #3,%d0
45634: b081 cmpl %d1,%d0
45636: 660a bnes 45642 <clock_gettime+0x5a>
rtems_set_errno_and_return_minus_one( ENOSYS );
45638: 4e90 jsr %a0@
4563a: 7258 moveq #88,%d1
4563c: 2040 moveal %d0,%a0
4563e: 2081 movel %d1,%a0@
45640: 6008 bras 4564a <clock_gettime+0x62>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
45642: 4e90 jsr %a0@
45644: 2040 moveal %d0,%a0
45646: 7016 moveq #22,%d0
45648: 2080 movel %d0,%a0@
4564a: 70ff moveq #-1,%d0
return 0;
}
4564c: 242e fffc movel %fp@(-4),%d2
45650: 4e5e unlk %fp <== NOT EXECUTED
00045654 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
45654: 4e56 0000 linkw %fp,#0
45658: 222e 0008 movel %fp@(8),%d1
4565c: 206e 000c moveal %fp@(12),%a0
if ( !tp )
45660: 4a88 tstl %a0
45662: 6710 beqs 45674 <clock_settime+0x20> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
45664: 7001 moveq #1,%d0
45666: b081 cmpl %d1,%d0
45668: 6634 bnes 4569e <clock_settime+0x4a>
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
4566a: 203c 21da e4ff movel #567993599,%d0
45670: b090 cmpl %a0@,%d0
45672: 6508 bcss 4567c <clock_settime+0x28>
rtems_set_errno_and_return_minus_one( EINVAL );
45674: 4eb9 0004 d8cc jsr 4d8cc <__errno>
4567a: 6048 bras 456c4 <clock_settime+0x70>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4567c: 2039 0005 f60c movel 5f60c <_Thread_Dispatch_disable_level>,%d0
45682: 5280 addql #1,%d0
45684: 23c0 0005 f60c movel %d0,5f60c <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_TOD_Set( tp );
4568a: 2f08 movel %a0,%sp@-
4568c: 4eb9 0004 730c jsr 4730c <_TOD_Set>
_Thread_Enable_dispatch();
45692: 4eb9 0004 8416 jsr 48416 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
45698: 588f addql #4,%sp
4569a: 4280 clrl %d0
4569c: 602e bras 456cc <clock_settime+0x78>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
4569e: 7002 moveq #2,%d0
456a0: b081 cmpl %d1,%d0
456a2: 6608 bnes 456ac <clock_settime+0x58>
rtems_set_errno_and_return_minus_one( ENOSYS );
456a4: 4eb9 0004 d8cc jsr 4d8cc <__errno>
456aa: 600e bras 456ba <clock_settime+0x66>
456ac: 41f9 0004 d8cc lea 4d8cc <__errno>,%a0
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
456b2: 7003 moveq #3,%d0
456b4: b081 cmpl %d1,%d0
456b6: 660a bnes 456c2 <clock_settime+0x6e>
rtems_set_errno_and_return_minus_one( ENOSYS );
456b8: 4e90 jsr %a0@
456ba: 2040 moveal %d0,%a0
456bc: 7258 moveq #88,%d1
456be: 2081 movel %d1,%a0@
456c0: 6008 bras 456ca <clock_settime+0x76>
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
456c2: 4e90 jsr %a0@
456c4: 2040 moveal %d0,%a0
456c6: 7016 moveq #22,%d0
456c8: 2080 movel %d0,%a0@
456ca: 70ff moveq #-1,%d0
return 0;
}
456cc: 4e5e unlk %fp <== NOT EXECUTED
000487ec <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
487ec: 4e56 ffe4 linkw %fp,#-28
487f0: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
487f4: 246e 0014 moveal %fp@(20),%a2
487f8: 282e 0008 movel %fp@(8),%d4
487fc: 262e 000c movel %fp@(12),%d3
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
48800: 2652 moveal %a2@,%a3
if (!device_name_table)
48802: 4a8b tstl %a3
48804: 670a beqs 48810 <devFS_evaluate_path+0x24> <== NEVER TAKEN
48806: 4282 clrl %d2
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
48808: 4bf9 0004 c174 lea 4c174 <strncmp>,%a5
4880e: 6056 bras 48866 <devFS_evaluate_path+0x7a>
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
48810: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
48816: 720e moveq #14,%d1 <== NOT EXECUTED
48818: 2040 moveal %d0,%a0 <== NOT EXECUTED
4881a: 2081 movel %d1,%a0@ <== NOT EXECUTED
4881c: 605c bras 4887a <devFS_evaluate_path+0x8e> <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
4881e: 2853 moveal %a3@,%a4
48820: 4a8c tstl %a4
48822: 673c beqs 48860 <devFS_evaluate_path+0x74>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
48824: 2f03 movel %d3,%sp@-
48826: 2f0c movel %a4,%sp@-
48828: 2f04 movel %d4,%sp@-
4882a: 4e95 jsr %a5@
4882c: 4fef 000c lea %sp@(12),%sp
48830: 4a80 tstl %d0
48832: 662c bnes 48860 <devFS_evaluate_path+0x74>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
48834: 4a34 3800 tstb %a4@(00000000,%d3:l)
48838: 6626 bnes 48860 <devFS_evaluate_path+0x74> <== NEVER TAKEN
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
4883a: 41f9 0005 9af0 lea 59af0 <devFS_ops>,%a0
48840: 2548 000c movel %a0,%a2@(12)
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
48844: 2079 0005 9b90 moveal 59b90 <rtems_current_user_env>,%a0
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
4884a: 203c 0005 9b38 movel #367416,%d0
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
48850: 2568 0028 0010 movel %a0@(40),%a2@(16)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
48856: 2540 0008 movel %d0,%a2@(8)
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
4885a: 4280 clrl %d0
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
4885c: 248b movel %a3,%a2@
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
4885e: 601c bras 4887c <devFS_evaluate_path+0x90>
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
48860: 5282 addql #1,%d2
48862: 47eb 0014 lea %a3@(20),%a3
48866: b4b9 0005 99f8 cmpl 599f8 <rtems_device_table_size>,%d2
4886c: 65b0 bcss 4881e <devFS_evaluate_path+0x32>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
4886e: 4eb9 0004 ae18 jsr 4ae18 <__errno>
48874: 2040 moveal %d0,%a0
48876: 7002 moveq #2,%d0
48878: 2080 movel %d0,%a0@
4887a: 70ff moveq #-1,%d0
}
4887c: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
48882: 4e5e unlk %fp <== NOT EXECUTED
00041df0 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
41df0: 4e56 0000 linkw %fp,#0
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
41df4: 2039 0005 99f8 movel 599f8 <rtems_device_table_size>,%d0
41dfa: 2200 movel %d0,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
41dfc: 2f0a movel %a2,%sp@-
41dfe: 246e 0008 moveal %fp@(8),%a2
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
41e02: e989 lsll #4,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
41e04: 2f02 movel %d2,%sp@-
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
41e06: 2041 moveal %d1,%a0
41e08: 4870 0c00 pea %a0@(00000000,%d0:l:4)
41e0c: 4eb9 0004 83f4 jsr 483f4 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
41e12: 588f addql #4,%sp
)
{
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
41e14: 2400 movel %d0,%d2
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
41e16: 6610 bnes 41e28 <devFS_initialize+0x38> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
41e18: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
41e1e: 2040 moveal %d0,%a0 <== NOT EXECUTED
41e20: 700c moveq #12,%d0 <== NOT EXECUTED
41e22: 2080 movel %d0,%a0@ <== NOT EXECUTED
41e24: 70ff moveq #-1,%d0 <== NOT EXECUTED
41e26: 6038 bras 41e60 <devFS_initialize+0x70> <== NOT EXECUTED
memset(
41e28: 2039 0005 99f8 movel 599f8 <rtems_device_table_size>,%d0
41e2e: 2200 movel %d0,%d1
41e30: e989 lsll #4,%d1
41e32: 2041 moveal %d1,%a0
41e34: 4870 0c00 pea %a0@(00000000,%d0:l:4)
41e38: 42a7 clrl %sp@-
41e3a: 2f02 movel %d2,%sp@-
41e3c: 4eb9 0004 b734 jsr 4b734 <memset>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
41e42: 4fef 000c lea %sp@(12),%sp
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
41e46: 203c 0005 9b38 movel #367416,%d0
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
41e4c: 41f9 0005 9af0 lea 59af0 <devFS_ops>,%a0
device_name_table, 0,
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
41e52: 2540 0024 movel %d0,%a2@(36)
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
41e56: 4280 clrl %d0
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
41e58: 2548 0028 movel %a0,%a2@(40)
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
41e5c: 2542 001c movel %d2,%a2@(28)
return 0;
}
41e60: 242e fff8 movel %fp@(-8),%d2
41e64: 246e fffc moveal %fp@(-4),%a2
41e68: 4e5e unlk %fp <== NOT EXECUTED
00041ff4 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
41ff4: 4e56 fff0 linkw %fp,#-16
41ff8: 226e 0008 moveal %fp@(8),%a1
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
41ffc: 2069 0018 moveal %a1@(24),%a0
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
42000: 486e fff0 pea %fp@(-16)
42004: 2f28 000c movel %a0@(12),%sp@-
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
42008: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
status = rtems_io_control(
4200e: 2f28 0008 movel %a0@(8),%sp@-
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
args.buffer = buffer;
42012: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
42018: 2d49 fff0 movel %a1,%fp@(-16)
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
4201c: 4eb9 0004 5a24 jsr 45a24 <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
42022: 4fef 000c lea %sp@(12),%sp
42026: 4a80 tstl %d0
42028: 670c beqs 42036 <devFS_ioctl+0x42> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
4202a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4202c: 4eb9 0004 8898 jsr 48898 <rtems_deviceio_errno> <== NOT EXECUTED
42032: 588f addql #4,%sp <== NOT EXECUTED
42034: 6004 bras 4203a <devFS_ioctl+0x46> <== NOT EXECUTED
return args.ioctl_return;
42036: 202e fffc movel %fp@(-4),%d0
}
4203a: 4e5e unlk %fp
...
00041e6c <devFS_mknod>:
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
41e6c: 7264 moveq #100,%d1
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
41e6e: 4e56 ffdc linkw %fp,#-36
41e72: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
41e76: 246e 0008 moveal %fp@(8),%a2
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
41e7a: 1012 moveb %a2@,%d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
41e7c: 282e 000c movel %fp@(12),%d4
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
41e80: 49c0 extbl %d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
41e82: 2c2e 0010 movel %fp@(16),%d6
41e86: 2a2e 0014 movel %fp@(20),%d5
* condition and do not create the '/dev' and the 'path'
* actually passed in is 'dev', not '/dev'. Just return 0 to
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
41e8a: b280 cmpl %d0,%d1
41e8c: 6624 bnes 41eb2 <devFS_mknod+0x46> <== NEVER TAKEN
41e8e: 123c 0065 moveb #101,%d1
41e92: 102a 0001 moveb %a2@(1),%d0
41e96: 49c0 extbl %d0
41e98: b280 cmpl %d0,%d1
41e9a: 6616 bnes 41eb2 <devFS_mknod+0x46> <== NEVER TAKEN
41e9c: 123c 0076 moveb #118,%d1
41ea0: 102a 0002 moveb %a2@(2),%d0
41ea4: 49c0 extbl %d0
41ea6: b280 cmpl %d0,%d1
41ea8: 6608 bnes 41eb2 <devFS_mknod+0x46> <== NEVER TAKEN
(path[2] == 'v') && (path[3] == '\0'))
41eaa: 4a2a 0003 tstb %a2@(3)
41eae: 6700 00c8 beqw 41f78 <devFS_mknod+0x10c>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
41eb2: 2004 movel %d4,%d0
41eb4: 0280 0000 f000 andil #61440,%d0
41eba: 0c80 0000 6000 cmpil #24576,%d0
41ec0: 6716 beqs 41ed8 <devFS_mknod+0x6c> <== NEVER TAKEN
41ec2: 0c80 0000 2000 cmpil #8192,%d0
41ec8: 670e beqs 41ed8 <devFS_mknod+0x6c> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
41eca: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
41ed0: 7616 moveq #22,%d3 <== NOT EXECUTED
41ed2: 2040 moveal %d0,%a0 <== NOT EXECUTED
41ed4: 2083 movel %d3,%a0@ <== NOT EXECUTED
41ed6: 6066 bras 41f3e <devFS_mknod+0xd2> <== NOT EXECUTED
else
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
41ed8: 206e 0018 moveal %fp@(24),%a0
41edc: 2650 moveal %a0@,%a3
if (!device_name_table)
41ede: 4a8b tstl %a3
41ee0: 670e beqs 41ef0 <devFS_mknod+0x84> <== NEVER TAKEN
41ee2: 284b moveal %a3,%a4
41ee4: 74ff moveq #-1,%d2
41ee6: 4283 clrl %d3
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
41ee8: 4bf9 0004 bc64 lea 4bc64 <strcmp>,%a5
41eee: 6034 bras 41f24 <devFS_mknod+0xb8>
rtems_filesystem_split_dev_t(dev, major, minor);
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
41ef0: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
41ef6: 740e moveq #14,%d2 <== NOT EXECUTED
41ef8: 2240 moveal %d0,%a1 <== NOT EXECUTED
41efa: 2282 movel %d2,%a1@ <== NOT EXECUTED
41efc: 6040 bras 41f3e <devFS_mknod+0xd2> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
41efe: 2014 movel %a4@,%d0
41f00: 671a beqs 41f1c <devFS_mknod+0xb0>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
41f02: 2f00 movel %d0,%sp@-
41f04: 2f0a movel %a2,%sp@-
41f06: 4e95 jsr %a5@
41f08: 508f addql #8,%sp
41f0a: 4a80 tstl %d0
41f0c: 6610 bnes 41f1e <devFS_mknod+0xb2> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EEXIST );
41f0e: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
41f14: 7211 moveq #17,%d1 <== NOT EXECUTED
41f16: 2040 moveal %d0,%a0 <== NOT EXECUTED
41f18: 2081 movel %d1,%a0@ <== NOT EXECUTED
41f1a: 6022 bras 41f3e <devFS_mknod+0xd2> <== NOT EXECUTED
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
slot = i;
41f1c: 2403 movel %d3,%d2
/* Find an empty slot in device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
41f1e: 5283 addql #1,%d3
41f20: 49ec 0014 lea %a4@(20),%a4
41f24: b6b9 0005 99f8 cmpl 599f8 <rtems_device_table_size>,%d3
41f2a: 65d2 bcss 41efe <devFS_mknod+0x92>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
41f2c: 70ff moveq #-1,%d0
41f2e: b082 cmpl %d2,%d0
41f30: 6610 bnes 41f42 <devFS_mknod+0xd6> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
41f32: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
41f38: 2040 moveal %d0,%a0 <== NOT EXECUTED
41f3a: 700c moveq #12,%d0 <== NOT EXECUTED
41f3c: 2080 movel %d0,%a0@ <== NOT EXECUTED
41f3e: 70ff moveq #-1,%d0 <== NOT EXECUTED
41f40: 6038 bras 41f7a <devFS_mknod+0x10e> <== NOT EXECUTED
_ISR_Disable(level);
41f42: 203c 0000 0700 movel #1792,%d0
41f48: 40c3 movew %sr,%d3
41f4a: 8083 orl %d3,%d0
41f4c: 46c0 movew %d0,%sr
device_name_table[slot].device_name = (char *)path;
41f4e: 2002 movel %d2,%d0
41f50: e988 lsll #4,%d0
41f52: 2240 moveal %d0,%a1
41f54: 41f1 2c00 lea %a1@(00000000,%d2:l:4),%a0
41f58: d7c8 addal %a0,%a3
41f5a: 268a movel %a2,%a3@
device_name_table[slot].device_name_length = strlen(path);
41f5c: 2f0a movel %a2,%sp@-
41f5e: 4eb9 0004 c15c jsr 4c15c <strlen>
41f64: 588f addql #4,%sp
41f66: 2740 0004 movel %d0,%a3@(4)
device_name_table[slot].major = major;
41f6a: 2746 0008 movel %d6,%a3@(8)
device_name_table[slot].minor = minor;
41f6e: 2745 000c movel %d5,%a3@(12)
device_name_table[slot].mode = mode;
41f72: 2744 0010 movel %d4,%a3@(16)
_ISR_Enable(level);
41f76: 46c3 movew %d3,%sr
* indicate we are OK.
*/
if ((path[0] == 'd') && (path[1] == 'e') &&
(path[2] == 'v') && (path[3] == '\0'))
return 0;
41f78: 4280 clrl %d0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
41f7a: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
41f80: 4e5e unlk %fp <== NOT EXECUTED
0004207c <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4207c: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED
42080: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
42084: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
4208a: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
4208e: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED
42092: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
42096: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
4209a: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
4209e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
420a4: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
420a8: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
420ae: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED
420b2: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
420b6: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
420ba: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
420be: 4eb9 0004 5b74 jsr 45b74 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
420c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
420c8: 4a80 tstl %d0 <== NOT EXECUTED
420ca: 670c beqs 420d8 <devFS_read+0x5c> <== NOT EXECUTED
return rtems_deviceio_errno(status);
420cc: 2f00 movel %d0,%sp@- <== NOT EXECUTED
420ce: 4eb9 0004 8898 jsr 48898 <rtems_deviceio_errno> <== NOT EXECUTED
420d4: 588f addql #4,%sp <== NOT EXECUTED
420d6: 6004 bras 420dc <devFS_read+0x60> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
420d8: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
420dc: 4e5e unlk %fp <== NOT EXECUTED
000420e0 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
420e0: 4e56 0000 linkw %fp,#0
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
420e4: 206e 0008 moveal %fp@(8),%a0
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
420e8: 226e 000c moveal %fp@(12),%a1
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
420ec: 2050 moveal %a0@,%a0
if (!the_dev)
420ee: 4a88 tstl %a0
420f0: 6610 bnes 42102 <devFS_stat+0x22> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
420f2: 4eb9 0004 ae18 jsr 4ae18 <__errno> <== NOT EXECUTED
420f8: 2040 moveal %d0,%a0 <== NOT EXECUTED
420fa: 700e moveq #14,%d0 <== NOT EXECUTED
420fc: 2080 movel %d0,%a0@ <== NOT EXECUTED
420fe: 70ff moveq #-1,%d0 <== NOT EXECUTED
42100: 6016 bras 42118 <devFS_stat+0x38> <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
42102: 2028 000c movel %a0@(12),%d0
42106: 2368 0008 0016 movel %a0@(8),%a1@(22)
buf->st_mode = the_dev->mode;
4210c: 2368 0010 000c movel %a0@(16),%a1@(12)
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
42112: 2340 001a movel %d0,%a1@(26)
buf->st_mode = the_dev->mode;
return 0;
42116: 4280 clrl %d0
}
42118: 4e5e unlk %fp <== NOT EXECUTED
0004211c <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4211c: 4e56 ffe4 linkw %fp,#-28
42120: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
42124: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
4212a: 2268 0018 moveal %a0@(24),%a1
args.iop = iop;
args.offset = iop->offset;
4212e: 2028 000c movel %a0@(12),%d0
42132: 2228 0010 movel %a0@(16),%d1
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
42136: 486e ffe4 pea %fp@(-28)
4213a: 2f29 000c movel %a1@(12),%sp@-
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
4213e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
42144: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
42148: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4214e: 2d40 ffe8 movel %d0,%fp@(-24)
42152: 2d41 ffec movel %d1,%fp@(-20)
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
42156: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
4215a: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
4215e: 4eb9 0004 5bb8 jsr 45bb8 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
42164: 4fef 000c lea %sp@(12),%sp
42168: 4a80 tstl %d0
4216a: 670c beqs 42178 <devFS_write+0x5c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
4216c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4216e: 4eb9 0004 8898 jsr 48898 <rtems_deviceio_errno> <== NOT EXECUTED
42174: 588f addql #4,%sp <== NOT EXECUTED
42176: 6004 bras 4217c <devFS_write+0x60> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
42178: 202e fffc movel %fp@(-4),%d0
}
4217c: 4e5e unlk %fp <== NOT EXECUTED
0004becc <device_ftruncate>:
rtems_libio_t *iop,
rtems_off64_t length
)
{
return 0;
}
4becc: 4280 clrl %d0 <== NOT EXECUTED
int device_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4bece: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0;
}
4bed2: 4e5e unlk %fp <== NOT EXECUTED
...
0004be72 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
4be72: 4e56 fff0 linkw %fp,#-16
4be76: 206e 0008 moveal %fp@(8),%a0
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
4be7a: 2d48 fff0 movel %a0,%fp@(-16)
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
4be7e: 2068 0018 moveal %a0@(24),%a0
status = rtems_io_control(
4be82: 486e fff0 pea %fp@(-16)
4be86: 2f28 0050 movel %a0@(80),%sp@-
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
4be8a: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
4be90: 2f28 004c movel %a0@(76),%sp@-
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
4be94: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
4be9a: 4eb9 0004 c744 jsr 4c744 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bea0: 4fef 000c lea %sp@(12),%sp
4bea4: 4a80 tstl %d0
4bea6: 670c beqs 4beb4 <device_ioctl+0x42> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
4bea8: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4beaa: 4eb9 0004 c98c jsr 4c98c <rtems_deviceio_errno> <== NOT EXECUTED
4beb0: 588f addql #4,%sp <== NOT EXECUTED
4beb2: 6004 bras 4beb8 <device_ioctl+0x46> <== NOT EXECUTED
return args.ioctl_return;
4beb4: 202e fffc movel %fp@(-4),%d0
}
4beb8: 4e5e unlk %fp <== NOT EXECUTED
0004bdaa <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4bdaa: 4e56 ffe4 linkw %fp,#-28
4bdae: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
4bdb2: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4bdb8: 2268 0018 moveal %a0@(24),%a1
args.iop = iop;
args.offset = iop->offset;
4bdbc: 2028 000c movel %a0@(12),%d0
4bdc0: 2228 0010 movel %a0@(16),%d1
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4bdc4: 486e ffe4 pea %fp@(-28)
4bdc8: 2f29 0050 movel %a1@(80),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
4bdcc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4bdd2: 2f29 004c movel %a1@(76),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
4bdd6: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4bddc: 2d40 ffe8 movel %d0,%fp@(-24)
4bde0: 2d41 ffec movel %d1,%fp@(-20)
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
4bde4: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
4bde8: 42ae fffc clrl %fp@(-4)
status = rtems_io_read(
4bdec: 4eb9 0004 c7cc jsr 4c7cc <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4bdf2: 4fef 000c lea %sp@(12),%sp
4bdf6: 4a80 tstl %d0
4bdf8: 670c beqs 4be06 <device_read+0x5c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
4bdfa: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bdfc: 4eb9 0004 c98c jsr 4c98c <rtems_deviceio_errno> <== NOT EXECUTED
4be02: 588f addql #4,%sp <== NOT EXECUTED
4be04: 6004 bras 4be0a <device_read+0x60> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
4be06: 202e fffc movel %fp@(-4),%d0
}
4be0a: 4e5e unlk %fp <== NOT EXECUTED
0004be0e <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4be0e: 4e56 ffe4 linkw %fp,#-28
4be12: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4be16: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4be1c: 2268 0018 moveal %a0@(24),%a1
args.iop = iop;
args.offset = iop->offset;
4be20: 2028 000c movel %a0@(12),%d0
4be24: 2228 0010 movel %a0@(16),%d1
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
4be28: 486e ffe4 pea %fp@(-28)
4be2c: 2f29 0050 movel %a1@(80),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
4be30: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
4be36: 2f29 004c movel %a1@(76),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
4be3a: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4be40: 2d40 ffe8 movel %d0,%fp@(-24)
4be44: 2d41 ffec movel %d1,%fp@(-20)
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
4be48: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
4be4c: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
4be50: 4eb9 0004 c810 jsr 4c810 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4be56: 4fef 000c lea %sp@(12),%sp
4be5a: 4a80 tstl %d0
4be5c: 670c beqs 4be6a <device_write+0x5c> <== ALWAYS TAKEN
return rtems_deviceio_errno(status);
4be5e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4be60: 4eb9 0004 c98c jsr 4c98c <rtems_deviceio_errno> <== NOT EXECUTED
4be66: 588f addql #4,%sp <== NOT EXECUTED
4be68: 6004 bras 4be6e <device_write+0x60> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
4be6a: 202e fffc movel %fp@(-4),%d0
}
4be6e: 4e5e unlk %fp <== NOT EXECUTED
000436e8 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
436e8: 4e56 fff4 linkw %fp,#-12
436ec: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
436f0: 246e 0008 moveal %fp@(8),%a2
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
436f4: 4aaa 00b4 tstl %a2@(180)
436f8: 674e beqs 43748 <drainOutput+0x60>
rtems_interrupt_disable (level);
436fa: 243c 0000 0700 movel #1792,%d2
43700: 2202 movel %d2,%d1
43702: 40c0 movew %sr,%d0
43704: 8280 orl %d0,%d1
43706: 46c1 movew %d1,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
43708: 47f9 0004 5770 lea 45770 <rtems_semaphore_obtain>,%a3
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
4370e: 602a bras 4373a <drainOutput+0x52>
tty->rawOutBufState = rob_wait;
43710: 7202 moveq #2,%d1
43712: 2541 0094 movel %d1,%a2@(148)
rtems_interrupt_enable (level);
43716: 46c0 movew %d0,%sr
sc = rtems_semaphore_obtain(
43718: 42a7 clrl %sp@-
4371a: 42a7 clrl %sp@-
4371c: 2f2a 008c movel %a2@(140),%sp@-
43720: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43722: 4fef 000c lea %sp@(12),%sp
43726: 4a80 tstl %d0
43728: 6708 beqs 43732 <drainOutput+0x4a> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
4372a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4372c: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
43732: 2202 movel %d2,%d1
43734: 40c0 movew %sr,%d0
43736: 8280 orl %d0,%d1
43738: 46c1 movew %d1,%sr
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
4373a: 206a 0084 moveal %a2@(132),%a0
4373e: 222a 0080 movel %a2@(128),%d1
43742: b288 cmpl %a0,%d1
43744: 66ca bnes 43710 <drainOutput+0x28>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
43746: 46c0 movew %d0,%sr
}
}
43748: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4374e: 4e5e unlk %fp <== NOT EXECUTED
00042cec <dup2>:
int dup2(
int fildes,
int fildes2
)
{
42cec: 4e56 ffa8 linkw %fp,#-88
42cf0: 48d7 041c moveml %d2-%d4/%a2,%sp@
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
42cf4: 280e movel %fp,%d4
42cf6: 0684 ffff ffba addil #-70,%d4
42cfc: 45f9 0004 343c lea 4343c <fstat>,%a2
42d02: 2f04 movel %d4,%sp@-
int dup2(
int fildes,
int fildes2
)
{
42d04: 242e 0008 movel %fp@(8),%d2
42d08: 262e 000c movel %fp@(12),%d3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
42d0c: 2f02 movel %d2,%sp@-
42d0e: 4e92 jsr %a2@
if ( status == -1 )
42d10: 508f addql #8,%sp
42d12: 72ff moveq #-1,%d1
42d14: b280 cmpl %d0,%d1
42d16: 6720 beqs 42d38 <dup2+0x4c> <== NEVER TAKEN
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
42d18: 2f04 movel %d4,%sp@-
42d1a: 2f03 movel %d3,%sp@-
42d1c: 4e92 jsr %a2@
if ( status == -1 )
42d1e: 508f addql #8,%sp
42d20: 72ff moveq #-1,%d1
42d22: b280 cmpl %d0,%d1
42d24: 6712 beqs 42d38 <dup2+0x4c> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
42d26: 2f03 movel %d3,%sp@- <== NOT EXECUTED
42d28: 42a7 clrl %sp@- <== NOT EXECUTED
42d2a: 2f02 movel %d2,%sp@- <== NOT EXECUTED
42d2c: 4eb9 0004 30e8 jsr 430e8 <fcntl> <== NOT EXECUTED
42d32: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
42d36: 6002 bras 42d3a <dup2+0x4e> <== NOT EXECUTED
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
if ( status == -1 )
return -1;
42d38: 70ff moveq #-1,%d0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
42d3a: 4cee 041c ffa8 moveml %fp@(-88),%d2-%d4/%a2
42d40: 4e5e unlk %fp <== NOT EXECUTED
00044210 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44210: 4e56 fff0 linkw %fp,#-16
44214: 48d7 040c moveml %d2-%d3/%a2,%sp@
44218: 246e 000c moveal %fp@(12),%a2
if ((tty->termios.c_lflag & ECHOCTL) &&
4421c: 202a 003c movel %a2@(60),%d0
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44220: 242e 0008 movel %fp@(8),%d2
if ((tty->termios.c_lflag & ECHOCTL) &&
44224: 0280 0000 0200 andil #512,%d0
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
4422a: 1202 moveb %d2,%d1
if ((tty->termios.c_lflag & ECHOCTL) &&
4422c: 4a80 tstl %d0
4422e: 674e beqs 4427e <echo+0x6e> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
44230: 4280 clrl %d0
44232: 1002 moveb %d2,%d0
44234: 2079 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a0
4423a: 1630 0801 moveb %a0@(00000001,%d0:l),%d3
4423e: 49c3 extbl %d3
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
44240: 0803 0005 btst #5,%d3
44244: 6738 beqs 4427e <echo+0x6e>
iscntrl(c) && (c != '\t') && (c != '\n')) {
44246: 7609 moveq #9,%d3
44248: b680 cmpl %d0,%d3
4424a: 6732 beqs 4427e <echo+0x6e>
4424c: 163c 000a moveb #10,%d3
44250: b680 cmpl %d0,%d3
44252: 672a beqs 4427e <echo+0x6e>
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44254: 2f0a movel %a2,%sp@-
44256: 4878 0002 pea 2 <DOUBLE_FLOAT>
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
4425a: 163c 0040 moveb #64,%d3
rtems_termios_puts (echobuf, 2, tty);
4425e: 486e fffe pea %fp@(-2)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44262: 705e moveq #94,%d0
echobuf[1] = c ^ 0x40;
44264: b782 eorl %d3,%d2
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44266: 1d40 fffe moveb %d0,%fp@(-2)
echobuf[1] = c ^ 0x40;
4426a: 1d42 ffff moveb %d2,%fp@(-1)
rtems_termios_puts (echobuf, 2, tty);
4426e: 4eb9 0004 3fce jsr 43fce <rtems_termios_puts>
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
44274: 4fef 000c lea %sp@(12),%sp
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
44278: 54aa 0028 addql #2,%a2@(40)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
4427c: 6010 bras 4428e <echo+0x7e>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
4427e: 2f0a movel %a2,%sp@-
44280: 0281 0000 00ff andil #255,%d1
44286: 2f01 movel %d1,%sp@-
44288: 4eba fe3c jsr %pc@(440c6 <oproc>)
4428c: 508f addql #8,%sp
}
}
4428e: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
44294: 4e5e unlk %fp <== NOT EXECUTED
0004367e <endgrent>:
void endgrent(void)
{
4367e: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
43682: 2039 0005 e900 movel 5e900 <group_fp>,%d0
43688: 670a beqs 43694 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
4368a: 2f00 movel %d0,%sp@-
4368c: 4eb9 0004 d8fe jsr 4d8fe <fclose>
43692: 588f addql #4,%sp
}
43694: 4e5e unlk %fp <== NOT EXECUTED
00043538 <endpwent>:
void endpwent(void)
{
43538: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
4353c: 2039 0005 e9da movel 5e9da <passwd_fp>,%d0
43542: 670a beqs 4354e <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
43544: 2f00 movel %d0,%sp@-
43546: 4eb9 0004 d8fe jsr 4d8fe <fclose>
4354c: 588f addql #4,%sp
}
4354e: 4e5e unlk %fp <== NOT EXECUTED
00044298 <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)
{
44298: 4e56 ffe4 linkw %fp,#-28
4429c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
442a0: 246e 0008 moveal %fp@(8),%a2
442a4: 262e 000c movel %fp@(12),%d3
if (tty->ccount == 0)
442a8: 4aaa 0020 tstl %a2@(32)
442ac: 6700 0172 beqw 44420 <erase+0x188>
return;
if (lineFlag) {
442b0: 4a83 tstl %d3
442b2: 6700 015c beqw 44410 <erase+0x178>
if (!(tty->termios.c_lflag & ECHO)) {
442b6: 202a 003c movel %a2@(60),%d0
442ba: 44c0 movew %d0,%ccr
442bc: 6b08 bmis 442c6 <erase+0x2e> <== ALWAYS TAKEN
tty->ccount = 0;
442be: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
return;
442c2: 6000 015c braw 44420 <erase+0x188> <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
442c6: 0800 0004 btst #4,%d0
442ca: 6600 0144 bnew 44410 <erase+0x178>
tty->ccount = 0;
442ce: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
442d2: 4280 clrl %d0 <== NOT EXECUTED
442d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
442d6: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED
442da: 2f00 movel %d0,%sp@- <== NOT EXECUTED
442dc: 4eba ff32 jsr %pc@(44210 <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
442e0: 508f addql #8,%sp <== NOT EXECUTED
442e2: 7020 moveq #32,%d0 <== NOT EXECUTED
442e4: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED
442e8: 6700 0136 beqw 44420 <erase+0x188> <== NOT EXECUTED
echo ('\n', tty);
442ec: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
442f0: 700a moveq #10,%d0 <== NOT EXECUTED
442f2: 602c bras 44320 <erase+0x88> <== NOT EXECUTED
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
442f4: 5388 subql #1,%a0
442f6: 286a 001c moveal %a2@(28),%a4
if (tty->termios.c_lflag & ECHO) {
442fa: 202a 003c movel %a2@(60),%d0
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
442fe: 2548 0020 movel %a0,%a2@(32)
44302: 1434 8800 moveb %a4@(00000000,%a0:l),%d2
if (tty->termios.c_lflag & ECHO) {
44306: 44c0 movew %d0,%ccr
44308: 6a00 0100 bplw 4440a <erase+0x172>
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
4430c: 4a83 tstl %d3
4430e: 6620 bnes 44330 <erase+0x98>
44310: 0800 0004 btst #4,%d0
44314: 661a bnes 44330 <erase+0x98> <== ALWAYS TAKEN
echo (tty->termios.c_cc[VERASE], tty);
44316: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
4431a: 4280 clrl %d0 <== NOT EXECUTED
4431c: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
44320: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44324: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
4432a: 4e5e unlk %fp <== NOT EXECUTED
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
4432c: 6000 fee2 braw 44210 <echo> <== NOT EXECUTED
44330: 2279 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a1
} else if (c == '\t') {
44336: 7209 moveq #9,%d1
44338: 0282 0000 00ff andil #255,%d2
4433e: b282 cmpl %d2,%d1
44340: 665a bnes 4439c <erase+0x104>
int col = tty->read_start_column;
44342: 242a 002c movel %a2@(44),%d2
int i = 0;
44346: 4201 clrb %d1
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
44348: 0280 0000 0200 andil #512,%d0
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
4434e: 6028 bras 44378 <erase+0xe0>
c = tty->cbuf[i++];
if (c == '\t') {
44350: 4284 clrl %d4
44352: 181c moveb %a4@+,%d4
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
44354: 5281 addql #1,%d1
if (c == '\t') {
44356: 7a09 moveq #9,%d5
44358: ba84 cmpl %d4,%d5
4435a: 6606 bnes 44362 <erase+0xca>
col = (col | 7) + 1;
4435c: 7807 moveq #7,%d4
4435e: 8484 orl %d4,%d2
44360: 6014 bras 44376 <erase+0xde>
} else if (iscntrl (c)) {
44362: 1831 4801 moveb %a1@(00000001,%d4:l),%d4
44366: 49c4 extbl %d4
44368: 0804 0005 btst #5,%d4
4436c: 6708 beqs 44376 <erase+0xde> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
4436e: 4a80 tstl %d0 <== NOT EXECUTED
44370: 6706 beqs 44378 <erase+0xe0> <== NOT EXECUTED
col += 2;
44372: 5482 addql #2,%d2 <== NOT EXECUTED
44374: 6002 bras 44378 <erase+0xe0> <== NOT EXECUTED
} else {
col++;
44376: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44378: b1c1 cmpal %d1,%a0
4437a: 66d4 bnes 44350 <erase+0xb8>
4437c: 6016 bras 44394 <erase+0xfc>
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
4437e: 2f0a movel %a2,%sp@-
44380: 4878 0001 pea 1 <ADD>
44384: 4879 0005 b213 pea 5b213 <rtems_filesystem_default_pathconf+0x3f>
4438a: 4e93 jsr %a3@
tty->column--;
4438c: 4fef 000c lea %sp@(12),%sp
44390: 53aa 0028 subql #1,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44394: b4aa 0028 cmpl %a2@(40),%d2
44398: 6de4 blts 4437e <erase+0xe6>
4439a: 606e bras 4440a <erase+0x172>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
4439c: 5282 addql #1,%d2
4439e: 1231 2800 moveb %a1@(00000000,%d2:l),%d1
443a2: 49c1 extbl %d1
443a4: 0801 0005 btst #5,%d1
443a8: 6724 beqs 443ce <erase+0x136> <== ALWAYS TAKEN
443aa: 0800 0009 btst #9,%d0 <== NOT EXECUTED
443ae: 671e beqs 443ce <erase+0x136> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
443b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
443b2: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED
443b6: 4879 0005 b211 pea 5b211 <rtems_filesystem_default_pathconf+0x3d><== NOT EXECUTED
443bc: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
443be: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
443c2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
443c6: 6706 beqs 443ce <erase+0x136> <== NOT EXECUTED
tty->column--;
443c8: 5380 subql #1,%d0 <== NOT EXECUTED
443ca: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
443ce: 2079 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a0
443d4: 1030 2800 moveb %a0@(00000000,%d2:l),%d0
443d8: 49c0 extbl %d0
443da: 0800 0005 btst #5,%d0
443de: 670c beqs 443ec <erase+0x154> <== ALWAYS TAKEN
443e0: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED
443e4: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED
443ea: 671e beqs 4440a <erase+0x172> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
443ec: 2f0a movel %a2,%sp@-
443ee: 4878 0003 pea 3 <DIVIDE>
443f2: 4879 0005 b211 pea 5b211 <rtems_filesystem_default_pathconf+0x3d>
443f8: 4e93 jsr %a3@
if (tty->column)
443fa: 202a 0028 movel %a2@(40),%d0
443fe: 4fef 000c lea %sp@(12),%sp
44402: 6706 beqs 4440a <erase+0x172> <== NEVER TAKEN
tty->column--;
44404: 5380 subql #1,%d0
44406: 2540 0028 movel %d0,%a2@(40)
}
}
}
if (!lineFlag)
4440a: 4a83 tstl %d3
4440c: 6608 bnes 44416 <erase+0x17e>
4440e: 6010 bras 44420 <erase+0x188>
rtems_termios_puts ("\b \b", 3, tty);
if (tty->column)
tty->column--;
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
44410: 47f9 0004 3fce lea 43fce <rtems_termios_puts>,%a3
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
44416: 206a 0020 moveal %a2@(32),%a0
4441a: 4a88 tstl %a0
4441c: 6600 fed6 bnew 442f4 <erase+0x5c>
}
}
if (!lineFlag)
break;
}
}
44420: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
44426: 4e5e unlk %fp <== NOT EXECUTED
000433e4 <fchmod>:
int fchmod(
int fd,
mode_t mode
)
{
433e4: 4e56 0000 linkw %fp,#0
433e8: 202e 0008 movel %fp@(8),%d0
433ec: 222e 000c movel %fp@(12),%d1
433f0: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
433f2: b0b9 0005 d424 cmpl 5d424 <rtems_libio_number_iops>,%d0
433f8: 641a bccs 43414 <fchmod+0x30> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
433fa: 2400 movel %d0,%d2
433fc: ed88 lsll #6,%d0
433fe: e78a lsll #3,%d2
43400: 2079 0005 eb34 moveal 5eb34 <rtems_libio_iops>,%a0
43406: 9082 subl %d2,%d0
43408: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
4340a: 2028 0014 movel %a0@(20),%d0
4340e: 0800 0008 btst #8,%d0
43412: 660e bnes 43422 <fchmod+0x3e>
43414: 4eb9 0004 d83c jsr 4d83c <__errno>
4341a: 7209 moveq #9,%d1
4341c: 2040 moveal %d0,%a0
4341e: 2081 movel %d1,%a0@
43420: 602e bras 43450 <fchmod+0x6c>
/*
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43422: 44c0 movew %d0,%ccr
43424: 670e beqs 43434 <fchmod+0x50>
43426: 4eb9 0004 d83c jsr 4d83c <__errno>
4342c: 2040 moveal %d0,%a0
4342e: 7016 moveq #22,%d0
43430: 2080 movel %d0,%a0@
43432: 601c bras 43450 <fchmod+0x6c>
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
43434: 2268 0020 moveal %a0@(32),%a1
43438: 41e8 0018 lea %a0@(24),%a0
}
4343c: 242e fffc movel %fp@(-4),%d2
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
43440: 2d41 000c movel %d1,%fp@(12)
43444: 2269 001c moveal %a1@(28),%a1
43448: 2d48 0008 movel %a0,%fp@(8)
}
4344c: 4e5e unlk %fp
* Now process the fchmod().
*/
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
4344e: 4ed1 jmp %a1@
}
43450: 242e fffc movel %fp@(-4),%d2
43454: 70ff moveq #-1,%d0
43456: 4e5e unlk %fp
...
000430e8 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
430e8: 4e56 fff0 linkw %fp,#-16
430ec: 202e 0008 movel %fp@(8),%d0
int ret;
va_list ap;
va_start( ap, cmd );
430f0: 41ee 0010 lea %fp@(16),%a0
int fcntl(
int fd,
int cmd,
...
)
{
430f4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
430f8: 262e 000c movel %fp@(12),%d3
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
430fc: 2239 0005 dad4 movel 5dad4 <rtems_libio_number_iops>,%d1
43102: b280 cmpl %d0,%d1
43104: 631c blss 43122 <fcntl+0x3a>
iop = rtems_libio_iop( fd );
43106: 2400 movel %d0,%d2
43108: ed88 lsll #6,%d0
4310a: e78a lsll #3,%d2
4310c: 2679 0005 f1e4 moveal 5f1e4 <rtems_libio_iops>,%a3
43112: 9082 subl %d2,%d0
43114: 45f3 0800 lea %a3@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
43118: 202a 0014 movel %a2@(20),%d0
4311c: 0800 0008 btst #8,%d0
43120: 6610 bnes 43132 <fcntl+0x4a>
43122: 4eb9 0004 d954 jsr 4d954 <__errno>
43128: 7209 moveq #9,%d1
4312a: 2040 moveal %d0,%a0
4312c: 2081 movel %d1,%a0@
4312e: 6000 0110 braw 43240 <fcntl+0x158>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43132: 7409 moveq #9,%d2
43134: b483 cmpl %d3,%d2
43136: 6500 00d8 bcsw 43210 <fcntl+0x128>
4313a: 327b 3a06 moveaw %pc@(43142 <fcntl+0x5a>,%d3:l:2),%a1
4313e: 4efb 9802 jmp %pc@(43142 <fcntl+0x5a>,%a1:l)
43142: 0014 024 <== NOT EXECUTED
43144: 006c 0154 <== NOT EXECUTED
43146: 0078 0170 <== NOT EXECUTED
43148: 008c 009a 00be oril #10092734,%d4 <== NOT EXECUTED
4314e: 00be 00be 00be oril #12452030,%d6 <== NOT EXECUTED
43154: 00be 2410 6710 oril #605054736,%d6 <== NOT EXECUTED
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
4315a: b282 cmpl %d2,%d1 <== NOT EXECUTED
4315c: 631c blss 4317a <fcntl+0x92> <== NOT EXECUTED
4315e: 2002 movel %d2,%d0 <== NOT EXECUTED
43160: ed8a lsll #6,%d2 <== NOT EXECUTED
43162: e788 lsll #3,%d0 <== NOT EXECUTED
43164: 9480 subl %d0,%d2 <== NOT EXECUTED
43166: d7c2 addal %d2,%a3 <== NOT EXECUTED
43168: 6012 bras 4317c <fcntl+0x94> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
4316a: 4eb9 0004 3724 jsr 43724 <rtems_libio_allocate>
43170: 2640 moveal %d0,%a3
if ( diop == 0 ) {
43172: 4a80 tstl %d0
43174: 6606 bnes 4317c <fcntl+0x94> <== ALWAYS TAKEN
43176: 6000 00c8 braw 43240 <fcntl+0x158> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
4317a: 97cb subal %a3,%a3 <== NOT EXECUTED
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
4317c: 240b movel %a3,%d2
ret = -1;
break;
}
}
diop->flags = iop->flags;
4317e: 276a 0014 0014 movel %a2@(20),%a3@(20)
diop->pathinfo = iop->pathinfo;
43184: 4878 0014 pea 14 <OPER2>
43188: 486a 0018 pea %a2@(24)
4318c: 486b 0018 pea %a3@(24)
43190: 4eb9 0004 eba8 jsr 4eba8 <memcpy>
ret = (int) (diop - rtems_libio_iops);
43196: 4fef 000c lea %sp@(12),%sp
4319a: 94b9 0005 f1e4 subl 5f1e4 <rtems_libio_iops>,%d2
431a0: 203c b6db 6db7 movel #-1227133513,%d0
431a6: e682 asrl #3,%d2
431a8: 4c00 2800 mulsl %d0,%d2
431ac: 6070 bras 4321e <fcntl+0x136>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
431ae: 0800 000b btst #11,%d0
431b2: 56c2 sne %d2
431b4: 49c2 extbl %d2
431b6: 4482 negl %d2
431b8: 6068 bras 43222 <fcntl+0x13a>
* 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 ) )
431ba: 4a90 tstl %a0@
431bc: 6706 beqs 431c4 <fcntl+0xdc> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
431be: 08c0 000b bset #11,%d0
431c2: 6004 bras 431c8 <fcntl+0xe0>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
431c4: 0880 000b bclr #11,%d0 <== NOT EXECUTED
431c8: 2540 0014 movel %d0,%a2@(20)
431cc: 602e bras 431fc <fcntl+0x114>
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
431ce: 2f00 movel %d0,%sp@-
431d0: 4eb9 0004 36d6 jsr 436d6 <rtems_libio_to_fcntl_flags>
431d6: 588f addql #4,%sp
431d8: 2400 movel %d0,%d2
431da: 6042 bras 4321e <fcntl+0x136>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
431dc: 2f10 movel %a0@,%sp@-
431de: 4eb9 0004 3696 jsr 43696 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
431e4: 222a 0014 movel %a2@(20),%d1
431e8: 588f addql #4,%sp
431ea: 0280 0000 0201 andil #513,%d0
431f0: 0281 ffff fdfe andil #-514,%d1
431f6: 8081 orl %d1,%d0
431f8: 2540 0014 movel %d0,%a2@(20)
rtems_libio_t *iop;
rtems_libio_t *diop;
int fd2;
int flags;
int mask;
int ret = 0;
431fc: 4282 clrl %d2
431fe: 6022 bras 43222 <fcntl+0x13a>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43200: 4eb9 0004 d954 jsr 4d954 <__errno>
43206: 2040 moveal %d0,%a0
43208: 20bc 0000 0086 movel #134,%a0@
4320e: 6030 bras 43240 <fcntl+0x158>
ret = -1;
break;
default:
errno = EINVAL;
43210: 4eb9 0004 d954 jsr 4d954 <__errno>
43216: 2040 moveal %d0,%a0
43218: 7016 moveq #22,%d0
4321a: 2080 movel %d0,%a0@
4321c: 6022 bras 43240 <fcntl+0x158>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
4321e: 4a82 tstl %d2
43220: 6d20 blts 43242 <fcntl+0x15a> <== NEVER TAKEN
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43222: 206a 0020 moveal %a2@(32),%a0
43226: 2f0a movel %a2,%sp@-
43228: 2f03 movel %d3,%sp@-
4322a: 2068 0030 moveal %a0@(48),%a0
4322e: 4e90 jsr %a0@
if (err) {
43230: 508f addql #8,%sp
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43232: 2600 movel %d0,%d3
if (err) {
43234: 670c beqs 43242 <fcntl+0x15a> <== ALWAYS TAKEN
errno = err;
43236: 4eb9 0004 d954 jsr 4d954 <__errno> <== NOT EXECUTED
4323c: 2040 moveal %d0,%a0 <== NOT EXECUTED
4323e: 2083 movel %d3,%a0@ <== NOT EXECUTED
ret = -1;
43240: 74ff moveq #-1,%d2
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
43242: 2002 movel %d2,%d0
43244: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4324a: 4e5e unlk %fp <== NOT EXECUTED
0004ad0e <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4ad0e: 4e56 ffd8 linkw %fp,#-40
4ad12: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
4ad16: 266e 0008 moveal %fp@(8),%a3
4ad1a: 286e 000c moveal %fp@(12),%a4
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
4ad1e: 4eba fe44 jsr %pc@(4ab64 <pipe_lock>)
4ad22: 2400 movel %d0,%d2
if (err)
4ad24: 6600 0342 bnew 4b068 <fifo_open+0x35a>
return err;
pipe = *pipep;
4ad28: 2453 moveal %a3@,%a2
if (pipe == NULL) {
4ad2a: 4a8a tstl %a2
4ad2c: 6600 0166 bnew 4ae94 <fifo_open+0x186>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4ad30: 4878 0034 pea 34 <OPER2+0x20>
4ad34: 263c 0004 3d00 movel #277760,%d3
4ad3a: 2043 moveal %d3,%a0
4ad3c: 4e90 jsr %a0@
if (pipe == NULL)
4ad3e: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4ad40: 2440 moveal %d0,%a2
4ad42: 2a40 moveal %d0,%a5
if (pipe == NULL)
4ad44: 4a80 tstl %d0
4ad46: 6700 0148 beqw 4ae90 <fifo_open+0x182>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4ad4a: 4878 0034 pea 34 <OPER2+0x20>
4ad4e: 42a7 clrl %sp@-
4ad50: 2f00 movel %d0,%sp@-
4ad52: 4eb9 0004 ec30 jsr 4ec30 <memset>
pipe->Size = PIPE_BUF;
4ad58: 203c 0000 0200 movel #512,%d0
pipe->Buffer = malloc(pipe->Size);
4ad5e: 2043 moveal %d3,%a0
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
4ad60: 2540 0004 movel %d0,%a2@(4)
pipe->Buffer = malloc(pipe->Size);
4ad64: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb>
4ad68: 4e90 jsr %a0@
if (! pipe->Buffer)
4ad6a: 4fef 0010 lea %sp@(16),%sp
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4ad6e: 2480 movel %d0,%a2@
if (! pipe->Buffer)
4ad70: 6700 0114 beqw 4ae86 <fifo_open+0x178>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ad74: 486a 002c pea %a2@(44)
4ad78: 263c 0004 c770 movel #313200,%d3
4ad7e: 2043 moveal %d3,%a0
rtems_build_name ('P', 'I', 'r', c),
4ad80: 1039 0005 d7e4 moveb 5d7e4 <c.6318>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ad86: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4ad88: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4ad8a: 42a7 clrl %sp@-
4ad8c: 0080 5049 7200 oril #1346990592,%d0
4ad92: 2f00 movel %d0,%sp@-
4ad94: 4e90 jsr %a0@
4ad96: 4fef 0010 lea %sp@(16),%sp
4ad9a: 4a80 tstl %d0
4ad9c: 6600 00de bnew 4ae7c <fifo_open+0x16e>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4ada0: 486a 0030 pea %a2@(48)
4ada4: 2043 moveal %d3,%a0
rtems_build_name ('P', 'I', 'w', c),
4ada6: 1039 0005 d7e4 moveb 5d7e4 <c.6318>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4adac: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4adae: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4adb0: 42a7 clrl %sp@-
4adb2: 0080 5049 7700 oril #1346991872,%d0
4adb8: 2f00 movel %d0,%sp@-
4adba: 4e90 jsr %a0@
4adbc: 4fef 0010 lea %sp@(16),%sp
4adc0: 4a80 tstl %d0
4adc2: 6600 00ac bnew 4ae70 <fifo_open+0x162>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4adc6: 486a 0028 pea %a2@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4adca: 1039 0005 d7e4 moveb 5d7e4 <c.6318>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4add0: 42a7 clrl %sp@-
4add2: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4add6: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4add8: 4878 0001 pea 1 <ADD>
4addc: 0080 5049 7300 oril #1346990848,%d0
4ade2: 2f00 movel %d0,%sp@-
4ade4: 4eb9 0004 68d0 jsr 468d0 <rtems_semaphore_create>
4adea: 4fef 0014 lea %sp@(20),%sp
4adee: 4a80 tstl %d0
4adf0: 6672 bnes 4ae64 <fifo_open+0x156>
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
4adf2: 280e movel %fp,%d4
4adf4: 5184 subql #8,%d4
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
4adf6: 263c 0004 81e8 movel #295400,%d3
4adfc: 2043 moveal %d3,%a0
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4adfe: 4bf9 0004 89d6 lea 489d6 <_Thread_Enable_dispatch>,%a5
4ae04: 2f04 movel %d4,%sp@-
4ae06: 2f2a 002c movel %a2@(44),%sp@-
4ae0a: 4879 0005 f782 pea 5f782 <_Barrier_Information>
4ae10: 4e90 jsr %a0@
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4ae12: 223c 1000 0000 movel #268435456,%d1
4ae18: 2040 moveal %d0,%a0
4ae1a: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4ae1e: 4e95 jsr %a5@
4ae20: 2043 moveal %d3,%a0
4ae22: 2f04 movel %d4,%sp@-
4ae24: 2f2a 0030 movel %a2@(48),%sp@-
4ae28: 4879 0005 f782 pea 5f782 <_Barrier_Information>
4ae2e: 4e90 jsr %a0@
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4ae30: 223c 1000 0000 movel #268435456,%d1
4ae36: 2040 moveal %d0,%a0
4ae38: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4ae3c: 4e95 jsr %a5@
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4ae3e: 4fef 0018 lea %sp@(24),%sp
4ae42: 1039 0005 d7e4 moveb 5d7e4 <c.6318>,%d0
4ae48: 49c0 extbl %d0
4ae4a: 2200 movel %d0,%d1
4ae4c: 5281 addql #1,%d1
4ae4e: 13c1 0005 d7e4 moveb %d1,5d7e4 <c.6318>
4ae54: 727a moveq #122,%d1
4ae56: b280 cmpl %d0,%d1
4ae58: 663a bnes 4ae94 <fifo_open+0x186>
c = 'a';
4ae5a: 7061 moveq #97,%d0
4ae5c: 13c0 0005 d7e4 moveb %d0,5d7e4 <c.6318>
4ae62: 6030 bras 4ae94 <fifo_open+0x186>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4ae64: 2f2a 0030 movel %a2@(48),%sp@-
4ae68: 4eb9 0004 c820 jsr 4c820 <rtems_barrier_delete>
4ae6e: 588f addql #4,%sp
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
4ae70: 2f2d 002c movel %a5@(44),%sp@-
4ae74: 4eb9 0004 c820 jsr 4c820 <rtems_barrier_delete>
4ae7a: 588f addql #4,%sp
err_rbar:
free(pipe->Buffer);
4ae7c: 2f15 movel %a5@,%sp@-
4ae7e: 4eb9 0004 37b0 jsr 437b0 <free>
4ae84: 588f addql #4,%sp
err_buf:
free(pipe);
4ae86: 2f0d movel %a5,%sp@-
4ae88: 4eb9 0004 37b0 jsr 437b0 <free>
4ae8e: 588f addql #4,%sp
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4ae90: 74f4 moveq #-12,%d2
4ae92: 602c bras 4aec0 <fifo_open+0x1b2>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4ae94: 42a7 clrl %sp@-
4ae96: 42a7 clrl %sp@-
4ae98: 2f2a 0028 movel %a2@(40),%sp@-
4ae9c: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
4aea2: 4fef 000c lea %sp@(12),%sp
4aea6: 4a80 tstl %d0
4aea8: 6702 beqs 4aeac <fifo_open+0x19e> <== ALWAYS TAKEN
err = -EINTR;
4aeaa: 74fc moveq #-4,%d2 <== NOT EXECUTED
if (*pipep == NULL) {
4aeac: 4a93 tstl %a3@
4aeae: 6610 bnes 4aec0 <fifo_open+0x1b2>
if (err)
4aeb0: 4a82 tstl %d2
4aeb2: 670a beqs 4aebe <fifo_open+0x1b0> <== ALWAYS TAKEN
pipe_free(pipe);
4aeb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4aeb6: 4eba fd34 jsr %pc@(4abec <pipe_free>) <== NOT EXECUTED
4aeba: 588f addql #4,%sp <== NOT EXECUTED
4aebc: 6002 bras 4aec0 <fifo_open+0x1b2> <== NOT EXECUTED
else
*pipep = pipe;
4aebe: 268a movel %a2,%a3@
}
out:
pipe_unlock();
4aec0: 4eba fd72 jsr %pc@(4ac34 <pipe_unlock>)
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4aec4: 4a82 tstl %d2
4aec6: 6600 01a0 bnew 4b068 <fifo_open+0x35a>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4aeca: 7006 moveq #6,%d0
4aecc: 7204 moveq #4,%d1
4aece: c0ac 0014 andl %a4@(20),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4aed2: 2453 moveal %a3@,%a2
switch (LIBIO_ACCMODE(iop)) {
4aed4: b280 cmpl %d0,%d1
4aed6: 6700 009c beqw 4af74 <fifo_open+0x266>
4aeda: 123c 0006 moveb #6,%d1
4aede: b280 cmpl %d0,%d1
4aee0: 6700 0122 beqw 4b004 <fifo_open+0x2f6>
4aee4: 123c 0002 moveb #2,%d1
4aee8: b280 cmpl %d0,%d1
4aeea: 6600 0160 bnew 4b04c <fifo_open+0x33e>
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4aeee: 202a 0010 movel %a2@(16),%d0
4aef2: 2040 moveal %d0,%a0
4aef4: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4aef6: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4aefa: 2548 0010 movel %a0,%a2@(16)
4aefe: 4a80 tstl %d0
4af00: 6610 bnes 4af12 <fifo_open+0x204> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4af02: 486e fffc pea %fp@(-4)
4af06: 2f2a 0030 movel %a2@(48),%sp@-
4af0a: 4eb9 0004 c8bc jsr 4c8bc <rtems_barrier_release>
4af10: 508f addql #8,%sp
if (pipe->Writers == 0) {
4af12: 4aaa 0014 tstl %a2@(20)
4af16: 6600 0134 bnew 4b04c <fifo_open+0x33e>
/* Not an error */
if (LIBIO_NODELAY(iop))
4af1a: 7001 moveq #1,%d0
4af1c: c0ac 0014 andl %a4@(20),%d0
4af20: 6600 012a bnew 4b04c <fifo_open+0x33e>
break;
prevCounter = pipe->writerCounter;
4af24: 2a2a 0024 movel %a2@(36),%d5
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
4af28: 4bf9 0004 6b08 lea 46b08 <rtems_semaphore_obtain>,%a5
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4af2e: 283c 0004 6c10 movel #289808,%d4
if (! PIPE_READWAIT(pipe))
4af34: 263c 0004 c920 movel #313632,%d3
prevCounter = pipe->writerCounter;
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4af3a: 2f2a 0028 movel %a2@(40),%sp@-
4af3e: 2044 moveal %d4,%a0
4af40: 4e90 jsr %a0@
if (! PIPE_READWAIT(pipe))
4af42: 2043 moveal %d3,%a0
4af44: 42a7 clrl %sp@-
4af46: 2f2a 002c movel %a2@(44),%sp@-
4af4a: 4e90 jsr %a0@
4af4c: 4fef 000c lea %sp@(12),%sp
4af50: 4a80 tstl %d0
4af52: 6600 0106 bnew 4b05a <fifo_open+0x34c>
goto out_error;
if (! PIPE_LOCK(pipe))
4af56: 42a7 clrl %sp@-
4af58: 42a7 clrl %sp@-
4af5a: 2f2a 0028 movel %a2@(40),%sp@-
4af5e: 4e95 jsr %a5@
4af60: 4fef 000c lea %sp@(12),%sp
4af64: 4a80 tstl %d0
4af66: 6600 00f2 bnew 4b05a <fifo_open+0x34c>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4af6a: baaa 0024 cmpl %a2@(36),%d5
4af6e: 67ca beqs 4af3a <fifo_open+0x22c> <== NEVER TAKEN
4af70: 6000 00da braw 4b04c <fifo_open+0x33e>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4af74: 202a 0014 movel %a2@(20),%d0
4af78: 2200 movel %d0,%d1
4af7a: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4af7c: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4af80: 2541 0014 movel %d1,%a2@(20)
4af84: 4a80 tstl %d0
4af86: 6610 bnes 4af98 <fifo_open+0x28a> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4af88: 486e fffc pea %fp@(-4)
4af8c: 2f2a 002c movel %a2@(44),%sp@-
4af90: 4eb9 0004 c8bc jsr 4c8bc <rtems_barrier_release>
4af96: 508f addql #8,%sp
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4af98: 4aaa 0010 tstl %a2@(16)
4af9c: 6600 00ae bnew 4b04c <fifo_open+0x33e>
4afa0: 7001 moveq #1,%d0
4afa2: c0ac 0014 andl %a4@(20),%d0
4afa6: 6712 beqs 4afba <fifo_open+0x2ac>
PIPE_UNLOCK(pipe);
4afa8: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4afac: 74fa moveq #-6,%d2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4afae: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
err = -ENXIO;
goto out_error;
4afb4: 588f addql #4,%sp
4afb6: 6000 00a4 braw 4b05c <fifo_open+0x34e>
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4afba: 2a2a 0020 movel %a2@(32),%d5
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
goto out_error;
if (! PIPE_LOCK(pipe))
4afbe: 4bf9 0004 6b08 lea 46b08 <rtems_semaphore_obtain>,%a5
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4afc4: 283c 0004 6c10 movel #289808,%d4
if (! PIPE_WRITEWAIT(pipe))
4afca: 263c 0004 c920 movel #313632,%d3
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4afd0: 2f2a 0028 movel %a2@(40),%sp@-
4afd4: 2044 moveal %d4,%a0
4afd6: 4e90 jsr %a0@
if (! PIPE_WRITEWAIT(pipe))
4afd8: 2043 moveal %d3,%a0
4afda: 42a7 clrl %sp@-
4afdc: 2f2a 0030 movel %a2@(48),%sp@-
4afe0: 4e90 jsr %a0@
4afe2: 4fef 000c lea %sp@(12),%sp
4afe6: 4a80 tstl %d0
4afe8: 6670 bnes 4b05a <fifo_open+0x34c> <== NEVER TAKEN
goto out_error;
if (! PIPE_LOCK(pipe))
4afea: 42a7 clrl %sp@-
4afec: 42a7 clrl %sp@-
4afee: 2f2a 0028 movel %a2@(40),%sp@-
4aff2: 4e95 jsr %a5@
4aff4: 4fef 000c lea %sp@(12),%sp
4aff8: 4a80 tstl %d0
4affa: 665e bnes 4b05a <fifo_open+0x34c> <== NEVER TAKEN
goto out_error;
} while (prevCounter == pipe->readerCounter);
4affc: baaa 0020 cmpl %a2@(32),%d5
4b000: 67ce beqs 4afd0 <fifo_open+0x2c2> <== NEVER TAKEN
4b002: 6048 bras 4b04c <fifo_open+0x33e>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4b004: 202a 0010 movel %a2@(16),%d0
4b008: 2200 movel %d0,%d1
4b00a: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4b00c: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4b010: 2541 0010 movel %d1,%a2@(16)
4b014: 4a80 tstl %d0
4b016: 6610 bnes 4b028 <fifo_open+0x31a> <== NEVER TAKEN
PIPE_WAKEUPWRITERS(pipe);
4b018: 486e fffc pea %fp@(-4)
4b01c: 2f2a 0030 movel %a2@(48),%sp@-
4b020: 4eb9 0004 c8bc jsr 4c8bc <rtems_barrier_release>
4b026: 508f addql #8,%sp
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4b028: 202a 0014 movel %a2@(20),%d0
4b02c: 2040 moveal %d0,%a0
4b02e: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4b030: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4b034: 2548 0014 movel %a0,%a2@(20)
4b038: 4a80 tstl %d0
4b03a: 6610 bnes 4b04c <fifo_open+0x33e> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4b03c: 486e fffc pea %fp@(-4)
4b040: 2f2a 002c movel %a2@(44),%sp@-
4b044: 4eb9 0004 c8bc jsr 4c8bc <rtems_barrier_release>
4b04a: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4b04c: 2f2a 0028 movel %a2@(40),%sp@-
4b050: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
return 0;
4b056: 588f addql #4,%sp
4b058: 600e bras 4b068 <fifo_open+0x35a>
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
4b05a: 74fc moveq #-4,%d2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4b05c: 2f0c movel %a4,%sp@-
4b05e: 2f0b movel %a3,%sp@-
4b060: 4eb9 0004 ac5a jsr 4ac5a <pipe_release>
return err;
4b066: 508f addql #8,%sp
}
4b068: 2002 movel %d2,%d0
4b06a: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5
4b070: 4e5e unlk %fp <== NOT EXECUTED
000432d0 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
432d0: 4e56 0000 linkw %fp,#0
432d4: 202e 0008 movel %fp@(8),%d0
432d8: 222e 000c movel %fp@(12),%d1
432dc: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
432de: b0b9 0005 dad4 cmpl 5dad4 <rtems_libio_number_iops>,%d0
432e4: 641a bccs 43300 <fpathconf+0x30>
iop = rtems_libio_iop(fd);
432e6: 2400 movel %d0,%d2
432e8: ed88 lsll #6,%d0
432ea: e78a lsll #3,%d2
432ec: 2079 0005 f1e4 moveal 5f1e4 <rtems_libio_iops>,%a0
432f2: 9082 subl %d2,%d0
432f4: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
432f6: 2028 0014 movel %a0@(20),%d0
432fa: 0800 0008 btst #8,%d0
432fe: 6610 bnes 43310 <fpathconf+0x40> <== ALWAYS TAKEN
43300: 4eb9 0004 d954 jsr 4d954 <__errno>
43306: 7209 moveq #9,%d1
43308: 2040 moveal %d0,%a0
4330a: 2081 movel %d1,%a0@
4330c: 6000 0088 braw 43396 <fpathconf+0xc6>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43310: 0800 0001 btst #1,%d0
43314: 6774 beqs 4338a <fpathconf+0xba> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43316: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
4331a: 700b moveq #11,%d0
4331c: b081 cmpl %d1,%d0
4331e: 656a bcss 4338a <fpathconf+0xba>
43320: 303b 1a08 movew %pc@(4332a <fpathconf+0x5a>,%d1:l:2),%d0
43324: 48c0 extl %d0
43326: 4efb 0802 jmp %pc@(4332a <fpathconf+0x5a>,%d0:l)
4332a: 0018 030 <== NOT EXECUTED
4332c: 001e 036 <== NOT EXECUTED
4332e: 0024 044 <== NOT EXECUTED
43330: 002a 052 <== NOT EXECUTED
43332: 0030 060 <== NOT EXECUTED
43334: 0036 066 <== NOT EXECUTED
43336: 003c 074 <== NOT EXECUTED
43338: 0042 0102 <== NOT EXECUTED
4333a: 0048 0110 <== NOT EXECUTED
4333c: 004e 0116 <== NOT EXECUTED
4333e: 0054 0124 <== NOT EXECUTED
43340: 005a 0132 <== NOT EXECUTED
case _PC_LINK_MAX:
return_value = the_limits->link_max;
43342: 2028 0038 movel %a0@(56),%d0
break;
43346: 6050 bras 43398 <fpathconf+0xc8>
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
43348: 2028 003c movel %a0@(60),%d0
break;
4334c: 604a bras 43398 <fpathconf+0xc8>
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
4334e: 2028 0040 movel %a0@(64),%d0
break;
43352: 6044 bras 43398 <fpathconf+0xc8>
case _PC_NAME_MAX:
return_value = the_limits->name_max;
43354: 2028 0044 movel %a0@(68),%d0
break;
43358: 603e bras 43398 <fpathconf+0xc8>
case _PC_PATH_MAX:
return_value = the_limits->path_max;
4335a: 2028 0048 movel %a0@(72),%d0
break;
4335e: 6038 bras 43398 <fpathconf+0xc8>
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
43360: 2028 004c movel %a0@(76),%d0
break;
43364: 6032 bras 43398 <fpathconf+0xc8>
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
43366: 2028 0054 movel %a0@(84),%d0
break;
4336a: 602c bras 43398 <fpathconf+0xc8>
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
4336c: 2028 0058 movel %a0@(88),%d0
break;
43370: 6026 bras 43398 <fpathconf+0xc8>
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
43372: 2028 0064 movel %a0@(100),%d0
break;
43376: 6020 bras 43398 <fpathconf+0xc8>
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
43378: 2028 0050 movel %a0@(80),%d0
break;
4337c: 601a bras 43398 <fpathconf+0xc8>
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
4337e: 2028 005c movel %a0@(92),%d0
break;
43382: 6014 bras 43398 <fpathconf+0xc8>
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
43384: 2028 0060 movel %a0@(96),%d0
break;
43388: 600e bras 43398 <fpathconf+0xc8>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4338a: 4eb9 0004 d954 jsr 4d954 <__errno>
43390: 2040 moveal %d0,%a0
43392: 7016 moveq #22,%d0
43394: 2080 movel %d0,%a0@
43396: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43398: 242e fffc movel %fp@(-4),%d2
4339c: 4e5e unlk %fp <== NOT EXECUTED
00042830 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
42830: 4e56 0000 linkw %fp,#0
MSBUMP(free_calls, 1);
42834: 52b9 0005 d818 addql #1,5d818 <rtems_malloc_statistics+0xc>
#include <stdlib.h>
void free(
void *ptr
)
{
4283a: 2f02 movel %d2,%sp@-
4283c: 242e 0008 movel %fp@(8),%d2
MSBUMP(free_calls, 1);
if ( !ptr )
42840: 676c beqs 428ae <free+0x7e>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42842: 7003 moveq #3,%d0
42844: b0b9 0005 daba cmpl 5daba <_System_state_Current>,%d0
4284a: 661a bnes 42866 <free+0x36> <== NEVER TAKEN
!malloc_is_system_state_OK() ) {
4284c: 4eb9 0004 29d4 jsr 429d4 <malloc_is_system_state_OK>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42852: 4a00 tstb %d0
42854: 6610 bnes 42866 <free+0x36>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42856: 2d42 0008 movel %d2,%fp@(8)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
4285a: 242e fffc movel %fp@(-4),%d2
4285e: 4e5e unlk %fp
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42860: 4ef9 0004 2a48 jmp 42a48 <malloc_deferred_free>
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42866: 2079 0005 c786 moveal 5c786 <rtems_malloc_statistics_helpers>,%a0
4286c: 4a88 tstl %a0
4286e: 670a beqs 4287a <free+0x4a>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
42870: 2f02 movel %d2,%sp@-
42872: 2068 0008 moveal %a0@(8),%a0
42876: 4e90 jsr %a0@
42878: 588f addql #4,%sp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
4287a: 2f02 movel %d2,%sp@-
4287c: 2f39 0005 c0f0 movel 5c0f0 <RTEMS_Malloc_Heap>,%sp@-
42882: 4eb9 0004 7118 jsr 47118 <_Protected_heap_Free>
42888: 508f addql #8,%sp
4288a: 4a00 tstb %d0
4288c: 6620 bnes 428ae <free+0x7e>
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
4288e: 2079 0005 c0f0 moveal 5c0f0 <RTEMS_Malloc_Heap>,%a0
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
42894: 2f28 001c movel %a0@(28),%sp@-
42898: 2f28 0018 movel %a0@(24),%sp@-
4289c: 2f02 movel %d2,%sp@-
4289e: 4879 0005 b19c pea 5b19c <rtems_status_assoc+0x168>
428a4: 4eb9 0004 34dc jsr 434dc <printk>
428aa: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
428ae: 242e fffc movel %fp@(-4),%d2
428b2: 4e5e unlk %fp
...
00043a80 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
43a80: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
43a84: 2f0b movel %a3,%sp@- <== NOT EXECUTED
43a86: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43a88: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
43a8c: b5fc 0005 df44 cmpal #384836,%a2 <== NOT EXECUTED
43a92: 6728 beqs 43abc <free_user_env+0x3c> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
43a94: 486a 0004 pea %a2@(4) <== NOT EXECUTED
43a98: 47f9 0004 2b68 lea 42b68 <rtems_filesystem_freenode>,%a3 <== NOT EXECUTED
43a9e: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
43aa0: 486a 0018 pea %a2@(24) <== NOT EXECUTED
43aa4: 4e93 jsr %a3@ <== NOT EXECUTED
free(env);
}
}
43aa6: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
43aaa: 508f addql #8,%sp <== NOT EXECUTED
43aac: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
}
}
43ab0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
43ab4: 4e5e unlk %fp <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
43ab6: 4ef9 0004 2b7c jmp 42b7c <free> <== NOT EXECUTED
}
}
43abc: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED
43ac0: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED
43ac4: 4e5e unlk %fp <== NOT EXECUTED
00049814 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
49814: 4e56 ffec linkw %fp,#-20
49818: 202e 0008 movel %fp@(8),%d0
4981c: 2f0a movel %a2,%sp@-
4981e: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
49820: b0b9 0005 c0e4 cmpl 5c0e4 <rtems_libio_number_iops>,%d0
49826: 641c bccs 49844 <ftruncate+0x30>
iop = rtems_libio_iop( fd );
49828: 2200 movel %d0,%d1
4982a: ed88 lsll #6,%d0
4982c: e789 lsll #3,%d1
4982e: 2479 0005 d7f4 moveal 5d7f4 <rtems_libio_iops>,%a2
49834: 9081 subl %d1,%d0
49836: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
49838: 202a 0014 movel %a2@(20),%d0
4983c: 0280 0000 0100 andil #256,%d0
49842: 660e bnes 49852 <ftruncate+0x3e>
49844: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4984a: 7409 moveq #9,%d2
4984c: 2040 moveal %d0,%a0
4984e: 2082 movel %d2,%a0@
49850: 6050 bras 498a2 <ftruncate+0x8e>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
49852: 4878 0014 pea 14 <OPER2>
49856: 240e movel %fp,%d2
49858: 486a 0018 pea %a2@(24)
4985c: 0682 ffff ffec addil #-20,%d2
49862: 2f02 movel %d2,%sp@-
49864: 4eb9 0004 d300 jsr 4d300 <memcpy>
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4986a: 206e fff8 moveal %fp@(-8),%a0
4986e: 2f02 movel %d2,%sp@-
49870: 2068 0010 moveal %a0@(16),%a0
49874: 4e90 jsr %a0@
49876: 4fef 0010 lea %sp@(16),%sp
4987a: 7201 moveq #1,%d1
4987c: b280 cmpl %d0,%d1
4987e: 660e bnes 4988e <ftruncate+0x7a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EISDIR );
49880: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
49886: 7215 moveq #21,%d1 <== NOT EXECUTED
49888: 2040 moveal %d0,%a0 <== NOT EXECUTED
4988a: 2081 movel %d1,%a0@ <== NOT EXECUTED
4988c: 6014 bras 498a2 <ftruncate+0x8e> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4988e: 7004 moveq #4,%d0
49890: c0aa 0014 andl %a2@(20),%d0
49894: 6610 bnes 498a6 <ftruncate+0x92>
49896: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4989c: 2040 moveal %d0,%a0
4989e: 7016 moveq #22,%d0
498a0: 2080 movel %d0,%a0@
498a2: 70ff moveq #-1,%d0
498a4: 6018 bras 498be <ftruncate+0xaa>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
498a6: 206a 0020 moveal %a2@(32),%a0
498aa: 2f2e 0010 movel %fp@(16),%sp@-
498ae: 2f2e 000c movel %fp@(12),%sp@-
498b2: 2f0a movel %a2,%sp@-
498b4: 2068 0020 moveal %a0@(32),%a0
498b8: 4e90 jsr %a0@
498ba: 4fef 000c lea %sp@(12),%sp
}
498be: 242e ffe4 movel %fp@(-28),%d2
498c2: 246e ffe8 moveal %fp@(-24),%a2
498c6: 4e5e unlk %fp
...
00042a58 <getchark>:
#include <rtems.h>
#include <rtems/bspIo.h>
int getchark(void)
{
42a58: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if ( BSP_poll_char )
42a5c: 2279 0005 d2d8 moveal 5d2d8 <BSP_poll_char>,%a1 <== NOT EXECUTED
42a62: 4a89 tstl %a1 <== NOT EXECUTED
42a64: 6704 beqs 42a6a <getchark+0x12> <== NOT EXECUTED
return (*BSP_poll_char)();
return -1;
}
42a66: 4e5e unlk %fp <== NOT EXECUTED
#include <rtems/bspIo.h>
int getchark(void)
{
if ( BSP_poll_char )
return (*BSP_poll_char)();
42a68: 4ed1 jmp %a1@ <== NOT EXECUTED
return -1;
}
42a6a: 70ff moveq #-1,%d0 <== NOT EXECUTED
42a6c: 4e5e unlk %fp <== NOT EXECUTED
0005b2b0 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5b2b0: 4e56 ffec linkw %fp,#-20
5b2b4: 202e 0008 movel %fp@(8),%d0
5b2b8: 2f0a movel %a2,%sp@-
5b2ba: 2f02 movel %d2,%sp@-
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5b2bc: b0b9 0005 e054 cmpl 5e054 <rtems_libio_number_iops>,%d0
5b2c2: 6412 bccs 5b2d6 <getdents+0x26> <== NEVER TAKEN
5b2c4: 2200 movel %d0,%d1
5b2c6: ed88 lsll #6,%d0
5b2c8: e789 lsll #3,%d1
5b2ca: 2479 0005 f874 moveal 5f874 <rtems_libio_iops>,%a2
5b2d0: 9081 subl %d1,%d0
5b2d2: d5c0 addal %d0,%a2
5b2d4: 6002 bras 5b2d8 <getdents+0x28>
5b2d6: 95ca subal %a2,%a2 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5b2d8: 4878 0014 pea 14 <OPER2>
5b2dc: 240e movel %fp,%d2
5b2de: 486a 0018 pea %a2@(24)
5b2e2: 0682 ffff ffec addil #-20,%d2
5b2e8: 2f02 movel %d2,%sp@-
5b2ea: 4eb9 0004 e208 jsr 4e208 <memcpy>
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5b2f0: 206e fff8 moveal %fp@(-8),%a0
5b2f4: 2f02 movel %d2,%sp@-
5b2f6: 2068 0010 moveal %a0@(16),%a0
5b2fa: 4e90 jsr %a0@
5b2fc: 4fef 0010 lea %sp@(16),%sp
5b300: 7201 moveq #1,%d1
5b302: b280 cmpl %d0,%d1
5b304: 6710 beqs 5b316 <getdents+0x66>
rtems_set_errno_and_return_minus_one( ENOTDIR );
5b306: 4eb9 0004 d95c jsr 4d95c <__errno>
5b30c: 2040 moveal %d0,%a0
5b30e: 7014 moveq #20,%d0
5b310: 2080 movel %d0,%a0@
5b312: 70ff moveq #-1,%d0
5b314: 6018 bras 5b32e <getdents+0x7e>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
5b316: 206a 0020 moveal %a2@(32),%a0
5b31a: 2f2e 0010 movel %fp@(16),%sp@-
5b31e: 2f2e 000c movel %fp@(12),%sp@-
5b322: 2f0a movel %a2,%sp@-
5b324: 2068 0008 moveal %a0@(8),%a0
5b328: 4e90 jsr %a0@
5b32a: 4fef 000c lea %sp@(12),%sp
}
5b32e: 242e ffe4 movel %fp@(-28),%d2
5b332: 246e ffe8 moveal %fp@(-24),%a2
5b336: 4e5e unlk %fp
...
0004bed8 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4bed8: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4beda: 4e56 0000 linkw %fp,#0
4bede: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4bee2: 2268 0018 moveal %a0@(24),%a1
4bee6: b0a9 0048 cmpl %a1@(72),%d0
4beea: 6610 bnes 4befc <imfs_dir_open+0x24> <== NEVER TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
4beec: 4280 clrl %d0
4beee: 4281 clrl %d1
4bef0: 2140 000c movel %d0,%a0@(12)
4bef4: 2141 0010 movel %d1,%a0@(16)
return 0;
4bef8: 4280 clrl %d0
4befa: 6002 bras 4befe <imfs_dir_open+0x26>
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
4befc: 70ff moveq #-1,%d0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
4befe: 4e5e unlk %fp <== NOT EXECUTED
0004c10a <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4c10a: 4e56 0000 linkw %fp,#0
4c10e: 206e 000c moveal %fp@(12),%a0
4c112: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4c114: 2450 moveal %a0@,%a2
4c116: 200a movel %a2,%d0
4c118: 0680 0000 0050 addil #80,%d0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
4c11e: b0aa 004c cmpl %a2@(76),%d0
4c122: 670e beqs 4c132 <imfs_dir_rmnod+0x28>
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4c124: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4c12a: 2040 moveal %d0,%a0
4c12c: 705a moveq #90,%d0
4c12e: 2080 movel %d0,%a0@
4c130: 6016 bras 4c148 <imfs_dir_rmnod+0x3e>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
4c132: 2068 0010 moveal %a0@(16),%a0
4c136: b5e8 001c cmpal %a0@(28),%a2
4c13a: 6610 bnes 4c14c <imfs_dir_rmnod+0x42>
rtems_set_errno_and_return_minus_one( EBUSY );
4c13c: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4c142: 7210 moveq #16,%d1
4c144: 2040 moveal %d0,%a0
4c146: 2081 movel %d1,%a0@
4c148: 70ff moveq #-1,%d0
4c14a: 601a bras 4c166 <imfs_dir_rmnod+0x5c>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
4c14c: 4aaa 0058 tstl %a2@(88)
4c150: 66ea bnes 4c13c <imfs_dir_rmnod+0x32> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
4c152: 2f0a movel %a2,%sp@-
4c154: 4eb9 0004 9574 jsr 49574 <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
4c15a: 2f0a movel %a2,%sp@-
4c15c: 4eb9 0004 95b8 jsr 495b8 <IMFS_check_node_remove>
return 0;
4c162: 508f addql #8,%sp
4c164: 4280 clrl %d0
}
4c166: 246e fffc moveal %fp@(-4),%a2
4c16a: 4e5e unlk %fp
...
000431b4 <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
431b4: 4e56 0000 linkw %fp,#0
431b8: 2f0a movel %a2,%sp@-
431ba: 2f02 movel %d2,%sp@-
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
431bc: 4a39 0005 eac2 tstb 5eac2 <etc_passwd_initted.6268>
431c2: 6600 00c4 bnew 43288 <init_etc_passwd_group+0xd4>
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
431c6: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
431ca: 45f9 0004 dffc lea 4dffc <fopen>,%a2
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
431d0: 4879 0005 ca26 pea 5ca26 <rtems_status_assoc+0x1a0>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
431d6: 7001 moveq #1,%d0
431d8: 13c0 0005 eac2 moveb %d0,5eac2 <etc_passwd_initted.6268>
mkdir("/etc", 0777);
431de: 4eb9 0004 39d8 jsr 439d8 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
431e4: 4879 0005 d2a5 pea 5d2a5 <_global_impure_ptr+0xbf>
431ea: 4879 0005 ca2b pea 5ca2b <rtems_status_assoc+0x1a5>
431f0: 4e92 jsr %a2@
431f2: 4fef 0010 lea %sp@(16),%sp
431f6: 4a80 tstl %d0
431f8: 670c beqs 43206 <init_etc_passwd_group+0x52>
fclose(fp);
431fa: 2f00 movel %d0,%sp@-
431fc: 4eb9 0004 d8fe jsr 4d8fe <fclose>
43202: 588f addql #4,%sp
43204: 602e bras 43234 <init_etc_passwd_group+0x80>
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
43206: 4879 0005 ca37 pea 5ca37 <rtems_status_assoc+0x1b1>
4320c: 4879 0005 ca2b pea 5ca2b <rtems_status_assoc+0x1a5>
43212: 4e92 jsr %a2@
43214: 508f addql #8,%sp
43216: 2400 movel %d0,%d2
43218: 671a beqs 43234 <init_etc_passwd_group+0x80> <== NEVER TAKEN
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
4321a: 2f00 movel %d0,%sp@-
4321c: 4879 0005 ca39 pea 5ca39 <rtems_status_assoc+0x1b3>
43222: 4eb9 0004 e0dc jsr 4e0dc <fputs>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
43228: 2f02 movel %d2,%sp@-
4322a: 4eb9 0004 d8fe jsr 4d8fe <fclose>
43230: 4fef 000c lea %sp@(12),%sp
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
43234: 4879 0005 d2a5 pea 5d2a5 <_global_impure_ptr+0xbf>
4323a: 45f9 0004 dffc lea 4dffc <fopen>,%a2
43240: 4879 0005 caa0 pea 5caa0 <rtems_status_assoc+0x21a>
43246: 4e92 jsr %a2@
43248: 508f addql #8,%sp
4324a: 4a80 tstl %d0
4324c: 670c beqs 4325a <init_etc_passwd_group+0xa6>
fclose(fp);
4324e: 2f00 movel %d0,%sp@-
43250: 4eb9 0004 d8fe jsr 4d8fe <fclose>
43256: 588f addql #4,%sp
43258: 602e bras 43288 <init_etc_passwd_group+0xd4>
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
4325a: 4879 0005 ca37 pea 5ca37 <rtems_status_assoc+0x1b1>
43260: 4879 0005 caa0 pea 5caa0 <rtems_status_assoc+0x21a>
43266: 4e92 jsr %a2@
43268: 508f addql #8,%sp
4326a: 2400 movel %d0,%d2
4326c: 671a beqs 43288 <init_etc_passwd_group+0xd4> <== NEVER TAKEN
fprintf( fp, "root:x:0:root\n"
4326e: 2f00 movel %d0,%sp@-
43270: 4879 0005 caab pea 5caab <rtems_status_assoc+0x225>
43276: 4eb9 0004 e0dc jsr 4e0dc <fputs>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
4327c: 2f02 movel %d2,%sp@-
4327e: 4eb9 0004 d8fe jsr 4d8fe <fclose>
43284: 4fef 000c lea %sp@(12),%sp
}
}
43288: 242e fff8 movel %fp@(-8),%d2
4328c: 246e fffc moveal %fp@(-4),%a2
43290: 4e5e unlk %fp <== NOT EXECUTED
0004442a <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
4442a: 4e56 fff4 linkw %fp,#-12
4442e: 222e 0008 movel %fp@(8),%d1
44432: 48d7 040c moveml %d2-%d3/%a2,%sp@
44436: 246e 000c moveal %fp@(12),%a2
if (tty->termios.c_iflag & ISTRIP)
4443a: 202a 0030 movel %a2@(48),%d0
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
4443e: 1401 moveb %d1,%d2
if (tty->termios.c_iflag & ISTRIP)
44440: 0800 0005 btst #5,%d0
44444: 6704 beqs 4444a <iproc+0x20> <== ALWAYS TAKEN
c &= 0x7f;
44446: 747f moveq #127,%d2 <== NOT EXECUTED
44448: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
4444a: 0800 0009 btst #9,%d0
4444e: 6724 beqs 44474 <iproc+0x4a>
c = tolower (c);
44450: 2079 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a0
44456: 7603 moveq #3,%d3
44458: 0282 0000 00ff andil #255,%d2
4445e: 1230 2801 moveb %a0@(00000001,%d2:l),%d1
44462: 49c1 extbl %d1
44464: c283 andl %d3,%d1
44466: 163c 0001 moveb #1,%d3
4446a: b681 cmpl %d1,%d3
4446c: 6606 bnes 44474 <iproc+0x4a>
4446e: 0682 0000 0020 addil #32,%d2
if (c == '\r') {
44474: 4281 clrl %d1
44476: 1202 moveb %d2,%d1
44478: 760d moveq #13,%d3
4447a: b681 cmpl %d1,%d3
4447c: 6610 bnes 4448e <iproc+0x64>
if (tty->termios.c_iflag & IGNCR)
4447e: 4a00 tstb %d0
44480: 6d00 0104 bltw 44586 <iproc+0x15c>
return 0;
if (tty->termios.c_iflag & ICRNL)
44484: 0800 0008 btst #8,%d0
44488: 671a beqs 444a4 <iproc+0x7a> <== NEVER TAKEN
c = '\n';
4448a: 740a moveq #10,%d2
4448c: 6016 bras 444a4 <iproc+0x7a>
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
4448e: 760a moveq #10,%d3
44490: b681 cmpl %d1,%d3
44492: 660a bnes 4449e <iproc+0x74>
44494: 0800 0006 btst #6,%d0
44498: 670a beqs 444a4 <iproc+0x7a> <== ALWAYS TAKEN
c = '\r';
4449a: 740d moveq #13,%d2 <== NOT EXECUTED
4449c: 6006 bras 444a4 <iproc+0x7a> <== NOT EXECUTED
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
4449e: 4a02 tstb %d2
444a0: 6700 00a8 beqw 4454a <iproc+0x120>
444a4: 222a 003c movel %a2@(60),%d1
444a8: 0801 0001 btst #1,%d1
444ac: 6700 009c beqw 4454a <iproc+0x120>
if (c == tty->termios.c_cc[VERASE]) {
444b0: 4283 clrl %d3
444b2: 162a 0043 moveb %a2@(67),%d3
444b6: 4280 clrl %d0
444b8: 1002 moveb %d2,%d0
444ba: b680 cmpl %d0,%d3
444bc: 6604 bnes 444c2 <iproc+0x98>
erase (tty, 0);
444be: 42a7 clrl %sp@-
444c0: 600e bras 444d0 <iproc+0xa6>
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
444c2: 4283 clrl %d3
444c4: 162a 0044 moveb %a2@(68),%d3
444c8: b680 cmpl %d0,%d3
444ca: 6610 bnes 444dc <iproc+0xb2>
erase (tty, 1);
444cc: 4878 0001 pea 1 <ADD>
444d0: 2f0a movel %a2,%sp@-
444d2: 4eba fdc4 jsr %pc@(44298 <erase>)
return 0;
444d6: 508f addql #8,%sp
444d8: 6000 00ac braw 44586 <iproc+0x15c>
}
else if (c == tty->termios.c_cc[VEOF]) {
444dc: 4283 clrl %d3
444de: 162a 0045 moveb %a2@(69),%d3
444e2: b680 cmpl %d0,%d3
444e4: 6700 009c beqw 44582 <iproc+0x158>
return 1;
} else if (c == '\n') {
444e8: 760a moveq #10,%d3
444ea: b680 cmpl %d0,%d3
444ec: 6622 bnes 44510 <iproc+0xe6>
if (tty->termios.c_lflag & (ECHO | ECHONL))
444ee: 7048 moveq #72,%d0
444f0: c280 andl %d0,%d1
444f2: 670c beqs 44500 <iproc+0xd6> <== NEVER TAKEN
echo (c, tty);
444f4: 2f0a movel %a2,%sp@-
444f6: 4878 000a pea a <LASTO>
444fa: 4eba fd14 jsr %pc@(44210 <echo>)
444fe: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
44500: 202a 0020 movel %a2@(32),%d0
44504: 206a 001c moveal %a2@(28),%a0
44508: 720a moveq #10,%d1
4450a: 1181 0800 moveb %d1,%a0@(00000000,%d0:l)
4450e: 6032 bras 44542 <iproc+0x118>
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
44510: 4283 clrl %d3
44512: 162a 004c moveb %a2@(76),%d3
44516: b680 cmpl %d0,%d3
44518: 670a beqs 44524 <iproc+0xfa> <== NEVER TAKEN
4451a: 4283 clrl %d3
4451c: 162a 0051 moveb %a2@(81),%d3
44520: b680 cmpl %d0,%d3
44522: 6626 bnes 4454a <iproc+0x120> <== ALWAYS TAKEN
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
44524: 44c1 movew %d1,%ccr <== NOT EXECUTED
44526: 6a0e bpls 44536 <iproc+0x10c> <== NOT EXECUTED
echo (c, tty);
44528: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4452a: 4280 clrl %d0 <== NOT EXECUTED
4452c: 1002 moveb %d2,%d0 <== NOT EXECUTED
4452e: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44530: 4eba fcde jsr %pc@(44210 <echo>) <== NOT EXECUTED
44534: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44536: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED
4453a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
4453e: 1182 0800 moveb %d2,%a0@(00000000,%d0:l) <== NOT EXECUTED
44542: 5280 addql #1,%d0
44544: 2540 0020 movel %d0,%a2@(32)
44548: 6038 bras 44582 <iproc+0x158>
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
4454a: 2039 0005 c1f0 movel 5c1f0 <rtems_termios_cbufsize>,%d0
44550: 5380 subql #1,%d0
44552: b0aa 0020 cmpl %a2@(32),%d0
44556: 6f2e bles 44586 <iproc+0x15c> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
44558: 7008 moveq #8,%d0
4455a: c0aa 003c andl %a2@(60),%d0
4455e: 670e beqs 4456e <iproc+0x144> <== NEVER TAKEN
echo (c, tty);
44560: 2f0a movel %a2,%sp@-
44562: 4280 clrl %d0
44564: 1002 moveb %d2,%d0
44566: 2f00 movel %d0,%sp@-
44568: 4eba fca6 jsr %pc@(44210 <echo>)
4456c: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
4456e: 202a 0020 movel %a2@(32),%d0
44572: 206a 001c moveal %a2@(28),%a0
44576: 1182 0800 moveb %d2,%a0@(00000000,%d0:l)
4457a: 5280 addql #1,%d0
4457c: 2540 0020 movel %d0,%a2@(32)
44580: 6004 bras 44586 <iproc+0x15c>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
44582: 7001 moveq #1,%d0
44584: 6002 bras 44588 <iproc+0x15e>
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
44586: 4280 clrl %d0
}
44588: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
4458e: 4e5e unlk %fp <== NOT EXECUTED
0005a058 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
5a058: 4e56 ffd0 linkw %fp,#-48
5a05c: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
5a060: 242e 000c movel %fp@(12),%d2
5a064: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
5a068: 4eb9 0005 9c7c jsr 59c7c <getpid>
5a06e: b0ae 0008 cmpl %fp@(8),%d0
5a072: 6710 beqs 5a084 <killinfo+0x2c>
rtems_set_errno_and_return_minus_one( ESRCH );
5a074: 4eb9 0004 ca54 jsr 4ca54 <__errno>
5a07a: 7403 moveq #3,%d2
5a07c: 2040 moveal %d0,%a0
5a07e: 2082 movel %d2,%a0@
5a080: 6000 01aa braw 5a22c <killinfo+0x1d4>
/*
* Validate the signal passed.
*/
if ( !sig )
5a084: 4a82 tstl %d2
5a086: 670a beqs 5a092 <killinfo+0x3a>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5a088: 2202 movel %d2,%d1
5a08a: 5381 subql #1,%d1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5a08c: 701f moveq #31,%d0
5a08e: b081 cmpl %d1,%d0
5a090: 6410 bccs 5a0a2 <killinfo+0x4a>
rtems_set_errno_and_return_minus_one( EINVAL );
5a092: 4eb9 0004 ca54 jsr 4ca54 <__errno>
5a098: 7216 moveq #22,%d1
5a09a: 2040 moveal %d0,%a0
5a09c: 2081 movel %d1,%a0@
5a09e: 6000 018c braw 5a22c <killinfo+0x1d4>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
5a0a2: 2602 movel %d2,%d3
5a0a4: 2002 movel %d2,%d0
5a0a6: e58b lsll #2,%d3
5a0a8: e988 lsll #4,%d0
5a0aa: 9083 subl %d3,%d0
5a0ac: 0680 0005 ddf2 addil #384498,%d0
5a0b2: 7601 moveq #1,%d3
5a0b4: 2040 moveal %d0,%a0
5a0b6: b690 cmpl %a0@,%d3
5a0b8: 6700 01a2 beqw 5a25c <killinfo+0x204>
/*
* 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 ) )
5a0bc: 7008 moveq #8,%d0
5a0be: b082 cmpl %d2,%d0
5a0c0: 6710 beqs 5a0d2 <killinfo+0x7a>
5a0c2: 163c 0004 moveb #4,%d3
5a0c6: b682 cmpl %d2,%d3
5a0c8: 6708 beqs 5a0d2 <killinfo+0x7a>
5a0ca: 103c 000b moveb #11,%d0
5a0ce: b082 cmpl %d2,%d0
5a0d0: 6616 bnes 5a0e8 <killinfo+0x90>
return pthread_kill( pthread_self(), sig );
5a0d2: 4eb9 0005 a430 jsr 5a430 <pthread_self>
5a0d8: 2f02 movel %d2,%sp@-
5a0da: 2f00 movel %d0,%sp@-
5a0dc: 4eb9 0005 a378 jsr 5a378 <pthread_kill>
5a0e2: 508f addql #8,%sp
5a0e4: 6000 0178 braw 5a25e <killinfo+0x206>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5a0e8: 7601 moveq #1,%d3
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
5a0ea: 7001 moveq #1,%d0
5a0ec: e3ab lsll %d1,%d3
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
5a0ee: 2d42 fff4 movel %d2,%fp@(-12)
siginfo->si_code = SI_USER;
5a0f2: 2d40 fff8 movel %d0,%fp@(-8)
if ( !value ) {
5a0f6: 4a8a tstl %a2
5a0f8: 6606 bnes 5a100 <killinfo+0xa8>
siginfo->si_value.sival_int = 0;
5a0fa: 42ae fffc clrl %fp@(-4)
5a0fe: 6004 bras 5a104 <killinfo+0xac>
} else {
siginfo->si_value = *value;
5a100: 2d52 fffc movel %a2@,%fp@(-4)
5a104: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
5a10a: 5280 addql #1,%d0
5a10c: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level>
/*
* Is the currently executing thread interested? If so then it will
* get it an execute it as soon as the dispatcher executes.
*/
the_thread = _Thread_Executing;
5a112: 2279 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
5a118: 2069 010e moveal %a1@(270),%a0
5a11c: 2028 00cc movel %a0@(204),%d0
5a120: 4680 notl %d0
5a122: c083 andl %d3,%d0
5a124: 6600 00aa bnew 5a1d0 <killinfo+0x178>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
5a128: 2079 0005 df76 moveal 5df76 <_POSIX_signals_Wait_queue>,%a0
5a12e: 601e bras 5a14e <killinfo+0xf6>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5a130: 2003 movel %d3,%d0
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
5a132: 2248 moveal %a0,%a1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5a134: c0a8 0030 andl %a0@(48),%d0
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5a138: 2468 010e moveal %a0@(270),%a2
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5a13c: 6600 0092 bnew 5a1d0 <killinfo+0x178>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
5a140: 202a 00cc movel %a2@(204),%d0
5a144: 4680 notl %d0
5a146: c083 andl %d3,%d0
5a148: 6600 0086 bnew 5a1d0 <killinfo+0x178>
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
5a14c: 2050 moveal %a0@,%a0
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
5a14e: b1fc 0005 df7a cmpal #384890,%a0
5a154: 66da bnes 5a130 <killinfo+0xd8>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
5a156: 4280 clrl %d0
5a158: 1039 0005 c192 moveb 5c192 <rtems_maximum_priority>,%d0
5a15e: 45f9 0005 d910 lea 5d910 <_Objects_Information_table+0x8>,%a2
5a164: 5280 addql #1,%d0
*
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
5a166: 93c9 subal %a1,%a1
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
5a168: 205a moveal %a2@+,%a0
5a16a: 4a88 tstl %a0
5a16c: 6756 beqs 5a1c4 <killinfo+0x16c> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
5a16e: 2068 0004 moveal %a0@(4),%a0
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5a172: 4287 clrl %d7
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5a174: 7801 moveq #1,%d4
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
5a176: 2668 0018 moveal %a0@(24),%a3
5a17a: 588b addql #4,%a3
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5a17c: 3e28 000e movew %a0@(14),%d7
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5a180: 603e bras 5a1c0 <killinfo+0x168>
the_thread = (Thread_Control *) object_table[ index ];
5a182: 205b moveal %a3@+,%a0
if ( !the_thread )
5a184: 4a88 tstl %a0
5a186: 6736 beqs 5a1be <killinfo+0x166>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
5a188: 2228 0014 movel %a0@(20),%d1
5a18c: b081 cmpl %d1,%d0
5a18e: 652e bcss 5a1be <killinfo+0x166>
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
5a190: 2868 010e moveal %a0@(270),%a4
5a194: 2a2c 00cc movel %a4@(204),%d5
5a198: 4685 notl %d5
5a19a: ca83 andl %d3,%d5
5a19c: 6720 beqs 5a1be <killinfo+0x166>
*
* NOTE: We initialized interested_priority to PRIORITY_MAXIMUM + 1
* so we never have to worry about deferencing a NULL
* interested thread.
*/
if ( the_thread->current_priority < interested_priority ) {
5a19e: b081 cmpl %d1,%d0
5a1a0: 6218 bhis 5a1ba <killinfo+0x162>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
5a1a2: 2c29 0010 movel %a1@(16),%d6
5a1a6: 6716 beqs 5a1be <killinfo+0x166> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5a1a8: 2a28 0010 movel %a0@(16),%d5
5a1ac: 670c beqs 5a1ba <killinfo+0x162>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
5a1ae: 0806 001c btst #28,%d6
5a1b2: 660a bnes 5a1be <killinfo+0x166>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
5a1b4: 0805 001c btst #28,%d5
5a1b8: 6704 beqs 5a1be <killinfo+0x166>
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5a1ba: 2001 movel %d1,%d0
5a1bc: 2248 moveal %a0,%a1
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5a1be: 5284 addql #1,%d4
5a1c0: be84 cmpl %d4,%d7
5a1c2: 64be bccs 5a182 <killinfo+0x12a>
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
5a1c4: b5fc 0005 d918 cmpal #383256,%a2
5a1ca: 669c bnes 5a168 <killinfo+0x110>
}
}
}
}
if ( interested ) {
5a1cc: 4a89 tstl %a1
5a1ce: 6716 beqs 5a1e6 <killinfo+0x18e>
/*
* 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 ) ) {
5a1d0: 486e fff4 pea %fp@(-12)
5a1d4: 2f02 movel %d2,%sp@-
5a1d6: 2f09 movel %a1,%sp@-
5a1d8: 4eb9 0005 a288 jsr 5a288 <_POSIX_signals_Unblock_thread>
5a1de: 4fef 000c lea %sp@(12),%sp
5a1e2: 4a00 tstb %d0
5a1e4: 6670 bnes 5a256 <killinfo+0x1fe>
/*
* 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 );
5a1e6: 2f03 movel %d3,%sp@-
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
5a1e8: 7602 moveq #2,%d3
/*
* We may have woken up a thread but we definitely need to post the
* signal to the process wide information set.
*/
_POSIX_signals_Set_process_signals( mask );
5a1ea: 4eb9 0005 a268 jsr 5a268 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
5a1f0: 588f addql #4,%sp
5a1f2: 2002 movel %d2,%d0
5a1f4: 41f9 0005 ddea lea 5ddea <_POSIX_signals_Vectors>,%a0
5a1fa: e588 lsll #2,%d0
5a1fc: e98a lsll #4,%d2
5a1fe: 9480 subl %d0,%d2
5a200: b6b0 2800 cmpl %a0@(00000000,%d2:l),%d3
5a204: 6650 bnes 5a256 <killinfo+0x1fe>
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
5a206: 4879 0005 df6a pea 5df6a <_POSIX_signals_Inactive_siginfo>
5a20c: 4eb9 0004 6174 jsr 46174 <_Chain_Get>
if ( !psiginfo ) {
5a212: 588f addql #4,%sp
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
5a214: 2440 moveal %d0,%a2
if ( !psiginfo ) {
5a216: 4a80 tstl %d0
5a218: 6616 bnes 5a230 <killinfo+0x1d8>
_Thread_Enable_dispatch();
5a21a: 4eb9 0004 7696 jsr 47696 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
5a220: 4eb9 0004 ca54 jsr 4ca54 <__errno>
5a226: 2040 moveal %d0,%a0
5a228: 700b moveq #11,%d0
5a22a: 2080 movel %d0,%a0@
5a22c: 70ff moveq #-1,%d0
5a22e: 602e bras 5a25e <killinfo+0x206>
}
psiginfo->Info = *siginfo;
5a230: 4878 000c pea c <OPER1>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5a234: 0682 0005 dfe2 addil #384994,%d2
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
5a23a: 486e fff4 pea %fp@(-12)
5a23e: 486a 0008 pea %a2@(8)
5a242: 4eb9 0004 d300 jsr 4d300 <memcpy>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5a248: 2f0a movel %a2,%sp@-
5a24a: 2f02 movel %d2,%sp@-
5a24c: 4eb9 0004 6114 jsr 46114 <_Chain_Append>
5a252: 4fef 0014 lea %sp@(20),%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
5a256: 4eb9 0004 7696 jsr 47696 <_Thread_Enable_dispatch>
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
5a25c: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5a25e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4
5a264: 4e5e unlk %fp <== NOT EXECUTED
00042f80 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
42f80: 7003 moveq #3,%d0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
42f82: 4e56 0000 linkw %fp,#0
42f86: 2f0a movel %a2,%sp@-
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
42f88: b0b9 0005 daba cmpl 5daba <_System_state_Current>,%d0
42f8e: 664c bnes 42fdc <libc_wrapup+0x5c> <== NEVER TAKEN
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
42f90: 2479 0005 b8e4 moveal 5b8e4 <_global_impure_ptr>,%a2
42f96: b5f9 0005 c2c4 cmpal 5c2c4 <_impure_ptr>,%a2
42f9c: 6710 beqs 42fae <libc_wrapup+0x2e>
_wrapup_reent(_global_impure_ptr);
42f9e: 2f0a movel %a2,%sp@-
42fa0: 4eb9 0004 d5fe jsr 4d5fe <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
42fa6: 588f addql #4,%sp
42fa8: 23ca 0005 c2c4 movel %a2,5c2c4 <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
42fae: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42fb4: 45f9 0004 cba2 lea 4cba2 <fclose>,%a2
42fba: 2f28 0004 movel %a0@(4),%sp@-
42fbe: 4e92 jsr %a2@
fclose (stdout);
42fc0: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42fc6: 2f28 0008 movel %a0@(8),%sp@-
42fca: 4e92 jsr %a2@
fclose (stderr);
42fcc: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42fd2: 2f28 000c movel %a0@(12),%sp@-
42fd6: 4e92 jsr %a2@
42fd8: 4fef 000c lea %sp@(12),%sp
}
42fdc: 246e fffc moveal %fp@(-4),%a2
42fe0: 4e5e unlk %fp <== NOT EXECUTED
00042b18 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
42b18: 4e56 0000 linkw %fp,#0
void *return_this;
MSBUMP(malloc_calls, 1);
42b1c: 52b9 0005 d810 addql #1,5d810 <rtems_malloc_statistics+0x4>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
42b22: 2f03 movel %d3,%sp@-
42b24: 2f02 movel %d2,%sp@-
42b26: 242e 0008 movel %fp@(8),%d2
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
42b2a: 4eb9 0004 2a12 jsr 42a12 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
42b30: 4a82 tstl %d2
42b32: 677e beqs 42bb2 <malloc+0x9a>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42b34: 7003 moveq #3,%d0
42b36: b0b9 0005 daba cmpl 5daba <_System_state_Current>,%d0
42b3c: 660a bnes 42b48 <malloc+0x30>
!malloc_is_system_state_OK() )
42b3e: 4eb9 0004 29d4 jsr 429d4 <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42b44: 4a00 tstb %d0
42b46: 676a beqs 42bb2 <malloc+0x9a> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
42b48: 42a7 clrl %sp@-
42b4a: 42a7 clrl %sp@-
42b4c: 2f02 movel %d2,%sp@-
42b4e: 2f39 0005 c0f0 movel 5c0f0 <RTEMS_Malloc_Heap>,%sp@-
42b54: 4eb9 0004 70d8 jsr 470d8 <_Protected_heap_Allocate_aligned_with_boundary>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
42b5a: 4fef 0010 lea %sp@(16),%sp
42b5e: 4a80 tstl %d0
42b60: 6626 bnes 42b88 <malloc+0x70>
if (rtems_malloc_sbrk_helpers)
42b62: 2079 0005 c78a moveal 5c78a <rtems_malloc_sbrk_helpers>,%a0
42b68: 4a88 tstl %a0
42b6a: 670e beqs 42b7a <malloc+0x62>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
42b6c: 2f02 movel %d2,%sp@-
42b6e: 2068 0004 moveal %a0@(4),%a0
42b72: 4e90 jsr %a0@
if ( !return_this ) {
42b74: 588f addql #4,%sp
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
42b76: 2600 movel %d0,%d3
if ( !return_this ) {
42b78: 6610 bnes 42b8a <malloc+0x72>
errno = ENOMEM;
42b7a: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42b80: 2040 moveal %d0,%a0
42b82: 700c moveq #12,%d0
42b84: 2080 movel %d0,%a0@
42b86: 602a bras 42bb2 <malloc+0x9a>
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
42b88: 2600 movel %d0,%d3
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
42b8a: 2079 0005 c78e moveal 5c78e <rtems_malloc_dirty_helper>,%a0
42b90: 4a88 tstl %a0
42b92: 6708 beqs 42b9c <malloc+0x84>
(*rtems_malloc_dirty_helper)( return_this, size );
42b94: 2f02 movel %d2,%sp@-
42b96: 2f03 movel %d3,%sp@-
42b98: 4e90 jsr %a0@
42b9a: 508f addql #8,%sp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42b9c: 2079 0005 c786 moveal 5c786 <rtems_malloc_statistics_helpers>,%a0
42ba2: 4a88 tstl %a0
42ba4: 670e beqs 42bb4 <malloc+0x9c>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
42ba6: 2f03 movel %d3,%sp@-
42ba8: 2068 0004 moveal %a0@(4),%a0
42bac: 4e90 jsr %a0@
42bae: 588f addql #4,%sp
42bb0: 6002 bras 42bb4 <malloc+0x9c>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
return NULL;
42bb2: 4283 clrl %d3
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
42bb4: 2003 movel %d3,%d0
42bb6: 242e fff8 movel %fp@(-8),%d2
42bba: 262e fffc movel %fp@(-4),%d3
42bbe: 4e5e unlk %fp
...
00042e40 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
42e40: 4e56 fff4 linkw %fp,#-12
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
42e44: 2039 0005 ddf8 movel 5ddf8 <RTEMS_Malloc_Sbrk_amount>,%d0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
42e4a: 48d7 040c moveml %d2-%d3/%a2,%sp@
42e4e: 262e 0008 movel %fp@(8),%d3
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
42e52: 4a80 tstl %d0
42e54: 676a beqs 42ec0 <malloc_sbrk_extend_and_allocate+0x80><== NEVER TAKEN
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
42e56: 2403 movel %d3,%d2
42e58: d480 addl %d0,%d2
starting_address = (void *) sbrk(the_size);
42e5a: 45f9 0004 081c lea 4081c <sbrk>,%a2
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
42e60: 4c40 2002 remul %d0,%d2,%d2
42e64: 4c00 2800 mulsl %d0,%d2
starting_address = (void *) sbrk(the_size);
42e68: 2f02 movel %d2,%sp@-
42e6a: 4e92 jsr %a2@
if ( starting_address == (void*) -1 )
42e6c: 588f addql #4,%sp
42e6e: 72ff moveq #-1,%d1
42e70: b280 cmpl %d0,%d1
42e72: 674c beqs 42ec0 <malloc_sbrk_extend_and_allocate+0x80>
return (void *) 0;
if ( !_Protected_heap_Extend(
42e74: 2f02 movel %d2,%sp@-
42e76: 2f00 movel %d0,%sp@-
42e78: 2f39 0005 c5d0 movel 5c5d0 <RTEMS_Malloc_Heap>,%sp@-
42e7e: 4eb9 0004 73a0 jsr 473a0 <_Protected_heap_Extend>
42e84: 4fef 000c lea %sp@(12),%sp
42e88: 4a00 tstb %d0
42e8a: 6616 bnes 42ea2 <malloc_sbrk_extend_and_allocate+0x62>
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
42e8c: 4482 negl %d2
42e8e: 2f02 movel %d2,%sp@-
42e90: 4e92 jsr %a2@
errno = ENOMEM;
42e92: 4eb9 0004 cf2c jsr 4cf2c <__errno>
return (void *) 0;
42e98: 588f addql #4,%sp
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
42e9a: 2040 moveal %d0,%a0
42e9c: 700c moveq #12,%d0
42e9e: 2080 movel %d0,%a0@
42ea0: 601e bras 42ec0 <malloc_sbrk_extend_and_allocate+0x80>
42ea2: 42a7 clrl %sp@-
return (void *) 0;
}
MSBUMP(space_available, the_size);
42ea4: d5b9 0005 ddcc addl %d2,5ddcc <rtems_malloc_statistics>
42eaa: 42a7 clrl %sp@-
42eac: 2f03 movel %d3,%sp@-
42eae: 2f39 0005 c5d0 movel 5c5d0 <RTEMS_Malloc_Heap>,%sp@-
42eb4: 4eb9 0004 7360 jsr 47360 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
42eba: 4fef 0010 lea %sp@(16),%sp
42ebe: 6002 bras 42ec2 <malloc_sbrk_extend_and_allocate+0x82>
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
42ec0: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
42ec2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
42ec8: 4e5e unlk %fp <== NOT EXECUTED
0004b314 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
4b314: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
4b318: 2f39 0005 cff4 movel 5cff4 <imfs_memfile_bytes_per_block>,%sp@-
4b31e: 4878 0001 pea 1 <ADD>
4b322: 4eb9 0004 2444 jsr 42444 <calloc>
if ( memory )
4b328: 508f addql #8,%sp
4b32a: 4a80 tstl %d0
4b32c: 6706 beqs 4b334 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
4b32e: 52b9 0005 d104 addql #1,5d104 <memfile_blocks_allocated>
return memory;
}
4b334: 4e5e unlk %fp <== NOT EXECUTED
0004b6d0 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
4b6d0: 4e56 ffec linkw %fp,#-20
4b6d4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
4b6d8: 246e 0008 moveal %fp@(8),%a2
4b6dc: 262e 000c movel %fp@(12),%d3
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
4b6e0: 4a8a tstl %a2
4b6e2: 672c beqs 4b710 <memfile_free_blocks_in_table+0x40><== NEVER TAKEN
4b6e4: 2652 moveal %a2@,%a3
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4b6e6: 4282 clrl %d2
if ( b[i] ) {
memfile_free_block( b[i] );
4b6e8: 49f9 0004 b6b6 lea 4b6b6 <memfile_free_block>,%a4
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4b6ee: 6010 bras 4b700 <memfile_free_blocks_in_table+0x30>
if ( b[i] ) {
4b6f0: 201b movel %a3@+,%d0
4b6f2: 670a beqs 4b6fe <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
4b6f4: 2f00 movel %d0,%sp@-
4b6f6: 4e94 jsr %a4@
b[i] = 0;
4b6f8: 588f addql #4,%sp
4b6fa: 42ab fffc clrl %a3@(-4)
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4b6fe: 5282 addql #1,%d2
4b700: b682 cmpl %d2,%d3
4b702: 6eec bgts 4b6f0 <memfile_free_blocks_in_table+0x20>
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
4b704: 2f12 movel %a2@,%sp@-
4b706: 4eb9 0004 b6b6 jsr 4b6b6 <memfile_free_block>
*block_table = 0;
4b70c: 588f addql #4,%sp
4b70e: 4292 clrl %a2@
}
4b710: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4b716: 4e5e unlk %fp <== NOT EXECUTED
0004bb72 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4bb72: 4e56 ffec linkw %fp,#-20
4bb76: 206e 0008 moveal %fp@(8),%a0
4bb7a: 48d7 040c moveml %d2-%d3/%a2,%sp@
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4bb7e: 2468 0018 moveal %a0@(24),%a2
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4bb82: 202e 000c movel %fp@(12),%d0
4bb86: 222e 0010 movel %fp@(16),%d1
* POSIX 1003.1b does not specify what happens if you truncate a file
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
4bb8a: 242a 004c movel %a2@(76),%d2
4bb8e: 262a 0050 movel %a2@(80),%d3
4bb92: 9681 subl %d1,%d3
4bb94: 9580 subxl %d0,%d2
4bb96: 6c12 bges 4bbaa <memfile_ftruncate+0x38> <== ALWAYS TAKEN
return IMFS_memfile_extend( the_jnode, length );
4bb98: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4bb9a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bb9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bb9e: 4eb9 0004 b82c jsr 4b82c <IMFS_memfile_extend> <== NOT EXECUTED
4bba4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4bba8: 6026 bras 4bbd0 <memfile_ftruncate+0x5e> <== NOT EXECUTED
* The in-memory files do not currently reclaim memory until the file is
* deleted. So we leave the previously allocated blocks in place for
* future use and just set the length.
*/
the_jnode->info.file.size = length;
4bbaa: 2540 004c movel %d0,%a2@(76)
4bbae: 2541 0050 movel %d1,%a2@(80)
iop->size = the_jnode->info.file.size;
4bbb2: 2140 0004 movel %d0,%a0@(4)
4bbb6: 2141 0008 movel %d1,%a0@(8)
IMFS_update_atime( the_jnode );
4bbba: 42a7 clrl %sp@-
4bbbc: 486e fff8 pea %fp@(-8)
4bbc0: 4eb9 0004 28b8 jsr 428b8 <gettimeofday>
4bbc6: 256e fff8 003c movel %fp@(-8),%a2@(60)
return 0;
4bbcc: 508f addql #8,%sp
4bbce: 4280 clrl %d0
}
4bbd0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
4bbd6: 4e5e unlk %fp <== NOT EXECUTED
0004bbda <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4bbda: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4bbdc: 4e56 fff0 linkw %fp,#-16
4bbe0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4bbe4: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4bbe8: 266a 0018 moveal %a2@(24),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
4bbec: b0ab 0048 cmpl %a3@(72),%d0
4bbf0: 6620 bnes 4bc12 <memfile_lseek+0x38>
if (iop->offset > the_jnode->info.linearfile.size)
4bbf2: 202b 004c movel %a3@(76),%d0
4bbf6: 222b 0050 movel %a3@(80),%d1
4bbfa: 242a 000c movel %a2@(12),%d2
4bbfe: 262a 0010 movel %a2@(16),%d3
4bc02: 9681 subl %d1,%d3
4bc04: 9580 subxl %d0,%d2
4bc06: 6f44 bles 4bc4c <memfile_lseek+0x72> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
4bc08: 2540 000c movel %d0,%a2@(12) <== NOT EXECUTED
4bc0c: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED
4bc10: 603a bras 4bc4c <memfile_lseek+0x72> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
4bc12: 2f2a 0010 movel %a2@(16),%sp@-
4bc16: 2f2a 000c movel %a2@(12),%sp@-
4bc1a: 2f0b movel %a3,%sp@-
4bc1c: 4eb9 0004 b82c jsr 4b82c <IMFS_memfile_extend>
4bc22: 4fef 000c lea %sp@(12),%sp
4bc26: 4a80 tstl %d0
4bc28: 6712 beqs 4bc3c <memfile_lseek+0x62> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
4bc2a: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4bc30: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bc32: 701c moveq #28,%d0 <== NOT EXECUTED
4bc34: 2080 movel %d0,%a0@ <== NOT EXECUTED
4bc36: 72ff moveq #-1,%d1 <== NOT EXECUTED
4bc38: 74ff moveq #-1,%d2 <== NOT EXECUTED
4bc3a: 6018 bras 4bc54 <memfile_lseek+0x7a> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
4bc3c: 202b 004c movel %a3@(76),%d0
4bc40: 222b 0050 movel %a3@(80),%d1
4bc44: 2540 0004 movel %d0,%a2@(4)
4bc48: 2541 0008 movel %d1,%a2@(8)
}
return iop->offset;
4bc4c: 222a 000c movel %a2@(12),%d1
4bc50: 242a 0010 movel %a2@(16),%d2
}
4bc54: 2001 movel %d1,%d0
4bc56: 2202 movel %d2,%d1
4bc58: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4bc5e: 4e5e unlk %fp
...
0004bace <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4bace: 4e56 fff0 linkw %fp,#-16
4bad2: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4bad6: 266e 0008 moveal %fp@(8),%a3
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4bada: 202b 0014 movel %a3@(20),%d0
4bade: 0280 0000 0204 andil #516,%d0
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4bae4: 246b 0018 moveal %a3@(24),%a2
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4bae8: 674c beqs 4bb36 <memfile_open+0x68>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
4baea: 7006 moveq #6,%d0
4baec: b0aa 0048 cmpl %a2@(72),%d0
4baf0: 6644 bnes 4bb36 <memfile_open+0x68> <== ALWAYS TAKEN
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
4baf2: 7405 moveq #5,%d2 <== NOT EXECUTED
4baf4: 2542 0048 movel %d2,%a2@(72) <== NOT EXECUTED
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
4baf8: 202a 0050 movel %a2@(80),%d0 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4bafc: 4282 clrl %d2 <== NOT EXECUTED
4bafe: 4283 clrl %d3 <== NOT EXECUTED
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
4bb00: 222a 0054 movel %a2@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4bb04: 2542 004c movel %d2,%a2@(76) <== NOT EXECUTED
4bb08: 2543 0050 movel %d3,%a2@(80) <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
4bb0c: 42aa 0054 clrl %a2@(84) <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
4bb10: 42aa 0058 clrl %a2@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4bb14: 42aa 005c clrl %a2@(92) <== NOT EXECUTED
if ((count != 0)
4bb18: 4a80 tstl %d0 <== NOT EXECUTED
4bb1a: 671a beqs 4bb36 <memfile_open+0x68> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4bb1c: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4bb1e: 76ff moveq #-1,%d3 <== NOT EXECUTED
4bb20: 2f01 movel %d1,%sp@- <== NOT EXECUTED
4bb22: 42a7 clrl %sp@- <== NOT EXECUTED
4bb24: 42a7 clrl %sp@- <== NOT EXECUTED
4bb26: 2f0a movel %a2,%sp@- <== NOT EXECUTED
4bb28: 4eb9 0004 b910 jsr 4b910 <IMFS_memfile_write> <== NOT EXECUTED
4bb2e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
4bb32: b680 cmpl %d0,%d3 <== NOT EXECUTED
4bb34: 6730 beqs 4bb66 <memfile_open+0x98> <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4bb36: 202b 0014 movel %a3@(20),%d0
4bb3a: 0280 0000 0200 andil #512,%d0
4bb40: 6710 beqs 4bb52 <memfile_open+0x84>
iop->offset = the_jnode->info.file.size;
4bb42: 202a 004c movel %a2@(76),%d0
4bb46: 222a 0050 movel %a2@(80),%d1
4bb4a: 2740 000c movel %d0,%a3@(12)
4bb4e: 2741 0010 movel %d1,%a3@(16)
iop->size = the_jnode->info.file.size;
return 0;
4bb52: 4280 clrl %d0
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
4bb54: 222a 004c movel %a2@(76),%d1
4bb58: 242a 0050 movel %a2@(80),%d2
4bb5c: 2741 0004 movel %d1,%a3@(4)
4bb60: 2742 0008 movel %d2,%a3@(8)
return 0;
4bb64: 6002 bras 4bb68 <memfile_open+0x9a>
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
4bb66: 70ff moveq #-1,%d0 <== NOT EXECUTED
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
return 0;
}
4bb68: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4bb6e: 4e5e unlk %fp <== NOT EXECUTED
00042be4 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
42be4: 4e56 ffd4 linkw %fp,#-44
42be8: 48d7 001c moveml %d2-%d4,%sp@
42bec: 262e 000c movel %fp@(12),%d3
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
42bf0: 2003 movel %d3,%d0
42bf2: 0280 0000 f000 andil #61440,%d0
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
42bf8: 282e 0008 movel %fp@(8),%d4
rtems_filesystem_location_info_t temp_loc;
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
42bfc: 4a80 tstl %d0
42bfe: 660e bnes 42c0e <mknod+0x2a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
42c00: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42c06: 2040 moveal %d0,%a0 <== NOT EXECUTED
42c08: 7016 moveq #22,%d0 <== NOT EXECUTED
42c0a: 2080 movel %d0,%a0@ <== NOT EXECUTED
42c0c: 6064 bras 42c72 <mknod+0x8e> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
42c0e: 240e movel %fp,%d2
42c10: 0682 ffff ffe4 addil #-28,%d2
42c16: 2f02 movel %d2,%sp@-
42c18: 486e fffc pea %fp@(-4)
42c1c: 2f04 movel %d4,%sp@-
42c1e: 4eb9 0004 34f4 jsr 434f4 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
42c24: 486e fff8 pea %fp@(-8)
42c28: d8ae fffc addl %fp@(-4),%d4
42c2c: 2f02 movel %d2,%sp@-
42c2e: 206e fff0 moveal %fp@(-16),%a0
42c32: 2f04 movel %d4,%sp@-
42c34: 2068 0004 moveal %a0@(4),%a0
42c38: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
42c3a: 4fef 0018 lea %sp@(24),%sp
42c3e: 4a80 tstl %d0
42c40: 6630 bnes 42c72 <mknod+0x8e>
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
42c42: 2f02 movel %d2,%sp@-
42c44: 2f2e 0014 movel %fp@(20),%sp@-
42c48: 2f2e 0010 movel %fp@(16),%sp@-
42c4c: 206e fff0 moveal %fp@(-16),%a0
42c50: 2f03 movel %d3,%sp@-
42c52: 2f2e fff8 movel %fp@(-8),%sp@-
42c56: 2068 0014 moveal %a0@(20),%a0
42c5a: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
42c5c: 2f02 movel %d2,%sp@-
42c5e: 2d40 ffe0 movel %d0,%fp@(-32)
42c62: 4eb9 0004 281c jsr 4281c <rtems_filesystem_freenode>
return result;
42c68: 202e ffe0 movel %fp@(-32),%d0
42c6c: 4fef 0018 lea %sp@(24),%sp
42c70: 6002 bras 42c74 <mknod+0x90>
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
return -1;
42c72: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
42c74: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
42c7a: 4e5e unlk %fp
...
00042d14 <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
42d14: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
42d16: 4e56 ffbc linkw %fp,#-68
42d1a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42d1e: 262e 0008 movel %fp@(8),%d3
42d22: 2a2e 000c movel %fp@(12),%d5
42d26: 2e2e 0014 movel %fp@(20),%d7
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
42d2a: b087 cmpl %d7,%d0
42d2c: 6410 bccs 42d3e <mount+0x2a>
options != RTEMS_FILESYSTEM_READ_WRITE )
rtems_set_errno_and_return_minus_one( EINVAL );
42d2e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42d34: 7c16 moveq #22,%d6
42d36: 2040 moveal %d0,%a0
42d38: 2086 movel %d6,%a0@
42d3a: 6000 0238 braw 42f74 <mount+0x260>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
42d3e: 2f2e 0010 movel %fp@(16),%sp@-
42d42: 4eb9 0004 9c06 jsr 49c06 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
42d48: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
42d4a: 2840 moveal %d0,%a4
if ( !mount_h )
42d4c: 4a80 tstl %d0
42d4e: 6610 bnes 42d60 <mount+0x4c>
rtems_set_errno_and_return_minus_one( EINVAL );
42d50: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42d56: 7a16 moveq #22,%d5
42d58: 2240 moveal %d0,%a1
42d5a: 2285 movel %d5,%a1@
42d5c: 6000 0216 braw 42f74 <mount+0x260>
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
42d60: 4a85 tstl %d5
42d62: 56c4 sne %d4
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
42d64: 2c3c 0005 ad20 movel #372000,%d6
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
bool has_target = target != NULL;
42d6a: 4484 negl %d4
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
42d6c: 4a04 tstb %d4
42d6e: 6702 beqs 42d72 <mount+0x5e>
42d70: 2c05 movel %d5,%d6
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
42d72: 2f2e 0010 movel %fp@(16),%sp@-
42d76: 45f9 0004 deac lea 4deac <strlen>,%a2
42d7c: 4e92 jsr %a2@
42d7e: 588f addql #4,%sp
42d80: 5280 addql #1,%d0
42d82: 2d40 ffe8 movel %d0,%fp@(-24)
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
42d86: 4a83 tstl %d3
42d88: 670c beqs 42d96 <mount+0x82>
42d8a: 2f03 movel %d3,%sp@-
42d8c: 4e92 jsr %a2@
42d8e: 588f addql #4,%sp
42d90: 2640 moveal %d0,%a3
42d92: 528b addql #1,%a3
42d94: 6002 bras 42d98 <mount+0x84>
42d96: 97cb subal %a3,%a3
size_t target_length = strlen( target );
42d98: 2f06 movel %d6,%sp@-
42d9a: 4eb9 0004 deac jsr 4deac <strlen>
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
42da0: 226e ffe8 moveal %fp@(-24),%a1
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
42da4: 588f addql #4,%sp
42da6: 2a40 moveal %d0,%a5
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
42da8: 41f1 0875 lea %a1@(00000075,%d0:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
42dac: 4870 b800 pea %a0@(00000000,%a3:l)
42db0: 4878 0001 pea 1 <ADD>
42db4: 4eb9 0004 2444 jsr 42444 <calloc>
if ( mt_entry != NULL ) {
42dba: 508f addql #8,%sp
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
42dbc: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
42dbe: 4a80 tstl %d0
42dc0: 6770 beqs 42e32 <mount+0x11e> <== NEVER TAKEN
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
42dc2: 2f2e 0010 movel %fp@(16),%sp@-
size_t size = sizeof( rtems_filesystem_mount_table_entry_t )
+ filesystemtype_size + source_size + target_length + 1;
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
42dc6: 2400 movel %d0,%d2
42dc8: 0682 0000 0074 addil #116,%d2
strcpy( str, filesystemtype );
42dce: 41f9 0004 da00 lea 4da00 <strcpy>,%a0
42dd4: 2f02 movel %d2,%sp@-
42dd6: 2d48 ffe4 movel %a0,%fp@(-28)
42dda: 4e90 jsr %a0@
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
42ddc: 206e ffe4 moveal %fp@(-28),%a0
42de0: 508f addql #8,%sp
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
42de2: 2542 006c movel %d2,%a2@(108)
str += filesystemtype_size;
42de6: d4ae ffe8 addl %fp@(-24),%d2
if ( source_or_null != NULL ) {
42dea: 4a83 tstl %d3
42dec: 670e beqs 42dfc <mount+0xe8>
strcpy( str, source_or_null );
42dee: 2f03 movel %d3,%sp@-
42df0: 2f02 movel %d2,%sp@-
42df2: 4e90 jsr %a0@
mt_entry->dev = str;
str += source_size;
42df4: 508f addql #8,%sp
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
strcpy( str, source_or_null );
mt_entry->dev = str;
42df6: 2542 0070 movel %d2,%a2@(112)
str += source_size;
42dfa: d48b addl %a3,%d2
}
strcpy( str, target );
42dfc: 2f06 movel %d6,%sp@-
42dfe: 2f02 movel %d2,%sp@-
42e00: 4eb9 0004 da00 jsr 4da00 <strcpy>
mt_entry->target = str;
42e06: 2542 0068 movel %d2,%a2@(104)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
42e0a: 254a 002c movel %a2,%a2@(44)
mt_entry->options = options;
42e0e: 2547 0030 movel %d7,%a2@(48)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
42e12: 4878 0030 pea 30 <OPER2+0x1c>
42e16: 4879 0005 b1d4 pea 5b1d4 <rtems_filesystem_default_pathconf>
42e1c: 486a 0038 pea %a2@(56)
42e20: 4eb9 0004 d300 jsr 4d300 <memcpy>
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
42e26: 4fef 0014 lea %sp@(20),%sp
42e2a: 4a04 tstb %d4
42e2c: 6700 00ae beqw 42edc <mount+0x1c8>
42e30: 6010 bras 42e42 <mount+0x12e>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
42e32: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42e38: 780c moveq #12,%d4 <== NOT EXECUTED
42e3a: 2040 moveal %d0,%a0 <== NOT EXECUTED
42e3c: 2084 movel %d4,%a0@ <== NOT EXECUTED
42e3e: 6000 0134 braw 42f74 <mount+0x260> <== NOT EXECUTED
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
42e42: 4878 0001 pea 1 <ADD>
42e46: 240e movel %fp,%d2
42e48: 0682 ffff ffec addil #-20,%d2
42e4e: 2f02 movel %d2,%sp@-
42e50: 4878 0007 pea 7 <TRUNCDFSF>
42e54: 2f0d movel %a5,%sp@-
42e56: 2f05 movel %d5,%sp@-
42e58: 4eb9 0004 2726 jsr 42726 <rtems_filesystem_evaluate_path>
42e5e: 4fef 0014 lea %sp@(20),%sp
42e62: 72ff moveq #-1,%d1
42e64: b280 cmpl %d0,%d1
42e66: 6700 00ec beqw 42f54 <mount+0x240>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
42e6a: 206e fff8 moveal %fp@(-8),%a0
42e6e: 2f02 movel %d2,%sp@-
42e70: 2068 0010 moveal %a0@(16),%a0
42e74: 4e90 jsr %a0@
42e76: 588f addql #4,%sp
42e78: 7201 moveq #1,%d1
42e7a: b280 cmpl %d0,%d1
42e7c: 6710 beqs 42e8e <mount+0x17a>
errno = ENOTDIR;
42e7e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42e84: 7614 moveq #20,%d3
42e86: 2040 moveal %d0,%a0
42e88: 2083 movel %d3,%a0@
goto cleanup_and_bail;
42e8a: 6000 00ca braw 42f56 <mount+0x242>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
42e8e: 2f2e ffec movel %fp@(-20),%sp@-
42e92: 487a fdec pea %pc@(42c80 <is_node_fs_root>)
42e96: 4eb9 0004 2cca jsr 42cca <rtems_filesystem_mount_iterate>
42e9c: 508f addql #8,%sp
42e9e: 4a00 tstb %d0
42ea0: 6710 beqs 42eb2 <mount+0x19e>
errno = EBUSY;
42ea2: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42ea8: 7210 moveq #16,%d1
42eaa: 2240 moveal %d0,%a1
42eac: 2281 movel %d1,%a1@
goto cleanup_and_bail;
42eae: 6000 00a6 braw 42f56 <mount+0x242>
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
42eb2: 206e fff8 moveal %fp@(-8),%a0
* may have been allocated in loc should not be sent to freenode
* until the system is unmounted. It may be needed to correctly
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
42eb6: 256e ffec 0008 movel %fp@(-20),%a2@(8)
mt_entry->mt_point_node.handlers = loc.handlers;
42ebc: 256e fff4 0010 movel %fp@(-12),%a2@(16)
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
42ec2: 256e fffc 0018 movel %fp@(-4),%a2@(24)
* traverse the tree.
*/
mt_entry->mt_point_node.node_access = loc.node_access;
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
42ec8: 2548 0014 movel %a0,%a2@(20)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
42ecc: 2f0a movel %a2,%sp@-
42ece: 2068 0020 moveal %a0@(32),%a0
42ed2: 4e90 jsr %a0@
42ed4: 588f addql #4,%sp
42ed6: 4a80 tstl %d0
42ed8: 6720 beqs 42efa <mount+0x1e6> <== ALWAYS TAKEN
42eda: 607a bras 42f56 <mount+0x242> <== NOT EXECUTED
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
42edc: 203c 0005 c1e4 movel #377316,%d0
42ee2: b0b9 0005 c1e0 cmpl 5c1e0 <mount_chain>,%d0
42ee8: 670e beqs 42ef8 <mount+0x1e4> <== ALWAYS TAKEN
errno = EINVAL;
42eea: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42ef0: 2040 moveal %d0,%a0 <== NOT EXECUTED
42ef2: 7016 moveq #22,%d0 <== NOT EXECUTED
42ef4: 2080 movel %d0,%a0@ <== NOT EXECUTED
42ef6: 605c bras 42f54 <mount+0x240> <== NOT EXECUTED
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
42ef8: 4282 clrl %d2
* mt_point_node.node_access will be left to null to indicate that this
* is the root of the entire file system.
*/
}
if ( (*mount_h)( mt_entry, data ) ) {
42efa: 2f2e 0018 movel %fp@(24),%sp@-
42efe: 2f0a movel %a2,%sp@-
42f00: 4e94 jsr %a4@
42f02: 508f addql #8,%sp
42f04: 4a80 tstl %d0
42f06: 6710 beqs 42f18 <mount+0x204> <== ALWAYS TAKEN
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
42f08: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
42f0c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42f0e: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED
42f12: 4e90 jsr %a0@ <== NOT EXECUTED
goto cleanup_and_bail;
42f14: 588f addql #4,%sp <== NOT EXECUTED
42f16: 603e bras 42f56 <mount+0x242> <== NOT EXECUTED
}
/*
* Add the mount table entry to the mount table chain
*/
rtems_libio_lock();
42f18: 4eba fd7e jsr %pc@(42c98 <rtems_libio_lock>)
42f1c: 2f0a movel %a2,%sp@-
42f1e: 4879 0005 c1e0 pea 5c1e0 <mount_chain>
42f24: 4eb9 0004 6114 jsr 46114 <_Chain_Append>
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
42f2a: 4eba fd88 jsr %pc@(42cb4 <rtems_libio_unlock>)
if ( !has_target )
42f2e: 508f addql #8,%sp
42f30: 4a04 tstb %d4
42f32: 663c bnes 42f70 <mount+0x25c>
rtems_filesystem_root = mt_entry->mt_fs_root;
42f34: 4878 0014 pea 14 <OPER2>
42f38: 486a 001c pea %a2@(28)
42f3c: 2279 0005 c200 moveal 5c200 <rtems_current_user_env>,%a1
42f42: 43e9 0018 lea %a1@(24),%a1
42f46: 2f09 movel %a1,%sp@-
42f48: 4eb9 0004 d300 jsr 4d300 <memcpy>
42f4e: 4fef 000c lea %sp@(12),%sp
42f52: 601c bras 42f70 <mount+0x25c>
)
{
rtems_filesystem_fsmount_me_t mount_h = NULL;
rtems_filesystem_location_info_t loc;
rtems_filesystem_mount_table_entry_t *mt_entry = NULL;
rtems_filesystem_location_info_t *loc_to_free = NULL;
42f54: 4282 clrl %d2 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
42f56: 2f0a movel %a2,%sp@-
42f58: 4eb9 0004 2830 jsr 42830 <free>
if ( loc_to_free )
42f5e: 588f addql #4,%sp
42f60: 4a82 tstl %d2
42f62: 6710 beqs 42f74 <mount+0x260> <== NEVER TAKEN
rtems_filesystem_freenode( loc_to_free );
42f64: 2f02 movel %d2,%sp@-
42f66: 4eb9 0004 281c jsr 4281c <rtems_filesystem_freenode>
42f6c: 588f addql #4,%sp
42f6e: 6004 bras 42f74 <mount+0x260>
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
42f70: 4280 clrl %d0
42f72: 6002 bras 42f76 <mount+0x262>
free( mt_entry );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
42f74: 70ff moveq #-1,%d0
}
42f76: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5
42f7c: 4e5e unlk %fp <== NOT EXECUTED
000432d0 <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
432d0: 4e56 ffec linkw %fp,#-20
432d4: 48d7 007c moveml %d2-%d6,%sp@
432d8: 262e 0008 movel %fp@(8),%d3
432dc: 242e 000c movel %fp@(12),%d2
432e0: 282e 0010 movel %fp@(16),%d4
432e4: 2a2e 0014 movel %fp@(20),%d5
432e8: 2c2e 0018 movel %fp@(24),%d6
int rv = -1;
if (target != NULL) {
432ec: 4a82 tstl %d2
432ee: 6734 beqs 43324 <mount_and_make_target_path+0x54>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
432f0: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
432f4: 2f02 movel %d2,%sp@-
432f6: 4eb9 0004 3bb0 jsr 43bb0 <rtems_mkdir>
if (rv == 0) {
432fc: 508f addql #8,%sp
432fe: 4a80 tstl %d0
43300: 6630 bnes 43332 <mount_and_make_target_path+0x62><== NEVER TAKEN
rv = mount(
43302: 2d46 0018 movel %d6,%fp@(24)
43306: 2d45 0014 movel %d5,%fp@(20)
4330a: 2d44 0010 movel %d4,%fp@(16)
4330e: 2d42 000c movel %d2,%fp@(12)
43312: 2d43 0008 movel %d3,%fp@(8)
} else {
errno = EINVAL;
}
return rv;
}
43316: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
4331c: 4e5e unlk %fp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
4331e: 4ef9 0004 33d0 jmp 433d0 <mount>
options,
data
);
}
} else {
errno = EINVAL;
43324: 4eb9 0004 d0b0 jsr 4d0b0 <__errno>
4332a: 2040 moveal %d0,%a0
4332c: 7016 moveq #22,%d0
4332e: 2080 movel %d0,%a0@
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
43330: 70ff moveq #-1,%d0
} else {
errno = EINVAL;
}
return rv;
}
43332: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
43338: 4e5e unlk %fp <== NOT EXECUTED
000431fa <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
431fa: 4e56 fff4 linkw %fp,#-12
431fe: 48d7 040c moveml %d2-%d3/%a2,%sp@
43202: 262e 0008 movel %fp@(8),%d3
43206: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
4320a: b5c3 cmpal %d3,%a2
4320c: 6608 bnes 43216 <newlib_delete_hook+0x1c>
ptr = _REENT;
4320e: 2439 0005 c2c4 movel 5c2c4 <_impure_ptr>,%d2
43214: 6004 bras 4321a <newlib_delete_hook+0x20>
} else {
ptr = deleted_task->libc_reent;
43216: 242a 0106 movel %a2@(262),%d2
}
if (ptr && ptr != _global_impure_ptr) {
4321a: 4a82 tstl %d2
4321c: 6722 beqs 43240 <newlib_delete_hook+0x46> <== NEVER TAKEN
4321e: b4b9 0005 b8e4 cmpl 5b8e4 <_global_impure_ptr>,%d2
43224: 671a beqs 43240 <newlib_delete_hook+0x46>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
43226: 4879 0004 300c pea 4300c <newlib_free_buffers>
4322c: 2f02 movel %d2,%sp@-
4322e: 4eb9 0004 d208 jsr 4d208 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
43234: 2f02 movel %d2,%sp@-
43236: 4eb9 0004 88a4 jsr 488a4 <_Workspace_Free>
4323c: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
43240: 42aa 0106 clrl %a2@(262)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
43244: b5c3 cmpal %d3,%a2
43246: 6606 bnes 4324e <newlib_delete_hook+0x54>
_REENT = 0;
43248: 42b9 0005 c2c4 clrl 5c2c4 <_impure_ptr>
}
}
4324e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
43254: 4e5e unlk %fp <== NOT EXECUTED
0004300c <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
4300c: 4e56 0000 linkw %fp,#0
43010: 2f0a movel %a2,%sp@-
43012: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
43016: 2f0a movel %a2,%sp@-
43018: 4eb9 0004 cdf4 jsr 4cdf4 <fileno>
4301e: 588f addql #4,%sp
43020: 7202 moveq #2,%d1
43022: b280 cmpl %d0,%d1
43024: 6528 bcss 4304e <newlib_free_buffers+0x42> <== NEVER TAKEN
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
43026: 302a 000c movew %a2@(12),%d0
4302a: 48c0 extl %d0
4302c: 4a00 tstb %d0
4302e: 6c28 bges 43058 <newlib_free_buffers+0x4c> <== ALWAYS TAKEN
free( fp->_bf._base );
43030: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
43034: 4eb9 0004 2830 jsr 42830 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
4303a: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
4303e: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43042: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43044: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43048: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
4304c: 6008 bras 43056 <newlib_free_buffers+0x4a> <== NOT EXECUTED
}
break;
default:
fclose(fp);
4304e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43050: 4eb9 0004 cba2 jsr 4cba2 <fclose> <== NOT EXECUTED
43056: 588f addql #4,%sp <== NOT EXECUTED
}
return 0;
}
43058: 246e fffc moveal %fp@(-4),%a2
4305c: 4280 clrl %d0
4305e: 4e5e unlk %fp <== NOT EXECUTED
00042898 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
42898: 4e56 0000 linkw %fp,#0
4289c: 2f02 movel %d2,%sp@-
4289e: 242e 0008 movel %fp@(8),%d2
rtems_device_driver status;
if ( !initialized ) {
428a2: 4a39 0005 e30c tstb 5e30c <initialized>
428a8: 662e bnes 428d8 <null_initialize+0x40>
initialized = 1;
status = rtems_io_register_name(
428aa: 42a7 clrl %sp@-
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
428ac: 7001 moveq #1,%d0
status = rtems_io_register_name(
428ae: 2f02 movel %d2,%sp@-
428b0: 4879 0005 bc50 pea 5bc50 <_rodata_start+0x780>
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
428b6: 13c0 0005 e30c moveb %d0,5e30c <initialized>
status = rtems_io_register_name(
428bc: 4eb9 0004 2e60 jsr 42e60 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
428c2: 4fef 000c lea %sp@(12),%sp
428c6: 4a80 tstl %d0
428c8: 6708 beqs 428d2 <null_initialize+0x3a> <== ALWAYS TAKEN
rtems_fatal_error_occurred(status);
428ca: 2f00 movel %d0,%sp@- <== NOT EXECUTED
428cc: 4eb9 0004 6984 jsr 46984 <rtems_fatal_error_occurred> <== NOT EXECUTED
NULL_major = major;
428d2: 23c2 0005 eb0c movel %d2,5eb0c <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
428d8: 242e fffc movel %fp@(-4),%d2
428dc: 4280 clrl %d0
428de: 4e5e unlk %fp <== NOT EXECUTED
00042900 <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
42900: 4e56 0000 linkw %fp,#0
42904: 206e 0010 moveal %fp@(16),%a0
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
42908: 4a88 tstl %a0
4290a: 6706 beqs 42912 <null_write+0x12> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
4290c: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
42912: 4280 clrl %d0
42914: 4e5e unlk %fp <== NOT EXECUTED
000432c8 <open>:
int open(
const char *pathname,
int flags,
...
)
{
432c8: 4e56 ffc8 linkw %fp,#-56
432cc: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@
432d0: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
432d4: 2002 movel %d2,%d0
432d6: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
432d8: 262e 0008 movel %fp@(8),%d3
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
432dc: 0800 0000 btst #0,%d0
432e0: 6704 beqs 432e6 <open+0x1e>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
432e2: 7804 moveq #4,%d4
432e4: 6002 bras 432e8 <open+0x20>
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
432e6: 4284 clrl %d4
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
432e8: 0800 0001 btst #1,%d0
432ec: 6704 beqs 432f2 <open+0x2a>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
432ee: 7002 moveq #2,%d0
432f0: 8880 orl %d0,%d4
va_start(ap, flags);
mode = va_arg( ap, int );
432f2: 2c2e 0010 movel %fp@(16),%d6
* 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();
432f6: 4eb9 0004 99b4 jsr 499b4 <rtems_libio_allocate>
432fc: 2440 moveal %d0,%a2
if ( iop == 0 ) {
432fe: 4a80 tstl %d0
43300: 6700 0158 beqw 4345a <open+0x192>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43304: 2f03 movel %d3,%sp@-
43306: 4bf9 0004 deac lea 4deac <strlen>,%a5
4330c: 7a01 moveq #1,%d5
4330e: 49f9 0004 2726 lea 42726 <rtems_filesystem_evaluate_path>,%a4
43314: 4e95 jsr %a5@
43316: 2e85 movel %d5,%sp@
43318: 2a0e movel %fp,%d5
4331a: 0685 ffff ffec addil #-20,%d5
43320: 2f05 movel %d5,%sp@-
43322: 2f04 movel %d4,%sp@-
43324: 2f00 movel %d0,%sp@-
43326: 2f03 movel %d3,%sp@-
43328: 4e94 jsr %a4@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
4332a: 4fef 0014 lea %sp@(20),%sp
4332e: 72ff moveq #-1,%d1
43330: b280 cmpl %d0,%d1
43332: 665e bnes 43392 <open+0xca>
if ( errno != ENOENT ) {
43334: 47f9 0004 ca54 lea 4ca54 <__errno>,%a3
4333a: 4e93 jsr %a3@
4333c: 7202 moveq #2,%d1
4333e: 2040 moveal %d0,%a0
43340: b290 cmpl %a0@,%d1
43342: 6624 bnes 43368 <open+0xa0>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
43344: 0802 0009 btst #9,%d2
43348: 6700 0114 beqw 4345e <open+0x196>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
4334c: 42a7 clrl %sp@-
4334e: 2006 movel %d6,%d0
43350: 42a7 clrl %sp@-
43352: 08c0 000f bset #15,%d0
43356: 2f00 movel %d0,%sp@-
43358: 2f03 movel %d3,%sp@-
4335a: 4eb9 0004 2be4 jsr 42be4 <mknod>
if ( rc ) {
43360: 4fef 0010 lea %sp@(16),%sp
43364: 4a80 tstl %d0
43366: 670c beqs 43374 <open+0xac> <== ALWAYS TAKEN
rc = errno;
43368: 4e93 jsr %a3@
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
4336a: 4285 clrl %d5
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
4336c: 2040 moveal %d0,%a0
4336e: 2410 movel %a0@,%d2
goto done;
43370: 6000 00fc braw 4346e <open+0x1a6>
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
43374: 2f03 movel %d3,%sp@-
43376: 4e95 jsr %a5@
43378: 7201 moveq #1,%d1
4337a: 2e81 movel %d1,%sp@
4337c: 2f05 movel %d5,%sp@-
4337e: 42a7 clrl %sp@-
43380: 2f00 movel %d0,%sp@-
43382: 2f03 movel %d3,%sp@-
43384: 4e94 jsr %a4@
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
43386: 4fef 0014 lea %sp@(20),%sp
4338a: 4a80 tstl %d0
4338c: 6600 00d6 bnew 43464 <open+0x19c>
43390: 6012 bras 433a4 <open+0xdc>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43392: 2002 movel %d2,%d0
43394: 0280 0000 0a00 andil #2560,%d0
4339a: 0c80 0000 0a00 cmpil #2560,%d0
433a0: 6700 00c8 beqw 4346a <open+0x1a2>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
433a4: 282a 0014 movel %a2@(20),%d4
iop->pathinfo = loc;
433a8: 2a0e movel %fp,%d5
433aa: 0685 ffff ffec addil #-20,%d5
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
433b0: 2f02 movel %d2,%sp@-
433b2: 4eb9 0004 9926 jsr 49926 <rtems_libio_fcntl_flags>
433b8: 8084 orl %d4,%d0
433ba: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
433be: 4878 0014 pea 14 <OPER2>
433c2: 2f05 movel %d5,%sp@-
433c4: 486a 0018 pea %a2@(24)
433c8: 4eb9 0004 d300 jsr 4d300 <memcpy>
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
433ce: 206a 0020 moveal %a2@(32),%a0
433d2: 2f06 movel %d6,%sp@-
433d4: 2f02 movel %d2,%sp@-
433d6: 2f03 movel %d3,%sp@-
433d8: 2f0a movel %a2,%sp@-
433da: 2050 moveal %a0@,%a0
433dc: 4e90 jsr %a0@
if ( rc ) {
433de: 4fef 0020 lea %sp@(32),%sp
433e2: 4a80 tstl %d0
433e4: 670c beqs 433f2 <open+0x12a>
rc = errno;
433e6: 4eb9 0004 ca54 jsr 4ca54 <__errno>
433ec: 2040 moveal %d0,%a0
433ee: 2410 movel %a0@,%d2
goto done;
433f0: 607c bras 4346e <open+0x1a6>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
433f2: 0802 000a btst #10,%d2
433f6: 6700 00a4 beqw 4349c <open+0x1d4>
rc = ftruncate( iop - rtems_libio_iops, 0 );
433fa: 200a movel %a2,%d0
433fc: 90b9 0005 d7f4 subl 5d7f4 <rtems_libio_iops>,%d0
43402: 223c b6db 6db7 movel #-1227133513,%d1
43408: e680 asrl #3,%d0
4340a: 4c00 1800 mulsl %d0,%d1
4340e: 42a7 clrl %sp@-
43410: 42a7 clrl %sp@-
43412: 2f01 movel %d1,%sp@-
43414: 4eb9 0004 9814 jsr 49814 <ftruncate>
if ( rc ) {
4341a: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
4341e: 2400 movel %d0,%d2
if ( rc ) {
43420: 677a beqs 4349c <open+0x1d4>
if(errno) rc = errno;
43422: 47f9 0004 ca54 lea 4ca54 <__errno>,%a3
43428: 4e93 jsr %a3@
4342a: 2040 moveal %d0,%a0
4342c: 4a90 tstl %a0@
4342e: 6706 beqs 43436 <open+0x16e> <== NEVER TAKEN
43430: 4e93 jsr %a3@
43432: 2040 moveal %d0,%a0
43434: 2410 movel %a0@,%d2
close( iop - rtems_libio_iops );
43436: 200a movel %a2,%d0
43438: 90b9 0005 d7f4 subl 5d7f4 <rtems_libio_iops>,%d0
4343e: 223c b6db 6db7 movel #-1227133513,%d1
43444: e680 asrl #3,%d0
43446: 4c00 1800 mulsl %d0,%d1
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
4344a: 4285 clrl %d5
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
4344c: 95ca subal %a2,%a2
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
4344e: 2f01 movel %d1,%sp@-
43450: 4eb9 0004 9790 jsr 49790 <close>
43456: 588f addql #4,%sp
43458: 6014 bras 4346e <open+0x1a6>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
4345a: 7417 moveq #23,%d2
4345c: 6030 bras 4348e <open+0x1c6>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
4345e: 4285 clrl %d5
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
43460: 7402 moveq #2,%d2
43462: 600e bras 43472 <open+0x1aa>
int mode;
int rc;
rtems_libio_t *iop = 0;
int status;
rtems_filesystem_location_info_t loc;
rtems_filesystem_location_info_t *loc_to_free = NULL;
43464: 4285 clrl %d5 <== NOT EXECUTED
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
43466: 740d moveq #13,%d2 <== NOT EXECUTED
43468: 6008 bras 43472 <open+0x1aa> <== NOT EXECUTED
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
4346a: 7411 moveq #17,%d2
4346c: 6004 bras 43472 <open+0x1aa>
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
4346e: 4a82 tstl %d2
43470: 672a beqs 4349c <open+0x1d4> <== NEVER TAKEN
if ( iop )
43472: 4a8a tstl %a2
43474: 670a beqs 43480 <open+0x1b8> <== NEVER TAKEN
rtems_libio_free( iop );
43476: 2f0a movel %a2,%sp@-
43478: 4eb9 0004 9a46 jsr 49a46 <rtems_libio_free>
4347e: 588f addql #4,%sp
if ( loc_to_free )
43480: 4a85 tstl %d5
43482: 670a beqs 4348e <open+0x1c6>
rtems_filesystem_freenode( loc_to_free );
43484: 2f05 movel %d5,%sp@-
43486: 4eb9 0004 281c jsr 4281c <rtems_filesystem_freenode>
4348c: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
4348e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
43494: 2040 moveal %d0,%a0
43496: 70ff moveq #-1,%d0
43498: 2082 movel %d2,%a0@
4349a: 6014 bras 434b0 <open+0x1e8>
}
return iop - rtems_libio_iops;
4349c: 200a movel %a2,%d0
4349e: 90b9 0005 d7f4 subl 5d7f4 <rtems_libio_iops>,%d0
434a4: 223c b6db 6db7 movel #-1227133513,%d1
434aa: e680 asrl #3,%d0
434ac: 4c01 0800 mulsl %d1,%d0
}
434b0: 4cee 3c7c ffc8 moveml %fp@(-56),%d2-%d6/%a2-%a5
434b6: 4e5e unlk %fp <== NOT EXECUTED
000440c6 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
440c6: 4e56 fff0 linkw %fp,#-16
440ca: 48d7 040c moveml %d2-%d3/%a2,%sp@
440ce: 242e 0008 movel %fp@(8),%d2
440d2: 246e 000c moveal %fp@(12),%a2
440d6: 1d42 fffe moveb %d2,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
440da: 202a 0034 movel %a2@(52),%d0
440de: 0800 0000 btst #0,%d0
440e2: 6700 010e beqw 441f2 <oproc+0x12c>
switch (c) {
440e6: 4281 clrl %d1
440e8: 1202 moveb %d2,%d1
440ea: 7609 moveq #9,%d3
440ec: b681 cmpl %d1,%d3
440ee: 6778 beqs 44168 <oproc+0xa2>
440f0: 650e bcss 44100 <oproc+0x3a>
440f2: 163c 0008 moveb #8,%d3
440f6: b681 cmpl %d1,%d3
440f8: 6600 00b2 bnew 441ac <oproc+0xe6>
440fc: 6000 00a0 braw 4419e <oproc+0xd8> <== NOT EXECUTED
44100: 760a moveq #10,%d3
44102: b681 cmpl %d1,%d3
44104: 670c beqs 44112 <oproc+0x4c>
44106: 163c 000d moveb #13,%d3
4410a: b681 cmpl %d1,%d3
4410c: 6600 009e bnew 441ac <oproc+0xe6>
44110: 602e bras 44140 <oproc+0x7a> <== NOT EXECUTED
case '\n':
if (tty->termios.c_oflag & ONLRET)
44112: 0800 0005 btst #5,%d0
44116: 6704 beqs 4411c <oproc+0x56> <== ALWAYS TAKEN
tty->column = 0;
44118: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLCR) {
4411c: 44c0 movew %d0,%ccr
4411e: 6600 00d2 bnew 441f2 <oproc+0x12c>
rtems_termios_puts ("\r", 1, tty);
44122: 2f0a movel %a2,%sp@-
44124: 4878 0001 pea 1 <ADD>
44128: 4879 0005 b206 pea 5b206 <rtems_filesystem_default_pathconf+0x32>
4412e: 4eb9 0004 3fce jsr 43fce <rtems_termios_puts>
tty->column = 0;
44134: 4fef 000c lea %sp@(12),%sp
44138: 42aa 0028 clrl %a2@(40)
4413c: 6000 00b4 braw 441f2 <oproc+0x12c>
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
44140: 0800 0004 btst #4,%d0 <== NOT EXECUTED
44144: 6708 beqs 4414e <oproc+0x88> <== NOT EXECUTED
44146: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED
4414a: 6700 00ba beqw 44206 <oproc+0x140> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
4414e: 44c0 movew %d0,%ccr <== NOT EXECUTED
44150: 6a0e bpls 44160 <oproc+0x9a> <== NOT EXECUTED
c = '\n';
44152: 720a moveq #10,%d1 <== NOT EXECUTED
44154: 1d41 fffe moveb %d1,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
44158: 0800 0005 btst #5,%d0 <== NOT EXECUTED
4415c: 6700 0094 beqw 441f2 <oproc+0x12c> <== NOT EXECUTED
tty->column = 0;
break;
}
tty->column = 0;
44160: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
break;
44164: 6000 008c braw 441f2 <oproc+0x12c> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
44168: 222a 0028 movel %a2@(40),%d1
4416c: 7407 moveq #7,%d2
4416e: 307c 0008 moveaw #8,%a0
44172: c481 andl %d1,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44174: 0280 0000 1800 andil #6144,%d0
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
4417a: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
4417c: 0c80 0000 1800 cmpil #6144,%d0
44182: 6612 bnes 44196 <oproc+0xd0> <== NEVER TAKEN
tty->column += i;
44184: d288 addl %a0,%d1
44186: 2541 0028 movel %d1,%a2@(40)
rtems_termios_puts ( " ", i, tty);
4418a: 2f0a movel %a2,%sp@-
4418c: 2f08 movel %a0,%sp@-
4418e: 4879 0005 b208 pea 5b208 <rtems_filesystem_default_pathconf+0x34>
44194: 6066 bras 441fc <oproc+0x136>
return;
}
tty->column += i;
44196: d1c1 addal %d1,%a0 <== NOT EXECUTED
44198: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED
break;
4419c: 6054 bras 441f2 <oproc+0x12c> <== NOT EXECUTED
case '\b':
if (tty->column > 0)
4419e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED
441a2: 6f4e bles 441f2 <oproc+0x12c> <== NOT EXECUTED
tty->column--;
441a4: 5380 subql #1,%d0 <== NOT EXECUTED
441a6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
441aa: 6046 bras 441f2 <oproc+0x12c> <== NOT EXECUTED
break;
default:
if (tty->termios.c_oflag & OLCUC)
441ac: 0800 0001 btst #1,%d0
441b0: 6724 beqs 441d6 <oproc+0x110> <== ALWAYS TAKEN
c = toupper(c);
441b2: 4280 clrl %d0 <== NOT EXECUTED
441b4: 1002 moveb %d2,%d0 <== NOT EXECUTED
441b6: 7403 moveq #3,%d2 <== NOT EXECUTED
441b8: 7602 moveq #2,%d3 <== NOT EXECUTED
441ba: 2079 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a0 <== NOT EXECUTED
441c0: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED
441c4: 49c1 extbl %d1 <== NOT EXECUTED
441c6: c282 andl %d2,%d1 <== NOT EXECUTED
441c8: b681 cmpl %d1,%d3 <== NOT EXECUTED
441ca: 6606 bnes 441d2 <oproc+0x10c> <== NOT EXECUTED
441cc: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED
441d2: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (!iscntrl(c))
441d6: 4280 clrl %d0
441d8: 102e fffe moveb %fp@(-2),%d0
441dc: 2079 0005 c2c0 moveal 5c2c0 <__ctype_ptr__>,%a0
441e2: 1030 0801 moveb %a0@(00000001,%d0:l),%d0
441e6: 49c0 extbl %d0
441e8: 0800 0005 btst #5,%d0
441ec: 6604 bnes 441f2 <oproc+0x12c> <== NEVER TAKEN
tty->column++;
441ee: 52aa 0028 addql #1,%a2@(40)
break;
}
}
rtems_termios_puts (&c, 1, tty);
441f2: 2f0a movel %a2,%sp@-
441f4: 4878 0001 pea 1 <ADD>
441f8: 486e fffe pea %fp@(-2)
441fc: 4eb9 0004 3fce jsr 43fce <rtems_termios_puts>
44202: 4fef 000c lea %sp@(12),%sp
}
44206: 4cee 040c fff0 moveml %fp@(-16),%d2-%d3/%a2
4420c: 4e5e unlk %fp <== NOT EXECUTED
0004a74c <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4a74c: 4e56 ffe4 linkw %fp,#-28
4a750: 48d7 040c moveml %d2-%d3/%a2,%sp@
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4a754: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4a758: 4879 0005 cafa pea 5cafa <_CPU_m68k_BFFFO_table+0x100>
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4a75e: 246e 0008 moveal %fp@(8),%a2
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4a762: 4eb9 0004 bcf8 jsr 4bcf8 <rtems_mkdir>
4a768: 508f addql #8,%sp
4a76a: 4a80 tstl %d0
4a76c: 6600 00e8 bnew 4a856 <pipe_create+0x10a>
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4a770: 4878 000a pea a <LASTO>
4a774: 260e movel %fp,%d3
4a776: 4879 0005 caff pea 5caff <_CPU_m68k_BFFFO_table+0x105>
4a77c: 0683 ffff fff1 addil #-15,%d3
4a782: 2f03 movel %d3,%sp@-
4a784: 4eb9 0004 ebc0 jsr 4ebc0 <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4a78a: 3039 0005 e6f8 movew 5e6f8 <rtems_pipe_no>,%d0
4a790: 2200 movel %d0,%d1
4a792: 5281 addql #1,%d1
4a794: 3f00 movew %d0,%sp@-
4a796: 33c1 0005 e6f8 movew %d1,5e6f8 <rtems_pipe_no>
4a79c: 4267 clrw %sp@-
4a79e: 4879 0005 cb0a pea 5cb0a <_CPU_m68k_BFFFO_table+0x110>
4a7a4: 486e fffb pea %fp@(-5)
4a7a8: 4eb9 0004 f038 jsr 4f038 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4a7ae: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b>
4a7b2: 2f03 movel %d3,%sp@-
4a7b4: 4eb9 0004 babc jsr 4babc <mkfifo>
4a7ba: 4fef 0020 lea %sp@(32),%sp
4a7be: 4a80 tstl %d0
4a7c0: 670a beqs 4a7cc <pipe_create+0x80>
if (errno != EEXIST){
4a7c2: 4eb9 0004 e314 jsr 4e314 <__errno>
4a7c8: 6000 008c braw 4a856 <pipe_create+0x10a>
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4a7cc: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
4a7d0: 2f03 movel %d3,%sp@-
4a7d2: 4eb9 0004 44b0 jsr 444b0 <open>
if (filsdes[0] < 0) {
4a7d8: 508f addql #8,%sp
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4a7da: 2480 movel %d0,%a2@
if (filsdes[0] < 0) {
4a7dc: 6c0e bges 4a7ec <pipe_create+0xa0>
err = errno;
4a7de: 4eb9 0004 e314 jsr 4e314 <__errno>
4a7e4: 2040 moveal %d0,%a0
4a7e6: 2410 movel %a0@,%d2
/* Delete file at errors, or else if pipe is successfully created
the file node will be deleted after it is closed by all. */
unlink(fifopath);
4a7e8: 2f03 movel %d3,%sp@-
4a7ea: 6054 bras 4a840 <pipe_create+0xf4>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4a7ec: b0b9 0005 d6c4 cmpl 5d6c4 <rtems_libio_number_iops>,%d0
4a7f2: 6412 bccs 4a806 <pipe_create+0xba> <== NEVER TAKEN
4a7f4: 2200 movel %d0,%d1
4a7f6: ed88 lsll #6,%d0
4a7f8: e789 lsll #3,%d1
4a7fa: 2079 0005 edec moveal 5edec <rtems_libio_iops>,%a0
4a800: 9081 subl %d1,%d0
4a802: d1c0 addal %d0,%a0
4a804: 6002 bras 4a808 <pipe_create+0xbc>
4a806: 91c8 subal %a0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4a808: 70fe moveq #-2,%d0
4a80a: c1a8 0014 andl %d0,%a0@(20)
filsdes[1] = open(fifopath, O_WRONLY);
4a80e: 4878 0001 pea 1 <ADD>
4a812: 486e fff1 pea %fp@(-15)
4a816: 4eb9 0004 44b0 jsr 444b0 <open>
if (filsdes[1] < 0) {
4a81c: 508f addql #8,%sp
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
4a81e: 2540 0004 movel %d0,%a2@(4)
if (filsdes[1] < 0) {
4a822: 6c16 bges 4a83a <pipe_create+0xee>
err = errno;
4a824: 4eb9 0004 e314 jsr 4e314 <__errno>
4a82a: 2040 moveal %d0,%a0
4a82c: 2410 movel %a0@,%d2
close(filsdes[0]);
4a82e: 2f12 movel %a2@,%sp@-
4a830: 4eb9 0004 338c jsr 4338c <close>
4a836: 588f addql #4,%sp
4a838: 6002 bras 4a83c <pipe_create+0xf0>
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4a83a: 4282 clrl %d2
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4a83c: 486e fff1 pea %fp@(-15)
4a840: 4eb9 0004 6140 jsr 46140 <unlink>
4a846: 588f addql #4,%sp
}
if(err != 0)
4a848: 4a82 tstl %d2
4a84a: 670e beqs 4a85a <pipe_create+0x10e>
rtems_set_errno_and_return_minus_one(err);
4a84c: 4eb9 0004 e314 jsr 4e314 <__errno>
4a852: 2040 moveal %d0,%a0
4a854: 2082 movel %d2,%a0@
4a856: 70ff moveq #-1,%d0
4a858: 6002 bras 4a85c <pipe_create+0x110>
return 0;
4a85a: 4280 clrl %d0
}
4a85c: 4cee 040c ffe4 moveml %fp@(-28),%d2-%d3/%a2
4a862: 4e5e unlk %fp
...
0004b360 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4b360: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4b364: 203c 4004 667f movel #1074030207,%d0
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4b36a: 2f0b movel %a3,%sp@-
4b36c: 266e 0010 moveal %fp@(16),%a3
4b370: 2f0a movel %a2,%sp@-
4b372: 246e 0008 moveal %fp@(8),%a2
if (cmd == FIONREAD) {
4b376: b0ae 000c cmpl %fp@(12),%d0
4b37a: 662e bnes 4b3aa <pipe_ioctl+0x4a>
if (buffer == NULL)
4b37c: 4a8b tstl %a3
4b37e: 672e beqs 4b3ae <pipe_ioctl+0x4e>
return -EFAULT;
if (! PIPE_LOCK(pipe))
4b380: 42a7 clrl %sp@-
4b382: 42a7 clrl %sp@-
4b384: 2f2a 0028 movel %a2@(40),%sp@-
4b388: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
4b38e: 4fef 000c lea %sp@(12),%sp
4b392: 4a80 tstl %d0
4b394: 661c bnes 4b3b2 <pipe_ioctl+0x52> <== NEVER TAKEN
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4b396: 26aa 000c movel %a2@(12),%a3@
PIPE_UNLOCK(pipe);
4b39a: 2f2a 0028 movel %a2@(40),%sp@-
4b39e: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
return 0;
4b3a4: 588f addql #4,%sp
4b3a6: 4280 clrl %d0
4b3a8: 600a bras 4b3b4 <pipe_ioctl+0x54>
}
return -EINVAL;
4b3aa: 70ea moveq #-22,%d0
4b3ac: 6006 bras 4b3b4 <pipe_ioctl+0x54>
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
4b3ae: 70f2 moveq #-14,%d0
4b3b0: 6002 bras 4b3b4 <pipe_ioctl+0x54>
if (! PIPE_LOCK(pipe))
return -EINTR;
4b3b2: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4b3b4: 246e fff8 moveal %fp@(-8),%a2
4b3b8: 266e fffc moveal %fp@(-4),%a3
4b3bc: 4e5e unlk %fp <== NOT EXECUTED
0004ab64 <pipe_lock>:
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
4ab64: 4e56 0000 linkw %fp,#0
4ab68: 2f02 movel %d2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4ab6a: 4ab9 0005 e6fc tstl 5e6fc <pipe_semaphore>
4ab70: 6654 bnes 4abc6 <pipe_lock+0x62>
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4ab72: 42a7 clrl %sp@-
4ab74: 42a7 clrl %sp@-
4ab76: 2f39 0005 edf4 movel 5edf4 <rtems_libio_semaphore>,%sp@-
4ab7c: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4ab82: 4fef 000c lea %sp@(12),%sp
4ab86: 4ab9 0005 e6fc tstl 5e6fc <pipe_semaphore>
4ab8c: 6624 bnes 4abb2 <pipe_lock+0x4e> <== NEVER TAKEN
sc = rtems_semaphore_create(
4ab8e: 4879 0005 e6fc pea 5e6fc <pipe_semaphore>
4ab94: 42a7 clrl %sp@-
4ab96: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4ab9a: 4878 0001 pea 1 <ADD>
4ab9e: 2f3c 5049 5045 movel #1346981957,%sp@-
4aba4: 4eb9 0004 68d0 jsr 468d0 <rtems_semaphore_create>
4abaa: 4fef 0014 lea %sp@(20),%sp
4abae: 2400 movel %d0,%d2
4abb0: 6002 bras 4abb4 <pipe_lock+0x50>
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
4abb2: 4282 clrl %d2 <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4abb4: 2f39 0005 edf4 movel 5edf4 <rtems_libio_semaphore>,%sp@-
4abba: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4abc0: 588f addql #4,%sp
4abc2: 4a82 tstl %d2
4abc4: 6618 bnes 4abde <pipe_lock+0x7a>
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4abc6: 42a7 clrl %sp@-
4abc8: 42a7 clrl %sp@-
4abca: 2f39 0005 e6fc movel 5e6fc <pipe_semaphore>,%sp@-
4abd0: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
}
if (sc == RTEMS_SUCCESSFUL) {
4abd6: 4fef 000c lea %sp@(12),%sp
4abda: 4a80 tstl %d0
4abdc: 6704 beqs 4abe2 <pipe_lock+0x7e> <== ALWAYS TAKEN
return 0;
} else {
return -ENOMEM;
4abde: 70f4 moveq #-12,%d0
4abe0: 6002 bras 4abe4 <pipe_lock+0x80>
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4abe2: 4280 clrl %d0
} else {
return -ENOMEM;
}
}
4abe4: 242e fffc movel %fp@(-4),%d2
4abe8: 4e5e unlk %fp <== NOT EXECUTED
0004b074 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4b074: 4e56 ffd4 linkw %fp,#-44
4b078: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4b07c: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4b07e: 246e 0008 moveal %fp@(8),%a2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4b082: 2e3c 0004 6b08 movel #289544,%d7
4b088: 2047 moveal %d7,%a0
4b08a: 42a7 clrl %sp@-
4b08c: 2f2a 0028 movel %a2@(40),%sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4b090: 286e 000c moveal %fp@(12),%a4
4b094: 2a2e 0010 movel %fp@(16),%d5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4b098: 4e90 jsr %a0@
4b09a: 4fef 000c lea %sp@(12),%sp
4b09e: 4a80 tstl %d0
4b0a0: 6600 011a bnew 4b1bc <pipe_read+0x148>
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4b0a4: 2c0e movel %fp,%d6
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4b0a6: 4282 clrl %d2
4b0a8: 47f9 0004 ebc0 lea 4ebc0 <memcpy>,%a3
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4b0ae: 5986 subql #4,%d6
4b0b0: 4bf9 0004 c8bc lea 4c8bc <rtems_barrier_release>,%a5
4b0b6: 6000 00e2 braw 4b19a <pipe_read+0x126>
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4b0ba: 4aaa 0014 tstl %a2@(20)
4b0be: 6700 00e0 beqw 4b1a0 <pipe_read+0x12c>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4b0c2: 206e 0014 moveal %fp@(20),%a0
4b0c6: 7001 moveq #1,%d0
4b0c8: c0a8 0014 andl %a0@(20),%d0
4b0cc: 6600 00d6 bnew 4b1a4 <pipe_read+0x130>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4b0d0: 52aa 0018 addql #1,%a2@(24)
PIPE_UNLOCK(pipe);
4b0d4: 2f2a 0028 movel %a2@(40),%sp@-
4b0d8: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
if (! PIPE_READWAIT(pipe))
4b0de: 42a7 clrl %sp@-
4b0e0: 2f2a 002c movel %a2@(44),%sp@-
4b0e4: 4eb9 0004 c920 jsr 4c920 <rtems_barrier_wait>
4b0ea: 4fef 000c lea %sp@(12),%sp
4b0ee: 4a80 tstl %d0
4b0f0: 6604 bnes 4b0f6 <pipe_read+0x82> <== NEVER TAKEN
4b0f2: 4283 clrl %d3
4b0f4: 6002 bras 4b0f8 <pipe_read+0x84>
ret = -EINTR;
4b0f6: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4b0f8: 42a7 clrl %sp@-
4b0fa: 2047 moveal %d7,%a0
4b0fc: 42a7 clrl %sp@-
4b0fe: 2f2a 0028 movel %a2@(40),%sp@-
4b102: 4e90 jsr %a0@
4b104: 4fef 000c lea %sp@(12),%sp
4b108: 4a80 tstl %d0
4b10a: 6600 00a8 bnew 4b1b4 <pipe_read+0x140>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4b10e: 53aa 0018 subql #1,%a2@(24)
if (ret != 0)
4b112: 4a83 tstl %d3
4b114: 6600 0090 bnew 4b1a6 <pipe_read+0x132>
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4b118: 262a 000c movel %a2@(12),%d3
4b11c: 679c beqs 4b0ba <pipe_read+0x46>
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4b11e: 2005 movel %d5,%d0
4b120: 9082 subl %d2,%d0
4b122: b083 cmpl %d3,%d0
4b124: 6402 bccs 4b128 <pipe_read+0xb4>
4b126: 2600 movel %d0,%d3
chunk1 = pipe->Size - pipe->Start;
4b128: 222a 0008 movel %a2@(8),%d1
4b12c: 200c movel %a4,%d0
4b12e: d082 addl %d2,%d0
4b130: 282a 0004 movel %a2@(4),%d4
4b134: 9881 subl %d1,%d4
4b136: d292 addl %a2@,%d1
if (chunk > chunk1) {
4b138: b883 cmpl %d3,%d4
4b13a: 6c20 bges 4b15c <pipe_read+0xe8>
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4b13c: 2f04 movel %d4,%sp@-
4b13e: 2f01 movel %d1,%sp@-
4b140: 2f00 movel %d0,%sp@-
4b142: 4e93 jsr %a3@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4b144: 2203 movel %d3,%d1
4b146: 9284 subl %d4,%d1
4b148: 2002 movel %d2,%d0
4b14a: d084 addl %d4,%d0
4b14c: 2f01 movel %d1,%sp@-
4b14e: 2f12 movel %a2@,%sp@-
4b150: 4874 0800 pea %a4@(00000000,%d0:l)
4b154: 4e93 jsr %a3@
4b156: 4fef 0018 lea %sp@(24),%sp
4b15a: 600c bras 4b168 <pipe_read+0xf4>
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4b15c: 2f03 movel %d3,%sp@-
4b15e: 2f01 movel %d1,%sp@-
4b160: 2f00 movel %d0,%sp@-
4b162: 4e93 jsr %a3@
4b164: 4fef 000c lea %sp@(12),%sp
pipe->Start += chunk;
4b168: 2003 movel %d3,%d0
4b16a: d0aa 0008 addl %a2@(8),%d0
pipe->Start %= pipe->Size;
4b16e: 4c6a 0001 0004 remul %a2@(4),%d1,%d0
pipe->Length -= chunk;
4b174: 202a 000c movel %a2@(12),%d0
4b178: 9083 subl %d3,%d0
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4b17a: 2541 0008 movel %d1,%a2@(8)
pipe->Length -= chunk;
4b17e: 2540 000c movel %d0,%a2@(12)
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4b182: 6604 bnes 4b188 <pipe_read+0x114>
pipe->Start = 0;
4b184: 42aa 0008 clrl %a2@(8)
if (pipe->waitingWriters > 0)
4b188: 4aaa 001c tstl %a2@(28)
4b18c: 670a beqs 4b198 <pipe_read+0x124>
PIPE_WAKEUPWRITERS(pipe);
4b18e: 2f06 movel %d6,%sp@-
4b190: 2f2a 0030 movel %a2@(48),%sp@-
4b194: 4e95 jsr %a5@
4b196: 508f addql #8,%sp
read += chunk;
4b198: d483 addl %d3,%d2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4b19a: ba82 cmpl %d2,%d5
4b19c: 6200 ff7a bhiw 4b118 <pipe_read+0xa4>
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4b1a0: 4283 clrl %d3
4b1a2: 6002 bras 4b1a6 <pipe_read+0x132>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4b1a4: 76f5 moveq #-11,%d3
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4b1a6: 2f2a 0028 movel %a2@(40),%sp@-
4b1aa: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
4b1b0: 588f addql #4,%sp
4b1b2: 6002 bras 4b1b6 <pipe_read+0x142>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4b1b4: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4b1b6: 4a82 tstl %d2
4b1b8: 6e08 bgts 4b1c2 <pipe_read+0x14e>
4b1ba: 6004 bras 4b1c0 <pipe_read+0x14c>
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4b1bc: 74fc moveq #-4,%d2 <== NOT EXECUTED
4b1be: 6002 bras 4b1c2 <pipe_read+0x14e> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4b1c0: 2403 movel %d3,%d2
}
4b1c2: 2002 movel %d2,%d0
4b1c4: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4b1ca: 4e5e unlk %fp <== NOT EXECUTED
0004ac5a <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4ac5a: 4e56 fff0 linkw %fp,#-16
4ac5e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
4ac62: 266e 0008 moveal %fp@(8),%a3
pipe_control_t *pipe = *pipep;
4ac66: 2453 moveal %a3@,%a2
uint32_t mode;
if (pipe_lock())
4ac68: 4eba fefa jsr %pc@(4ab64 <pipe_lock>)
4ac6c: 4a80 tstl %d0
4ac6e: 6616 bnes 4ac86 <pipe_release+0x2c> <== NEVER TAKEN
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
4ac70: 42a7 clrl %sp@-
4ac72: 42a7 clrl %sp@-
4ac74: 2f2a 0028 movel %a2@(40),%sp@-
4ac78: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
4ac7e: 4fef 000c lea %sp@(12),%sp
4ac82: 4a80 tstl %d0
4ac84: 670c beqs 4ac92 <pipe_release+0x38> <== ALWAYS TAKEN
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
4ac86: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4ac8c: 4eb9 0004 714c jsr 4714c <rtems_fatal_error_occurred> <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
4ac92: 206e 000c moveal %fp@(12),%a0
4ac96: 7406 moveq #6,%d2
4ac98: c4a8 0014 andl %a0@(20),%d2
if (mode & LIBIO_FLAGS_READ)
4ac9c: 0802 0001 btst #1,%d2
4aca0: 6704 beqs 4aca6 <pipe_release+0x4c>
pipe->Readers --;
4aca2: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4aca6: 44c2 movew %d2,%ccr
4aca8: 6604 bnes 4acae <pipe_release+0x54>
pipe->Writers --;
4acaa: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4acae: 2f2a 0028 movel %a2@(40),%sp@-
4acb2: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
4acb8: 588f addql #4,%sp
4acba: 4aaa 0010 tstl %a2@(16)
4acbe: 6622 bnes 4ace2 <pipe_release+0x88>
4acc0: 4aaa 0014 tstl %a2@(20)
4acc4: 660c bnes 4acd2 <pipe_release+0x78>
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
4acc6: 2f0a movel %a2,%sp@-
4acc8: 4eba ff22 jsr %pc@(4abec <pipe_free>)
*pipep = NULL;
4accc: 588f addql #4,%sp
4acce: 4293 clrl %a3@
4acd0: 602c bras 4acfe <pipe_release+0xa4>
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4acd2: 7004 moveq #4,%d0
4acd4: b082 cmpl %d2,%d0
4acd6: 670a beqs 4ace2 <pipe_release+0x88> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4acd8: 486e fffc pea %fp@(-4)
4acdc: 2f2a 0030 movel %a2@(48),%sp@-
4ace0: 6014 bras 4acf6 <pipe_release+0x9c>
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4ace2: 4aaa 0014 tstl %a2@(20)
4ace6: 6616 bnes 4acfe <pipe_release+0xa4> <== NEVER TAKEN
4ace8: 7002 moveq #2,%d0
4acea: b082 cmpl %d2,%d0
4acec: 6710 beqs 4acfe <pipe_release+0xa4> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4acee: 486e fffc pea %fp@(-4)
4acf2: 2f2a 002c movel %a2@(44),%sp@-
4acf6: 4eb9 0004 c8bc jsr 4c8bc <rtems_barrier_release>
4acfc: 508f addql #8,%sp
pipe_unlock();
4acfe: 4eba ff34 jsr %pc@(4ac34 <pipe_unlock>)
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4ad02: 4280 clrl %d0
4ad04: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
4ad0a: 4e5e unlk %fp <== NOT EXECUTED
0004ac34 <pipe_unlock>:
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
4ac34: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4ac38: 2f39 0005 e6fc movel 5e6fc <pipe_semaphore>,%sp@-
4ac3e: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
4ac44: 588f addql #4,%sp
4ac46: 4a80 tstl %d0
4ac48: 670c beqs 4ac56 <pipe_unlock+0x22> <== ALWAYS TAKEN
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
4ac4a: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED
4ac50: 4eb9 0004 714c jsr 4714c <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
4ac56: 4e5e unlk %fp <== NOT EXECUTED
0004b1ce <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4b1ce: 4e56 ffd4 linkw %fp,#-44
4b1d2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
4b1d6: 246e 0008 moveal %fp@(8),%a2
4b1da: 286e 000c moveal %fp@(12),%a4
4b1de: 282e 0010 movel %fp@(16),%d4
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4b1e2: 6700 0166 beqw 4b34a <pipe_write+0x17c>
return 0;
if (! PIPE_LOCK(pipe))
4b1e6: 42a7 clrl %sp@-
4b1e8: 42a7 clrl %sp@-
4b1ea: 2f2a 0028 movel %a2@(40),%sp@-
4b1ee: 4eb9 0004 6b08 jsr 46b08 <rtems_semaphore_obtain>
4b1f4: 4fef 000c lea %sp@(12),%sp
4b1f8: 4a80 tstl %d0
4b1fa: 6600 0152 bnew 4b34e <pipe_write+0x180>
return -EINTR;
if (pipe->Readers == 0) {
4b1fe: 4aaa 0010 tstl %a2@(16)
4b202: 6700 010a beqw 4b30e <pipe_write+0x140>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4b206: b8aa 0004 cmpl %a2@(4),%d4
4b20a: 6204 bhis 4b210 <pipe_write+0x42> <== NEVER TAKEN
4b20c: 2a04 movel %d4,%d5
4b20e: 6002 bras 4b212 <pipe_write+0x44>
4b210: 7a01 moveq #1,%d5 <== NOT EXECUTED
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
4b212: 4282 clrl %d2
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4b214: 2e3c 0004 c920 movel #313632,%d7
4b21a: 47f9 0004 ebc0 lea 4ebc0 <memcpy>,%a3
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4b220: 4bf9 0004 c8bc lea 4c8bc <rtems_barrier_release>,%a5
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4b226: 2c3c 0004 6b08 movel #289544,%d6
4b22c: 6000 00d8 braw 4b306 <pipe_write+0x138>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
4b230: 206e 0014 moveal %fp@(20),%a0
4b234: 7001 moveq #1,%d0
4b236: c0a8 0014 andl %a0@(20),%d0
4b23a: 6600 00d8 bnew 4b314 <pipe_write+0x146>
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4b23e: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4b242: 2f2a 0028 movel %a2@(40),%sp@-
4b246: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
if (! PIPE_WRITEWAIT(pipe))
4b24c: 2047 moveal %d7,%a0
4b24e: 42a7 clrl %sp@-
4b250: 2f2a 0030 movel %a2@(48),%sp@-
4b254: 4e90 jsr %a0@
4b256: 4fef 000c lea %sp@(12),%sp
4b25a: 4a80 tstl %d0
4b25c: 6604 bnes 4b262 <pipe_write+0x94> <== NEVER TAKEN
4b25e: 4283 clrl %d3
4b260: 6002 bras 4b264 <pipe_write+0x96>
ret = -EINTR;
4b262: 76fc moveq #-4,%d3 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
4b264: 42a7 clrl %sp@-
4b266: 2046 moveal %d6,%a0
4b268: 42a7 clrl %sp@-
4b26a: 2f2a 0028 movel %a2@(40),%sp@-
4b26e: 4e90 jsr %a0@
4b270: 4fef 000c lea %sp@(12),%sp
4b274: 4a80 tstl %d0
4b276: 6600 00ca bnew 4b342 <pipe_write+0x174>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4b27a: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4b27e: 4a83 tstl %d3
4b280: 6600 0098 bnew 4b31a <pipe_write+0x14c>
goto out_locked;
if (pipe->Readers == 0) {
4b284: 4aaa 0010 tstl %a2@(16)
4b288: 6700 008e beqw 4b318 <pipe_write+0x14a>
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
4b28c: 202a 0004 movel %a2@(4),%d0
4b290: 2600 movel %d0,%d3
4b292: 222a 000c movel %a2@(12),%d1
4b296: 9681 subl %d1,%d3
4b298: ba83 cmpl %d3,%d5
4b29a: 6294 bhis 4b230 <pipe_write+0x62>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4b29c: 2044 moveal %d4,%a0
4b29e: 91c2 subal %d2,%a0
4b2a0: b1c3 cmpal %d3,%a0
4b2a2: 6402 bccs 4b2a6 <pipe_write+0xd8>
4b2a4: 2608 movel %a0,%d3
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4b2a6: 2a01 movel %d1,%d5
4b2a8: daaa 0008 addl %a2@(8),%d5
4b2ac: 4c40 5001 remul %d0,%d1,%d5
4b2b0: 2a00 movel %d0,%d5
4b2b2: 9a81 subl %d1,%d5
4b2b4: 2012 movel %a2@,%d0
4b2b6: d081 addl %d1,%d0
4b2b8: 220c movel %a4,%d1
4b2ba: d282 addl %d2,%d1
if (chunk > chunk1) {
4b2bc: ba83 cmpl %d3,%d5
4b2be: 6c20 bges 4b2e0 <pipe_write+0x112>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4b2c0: 2f05 movel %d5,%sp@-
4b2c2: 2f01 movel %d1,%sp@-
4b2c4: 2f00 movel %d0,%sp@-
4b2c6: 4e93 jsr %a3@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4b2c8: 2203 movel %d3,%d1
4b2ca: 9285 subl %d5,%d1
4b2cc: 2005 movel %d5,%d0
4b2ce: d082 addl %d2,%d0
4b2d0: 2f01 movel %d1,%sp@-
4b2d2: 4874 0800 pea %a4@(00000000,%d0:l)
4b2d6: 2f12 movel %a2@,%sp@-
4b2d8: 4e93 jsr %a3@
4b2da: 4fef 0018 lea %sp@(24),%sp
4b2de: 600c bras 4b2ec <pipe_write+0x11e>
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4b2e0: 2f03 movel %d3,%sp@-
4b2e2: 2f01 movel %d1,%sp@-
4b2e4: 2f00 movel %d0,%sp@-
4b2e6: 4e93 jsr %a3@
4b2e8: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
4b2ec: d7aa 000c addl %d3,%a2@(12)
if (pipe->waitingReaders > 0)
4b2f0: 4aaa 0018 tstl %a2@(24)
4b2f4: 670c beqs 4b302 <pipe_write+0x134>
PIPE_WAKEUPREADERS(pipe);
4b2f6: 486e fffc pea %fp@(-4)
4b2fa: 2f2a 002c movel %a2@(44),%sp@-
4b2fe: 4e95 jsr %a5@
4b300: 508f addql #8,%sp
written += chunk;
4b302: d483 addl %d3,%d2
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
4b304: 7a01 moveq #1,%d5
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4b306: b882 cmpl %d2,%d4
4b308: 6282 bhis 4b28c <pipe_write+0xbe>
4b30a: 4283 clrl %d3
4b30c: 600c bras 4b31a <pipe_write+0x14c>
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4b30e: 76e0 moveq #-32,%d3
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4b310: 4282 clrl %d2
4b312: 6006 bras 4b31a <pipe_write+0x14c>
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4b314: 76f5 moveq #-11,%d3
4b316: 6002 bras 4b31a <pipe_write+0x14c>
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4b318: 76e0 moveq #-32,%d3 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4b31a: 2f2a 0028 movel %a2@(40),%sp@-
4b31e: 4eb9 0004 6c10 jsr 46c10 <rtems_semaphore_release>
4b324: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4b326: 70e0 moveq #-32,%d0
4b328: b083 cmpl %d3,%d0
4b32a: 6618 bnes 4b344 <pipe_write+0x176>
kill(getpid(), SIGPIPE);
4b32c: 4eb9 0004 baa8 jsr 4baa8 <getpid>
4b332: 4878 000d pea d <OPER1+0x1>
4b336: 2f00 movel %d0,%sp@-
4b338: 4eb9 0004 bf74 jsr 4bf74 <kill>
4b33e: 508f addql #8,%sp
4b340: 6002 bras 4b344 <pipe_write+0x176>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4b342: 76fc moveq #-4,%d3 <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4b344: 4a82 tstl %d2
4b346: 6e0c bgts 4b354 <pipe_write+0x186>
4b348: 6008 bras 4b352 <pipe_write+0x184>
{
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
return 0;
4b34a: 4282 clrl %d2 <== NOT EXECUTED
4b34c: 6006 bras 4b354 <pipe_write+0x186> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
4b34e: 74fc moveq #-4,%d2 <== NOT EXECUTED
4b350: 6002 bras 4b354 <pipe_write+0x186> <== NOT EXECUTED
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4b352: 2403 movel %d3,%d2
return written;
return ret;
}
4b354: 2002 movel %d2,%d0
4b356: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
4b35c: 4e5e unlk %fp <== NOT EXECUTED
00046b44 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
46b44: 4e56 0000 linkw %fp,#0
46b48: 202e 000c movel %fp@(12),%d0
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
46b4c: 2200 movel %d0,%d1
46b4e: 5381 subql #1,%d1
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
46b50: 52b9 0006 30d0 addql #1,630d0 <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
46b56: c280 andl %d0,%d1
46b58: 6610 bnes 46b6a <posix_memalign+0x26> <== NEVER TAKEN
46b5a: 123c 0003 moveb #3,%d1
46b5e: b280 cmpl %d0,%d1
46b60: 6408 bccs 46b6a <posix_memalign+0x26>
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
}
46b62: 4e5e unlk %fp
/*
* rtems_memalign does all of the error checking work EXCEPT
* for adding restrictionso on the alignment.
*/
return rtems_memalign( pointer, alignment, size );
46b64: 4ef9 0004 6ce0 jmp 46ce0 <rtems_memalign>
}
46b6a: 7016 moveq #22,%d0
46b6c: 4e5e unlk %fp <== NOT EXECUTED
00049990 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
49990: 4e56 0000 linkw %fp,#0
49994: 206e 0008 moveal %fp@(8),%a0
49998: 222e 000c movel %fp@(12),%d1
4999c: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4999e: 4a88 tstl %a0
499a0: 671e beqs 499c0 <pthread_attr_setschedpolicy+0x30>
499a2: 4a90 tstl %a0@
499a4: 671a beqs 499c0 <pthread_attr_setschedpolicy+0x30>
return EINVAL;
switch ( policy ) {
499a6: 7004 moveq #4,%d0
499a8: b081 cmpl %d1,%d0
499aa: 6518 bcss 499c4 <pthread_attr_setschedpolicy+0x34>
499ac: 103c 0001 moveb #1,%d0
499b0: 7417 moveq #23,%d2
499b2: e3a8 lsll %d1,%d0
499b4: c082 andl %d2,%d0
499b6: 670c beqs 499c4 <pthread_attr_setschedpolicy+0x34><== NEVER TAKEN
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
499b8: 2141 0014 movel %d1,%a0@(20)
return 0;
499bc: 4280 clrl %d0
499be: 600a bras 499ca <pthread_attr_setschedpolicy+0x3a>
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
499c0: 7016 moveq #22,%d0
499c2: 6006 bras 499ca <pthread_attr_setschedpolicy+0x3a>
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
499c4: 203c 0000 0086 movel #134,%d0
}
}
499ca: 241f movel %sp@+,%d2
499cc: 4e5e unlk %fp <== NOT EXECUTED
00045b28 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
45b28: 4e56 ffdc linkw %fp,#-36
45b2c: 206e 000c moveal %fp@(12),%a0
45b30: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
45b34: 246e 0008 moveal %fp@(8),%a2
45b38: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
45b3c: 4a8a tstl %a2
45b3e: 6700 008e beqw 45bce <pthread_barrier_init+0xa6>
return EINVAL;
if ( count == 0 )
45b42: 4a82 tstl %d2
45b44: 6700 0088 beqw 45bce <pthread_barrier_init+0xa6>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
45b48: 4a88 tstl %a0
45b4a: 6614 bnes 45b60 <pthread_barrier_init+0x38>
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
45b4c: 260e movel %fp,%d3
45b4e: 0683 ffff fff0 addil #-16,%d3
45b54: 2f03 movel %d3,%sp@-
45b56: 4eb9 0004 5a6c jsr 45a6c <pthread_barrierattr_init>
45b5c: 588f addql #4,%sp
the_attr = &my_attr;
45b5e: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
45b60: 4a90 tstl %a0@
45b62: 676a beqs 45bce <pthread_barrier_init+0xa6>
return EINVAL;
switch ( the_attr->process_shared ) {
45b64: 4aa8 0004 tstl %a0@(4)
45b68: 6664 bnes 45bce <pthread_barrier_init+0xa6> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45b6a: 2039 0005 ef30 movel 5ef30 <_Thread_Dispatch_disable_level>,%d0
45b70: 5280 addql #1,%d0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
45b72: 42ae fff8 clrl %fp@(-8)
the_attributes.maximum_count = count;
45b76: 2d42 fffc movel %d2,%fp@(-4)
45b7a: 23c0 0005 ef30 movel %d0,5ef30 <_Thread_Dispatch_disable_level>
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
45b80: 4879 0005 f254 pea 5f254 <_POSIX_Barrier_Information>
45b86: 49f9 0004 8686 lea 48686 <_Thread_Enable_dispatch>,%a4
45b8c: 4eb9 0004 7a48 jsr 47a48 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
45b92: 588f addql #4,%sp
45b94: 2640 moveal %d0,%a3
45b96: 4a80 tstl %d0
45b98: 6606 bnes 45ba0 <pthread_barrier_init+0x78>
_Thread_Enable_dispatch();
45b9a: 4e94 jsr %a4@
return EAGAIN;
45b9c: 700b moveq #11,%d0
45b9e: 6030 bras 45bd0 <pthread_barrier_init+0xa8>
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
45ba0: 486e fff8 pea %fp@(-8)
45ba4: 486b 0010 pea %a3@(16)
45ba8: 4eb9 0004 713c jsr 4713c <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
45bae: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
45bb2: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45bb4: 2079 0005 f26c moveal 5f26c <_POSIX_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
45bba: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45bbc: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
45bc0: 42ab 000c clrl %a3@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
45bc4: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
45bc6: 4e94 jsr %a4@
return 0;
45bc8: 508f addql #8,%sp
45bca: 4280 clrl %d0
45bcc: 6002 bras 45bd0 <pthread_barrier_init+0xa8>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
45bce: 7016 moveq #22,%d0
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
return 0;
}
45bd0: 4cee 1c0c ffdc moveml %fp@(-36),%d2-%d3/%a2-%a4
45bd6: 4e5e unlk %fp
...
00045bdc <pthread_barrier_wait>:
*/
int pthread_barrier_wait(
pthread_barrier_t *barrier
)
{
45bdc: 4e56 fffc linkw %fp,#-4
45be0: 206e 0008 moveal %fp@(8),%a0
POSIX_Barrier_Control *the_barrier = NULL;
Objects_Locations location;
if ( !barrier )
45be4: 4a88 tstl %a0
45be6: 6750 beqs 45c38 <pthread_barrier_wait+0x5c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Get (
pthread_barrier_t *barrier,
Objects_Locations *location
)
{
return (POSIX_Barrier_Control *) _Objects_Get(
45be8: 486e fffc pea %fp@(-4)
45bec: 2f10 movel %a0@,%sp@-
45bee: 4879 0005 f254 pea 5f254 <_POSIX_Barrier_Information>
45bf4: 4eb9 0004 7e98 jsr 47e98 <_Objects_Get>
return EINVAL;
the_barrier = _POSIX_Barrier_Get( barrier, &location );
switch ( location ) {
45bfa: 4fef 000c lea %sp@(12),%sp
45bfe: 4aae fffc tstl %fp@(-4)
45c02: 6634 bnes 45c38 <pthread_barrier_wait+0x5c>
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
45c04: 42a7 clrl %sp@-
45c06: 2040 moveal %d0,%a0
45c08: 42a7 clrl %sp@-
45c0a: 4878 0001 pea 1 <ADD>
45c0e: 2f28 0008 movel %a0@(8),%sp@-
45c12: 4868 0010 pea %a0@(16)
45c16: 4eb9 0004 7178 jsr 47178 <_CORE_barrier_Wait>
the_barrier->Object.id,
true,
0,
NULL
);
_Thread_Enable_dispatch();
45c1c: 4eb9 0004 8686 jsr 48686 <_Thread_Enable_dispatch>
return _POSIX_Barrier_Translate_core_barrier_return_code(
_Thread_Executing->Wait.return_code );
45c22: 2079 0005 f3c0 moveal 5f3c0 <_Per_CPU_Information+0xc>,%a0
true,
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_Barrier_Translate_core_barrier_return_code(
45c28: 2f28 0034 movel %a0@(52),%sp@-
45c2c: 4eb9 0004 b06c jsr 4b06c <_POSIX_Barrier_Translate_core_barrier_return_code>
45c32: 4fef 0018 lea %sp@(24),%sp
45c36: 6002 bras 45c3a <pthread_barrier_wait+0x5e>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
45c38: 7016 moveq #22,%d0
}
45c3a: 4e5e unlk %fp
...
00045554 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
45554: 4e56 0000 linkw %fp,#0
45558: 2f03 movel %d3,%sp@-
4555a: 262e 000c movel %fp@(12),%d3
4555e: 2f02 movel %d2,%sp@-
45560: 242e 0008 movel %fp@(8),%d2
/*
* The POSIX standard does not address what to do when the routine
* is NULL. It also does not address what happens when we cannot
* allocate memory or anything else bad happens.
*/
if ( !routine )
45564: 6754 beqs 455ba <pthread_cleanup_push+0x66>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45566: 2039 0005 e878 movel 5e878 <_Thread_Dispatch_disable_level>,%d0
4556c: 5280 addql #1,%d0
4556e: 23c0 0005 e878 movel %d0,5e878 <_Thread_Dispatch_disable_level>
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
45574: 4878 0010 pea 10 <INVALID_OPERATION>
45578: 4eb9 0004 9378 jsr 49378 <_Workspace_Allocate>
if ( handler ) {
4557e: 588f addql #4,%sp
45580: 4a80 tstl %d0
45582: 6726 beqs 455aa <pthread_cleanup_push+0x56> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
45584: 2079 0005 ed08 moveal 5ed08 <_Per_CPU_Information+0xc>,%a0
handler_stack = &thread_support->Cancellation_Handlers;
4558a: 2228 010e movel %a0@(270),%d1
handler->routine = routine;
4558e: 2040 moveal %d0,%a0
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
if ( handler ) {
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
45590: 0681 0000 00e0 addil #224,%d1
handler->routine = routine;
45596: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
4559a: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
4559e: 2f00 movel %d0,%sp@-
455a0: 2f01 movel %d1,%sp@-
455a2: 4eb9 0004 6be4 jsr 46be4 <_Chain_Append>
455a8: 508f addql #8,%sp
}
_Thread_Enable_dispatch();
}
455aa: 242e fff8 movel %fp@(-8),%d2
455ae: 262e fffc movel %fp@(-4),%d3
455b2: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
455b4: 4ef9 0004 80f2 jmp 480f2 <_Thread_Enable_dispatch>
}
455ba: 242e fff8 movel %fp@(-8),%d2
455be: 262e fffc movel %fp@(-4),%d3
455c2: 4e5e unlk %fp
...
00046270 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
46270: 4e56 fff4 linkw %fp,#-12
46274: 48d7 1c00 moveml %a2-%a4,%sp@
46278: 246e 000c moveal %fp@(12),%a2
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
4627c: 4a8a tstl %a2
4627e: 6606 bnes 46286 <pthread_cond_init+0x16>
else the_attr = &_POSIX_Condition_variables_Default_attributes;
46280: 45f9 0005 d702 lea 5d702 <_POSIX_Condition_variables_Default_attributes>,%a2
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
46286: 7001 moveq #1,%d0
46288: b0aa 0004 cmpl %a2@(4),%d0
4628c: 6776 beqs 46304 <pthread_cond_init+0x94> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
4628e: 4a92 tstl %a2@
46290: 6772 beqs 46304 <pthread_cond_init+0x94>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46292: 2039 0005 fe4c movel 5fe4c <_Thread_Dispatch_disable_level>,%d0
46298: 5280 addql #1,%d0
4629a: 23c0 0005 fe4c movel %d0,5fe4c <_Thread_Dispatch_disable_level>
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
462a0: 4879 0006 01fc pea 601fc <_POSIX_Condition_variables_Information>
462a6: 49f9 0004 92ce lea 492ce <_Thread_Enable_dispatch>,%a4
462ac: 4eb9 0004 8690 jsr 48690 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
462b2: 588f addql #4,%sp
462b4: 2640 moveal %d0,%a3
462b6: 4a80 tstl %d0
462b8: 6606 bnes 462c0 <pthread_cond_init+0x50>
_Thread_Enable_dispatch();
462ba: 4e94 jsr %a4@
return ENOMEM;
462bc: 700c moveq #12,%d0
462be: 6046 bras 46306 <pthread_cond_init+0x96>
}
the_cond->process_shared = the_attr->process_shared;
462c0: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
462c6: 42ab 0014 clrl %a3@(20)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
462ca: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f>
462ce: 4878 0800 pea 800 <D_MAX_EXP+0x1>
462d2: 42a7 clrl %sp@-
462d4: 486b 0018 pea %a3@(24)
462d8: 4eb9 0004 99f4 jsr 499f4 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
462de: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
462e2: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
462e4: 2079 0006 0214 moveal 60214 <_POSIX_Condition_variables_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
462ea: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
462ec: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
462f0: 206e 0008 moveal %fp@(8),%a0
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
462f4: 42ab 000c clrl %a3@(12)
462f8: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
462fa: 4e94 jsr %a4@
return 0;
462fc: 4fef 0010 lea %sp@(16),%sp
46300: 4280 clrl %d0
46302: 6002 bras 46306 <pthread_cond_init+0x96>
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
if ( !the_attr->is_initialized )
return EINVAL;
46304: 7016 moveq #22,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46306: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
4630c: 4e5e unlk %fp <== NOT EXECUTED
0004610c <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
4610c: 4e56 0000 linkw %fp,#0
46110: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
46114: 4a88 tstl %a0
46116: 670a beqs 46122 <pthread_condattr_destroy+0x16>
46118: 4a90 tstl %a0@
4611a: 6706 beqs 46122 <pthread_condattr_destroy+0x16> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
4611c: 4290 clrl %a0@
return 0;
4611e: 4280 clrl %d0
46120: 6002 bras 46124 <pthread_condattr_destroy+0x18>
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
46122: 7016 moveq #22,%d0
attr->is_initialized = false;
return 0;
}
46124: 4e5e unlk %fp <== NOT EXECUTED
0004c5b0 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4c5b0: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4c5b4: 2f2e 0008 movel %fp@(8),%sp@-
4c5b8: 2f39 0005 dddc movel 5dddc <_Per_CPU_Information+0xc>,%sp@-
4c5be: 4eb9 0004 c540 jsr 4c540 <_POSIX_Thread_Exit>
4c5c4: 508f addql #8,%sp <== NOT EXECUTED
}
4c5c6: 4e5e unlk %fp <== NOT EXECUTED
...
00045704 <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
45704: 4e56 ffe4 linkw %fp,#-28
45708: 2039 0005 f68c movel 5f68c <_Thread_Dispatch_disable_level>,%d0
4570e: 5280 addql #1,%d0
45710: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
45714: 23c0 0005 f68c movel %d0,5f68c <_Thread_Dispatch_disable_level>
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
4571a: 4879 0005 fa02 pea 5fa02 <_POSIX_Keys_Information>
45720: 4eb9 0004 7788 jsr 47788 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
45726: 588f addql #4,%sp
45728: 2440 moveal %d0,%a2
4572a: 4a80 tstl %d0
4572c: 660c bnes 4573a <pthread_key_create+0x36>
_Thread_Enable_dispatch();
4572e: 4eb9 0004 83c6 jsr 483c6 <_Thread_Enable_dispatch>
return EAGAIN;
45734: 700b moveq #11,%d0
45736: 6000 00b6 braw 457ee <pthread_key_create+0xea>
}
the_key->destructor = destructor;
4573a: 49f9 0005 f64c lea 5f64c <_Objects_Information_table+0x4>,%a4
int _EXFUN(pthread_once,
(pthread_once_t *__once_control, void (*__init_routine)(void)));
/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
int _EXFUN(pthread_key_create,
45740: 47ea 0018 lea %a2@(24),%a3
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
45744: 7401 moveq #1,%d2
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
45746: 283c 0004 96cc movel #300748,%d4
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4574c: 4bf9 0004 df28 lea 4df28 <memset>,%a5
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
45752: 256e 000c 0010 movel %fp@(12),%a2@(16)
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
45758: 205c moveal %a4@+,%a0
4575a: 4a88 tstl %a0
4575c: 6760 beqs 457be <pthread_key_create+0xba> <== NEVER TAKEN
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
4575e: 2068 0004 moveal %a0@(4),%a0
45762: 4283 clrl %d3
45764: 3628 000e movew %a0@(14),%d3
table = _Workspace_Allocate( bytes_to_allocate );
45768: 2044 moveal %d4,%a0
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
4576a: 5283 addql #1,%d3
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
4576c: e58b lsll #2,%d3
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
4576e: 2f03 movel %d3,%sp@-
45770: 4e90 jsr %a0@
if ( !table ) {
45772: 588f addql #4,%sp
45774: 4a80 tstl %d0
45776: 6636 bnes 457ae <pthread_key_create+0xaa>
for ( --the_api;
45778: 2602 movel %d2,%d3
4577a: 5383 subql #1,%d3
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
4577c: 49f9 0004 96e8 lea 496e8 <_Workspace_Free>,%a4
45782: 47f2 2c14 lea %a2@(00000014,%d2:l:4),%a3
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
45786: 6008 bras 45790 <pthread_key_create+0x8c>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
45788: 2f23 movel %a3@-,%sp@-
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
4578a: 5383 subql #1,%d3
_Workspace_Free( the_key->Values[ the_api ] );
4578c: 4e94 jsr %a4@
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
the_api >= 1;
the_api-- )
4578e: 588f addql #4,%sp
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
if ( !table ) {
for ( --the_api;
45790: 4a83 tstl %d3
45792: 66f4 bnes 45788 <pthread_key_create+0x84>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
45794: 2f0a movel %a2,%sp@-
45796: 4879 0005 fa02 pea 5fa02 <_POSIX_Keys_Information>
4579c: 4eb9 0004 7a7c jsr 47a7c <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
457a2: 4eb9 0004 83c6 jsr 483c6 <_Thread_Enable_dispatch>
return ENOMEM;
457a8: 508f addql #8,%sp
457aa: 700c moveq #12,%d0
457ac: 6040 bras 457ee <pthread_key_create+0xea>
}
the_key->Values[ the_api ] = table;
457ae: 2680 movel %d0,%a3@
memset( table, '\0', bytes_to_allocate );
457b0: 2f03 movel %d3,%sp@-
457b2: 42a7 clrl %sp@-
457b4: 2f00 movel %d0,%sp@-
457b6: 4e95 jsr %a5@
457b8: 4fef 000c lea %sp@(12),%sp
457bc: 6002 bras 457c0 <pthread_key_create+0xbc>
} else {
the_key->Values[ the_api ] = NULL;
457be: 4293 clrl %a3@ <== NOT EXECUTED
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
457c0: 5282 addql #1,%d2
457c2: 588b addql #4,%a3
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
457c4: 7004 moveq #4,%d0
457c6: b082 cmpl %d2,%d0
457c8: 668e bnes 45758 <pthread_key_create+0x54>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
457ca: 202a 0008 movel %a2@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
457ce: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
457d0: 2079 0005 fa1a moveal 5fa1a <_POSIX_Keys_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
457d6: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
457d8: 218a 1c00 movel %a2,%a0@(00000000,%d1:l:4)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
457dc: 206e 0008 moveal %fp@(8),%a0
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
457e0: 42aa 000c clrl %a2@(12)
457e4: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
457e6: 4eb9 0004 83c6 jsr 483c6 <_Thread_Enable_dispatch>
return 0;
457ec: 4280 clrl %d0
}
457ee: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
457f4: 4e5e unlk %fp <== NOT EXECUTED
000457f8 <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
457f8: 4e56 ffec linkw %fp,#-20
457fc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
45800: 486e fffc pea %fp@(-4)
45804: 2f2e 0008 movel %fp@(8),%sp@-
45808: 4879 0005 fa02 pea 5fa02 <_POSIX_Keys_Information>
4580e: 4eb9 0004 7bd8 jsr 47bd8 <_Objects_Get>
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
45814: 4fef 000c lea %sp@(12),%sp
45818: 2400 movel %d0,%d2
4581a: 4aae fffc tstl %fp@(-4)
4581e: 6646 bnes 45866 <pthread_key_delete+0x6e>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
45820: 2f00 movel %d0,%sp@-
45822: 4879 0005 fa02 pea 5fa02 <_POSIX_Keys_Information>
(pthread_key_t __key, _CONST void *__value));
void * _EXFUN(pthread_getspecific, (pthread_key_t __key));
/* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */
int _EXFUN(pthread_key_delete, (pthread_key_t __key));
45828: 2442 moveal %d2,%a2
4582a: 45ea 0018 lea %a2@(24),%a2
4582e: 7603 moveq #3,%d3
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
if ( the_key->Values[ the_api ] )
_Workspace_Free( the_key->Values[ the_api ] );
45830: 47f9 0004 96e8 lea 496e8 <_Workspace_Free>,%a3
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
45836: 4eb9 0004 7804 jsr 47804 <_Objects_Close>
4583c: 508f addql #8,%sp
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
if ( the_key->Values[ the_api ] )
4583e: 201a movel %a2@+,%d0
45840: 6706 beqs 45848 <pthread_key_delete+0x50> <== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
45842: 2f00 movel %d0,%sp@-
45844: 4e93 jsr %a3@
45846: 588f addql #4,%sp
45848: 5383 subql #1,%d3
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
4584a: 66f2 bnes 4583e <pthread_key_delete+0x46>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
4584c: 2f02 movel %d2,%sp@-
4584e: 4879 0005 fa02 pea 5fa02 <_POSIX_Keys_Information>
45854: 4eb9 0004 7a7c jsr 47a7c <_Objects_Free>
* 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();
4585a: 4eb9 0004 83c6 jsr 483c6 <_Thread_Enable_dispatch>
return 0;
45860: 508f addql #8,%sp
45862: 4280 clrl %d0
45864: 6002 bras 45868 <pthread_key_delete+0x70>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
45866: 7016 moveq #22,%d0
}
45868: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4586e: 4e5e unlk %fp
...
00045398 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
45398: 4e56 0000 linkw %fp,#0
4539c: 206e 0008 moveal %fp@(8),%a0
453a0: 226e 000c moveal %fp@(12),%a1
if ( !attr )
453a4: 4a88 tstl %a0
453a6: 6710 beqs 453b8 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !attr->is_initialized )
453a8: 4a90 tstl %a0@
453aa: 670c beqs 453b8 <pthread_mutexattr_gettype+0x20>
return EINVAL;
if ( !type )
453ac: 4a89 tstl %a1
453ae: 6708 beqs 453b8 <pthread_mutexattr_gettype+0x20> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
453b0: 22a8 0010 movel %a0@(16),%a1@
return 0;
453b4: 4280 clrl %d0
453b6: 6002 bras 453ba <pthread_mutexattr_gettype+0x22>
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
return EINVAL;
453b8: 7016 moveq #22,%d0
*type = attr->type;
return 0;
}
453ba: 4e5e unlk %fp
...
00047128 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
47128: 4e56 0000 linkw %fp,#0
4712c: 206e 0008 moveal %fp@(8),%a0
47130: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
47134: 4a88 tstl %a0
47136: 6712 beqs 4714a <pthread_mutexattr_setpshared+0x22>
47138: 4a90 tstl %a0@
4713a: 670e beqs 4714a <pthread_mutexattr_setpshared+0x22>
return EINVAL;
switch ( pshared ) {
4713c: 7201 moveq #1,%d1
4713e: b280 cmpl %d0,%d1
47140: 6508 bcss 4714a <pthread_mutexattr_setpshared+0x22><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
47142: 2140 0004 movel %d0,%a0@(4)
return 0;
47146: 4280 clrl %d0
47148: 6002 bras 4714c <pthread_mutexattr_setpshared+0x24>
default:
return EINVAL;
4714a: 7016 moveq #22,%d0
}
}
4714c: 4e5e unlk %fp <== NOT EXECUTED
000453ec <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
453ec: 4e56 0000 linkw %fp,#0
453f0: 206e 0008 moveal %fp@(8),%a0
453f4: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
453f8: 4a88 tstl %a0
453fa: 6712 beqs 4540e <pthread_mutexattr_settype+0x22> <== NEVER TAKEN
453fc: 4a90 tstl %a0@
453fe: 670e beqs 4540e <pthread_mutexattr_settype+0x22> <== NEVER TAKEN
return EINVAL;
switch ( type ) {
45400: 7203 moveq #3,%d1
45402: b280 cmpl %d0,%d1
45404: 6508 bcss 4540e <pthread_mutexattr_settype+0x22>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
45406: 2140 0010 movel %d0,%a0@(16)
return 0;
4540a: 4280 clrl %d0
4540c: 6002 bras 45410 <pthread_mutexattr_settype+0x24>
default:
return EINVAL;
4540e: 7016 moveq #22,%d0
}
}
45410: 4e5e unlk %fp <== NOT EXECUTED
00045e74 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
45e74: 4e56 fffc linkw %fp,#-4
45e78: 2f0b movel %a3,%sp@-
45e7a: 266e 000c moveal %fp@(12),%a3
45e7e: 2f0a movel %a2,%sp@-
45e80: 246e 0008 moveal %fp@(8),%a2
if ( !once_control || !init_routine )
45e84: 4a8a tstl %a2
45e86: 674a beqs 45ed2 <pthread_once+0x5e>
45e88: 4a8b tstl %a3
45e8a: 6746 beqs 45ed2 <pthread_once+0x5e>
return EINVAL;
if ( !once_control->init_executed ) {
45e8c: 4aaa 0004 tstl %a2@(4)
45e90: 6644 bnes 45ed6 <pthread_once+0x62>
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
45e92: 486e fffc pea %fp@(-4)
45e96: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
45e9a: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
45e9e: 4eb9 0004 697c jsr 4697c <rtems_task_mode>
if ( !once_control->init_executed ) {
45ea4: 4fef 000c lea %sp@(12),%sp
45ea8: 4aaa 0004 tstl %a2@(4)
45eac: 660c bnes 45eba <pthread_once+0x46> <== NEVER TAKEN
once_control->is_initialized = true;
45eae: 7001 moveq #1,%d0
45eb0: 2480 movel %d0,%a2@
once_control->init_executed = true;
45eb2: 7001 moveq #1,%d0
45eb4: 2540 0004 movel %d0,%a2@(4)
(*init_routine)();
45eb8: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
45eba: 486e fffc pea %fp@(-4)
45ebe: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
45ec2: 2f2e fffc movel %fp@(-4),%sp@-
45ec6: 4eb9 0004 697c jsr 4697c <rtems_task_mode>
45ecc: 4fef 000c lea %sp@(12),%sp
45ed0: 6004 bras 45ed6 <pthread_once+0x62>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
45ed2: 7016 moveq #22,%d0
45ed4: 6002 bras 45ed8 <pthread_once+0x64>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
45ed6: 4280 clrl %d0
}
45ed8: 246e fff4 moveal %fp@(-12),%a2
45edc: 266e fff8 moveal %fp@(-8),%a3
45ee0: 4e5e unlk %fp <== NOT EXECUTED
000464b0 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
464b0: 4e56 ffe4 linkw %fp,#-28
464b4: 206e 000c moveal %fp@(12),%a0
464b8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
464bc: 246e 0008 moveal %fp@(8),%a2
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
464c0: 4a8a tstl %a2
464c2: 677e beqs 46542 <pthread_rwlock_init+0x92>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
464c4: 4a88 tstl %a0
464c6: 6614 bnes 464dc <pthread_rwlock_init+0x2c>
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
464c8: 240e movel %fp,%d2
464ca: 0682 ffff fff4 addil #-12,%d2
464d0: 2f02 movel %d2,%sp@-
464d2: 4eb9 0004 6dc0 jsr 46dc0 <pthread_rwlockattr_init>
464d8: 588f addql #4,%sp
the_attr = &default_attr;
464da: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
464dc: 4a90 tstl %a0@
464de: 6762 beqs 46542 <pthread_rwlock_init+0x92> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
464e0: 4aa8 0004 tstl %a0@(4)
464e4: 665c bnes 46542 <pthread_rwlock_init+0x92> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
464e6: 2039 0006 0350 movel 60350 <_Thread_Dispatch_disable_level>,%d0
464ec: 5280 addql #1,%d0
464ee: 23c0 0006 0350 movel %d0,60350 <_Thread_Dispatch_disable_level>
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
464f4: 4879 0006 04de pea 604de <_POSIX_RWLock_Information>
464fa: 49f9 0004 9526 lea 49526 <_Thread_Enable_dispatch>,%a4
46500: 4eb9 0004 88e8 jsr 488e8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
46506: 588f addql #4,%sp
46508: 2640 moveal %d0,%a3
4650a: 4a80 tstl %d0
4650c: 6606 bnes 46514 <pthread_rwlock_init+0x64>
_Thread_Enable_dispatch();
4650e: 4e94 jsr %a4@
return EAGAIN;
46510: 700b moveq #11,%d0
46512: 6030 bras 46544 <pthread_rwlock_init+0x94>
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
46514: 486e fffc pea %fp@(-4)
46518: 486b 0010 pea %a3@(16)
4651c: 4eb9 0004 80c8 jsr 480c8 <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46522: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46526: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46528: 2079 0006 04f6 moveal 604f6 <_POSIX_RWLock_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
4652e: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46530: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46534: 42ab 000c clrl %a3@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
46538: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4653a: 4e94 jsr %a4@
return 0;
4653c: 508f addql #8,%sp
4653e: 4280 clrl %d0
46540: 6002 bras 46544 <pthread_rwlock_init+0x94>
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
46542: 7016 moveq #22,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46544: 4cee 1c04 ffe4 moveml %fp@(-28),%d2/%a2-%a4
4654a: 4e5e unlk %fp
...
000465b8 <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
465b8: 4e56 ffec linkw %fp,#-20
465bc: 48d7 040c moveml %d2-%d3/%a2,%sp@
465c0: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
465c4: 4a8a tstl %a2
465c6: 6700 0088 beqw 46650 <pthread_rwlock_timedrdlock+0x98>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
465ca: 486e fff8 pea %fp@(-8)
465ce: 2f2e 000c movel %fp@(12),%sp@-
465d2: 4eb9 0004 c0b0 jsr 4c0b0 <_POSIX_Absolute_timeout_to_ticks>
465d8: 486e fffc pea %fp@(-4)
465dc: 2400 movel %d0,%d2
465de: 2f12 movel %a2@,%sp@-
465e0: 4879 0006 04de pea 604de <_POSIX_RWLock_Information>
465e6: 4eb9 0004 8d38 jsr 48d38 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
465ec: 4fef 0014 lea %sp@(20),%sp
465f0: 4aae fffc tstl %fp@(-4)
465f4: 665a bnes 46650 <pthread_rwlock_timedrdlock+0x98>
int _EXFUN(pthread_rwlock_init,
(pthread_rwlock_t *__rwlock, _CONST pthread_rwlockattr_t *__attr));
int _EXFUN(pthread_rwlock_destroy, (pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_rdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_tryrdlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedrdlock,
465f6: 7203 moveq #3,%d1
465f8: b282 cmpl %d2,%d1
465fa: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
465fc: 42a7 clrl %sp@-
465fe: 2f2e fff8 movel %fp@(-8),%sp@-
46602: 4483 negl %d3
46604: 4281 clrl %d1
46606: 1203 moveb %d3,%d1
46608: 2040 moveal %d0,%a0
4660a: 2f01 movel %d1,%sp@-
4660c: 2f12 movel %a2@,%sp@-
4660e: 4868 0010 pea %a0@(16)
46612: 4eb9 0004 80fc jsr 480fc <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
46618: 4eb9 0004 9526 jsr 49526 <_Thread_Enable_dispatch>
if ( !do_wait ) {
4661e: 4fef 0014 lea %sp@(20),%sp
46622: 4a03 tstb %d3
46624: 6616 bnes 4663c <pthread_rwlock_timedrdlock+0x84>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
46626: 2079 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a0
4662c: 7002 moveq #2,%d0
4662e: b0a8 0034 cmpl %a0@(52),%d0
46632: 6608 bnes 4663c <pthread_rwlock_timedrdlock+0x84>
switch (status) {
46634: 4a82 tstl %d2
46636: 6718 beqs 46650 <pthread_rwlock_timedrdlock+0x98><== NEVER TAKEN
46638: b082 cmpl %d2,%d0
4663a: 6418 bccs 46654 <pthread_rwlock_timedrdlock+0x9c><== ALWAYS TAKEN
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
4663c: 2079 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a0
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
46642: 2f28 0034 movel %a0@(52),%sp@-
46646: 4eb9 0004 6708 jsr 46708 <_POSIX_RWLock_Translate_core_RWLock_return_code>
4664c: 588f addql #4,%sp
4664e: 6006 bras 46656 <pthread_rwlock_timedrdlock+0x9e>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
46650: 7016 moveq #22,%d0
46652: 6002 bras 46656 <pthread_rwlock_timedrdlock+0x9e>
switch (status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
return EINVAL;
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
return ETIMEDOUT;
46654: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
46656: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
4665c: 4e5e unlk %fp <== NOT EXECUTED
00046660 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
46660: 4e56 ffec linkw %fp,#-20
46664: 48d7 040c moveml %d2-%d3/%a2,%sp@
46668: 246e 0008 moveal %fp@(8),%a2
Objects_Locations location;
Watchdog_Interval ticks;
bool do_wait = true;
POSIX_Absolute_timeout_conversion_results_t status;
if ( !rwlock )
4666c: 4a8a tstl %a2
4666e: 6700 0088 beqw 466f8 <pthread_rwlock_timedwrlock+0x98>
*
* If the status is POSIX_ABSOLUTE_TIMEOUT_INVALID,
* POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST, or POSIX_ABSOLUTE_TIMEOUT_IS_NOW,
* then we should not wait.
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
46672: 486e fff8 pea %fp@(-8)
46676: 2f2e 000c movel %fp@(12),%sp@-
4667a: 4eb9 0004 c0b0 jsr 4c0b0 <_POSIX_Absolute_timeout_to_ticks>
46680: 486e fffc pea %fp@(-4)
46684: 2400 movel %d0,%d2
46686: 2f12 movel %a2@,%sp@-
46688: 4879 0006 04de pea 604de <_POSIX_RWLock_Information>
4668e: 4eb9 0004 8d38 jsr 48d38 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
46694: 4fef 0014 lea %sp@(20),%sp
46698: 4aae fffc tstl %fp@(-4)
4669c: 665a bnes 466f8 <pthread_rwlock_timedwrlock+0x98>
(pthread_rwlock_t *__rwlock, _CONST struct timespec *__abstime));
int _EXFUN(pthread_rwlock_unlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_wrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_trywrlock,(pthread_rwlock_t *__rwlock));
int _EXFUN(pthread_rwlock_timedwrlock,
4669e: 7203 moveq #3,%d1
466a0: b282 cmpl %d2,%d1
466a2: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
466a4: 42a7 clrl %sp@-
466a6: 2f2e fff8 movel %fp@(-8),%sp@-
466aa: 4483 negl %d3
466ac: 4281 clrl %d1
466ae: 1203 moveb %d3,%d1
466b0: 2040 moveal %d0,%a0
466b2: 2f01 movel %d1,%sp@-
466b4: 2f12 movel %a2@,%sp@-
466b6: 4868 0010 pea %a0@(16)
466ba: 4eb9 0004 81ac jsr 481ac <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
466c0: 4eb9 0004 9526 jsr 49526 <_Thread_Enable_dispatch>
if ( !do_wait &&
466c6: 4fef 0014 lea %sp@(20),%sp
466ca: 4a03 tstb %d3
466cc: 6616 bnes 466e4 <pthread_rwlock_timedwrlock+0x84>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
466ce: 2079 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
466d4: 7002 moveq #2,%d0
466d6: b0a8 0034 cmpl %a0@(52),%d0
466da: 6608 bnes 466e4 <pthread_rwlock_timedwrlock+0x84>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
466dc: 4a82 tstl %d2
466de: 6718 beqs 466f8 <pthread_rwlock_timedwrlock+0x98><== NEVER TAKEN
466e0: b082 cmpl %d2,%d0
466e2: 6418 bccs 466fc <pthread_rwlock_timedwrlock+0x9c><== ALWAYS TAKEN
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
466e4: 2079 0006 07e0 moveal 607e0 <_Per_CPU_Information+0xc>,%a0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
466ea: 2f28 0034 movel %a0@(52),%sp@-
466ee: 4eb9 0004 6708 jsr 46708 <_POSIX_RWLock_Translate_core_RWLock_return_code>
466f4: 588f addql #4,%sp
466f6: 6006 bras 466fe <pthread_rwlock_timedwrlock+0x9e>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
466f8: 7016 moveq #22,%d0
466fa: 6002 bras 466fe <pthread_rwlock_timedwrlock+0x9e>
switch (status) {
case POSIX_ABSOLUTE_TIMEOUT_INVALID:
return EINVAL;
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST:
case POSIX_ABSOLUTE_TIMEOUT_IS_NOW:
return ETIMEDOUT;
466fc: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
466fe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
46704: 4e5e unlk %fp <== NOT EXECUTED
000467e8 <pthread_rwlock_unlock>:
*/
int pthread_rwlock_unlock(
pthread_rwlock_t *rwlock
)
{
467e8: 4e56 fffc linkw %fp,#-4
467ec: 206e 0008 moveal %fp@(8),%a0
467f0: 2f02 movel %d2,%sp@-
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
CORE_RWLock_Status status;
if ( !rwlock )
467f2: 4a88 tstl %a0
467f4: 673c beqs 46832 <pthread_rwlock_unlock+0x4a> <== NEVER TAKEN
467f6: 486e fffc pea %fp@(-4)
467fa: 2f10 movel %a0@,%sp@-
467fc: 4879 0006 04de pea 604de <_POSIX_RWLock_Information>
46802: 4eb9 0004 8d38 jsr 48d38 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
46808: 4fef 000c lea %sp@(12),%sp
4680c: 4aae fffc tstl %fp@(-4)
46810: 6620 bnes 46832 <pthread_rwlock_unlock+0x4a>
case OBJECTS_LOCAL:
status = _CORE_RWLock_Release( &the_rwlock->RWLock );
46812: 2040 moveal %d0,%a0
46814: 4868 0010 pea %a0@(16)
46818: 4eb9 0004 8238 jsr 48238 <_CORE_RWLock_Release>
4681e: 2400 movel %d0,%d2
_Thread_Enable_dispatch();
46820: 4eb9 0004 9526 jsr 49526 <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code( status );
46826: 2f02 movel %d2,%sp@-
46828: 4eb9 0004 6708 jsr 46708 <_POSIX_RWLock_Translate_core_RWLock_return_code>
4682e: 508f addql #8,%sp
46830: 6002 bras 46834 <pthread_rwlock_unlock+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
46832: 7016 moveq #22,%d0
}
46834: 242e fff8 movel %fp@(-8),%d2
46838: 4e5e unlk %fp <== NOT EXECUTED
00046de0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
46de0: 4e56 0000 linkw %fp,#0
46de4: 206e 0008 moveal %fp@(8),%a0
46de8: 202e 000c movel %fp@(12),%d0
if ( !attr )
46dec: 4a88 tstl %a0
46dee: 6712 beqs 46e02 <pthread_rwlockattr_setpshared+0x22>
return EINVAL;
if ( !attr->is_initialized )
46df0: 4a90 tstl %a0@
46df2: 670e beqs 46e02 <pthread_rwlockattr_setpshared+0x22>
return EINVAL;
switch ( pshared ) {
46df4: 7201 moveq #1,%d1
46df6: b280 cmpl %d0,%d1
46df8: 6508 bcss 46e02 <pthread_rwlockattr_setpshared+0x22><== NEVER TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
46dfa: 2140 0004 movel %d0,%a0@(4)
return 0;
46dfe: 4280 clrl %d0
46e00: 6002 bras 46e04 <pthread_rwlockattr_setpshared+0x24>
default:
return EINVAL;
46e02: 7016 moveq #22,%d0
}
}
46e04: 4e5e unlk %fp <== NOT EXECUTED
000453b0 <pthread_setcancelstate>:
int pthread_setcancelstate(
int state,
int *oldstate
)
{
453b0: 4e56 0000 linkw %fp,#0
453b4: 202e 0008 movel %fp@(8),%d0
453b8: 226e 000c moveal %fp@(12),%a1
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
453bc: 4ab9 0005 e44c tstl 5e44c <_Per_CPU_Information+0x8>
453c2: 663c bnes 45400 <pthread_setcancelstate+0x50> <== NEVER TAKEN
return EPROTO;
if ( !oldstate )
453c4: 4a89 tstl %a1
453c6: 673c beqs 45404 <pthread_setcancelstate+0x54> <== NEVER TAKEN
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
453c8: 7201 moveq #1,%d1
453ca: b280 cmpl %d0,%d1
453cc: 6536 bcss 45404 <pthread_setcancelstate+0x54> <== NEVER TAKEN
return EINVAL;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
453ce: 2079 0005 e450 moveal 5e450 <_Per_CPU_Information+0xc>,%a0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
453d4: 2239 0005 dfc0 movel 5dfc0 <_Thread_Dispatch_disable_level>,%d1
453da: 5281 addql #1,%d1
453dc: 2068 010e moveal %a0@(270),%a0
453e0: 23c1 0005 dfc0 movel %d1,5dfc0 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
*oldstate = thread_support->cancelability_state;
453e6: 22a8 00d4 movel %a0@(212),%a1@
thread_support->cancelability_state = state;
453ea: 2140 00d4 movel %d0,%a0@(212)
_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(_Thread_Executing);
453ee: 2f39 0005 e450 movel 5e450 <_Per_CPU_Information+0xc>,%sp@-
453f4: 4eb9 0004 a0c4 jsr 4a0c4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
453fa: 588f addql #4,%sp
453fc: 4280 clrl %d0
453fe: 6006 bras 45406 <pthread_setcancelstate+0x56>
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
return EPROTO;
45400: 7047 moveq #71,%d0
45402: 6002 bras 45406 <pthread_setcancelstate+0x56>
if ( !oldstate )
return EINVAL;
if ( state != PTHREAD_CANCEL_ENABLE && state != PTHREAD_CANCEL_DISABLE )
return EINVAL;
45404: 7016 moveq #22,%d0
/*
* _Thread_Enable_dispatch is invoked by above call.
*/
return 0;
}
45406: 4e5e unlk %fp
...
00047cb4 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
47cb4: 4e56 ffe0 linkw %fp,#-32
47cb8: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
47cbc: 242e 000c movel %fp@(12),%d2
47cc0: 282e 0010 movel %fp@(16),%d4
int rc;
/*
* Check all the parameters
*/
if ( !param )
47cc4: 6700 00e0 beqw 47da6 <pthread_setschedparam+0xf2>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
47cc8: 486e fff8 pea %fp@(-8)
47ccc: 486e fffc pea %fp@(-4)
47cd0: 2f04 movel %d4,%sp@-
47cd2: 2f02 movel %d2,%sp@-
47cd4: 4eb9 0004 d0bc jsr 4d0bc <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
47cda: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
47cde: 2600 movel %d0,%d3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
47ce0: 6600 00ca bnew 47dac <pthread_setschedparam+0xf8>
47ce4: 486e fff4 pea %fp@(-12)
47ce8: 2f2e 0008 movel %fp@(8),%sp@-
47cec: 4879 0006 2654 pea 62654 <_POSIX_Threads_Information>
47cf2: 4eb9 0004 9a80 jsr 49a80 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
47cf8: 4fef 000c lea %sp@(12),%sp
47cfc: 2640 moveal %d0,%a3
47cfe: 4aae fff4 tstl %fp@(-12)
47d02: 6600 00a6 bnew 47daa <pthread_setschedparam+0xf6>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
47d06: 246b 010e moveal %a3@(270),%a2
if ( api->schedpolicy == SCHED_SPORADIC )
47d0a: 7004 moveq #4,%d0
47d0c: b0aa 0080 cmpl %a2@(128),%d0
47d10: 660c bnes 47d1e <pthread_setschedparam+0x6a>
(void) _Watchdog_Remove( &api->Sporadic_timer );
47d12: 486a 00a4 pea %a2@(164)
47d16: 4eb9 0004 b474 jsr 4b474 <_Watchdog_Remove>
47d1c: 588f addql #4,%sp
api->schedpolicy = policy;
47d1e: 2542 0080 movel %d2,%a2@(128)
api->schedparam = *param;
47d22: 4878 001c pea 1c <OPER2+0x8>
47d26: 2f04 movel %d4,%sp@-
47d28: 486a 0084 pea %a2@(132)
47d2c: 4eb9 0004 fd94 jsr 4fd94 <memcpy>
the_thread->budget_algorithm = budget_algorithm;
47d32: 276e fffc 007a movel %fp@(-4),%a3@(122)
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
47d38: 4fef 000c lea %sp@(12),%sp
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
47d3c: 276e fff8 007e movel %fp@(-8),%a3@(126)
switch ( api->schedpolicy ) {
47d42: 4a82 tstl %d2
47d44: 6d58 blts 47d9e <pthread_setschedparam+0xea> <== NEVER TAKEN
47d46: 7002 moveq #2,%d0
47d48: b082 cmpl %d2,%d0
47d4a: 6c0a bges 47d56 <pthread_setschedparam+0xa2>
47d4c: 103c 0004 moveb #4,%d0
47d50: b082 cmpl %d2,%d0
47d52: 664a bnes 47d9e <pthread_setschedparam+0xea> <== NEVER TAKEN
47d54: 602a bras 47d80 <pthread_setschedparam+0xcc>
47d56: 4280 clrl %d0
47d58: 1039 0006 0ca6 moveb 60ca6 <rtems_maximum_priority>,%d0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
47d5e: 41f9 0006 2444 lea 62444 <_Thread_Ticks_per_timeslice>,%a0
47d64: 90aa 0084 subl %a2@(132),%d0
47d68: 2750 0076 movel %a0@,%a3@(118)
the_thread->real_priority =
47d6c: 2740 0018 movel %d0,%a3@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
47d70: 4878 0001 pea 1 <ADD>
47d74: 2f00 movel %d0,%sp@-
47d76: 2f0b movel %a3,%sp@-
47d78: 4eb9 0004 9d88 jsr 49d88 <_Thread_Change_priority>
47d7e: 601a bras 47d9a <pthread_setschedparam+0xe6>
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
47d80: 256a 0084 00a0 movel %a2@(132),%a2@(160)
_Watchdog_Remove( &api->Sporadic_timer );
47d86: 486a 00a4 pea %a2@(164)
47d8a: 4eb9 0004 b474 jsr 4b474 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
47d90: 2f0b movel %a3,%sp@-
47d92: 42a7 clrl %sp@-
47d94: 4eb9 0004 7b90 jsr 47b90 <_POSIX_Threads_Sporadic_budget_TSR>
break;
47d9a: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
47d9e: 4eb9 0004 a26e jsr 4a26e <_Thread_Enable_dispatch>
return 0;
47da4: 6006 bras 47dac <pthread_setschedparam+0xf8>
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
47da6: 7616 moveq #22,%d3
47da8: 6002 bras 47dac <pthread_setschedparam+0xf8>
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
47daa: 7603 moveq #3,%d3
}
47dac: 2003 movel %d3,%d0
47dae: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3
47db4: 4e5e unlk %fp <== NOT EXECUTED
00045c80 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
45c80: 4e56 0000 linkw %fp,#0
45c84: 2f02 movel %d2,%sp@-
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
45c86: 4ab9 0005 ed04 tstl 5ed04 <_Per_CPU_Information+0x8>
45c8c: 6646 bnes 45cd4 <pthread_testcancel+0x54> <== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
45c8e: 2079 0005 ed08 moveal 5ed08 <_Per_CPU_Information+0xc>,%a0
45c94: 2039 0005 e878 movel 5e878 <_Thread_Dispatch_disable_level>,%d0
45c9a: 5280 addql #1,%d0
45c9c: 2068 010e moveal %a0@(270),%a0
45ca0: 23c0 0005 e878 movel %d0,5e878 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
45ca6: 4aa8 00d4 tstl %a0@(212)
45caa: 660a bnes 45cb6 <pthread_testcancel+0x36> <== NEVER TAKEN
/* Setting Cancelability State, P1003.1c/Draft 10, p. 183 */
int _EXFUN(pthread_setcancelstate, (int __state, int *__oldstate));
int _EXFUN(pthread_setcanceltype, (int __type, int *__oldtype));
void _EXFUN(pthread_testcancel, (void));
45cac: 4aa8 00dc tstl %a0@(220)
45cb0: 56c2 sne %d2
45cb2: 4482 negl %d2
45cb4: 6002 bras 45cb8 <pthread_testcancel+0x38>
*/
void pthread_testcancel( void )
{
POSIX_API_Control *thread_support;
bool cancel = false;
45cb6: 4202 clrb %d2 <== NOT EXECUTED
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
45cb8: 4eb9 0004 80f2 jsr 480f2 <_Thread_Enable_dispatch>
if ( cancel )
45cbe: 4a02 tstb %d2
45cc0: 6712 beqs 45cd4 <pthread_testcancel+0x54>
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
45cc2: 4878 ffff pea ffffffff <LESS>
45cc6: 2f39 0005 ed08 movel 5ed08 <_Per_CPU_Information+0xc>,%sp@-
45ccc: 4eb9 0004 b018 jsr 4b018 <_POSIX_Thread_Exit>
45cd2: 508f addql #8,%sp <== NOT EXECUTED
}
45cd4: 242e fffc movel %fp@(-4),%d2
45cd8: 4e5e unlk %fp <== NOT EXECUTED
000436ac <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
436ac: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
436b0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
436b2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
const char *p = s;
for (p=s ; *p ; p++ )
436b6: 6008 bras 436c0 <putk+0x14> <== NOT EXECUTED
BSP_output_char(*p);
436b8: 49c0 extbl %d0 <== NOT EXECUTED
436ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED
436bc: 4e91 jsr %a1@ <== NOT EXECUTED
436be: 588f addql #4,%sp <== NOT EXECUTED
436c0: 2279 0005 c4ac moveal 5c4ac <BSP_output_char>,%a1 <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
436c6: 101a moveb %a2@+,%d0 <== NOT EXECUTED
436c8: 66ee bnes 436b8 <putk+0xc> <== NOT EXECUTED
BSP_output_char(*p);
BSP_output_char('\n');
436ca: 700a moveq #10,%d0 <== NOT EXECUTED
}
436cc: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
436d0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
436d4: 4e5e unlk %fp <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
436d6: 4ed1 jmp %a1@ <== NOT EXECUTED
00059dbc <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
59dbc: 4e56 fff4 linkw %fp,#-12
59dc0: 202e 0008 movel %fp@(8),%d0
59dc4: 222e 000c movel %fp@(12),%d1
59dc8: 206e 0010 moveal %fp@(16),%a0
59dcc: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
59dd0: b0b9 0005 c0e4 cmpl 5c0e4 <rtems_libio_number_iops>,%d0
59dd6: 641a bccs 59df2 <read+0x36> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
59dd8: 2400 movel %d0,%d2
59dda: ed88 lsll #6,%d0
59ddc: e78a lsll #3,%d2
59dde: 2479 0005 d7f4 moveal 5d7f4 <rtems_libio_iops>,%a2
59de4: 9082 subl %d2,%d0
59de6: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
59de8: 202a 0014 movel %a2@(20),%d0
59dec: 0800 0008 btst #8,%d0
59df0: 660e bnes 59e00 <read+0x44>
59df2: 4eb9 0004 ca54 jsr 4ca54 <__errno>
59df8: 7209 moveq #9,%d1
59dfa: 2040 moveal %d0,%a0
59dfc: 2081 movel %d1,%a0@
59dfe: 601a bras 59e1a <read+0x5e>
rtems_libio_check_buffer( buffer );
59e00: 4a81 tstl %d1
59e02: 670a beqs 59e0e <read+0x52> <== NEVER TAKEN
rtems_libio_check_count( count );
59e04: 4a88 tstl %a0
59e06: 6744 beqs 59e4c <read+0x90> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
59e08: 0800 0001 btst #1,%d0
59e0c: 6610 bnes 59e1e <read+0x62> <== ALWAYS TAKEN
59e0e: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
59e14: 2040 moveal %d0,%a0 <== NOT EXECUTED
59e16: 7016 moveq #22,%d0 <== NOT EXECUTED
59e18: 2080 movel %d0,%a0@ <== NOT EXECUTED
59e1a: 70ff moveq #-1,%d0
59e1c: 6030 bras 59e4e <read+0x92>
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
59e1e: 226a 0020 moveal %a2@(32),%a1
59e22: 2f08 movel %a0,%sp@-
59e24: 2f01 movel %d1,%sp@-
59e26: 2f0a movel %a2,%sp@-
59e28: 2069 0008 moveal %a1@(8),%a0
59e2c: 4e90 jsr %a0@
if ( rc > 0 )
59e2e: 4fef 000c lea %sp@(12),%sp
59e32: 4a80 tstl %d0
59e34: 6f18 bles 59e4e <read+0x92>
iop->offset += rc;
59e36: 2400 movel %d0,%d2
59e38: 5bc1 smi %d1
59e3a: 49c1 extbl %d1
59e3c: d5aa 0010 addl %d2,%a2@(16)
59e40: 262a 000c movel %a2@(12),%d3
59e44: d781 addxl %d1,%d3
59e46: 2543 000c movel %d3,%a2@(12)
59e4a: 6002 bras 59e4e <read+0x92>
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 );
59e4c: 4280 clrl %d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
59e4e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
59e54: 4e5e unlk %fp <== NOT EXECUTED
000454d8 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
454d8: 4e56 ffdc linkw %fp,#-36
454dc: 48d7 040c moveml %d2-%d3/%a2,%sp@
454e0: 246e 0008 moveal %fp@(8),%a2
454e4: 262e 000c movel %fp@(12),%d3
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
454e8: 660e bnes 454f8 <readlink+0x20> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
454ea: 4eb9 0004 f284 jsr 4f284 <__errno> <== NOT EXECUTED
454f0: 720e moveq #14,%d1 <== NOT EXECUTED
454f2: 2040 moveal %d0,%a0 <== NOT EXECUTED
454f4: 2081 movel %d1,%a0@ <== NOT EXECUTED
454f6: 607a bras 45572 <readlink+0x9a> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
454f8: 2f0a movel %a2,%sp@-
454fa: 240e movel %fp,%d2
454fc: 0682 ffff ffec addil #-20,%d2
45502: 4eb9 0005 0ddc jsr 50ddc <strlen>
45508: 4297 clrl %sp@
4550a: 2f02 movel %d2,%sp@-
4550c: 42a7 clrl %sp@-
4550e: 2f00 movel %d0,%sp@-
45510: 2f0a movel %a2,%sp@-
45512: 4eb9 0004 447e jsr 4447e <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
45518: 4fef 0014 lea %sp@(20),%sp
4551c: 4a80 tstl %d0
4551e: 6652 bnes 45572 <readlink+0x9a> <== NEVER TAKEN
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
45520: 206e fff8 moveal %fp@(-8),%a0
45524: 45f9 0004 4574 lea 44574 <rtems_filesystem_freenode>,%a2
4552a: 2f02 movel %d2,%sp@-
4552c: 2068 0010 moveal %a0@(16),%a0
45530: 4e90 jsr %a0@
45532: 588f addql #4,%sp
45534: 7204 moveq #4,%d1
45536: b280 cmpl %d0,%d1
45538: 6714 beqs 4554e <readlink+0x76>
rtems_filesystem_freenode( &loc );
4553a: 2f02 movel %d2,%sp@-
4553c: 4e92 jsr %a2@
rtems_set_errno_and_return_minus_one( EINVAL );
4553e: 4eb9 0004 f284 jsr 4f284 <__errno>
45544: 588f addql #4,%sp
45546: 2040 moveal %d0,%a0
45548: 7016 moveq #22,%d0
4554a: 2080 movel %d0,%a0@
4554c: 6024 bras 45572 <readlink+0x9a>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
4554e: 2f2e 0010 movel %fp@(16),%sp@-
45552: 206e fff8 moveal %fp@(-8),%a0
45556: 2f03 movel %d3,%sp@-
45558: 2f02 movel %d2,%sp@-
4555a: 2068 003c moveal %a0@(60),%a0
4555e: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
45560: 2f02 movel %d2,%sp@-
45562: 2d40 ffe8 movel %d0,%fp@(-24)
45566: 4e92 jsr %a2@
return result;
45568: 202e ffe8 movel %fp@(-24),%d0
4556c: 4fef 0010 lea %sp@(16),%sp
45570: 6002 bras 45574 <readlink+0x9c>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
45572: 70ff moveq #-1,%d0
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
45574: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2
4557a: 4e5e unlk %fp
...
00044328 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
44328: 4e56 ffe4 linkw %fp,#-28
4432c: 202e 0008 movel %fp@(8),%d0
44330: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
44334: 246e 000c moveal %fp@(12),%a2
44338: 262e 0010 movel %fp@(16),%d3
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
4433c: b0b9 0005 cb44 cmpl 5cb44 <rtems_libio_number_iops>,%d0
44342: 641a bccs 4435e <readv+0x36>
iop = rtems_libio_iop( fd );
44344: 2200 movel %d0,%d1
44346: ed88 lsll #6,%d0
44348: e789 lsll #3,%d1
4434a: 2679 0005 e254 moveal 5e254 <rtems_libio_iops>,%a3
44350: 9081 subl %d1,%d0
44352: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
44354: 202b 0014 movel %a3@(20),%d0
44358: 0800 0008 btst #8,%d0
4435c: 6610 bnes 4436e <readv+0x46>
4435e: 4eb9 0004 d6d0 jsr 4d6d0 <__errno>
44364: 7209 moveq #9,%d1
44366: 2040 moveal %d0,%a0
44368: 2081 movel %d1,%a0@
4436a: 6000 009e braw 4440a <readv+0xe2>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
4436e: 0800 0001 btst #1,%d0
44372: 672c beqs 443a0 <readv+0x78> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
44374: 4a8a tstl %a2
44376: 6728 beqs 443a0 <readv+0x78>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
44378: 4a83 tstl %d3
4437a: 6f24 bles 443a0 <readv+0x78>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
4437c: 0c83 0000 0400 cmpil #1024,%d3
44382: 6e1c bgts 443a0 <readv+0x78> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
44384: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
44386: 93c9 subal %a1,%a1
44388: 4281 clrl %d1
4438a: 7001 moveq #1,%d0
4438c: 6002 bras 44390 <readv+0x68>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
4438e: 2204 movel %d4,%d1
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
44390: 4a90 tstl %a0@
44392: 670c beqs 443a0 <readv+0x78>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
44394: 2428 0004 movel %a0@(4),%d2
44398: 2801 movel %d1,%d4
4439a: d882 addl %d2,%d4
if ( total < old )
4439c: b284 cmpl %d4,%d1
4439e: 6f0e bles 443ae <readv+0x86>
rtems_set_errno_and_return_minus_one( EINVAL );
443a0: 4eb9 0004 d6d0 jsr 4d6d0 <__errno>
443a6: 2040 moveal %d0,%a0
443a8: 7016 moveq #22,%d0
443aa: 2080 movel %d0,%a0@
443ac: 605c bras 4440a <readv+0xe2>
if ( iov[v].iov_len )
all_zeros = false;
443ae: 4a82 tstl %d2
443b0: 57c1 seq %d1
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
443b2: 5289 addql #1,%a1
443b4: 5088 addql #8,%a0
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
443b6: c081 andl %d1,%d0
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
443b8: b689 cmpl %a1,%d3
443ba: 6ed2 bgts 4438e <readv+0x66>
/*
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
443bc: 4a00 tstb %d0
443be: 6646 bnes 44406 <readv+0xde>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
443c0: 588a addql #4,%a2
443c2: 4284 clrl %d4
443c4: 4282 clrl %d2
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
443c6: 206b 0020 moveal %a3@(32),%a0
443ca: 2f12 movel %a2@,%sp@-
443cc: 2f2a fffc movel %a2@(-4),%sp@-
443d0: 2f0b movel %a3,%sp@-
443d2: 2068 0008 moveal %a0@(8),%a0
443d6: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
443d8: 4fef 000c lea %sp@(12),%sp
443dc: 4a80 tstl %d0
443de: 6d2a blts 4440a <readv+0xe2> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
443e0: 6716 beqs 443f8 <readv+0xd0> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
443e2: d480 addl %d0,%d2
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
443e4: 2c00 movel %d0,%d6
443e6: 5bc5 smi %d5
443e8: 49c5 extbl %d5
443ea: ddab 0010 addl %d6,%a3@(16)
443ee: 222b 000c movel %a3@(12),%d1
443f2: d385 addxl %d5,%d1
443f4: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
443f8: b092 cmpl %a2@,%d0
443fa: 6610 bnes 4440c <readv+0xe4> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
443fc: 5284 addql #1,%d4
443fe: 508a addql #8,%a2
44400: b684 cmpl %d4,%d3
44402: 6ec2 bgts 443c6 <readv+0x9e>
44404: 6006 bras 4440c <readv+0xe4>
* A readv with all zeros logically has no effect. Even though
* OpenGroup didn't address this case as they did with writev(),
* we will handle it the same way for symmetry.
*/
if ( all_zeros == true ) {
return 0;
44406: 4282 clrl %d2
44408: 6002 bras 4440c <readv+0xe4>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
4440a: 74ff moveq #-1,%d2
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4440c: 2002 movel %d2,%d0
4440e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
44414: 4e5e unlk %fp <== NOT EXECUTED
00059edc <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
59edc: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
59ede: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
59ee2: 52b9 0005 d81c addql #1,5d81c <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
59ee8: 48d7 001c moveml %d2-%d4,%sp@
59eec: 242e 0008 movel %fp@(8),%d2
59ef0: 262e 000c movel %fp@(12),%d3
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
59ef4: b0b9 0005 daba cmpl 5daba <_System_state_Current>,%d0
59efa: 6614 bnes 59f10 <realloc+0x34> <== NEVER TAKEN
if (_Thread_Dispatch_disable_level > 0)
59efc: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0
59f02: 6600 00aa bnew 59fae <realloc+0xd2>
return (void *) 0;
if (_ISR_Nest_level > 0)
59f06: 4ab9 0005 ddd8 tstl 5ddd8 <_Per_CPU_Information+0x8>
59f0c: 6600 00a0 bnew 59fae <realloc+0xd2>
}
/*
* Continue with realloc().
*/
if ( !ptr )
59f10: 4a82 tstl %d2
59f12: 6610 bnes 59f24 <realloc+0x48>
return malloc( size );
59f14: 2f03 movel %d3,%sp@-
59f16: 4eb9 0004 2b18 jsr 42b18 <malloc>
59f1c: 588f addql #4,%sp
59f1e: 2400 movel %d0,%d2
59f20: 6000 008e braw 59fb0 <realloc+0xd4>
if ( !size ) {
59f24: 4a83 tstl %d3
59f26: 660c bnes 59f34 <realloc+0x58> <== ALWAYS TAKEN
free( ptr );
59f28: 2f02 movel %d2,%sp@- <== NOT EXECUTED
59f2a: 4eb9 0004 2830 jsr 42830 <free> <== NOT EXECUTED
return (void *) 0;
59f30: 588f addql #4,%sp <== NOT EXECUTED
59f32: 607a bras 59fae <realloc+0xd2> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
59f34: 486e fffc pea %fp@(-4)
59f38: 2f02 movel %d2,%sp@-
59f3a: 2f39 0005 c0f0 movel 5c0f0 <RTEMS_Malloc_Heap>,%sp@-
59f40: 4eb9 0005 a444 jsr 5a444 <_Protected_heap_Get_block_size>
59f46: 4fef 000c lea %sp@(12),%sp
59f4a: 4a00 tstb %d0
59f4c: 660e bnes 59f5c <realloc+0x80>
errno = EINVAL;
59f4e: 4eb9 0004 ca54 jsr 4ca54 <__errno>
59f54: 2040 moveal %d0,%a0
59f56: 7016 moveq #22,%d0
59f58: 2080 movel %d0,%a0@
59f5a: 6052 bras 59fae <realloc+0xd2>
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
59f5c: 2f03 movel %d3,%sp@-
59f5e: 2f02 movel %d2,%sp@-
59f60: 2f39 0005 c0f0 movel 5c0f0 <RTEMS_Malloc_Heap>,%sp@-
59f66: 4eb9 0005 a480 jsr 5a480 <_Protected_heap_Resize_block>
59f6c: 4fef 000c lea %sp@(12),%sp
59f70: 4a00 tstb %d0
59f72: 663c bnes 59fb0 <realloc+0xd4>
* 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 );
59f74: 2f03 movel %d3,%sp@-
59f76: 4eb9 0004 2b18 jsr 42b18 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
59f7c: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
59f7e: 53b9 0005 d810 subql #1,5d810 <rtems_malloc_statistics+0x4>
* 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 );
59f84: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
59f86: 6726 beqs 59fae <realloc+0xd2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
59f88: 202e fffc movel %fp@(-4),%d0
59f8c: b083 cmpl %d3,%d0
59f8e: 6402 bccs 59f92 <realloc+0xb6> <== NEVER TAKEN
59f90: 2600 movel %d0,%d3
59f92: 2f03 movel %d3,%sp@-
59f94: 2f02 movel %d2,%sp@-
59f96: 2f04 movel %d4,%sp@-
59f98: 4eb9 0004 d300 jsr 4d300 <memcpy>
free( ptr );
59f9e: 2f02 movel %d2,%sp@-
return new_area;
59fa0: 2404 movel %d4,%d2
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
59fa2: 4eb9 0004 2830 jsr 42830 <free>
return new_area;
59fa8: 4fef 0010 lea %sp@(16),%sp
59fac: 6002 bras 59fb0 <realloc+0xd4>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
59fae: 4282 clrl %d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
59fb0: 2002 movel %d2,%d0
59fb2: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4
59fb8: 4e5e unlk %fp <== NOT EXECUTED
00044404 <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
44404: 4e56 ffbc linkw %fp,#-68
44408: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
4440c: 246e 0008 moveal %fp@(8),%a2
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
44410: 2f0a movel %a2,%sp@-
44412: 4eb9 0004 3252 jsr 43252 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
44418: 588f addql #4,%sp
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
4441a: 2a00 movel %d0,%d5
4441c: 200e movel %fp,%d0
4441e: 0680 ffff ffe8 addil #-24,%d0
if ( parentpathlen == 0 )
44424: 4a85 tstl %d5
44426: 6616 bnes 4443e <rmdir+0x3a>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44428: 2f00 movel %d0,%sp@-
4442a: 486e fffc pea %fp@(-4)
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
4442e: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44430: 2f0a movel %a2,%sp@-
44432: 4eb9 0004 4528 jsr 44528 <rtems_filesystem_get_start_loc>
44438: 4fef 000c lea %sp@(12),%sp
4443c: 601e bras 4445c <rmdir+0x58>
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
4443e: 42a7 clrl %sp@-
44440: 2f00 movel %d0,%sp@-
44442: 4878 0002 pea 2 <DOUBLE_FLOAT>
44446: 2f05 movel %d5,%sp@-
44448: 2f0a movel %a2,%sp@-
4444a: 4eb9 0004 31da jsr 431da <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
44450: 4fef 0014 lea %sp@(20),%sp
44454: 4a80 tstl %d0
44456: 6600 00c2 bnew 4451a <rmdir+0x116>
return -1;
free_parentloc = true;
4445a: 7801 moveq #1,%d4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4445c: 4878 0014 pea 14 <OPER2>
44460: 260e movel %fp,%d3
44462: 0683 ffff ffe8 addil #-24,%d3
44468: 240e movel %fp,%d2
4446a: 0682 ffff ffd4 addil #-44,%d2
name = pathname + parentpathlen;
44470: d5c5 addal %d5,%a2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44472: 47f9 0004 ebe0 lea 4ebe0 <strlen>,%a3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44478: 2f03 movel %d3,%sp@-
4447a: 2f02 movel %d2,%sp@-
4447c: 4eb9 0004 e0e8 jsr 4e0e8 <memcpy>
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44482: 2f0a movel %a2,%sp@-
44484: 4e93 jsr %a3@
44486: 2e80 movel %d0,%sp@
44488: 2f0a movel %a2,%sp@-
4448a: 4eb9 0004 3294 jsr 43294 <rtems_filesystem_prefix_separators>
44490: d5c0 addal %d0,%a2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44492: 2f0a movel %a2,%sp@-
44494: 4e93 jsr %a3@
44496: 4297 clrl %sp@
44498: 2f02 movel %d2,%sp@-
4449a: 42a7 clrl %sp@-
4449c: 2f00 movel %d0,%sp@-
4449e: 2f0a movel %a2,%sp@-
444a0: 4eb9 0004 3140 jsr 43140 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
444a6: 4fef 0028 lea %sp@(40),%sp
444aa: 4a80 tstl %d0
444ac: 6710 beqs 444be <rmdir+0xba>
if ( free_parentloc )
444ae: 4a04 tstb %d4
444b0: 6768 beqs 4451a <rmdir+0x116> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
444b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
444b4: 4eb9 0004 34ec jsr 434ec <rtems_filesystem_freenode> <== NOT EXECUTED
444ba: 588f addql #4,%sp <== NOT EXECUTED
444bc: 605c bras 4451a <rmdir+0x116> <== NOT EXECUTED
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
444be: 206e ffe0 moveal %fp@(-32),%a0
444c2: 45f9 0004 34ec lea 434ec <rtems_filesystem_freenode>,%a2
444c8: 2f02 movel %d2,%sp@-
444ca: 2068 0010 moveal %a0@(16),%a0
444ce: 4e90 jsr %a0@
444d0: 588f addql #4,%sp
444d2: 7201 moveq #1,%d1
444d4: b280 cmpl %d0,%d1
444d6: 671e beqs 444f6 <rmdir+0xf2>
rtems_filesystem_freenode( &loc );
444d8: 2f02 movel %d2,%sp@-
444da: 4e92 jsr %a2@
if ( free_parentloc )
444dc: 588f addql #4,%sp
444de: 4a04 tstb %d4
444e0: 6706 beqs 444e8 <rmdir+0xe4> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
444e2: 2f03 movel %d3,%sp@-
444e4: 4e92 jsr %a2@
444e6: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
444e8: 4eb9 0004 d83c jsr 4d83c <__errno>
444ee: 2040 moveal %d0,%a0
444f0: 7014 moveq #20,%d0
444f2: 2080 movel %d0,%a0@
444f4: 6024 bras 4451a <rmdir+0x116>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
444f6: 2f02 movel %d2,%sp@-
444f8: 206e ffdc moveal %fp@(-36),%a0
444fc: 2f03 movel %d3,%sp@-
444fe: 2068 0034 moveal %a0@(52),%a0
44502: 4e90 jsr %a0@
44504: 2a00 movel %d0,%d5
rtems_filesystem_freenode( &loc );
44506: 2f02 movel %d2,%sp@-
44508: 4e92 jsr %a2@
if ( free_parentloc )
4450a: 4fef 000c lea %sp@(12),%sp
4450e: 4a04 tstb %d4
44510: 670a beqs 4451c <rmdir+0x118>
rtems_filesystem_freenode( &parentloc );
44512: 2f03 movel %d3,%sp@-
44514: 4e92 jsr %a2@
44516: 588f addql #4,%sp
44518: 6002 bras 4451c <rmdir+0x118>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
4451a: 7aff moveq #-1,%d5
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4451c: 2005 movel %d5,%d0
4451e: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3
44524: 4e5e unlk %fp <== NOT EXECUTED
0004c920 <rtems_barrier_wait>:
rtems_status_code rtems_barrier_wait(
rtems_id id,
rtems_interval timeout
)
{
4c920: 4e56 fffc linkw %fp,#-4
4c924: 2f02 movel %d2,%sp@-
4c926: 486e fffc pea %fp@(-4)
4c92a: 242e 0008 movel %fp@(8),%d2
4c92e: 2f02 movel %d2,%sp@-
4c930: 4879 0005 f782 pea 5f782 <_Barrier_Information>
4c936: 4eb9 0004 81e8 jsr 481e8 <_Objects_Get>
Barrier_Control *the_barrier;
Objects_Locations location;
the_barrier = _Barrier_Get( id, &location );
switch ( location ) {
4c93c: 4fef 000c lea %sp@(12),%sp
4c940: 4aae fffc tstl %fp@(-4)
4c944: 6634 bnes 4c97a <rtems_barrier_wait+0x5a> <== NEVER TAKEN
case OBJECTS_LOCAL:
_CORE_barrier_Wait(
4c946: 42a7 clrl %sp@-
4c948: 2f2e 000c movel %fp@(12),%sp@-
4c94c: 2040 moveal %d0,%a0
4c94e: 4878 0001 pea 1 <ADD>
4c952: 2f02 movel %d2,%sp@-
4c954: 4868 0014 pea %a0@(20)
4c958: 4eb9 0004 cfb0 jsr 4cfb0 <_CORE_barrier_Wait>
id,
true,
timeout,
NULL
);
_Thread_Enable_dispatch();
4c95e: 4eb9 0004 89d6 jsr 489d6 <_Thread_Enable_dispatch>
return _Barrier_Translate_core_barrier_return_code(
_Thread_Executing->Wait.return_code );
4c964: 2079 0005 f3d4 moveal 5f3d4 <_Per_CPU_Information+0xc>,%a0
true,
timeout,
NULL
);
_Thread_Enable_dispatch();
return _Barrier_Translate_core_barrier_return_code(
4c96a: 2f28 0034 movel %a0@(52),%sp@-
4c96e: 4eb9 0004 dfec jsr 4dfec <_Barrier_Translate_core_barrier_return_code>
4c974: 4fef 0018 lea %sp@(24),%sp
4c978: 6002 bras 4c97c <rtems_barrier_wait+0x5c>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4c97a: 7004 moveq #4,%d0
}
4c97c: 242e fff8 movel %fp@(-8),%d2
4c980: 4e5e unlk %fp <== NOT EXECUTED
00042188 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42188: 4e56 ffec linkw %fp,#-20
4218c: 202e 0008 movel %fp@(8),%d0
42190: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
42194: 246e 000c moveal %fp@(12),%a2
42198: 242e 0010 movel %fp@(16),%d2
const char *p;
if ( !name )
4219c: 4a80 tstl %d0
4219e: 674e beqs 421ee <rtems_bsp_cmdline_get_param+0x66>
return NULL;
if ( !value )
421a0: 4a8a tstl %a2
421a2: 674c beqs 421f0 <rtems_bsp_cmdline_get_param+0x68>
return NULL;
if ( !length )
421a4: 4a82 tstl %d2
421a6: 6746 beqs 421ee <rtems_bsp_cmdline_get_param+0x66>
return NULL;
value[0] = '\0';
421a8: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
421aa: 2f00 movel %d0,%sp@-
421ac: 4eb9 0004 21fc jsr 421fc <rtems_bsp_cmdline_get_param_raw>
if ( !p )
421b2: 588f addql #4,%sp
421b4: 4a80 tstl %d0
421b6: 6736 beqs 421ee <rtems_bsp_cmdline_get_param+0x66>
421b8: 2240 moveal %d0,%a1
421ba: 204a moveal %a2,%a0
421bc: 4281 clrl %d1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
421be: 5382 subql #1,%d2
421c0: 601e bras 421e0 <rtems_bsp_cmdline_get_param+0x58>
if ( *p == '\"' ) {
421c2: 7822 moveq #34,%d4
421c4: 1003 moveb %d3,%d0
421c6: 49c0 extbl %d0
421c8: b880 cmpl %d0,%d4
421ca: 6604 bnes 421d0 <rtems_bsp_cmdline_get_param+0x48>
quotes++;
421cc: 5281 addql #1,%d1
421ce: 600c bras 421dc <rtems_bsp_cmdline_get_param+0x54>
} else if ( ((quotes % 2) == 0) && *p == ' ' )
421d0: 0801 0000 btst #0,%d1
421d4: 6606 bnes 421dc <rtems_bsp_cmdline_get_param+0x54>
421d6: 7820 moveq #32,%d4
421d8: b880 cmpl %d0,%d4
421da: 6714 beqs 421f0 <rtems_bsp_cmdline_get_param+0x68>
break;
value[i++] = *p++;
421dc: 10c3 moveb %d3,%a0@+
value[i] = '\0';
421de: 4210 clrb %a0@
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
421e0: 1619 moveb %a1@+,%d3
421e2: 670c beqs 421f0 <rtems_bsp_cmdline_get_param+0x68>
421e4: 2648 moveal %a0,%a3
421e6: 97ca subal %a2,%a3
421e8: b48b cmpl %a3,%d2
421ea: 62d6 bhis 421c2 <rtems_bsp_cmdline_get_param+0x3a><== ALWAYS TAKEN
421ec: 6002 bras 421f0 <rtems_bsp_cmdline_get_param+0x68><== NOT EXECUTED
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
421ee: 95ca subal %a2,%a2
copy_string( p, value, length );
return value;
}
421f0: 200a movel %a2,%d0
421f2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
421f8: 4e5e unlk %fp <== NOT EXECUTED
00042224 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42224: 4e56 fff4 linkw %fp,#-12
42228: 48d7 001c moveml %d2-%d4,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
4222c: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42230: 242e 000c movel %fp@(12),%d2
42234: 282e 0008 movel %fp@(8),%d4
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42238: 2f02 movel %d2,%sp@-
4223a: 2f04 movel %d4,%sp@-
4223c: 4eb9 0004 2188 jsr 42188 <rtems_bsp_cmdline_get_param>
if ( !p )
42242: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42246: 2600 movel %d0,%d3
if ( !p )
42248: 6744 beqs 4228e <rtems_bsp_cmdline_get_param_rhs+0x6a>
return NULL;
rhs = &p[strlen(name)];
4224a: 2f04 movel %d4,%sp@-
4224c: 4eb9 0004 e280 jsr 4e280 <strlen>
42252: 588f addql #4,%sp
42254: 2043 moveal %d3,%a0
42256: d1c0 addal %d0,%a0
if ( *rhs != '=' )
42258: 723d moveq #61,%d1
4225a: 1010 moveb %a0@,%d0
4225c: 49c0 extbl %d0
4225e: b280 cmpl %d0,%d1
42260: 662c bnes 4228e <rtems_bsp_cmdline_get_param_rhs+0x6a><== NEVER TAKEN
return NULL;
rhs++;
42262: 5288 addql #1,%a0
if ( *rhs == '\"' )
42264: 123c 0022 moveb #34,%d1
42268: 1010 moveb %a0@,%d0
4226a: 49c0 extbl %d0
4226c: b280 cmpl %d0,%d1
4226e: 6602 bnes 42272 <rtems_bsp_cmdline_get_param_rhs+0x4e>
rhs++;
42270: 5288 addql #1,%a0
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42272: 2242 moveal %d2,%a1
42274: 6002 bras 42278 <rtems_bsp_cmdline_get_param_rhs+0x54>
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
42276: 12c0 moveb %d0,%a1@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42278: 1018 moveb %a0@+,%d0
4227a: 66fa bnes 42276 <rtems_bsp_cmdline_get_param_rhs+0x52>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
4227c: 2049 moveal %a1,%a0
4227e: 7222 moveq #34,%d1
42280: 1020 moveb %a0@-,%d0
42282: 49c0 extbl %d0
42284: b280 cmpl %d0,%d1
42286: 6702 beqs 4228a <rtems_bsp_cmdline_get_param_rhs+0x66>
42288: 2049 moveal %a1,%a0
d--;
*d = '\0';
4228a: 4210 clrb %a0@
return value;
4228c: 6002 bras 42290 <rtems_bsp_cmdline_get_param_rhs+0x6c>
if ( !p )
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
4228e: 4282 clrl %d2
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
42290: 2002 movel %d2,%d0
42292: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
42298: 4e5e unlk %fp <== NOT EXECUTED
0004c98c <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4c98c: 4e56 0000 linkw %fp,#0
4c990: 202e 0008 movel %fp@(8),%d0
4c994: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4c996: 4a80 tstl %d0
4c998: 6722 beqs 4c9bc <rtems_deviceio_errno+0x30> <== ALWAYS TAKEN
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4c99a: 721c moveq #28,%d1 <== NOT EXECUTED
4c99c: b280 cmpl %d0,%d1 <== NOT EXECUTED
4c99e: 650c bcss 4c9ac <rtems_deviceio_errno+0x20> <== NOT EXECUTED
eno = status_code_to_errno [sc];
4c9a0: 41f9 0005 b76e lea 5b76e <status_code_to_errno>,%a0 <== NOT EXECUTED
4c9a6: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 <== NOT EXECUTED
4c9aa: 6002 bras 4c9ae <rtems_deviceio_errno+0x22> <== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4c9ac: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4c9ae: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
4c9b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4c9b6: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4c9b8: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
4c9ba: 6002 bras 4c9be <rtems_deviceio_errno+0x32> <== NOT EXECUTED
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4c9bc: 4280 clrl %d0
errno = eno;
return -1;
}
}
4c9be: 242e fffc movel %fp@(-4),%d2
4c9c2: 4e5e unlk %fp
...
00042726 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42726: 4e56 fffc linkw %fp,#-4
4272a: 2f0a movel %a2,%sp@-
4272c: 246e 0008 moveal %fp@(8),%a2
42730: 2f02 movel %d2,%sp@-
42732: 242e 0014 movel %fp@(20),%d2
int i = 0;
42736: 42ae fffc clrl %fp@(-4)
/*
* Verify Input parameters.
*/
if ( !pathname )
4273a: 4a8a tstl %a2
4273c: 660e bnes 4274c <rtems_filesystem_evaluate_path+0x26><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
4273e: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42744: 2040 moveal %d0,%a0 <== NOT EXECUTED
42746: 700e moveq #14,%d0 <== NOT EXECUTED
42748: 2080 movel %d0,%a0@ <== NOT EXECUTED
4274a: 6010 bras 4275c <rtems_filesystem_evaluate_path+0x36><== NOT EXECUTED
if ( !pathloc )
4274c: 4a82 tstl %d2
4274e: 6610 bnes 42760 <rtems_filesystem_evaluate_path+0x3a><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
42750: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
42756: 7405 moveq #5,%d2 <== NOT EXECUTED
42758: 2040 moveal %d0,%a0 <== NOT EXECUTED
4275a: 2082 movel %d2,%a0@ <== NOT EXECUTED
4275c: 70ff moveq #-1,%d0 <== NOT EXECUTED
4275e: 6032 bras 42792 <rtems_filesystem_evaluate_path+0x6c><== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
42760: 2f02 movel %d2,%sp@-
42762: 486e fffc pea %fp@(-4)
42766: 2f0a movel %a2,%sp@-
42768: 4eb9 0004 34f4 jsr 434f4 <rtems_filesystem_get_start_loc>
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
4276e: 2f2e 0018 movel %fp@(24),%sp@-
42772: 2f02 movel %d2,%sp@-
42774: 2f2e 0010 movel %fp@(16),%sp@-
42778: 202e fffc movel %fp@(-4),%d0
4277c: 222e 000c movel %fp@(12),%d1
42780: 9280 subl %d0,%d1
42782: 2f01 movel %d1,%sp@-
42784: 4872 0800 pea %a2@(00000000,%d0:l)
42788: 4eb9 0004 268c jsr 4268c <rtems_filesystem_evaluate_relative_path>
4278e: 4fef 0020 lea %sp@(32),%sp
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42792: 242e fff4 movel %fp@(-12),%d2
42796: 246e fff8 moveal %fp@(-8),%a2
4279a: 4e5e unlk %fp <== NOT EXECUTED
0004268c <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
4268c: 4e56 fff0 linkw %fp,#-16
42690: 202e 0008 movel %fp@(8),%d0
42694: 48d7 041c moveml %d2-%d4/%a2,%sp@
42698: 222e 000c movel %fp@(12),%d1
4269c: 262e 0010 movel %fp@(16),%d3
426a0: 246e 0014 moveal %fp@(20),%a2
426a4: 282e 0018 movel %fp@(24),%d4
/*
* Verify Input parameters.
*/
if ( !pathname )
426a8: 4a80 tstl %d0
426aa: 660e bnes 426ba <rtems_filesystem_evaluate_relative_path+0x2e><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
426ac: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
426b2: 720e moveq #14,%d1 <== NOT EXECUTED
426b4: 2040 moveal %d0,%a0 <== NOT EXECUTED
426b6: 2081 movel %d1,%a0@ <== NOT EXECUTED
426b8: 6010 bras 426ca <rtems_filesystem_evaluate_relative_path+0x3e><== NOT EXECUTED
if ( !pathloc )
426ba: 4a8a tstl %a2
426bc: 6610 bnes 426ce <rtems_filesystem_evaluate_relative_path+0x42><== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
426be: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
426c4: 2040 moveal %d0,%a0 <== NOT EXECUTED
426c6: 7005 moveq #5,%d0 <== NOT EXECUTED
426c8: 2080 movel %d0,%a0@ <== NOT EXECUTED
426ca: 74ff moveq #-1,%d2 <== NOT EXECUTED
426cc: 604c bras 4271a <rtems_filesystem_evaluate_relative_path+0x8e><== NOT EXECUTED
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
426ce: 206a 000c moveal %a2@(12),%a0
426d2: 2f0a movel %a2,%sp@-
426d4: 2f03 movel %d3,%sp@-
426d6: 2f01 movel %d1,%sp@-
426d8: 2f00 movel %d0,%sp@-
426da: 2050 moveal %a0@,%a0
426dc: 4e90 jsr %a0@
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
426de: 4fef 0010 lea %sp@(16),%sp
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
426e2: 2400 movel %d0,%d2
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
426e4: 6634 bnes 4271a <rtems_filesystem_evaluate_relative_path+0x8e>
426e6: 4a84 tstl %d4
426e8: 6730 beqs 4271a <rtems_filesystem_evaluate_relative_path+0x8e>
type = (*pathloc->ops->node_type_h)( pathloc );
426ea: 206a 000c moveal %a2@(12),%a0
426ee: 2f0a movel %a2,%sp@-
426f0: 2068 0010 moveal %a0@(16),%a0
426f4: 4e90 jsr %a0@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
426f6: 588f addql #4,%sp
426f8: 7201 moveq #1,%d1
426fa: 5780 subql #3,%d0
426fc: b280 cmpl %d0,%d1
426fe: 651a bcss 4271a <rtems_filesystem_evaluate_relative_path+0x8e>
* 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 );
42700: 206a 000c moveal %a2@(12),%a0
42704: 2d43 000c movel %d3,%fp@(12)
42708: 2d4a 0008 movel %a2,%fp@(8)
4270c: 2268 0034 moveal %a0@(52),%a1
}
}
return result;
}
42710: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
42716: 4e5e unlk %fp
* pathloc will be passed up (and eventually released).
* Hence, the (valid) originial node that we submit to
* eval_link_h() should be released by the handler.
*/
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
42718: 4ed1 jmp %a1@
}
}
return result;
}
4271a: 2002 movel %d2,%d0
4271c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
42722: 4e5e unlk %fp <== NOT EXECUTED
00049c06 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
49c06: 4e56 fff8 linkw %fp,#-8
49c0a: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
49c0e: 42ae fffc clrl %fp@(-4)
49c12: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
49c16: 6710 beqs 49c28 <rtems_filesystem_get_mount_handler+0x22><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
49c18: 486e fff8 pea %fp@(-8)
49c1c: 487a ff16 pea %pc@(49b34 <find_handler>)
49c20: 4eb9 0004 9b9e jsr 49b9e <rtems_filesystem_iterate>
49c26: 508f addql #8,%sp
}
return fa.mount_h;
}
49c28: 202e fffc movel %fp@(-4),%d0
49c2c: 4e5e unlk %fp <== NOT EXECUTED
00042350 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42350: 7012 moveq #18,%d0
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
42352: 4e56 ffe0 linkw %fp,#-32
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42356: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
* configuration is a single instantiation of the IMFS or miniIMFS with
* a single "/dev" directory in it.
*/
void rtems_filesystem_initialize( void )
{
4235c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42360: 2140 002c movel %d0,%a0@(44)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
42364: 4ab9 0005 a96e tstl 5a96e <rtems_filesystem_mount_table_size>
4236a: 6608 bnes 42374 <rtems_filesystem_initialize+0x24><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0001 );
4236c: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED
42372: 602c bras 423a0 <rtems_filesystem_initialize+0x50><== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
42374: 2079 0005 c0ec moveal 5c0ec <rtems_filesystem_mount_table>,%a0
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
4237a: 42a7 clrl %sp@-
4237c: 2f28 0004 movel %a0@(4),%sp@-
42380: 2f10 movel %a0@,%sp@-
42382: 2f28 000c movel %a0@(12),%sp@-
42386: 2f28 0008 movel %a0@(8),%sp@-
4238a: 4eb9 0004 2d14 jsr 42d14 <mount>
if ( status == -1 )
42390: 4fef 0014 lea %sp@(20),%sp
42394: 72ff moveq #-1,%d1
42396: b280 cmpl %d0,%d1
42398: 660c bnes 423a6 <rtems_filesystem_initialize+0x56><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0002 );
4239a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED
423a0: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
423a6: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
423ac: 240e movel %fp,%d2
423ae: 0682 ffff ffec addil #-20,%d2
423b4: 47f9 0004 2726 lea 42726 <rtems_filesystem_evaluate_path>,%a3
rtems_filesystem_root = loc;
423ba: 45f9 0004 d300 lea 4d300 <memcpy>,%a2
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
423c0: 4240 clrw %d0
423c2: 3140 0030 movew %d0,%a0@(48)
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
423c6: 42a7 clrl %sp@-
423c8: 2f02 movel %d2,%sp@-
423ca: 42a7 clrl %sp@-
423cc: 4878 0001 pea 1 <ADD>
423d0: 4879 0005 ad20 pea 5ad20 <IMFS_ops+0x48>
423d6: 4e93 jsr %a3@
rtems_filesystem_root = loc;
423d8: 4878 0014 pea 14 <OPER2>
423dc: 2079 0005 c200 moveal 5c200 <rtems_current_user_env>,%a0
423e2: 41e8 0018 lea %a0@(24),%a0
423e6: 2f02 movel %d2,%sp@-
423e8: 2f08 movel %a0,%sp@-
423ea: 4e92 jsr %a2@
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
423ec: 4fef 001c lea %sp@(28),%sp
423f0: 4297 clrl %sp@
423f2: 2f02 movel %d2,%sp@-
423f4: 42a7 clrl %sp@-
423f6: 4878 0001 pea 1 <ADD>
423fa: 4879 0005 ad20 pea 5ad20 <IMFS_ops+0x48>
42400: 4e93 jsr %a3@
rtems_filesystem_current = loc;
42402: 4878 0014 pea 14 <OPER2>
42406: 2039 0005 c200 movel 5c200 <rtems_current_user_env>,%d0
4240c: 5880 addql #4,%d0
4240e: 2f02 movel %d2,%sp@-
42410: 2f00 movel %d0,%sp@-
42412: 4e92 jsr %a2@
*
* NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
42414: 4fef 0020 lea %sp@(32),%sp
42418: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4241c: 4879 0005 ad22 pea 5ad22 <IMFS_ops+0x4a>
42422: 4eb9 0004 2bc4 jsr 42bc4 <mkdir>
if ( status != 0 )
42428: 508f addql #8,%sp
4242a: 4a80 tstl %d0
4242c: 670a beqs 42438 <rtems_filesystem_initialize+0xe8><== ALWAYS TAKEN
rtems_fatal_error_occurred( 0xABCD0003 );
4242e: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED
42434: 6000 ff6a braw 423a0 <rtems_filesystem_initialize+0x50><== NOT EXECUTED
* it will be mounted onto is created. Moreover, if it is going to
* use a device, then it is REALLY unfair to attempt this
* before device drivers are initialized. So we return via a base
* filesystem image and nothing auto-mounted at this point.
*/
}
42438: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
4243e: 4e5e unlk %fp
...
00049b9e <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
49b9e: 4e56 fff0 linkw %fp,#-16
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
49ba2: 4200 clrb %d0
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
49ba4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
49ba8: 266e 0008 moveal %fp@(8),%a3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
49bac: 45f9 0005 a94e lea 5a94e <rtems_filesystem_table>,%a2
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
49bb2: 242e 000c movel %fp@(12),%d2
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
49bb6: 600a bras 49bc2 <rtems_filesystem_iterate+0x24>
stop = (*routine)( table_entry, routine_arg );
49bb8: 2f02 movel %d2,%sp@-
49bba: 2f0a movel %a2,%sp@-
++table_entry;
49bbc: 508a addql #8,%a2
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
49bbe: 4e93 jsr %a3@
++table_entry;
49bc0: 508f addql #8,%sp
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
49bc2: 4a92 tstl %a2@
49bc4: 6706 beqs 49bcc <rtems_filesystem_iterate+0x2e>
49bc6: 4a00 tstb %d0
49bc8: 67ee beqs 49bb8 <rtems_filesystem_iterate+0x1a> <== ALWAYS TAKEN
49bca: 6030 bras 49bfc <rtems_filesystem_iterate+0x5e> <== NOT EXECUTED
49bcc: 1600 moveb %d0,%d3
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
49bce: 662c bnes 49bfc <rtems_filesystem_iterate+0x5e>
rtems_libio_lock();
49bd0: 4eba ff9a jsr %pc@(49b6c <rtems_libio_lock>)
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
49bd4: 2479 0005 c204 moveal 5c204 <filesystem_chain>,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
49bda: 600e bras 49bea <rtems_filesystem_iterate+0x4c>
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
49bdc: 2f02 movel %d2,%sp@-
49bde: 486a 0008 pea %a2@(8)
49be2: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
49be4: 2452 moveal %a2@,%a2
49be6: 508f addql #8,%sp
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
node = rtems_chain_next( node )
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
49be8: 1600 moveb %d0,%d3
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
49bea: b5fc 0005 c208 cmpal #377352,%a2
49bf0: 6704 beqs 49bf6 <rtems_filesystem_iterate+0x58>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
49bf2: 4a03 tstb %d3
49bf4: 67e6 beqs 49bdc <rtems_filesystem_iterate+0x3e> <== ALWAYS TAKEN
) {
const filesystem_node *fsn = (filesystem_node *) node;
stop = (*routine)( &fsn->entry, routine_arg );
}
rtems_libio_unlock();
49bf6: 4eba ff90 jsr %pc@(49b88 <rtems_libio_unlock>)
49bfa: 1003 moveb %d3,%d0
}
return stop;
}
49bfc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
49c02: 4e5e unlk %fp <== NOT EXECUTED
00042cca <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
42cca: 4e56 fff0 linkw %fp,#-16
42cce: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
42cd2: 266e 0008 moveal %fp@(8),%a3
42cd6: 242e 000c movel %fp@(12),%d2
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
42cda: 4eba ffbc jsr %pc@(42c98 <rtems_libio_lock>)
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
42cde: 2479 0005 c1e0 moveal 5c1e0 <mount_chain>,%a2
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
42ce4: 4200 clrb %d0
rtems_libio_lock();
for (
42ce6: 600a bras 42cf2 <rtems_filesystem_mount_iterate+0x28>
node = rtems_chain_next( node )
) {
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
42ce8: 2f02 movel %d2,%sp@-
42cea: 2f0a movel %a2,%sp@-
42cec: 4e93 jsr %a3@
}
rtems_libio_unlock();
return stop;
}
42cee: 2452 moveal %a2@,%a2
42cf0: 508f addql #8,%sp
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
42cf2: b5fc 0005 c1e4 cmpal #377316,%a2
42cf8: 6704 beqs 42cfe <rtems_filesystem_mount_iterate+0x34>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
42cfa: 4a00 tstb %d0
42cfc: 67ea beqs 42ce8 <rtems_filesystem_mount_iterate+0x1e><== ALWAYS TAKEN
const rtems_filesystem_mount_table_entry_t *mt_entry =
(rtems_filesystem_mount_table_entry_t *) node;
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
42cfe: 2d40 fffc movel %d0,%fp@(-4)
42d02: 4eba ffb0 jsr %pc@(42cb4 <rtems_libio_unlock>)
return stop;
}
42d06: 202e fffc movel %fp@(-4),%d0
42d0a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
42d10: 4e5e unlk %fp <== NOT EXECUTED
000427e0 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
427e0: 4e56 fff0 linkw %fp,#-16
427e4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
427e8: 262e 000c movel %fp@(12),%d3
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
427ec: 4282 clrl %d2
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
427ee: 47f9 0004 3558 lea 43558 <rtems_filesystem_is_separator>,%a3
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
427f4: 246e 0008 moveal %fp@(8),%a2
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
427f8: 6002 bras 427fc <rtems_filesystem_prefix_separators+0x1c>
{
pathname++;
pathnamelen--;
stripped++;
427fa: 5282 addql #1,%d2
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
427fc: 101a moveb %a2@+,%d0
427fe: 6710 beqs 42810 <rtems_filesystem_prefix_separators+0x30><== NEVER TAKEN
42800: b483 cmpl %d3,%d2
42802: 670c beqs 42810 <rtems_filesystem_prefix_separators+0x30><== NEVER TAKEN
42804: 49c0 extbl %d0
42806: 2f00 movel %d0,%sp@-
42808: 4e93 jsr %a3@
4280a: 588f addql #4,%sp
4280c: 4a80 tstl %d0
4280e: 66ea bnes 427fa <rtems_filesystem_prefix_separators+0x1a>
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42810: 2002 movel %d2,%d0
42812: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
42818: 4e5e unlk %fp <== NOT EXECUTED
00042fa8 <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
42fa8: 4e56 fffc linkw %fp,#-4
rtems_status_code status;
void *p= 0;
42fac: 204e moveal %fp,%a0
}
return 0;
}
void *rtems_gxx_getspecific(__gthread_key_t key)
{
42fae: 2f0a movel %a2,%sp@-
42fb0: 246e 0008 moveal %fp@(8),%a2
rtems_status_code status;
void *p= 0;
42fb4: 42a0 clrl %a0@-
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
42fb6: 2f08 movel %a0,%sp@-
42fb8: 2f0a movel %a2,%sp@-
42fba: 42a7 clrl %sp@-
42fbc: 4eb9 0004 6614 jsr 46614 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
42fc2: 4fef 000c lea %sp@(12),%sp
42fc6: 4a80 tstl %d0
42fc8: 6606 bnes 42fd0 <rtems_gxx_getspecific+0x28> <== NEVER TAKEN
/* We do not have to do this, but what the heck ! */
p= key->val;
42fca: 2d52 fffc movel %a2@,%fp@(-4)
42fce: 6024 bras 42ff4 <rtems_gxx_getspecific+0x4c>
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
42fd0: 2f2a 0004 movel %a2@(4),%sp@- <== NOT EXECUTED
42fd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42fd6: 42a7 clrl %sp@- <== NOT EXECUTED
42fd8: 4eb9 0004 650c jsr 4650c <rtems_task_variable_add> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
42fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
42fe2: 4a80 tstl %d0 <== NOT EXECUTED
42fe4: 670c beqs 42ff2 <rtems_gxx_getspecific+0x4a> <== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
42fe6: 4879 0005 bbf8 pea 5bbf8 <rtems_status_assoc+0x1a0> <== NOT EXECUTED
42fec: 4eb9 0004 2be2 jsr 42be2 <rtems_panic> <== NOT EXECUTED
}
key->val = (void *)0;
42ff2: 4292 clrl %a2@ <== NOT EXECUTED
p,
rtems_task_self()
);
#endif
return p;
}
42ff4: 202e fffc movel %fp@(-4),%d0
42ff8: 246e fff8 moveal %fp@(-8),%a2
42ffc: 4e5e unlk %fp <== NOT EXECUTED
00042f76 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
42f76: 4e56 0000 linkw %fp,#0
42f7a: 2f02 movel %d2,%sp@-
42f7c: 242e 0008 movel %fp@(8),%d2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
42f80: 2f02 movel %d2,%sp@-
42f82: 42a7 clrl %sp@-
42f84: 4eb9 0004 65a0 jsr 465a0 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
42f8a: 508f addql #8,%sp
42f8c: 4a80 tstl %d0
42f8e: 660e bnes 42f9e <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( (void *)key );
42f90: 4a82 tstl %d2
42f92: 670a beqs 42f9e <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
42f94: 2f02 movel %d2,%sp@-
42f96: 4eb9 0004 2dbc jsr 42dbc <free>
42f9c: 588f addql #4,%sp
return 0;
}
return 0;
}
42f9e: 242e fffc movel %fp@(-4),%d2
42fa2: 4280 clrl %d0
42fa4: 4e5e unlk %fp <== NOT EXECUTED
00042f66 <rtems_gxx_key_dtor>:
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
return 0;
}
42f66: 4280 clrl %d0 <== NOT EXECUTED
return 0;
return -1;
}
int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
{
42f68: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
42f6c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
return 0;
}
42f70: 4e5e unlk %fp <== NOT EXECUTED
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
42f72: 4290 clrl %a0@ <== NOT EXECUTED
return 0;
}
00043088 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
43088: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
4308c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
43090: 2f10 movel %a0@,%sp@- <== NOT EXECUTED
43092: 4eb9 0004 5eac jsr 45eac <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
43098: 588f addql #4,%sp <== NOT EXECUTED
return 0;
return -1;
}
4309a: 4e5e unlk %fp <== NOT EXECUTED
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
if ( status == RTEMS_SUCCESSFUL )
return 0;
4309c: 4a80 tstl %d0 <== NOT EXECUTED
4309e: 56c0 sne %d0 <== NOT EXECUTED
430a0: 49c0 extbl %d0 <== NOT EXECUTED
return -1;
}
00043030 <rtems_gxx_mutex_init>:
/*
* MUTEX support
*/
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
{
43030: 4e56 0000 linkw %fp,#0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
43034: 2f2e 0008 movel %fp@(8),%sp@-
43038: 42a7 clrl %sp@-
4303a: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4303e: 4878 0001 pea 1 <ADD>
43042: 2f3c 4743 4332 movel #1195590450,%sp@-
43048: 4eb9 0004 5d10 jsr 45d10 <rtems_semaphore_create>
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
4304e: 4fef 0014 lea %sp@(20),%sp
43052: 4a80 tstl %d0
43054: 670c beqs 43062 <rtems_gxx_mutex_init+0x32> <== ALWAYS TAKEN
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
rtems_panic ("rtems_gxx_mutex_init");
43056: 4879 0005 bc0e pea 5bc0e <rtems_status_assoc+0x1b6> <== NOT EXECUTED
4305c: 4eb9 0004 2be2 jsr 42be2 <rtems_panic> <== NOT EXECUTED
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
43062: 4e5e unlk %fp <== NOT EXECUTED
00042ec8 <rtems_gxx_once>:
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
42ec8: 4e56 fffc linkw %fp,#-4
42ecc: 2f0a movel %a2,%sp@-
42ece: 246e 0008 moveal %fp@(8),%a2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
42ed2: 2012 movel %a2@,%d0
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
42ed4: 2f02 movel %d2,%sp@-
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
42ed6: 4a80 tstl %d0
42ed8: 663e bnes 42f18 <rtems_gxx_once+0x50>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
42eda: 486e fffc pea %fp@(-4)
42ede: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
42ee2: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
42ee6: 4eb9 0004 6330 jsr 46330 <rtems_task_mode>
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
42eec: 2412 movel %a2@,%d2
42eee: 4fef 000c lea %sp@(12),%sp
42ef2: 6604 bnes 42ef8 <rtems_gxx_once+0x30> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
42ef4: 7001 moveq #1,%d0
42ef6: 2480 movel %d0,%a2@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
42ef8: 486e fffc pea %fp@(-4)
42efc: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
42f00: 2f2e fffc movel %fp@(-4),%sp@-
42f04: 4eb9 0004 6330 jsr 46330 <rtems_task_mode>
if ( o == 0 )
42f0a: 4fef 000c lea %sp@(12),%sp
42f0e: 4a82 tstl %d2
42f10: 6606 bnes 42f18 <rtems_gxx_once+0x50> <== NEVER TAKEN
(*func)();
42f12: 206e 000c moveal %fp@(12),%a0
42f16: 4e90 jsr %a0@
}
return 0;
}
42f18: 242e fff4 movel %fp@(-12),%d2
42f1c: 4280 clrl %d0
42f1e: 246e fff8 moveal %fp@(-8),%a2
42f22: 4e5e unlk %fp <== NOT EXECUTED
00043000 <rtems_gxx_setspecific>:
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
43000: 4e56 0000 linkw %fp,#0
43004: 2f0a movel %a2,%sp@-
43006: 246e 0008 moveal %fp@(8),%a2
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
4300a: 2f2a 0004 movel %a2@(4),%sp@-
4300e: 2f0a movel %a2,%sp@-
43010: 42a7 clrl %sp@-
43012: 4eb9 0004 650c jsr 4650c <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
43018: 4fef 000c lea %sp@(12),%sp
4301c: 4a80 tstl %d0
4301e: 6606 bnes 43026 <rtems_gxx_setspecific+0x26> <== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
43020: 24ae 000c movel %fp@(12),%a2@
return 0;
43024: 6002 bras 43028 <rtems_gxx_setspecific+0x28>
}
return -1;
43026: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
43028: 246e fffc moveal %fp@(-4),%a2
4302c: 4e5e unlk %fp <== NOT EXECUTED
00046c9c <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
46c9c: 7003 moveq #3,%d0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
46c9e: 4e56 0000 linkw %fp,#0
if (
46ca2: b0b9 0006 3376 cmpl 63376 <_System_state_Current>,%d0
46ca8: 660a bnes 46cb4 <rtems_heap_allocate_aligned_with_boundary+0x18><== NEVER TAKEN
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
46caa: 4eb9 0004 5de0 jsr 45de0 <malloc_is_system_state_OK>
46cb0: 4a00 tstb %d0
46cb2: 6724 beqs 46cd8 <rtems_heap_allocate_aligned_with_boundary+0x3c>
) {
return NULL;
}
malloc_deferred_frees_process();
46cb4: 4eb9 0004 5e1e jsr 45e1e <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
46cba: 2f2e 0010 movel %fp@(16),%sp@-
46cbe: 2f2e 000c movel %fp@(12),%sp@-
46cc2: 2f2e 0008 movel %fp@(8),%sp@-
46cc6: 2f39 0006 10d0 movel 610d0 <RTEMS_Malloc_Heap>,%sp@-
46ccc: 4eb9 0004 b348 jsr 4b348 <_Protected_heap_Allocate_aligned_with_boundary>
46cd2: 4fef 0010 lea %sp@(16),%sp
46cd6: 6002 bras 46cda <rtems_heap_allocate_aligned_with_boundary+0x3e>
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
) {
return NULL;
46cd8: 4280 clrl %d0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
46cda: 4e5e unlk %fp
...
00045d8e <rtems_initialize_start_multitasking>:
45d8e: 7002 moveq #2,%d0
}
void rtems_initialize_start_multitasking(void)
{
45d90: 4e56 0000 linkw %fp,#0
****** APPLICATION RUNS HERE ******
****** RETURNS WHEN SYSTEM IS SHUT DOWN ******
*******************************************************************
*******************************************************************
*******************************************************************/
}
45d94: 4e5e unlk %fp
45d96: 23c0 0005 daba movel %d0,5daba <_System_state_Current>
void rtems_initialize_start_multitasking(void)
{
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking();
45d9c: 4ef9 0004 80b4 jmp 480b4 <_Thread_Start_multitasking>
...
0004c700 <rtems_io_close>:
rtems_status_code rtems_io_close(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *argument
)
{
4c700: 4e56 0000 linkw %fp,#0
4c704: 202e 0008 movel %fp@(8),%d0
4c708: 2f03 movel %d3,%sp@-
4c70a: 2f02 movel %d2,%sp@-
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
4c70c: b0b9 0005 e1c8 cmpl 5e1c8 <_IO_Number_of_drivers>,%d0
4c712: 6420 bccs 4c734 <rtems_io_close+0x34> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
4c714: 2600 movel %d0,%d3
4c716: 2200 movel %d0,%d1
4c718: e78b lsll #3,%d3
4c71a: eb89 lsll #5,%d1
4c71c: 2279 0005 e1cc moveal 5e1cc <_IO_Driver_address_table>,%a1
4c722: 9283 subl %d3,%d1
4c724: 2271 1808 moveal %a1@(00000008,%d1:l),%a1
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4c728: 4a89 tstl %a1
4c72a: 670c beqs 4c738 <rtems_io_close+0x38>
}
4c72c: 241f movel %sp@+,%d2
4c72e: 261f movel %sp@+,%d3
4c730: 4e5e unlk %fp
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4c732: 4ed1 jmp %a1@
)
{
rtems_device_driver_entry callout;
if ( major >= _IO_Number_of_drivers )
return RTEMS_INVALID_NUMBER;
4c734: 700a moveq #10,%d0
4c736: 6002 bras 4c73a <rtems_io_close+0x3a>
callout = _IO_Driver_address_table[major].close_entry;
return callout ? callout(major, minor, argument) : RTEMS_SUCCESSFUL;
4c738: 4280 clrl %d0
}
4c73a: 241f movel %sp@+,%d2
4c73c: 261f movel %sp@+,%d3
4c73e: 4e5e unlk %fp
...
000422c0 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
422c0: 4e56 ffd4 linkw %fp,#-44
422c4: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
422c8: 242e 0008 movel %fp@(8),%d2
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(
422cc: 49f9 0004 deac lea 4deac <strlen>,%a4
422d2: 260e movel %fp,%d3
422d4: 0683 ffff ffec addil #-20,%d3
422da: 2f02 movel %d2,%sp@-
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
422dc: 246e 000c moveal %fp@(12),%a2
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(
422e0: 4e94 jsr %a4@
422e2: 7201 moveq #1,%d1
422e4: 2e81 movel %d1,%sp@
422e6: 2f03 movel %d3,%sp@-
422e8: 42a7 clrl %sp@-
422ea: 2f00 movel %d0,%sp@-
422ec: 2f02 movel %d2,%sp@-
422ee: 4eb9 0004 2726 jsr 42726 <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
422f4: 206e fff8 moveal %fp@(-8),%a0
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(
422f8: 2800 movel %d0,%d4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
422fa: 2f03 movel %d3,%sp@-
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
422fc: 266e ffec moveal %fp@(-20),%a3
node_type = (*loc.ops->node_type_h)( &loc );
42300: 2068 0010 moveal %a0@(16),%a0
42304: 4e90 jsr %a0@
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
42306: 4fef 0018 lea %sp@(24),%sp
4230a: 4a84 tstl %d4
4230c: 6606 bnes 42314 <rtems_io_lookup_name+0x54> <== NEVER TAKEN
4230e: 7202 moveq #2,%d1
42310: b280 cmpl %d0,%d1
42312: 6710 beqs 42324 <rtems_io_lookup_name+0x64>
rtems_filesystem_freenode( &loc );
42314: 486e ffec pea %fp@(-20)
42318: 4eb9 0004 281c jsr 4281c <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
4231e: 588f addql #4,%sp
42320: 700d moveq #13,%d0
42322: 6022 bras 42346 <rtems_io_lookup_name+0x86>
}
device_info->device_name = (char *) name;
42324: 2482 movel %d2,%a2@
device_info->device_name_length = strlen( name );
42326: 2f02 movel %d2,%sp@-
42328: 4e94 jsr %a4@
device_info->major = the_jnode->info.device.major;
4232a: 256b 004c 0008 movel %a3@(76),%a2@(8)
device_info->minor = the_jnode->info.device.minor;
42330: 256b 0050 000c movel %a3@(80),%a2@(12)
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
42336: 2540 0004 movel %d0,%a2@(4)
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
4233a: 2e83 movel %d3,%sp@
4233c: 4eb9 0004 281c jsr 4281c <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
42342: 588f addql #4,%sp
42344: 4280 clrl %d0
}
42346: 4cee 1c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a4
4234c: 4e5e unlk %fp <== NOT EXECUTED
00042290 <rtems_io_register_name>:
rtems_status_code rtems_io_register_name(
const char *device_name,
rtems_device_major_number major,
rtems_device_minor_number minor
)
{
42290: 4e56 0000 linkw %fp,#0
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
42294: 222e 0010 movel %fp@(16),%d1
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
42298: 202e 000c movel %fp@(12),%d0
int status;
dev_t dev;
dev = rtems_filesystem_make_dev_t( major, minor );
status = mknod( device_name, 0777 | S_IFCHR, dev );
4229c: 2f01 movel %d1,%sp@-
4229e: 2f00 movel %d0,%sp@-
422a0: 4878 21ff pea 21ff <D_MAX_EXP+0x1a00>
422a4: 2f2e 0008 movel %fp@(8),%sp@-
422a8: 4eb9 0004 2be4 jsr 42be4 <mknod>
/* this is the only error returned by the old version */
if ( status )
422ae: 4fef 0010 lea %sp@(16),%sp
422b2: 4a80 tstl %d0
422b4: 6704 beqs 422ba <rtems_io_register_name+0x2a> <== ALWAYS TAKEN
return RTEMS_TOO_MANY;
422b6: 7005 moveq #5,%d0 <== NOT EXECUTED
422b8: 6002 bras 422bc <rtems_io_register_name+0x2c> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
422ba: 4280 clrl %d0
}
422bc: 4e5e unlk %fp <== NOT EXECUTED
00047cd0 <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)
{
47cd0: 4e56 fff0 linkw %fp,#-16
47cd4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
47cd8: 286e 0008 moveal %fp@(8),%a4
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
47cdc: 4a8c tstl %a4
47cde: 673c beqs 47d1c <rtems_iterate_over_all_threads+0x4c><== NEVER TAKEN
47ce0: 45f9 0006 787c lea 6787c <_Objects_Information_table+0x4>,%a2
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
47ce6: 205a moveal %a2@+,%a0
47ce8: 4a88 tstl %a0
47cea: 6728 beqs 47d14 <rtems_iterate_over_all_threads+0x44><== NEVER TAKEN
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
47cec: 2668 0004 moveal %a0@(4),%a3
if ( !information )
47cf0: 4a8b tstl %a3
47cf2: 6720 beqs 47d14 <rtems_iterate_over_all_threads+0x44>
47cf4: 7401 moveq #1,%d2
47cf6: 6012 bras 47d0a <rtems_iterate_over_all_threads+0x3a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
47cf8: 206b 0018 moveal %a3@(24),%a0
47cfc: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !the_thread )
47d00: 6706 beqs 47d08 <rtems_iterate_over_all_threads+0x38><== NEVER TAKEN
continue;
(*routine)(the_thread);
47d02: 2f00 movel %d0,%sp@-
47d04: 4e94 jsr %a4@
47d06: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
47d08: 5282 addql #1,%d2
47d0a: 4280 clrl %d0
47d0c: 302b 000e movew %a3@(14),%d0
47d10: b082 cmpl %d2,%d0
47d12: 64e4 bccs 47cf8 <rtems_iterate_over_all_threads+0x28>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
47d14: b5fc 0006 7888 cmpal #424072,%a2
47d1a: 66ca bnes 47ce6 <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
47d1c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
47d22: 4e5e unlk %fp
...
00049a46 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
49a46: 4e56 0000 linkw %fp,#0
49a4a: 2f0a movel %a2,%sp@-
49a4c: 246e 0008 moveal %fp@(8),%a2
rtems_libio_lock();
49a50: 4eba fea2 jsr %pc@(498f4 <rtems_libio_lock>)
if (iop->sem)
49a54: 202a 002c movel %a2@(44),%d0
49a58: 670a beqs 49a64 <rtems_libio_free+0x1e> <== NEVER TAKEN
rtems_semaphore_delete(iop->sem);
49a5a: 2f00 movel %d0,%sp@-
49a5c: 4eb9 0004 56d4 jsr 456d4 <rtems_semaphore_delete>
49a62: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
49a64: 41f9 0005 d7f8 lea 5d7f8 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
49a6a: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
49a70: 2550 0034 movel %a0@,%a2@(52)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
49a74: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
49a78: 23ca 0005 d7f8 movel %a2,5d7f8 <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
49a7e: 246e fffc moveal %fp@(-4),%a2
49a82: 4e5e unlk %fp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
rtems_libio_unlock();
49a84: 6000 fe8a braw 49910 <rtems_libio_unlock>
0004293c <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
4293c: 4e56 0000 linkw %fp,#0
42940: 2f02 movel %d2,%sp@-
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
42942: 2439 0005 c0e4 movel 5c0e4 <rtems_libio_number_iops>,%d2
42948: 6744 beqs 4298e <rtems_libio_init+0x52> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
4294a: 4878 0038 pea 38 <DBL_MANT_DIG+0x3>
4294e: 2f02 movel %d2,%sp@-
42950: 4eb9 0004 2444 jsr 42444 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42956: 508f addql #8,%sp
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42958: 23c0 0005 d7f4 movel %d0,5d7f4 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
4295e: 6606 bnes 42966 <rtems_libio_init+0x2a>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
42960: 4878 001a pea 1a <OPER2+0x6>
42964: 604e bras 429b4 <rtems_libio_init+0x78>
iop = rtems_libio_iop_freelist = rtems_libio_iops;
42966: 23c0 0005 d7f8 movel %d0,5d7f8 <rtems_libio_iop_freelist>
4296c: 2040 moveal %d0,%a0
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
4296e: 4281 clrl %d1
42970: 6004 bras 42976 <rtems_libio_init+0x3a>
iop->data1 = iop + 1;
42972: 2148 fffc movel %a0,%a0@(-4)
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
42976: 5281 addql #1,%d1
42978: 41e8 0038 lea %a0@(56),%a0
4297c: b481 cmpl %d1,%d2
4297e: 62f2 bhis 42972 <rtems_libio_init+0x36>
iop->data1 = iop + 1;
iop->data1 = NULL;
42980: 2202 movel %d2,%d1
42982: 2040 moveal %d0,%a0
42984: e789 lsll #3,%d1
42986: ed8a lsll #6,%d2
42988: 9481 subl %d1,%d2
4298a: 42b0 28fc clrl %a0@(fffffffc,%d2:l)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
4298e: 4879 0005 d7fc pea 5d7fc <rtems_libio_semaphore>
42994: 42a7 clrl %sp@-
42996: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
4299a: 4878 0001 pea 1 <ADD>
4299e: 2f3c 4c42 494f movel #1279412559,%sp@-
429a4: 4eb9 0004 5538 jsr 45538 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
429aa: 4fef 0014 lea %sp@(20),%sp
429ae: 4a80 tstl %d0
429b0: 6708 beqs 429ba <rtems_libio_init+0x7e> <== ALWAYS TAKEN
rtems_fatal_error_occurred( rc );
429b2: 2f00 movel %d0,%sp@- <== NOT EXECUTED
429b4: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred>
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
429ba: 2279 0005 c0e0 moveal 5c0e0 <rtems_fs_init_helper>,%a1
429c0: 4a89 tstl %a1
429c2: 6708 beqs 429cc <rtems_libio_init+0x90> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
429c4: 242e fffc movel %fp@(-4),%d2
429c8: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
429ca: 4ed1 jmp %a1@
}
429cc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
429d0: 4e5e unlk %fp <== NOT EXECUTED
00043ac8 <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
43ac8: 4e56 ffd8 linkw %fp,#-40
43acc: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
43ad0: 486e fffc pea %fp@(-4)
43ad4: 42a7 clrl %sp@-
43ad6: 42a7 clrl %sp@-
43ad8: 4eb9 0004 62f0 jsr 462f0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
43ade: 4fef 000c lea %sp@(12),%sp
{
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
43ae2: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) return sc;
43ae4: 6600 00da bnew 43bc0 <rtems_libio_set_private_env+0xf8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
43ae8: 203c 0005 df44 movel #384836,%d0
43aee: b0b9 0005 c908 cmpl 5c908 <rtems_current_user_env>,%d0
43af4: 6644 bnes 43b3a <rtems_libio_set_private_env+0x72>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
43af6: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
43afa: 4eb9 0004 30a4 jsr 430a4 <malloc>
if (!tmp)
43b00: 588f addql #4,%sp
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
43b02: 2600 movel %d0,%d3
if (!tmp)
43b04: 6700 00b8 beqw 43bbe <rtems_libio_set_private_env+0xf6>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
43b08: 487a ff76 pea %pc@(43a80 <free_user_env>)
43b0c: 4879 0005 c908 pea 5c908 <rtems_current_user_env>
43b12: 42a7 clrl %sp@-
43b14: 4eb9 0004 6468 jsr 46468 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
43b1a: 4fef 000c lea %sp@(12),%sp
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
43b1e: 2440 moveal %d0,%a2
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
43b20: 4a80 tstl %d0
43b22: 6710 beqs 43b34 <rtems_libio_set_private_env+0x6c><== ALWAYS TAKEN
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
43b24: 2f03 movel %d3,%sp@- <== NOT EXECUTED
return sc;
43b26: 240a movel %a2,%d2 <== NOT EXECUTED
);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
43b28: 4eb9 0004 2b7c jsr 42b7c <free> <== NOT EXECUTED
return sc;
43b2e: 588f addql #4,%sp <== NOT EXECUTED
43b30: 6000 008e braw 43bc0 <rtems_libio_set_private_env+0xf8><== NOT EXECUTED
}
rtems_current_user_env = tmp;
43b34: 23c3 0005 c908 movel %d3,5c908 <rtems_current_user_env>
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
43b3a: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
43b3e: 45f9 0004 da7c lea 4da7c <memcpy>,%a2
43b44: 4879 0005 df44 pea 5df44 <rtems_global_user_env>
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
43b4a: 260e movel %fp,%d3
43b4c: 0683 ffff ffe8 addil #-24,%d3
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
43b52: 2679 0005 c908 moveal 5c908 <rtems_current_user_env>,%a3
43b58: 2f0b movel %a3,%sp@-
43b5a: 4e92 jsr %a2@
rtems_current_user_env->task_id=task_id; /* mark the local values*/
43b5c: 26ae fffc movel %fp@(-4),%a3@
* what we are trying to do here is forking off
* clones. The reason is a pathloc can be allocated by the
* file system and needs to be freed when deleting the environment.
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
43b60: 47f9 0004 2a72 lea 42a72 <rtems_filesystem_evaluate_path>,%a3
43b66: 42a7 clrl %sp@-
43b68: 2f03 movel %d3,%sp@-
43b6a: 42a7 clrl %sp@-
43b6c: 4878 0001 pea 1 <ADD>
43b70: 4879 0005 b442 pea 5b442 <IMFS_ops+0x48>
43b76: 4e93 jsr %a3@
rtems_filesystem_root = loc;
43b78: 4fef 0020 lea %sp@(32),%sp
43b7c: 4878 0014 pea 14 <OPER2>
43b80: 2079 0005 c908 moveal 5c908 <rtems_current_user_env>,%a0
43b86: 41e8 0018 lea %a0@(24),%a0
43b8a: 2f03 movel %d3,%sp@-
43b8c: 2f08 movel %a0,%sp@-
43b8e: 4e92 jsr %a2@
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
43b90: 42a7 clrl %sp@-
43b92: 2f03 movel %d3,%sp@-
43b94: 42a7 clrl %sp@-
43b96: 4878 0001 pea 1 <ADD>
43b9a: 4879 0005 b442 pea 5b442 <IMFS_ops+0x48>
43ba0: 4e93 jsr %a3@
rtems_filesystem_current = loc;
43ba2: 4fef 0020 lea %sp@(32),%sp
43ba6: 4878 0014 pea 14 <OPER2>
43baa: 2039 0005 c908 movel 5c908 <rtems_current_user_env>,%d0
43bb0: 5880 addql #4,%d0
43bb2: 2f03 movel %d3,%sp@-
43bb4: 2f00 movel %d0,%sp@-
43bb6: 4e92 jsr %a2@
return RTEMS_SUCCESSFUL;
43bb8: 4fef 000c lea %sp@(12),%sp
43bbc: 6002 bras 43bc0 <rtems_libio_set_private_env+0xf8>
/* 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)
return RTEMS_NO_MEMORY;
43bbe: 741a moveq #26,%d2 <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
43bc0: 2002 movel %d2,%d0
43bc2: 4cee 0c0c ffd8 moveml %fp@(-40),%d2-%d3/%a2-%a3
43bc8: 4e5e unlk %fp <== NOT EXECUTED
00043bcc <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
43bcc: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
43bd0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_status_code sc;
rtems_user_env_t * shared_user_env;
rtems_id current_task_id;
sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id);
43bd2: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
43bd6: 42a7 clrl %sp@- <== NOT EXECUTED
43bd8: 42a7 clrl %sp@- <== NOT EXECUTED
43bda: 4eb9 0004 62f0 jsr 462f0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
43be0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
43be4: 4a80 tstl %d0 <== NOT EXECUTED
43be6: 667a bnes 43c62 <rtems_libio_share_private_env+0x96><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
43be8: 2479 0005 c908 moveal 5c908 <rtems_current_user_env>,%a2 <== NOT EXECUTED
43bee: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
43bf2: b092 cmpl %a2@,%d0 <== NOT EXECUTED
43bf4: 661e bnes 43c14 <rtems_libio_share_private_env+0x48><== NOT EXECUTED
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
43bf6: 4879 0005 c908 pea 5c908 <rtems_current_user_env> <== NOT EXECUTED
43bfc: 42a7 clrl %sp@- <== NOT EXECUTED
43bfe: 4eb9 0004 64fc jsr 464fc <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
43c04: 508f addql #8,%sp <== NOT EXECUTED
43c06: 4a80 tstl %d0 <== NOT EXECUTED
43c08: 6658 bnes 43c62 <rtems_libio_share_private_env+0x96><== NOT EXECUTED
free_user_env(tmp);
43c0a: 2f0a movel %a2,%sp@- <== NOT EXECUTED
43c0c: 4eba fe72 jsr %pc@(43a80 <free_user_env>) <== NOT EXECUTED
43c10: 588f addql #4,%sp <== NOT EXECUTED
43c12: 601c bras 43c30 <rtems_libio_share_private_env+0x64><== NOT EXECUTED
} else {
sc = rtems_task_variable_get(
43c14: 486e fffc pea %fp@(-4) <== NOT EXECUTED
43c18: 4879 0005 c908 pea 5c908 <rtems_current_user_env> <== NOT EXECUTED
43c1e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
43c22: 4eb9 0004 6570 jsr 46570 <rtems_task_variable_get> <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
43c28: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
43c2c: 4a80 tstl %d0 <== NOT EXECUTED
43c2e: 6626 bnes 43c56 <rtems_libio_share_private_env+0x8a><== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
43c30: 487a fe4e pea %pc@(43a80 <free_user_env>) <== NOT EXECUTED
43c34: 4879 0005 c908 pea 5c908 <rtems_current_user_env> <== NOT EXECUTED
43c3a: 42a7 clrl %sp@- <== NOT EXECUTED
43c3c: 4eb9 0004 6468 jsr 46468 <rtems_task_variable_add> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
43c42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
43c46: 4a80 tstl %d0 <== NOT EXECUTED
43c48: 660c bnes 43c56 <rtems_libio_share_private_env+0x8a><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
43c4a: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
43c4e: 23d0 0005 c908 movel %a0@,5c908 <rtems_current_user_env> <== NOT EXECUTED
/* increase the reference count */
#ifdef HAVE_USERENV_REFCNT
rtems_current_user_env->refcnt++;
#endif
return RTEMS_SUCCESSFUL;
43c54: 600c bras 43c62 <rtems_libio_share_private_env+0x96><== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
43c56: 223c 0005 df44 movel #384836,%d1 <== NOT EXECUTED
43c5c: 23c1 0005 c908 movel %d1,5c908 <rtems_current_user_env> <== NOT EXECUTED
return sc;
}
43c62: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED
43c66: 4e5e unlk %fp <== NOT EXECUTED
...
00049966 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
49966: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
49968: 4e56 0000 linkw %fp,#0
4996c: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
49970: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
49972: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
49974: 7406 moveq #6,%d2
49976: b480 cmpl %d0,%d2
49978: 6710 beqs 4998a <rtems_libio_to_fcntl_flags+0x24><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4997a: 0801 0001 btst #1,%d1
4997e: 660e bnes 4998e <rtems_libio_to_fcntl_flags+0x28><== ALWAYS TAKEN
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
49980: 44c1 movew %d1,%ccr <== NOT EXECUTED
49982: 57c0 seq %d0 <== NOT EXECUTED
49984: 49c0 extbl %d0 <== NOT EXECUTED
49986: 4480 negl %d0 <== NOT EXECUTED
49988: 6006 bras 49990 <rtems_libio_to_fcntl_flags+0x2a><== NOT EXECUTED
4998a: 7002 moveq #2,%d0 <== NOT EXECUTED
4998c: 6002 bras 49990 <rtems_libio_to_fcntl_flags+0x2a><== NOT EXECUTED
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
fcntl_flags |= O_RDONLY;
4998e: 4280 clrl %d0
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
49990: 0801 0000 btst #0,%d1
49994: 6704 beqs 4999a <rtems_libio_to_fcntl_flags+0x34>
fcntl_flags |= O_NONBLOCK;
49996: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4999a: 0801 0009 btst #9,%d1
4999e: 6704 beqs 499a4 <rtems_libio_to_fcntl_flags+0x3e>
fcntl_flags |= O_APPEND;
499a0: 7408 moveq #8,%d2
499a2: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
499a4: 0801 000a btst #10,%d1
499a8: 6704 beqs 499ae <rtems_libio_to_fcntl_flags+0x48>
fcntl_flags |= O_CREAT;
499aa: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
499ae: 241f movel %sp@+,%d2
499b0: 4e5e unlk %fp <== NOT EXECUTED
00046130 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
46130: 4e56 fffc linkw %fp,#-4
46134: 2f03 movel %d3,%sp@-
46136: 2f02 movel %d2,%sp@-
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
46138: 486e fffc pea %fp@(-4)
4613c: 2f2e 0008 movel %fp@(8),%sp@-
46140: 2f39 0006 10d0 movel 610d0 <RTEMS_Malloc_Heap>,%sp@-
46146: 4eb9 0004 b400 jsr 4b400 <_Protected_heap_Get_block_size>
4614c: 4fef 000c lea %sp@(12),%sp
46150: 4a00 tstb %d0
46152: 671a beqs 4616e <rtems_malloc_statistics_at_free+0x3e><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
46154: 262e fffc movel %fp@(-4),%d3
46158: 4282 clrl %d2
4615a: d7b9 0006 30f0 addl %d3,630f0 <rtems_malloc_statistics+0x28>
46160: 2039 0006 30ec movel 630ec <rtems_malloc_statistics+0x24>,%d0
46166: d182 addxl %d2,%d0
46168: 23c0 0006 30ec movel %d0,630ec <rtems_malloc_statistics+0x24>
}
}
4616e: 242e fff4 movel %fp@(-12),%d2
46172: 262e fff8 movel %fp@(-8),%d3
46176: 4e5e unlk %fp <== NOT EXECUTED
0004617a <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
4617a: 4e56 fffc linkw %fp,#-4
4617e: 202e 0008 movel %fp@(8),%d0
46182: 2f03 movel %d3,%sp@-
uintptr_t actual_size = 0;
46184: 42ae fffc clrl %fp@(-4)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
46188: 2f02 movel %d2,%sp@-
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
4618a: 4a80 tstl %d0
4618c: 674c beqs 461da <rtems_malloc_statistics_at_malloc+0x60><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
4618e: 486e fffc pea %fp@(-4)
MSBUMP(lifetime_allocated, actual_size);
46192: 4282 clrl %d2
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
46194: 2f00 movel %d0,%sp@-
46196: 2f39 0006 10d0 movel 610d0 <RTEMS_Malloc_Heap>,%sp@-
4619c: 4eb9 0004 b400 jsr 4b400 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
461a2: 262e fffc movel %fp@(-4),%d3
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
461a6: 4fef 000c lea %sp@(12),%sp
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
461aa: 2039 0006 30e4 movel 630e4 <rtems_malloc_statistics+0x1c>,%d0
461b0: d6b9 0006 30e8 addl 630e8 <rtems_malloc_statistics+0x20>,%d3
461b6: d580 addxl %d0,%d2
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
461b8: 2003 movel %d3,%d0
461ba: 90b9 0006 30f0 subl 630f0 <rtems_malloc_statistics+0x28>,%d0
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
461c0: 23c2 0006 30e4 movel %d2,630e4 <rtems_malloc_statistics+0x1c>
461c6: 23c3 0006 30e8 movel %d3,630e8 <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
461cc: b0b9 0006 30e0 cmpl 630e0 <rtems_malloc_statistics+0x18>,%d0
461d2: 6306 blss 461da <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
461d4: 23c0 0006 30e0 movel %d0,630e0 <rtems_malloc_statistics+0x18>
}
461da: 242e fff4 movel %fp@(-12),%d2
461de: 262e fff8 movel %fp@(-8),%d3
461e2: 4e5e unlk %fp <== NOT EXECUTED
0004d2b4 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4d2b4: 4e56 0000 linkw %fp,#0
4d2b8: 2f0a movel %a2,%sp@-
4d2ba: 246e 0008 moveal %fp@(8),%a2
4d2be: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4d2c0: 4a8a tstl %a2
4d2c2: 6754 beqs 4d318 <rtems_memalign+0x64>
return EINVAL;
*pointer = NULL;
4d2c4: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4d2c6: 7003 moveq #3,%d0
4d2c8: b0b9 0006 1162 cmpl 61162 <_System_state_Current>,%d0
4d2ce: 660a bnes 4d2da <rtems_memalign+0x26> <== NEVER TAKEN
!malloc_is_system_state_OK() )
4d2d0: 4eb9 0004 3688 jsr 43688 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4d2d6: 4a00 tstb %d0
4d2d8: 673e beqs 4d318 <rtems_memalign+0x64> <== NEVER TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4d2da: 4eb9 0004 36c6 jsr 436c6 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4d2e0: 42a7 clrl %sp@-
4d2e2: 2f2e 000c movel %fp@(12),%sp@-
4d2e6: 2f2e 0010 movel %fp@(16),%sp@-
4d2ea: 2f39 0005 f6f0 movel 5f6f0 <RTEMS_Malloc_Heap>,%sp@-
4d2f0: 4eb9 0004 806c jsr 4806c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4d2f6: 4fef 0010 lea %sp@(16),%sp
4d2fa: 2400 movel %d0,%d2
4d2fc: 671e beqs 4d31c <rtems_memalign+0x68>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4d2fe: 2079 0005 fd96 moveal 5fd96 <rtems_malloc_statistics_helpers>,%a0
4d304: 4a88 tstl %a0
4d306: 670a beqs 4d312 <rtems_memalign+0x5e>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4d308: 2f0a movel %a2,%sp@-
4d30a: 2068 0004 moveal %a0@(4),%a0
4d30e: 4e90 jsr %a0@
4d310: 588f addql #4,%sp
*pointer = return_this;
4d312: 2482 movel %d2,%a2@
return 0;
4d314: 4280 clrl %d0
4d316: 6006 bras 4d31e <rtems_memalign+0x6a>
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
return EINVAL;
4d318: 7016 moveq #22,%d0
4d31a: 6002 bras 4d31e <rtems_memalign+0x6a>
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4d31c: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4d31e: 242e fff8 movel %fp@(-8),%d2
4d322: 246e fffc moveal %fp@(-4),%a2
4d326: 4e5e unlk %fp
...
0004bcf8 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4bcf8: 4e56 ff90 linkw %fp,#-112
4bcfc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int success = 0;
char *dup_path = strdup(path);
4bd00: 2f2e 0008 movel %fp@(8),%sp@-
4bd04: 4eb9 0004 f2c4 jsr 4f2c4 <strdup>
if (dup_path != NULL) {
4bd0a: 588f addql #4,%sp
int
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
4bd0c: 2440 moveal %d0,%a2
if (dup_path != NULL) {
4bd0e: 4a80 tstl %d0
4bd10: 6700 0122 beqw 4be34 <rtems_mkdir+0x13c>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4bd14: 722f moveq #47,%d1
4bd16: 1012 moveb %a2@,%d0
4bd18: 49c0 extbl %d0
4bd1a: b280 cmpl %d0,%d1
4bd1c: 6606 bnes 4bd24 <rtems_mkdir+0x2c>
++p;
4bd1e: 47ea 0001 lea %a2@(1),%a3
4bd22: 6002 bras 4bd26 <rtems_mkdir+0x2e>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4bd24: 264a moveal %a2,%a3
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
if (stat(path, &sb) < 0) {
4bd26: 2c0e movel %fp,%d6
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4bd28: 2a4b moveal %a3,%a5
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4bd2a: 4283 clrl %d3
4bd2c: 7001 moveq #1,%d0
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4bd2e: 2e3c 0004 3dac movel #277932,%d7
if (errno == EEXIST || errno == EISDIR) {
4bd34: 283c 0004 e314 movel #320276,%d4
if (stat(path, &sb) < 0) {
4bd3a: 0686 ffff ffba addil #-70,%d6
4bd40: 2a3c 0004 be50 movel #310864,%d5
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4bd46: 49f9 0004 bef4 lea 4bef4 <umask>,%a4
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
4bd4c: 121d moveb %a5@+,%d1
4bd4e: 670e beqs 4bd5e <rtems_mkdir+0x66>
last = 1;
else if (p[0] != '/')
4bd50: 49c1 extbl %d1
4bd52: 742f moveq #47,%d2
4bd54: b481 cmpl %d1,%d2
4bd56: 6600 00b8 bnew 4be10 <rtems_mkdir+0x118>
4bd5a: 4281 clrl %d1
4bd5c: 6002 bras 4bd60 <rtems_mkdir+0x68>
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
4bd5e: 7201 moveq #1,%d1
else if (p[0] != '/')
continue;
*p = '\0';
4bd60: 4213 clrb %a3@
if (!last && p[1] == '\0')
4bd62: 4a81 tstl %d1
4bd64: 660a bnes 4bd70 <rtems_mkdir+0x78>
4bd66: 4a15 tstb %a5@
4bd68: 57c2 seq %d2
4bd6a: 49c2 extbl %d2
4bd6c: 4482 negl %d2
4bd6e: 6002 bras 4bd72 <rtems_mkdir+0x7a>
4bd70: 7401 moveq #1,%d2
last = 1;
if (first) {
4bd72: 4a80 tstl %d0
4bd74: 6712 beqs 4bd88 <rtems_mkdir+0x90>
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
4bd76: 42a7 clrl %sp@-
4bd78: 4e94 jsr %a4@
4bd7a: 2600 movel %d0,%d3
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
4bd7c: 0280 ffff ff3f andil #-193,%d0
4bd82: 2f00 movel %d0,%sp@-
4bd84: 4e94 jsr %a4@
4bd86: 508f addql #8,%sp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4bd88: 203c 0000 01ff movel #511,%d0
oumask = umask(0);
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
4bd8e: 4a82 tstl %d2
4bd90: 670a beqs 4bd9c <rtems_mkdir+0xa4>
(void)umask(oumask);
4bd92: 2f03 movel %d3,%sp@-
4bd94: 4e94 jsr %a4@
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4bd96: 202e 000c movel %fp@(12),%d0
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
4bd9a: 588f addql #4,%sp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4bd9c: 2f00 movel %d0,%sp@-
4bd9e: 2047 moveal %d7,%a0
4bda0: 2f0a movel %a2,%sp@-
4bda2: 4e90 jsr %a0@
4bda4: 508f addql #8,%sp
4bda6: 4a80 tstl %d0
4bda8: 6c5c bges 4be06 <rtems_mkdir+0x10e>
if (errno == EEXIST || errno == EISDIR) {
4bdaa: 2044 moveal %d4,%a0
4bdac: 4e90 jsr %a0@
4bdae: 7211 moveq #17,%d1
4bdb0: 2040 moveal %d0,%a0
4bdb2: b290 cmpl %a0@,%d1
4bdb4: 670c beqs 4bdc2 <rtems_mkdir+0xca> <== ALWAYS TAKEN
4bdb6: 2044 moveal %d4,%a0 <== NOT EXECUTED
4bdb8: 4e90 jsr %a0@ <== NOT EXECUTED
4bdba: 7215 moveq #21,%d1 <== NOT EXECUTED
4bdbc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bdbe: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4bdc0: 667e bnes 4be40 <rtems_mkdir+0x148> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
4bdc2: 2f06 movel %d6,%sp@-
4bdc4: 2045 moveal %d5,%a0
4bdc6: 2f0a movel %a2,%sp@-
4bdc8: 4e90 jsr %a0@
4bdca: 508f addql #8,%sp
4bdcc: 4a80 tstl %d0
4bdce: 6d70 blts 4be40 <rtems_mkdir+0x148> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
4bdd0: 202e ffc6 movel %fp@(-58),%d0
4bdd4: 0280 0000 f000 andil #61440,%d0
4bdda: 0c80 0000 4000 cmpil #16384,%d0
4bde0: 671e beqs 4be00 <rtems_mkdir+0x108>
4bde2: 41f9 0004 e314 lea 4e314 <__errno>,%a0
if (last)
4bde8: 4a82 tstl %d2
4bdea: 670a beqs 4bdf6 <rtems_mkdir+0xfe> <== NEVER TAKEN
errno = EEXIST;
4bdec: 4e90 jsr %a0@
4bdee: 7211 moveq #17,%d1
4bdf0: 2040 moveal %d0,%a0
4bdf2: 2081 movel %d1,%a0@
4bdf4: 602a bras 4be20 <rtems_mkdir+0x128>
else
errno = ENOTDIR;
4bdf6: 4e90 jsr %a0@ <== NOT EXECUTED
4bdf8: 2040 moveal %d0,%a0 <== NOT EXECUTED
4bdfa: 7014 moveq #20,%d0 <== NOT EXECUTED
4bdfc: 2080 movel %d0,%a0@ <== NOT EXECUTED
4bdfe: 6016 bras 4be16 <rtems_mkdir+0x11e> <== NOT EXECUTED
retval = 0;
break;
}
if (last)
4be00: 4a82 tstl %d2
4be02: 6642 bnes 4be46 <rtems_mkdir+0x14e>
4be04: 6004 bras 4be0a <rtems_mkdir+0x112>
} else {
retval = 0;
break;
}
}
if (!last)
4be06: 4a82 tstl %d2
4be08: 6640 bnes 4be4a <rtems_mkdir+0x152>
*p = '/';
4be0a: 4280 clrl %d0
4be0c: 16bc 002f moveb #47,%a3@
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4be10: 528b addql #1,%a3
4be12: 6000 ff38 braw 4bd4c <rtems_mkdir+0x54>
}
if (!last)
*p = '/';
}
if (!first && !last)
(void)umask(oumask);
4be16: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4be18: 4eb9 0004 bef4 jsr 4bef4 <umask> <== NOT EXECUTED
4be1e: 588f addql #4,%sp <== NOT EXECUTED
4be20: 4282 clrl %d2
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4be22: 2f0a movel %a2,%sp@-
4be24: 4eb9 0004 37b0 jsr 437b0 <free>
}
return success != 0 ? 0 : -1;
4be2a: 588f addql #4,%sp
4be2c: 4a82 tstl %d2
4be2e: 57c0 seq %d0
4be30: 49c0 extbl %d0
4be32: 6002 bras 4be36 <rtems_mkdir+0x13e>
4be34: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
4be36: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5
4be3c: 4e5e unlk %fp
4be3e: 4e75 rts
}
}
if (!last)
*p = '/';
}
if (!first && !last)
4be40: 4a82 tstl %d2 <== NOT EXECUTED
4be42: 67d2 beqs 4be16 <rtems_mkdir+0x11e> <== NOT EXECUTED
4be44: 60da bras 4be20 <rtems_mkdir+0x128> <== NOT EXECUTED
errno = ENOTDIR;
retval = 0;
break;
}
if (last)
retval = 2;
4be46: 7402 moveq #2,%d2
4be48: 60d8 bras 4be22 <rtems_mkdir+0x12a>
} else {
retval = 0;
break;
}
}
if (!last)
4be4a: 7401 moveq #1,%d2
4be4c: 60d4 bras 4be22 <rtems_mkdir+0x12a>
...
00042656 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
42656: 4e56 0000 linkw %fp,#0
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
4265a: 486e 000c pea %fp@(12)
4265e: 2f2e 0008 movel %fp@(8),%sp@-
42662: 2f3c 2000 0000 movel #536870912,%sp@-
42668: 4eba fe3e jsr %pc@(424a8 <rtems_verror>)
va_end(arglist);
rtems_error(0, "fatal error, exiting");
4266c: 4879 0005 ad56 pea 5ad56 <IMFS_ops+0x7e>
42672: 42a7 clrl %sp@-
42674: 4eb9 0004 25f4 jsr 425f4 <rtems_error>
_exit(errno);
4267a: 4eb9 0004 ca54 jsr 4ca54 <__errno>
42680: 2040 moveal %d0,%a0
42682: 2f10 movel %a0@,%sp@-
42684: 4eb9 0004 2fe4 jsr 42fe4 <_exit>
...
0004ffb4 <rtems_partition_delete>:
*/
rtems_status_code rtems_partition_delete(
rtems_id id
)
{
4ffb4: 4e56 fffc linkw %fp,#-4
4ffb8: 2f0b movel %a3,%sp@-
4ffba: 2f0a movel %a2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
4ffbc: 486e fffc pea %fp@(-4)
4ffc0: 2f2e 0008 movel %fp@(8),%sp@-
4ffc4: 4879 0007 63a2 pea 763a2 <_Partition_Information>
4ffca: 4eb9 0005 4608 jsr 54608 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
4ffd0: 4fef 000c lea %sp@(12),%sp
4ffd4: 2440 moveal %d0,%a2
4ffd6: 4aae fffc tstl %fp@(-4)
4ffda: 6638 bnes 50014 <rtems_partition_delete+0x60> <== NEVER TAKEN
4ffdc: 47f9 0005 4e6a lea 54e6a <_Thread_Enable_dispatch>,%a3
case OBJECTS_LOCAL:
if ( the_partition->number_of_used_blocks == 0 ) {
4ffe2: 4aaa 0020 tstl %a2@(32)
4ffe6: 6626 bnes 5000e <rtems_partition_delete+0x5a> <== NEVER TAKEN
_Objects_Close( &_Partition_Information, &the_partition->Object );
4ffe8: 2f00 movel %d0,%sp@-
4ffea: 4879 0007 63a2 pea 763a2 <_Partition_Information>
4fff0: 4eb9 0005 41fc jsr 541fc <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Partition_Free (
Partition_Control *the_partition
)
{
_Objects_Free( &_Partition_Information, &the_partition->Object );
4fff6: 2f0a movel %a2,%sp@-
4fff8: 4879 0007 63a2 pea 763a2 <_Partition_Information>
4fffe: 4eb9 0005 4474 jsr 54474 <_Objects_Free>
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
50004: 4e93 jsr %a3@
return RTEMS_SUCCESSFUL;
50006: 4fef 0010 lea %sp@(16),%sp
5000a: 4280 clrl %d0
5000c: 6008 bras 50016 <rtems_partition_delete+0x62>
}
_Thread_Enable_dispatch();
5000e: 4e93 jsr %a3@
return RTEMS_RESOURCE_IN_USE;
50010: 700c moveq #12,%d0
50012: 6002 bras 50016 <rtems_partition_delete+0x62>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
50014: 7004 moveq #4,%d0
}
50016: 246e fff4 moveal %fp@(-12),%a2
5001a: 266e fff8 moveal %fp@(-8),%a3
5001e: 4e5e unlk %fp
...
000500b8 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
500b8: 4e56 fffc linkw %fp,#-4
500bc: 2f0a movel %a2,%sp@-
500be: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
500c0: 486e fffc pea %fp@(-4)
500c4: 2f2e 0008 movel %fp@(8),%sp@-
500c8: 4879 0007 63a2 pea 763a2 <_Partition_Information>
500ce: 242e 000c movel %fp@(12),%d2
500d2: 4eb9 0005 4608 jsr 54608 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
500d8: 4fef 000c lea %sp@(12),%sp
500dc: 2440 moveal %d0,%a2
500de: 4aae fffc tstl %fp@(-4)
500e2: 663e bnes 50122 <rtems_partition_return_buffer+0x6a>
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
500e4: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
500e8: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
500ec: b082 cmpl %d2,%d0
500ee: 6240 bhis 50130 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
500f0: d280 addl %d0,%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
500f2: b282 cmpl %d2,%d1
500f4: 653a bcss 50130 <rtems_partition_return_buffer+0x78><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
500f6: 2202 movel %d2,%d1
500f8: 9280 subl %d0,%d1
500fa: 2001 movel %d1,%d0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
500fc: 4c6a 0001 0018 remul %a2@(24),%d1,%d0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
50102: 4a81 tstl %d1
50104: 662a bnes 50130 <rtems_partition_return_buffer+0x78>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
50106: 2f02 movel %d2,%sp@-
50108: 486a 0024 pea %a2@(36)
5010c: 4eb9 0005 2c64 jsr 52c64 <_Chain_Append>
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
50112: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
50116: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5011c: 508f addql #8,%sp
5011e: 4280 clrl %d0
50120: 6002 bras 50124 <rtems_partition_return_buffer+0x6c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
50122: 7004 moveq #4,%d0
}
50124: 242e fff4 movel %fp@(-12),%d2
50128: 246e fff8 moveal %fp@(-8),%a2
5012c: 4e5e unlk %fp
5012e: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
50130: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_INVALID_ADDRESS;
50136: 7009 moveq #9,%d0
50138: 60ea bras 50124 <rtems_partition_return_buffer+0x6c>
...
00042396 <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
42396: 4e56 ffec linkw %fp,#-20
4239a: 202e 000c movel %fp@(12),%d0
4239e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
423a2: 246e 0008 moveal %fp@(8),%a2
int i, mod, max;
if ( !length ) return;
423a6: 4a80 tstl %d0
423a8: 674e beqs 423f8 <rtems_print_buffer+0x62>
mod = length % 16;
423aa: 2400 movel %d0,%d2
423ac: 0282 8000 000f andil #-2147483633,%d2
423b2: 6c08 bges 423bc <rtems_print_buffer+0x26> <== ALWAYS TAKEN
423b4: 5382 subql #1,%d2 <== NOT EXECUTED
423b6: 72f0 moveq #-16,%d1 <== NOT EXECUTED
423b8: 8481 orl %d1,%d2 <== NOT EXECUTED
423ba: 5282 addql #1,%d2 <== NOT EXECUTED
max = length - mod;
423bc: 2800 movel %d0,%d4
423be: 9882 subl %d2,%d4
for ( i=0 ; i<max ; i+=16 )
423c0: 4283 clrl %d3
Dump_Line( &buffer[ i ], 16 );
423c2: 47fa fec0 lea %pc@(42284 <Dump_Line>),%a3
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
423c6: 6012 bras 423da <rtems_print_buffer+0x44>
Dump_Line( &buffer[ i ], 16 );
423c8: 4878 0010 pea 10 <INVALID_OPERATION>
423cc: 4872 3800 pea %a2@(00000000,%d3:l)
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
423d0: 0683 0000 0010 addil #16,%d3
Dump_Line( &buffer[ i ], 16 );
423d6: 4e93 jsr %a3@
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
423d8: 508f addql #8,%sp
423da: b883 cmpl %d3,%d4
423dc: 6eea bgts 423c8 <rtems_print_buffer+0x32>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
423de: 4a82 tstl %d2
423e0: 6716 beqs 423f8 <rtems_print_buffer+0x62>
Dump_Line( &buffer[ max ], mod );
423e2: d5c4 addal %d4,%a2
423e4: 2d42 000c movel %d2,%fp@(12)
423e8: 2d4a 0008 movel %a2,%fp@(8)
}
423ec: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
423f2: 4e5e unlk %fp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
423f4: 6000 fe8e braw 42284 <Dump_Line>
}
423f8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
423fe: 4e5e unlk %fp
...
0004beb8 <rtems_rate_monotonic_get_status>:
rtems_status_code rtems_rate_monotonic_get_status(
rtems_id id,
rtems_rate_monotonic_period_status *status
)
{
4beb8: 4e56 ffec linkw %fp,#-20
4bebc: 2f0a movel %a2,%sp@-
4bebe: 246e 000c moveal %fp@(12),%a2
Objects_Locations location;
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
4bec2: 4a8a tstl %a2
4bec4: 6700 0092 beqw 4bf58 <rtems_rate_monotonic_get_status+0xa0>
4bec8: 486e fffc pea %fp@(-4)
4becc: 2f2e 0008 movel %fp@(8),%sp@-
4bed0: 4879 0005 f4dc pea 5f4dc <_Rate_monotonic_Information>
4bed6: 4eb9 0004 8474 jsr 48474 <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
4bedc: 4fef 000c lea %sp@(12),%sp
4bee0: 2040 moveal %d0,%a0
4bee2: 4aae fffc tstl %fp@(-4)
4bee6: 6674 bnes 4bf5c <rtems_rate_monotonic_get_status+0xa4><== NEVER TAKEN
case OBJECTS_LOCAL:
status->owner = the_period->owner->Object.id;
4bee8: 2268 0040 moveal %a0@(64),%a1
4beec: 24a9 0008 movel %a1@(8),%a2@
status->state = the_period->state;
4bef0: 2028 0038 movel %a0@(56),%d0
4bef4: 2540 0004 movel %d0,%a2@(4)
/*
* If the period is inactive, there is no information.
*/
if ( status->state == RATE_MONOTONIC_INACTIVE ) {
4bef8: 6612 bnes 4bf0c <rtems_rate_monotonic_get_status+0x54>
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timespec_Set_to_zero( &status->since_last_period );
4befa: 42aa 0008 clrl %a2@(8)
4befe: 42aa 000c clrl %a2@(12)
_Timespec_Set_to_zero( &status->executed_since_last_period );
4bf02: 42aa 0010 clrl %a2@(16)
4bf06: 42aa 0014 clrl %a2@(20)
4bf0a: 6042 bras 4bf4e <rtems_rate_monotonic_get_status+0x96>
} else {
/*
* Grab the current status.
*/
valid_status =
4bf0c: 486e fff4 pea %fp@(-12)
4bf10: 486e ffec pea %fp@(-20)
4bf14: 2f08 movel %a0,%sp@-
4bf16: 4eb9 0004 6298 jsr 46298 <_Rate_monotonic_Get_status>
_Rate_monotonic_Get_status(
the_period, &since_last_period, &executed
);
if (!valid_status) {
4bf1c: 4fef 000c lea %sp@(12),%sp
4bf20: 4a00 tstb %d0
4bf22: 660a bnes 4bf2e <rtems_rate_monotonic_get_status+0x76>
_Thread_Enable_dispatch();
4bf24: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
4bf2a: 700b moveq #11,%d0
4bf2c: 6030 bras 4bf5e <rtems_rate_monotonic_get_status+0xa6>
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_To_timespec(
4bf2e: 202e ffec movel %fp@(-20),%d0
4bf32: 222e fff0 movel %fp@(-16),%d1
4bf36: 2540 0008 movel %d0,%a2@(8)
4bf3a: 2541 000c movel %d1,%a2@(12)
&since_last_period, &status->since_last_period
);
_Timestamp_To_timespec(
4bf3e: 202e fff4 movel %fp@(-12),%d0
4bf42: 222e fff8 movel %fp@(-8),%d1
4bf46: 2540 0010 movel %d0,%a2@(16)
4bf4a: 2541 0014 movel %d1,%a2@(20)
status->since_last_period = since_last_period;
status->executed_since_last_period = executed;
#endif
}
_Thread_Enable_dispatch();
4bf4e: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4bf54: 4280 clrl %d0
4bf56: 6006 bras 4bf5e <rtems_rate_monotonic_get_status+0xa6>
Rate_monotonic_Period_time_t since_last_period;
Rate_monotonic_Control *the_period;
bool valid_status;
if ( !status )
return RTEMS_INVALID_ADDRESS;
4bf58: 7009 moveq #9,%d0
4bf5a: 6002 bras 4bf5e <rtems_rate_monotonic_get_status+0xa6>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4bf5c: 7004 moveq #4,%d0
}
4bf5e: 246e ffe8 moveal %fp@(-24),%a2
4bf62: 4e5e unlk %fp
...
000464a2 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
464a2: 4e56 ffec linkw %fp,#-20
464a6: 48d7 041c moveml %d2-%d4/%a2,%sp@
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
464aa: 486e fffc pea %fp@(-4)
464ae: 262e 0008 movel %fp@(8),%d3
464b2: 2f03 movel %d3,%sp@-
464b4: 4879 0005 f4dc pea 5f4dc <_Rate_monotonic_Information>
464ba: 242e 000c movel %fp@(12),%d2
464be: 4eb9 0004 8474 jsr 48474 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
464c4: 4fef 000c lea %sp@(12),%sp
464c8: 2440 moveal %d0,%a2
464ca: 4aae fffc tstl %fp@(-4)
464ce: 6600 0150 bnew 46620 <rtems_rate_monotonic_period+0x17e>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
464d2: 2039 0005 fa68 movel 5fa68 <_Per_CPU_Information+0xc>,%d0
464d8: b0aa 0040 cmpl %a2@(64),%d0
464dc: 670c beqs 464ea <rtems_rate_monotonic_period+0x48>
_Thread_Enable_dispatch();
464de: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
464e4: 7417 moveq #23,%d2
464e6: 6000 013a braw 46622 <rtems_rate_monotonic_period+0x180>
}
if ( length == RTEMS_PERIOD_STATUS ) {
464ea: 4a82 tstl %d2
464ec: 6622 bnes 46510 <rtems_rate_monotonic_period+0x6e>
switch ( the_period->state ) {
464ee: 202a 0038 movel %a2@(56),%d0
464f2: 7204 moveq #4,%d1
464f4: b280 cmpl %d0,%d1
464f6: 650c bcss 46504 <rtems_rate_monotonic_period+0x62><== NEVER TAKEN
464f8: 41f9 0005 cc6a lea 5cc6a <CSWTCH.2>,%a0
464fe: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2
46502: 6002 bras 46506 <rtems_rate_monotonic_period+0x64>
46504: 4282 clrl %d2 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
46506: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return( return_value );
4650c: 6000 0114 braw 46622 <rtems_rate_monotonic_period+0x180>
}
_ISR_Disable( level );
46510: 203c 0000 0700 movel #1792,%d0
46516: 40c4 movew %sr,%d4
46518: 8084 orl %d4,%d0
4651a: 46c0 movew %d0,%sr
switch ( the_period->state ) {
4651c: 202a 0038 movel %a2@(56),%d0
46520: 7202 moveq #2,%d1
46522: b280 cmpl %d0,%d1
46524: 675a beqs 46580 <rtems_rate_monotonic_period+0xde>
46526: 123c 0004 moveb #4,%d1
4652a: b280 cmpl %d0,%d1
4652c: 6700 00bc beqw 465ea <rtems_rate_monotonic_period+0x148>
46530: 4a80 tstl %d0
46532: 6600 00ec bnew 46620 <rtems_rate_monotonic_period+0x17e>
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
46536: 46c4 movew %d4,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
46538: 2f0a movel %a2,%sp@-
4653a: 4eb9 0004 6336 jsr 46336 <_Rate_monotonic_Initiate_statistics>
the_period->state = RATE_MONOTONIC_ACTIVE;
46540: 7002 moveq #2,%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46542: 223c 0004 686c movel #288876,%d1
46548: 2540 0038 movel %d0,%a2@(56)
4654c: 2541 002c movel %d1,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46550: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
the_watchdog->id = id;
46554: 2543 0030 movel %d3,%a2@(48)
the_watchdog->user_data = user_data;
46558: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4655c: 2542 003c movel %d2,%a2@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46560: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46564: 486a 0010 pea %a2@(16)
46568: 4879 0005 f69a pea 5f69a <_Watchdog_Ticks_chain>
4656e: 4eb9 0004 9d44 jsr 49d44 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
46574: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4657a: 4fef 000c lea %sp@(12),%sp
4657e: 6066 bras 465e6 <rtems_rate_monotonic_period+0x144>
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
46580: 2f0a movel %a2,%sp@-
46582: 4eb9 0004 63ae jsr 463ae <_Rate_monotonic_Update_statistics>
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
46588: 7001 moveq #1,%d0
the_period->next_length = length;
4658a: 2542 003c movel %d2,%a2@(60)
/*
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
4658e: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
46592: 46c4 movew %d4,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
46594: 2079 0005 fa68 moveal 5fa68 <_Per_CPU_Information+0xc>,%a0
4659a: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
465a0: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
465a4: 2f08 movel %a0,%sp@-
465a6: 4eb9 0004 9514 jsr 49514 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
465ac: 203c 0000 0700 movel #1792,%d0
465b2: 40c1 movew %sr,%d1
465b4: 8081 orl %d1,%d0
465b6: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
465b8: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
465ba: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
465be: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
465c2: 46c1 movew %d1,%sr
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
465c4: 7203 moveq #3,%d1
465c6: 4fef 000c lea %sp@(12),%sp
465ca: b280 cmpl %d0,%d1
465cc: 6612 bnes 465e0 <rtems_rate_monotonic_period+0x13e>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
465ce: 4878 4000 pea 4000 <D_MAX_EXP+0x3801>
465d2: 2f39 0005 fa68 movel 5fa68 <_Per_CPU_Information+0xc>,%sp@-
465d8: 4eb9 0004 8930 jsr 48930 <_Thread_Clear_state>
465de: 508f addql #8,%sp
_Thread_Enable_dispatch();
465e0: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
465e6: 4282 clrl %d2
465e8: 6038 bras 46622 <rtems_rate_monotonic_period+0x180>
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
465ea: 2f0a movel %a2,%sp@-
465ec: 4eb9 0004 63ae jsr 463ae <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
465f2: 46c4 movew %d4,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
465f4: 7002 moveq #2,%d0
the_period->next_length = length;
465f6: 2542 003c movel %d2,%a2@(60)
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
465fa: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
465fe: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46602: 486a 0010 pea %a2@(16)
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
46606: 7406 moveq #6,%d2
46608: 4879 0005 f69a pea 5f69a <_Watchdog_Ticks_chain>
4660e: 4eb9 0004 9d44 jsr 49d44 <_Watchdog_Insert>
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
46614: 4eb9 0004 8cd6 jsr 48cd6 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
4661a: 4fef 000c lea %sp@(12),%sp
4661e: 6002 bras 46622 <rtems_rate_monotonic_period+0x180>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
46620: 7404 moveq #4,%d2
}
46622: 2002 movel %d2,%d0
46624: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
4662a: 4e5e unlk %fp
...
00050cb0 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
50cb0: 4e56 fffc linkw %fp,#-4
50cb4: 2f03 movel %d3,%sp@-
50cb6: 262e 0010 movel %fp@(16),%d3
50cba: 2f02 movel %d2,%sp@-
50cbc: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
50cc0: 6768 beqs 50d2a <rtems_region_get_segment_size+0x7a>
return RTEMS_INVALID_ADDRESS;
if ( !size )
50cc2: 4a83 tstl %d3
50cc4: 6764 beqs 50d2a <rtems_region_get_segment_size+0x7a>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
50cc6: 2f39 0007 65b2 movel 765b2 <_RTEMS_Allocator_Mutex>,%sp@-
50ccc: 4eb9 0005 2bd0 jsr 52bd0 <_API_Mutex_Lock>
50cd2: 486e fffc pea %fp@(-4)
50cd6: 2f2e 0008 movel %fp@(8),%sp@-
50cda: 4879 0007 6416 pea 76416 <_Region_Information>
50ce0: 4eb9 0005 45d0 jsr 545d0 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
50ce6: 222e fffc movel %fp@(-4),%d1
50cea: 4fef 0010 lea %sp@(16),%sp
50cee: 6708 beqs 50cf8 <rtems_region_get_segment_size+0x48><== NEVER TAKEN
50cf0: 7001 moveq #1,%d0
50cf2: b081 cmpl %d1,%d0
50cf4: 661a bnes 50d10 <rtems_region_get_segment_size+0x60><== NEVER TAKEN
50cf6: 601c bras 50d14 <rtems_region_get_segment_size+0x64>
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
50cf8: 2f03 movel %d3,%sp@-
50cfa: 2040 moveal %d0,%a0
50cfc: 2f02 movel %d2,%sp@-
50cfe: 4868 0068 pea %a0@(104)
50d02: 4eb9 0005 404c jsr 5404c <_Heap_Size_of_alloc_area>
50d08: 4fef 000c lea %sp@(12),%sp
50d0c: 4a00 tstb %d0
50d0e: 6708 beqs 50d18 <rtems_region_get_segment_size+0x68><== NEVER TAKEN
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
50d10: 4282 clrl %d2
50d12: 6006 bras 50d1a <rtems_region_get_segment_size+0x6a>
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
50d14: 7404 moveq #4,%d2
50d16: 6002 bras 50d1a <rtems_region_get_segment_size+0x6a>
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
return_status = RTEMS_INVALID_ADDRESS;
50d18: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
50d1a: 2f39 0007 65b2 movel 765b2 <_RTEMS_Allocator_Mutex>,%sp@-
50d20: 4eb9 0005 2c30 jsr 52c30 <_API_Mutex_Unlock>
return return_status;
50d26: 588f addql #4,%sp
50d28: 6002 bras 50d2c <rtems_region_get_segment_size+0x7c>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
50d2a: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
50d2c: 2002 movel %d2,%d0
50d2e: 242e fff4 movel %fp@(-12),%d2
50d32: 262e fff8 movel %fp@(-8),%d3
50d36: 4e5e unlk %fp
...
00051310 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
51310: 4e56 fffc linkw %fp,#-4
51314: 2f03 movel %d3,%sp@-
51316: 2f02 movel %d2,%sp@-
51318: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
5131c: 677a beqs 51398 <rtems_signal_send+0x88>
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
5131e: 486e fffc pea %fp@(-4)
51322: 2f2e 0008 movel %fp@(8),%sp@-
51326: 4eb9 0005 4e90 jsr 54e90 <_Thread_Get>
switch ( location ) {
5132c: 508f addql #8,%sp
5132e: 4aae fffc tstl %fp@(-4)
51332: 6668 bnes 5139c <rtems_signal_send+0x8c>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
51334: 2240 moveal %d0,%a1
51336: 2069 010a moveal %a1@(266),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
5133a: 4aa8 000a tstl %a0@(10)
5133e: 674e beqs 5138e <rtems_signal_send+0x7e>
if ( asr->is_enabled ) {
51340: 4a28 0008 tstb %a0@(8)
51344: 672c beqs 51372 <rtems_signal_send+0x62>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
51346: 223c 0000 0700 movel #1792,%d1
5134c: 40c3 movew %sr,%d3
5134e: 8283 orl %d3,%d1
51350: 46c1 movew %d1,%sr
*signal_set |= signals;
51352: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
51356: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
51358: 4ab9 0007 69a4 tstl 769a4 <_Per_CPU_Information+0x8>
5135e: 6724 beqs 51384 <rtems_signal_send+0x74>
51360: b0b9 0007 69a8 cmpl 769a8 <_Per_CPU_Information+0xc>,%d0
51366: 661c bnes 51384 <rtems_signal_send+0x74> <== NEVER TAKEN
_Context_Switch_necessary = true;
51368: 7001 moveq #1,%d0
5136a: 13c0 0007 69b4 moveb %d0,769b4 <_Per_CPU_Information+0x18>
51370: 6012 bras 51384 <rtems_signal_send+0x74>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
51372: 203c 0000 0700 movel #1792,%d0
51378: 40c1 movew %sr,%d1
5137a: 8081 orl %d1,%d0
5137c: 46c0 movew %d0,%sr
*signal_set |= signals;
5137e: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
51382: 46c1 movew %d1,%sr
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
51384: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5138a: 4280 clrl %d0
5138c: 6010 bras 5139e <rtems_signal_send+0x8e>
}
_Thread_Enable_dispatch();
5138e: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_NOT_DEFINED;
51394: 700b moveq #11,%d0
51396: 6006 bras 5139e <rtems_signal_send+0x8e>
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
51398: 700a moveq #10,%d0
5139a: 6002 bras 5139e <rtems_signal_send+0x8e>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5139c: 7004 moveq #4,%d0
}
5139e: 242e fff4 movel %fp@(-12),%d2
513a2: 262e fff8 movel %fp@(-8),%d3
513a6: 4e5e unlk %fp
...
00041e1c <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
41e1c: 4e56 0000 linkw %fp,#0
41e20: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
41e24: 4aa8 0008 tstl %a0@(8)
41e28: 671c beqs 41e46 <rtems_stack_checker_begin_extension+0x2a><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
41e2a: 4878 0010 pea 10 <INVALID_OPERATION>
41e2e: 4879 0005 dc88 pea 5dc88 <Stack_check_Pattern>
41e34: 2068 00c2 moveal %a0@(194),%a0
41e38: 5088 addql #8,%a0
41e3a: 2f08 movel %a0,%sp@-
41e3c: 4eb9 0004 d6d8 jsr 4d6d8 <memcpy>
41e42: 4fef 000c lea %sp@(12),%sp
}
41e46: 4e5e unlk %fp <== NOT EXECUTED
00041df4 <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
41df4: 4e56 0000 linkw %fp,#0
41df8: 206e 000c moveal %fp@(12),%a0
Stack_check_Initialize();
if (the_thread)
41dfc: 4a88 tstl %a0
41dfe: 6716 beqs 41e16 <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
41e00: 2f28 00be movel %a0@(190),%sp@-
41e04: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
41e08: 2f28 00c2 movel %a0@(194),%sp@-
41e0c: 4eb9 0004 d748 jsr 4d748 <memset>
41e12: 4fef 000c lea %sp@(12),%sp
return true;
}
41e16: 4e5e unlk %fp
41e18: 7001 moveq #1,%d0 <== NOT EXECUTED
00041f58 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
41f58: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
41f5c: 2079 0005 e28c moveal 5e28c <_Per_CPU_Information+0xc>,%a0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
41f62: 2028 00c2 movel %a0@(194),%d0
41f66: b08e cmpl %fp,%d0
41f68: 6208 bhis 41f72 <rtems_stack_checker_is_blown+0x1a><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
41f6a: d0a8 00be addl %a0@(190),%d0
41f6e: b08e cmpl %fp,%d0
41f70: 6410 bccs 41f82 <rtems_stack_checker_is_blown+0x2a><== ALWAYS TAKEN
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
41f72: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
41f76: 2f39 0005 e28c movel 5e28c <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED
41f7c: 4eb9 0004 1e4a jsr 41e4a <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
41f82: 4e5e unlk %fp
41f84: 4200 clrb %d0 <== NOT EXECUTED
00041fee <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
41fee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
41ff2: 4879 0004 37a8 pea 437a8 <printk_plugin> <== NOT EXECUTED
41ff8: 42a7 clrl %sp@- <== NOT EXECUTED
41ffa: 4eb9 0004 1f88 jsr 41f88 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
42000: 508f addql #8,%sp <== NOT EXECUTED
}
42002: 4e5e unlk %fp <== NOT EXECUTED
...
00041f88 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
41f88: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
41f8c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
41f8e: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
41f92: 2f02 movel %d2,%sp@- <== NOT EXECUTED
41f94: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
41f98: 4a8a tstl %a2 <== NOT EXECUTED
41f9a: 6746 beqs 41fe2 <rtems_stack_checker_report_usage_with_plugin+0x5a><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
41f9c: 4879 0005 b102 pea 5b102 <IntUartPollCallbacks.6236+0x136> <== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
41fa2: 23c2 0005 d484 movel %d2,5d484 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
41fa8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
41faa: 23ca 0005 d488 movel %a2,5d488 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
41fb0: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
41fb2: 4879 0005 b119 pea 5b119 <IntUartPollCallbacks.6236+0x14d> <== NOT EXECUTED
41fb8: 2f02 movel %d2,%sp@- <== NOT EXECUTED
41fba: 4e92 jsr %a2@ <== NOT EXECUTED
" ID NAME LOW HIGH CURRENT AVAILABLE USED\n"
);
/* iterate over all threads and dump the usage */
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
41fbc: 4879 0004 1d28 pea 41d28 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
41fc2: 4eb9 0004 6c70 jsr 46c70 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
41fc8: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
41fcc: 4eb9 0004 1d28 jsr 41d28 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
41fd2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
41fd6: 42b9 0005 d484 clrl 5d484 <print_context> <== NOT EXECUTED
print_handler = NULL;
41fdc: 42b9 0005 d488 clrl 5d488 <print_handler> <== NOT EXECUTED
}
41fe2: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
41fe6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
41fea: 4e5e unlk %fp <== NOT EXECUTED
00041ef0 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
41ef0: 4e56 0000 linkw %fp,#0
41ef4: 2f0a movel %a2,%sp@-
41ef6: 246e 0008 moveal %fp@(8),%a2
Stack_Control *the_stack = &running->Start.Initial_stack;
void *pattern;
bool sp_ok;
bool pattern_ok = true;
pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern;
41efa: 222a 00c2 movel %a2@(194),%d1
41efe: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
41f00: 202a 00c2 movel %a2@(194),%d0
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
41f04: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
41f06: b08e cmpl %fp,%d0
41f08: 620c bhis 41f16 <rtems_stack_checker_switch_extension+0x26><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
41f0a: d0aa 00be addl %a2@(190),%d0
}
/*
* rtems_stack_checker_switch_extension
*/
void rtems_stack_checker_switch_extension(
41f0e: b08e cmpl %fp,%d0
41f10: 54c2 scc %d2
41f12: 4482 negl %d2
41f14: 6002 bras 41f18 <rtems_stack_checker_switch_extension+0x28>
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
return false;
41f16: 4202 clrb %d2 <== NOT EXECUTED
/*
* Check for an out of bounds stack pointer or an overwrite
*/
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
41f18: 4878 0010 pea 10 <INVALID_OPERATION>
41f1c: 4879 0005 dc88 pea 5dc88 <Stack_check_Pattern>
41f22: 2f01 movel %d1,%sp@-
41f24: 4eb9 0004 d658 jsr 4d658 <memcmp>
41f2a: 4fef 000c lea %sp@(12),%sp
41f2e: 4a80 tstl %d0
41f30: 57c0 seq %d0
41f32: 4480 negl %d0
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
41f34: 4a02 tstb %d2
41f36: 6704 beqs 41f3c <rtems_stack_checker_switch_extension+0x4c><== NEVER TAKEN
41f38: 4a00 tstb %d0
41f3a: 6610 bnes 41f4c <rtems_stack_checker_switch_extension+0x5c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
41f3c: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
41f42: 2f00 movel %d0,%sp@- <== NOT EXECUTED
41f44: 2f0a movel %a2,%sp@- <== NOT EXECUTED
41f46: 4eb9 0004 1e4a jsr 41e4a <Stack_check_report_blown_task> <== NOT EXECUTED
}
}
41f4c: 242e fff8 movel %fp@(-8),%d2
41f50: 246e fffc moveal %fp@(-4),%a2
41f54: 4e5e unlk %fp <== NOT EXECUTED
0004b65c <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b65c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED
4b660: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED
4b664: 282e 0008 movel %fp@(8),%d4 <== NOT EXECUTED
4b668: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
4b66c: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b670: 4a8a tstl %a2 <== NOT EXECUTED
4b672: 6768 beqs 4b6dc <rtems_string_to_double+0x80> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b674: 4eb9 0004 e384 jsr 4e384 <__errno> <== NOT EXECUTED
*n = 0;
4b67a: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b67c: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4b67e: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b680: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
4b682: 2480 movel %d0,%a2@ <== NOT EXECUTED
4b684: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4b688: 486e fffc pea %fp@(-4) <== NOT EXECUTED
4b68c: 2f04 movel %d4,%sp@- <== NOT EXECUTED
4b68e: 4eb9 0005 0d7a jsr 50d7a <strtod> <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b694: 508f addql #8,%sp <== NOT EXECUTED
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4b696: 2400 movel %d0,%d2 <== NOT EXECUTED
4b698: 2601 movel %d1,%d3 <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b69a: 4a8b tstl %a3 <== NOT EXECUTED
4b69c: 6704 beqs 4b6a2 <rtems_string_to_double+0x46> <== NOT EXECUTED
*endptr = end;
4b69e: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
/* nothing was converted */
if ( end == s )
4b6a2: b8ae fffc cmpl %fp@(-4),%d4 <== NOT EXECUTED
4b6a6: 6738 beqs 4b6e0 <rtems_string_to_double+0x84> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b6a8: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED
4b6ac: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED
4b6b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4b6b4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
4b6b6: 4eb9 0005 bd88 jsr 5bd88 <__gtdf2> <== NOT EXECUTED
4b6bc: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4b6c0: 4a80 tstl %d0 <== NOT EXECUTED
4b6c2: 6f0e bles 4b6d2 <rtems_string_to_double+0x76> <== NOT EXECUTED
4b6c4: 4eb9 0004 e384 jsr 4e384 <__errno> <== NOT EXECUTED
4b6ca: 7222 moveq #34,%d1 <== NOT EXECUTED
4b6cc: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b6ce: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4b6d0: 6712 beqs 4b6e4 <rtems_string_to_double+0x88> <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b6d2: 2482 movel %d2,%a2@ <== NOT EXECUTED
#endif
return RTEMS_SUCCESSFUL;
4b6d4: 4280 clrl %d0 <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b6d6: 2543 0004 movel %d3,%a2@(4) <== NOT EXECUTED
#endif
return RTEMS_SUCCESSFUL;
4b6da: 600a bras 4b6e6 <rtems_string_to_double+0x8a> <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b6dc: 7009 moveq #9,%d0 <== NOT EXECUTED
4b6de: 6006 bras 4b6e6 <rtems_string_to_double+0x8a> <== NOT EXECUTED
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b6e0: 700b moveq #11,%d0 <== NOT EXECUTED
4b6e2: 6002 bras 4b6e6 <rtems_string_to_double+0x8a> <== NOT EXECUTED
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b6e4: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b6e6: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3 <== NOT EXECUTED
4b6ec: 4e5e unlk %fp <== NOT EXECUTED
0004b6f0 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b6f0: 4e56 ffec linkw %fp,#-20
4b6f4: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b6f8: 262e 0008 movel %fp@(8),%d3
4b6fc: 246e 000c moveal %fp@(12),%a2
4b700: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b704: 4a8a tstl %a2
4b706: 6756 beqs 4b75e <rtems_string_to_float+0x6e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b708: 4eb9 0004 e384 jsr 4e384 <__errno>
4b70e: 2040 moveal %d0,%a0
4b710: 4290 clrl %a0@
*n = 0;
4b712: 24bc 0000 0000 movel #0,%a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4b718: 486e fffc pea %fp@(-4)
4b71c: 2f03 movel %d3,%sp@-
4b71e: 4eb9 0005 0d9a jsr 50d9a <strtof>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b724: 508f addql #8,%sp
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4b726: 2400 movel %d0,%d2
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b728: 4a8b tstl %a3
4b72a: 6704 beqs 4b730 <rtems_string_to_float+0x40>
*endptr = end;
4b72c: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4b730: b6ae fffc cmpl %fp@(-4),%d3
4b734: 672c beqs 4b762 <rtems_string_to_float+0x72>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b736: 2f3c 7f7f ffff movel #2139095039,%sp@-
4b73c: 2f02 movel %d2,%sp@-
4b73e: 4eb9 0005 be18 jsr 5be18 <__gtsf2>
4b744: 508f addql #8,%sp
4b746: 4a80 tstl %d0
4b748: 6f0e bles 4b758 <rtems_string_to_float+0x68> <== ALWAYS TAKEN
4b74a: 4eb9 0004 e384 jsr 4e384 <__errno> <== NOT EXECUTED
4b750: 7222 moveq #34,%d1 <== NOT EXECUTED
4b752: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b754: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4b756: 670e beqs 4b766 <rtems_string_to_float+0x76> <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b758: 2482 movel %d2,%a2@
#endif
return RTEMS_SUCCESSFUL;
4b75a: 4280 clrl %d0
4b75c: 600a bras 4b768 <rtems_string_to_float+0x78>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b75e: 7009 moveq #9,%d0
4b760: 6006 bras 4b768 <rtems_string_to_float+0x78>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b762: 700b moveq #11,%d0
4b764: 6002 bras 4b768 <rtems_string_to_float+0x78>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b766: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b768: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4b76e: 4e5e unlk %fp
...
0004b774 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b774: 4e56 ffec linkw %fp,#-20
4b778: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b77c: 262e 0008 movel %fp@(8),%d3
4b780: 246e 000c moveal %fp@(12),%a2
4b784: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b788: 4a8a tstl %a2
4b78a: 674c beqs 4b7d8 <rtems_string_to_int+0x64>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b78c: 4eb9 0004 e384 jsr 4e384 <__errno>
4b792: 2040 moveal %d0,%a0
4b794: 4290 clrl %a0@
*n = 0;
4b796: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b798: 2f2e 0014 movel %fp@(20),%sp@-
4b79c: 486e fffc pea %fp@(-4)
4b7a0: 2f03 movel %d3,%sp@-
4b7a2: 4eb9 0005 0f50 jsr 50f50 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b7a8: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b7ac: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b7ae: 4a8b tstl %a3
4b7b0: 6704 beqs 4b7b6 <rtems_string_to_int+0x42>
*endptr = end;
4b7b2: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4b7b6: b6ae fffc cmpl %fp@(-4),%d3
4b7ba: 6720 beqs 4b7dc <rtems_string_to_int+0x68>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b7bc: 0c82 7fff ffff cmpil #2147483647,%d2
4b7c2: 660e bnes 4b7d2 <rtems_string_to_int+0x5e>
4b7c4: 4eb9 0004 e384 jsr 4e384 <__errno>
4b7ca: 7222 moveq #34,%d1
4b7cc: 2040 moveal %d0,%a0
4b7ce: b290 cmpl %a0@,%d1
4b7d0: 670e beqs 4b7e0 <rtems_string_to_int+0x6c> <== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b7d2: 2482 movel %d2,%a2@
#endif
return RTEMS_SUCCESSFUL;
4b7d4: 4280 clrl %d0
4b7d6: 600a bras 4b7e2 <rtems_string_to_int+0x6e>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b7d8: 7009 moveq #9,%d0
4b7da: 6006 bras 4b7e2 <rtems_string_to_int+0x6e>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b7dc: 700b moveq #11,%d0
4b7de: 6002 bras 4b7e2 <rtems_string_to_int+0x6e>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b7e0: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b7e2: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4b7e8: 4e5e unlk %fp <== NOT EXECUTED
0004b888 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b888: 4e56 ffec linkw %fp,#-20
4b88c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b890: 262e 0008 movel %fp@(8),%d3
4b894: 246e 000c moveal %fp@(12),%a2
4b898: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b89c: 4a8a tstl %a2
4b89e: 6754 beqs 4b8f4 <rtems_string_to_long+0x6c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b8a0: 4eb9 0004 e384 jsr 4e384 <__errno>
4b8a6: 2040 moveal %d0,%a0
4b8a8: 4290 clrl %a0@
*n = 0;
4b8aa: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b8ac: 2f2e 0014 movel %fp@(20),%sp@-
4b8b0: 486e fffc pea %fp@(-4)
4b8b4: 2f03 movel %d3,%sp@-
4b8b6: 4eb9 0005 0f50 jsr 50f50 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b8bc: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b8c0: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b8c2: 4a8b tstl %a3
4b8c4: 6704 beqs 4b8ca <rtems_string_to_long+0x42>
*endptr = end;
4b8c6: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4b8ca: b6ae fffc cmpl %fp@(-4),%d3
4b8ce: 6728 beqs 4b8f8 <rtems_string_to_long+0x70>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b8d0: 0c82 7fff ffff cmpil #2147483647,%d2
4b8d6: 6708 beqs 4b8e0 <rtems_string_to_long+0x58>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4b8d8: 0c82 8000 0000 cmpil #-2147483648,%d2
4b8de: 660e bnes 4b8ee <rtems_string_to_long+0x66>
4b8e0: 4eb9 0004 e384 jsr 4e384 <__errno>
4b8e6: 7222 moveq #34,%d1
4b8e8: 2040 moveal %d0,%a0
4b8ea: b290 cmpl %a0@,%d1
4b8ec: 670e beqs 4b8fc <rtems_string_to_long+0x74> <== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b8ee: 2482 movel %d2,%a2@
#endif
return RTEMS_SUCCESSFUL;
4b8f0: 4280 clrl %d0
4b8f2: 600a bras 4b8fe <rtems_string_to_long+0x76>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b8f4: 7009 moveq #9,%d0
4b8f6: 6006 bras 4b8fe <rtems_string_to_long+0x76>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b8f8: 700b moveq #11,%d0
4b8fa: 6002 bras 4b8fe <rtems_string_to_long+0x76>
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b8fc: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b8fe: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4b904: 4e5e unlk %fp <== NOT EXECUTED
0004b7ec <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b7ec: 4e56 ffe8 linkw %fp,#-24
4b7f0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
4b7f4: 282e 0008 movel %fp@(8),%d4
4b7f8: 246e 000c moveal %fp@(12),%a2
4b7fc: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b800: 4a8a tstl %a2
4b802: 676e beqs 4b872 <rtems_string_to_long_long+0x86>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b804: 4eb9 0004 e384 jsr 4e384 <__errno>
4b80a: 2040 moveal %d0,%a0
*n = 0;
4b80c: 4280 clrl %d0
4b80e: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b810: 4290 clrl %a0@
*n = 0;
4b812: 2480 movel %d0,%a2@
4b814: 2541 0004 movel %d1,%a2@(4)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b818: 2f2e 0014 movel %fp@(20),%sp@-
4b81c: 486e fffc pea %fp@(-4)
4b820: 2f04 movel %d4,%sp@-
4b822: 4eb9 0005 0f70 jsr 50f70 <strtoll>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b828: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4b82c: 2400 movel %d0,%d2
4b82e: 2601 movel %d1,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b830: 4a8b tstl %a3
4b832: 6704 beqs 4b838 <rtems_string_to_long_long+0x4c>
*endptr = end;
4b834: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4b838: b8ae fffc cmpl %fp@(-4),%d4
4b83c: 6738 beqs 4b876 <rtems_string_to_long_long+0x8a>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b83e: 203c 7fff ffff movel #2147483647,%d0
4b844: 72ff moveq #-1,%d1
4b846: 9283 subl %d3,%d1
4b848: 9182 subxl %d2,%d0
4b84a: 670e beqs 4b85a <rtems_string_to_long_long+0x6e>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4b84c: 203c 8000 0000 movel #-2147483648,%d0
4b852: 4281 clrl %d1
4b854: 9283 subl %d3,%d1
4b856: 9182 subxl %d2,%d0
4b858: 660e bnes 4b868 <rtems_string_to_long_long+0x7c>
4b85a: 4eb9 0004 e384 jsr 4e384 <__errno>
4b860: 7222 moveq #34,%d1
4b862: 2040 moveal %d0,%a0
4b864: b290 cmpl %a0@,%d1
4b866: 6712 beqs 4b87a <rtems_string_to_long_long+0x8e> <== ALWAYS TAKEN
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4b868: 4280 clrl %d0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4b86a: 2482 movel %d2,%a2@
4b86c: 2543 0004 movel %d3,%a2@(4)
#endif
return RTEMS_SUCCESSFUL;
4b870: 600a bras 4b87c <rtems_string_to_long_long+0x90>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b872: 7009 moveq #9,%d0
4b874: 6006 bras 4b87c <rtems_string_to_long_long+0x90>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b876: 700b moveq #11,%d0
4b878: 6002 bras 4b87c <rtems_string_to_long_long+0x90>
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b87a: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b87c: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
4b882: 4e5e unlk %fp
...
0004b908 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b908: 4e56 ffec linkw %fp,#-20
4b90c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b910: 262e 0008 movel %fp@(8),%d3
4b914: 246e 000c moveal %fp@(12),%a2
4b918: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b91c: 4a8a tstl %a2
4b91e: 674a beqs 4b96a <rtems_string_to_pointer+0x62>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b920: 4eb9 0004 e384 jsr 4e384 <__errno>
4b926: 2040 moveal %d0,%a0
4b928: 4290 clrl %a0@
*n = 0;
4b92a: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
4b92c: 4878 0010 pea 10 <INVALID_OPERATION>
4b930: 486e fffc pea %fp@(-4)
4b934: 2f03 movel %d3,%sp@-
4b936: 4eb9 0005 1384 jsr 51384 <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b93c: 4fef 000c lea %sp@(12),%sp
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
4b940: 2400 movel %d0,%d2
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4b942: 4a8b tstl %a3
4b944: 6704 beqs 4b94a <rtems_string_to_pointer+0x42>
*endptr = end;
4b946: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4b94a: b6ae fffc cmpl %fp@(-4),%d3
4b94e: 671e beqs 4b96e <rtems_string_to_pointer+0x66>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4b950: 70ff moveq #-1,%d0
4b952: b082 cmpl %d2,%d0
4b954: 660e bnes 4b964 <rtems_string_to_pointer+0x5c> <== ALWAYS TAKEN
4b956: 4eb9 0004 e384 jsr 4e384 <__errno> <== NOT EXECUTED
4b95c: 7222 moveq #34,%d1 <== NOT EXECUTED
4b95e: 2040 moveal %d0,%a0 <== NOT EXECUTED
4b960: b290 cmpl %a0@,%d1 <== NOT EXECUTED
4b962: 670e beqs 4b972 <rtems_string_to_pointer+0x6a> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
4b964: 2482 movel %d2,%a2@
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4b966: 4280 clrl %d0
4b968: 600a bras 4b974 <rtems_string_to_pointer+0x6c>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4b96a: 7009 moveq #9,%d0
4b96c: 6006 bras 4b974 <rtems_string_to_pointer+0x6c>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4b96e: 700b moveq #11,%d0
4b970: 6002 bras 4b974 <rtems_string_to_pointer+0x6c>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4b972: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4b974: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4b97a: 4e5e unlk %fp
...
0004b9dc <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4b9dc: 4e56 ffec linkw %fp,#-20
4b9e0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4b9e4: 262e 0008 movel %fp@(8),%d3
4b9e8: 246e 000c moveal %fp@(12),%a2
4b9ec: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4b9f0: 4a8a tstl %a2
4b9f2: 674a beqs 4ba3e <rtems_string_to_unsigned_int+0x62>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4b9f4: 4eb9 0004 e384 jsr 4e384 <__errno>
4b9fa: 2040 moveal %d0,%a0
4b9fc: 4290 clrl %a0@
*n = 0;
4b9fe: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4ba00: 2f2e 0014 movel %fp@(20),%sp@-
4ba04: 486e fffc pea %fp@(-4)
4ba08: 2f03 movel %d3,%sp@-
4ba0a: 4eb9 0005 1384 jsr 51384 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4ba10: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4ba14: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4ba16: 4a8b tstl %a3
4ba18: 6704 beqs 4ba1e <rtems_string_to_unsigned_int+0x42>
*endptr = end;
4ba1a: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4ba1e: b6ae fffc cmpl %fp@(-4),%d3
4ba22: 671e beqs 4ba42 <rtems_string_to_unsigned_int+0x66>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4ba24: 70ff moveq #-1,%d0
4ba26: b082 cmpl %d2,%d0
4ba28: 660e bnes 4ba38 <rtems_string_to_unsigned_int+0x5c>
4ba2a: 4eb9 0004 e384 jsr 4e384 <__errno>
4ba30: 7222 moveq #34,%d1
4ba32: 2040 moveal %d0,%a0
4ba34: b290 cmpl %a0@,%d1
4ba36: 670e beqs 4ba46 <rtems_string_to_unsigned_int+0x6a><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4ba38: 2482 movel %d2,%a2@
#endif
return RTEMS_SUCCESSFUL;
4ba3a: 4280 clrl %d0
4ba3c: 600a bras 4ba48 <rtems_string_to_unsigned_int+0x6c>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4ba3e: 7009 moveq #9,%d0
4ba40: 6006 bras 4ba48 <rtems_string_to_unsigned_int+0x6c>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4ba42: 700b moveq #11,%d0
4ba44: 6002 bras 4ba48 <rtems_string_to_unsigned_int+0x6c>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4ba46: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4ba48: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4ba4e: 4e5e unlk %fp
...
0004badc <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4badc: 4e56 ffec linkw %fp,#-20
4bae0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
4bae4: 262e 0008 movel %fp@(8),%d3
4bae8: 246e 000c moveal %fp@(12),%a2
4baec: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4baf0: 4a8a tstl %a2
4baf2: 674a beqs 4bb3e <rtems_string_to_unsigned_long+0x62>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4baf4: 4eb9 0004 e384 jsr 4e384 <__errno>
4bafa: 2040 moveal %d0,%a0
4bafc: 4290 clrl %a0@
*n = 0;
4bafe: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4bb00: 2f2e 0014 movel %fp@(20),%sp@-
4bb04: 486e fffc pea %fp@(-4)
4bb08: 2f03 movel %d3,%sp@-
4bb0a: 4eb9 0005 1384 jsr 51384 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4bb10: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4bb14: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4bb16: 4a8b tstl %a3
4bb18: 6704 beqs 4bb1e <rtems_string_to_unsigned_long+0x42>
*endptr = end;
4bb1a: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4bb1e: b6ae fffc cmpl %fp@(-4),%d3
4bb22: 671e beqs 4bb42 <rtems_string_to_unsigned_long+0x66>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4bb24: 70ff moveq #-1,%d0
4bb26: b082 cmpl %d2,%d0
4bb28: 660e bnes 4bb38 <rtems_string_to_unsigned_long+0x5c>
4bb2a: 4eb9 0004 e384 jsr 4e384 <__errno>
4bb30: 7222 moveq #34,%d1
4bb32: 2040 moveal %d0,%a0
4bb34: b290 cmpl %a0@,%d1
4bb36: 670e beqs 4bb46 <rtems_string_to_unsigned_long+0x6a><== ALWAYS TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4bb38: 2482 movel %d2,%a2@
#endif
return RTEMS_SUCCESSFUL;
4bb3a: 4280 clrl %d0
4bb3c: 600a bras 4bb48 <rtems_string_to_unsigned_long+0x6c>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4bb3e: 7009 moveq #9,%d0
4bb40: 6006 bras 4bb48 <rtems_string_to_unsigned_long+0x6c>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4bb42: 700b moveq #11,%d0
4bb44: 6002 bras 4bb48 <rtems_string_to_unsigned_long+0x6c>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4bb46: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4bb48: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4bb4e: 4e5e unlk %fp
...
0004ba54 <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4ba54: 4e56 ffe8 linkw %fp,#-24
4ba58: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
4ba5c: 282e 0008 movel %fp@(8),%d4
4ba60: 246e 000c moveal %fp@(12),%a2
4ba64: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4ba68: 4a8a tstl %a2
4ba6a: 675c beqs 4bac8 <rtems_string_to_unsigned_long_long+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4ba6c: 4eb9 0004 e384 jsr 4e384 <__errno>
4ba72: 2040 moveal %d0,%a0
*n = 0;
4ba74: 4280 clrl %d0
4ba76: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4ba78: 4290 clrl %a0@
*n = 0;
4ba7a: 2480 movel %d0,%a2@
4ba7c: 2541 0004 movel %d1,%a2@(4)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4ba80: 2f2e 0014 movel %fp@(20),%sp@-
4ba84: 486e fffc pea %fp@(-4)
4ba88: 2f04 movel %d4,%sp@-
4ba8a: 4eb9 0005 13a4 jsr 513a4 <strtoull>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4ba90: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4ba94: 2400 movel %d0,%d2
4ba96: 2601 movel %d1,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4ba98: 4a8b tstl %a3
4ba9a: 6704 beqs 4baa0 <rtems_string_to_unsigned_long_long+0x4c>
*endptr = end;
4ba9c: 26ae fffc movel %fp@(-4),%a3@
/* nothing was converted */
if ( end == s )
4baa0: b8ae fffc cmpl %fp@(-4),%d4
4baa4: 6726 beqs 4bacc <rtems_string_to_unsigned_long_long+0x78>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4baa6: 70ff moveq #-1,%d0
4baa8: 72ff moveq #-1,%d1
4baaa: 9283 subl %d3,%d1
4baac: 9182 subxl %d2,%d0
4baae: 660e bnes 4babe <rtems_string_to_unsigned_long_long+0x6a>
4bab0: 4eb9 0004 e384 jsr 4e384 <__errno>
4bab6: 7222 moveq #34,%d1
4bab8: 2040 moveal %d0,%a0
4baba: b290 cmpl %a0@,%d1
4babc: 6712 beqs 4bad0 <rtems_string_to_unsigned_long_long+0x7c><== ALWAYS TAKEN
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4babe: 4280 clrl %d0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4bac0: 2482 movel %d2,%a2@
4bac2: 2543 0004 movel %d3,%a2@(4)
#endif
return RTEMS_SUCCESSFUL;
4bac6: 600a bras 4bad2 <rtems_string_to_unsigned_long_long+0x7e>
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4bac8: 7009 moveq #9,%d0
4baca: 6006 bras 4bad2 <rtems_string_to_unsigned_long_long+0x7e>
if ( endptr )
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4bacc: 700b moveq #11,%d0
4bace: 6002 bras 4bad2 <rtems_string_to_unsigned_long_long+0x7e>
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
4bad0: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4bad2: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
4bad8: 4e5e unlk %fp <== NOT EXECUTED
0004213c <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
4213c: 4e56 fe3c linkw %fp,#-452
42140: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
42144: 2e2e 0008 movel %fp@(8),%d7
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42148: 2f07 movel %d7,%sp@-
4214a: 4eb9 0005 0570 jsr 50570 <strlen>
42150: 4297 clrl %sp@
42152: 486e ffe8 pea %fp@(-24)
42156: 42a7 clrl %sp@-
42158: 2f00 movel %d0,%sp@-
4215a: 2f07 movel %d7,%sp@-
4215c: 4eb9 0004 2bce jsr 42bce <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42162: 4fef 0014 lea %sp@(20),%sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42166: 2800 movel %d0,%d4
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42168: 6600 01a8 bnew 42312 <rtems_tarfs_load+0x1d6>
return -1;
if (root_loc.ops != &IMFS_ops
4216c: 202e fff4 movel %fp@(-12),%d0
42170: 0c80 0005 f61a cmpil #390682,%d0
42176: 6710 beqs 42188 <rtems_tarfs_load+0x4c> <== ALWAYS TAKEN
&& root_loc.ops != &fifoIMFS_ops)
42178: 0c80 0005 fe0a cmpil #392714,%d0 <== NOT EXECUTED
4217e: 6600 0192 bnew 42312 <rtems_tarfs_load+0x1d6> <== NOT EXECUTED
42182: 6004 bras 42188 <rtems_tarfs_load+0x4c> <== NOT EXECUTED
42184: 2443 moveal %d3,%a2
42186: 602e bras 421b6 <rtems_tarfs_load+0x7a>
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42188: 2c0e movel %fp,%d6
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
4218a: 2a0e movel %fp,%d5
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
4218c: 240e movel %fp,%d2
0
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
4218e: 95ca subal %a2,%a2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42190: 0686 ffff ff70 addil #-144,%d6
42196: 4bf9 0005 0678 lea 50678 <strncpy>,%a5
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4219c: 47f9 0004 9268 lea 49268 <_rtems_octal2ulong>,%a3
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
421a2: 0685 ffff ffd4 addil #-44,%d5
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
421a8: 0682 ffff fe70 addil #-400,%d2
421ae: 2d44 fe6c movel %d4,%fp@(-404)
421b2: 2d47 fe66 movel %d7,%fp@(-410)
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
421b6: 260a movel %a2,%d3
421b8: 0683 0000 0200 addil #512,%d3
421be: b6ae 0010 cmpl %fp@(16),%d3
421c2: 6200 0152 bhiw 42316 <rtems_tarfs_load+0x1da>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
421c6: 4878 0007 pea 7 <TRUNCDFSF>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
421ca: d5ee 000c addal %fp@(12),%a2
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
421ce: 4879 0005 f662 pea 5f662 <IMFS_ops+0x48>
421d4: 486a 0101 pea %a2@(257)
421d8: 4eb9 0005 0588 jsr 50588 <strncmp>
421de: 4fef 000c lea %sp@(12),%sp
421e2: 4a80 tstl %d0
421e4: 6600 0130 bnew 42316 <rtems_tarfs_load+0x1da>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
421e8: 4878 0063 pea 63 <DBL_MANT_DIG+0x2e>
421ec: 2f0a movel %a2,%sp@-
421ee: 2f06 movel %d6,%sp@-
421f0: 4e95 jsr %a5@
filename[MAX_NAME_FIELD_SIZE] = '\0';
421f2: 4200 clrb %d0
421f4: 1d40 ffd3 moveb %d0,%fp@(-45)
linkflag = hdr_ptr[156];
421f8: 122a 009c moveb %a2@(156),%d1
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
421fc: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
42200: 486a 0064 pea %a2@(100)
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
42204: 1d41 fe6b moveb %d1,%fp@(-405)
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42208: 4e93 jsr %a3@
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
4220a: 4878 000c pea c <OPER1>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4220e: 2800 movel %d0,%d4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42210: 486a 007c pea %a2@(124)
42214: 4e93 jsr %a3@
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42216: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
4221a: 2840 moveal %d0,%a4
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
4221c: 486a 0094 pea %a2@(148)
42220: 4e93 jsr %a3@
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42222: 4fef 0020 lea %sp@(32),%sp
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42226: 2e00 movel %d0,%d7
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42228: 2e8a movel %a2,%sp@
4222a: 4eb9 0004 92ae jsr 492ae <_rtems_tar_header_checksum>
42230: 588f addql #4,%sp
42232: be80 cmpl %d0,%d7
42234: 6600 00e0 bnew 42316 <rtems_tarfs_load+0x1da>
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
42238: 4280 clrl %d0
4223a: 102e fe6b moveb %fp@(-405),%d0
4223e: 7235 moveq #53,%d1
42240: b280 cmpl %d0,%d1
42242: 6656 bnes 4229a <rtems_tarfs_load+0x15e>
strcpy(full_filename, mountpoint);
42244: 2f2e fe66 movel %fp@(-410),%sp@-
42248: 2f02 movel %d2,%sp@-
4224a: 4eb9 0005 00c4 jsr 500c4 <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
42250: 2f02 movel %d2,%sp@-
42252: 4eb9 0005 0570 jsr 50570 <strlen>
42258: 4fef 000c lea %sp@(12),%sp
4225c: 722f moveq #47,%d1
4225e: 41f6 0800 lea %fp@(00000000,%d0:l),%a0
42262: 1028 fe6f moveb %a0@(-401),%d0
42266: 49c0 extbl %d0
42268: b280 cmpl %d0,%d1
4226a: 6710 beqs 4227c <rtems_tarfs_load+0x140> <== ALWAYS TAKEN
strcat(full_filename, "/");
4226c: 4879 0005 c969 pea 5c969 <_rodata_start+0x19> <== NOT EXECUTED
42272: 2f02 movel %d2,%sp@- <== NOT EXECUTED
42274: 4eb9 0004 ffac jsr 4ffac <strcat> <== NOT EXECUTED
4227a: 508f addql #8,%sp <== NOT EXECUTED
strcat(full_filename, filename);
4227c: 2f06 movel %d6,%sp@-
4227e: 2f02 movel %d2,%sp@-
42280: 4eb9 0004 ffac jsr 4ffac <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
42286: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
4228a: 2f02 movel %d2,%sp@-
4228c: 4eb9 0004 33b0 jsr 433b0 <mkdir>
42292: 4fef 0010 lea %sp@(16),%sp
42296: 6000 feec braw 42184 <rtems_tarfs_load+0x48>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
4229a: 7230 moveq #48,%d1
4229c: b280 cmpl %d0,%d1
4229e: 6600 fee4 bnew 42184 <rtems_tarfs_load+0x48>
const char *name;
loc = root_loc;
422a2: 4878 0014 pea 14 <OPER2>
422a6: 486e ffe8 pea %fp@(-24)
422aa: 2f05 movel %d5,%sp@-
422ac: 4eb9 0004 f810 jsr 4f810 <memcpy>
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
422b2: 486e fffc pea %fp@(-4)
422b6: 2f05 movel %d5,%sp@-
422b8: 2f06 movel %d6,%sp@-
422ba: 4eb9 0004 9da2 jsr 49da2 <IMFS_evaluate_for_make>
422c0: 4fef 0018 lea %sp@(24),%sp
422c4: 4a80 tstl %d0
422c6: 6636 bnes 422fe <rtems_tarfs_load+0x1c2> <== NEVER TAKEN
node = IMFS_create_node(
422c8: 42a7 clrl %sp@-
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
422ca: 0284 0000 01ff andil #511,%d4
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
422d0: 08c4 000f bset #15,%d4
422d4: 2f04 movel %d4,%sp@-
422d6: 2f2e fffc movel %fp@(-4),%sp@-
422da: 4878 0006 pea 6 <EXTENDSFDF>
422de: 2f05 movel %d5,%sp@-
422e0: 4eb9 0004 981e jsr 4981e <IMFS_create_node>
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
422e6: 4fef 0014 lea %sp@(20),%sp
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
422ea: 2040 moveal %d0,%a0
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
422ec: 202e 000c movel %fp@(12),%d0
422f0: d083 addl %d3,%d0
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
422f2: 214c 0050 movel %a4,%a0@(80)
422f6: 42a8 004c clrl %a0@(76)
node->info.linearfile.direct = &tar_image[offset];
422fa: 2140 0054 movel %d0,%a0@(84)
}
nblocks = (((file_size) + 511) & ~511) / 512;
422fe: 200c movel %a4,%d0
42300: 0680 0000 01ff addil #511,%d0
offset += 512 * nblocks;
42306: 0280 ffff fe00 andil #-512,%d0
4230c: d680 addl %d0,%d3
4230e: 6000 fe74 braw 42184 <rtems_tarfs_load+0x48>
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
return -1;
42312: 78ff moveq #-1,%d4 <== NOT EXECUTED
42314: 6004 bras 4231a <rtems_tarfs_load+0x1de> <== NOT EXECUTED
42316: 282e fe6c movel %fp@(-404),%d4
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
4231a: 2004 movel %d4,%d0
4231c: 4cee 3cfc fe3c moveml %fp@(-452),%d2-%d7/%a2-%a5
42322: 4e5e unlk %fp
...
00047244 <rtems_task_get_note>:
rtems_status_code rtems_task_get_note(
rtems_id id,
uint32_t notepad,
uint32_t *note
)
{
47244: 4e56 fffc linkw %fp,#-4
47248: 202e 0008 movel %fp@(8),%d0
4724c: 2f0a movel %a2,%sp@-
4724e: 246e 0010 moveal %fp@(16),%a2
47252: 2f02 movel %d2,%sp@-
47254: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
47258: 4a39 0005 e904 tstb 5e904 <Configuration_RTEMS_API+0x4>
4725e: 6752 beqs 472b2 <rtems_task_get_note+0x6e> <== NEVER TAKEN
return RTEMS_NOT_CONFIGURED;
if ( !note )
47260: 4a8a tstl %a2
47262: 6752 beqs 472b6 <rtems_task_get_note+0x72>
/*
* 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 )
47264: 720f moveq #15,%d1
47266: b282 cmpl %d2,%d1
47268: 6550 bcss 472ba <rtems_task_get_note+0x76>
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
4726a: 4a80 tstl %d0
4726c: 670c beqs 4727a <rtems_task_get_note+0x36>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
4726e: 2079 0006 0826 moveal 60826 <_Per_CPU_Information+0xc>,%a0
/*
* Optimize the most likely case to avoid the Thread_Dispatch.
*/
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ||
47274: b0a8 0008 cmpl %a0@(8),%d0
47278: 6610 bnes 4728a <rtems_task_get_note+0x46>
_Objects_Are_ids_equal( id, _Thread_Executing->Object.id ) ) {
api = _Thread_Executing->API_Extensions[ THREAD_API_RTEMS ];
4727a: 2079 0006 0826 moveal 60826 <_Per_CPU_Information+0xc>,%a0
*note = api->Notepads[ notepad ];
47280: 2068 010a moveal %a0@(266),%a0
47284: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@
47288: 6024 bras 472ae <rtems_task_get_note+0x6a>
return RTEMS_SUCCESSFUL;
}
the_thread = _Thread_Get( id, &location );
4728a: 486e fffc pea %fp@(-4)
4728e: 2f00 movel %d0,%sp@-
47290: 4eb9 0004 90ec jsr 490ec <_Thread_Get>
switch ( location ) {
47296: 508f addql #8,%sp
47298: 4aae fffc tstl %fp@(-4)
4729c: 6620 bnes 472be <rtems_task_get_note+0x7a>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
*note = api->Notepads[ notepad ];
4729e: 2240 moveal %d0,%a1
472a0: 2069 010a moveal %a1@(266),%a0
472a4: 24b0 2c1e movel %a0@(0000001e,%d2:l:4),%a2@
_Thread_Enable_dispatch();
472a8: 4eb9 0004 90c6 jsr 490c6 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
472ae: 4280 clrl %d0
472b0: 600e bras 472c0 <rtems_task_get_note+0x7c>
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
if ( !rtems_configuration_get_notepads_enabled() )
return RTEMS_NOT_CONFIGURED;
472b2: 7016 moveq #22,%d0
472b4: 600a bras 472c0 <rtems_task_get_note+0x7c>
if ( !note )
return RTEMS_INVALID_ADDRESS;
472b6: 7009 moveq #9,%d0
472b8: 6006 bras 472c0 <rtems_task_get_note+0x7c>
* 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 )
return RTEMS_INVALID_NUMBER;
472ba: 700a moveq #10,%d0
472bc: 6002 bras 472c0 <rtems_task_get_note+0x7c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
472be: 7004 moveq #4,%d0
}
472c0: 242e fff4 movel %fp@(-12),%d2
472c4: 246e fff8 moveal %fp@(-8),%a2
472c8: 4e5e unlk %fp <== NOT EXECUTED
0004c5cc <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4c5cc: 4e56 ffe4 linkw %fp,#-28
4c5d0: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@
4c5d4: 262e 0008 movel %fp@(8),%d3
4c5d8: 282e 000c movel %fp@(12),%d4
4c5dc: 286e 0010 moveal %fp@(16),%a4
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
4c5e0: 4a8c tstl %a4
4c5e2: 6700 010c beqw 4c6f0 <rtems_task_mode+0x124>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4c5e6: 2679 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a3
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4c5ec: 4a2b 0074 tstb %a3@(116)
4c5f0: 57c2 seq %d2
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4c5f2: 246b 010a moveal %a3@(266),%a2
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4c5f6: 49c2 extbl %d2
4c5f8: 0282 0000 0100 andil #256,%d2
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4c5fe: 4aab 007a tstl %a3@(122)
4c602: 6704 beqs 4c608 <rtems_task_mode+0x3c>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
4c604: 08c2 0009 bset #9,%d2
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4c608: 4a2a 0008 tstb %a2@(8)
4c60c: 57c5 seq %d5
old_mode |= _ISR_Get_level();
4c60e: 4eb9 0004 89ac jsr 489ac <_CPU_ISR_Get_level>
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4c614: 49c5 extbl %d5
4c616: 0285 0000 0400 andil #1024,%d5
4c61c: 8085 orl %d5,%d0
old_mode |= _ISR_Get_level();
4c61e: 8082 orl %d2,%d0
4c620: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4c622: 0804 0008 btst #8,%d4
4c626: 670c beqs 4c634 <rtems_task_mode+0x68>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4c628: 0803 0008 btst #8,%d3
4c62c: 57c0 seq %d0
4c62e: 4480 negl %d0
4c630: 1740 0074 moveb %d0,%a3@(116)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4c634: 0804 0009 btst #9,%d4
4c638: 671c beqs 4c656 <rtems_task_mode+0x8a>
if ( _Modes_Is_timeslice(mode_set) ) {
4c63a: 0803 0009 btst #9,%d3
4c63e: 6712 beqs 4c652 <rtems_task_mode+0x86>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4c640: 41f9 0005 d904 lea 5d904 <_Thread_Ticks_per_timeslice>,%a0
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4c646: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4c648: 2750 0076 movel %a0@,%a3@(118)
if ( mask & RTEMS_PREEMPT_MASK )
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4c64c: 2740 007a movel %d0,%a3@(122)
4c650: 6004 bras 4c656 <rtems_task_mode+0x8a>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4c652: 42ab 007a clrl %a3@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4c656: 7007 moveq #7,%d0
4c658: c084 andl %d4,%d0
4c65a: 6712 beqs 4c66e <rtems_task_mode+0xa2>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4c65c: 40c0 movew %sr,%d0
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4c65e: 7207 moveq #7,%d1
4c660: c283 andl %d3,%d1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4c662: 0280 0000 f8ff andil #63743,%d0
4c668: e189 lsll #8,%d1
4c66a: 8081 orl %d1,%d0
4c66c: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4c66e: 0804 000a btst #10,%d4
4c672: 6740 beqs 4c6b4 <rtems_task_mode+0xe8>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4c674: 4281 clrl %d1
4c676: 122a 0008 moveb %a2@(8),%d1
4c67a: 4282 clrl %d2
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4c67c: 0803 000a btst #10,%d3
4c680: 57c0 seq %d0
4c682: 4480 negl %d0
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4c684: 1400 moveb %d0,%d2
4c686: b282 cmpl %d2,%d1
4c688: 672a beqs 4c6b4 <rtems_task_mode+0xe8>
asr->is_enabled = is_asr_enabled;
4c68a: 1540 0008 moveb %d0,%a2@(8)
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4c68e: 203c 0000 0700 movel #1792,%d0
4c694: 40c1 movew %sr,%d1
4c696: 8081 orl %d1,%d0
4c698: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4c69a: 202a 0016 movel %a2@(22),%d0
information->signals_pending = information->signals_posted;
4c69e: 256a 0012 0016 movel %a2@(18),%a2@(22)
information->signals_posted = _signals;
4c6a4: 2540 0012 movel %d0,%a2@(18)
_ISR_Enable( _level );
4c6a8: 46c1 movew %d1,%sr
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4c6aa: 4aaa 0012 tstl %a2@(18)
4c6ae: 56c0 sne %d0
4c6b0: 4480 negl %d0
4c6b2: 6002 bras 4c6b6 <rtems_task_mode+0xea>
4c6b4: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4c6b6: 7203 moveq #3,%d1
4c6b8: b2b9 0005 daba cmpl 5daba <_System_state_Current>,%d1
4c6be: 6634 bnes 4c6f4 <rtems_task_mode+0x128> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
4c6c0: 2079 0005 dddc moveal 5dddc <_Per_CPU_Information+0xc>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
4c6c6: 4aa8 0010 tstl %a0@(16)
4c6ca: 660e bnes 4c6da <rtems_task_mode+0x10e> <== NEVER TAKEN
4c6cc: b1f9 0005 dde0 cmpal 5dde0 <_Per_CPU_Information+0x10>,%a0
4c6d2: 6710 beqs 4c6e4 <rtems_task_mode+0x118>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4c6d4: 4a28 0074 tstb %a0@(116)
4c6d8: 670a beqs 4c6e4 <rtems_task_mode+0x118> <== NEVER TAKEN
_Context_Switch_necessary = true;
4c6da: 7001 moveq #1,%d0
4c6dc: 13c0 0005 dde8 moveb %d0,5dde8 <_Per_CPU_Information+0x18>
4c6e2: 6004 bras 4c6e8 <rtems_task_mode+0x11c>
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4c6e4: 4a00 tstb %d0
4c6e6: 670c beqs 4c6f4 <rtems_task_mode+0x128>
_Thread_Dispatch();
4c6e8: 4eb9 0004 7558 jsr 47558 <_Thread_Dispatch>
4c6ee: 6004 bras 4c6f4 <rtems_task_mode+0x128>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4c6f0: 7009 moveq #9,%d0
4c6f2: 6002 bras 4c6f6 <rtems_task_mode+0x12a>
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
4c6f4: 4280 clrl %d0
}
4c6f6: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
4c6fc: 4e5e unlk %fp <== NOT EXECUTED
00049468 <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
49468: 4e56 fffc linkw %fp,#-4
4946c: 2f0a movel %a2,%sp@-
4946e: 246e 0010 moveal %fp@(16),%a2
49472: 2f02 movel %d2,%sp@-
49474: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
49478: 670c beqs 49486 <rtems_task_set_priority+0x1e>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
4947a: 4280 clrl %d0
4947c: 1039 0005 fb32 moveb 5fb32 <rtems_maximum_priority>,%d0
49482: b082 cmpl %d2,%d0
49484: 654e bcss 494d4 <rtems_task_set_priority+0x6c>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
49486: 4a8a tstl %a2
49488: 674e beqs 494d8 <rtems_task_set_priority+0x70>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4948a: 486e fffc pea %fp@(-4)
4948e: 2f2e 0008 movel %fp@(8),%sp@-
49492: 4eb9 0004 b174 jsr 4b174 <_Thread_Get>
switch ( location ) {
49498: 508f addql #8,%sp
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4949a: 2040 moveal %d0,%a0
switch ( location ) {
4949c: 4aae fffc tstl %fp@(-4)
494a0: 663a bnes 494dc <rtems_task_set_priority+0x74>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
494a2: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
494a6: 4a82 tstl %d2
494a8: 6720 beqs 494ca <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
494aa: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
494ae: 4aa8 001c tstl %a0@(28)
494b2: 6706 beqs 494ba <rtems_task_set_priority+0x52>
494b4: b4a8 0014 cmpl %a0@(20),%d2
494b8: 6410 bccs 494ca <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
494ba: 42a7 clrl %sp@-
494bc: 2f02 movel %d2,%sp@-
494be: 2f08 movel %a0,%sp@-
494c0: 4eb9 0004 ac68 jsr 4ac68 <_Thread_Change_priority>
494c6: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
494ca: 4eb9 0004 b14e jsr 4b14e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
494d0: 4280 clrl %d0
494d2: 600a bras 494de <rtems_task_set_priority+0x76>
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
494d4: 7013 moveq #19,%d0
494d6: 6006 bras 494de <rtems_task_set_priority+0x76>
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
494d8: 7009 moveq #9,%d0
494da: 6002 bras 494de <rtems_task_set_priority+0x76>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
494dc: 7004 moveq #4,%d0
}
494de: 242e fff4 movel %fp@(-12),%d2
494e2: 246e fff8 moveal %fp@(-8),%a2
494e6: 4e5e unlk %fp
...
00044b1c <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
44b1c: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
44b1e: 4e56 0000 linkw %fp,#0
44b22: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
44b26: b280 cmpl %d0,%d1
44b28: 6700 00c4 beqw 44bee <rtems_termios_baud_to_index+0xd2>
44b2c: 6d50 blts 44b7e <rtems_termios_baud_to_index+0x62>
44b2e: 123c 0004 moveb #4,%d1
44b32: b280 cmpl %d0,%d1
44b34: 6700 00a4 beqw 44bda <rtems_termios_baud_to_index+0xbe>
44b38: 6d28 blts 44b62 <rtems_termios_baud_to_index+0x46>
44b3a: 123c 0001 moveb #1,%d1
44b3e: b280 cmpl %d0,%d1
44b40: 6700 00dc beqw 44c1e <rtems_termios_baud_to_index+0x102>
44b44: 6d0a blts 44b50 <rtems_termios_baud_to_index+0x34>
44b46: 4a80 tstl %d0
44b48: 6700 0084 beqw 44bce <rtems_termios_baud_to_index+0xb2>
44b4c: 6000 00cc braw 44c1a <rtems_termios_baud_to_index+0xfe>
44b50: 7202 moveq #2,%d1
44b52: b280 cmpl %d0,%d1
44b54: 677c beqs 44bd2 <rtems_termios_baud_to_index+0xb6>
44b56: 123c 0003 moveb #3,%d1
44b5a: b280 cmpl %d0,%d1
44b5c: 6600 00bc bnew 44c1a <rtems_termios_baud_to_index+0xfe>
44b60: 6074 bras 44bd6 <rtems_termios_baud_to_index+0xba>
44b62: 7206 moveq #6,%d1
44b64: b280 cmpl %d0,%d1
44b66: 677a beqs 44be2 <rtems_termios_baud_to_index+0xc6>
44b68: 6e74 bgts 44bde <rtems_termios_baud_to_index+0xc2>
44b6a: 123c 0007 moveb #7,%d1
44b6e: b280 cmpl %d0,%d1
44b70: 6774 beqs 44be6 <rtems_termios_baud_to_index+0xca>
44b72: 123c 0008 moveb #8,%d1
44b76: b280 cmpl %d0,%d1
44b78: 6600 00a0 bnew 44c1a <rtems_termios_baud_to_index+0xfe>
44b7c: 606c bras 44bea <rtems_termios_baud_to_index+0xce>
44b7e: 720e moveq #14,%d1
44b80: b280 cmpl %d0,%d1
44b82: 677e beqs 44c02 <rtems_termios_baud_to_index+0xe6><== NEVER TAKEN
44b84: 6d1c blts 44ba2 <rtems_termios_baud_to_index+0x86>
44b86: 123c 000b moveb #11,%d1
44b8a: b280 cmpl %d0,%d1
44b8c: 6768 beqs 44bf6 <rtems_termios_baud_to_index+0xda>
44b8e: 6e62 bgts 44bf2 <rtems_termios_baud_to_index+0xd6>
44b90: 123c 000c moveb #12,%d1
44b94: b280 cmpl %d0,%d1
44b96: 6762 beqs 44bfa <rtems_termios_baud_to_index+0xde>
44b98: 123c 000d moveb #13,%d1
44b9c: b280 cmpl %d0,%d1
44b9e: 667a bnes 44c1a <rtems_termios_baud_to_index+0xfe><== NEVER TAKEN
44ba0: 605c bras 44bfe <rtems_termios_baud_to_index+0xe2>
44ba2: 0c80 0000 1002 cmpil #4098,%d0
44ba8: 6764 beqs 44c0e <rtems_termios_baud_to_index+0xf2><== NEVER TAKEN
44baa: 6e10 bgts 44bbc <rtems_termios_baud_to_index+0xa0>
44bac: 720f moveq #15,%d1
44bae: b280 cmpl %d0,%d1
44bb0: 6754 beqs 44c06 <rtems_termios_baud_to_index+0xea><== NEVER TAKEN
44bb2: 0c80 0000 1001 cmpil #4097,%d0
44bb8: 6660 bnes 44c1a <rtems_termios_baud_to_index+0xfe><== NEVER TAKEN
44bba: 604e bras 44c0a <rtems_termios_baud_to_index+0xee>
44bbc: 0c80 0000 1003 cmpil #4099,%d0
44bc2: 674e beqs 44c12 <rtems_termios_baud_to_index+0xf6><== NEVER TAKEN
44bc4: 0c80 0000 1004 cmpil #4100,%d0
44bca: 664e bnes 44c1a <rtems_termios_baud_to_index+0xfe><== NEVER TAKEN
44bcc: 6048 bras 44c16 <rtems_termios_baud_to_index+0xfa>
case B0: baud_index = 0; break;
44bce: 4280 clrl %d0
44bd0: 604e bras 44c20 <rtems_termios_baud_to_index+0x104>
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
44bd2: 7002 moveq #2,%d0
44bd4: 604a bras 44c20 <rtems_termios_baud_to_index+0x104>
case B110: baud_index = 3; break;
44bd6: 7003 moveq #3,%d0
44bd8: 6046 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B134: baud_index = 4; break;
44bda: 7004 moveq #4,%d0
44bdc: 6042 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B150: baud_index = 5; break;
44bde: 7005 moveq #5,%d0
44be0: 603e bras 44c20 <rtems_termios_baud_to_index+0x104>
case B200: baud_index = 6; break;
44be2: 7006 moveq #6,%d0
44be4: 603a bras 44c20 <rtems_termios_baud_to_index+0x104>
case B300: baud_index = 7; break;
44be6: 7007 moveq #7,%d0
44be8: 6036 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B600: baud_index = 8; break;
44bea: 7008 moveq #8,%d0
44bec: 6032 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B1200: baud_index = 9; break;
44bee: 7009 moveq #9,%d0
44bf0: 602e bras 44c20 <rtems_termios_baud_to_index+0x104>
case B1800: baud_index = 10; break;
44bf2: 700a moveq #10,%d0
44bf4: 602a bras 44c20 <rtems_termios_baud_to_index+0x104>
case B2400: baud_index = 11; break;
44bf6: 700b moveq #11,%d0
44bf8: 6026 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B4800: baud_index = 12; break;
44bfa: 700c moveq #12,%d0
44bfc: 6022 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B9600: baud_index = 13; break;
44bfe: 700d moveq #13,%d0
44c00: 601e bras 44c20 <rtems_termios_baud_to_index+0x104>
case B19200: baud_index = 14; break;
44c02: 700e moveq #14,%d0
44c04: 601a bras 44c20 <rtems_termios_baud_to_index+0x104>
case B38400: baud_index = 15; break;
44c06: 700f moveq #15,%d0
44c08: 6016 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B57600: baud_index = 16; break;
44c0a: 7010 moveq #16,%d0
44c0c: 6012 bras 44c20 <rtems_termios_baud_to_index+0x104>
case B115200: baud_index = 17; break;
44c0e: 7011 moveq #17,%d0
44c10: 600e bras 44c20 <rtems_termios_baud_to_index+0x104>
case B230400: baud_index = 18; break;
44c12: 7012 moveq #18,%d0
44c14: 600a bras 44c20 <rtems_termios_baud_to_index+0x104>
case B460800: baud_index = 19; break;
44c16: 7013 moveq #19,%d0
44c18: 6006 bras 44c20 <rtems_termios_baud_to_index+0x104>
default: baud_index = -1; break;
44c1a: 70ff moveq #-1,%d0
44c1c: 6002 bras 44c20 <rtems_termios_baud_to_index+0x104>
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
44c1e: 7001 moveq #1,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
44c20: 4e5e unlk %fp <== NOT EXECUTED
00043588 <rtems_termios_baud_to_number>:
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
43588: 203c 0000 04b0 movel #1200,%d0
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
4358e: 4e56 0000 linkw %fp,#0
43592: 222e 0008 movel %fp@(8),%d1
43596: 2f02 movel %d2,%sp@-
int32_t baud;
switch (termios_baud) {
43598: 7409 moveq #9,%d2
4359a: b481 cmpl %d1,%d2
4359c: 6700 0108 beqw 436a6 <rtems_termios_baud_to_number+0x11e>
435a0: 6d6c blts 4360e <rtems_termios_baud_to_number+0x86>
435a2: 143c 0004 moveb #4,%d2
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
435a6: 303c 0086 movew #134,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
435aa: b481 cmpl %d1,%d2
435ac: 6700 00f8 beqw 436a6 <rtems_termios_baud_to_number+0x11e>
435b0: 6d2a blts 435dc <rtems_termios_baud_to_number+0x54>
435b2: 103c 0001 moveb #1,%d0
435b6: b081 cmpl %d1,%d0
435b8: 6700 00ea beqw 436a4 <rtems_termios_baud_to_number+0x11c>
435bc: 6d0a blts 435c8 <rtems_termios_baud_to_number+0x40>
435be: 4a81 tstl %d1
435c0: 6700 00d2 beqw 43694 <rtems_termios_baud_to_number+0x10c>
435c4: 6000 00da braw 436a0 <rtems_termios_baud_to_number+0x118>
435c8: 7402 moveq #2,%d2
435ca: b481 cmpl %d1,%d2
435cc: 6700 00ca beqw 43698 <rtems_termios_baud_to_number+0x110>
435d0: 7003 moveq #3,%d0
435d2: b081 cmpl %d1,%d0
435d4: 6600 00ca bnew 436a0 <rtems_termios_baud_to_number+0x118>
435d8: 6000 00c2 braw 4369c <rtems_termios_baud_to_number+0x114>
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
435dc: 203c 0000 00c8 movel #200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
435e2: 7406 moveq #6,%d2
435e4: b481 cmpl %d1,%d2
435e6: 6700 00be beqw 436a6 <rtems_termios_baud_to_number+0x11e>
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
435ea: 0680 ffff ffce addil #-50,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
435f0: b481 cmpl %d1,%d2
435f2: 6e00 00b2 bgtw 436a6 <rtems_termios_baud_to_number+0x11e>
435f6: 143c 0007 moveb #7,%d2
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
435fa: 303c 012c movew #300,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
435fe: b481 cmpl %d1,%d2
43600: 6700 00a4 beqw 436a6 <rtems_termios_baud_to_number+0x11e>
43604: 143c 0008 moveb #8,%d2
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
43608: 303c 0258 movew #600,%d0
4360c: 6038 bras 43646 <rtems_termios_baud_to_number+0xbe>
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
4360e: 203c 0000 4b00 movel #19200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43614: 740e moveq #14,%d2
43616: b481 cmpl %d1,%d2
43618: 6700 008c beqw 436a6 <rtems_termios_baud_to_number+0x11e>
4361c: 6d2e blts 4364c <rtems_termios_baud_to_number+0xc4>
4361e: 143c 000b moveb #11,%d2
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
43622: 303c 0960 movew #2400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43626: b481 cmpl %d1,%d2
43628: 677c beqs 436a6 <rtems_termios_baud_to_number+0x11e>
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
4362a: 303c 0708 movew #1800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4362e: b481 cmpl %d1,%d2
43630: 6e74 bgts 436a6 <rtems_termios_baud_to_number+0x11e>
43632: 143c 000c moveb #12,%d2
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
43636: 303c 12c0 movew #4800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4363a: b481 cmpl %d1,%d2
4363c: 6768 beqs 436a6 <rtems_termios_baud_to_number+0x11e>
4363e: 143c 000d moveb #13,%d2
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
43642: 303c 2580 movew #9600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43646: b481 cmpl %d1,%d2
43648: 6656 bnes 436a0 <rtems_termios_baud_to_number+0x118><== NEVER TAKEN
4364a: 605a bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
4364c: 203c 0001 c200 movel #115200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43652: 0c81 0000 1002 cmpil #4098,%d1
43658: 674c beqs 436a6 <rtems_termios_baud_to_number+0x11e>
4365a: 6e1a bgts 43676 <rtems_termios_baud_to_number+0xee>
4365c: 740f moveq #15,%d2
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
4365e: 203c 0000 9600 movel #38400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43664: b481 cmpl %d1,%d2
43666: 673e beqs 436a6 <rtems_termios_baud_to_number+0x11e>
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
43668: 303c e100 movew #-7936,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4366c: 0c81 0000 1001 cmpil #4097,%d1
43672: 662c bnes 436a0 <rtems_termios_baud_to_number+0x118><== NEVER TAKEN
43674: 6030 bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
43676: 203c 0003 8400 movel #230400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4367c: 0c81 0000 1003 cmpil #4099,%d1
43682: 6722 beqs 436a6 <rtems_termios_baud_to_number+0x11e>
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
43684: 203c 0007 0800 movel #460800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
4368a: 0c81 0000 1004 cmpil #4100,%d1
43690: 660e bnes 436a0 <rtems_termios_baud_to_number+0x118><== NEVER TAKEN
43692: 6012 bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B0: baud = 0; break;
43694: 4280 clrl %d0
43696: 600e bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B50: baud = 50; break;
case B75: baud = 75; break;
43698: 704b moveq #75,%d0
4369a: 600a bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B110: baud = 110; break;
4369c: 706e moveq #110,%d0
4369e: 6006 bras 436a6 <rtems_termios_baud_to_number+0x11e>
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default: baud = -1; break;
436a0: 70ff moveq #-1,%d0
436a2: 6002 bras 436a6 <rtems_termios_baud_to_number+0x11e>
{
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
436a4: 7032 moveq #50,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
436a6: 241f movel %sp@+,%d2
436a8: 4e5e unlk %fp <== NOT EXECUTED
00043c94 <rtems_termios_bufsize>:
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
43c94: 4280 clrl %d0 <== NOT EXECUTED
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
43c96: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
43c9a: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED
43c9e: 23d0 0005 c1f0 movel %a0@,5c1f0 <rtems_termios_cbufsize> <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
43ca4: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED
43ca8: 23d0 0005 c1f4 movel %a0@,5c1f4 <rtems_termios_raw_input_size><== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
43cae: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
43cb2: 4e5e unlk %fp <== NOT EXECUTED
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
43cb4: 23d0 0005 c1f8 movel %a0@,5c1f8 <rtems_termios_raw_output_size><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
00043b34 <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
43b34: 4e56 fff4 linkw %fp,#-12
43b38: 48d7 1c00 moveml %a2-%a4,%sp@
43b3c: 266e 0008 moveal %fp@(8),%a3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain(
43b40: 49f9 0004 5770 lea 45770 <rtems_semaphore_obtain>,%a4
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
43b46: 2053 moveal %a3@,%a0
43b48: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain(
43b4c: 42a7 clrl %sp@-
43b4e: 42a7 clrl %sp@-
43b50: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@-
43b56: 4e94 jsr %a4@
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43b58: 4fef 000c lea %sp@(12),%sp
43b5c: 4a80 tstl %d0
43b5e: 6670 bnes 43bd0 <rtems_termios_close+0x9c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
43b60: 202a 0008 movel %a2@(8),%d0
43b64: 5380 subql #1,%d0
43b66: 2540 0008 movel %d0,%a2@(8)
43b6a: 6600 0110 bnew 43c7c <rtems_termios_close+0x148>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
43b6e: 202a 00cc movel %a2@(204),%d0
43b72: eb88 lsll #5,%d0
43b74: 0680 0005 d000 addil #380928,%d0
43b7a: 2240 moveal %d0,%a1
43b7c: 2051 moveal %a1@,%a0
43b7e: 4a88 tstl %a0
43b80: 6706 beqs 43b88 <rtems_termios_close+0x54>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
43b82: 2f0a movel %a2,%sp@-
43b84: 4e90 jsr %a0@
43b86: 6018 bras 43ba0 <rtems_termios_close+0x6c>
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
43b88: 42a7 clrl %sp@-
43b8a: 42a7 clrl %sp@-
43b8c: 2f2a 0018 movel %a2@(24),%sp@-
43b90: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
43b92: 4fef 000c lea %sp@(12),%sp
43b96: 4a80 tstl %d0
43b98: 6636 bnes 43bd0 <rtems_termios_close+0x9c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
43b9a: 2f0a movel %a2,%sp@-
43b9c: 4eba fb4a jsr %pc@(436e8 <drainOutput>)
43ba0: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
43ba2: 7002 moveq #2,%d0
43ba4: b0aa 00b4 cmpl %a2@(180),%d0
43ba8: 662e bnes 43bd8 <rtems_termios_close+0xa4>
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
43baa: 4878 0001 pea 1 <ADD>
43bae: 49f9 0004 5320 lea 45320 <rtems_event_send>,%a4
43bb4: 2f2a 00c4 movel %a2@(196),%sp@-
43bb8: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
43bba: 508f addql #8,%sp
43bbc: 4a80 tstl %d0
43bbe: 6610 bnes 43bd0 <rtems_termios_close+0x9c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
43bc0: 4878 0001 pea 1 <ADD>
43bc4: 2f2a 00c8 movel %a2@(200),%sp@-
43bc8: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
43bca: 508f addql #8,%sp
43bcc: 4a80 tstl %d0
43bce: 6708 beqs 43bd8 <rtems_termios_close+0xa4> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
43bd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43bd2: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
43bd8: 206a 009c moveal %a2@(156),%a0
43bdc: 4a88 tstl %a0
43bde: 6710 beqs 43bf0 <rtems_termios_close+0xbc>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
43be0: 2f0b movel %a3,%sp@-
43be2: 2f2a 0010 movel %a2@(16),%sp@-
43be6: 2f2a 000c movel %a2@(12),%sp@-
43bea: 4e90 jsr %a0@
43bec: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
43bf0: 2052 moveal %a2@,%a0
43bf2: 4a88 tstl %a0
43bf4: 6610 bnes 43c06 <rtems_termios_close+0xd2>
rtems_termios_ttyTail = tty->back;
43bf6: 206a 0004 moveal %a2@(4),%a0
43bfa: 23c8 0005 d83c movel %a0,5d83c <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
43c00: 670a beqs 43c0c <rtems_termios_close+0xd8> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
43c02: 4290 clrl %a0@ <== NOT EXECUTED
43c04: 6006 bras 43c0c <rtems_termios_close+0xd8> <== NOT EXECUTED
}
} else {
tty->forw->back = tty->back;
43c06: 216a 0004 0004 movel %a2@(4),%a0@(4)
}
if (tty->back == NULL) {
43c0c: 206a 0004 moveal %a2@(4),%a0
43c10: 4a88 tstl %a0
43c12: 6610 bnes 43c24 <rtems_termios_close+0xf0> <== NEVER TAKEN
rtems_termios_ttyHead = tty->forw;
43c14: 2052 moveal %a2@,%a0
43c16: 23c8 0005 d840 movel %a0,5d840 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
43c1c: 6708 beqs 43c26 <rtems_termios_close+0xf2>
rtems_termios_ttyHead->back = NULL;
43c1e: 42a8 0004 clrl %a0@(4)
43c22: 6002 bras 43c26 <rtems_termios_close+0xf2>
}
} else {
tty->back->forw = tty->forw;
43c24: 2092 movel %a2@,%a0@ <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
43c26: 2f2a 0014 movel %a2@(20),%sp@-
43c2a: 47f9 0004 56d4 lea 456d4 <rtems_semaphore_delete>,%a3
43c30: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
43c32: 2f2a 0018 movel %a2@(24),%sp@-
43c36: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
43c38: 2f2a 008c movel %a2@(140),%sp@-
43c3c: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
43c3e: 4fef 000c lea %sp@(12),%sp
43c42: 4aaa 00a0 tstl %a2@(160)
43c46: 6708 beqs 43c50 <rtems_termios_close+0x11c>
43c48: 7002 moveq #2,%d0
43c4a: b0aa 00b4 cmpl %a2@(180),%d0
43c4e: 660c bnes 43c5c <rtems_termios_close+0x128>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
43c50: 2f2a 0068 movel %a2@(104),%sp@-
43c54: 4eb9 0004 56d4 jsr 456d4 <rtems_semaphore_delete>
43c5a: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
43c5c: 2f2a 0058 movel %a2@(88),%sp@-
43c60: 47f9 0004 2830 lea 42830 <free>,%a3
43c66: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
43c68: 2f2a 007c movel %a2@(124),%sp@-
43c6c: 4e93 jsr %a3@
free (tty->cbuf);
43c6e: 2f2a 001c movel %a2@(28),%sp@-
43c72: 4e93 jsr %a3@
free (tty);
43c74: 2f0a movel %a2,%sp@-
43c76: 4e93 jsr %a3@
43c78: 4fef 0010 lea %sp@(16),%sp
}
rtems_semaphore_release (rtems_termios_ttyMutex);
43c7c: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@-
43c82: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
43c88: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4
43c8e: 4280 clrl %d0
43c90: 4e5e unlk %fp <== NOT EXECUTED
00044e80 <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)
{
44e80: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
44e84: 202e 000c movel %fp@(12),%d0
* for each transmitted character.
* It returns number of characters left to transmit
*/
int
rtems_termios_dequeue_characters (void *ttyp, int len)
{
44e88: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
44e8c: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44e90: 7002 moveq #2,%d0
44e92: b0a8 00b4 cmpl %a0@(180),%d0
44e96: 661c bnes 44eb4 <rtems_termios_dequeue_characters+0x34>
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
44e98: 4878 0002 pea 2 <DOUBLE_FLOAT>
44e9c: 2f28 00c8 movel %a0@(200),%sp@-
44ea0: 4eb9 0004 5320 jsr 45320 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
44ea6: 508f addql #8,%sp
44ea8: 4a80 tstl %d0
44eaa: 672e beqs 44eda <rtems_termios_dequeue_characters+0x5a><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
44eac: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44eae: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
44eb4: 7005 moveq #5,%d0
44eb6: b0a8 00cc cmpl %a0@(204),%d0
44eba: 6612 bnes 44ece <rtems_termios_dequeue_characters+0x4e>
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
44ebc: 2279 0005 d0b0 moveal 5d0b0 <rtems_termios_linesw+0xb4>,%a1
44ec2: 4a89 tstl %a1
44ec4: 6714 beqs 44eda <rtems_termios_dequeue_characters+0x5a><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
44ec6: 2f08 movel %a0,%sp@-
44ec8: 4e91 jsr %a1@
44eca: 588f addql #4,%sp
44ecc: 600c bras 44eda <rtems_termios_dequeue_characters+0x5a>
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
44ece: 2d48 0008 movel %a0,%fp@(8)
}
44ed2: 4e5e unlk %fp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
44ed4: 4ef9 0004 4c64 jmp 44c64 <rtems_termios_refill_transmitter>
}
44eda: 4280 clrl %d0
44edc: 4e5e unlk %fp <== NOT EXECUTED
000449a4 <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)
{
449a4: 4e56 ffd0 linkw %fp,#-48
449a8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
449ac: 246e 0008 moveal %fp@(8),%a2
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) {
449b0: 202a 00cc movel %a2@(204),%d0
449b4: eb88 lsll #5,%d0
* 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)
{
449b6: 266e 000c moveal %fp@(12),%a3
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) {
449ba: 0680 0005 d00c addil #380940,%d0
449c0: 2040 moveal %d0,%a0
* 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)
{
449c2: 242e 0010 movel %fp@(16),%d2
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) {
449c6: 4a90 tstl %a0@
449c8: 6630 bnes 449fa <rtems_termios_enqueue_raw_characters+0x56>
449ca: 2802 movel %d2,%d4
449cc: 4282 clrl %d2
/*
* 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);
449ce: 4bea 0030 lea %a2@(48),%a5
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,
449d2: 49ea 004a lea %a2@(74),%a4
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) {
449d6: 4206 clrb %d6
449d8: 6000 01f4 braw 44bce <rtems_termios_enqueue_raw_characters+0x22a>
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
449dc: 202a 00cc movel %a2@(204),%d0
449e0: 5382 subql #1,%d2
449e2: 2f0a movel %a2,%sp@-
449e4: 121b moveb %a3@+,%d1
449e6: eb88 lsll #5,%d0
449e8: 49c1 extbl %d1
449ea: 0680 0005 d00c addil #380940,%d0
449f0: 2240 moveal %d0,%a1
449f2: 2f01 movel %d1,%sp@-
449f4: 2051 moveal %a1@,%a0
449f6: 4e90 jsr %a0@
449f8: 508f addql #8,%sp
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--) {
449fa: 4a82 tstl %d2
449fc: 66de bnes 449dc <rtems_termios_enqueue_raw_characters+0x38>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
449fe: 4aaa 00e4 tstl %a2@(228)
44a02: 6600 01e2 bnew 44be6 <rtems_termios_enqueue_raw_characters+0x242>
44a06: 206a 00dc moveal %a2@(220),%a0
44a0a: 4a88 tstl %a0
44a0c: 6700 01d8 beqw 44be6 <rtems_termios_enqueue_raw_characters+0x242>
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
44a10: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
44a14: 486a 0030 pea %a2@(48) <== NOT EXECUTED
44a18: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
44a1a: 508f addql #8,%sp <== NOT EXECUTED
44a1c: 7001 moveq #1,%d0 <== NOT EXECUTED
44a1e: 2540 00e4 movel %d0,%a2@(228) <== NOT EXECUTED
44a22: 6000 01c4 braw 44be8 <rtems_termios_enqueue_raw_characters+0x244><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
44a26: 202a 00b8 movel %a2@(184),%d0
}
return 0;
}
while (len--) {
c = *buf++;
44a2a: 1e1b moveb %a3@+,%d7
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
44a2c: 0800 0009 btst #9,%d0
44a30: 6740 beqs 44a72 <rtems_termios_enqueue_raw_characters+0xce>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
44a32: 4283 clrl %d3
44a34: 162a 004a moveb %a2@(74),%d3
44a38: 4281 clrl %d1
44a3a: 122a 0049 moveb %a2@(73),%d1
44a3e: 1007 moveb %d7,%d0
44a40: 49c0 extbl %d0
44a42: b680 cmpl %d0,%d3
44a44: 661e bnes 44a64 <rtems_termios_enqueue_raw_characters+0xc0><== ALWAYS TAKEN
if (c == tty->termios.c_cc[VSTART]) {
44a46: b280 cmpl %d0,%d1 <== NOT EXECUTED
44a48: 660a bnes 44a54 <rtems_termios_enqueue_raw_characters+0xb0><== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
44a4a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a4e: 7210 moveq #16,%d1 <== NOT EXECUTED
44a50: b380 eorl %d1,%d0 <== NOT EXECUTED
44a52: 6008 bras 44a5c <rtems_termios_enqueue_raw_characters+0xb8><== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
44a54: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a58: 7a10 moveq #16,%d5 <== NOT EXECUTED
44a5a: 8085 orl %d5,%d0 <== NOT EXECUTED
44a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
44a60: 7c01 moveq #1,%d6 <== NOT EXECUTED
44a62: 6012 bras 44a76 <rtems_termios_enqueue_raw_characters+0xd2><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
44a64: b280 cmpl %d0,%d1
44a66: 660a bnes 44a72 <rtems_termios_enqueue_raw_characters+0xce><== ALWAYS TAKEN
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
44a68: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a6c: 72ef moveq #-17,%d1 <== NOT EXECUTED
44a6e: c081 andl %d1,%d0 <== NOT EXECUTED
44a70: 60ea bras 44a5c <rtems_termios_enqueue_raw_characters+0xb8><== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
44a72: 4a06 tstb %d6
44a74: 6750 beqs 44ac6 <rtems_termios_enqueue_raw_characters+0x122><== ALWAYS TAKEN
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
44a76: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a7a: 7a30 moveq #48,%d5 <== NOT EXECUTED
44a7c: 7220 moveq #32,%d1 <== NOT EXECUTED
44a7e: c085 andl %d5,%d0 <== NOT EXECUTED
44a80: b280 cmpl %d0,%d1 <== NOT EXECUTED
44a82: 6600 0148 bnew 44bcc <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
44a86: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
44a8c: 40c3 movew %sr,%d3 <== NOT EXECUTED
44a8e: 8083 orl %d3,%d0 <== NOT EXECUTED
44a90: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
44a92: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44a96: 7adf moveq #-33,%d5 <== NOT EXECUTED
44a98: c085 andl %d5,%d0 <== NOT EXECUTED
44a9a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
44a9e: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
44aa2: 671c beqs 44ac0 <rtems_termios_enqueue_raw_characters+0x11c><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
44aa4: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
44aa8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44aac: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
44ab0: 2f00 movel %d0,%sp@- <== NOT EXECUTED
44ab2: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44ab6: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44aba: 4e90 jsr %a0@ <== NOT EXECUTED
44abc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44ac0: 46c3 movew %d3,%sr <== NOT EXECUTED
44ac2: 6000 0108 braw 44bcc <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
44ac6: 222a 0060 movel %a2@(96),%d1
44aca: 5281 addql #1,%d1
44acc: 202a 0064 movel %a2@(100),%d0
44ad0: 4c40 1003 remul %d0,%d3,%d1
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
44ad4: 203c 0000 0700 movel #1792,%d0
44ada: 40c1 movew %sr,%d1
44adc: 8081 orl %d1,%d0
44ade: 46c0 movew %d0,%sr
44ae0: 2d41 fffc movel %d1,%fp@(-4)
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
44ae4: 206a 005c moveal %a2@(92),%a0
44ae8: 202a 0064 movel %a2@(100),%d0
44aec: 9088 subl %a0,%d0
44aee: 2240 moveal %d0,%a1
44af0: d3c3 addal %d3,%a1
% tty->rawInBuf.Size) > tty->highwater) &&
44af2: 2009 movel %a1,%d0
44af4: 2a2a 0064 movel %a2@(100),%d5
44af8: 4c45 0001 remul %d5,%d1,%d0
44afc: 2d45 fff8 movel %d5,%fp@(-8)
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
44b00: b2aa 00c0 cmpl %a2@(192),%d1
44b04: 6300 008a blsw 44b90 <rtems_termios_enqueue_raw_characters+0x1ec>
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
44b08: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
44b0c: 0800 0000 btst #0,%d0 <== NOT EXECUTED
44b10: 667e bnes 44b90 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
44b12: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b16: 7a01 moveq #1,%d5 <== NOT EXECUTED
44b18: 8085 orl %d5,%d0 <== NOT EXECUTED
44b1a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
44b1e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b22: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED
44b28: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED
44b2e: 6632 bnes 44b62 <rtems_termios_enqueue_raw_characters+0x1be><== NOT EXECUTED
== (FL_MDXOF ) ) {
if ((tty->flow_ctrl & FL_OSTOP) ||
44b30: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b34: 0800 0005 btst #5,%d0 <== NOT EXECUTED
44b38: 6606 bnes 44b40 <rtems_termios_enqueue_raw_characters+0x19c><== NOT EXECUTED
44b3a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
44b3e: 6650 bnes 44b90 <rtems_termios_enqueue_raw_characters+0x1ec><== 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;
44b40: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b44: 7202 moveq #2,%d1 <== NOT EXECUTED
44b46: 8081 orl %d1,%d0 <== NOT EXECUTED
44b48: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
44b4c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44b50: 2f0c movel %a4,%sp@- <== NOT EXECUTED
44b52: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44b56: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44b5a: 4e90 jsr %a0@ <== NOT EXECUTED
44b5c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44b60: 602e bras 44b90 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
44b62: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b66: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED
44b6c: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED
44b72: 661c bnes 44b90 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
tty->flow_ctrl |= FL_IRTSOFF;
44b74: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44b78: 7a04 moveq #4,%d5 <== NOT EXECUTED
44b7a: 8085 orl %d5,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
44b7c: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
44b80: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
44b84: 4a88 tstl %a0 <== NOT EXECUTED
44b86: 6708 beqs 44b90 <rtems_termios_enqueue_raw_characters+0x1ec><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
44b88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44b8c: 4e90 jsr %a0@ <== NOT EXECUTED
44b8e: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
44b90: 202e fffc movel %fp@(-4),%d0
44b94: 46c0 movew %d0,%sr
if (newTail == tty->rawInBuf.Head) {
44b96: 202a 005c movel %a2@(92),%d0
44b9a: b083 cmpl %d3,%d0
44b9c: 6604 bnes 44ba2 <rtems_termios_enqueue_raw_characters+0x1fe><== ALWAYS TAKEN
dropped++;
44b9e: 5282 addql #1,%d2 <== NOT EXECUTED
44ba0: 602a bras 44bcc <rtems_termios_enqueue_raw_characters+0x228><== NOT EXECUTED
} else {
tty->rawInBuf.theBuf[newTail] = c;
44ba2: 206a 0058 moveal %a2@(88),%a0
44ba6: 1187 3800 moveb %d7,%a0@(00000000,%d3:l)
tty->rawInBuf.Tail = newTail;
44baa: 2543 0060 movel %d3,%a2@(96)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
44bae: 4aaa 00e4 tstl %a2@(228)
44bb2: 6618 bnes 44bcc <rtems_termios_enqueue_raw_characters+0x228><== NEVER TAKEN
44bb4: 206a 00dc moveal %a2@(220),%a0
44bb8: 4a88 tstl %a0
44bba: 6710 beqs 44bcc <rtems_termios_enqueue_raw_characters+0x228><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
44bbc: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
44bc0: 2f0d movel %a5,%sp@- <== NOT EXECUTED
44bc2: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
44bc4: 508f addql #8,%sp <== NOT EXECUTED
44bc6: 7201 moveq #1,%d1 <== NOT EXECUTED
44bc8: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
44bcc: 5384 subql #1,%d4
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
44bce: 4a84 tstl %d4
44bd0: 6600 fe54 bnew 44a26 <rtems_termios_enqueue_raw_characters+0x82>
}
}
}
}
tty->rawInBufDropped += dropped;
44bd4: d5aa 0078 addl %d2,%a2@(120)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
44bd8: 2f2a 0068 movel %a2@(104),%sp@-
44bdc: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
return dropped;
44be2: 588f addql #4,%sp
44be4: 6002 bras 44be8 <rtems_termios_enqueue_raw_characters+0x244>
*/
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;
}
return 0;
44be6: 4282 clrl %d2
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
44be8: 2002 movel %d2,%d0
44bea: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5
44bf0: 4e5e unlk %fp <== NOT EXECUTED
00043cbc <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
43cbc: 4e56 ffec linkw %fp,#-20
43cc0: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
43cc4: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
43cc8: 2053 moveal %a3@,%a0
43cca: 2468 0034 moveal %a0@(52),%a2
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
43cce: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
43cd2: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
43cd6: 42a7 clrl %sp@-
43cd8: 42a7 clrl %sp@-
43cda: 2f2a 0018 movel %a2@(24),%sp@-
43cde: 4eb9 0004 5770 jsr 45770 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
43ce4: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
43ce8: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
43cea: 6708 beqs 43cf4 <rtems_termios_ioctl+0x38> <== ALWAYS TAKEN
args->ioctl_return = sc;
43cec: 2740 000c movel %d0,%a3@(12) <== NOT EXECUTED
return sc;
43cf0: 6000 02d0 braw 43fc2 <rtems_termios_ioctl+0x306> <== NOT EXECUTED
}
switch (args->command) {
43cf4: 202b 0004 movel %a3@(4),%d0
43cf8: 7204 moveq #4,%d1
43cfa: b280 cmpl %d0,%d1
43cfc: 6700 0230 beqw 43f2e <rtems_termios_ioctl+0x272>
43d00: 6514 bcss 43d16 <rtems_termios_ioctl+0x5a>
43d02: 7602 moveq #2,%d3
43d04: b680 cmpl %d0,%d3
43d06: 6774 beqs 43d7c <rtems_termios_ioctl+0xc0>
43d08: 6500 020a bcsw 43f14 <rtems_termios_ioctl+0x258>
43d0c: 123c 0001 moveb #1,%d1
43d10: b280 cmpl %d0,%d1
43d12: 662c bnes 43d40 <rtems_termios_ioctl+0x84> <== NEVER TAKEN
43d14: 604c bras 43d62 <rtems_termios_ioctl+0xa6>
43d16: 0c80 4004 667f cmpil #1074030207,%d0
43d1c: 6700 026e beqw 43f8c <rtems_termios_ioctl+0x2d0>
43d20: 620a bhis 43d2c <rtems_termios_ioctl+0x70>
43d22: 7605 moveq #5,%d3
43d24: b680 cmpl %d0,%d3
43d26: 6618 bnes 43d40 <rtems_termios_ioctl+0x84> <== ALWAYS TAKEN
43d28: 6000 01f2 braw 43f1c <rtems_termios_ioctl+0x260> <== NOT EXECUTED
43d2c: 0c80 4004 741a cmpil #1074033690,%d0
43d32: 6700 024e beqw 43f82 <rtems_termios_ioctl+0x2c6>
43d36: 0c80 8004 741b cmpil #-2147191781,%d0
43d3c: 6700 0200 beqw 43f3e <rtems_termios_ioctl+0x282>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
43d40: 202a 00cc movel %a2@(204),%d0
43d44: eb88 lsll #5,%d0
43d46: 0680 0005 d014 addil #380948,%d0
43d4c: 2240 moveal %d0,%a1
43d4e: 2051 moveal %a1@,%a0
43d50: 4a88 tstl %a0
43d52: 6700 025c beqw 43fb0 <rtems_termios_ioctl+0x2f4>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
43d56: 2f0b movel %a3,%sp@-
43d58: 2f0a movel %a2,%sp@-
43d5a: 4e90 jsr %a0@
43d5c: 2400 movel %d0,%d2
43d5e: 6000 01ae braw 43f0e <rtems_termios_ioctl+0x252>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
43d62: 4878 0024 pea 24 <OPER2+0x10>
43d66: 486a 0030 pea %a2@(48)
43d6a: 2f2b 0008 movel %a3@(8),%sp@-
43d6e: 4eb9 0004 d300 jsr 4d300 <memcpy>
break;
43d74: 4fef 000c lea %sp@(12),%sp
43d78: 6000 0238 braw 43fb2 <rtems_termios_ioctl+0x2f6>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
43d7c: 4878 0024 pea 24 <OPER2+0x10>
43d80: 2f2b 0008 movel %a3@(8),%sp@-
43d84: 486a 0030 pea %a2@(48)
43d88: 4eb9 0004 d300 jsr 4d300 <memcpy>
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
43d8e: 202a 00b8 movel %a2@(184),%d0
43d92: 4fef 000c lea %sp@(12),%sp
43d96: 0800 0009 btst #9,%d0
43d9a: 6760 beqs 43dfc <rtems_termios_ioctl+0x140>
!(tty->termios.c_iflag & IXON)) {
43d9c: 202a 0030 movel %a2@(48),%d0
43da0: 0280 0000 0400 andil #1024,%d0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
43da6: 6654 bnes 43dfc <rtems_termios_ioctl+0x140> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
43da8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43dac: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED
43db2: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
43db6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43dba: 0800 0005 btst #5,%d0 <== NOT EXECUTED
43dbe: 673c beqs 43dfc <rtems_termios_ioctl+0x140> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
43dc0: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
43dc6: 40c3 movew %sr,%d3 <== NOT EXECUTED
43dc8: 8083 orl %d3,%d0 <== NOT EXECUTED
43dca: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
43dcc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43dd0: 72df moveq #-33,%d1 <== NOT EXECUTED
43dd2: c081 andl %d1,%d0 <== NOT EXECUTED
43dd4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
43dd8: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
43ddc: 671c beqs 43dfa <rtems_termios_ioctl+0x13e> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
43dde: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(
43de2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
43de6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED
43dea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
43dec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
43df0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
43df4: 4e90 jsr %a0@ <== NOT EXECUTED
43df6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
43dfa: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
43dfc: 202a 00b8 movel %a2@(184),%d0
43e00: 0800 000a btst #10,%d0
43e04: 6724 beqs 43e2a <rtems_termios_ioctl+0x16e> <== ALWAYS TAKEN
43e06: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED
43e0a: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED
43e10: 6618 bnes 43e2a <rtems_termios_ioctl+0x16e> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
43e12: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
43e16: 76fd moveq #-3,%d3 <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
43e18: 0880 000a bclr #10,%d0 <== NOT EXECUTED
43e1c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
43e20: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e24: c083 andl %d3,%d0 <== NOT EXECUTED
43e26: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
43e2a: 202a 00b8 movel %a2@(184),%d0
43e2e: 0800 0008 btst #8,%d0
43e32: 6736 beqs 43e6a <rtems_termios_ioctl+0x1ae> <== ALWAYS TAKEN
43e34: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED
43e38: 6d30 blts 43e6a <rtems_termios_ioctl+0x1ae> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
43e3a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e3e: 0880 0008 bclr #8,%d0 <== NOT EXECUTED
43e42: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
43e46: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e4a: 44c0 movew %d0,%ccr <== NOT EXECUTED
43e4c: 6610 bnes 43e5e <rtems_termios_ioctl+0x1a2> <== NOT EXECUTED
43e4e: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
43e52: 4a88 tstl %a0 <== NOT EXECUTED
43e54: 6708 beqs 43e5e <rtems_termios_ioctl+0x1a2> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
43e56: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
43e5a: 4e90 jsr %a0@ <== NOT EXECUTED
43e5c: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
43e5e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e62: 72fb moveq #-5,%d1 <== NOT EXECUTED
43e64: c081 andl %d1,%d0 <== NOT EXECUTED
43e66: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
43e6a: 4aaa 0038 tstl %a2@(56)
43e6e: 6c0c bges 43e7c <rtems_termios_ioctl+0x1c0> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDRTS;
43e70: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e74: 08c0 0008 bset #8,%d0 <== NOT EXECUTED
43e78: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
43e7c: 222a 0030 movel %a2@(48),%d1
43e80: 0801 000c btst #12,%d1
43e84: 670c beqs 43e92 <rtems_termios_ioctl+0x1d6> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
43e86: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
43e8a: 08c0 000a bset #10,%d0 <== NOT EXECUTED
43e8e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
43e92: 0801 000a btst #10,%d1
43e96: 670c beqs 43ea4 <rtems_termios_ioctl+0x1e8>
tty->flow_ctrl |= FL_MDXON;
43e98: 202a 00b8 movel %a2@(184),%d0
43e9c: 08c0 0009 bset #9,%d0
43ea0: 2540 00b8 movel %d0,%a2@(184)
tty->termios = *(struct termios *)args->buffer;
/* check for and process change in flow control options */
termios_set_flowctrl(tty);
if (tty->termios.c_lflag & ICANON) {
43ea4: 7002 moveq #2,%d0
43ea6: c0aa 003c andl %a2@(60),%d0
43eaa: 663a bnes 43ee6 <rtems_termios_ioctl+0x22a>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
43eac: 4283 clrl %d3
43eae: 162a 0046 moveb %a2@(70),%d3
rtems_clock_get_ticks_per_second() / 10;
43eb2: 4eb9 0004 513c jsr 4513c <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
43eb8: 4c03 0800 mulsl %d3,%d0
rtems_clock_get_ticks_per_second() / 10;
43ebc: 760a moveq #10,%d3
43ebe: 4c43 0000 remul %d3,%d0,%d0
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
43ec2: 2540 0054 movel %d0,%a2@(84)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
43ec6: 4a2a 0046 tstb %a2@(70)
43eca: 6714 beqs 43ee0 <rtems_termios_ioctl+0x224> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
43ecc: 42aa 006c clrl %a2@(108) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
43ed0: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
43ed4: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED
43ed8: 6614 bnes 43eee <rtems_termios_ioctl+0x232> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
43eda: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED
43ede: 601a bras 43efa <rtems_termios_ioctl+0x23e> <== NOT EXECUTED
} else {
if (tty->termios.c_cc[VMIN]) {
43ee0: 4a2a 0047 tstb %a2@(71)
43ee4: 670e beqs 43ef4 <rtems_termios_ioctl+0x238> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
43ee6: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
43eea: 42aa 0070 clrl %a2@(112)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
43eee: 42aa 0074 clrl %a2@(116)
43ef2: 6006 bras 43efa <rtems_termios_ioctl+0x23e>
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
43ef4: 7001 moveq #1,%d0
43ef6: 2540 006c movel %d0,%a2@(108)
}
}
}
if (tty->device.setAttributes)
43efa: 206a 00a8 moveal %a2@(168),%a0
43efe: 4a88 tstl %a0
43f00: 6700 00b0 beqw 43fb2 <rtems_termios_ioctl+0x2f6>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
43f04: 486a 0030 pea %a2@(48)
43f08: 2f2a 0010 movel %a2@(16),%sp@-
43f0c: 4e90 jsr %a0@
43f0e: 508f addql #8,%sp
43f10: 6000 00a0 braw 43fb2 <rtems_termios_ioctl+0x2f6>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
43f14: 2f0a movel %a2,%sp@-
43f16: 4eba f7d0 jsr %pc@(436e8 <drainOutput>)
43f1a: 6062 bras 43f7e <rtems_termios_ioctl+0x2c2>
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
43f1c: 2014 movel %a4@,%d0 <== NOT EXECUTED
43f1e: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED
43f22: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED
43f26: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED
break;
43f2a: 6000 0086 braw 43fb2 <rtems_termios_ioctl+0x2f6> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
43f2e: 2014 movel %a4@,%d0 <== NOT EXECUTED
43f30: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED
43f34: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED
43f38: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED
break;
43f3c: 6074 bras 43fb2 <rtems_termios_ioctl+0x2f6> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
43f3e: 202a 00cc movel %a2@(204),%d0
43f42: eb88 lsll #5,%d0
43f44: 0680 0005 d000 addil #380928,%d0
43f4a: 2240 moveal %d0,%a1
43f4c: 2051 moveal %a1@,%a0
43f4e: 4a88 tstl %a0
43f50: 6708 beqs 43f5a <rtems_termios_ioctl+0x29e>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
43f52: 2f0a movel %a2,%sp@-
43f54: 4e90 jsr %a0@
43f56: 588f addql #4,%sp
43f58: 2400 movel %d0,%d2
}
tty->t_line=*(int*)(args->buffer);
43f5a: 206b 0008 moveal %a3@(8),%a0
43f5e: 2010 movel %a0@,%d0
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
43f60: 41f9 0005 cffc lea 5cffc <rtems_termios_linesw>,%a0
* 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);
43f66: 2540 00cc movel %d0,%a2@(204)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
43f6a: eb88 lsll #5,%d0
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
43f6c: 42aa 00d0 clrl %a2@(208)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
43f70: 2070 0800 moveal %a0@(00000000,%d0:l),%a0
43f74: 4a88 tstl %a0
43f76: 673a beqs 43fb2 <rtems_termios_ioctl+0x2f6> <== NEVER TAKEN
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
43f78: 2f0a movel %a2,%sp@-
43f7a: 4e90 jsr %a0@
43f7c: 2400 movel %d0,%d2
43f7e: 588f addql #4,%sp
43f80: 6030 bras 43fb2 <rtems_termios_ioctl+0x2f6>
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
43f82: 206b 0008 moveal %a3@(8),%a0
43f86: 20aa 00cc movel %a2@(204),%a0@
break;
43f8a: 6026 bras 43fb2 <rtems_termios_ioctl+0x2f6>
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
43f8c: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED
43f90: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
43f94: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
43f96: 6a06 bpls 43f9e <rtems_termios_ioctl+0x2e2> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
43f98: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED
43f9c: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
43f9e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
43fa2: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED
43fa6: d280 addl %d0,%d1 <== NOT EXECUTED
43fa8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED
43fac: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
break;
43fae: 6002 bras 43fb2 <rtems_termios_ioctl+0x2f6> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
43fb0: 740a moveq #10,%d2 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
43fb2: 2f2a 0018 movel %a2@(24),%sp@-
43fb6: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
args->ioctl_return = sc;
return sc;
43fbc: 588f addql #4,%sp
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
43fbe: 2742 000c movel %d2,%a3@(12)
return sc;
}
43fc2: 2002 movel %d2,%d0
43fc4: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
43fca: 4e5e unlk %fp <== NOT EXECUTED
00044d84 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
44d84: 4e56 0000 linkw %fp,#0
44d88: 222e 0008 movel %fp@(8),%d1
int termios_baud;
switch (baud) {
44d8c: 0c81 0000 04b0 cmpil #1200,%d1
44d92: 6700 0100 beqw 44e94 <rtems_termios_number_to_baud+0x110>
44d96: 6e68 bgts 44e00 <rtems_termios_number_to_baud+0x7c>
44d98: 0c81 0000 0086 cmpil #134,%d1
44d9e: 6700 00e0 beqw 44e80 <rtems_termios_number_to_baud+0xfc>
44da2: 6e2a bgts 44dce <rtems_termios_number_to_baud+0x4a>
44da4: 7032 moveq #50,%d0
44da6: b081 cmpl %d1,%d0
44da8: 6700 010a beqw 44eb4 <rtems_termios_number_to_baud+0x130>
44dac: 6d0a blts 44db8 <rtems_termios_number_to_baud+0x34>
44dae: 4a81 tstl %d1
44db0: 6700 00c2 beqw 44e74 <rtems_termios_number_to_baud+0xf0>
44db4: 6000 00fa braw 44eb0 <rtems_termios_number_to_baud+0x12c>
44db8: 704b moveq #75,%d0
44dba: b081 cmpl %d1,%d0
44dbc: 6700 00ba beqw 44e78 <rtems_termios_number_to_baud+0xf4>
44dc0: 103c 006e moveb #110,%d0
44dc4: b081 cmpl %d1,%d0
44dc6: 6600 00e8 bnew 44eb0 <rtems_termios_number_to_baud+0x12c>
44dca: 6000 00b0 braw 44e7c <rtems_termios_number_to_baud+0xf8>
44dce: 0c81 0000 00c8 cmpil #200,%d1
44dd4: 6700 00b2 beqw 44e88 <rtems_termios_number_to_baud+0x104>
44dd8: 6e0e bgts 44de8 <rtems_termios_number_to_baud+0x64>
44dda: 0c81 0000 0096 cmpil #150,%d1
44de0: 6600 00ce bnew 44eb0 <rtems_termios_number_to_baud+0x12c>
44de4: 6000 009e braw 44e84 <rtems_termios_number_to_baud+0x100>
44de8: 0c81 0000 012c cmpil #300,%d1
44dee: 6700 009c beqw 44e8c <rtems_termios_number_to_baud+0x108>
44df2: 0c81 0000 0258 cmpil #600,%d1
44df8: 6600 00b6 bnew 44eb0 <rtems_termios_number_to_baud+0x12c>
44dfc: 6000 0092 braw 44e90 <rtems_termios_number_to_baud+0x10c>
44e00: 0c81 0000 4b00 cmpil #19200,%d1
44e06: 6700 00a0 beqw 44ea8 <rtems_termios_number_to_baud+0x124>
44e0a: 6e2a bgts 44e36 <rtems_termios_number_to_baud+0xb2>
44e0c: 0c81 0000 0960 cmpil #2400,%d1
44e12: 6700 0088 beqw 44e9c <rtems_termios_number_to_baud+0x118>
44e16: 6e0c bgts 44e24 <rtems_termios_number_to_baud+0xa0>
44e18: 0c81 0000 0708 cmpil #1800,%d1
44e1e: 6600 0090 bnew 44eb0 <rtems_termios_number_to_baud+0x12c>
44e22: 6074 bras 44e98 <rtems_termios_number_to_baud+0x114>
44e24: 0c81 0000 12c0 cmpil #4800,%d1
44e2a: 6774 beqs 44ea0 <rtems_termios_number_to_baud+0x11c>
44e2c: 0c81 0000 2580 cmpil #9600,%d1
44e32: 667c bnes 44eb0 <rtems_termios_number_to_baud+0x12c>
44e34: 606e bras 44ea4 <rtems_termios_number_to_baud+0x120>
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
44e36: 203c 0000 1002 movel #4098,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
44e3c: 0c81 0001 c200 cmpil #115200,%d1
44e42: 6772 beqs 44eb6 <rtems_termios_number_to_baud+0x132>
44e44: 6e14 bgts 44e5a <rtems_termios_number_to_baud+0xd6>
44e46: 0c81 0000 9600 cmpil #38400,%d1
44e4c: 675e beqs 44eac <rtems_termios_number_to_baud+0x128>
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
44e4e: 5380 subql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
44e50: 0c81 0000 e100 cmpil #57600,%d1
44e56: 6658 bnes 44eb0 <rtems_termios_number_to_baud+0x12c><== NEVER TAKEN
44e58: 605c bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
44e5a: 203c 0000 1003 movel #4099,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
44e60: 0c81 0003 8400 cmpil #230400,%d1
44e66: 674e beqs 44eb6 <rtems_termios_number_to_baud+0x132>
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
44e68: 5280 addql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
44e6a: 0c81 0007 0800 cmpil #460800,%d1
44e70: 663e bnes 44eb0 <rtems_termios_number_to_baud+0x12c><== NEVER TAKEN
44e72: 6042 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 0: termios_baud = B0; break;
44e74: 4280 clrl %d0
44e76: 603e bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
44e78: 7002 moveq #2,%d0
44e7a: 603a bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 110: termios_baud = B110; break;
44e7c: 7003 moveq #3,%d0
44e7e: 6036 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 134: termios_baud = B134; break;
44e80: 7004 moveq #4,%d0
44e82: 6032 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 150: termios_baud = B150; break;
44e84: 7005 moveq #5,%d0
44e86: 602e bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 200: termios_baud = B200; break;
44e88: 7006 moveq #6,%d0
44e8a: 602a bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 300: termios_baud = B300; break;
44e8c: 7007 moveq #7,%d0
44e8e: 6026 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 600: termios_baud = B600; break;
44e90: 7008 moveq #8,%d0
44e92: 6022 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 1200: termios_baud = B1200; break;
44e94: 7009 moveq #9,%d0
44e96: 601e bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 1800: termios_baud = B1800; break;
44e98: 700a moveq #10,%d0
44e9a: 601a bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 2400: termios_baud = B2400; break;
44e9c: 700b moveq #11,%d0
44e9e: 6016 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 4800: termios_baud = B4800; break;
44ea0: 700c moveq #12,%d0
44ea2: 6012 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 9600: termios_baud = B9600; break;
44ea4: 700d moveq #13,%d0
44ea6: 600e bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 19200: termios_baud = B19200; break;
44ea8: 700e moveq #14,%d0
44eaa: 600a bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 38400: termios_baud = B38400; break;
44eac: 700f moveq #15,%d0
44eae: 6006 bras 44eb6 <rtems_termios_number_to_baud+0x132>
case 57600: termios_baud = B57600; break;
case 115200: termios_baud = B115200; break;
case 230400: termios_baud = B230400; break;
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
44eb0: 70ff moveq #-1,%d0
44eb2: 6002 bras 44eb6 <rtems_termios_number_to_baud+0x132>
{
int termios_baud;
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
44eb4: 7001 moveq #1,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
44eb6: 4e5e unlk %fp
...
00043752 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43752: 4e56 ffd8 linkw %fp,#-40
43756: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4375a: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
4375c: 282e 0008 movel %fp@(8),%d4
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43760: 42a7 clrl %sp@-
43762: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43768: 2a2e 000c movel %fp@(12),%d5
4376c: 2e2e 0010 movel %fp@(16),%d7
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43770: 4eb9 0004 5770 jsr 45770 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43776: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
4377a: 2400 movel %d0,%d2
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4377c: 6600 038c bnew 43b0a <rtems_termios_open+0x3b8>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
43780: 2879 0005 d840 moveal 5d840 <rtems_termios_ttyHead>,%a4
43786: 264c moveal %a4,%a3
43788: 6010 bras 4379a <rtems_termios_open+0x48>
if ((tty->major == major) && (tty->minor == minor))
4378a: b8ab 000c cmpl %a3@(12),%d4
4378e: 6608 bnes 43798 <rtems_termios_open+0x46>
43790: baab 0010 cmpl %a3@(16),%d5
43794: 6700 02fc beqw 43a92 <rtems_termios_open+0x340>
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) {
43798: 2653 moveal %a3@,%a3
4379a: 4a8b tstl %a3
4379c: 66ec bnes 4378a <rtems_termios_open+0x38>
4379e: 6000 0376 braw 43b16 <rtems_termios_open+0x3c4>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
437a2: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
437a8: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
437ae: 588f addql #4,%sp <== NOT EXECUTED
437b0: 6038 bras 437ea <rtems_termios_open+0x98> <== NOT EXECUTED
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
437b2: 41f9 0005 c1f4 lea 5c1f4 <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
437b8: 4bf9 0004 2b18 lea 42b18 <malloc>,%a5
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
437be: 2750 0064 movel %a0@,%a3@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
437c2: 202b 0064 movel %a3@(100),%d0
437c6: 2f00 movel %d0,%sp@-
437c8: 4e95 jsr %a5@
if (tty->rawInBuf.theBuf == NULL) {
437ca: 588f addql #4,%sp
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
437cc: 2600 movel %d0,%d3
437ce: 2740 0058 movel %d0,%a3@(88)
if (tty->rawInBuf.theBuf == NULL) {
437d2: 661c bnes 437f0 <rtems_termios_open+0x9e> <== ALWAYS TAKEN
free(tty);
437d4: 2f0b movel %a3,%sp@- <== NOT EXECUTED
437d6: 4eb9 0004 2830 jsr 42830 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
437dc: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
437e2: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
437e8: 508f addql #8,%sp <== NOT EXECUTED
437ea: 741a moveq #26,%d2 <== NOT EXECUTED
437ec: 6000 031c braw 43b0a <rtems_termios_open+0x3b8> <== NOT EXECUTED
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
437f0: 43f9 0005 c1f8 lea 5c1f8 <rtems_termios_raw_output_size>,%a1
437f6: 2751 0088 movel %a1@,%a3@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
437fa: 202b 0088 movel %a3@(136),%d0
437fe: 2f00 movel %d0,%sp@-
43800: 4e95 jsr %a5@
if (tty->rawOutBuf.theBuf == NULL) {
43802: 588f addql #4,%sp
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
43804: 2c00 movel %d0,%d6
43806: 2740 007c movel %d0,%a3@(124)
if (tty->rawOutBuf.theBuf == NULL) {
4380a: 6620 bnes 4382c <rtems_termios_open+0xda> <== ALWAYS TAKEN
free((void *)(tty->rawInBuf.theBuf));
4380c: 2f03 movel %d3,%sp@- <== NOT EXECUTED
4380e: 45f9 0004 2830 lea 42830 <free>,%a2 <== NOT EXECUTED
43814: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
43816: 2f0b movel %a3,%sp@- <== NOT EXECUTED
43818: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4381a: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
43820: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
43826: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
4382a: 60be bras 437ea <rtems_termios_open+0x98> <== NOT EXECUTED
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
4382c: 2f39 0005 c1f0 movel 5c1f0 <rtems_termios_cbufsize>,%sp@-
43832: 4e95 jsr %a5@
if (tty->cbuf == NULL) {
43834: 588f addql #4,%sp
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
43836: 2740 001c movel %d0,%a3@(28)
if (tty->cbuf == NULL) {
4383a: 6624 bnes 43860 <rtems_termios_open+0x10e> <== ALWAYS TAKEN
free((void *)(tty->rawOutBuf.theBuf));
4383c: 2f06 movel %d6,%sp@- <== NOT EXECUTED
4383e: 45f9 0004 2830 lea 42830 <free>,%a2 <== NOT EXECUTED
43844: 4e92 jsr %a2@ <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
43846: 2f03 movel %d3,%sp@- <== NOT EXECUTED
43848: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
4384a: 2f0b movel %a3,%sp@- <== NOT EXECUTED
4384c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4384e: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
43854: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4385a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
4385e: 608a bras 437ea <rtems_termios_open+0x98> <== NOT EXECUTED
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
43860: 42ab 00d4 clrl %a3@(212)
tty->tty_snd.sw_arg = NULL;
43864: 42ab 00d8 clrl %a3@(216)
tty->tty_rcv.sw_pfn = NULL;
43868: 42ab 00dc clrl %a3@(220)
tty->tty_rcv.sw_arg = NULL;
4386c: 42ab 00e0 clrl %a3@(224)
tty->tty_rcvwakeup = 0;
43870: 42ab 00e4 clrl %a3@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
43874: 268c movel %a4,%a3@
tty->back = NULL;
43876: 42ab 0004 clrl %a3@(4)
if (rtems_termios_ttyHead != NULL)
4387a: 4a8c tstl %a4
4387c: 6704 beqs 43882 <rtems_termios_open+0x130>
rtems_termios_ttyHead->back = tty;
4387e: 294b 0004 movel %a3,%a4@(4)
rtems_termios_ttyHead = tty;
43882: 23ca 0005 d840 movel %a2,5d840 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
43888: 4ab9 0005 d83c tstl 5d83c <rtems_termios_ttyTail>
4388e: 6606 bnes 43896 <rtems_termios_open+0x144>
rtems_termios_ttyTail = tty;
43890: 23ca 0005 d83c movel %a2,5d83c <rtems_termios_ttyTail>
tty->minor = minor;
43896: 2545 0010 movel %d5,%a2@(16)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4389a: 49f9 0004 5538 lea 45538 <rtems_semaphore_create>,%a4
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
438a0: 2544 000c movel %d4,%a2@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
438a4: 486a 0014 pea %a2@(20)
rtems_build_name ('T', 'R', 'i', c),
438a8: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
438ae: 42a7 clrl %sp@-
438b0: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'i', c),
438b4: 49c0 extbl %d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
438b6: 4878 0001 pea 1 <ADD>
438ba: 0080 5452 6900 oril #1414686976,%d0
438c0: 2f00 movel %d0,%sp@-
438c2: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
438c4: 4fef 0014 lea %sp@(20),%sp
438c8: 4a80 tstl %d0
438ca: 6600 0228 bnew 43af4 <rtems_termios_open+0x3a2>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
438ce: 486a 0018 pea %a2@(24)
rtems_build_name ('T', 'R', 'o', c),
438d2: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
438d8: 42a7 clrl %sp@-
438da: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'o', c),
438de: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
438e0: 4878 0001 pea 1 <ADD>
438e4: 0080 5452 6f00 oril #1414688512,%d0
438ea: 2f00 movel %d0,%sp@-
438ec: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
438ee: 4fef 0014 lea %sp@(20),%sp
438f2: 4a80 tstl %d0
438f4: 6600 01fe bnew 43af4 <rtems_termios_open+0x3a2>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
438f8: 486a 008c pea %a2@(140)
rtems_build_name ('T', 'R', 'x', c),
438fc: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
43902: 42a7 clrl %sp@-
43904: 4878 0020 pea 20 <OPER2+0xc>
rtems_build_name ('T', 'R', 'x', c),
43908: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4390a: 0080 5452 7800 oril #1414690816,%d0
43910: 42a7 clrl %sp@-
43912: 2f00 movel %d0,%sp@-
43914: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
43916: 4fef 0014 lea %sp@(20),%sp
4391a: 4a80 tstl %d0
4391c: 6600 01d6 bnew 43af4 <rtems_termios_open+0x3a2>
rtems_fatal_error_occurred (sc);
tty->rawOutBufState = rob_idle;
43920: 42aa 0094 clrl %a2@(148)
/*
* Set callbacks
*/
tty->device = *callbacks;
43924: 4878 0020 pea 20 <OPER2+0xc>
43928: 2f2e 0014 movel %fp@(20),%sp@-
4392c: 486a 0098 pea %a2@(152)
43930: 4eb9 0004 d300 jsr 4d300 <memcpy>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
43936: 4fef 000c lea %sp@(12),%sp
4393a: 7002 moveq #2,%d0
4393c: b0aa 00b4 cmpl %a2@(180),%d0
43940: 6662 bnes 439a4 <rtems_termios_open+0x252>
sc = rtems_task_create (
43942: 486a 00c8 pea %a2@(200)
43946: 49f9 0004 5928 lea 45928 <rtems_task_create>,%a4
rtems_build_name ('T', 'x', 'T', c),
4394c: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
43952: 42a7 clrl %sp@-
43954: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('T', 'x', 'T', c),
43958: 49c0 extbl %d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
4395a: 4878 0400 pea 400 <D_BIAS+0x2>
4395e: 4878 000a pea a <LASTO>
43962: 0080 5478 5400 oril #1417171968,%d0
43968: 2f00 movel %d0,%sp@-
4396a: 4e94 jsr %a4@
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
4396c: 4fef 0018 lea %sp@(24),%sp
43970: 4a80 tstl %d0
43972: 6600 0180 bnew 43af4 <rtems_termios_open+0x3a2>
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
43976: 486a 00c4 pea %a2@(196)
rtems_build_name ('R', 'x', 'T', c),
4397a: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
43980: 42a7 clrl %sp@-
43982: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('R', 'x', 'T', c),
43986: 49c0 extbl %d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
43988: 4878 0400 pea 400 <D_BIAS+0x2>
4398c: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1>
43990: 0080 5278 5400 oril #1383617536,%d0
43996: 2f00 movel %d0,%sp@-
43998: 4e94 jsr %a4@
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
4399a: 4fef 0018 lea %sp@(24),%sp
4399e: 4a80 tstl %d0
439a0: 6600 0152 bnew 43af4 <rtems_termios_open+0x3a2>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
439a4: 4aaa 00a0 tstl %a2@(160)
439a8: 6708 beqs 439b2 <rtems_termios_open+0x260>
439aa: 7202 moveq #2,%d1
439ac: b2aa 00b4 cmpl %a2@(180),%d1
439b0: 662c bnes 439de <rtems_termios_open+0x28c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
439b2: 486a 0068 pea %a2@(104)
rtems_build_name ('T', 'R', 'r', c),
439b6: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
439bc: 42a7 clrl %sp@-
439be: 4878 0024 pea 24 <OPER2+0x10>
rtems_build_name ('T', 'R', 'r', c),
439c2: 49c0 extbl %d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
439c4: 0080 5452 7200 oril #1414689280,%d0
439ca: 42a7 clrl %sp@-
439cc: 2f00 movel %d0,%sp@-
439ce: 4eb9 0004 5538 jsr 45538 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
439d4: 4fef 0014 lea %sp@(20),%sp
439d8: 4a80 tstl %d0
439da: 6600 0118 bnew 43af4 <rtems_termios_open+0x3a2>
/*
* 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;
439de: 203c 0000 08bd movel #2237,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
439e4: 307c 2502 moveaw #9474,%a0
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
439e8: 327c 1805 moveaw #6149,%a1
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
439ec: 2540 0038 movel %d0,%a2@(56)
tty->termios.c_lflag =
439f0: 223c 0000 823b movel #33339,%d1
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
439f6: 7003 moveq #3,%d0
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag =
439f8: 2541 003c movel %d1,%a2@(60)
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
439fc: 1540 0041 moveb %d0,%a2@(65)
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
43a00: 707f moveq #127,%d0
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;
43a02: 42aa 00b8 clrl %a2@(184)
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';
43a06: 1540 0043 moveb %d0,%a2@(67)
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
43a0a: 7004 moveq #4,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
43a0c: 2548 0030 movel %a0,%a2@(48)
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';
43a10: 1540 0045 moveb %d0,%a2@(69)
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
43a14: 7011 moveq #17,%d0
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
43a16: 2549 0034 movel %a1,%a2@(52)
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';
43a1a: 721c moveq #28,%d1
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';
tty->termios.c_cc[VSTART] = '\021';
43a1c: 1540 0049 moveb %d0,%a2@(73)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
43a20: 701a moveq #26,%d0
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';
43a22: 1541 0042 moveb %d1,%a2@(66)
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
43a26: 7215 moveq #21,%d1
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';
tty->termios.c_cc[VSUSP] = '\032';
43a28: 1540 004b moveb %d0,%a2@(75)
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
43a2c: 700f moveq #15,%d0
ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
43a2e: 1541 0044 moveb %d1,%a2@(68)
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
43a32: 4201 clrb %d1
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
43a34: 1540 004e moveb %d0,%a2@(78)
tty->termios.c_cc[VWERASE] = '\027';
tty->termios.c_cc[VLNEXT] = '\026';
43a38: 7016 moveq #22,%d0
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
43a3a: 1541 004c moveb %d1,%a2@(76)
tty->termios.c_cc[VEOL2] = '\000';
43a3e: 1541 0051 moveb %d1,%a2@(81)
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
43a42: 7213 moveq #19,%d1
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';
43a44: 1540 0050 moveb %d0,%a2@(80)
/* 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;
43a48: 202a 0064 movel %a2@(100),%d0
43a4c: e288 lsrl #1,%d0
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
43a4e: 1541 004a moveb %d1,%a2@(74)
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
43a52: 7212 moveq #18,%d1
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
43a54: 206a 0064 moveal %a2@(100),%a0
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';
43a58: 1541 004d moveb %d1,%a2@(77)
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;
43a5c: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
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';
43a60: 7217 moveq #23,%d1
/* start with no flow control, clear flow control flags */
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
43a62: 2540 00bc movel %d0,%a2@(188)
tty->highwater = tty->rawInBuf.Size * 3/4;
43a66: 2008 movel %a0,%d0
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';
43a68: 1541 004f moveb %d1,%a2@(79)
tty->flow_ctrl = 0;
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
43a6c: e488 lsrl #2,%d0
43a6e: 2540 00c0 movel %d0,%a2@(192)
/*
* Bump name characer
*/
if (c++ == 'z')
43a72: 1039 0005 c1fc moveb 5c1fc <c.6222>,%d0
43a78: 49c0 extbl %d0
43a7a: 2200 movel %d0,%d1
43a7c: 5281 addql #1,%d1
43a7e: 13c1 0005 c1fc moveb %d1,5c1fc <c.6222>
43a84: 727a moveq #122,%d1
43a86: b280 cmpl %d0,%d1
43a88: 6608 bnes 43a92 <rtems_termios_open+0x340> <== ALWAYS TAKEN
c = 'a';
43a8a: 7061 moveq #97,%d0 <== NOT EXECUTED
43a8c: 13c0 0005 c1fc moveb %d0,5c1fc <c.6222> <== NOT EXECUTED
}
args->iop->data1 = tty;
43a92: 2247 moveal %d7,%a1
43a94: 2051 moveal %a1@,%a0
if (!tty->refcount++) {
43a96: 202b 0008 movel %a3@(8),%d0
43a9a: 2200 movel %d0,%d1
43a9c: 5281 addql #1,%d1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
43a9e: 214b 0034 movel %a3,%a0@(52)
if (!tty->refcount++) {
43aa2: 2741 0008 movel %d1,%a3@(8)
43aa6: 4a80 tstl %d0
43aa8: 6652 bnes 43afc <rtems_termios_open+0x3aa>
if (tty->device.firstOpen)
43aaa: 206b 0098 moveal %a3@(152),%a0
43aae: 4a88 tstl %a0
43ab0: 670c beqs 43abe <rtems_termios_open+0x36c>
(*tty->device.firstOpen)(major, minor, arg);
43ab2: 2f07 movel %d7,%sp@-
43ab4: 2f05 movel %d5,%sp@-
43ab6: 2f04 movel %d4,%sp@-
43ab8: 4e90 jsr %a0@
43aba: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
43abe: 7002 moveq #2,%d0
43ac0: b0ab 00b4 cmpl %a3@(180),%d0
43ac4: 6636 bnes 43afc <rtems_termios_open+0x3aa>
sc = rtems_task_start(
43ac6: 2f0b movel %a3,%sp@-
43ac8: 487a 112a pea %pc@(44bf4 <rtems_termios_rxdaemon>)
43acc: 45f9 0004 5ba4 lea 45ba4 <rtems_task_start>,%a2
43ad2: 2f2b 00c4 movel %a3@(196),%sp@-
43ad6: 4e92 jsr %a2@
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
43ad8: 4fef 000c lea %sp@(12),%sp
43adc: 4a80 tstl %d0
43ade: 6614 bnes 43af4 <rtems_termios_open+0x3a2> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
43ae0: 2f0b movel %a3,%sp@-
43ae2: 487a 1334 pea %pc@(44e18 <rtems_termios_txdaemon>)
43ae6: 2f2b 00c8 movel %a3@(200),%sp@-
43aea: 4e92 jsr %a2@
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
43aec: 4fef 000c lea %sp@(12),%sp
43af0: 4a80 tstl %d0
43af2: 6708 beqs 43afc <rtems_termios_open+0x3aa> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
43af4: 2f00 movel %d0,%sp@-
43af6: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred>
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
43afc: 2f39 0005 d838 movel 5d838 <rtems_termios_ttyMutex>,%sp@-
43b02: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
43b08: 588f addql #4,%sp
}
43b0a: 2002 movel %d2,%d0
43b0c: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5
43b12: 4e5e unlk %fp
43b14: 4e75 rts
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
43b16: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3>
43b1a: 4878 0001 pea 1 <ADD>
43b1e: 4eb9 0004 2444 jsr 42444 <calloc>
if (tty == NULL) {
43b24: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
43b26: 2640 moveal %d0,%a3
43b28: 2440 moveal %d0,%a2
if (tty == NULL) {
43b2a: 4a80 tstl %d0
43b2c: 6600 fc84 bnew 437b2 <rtems_termios_open+0x60>
43b30: 6000 fc70 braw 437a2 <rtems_termios_open+0x50> <== NOT EXECUTED
00043fce <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
43fce: 4e56 ffe0 linkw %fp,#-32
43fd2: 202e 0008 movel %fp@(8),%d0
43fd6: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
43fda: 242e 000c movel %fp@(12),%d2
const unsigned char *buf = _buf;
43fde: 2640 moveal %d0,%a3
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
43fe0: 246e 0010 moveal %fp@(16),%a2
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
43fe4: 4aaa 00b4 tstl %a2@(180)
43fe8: 661c bnes 44006 <rtems_termios_puts+0x38>
(*tty->device.write)(tty->minor, (void *)buf, len);
43fea: 2d42 0010 movel %d2,%fp@(16)
43fee: 2d40 000c movel %d0,%fp@(12)
43ff2: 2d6a 0010 0008 movel %a2@(16),%fp@(8)
43ff8: 226a 00a4 moveal %a2@(164),%a1
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
43ffc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
44002: 4e5e unlk %fp
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);
44004: 4ed1 jmp %a1@
return;
}
newHead = tty->rawOutBuf.Head;
44006: 2c2a 0080 movel %a2@(128),%d6
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
4400a: 2a3c 0000 0700 movel #1792,%d5
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain(
44010: 49f9 0004 5770 lea 45770 <rtems_semaphore_obtain>,%a4
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
44016: 6000 009e braw 440b6 <rtems_termios_puts+0xe8>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
4401a: 202a 0088 movel %a2@(136),%d0
4401e: 5286 addql #1,%d6
44020: 4c40 6004 remul %d0,%d4,%d6
rtems_interrupt_disable (level);
44024: 2005 movel %d5,%d0
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44026: 2c04 movel %d4,%d6
rtems_interrupt_disable (level);
44028: 40c3 movew %sr,%d3
4402a: 8083 orl %d3,%d0
4402c: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
4402e: 602a bras 4405a <rtems_termios_puts+0x8c>
tty->rawOutBufState = rob_wait;
44030: 7002 moveq #2,%d0
44032: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44036: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain(
44038: 42a7 clrl %sp@-
4403a: 42a7 clrl %sp@-
4403c: 2f2a 008c movel %a2@(140),%sp@-
44040: 4e94 jsr %a4@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44042: 4fef 000c lea %sp@(12),%sp
44046: 4a80 tstl %d0
44048: 6708 beqs 44052 <rtems_termios_puts+0x84> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
4404a: 2f00 movel %d0,%sp@- <== NOT EXECUTED
4404c: 4eb9 0004 5e00 jsr 45e00 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interrupt_disable (level);
44052: 2005 movel %d5,%d0
44054: 40c3 movew %sr,%d3
44056: 8083 orl %d3,%d0
44058: 46c0 movew %d0,%sr
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
4405a: 202a 0084 movel %a2@(132),%d0
4405e: b084 cmpl %d4,%d0
44060: 67ce beqs 44030 <rtems_termios_puts+0x62>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
44062: 202a 0080 movel %a2@(128),%d0
44066: 206a 007c moveal %a2@(124),%a0
4406a: 119b 0800 moveb %a3@+,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
4406e: 2544 0080 movel %d4,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
44072: 4aaa 0094 tstl %a2@(148)
44076: 663a bnes 440b2 <rtems_termios_puts+0xe4>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
44078: 202a 00b8 movel %a2@(184),%d0
4407c: 0800 0004 btst #4,%d0
44080: 661e bnes 440a0 <rtems_termios_puts+0xd2> <== NEVER TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44082: 202a 0084 movel %a2@(132),%d0
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
(*tty->device.write)(tty->minor,
44086: 4878 0001 pea 1 <ADD>
4408a: d0aa 007c addl %a2@(124),%d0
4408e: 2f00 movel %d0,%sp@-
44090: 2f2a 0010 movel %a2@(16),%sp@-
44094: 206a 00a4 moveal %a2@(164),%a0
44098: 4e90 jsr %a0@
4409a: 4fef 000c lea %sp@(12),%sp
4409e: 600c bras 440ac <rtems_termios_puts+0xde>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
440a0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
440a4: 7220 moveq #32,%d1 <== NOT EXECUTED
440a6: 8081 orl %d1,%d0 <== NOT EXECUTED
440a8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
440ac: 7001 moveq #1,%d0
440ae: 2540 0094 movel %d0,%a2@(148)
}
rtems_interrupt_enable (level);
440b2: 46c3 movew %d3,%sr
len--;
440b4: 5382 subql #1,%d2
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
440b6: 4a82 tstl %d2
440b8: 6600 ff60 bnew 4401a <rtems_termios_puts+0x4c>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
440bc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
440c2: 4e5e unlk %fp <== NOT EXECUTED
000446b2 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
446b2: 4e56 ffd4 linkw %fp,#-44
446b6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
446ba: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
446be: 2053 moveal %a3@,%a0
uint32_t count = args->count;
446c0: 262b 0010 movel %a3@(16),%d3
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
446c4: 2468 0034 moveal %a0@(52),%a2
uint32_t count = args->count;
char *buffer = args->buffer;
446c8: 2a6b 000c moveal %a3@(12),%a5
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
446cc: 42a7 clrl %sp@-
446ce: 42a7 clrl %sp@-
446d0: 2f2a 0014 movel %a2@(20),%sp@-
446d4: 4eb9 0004 5770 jsr 45770 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
446da: 4fef 000c lea %sp@(12),%sp
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);
446de: 2800 movel %d0,%d4
if (sc != RTEMS_SUCCESSFUL)
446e0: 6600 029a bnew 4497c <rtems_termios_read+0x2ca>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
446e4: 202a 00cc movel %a2@(204),%d0
446e8: eb88 lsll #5,%d0
446ea: 0680 0005 d004 addil #380932,%d0
446f0: 2240 moveal %d0,%a1
446f2: 2051 moveal %a1@,%a0
446f4: 4a88 tstl %a0
446f6: 671e beqs 44716 <rtems_termios_read+0x64>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
446f8: 2f0b movel %a3,%sp@-
446fa: 2f0a movel %a2,%sp@-
446fc: 4e90 jsr %a0@
446fe: 2800 movel %d0,%d4
tty->tty_rcvwakeup = 0;
44700: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
44704: 2f2a 0014 movel %a2@(20),%sp@-
44708: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
return sc;
4470e: 4fef 000c lea %sp@(12),%sp
44712: 6000 0268 braw 4497c <rtems_termios_read+0x2ca>
}
if (tty->cindex == tty->ccount) {
44716: 202a 0020 movel %a2@(32),%d0
4471a: b0aa 0024 cmpl %a2@(36),%d0
4471e: 6600 0234 bnew 44954 <rtems_termios_read+0x2a2>
tty->cindex = tty->ccount = 0;
44722: 42aa 0020 clrl %a2@(32)
tty->read_start_column = tty->column;
44726: 256a 0028 002c movel %a2@(40),%a2@(44)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
4472c: 42aa 0024 clrl %a2@(36)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
44730: 4aaa 00a0 tstl %a2@(160)
44734: 6700 00da beqw 44810 <rtems_termios_read+0x15e>
44738: 4aaa 00b4 tstl %a2@(180)
4473c: 6600 00d2 bnew 44810 <rtems_termios_read+0x15e>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
44740: 7002 moveq #2,%d0
44742: c0aa 003c andl %a2@(60),%d0
44746: 673e beqs 44786 <rtems_termios_read+0xd4> <== NEVER TAKEN
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
44748: 49f9 0004 5c4c lea 45c4c <rtems_task_wake_after>,%a4
} else {
if (siproc (n, tty))
4474e: 243c 0004 4592 movel #279954,%d2
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
44754: 2f2a 0010 movel %a2@(16),%sp@-
44758: 206a 00a0 moveal %a2@(160),%a0
4475c: 4e90 jsr %a0@
if (n < 0) {
4475e: 588f addql #4,%sp
44760: 4a80 tstl %d0
44762: 6c0a bges 4476e <rtems_termios_read+0xbc>
rtems_task_wake_after (1);
44764: 4878 0001 pea 1 <ADD>
44768: 4e94 jsr %a4@
4476a: 588f addql #4,%sp
4476c: 60e6 bras 44754 <rtems_termios_read+0xa2>
} else {
if (siproc (n, tty))
4476e: 2f0a movel %a2,%sp@-
44770: 2042 moveal %d2,%a0
44772: 0280 0000 00ff andil #255,%d0
44778: 2f00 movel %d0,%sp@-
4477a: 4e90 jsr %a0@
4477c: 508f addql #8,%sp
4477e: 4a80 tstl %d0
44780: 67d2 beqs 44754 <rtems_termios_read+0xa2>
44782: 6000 01d0 braw 44954 <rtems_termios_read+0x2a2>
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
44786: 49f9 0004 5154 lea 45154 <rtems_clock_get_ticks_since_boot>,%a4<== NOT EXECUTED
4478c: 4e94 jsr %a4@ <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
4478e: 2c3c 0004 5c4c movel #285772,%d6 <== NOT EXECUTED
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
44794: 2400 movel %d0,%d2 <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
44796: 2a3c 0004 4592 movel #279954,%d5 <== NOT EXECUTED
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4479c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
447a0: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
447a4: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
447a6: 588f addql #4,%sp <== NOT EXECUTED
447a8: 4a80 tstl %d0 <== NOT EXECUTED
447aa: 6c34 bges 447e0 <rtems_termios_read+0x12e> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
447ac: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED
447b0: 670e beqs 447c0 <rtems_termios_read+0x10e> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
447b2: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED
447b6: 671c beqs 447d4 <rtems_termios_read+0x122> <== NOT EXECUTED
447b8: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED
447bc: 6716 beqs 447d4 <rtems_termios_read+0x122> <== NOT EXECUTED
447be: 6008 bras 447c8 <rtems_termios_read+0x116> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
447c0: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED
447c4: 6700 018e beqw 44954 <rtems_termios_read+0x2a2> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
447c8: 4e94 jsr %a4@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
447ca: 9082 subl %d2,%d0 <== NOT EXECUTED
447cc: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED
447d0: 6200 0182 bhiw 44954 <rtems_termios_read+0x2a2> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
447d4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
447d8: 2246 moveal %d6,%a1 <== NOT EXECUTED
447da: 4e91 jsr %a1@ <== NOT EXECUTED
447dc: 588f addql #4,%sp <== NOT EXECUTED
447de: 60bc bras 4479c <rtems_termios_read+0xea> <== NOT EXECUTED
} else {
siproc (n, tty);
447e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
447e2: 2045 moveal %d5,%a0 <== NOT EXECUTED
447e4: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED
447ea: 2f00 movel %d0,%sp@- <== NOT EXECUTED
447ec: 4e90 jsr %a0@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
447ee: 508f addql #8,%sp <== NOT EXECUTED
447f0: 4281 clrl %d1 <== NOT EXECUTED
447f2: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED
447f6: 1200 moveb %d0,%d1 <== NOT EXECUTED
447f8: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED
447fc: 6f00 0156 blew 44954 <rtems_termios_read+0x2a2> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
44800: 4a00 tstb %d0 <== NOT EXECUTED
44802: 6798 beqs 4479c <rtems_termios_read+0xea> <== NOT EXECUTED
44804: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED
44808: 6792 beqs 4479c <rtems_termios_read+0xea> <== NOT EXECUTED
then = rtems_clock_get_ticks_since_boot();
4480a: 4e94 jsr %a4@ <== NOT EXECUTED
4480c: 2400 movel %d0,%d2 <== NOT EXECUTED
4480e: 608c bras 4479c <rtems_termios_read+0xea> <== 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)(
44810: 2e0a movel %a2,%d7
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
44812: 7401 moveq #1,%d2
44814: 49fa fd7c lea %pc@(44592 <siproc>),%a4
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)(
44818: 0687 0000 0049 addil #73,%d7
/*
* Wait for characters
*/
if ( wait ) {
sc = rtems_semaphore_obtain(
4481e: 2c3c 0004 5770 movel #284528,%d6
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
44824: 2a2a 0074 movel %a2@(116),%d5
44828: 6000 00e2 braw 4490c <rtems_termios_read+0x25a>
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;
4482c: 2a2a 005c movel %a2@(92),%d5
44830: 5285 addql #1,%d5
44832: 202a 0064 movel %a2@(100),%d0
c = tty->rawInBuf.theBuf[newHead];
44836: 206a 0058 moveal %a2@(88),%a0
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;
4483a: 4c40 5001 remul %d0,%d1,%d5
c = tty->rawInBuf.theBuf[newHead];
4483e: 1030 1800 moveb %a0@(00000000,%d1:l),%d0
tty->rawInBuf.Head = newHead;
44842: 2541 005c movel %d1,%a2@(92)
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
44846: 1d40 ffff moveb %d0,%fp@(-1)
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
4484a: 202a 0060 movel %a2@(96),%d0
4484e: 226a 0064 moveal %a2@(100),%a1
44852: 43f1 0800 lea %a1@(00000000,%d0:l),%a1
44856: 93c1 subal %d1,%a1
% tty->rawInBuf.Size)
44858: 2a09 movel %a1,%d5
4485a: 206a 0064 moveal %a2@(100),%a0
4485e: 2008 movel %a0,%d0
44860: 4c40 5001 remul %d0,%d1,%d5
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
44864: b2aa 00bc cmpl %a2@(188),%d1
44868: 646a bccs 448d4 <rtems_termios_read+0x222> <== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
4486a: 202a 00b8 movel %a2@(184),%d0
4486e: 72fe moveq #-2,%d1
44870: c081 andl %d1,%d0
44872: 2540 00b8 movel %d0,%a2@(184)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
44876: 202a 00b8 movel %a2@(184),%d0
4487a: 0280 0000 0202 andil #514,%d0
44880: 0c80 0000 0202 cmpil #514,%d0
44886: 6626 bnes 448ae <rtems_termios_read+0x1fc> <== ALWAYS TAKEN
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
44888: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED
4488c: 670a beqs 44898 <rtems_termios_read+0x1e6> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
4488e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44892: 0800 0005 btst #5,%d0 <== NOT EXECUTED
44896: 6716 beqs 448ae <rtems_termios_read+0x1fc> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
44898: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
4489c: 2f07 movel %d7,%sp@- <== NOT EXECUTED
4489e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
448a2: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
448a6: 4e90 jsr %a0@ <== NOT EXECUTED
448a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
448ac: 6026 bras 448d4 <rtems_termios_read+0x222> <== NOT EXECUTED
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
448ae: 202a 00b8 movel %a2@(184),%d0
448b2: 0800 0008 btst #8,%d0
448b6: 671c beqs 448d4 <rtems_termios_read+0x222> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
448b8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
448bc: 7afb moveq #-5,%d5 <== NOT EXECUTED
448be: c085 andl %d5,%d0 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
448c0: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
448c4: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
448c8: 4a88 tstl %a0 <== NOT EXECUTED
448ca: 6708 beqs 448d4 <rtems_termios_read+0x222> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
448cc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
448d0: 4e90 jsr %a0@ <== NOT EXECUTED
448d2: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
448d4: 7002 moveq #2,%d0
448d6: 4285 clrl %d5
448d8: 1a2e ffff moveb %fp@(-1),%d5
448dc: c0aa 003c andl %a2@(60),%d0
448e0: 670e beqs 448f0 <rtems_termios_read+0x23e> <== NEVER TAKEN
if (siproc (c, tty))
448e2: 2f0a movel %a2,%sp@-
448e4: 2f05 movel %d5,%sp@-
448e6: 4e94 jsr %a4@
448e8: 508f addql #8,%sp
wait = 0;
448ea: 4a80 tstl %d0
448ec: 57c0 seq %d0
448ee: 6014 bras 44904 <rtems_termios_read+0x252>
} else {
siproc (c, tty);
448f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
448f2: 2f05 movel %d5,%sp@- <== NOT EXECUTED
448f4: 4e94 jsr %a4@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
448f6: 508f addql #8,%sp <== NOT EXECUTED
448f8: 4280 clrl %d0 <== NOT EXECUTED
448fa: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED
wait = 0;
448fe: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED
44902: 5ec0 sgt %d0 <== NOT EXECUTED
44904: 49c0 extbl %d0
44906: c480 andl %d0,%d2
}
timeout = tty->rawInBufSemaphoreTimeout;
44908: 2a2a 0070 movel %a2@(112),%d5
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
4490c: 222a 005c movel %a2@(92),%d1
44910: 202a 0060 movel %a2@(96),%d0
44914: b081 cmpl %d1,%d0
44916: 6710 beqs 44928 <rtems_termios_read+0x276>
(tty->ccount < (CBUFSIZE-1))) {
44918: 2039 0005 c1f0 movel 5c1f0 <rtems_termios_cbufsize>,%d0
4491e: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44920: b0aa 0020 cmpl %a2@(32),%d0
44924: 6e00 ff06 bgtw 4482c <rtems_termios_read+0x17a>
}
/*
* Wait for characters
*/
if ( wait ) {
44928: 4a82 tstl %d2
4492a: 6728 beqs 44954 <rtems_termios_read+0x2a2>
sc = rtems_semaphore_obtain(
4492c: 2f05 movel %d5,%sp@-
4492e: 2f2a 006c movel %a2@(108),%sp@-
44932: 2046 moveal %d6,%a0
44934: 2f2a 0068 movel %a2@(104),%sp@-
44938: 4e90 jsr %a0@
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
4493a: 4fef 000c lea %sp@(12),%sp
4493e: 4a80 tstl %d0
44940: 67ca beqs 4490c <rtems_termios_read+0x25a> <== ALWAYS TAKEN
44942: 6010 bras 44954 <rtems_termios_read+0x2a2> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
44944: 206a 001c moveal %a2@(28),%a0
count--;
44948: 5383 subql #1,%d3
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
4494a: 1af0 0800 moveb %a0@(00000000,%d0:l),%a5@+
4494e: 5280 addql #1,%d0
44950: 2540 0024 movel %d0,%a2@(36)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
44954: 4a83 tstl %d3
44956: 670a beqs 44962 <rtems_termios_read+0x2b0> <== NEVER TAKEN
44958: 202a 0024 movel %a2@(36),%d0
4495c: b0aa 0020 cmpl %a2@(32),%d0
44960: 6de2 blts 44944 <rtems_termios_read+0x292>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
44962: 202b 0010 movel %a3@(16),%d0
44966: 9083 subl %d3,%d0
44968: 2740 0018 movel %d0,%a3@(24)
tty->tty_rcvwakeup = 0;
4496c: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
44970: 2f2a 0014 movel %a2@(20),%sp@-
44974: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
return sc;
4497a: 588f addql #4,%sp
}
4497c: 2004 movel %d4,%d0
4497e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5
44984: 4e5e unlk %fp <== NOT EXECUTED
00044c64 <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)
{
44c64: 4e56 fff4 linkw %fp,#-12
44c68: 48d7 040c moveml %d2-%d3/%a2,%sp@
44c6c: 246e 0008 moveal %fp@(8),%a2
int nToSend;
rtems_interrupt_level level;
int len;
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
44c70: 202a 00b8 movel %a2@(184),%d0
44c74: 0280 0000 0403 andil #1027,%d0
44c7a: 0c80 0000 0401 cmpil #1025,%d0
44c80: 663c bnes 44cbe <rtems_termios_refill_transmitter+0x5a><== ALWAYS TAKEN
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
44c82: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44c86: 486a 004a pea %a2@(74) <== NOT EXECUTED
44c8a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44c8e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44c92: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
44c94: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
44c9a: 40c1 movew %sr,%d1 <== NOT EXECUTED
44c9c: 8081 orl %d1,%d0 <== NOT EXECUTED
44c9e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
44ca0: 7402 moveq #2,%d2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
44ca2: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
44ca6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44caa: 8082 orl %d2,%d0 <== NOT EXECUTED
44cac: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
44cb0: 46c1 movew %d1,%sr <== NOT EXECUTED
44cb2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend = 1;
44cb6: 143c 0001 moveb #1,%d2 <== NOT EXECUTED
44cba: 6000 0150 braw 44e0c <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
} else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) {
44cbe: 202a 00b8 movel %a2@(184),%d0
44cc2: 7203 moveq #3,%d1
44cc4: 7402 moveq #2,%d2
44cc6: c081 andl %d1,%d0
44cc8: b480 cmpl %d0,%d2
44cca: 663a bnes 44d06 <rtems_termios_refill_transmitter+0xa2><== ALWAYS TAKEN
* FIXME: this .write call will generate another
* dequeue callback. This will advance the "Tail" in the data
* buffer, although the corresponding data is not yet out!
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
44ccc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
44cd0: 486a 0049 pea %a2@(73) <== NOT EXECUTED
44cd4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED
44cd8: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
44cdc: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
44cde: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED
44ce4: 40c1 movew %sr,%d1 <== NOT EXECUTED
44ce6: 8081 orl %d1,%d0 <== NOT EXECUTED
44ce8: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
44cea: 74fd moveq #-3,%d2 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
44cec: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
44cf0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44cf4: c082 andl %d2,%d0 <== NOT EXECUTED
44cf6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
44cfa: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
44cfc: 7401 moveq #1,%d2 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
44cfe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
44d02: 6000 0108 braw 44e0c <rtems_termios_refill_transmitter+0x1a8><== NOT EXECUTED
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
44d06: 222a 0080 movel %a2@(128),%d1
44d0a: 202a 0084 movel %a2@(132),%d0
44d0e: b081 cmpl %d1,%d0
44d10: 661a bnes 44d2c <rtems_termios_refill_transmitter+0xc8>
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
44d12: 7002 moveq #2,%d0
44d14: b0aa 0094 cmpl %a2@(148),%d0
44d18: 6600 00f0 bnew 44e0a <rtems_termios_refill_transmitter+0x1a6>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
44d1c: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED
44d20: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release> <== NOT EXECUTED
44d26: 588f addql #4,%sp <== NOT EXECUTED
44d28: 6000 00e0 braw 44e0a <rtems_termios_refill_transmitter+0x1a6><== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
44d2c: 203c 0000 0700 movel #1792,%d0
44d32: 40c1 movew %sr,%d1
44d34: 8081 orl %d1,%d0
44d36: 46c0 movew %d0,%sr
len = tty->t_dqlen;
44d38: 206a 0090 moveal %a2@(144),%a0
tty->t_dqlen = 0;
44d3c: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
44d40: 46c1 movew %d1,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
44d42: 222a 0084 movel %a2@(132),%d1
44d46: d288 addl %a0,%d1
44d48: 202a 0088 movel %a2@(136),%d0
44d4c: 4c40 1003 remul %d0,%d3,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
44d50: 7202 moveq #2,%d1
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
44d52: 2543 0084 movel %d3,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
44d56: b2aa 0094 cmpl %a2@(148),%d1
44d5a: 660c bnes 44d68 <rtems_termios_refill_transmitter+0x104>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
44d5c: 2f2a 008c movel %a2@(140),%sp@-
44d60: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
44d66: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
44d68: 202a 0080 movel %a2@(128),%d0
44d6c: b083 cmpl %d3,%d0
44d6e: 661c bnes 44d8c <rtems_termios_refill_transmitter+0x128>
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44d70: 206a 00d4 moveal %a2@(212),%a0
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
44d74: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44d78: 4a88 tstl %a0
44d7a: 6700 0086 beqw 44e02 <rtems_termios_refill_transmitter+0x19e>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
44d7e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED
44d82: 486a 0030 pea %a2@(48) <== NOT EXECUTED
44d86: 4e90 jsr %a0@ <== NOT EXECUTED
44d88: 508f addql #8,%sp <== NOT EXECUTED
44d8a: 6076 bras 44e02 <rtems_termios_refill_transmitter+0x19e><== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
44d8c: 202a 00b8 movel %a2@(184),%d0
44d90: 0280 0000 0210 andil #528,%d0
44d96: 0c80 0000 0210 cmpil #528,%d0
44d9c: 6622 bnes 44dc0 <rtems_termios_refill_transmitter+0x15c><== ALWAYS TAKEN
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
44d9e: 303c 0700 movew #1792,%d0 <== NOT EXECUTED
44da2: 40c1 movew %sr,%d1 <== NOT EXECUTED
44da4: 8081 orl %d1,%d0 <== NOT EXECUTED
44da6: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
44da8: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
44dac: 7420 moveq #32,%d2 <== NOT EXECUTED
44dae: 8082 orl %d2,%d0 <== NOT EXECUTED
44db0: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
44db4: 7001 moveq #1,%d0 <== NOT EXECUTED
44db6: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
44dba: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 0;
44dbc: 4202 clrb %d2 <== NOT EXECUTED
44dbe: 6044 bras 44e04 <rtems_termios_refill_transmitter+0x1a0><== NOT EXECUTED
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
44dc0: 202a 0080 movel %a2@(128),%d0
44dc4: b083 cmpl %d3,%d0
44dc6: 6406 bccs 44dce <rtems_termios_refill_transmitter+0x16a>
nToSend = tty->rawOutBuf.Size - newTail;
44dc8: 242a 0088 movel %a2@(136),%d2
44dcc: 6004 bras 44dd2 <rtems_termios_refill_transmitter+0x16e>
else
nToSend = tty->rawOutBuf.Head - newTail;
44dce: 242a 0080 movel %a2@(128),%d2
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
44dd2: 202a 00b8 movel %a2@(184),%d0
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
44dd6: 9483 subl %d3,%d2
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
44dd8: 0280 0000 0600 andil #1536,%d0
44dde: 6702 beqs 44de2 <rtems_termios_refill_transmitter+0x17e>
nToSend = 1;
44de0: 7401 moveq #1,%d2
}
tty->rawOutBufState = rob_busy; /*apm*/
44de2: 7201 moveq #1,%d1
44de4: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
44de8: 2f02 movel %d2,%sp@-
44dea: 202a 007c movel %a2@(124),%d0
44dee: d083 addl %d3,%d0
44df0: 2f00 movel %d0,%sp@-
44df2: 2f2a 0010 movel %a2@(16),%sp@-
44df6: 206a 00a4 moveal %a2@(164),%a0
44dfa: 4e90 jsr %a0@
44dfc: 4fef 000c lea %sp@(12),%sp
44e00: 6002 bras 44e04 <rtems_termios_refill_transmitter+0x1a0>
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
44e02: 4282 clrl %d2
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
44e04: 2543 0084 movel %d3,%a2@(132)
44e08: 6002 bras 44e0c <rtems_termios_refill_transmitter+0x1a8>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
44e0a: 4282 clrl %d2
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
44e0c: 2002 movel %d2,%d0
44e0e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
44e14: 4e5e unlk %fp <== NOT EXECUTED
00044bf4 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
44bf4: 4e56 ffe0 linkw %fp,#-32
44bf8: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44bfc: 260e movel %fp,%d3
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
44bfe: 240e movel %fp,%d2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44c00: 5d83 subql #6,%d3
44c02: 4bf9 0004 51bc lea 451bc <rtems_event_receive>,%a5
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
tty->rxTaskId = 0;
rtems_task_delete(RTEMS_SELF);
44c08: 49f9 0004 5a4c lea 45a4c <rtems_task_delete>,%a4
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
44c0e: 5382 subql #1,%d2
44c10: 47f9 0004 49a4 lea 449a4 <rtems_termios_enqueue_raw_characters>,%a3
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
44c16: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44c1a: 2f03 movel %d3,%sp@-
44c1c: 42a7 clrl %sp@-
44c1e: 4878 0002 pea 2 <DOUBLE_FLOAT>
44c22: 4878 0003 pea 3 <DIVIDE>
44c26: 4e95 jsr %a5@
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
44c28: 4fef 0010 lea %sp@(16),%sp
44c2c: 7001 moveq #1,%d0
44c2e: c0ae fffa andl %fp@(-6),%d0
44c32: 670a beqs 44c3e <rtems_termios_rxdaemon+0x4a> <== ALWAYS TAKEN
tty->rxTaskId = 0;
44c34: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
44c38: 42a7 clrl %sp@- <== NOT EXECUTED
44c3a: 4e94 jsr %a4@ <== NOT EXECUTED
44c3c: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
44c3e: 2f2a 0010 movel %a2@(16),%sp@-
44c42: 206a 00a0 moveal %a2@(160),%a0
44c46: 4e90 jsr %a0@
if (c != EOF) {
44c48: 588f addql #4,%sp
44c4a: 72ff moveq #-1,%d1
44c4c: b280 cmpl %d0,%d1
44c4e: 67ca beqs 44c1a <rtems_termios_rxdaemon+0x26> <== NEVER TAKEN
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
44c50: 4878 0001 pea 1 <ADD>
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
44c54: 1d40 ffff moveb %d0,%fp@(-1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
44c58: 2f02 movel %d2,%sp@-
44c5a: 2f0a movel %a2,%sp@-
44c5c: 4e93 jsr %a3@
44c5e: 4fef 000c lea %sp@(12),%sp
44c62: 60b6 bras 44c1a <rtems_termios_rxdaemon+0x26>
00044e18 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
44e18: 4e56 ffe8 linkw %fp,#-24
44e1c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44e20: 240e movel %fp,%d2
44e22: 5982 subql #4,%d2
44e24: 4bf9 0004 51bc lea 451bc <rtems_event_receive>,%a5
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
tty->txTaskId = 0;
rtems_task_delete(RTEMS_SELF);
44e2a: 49f9 0004 5a4c lea 45a4c <rtems_task_delete>,%a4
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
44e30: 47f9 0004 4c64 lea 44c64 <rtems_termios_refill_transmitter>,%a3
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
44e36: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
44e3a: 2f02 movel %d2,%sp@-
44e3c: 42a7 clrl %sp@-
44e3e: 4878 0002 pea 2 <DOUBLE_FLOAT>
44e42: 4878 0003 pea 3 <DIVIDE>
44e46: 4e95 jsr %a5@
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
44e48: 4fef 0010 lea %sp@(16),%sp
44e4c: 7001 moveq #1,%d0
44e4e: c0ae fffc andl %fp@(-4),%d0
44e52: 670a beqs 44e5e <rtems_termios_txdaemon+0x46> <== ALWAYS TAKEN
tty->txTaskId = 0;
44e54: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
44e58: 42a7 clrl %sp@- <== NOT EXECUTED
44e5a: 4e94 jsr %a4@ <== NOT EXECUTED
44e5c: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
44e5e: 202a 00cc movel %a2@(204),%d0
44e62: eb88 lsll #5,%d0
44e64: 0680 0005 d010 addil #380944,%d0
44e6a: 2240 moveal %d0,%a1
44e6c: 2051 moveal %a1@,%a0
44e6e: 4a88 tstl %a0
44e70: 6706 beqs 44e78 <rtems_termios_txdaemon+0x60> <== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
44e72: 2f0a movel %a2,%sp@- <== NOT EXECUTED
44e74: 4e90 jsr %a0@ <== NOT EXECUTED
44e76: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
44e78: 2f0a movel %a2,%sp@-
44e7a: 4e93 jsr %a3@
}
44e7c: 588f addql #4,%sp
44e7e: 60ba bras 44e3a <rtems_termios_txdaemon+0x22>
00051b9c <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
51b9c: 4e56 fffc linkw %fp,#-4
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
51ba0: 486e fffc pea %fp@(-4)
51ba4: 2f2e 0008 movel %fp@(8),%sp@-
51ba8: 4879 0007 6d94 pea 76d94 <_Timer_Information>
51bae: 4eb9 0005 4608 jsr 54608 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
51bb4: 4fef 000c lea %sp@(12),%sp
51bb8: 4aae fffc tstl %fp@(-4)
51bbc: 6620 bnes 51bde <rtems_timer_cancel+0x42>
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
51bbe: 7204 moveq #4,%d1
51bc0: 2040 moveal %d0,%a0
51bc2: b2a8 0038 cmpl %a0@(56),%d1
51bc6: 670c beqs 51bd4 <rtems_timer_cancel+0x38> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
51bc8: 4868 0010 pea %a0@(16)
51bcc: 4eb9 0005 61e0 jsr 561e0 <_Watchdog_Remove>
51bd2: 588f addql #4,%sp
_Thread_Enable_dispatch();
51bd4: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
51bda: 4280 clrl %d0
51bdc: 6002 bras 51be0 <rtems_timer_cancel+0x44>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
51bde: 7004 moveq #4,%d0
}
51be0: 4e5e unlk %fp <== NOT EXECUTED
00045e1c <rtems_timer_create>:
rtems_status_code rtems_timer_create(
rtems_name name,
rtems_id *id
)
{
45e1c: 4e56 fff4 linkw %fp,#-12
45e20: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
45e24: 242e 0008 movel %fp@(8),%d2
45e28: 246e 000c moveal %fp@(12),%a2
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
45e2c: 6766 beqs 45e94 <rtems_timer_create+0x78> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
45e2e: 4a8a tstl %a2
45e30: 6766 beqs 45e98 <rtems_timer_create+0x7c> <== NEVER TAKEN
45e32: 2039 0005 dbb0 movel 5dbb0 <_Thread_Dispatch_disable_level>,%d0
45e38: 5280 addql #1,%d0
45e3a: 23c0 0005 dbb0 movel %d0,5dbb0 <_Thread_Dispatch_disable_level>
* 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 );
45e40: 4879 0005 e3f2 pea 5e3f2 <_Timer_Information>
45e46: 4eb9 0004 6c74 jsr 46c74 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_timer = _Timer_Allocate();
if ( !the_timer ) {
45e4c: 588f addql #4,%sp
45e4e: 43f9 0004 78b2 lea 478b2 <_Thread_Enable_dispatch>,%a1
45e54: 2040 moveal %d0,%a0
45e56: 4a80 tstl %d0
45e58: 6606 bnes 45e60 <rtems_timer_create+0x44>
_Thread_Enable_dispatch();
45e5a: 4e91 jsr %a1@
return RTEMS_TOO_MANY;
45e5c: 7005 moveq #5,%d0
45e5e: 603a bras 45e9a <rtems_timer_create+0x7e>
}
the_timer->the_class = TIMER_DORMANT;
45e60: 7004 moveq #4,%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
45e62: 4281 clrl %d1
45e64: 2140 0038 movel %d0,%a0@(56)
information,
_Objects_Get_index( the_object->id ),
45e68: 2028 0008 movel %a0@(8),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45e6c: 2679 0005 e40a moveal 5e40a <_Timer_Information+0x18>,%a3
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
45e72: 3200 movew %d0,%d1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
45e74: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
45e78: 42a8 002c clrl %a0@(44)
the_watchdog->id = id;
45e7c: 42a8 0030 clrl %a0@(48)
the_watchdog->user_data = user_data;
45e80: 42a8 0034 clrl %a0@(52)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
45e84: 2788 1c00 movel %a0,%a3@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
45e88: 2142 000c movel %d2,%a0@(12)
&_Timer_Information,
&the_timer->Object,
(Objects_Name) name
);
*id = the_timer->Object.id;
45e8c: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
45e8e: 4e91 jsr %a1@
return RTEMS_SUCCESSFUL;
45e90: 4280 clrl %d0
45e92: 6006 bras 45e9a <rtems_timer_create+0x7e>
)
{
Timer_Control *the_timer;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
45e94: 7003 moveq #3,%d0
45e96: 6002 bras 45e9a <rtems_timer_create+0x7e>
if ( !id )
return RTEMS_INVALID_ADDRESS;
45e98: 7009 moveq #9,%d0
);
*id = the_timer->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
45e9a: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
45ea0: 4e5e unlk %fp <== NOT EXECUTED
00051f68 <rtems_timer_server_fire_after>:
rtems_id id,
rtems_interval ticks,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
51f68: 4e56 ffe4 linkw %fp,#-28
51f6c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
51f70: 262e 0008 movel %fp@(8),%d3
51f74: 242e 000c movel %fp@(12),%d2
51f78: 282e 0010 movel %fp@(16),%d4
Timer_Control *the_timer;
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
51f7c: 2679 0007 6dce moveal 76dce <_Timer_server>,%a3
if ( !timer_server )
51f82: 4a8b tstl %a3
51f84: 6700 0086 beqw 5200c <rtems_timer_server_fire_after+0xa4>
return RTEMS_INCORRECT_STATE;
if ( !routine )
51f88: 4a84 tstl %d4
51f8a: 6700 0084 beqw 52010 <rtems_timer_server_fire_after+0xa8>
return RTEMS_INVALID_ADDRESS;
if ( ticks == 0 )
51f8e: 4a82 tstl %d2
51f90: 6700 0082 beqw 52014 <rtems_timer_server_fire_after+0xac>
51f94: 486e fffc pea %fp@(-4)
51f98: 2f03 movel %d3,%sp@-
51f9a: 4879 0007 6d94 pea 76d94 <_Timer_Information>
51fa0: 4eb9 0005 4608 jsr 54608 <_Objects_Get>
return RTEMS_INVALID_NUMBER;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
51fa6: 4fef 000c lea %sp@(12),%sp
51faa: 2440 moveal %d0,%a2
51fac: 4aae fffc tstl %fp@(-4)
51fb0: 6666 bnes 52018 <rtems_timer_server_fire_after+0xb0><== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
51fb2: 486a 0010 pea %a2@(16)
51fb6: 4eb9 0005 61e0 jsr 561e0 <_Watchdog_Remove>
_ISR_Disable( level );
51fbc: 203c 0000 0700 movel #1792,%d0
51fc2: 40c1 movew %sr,%d1
51fc4: 8081 orl %d1,%d0
51fc6: 46c0 movew %d0,%sr
51fc8: 49f9 0005 4e6a lea 54e6a <_Thread_Enable_dispatch>,%a4
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_timer->Ticker.state != WATCHDOG_INACTIVE ) {
51fce: 588f addql #4,%sp
51fd0: 4aaa 0018 tstl %a2@(24)
51fd4: 6706 beqs 51fdc <rtems_timer_server_fire_after+0x74>
_ISR_Enable( level );
51fd6: 46c1 movew %d1,%sr
_Thread_Enable_dispatch();
51fd8: 4e94 jsr %a4@
51fda: 602c bras 52008 <rtems_timer_server_fire_after+0xa0>
/*
* 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;
51fdc: 7001 moveq #1,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
51fde: 256e 0014 0034 movel %fp@(20),%a2@(52)
51fe4: 2540 0038 movel %d0,%a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
51fe8: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine;
51fec: 2544 002c movel %d4,%a2@(44)
the_watchdog->id = id;
51ff0: 2543 0030 movel %d3,%a2@(48)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = ticks;
51ff4: 2542 001c movel %d2,%a2@(28)
_ISR_Enable( level );
51ff8: 46c1 movew %d1,%sr
(*timer_server->schedule_operation)( timer_server, the_timer );
51ffa: 2f0a movel %a2,%sp@-
51ffc: 2f0b movel %a3,%sp@-
51ffe: 206b 0004 moveal %a3@(4),%a0
52002: 4e90 jsr %a0@
_Thread_Enable_dispatch();
52004: 4e94 jsr %a4@
return RTEMS_SUCCESSFUL;
52006: 508f addql #8,%sp
52008: 4280 clrl %d0
5200a: 600e bras 5201a <rtems_timer_server_fire_after+0xb2>
Objects_Locations location;
ISR_Level level;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
5200c: 700e moveq #14,%d0
5200e: 600a bras 5201a <rtems_timer_server_fire_after+0xb2>
if ( !routine )
return RTEMS_INVALID_ADDRESS;
52010: 7009 moveq #9,%d0
52012: 6006 bras 5201a <rtems_timer_server_fire_after+0xb2>
if ( ticks == 0 )
return RTEMS_INVALID_NUMBER;
52014: 700a moveq #10,%d0
52016: 6002 bras 5201a <rtems_timer_server_fire_after+0xb2>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
52018: 7004 moveq #4,%d0
}
5201a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
52020: 4e5e unlk %fp <== NOT EXECUTED
00052024 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
52024: 4e56 ffe8 linkw %fp,#-24
52028: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
5202c: 262e 0008 movel %fp@(8),%d3
52030: 242e 000c movel %fp@(12),%d2
52034: 282e 0010 movel %fp@(16),%d4
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
52038: 2679 0007 6dce moveal 76dce <_Timer_server>,%a3
if ( !timer_server )
5203e: 4a8b tstl %a3
52040: 6700 0098 beqw 520da <rtems_timer_server_fire_when+0xb6>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
52044: 4a39 0007 6520 tstb 76520 <_TOD_Is_set>
5204a: 6700 0092 beqw 520de <rtems_timer_server_fire_when+0xba>
return RTEMS_NOT_DEFINED;
if ( !routine )
5204e: 4a84 tstl %d4
52050: 6700 0090 beqw 520e2 <rtems_timer_server_fire_when+0xbe>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
52054: 2f02 movel %d2,%sp@-
52056: 4eb9 0004 f4d4 jsr 4f4d4 <_TOD_Validate>
5205c: 588f addql #4,%sp
5205e: 4a00 tstb %d0
52060: 6700 0084 beqw 520e6 <rtems_timer_server_fire_when+0xc2>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
52064: 2f02 movel %d2,%sp@-
52066: 4eb9 0004 f438 jsr 4f438 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
5206c: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
5206e: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
52070: b0b9 0007 659a cmpl 7659a <_TOD_Now>,%d0
52076: 636e blss 520e6 <rtems_timer_server_fire_when+0xc2>
52078: 486e fffc pea %fp@(-4)
5207c: 2f03 movel %d3,%sp@-
5207e: 4879 0007 6d94 pea 76d94 <_Timer_Information>
52084: 4eb9 0005 4608 jsr 54608 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
5208a: 4fef 000c lea %sp@(12),%sp
5208e: 2440 moveal %d0,%a2
52090: 4aae fffc tstl %fp@(-4)
52094: 6654 bnes 520ea <rtems_timer_server_fire_when+0xc6>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
52096: 486a 0010 pea %a2@(16)
5209a: 4eb9 0005 61e0 jsr 561e0 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
520a0: 256e 0014 0034 movel %fp@(20),%a2@(52)
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();
520a6: 94b9 0007 659a subl 7659a <_TOD_Now>,%d2
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;
520ac: 7003 moveq #3,%d0
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
520ae: 42aa 0018 clrl %a2@(24)
520b2: 2540 0038 movel %d0,%a2@(56)
the_watchdog->routine = routine;
520b6: 2544 002c movel %d4,%a2@(44)
the_watchdog->id = id;
520ba: 2543 0030 movel %d3,%a2@(48)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
520be: 2542 001c movel %d2,%a2@(28)
(*timer_server->schedule_operation)( timer_server, the_timer );
520c2: 2f0a movel %a2,%sp@-
520c4: 2f0b movel %a3,%sp@-
520c6: 206b 0004 moveal %a3@(4),%a0
520ca: 4e90 jsr %a0@
_Thread_Enable_dispatch();
520cc: 4eb9 0005 4e6a jsr 54e6a <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
520d2: 4fef 000c lea %sp@(12),%sp
520d6: 4280 clrl %d0
520d8: 6012 bras 520ec <rtems_timer_server_fire_when+0xc8>
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
520da: 700e moveq #14,%d0
520dc: 600e bras 520ec <rtems_timer_server_fire_when+0xc8>
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
520de: 700b moveq #11,%d0 <== NOT EXECUTED
520e0: 600a bras 520ec <rtems_timer_server_fire_when+0xc8><== NOT EXECUTED
if ( !routine )
return RTEMS_INVALID_ADDRESS;
520e2: 7009 moveq #9,%d0
520e4: 6006 bras 520ec <rtems_timer_server_fire_when+0xc8>
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
520e6: 7014 moveq #20,%d0
520e8: 6002 bras 520ec <rtems_timer_server_fire_when+0xc8>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
520ea: 7004 moveq #4,%d0
}
520ec: 4cee 0c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a3
520f2: 4e5e unlk %fp
...
000424a8 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
424a8: 4e56 fff0 linkw %fp,#-16
424ac: 48d7 041c moveml %d2-%d4/%a2,%sp@
424b0: 242e 0008 movel %fp@(8),%d2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
424b4: 0802 001d btst #29,%d2
424b8: 672e beqs 424e8 <rtems_verror+0x40>
if (rtems_panic_in_progress++)
424ba: 2039 0005 d7f0 movel 5d7f0 <rtems_panic_in_progress>,%d0
424c0: 2200 movel %d0,%d1
424c2: 5281 addql #1,%d1
424c4: 23c1 0005 d7f0 movel %d1,5d7f0 <rtems_panic_in_progress>
424ca: 4a80 tstl %d0
424cc: 670e beqs 424dc <rtems_verror+0x34> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
424ce: 2039 0005 d94c movel 5d94c <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED
424d4: 5280 addql #1,%d0 <== NOT EXECUTED
424d6: 23c0 0005 d94c movel %d0,5d94c <_Thread_Dispatch_disable_level><== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
424dc: 7002 moveq #2,%d0
424de: b0b9 0005 d7f0 cmpl 5d7f0 <rtems_panic_in_progress>,%d0
424e4: 6d00 0100 bltw 425e6 <rtems_verror+0x13e>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
424e8: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
status = error_flag & ~RTEMS_ERROR_MASK;
424ee: 2802 movel %d2,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
424f0: 2f28 0008 movel %a0@(8),%sp@-
status = error_flag & ~RTEMS_ERROR_MASK;
424f4: 0284 8fff ffff andil #-1879048193,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
424fa: 4eb9 0004 cdbe jsr 4cdbe <fflush>
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
42500: 588f addql #4,%sp
42502: 0802 001e btst #30,%d2
42506: 670c beqs 42514 <rtems_verror+0x6c>
local_errno = errno;
42508: 4eb9 0004 ca54 jsr 4ca54 <__errno>
4250e: 2040 moveal %d0,%a0
42510: 2610 movel %a0@,%d3
42512: 6002 bras 42516 <rtems_verror+0x6e>
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
42514: 4283 clrl %d3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42516: 2f2e 0010 movel %fp@(16),%sp@-
4251a: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42520: 2f2e 000c movel %fp@(12),%sp@-
42524: 2f28 000c movel %a0@(12),%sp@-
42528: 4eb9 0005 362a jsr 5362a <vfprintf>
if (status)
4252e: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42532: 2400 movel %d0,%d2
if (status)
42534: 4a84 tstl %d4
42536: 6726 beqs 4255e <rtems_verror+0xb6>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
42538: 2f04 movel %d4,%sp@-
4253a: 4eb9 0004 2490 jsr 42490 <rtems_status_text>
42540: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42546: 2f00 movel %d0,%sp@-
42548: 4879 0005 ad27 pea 5ad27 <IMFS_ops+0x4f>
4254e: 2f28 000c movel %a0@(12),%sp@-
42552: 4eb9 0004 d1e6 jsr 4d1e6 <fprintf>
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
42558: 4fef 0010 lea %sp@(16),%sp
4255c: d480 addl %d0,%d2
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
4255e: 4a83 tstl %d3
42560: 6756 beqs 425b8 <rtems_verror+0x110>
if ((local_errno > 0) && *strerror(local_errno))
42562: 6f36 bles 4259a <rtems_verror+0xf2>
42564: 2f03 movel %d3,%sp@-
42566: 45f9 0004 da7c lea 4da7c <strerror>,%a2
4256c: 4e92 jsr %a2@
4256e: 588f addql #4,%sp
42570: 2040 moveal %d0,%a0
42572: 4a10 tstb %a0@
42574: 6724 beqs 4259a <rtems_verror+0xf2> <== NEVER TAKEN
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
42576: 2f03 movel %d3,%sp@-
42578: 4e92 jsr %a2@
4257a: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
42580: 2f00 movel %d0,%sp@-
42582: 4879 0005 ad35 pea 5ad35 <IMFS_ops+0x5d>
42588: 2f28 000c movel %a0@(12),%sp@-
4258c: 4eb9 0004 d1e6 jsr 4d1e6 <fprintf>
42592: 4fef 0010 lea %sp@(16),%sp
42596: d480 addl %d0,%d2
42598: 601e bras 425b8 <rtems_verror+0x110>
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
4259a: 2f03 movel %d3,%sp@-
4259c: 4879 0005 ad42 pea 5ad42 <IMFS_ops+0x6a>
425a2: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
425a8: 2f28 000c movel %a0@(12),%sp@-
425ac: 4eb9 0004 d1e6 jsr 4d1e6 <fprintf>
425b2: 4fef 000c lea %sp@(12),%sp
425b6: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
425b8: 4879 0005 b1d2 pea 5b1d2 <rtems_status_assoc+0x19e>
425be: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
425c4: 2f28 000c movel %a0@(12),%sp@-
425c8: 4eb9 0004 d1e6 jsr 4d1e6 <fprintf>
(void) fflush(stderr);
425ce: 2079 0005 c2c4 moveal 5c2c4 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
425d4: d480 addl %d0,%d2
(void) fflush(stderr);
425d6: 2f28 000c movel %a0@(12),%sp@-
425da: 4eb9 0004 cdbe jsr 4cdbe <fflush>
return chars_written;
425e0: 4fef 000c lea %sp@(12),%sp
425e4: 6002 bras 425e8 <rtems_verror+0x140>
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
425e6: 4282 clrl %d2 <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
425e8: 2002 movel %d2,%d0
425ea: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
425f0: 4e5e unlk %fp <== NOT EXECUTED
00042e90 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
42e90: 4e56 ffe4 linkw %fp,#-28
42e94: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
42e98: 246e 0008 moveal %fp@(8),%a2
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
int sign = 0;
42e9c: 4283 clrl %d3
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
42e9e: 283c 7fff ffff movel #2147483647,%d4
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
42ea4: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
42ea6: 47f9 0004 f3b4 lea 4f3b4 <__srget_r>,%a3
42eac: 202a 0004 movel %a2@(4),%d0
42eb0: 5380 subql #1,%d0
42eb2: 2540 0004 movel %d0,%a2@(4)
42eb6: 6c0e bges 42ec6 <scanInt+0x36> <== ALWAYS TAKEN
42eb8: 2f0a movel %a2,%sp@- <== NOT EXECUTED
42eba: 2f39 0005 dbc4 movel 5dbc4 <_impure_ptr>,%sp@- <== NOT EXECUTED
42ec0: 4e93 jsr %a3@ <== NOT EXECUTED
42ec2: 508f addql #8,%sp <== NOT EXECUTED
42ec4: 600a bras 42ed0 <scanInt+0x40> <== NOT EXECUTED
42ec6: 2052 moveal %a2@,%a0
42ec8: 4280 clrl %d0
42eca: 1010 moveb %a0@,%d0
42ecc: 5288 addql #1,%a0
42ece: 2488 movel %a0,%a2@
if (c == ':')
42ed0: 723a moveq #58,%d1
42ed2: b280 cmpl %d0,%d1
42ed4: 6750 beqs 42f26 <scanInt+0x96>
break;
if (sign == 0) {
42ed6: 4a83 tstl %d3
42ed8: 660e bnes 42ee8 <scanInt+0x58>
if (c == '-') {
42eda: 7c2d moveq #45,%d6
42edc: bc80 cmpl %d0,%d6
42ede: 6606 bnes 42ee6 <scanInt+0x56>
sign = -1;
limit++;
42ee0: 5284 addql #1,%d4
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
42ee2: 76ff moveq #-1,%d3
limit++;
continue;
42ee4: 60c6 bras 42eac <scanInt+0x1c>
}
sign = 1;
42ee6: 7601 moveq #1,%d3
}
if (!isdigit(c))
42ee8: 2079 0005 dbc0 moveal 5dbc0 <__ctype_ptr__>,%a0
42eee: 1230 0801 moveb %a0@(00000001,%d0:l),%d1
42ef2: 49c1 extbl %d1
42ef4: 44c1 movew %d1,%ccr
42ef6: 6640 bnes 42f38 <scanInt+0xa8>
return 0;
d = c - '0';
if ((i > (limit / 10))
42ef8: 2204 movel %d4,%d1
42efa: 7c0a moveq #10,%d6
42efc: 4c46 1005 remul %d6,%d5,%d1
42f00: 4c46 1001 remul %d6,%d1,%d1
42f04: b282 cmpl %d2,%d1
42f06: 6530 bcss 42f38 <scanInt+0xa8> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
42f08: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
42f0e: b282 cmpl %d2,%d1
42f10: 6604 bnes 42f16 <scanInt+0x86> <== ALWAYS TAKEN
42f12: ba80 cmpl %d0,%d5 <== NOT EXECUTED
42f14: 6522 bcss 42f38 <scanInt+0xa8> <== NOT EXECUTED
return 0;
i = i * 10 + d;
42f16: 2202 movel %d2,%d1
42f18: e789 lsll #3,%d1
42f1a: 2241 moveal %d1,%a1
42f1c: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0
42f20: 2400 movel %d0,%d2
42f22: d488 addl %a0,%d2
42f24: 6086 bras 42eac <scanInt+0x1c>
}
if (sign == 0)
42f26: 4a83 tstl %d3
42f28: 670e beqs 42f38 <scanInt+0xa8> <== NEVER TAKEN
return 0;
*val = i * sign;
42f2a: 4c02 3800 mulsl %d2,%d3
return 1;
42f2e: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
42f30: 206e 000c moveal %fp@(12),%a0
42f34: 2083 movel %d3,%a0@
return 1;
42f36: 6002 bras 42f3a <scanInt+0xaa>
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
42f38: 4280 clrl %d0
*val = i * sign;
return 1;
}
42f3a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
42f40: 4e5e unlk %fp <== NOT EXECUTED
00042f44 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
42f44: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
42f48: 206e 000c moveal %fp@(12),%a0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
42f4c: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
42f50: 286e 0008 moveal %fp@(8),%a4
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
42f54: 4bf9 0004 f3b4 lea 4f3b4 <__srget_r>,%a5
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
42f5a: 246e 0010 moveal %fp@(16),%a2
42f5e: 266e 0014 moveal %fp@(20),%a3
42f62: 242e 0018 movel %fp@(24),%d2
int c;
*name = *bufp;
42f66: 2092 movel %a2@,%a0@
for (;;) {
c = getc(fp);
42f68: 202c 0004 movel %a4@(4),%d0
42f6c: 5380 subql #1,%d0
42f6e: 2940 0004 movel %d0,%a4@(4)
42f72: 6c0e bges 42f82 <scanString+0x3e>
42f74: 2f0c movel %a4,%sp@-
42f76: 2f39 0005 dbc4 movel 5dbc4 <_impure_ptr>,%sp@-
42f7c: 4e95 jsr %a5@
42f7e: 508f addql #8,%sp
42f80: 600a bras 42f8c <scanString+0x48>
42f82: 2054 moveal %a4@,%a0
42f84: 4280 clrl %d0
42f86: 1010 moveb %a0@,%d0
42f88: 5288 addql #1,%a0
42f8a: 2888 movel %a0,%a4@
if (c == ':') {
42f8c: 723a moveq #58,%d1
42f8e: b280 cmpl %d0,%d1
42f90: 6606 bnes 42f98 <scanString+0x54>
if (nlFlag)
42f92: 4a82 tstl %d2
42f94: 6724 beqs 42fba <scanString+0x76>
42f96: 602e bras 42fc6 <scanString+0x82>
return 0;
break;
}
if (c == '\n') {
42f98: 720a moveq #10,%d1
42f9a: b280 cmpl %d0,%d1
42f9c: 6606 bnes 42fa4 <scanString+0x60>
if (!nlFlag)
42f9e: 4a82 tstl %d2
42fa0: 6618 bnes 42fba <scanString+0x76>
42fa2: 6022 bras 42fc6 <scanString+0x82>
return 0;
break;
}
if (c == EOF)
42fa4: 72ff moveq #-1,%d1
42fa6: b280 cmpl %d0,%d1
42fa8: 671c beqs 42fc6 <scanString+0x82>
return 0;
if (*nleft < 2)
42faa: 7201 moveq #1,%d1
42fac: b293 cmpl %a3@,%d1
42fae: 6416 bccs 42fc6 <scanString+0x82> <== NEVER TAKEN
return 0;
**bufp = c;
42fb0: 2052 moveal %a2@,%a0
42fb2: 1080 moveb %d0,%a0@
++(*bufp);
42fb4: 5292 addql #1,%a2@
--(*nleft);
42fb6: 5393 subql #1,%a3@
}
42fb8: 60ae bras 42f68 <scanString+0x24>
**bufp = '\0';
42fba: 2052 moveal %a2@,%a0
++(*bufp);
--(*nleft);
return 1;
42fbc: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
42fbe: 4210 clrb %a0@
++(*bufp);
42fc0: 5292 addql #1,%a2@
--(*nleft);
42fc2: 5393 subql #1,%a3@
return 1;
42fc4: 6002 bras 42fc8 <scanString+0x84>
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
42fc6: 4280 clrl %d0
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
}
42fc8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
42fce: 4e5e unlk %fp <== NOT EXECUTED
00042fd2 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
42fd2: 4e56 ffe4 linkw %fp,#-28
42fd6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
42fda: 42a7 clrl %sp@-
42fdc: 280e movel %fp,%d4
42fde: 0684 0000 0014 addil #20,%d4
42fe4: 260e movel %fp,%d3
42fe6: 0683 0000 0010 addil #16,%d3
42fec: 47fa ff56 lea %pc@(42f44 <scanString>),%a3
42ff0: 2f04 movel %d4,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
42ff2: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
42ff6: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
42ff8: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
42ffc: 2f0a movel %a2,%sp@-
42ffe: 2f02 movel %d2,%sp@-
43000: 4e93 jsr %a3@
43002: 4fef 0014 lea %sp@(20),%sp
43006: 4a80 tstl %d0
43008: 6700 00b6 beqw 430c0 <scangr+0xee>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
4300c: 42a7 clrl %sp@-
4300e: 2f04 movel %d4,%sp@-
43010: 2f03 movel %d3,%sp@-
43012: 486a 0004 pea %a2@(4)
43016: 2f02 movel %d2,%sp@-
43018: 4e93 jsr %a3@
4301a: 4fef 0014 lea %sp@(20),%sp
4301e: 4a80 tstl %d0
43020: 6700 009e beqw 430c0 <scangr+0xee>
|| !scanInt(fp, &grgid)
43024: 486e fffc pea %fp@(-4)
43028: 2f02 movel %d2,%sp@-
4302a: 4eba fe64 jsr %pc@(42e90 <scanInt>)
4302e: 508f addql #8,%sp
43030: 4a80 tstl %d0
43032: 6700 008c beqw 430c0 <scangr+0xee>
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
43036: 4878 0001 pea 1 <ADD>
4303a: 2f04 movel %d4,%sp@-
4303c: 2f03 movel %d3,%sp@-
4303e: 486e fff8 pea %fp@(-8)
43042: 2f02 movel %d2,%sp@-
43044: 4e93 jsr %a3@
43046: 4fef 0014 lea %sp@(20),%sp
4304a: 4a80 tstl %d0
4304c: 6772 beqs 430c0 <scangr+0xee> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4304e: 222e fff8 movel %fp@(-8),%d1
43052: 7001 moveq #1,%d0
43054: 2041 moveal %d1,%a0
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
43056: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4305c: 600a bras 43068 <scangr+0x96>
if(*cp == ',')
4305e: 49c2 extbl %d2
43060: 762c moveq #44,%d3
43062: b682 cmpl %d2,%d3
43064: 6602 bnes 43068 <scangr+0x96>
memcount++;
43066: 5280 addql #1,%d0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43068: 1418 moveb %a0@+,%d2
4306a: 66f2 bnes 4305e <scangr+0x8c>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
4306c: e588 lsll #2,%d0
4306e: 0680 0000 0013 addil #19,%d0
43074: b0ae 0014 cmpl %fp@(20),%d0
43078: 6246 bhis 430c0 <scangr+0xee> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
4307a: 202e 0010 movel %fp@(16),%d0
4307e: 74f0 moveq #-16,%d2
43080: 0680 0000 000f addil #15,%d0
43086: c082 andl %d2,%d0
43088: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
4308c: 2040 moveal %d0,%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4308e: 7001 moveq #1,%d0
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
43090: 2081 movel %d1,%a0@
43092: 206e fff8 moveal %fp@(-8),%a0
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43096: 6018 bras 430b0 <scangr+0xde>
if(*cp == ',') {
43098: 49c1 extbl %d1
4309a: 742c moveq #44,%d2
4309c: b481 cmpl %d1,%d2
4309e: 6610 bnes 430b0 <scangr+0xde>
*cp = '\0';
430a0: 4203 clrb %d3
430a2: 1143 ffff moveb %d3,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
430a6: 226a 000a moveal %a2@(10),%a1
430aa: 2388 0c00 movel %a0,%a1@(00000000,%d0:l:4)
430ae: 5280 addql #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
430b0: 1218 moveb %a0@+,%d1
430b2: 66e4 bnes 43098 <scangr+0xc6>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
430b4: 206a 000a moveal %a2@(10),%a0
430b8: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
return 1;
430bc: 7001 moveq #1,%d0
430be: 6002 bras 430c2 <scangr+0xf0>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
430c0: 4280 clrl %d0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
430c2: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3
430c8: 4e5e unlk %fp <== NOT EXECUTED
000430cc <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
430cc: 4e56 ffe0 linkw %fp,#-32
430d0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
430d4: 42a7 clrl %sp@-
430d6: 280e movel %fp,%d4
430d8: 0684 0000 0014 addil #20,%d4
430de: 260e movel %fp,%d3
430e0: 0683 0000 0010 addil #16,%d3
430e6: 47fa fe5c lea %pc@(42f44 <scanString>),%a3
430ea: 2f04 movel %d4,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
430ec: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
430f0: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
430f2: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
430f6: 2f0a movel %a2,%sp@-
430f8: 2f02 movel %d2,%sp@-
430fa: 4e93 jsr %a3@
430fc: 4fef 0014 lea %sp@(20),%sp
43100: 4a80 tstl %d0
43102: 6700 00a4 beqw 431a8 <scanpw+0xdc>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
43106: 42a7 clrl %sp@-
43108: 2f04 movel %d4,%sp@-
4310a: 2f03 movel %d3,%sp@-
4310c: 486a 0004 pea %a2@(4)
43110: 2f02 movel %d2,%sp@-
43112: 4e93 jsr %a3@
43114: 4fef 0014 lea %sp@(20),%sp
43118: 4a80 tstl %d0
4311a: 6700 008c beqw 431a8 <scanpw+0xdc>
|| !scanInt(fp, &pwuid)
4311e: 486e fffc pea %fp@(-4)
43122: 49fa fd6c lea %pc@(42e90 <scanInt>),%a4
43126: 2f02 movel %d2,%sp@-
43128: 4e94 jsr %a4@
4312a: 508f addql #8,%sp
4312c: 4a80 tstl %d0
4312e: 6778 beqs 431a8 <scanpw+0xdc> <== NEVER TAKEN
|| !scanInt(fp, &pwgid)
43130: 486e fff8 pea %fp@(-8)
43134: 2f02 movel %d2,%sp@-
43136: 4e94 jsr %a4@
43138: 508f addql #8,%sp
4313a: 4a80 tstl %d0
4313c: 676a beqs 431a8 <scanpw+0xdc>
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
4313e: 42a7 clrl %sp@-
43140: 2f04 movel %d4,%sp@-
43142: 2f03 movel %d3,%sp@-
43144: 486a 000c pea %a2@(12)
43148: 2f02 movel %d2,%sp@-
4314a: 4e93 jsr %a3@
4314c: 4fef 0014 lea %sp@(20),%sp
43150: 4a80 tstl %d0
43152: 6754 beqs 431a8 <scanpw+0xdc> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
43154: 42a7 clrl %sp@-
43156: 2f04 movel %d4,%sp@-
43158: 2f03 movel %d3,%sp@-
4315a: 486a 0010 pea %a2@(16)
4315e: 2f02 movel %d2,%sp@-
43160: 4e93 jsr %a3@
43162: 4fef 0014 lea %sp@(20),%sp
43166: 4a80 tstl %d0
43168: 673e beqs 431a8 <scanpw+0xdc> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
4316a: 42a7 clrl %sp@-
4316c: 2f04 movel %d4,%sp@-
4316e: 2f03 movel %d3,%sp@-
43170: 486a 0014 pea %a2@(20)
43174: 2f02 movel %d2,%sp@-
43176: 4e93 jsr %a3@
43178: 4fef 0014 lea %sp@(20),%sp
4317c: 4a80 tstl %d0
4317e: 6728 beqs 431a8 <scanpw+0xdc> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
43180: 4878 0001 pea 1 <ADD>
43184: 2f04 movel %d4,%sp@-
43186: 2f03 movel %d3,%sp@-
43188: 486a 0018 pea %a2@(24)
4318c: 2f02 movel %d2,%sp@-
4318e: 4e93 jsr %a3@
43190: 4fef 0014 lea %sp@(20),%sp
43194: 4a80 tstl %d0
43196: 6710 beqs 431a8 <scanpw+0xdc>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
43198: 7001 moveq #1,%d0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
4319a: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid;
431a0: 356e fffa 000a movew %fp@(-6),%a2@(10)
return 1;
431a6: 6002 bras 431aa <scanpw+0xde>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
431a8: 4280 clrl %d0
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
}
431aa: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
431b0: 4e5e unlk %fp <== NOT EXECUTED
00045ef8 <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
45ef8: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
45efa: 4e56 0000 linkw %fp,#0
45efe: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
45f02: b081 cmpl %d1,%d0
45f04: 650c bcss 45f12 <sched_get_priority_max+0x1a>
45f06: 103c 0001 moveb #1,%d0
45f0a: e3a8 lsll %d1,%d0
45f0c: 7217 moveq #23,%d1
45f0e: c081 andl %d1,%d0
45f10: 6610 bnes 45f22 <sched_get_priority_max+0x2a> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
45f12: 4eb9 0004 d5fc jsr 4d5fc <__errno>
45f18: 2040 moveal %d0,%a0
45f1a: 7016 moveq #22,%d0
45f1c: 2080 movel %d0,%a0@
45f1e: 70ff moveq #-1,%d0
45f20: 600a bras 45f2c <sched_get_priority_max+0x34>
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
45f22: 4280 clrl %d0
45f24: 1039 0005 d266 moveb 5d266 <rtems_maximum_priority>,%d0
45f2a: 5380 subql #1,%d0
}
45f2c: 4e5e unlk %fp <== NOT EXECUTED
00045f30 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
45f30: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
45f32: 4e56 0000 linkw %fp,#0
45f36: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
45f3a: b081 cmpl %d1,%d0
45f3c: 650c bcss 45f4a <sched_get_priority_min+0x1a>
45f3e: 103c 0001 moveb #1,%d0
45f42: e3a8 lsll %d1,%d0
45f44: 7217 moveq #23,%d1
45f46: c081 andl %d1,%d0
45f48: 6610 bnes 45f5a <sched_get_priority_min+0x2a> <== ALWAYS TAKEN
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
45f4a: 4eb9 0004 d5fc jsr 4d5fc <__errno>
45f50: 2040 moveal %d0,%a0
45f52: 7016 moveq #22,%d0
45f54: 2080 movel %d0,%a0@
45f56: 70ff moveq #-1,%d0
45f58: 6002 bras 45f5c <sched_get_priority_min+0x2c>
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
45f5a: 7001 moveq #1,%d0
}
45f5c: 4e5e unlk %fp <== NOT EXECUTED
00045f60 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
45f60: 4e56 0000 linkw %fp,#0
45f64: 2f03 movel %d3,%sp@-
45f66: 262e 0008 movel %fp@(8),%d3
45f6a: 2f02 movel %d2,%sp@-
45f6c: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
45f70: 4a83 tstl %d3
45f72: 6718 beqs 45f8c <sched_rr_get_interval+0x2c> <== NEVER TAKEN
45f74: 4eb9 0004 2f44 jsr 42f44 <getpid>
45f7a: b083 cmpl %d3,%d0
45f7c: 670e beqs 45f8c <sched_rr_get_interval+0x2c>
rtems_set_errno_and_return_minus_one( ESRCH );
45f7e: 4eb9 0004 d5fc jsr 4d5fc <__errno>
45f84: 7203 moveq #3,%d1
45f86: 2040 moveal %d0,%a0
45f88: 2081 movel %d1,%a0@
45f8a: 6010 bras 45f9c <sched_rr_get_interval+0x3c>
if ( !interval )
45f8c: 4a82 tstl %d2
45f8e: 6610 bnes 45fa0 <sched_rr_get_interval+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
45f90: 4eb9 0004 d5fc jsr 4d5fc <__errno>
45f96: 2040 moveal %d0,%a0
45f98: 7016 moveq #22,%d0
45f9a: 2080 movel %d0,%a0@
45f9c: 70ff moveq #-1,%d0
45f9e: 6012 bras 45fb2 <sched_rr_get_interval+0x52>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
45fa0: 2f02 movel %d2,%sp@-
45fa2: 2f39 0005 e9a4 movel 5e9a4 <_Thread_Ticks_per_timeslice>,%sp@-
45fa8: 4eb9 0004 91f8 jsr 491f8 <_Timespec_From_ticks>
return 0;
45fae: 508f addql #8,%sp
45fb0: 4280 clrl %d0
}
45fb2: 242e fff8 movel %fp@(-8),%d2
45fb6: 262e fffc movel %fp@(-4),%d3
45fba: 4e5e unlk %fp
...
000485b0 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
485b0: 4e56 ffe0 linkw %fp,#-32
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
485b4: 2039 0006 28b8 movel 628b8 <_Thread_Dispatch_disable_level>,%d0
485ba: 5280 addql #1,%d0
485bc: 48d7 043c moveml %d2-%d5/%a2,%sp@
485c0: 242e 0008 movel %fp@(8),%d2
485c4: 282e 000c movel %fp@(12),%d4
485c8: 23c0 0006 28b8 movel %d0,628b8 <_Thread_Dispatch_disable_level>
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
485ce: 2a04 movel %d4,%d5
485d0: 0285 0000 0200 andil #512,%d5
485d6: 6706 beqs 485de <sem_open+0x2e>
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
485d8: 262e 0014 movel %fp@(20),%d3
485dc: 6002 bras 485e0 <sem_open+0x30>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
485de: 4283 clrl %d3
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 );
485e0: 486e fffc pea %fp@(-4)
485e4: 2f02 movel %d2,%sp@-
485e6: 4eb9 0004 e03c jsr 4e03c <_POSIX_Semaphore_Name_to_id>
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
485ec: 508f addql #8,%sp
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
va_end(arg);
}
status = _POSIX_Semaphore_Name_to_id( name, &the_semaphore_id );
485ee: 2440 moveal %d0,%a2
* and we can just return a pointer to the id. Otherwise we may
* need to check to see if this is a "semaphore does not exist"
* or some other miscellaneous error on the name.
*/
if ( status ) {
485f0: 4a80 tstl %d0
485f2: 671c beqs 48610 <sem_open+0x60>
/*
* 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) ) ) {
485f4: 7002 moveq #2,%d0
485f6: b08a cmpl %a2,%d0
485f8: 6604 bnes 485fe <sem_open+0x4e> <== NEVER TAKEN
485fa: 4a85 tstl %d5
485fc: 665e bnes 4865c <sem_open+0xac>
_Thread_Enable_dispatch();
485fe: 4eb9 0004 acde jsr 4acde <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
48604: 4eb9 0005 08c0 jsr 508c0 <__errno>
4860a: 2040 moveal %d0,%a0
4860c: 208a movel %a2,%a0@
4860e: 6076 bras 48686 <sem_open+0xd6>
48610: 45f9 0004 acde lea 4acde <_Thread_Enable_dispatch>,%a2
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
48616: 0284 0000 0a00 andil #2560,%d4
4861c: 0c84 0000 0a00 cmpil #2560,%d4
48622: 6610 bnes 48634 <sem_open+0x84>
_Thread_Enable_dispatch();
48624: 4e92 jsr %a2@
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
48626: 4eb9 0005 08c0 jsr 508c0 <__errno>
4862c: 2040 moveal %d0,%a0
4862e: 7011 moveq #17,%d0
48630: 2080 movel %d0,%a0@
48632: 6052 bras 48686 <sem_open+0xd6>
48634: 486e fff4 pea %fp@(-12)
48638: 2f2e fffc movel %fp@(-4),%sp@-
4863c: 4879 0006 2af4 pea 62af4 <_POSIX_Semaphore_Information>
48642: 4eb9 0004 a470 jsr 4a470 <_Objects_Get>
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
48648: 2040 moveal %d0,%a0
4864a: 52a8 0016 addql #1,%a0@(22)
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
4864e: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
48652: 4e92 jsr %a2@
_Thread_Enable_dispatch();
48654: 4e92 jsr %a2@
goto return_id;
48656: 4fef 000c lea %sp@(12),%sp
4865a: 6022 bras 4867e <sem_open+0xce>
/*
* 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(
4865c: 486e fff8 pea %fp@(-8)
48660: 2f03 movel %d3,%sp@-
48662: 42a7 clrl %sp@-
48664: 2f02 movel %d2,%sp@-
48666: 4eb9 0004 def8 jsr 4def8 <_POSIX_Semaphore_Create_support>
4866c: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
4866e: 4eb9 0004 acde jsr 4acde <_Thread_Enable_dispatch>
if ( status == -1 )
48674: 4fef 0010 lea %sp@(16),%sp
48678: 70ff moveq #-1,%d0
4867a: b082 cmpl %d2,%d0
4867c: 6708 beqs 48686 <sem_open+0xd6>
return_id:
#if defined(RTEMS_USE_16_BIT_OBJECT)
the_semaphore->Semaphore_id = the_semaphore->Object.id;
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
4867e: 202e fff8 movel %fp@(-8),%d0
48682: 5080 addql #8,%d0
#endif
return id;
48684: 6002 bras 48688 <sem_open+0xd8>
*/
_Thread_Enable_dispatch();
if ( status == -1 )
return SEM_FAILED;
48686: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
48688: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
4868e: 4e5e unlk %fp
...
00045e08 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
45e08: 4e56 ffec linkw %fp,#-20
45e0c: 222e 0010 movel %fp@(16),%d1
45e10: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
45e14: 242e 0008 movel %fp@(8),%d2
45e18: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
45e1c: 4a81 tstl %d1
45e1e: 6722 beqs 45e42 <sigaction+0x3a>
*oact = _POSIX_signals_Vectors[ sig ];
45e20: 2602 movel %d2,%d3
45e22: 2002 movel %d2,%d0
45e24: 4878 000c pea c <OPER1>
45e28: e58b lsll #2,%d3
45e2a: e988 lsll #4,%d0
45e2c: 9083 subl %d3,%d0
45e2e: 0680 0005 faaa addil #391850,%d0
45e34: 2f00 movel %d0,%sp@-
45e36: 2f01 movel %d1,%sp@-
45e38: 4eb9 0004 e190 jsr 4e190 <memcpy>
45e3e: 4fef 000c lea %sp@(12),%sp
if ( !sig )
45e42: 4a82 tstl %d2
45e44: 6710 beqs 45e56 <sigaction+0x4e>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
45e46: 2002 movel %d2,%d0
45e48: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
45e4a: 721f moveq #31,%d1
45e4c: b280 cmpl %d0,%d1
45e4e: 6506 bcss 45e56 <sigaction+0x4e>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
45e50: 7009 moveq #9,%d0
45e52: b082 cmpl %d2,%d0
45e54: 6610 bnes 45e66 <sigaction+0x5e>
rtems_set_errno_and_return_minus_one( EINVAL );
45e56: 4eb9 0004 d8cc jsr 4d8cc <__errno>
45e5c: 2040 moveal %d0,%a0
45e5e: 7016 moveq #22,%d0
45e60: 2080 movel %d0,%a0@
45e62: 70ff moveq #-1,%d0
45e64: 6060 bras 45ec6 <sigaction+0xbe>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
45e66: 4a8a tstl %a2
45e68: 675a beqs 45ec4 <sigaction+0xbc> <== NEVER TAKEN
/*
* Unless the user is installing the default signal actions, then
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
45e6a: 203c 0000 0700 movel #1792,%d0
45e70: 40c3 movew %sr,%d3
45e72: 8083 orl %d3,%d0
45e74: 46c0 movew %d0,%sr
45e76: 780c moveq #12,%d4
45e78: 4c02 4800 mulsl %d2,%d4
45e7c: 47f9 0004 e190 lea 4e190 <memcpy>,%a3
if ( act->sa_handler == SIG_DFL ) {
45e82: 4aaa 0008 tstl %a2@(8)
45e86: 661e bnes 45ea6 <sigaction+0x9e>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
45e88: 4878 000c pea c <OPER1>
45e8c: 2004 movel %d4,%d0
45e8e: 0680 0005 d130 addil #381232,%d0
45e94: 2f00 movel %d0,%sp@-
45e96: 0684 0005 faaa addil #391850,%d4
45e9c: 2f04 movel %d4,%sp@-
45e9e: 4e93 jsr %a3@
45ea0: 4fef 000c lea %sp@(12),%sp
45ea4: 601c bras 45ec2 <sigaction+0xba>
} else {
_POSIX_signals_Clear_process_signals( sig );
45ea6: 2f02 movel %d2,%sp@-
_POSIX_signals_Vectors[ sig ] = *act;
45ea8: 0684 0005 faaa addil #391850,%d4
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
45eae: 4eb9 0004 af14 jsr 4af14 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
45eb4: 4878 000c pea c <OPER1>
45eb8: 2f0a movel %a2,%sp@-
45eba: 2f04 movel %d4,%sp@-
45ebc: 4e93 jsr %a3@
45ebe: 4fef 0010 lea %sp@(16),%sp
}
_ISR_Enable( level );
45ec2: 46c3 movew %d3,%sr
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
45ec4: 4280 clrl %d0
}
45ec6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
45ecc: 4e5e unlk %fp <== NOT EXECUTED
00047d18 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
47d18: 4e56 ffec linkw %fp,#-20
47d1c: 48d7 040c moveml %d2-%d3/%a2,%sp@
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
47d20: 240e movel %fp,%d2
47d22: 5982 subql #4,%d2
47d24: 45f9 0004 7cf0 lea 47cf0 <sigprocmask>,%a2
(void) sigfillset( &all_signals );
47d2a: 260e movel %fp,%d3
47d2c: 5183 subql #8,%d3
int status;
POSIX_API_Control *api;
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
status = sigprocmask( SIG_BLOCK, sigmask, &saved_signals_blocked );
47d2e: 2f02 movel %d2,%sp@-
47d30: 2f2e 0008 movel %fp@(8),%sp@-
47d34: 4878 0001 pea 1 <ADD>
47d38: 4e92 jsr %a2@
(void) sigfillset( &all_signals );
47d3a: 2f03 movel %d3,%sp@-
47d3c: 4eb9 0004 7c50 jsr 47c50 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
47d42: 42a7 clrl %sp@-
47d44: 42a7 clrl %sp@-
47d46: 2f03 movel %d3,%sp@-
47d48: 4eb9 0004 7dc8 jsr 47dc8 <sigtimedwait>
47d4e: 2600 movel %d0,%d3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
47d50: 42a7 clrl %sp@-
47d52: 2f02 movel %d2,%sp@-
47d54: 42a7 clrl %sp@-
47d56: 4e92 jsr %a2@
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
47d58: 4fef 0028 lea %sp@(40),%sp
47d5c: 70ff moveq #-1,%d0
47d5e: b083 cmpl %d3,%d0
47d60: 670c beqs 47d6e <sigsuspend+0x56> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
47d62: 4eb9 0004 f64c jsr 4f64c <__errno>
47d68: 2040 moveal %d0,%a0
47d6a: 7004 moveq #4,%d0
47d6c: 2080 movel %d0,%a0@
return status;
}
47d6e: 70ff moveq #-1,%d0
47d70: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
47d76: 4e5e unlk %fp
...
000461f8 <sigtimedwait>:
int sigtimedwait(
const sigset_t *set,
siginfo_t *info,
const struct timespec *timeout
)
{
461f8: 4e56 ffd8 linkw %fp,#-40
461fc: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
46200: 286e 0008 moveal %fp@(8),%a4
46204: 246e 000c moveal %fp@(12),%a2
46208: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
/*
* Error check parameters before disabling interrupts.
*/
if ( !set )
4620c: 4a8c tstl %a4
4620e: 6732 beqs 46242 <sigtimedwait+0x4a>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
if ( timeout ) {
46210: 4a82 tstl %d2
46212: 673c beqs 46250 <sigtimedwait+0x58>
if ( !_Timespec_Is_valid( timeout ) )
46214: 2f02 movel %d2,%sp@-
46216: 4eb9 0004 94d4 jsr 494d4 <_Timespec_Is_valid>
4621c: 588f addql #4,%sp
4621e: 4a00 tstb %d0
46220: 6612 bnes 46234 <sigtimedwait+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
46222: 4eb9 0004 de28 jsr 4de28 <__errno>
46228: 7616 moveq #22,%d3
4622a: 2240 moveal %d0,%a1
4622c: 2283 movel %d3,%a1@
4622e: 74ff moveq #-1,%d2
46230: 6000 0124 braw 46356 <sigtimedwait+0x15e>
interval = _Timespec_To_ticks( timeout );
46234: 2f02 movel %d2,%sp@-
46236: 4eb9 0004 9540 jsr 49540 <_Timespec_To_ticks>
if ( !interval )
4623c: 588f addql #4,%sp
4623e: 4a80 tstl %d0
46240: 6610 bnes 46252 <sigtimedwait+0x5a> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
46242: 4eb9 0004 de28 jsr 4de28 <__errno>
46248: 7416 moveq #22,%d2
4624a: 2040 moveal %d0,%a0
4624c: 2082 movel %d2,%a0@
4624e: 60de bras 4622e <sigtimedwait+0x36>
/* NOTE: This is very specifically a RELATIVE not ABSOLUTE time
* in the Open Group specification.
*/
interval = 0;
46250: 4280 clrl %d0
/*
* Initialize local variables.
*/
the_info = ( info ) ? info : &signal_information;
46252: 4a8a tstl %a2
46254: 6604 bnes 4625a <sigtimedwait+0x62>
46256: 45ee fff4 lea %fp@(-12),%a2
the_thread = _Thread_Executing;
4625a: 2079 0005 fe4c moveal 5fe4c <_Per_CPU_Information+0xc>,%a0
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
46260: 223c 0000 0700 movel #1792,%d1
the_info = ( info ) ? info : &signal_information;
the_thread = _Thread_Executing;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
46266: 2668 010e moveal %a0@(270),%a3
* What if they are already pending?
*/
/* API signals pending? */
_ISR_Disable( level );
4626a: 40c3 movew %sr,%d3
4626c: 8283 orl %d3,%d1
4626e: 46c1 movew %d1,%sr
if ( *set & api->signals_pending ) {
46270: 2414 movel %a4@,%d2
46272: 2802 movel %d2,%d4
46274: 222b 00d0 movel %a3@(208),%d1
46278: c881 andl %d1,%d4
4627a: 672a beqs 462a6 <sigtimedwait+0xae>
/* XXX real info later */
the_info->si_signo = _POSIX_signals_Get_highest( api->signals_pending );
4627c: 2f01 movel %d1,%sp@-
4627e: 4eb9 0004 61ac jsr 461ac <_POSIX_signals_Get_highest>
46284: 2480 movel %d0,%a2@
_POSIX_signals_Clear_signals(
46286: 4297 clrl %sp@
46288: 42a7 clrl %sp@-
4628a: 2f0a movel %a2,%sp@-
4628c: 2f00 movel %d0,%sp@-
4628e: 2f0b movel %a3,%sp@-
46290: 4eb9 0004 b538 jsr 4b538 <_POSIX_signals_Clear_signals>
the_info->si_signo,
the_info,
false,
false
);
_ISR_Enable( level );
46296: 46c3 movew %d3,%sr
the_info->si_code = SI_USER;
46298: 7001 moveq #1,%d0
the_info->si_value.sival_int = 0;
4629a: 42aa 0008 clrl %a2@(8)
return the_info->si_signo;
4629e: 2412 movel %a2@,%d2
false,
false
);
_ISR_Enable( level );
the_info->si_code = SI_USER;
462a0: 2540 0004 movel %d0,%a2@(4)
462a4: 6036 bras 462dc <sigtimedwait+0xe4>
return the_info->si_signo;
}
/* Process pending signals? */
if ( *set & _POSIX_signals_Pending ) {
462a6: 2239 0006 004e movel 6004e <_POSIX_signals_Pending>,%d1
462ac: 4bf9 0004 b538 lea 4b538 <_POSIX_signals_Clear_signals>,%a5
462b2: c481 andl %d1,%d2
462b4: 672c beqs 462e2 <sigtimedwait+0xea>
signo = _POSIX_signals_Get_highest( _POSIX_signals_Pending );
462b6: 2f01 movel %d1,%sp@-
462b8: 4eb9 0004 61ac jsr 461ac <_POSIX_signals_Get_highest>
462be: 2400 movel %d0,%d2
_POSIX_signals_Clear_signals( api, signo, the_info, true, false );
462c0: 4297 clrl %sp@
462c2: 4878 0001 pea 1 <ADD>
462c6: 2f0a movel %a2,%sp@-
462c8: 2f00 movel %d0,%sp@-
462ca: 2f0b movel %a3,%sp@-
462cc: 4e95 jsr %a5@
_ISR_Enable( level );
462ce: 46c3 movew %d3,%sr
the_info->si_signo = signo;
the_info->si_code = SI_USER;
462d0: 7201 moveq #1,%d1
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;
462d2: 2482 movel %d2,%a2@
the_info->si_code = SI_USER;
462d4: 2541 0004 movel %d1,%a2@(4)
the_info->si_value.sival_int = 0;
462d8: 42aa 0008 clrl %a2@(8)
return signo;
462dc: 4fef 0014 lea %sp@(20),%sp
462e0: 6074 bras 46356 <sigtimedwait+0x15e>
}
the_info->si_signo = -1;
462e2: 72ff moveq #-1,%d1
462e4: 2481 movel %d1,%a2@
462e6: 2239 0005 f9bc movel 5f9bc <_Thread_Dispatch_disable_level>,%d1
462ec: 5281 addql #1,%d1
462ee: 23c1 0005 f9bc movel %d1,5f9bc <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
the_thread->Wait.return_code = EINTR;
462f4: 7204 moveq #4,%d1
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
462f6: 43f9 0005 ffe6 lea 5ffe6 <_POSIX_signals_Wait_queue>,%a1
the_thread->Wait.return_code = EINTR;
462fc: 2141 0034 movel %d1,%a0@(52)
the_thread->Wait.option = *set;
46300: 2154 0030 movel %a4@,%a0@(48)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
46304: 123c 0001 moveb #1,%d1
the_thread->Wait.return_argument = the_info;
46308: 214a 0028 movel %a2,%a0@(40)
}
the_info->si_signo = -1;
_Thread_Disable_dispatch();
the_thread->Wait.queue = &_POSIX_signals_Wait_queue;
4630c: 2149 0044 movel %a1,%a0@(68)
46310: 23c1 0006 0016 movel %d1,60016 <_POSIX_signals_Wait_queue+0x30>
the_thread->Wait.return_code = EINTR;
the_thread->Wait.option = *set;
the_thread->Wait.return_argument = the_info;
_Thread_queue_Enter_critical_section( &_POSIX_signals_Wait_queue );
_ISR_Enable( level );
46316: 46c3 movew %d3,%sr
_Thread_queue_Enqueue( &_POSIX_signals_Wait_queue, interval );
46318: 4879 0004 8fa0 pea 48fa0 <_Thread_queue_Timeout>
4631e: 2f00 movel %d0,%sp@-
46320: 4879 0005 ffe6 pea 5ffe6 <_POSIX_signals_Wait_queue>
46326: 4eb9 0004 8c90 jsr 48c90 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
4632c: 4eb9 0004 880a jsr 4880a <_Thread_Enable_dispatch>
/*
* When the thread is set free by a signal, it is need to eliminate
* the signal.
*/
_POSIX_signals_Clear_signals( api, the_info->si_signo, the_info, false, false );
46332: 42a7 clrl %sp@-
46334: 42a7 clrl %sp@-
46336: 2f0a movel %a2,%sp@-
46338: 2f12 movel %a2@,%sp@-
4633a: 2f0b movel %a3,%sp@-
4633c: 4e95 jsr %a5@
errno = _Thread_Executing->Wait.return_code;
4633e: 4fef 0020 lea %sp@(32),%sp
46342: 4eb9 0004 de28 jsr 4de28 <__errno>
46348: 2079 0005 fe4c moveal 5fe4c <_Per_CPU_Information+0xc>,%a0
4634e: 2240 moveal %d0,%a1
46350: 22a8 0034 movel %a0@(52),%a1@
return the_info->si_signo;
46354: 2412 movel %a2@,%d2
}
46356: 2002 movel %d2,%d0
46358: 4cee 3c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a5
4635e: 4e5e unlk %fp
...
00047f4c <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
47f4c: 4e56 0000 linkw %fp,#0
47f50: 2f0a movel %a2,%sp@-
47f52: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
47f56: 42a7 clrl %sp@-
47f58: 42a7 clrl %sp@-
47f5a: 2f2e 0008 movel %fp@(8),%sp@-
47f5e: 4eb9 0004 7dc8 jsr 47dc8 <sigtimedwait>
if ( status != -1 ) {
47f64: 4fef 000c lea %sp@(12),%sp
47f68: 72ff moveq #-1,%d1
47f6a: b280 cmpl %d0,%d1
47f6c: 6708 beqs 47f76 <sigwait+0x2a>
if ( sig )
47f6e: 4a8a tstl %a2
47f70: 6710 beqs 47f82 <sigwait+0x36> <== NEVER TAKEN
*sig = status;
47f72: 2480 movel %d0,%a2@
47f74: 600c bras 47f82 <sigwait+0x36>
return 0;
}
return errno;
47f76: 4eb9 0004 f64c jsr 4f64c <__errno>
47f7c: 2040 moveal %d0,%a0
47f7e: 2010 movel %a0@,%d0
47f80: 6002 bras 47f84 <sigwait+0x38>
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
47f82: 4280 clrl %d0
}
return errno;
}
47f84: 246e fffc moveal %fp@(-4),%a2
47f88: 4e5e unlk %fp <== NOT EXECUTED
00044592 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
44592: 4e56 0000 linkw %fp,#0
44596: 2f0a movel %a2,%sp@-
44598: 246e 000c moveal %fp@(12),%a2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
4459c: 202a 003c movel %a2@(60),%d0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
445a0: 2f02 movel %d2,%sp@-
445a2: 4282 clrl %d2
445a4: 142e 000b moveb %fp@(11),%d2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
445a8: 0280 0000 0e78 andil #3704,%d0
445ae: 6734 beqs 445e4 <siproc+0x52> <== NEVER TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
445b0: 42a7 clrl %sp@-
445b2: 42a7 clrl %sp@-
445b4: 2f2a 0018 movel %a2@(24),%sp@-
445b8: 4eb9 0004 5770 jsr 45770 <rtems_semaphore_obtain>
i = iproc (c, tty);
445be: 2f0a movel %a2,%sp@-
445c0: 2f02 movel %d2,%sp@-
445c2: 4eba fe66 jsr %pc@(4442a <iproc>)
rtems_semaphore_release (tty->osem);
445c6: 2f2a 0018 movel %a2@(24),%sp@-
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
445ca: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
445cc: 4eb9 0004 5878 jsr 45878 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
445d2: 246e fffc moveal %fp@(-4),%a2
445d6: 2002 movel %d2,%d0
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
445d8: 4fef 0018 lea %sp@(24),%sp
}
else {
i = iproc (c, tty);
}
return i;
}
445dc: 242e fff8 movel %fp@(-8),%d2
445e0: 4e5e unlk %fp
445e2: 4e75 rts
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
445e4: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
return i;
}
445e8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
445ec: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
return i;
}
445f0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
445f4: 4e5e unlk %fp <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
445f6: 6000 fe32 braw 4442a <iproc> <== NOT EXECUTED
00045748 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
45748: 4e56 ffdc linkw %fp,#-36
4574c: 48d7 040c moveml %d2-%d3/%a2,%sp@
45750: 246e 0008 moveal %fp@(8),%a2
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
45754: 240e movel %fp,%d2
45756: 0682 ffff ffec addil #-20,%d2
4575c: 2f0a movel %a2,%sp@-
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
4575e: 262e 000c movel %fp@(12),%d3
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
45762: 4eb9 0005 0ddc jsr 50ddc <strlen>
45768: 7201 moveq #1,%d1
4576a: 2e81 movel %d1,%sp@
4576c: 2f02 movel %d2,%sp@-
4576e: 42a7 clrl %sp@-
45770: 2f00 movel %d0,%sp@-
45772: 2f0a movel %a2,%sp@-
45774: 4eb9 0004 447e jsr 4447e <rtems_filesystem_evaluate_path>
4577a: 4fef 0014 lea %sp@(20),%sp
4577e: 4a80 tstl %d0
45780: 6638 bnes 457ba <statvfs+0x72> <== NEVER TAKEN
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
45782: 4878 0038 pea 38 <DBL_MANT_DIG+0x3>
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
45786: 246e fffc moveal %fp@(-4),%a2
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
4578a: 42a7 clrl %sp@-
4578c: 2f03 movel %d3,%sp@-
4578e: 4eb9 0004 fbf4 jsr 4fbf4 <memset>
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
45794: 206a 0028 moveal %a2@(40),%a0
45798: 2f03 movel %d3,%sp@-
4579a: 486a 001c pea %a2@(28)
4579e: 2068 0044 moveal %a0@(68),%a0
457a2: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
457a4: 2f02 movel %d2,%sp@-
457a6: 2d40 ffe8 movel %d0,%fp@(-24)
457aa: 4eb9 0004 4574 jsr 44574 <rtems_filesystem_freenode>
return result;
457b0: 202e ffe8 movel %fp@(-24),%d0
457b4: 4fef 0018 lea %sp@(24),%sp
457b8: 6002 bras 457bc <statvfs+0x74>
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
457ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
457bc: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2
457c2: 4e5e unlk %fp
...
0004464c <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
4464c: 4e56 0000 linkw %fp,#0
44650: 206e 0008 moveal %fp@(8),%a0
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
44654: 2028 0106 movel %a0@(262),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
44658: 2f02 movel %d2,%sp@-
/*
* The sync_wrapper() function will operate on the current thread's
* reent structure so we will temporarily use that.
*/
this_reent = t->libc_reent;
if ( this_reent ) {
4465a: 4a80 tstl %d0
4465c: 6728 beqs 44686 <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
4465e: 2279 0005 f7cc moveal 5f7cc <_Per_CPU_Information+0xc>,%a1
44664: 2429 0106 movel %a1@(262),%d2
_Thread_Executing->libc_reent = this_reent;
44668: 2340 0106 movel %d0,%a1@(262)
_fwalk (t->libc_reent, sync_wrapper);
4466c: 487a 0020 pea %pc@(4468e <sync_wrapper>)
44670: 2f28 0106 movel %a0@(262),%sp@-
44674: 4eb9 0004 e86c jsr 4e86c <_fwalk>
_Thread_Executing->libc_reent = current_reent;
4467a: 2079 0005 f7cc moveal 5f7cc <_Per_CPU_Information+0xc>,%a0
44680: 508f addql #8,%sp
44682: 2142 0106 movel %d2,%a0@(262)
}
}
44686: 242e fffc movel %fp@(-4),%d2
4468a: 4e5e unlk %fp <== NOT EXECUTED
00044aac <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
44aac: 4e56 0000 linkw %fp,#0
44ab0: 202e 000c movel %fp@(12),%d0
44ab4: 2f03 movel %d3,%sp@-
44ab6: 262e 0010 movel %fp@(16),%d3
44aba: 2f02 movel %d2,%sp@-
44abc: 242e 0008 movel %fp@(8),%d2
switch (opt) {
44ac0: 4a80 tstl %d0
44ac2: 672c beqs 44af0 <tcsetattr+0x44>
44ac4: 7201 moveq #1,%d1
44ac6: b280 cmpl %d0,%d1
44ac8: 6710 beqs 44ada <tcsetattr+0x2e>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
44aca: 4eb9 0004 e064 jsr 4e064 <__errno>
44ad0: 2040 moveal %d0,%a0
44ad2: 20bc 0000 0086 movel #134,%a0@
44ad8: 6034 bras 44b0e <tcsetattr+0x62>
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
44ada: 42a7 clrl %sp@-
44adc: 4878 0003 pea 3 <DIVIDE>
44ae0: 2f02 movel %d2,%sp@-
44ae2: 4eb9 0004 b1a4 jsr 4b1a4 <ioctl>
44ae8: 4fef 000c lea %sp@(12),%sp
44aec: 4a80 tstl %d0
44aee: 6d1e blts 44b0e <tcsetattr+0x62> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44af0: 2d43 0010 movel %d3,%fp@(16)
44af4: 7002 moveq #2,%d0
44af6: 2d42 0008 movel %d2,%fp@(8)
}
}
44afa: 242e fff8 movel %fp@(-8),%d2
44afe: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44b02: 2d40 000c movel %d0,%fp@(12)
}
}
44b06: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
44b08: 4ef9 0004 b1a4 jmp 4b1a4 <ioctl>
}
}
44b0e: 242e fff8 movel %fp@(-8),%d2
44b12: 70ff moveq #-1,%d0
44b14: 262e fffc movel %fp@(-4),%d3
44b18: 4e5e unlk %fp <== NOT EXECUTED
00045410 <timer_create>:
timer_t *timerid
)
{
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
45410: 7001 moveq #1,%d0
int timer_create(
clockid_t clock_id,
struct sigevent *evp,
timer_t *timerid
)
{
45412: 4e56 0000 linkw %fp,#0
45416: 2f0b movel %a3,%sp@-
45418: 266e 0010 moveal %fp@(16),%a3
4541c: 2f0a movel %a2,%sp@-
4541e: 246e 000c moveal %fp@(12),%a2
POSIX_Timer_Control *ptimer;
if ( clock_id != CLOCK_REALTIME )
45422: b0ae 0008 cmpl %fp@(8),%d0
45426: 6620 bnes 45448 <timer_create+0x38>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !timerid )
45428: 4a8b tstl %a3
4542a: 671c beqs 45448 <timer_create+0x38>
/*
* The data of the structure evp are checked in order to verify if they
* are coherent.
*/
if (evp != NULL) {
4542c: 4a8a tstl %a2
4542e: 6726 beqs 45456 <timer_create+0x46>
/* The structure has data */
if ( ( evp->sigev_notify != SIGEV_NONE ) &&
45430: 2012 movel %a2@,%d0
45432: 7201 moveq #1,%d1
45434: 5380 subql #1,%d0
45436: b280 cmpl %d0,%d1
45438: 650e bcss 45448 <timer_create+0x38> <== NEVER TAKEN
( evp->sigev_notify != SIGEV_SIGNAL ) ) {
/* The value of the field sigev_notify is not valid */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !evp->sigev_signo )
4543a: 202a 0004 movel %a2@(4),%d0
4543e: 6708 beqs 45448 <timer_create+0x38> <== NEVER TAKEN
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
45440: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(evp->sigev_signo) )
45442: 721f moveq #31,%d1
45444: b280 cmpl %d0,%d1
45446: 640e bccs 45456 <timer_create+0x46> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
45448: 4eb9 0004 d338 jsr 4d338 <__errno>
4544e: 7216 moveq #22,%d1
45450: 2040 moveal %d0,%a0
45452: 2081 movel %d1,%a0@
45454: 6034 bras 4548a <timer_create+0x7a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
45456: 2039 0005 e4cc movel 5e4cc <_Thread_Dispatch_disable_level>,%d0
4545c: 5280 addql #1,%d0
4545e: 23c0 0005 e4cc movel %d0,5e4cc <_Thread_Dispatch_disable_level>
* the inactive chain of free timer control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Allocate( void )
{
return (POSIX_Timer_Control *) _Objects_Allocate( &_POSIX_Timer_Information );
45464: 4879 0005 e742 pea 5e742 <_POSIX_Timer_Information>
4546a: 4eb9 0004 70d0 jsr 470d0 <_Objects_Allocate>
/*
* Allocate a timer
*/
ptimer = _POSIX_Timer_Allocate();
if ( !ptimer ) {
45470: 588f addql #4,%sp
45472: 2040 moveal %d0,%a0
45474: 4a80 tstl %d0
45476: 6616 bnes 4548e <timer_create+0x7e>
_Thread_Enable_dispatch();
45478: 4eb9 0004 7d0e jsr 47d0e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
4547e: 4eb9 0004 d338 jsr 4d338 <__errno>
45484: 2040 moveal %d0,%a0
45486: 700b moveq #11,%d0
45488: 2080 movel %d0,%a0@
4548a: 70ff moveq #-1,%d0
4548c: 606a bras 454f8 <timer_create+0xe8>
}
/* The data of the created timer are stored to use them later */
ptimer->state = POSIX_TIMER_STATE_CREATE_NEW;
4548e: 7002 moveq #2,%d0
45490: 1140 003c moveb %d0,%a0@(60)
ptimer->thread_id = _Thread_Executing->Object.id;
45494: 2279 0005 e95c moveal 5e95c <_Per_CPU_Information+0xc>,%a1
4549a: 2169 0008 0038 movel %a1@(8),%a0@(56)
if ( evp != NULL ) {
454a0: 4a8a tstl %a2
454a2: 6710 beqs 454b4 <timer_create+0xa4>
ptimer->inf.sigev_notify = evp->sigev_notify;
454a4: 2152 003e movel %a2@,%a0@(62)
ptimer->inf.sigev_signo = evp->sigev_signo;
454a8: 216a 0004 0042 movel %a2@(4),%a0@(66)
ptimer->inf.sigev_value = evp->sigev_value;
454ae: 216a 0008 0046 movel %a2@(8),%a0@(70)
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
454b4: 2028 0008 movel %a0@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
454b8: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
454ba: 2279 0005 e75a moveal 5e75a <_POSIX_Timer_Information+0x18>,%a1
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
454c0: 3200 movew %d0,%d1
}
ptimer->overrun = 0;
454c2: 42a8 0066 clrl %a0@(102)
ptimer->timer_data.it_value.tv_sec = 0;
454c6: 42a8 005a clrl %a0@(90)
ptimer->timer_data.it_value.tv_nsec = 0;
454ca: 42a8 005e clrl %a0@(94)
ptimer->timer_data.it_interval.tv_sec = 0;
454ce: 42a8 0052 clrl %a0@(82)
ptimer->timer_data.it_interval.tv_nsec = 0;
454d2: 42a8 0056 clrl %a0@(86)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
454d6: 42a8 0018 clrl %a0@(24)
the_watchdog->routine = routine;
454da: 42a8 002c clrl %a0@(44)
the_watchdog->id = id;
454de: 42a8 0030 clrl %a0@(48)
the_watchdog->user_data = user_data;
454e2: 42a8 0034 clrl %a0@(52)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
454e6: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
454ea: 42a8 000c clrl %a0@(12)
_Watchdog_Initialize( &ptimer->Timer, NULL, 0, NULL );
_Objects_Open_u32(&_POSIX_Timer_Information, &ptimer->Object, 0);
*timerid = ptimer->Object.id;
454ee: 2680 movel %d0,%a3@
_Thread_Enable_dispatch();
454f0: 4eb9 0004 7d0e jsr 47d0e <_Thread_Enable_dispatch>
return 0;
454f6: 4280 clrl %d0
}
454f8: 246e fff8 moveal %fp@(-8),%a2
454fc: 266e fffc moveal %fp@(-4),%a3
45500: 4e5e unlk %fp <== NOT EXECUTED
0004769c <truncate>:
int truncate(
const char *path,
off_t length
)
{
4769c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
476a0: 2f03 movel %d3,%sp@- <== NOT EXECUTED
476a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
476a4: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
476a8: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED
476ac: 4eb9 0004 5650 jsr 45650 <open> <== NOT EXECUTED
if ( fd == -1 )
476b2: 508f addql #8,%sp <== NOT EXECUTED
)
{
int status;
int fd;
fd = open( path, O_WRONLY );
476b4: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( fd == -1 )
476b6: 70ff moveq #-1,%d0 <== NOT EXECUTED
476b8: b082 cmpl %d2,%d0 <== NOT EXECUTED
476ba: 6720 beqs 476dc <truncate+0x40> <== NOT EXECUTED
return -1;
status = ftruncate( fd, length );
476bc: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
476c0: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
476c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED
476c6: 4eb9 0004 c3e8 jsr 4c3e8 <ftruncate> <== NOT EXECUTED
476cc: 2600 movel %d0,%d3 <== NOT EXECUTED
(void) close( fd );
476ce: 2f02 movel %d2,%sp@- <== NOT EXECUTED
476d0: 4eb9 0004 433c jsr 4433c <close> <== NOT EXECUTED
return status;
476d6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
476da: 6002 bras 476de <truncate+0x42> <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
return -1;
476dc: 76ff moveq #-1,%d3 <== NOT EXECUTED
status = ftruncate( fd, length );
(void) close( fd );
return status;
}
476de: 2003 movel %d3,%d0 <== NOT EXECUTED
476e0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
476e4: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED
476e8: 4e5e unlk %fp <== NOT EXECUTED
000455d6 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
455d6: 4e56 ffe8 linkw %fp,#-24
455da: 48d7 041c moveml %d2-%d4/%a2,%sp@
455de: 262e 0008 movel %fp@(8),%d3
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
455e2: 4ab9 0005 f95e tstl 5f95e <_POSIX_signals_Ualarm_timer+0x1c>
455e8: 6620 bnes 4560a <ualarm+0x34>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
455ea: 42b9 0005 f94a clrl 5f94a <_POSIX_signals_Ualarm_timer+0x8>
the_watchdog->routine = routine;
455f0: 203c 0004 5594 movel #284052,%d0
the_watchdog->id = id;
455f6: 42b9 0005 f962 clrl 5f962 <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
455fc: 23c0 0005 f95e movel %d0,5f95e <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id;
the_watchdog->user_data = user_data;
45602: 42b9 0005 f966 clrl 5f966 <_POSIX_signals_Ualarm_timer+0x24>
45608: 6056 bras 45660 <ualarm+0x8a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4560a: 4879 0005 f942 pea 5f942 <_POSIX_signals_Ualarm_timer>
45610: 4eb9 0004 8ce4 jsr 48ce4 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
45616: 588f addql #4,%sp
45618: 7201 moveq #1,%d1
4561a: 5580 subql #2,%d0
4561c: b280 cmpl %d0,%d1
4561e: 6540 bcss 45660 <ualarm+0x8a> <== NEVER TAKEN
* 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);
45620: 2039 0005 f956 movel 5f956 <_POSIX_signals_Ualarm_timer+0x14>,%d0
45626: d0b9 0005 f94e addl 5f94e <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
4562c: 486e fff8 pea %fp@(-8)
45630: 90b9 0005 f95a subl 5f95a <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
45636: 283c 000f 4240 movel #1000000,%d4
ticks = the_timer->initial;
ticks -= (the_timer->stop_time - the_timer->start_time);
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
4563c: 2f00 movel %d0,%sp@-
4563e: 4eb9 0004 8808 jsr 48808 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
45644: 202e fff8 movel %fp@(-8),%d0
45648: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
4564c: 283c 0000 03e8 movel #1000,%d4
45652: 508f addql #8,%sp
45654: 242e fffc movel %fp@(-4),%d2
45658: 4c44 2802 remsl %d4,%d2,%d2
4565c: d480 addl %d0,%d2
4565e: 6002 bras 45662 <ualarm+0x8c>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
45660: 4282 clrl %d2
/*
* If useconds is non-zero, then the caller wants to schedule
* the alarm repeatedly at that interval. If the interval is
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
45662: 4a83 tstl %d3
45664: 674e beqs 456b4 <ualarm+0xde>
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
45666: 283c 0000 03e8 movel #1000,%d4
ticks = _Timespec_To_ticks( &tp );
4566c: 45f9 0004 8888 lea 48888 <_Timespec_To_ticks>,%a2
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
45672: 223c 000f 4240 movel #1000000,%d1
45678: 4c41 3000 remul %d1,%d0,%d3
4567c: 4c41 3003 remul %d1,%d3,%d3
45680: 2d43 fff8 movel %d3,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
45684: 4c00 4800 mulsl %d0,%d4
ticks = _Timespec_To_ticks( &tp );
45688: 260e movel %fp,%d3
4568a: 5183 subql #8,%d3
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
4568c: 2d44 fffc movel %d4,%fp@(-4)
ticks = _Timespec_To_ticks( &tp );
45690: 2f03 movel %d3,%sp@-
45692: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
45694: 2f03 movel %d3,%sp@-
45696: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
45698: 4879 0005 f942 pea 5f942 <_POSIX_signals_Ualarm_timer>
4569e: 4879 0005 f1ee pea 5f1ee <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
456a4: 23c0 0005 f94e movel %d0,5f94e <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
456aa: 4eb9 0004 8bc8 jsr 48bc8 <_Watchdog_Insert>
456b0: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
456b4: 2002 movel %d2,%d0
456b6: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
456bc: 4e5e unlk %fp <== NOT EXECUTED
00045c74 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
45c74: 4e56 ffbc linkw %fp,#-68
45c78: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
45c7c: 246e 0008 moveal %fp@(8),%a2
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
45c80: 2f0a movel %a2,%sp@-
45c82: 4eb9 0004 3452 jsr 43452 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
45c88: 588f addql #4,%sp
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
45c8a: 2a00 movel %d0,%d5
45c8c: 200e movel %fp,%d0
45c8e: 0680 ffff ffe8 addil #-24,%d0
if ( parentpathlen == 0 )
45c94: 4a85 tstl %d5
45c96: 6616 bnes 45cae <unlink+0x3a>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
45c98: 2f00 movel %d0,%sp@-
45c9a: 486e fffc pea %fp@(-4)
const char *name;
rtems_filesystem_location_info_t parentloc;
rtems_filesystem_location_info_t loc;
int i;
int result;
bool free_parentloc = false;
45c9e: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
45ca0: 2f0a movel %a2,%sp@-
45ca2: 4eb9 0004 4288 jsr 44288 <rtems_filesystem_get_start_loc>
45ca8: 4fef 000c lea %sp@(12),%sp
45cac: 601e bras 45ccc <unlink+0x58>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
45cae: 42a7 clrl %sp@-
45cb0: 2f00 movel %d0,%sp@-
45cb2: 4878 0002 pea 2 <DOUBLE_FLOAT>
45cb6: 2f05 movel %d5,%sp@-
45cb8: 2f0a movel %a2,%sp@-
45cba: 4eb9 0004 33da jsr 433da <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
45cc0: 4fef 0014 lea %sp@(20),%sp
45cc4: 4a80 tstl %d0
45cc6: 6600 00c2 bnew 45d8a <unlink+0x116>
return -1;
free_parentloc = true;
45cca: 7801 moveq #1,%d4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
45ccc: 4878 0014 pea 14 <OPER2>
45cd0: 260e movel %fp,%d3
45cd2: 0683 ffff ffe8 addil #-24,%d3
45cd8: 240e movel %fp,%d2
45cda: 0682 ffff ffd4 addil #-44,%d2
name = path + parentpathlen;
45ce0: d5c5 addal %d5,%a2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
45ce2: 47f9 0005 15cc lea 515cc <strlen>,%a3
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
45ce8: 2f03 movel %d3,%sp@-
45cea: 2f02 movel %d2,%sp@-
45cec: 4eb9 0005 0ad4 jsr 50ad4 <memcpy>
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
45cf2: 2f0a movel %a2,%sp@-
45cf4: 4e93 jsr %a3@
45cf6: 2e80 movel %d0,%sp@
45cf8: 2f0a movel %a2,%sp@-
45cfa: 4eb9 0004 3494 jsr 43494 <rtems_filesystem_prefix_separators>
45d00: d5c0 addal %d0,%a2
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
45d02: 2f0a movel %a2,%sp@-
45d04: 4e93 jsr %a3@
45d06: 4297 clrl %sp@
45d08: 2f02 movel %d2,%sp@-
45d0a: 42a7 clrl %sp@-
45d0c: 2f00 movel %d0,%sp@-
45d0e: 2f0a movel %a2,%sp@-
45d10: 4eb9 0004 3340 jsr 43340 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
45d16: 4fef 0028 lea %sp@(40),%sp
45d1a: 4a80 tstl %d0
45d1c: 6710 beqs 45d2e <unlink+0xba> <== ALWAYS TAKEN
if ( free_parentloc )
45d1e: 4a04 tstb %d4 <== NOT EXECUTED
45d20: 6768 beqs 45d8a <unlink+0x116> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
45d22: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45d24: 4eb9 0004 34d0 jsr 434d0 <rtems_filesystem_freenode> <== NOT EXECUTED
45d2a: 588f addql #4,%sp <== NOT EXECUTED
45d2c: 605c bras 45d8a <unlink+0x116> <== NOT EXECUTED
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
45d2e: 206e ffe0 moveal %fp@(-32),%a0
45d32: 45f9 0004 34d0 lea 434d0 <rtems_filesystem_freenode>,%a2
45d38: 2f02 movel %d2,%sp@-
45d3a: 2068 0010 moveal %a0@(16),%a0
45d3e: 4e90 jsr %a0@
45d40: 588f addql #4,%sp
45d42: 7201 moveq #1,%d1
45d44: b280 cmpl %d0,%d1
45d46: 661e bnes 45d66 <unlink+0xf2>
rtems_filesystem_freenode( &loc );
45d48: 2f02 movel %d2,%sp@-
45d4a: 4e92 jsr %a2@
if ( free_parentloc )
45d4c: 588f addql #4,%sp
45d4e: 4a04 tstb %d4
45d50: 6706 beqs 45d58 <unlink+0xe4> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
45d52: 2f03 movel %d3,%sp@- <== NOT EXECUTED
45d54: 4e92 jsr %a2@ <== NOT EXECUTED
45d56: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
45d58: 4eb9 0005 0228 jsr 50228 <__errno>
45d5e: 2040 moveal %d0,%a0
45d60: 7015 moveq #21,%d0
45d62: 2080 movel %d0,%a0@
45d64: 6024 bras 45d8a <unlink+0x116>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
45d66: 2f02 movel %d2,%sp@-
45d68: 206e ffe0 moveal %fp@(-32),%a0
45d6c: 2f03 movel %d3,%sp@-
45d6e: 2068 000c moveal %a0@(12),%a0
45d72: 4e90 jsr %a0@
45d74: 2a00 movel %d0,%d5
rtems_filesystem_freenode( &loc );
45d76: 2f02 movel %d2,%sp@-
45d78: 4e92 jsr %a2@
if ( free_parentloc )
45d7a: 4fef 000c lea %sp@(12),%sp
45d7e: 4a04 tstb %d4
45d80: 670a beqs 45d8c <unlink+0x118>
rtems_filesystem_freenode( &parentloc );
45d82: 2f03 movel %d3,%sp@-
45d84: 4e92 jsr %a2@
45d86: 588f addql #4,%sp
45d88: 6002 bras 45d8c <unlink+0x118>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
45d8a: 7aff moveq #-1,%d5
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
45d8c: 2005 movel %d5,%d0
45d8e: 4cee 0c3c ffbc moveml %fp@(-68),%d2-%d5/%a2-%a3
45d94: 4e5e unlk %fp <== NOT EXECUTED
00045fe4 <unmount>:
*/
int unmount(
const char *path
)
{
45fe4: 4e56 ffe0 linkw %fp,#-32
45fe8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
45fec: 246e 0008 moveal %fp@(8),%a2
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
45ff0: 7401 moveq #1,%d2
45ff2: 2f0a movel %a2,%sp@-
45ff4: 4eb9 0004 ee30 jsr 4ee30 <strlen>
45ffa: 2e82 movel %d2,%sp@
45ffc: 240e movel %fp,%d2
45ffe: 0682 ffff ffec addil #-20,%d2
46004: 2f02 movel %d2,%sp@-
46006: 42a7 clrl %sp@-
46008: 2f00 movel %d0,%sp@-
4600a: 2f0a movel %a2,%sp@-
4600c: 4eb9 0004 33c2 jsr 433c2 <rtems_filesystem_evaluate_path>
46012: 4fef 0014 lea %sp@(20),%sp
46016: 4a80 tstl %d0
46018: 6600 00e8 bnew 46102 <unmount+0x11e>
return -1;
mt_entry = loc.mt_entry;
4601c: 246e fffc moveal %fp@(-4),%a2
46020: 47f9 0004 34b8 lea 434b8 <rtems_filesystem_freenode>,%a3
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
46026: 202e ffec movel %fp@(-20),%d0
4602a: b0aa 001c cmpl %a2@(28),%d0
4602e: 6716 beqs 46046 <unmount+0x62>
rtems_filesystem_freenode( &loc );
46030: 2f02 movel %d2,%sp@-
46032: 4e93 jsr %a3@
rtems_set_errno_and_return_minus_one( EACCES );
46034: 4eb9 0004 d95c jsr 4d95c <__errno>
4603a: 588f addql #4,%sp
4603c: 720d moveq #13,%d1
4603e: 2040 moveal %d0,%a0
46040: 2081 movel %d1,%a0@
46042: 6000 00be braw 46102 <unmount+0x11e>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
46046: 2f02 movel %d2,%sp@-
46048: 4e93 jsr %a3@
* 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 )
4604a: 2079 0005 e1f4 moveal 5e1f4 <rtems_current_user_env>,%a0
46050: 588f addql #4,%sp
46052: b5e8 0014 cmpal %a0@(20),%a2
46056: 6724 beqs 4607c <unmount+0x98>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
46058: 2f2a 002c movel %a2@(44),%sp@-
4605c: 487a ff6e pea %pc@(45fcc <is_fs_below_mount_point>)
46060: 4eb9 0004 3c9a jsr 43c9a <rtems_filesystem_mount_iterate>
46066: 508f addql #8,%sp
46068: 4a00 tstb %d0
4606a: 6610 bnes 4607c <unmount+0x98>
* 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 )
4606c: 2f0a movel %a2,%sp@-
4606e: 4eb9 0004 3804 jsr 43804 <rtems_libio_is_open_files_in_fs>
46074: 588f addql #4,%sp
46076: 7201 moveq #1,%d1
46078: b280 cmpl %d0,%d1
4607a: 660e bnes 4608a <unmount+0xa6>
rtems_set_errno_and_return_minus_one( EBUSY );
4607c: 4eb9 0004 d95c jsr 4d95c <__errno>
46082: 2040 moveal %d0,%a0
46084: 7010 moveq #16,%d0
46086: 2080 movel %d0,%a0@
46088: 6078 bras 46102 <unmount+0x11e>
* 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 )
4608a: 206a 0014 moveal %a2@(20),%a0
4608e: 2f0a movel %a2,%sp@-
46090: 2068 0028 moveal %a0@(40),%a0
46094: 4e90 jsr %a0@
46096: 588f addql #4,%sp
46098: 4a80 tstl %d0
4609a: 6666 bnes 46102 <unmount+0x11e> <== NEVER TAKEN
* NOTE: Fatal error is called in a case which should never happen
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
4609c: 206a 0028 moveal %a2@(40),%a0
460a0: 2f0a movel %a2,%sp@-
460a2: 2068 002c moveal %a0@(44),%a0
460a6: 4e90 jsr %a0@
460a8: 588f addql #4,%sp
460aa: 4a80 tstl %d0
460ac: 671a beqs 460c8 <unmount+0xe4> <== ALWAYS TAKEN
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
460ae: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED
460b2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
460b4: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED
460b8: 4e90 jsr %a0@ <== NOT EXECUTED
460ba: 588f addql #4,%sp <== NOT EXECUTED
460bc: 4a80 tstl %d0 <== NOT EXECUTED
460be: 6742 beqs 46102 <unmount+0x11e> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
460c0: 42a7 clrl %sp@- <== NOT EXECUTED
460c2: 4eb9 0004 6fe4 jsr 46fe4 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
460c8: 42a7 clrl %sp@-
460ca: 42a7 clrl %sp@-
460cc: 2f39 0005 f87c movel 5f87c <rtems_libio_semaphore>,%sp@-
460d2: 4eb9 0004 69a0 jsr 469a0 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
460d8: 2f0a movel %a2,%sp@-
460da: 4eb9 0004 7330 jsr 47330 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
460e0: 2f39 0005 f87c movel 5f87c <rtems_libio_semaphore>,%sp@-
460e6: 4eb9 0004 6aa8 jsr 46aa8 <rtems_semaphore_release>
/*
* 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 );
460ec: 486a 0008 pea %a2@(8)
460f0: 4e93 jsr %a3@
free( mt_entry );
460f2: 2f0a movel %a2,%sp@-
460f4: 4eb9 0004 34cc jsr 434cc <free>
return 0;
460fa: 4fef 001c lea %sp@(28),%sp
460fe: 4280 clrl %d0
46100: 6002 bras 46104 <unmount+0x120>
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
46102: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
46104: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
4610a: 4e5e unlk %fp
...
00046050 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
46050: 4e56 ffe0 linkw %fp,#-32
46054: 2f0a movel %a2,%sp@-
46056: 246e 000c moveal %fp@(12),%a2
4605a: 2f02 movel %d2,%sp@-
4605c: 242e 0008 movel %fp@(8),%d2
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
46060: 2f02 movel %d2,%sp@-
46062: 4eb9 0004 f9f4 jsr 4f9f4 <strlen>
46068: 7201 moveq #1,%d1
4606a: 2e81 movel %d1,%sp@
4606c: 486e ffe4 pea %fp@(-28)
46070: 42a7 clrl %sp@-
46072: 2f00 movel %d0,%sp@-
46074: 2f02 movel %d2,%sp@-
46076: 4eb9 0004 2ff2 jsr 42ff2 <rtems_filesystem_evaluate_path>
4607c: 4fef 0014 lea %sp@(20),%sp
46080: 4a80 tstl %d0
46082: 6646 bnes 460ca <utime+0x7a>
return -1;
if ( times == NULL ) {
46084: 4a8a tstl %a2
46086: 6616 bnes 4609e <utime+0x4e> <== ALWAYS TAKEN
now.actime = now.modtime = time( NULL );
46088: 42a7 clrl %sp@- <== NOT EXECUTED
times = &now;
4608a: 45ee fff8 lea %fp@(-8),%a2 <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
4608e: 4eb9 0005 1cd4 jsr 51cd4 <time> <== NOT EXECUTED
46094: 588f addql #4,%sp <== NOT EXECUTED
46096: 2d40 fffc movel %d0,%fp@(-4) <== NOT EXECUTED
4609a: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
4609e: 2f2a 0004 movel %a2@(4),%sp@-
460a2: 2f12 movel %a2@,%sp@-
460a4: 45ee ffe4 lea %fp@(-28),%a2
460a8: 206e fff0 moveal %fp@(-16),%a0
460ac: 2f0a movel %a2,%sp@-
460ae: 2068 0030 moveal %a0@(48),%a0
460b2: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
460b4: 2f0a movel %a2,%sp@-
460b6: 2d40 ffe0 movel %d0,%fp@(-32)
460ba: 4eb9 0004 33a0 jsr 433a0 <rtems_filesystem_freenode>
return result;
460c0: 202e ffe0 movel %fp@(-32),%d0
460c4: 4fef 0010 lea %sp@(16),%sp
460c8: 6002 bras 460cc <utime+0x7c>
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
460ca: 70ff moveq #-1,%d0
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
460cc: 242e ffd8 movel %fp@(-40),%d2
460d0: 246e ffdc moveal %fp@(-36),%a2
460d4: 4e5e unlk %fp <== NOT EXECUTED
00044ee0 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
44ee0: 4e56 ffc4 linkw %fp,#-60
44ee4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
44ee8: 2c0e movel %fp,%d6
44eea: 0686 ffff ffec addil #-20,%d6
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
44ef0: 49f9 0005 b215 lea 5b215 <rtems_filesystem_default_pathconf+0x41>,%a4
*/
void vprintk(
const char *fmt,
va_list ap
)
{
44ef6: 266e 0008 moveal %fp@(8),%a3
44efa: 246e 000c moveal %fp@(12),%a2
for (; *fmt != '\0'; fmt++) {
44efe: 6000 022c braw 4512c <vprintk+0x24c>
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
44f02: 49c0 extbl %d0
44f04: 7225 moveq #37,%d1
44f06: b280 cmpl %d0,%d1
44f08: 6706 beqs 44f10 <vprintk+0x30>
BSP_output_char(*fmt);
44f0a: 2f00 movel %d0,%sp@-
44f0c: 6000 0168 braw 45076 <vprintk+0x196>
continue;
}
fmt++;
44f10: 528b addql #1,%a3
if (*fmt == '0' ) {
44f12: 7430 moveq #48,%d2
44f14: 1013 moveb %a3@,%d0
44f16: 49c0 extbl %d0
44f18: b480 cmpl %d0,%d2
44f1a: 6606 bnes 44f22 <vprintk+0x42>
lead = '0';
fmt++;
44f1c: 528b addql #1,%a3
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
44f1e: 7830 moveq #48,%d4
44f20: 6002 bras 44f24 <vprintk+0x44>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
44f22: 7820 moveq #32,%d4
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
44f24: 7e2d moveq #45,%d7
44f26: 1013 moveb %a3@,%d0
44f28: 49c0 extbl %d0
44f2a: be80 cmpl %d0,%d7
44f2c: 6608 bnes 44f36 <vprintk+0x56>
minus = true;
fmt++;
44f2e: 528b addql #1,%a3
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
44f30: 3a7c 0001 moveaw #1,%a5
44f34: 6002 bras 44f38 <vprintk+0x58>
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
44f36: 9bcd subal %a5,%a5
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
44f38: 200b movel %a3,%d0
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
44f3a: 4283 clrl %d3
44f3c: 6010 bras 44f4e <vprintk+0x6e>
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
44f3e: 2203 movel %d3,%d1
44f40: e789 lsll #3,%d1
44f42: 2241 moveal %d1,%a1
44f44: 41f1 3a00 lea %a1@(00000000,%d3:l:2),%a0
width += ((unsigned) *fmt - '0');
44f48: 41f0 28d0 lea %a0@(ffffffd0,%d2:l),%a0
44f4c: 2608 movel %a0,%d3
44f4e: 2640 moveal %d0,%a3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
44f50: 5280 addql #1,%d0
44f52: 7e09 moveq #9,%d7
44f54: 1213 moveb %a3@,%d1
44f56: 2a01 movel %d1,%d5
44f58: 0685 ffff ffd0 addil #-48,%d5
44f5e: 1401 moveb %d1,%d2
44f60: 0285 0000 00ff andil #255,%d5
44f66: 49c2 extbl %d2
44f68: be85 cmpl %d5,%d7
44f6a: 64d2 bccs 44f3e <vprintk+0x5e>
44f6c: 2a03 movel %d3,%d5
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
44f6e: 1e3c 006c moveb #108,%d7
44f72: be82 cmpl %d2,%d7
44f74: 6604 bnes 44f7a <vprintk+0x9a>
lflag = true;
c = *++fmt;
44f76: 2640 moveal %d0,%a3
44f78: 1213 moveb %a3@,%d1
}
if ( c == 'c' ) {
44f7a: 7463 moveq #99,%d2
44f7c: 1001 moveb %d1,%d0
44f7e: 49c0 extbl %d0
44f80: b480 cmpl %d0,%d2
44f82: 6618 bnes 44f9c <vprintk+0xbc>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
44f84: 2012 movel %a2@,%d0
BSP_output_char(chr);
44f86: 49c0 extbl %d0
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
44f88: 280a movel %a2,%d4
44f8a: 5884 addql #4,%d4
BSP_output_char(chr);
44f8c: 2f00 movel %d0,%sp@-
44f8e: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
44f94: 4e90 jsr %a0@
continue;
44f96: 588f addql #4,%sp
44f98: 6000 018e braw 45128 <vprintk+0x248>
}
if ( c == 's' ) {
44f9c: 7473 moveq #115,%d2
44f9e: b480 cmpl %d0,%d2
44fa0: 667e bnes 45020 <vprintk+0x140>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
44fa2: 280a movel %a2,%d4
44fa4: 5884 addql #4,%d4
44fa6: 2452 moveal %a2@,%a2
if ( str == NULL ) {
44fa8: 4a8a tstl %a2
44faa: 6606 bnes 44fb2 <vprintk+0xd2>
str = "";
44fac: 45f9 0005 b214 lea 5b214 <rtems_filesystem_default_pathconf+0x40>,%a2
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
44fb2: 204a moveal %a2,%a0
44fb4: 4282 clrl %d2
44fb6: 6002 bras 44fba <vprintk+0xda>
44fb8: 5282 addql #1,%d2
44fba: 4a18 tstb %a0@+
44fbc: 66fa bnes 44fb8 <vprintk+0xd8>
;
/* leading spaces */
if ( !minus )
44fbe: 3e0d movew %a5,%d7
44fc0: 4a07 tstb %d7
44fc2: 6618 bnes 44fdc <vprintk+0xfc>
44fc4: 2a02 movel %d2,%d5
44fc6: 6010 bras 44fd8 <vprintk+0xf8>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
44fc8: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
44fcc: 5285 addql #1,%d5 <== NOT EXECUTED
BSP_output_char(' ');
44fce: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0 <== NOT EXECUTED
44fd4: 4e90 jsr %a0@ <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
44fd6: 588f addql #4,%sp <== NOT EXECUTED
44fd8: b685 cmpl %d5,%d3
44fda: 62ec bhis 44fc8 <vprintk+0xe8> <== NEVER TAKEN
BSP_output_char(' ');
/* no width option */
if (width == 0) {
44fdc: 4a83 tstl %d3
44fde: 6616 bnes 44ff6 <vprintk+0x116>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
44fe0: 4a82 tstl %d2
44fe2: 6718 beqs 44ffc <vprintk+0x11c>
44fe4: 2602 movel %d2,%d3
44fe6: 600e bras 44ff6 <vprintk+0x116>
BSP_output_char(*str);
44fe8: 49c0 extbl %d0
44fea: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
44ff0: 2f00 movel %d0,%sp@-
44ff2: 4e90 jsr %a0@
44ff4: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
44ff6: 101a moveb %a2@+,%d0
44ff8: 66ee bnes 44fe8 <vprintk+0x108>
44ffa: 6002 bras 44ffe <vprintk+0x11e>
44ffc: 2602 movel %d2,%d3
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
44ffe: 300d movew %a5,%d0
45000: 4a00 tstb %d0
45002: 6700 0124 beqw 45128 <vprintk+0x248>
45006: 6010 bras 45018 <vprintk+0x138>
for ( i=len ; i<width ; i++ )
BSP_output_char(' ');
45008: 4878 0020 pea 20 <OPER2+0xc>
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
4500c: 5282 addql #1,%d2
BSP_output_char(' ');
4500e: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
45014: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45016: 588f addql #4,%sp
45018: b682 cmpl %d2,%d3
4501a: 62ec bhis 45008 <vprintk+0x128>
4501c: 6000 010a braw 45128 <vprintk+0x248>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45020: 746f moveq #111,%d2
45022: b480 cmpl %d0,%d2
45024: 6760 beqs 45086 <vprintk+0x1a6> <== NEVER TAKEN
45026: 143c 004f moveb #79,%d2
4502a: b480 cmpl %d0,%d2
4502c: 6758 beqs 45086 <vprintk+0x1a6> <== NEVER TAKEN
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
4502e: 143c 0069 moveb #105,%d2
45032: b480 cmpl %d0,%d2
45034: 6756 beqs 4508c <vprintk+0x1ac> <== NEVER TAKEN
45036: 143c 0049 moveb #73,%d2
4503a: b480 cmpl %d0,%d2
4503c: 674e beqs 4508c <vprintk+0x1ac> <== NEVER TAKEN
4503e: 143c 0064 moveb #100,%d2
45042: b480 cmpl %d0,%d2
45044: 6746 beqs 4508c <vprintk+0x1ac>
c == 'd' || c == 'D' ) {
45046: 143c 0044 moveb #68,%d2
4504a: b480 cmpl %d0,%d2
4504c: 673e beqs 4508c <vprintk+0x1ac> <== NEVER TAKEN
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
4504e: 143c 0075 moveb #117,%d2
45052: b480 cmpl %d0,%d2
45054: 673a beqs 45090 <vprintk+0x1b0>
45056: 143c 0055 moveb #85,%d2
4505a: b480 cmpl %d0,%d2
4505c: 6732 beqs 45090 <vprintk+0x1b0> <== NEVER TAKEN
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
4505e: 49c1 extbl %d1
45060: 7078 moveq #120,%d0
45062: b081 cmpl %d1,%d0
45064: 6730 beqs 45096 <vprintk+0x1b6>
45066: 143c 0058 moveb #88,%d2
4506a: b481 cmpl %d1,%d2
4506c: 6728 beqs 45096 <vprintk+0x1b6> <== NEVER TAKEN
base = 16; sign = false;
} else if ( c == 'p' ) {
4506e: 7e70 moveq #112,%d7
45070: be81 cmpl %d1,%d7
45072: 6722 beqs 45096 <vprintk+0x1b6>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45074: 2f01 movel %d1,%sp@-
45076: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
continue;
4507c: 280a movel %a2,%d4
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
4507e: 4e90 jsr %a0@
continue;
45080: 588f addql #4,%sp
45082: 6000 00a4 braw 45128 <vprintk+0x248>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45086: 7408 moveq #8,%d2 <== NOT EXECUTED
45088: 4200 clrb %d0 <== NOT EXECUTED
4508a: 600e bras 4509a <vprintk+0x1ba> <== NOT EXECUTED
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
4508c: 7001 moveq #1,%d0
4508e: 6002 bras 45092 <vprintk+0x1b2>
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
45090: 4200 clrb %d0
45092: 740a moveq #10,%d2
45094: 6004 bras 4509a <vprintk+0x1ba>
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
45096: 7410 moveq #16,%d2
45098: 4200 clrb %d0
} else {
BSP_output_char(c);
continue;
}
printNum(
4509a: 49c4 extbl %d4
4509c: 2a44 moveal %d4,%a5
4509e: 280a movel %a2,%d4
450a0: 5884 addql #4,%d4
450a2: 2e12 movel %a2@,%d7
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
450a4: 4a00 tstb %d0
450a6: 6720 beqs 450c8 <vprintk+0x1e8>
450a8: 4a87 tstl %d7
450aa: 6c1c bges 450c8 <vprintk+0x1e8> <== ALWAYS TAKEN
BSP_output_char('-');
450ac: 4878 002d pea 2d <OPER2+0x19> <== NOT EXECUTED
450b0: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0 <== NOT EXECUTED
450b6: 4e90 jsr %a0@ <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
450b8: 588f addql #4,%sp <== NOT EXECUTED
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
450ba: 2007 movel %d7,%d0 <== NOT EXECUTED
450bc: 4480 negl %d0 <== NOT EXECUTED
if (maxwidth) maxwidth--;
450be: 4a83 tstl %d3 <== NOT EXECUTED
450c0: 670a beqs 450cc <vprintk+0x1ec> <== NOT EXECUTED
450c2: 2a03 movel %d3,%d5 <== NOT EXECUTED
450c4: 5385 subql #1,%d5 <== NOT EXECUTED
450c6: 6004 bras 450cc <vprintk+0x1ec> <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
450c8: 2007 movel %d7,%d0
450ca: 2a03 movel %d3,%d5
450cc: 2046 moveal %d6,%a0
}
count = 0;
while ((n = unsigned_num / base) > 0) {
toPrint[count++] = (char) (unsigned_num - (n * base));
450ce: 1602 moveb %d2,%d3
450d0: 600a bras 450dc <vprintk+0x1fc>
450d2: 3e01 movew %d1,%d7
450d4: cfc3 mulsw %d3,%d7
450d6: 9087 subl %d7,%d0
450d8: 10c0 moveb %d0,%a0@+
450da: 2001 movel %d1,%d0
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
450dc: 2200 movel %d0,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
450de: 2248 moveal %a0,%a1
450e0: 93c6 subal %d6,%a1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
450e2: 4c42 1001 remul %d2,%d1,%d1
450e6: 66ea bnes 450d2 <vprintk+0x1f2>
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
450e8: 2609 movel %a1,%d3
450ea: 5283 addql #1,%d3
450ec: 1d80 98ec moveb %d0,%fp@(ffffffec,%a1:l)
450f0: 600e bras 45100 <vprintk+0x220>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
450f2: 2f0d movel %a5,%sp@-
450f4: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
450fa: 5385 subql #1,%d5
BSP_output_char(lead);
450fc: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
450fe: 588f addql #4,%sp
45100: b685 cmpl %d5,%d3
45102: 65ee bcss 450f2 <vprintk+0x212>
* console is not yet initialized or in ISR's.
*
* Arguments:
* as in printf: fmt - format string, ... - unnamed arguments.
*/
void vprintk(
45104: 2446 moveal %d6,%a2
45106: d5c3 addal %d3,%a2
45108: 4282 clrl %d2
4510a: 6018 bras 45124 <vprintk+0x244>
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
4510c: 2079 0005 c1dc moveal 5c1dc <BSP_output_char>,%a0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45112: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45114: 1022 moveb %a2@-,%d0
45116: 49c0 extbl %d0
45118: 1034 0800 moveb %a4@(00000000,%d0:l),%d0
4511c: 49c0 extbl %d0
4511e: 2f00 movel %d0,%sp@-
45120: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45122: 588f addql #4,%sp
45124: b682 cmpl %d2,%d3
45126: 62e4 bhis 4510c <vprintk+0x22c>
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45128: 528b addql #1,%a3
4512a: 2444 moveal %d4,%a2
4512c: 1013 moveb %a3@,%d0
4512e: 6600 fdd2 bnew 44f02 <vprintk+0x22>
sign,
width,
lead
);
}
}
45132: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
45138: 4e5e unlk %fp <== NOT EXECUTED
00059fbc <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
59fbc: 4e56 fff4 linkw %fp,#-12
59fc0: 202e 0008 movel %fp@(8),%d0
59fc4: 222e 000c movel %fp@(12),%d1
59fc8: 206e 0010 moveal %fp@(16),%a0
59fcc: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
59fd0: b0b9 0005 c0e4 cmpl 5c0e4 <rtems_libio_number_iops>,%d0
59fd6: 641a bccs 59ff2 <write+0x36>
iop = rtems_libio_iop( fd );
59fd8: 2400 movel %d0,%d2
59fda: ed88 lsll #6,%d0
59fdc: e78a lsll #3,%d2
59fde: 2479 0005 d7f4 moveal 5d7f4 <rtems_libio_iops>,%a2
59fe4: 9082 subl %d2,%d0
59fe6: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
59fe8: 202a 0014 movel %a2@(20),%d0
59fec: 0800 0008 btst #8,%d0
59ff0: 660e bnes 5a000 <write+0x44>
59ff2: 4eb9 0004 ca54 jsr 4ca54 <__errno>
59ff8: 7209 moveq #9,%d1
59ffa: 2040 moveal %d0,%a0
59ffc: 2081 movel %d1,%a0@
59ffe: 6018 bras 5a018 <write+0x5c>
rtems_libio_check_buffer( buffer );
5a000: 4a81 tstl %d1
5a002: 6708 beqs 5a00c <write+0x50> <== NEVER TAKEN
rtems_libio_check_count( count );
5a004: 4a88 tstl %a0
5a006: 6742 beqs 5a04a <write+0x8e>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5a008: 44c0 movew %d0,%ccr
5a00a: 6710 beqs 5a01c <write+0x60> <== ALWAYS TAKEN
5a00c: 4eb9 0004 ca54 jsr 4ca54 <__errno> <== NOT EXECUTED
5a012: 2040 moveal %d0,%a0 <== NOT EXECUTED
5a014: 7016 moveq #22,%d0 <== NOT EXECUTED
5a016: 2080 movel %d0,%a0@ <== NOT EXECUTED
5a018: 70ff moveq #-1,%d0
5a01a: 6030 bras 5a04c <write+0x90>
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5a01c: 226a 0020 moveal %a2@(32),%a1
5a020: 2f08 movel %a0,%sp@-
5a022: 2f01 movel %d1,%sp@-
5a024: 2f0a movel %a2,%sp@-
5a026: 2069 000c moveal %a1@(12),%a0
5a02a: 4e90 jsr %a0@
if ( rc > 0 )
5a02c: 4fef 000c lea %sp@(12),%sp
5a030: 4a80 tstl %d0
5a032: 6f18 bles 5a04c <write+0x90>
iop->offset += rc;
5a034: 2400 movel %d0,%d2
5a036: 5bc1 smi %d1
5a038: 49c1 extbl %d1
5a03a: d5aa 0010 addl %d2,%a2@(16)
5a03e: 262a 000c movel %a2@(12),%d3
5a042: d781 addxl %d1,%d3
5a044: 2543 000c movel %d3,%a2@(12)
5a048: 6002 bras 5a04c <write+0x90>
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 );
5a04a: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5a04c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
5a052: 4e5e unlk %fp
...
000460fc <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
460fc: 4e56 ffe4 linkw %fp,#-28
46100: 202e 0008 movel %fp@(8),%d0
46104: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
46108: 246e 000c moveal %fp@(12),%a2
4610c: 262e 0010 movel %fp@(16),%d3
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
46110: b0b9 0005 cb44 cmpl 5cb44 <rtems_libio_number_iops>,%d0
46116: 641a bccs 46132 <writev+0x36>
iop = rtems_libio_iop( fd );
46118: 2200 movel %d0,%d1
4611a: ed88 lsll #6,%d0
4611c: e789 lsll #3,%d1
4611e: 2679 0005 e254 moveal 5e254 <rtems_libio_iops>,%a3
46124: 9081 subl %d1,%d0
46126: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
46128: 202b 0014 movel %a3@(20),%d0
4612c: 0800 0008 btst #8,%d0
46130: 6610 bnes 46142 <writev+0x46>
46132: 4eb9 0004 d6d0 jsr 4d6d0 <__errno>
46138: 7209 moveq #9,%d1
4613a: 2040 moveal %d0,%a0
4613c: 2081 movel %d1,%a0@
4613e: 6000 00a4 braw 461e4 <writev+0xe8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
46142: 44c0 movew %d0,%ccr
46144: 6636 bnes 4617c <writev+0x80> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
46146: 4a8a tstl %a2
46148: 6732 beqs 4617c <writev+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
4614a: 4a83 tstl %d3
4614c: 6f2e bles 4617c <writev+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
4614e: 0c83 0000 0400 cmpil #1024,%d3
46154: 6e26 bgts 4617c <writev+0x80> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
46156: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
46158: 93c9 subal %a1,%a1
4615a: 4281 clrl %d1
4615c: 7001 moveq #1,%d0
4615e: 6002 bras 46162 <writev+0x66>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
46160: 2202 movel %d2,%d1
if ( !iov[v].iov_base )
46162: 4a90 tstl %a0@
46164: 6716 beqs 4617c <writev+0x80>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
46166: 2428 0004 movel %a0@(4),%d2
all_zeros = false;
4616a: 57c4 seq %d4
/* check for wrap */
old = total;
total += iov[v].iov_len;
4616c: d481 addl %d1,%d2
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
4616e: c084 andl %d4,%d0
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
46170: b282 cmpl %d2,%d1
46172: 6e08 bgts 4617c <writev+0x80>
46174: 0c82 0000 7fff cmpil #32767,%d2
4617a: 6f0e bles 4618a <writev+0x8e> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
4617c: 4eb9 0004 d6d0 jsr 4d6d0 <__errno>
46182: 2040 moveal %d0,%a0
46184: 7016 moveq #22,%d0
46186: 2080 movel %d0,%a0@
46188: 605a bras 461e4 <writev+0xe8>
* this loop does that check as well and sets "all-zero" appropriately.
* The variable "all_zero" is used as an early exit point before
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
4618a: 5289 addql #1,%a1
4618c: 5088 addql #8,%a0
4618e: b689 cmpl %a1,%d3
46190: 6ece bgts 46160 <writev+0x64>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
46192: 4a00 tstb %d0
46194: 664a bnes 461e0 <writev+0xe4>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
46196: 588a addql #4,%a2
46198: 4284 clrl %d4
4619a: 4282 clrl %d2
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4619c: 2012 movel %a2@,%d0
4619e: 6736 beqs 461d6 <writev+0xda> <== NEVER TAKEN
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
461a0: 206b 0020 moveal %a3@(32),%a0
461a4: 2f00 movel %d0,%sp@-
461a6: 2f2a fffc movel %a2@(-4),%sp@-
461aa: 2f0b movel %a3,%sp@-
461ac: 2068 000c moveal %a0@(12),%a0
461b0: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
461b2: 4fef 000c lea %sp@(12),%sp
461b6: 4a80 tstl %d0
461b8: 6d2a blts 461e4 <writev+0xe8> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
461ba: 6716 beqs 461d2 <writev+0xd6> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
461bc: d480 addl %d0,%d2
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
461be: 2c00 movel %d0,%d6
461c0: 5bc5 smi %d5
461c2: 49c5 extbl %d5
461c4: ddab 0010 addl %d6,%a3@(16)
461c8: 222b 000c movel %a3@(12),%d1
461cc: d385 addxl %d5,%d1
461ce: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
461d2: b092 cmpl %a2@,%d0
461d4: 6610 bnes 461e6 <writev+0xea> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
461d6: 5284 addql #1,%d4
461d8: 508a addql #8,%a2
461da: b684 cmpl %d4,%d3
461dc: 6ebe bgts 4619c <writev+0xa0>
461de: 6006 bras 461e6 <writev+0xea>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
461e0: 4282 clrl %d2
461e2: 6002 bras 461e6 <writev+0xea>
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
461e4: 74ff moveq #-1,%d2
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
461e6: 2002 movel %d2,%d0
461e8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
461ee: 4e5e unlk %fp
...