0004acf0 <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 ) {
4acf0: 7007 moveq #7,%d0
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4acf2: 4e56 0000 linkw %fp,#0 4acf6: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4acfa: 2268 0010 moveal %a0@(16),%a1
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4acfe: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4ad00: 2469 0034 moveal %a1@(52),%a2
switch( node->type ) {
4ad04: 2250 moveal %a0@,%a1 4ad06: b0a9 0048 cmpl %a1@(72),%d0
4ad0a: 6526 bcss 4ad32 <IMFS_Set_handlers+0x42> <== NEVER TAKEN
4ad0c: 2029 0048 movel %a1@(72),%d0 4ad10: d080 addl %d0,%d0 4ad12: 303b 0808 movew %pc@(4ad1c <IMFS_Set_handlers+0x2c>,%d0:l),%d0 4ad16: 48c0 extl %d0 4ad18: 4efb 0802 jmp %pc@(4ad1c <IMFS_Set_handlers+0x2c>,%d0:l)
4ad1c: 0016 026 <== NOT EXECUTED 4ad1e: 0010 020 <== NOT EXECUTED 4ad20: 0050 0120 <== NOT EXECUTED 4ad22: 002c 054 <== NOT EXECUTED 4ad24: 002c 054 <== NOT EXECUTED 4ad26: 001e 036 <== NOT EXECUTED 4ad28: 001e 036 <== NOT EXECUTED 4ad2a: 003e 076 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
4ad2c: 216a 000c 0008 movel %a2@(12),%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad32: 245f moveal %sp@+,%a2 4ad34: 4280 clrl %d0 4ad36: 4e5e unlk %fp 4ad38: 4e75 rts 4ad3a: 4280 clrl %d0
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
4ad3c: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad42: 245f moveal %sp@+,%a2 4ad44: 4e5e unlk %fp 4ad46: 4e75 rts 4ad48: 245f moveal %sp@+,%a2
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
4ad4a: 203c 0005 ecfa movel #388346,%d0
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad50: 4e5e unlk %fp
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
4ad52: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad56: 4280 clrl %d0 4ad58: 4e75 rts 4ad5a: 245f moveal %sp@+,%a2
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
4ad5c: 203c 0005 ebe2 movel #388066,%d0
break;
}
return 0;
}
4ad62: 4e5e unlk %fp
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
4ad64: 2140 0008 movel %d0,%a0@(8)
break;
}
return 0;
}
4ad68: 4280 clrl %d0 4ad6a: 4e75 rts 4ad6c: 245f moveal %sp@+,%a2
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4ad6e: 203c 0005 ec8a movel #388234,%d0
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad74: 4e5e unlk %fp
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4ad76: 2140 0008 movel %d0,%a0@(8)
loc->handlers = &IMFS_fifo_handlers;
break;
}
return 0;
}
4ad7a: 4280 clrl %d0 <== NOT EXECUTED
0004aa30 <IMFS_allocate_node>:
IMFS_jnode_t *IMFS_allocate_node(
IMFS_jnode_types_t type,
const char *name,
mode_t mode
)
{
4aa30: 4e56 fff8 linkw %fp,#-8 4aa34: 2f0a movel %a2,%sp@-
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
4aa36: 4878 0060 pea 60 <DBL_MANT_DIG+0x2b> 4aa3a: 4878 0001 pea 1 <ADD> 4aa3e: 4eb9 0004 2918 jsr 42918 <calloc>
if ( !node )
4aa44: 508f addql #8,%sp
struct timeval tv;
/*
* Allocate an IMFS jnode
*/
node = calloc( 1, sizeof( IMFS_jnode_t ) );
4aa46: 2440 moveal %d0,%a2
if ( !node )
4aa48: 4a80 tstl %d0
4aa4a: 6758 beqs 4aaa4 <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 );
4aa4c: 4878 0020 pea 20 <OPER2+0xc> 4aa50: 2f2e 000c movel %fp@(12),%sp@-
/*
* Fill in the basic information
*/
node->st_nlink = 1;
node->type = type;
4aa54: 256e 0008 0048 movel %fp@(8),%a2@(72)
strncpy( node->name, name, IMFS_NAME_MAX );
4aa5a: 486a 000c pea %a2@(12)
return NULL;
/*
* Fill in the basic information
*/
node->st_nlink = 1;
4aa5e: 7001 moveq #1,%d0 4aa60: 3540 0032 movew %d0,%a2@(50)
node->type = type; strncpy( node->name, name, IMFS_NAME_MAX );
4aa64: 4eb9 0005 19fc jsr 519fc <strncpy>
/*
* Fill in the mode and permission information for the jnode structure.
*/
node->st_mode = mode;
4aa6a: 256e 0010 002e movel %fp@(16),%a2@(46)
#if defined(RTEMS_POSIX_API)
node->st_uid = geteuid();
4aa70: 4eb9 0004 be84 jsr 4be84 <geteuid> 4aa76: 3540 0038 movew %d0,%a2@(56)
node->st_gid = getegid();
4aa7a: 4eb9 0004 be70 jsr 4be70 <getegid>
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
4aa80: 42a7 clrl %sp@- 4aa82: 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();
4aa86: 3540 003a movew %d0,%a2@(58)
#endif
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
4aa8a: 4eb9 0004 2e6c jsr 42e6c <gettimeofday>
node->stat_atime = (time_t) tv.tv_sec;
4aa90: 202e fff8 movel %fp@(-8),%d0
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
return node;
4aa94: 4fef 0014 lea %sp@(20),%sp
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
node->stat_mtime = (time_t) tv.tv_sec;
node->stat_ctime = (time_t) tv.tv_sec;
4aa98: 2540 0044 movel %d0,%a2@(68)
/*
* Now set all the times.
*/
gettimeofday( &tv, 0 );
node->stat_atime = (time_t) tv.tv_sec;
4aa9c: 2540 003c movel %d0,%a2@(60)
node->stat_mtime = (time_t) tv.tv_sec;
4aaa0: 2540 0040 movel %d0,%a2@(64)
node->stat_ctime = (time_t) tv.tv_sec;
return node;
}
4aaa4: 200a movel %a2,%d0 4aaa6: 246e fff4 moveal %fp@(-12),%a2
4aaaa: 4e5e unlk %fp <== NOT EXECUTED
0004a9c0 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a9c0: 4e56 ffe8 linkw %fp,#-24 4a9c4: 206e 0008 moveal %fp@(8),%a0 4a9c8: 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;
4a9cc: 2450 moveal %a0@,%a2
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a9ce: 4284 clrl %d4
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a9d0: 362e 000e movew %fp@(14),%d3 4a9d4: 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();
4a9d8: 4eb9 0004 be84 jsr 4be84 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a9de: 4281 clrl %d1 4a9e0: 3800 movew %d0,%d4 4a9e2: 322a 0038 movew %a2@(56),%d1 4a9e6: b284 cmpl %d4,%d1
4a9e8: 6704 beqs 4a9ee <IMFS_chown+0x2e> <== ALWAYS TAKEN
4a9ea: 4a40 tstw %d0 <== NOT EXECUTED 4a9ec: 6628 bnes 4aa16 <IMFS_chown+0x56> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
4a9ee: 3543 0038 movew %d3,%a2@(56)
jnode->st_gid = group;
4a9f2: 3542 003a movew %d2,%a2@(58)
IMFS_update_ctime( jnode );
4a9f6: 42a7 clrl %sp@- 4a9f8: 486e fff8 pea %fp@(-8) 4a9fc: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4aa02: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4aa08: 508f addql #8,%sp
#endif
jnode->st_uid = owner;
jnode->st_gid = group;
IMFS_update_ctime( jnode );
4aa0a: 4280 clrl %d0
return 0;
}
4aa0c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4aa12: 4e5e unlk %fp 4aa14: 4e75 rts
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
4aa16: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4aa1c: 7201 moveq #1,%d1 <== NOT EXECUTED 4aa1e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4aa20: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4aa22: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 <== NOT EXECUTED
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
4aa28: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4aa2a: 4e5e unlk %fp <== NOT EXECUTED
...
0004aae8 <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
4aae8: 4e56 fffc linkw %fp,#-4 4aaec: 2f0a movel %a2,%sp@- 4aaee: 246e 0008 moveal %fp@(8),%a2 4aaf2: 2f02 movel %d2,%sp@- 4aaf4: 242e 000c movel %fp@(12),%d2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
4aaf8: 4a8a tstl %a2
4aafa: 660e bnes 4ab0a <IMFS_create_node+0x22> <== ALWAYS TAKEN
4aafc: 4280 clrl %d0 <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
4aafe: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 4ab02: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4ab06: 4e5e unlk %fp <== NOT EXECUTED 4ab08: 4e75 rts <== NOT EXECUTED
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4ab0a: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4ab10: 2028 002c movel %a0@(44),%d0 4ab14: 4680 notl %d0 4ab16: c0ae 0014 andl %fp@(20),%d0 4ab1a: 2f00 movel %d0,%sp@- 4ab1c: 2f2e 0010 movel %fp@(16),%sp@- 4ab20: 2f02 movel %d2,%sp@- 4ab22: 4eb9 0004 aa30 jsr 4aa30 <IMFS_allocate_node>
if ( !node )
4ab28: 4fef 000c lea %sp@(12),%sp 4ab2c: 4a80 tstl %d0
4ab2e: 67ce beqs 4aafe <IMFS_create_node+0x16> <== NEVER TAKEN
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4ab30: 7207 moveq #7,%d1 4ab32: b282 cmpl %d2,%d1
4ab34: 641c bccs 4ab52 <IMFS_create_node+0x6a> <== ALWAYS TAKEN
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
break;
default:
assert(0);
4ab36: 4879 0005 eb26 pea 5eb26 <IMFS_LIMITS_AND_OPTIONS+0x30> <== NOT EXECUTED 4ab3c: 4879 0005 eb75 pea 5eb75 <__FUNCTION__.5908> <== NOT EXECUTED 4ab42: 4878 005c pea 5c <DBL_MANT_DIG+0x27> <== NOT EXECUTED 4ab46: 4879 0005 eb28 pea 5eb28 <IMFS_LIMITS_AND_OPTIONS+0x32> <== NOT EXECUTED 4ab4c: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4ab52: 323b 2a08 movew %pc@(4ab5c <IMFS_create_node+0x74>,%d2:l:2),%d1 4ab56: 48c1 extl %d1 4ab58: 4efb 1802 jmp %pc@(4ab5c <IMFS_create_node+0x74>,%d1:l)
4ab5c: ffda 0177732 <== NOT EXECUTED 4ab5e: 0144 bchg %d0,%d4 <== NOT EXECUTED 4ab60: 00fc 0374 <== NOT EXECUTED 4ab62: 0010 020 <== NOT EXECUTED 4ab64: 0010 020 <== NOT EXECUTED 4ab66: 006c 0154 <== NOT EXECUTED 4ab68: 005a 0132 <== NOT EXECUTED 4ab6a: 00be 226e 0018 oril #577634328,%d6 <== NOT EXECUTED
case IMFS_HARD_LINK:
node->info.hard_link.link_node = info->hard_link.link_node;
break;
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
4ab70: 2040 moveal %d0,%a0 4ab72: 2151 004c movel %a1@,%a0@(76)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ab76: 2240 moveal %d0,%a1
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4ab78: 206a 0010 moveal %a2@(16),%a0 4ab7c: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ab80: 2228 0004 movel %a0@(4),%d1 4ab84: 5281 addql #1,%d1 4ab86: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4ab8a: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ab8c: 2341 0034 movel %d1,%a1@(52)
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
4ab90: 2348 0008 movel %a0,%a1@(8) 4ab94: 2f00 movel %d0,%sp@- 4ab96: 4868 004c pea %a0@(76) 4ab9a: 2d40 fffc movel %d0,%fp@(-4) 4ab9e: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4aba4: 202e fffc movel %fp@(-4),%d0 4aba8: 508f addql #8,%sp
}
4abaa: 242e fff4 movel %fp@(-12),%d2 4abae: 246e fff8 moveal %fp@(-8),%a2 4abb2: 4e5e unlk %fp 4abb4: 4e75 rts
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
4abb6: 2040 moveal %d0,%a0 <== NOT EXECUTED
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
4abb8: 4281 clrl %d1 <== NOT EXECUTED 4abba: 4282 clrl %d2 <== NOT EXECUTED
node->info.linearfile.direct = 0;
4abbc: 42a8 0054 clrl %a0@(84) <== NOT EXECUTED
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
4abc0: 2141 004c movel %d1,%a0@(76) <== NOT EXECUTED 4abc4: 2142 0050 movel %d2,%a0@(80) <== NOT EXECUTED
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4abc8: 2040 moveal %d0,%a0
node->info.file.indirect = 0;
4abca: 2240 moveal %d0,%a1
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4abcc: 4281 clrl %d1 4abce: 4282 clrl %d2
node->info.file.indirect = 0;
4abd0: 42a9 0054 clrl %a1@(84)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4abd4: 2141 004c movel %d1,%a0@(76) 4abd8: 2142 0050 movel %d2,%a0@(80)
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
4abdc: 42a9 0058 clrl %a1@(88)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4abe0: 2240 moveal %d0,%a1
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
4abe2: 42a8 005c clrl %a0@(92)
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4abe6: 206a 0010 moveal %a2@(16),%a0 4abea: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4abee: 2228 0004 movel %a0@(4),%d1 4abf2: 5281 addql #1,%d1 4abf4: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4abf8: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4abfa: 2341 0034 movel %d1,%a1@(52)
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
4abfe: 2348 0008 movel %a0,%a1@(8) 4ac02: 2f00 movel %d0,%sp@- 4ac04: 4868 004c pea %a0@(76) 4ac08: 2d40 fffc movel %d0,%fp@(-4) 4ac0c: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4ac12: 202e fffc movel %fp@(-4),%d0 4ac16: 508f addql #8,%sp 4ac18: 6090 bras 4abaa <IMFS_create_node+0xc2>
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
4ac1a: 2240 moveal %d0,%a1 4ac1c: 42a9 004c clrl %a1@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4ac20: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac24: 2240 moveal %d0,%a1
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4ac26: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac2a: 2228 0004 movel %a0@(4),%d1 4ac2e: 5281 addql #1,%d1 4ac30: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4ac34: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac36: 2341 0034 movel %d1,%a1@(52)
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
4ac3a: 2348 0008 movel %a0,%a1@(8) 4ac3e: 2f00 movel %d0,%sp@- 4ac40: 4868 004c pea %a0@(76) 4ac44: 2d40 fffc movel %d0,%fp@(-4) 4ac48: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4ac4e: 202e fffc movel %fp@(-4),%d0 4ac52: 508f addql #8,%sp 4ac54: 6000 ff54 braw 4abaa <IMFS_create_node+0xc2>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
4ac58: 226e 0018 moveal %fp@(24),%a1 4ac5c: 2040 moveal %d0,%a0 4ac5e: 2151 004c movel %a1@,%a0@(76)
node->info.device.minor = info->device.minor;
4ac62: 5889 addql #4,%a1 4ac64: 2151 0050 movel %a1@,%a0@(80)
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac68: 2240 moveal %d0,%a1
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4ac6a: 206a 0010 moveal %a2@(16),%a0 4ac6e: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac72: 2228 0004 movel %a0@(4),%d1 4ac76: 5281 addql #1,%d1 4ac78: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4ac7c: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4ac7e: 2341 0034 movel %d1,%a1@(52)
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
4ac82: 2348 0008 movel %a0,%a1@(8) 4ac86: 2f00 movel %d0,%sp@- 4ac88: 4868 004c pea %a0@(76) 4ac8c: 2d40 fffc movel %d0,%fp@(-4) 4ac90: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4ac96: 202e fffc movel %fp@(-4),%d0 4ac9a: 508f addql #8,%sp 4ac9c: 6000 ff0c braw 4abaa <IMFS_create_node+0xc2>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4aca0: 2240 moveal %d0,%a1
the_chain->permanent_null = NULL;
4aca2: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4aca4: 43e9 0050 lea %a1@(80),%a1 4aca8: 2149 004c movel %a1,%a0@(76)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4acac: 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;
4acae: 42a8 0050 clrl %a0@(80)
the_chain->last = _Chain_Head(the_chain);
4acb2: 2149 0054 movel %a1,%a0@(84)
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4acb6: 206a 0010 moveal %a2@(16),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4acba: 2240 moveal %d0,%a1
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4acbc: 2068 0034 moveal %a0@(52),%a0
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4acc0: 2228 0004 movel %a0@(4),%d1 4acc4: 5281 addql #1,%d1 4acc6: 2141 0004 movel %d1,%a0@(4)
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
4acca: 2052 moveal %a2@,%a0
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4accc: 2341 0034 movel %d1,%a1@(52)
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
4acd0: 2348 0008 movel %a0,%a1@(8) 4acd4: 2f00 movel %d0,%sp@- 4acd6: 4868 004c pea %a0@(76) 4acda: 2d40 fffc movel %d0,%fp@(-4) 4acde: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4ace4: 202e fffc movel %fp@(-4),%d0 4ace8: 508f addql #8,%sp 4acea: 6000 febe braw 4abaa <IMFS_create_node+0xc2>
...
0004aaae <IMFS_create_root_node>:
IMFS_jnode_t *IMFS_create_root_node(void)
{
4aaae: 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) );
4aab2: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee> 4aab6: 4879 0005 e954 pea 5e954 <rtems_filesystem_default_pathconf+0x40> 4aabc: 4878 0001 pea 1 <ADD> 4aac0: 4eb9 0004 aa30 jsr 4aa30 <IMFS_allocate_node>
if ( !node )
4aac6: 4fef 000c lea %sp@(12),%sp 4aaca: 4a80 tstl %d0
4aacc: 6716 beqs 4aae4 <IMFS_create_root_node+0x36> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4aace: 2240 moveal %d0,%a1
the_chain->permanent_null = NULL;
4aad0: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4aad2: 43e9 0050 lea %a1@(80),%a1 4aad6: 2149 004c movel %a1,%a0@(76)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4aada: 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;
4aadc: 42a8 0050 clrl %a0@(80)
the_chain->last = _Chain_Head(the_chain);
4aae0: 2149 0054 movel %a1,%a0@(84)
* NOTE: Root node is always a directory.
*/
rtems_chain_initialize_empty(&node->info.directory.Entries);
return node;
}
4aae4: 4e5e unlk %fp <== NOT EXECUTED
00044642 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
44642: 4e56 ffe0 linkw %fp,#-32 44646: 206e 0008 moveal %fp@(8),%a0 4464a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4464e: 262e 000c movel %fp@(12),%d3
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
44652: 4a88 tstl %a0 44654: 6700 008c beqw 446e2 <IMFS_dump_directory+0xa0>
assert( level >= 0 );
44658: 4a83 tstl %d3 4465a: 6d00 00be bltw 4471a <IMFS_dump_directory+0xd8>
assert( the_directory->type == IMFS_DIRECTORY );
4465e: 7001 moveq #1,%d0 44660: b0a8 0048 cmpl %a0@(72),%d0 44664: 6600 0098 bnew 446fe <IMFS_dump_directory+0xbc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
44668: 2808 movel %a0,%d4 4466a: 0684 0000 0050 addil #80,%d4
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
44670: 2668 004c moveal %a0@(76),%a3 44674: b88b cmpl %a3,%d4
44676: 6750 beqs 446c8 <IMFS_dump_directory+0x86>
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
44678: 2a03 movel %d3,%d5 4467a: 45f9 0005 52b4 lea 552b4 <fwrite>,%a2 44680: 49f9 0004 442a lea 4442a <IMFS_print_jnode>,%a4 44686: 5285 addql #1,%d5 44688: 4bf9 0004 4642 lea 44642 <IMFS_dump_directory>,%a5
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;
4468e: 4282 clrl %d2
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
44690: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
44696: 5282 addql #1,%d2
fprintf(stdout, "...." );
44698: 2f28 0008 movel %a0@(8),%sp@- 4469c: 4878 0004 pea 4 <CONTEXT_ARG> 446a0: 4878 0001 pea 1 <ADD> 446a4: 4879 0006 3b9f pea 63b9f <IntUartPollCallbacks.6645+0x119> 446aa: 4e92 jsr %a2@
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
446ac: 4fef 0010 lea %sp@(16),%sp 446b0: b483 cmpl %d3,%d2
446b2: 6fdc bles 44690 <IMFS_dump_directory+0x4e>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
446b4: 2f0b movel %a3,%sp@- 446b6: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
446b8: 588f addql #4,%sp 446ba: 7001 moveq #1,%d0 446bc: b0ab 0048 cmpl %a3@(72),%d0
446c0: 6710 beqs 446d2 <IMFS_dump_directory+0x90>
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
446c2: 2653 moveal %a3@,%a3
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
446c4: b88b cmpl %a3,%d4
446c6: 66c6 bnes 4468e <IMFS_dump_directory+0x4c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
446c8: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 446ce: 4e5e unlk %fp 446d0: 4e75 rts
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
446d2: 2f05 movel %d5,%sp@- 446d4: 2f0b movel %a3,%sp@- 446d6: 4e95 jsr %a5@
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
446d8: 2653 moveal %a3@,%a3
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
446da: 508f addql #8,%sp
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
446dc: b88b cmpl %a3,%d4
446de: 66ae bnes 4468e <IMFS_dump_directory+0x4c>
446e0: 60e6 bras 446c8 <IMFS_dump_directory+0x86>
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
446e2: 4879 0006 3b60 pea 63b60 <IntUartPollCallbacks.6645+0xda> <== NOT EXECUTED 446e8: 4879 0006 3c2e pea 63c2e <__FUNCTION__.6659> <== NOT EXECUTED 446ee: 4878 0084 pea 84 <DBL_MANT_DIG+0x4f> <== NOT EXECUTED 446f2: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 446f8: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
assert( level >= 0 );
assert( the_directory->type == IMFS_DIRECTORY );
446fe: 4879 0006 3b79 pea 63b79 <IntUartPollCallbacks.6645+0xf3> <== NOT EXECUTED 44704: 4879 0006 3c2e pea 63c2e <__FUNCTION__.6659> <== NOT EXECUTED 4470a: 4878 0088 pea 88 <DBL_MANT_DIG+0x53> <== NOT EXECUTED 4470e: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 44714: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
assert( level >= 0 );
4471a: 4879 0006 3b6e pea 63b6e <IntUartPollCallbacks.6645+0xe8> <== NOT EXECUTED 44720: 4879 0006 3c2e pea 63c2e <__FUNCTION__.6659> <== NOT EXECUTED 44726: 4878 0086 pea 86 <DBL_MANT_DIG+0x51> <== NOT EXECUTED 4472a: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 44730: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
0004af26 <IMFS_eval_path>:
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4af26: 70f8 moveq #-8,%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4af28: 4e56 ffb0 linkw %fp,#-80
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4af2c: c0ae 0010 andl %fp@(16),%d0
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4af30: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4af34: 2a6e 0008 moveal %fp@(8),%a5 4af38: 246e 000c moveal %fp@(12),%a2 4af3c: 286e 0014 moveal %fp@(20),%a4
char token[ IMFS_NAME_MAX + 1 ];
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
4af40: 4a80 tstl %d0 4af42: 6600 025e bnew 4b1a2 <IMFS_eval_path+0x27c> 4af46: 2c0e movel %fp,%d6 4af48: 280e movel %fp,%d4
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4af4a: 4282 clrl %d2 4af4c: 5986 subql #4,%d6 4af4e: 0684 ffff ffdb addil #-37,%d4 4af54: 2a3c 0004 b900 movel #309504,%d5
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4af5a: 2e3c 0004 b858 movel #309336,%d7
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4af60: 2654 moveal %a4@,%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 );
4af62: 2f06 movel %d6,%sp@- 4af64: 2045 moveal %d5,%a0 4af66: 2f04 movel %d4,%sp@- 4af68: 2f0a movel %a2,%sp@- 4af6a: 4875 2800 pea %a5@(00000000,%d2:l) 4af6e: 4e90 jsr %a0@
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4af70: 2054 moveal %a4@,%a0
* 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 );
4af72: 2600 movel %d0,%d3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4af74: 4fef 0010 lea %sp@(16),%sp
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
4af78: 202e fffc movel %fp@(-4),%d0
i += len;
if ( !pathloc->node_access )
4af7c: 4a88 tstl %a0 4af7e: 6700 00f8 beqw 4b078 <IMFS_eval_path+0x152>
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
4af82: d480 addl %d0,%d2
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
4af84: 95c0 subal %d0,%a2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4af86: 4a83 tstl %d3
4af88: 6662 bnes 4afec <IMFS_eval_path+0xc6>
* 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 ) {
4af8a: 7201 moveq #1,%d1 4af8c: b2a8 0048 cmpl %a0@(72),%d1 4af90: 6600 0132 bnew 4b0c4 <IMFS_eval_path+0x19e>
if ( node->info.directory.mt_fs != NULL ) {
4af94: 2068 0058 moveal %a0@(88),%a0 4af98: 4a88 tstl %a0 4af9a: 6700 0128 beqw 4b0c4 <IMFS_eval_path+0x19e>
newloc = node->info.directory.mt_fs->mt_fs_root;
4af9e: 2268 0028 moveal %a0@(40),%a1
*pathloc = newloc;
4afa2: 2968 002c 0010 movel %a0@(44),%a4@(16)
* NOTE: The behavior of stat() on a mount point appears to be questionable.
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
4afa8: 2628 0024 movel %a0@(36),%d3 4afac: 2228 0020 movel %a0@(32),%d1 4afb0: 2028 001c movel %a0@(28),%d0
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4afb4: 2f0c movel %a4,%sp@- 4afb6: 206e fffc moveal %fp@(-4),%a0 4afba: 9488 subl %a0,%d2 4afbc: 2f2e 0010 movel %fp@(16),%sp@- 4afc0: 4872 8800 pea %a2@(00000000,%a0:l) 4afc4: 4875 2800 pea %a5@(00000000,%d2:l) 4afc8: 2051 moveal %a1@,%a0
*/
if ( node->type == IMFS_DIRECTORY ) {
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
4afca: 2943 0008 movel %d3,%a4@(8) 4afce: 2941 0004 movel %d1,%a4@(4) 4afd2: 2880 movel %d0,%a4@ 4afd4: 2949 000c movel %a1,%a4@(12)
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4afd8: 4e90 jsr %a0@ 4afda: 4fef 0010 lea %sp@(16),%sp 4afde: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4afe0: 2003 movel %d3,%d0 4afe2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4afe8: 4e5e unlk %fp 4afea: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
4afec: 7001 moveq #1,%d0 4afee: b0ab 0048 cmpl %a3@(72),%d0 4aff2: 6700 00b8 beqw 4b0ac <IMFS_eval_path+0x186>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
4aff6: 2648 moveal %a0,%a3
switch( type ) {
4aff8: 7003 moveq #3,%d0 4affa: b083 cmpl %d3,%d0
4affc: 671c beqs 4b01a <IMFS_eval_path+0xf4>
4affe: 7204 moveq #4,%d1 4b000: b283 cmpl %d3,%d1 4b002: 6700 008e beqw 4b092 <IMFS_eval_path+0x16c> 4b006: 103c 0002 moveb #2,%d0 4b00a: b083 cmpl %d3,%d0
4b00c: 6748 beqs 4b056 <IMFS_eval_path+0x130>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
4b00e: 7004 moveq #4,%d0 4b010: b083 cmpl %d3,%d0 4b012: 6600 ff4e bnew 4af62 <IMFS_eval_path+0x3c>
4b016: 6000 ff72 braw 4af8a <IMFS_eval_path+0x64> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
4b01a: 2028 0048 movel %a0@(72),%d0 4b01e: 7203 moveq #3,%d1 4b020: b280 cmpl %d0,%d1 4b022: 6700 00d8 beqw 4b0fc <IMFS_eval_path+0x1d6>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
4b026: 7204 moveq #4,%d1 4b028: b280 cmpl %d0,%d1 4b02a: 6700 00ea beqw 4b116 <IMFS_eval_path+0x1f0>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4b02e: 7201 moveq #1,%d1 4b030: b280 cmpl %d0,%d1 4b032: 6600 0104 bnew 4b138 <IMFS_eval_path+0x212>
/*
* 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 ) {
4b036: 206b 0058 moveal %a3@(88),%a0 4b03a: 4a88 tstl %a0 4b03c: 6600 ff60 bnew 4af9e <IMFS_eval_path+0x78>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4b040: 2f04 movel %d4,%sp@- 4b042: 2047 moveal %d7,%a0 4b044: 2f0b movel %a3,%sp@- 4b046: 4e90 jsr %a0@
if ( !node )
4b048: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4b04a: 2640 moveal %d0,%a3
if ( !node )
4b04c: 4a80 tstl %d0
4b04e: 6728 beqs 4b078 <IMFS_eval_path+0x152>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
4b050: 288b movel %a3,%a4@
break;
4b052: 6000 ff0e braw 4af62 <IMFS_eval_path+0x3c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4b056: 2279 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a1 4b05c: b1e9 0018 cmpal %a1@(24),%a0 4b060: 6700 ff00 beqw 4af62 <IMFS_eval_path+0x3c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
4b064: 226c 0010 moveal %a4@(16),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4b068: b1e9 001c cmpal %a1@(28),%a0 4b06c: 6700 00e4 beqw 4b152 <IMFS_eval_path+0x22c>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
4b070: 2668 0008 moveal %a0@(8),%a3 4b074: 4a8b tstl %a3
4b076: 66d8 bnes 4b050 <IMFS_eval_path+0x12a>
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4b078: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b07e: 76ff moveq #-1,%d3 4b080: 7c02 moveq #2,%d6 4b082: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b084: 2003 movel %d3,%d0
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
if ( !node )
rtems_set_errno_and_return_minus_one( ENOENT );
4b086: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b088: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b08e: 4e5e unlk %fp 4b090: 4e75 rts
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4b092: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b098: 76ff moveq #-1,%d3 4b09a: 7a5b moveq #91,%d5 4b09c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b09e: 2003 movel %d3,%d0
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4b0a0: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b0a2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b0a8: 4e5e unlk %fp 4b0aa: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
4b0ac: 4878 0001 pea 1 <ADD> 4b0b0: 2f0c movel %a4,%sp@- 4b0b2: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4b0b8: 508f addql #8,%sp 4b0ba: 4a80 tstl %d0
4b0bc: 6724 beqs 4b0e2 <IMFS_eval_path+0x1bc>
4b0be: 2054 moveal %a4@,%a0 4b0c0: 6000 ff34 braw 4aff6 <IMFS_eval_path+0xd0>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4b0c4: 2f0c movel %a4,%sp@- 4b0c6: 4eb9 0004 acf0 jsr 4acf0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4b0cc: 2eae 0010 movel %fp@(16),%sp@
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4b0d0: 2600 movel %d0,%d3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4b0d2: 2f0c movel %a4,%sp@- 4b0d4: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4b0da: 508f addql #8,%sp 4b0dc: 4a80 tstl %d0 4b0de: 6600 ff00 bnew 4afe0 <IMFS_eval_path+0xba>
rtems_set_errno_and_return_minus_one( EACCES );
4b0e2: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b0e8: 76ff moveq #-1,%d3 4b0ea: 780d moveq #13,%d4 4b0ec: 2040 moveal %d0,%a0
return result;
}
4b0ee: 2003 movel %d3,%d0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4b0f0: 2084 movel %d4,%a0@
return result;
}
4b0f2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b0f8: 4e5e unlk %fp 4b0fa: 4e75 rts
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
4b0fc: 42a7 clrl %sp@- 4b0fe: 2f0c movel %a4,%sp@- 4b100: 4eb9 0004 ae18 jsr 4ae18 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
4b106: 2654 moveal %a4@,%a3
if ( !node )
4b108: 508f addql #8,%sp 4b10a: 4a8b tstl %a3
4b10c: 672a beqs 4b138 <IMFS_eval_path+0x212> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
4b10e: 202b 0048 movel %a3@(72),%d0 4b112: 6000 ff1a braw 4b02e <IMFS_eval_path+0x108>
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4b116: 42a7 clrl %sp@- 4b118: 2f0c movel %a4,%sp@- 4b11a: 4eb9 0004 ae78 jsr 4ae78 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
4b120: 2654 moveal %a4@,%a3
if ( result == -1 )
4b122: 508f addql #8,%sp 4b124: 72ff moveq #-1,%d1 4b126: b280 cmpl %d0,%d1
4b128: 66e4 bnes 4b10e <IMFS_eval_path+0x1e8> <== ALWAYS TAKEN
4b12a: 2600 movel %d0,%d3 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b12c: 2003 movel %d3,%d0 <== NOT EXECUTED 4b12e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4b134: 4e5e unlk %fp <== NOT EXECUTED 4b136: 4e75 rts <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4b138: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b13e: 76ff moveq #-1,%d3 4b140: 7e14 moveq #20,%d7 4b142: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b144: 2003 movel %d3,%d0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4b146: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b148: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b14e: 4e5e unlk %fp 4b150: 4e75 rts
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
4b152: 2069 0014 moveal %a1@(20),%a0
*pathloc = newloc;
4b156: 2969 0018 0010 movel %a1@(24),%a4@(16)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
4b15c: 2829 0010 movel %a1@(16),%d4 4b160: 2629 000c movel %a1@(12),%d3 4b164: 2229 0008 movel %a1@(8),%d1
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4b168: 2f0c movel %a4,%sp@- 4b16a: 226e fffc moveal %fp@(-4),%a1 4b16e: 9489 subl %a1,%d2 4b170: 2f2e 0010 movel %fp@(16),%sp@- 4b174: 4872 9800 pea %a2@(00000000,%a1:l) 4b178: 4875 2800 pea %a5@(00000000,%d2:l) 4b17c: 2010 movel %a0@,%d0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
4b17e: 2943 0004 movel %d3,%a4@(4) 4b182: 2948 000c movel %a0,%a4@(12)
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4b186: 2040 moveal %d0,%a0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
4b188: 2944 0008 movel %d4,%a4@(8) 4b18c: 2881 movel %d1,%a4@
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4b18e: 4e90 jsr %a0@ 4b190: 4fef 0010 lea %sp@(16),%sp 4b194: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b196: 2003 movel %d3,%d0 4b198: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b19e: 4e5e unlk %fp 4b1a0: 4e75 rts
rtems_filesystem_location_info_t newloc;
IMFS_jnode_t *node;
int result;
if ( !rtems_libio_is_valid_perms( flags ) ) {
assert( 0 );
4b1a2: 4879 0005 eb26 pea 5eb26 <IMFS_LIMITS_AND_OPTIONS+0x30> <== NOT EXECUTED 4b1a8: 4879 0005 ebd2 pea 5ebd2 <__FUNCTION__.6151> <== NOT EXECUTED 4b1ae: 4878 01f6 pea 1f6 <DBL_MANT_DIG+0x1c1> <== NOT EXECUTED 4b1b2: 4879 0005 eb86 pea 5eb86 <__FUNCTION__.5908+0x11> <== NOT EXECUTED 4b1b8: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004b278 <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 */
)
{
4b278: 4e56 ffb0 linkw %fp,#-80 4b27c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4b280: 286e 0008 moveal %fp@(8),%a4 4b284: 2e0e movel %fp,%d7 4b286: 2c0e movel %fp,%d6
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4b288: 4284 clrl %d4 4b28a: 5987 subql #4,%d7 4b28c: 0686 ffff ffdb addil #-37,%d6 4b292: 4bf9 0004 b900 lea 4b900 <IMFS_get_token>,%a5 4b298: 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 */
)
{
4b29a: 266e 000c moveal %fp@(12),%a3
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4b29e: 4eb9 0005 19e4 jsr 519e4 <strlen>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4b2a4: 2453 moveal %a3@,%a2
/*
* Get the path length.
*/
pathlen = strlen( path );
4b2a6: 588f addql #4,%sp 4b2a8: 2400 movel %d0,%d2
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4b2aa: 2f07 movel %d7,%sp@- 4b2ac: 2f06 movel %d6,%sp@- 4b2ae: 2f02 movel %d2,%sp@- 4b2b0: 4874 4800 pea %a4@(00000000,%d4:l) 4b2b4: 4e95 jsr %a5@
pathlen -= len;
4b2b6: 2a2e fffc movel %fp@(-4),%d5
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
4b2ba: 2600 movel %d0,%d3
pathlen -= len;
i += len;
if ( !pathloc->node_access )
4b2bc: 4fef 0010 lea %sp@(16),%sp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
4b2c0: 9485 subl %d5,%d2
i += len;
if ( !pathloc->node_access )
4b2c2: 2053 moveal %a3@,%a0 4b2c4: 4a88 tstl %a0 4b2c6: 6700 00ca beqw 4b392 <IMFS_evaluate_for_make+0x11a>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4b2ca: 4a80 tstl %d0
4b2cc: 6742 beqs 4b310 <IMFS_evaluate_for_make+0x98>
if ( node->type == IMFS_DIRECTORY )
4b2ce: 7001 moveq #1,%d0 4b2d0: b0aa 0048 cmpl %a2@(72),%d0 4b2d4: 6700 00d6 beqw 4b3ac <IMFS_evaluate_for_make+0x134>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
4b2d8: d885 addl %d5,%d4
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
4b2da: 2448 moveal %a0,%a2
switch( type ) {
4b2dc: 7002 moveq #2,%d0 4b2de: b083 cmpl %d3,%d0 4b2e0: 6700 008e beqw 4b370 <IMFS_evaluate_for_make+0xf8>
4b2e4: 6426 bccs 4b30c <IMFS_evaluate_for_make+0x94>
4b2e6: 7203 moveq #3,%d1 4b2e8: b283 cmpl %d3,%d1
4b2ea: 673e beqs 4b32a <IMFS_evaluate_for_make+0xb2>
4b2ec: 7004 moveq #4,%d0 4b2ee: b083 cmpl %d3,%d0
4b2f0: 66b8 bnes 4b2aa <IMFS_evaluate_for_make+0x32> <== NEVER TAKEN
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4b2f2: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b2f8: 7c5b moveq #91,%d6 4b2fa: 76ff moveq #-1,%d3 4b2fc: 2040 moveal %d0,%a0 4b2fe: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b300: 2003 movel %d3,%d0 4b302: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b308: 4e5e unlk %fp 4b30a: 4e75 rts
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
4b30c: 4a83 tstl %d3
4b30e: 669a bnes 4b2aa <IMFS_evaluate_for_make+0x32> <== ALWAYS TAKEN
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4b310: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b316: 76ff moveq #-1,%d3 4b318: 7e11 moveq #17,%d7 4b31a: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b31c: 2003 movel %d3,%d0
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4b31e: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b320: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b326: 4e5e unlk %fp 4b328: 4e75 rts
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4b32a: 2028 0048 movel %a0@(72),%d0 4b32e: 7203 moveq #3,%d1 4b330: b280 cmpl %d0,%d1 4b332: 6700 0102 beqw 4b436 <IMFS_evaluate_for_make+0x1be>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
4b336: 7204 moveq #4,%d1 4b338: b280 cmpl %d0,%d1 4b33a: 6700 00fa beqw 4b436 <IMFS_evaluate_for_make+0x1be>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
4b33e: 4a8a tstl %a2 4b340: 6700 0110 beqw 4b452 <IMFS_evaluate_for_make+0x1da>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4b344: 7001 moveq #1,%d0 4b346: b0aa 0048 cmpl %a2@(72),%d0 4b34a: 6600 0106 bnew 4b452 <IMFS_evaluate_for_make+0x1da>
/*
* 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 ) {
4b34e: 206a 0058 moveal %a2@(88),%a0 4b352: 4a88 tstl %a0 4b354: 6600 0116 bnew 4b46c <IMFS_evaluate_for_make+0x1f4>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4b358: 2f06 movel %d6,%sp@- 4b35a: 2f0a movel %a2,%sp@- 4b35c: 4eb9 0004 b858 jsr 4b858 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4b362: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4b364: 2440 moveal %d0,%a2
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4b366: 4a80 tstl %d0
4b368: 675a beqs 4b3c4 <IMFS_evaluate_for_make+0x14c>
done = true;
else
pathloc->node_access = node;
4b36a: 268a movel %a2,%a3@ 4b36c: 6000 ff3c braw 4b2aa <IMFS_evaluate_for_make+0x32>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4b370: 2279 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a1 4b376: b1e9 0018 cmpal %a1@(24),%a0 4b37a: 6700 ff2e beqw 4b2aa <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){
4b37e: 226b 0010 moveal %a3@(16),%a1 4b382: b1e9 001c cmpal %a1@(28),%a0 4b386: 6700 012e beqw 4b4b6 <IMFS_evaluate_for_make+0x23e>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
4b38a: 2468 0008 moveal %a0@(8),%a2 4b38e: 4a8a tstl %a2
4b390: 66d8 bnes 4b36a <IMFS_evaluate_for_make+0xf2>
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
4b392: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b398: 76ff moveq #-1,%d3 4b39a: 7a02 moveq #2,%d5 4b39c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b39e: 2003 movel %d3,%d0
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
rtems_set_errno_and_return_minus_one( ENOENT );
4b3a0: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b3a2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b3a8: 4e5e unlk %fp 4b3aa: 4e75 rts
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
4b3ac: 4878 0001 pea 1 <ADD> 4b3b0: 2f0b movel %a3,%sp@- 4b3b2: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4b3b8: 508f addql #8,%sp 4b3ba: 4a80 tstl %d0
4b3bc: 675e beqs 4b41c <IMFS_evaluate_for_make+0x1a4>
4b3be: 2053 moveal %a3@,%a0 4b3c0: 6000 ff16 braw 4b2d8 <IMFS_evaluate_for_make+0x60>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
4b3c4: 2004 movel %d4,%d0 4b3c6: 90ae fffc subl %fp@(-4),%d0 4b3ca: d08c addl %a4,%d0 4b3cc: 206e 0010 moveal %fp@(16),%a0 4b3d0: 2080 movel %d0,%a0@
/*
* 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++) {
4b3d2: 1034 4800 moveb %a4@(00000000,%d4:l),%d0
4b3d6: 671a beqs 4b3f2 <IMFS_evaluate_for_make+0x17a>
4b3d8: 4bf9 0004 3d74 lea 43d74 <rtems_filesystem_is_separator>,%a5 4b3de: 45f4 4801 lea %a4@(00000001,%d4:l),%a2
if ( !IMFS_is_separator( path[ i ] ) )
4b3e2: 49c0 extbl %d0 4b3e4: 2f00 movel %d0,%sp@- 4b3e6: 4e95 jsr %a5@ 4b3e8: 588f addql #4,%sp 4b3ea: 4a80 tstl %d0
4b3ec: 67a4 beqs 4b392 <IMFS_evaluate_for_make+0x11a>
/*
* 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++) {
4b3ee: 101a moveb %a2@+,%d0
4b3f0: 66f0 bnes 4b3e2 <IMFS_evaluate_for_make+0x16a>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4b3f2: 2f0b movel %a3,%sp@- 4b3f4: 4eb9 0004 acf0 jsr 4acf0 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
4b3fa: 2053 moveal %a3@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4b3fc: 2600 movel %d0,%d3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
4b3fe: 588f addql #4,%sp 4b400: 7001 moveq #1,%d0 4b402: b0a8 0048 cmpl %a0@(72),%d0
4b406: 664a bnes 4b452 <IMFS_evaluate_for_make+0x1da> <== NEVER TAKEN
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
4b408: 4878 0003 pea 3 <DIVIDE> 4b40c: 2f0b movel %a3,%sp@- 4b40e: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4b414: 508f addql #8,%sp 4b416: 4a80 tstl %d0 4b418: 6600 fee6 bnew 4b300 <IMFS_evaluate_for_make+0x88>
rtems_set_errno_and_return_minus_one( EACCES );
4b41c: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b422: 76ff moveq #-1,%d3 4b424: 740d moveq #13,%d2 4b426: 2040 moveal %d0,%a0
return result;
}
4b428: 2003 movel %d3,%d0
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
4b42a: 2082 movel %d2,%a0@
return result;
}
4b42c: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b432: 4e5e unlk %fp 4b434: 4e75 rts
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4b436: 42a7 clrl %sp@- 4b438: 2f0b movel %a3,%sp@- 4b43a: 4eb9 0004 b1be jsr 4b1be <IMFS_evaluate_link>
if ( result == -1 )
4b440: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4b442: 2600 movel %d0,%d3
if ( result == -1 )
4b444: 70ff moveq #-1,%d0 4b446: b083 cmpl %d3,%d0 4b448: 6700 feb6 beqw 4b300 <IMFS_evaluate_for_make+0x88> 4b44c: 2453 moveal %a3@,%a2 4b44e: 6000 feee braw 4b33e <IMFS_evaluate_for_make+0xc6>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4b452: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b458: 76ff moveq #-1,%d3 4b45a: 7814 moveq #20,%d4 4b45c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b45e: 2003 movel %d3,%d0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4b460: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b462: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b468: 4e5e unlk %fp 4b46a: 4e75 rts
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b46c: 98ae fffc subl %fp@(-4),%d4
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
4b470: 2428 0024 movel %a0@(36),%d2 4b474: 2268 0028 moveal %a0@(40),%a1
*pathloc = newloc;
4b478: 2768 002c 0010 movel %a0@(44),%a3@(16)
* If we are at a node that is a mount point. Set loc to the
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
4b47e: 2228 0020 movel %a0@(32),%d1 4b482: 2028 001c movel %a0@(28),%d0
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b486: 2f2e 0010 movel %fp@(16),%sp@- 4b48a: 2f0b movel %a3,%sp@- 4b48c: 4874 4800 pea %a4@(00000000,%d4:l) 4b490: 2069 0004 moveal %a1@(4),%a0
* new fs root node and let them finish evaluating the path.
*/
if ( node->info.directory.mt_fs != NULL ) {
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
4b494: 2742 0008 movel %d2,%a3@(8) 4b498: 2741 0004 movel %d1,%a3@(4) 4b49c: 2680 movel %d0,%a3@ 4b49e: 2749 000c movel %a1,%a3@(12)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b4a2: 4e90 jsr %a0@ 4b4a4: 4fef 000c lea %sp@(12),%sp 4b4a8: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b4aa: 2003 movel %d3,%d0 4b4ac: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b4b2: 4e5e unlk %fp 4b4b4: 4e75 rts
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b4b6: 98ae fffc subl %fp@(-4),%d4
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
4b4ba: 2069 0014 moveal %a1@(20),%a0 4b4be: 2629 0010 movel %a1@(16),%d3 4b4c2: 2429 000c movel %a1@(12),%d2
*pathloc = newloc;
4b4c6: 2769 0018 0010 movel %a1@(24),%a3@(16)
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
4b4cc: 2229 0008 movel %a1@(8),%d1
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b4d0: 2f2e 0010 movel %fp@(16),%sp@- 4b4d4: 2f0b movel %a3,%sp@- 4b4d6: 4874 4800 pea %a4@(00000000,%d4:l) 4b4da: 2028 0004 movel %a0@(4),%d0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
4b4de: 2743 0008 movel %d3,%a3@(8) 4b4e2: 2748 000c movel %a0,%a3@(12)
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b4e6: 2040 moveal %d0,%a0
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
4b4e8: 2742 0004 movel %d2,%a3@(4) 4b4ec: 2681 movel %d1,%a3@
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4b4ee: 4e90 jsr %a0@ 4b4f0: 4fef 000c lea %sp@(12),%sp 4b4f4: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4b4f6: 2003 movel %d3,%d0 4b4f8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4b4fe: 4e5e unlk %fp
...
0004ae18 <IMFS_evaluate_hard_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
4ae18: 7003 moveq #3,%d0
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4ae1a: 4e56 0000 linkw %fp,#0 4ae1e: 2f0a movel %a2,%sp@- 4ae20: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = node->node_access;
4ae24: 2052 moveal %a2@,%a0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
4ae26: b0a8 0048 cmpl %a0@(72),%d0
4ae2a: 6640 bnes 4ae6c <IMFS_evaluate_hard_link+0x54> <== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
4ae2c: 24a8 004c movel %a0@(76),%a2@
IMFS_Set_handlers( node );
4ae30: 2f0a movel %a2,%sp@- 4ae32: 4eb9 0004 acf0 jsr 4acf0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
4ae38: 2f2e 000c movel %fp@(12),%sp@- 4ae3c: 2f0a movel %a2,%sp@- 4ae3e: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4ae44: 4fef 000c lea %sp@(12),%sp 4ae48: 4a80 tstl %d0
4ae4a: 670a beqs 4ae56 <IMFS_evaluate_hard_link+0x3e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ae4c: 246e fffc moveal %fp@(-4),%a2
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
4ae50: 4280 clrl %d0
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4ae52: 4e5e unlk %fp 4ae54: 4e75 rts
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4ae56: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
return result;
}
4ae5c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4ae60: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ae62: 720d moveq #13,%d1 <== NOT EXECUTED 4ae64: 70ff moveq #-1,%d0 <== NOT EXECUTED
return result;
}
4ae66: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4ae68: 2081 movel %d1,%a0@ <== NOT EXECUTED
return result;
}
4ae6a: 4e75 rts <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
4ae6c: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4ae72: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004b1be <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4b1be: 4e56 ffec linkw %fp,#-20 4b1c2: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4b1c8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4b1cc: 266e 0008 moveal %fp@(8),%a3
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
4b1d0: 4bf9 0004 ae78 lea 4ae78 <IMFS_evaluate_sym_link>,%a5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4b1d6: 49f9 0004 ae18 lea 4ae18 <IMFS_evaluate_hard_link>,%a4
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4b1dc: 242e 000c movel %fp@(12),%d2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4b1e0: 4281 clrl %d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4b1e2: 3028 0030 movew %a0@(48),%d0
{
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
4b1e6: 2453 moveal %a3@,%a2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4b1e8: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4b1ea: 3200 movew %d0,%d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4b1ec: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4b1f0: 7005 moveq #5,%d0 4b1f2: b081 cmpl %d1,%d0
4b1f4: 6564 bcss 4b25a <IMFS_evaluate_link+0x9c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
4b1f6: 202a 0048 movel %a2@(72),%d0 4b1fa: 7203 moveq #3,%d1 4b1fc: b280 cmpl %d0,%d1
4b1fe: 6740 beqs 4b240 <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
4b200: 7204 moveq #4,%d1 4b202: b280 cmpl %d0,%d1
4b204: 671a beqs 4b220 <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4b206: 5780 subql #3,%d0 4b208: 7201 moveq #1,%d1 4b20a: b280 cmpl %d0,%d1
4b20c: 64d2 bccs 4b1e0 <IMFS_evaluate_link+0x22> <== NEVER TAKEN
4b20e: 4280 clrl %d0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4b210: 4241 clrw %d1 4b212: 3141 0030 movew %d1,%a0@(48)
return result;
}
4b216: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4b21c: 4e5e unlk %fp 4b21e: 4e75 rts
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
4b220: 2f02 movel %d2,%sp@- 4b222: 2f0b movel %a3,%sp@- 4b224: 4e95 jsr %a5@ 4b226: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4b228: 4a80 tstl %d0
4b22a: 6620 bnes 4b24c <IMFS_evaluate_link+0x8e>
4b22c: 202a 0048 movel %a2@(72),%d0 4b230: 7201 moveq #1,%d1 4b232: 5780 subql #3,%d0 4b234: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4b23a: b280 cmpl %d0,%d1
4b23c: 64a2 bccs 4b1e0 <IMFS_evaluate_link+0x22> <== ALWAYS TAKEN
4b23e: 60ce bras 4b20e <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4b240: 2f02 movel %d2,%sp@- 4b242: 2f0b movel %a3,%sp@- 4b244: 4e94 jsr %a4@ 4b246: 508f addql #8,%sp
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4b248: 4a80 tstl %d0
4b24a: 67e0 beqs 4b22c <IMFS_evaluate_link+0x6e> <== ALWAYS TAKEN
4b24c: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4b252: 4241 clrw %d1 4b254: 3141 0030 movew %d1,%a0@(48) 4b258: 60bc bras 4b216 <IMFS_evaluate_link+0x58>
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
4b25a: 4241 clrw %d1 4b25c: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
4b260: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b266: 725c moveq #92,%d1 4b268: 2040 moveal %d0,%a0 4b26a: 70ff moveq #-1,%d0
*/
rtems_filesystem_link_counts = 0;
return result;
}
4b26c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
4b272: 2081 movel %d1,%a0@
*/
rtems_filesystem_link_counts = 0;
return result;
}
4b274: 4e5e unlk %fp <== NOT EXECUTED
0004ad7e <IMFS_evaluate_permission>:
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4ad7e: 70f8 moveq #-8,%d0
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4ad80: 4e56 fff4 linkw %fp,#-12 4ad84: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4ad88: 242e 000c movel %fp@(12),%d2
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
4ad8c: c082 andl %d2,%d0
4ad8e: 6670 bnes 4ae00 <IMFS_evaluate_permission+0x82> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
jnode = node->node_access;
4ad90: 206e 0008 moveal %fp@(8),%a0 4ad94: 2450 moveal %a0@,%a2
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4ad96: 4eb9 0004 be84 jsr 4be84 <geteuid> 4ad9c: 3600 movew %d0,%d3
st_gid = getegid();
4ad9e: 4eb9 0004 be70 jsr 4be70 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
4ada4: 4281 clrl %d1 4ada6: 0283 0000 ffff andil #65535,%d3 4adac: 322a 0038 movew %a2@(56),%d1 4adb0: b283 cmpl %d3,%d1
4adb2: 6728 beqs 4addc <IMFS_evaluate_permission+0x5e>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
4adb4: 4281 clrl %d1 4adb6: 0280 0000 ffff andil #65535,%d0 4adbc: 322a 003a movew %a2@(58),%d1 4adc0: b280 cmpl %d0,%d1
4adc2: 672a beqs 4adee <IMFS_evaluate_permission+0x70>
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4adc4: 2002 movel %d2,%d0 <== NOT EXECUTED 4adc6: c0aa 002e andl %a2@(46),%d0 <== NOT EXECUTED 4adca: b082 cmpl %d2,%d0 <== NOT EXECUTED 4adcc: 57c0 seq %d0 <== NOT EXECUTED 4adce: 49c0 extbl %d0 <== NOT EXECUTED 4add0: 4480 negl %d0 <== NOT EXECUTED
return 1;
return 0;
}
4add2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4add8: 4e5e unlk %fp 4adda: 4e75 rts
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
4addc: ed8a lsll #6,%d2
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4adde: 2002 movel %d2,%d0 4ade0: c0aa 002e andl %a2@(46),%d0 4ade4: b082 cmpl %d2,%d0 4ade6: 57c0 seq %d0 4ade8: 49c0 extbl %d0 4adea: 4480 negl %d0 4adec: 60e4 bras 4add2 <IMFS_evaluate_permission+0x54>
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
flags_to_test <<= 3;
4adee: 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 )
4adf0: 2002 movel %d2,%d0 4adf2: c0aa 002e andl %a2@(46),%d0 4adf6: b082 cmpl %d2,%d0 4adf8: 57c0 seq %d0 4adfa: 49c0 extbl %d0 4adfc: 4480 negl %d0 4adfe: 60d2 bras 4add2 <IMFS_evaluate_permission+0x54>
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4ae00: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4ae06: 7201 moveq #1,%d1 <== NOT EXECUTED 4ae08: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ae0a: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4ae0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
4ae12: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
}
4ae14: 4e5e unlk %fp <== NOT EXECUTED
0004ae78 <IMFS_evaluate_sym_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4ae78: 7004 moveq #4,%d0
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4ae7a: 4e56 ffec linkw %fp,#-20 4ae7e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4ae82: 246e 0008 moveal %fp@(8),%a2 4ae86: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode = node->node_access;
4ae8a: 2652 moveal %a2@,%a3
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4ae8c: b0ab 0048 cmpl %a3@(72),%d0 4ae90: 6600 0088 bnew 4af1a <IMFS_evaluate_sym_link+0xa2>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
4ae94: 202b 0008 movel %a3@(8),%d0
4ae98: 6774 beqs 4af0e <IMFS_evaluate_sym_link+0x96> <== NEVER TAKEN
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
rtems_filesystem_get_sym_start_loc(
4ae9a: 2f0a movel %a2,%sp@- 4ae9c: 486e fffc pea %fp@(-4)
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
4aea0: 2480 movel %d0,%a2@
rtems_filesystem_get_sym_start_loc(
4aea2: 2f2b 004c movel %a3@(76),%sp@- 4aea6: 4eb9 0004 c424 jsr 4c424 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
4aeac: 262b 004c movel %a3@(76),%d3 4aeb0: d6ae fffc addl %fp@(-4),%d3 4aeb4: 2f03 movel %d3,%sp@- 4aeb6: 4eb9 0005 19e4 jsr 519e4 <strlen> 4aebc: 2e8a movel %a2,%sp@ 4aebe: 2f02 movel %d2,%sp@- 4aec0: 2f00 movel %d0,%sp@- 4aec2: 2f03 movel %d3,%sp@- 4aec4: 4eb9 0004 af26 jsr 4af26 <IMFS_eval_path> 4aeca: 2600 movel %d0,%d3
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
4aecc: 2f0a movel %a2,%sp@- 4aece: 4eb9 0004 acf0 jsr 4acf0 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
4aed4: 4fef 001c lea %sp@(28),%sp 4aed8: 2e82 movel %d2,%sp@ 4aeda: 2f0a movel %a2,%sp@- 4aedc: 4eb9 0004 ad7e jsr 4ad7e <IMFS_evaluate_permission> 4aee2: 508f addql #8,%sp 4aee4: 4a80 tstl %d0
4aee6: 670c beqs 4aef4 <IMFS_evaluate_sym_link+0x7c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aee8: 2003 movel %d3,%d0 4aeea: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4aef0: 4e5e unlk %fp 4aef2: 4e75 rts
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4aef4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4aefa: 76ff moveq #-1,%d3 <== NOT EXECUTED 4aefc: 740d moveq #13,%d2 <== NOT EXECUTED 4aefe: 2040 moveal %d0,%a0 <== NOT EXECUTED
return result;
}
4af00: 2003 movel %d3,%d0 <== NOT EXECUTED
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
4af02: 2082 movel %d2,%a0@ <== NOT EXECUTED
return result;
}
4af04: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4af0a: 4e5e unlk %fp <== NOT EXECUTED 4af0c: 4e75 rts <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
4af0e: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 4af14: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
4af1a: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4af20: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004f3c4 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4f3c4: 4e56 fff8 linkw %fp,#-8 4f3c8: 206e 0008 moveal %fp@(8),%a0 4f3cc: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
4f3ce: 2450 moveal %a0@,%a2
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4f3d0: 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 ) )
4f3d2: 4282 clrl %d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4f3d4: 4eb9 0004 be84 jsr 4be84 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4f3da: 4281 clrl %d1 4f3dc: 3400 movew %d0,%d2 4f3de: 322a 0038 movew %a2@(56),%d1 4f3e2: b282 cmpl %d2,%d1
4f3e4: 6704 beqs 4f3ea <IMFS_fchmod+0x26> <== ALWAYS TAKEN
4f3e6: 4a40 tstw %d0 <== NOT EXECUTED 4f3e8: 663c bnes 4f426 <IMFS_fchmod+0x62> <== NOT EXECUTED
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4f3ea: 222e 000c movel %fp@(12),%d1 4f3ee: 202a 002e movel %a2@(46),%d0 4f3f2: 0281 0000 0fff andil #4095,%d1 4f3f8: 0280 ffff f000 andil #-4096,%d0 4f3fe: 8280 orl %d0,%d1 4f400: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
4f404: 42a7 clrl %sp@- 4f406: 486e fff8 pea %fp@(-8) 4f40a: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4f410: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4f416: 508f addql #8,%sp
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
4f418: 4280 clrl %d0
return 0;
}
4f41a: 242e fff0 movel %fp@(-16),%d2 4f41e: 246e fff4 moveal %fp@(-12),%a2 4f422: 4e5e unlk %fp 4f424: 4e75 rts
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
4f426: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
return 0;
}
4f42c: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
4f430: 2040 moveal %d0,%a0 <== NOT EXECUTED 4f432: 7201 moveq #1,%d1 <== NOT EXECUTED 4f434: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
return 0;
}
4f436: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4f43a: 4e5e unlk %fp <== NOT EXECUTED
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
rtems_set_errno_and_return_minus_one( EPERM );
4f43c: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
IMFS_update_ctime( jnode );
return 0;
}
0004b6d8 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
4b6d8: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4b6dc: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4b6e0: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
4b6e4: 266a 0038 moveal %a2@(56),%a3 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
4b6e8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b6ea: 486b 004c pea %a3@(76) <== NOT EXECUTED 4b6ee: 4eb9 0004 a44c jsr 4a44c <pipe_release> <== NOT EXECUTED
if (! err) {
4b6f4: 508f addql #8,%sp <== NOT EXECUTED
rtems_libio_t *iop
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
4b6f6: 2400 movel %d0,%d2 <== NOT EXECUTED
if (! err) {
4b6f8: 670e beqs 4b708 <IMFS_fifo_close+0x30> <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
4b6fa: 6d40 blts 4b73c <IMFS_fifo_close+0x64> <== NOT EXECUTED
}
4b6fc: 2002 movel %d2,%d0 <== NOT EXECUTED 4b6fe: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b704: 4e5e unlk %fp <== NOT EXECUTED 4b706: 4e75 rts <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b708: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
4b70e: 2f0b movel %a3,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (! err) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b710: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
4b714: 4eb9 0004 befa jsr 4befa <rtems_libio_is_file_open> <== NOT EXECUTED 4b71a: 588f addql #4,%sp <== NOT EXECUTED 4b71c: 4a80 tstl %d0 <== NOT EXECUTED 4b71e: 66dc bnes 4b6fc <IMFS_fifo_close+0x24> <== NOT EXECUTED 4b720: 4a6b 0032 tstw %a3@(50) <== NOT EXECUTED 4b724: 66d6 bnes 4b6fc <IMFS_fifo_close+0x24> <== NOT EXECUTED
free(jnode);
4b726: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4b728: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 4b72e: 588f addql #4,%sp <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
4b730: 2002 movel %d2,%d0 <== NOT EXECUTED 4b732: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b738: 4e5e unlk %fp <== NOT EXECUTED 4b73a: 4e75 rts <== NOT EXECUTED
/* Free jnode if file is already unlinked and no one opens it */
if (! rtems_libio_is_file_open(jnode) && jnode->st_nlink < 1)
free(jnode);
}
IMFS_FIFO_RETURN(err);
4b73c: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4b742: 4482 negl %d2 <== NOT EXECUTED 4b744: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b746: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b748: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
4b74a: 2002 movel %d2,%d0 <== NOT EXECUTED 4b74c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4b752: 4e5e unlk %fp <== NOT EXECUTED
0004b568 <IMFS_fifo_ioctl>:
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
4b568: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4b56c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b570: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED 4b574: 226e 0010 moveal %fp@(16),%a1 <== NOT EXECUTED 4b578: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int err;
if (command == FIONBIO) {
4b57a: 0c80 8004 667e cmpil #-2147195266,%d0 <== NOT EXECUTED 4b580: 6724 beqs 4b5a6 <IMFS_fifo_ioctl+0x3e> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
4b582: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b584: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4b588: 2f09 movel %a1,%sp@- <== NOT EXECUTED 4b58a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4b58c: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 4b590: 4eb9 0004 9fe6 jsr 49fe6 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
4b596: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4b59a: 4a80 tstl %d0 <== NOT EXECUTED 4b59c: 6d46 blts 4b5e4 <IMFS_fifo_ioctl+0x7c> <== NOT EXECUTED
}
4b59e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b5a2: 4e5e unlk %fp <== NOT EXECUTED 4b5a4: 4e75 rts <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
4b5a6: 4a89 tstl %a1 <== NOT EXECUTED 4b5a8: 6724 beqs 4b5ce <IMFS_fifo_ioctl+0x66> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
4b5aa: 4a91 tstl %a1@ <== NOT EXECUTED 4b5ac: 6710 beqs 4b5be <IMFS_fifo_ioctl+0x56> <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
4b5ae: 7201 moveq #1,%d1 <== NOT EXECUTED 4b5b0: 4280 clrl %d0 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
4b5b2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b5b6: 4e5e unlk %fp <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
4b5b8: 83a8 0014 orl %d1,%a0@(20) <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
4b5bc: 4e75 rts <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4b5be: 72fe moveq #-2,%d1 <== NOT EXECUTED 4b5c0: 4280 clrl %d0 <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
4b5c2: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b5c6: 4e5e unlk %fp <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4b5c8: c3a8 0014 andl %d1,%a0@(20) <== NOT EXECUTED
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
}
4b5cc: 4e75 rts <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
4b5ce: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
)
{
int err;
if (command == FIONBIO) {
if (buffer == NULL)
4b5d4: 740e moveq #14,%d2 <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
4b5d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b5d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b5da: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
4b5dc: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b5e0: 4e5e unlk %fp <== NOT EXECUTED 4b5e2: 4e75 rts <== NOT EXECUTED
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
IMFS_FIFO_RETURN(err);
4b5e4: 2400 movel %d0,%d2 <== NOT EXECUTED 4b5e6: 4482 negl %d2 <== NOT EXECUTED 4b5e8: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4b5ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b5f0: 70ff moveq #-1,%d0 <== NOT EXECUTED 4b5f2: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b5f4: 60e6 bras 4b5dc <IMFS_fifo_ioctl+0x74> <== NOT EXECUTED
0004b504 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4b504: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4b508: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b50c: 48d7 001c moveml %d2-%d4,%sp@ <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
4b510: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b512: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4b516: 2068 0038 moveal %a0@(56),%a0 <== NOT EXECUTED 4b51a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b51e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4b522: 2f28 004c movel %a0@(76),%sp@- <== NOT EXECUTED 4b526: 4eb9 0004 9f88 jsr 49f88 <pipe_lseek> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
4b52c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
4b530: 2800 movel %d0,%d4 <== NOT EXECUTED 4b532: 2600 movel %d0,%d3 <== NOT EXECUTED 4b534: 5bc2 smi %d2 <== NOT EXECUTED 4b536: 49c2 extbl %d2 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
4b538: 4a82 tstl %d2 <== NOT EXECUTED 4b53a: 6b0e bmis 4b54a <IMFS_fifo_lseek+0x46> <== NOT EXECUTED
}
4b53c: 2203 movel %d3,%d1 <== NOT EXECUTED 4b53e: 2002 movel %d2,%d0 <== NOT EXECUTED 4b540: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4b546: 4e5e unlk %fp <== NOT EXECUTED 4b548: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
4b54a: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4b550: 4484 negl %d4 <== NOT EXECUTED 4b552: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b554: 74ff moveq #-1,%d2 <== NOT EXECUTED 4b556: 76ff moveq #-1,%d3 <== NOT EXECUTED 4b558: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
4b55a: 2203 movel %d3,%d1 <== NOT EXECUTED 4b55c: 2002 movel %d2,%d0 <== NOT EXECUTED 4b55e: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4b564: 4e5e unlk %fp <== NOT EXECUTED
0004b756 <IMFS_fifo_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4b756: 4e56 0000 linkw %fp,#0 4b75a: 206e 0008 moveal %fp@(8),%a0 4b75e: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
4b760: 2f08 movel %a0,%sp@- 4b762: 2068 0038 moveal %a0@(56),%a0 4b766: 41e8 004c lea %a0@(76),%a0 4b76a: 2f08 movel %a0,%sp@- 4b76c: 4eb9 0004 a56c jsr 4a56c <fifo_open>
IMFS_FIFO_RETURN(err);
4b772: 508f addql #8,%sp
uint32_t mode
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
4b774: 2400 movel %d0,%d2
IMFS_FIFO_RETURN(err);
4b776: 6d0a blts 4b782 <IMFS_fifo_open+0x2c> <== ALWAYS TAKEN
}
4b778: 2002 movel %d2,%d0 <== NOT EXECUTED 4b77a: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4b77e: 4e5e unlk %fp <== NOT EXECUTED 4b780: 4e75 rts <== NOT EXECUTED
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = fifo_open(&JNODE2PIPE(jnode), iop);
IMFS_FIFO_RETURN(err);
4b782: 4eb9 0005 05b8 jsr 505b8 <__errno> 4b788: 4482 negl %d2 4b78a: 2040 moveal %d0,%a0 4b78c: 2082 movel %d2,%a0@ 4b78e: 74ff moveq #-1,%d2
}
4b790: 2002 movel %d2,%d0 4b792: 242e fffc movel %fp@(-4),%d2 4b796: 4e5e unlk %fp
...
0004b66a <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4b66a: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4b66e: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b672: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b674: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
4b676: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b678: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b67c: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->file_info;
4b680: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
4b684: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4b688: 4eb9 0004 a046 jsr 4a046 <pipe_read> <== NOT EXECUTED
if (err > 0)
4b68e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
size_t count
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
4b692: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0)
4b694: 6f22 bles 4b6b8 <IMFS_fifo_read+0x4e> <== NOT EXECUTED
IMFS_update_atime(jnode);
4b696: 42a7 clrl %sp@- <== NOT EXECUTED 4b698: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4b69c: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> <== NOT EXECUTED 4b6a2: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED 4b6a8: 508f addql #8,%sp <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
}
4b6aa: 2002 movel %d2,%d0 <== NOT EXECUTED 4b6ac: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b6b0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b6b4: 4e5e unlk %fp <== NOT EXECUTED 4b6b6: 4e75 rts <== NOT EXECUTED
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0)
IMFS_update_atime(jnode);
IMFS_FIFO_RETURN(err);
4b6b8: 4a80 tstl %d0 <== NOT EXECUTED 4b6ba: 67ee beqs 4b6aa <IMFS_fifo_read+0x40> <== NOT EXECUTED 4b6bc: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4b6c2: 4482 negl %d2 <== NOT EXECUTED 4b6c4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b6c6: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b6c8: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
4b6ca: 2002 movel %d2,%d0 <== NOT EXECUTED 4b6cc: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b6d0: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b6d4: 4e5e unlk %fp <== NOT EXECUTED
0004b5f6 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4b5f6: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4b5fa: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4b5fe: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4b600: 2f02 movel %d2,%sp@- <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
4b602: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4b604: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4b608: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->file_info;
4b60c: 2468 0038 moveal %a0@(56),%a2 <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
4b610: 2f2a 004c movel %a2@(76),%sp@- <== NOT EXECUTED 4b614: 4eb9 0004 a23c jsr 4a23c <pipe_write> <== NOT EXECUTED
if (err > 0) {
4b61a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
size_t count
)
{
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
4b61e: 2400 movel %d0,%d2 <== NOT EXECUTED
if (err > 0) {
4b620: 6f28 bles 4b64a <IMFS_fifo_write+0x54> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
4b622: 42a7 clrl %sp@- <== NOT EXECUTED 4b624: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4b628: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> <== NOT EXECUTED 4b62e: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4b632: 508f addql #8,%sp <== NOT EXECUTED 4b634: 2540 0044 movel %d0,%a2@(68) <== NOT EXECUTED 4b638: 2540 0040 movel %d0,%a2@(64) <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
}
4b63c: 2002 movel %d2,%d0 <== NOT EXECUTED 4b63e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b642: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b646: 4e5e unlk %fp <== NOT EXECUTED 4b648: 4e75 rts <== NOT EXECUTED
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
4b64a: 4a80 tstl %d0 <== NOT EXECUTED 4b64c: 67ee beqs 4b63c <IMFS_fifo_write+0x46> <== NOT EXECUTED 4b64e: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4b654: 4482 negl %d2 <== NOT EXECUTED 4b656: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b658: 2082 movel %d2,%a0@ <== NOT EXECUTED 4b65a: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
4b65c: 2002 movel %d2,%d0 <== NOT EXECUTED 4b65e: 242e fff0 movel %fp@(-16),%d2 <== NOT EXECUTED 4b662: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4b666: 4e5e unlk %fp <== NOT EXECUTED
0004b858 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4b858: 4e56 fff0 linkw %fp,#-16 4b85c: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4b860: 246e 0008 moveal %fp@(8),%a2 4b864: 242e 000c movel %fp@(12),%d2
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
4b868: 4a8a tstl %a2
4b86a: 6776 beqs 4b8e2 <IMFS_find_match_in_dir+0x8a> <== NEVER TAKEN
if ( !name )
4b86c: 4a82 tstl %d2
4b86e: 6756 beqs 4b8c6 <IMFS_find_match_in_dir+0x6e> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4b870: 4879 0005 ec6a pea 5ec6a <dotname> 4b876: 47f9 0005 14c0 lea 514c0 <strcmp>,%a3 4b87c: 2f02 movel %d2,%sp@- 4b87e: 4e93 jsr %a3@ 4b880: 508f addql #8,%sp 4b882: 4a80 tstl %d0
4b884: 6714 beqs 4b89a <IMFS_find_match_in_dir+0x42> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
4b886: 4879 0005 ec6c pea 5ec6c <dotdotname> 4b88c: 2f02 movel %d2,%sp@- 4b88e: 4e93 jsr %a3@ 4b890: 508f addql #8,%sp 4b892: 4a80 tstl %d0
4b894: 6610 bnes 4b8a6 <IMFS_find_match_in_dir+0x4e> <== ALWAYS TAKEN
return directory->Parent;
4b896: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4b89a: 200a movel %a2,%d0 <== NOT EXECUTED 4b89c: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 4b8a2: 4e5e unlk %fp <== NOT EXECUTED 4b8a4: 4e75 rts <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
4b8a6: 286a 004c moveal %a2@(76),%a4 4b8aa: 45ea 0050 lea %a2@(80),%a2 4b8ae: b5cc cmpal %a4,%a2
4b8b0: 6714 beqs 4b8c6 <IMFS_find_match_in_dir+0x6e>
!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 ) )
4b8b2: 486c 000c pea %a4@(12) 4b8b6: 2f02 movel %d2,%sp@- 4b8b8: 4e93 jsr %a3@ 4b8ba: 508f addql #8,%sp 4b8bc: 4a80 tstl %d0
4b8be: 6714 beqs 4b8d4 <IMFS_find_match_in_dir+0x7c>
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 ) {
4b8c0: 2854 moveal %a4@,%a4
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
4b8c2: b5cc cmpal %a4,%a2
4b8c4: 66ec bnes 4b8b2 <IMFS_find_match_in_dir+0x5a>
4b8c6: 95ca subal %a2,%a2
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4b8c8: 200a movel %a2,%d0 4b8ca: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b8d0: 4e5e unlk %fp 4b8d2: 4e75 rts
!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 ) )
4b8d4: 244c moveal %a4,%a2
return the_jnode;
}
return 0;
}
4b8d6: 200a movel %a2,%d0 4b8d8: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4b8de: 4e5e unlk %fp 4b8e0: 4e75 rts
/*
* Check for fatal errors. A NULL directory show a problem in the
* the IMFS code.
*/
assert( directory );
4b8e2: 4879 0005 f549 pea 5f549 <_global_impure_ptr+0x1b1> <== NOT EXECUTED 4b8e8: 4879 0005 ec6f pea 5ec6f <__FUNCTION__.5435> <== NOT EXECUTED 4b8ee: 4878 002a pea 2a <OPER2+0x16> <== NOT EXECUTED 4b8f2: 4879 0005 ec1a pea 5ec1a <IMFS_fifo_handlers+0x38> <== NOT EXECUTED 4b8f8: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
...
0004b7a8 <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
)
{
4b7a8: 4e56 ffd8 linkw %fp,#-40 4b7ac: 206e 0008 moveal %fp@(8),%a0 4b7b0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
4b7b4: 47ee ffec lea %fp@(-20),%a3 4b7b8: 49f9 0004 acf0 lea 4acf0 <IMFS_Set_handlers>,%a4
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
if ( jnode->type != IMFS_DIRECTORY ) {
result = IMFS_unlink( NULL, &loc );
4b7be: 4bf9 0004 2598 lea 42598 <IMFS_unlink>,%a5
* 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;
4b7c4: 26a8 001c movel %a0@(28),%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;
4b7c8: 2468 001c moveal %a0@(28),%a2
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
4b7cc: 42a8 001c clrl %a0@(28)
* Traverse tree that starts at the mt_fs_root and deallocate memory
* associated memory space
*/
jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access;
loc = temp_mt_entry->mt_fs_root;
4b7d0: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4b7d6: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4b7dc: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4b7e2: 2d68 002c fffc movel %a0@(44),%fp@(-4)
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
4b7e8: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4b7ec: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4b7f0: 2f0b movel %a3,%sp@- 4b7f2: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4b7f4: 588f addql #4,%sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4b7f6: 200a movel %a2,%d0 4b7f8: 0680 0000 0050 addil #80,%d0 4b7fe: 7201 moveq #1,%d1 4b800: b2aa 0048 cmpl %a2@(72),%d1
4b804: 6634 bnes 4b83a <IMFS_fsunmount+0x92>
4b806: b0aa 004c cmpl %a2@(76),%d0
4b80a: 672e beqs 4b83a <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
4b80c: 4a8a tstl %a2
4b80e: 671e beqs 4b82e <IMFS_fsunmount+0x86>
if ( jnode->type == IMFS_DIRECTORY ) {
4b810: 7001 moveq #1,%d0 4b812: b0aa 0048 cmpl %a2@(72),%d0
4b816: 66d0 bnes 4b7e8 <IMFS_fsunmount+0x40> <== NEVER TAKEN
4b818: 200a movel %a2,%d0 4b81a: 0680 0000 0050 addil #80,%d0 4b820: b0aa 004c cmpl %a2@(76),%d0
4b824: 67c2 beqs 4b7e8 <IMFS_fsunmount+0x40>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
4b826: 246a 004c moveal %a2@(76),%a2
}
}
} while (jnode != NULL);
4b82a: 4a8a tstl %a2
4b82c: 66ba bnes 4b7e8 <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
4b82e: 4280 clrl %d0
return 0;
}
4b830: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4b836: 4e5e unlk %fp 4b838: 4e75 rts
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4b83a: 2f0b movel %a3,%sp@- 4b83c: 42a7 clrl %sp@- 4b83e: 4e95 jsr %a5@
if (result != 0)
4b840: 508f addql #8,%sp 4b842: 4a80 tstl %d0
4b844: 6604 bnes 4b84a <IMFS_fsunmount+0xa2> <== NEVER TAKEN
4b846: 2442 moveal %d2,%a2 4b848: 60c2 bras 4b80c <IMFS_fsunmount+0x64>
if ( jnode->type == IMFS_DIRECTORY ) {
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
4b84a: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
4b84c: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4b852: 4e5e unlk %fp <== NOT EXECUTED
...
0004b900 <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b900: 4e56 ffe4 linkw %fp,#-28 4b904: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 4b908: 286e 0008 moveal %fp@(8),%a4 4b90c: 47f9 0004 3d74 lea 43d74 <rtems_filesystem_is_separator>,%a3
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4b912: 4282 clrl %d2 4b914: 1614 moveb %a4@,%d3
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b916: 282e 000c movel %fp@(12),%d4
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4b91a: 1003 moveb %d3,%d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b91c: 246e 0010 moveal %fp@(16),%a2
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4b920: 49c0 extbl %d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4b922: 2a6e 0014 moveal %fp@(20),%a5
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4b926: 2f00 movel %d0,%sp@- 4b928: 4e93 jsr %a3@ 4b92a: 588f addql #4,%sp 4b92c: 4a80 tstl %d0
4b92e: 6622 bnes 4b952 <IMFS_get_token+0x52>
4b930: b882 cmpl %d2,%d4
4b932: 6f1e bles 4b952 <IMFS_get_token+0x52>
token[i] = c;
if ( i == IMFS_NAME_MAX )
4b934: 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;
4b936: 1583 2800 moveb %d3,%a2@(00000000,%d2:l)
if ( i == IMFS_NAME_MAX )
4b93a: b082 cmpl %d2,%d0
4b93c: 6770 beqs 4b9ae <IMFS_get_token+0xae>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
4b93e: 5282 addql #1,%d2 4b940: 1634 2800 moveb %a4@(00000000,%d2:l),%d3
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4b944: 1003 moveb %d3,%d0 4b946: 49c0 extbl %d0 4b948: 2f00 movel %d0,%sp@- 4b94a: 4e93 jsr %a3@ 4b94c: 588f addql #4,%sp 4b94e: 4a80 tstl %d0
4b950: 67de beqs 4b930 <IMFS_get_token+0x30>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
4b952: 4a82 tstl %d2
4b954: 6616 bnes 4b96c <IMFS_get_token+0x6c>
token[i] = c;
4b956: 1483 moveb %d3,%a2@
if ( (token[i] != '\0') && pathlen ) {
4b958: 6704 beqs 4b95e <IMFS_get_token+0x5e>
4b95a: 4a84 tstl %d4
4b95c: 666c bnes 4b9ca <IMFS_get_token+0xca>
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
token[i] = '\0';
4b95e: 4280 clrl %d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b960: 2a82 movel %d2,%a5@
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b962: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b968: 4e5e unlk %fp 4b96a: 4e75 rts
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
4b96c: 4a32 28ff tstb %a2@(ffffffff,%d2:l)
4b970: 6706 beqs 4b978 <IMFS_get_token+0x78> <== NEVER TAKEN
token[i] = '\0';
4b972: 4200 clrb %d0 4b974: 1580 2800 moveb %d0,%a2@(00000000,%d2:l)
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4b978: 4879 0005 ec86 pea 5ec86 <__FUNCTION__.5435+0x17> 4b97e: 47f9 0005 14c0 lea 514c0 <strcmp>,%a3
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b984: 2a82 movel %d2,%a5@
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4b986: 2f0a movel %a2,%sp@- 4b988: 4e93 jsr %a3@ 4b98a: 508f addql #8,%sp 4b98c: 4a80 tstl %d0
4b98e: 672c beqs 4b9bc <IMFS_get_token+0xbc>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4b990: 4879 0005 ec87 pea 5ec87 <__FUNCTION__.5435+0x18> 4b996: 2f0a movel %a2,%sp@- 4b998: 4e93 jsr %a3@ 4b99a: 508f addql #8,%sp 4b99c: 4a80 tstl %d0
4b99e: 6634 bnes 4b9d4 <IMFS_get_token+0xd4>
4b9a0: 103c 0001 moveb #1,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
4b9a4: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b9aa: 4e5e unlk %fp 4b9ac: 4e75 rts
c = path[i];
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
4b9ae: 103c 0004 moveb #4,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b9b2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b9b8: 4e5e unlk %fp 4b9ba: 4e75 rts
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4b9bc: 103c 0002 moveb #2,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4b9c0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4b9c6: 4e5e unlk %fp 4b9c8: 4e75 rts
*/
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
4b9ca: 143c 0001 moveb #1,%d2 4b9ce: 7001 moveq #1,%d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4b9d0: 2a82 movel %d2,%a5@ 4b9d2: 608e bras 4b962 <IMFS_get_token+0x62>
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4b9d4: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
4b9d6: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4b9dc: 4e5e unlk %fp <== NOT EXECUTED
000420d8 <IMFS_initialize_support>:
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
420d8: 7010 moveq #16,%d0
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
420da: 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,
420de: 2079 0005 fba8 moveal 5fba8 <imfs_rq_memfile_bytes_per_block>,%a0
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers
)
{
420e4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 420e8: 246e 0008 moveal %fp@(8),%a2 420ec: 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) {
420f0: b088 cmpl %a0,%d0
420f2: 6716 beqs 4210a <IMFS_initialize_support+0x32> <== NEVER TAKEN
420f4: 4200 clrb %d0 420f6: 7220 moveq #32,%d1 420f8: 5280 addql #1,%d0 420fa: b288 cmpl %a0,%d1
420fc: 670c beqs 4210a <IMFS_initialize_support+0x32>
420fe: 7605 moveq #5,%d3 42100: d281 addl %d1,%d1 42102: b680 cmpl %d0,%d3
42104: 66f2 bnes 420f8 <IMFS_initialize_support+0x20> <== ALWAYS TAKEN
42106: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
4210a: 23c8 0006 0ac4 movel %a0,60ac4 <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();
42110: 4eb9 0004 aaae jsr 4aaae <IMFS_create_root_node>
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 ) );
42116: 4878 0010 pea 10 <INVALID_OPERATION>
* NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
4211a: 41f9 0005 eaf6 lea 5eaf6 <IMFS_LIMITS_AND_OPTIONS>,%a0
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
42120: 4878 0001 pea 1 <ADD>
* NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
42124: 2550 0038 movel %a0@,%a2@(56) 42128: 41f9 0005 eafa lea 5eafa <IMFS_LIMITS_AND_OPTIONS+0x4>,%a0 4212e: 2550 003c movel %a0@,%a2@(60) 42132: 41f9 0005 eafe lea 5eafe <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0 42138: 2550 0040 movel %a0@,%a2@(64) 4213c: 41f9 0005 eb02 lea 5eb02 <IMFS_LIMITS_AND_OPTIONS+0xc>,%a0 42142: 2550 0044 movel %a0@,%a2@(68) 42146: 41f9 0005 eb06 lea 5eb06 <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0 4214c: 2550 0048 movel %a0@,%a2@(72) 42150: 41f9 0005 eb0a lea 5eb0a <IMFS_LIMITS_AND_OPTIONS+0x14>,%a0 42156: 2550 004c movel %a0@,%a2@(76) 4215a: 41f9 0005 eb0e lea 5eb0e <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0 42160: 2550 0050 movel %a0@,%a2@(80) 42164: 41f9 0005 eb12 lea 5eb12 <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a0 4216a: 2550 0054 movel %a0@,%a2@(84) 4216e: 41f9 0005 eb16 lea 5eb16 <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0 42174: 2550 0058 movel %a0@,%a2@(88) 42178: 41f9 0005 eb1a lea 5eb1a <IMFS_LIMITS_AND_OPTIONS+0x24>,%a0 4217e: 2550 005c movel %a0@,%a2@(92) 42182: 41f9 0005 eb1e lea 5eb1e <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0 42188: 2550 0060 movel %a0@,%a2@(96) 4218c: 41f9 0005 eb22 lea 5eb22 <IMFS_LIMITS_AND_OPTIONS+0x2c>,%a0
* * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table;
42192: 256e 000c 0028 movel %fp@(12),%a2@(40)
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
42198: 2550 0064 movel %a0@,%a2@(100)
/* * 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();
4219c: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
421a0: 2542 0024 movel %d2,%a2@(36)
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 ) );
421a4: 4eb9 0004 2918 jsr 42918 <calloc>
if ( !fs_info ) {
421aa: 508f addql #8,%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 ) );
421ac: 2040 moveal %d0,%a0
if ( !fs_info ) {
421ae: 4a80 tstl %d0
421b0: 6742 beqs 421f4 <IMFS_initialize_support+0x11c> <== NEVER TAKEN
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
421b2: 7001 moveq #1,%d0
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
421b4: 7601 moveq #1,%d3
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
421b6: 2140 0004 movel %d0,%a0@(4)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
421ba: 2039 0006 0ac8 movel 60ac8 <imfs_instance.5940>,%d0 421c0: 2200 movel %d0,%d1 421c2: 5281 addql #1,%d1
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
421c4: 226a 001c moveal %a2@(28),%a1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
421c8: 23c1 0006 0ac8 movel %d1,60ac8 <imfs_instance.5940>
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers;
421ce: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers;
421d4: 2142 000c movel %d2,%a0@(12)
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
421d8: 2343 0034 movel %d3,%a1@(52)
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
421dc: 2548 0034 movel %a0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
421e0: 2080 movel %d0,%a0@
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
421e2: 4eb9 0004 9f92 jsr 49f92 <rtems_pipe_initialize>
return 0;
}
421e8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
421ee: 4280 clrl %d0
return 0;
}
421f0: 4e5e unlk %fp 421f2: 4e75 rts
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
421f4: 2f2a 001c movel %a2@(28),%sp@- <== NOT EXECUTED 421f8: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
421fe: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42204: 588f addql #4,%sp <== NOT EXECUTED 42206: 720c moveq #12,%d1 <== NOT EXECUTED 42208: 2040 moveal %d0,%a0 <== NOT EXECUTED 4220a: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
return 0;
}
4220c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
if ( !fs_info ) {
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
42212: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Initialize POSIX FIFO/pipe module */
rtems_pipe_initialize();
return 0;
}
42214: 4e5e unlk %fp <== NOT EXECUTED
00042218 <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 )
42218: 4280 clrl %d0 4221a: 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 */
)
{
4221c: 4e56 ffbc linkw %fp,#-68 42220: 206e 0008 moveal %fp@(8),%a0 42224: 2f03 movel %d3,%sp@-
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
42226: 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 */
)
{
42228: 2f02 movel %d2,%sp@- 4222a: 242e 0010 movel %fp@(16),%d2
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
4222e: 2d48 ffe0 movel %a0,%fp@(-32)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
42232: 3028 0032 movew %a0@(50),%d0 42236: b280 cmpl %d0,%d1
42238: 6578 bcss 422b2 <IMFS_link+0x9a>
rtems_set_errno_and_return_minus_one( EMLINK );
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
4223a: 2f02 movel %d2,%sp@- 4223c: 260e movel %fp,%d3 4223e: 0683 ffff ffbf addil #-65,%d3 42244: 4eb9 0005 19e4 jsr 519e4 <strlen> 4224a: 588f addql #4,%sp 4224c: 486e fffc pea %fp@(-4) 42250: 2f03 movel %d3,%sp@- 42252: 2f00 movel %d0,%sp@- 42254: 2f02 movel %d2,%sp@- 42256: 4eb9 0004 b900 jsr 4b900 <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(
4225c: 486e ffe0 pea %fp@(-32) 42260: 2f3c 0000 a1ff movel #41471,%sp@- 42266: 2f03 movel %d3,%sp@- 42268: 4878 0003 pea 3 <DIVIDE> 4226c: 2f2e 000c movel %fp@(12),%sp@- 42270: 4eb9 0004 aae8 jsr 4aae8 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
42276: 4fef 0024 lea %sp@(36),%sp 4227a: 4a80 tstl %d0
4227c: 674e beqs 422cc <IMFS_link+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
4227e: 206e ffe0 moveal %fp@(-32),%a0 42282: 3028 0032 movew %a0@(50),%d0 42286: 5280 addql #1,%d0 42288: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( info.hard_link.link_node );
4228c: 42a7 clrl %sp@- 4228e: 486e fff4 pea %fp@(-12) 42292: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 42298: 206e ffe0 moveal %fp@(-32),%a0
return 0;
4229c: 508f addql #8,%sp
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
4229e: 4280 clrl %d0 422a0: 216e fff4 0044 movel %fp@(-12),%a0@(68)
return 0;
}
422a6: 242e ffb4 movel %fp@(-76),%d2 422aa: 262e ffb8 movel %fp@(-72),%d3 422ae: 4e5e unlk %fp 422b0: 4e75 rts
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
rtems_set_errno_and_return_minus_one( EMLINK );
422b2: 4eb9 0005 05b8 jsr 505b8 <__errno> 422b8: 741f moveq #31,%d2 422ba: 2040 moveal %d0,%a0 422bc: 70ff moveq #-1,%d0 422be: 2082 movel %d2,%a0@
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
422c0: 242e ffb4 movel %fp@(-76),%d2 422c4: 262e ffb8 movel %fp@(-72),%d3 422c8: 4e5e unlk %fp 422ca: 4e75 rts
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
422cc: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
422d2: 242e ffb4 movel %fp@(-76),%d2 <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
422d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 422d8: 720c moveq #12,%d1 <== NOT EXECUTED 422da: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
422dc: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 422e0: 4e5e unlk %fp <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
422e2: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
...
0004e35e <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4e35e: 4e56 0000 linkw %fp,#0 4e362: 206e 0008 moveal %fp@(8),%a0 4e366: 2f0a movel %a2,%sp@-
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
4e368: 4a88 tstl %a0
4e36a: 6764 beqs 4e3d0 <IMFS_memfile_addblock+0x72> <== NEVER TAKEN
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e36c: 7005 moveq #5,%d0 4e36e: b0a8 0048 cmpl %a0@(72),%d0
4e372: 6640 bnes 4e3b4 <IMFS_memfile_addblock+0x56> <== NEVER TAKEN
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4e374: 4878 0001 pea 1 <ADD> 4e378: 2f2e 000c movel %fp@(12),%sp@- 4e37c: 2f08 movel %a0,%sp@- 4e37e: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
4e384: 4fef 000c lea %sp@(12),%sp
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4e388: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
4e38a: 4a92 tstl %a2@
4e38c: 670a beqs 4e398 <IMFS_memfile_addblock+0x3a>
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
4e38e: 4280 clrl %d0
return 0;
}
4e390: 246e fffc moveal %fp@(-4),%a2 4e394: 4e5e unlk %fp 4e396: 4e75 rts
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
4e398: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block>
if ( !memory )
4e39e: 4a80 tstl %d0
4e3a0: 6706 beqs 4e3a8 <IMFS_memfile_addblock+0x4a> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
4e3a2: 2480 movel %d0,%a2@ 4e3a4: 4280 clrl %d0 4e3a6: 60e8 bras 4e390 <IMFS_memfile_addblock+0x32>
return 0;
}
4e3a8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
4e3ac: 103c 0001 moveb #1,%d0 <== NOT EXECUTED
return 1;
*block_entry_ptr = memory;
return 0;
}
4e3b0: 4e5e unlk %fp <== NOT EXECUTED 4e3b2: 4e75 rts <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e3b4: 4879 0005 f058 pea 5f058 <CSWTCH.8+0x64> <== NOT EXECUTED 4e3ba: 4879 0005 f171 pea 5f171 <__FUNCTION__.6079> <== NOT EXECUTED 4e3c0: 4878 016d pea 16d <DBL_MANT_DIG+0x138> <== NOT EXECUTED 4e3c4: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e3ca: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
4e3d0: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4e3d6: 4879 0005 f171 pea 5f171 <__FUNCTION__.6079> <== NOT EXECUTED 4e3dc: 4878 0169 pea 169 <DBL_MANT_DIG+0x134> <== NOT EXECUTED 4e3e0: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e3e6: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e3ec <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4e3ec: 4e56 ffdc linkw %fp,#-36 4e3f0: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4e3f4: 246e 0008 moveal %fp@(8),%a2 4e3f8: 262e 000c movel %fp@(12),%d3 4e3fc: 282e 0010 movel %fp@(16),%d4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e400: 4a8a tstl %a2 4e402: 6700 0102 beqw 4e506 <IMFS_memfile_extend+0x11a>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e406: 7005 moveq #5,%d0 4e408: b0aa 0048 cmpl %a2@(72),%d0 4e40c: 6600 0114 bnew 4e522 <IMFS_memfile_extend+0x136>
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4e410: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4e416: 2202 movel %d2,%d1 4e418: e489 lsrl #2,%d1 4e41a: 2001 movel %d1,%d0 4e41c: 5280 addql #1,%d0 4e41e: 4c01 0800 mulsl %d1,%d0 4e422: 4285 clrl %d5 4e424: 5280 addql #1,%d0 4e426: 4c01 0800 mulsl %d1,%d0 4e42a: 5380 subql #1,%d0 4e42c: 4c02 0800 mulsl %d2,%d0 4e430: 2c00 movel %d0,%d6 4e432: 2005 movel %d5,%d0 4e434: 2206 movel %d6,%d1 4e436: 9284 subl %d4,%d1 4e438: 9183 subxl %d3,%d0 4e43a: 6f00 00b2 blew 4e4ee <IMFS_memfile_extend+0x102>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
4e43e: 2a2a 004c movel %a2@(76),%d5 4e442: 2c2a 0050 movel %a2@(80),%d6 4e446: 2003 movel %d3,%d0 4e448: 2204 movel %d4,%d1 4e44a: 9286 subl %d6,%d1 4e44c: 9185 subxl %d5,%d0
4e44e: 6f62 bles 4e4b2 <IMFS_memfile_extend+0xc6>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4e450: 47f9 0005 c188 lea 5c188 <__divdi3>,%a3 4e456: 2202 movel %d2,%d1 4e458: 5bc0 smi %d0 4e45a: 49c0 extbl %d0 4e45c: 2840 moveal %d0,%a4 4e45e: 2a41 moveal %d1,%a5 4e460: 2f0d movel %a5,%sp@- 4e462: 2f00 movel %d0,%sp@- 4e464: 2f04 movel %d4,%sp@- 4e466: 2f03 movel %d3,%sp@- 4e468: 4e93 jsr %a3@ 4e46a: 4fef 0010 lea %sp@(16),%sp 4e46e: 2401 movel %d1,%d2
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4e470: 2f0d movel %a5,%sp@- 4e472: 2f0c movel %a4,%sp@- 4e474: 2f06 movel %d6,%sp@- 4e476: 2f05 movel %d5,%sp@- 4e478: 4e93 jsr %a3@ 4e47a: 4fef 0010 lea %sp@(16),%sp 4e47e: 2841 moveal %d1,%a4
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4e480: b282 cmpl %d2,%d1
4e482: 621a bhis 4e49e <IMFS_memfile_extend+0xb2> <== NEVER TAKEN
4e484: 2a01 movel %d1,%d5 4e486: 47f9 0004 e35e lea 4e35e <IMFS_memfile_addblock>,%a3
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4e48c: 2f05 movel %d5,%sp@- 4e48e: 2f0a movel %a2,%sp@- 4e490: 4e93 jsr %a3@ 4e492: 508f addql #8,%sp 4e494: 4a80 tstl %d0
4e496: 6626 bnes 4e4be <IMFS_memfile_extend+0xd2> <== NEVER TAKEN
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4e498: 5285 addql #1,%d5 4e49a: ba82 cmpl %d2,%d5
4e49c: 63ee blss 4e48c <IMFS_memfile_extend+0xa0>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4e49e: 4280 clrl %d0 4e4a0: 2543 004c movel %d3,%a2@(76) 4e4a4: 2544 0050 movel %d4,%a2@(80)
return 0; }
4e4a8: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4e4ae: 4e5e unlk %fp 4e4b0: 4e75 rts
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
4e4b2: 4280 clrl %d0
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4e4b4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 4e4ba: 4e5e unlk %fp 4e4bc: 4e75 rts
* 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-- ) {
4e4be: ba8c cmpl %a4,%d5 <== NOT EXECUTED 4e4c0: 6514 bcss 4e4d6 <IMFS_memfile_extend+0xea> <== NOT EXECUTED 4e4c2: 47f9 0004 e0de lea 4e0de <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4e4c8: 2f05 movel %d5,%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-- ) {
4e4ca: 5385 subql #1,%d5 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4e4cc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e4ce: 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-- ) {
4e4d0: 508f addql #8,%sp <== NOT EXECUTED 4e4d2: ba8c cmpl %a4,%d5 <== NOT EXECUTED 4e4d4: 64f2 bccs 4e4c8 <IMFS_memfile_extend+0xdc> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4e4d6: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4e4dc: 721c moveq #28,%d1 <== NOT EXECUTED 4e4de: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e4e0: 70ff moveq #-1,%d0 <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4e4e2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4e4e8: 2081 movel %d1,%a0@ <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4e4ea: 4e5e unlk %fp <== NOT EXECUTED 4e4ec: 4e75 rts <== NOT EXECUTED
assert( the_jnode->type == IMFS_MEMORY_FILE );
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
4e4ee: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4e4f4: 7416 moveq #22,%d2 <== NOT EXECUTED 4e4f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e4f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4e4fa: 2082 movel %d2,%a0@ <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4e4fc: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 4e502: 4e5e unlk %fp <== NOT EXECUTED 4e504: 4e75 rts <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e506: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4e50c: 4879 0005 f187 pea 5f187 <__FUNCTION__.6030> <== NOT EXECUTED 4e512: 4878 0131 pea 131 <DBL_MANT_DIG+0xfc> <== NOT EXECUTED 4e516: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e51c: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e522: 4879 0005 f058 pea 5f058 <CSWTCH.8+0x64> <== NOT EXECUTED 4e528: 4879 0005 f187 pea 5f187 <__FUNCTION__.6030> <== NOT EXECUTED 4e52e: 4878 0135 pea 135 <DBL_MANT_DIG+0x100> <== NOT EXECUTED 4e532: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e538: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004deac <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4deac: 4e56 fff0 linkw %fp,#-16 4deb0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4deb4: 246e 0008 moveal %fp@(8),%a2 4deb8: 242e 000c movel %fp@(12),%d2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4debc: 4a8a tstl %a2 4debe: 6700 0180 beqw 4e040 <IMFS_memfile_get_block_pointer+0x194>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
4dec2: 7005 moveq #5,%d0 4dec4: b0aa 0048 cmpl %a2@(72),%d0 4dec8: 6600 0192 bnew 4e05c <IMFS_memfile_get_block_pointer+0x1b0>
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4decc: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1 4ded2: e489 lsrl #2,%d1 4ded4: 2001 movel %d1,%d0 4ded6: 5380 subql #1,%d0 4ded8: b082 cmpl %d2,%d0
4deda: 6448 bccs 4df24 <IMFS_memfile_get_block_pointer+0x78><== ALWAYS TAKEN
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4dedc: 2001 movel %d1,%d0 <== NOT EXECUTED 4dede: 5280 addql #1,%d0 <== NOT EXECUTED 4dee0: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 4dee4: 2040 moveal %d0,%a0 <== NOT EXECUTED 4dee6: 5388 subql #1,%a0 <== NOT EXECUTED 4dee8: b1c2 cmpal %d2,%a0 <== NOT EXECUTED 4deea: 6572 bcss 4df5e <IMFS_memfile_get_block_pointer+0xb2><== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
4deec: 9481 subl %d1,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4deee: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4def2: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4def6: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4defa: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4defe: 6700 00fa beqw 4dffa <IMFS_memfile_get_block_pointer+0x14e><== NOT EXECUTED
if ( !p ) {
4df02: 4a88 tstl %a0 <== NOT EXECUTED 4df04: 6700 00d6 beqw 4dfdc <IMFS_memfile_get_block_pointer+0x130><== NOT EXECUTED
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
4df08: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4df0c: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
4df0e: 4a88 tstl %a0 <== NOT EXECUTED 4df10: 6700 00b2 beqw 4dfc4 <IMFS_memfile_get_block_pointer+0x118><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4df14: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4df18: 2008 movel %a0,%d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4df1a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4df20: 4e5e unlk %fp <== NOT EXECUTED 4df22: 4e75 rts <== NOT EXECUTED
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
4df24: 206a 0054 moveal %a2@(84),%a0
if ( malloc_it ) {
4df28: 4aae 0010 tstl %fp@(16) 4df2c: 6700 00e6 beqw 4e014 <IMFS_memfile_get_block_pointer+0x168>
if ( !p ) {
4df30: 4a88 tstl %a0
4df32: 6710 beqs 4df44 <IMFS_memfile_get_block_pointer+0x98>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4df34: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4df38: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4df3a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4df40: 4e5e unlk %fp 4df42: 4e75 rts
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4df44: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block> 4df4a: 2040 moveal %d0,%a0
if ( !p )
4df4c: 4a80 tstl %d0 4df4e: 6700 00b8 beqw 4e008 <IMFS_memfile_get_block_pointer+0x15c>
return 0;
info->indirect = p;
4df52: 2540 0054 movel %d0,%a2@(84)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4df56: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4df5a: 2008 movel %a0,%d0 4df5c: 60dc bras 4df3a <IMFS_memfile_get_block_pointer+0x8e>
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4df5e: 2600 movel %d0,%d3 <== NOT EXECUTED 4df60: 5283 addql #1,%d3 <== NOT EXECUTED 4df62: 4c01 3800 mulsl %d1,%d3 <== NOT EXECUTED 4df66: 5383 subql #1,%d3 <== NOT EXECUTED 4df68: b682 cmpl %d2,%d3 <== NOT EXECUTED 4df6a: 6500 009c bcsw 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
4df6e: 9480 subl %d0,%d2 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4df70: 4c41 2003 remul %d1,%d3,%d2 <== NOT EXECUTED 4df74: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
4df78: 206a 005c moveal %a2@(92),%a0 <== NOT EXECUTED
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
4df7c: 4c41 2004 remul %d1,%d4,%d2 <== NOT EXECUTED 4df80: 4c41 2002 remul %d1,%d2,%d2 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4df84: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4df88: 6700 0098 beqw 4e022 <IMFS_memfile_get_block_pointer+0x176><== NOT EXECUTED
if ( !p ) {
4df8c: 4a88 tstl %a0 <== NOT EXECUTED 4df8e: 6610 bnes 4dfa0 <IMFS_memfile_get_block_pointer+0xf4><== NOT EXECUTED
p = memfile_alloc_block();
4df90: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block> <== NOT EXECUTED 4df96: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
4df98: 4a80 tstl %d0 <== NOT EXECUTED 4df9a: 676c beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
info->triply_indirect = p;
4df9c: 2540 005c movel %d0,%a2@(92) <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
4dfa0: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4dfa4: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
4dfa6: 4a88 tstl %a0 <== NOT EXECUTED 4dfa8: 660e bnes 4dfb8 <IMFS_memfile_get_block_pointer+0x10c><== NOT EXECUTED
p1 = memfile_alloc_block();
4dfaa: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block> <== NOT EXECUTED 4dfb0: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p1 )
4dfb2: 4a80 tstl %d0 <== NOT EXECUTED 4dfb4: 6752 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
4dfb6: 2480 movel %d0,%a2@ <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
4dfb8: 45f0 4c00 lea %a0@(00000000,%d4:l:4),%a2 <== NOT EXECUTED 4dfbc: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p2 ) {
4dfbe: 4a88 tstl %a0 <== NOT EXECUTED 4dfc0: 6600 ff52 bnew 4df14 <IMFS_memfile_get_block_pointer+0x68><== NOT EXECUTED
p2 = memfile_alloc_block();
4dfc4: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block> <== NOT EXECUTED 4dfca: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p2 )
4dfcc: 4a80 tstl %d0 <== NOT EXECUTED 4dfce: 6738 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
4dfd0: 2480 movel %d0,%a2@ <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4dfd2: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4dfd6: 2008 movel %a0,%d0 <== NOT EXECUTED 4dfd8: 6000 ff40 braw 4df1a <IMFS_memfile_get_block_pointer+0x6e><== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4dfdc: 4eb9 0004 de88 jsr 4de88 <memfile_alloc_block> <== NOT EXECUTED 4dfe2: 2040 moveal %d0,%a0 <== NOT EXECUTED
if ( !p )
4dfe4: 4a80 tstl %d0 <== NOT EXECUTED 4dfe6: 6720 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
info->doubly_indirect = p;
4dfe8: 2540 0058 movel %d0,%a2@(88) <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
4dfec: 45f0 2c00 lea %a0@(00000000,%d2:l:4),%a2 <== NOT EXECUTED 4dff0: 2052 moveal %a2@,%a0 <== NOT EXECUTED
if ( !p1 ) {
4dff2: 4a88 tstl %a0 <== NOT EXECUTED 4dff4: 6600 ff1e bnew 4df14 <IMFS_memfile_get_block_pointer+0x68><== NOT EXECUTED 4dff8: 60ca bras 4dfc4 <IMFS_memfile_get_block_pointer+0x118><== NOT EXECUTED
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4dffa: 4a88 tstl %a0 <== NOT EXECUTED 4dffc: 670a beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
p = (block_p *)p[ doubly ];
4dffe: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p )
4e002: 4a88 tstl %a0 <== NOT EXECUTED 4e004: 6600 ff0e bnew 4df14 <IMFS_memfile_get_block_pointer+0x68><== NOT EXECUTED
p2 = (block_p *)p1[ doubly ];
if ( !p2 )
return 0;
return (block_p *)&p2[ singly ];
4e008: 4280 clrl %d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4e00a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4e010: 4e5e unlk %fp <== NOT EXECUTED 4e012: 4e75 rts <== NOT EXECUTED
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
4e014: 4a88 tstl %a0
4e016: 67f0 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NEVER TAKEN
return 0;
return &info->indirect[ my_block ];
4e018: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 4e01c: 2008 movel %a0,%d0 4e01e: 6000 ff1a braw 4df3a <IMFS_memfile_get_block_pointer+0x8e>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
4e022: 4a88 tstl %a0 <== NOT EXECUTED 4e024: 67e2 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
4e026: 2070 2c00 moveal %a0@(00000000,%d2:l:4),%a0 <== NOT EXECUTED
if ( !p1 )
4e02a: 4a88 tstl %a0 <== NOT EXECUTED 4e02c: 67da beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
4e02e: 2070 4c00 moveal %a0@(00000000,%d4:l:4),%a0 <== NOT EXECUTED
if ( !p2 )
4e032: 4a88 tstl %a0 <== NOT EXECUTED 4e034: 67d2 beqs 4e008 <IMFS_memfile_get_block_pointer+0x15c><== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
4e036: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 <== NOT EXECUTED 4e03a: 2008 movel %a0,%d0 <== NOT EXECUTED 4e03c: 6000 fedc braw 4df1a <IMFS_memfile_get_block_pointer+0x6e><== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e040: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4e046: 4879 0005 f0e2 pea 5f0e2 <__FUNCTION__.6389> <== NOT EXECUTED 4e04c: 4878 0388 pea 388 <DBL_MANT_DIG+0x353> <== NOT EXECUTED 4e050: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e056: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e05c: 4879 0005 f058 pea 5f058 <CSWTCH.8+0x64> <== NOT EXECUTED 4e062: 4879 0005 f0e2 pea 5f0e2 <__FUNCTION__.6389> <== NOT EXECUTED 4e068: 4878 038c pea 38c <DBL_MANT_DIG+0x357> <== NOT EXECUTED 4e06c: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e072: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e9f6 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4e9f6: 4e56 ffc0 linkw %fp,#-64 4e9fa: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4e9fe: 246e 0008 moveal %fp@(8),%a2 4ea02: 2a6e 0014 moveal %fp@(20),%a5 4ea06: 262e 0018 movel %fp@(24),%d3 4ea0a: 282e 000c movel %fp@(12),%d4 4ea0e: 2a2e 0010 movel %fp@(16),%d5
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4ea12: 4a8a tstl %a2 4ea14: 6700 0266 beqw 4ec7c <IMFS_memfile_read+0x286>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
4ea18: 202a 0048 movel %a2@(72),%d0 4ea1c: 2040 moveal %d0,%a0 4ea1e: 5b88 subql #5,%a0 4ea20: 7c01 moveq #1,%d6 4ea22: bc88 cmpl %a0,%d6 4ea24: 6500 023a bcsw 4ec60 <IMFS_memfile_read+0x26a>
/*
* Error checks on arguments
*/
assert( dest );
4ea28: 4a8d tstl %a5 4ea2a: 6700 01fc beqw 4ec28 <IMFS_memfile_read+0x232>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
4ea2e: 4a83 tstl %d3 4ea30: 6700 01c2 beqw 4ebf4 <IMFS_memfile_read+0x1fe>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
4ea34: 7e06 moveq #6,%d7 4ea36: be80 cmpl %d0,%d7 4ea38: 6700 0136 beqw 4eb70 <IMFS_memfile_read+0x17a>
* If the last byte we are supposed to read is past the end of this
* in memory file, then shorten the length to read.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
4ea3c: 2043 moveal %d3,%a0 4ea3e: d1c5 addal %d5,%a0 4ea40: 2408 movel %a0,%d2 4ea42: 4281 clrl %d1 4ea44: 206a 004c moveal %a2@(76),%a0 4ea48: 226a 0050 moveal %a2@(80),%a1 4ea4c: 2c08 movel %a0,%d6 4ea4e: 2e09 movel %a1,%d7 4ea50: 9e82 subl %d2,%d7 4ea52: 9d81 subxl %d1,%d6
4ea54: 6c04 bges 4ea5a <IMFS_memfile_read+0x64> <== NEVER TAKEN
my_length = the_jnode->info.file.size - start;
4ea56: 2609 movel %a1,%d3 4ea58: 9685 subl %d5,%d3
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4ea5a: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4ea60: 2202 movel %d2,%d1 4ea62: 5bc0 smi %d0 4ea64: 49c0 extbl %d0 4ea66: 2640 moveal %d0,%a3 4ea68: 2841 moveal %d1,%a4 4ea6a: 2f0c movel %a4,%sp@- 4ea6c: 2f00 movel %d0,%sp@- 4ea6e: 2f05 movel %d5,%sp@- 4ea70: 2f04 movel %d4,%sp@- 4ea72: 4eb9 0005 c540 jsr 5c540 <__moddi3> 4ea78: 4fef 0010 lea %sp@(16),%sp 4ea7c: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4ea7e: 2f0c movel %a4,%sp@- 4ea80: 2f0b movel %a3,%sp@- 4ea82: 2f05 movel %d5,%sp@- 4ea84: 2f04 movel %d4,%sp@- 4ea86: 4eb9 0005 c188 jsr 5c188 <__divdi3> 4ea8c: 4fef 0010 lea %sp@(16),%sp 4ea90: 2801 movel %d1,%d4
if ( start_offset ) {
4ea92: 4a87 tstl %d7 4ea94: 6700 00d2 beqw 4eb68 <IMFS_memfile_read+0x172>
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 );
4ea98: 42a7 clrl %sp@- 4ea9a: 2f01 movel %d1,%sp@- 4ea9c: 2f0a movel %a2,%sp@- 4ea9e: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer>
assert( block_ptr );
4eaa4: 4fef 000c lea %sp@(12),%sp 4eaa8: 4a80 tstl %d0 4eaaa: 6700 01ec beqw 4ec98 <IMFS_memfile_read+0x2a2>
*/
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;
4eaae: 9487 subl %d7,%d2 4eab0: 2643 moveal %d3,%a3 4eab2: b483 cmpl %d3,%d2 4eab4: 6500 0116 bcsw 4ebcc <IMFS_memfile_read+0x1d6>
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4eab8: 2f0b movel %a3,%sp@- 4eaba: 2040 moveal %d0,%a0 4eabc: de90 addl %a0@,%d7
dest += to_copy;
block++;
4eabe: 5284 addql #1,%d4
my_length -= to_copy;
4eac0: 968b subl %a3,%d3
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4eac2: 2f07 movel %d7,%sp@-
dest += to_copy;
4eac4: 2e0d movel %a5,%d7 4eac6: de8b addl %a3,%d7
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4eac8: 2f0d movel %a5,%sp@- 4eaca: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4ead0: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4ead6: 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 ) {
4eada: b483 cmpl %d3,%d2
4eadc: 623c bhis 4eb1a <IMFS_memfile_read+0x124>
4eade: 49f9 0004 deac lea 4deac <IMFS_memfile_get_block_pointer>,%a4
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4eae4: 4bf9 0005 0dd8 lea 50dd8 <memcpy>,%a5
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4eaea: 42a7 clrl %sp@- 4eaec: 2f04 movel %d4,%sp@- 4eaee: 2f0a movel %a2,%sp@- 4eaf0: 4e94 jsr %a4@
assert( block_ptr );
4eaf2: 4fef 000c lea %sp@(12),%sp 4eaf6: 4a80 tstl %d0 4eaf8: 6700 0112 beqw 4ec0c <IMFS_memfile_read+0x216>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4eafc: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4eafe: 5284 addql #1,%d4
my_length -= to_copy;
4eb00: 9682 subl %d2,%d3
copied += to_copy;
4eb02: d7c2 addal %d2,%a3
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4eb04: 2f02 movel %d2,%sp@- 4eb06: 2f10 movel %a0@,%sp@- 4eb08: 2f07 movel %d7,%sp@-
dest += to_copy;
4eb0a: de82 addl %d2,%d7
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4eb0c: 4e95 jsr %a5@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4eb0e: 4fef 000c lea %sp@(12),%sp 4eb12: b6b9 0006 0ac4 cmpl 60ac4 <imfs_memfile_bytes_per_block>,%d3
4eb18: 64d0 bccs 4eaea <IMFS_memfile_read+0xf4>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
4eb1a: 4a83 tstl %d3
4eb1c: 672a beqs 4eb48 <IMFS_memfile_read+0x152>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4eb1e: 42a7 clrl %sp@- 4eb20: 2f04 movel %d4,%sp@- 4eb22: 2f0a movel %a2,%sp@- 4eb24: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer>
assert( block_ptr );
4eb2a: 4fef 000c lea %sp@(12),%sp 4eb2e: 4a80 tstl %d0 4eb30: 6700 0112 beqw 4ec44 <IMFS_memfile_read+0x24e>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4eb34: 2040 moveal %d0,%a0
copied += my_length;
4eb36: d7c3 addal %d3,%a3
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4eb38: 2f03 movel %d3,%sp@- 4eb3a: 2f10 movel %a0@,%sp@- 4eb3c: 2f07 movel %d7,%sp@- 4eb3e: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
copied += my_length;
4eb44: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4eb48: 42a7 clrl %sp@- 4eb4a: 486e fff8 pea %fp@(-8) 4eb4e: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4eb54: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
4eb5a: 200b movel %a3,%d0 4eb5c: 508f addql #8,%sp
}
4eb5e: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4eb64: 4e5e unlk %fp 4eb66: 4e75 rts
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
4eb68: 2e0d movel %a5,%d7 4eb6a: 97cb subal %a3,%a3 4eb6c: 6000 ff6c braw 4eada <IMFS_memfile_read+0xe4>
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
4eb70: 2843 moveal %d3,%a4 <== NOT EXECUTED 4eb72: 97cb subal %a3,%a3 <== NOT EXECUTED 4eb74: 202a 004c movel %a2@(76),%d0 <== NOT EXECUTED 4eb78: 222a 0050 movel %a2@(80),%d1 <== NOT EXECUTED 4eb7c: 2c0b movel %a3,%d6 <== NOT EXECUTED 4eb7e: 2e0c movel %a4,%d7 <== NOT EXECUTED 4eb80: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4eb84: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED 4eb88: 9285 subl %d5,%d1 <== NOT EXECUTED 4eb8a: 9184 subxl %d4,%d0 <== NOT EXECUTED
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4eb8c: 206a 0054 moveal %a2@(84),%a0 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
4eb90: 9e81 subl %d1,%d7 <== NOT EXECUTED 4eb92: 9d80 subxl %d0,%d6 <== NOT EXECUTED 4eb94: 6f06 bles 4eb9c <IMFS_memfile_read+0x1a6> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
4eb96: 262e ffec movel %fp@(-20),%d3 <== NOT EXECUTED 4eb9a: 9685 subl %d5,%d3 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
4eb9c: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4eb9e: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4eba2: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4eba4: 4eb9 0005 0dd8 jsr 50dd8 <memcpy> <== NOT EXECUTED
IMFS_update_atime( the_jnode );
4ebaa: 42a7 clrl %sp@- <== NOT EXECUTED 4ebac: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4ebb0: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> <== NOT EXECUTED 4ebb6: 256e fff8 003c movel %fp@(-8),%a2@(60) <== NOT EXECUTED
return my_length;
4ebbc: 2003 movel %d3,%d0 <== NOT EXECUTED 4ebbe: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4ebc2: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ebc8: 4e5e unlk %fp <== NOT EXECUTED 4ebca: 4e75 rts <== NOT EXECUTED
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4ebcc: 2642 moveal %d2,%a3
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4ebce: 2040 moveal %d0,%a0
dest += to_copy;
block++;
4ebd0: 5284 addql #1,%d4
my_length -= to_copy;
4ebd2: 968b subl %a3,%d3
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4ebd4: 2f0b movel %a3,%sp@- 4ebd6: de90 addl %a0@,%d7 4ebd8: 2f07 movel %d7,%sp@-
dest += to_copy;
4ebda: 2e0d movel %a5,%d7 4ebdc: de8b addl %a3,%d7
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4ebde: 2f0d movel %a5,%sp@- 4ebe0: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4ebe6: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4ebec: 4fef 000c lea %sp@(12),%sp 4ebf0: 6000 fee8 braw 4eada <IMFS_memfile_read+0xe4>
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
4ebf4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4ebfa: 7e16 moveq #22,%d7 <== NOT EXECUTED 4ebfc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ebfe: 70ff moveq #-1,%d0 <== NOT EXECUTED 4ec00: 2087 movel %d7,%a0@ <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4ec02: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4ec08: 4e5e unlk %fp <== NOT EXECUTED 4ec0a: 4e75 rts <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4ec0c: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4ec12: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4ec18: 4878 02a7 pea 2a7 <DBL_MANT_DIG+0x272> <== NOT EXECUTED 4ec1c: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ec22: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
4ec28: 4879 0005 f0dd pea 5f0dd <CSWTCH.8+0xe9> <== NOT EXECUTED 4ec2e: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4ec34: 4878 025a pea 25a <DBL_MANT_DIG+0x225> <== NOT EXECUTED 4ec38: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ec3e: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4ec44: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4ec4a: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4ec50: 4878 02b9 pea 2b9 <DBL_MANT_DIG+0x284> <== NOT EXECUTED 4ec54: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ec5a: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
4ec60: 4879 0005 f092 pea 5f092 <CSWTCH.8+0x9e> <== NOT EXECUTED 4ec66: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4ec6c: 4878 0251 pea 251 <DBL_MANT_DIG+0x21c> <== NOT EXECUTED 4ec70: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ec76: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4ec7c: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4ec82: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4ec88: 4878 024c pea 24c <DBL_MANT_DIG+0x217> <== NOT EXECUTED 4ec8c: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ec92: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4ec98: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4ec9e: 4879 0005 f114 pea 5f114 <__FUNCTION__.6216> <== NOT EXECUTED 4eca4: 4878 0296 pea 296 <DBL_MANT_DIG+0x261> <== NOT EXECUTED 4eca8: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4ecae: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e12a <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4e12a: 4e56 ffe0 linkw %fp,#-32 4e12e: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4e132: 286e 0008 moveal %fp@(8),%a4
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e136: 4a8c tstl %a4 4e138: 6700 010c beqw 4e246 <IMFS_memfile_remove+0x11c>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e13c: 7005 moveq #5,%d0 4e13e: b0ac 0048 cmpl %a4@(72),%d0 4e142: 6600 011e bnew 4e262 <IMFS_memfile_remove+0x138>
/*
* 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;
4e146: 2839 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d4 4e14c: e48c lsrl #2,%d4
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
4e14e: 4aac 0054 tstl %a4@(84)
4e152: 670e beqs 4e162 <IMFS_memfile_remove+0x38>
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
4e154: 2f04 movel %d4,%sp@- 4e156: 486c 0054 pea %a4@(84) 4e15a: 4eb9 0004 e078 jsr 4e078 <memfile_free_blocks_in_table> 4e160: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4e162: 206c 0058 moveal %a4@(88),%a0 4e166: 4a88 tstl %a0
4e168: 674a beqs 4e1b4 <IMFS_memfile_remove+0x8a> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4e16a: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4e170: 2001 movel %d1,%d0 <== NOT EXECUTED 4e172: 47f9 0004 e078 lea 4e078 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 4e178: e488 lsrl #2,%d0 <== NOT EXECUTED 4e17a: 672e beqs 4e1aa <IMFS_memfile_remove+0x80> <== NOT EXECUTED 4e17c: 4280 clrl %d0 <== NOT EXECUTED 4e17e: 4282 clrl %d2 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
4e180: e588 lsll #2,%d0 <== NOT EXECUTED 4e182: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4e186: 6710 beqs 4e198 <IMFS_memfile_remove+0x6e> <== NOT EXECUTED
memfile_free_blocks_in_table(
4e188: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4e18a: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4e18e: 4e93 jsr %a3@ <== NOT EXECUTED 4e190: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4e196: 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++ ) {
4e198: 5282 addql #1,%d2 <== NOT EXECUTED 4e19a: 2601 movel %d1,%d3 <== NOT EXECUTED 4e19c: 2002 movel %d2,%d0 <== NOT EXECUTED 4e19e: e48b lsrl #2,%d3 <== NOT EXECUTED 4e1a0: b483 cmpl %d3,%d2 <== NOT EXECUTED 4e1a2: 6406 bccs 4e1aa <IMFS_memfile_remove+0x80> <== NOT EXECUTED 4e1a4: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 4e1a8: 60d6 bras 4e180 <IMFS_memfile_remove+0x56> <== 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 );
4e1aa: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4e1ac: 486c 0058 pea %a4@(88) <== NOT EXECUTED 4e1b0: 4e93 jsr %a3@ <== NOT EXECUTED 4e1b2: 508f addql #8,%sp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
4e1b4: 206c 005c moveal %a4@(92),%a0 4e1b8: 4a88 tstl %a0
4e1ba: 677e beqs 4e23a <IMFS_memfile_remove+0x110> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4e1bc: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4e1c2: 2001 movel %d1,%d0 <== NOT EXECUTED 4e1c4: 47f9 0004 e078 lea 4e078 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 4e1ca: e488 lsrl #2,%d0 <== NOT EXECUTED 4e1cc: 6762 beqs 4e230 <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
4e1ce: 2450 moveal %a0@,%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4e1d0: 4a8a tstl %a2 <== NOT EXECUTED 4e1d2: 675c beqs 4e230 <IMFS_memfile_remove+0x106> <== NOT EXECUTED 4e1d4: 4286 clrl %d6 <== NOT EXECUTED 4e1d6: 4285 clrl %d5 <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
4e1d8: 4a80 tstl %d0 <== NOT EXECUTED 4e1da: 6728 beqs 4e204 <IMFS_memfile_remove+0xda> <== NOT EXECUTED 4e1dc: 4280 clrl %d0 <== NOT EXECUTED 4e1de: 4282 clrl %d2 <== NOT EXECUTED
if ( p[j] ) {
4e1e0: e588 lsll #2,%d0 <== NOT EXECUTED 4e1e2: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 4e1e6: 6710 beqs 4e1f8 <IMFS_memfile_remove+0xce> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4e1e8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4e1ea: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 4e1ee: 4e93 jsr %a3@ <== NOT EXECUTED 4e1f0: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4e1f6: 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++ ) {
4e1f8: 5282 addql #1,%d2 <== NOT EXECUTED 4e1fa: 2601 movel %d1,%d3 <== NOT EXECUTED 4e1fc: 2002 movel %d2,%d0 <== NOT EXECUTED 4e1fe: e48b lsrl #2,%d3 <== NOT EXECUTED 4e200: b483 cmpl %d3,%d2 <== NOT EXECUTED 4e202: 65dc bcss 4e1e0 <IMFS_memfile_remove+0xb6> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4e204: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4e206: dcac 005c addl %a4@(92),%d6 <== 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++ ) {
4e20a: 5285 addql #1,%d5 <== 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(
4e20c: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4e20e: 4e93 jsr %a3@ <== 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++ ) {
4e210: 2239 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4e216: 2001 movel %d1,%d0 <== NOT EXECUTED 4e218: 508f addql #8,%sp <== NOT EXECUTED 4e21a: e488 lsrl #2,%d0 <== NOT EXECUTED 4e21c: ba80 cmpl %d0,%d5 <== NOT EXECUTED 4e21e: 6410 bccs 4e230 <IMFS_memfile_remove+0x106> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
4e220: 2c05 movel %d5,%d6 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4e222: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4e226: e58e lsll #2,%d6 <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4e228: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4e22c: 4a8a tstl %a2 <== NOT EXECUTED 4e22e: 66a8 bnes 4e1d8 <IMFS_memfile_remove+0xae> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4e230: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4e232: 486c 005c pea %a4@(92) <== NOT EXECUTED 4e236: 4e93 jsr %a3@ <== NOT EXECUTED 4e238: 508f addql #8,%sp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
4e23a: 4280 clrl %d0 4e23c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 4e242: 4e5e unlk %fp 4e244: 4e75 rts
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e246: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4e24c: 4879 0005 f126 pea 5f126 <__FUNCTION__.6141> <== NOT EXECUTED 4e252: 4878 01ee pea 1ee <DBL_MANT_DIG+0x1b9> <== NOT EXECUTED 4e256: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e25c: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e262: 4879 0005 f058 pea 5f058 <CSWTCH.8+0x64> <== NOT EXECUTED 4e268: 4879 0005 f126 pea 5f126 <__FUNCTION__.6141> <== NOT EXECUTED 4e26e: 4878 01f2 pea 1f2 <DBL_MANT_DIG+0x1bd> <== NOT EXECUTED 4e272: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e278: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e0de <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4e0de: 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 );
4e0e2: 42a7 clrl %sp@- <== NOT EXECUTED 4e0e4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4e0e8: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4e0ec: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
4e0f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4e0f6: 4a80 tstl %d0 <== NOT EXECUTED 4e0f8: 6714 beqs 4e10e <IMFS_memfile_remove_block+0x30> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
4e0fa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e0fc: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
4e0fe: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
4e100: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e102: 4eb9 0004 de6e jsr 4de6e <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
4e108: 7001 moveq #1,%d0 <== NOT EXECUTED 4e10a: 4e5e unlk %fp <== NOT EXECUTED 4e10c: 4e75 rts <== NOT EXECUTED
{
block_p *block_ptr;
block_p ptr;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4e10e: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4e114: 4879 0005 f157 pea 5f157 <__FUNCTION__.6105> <== NOT EXECUTED 4e11a: 4878 0196 pea 196 <DBL_MANT_DIG+0x161> <== NOT EXECUTED 4e11e: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e124: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e664 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4e664: 4e56 ffd0 linkw %fp,#-48 4e668: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4e66c: 246e 0008 moveal %fp@(8),%a2 4e670: 2a6e 0014 moveal %fp@(20),%a5 4e674: 262e 0018 movel %fp@(24),%d3 4e678: 282e 000c movel %fp@(12),%d4 4e67c: 2a2e 0010 movel %fp@(16),%d5
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e680: 4a8a tstl %a2 4e682: 6700 01f8 beqw 4e87c <IMFS_memfile_write+0x218>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e686: 7405 moveq #5,%d2 4e688: b4aa 0048 cmpl %a2@(72),%d2 4e68c: 6600 01d2 bnew 4e860 <IMFS_memfile_write+0x1fc>
/*
* Error check arguments
*/
assert( source );
4e690: 4a8d tstl %a5 4e692: 6700 0204 beqw 4e898 <IMFS_memfile_write+0x234>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
4e696: 4a83 tstl %d3 4e698: 6700 0190 beqw 4e82a <IMFS_memfile_write+0x1c6>
* If the last byte we are supposed to write is past the end of this
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
4e69c: 2043 moveal %d3,%a0 4e69e: d1c5 addal %d5,%a0 4e6a0: 2208 movel %a0,%d1 4e6a2: 4280 clrl %d0 4e6a4: 2c2a 004c movel %a2@(76),%d6 4e6a8: 2e2a 0050 movel %a2@(80),%d7 4e6ac: 9e81 subl %d1,%d7 4e6ae: 9d80 subxl %d0,%d6 4e6b0: 6d00 011e bltw 4e7d0 <IMFS_memfile_write+0x16c>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4e6b4: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4e6ba: 2202 movel %d2,%d1 4e6bc: 5bc0 smi %d0 4e6be: 49c0 extbl %d0 4e6c0: 2640 moveal %d0,%a3 4e6c2: 2841 moveal %d1,%a4 4e6c4: 2f0c movel %a4,%sp@- 4e6c6: 2f00 movel %d0,%sp@- 4e6c8: 2f05 movel %d5,%sp@- 4e6ca: 2f04 movel %d4,%sp@- 4e6cc: 4eb9 0005 c540 jsr 5c540 <__moddi3> 4e6d2: 4fef 0010 lea %sp@(16),%sp 4e6d6: 2e01 movel %d1,%d7
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4e6d8: 2f0c movel %a4,%sp@- 4e6da: 2f0b movel %a3,%sp@- 4e6dc: 2f05 movel %d5,%sp@- 4e6de: 2f04 movel %d4,%sp@- 4e6e0: 4eb9 0005 c188 jsr 5c188 <__divdi3> 4e6e6: 4fef 0010 lea %sp@(16),%sp 4e6ea: 2801 movel %d1,%d4
if ( start_offset ) {
4e6ec: 4a87 tstl %d7 4e6ee: 6700 00d8 beqw 4e7c8 <IMFS_memfile_write+0x164>
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 );
4e6f2: 42a7 clrl %sp@- 4e6f4: 2f01 movel %d1,%sp@- 4e6f6: 2f0a movel %a2,%sp@- 4e6f8: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer>
assert( block_ptr );
4e6fe: 4fef 000c lea %sp@(12),%sp 4e702: 4a80 tstl %d0 4e704: 6700 01ca beqw 4e8d0 <IMFS_memfile_write+0x26c>
*/
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;
4e708: 9487 subl %d7,%d2 4e70a: b682 cmpl %d2,%d3 4e70c: 6500 00f2 bcsw 4e800 <IMFS_memfile_write+0x19c>
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4e710: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4e712: 2040 moveal %d0,%a0 <== NOT EXECUTED
src += to_copy;
4e714: 47f5 2800 lea %a5@(00000000,%d2:l),%a3 <== NOT EXECUTED
block++;
my_length -= to_copy;
4e718: 9682 subl %d2,%d3 <== NOT EXECUTED
copied += to_copy;
4e71a: 2a02 movel %d2,%d5 <== NOT EXECUTED
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4e71c: 5284 addql #1,%d4 <== NOT EXECUTED
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4e71e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4e720: de90 addl %a0@,%d7 <== NOT EXECUTED 4e722: 2f07 movel %d7,%sp@- <== NOT EXECUTED 4e724: 4eb9 0005 0dd8 jsr 50dd8 <memcpy> <== NOT EXECUTED
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4e72a: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2<== NOT EXECUTED 4e730: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4e734: b483 cmpl %d3,%d2
4e736: 623c bhis 4e774 <IMFS_memfile_write+0x110>
4e738: 49f9 0004 deac lea 4deac <IMFS_memfile_get_block_pointer>,%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 );
4e73e: 4bf9 0005 0dd8 lea 50dd8 <memcpy>,%a5
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4e744: 42a7 clrl %sp@- 4e746: 2f04 movel %d4,%sp@- 4e748: 2f0a movel %a2,%sp@- 4e74a: 4e94 jsr %a4@
assert( block_ptr );
4e74c: 4fef 000c lea %sp@(12),%sp 4e750: 4a80 tstl %d0 4e752: 6700 00f0 beqw 4e844 <IMFS_memfile_write+0x1e0>
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 );
4e756: 2f02 movel %d2,%sp@- 4e758: 2040 moveal %d0,%a0
src += to_copy;
block++;
4e75a: 5284 addql #1,%d4
my_length -= to_copy;
4e75c: 9682 subl %d2,%d3
*
* 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(
4e75e: da82 addl %d2,%d5
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 );
4e760: 2f0b movel %a3,%sp@- 4e762: 2f10 movel %a0@,%sp@-
src += to_copy;
4e764: d7c2 addal %d2,%a3
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4e766: 4e95 jsr %a5@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4e768: 4fef 000c lea %sp@(12),%sp 4e76c: b6b9 0006 0ac4 cmpl 60ac4 <imfs_memfile_bytes_per_block>,%d3
4e772: 64d0 bccs 4e744 <IMFS_memfile_write+0xe0> <== NEVER TAKEN
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
4e774: 4a83 tstl %d3
4e776: 672a beqs 4e7a2 <IMFS_memfile_write+0x13e>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4e778: 42a7 clrl %sp@- 4e77a: 2f04 movel %d4,%sp@- 4e77c: 2f0a movel %a2,%sp@- 4e77e: 4eb9 0004 deac jsr 4deac <IMFS_memfile_get_block_pointer>
assert( block_ptr );
4e784: 4fef 000c lea %sp@(12),%sp 4e788: 4a80 tstl %d0 4e78a: 6700 0128 beqw 4e8b4 <IMFS_memfile_write+0x250>
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 );
4e78e: 2f03 movel %d3,%sp@- 4e790: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4e792: da83 addl %d3,%d5
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 );
4e794: 2f0b movel %a3,%sp@- 4e796: 2f10 movel %a0@,%sp@- 4e798: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
my_length = 0;
copied += to_copy;
4e79e: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4e7a2: 42a7 clrl %sp@- 4e7a4: 486e fff8 pea %fp@(-8) 4e7a8: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4e7ae: 202e fff8 movel %fp@(-8),%d0
return copied;
4e7b2: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4e7b4: 2540 0044 movel %d0,%a2@(68) 4e7b8: 2540 0040 movel %d0,%a2@(64)
return copied;
}
4e7bc: 2005 movel %d5,%d0 4e7be: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 4e7c4: 4e5e unlk %fp 4e7c6: 4e75 rts
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
4e7c8: 264d moveal %a5,%a3 4e7ca: 4285 clrl %d5 4e7cc: 6000 ff66 braw 4e734 <IMFS_memfile_write+0xd0>
* in memory file, then extend the length.
*/
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
4e7d0: 2f08 movel %a0,%sp@- 4e7d2: 2f00 movel %d0,%sp@- 4e7d4: 2f0a movel %a2,%sp@- 4e7d6: 4eb9 0004 e3ec jsr 4e3ec <IMFS_memfile_extend>
if ( status )
4e7dc: 4fef 000c lea %sp@(12),%sp 4e7e0: 4a80 tstl %d0 4e7e2: 6700 fed0 beqw 4e6b4 <IMFS_memfile_write+0x50>
rtems_set_errno_and_return_minus_one( ENOSPC );
4e7e6: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4e7ec: 7aff moveq #-1,%d5 <== NOT EXECUTED 4e7ee: 781c moveq #28,%d4 <== NOT EXECUTED 4e7f0: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4e7f2: 2005 movel %d5,%d0 <== NOT EXECUTED
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size ) {
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
4e7f4: 2084 movel %d4,%a0@ <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4e7f6: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e7fc: 4e5e unlk %fp <== NOT EXECUTED 4e7fe: 4e75 rts <== NOT EXECUTED
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4e800: 2403 movel %d3,%d2
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4e802: 2040 moveal %d0,%a0
src += to_copy;
4e804: 47f5 2800 lea %a5@(00000000,%d2:l),%a3
block++;
my_length -= to_copy;
4e808: 9682 subl %d2,%d3
copied += to_copy;
4e80a: 2a02 movel %d2,%d5
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4e80c: 5284 addql #1,%d4
if ( !block_ptr )
return copied;
#if 0
fprintf(stdout, "write %d at %d in %d: %*s\n", to_copy, start_offset, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4e80e: 2f02 movel %d2,%sp@- 4e810: 2f0d movel %a5,%sp@- 4e812: de90 addl %a0@,%d7 4e814: 2f07 movel %d7,%sp@- 4e816: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4e81c: 2439 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%d2 4e822: 4fef 000c lea %sp@(12),%sp 4e826: 6000 ff0c braw 4e734 <IMFS_memfile_write+0xd0>
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
4e82a: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4e830: 7aff moveq #-1,%d5 <== NOT EXECUTED 4e832: 7c16 moveq #22,%d6 <== NOT EXECUTED 4e834: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4e836: 2005 movel %d5,%d0 <== NOT EXECUTED
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
4e838: 2086 movel %d6,%a0@ <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4e83a: 4cee 3cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4e840: 4e5e unlk %fp <== NOT EXECUTED 4e842: 4e75 rts <== NOT EXECUTED
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4e844: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4e84a: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e850: 4878 0330 pea 330 <DBL_MANT_DIG+0x2fb> <== NOT EXECUTED 4e854: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e85a: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
assert( the_jnode );
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
4e860: 4879 0005 f058 pea 5f058 <CSWTCH.8+0x64> <== NOT EXECUTED 4e866: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e86c: 4878 02e7 pea 2e7 <DBL_MANT_DIG+0x2b2> <== NOT EXECUTED 4e870: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e876: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
/*
* Perform internal consistency checks
*/
assert( the_jnode );
4e87c: 4879 0005 f004 pea 5f004 <CSWTCH.8+0x10> <== NOT EXECUTED 4e882: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e888: 4878 02e3 pea 2e3 <DBL_MANT_DIG+0x2ae> <== NOT EXECUTED 4e88c: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e892: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
4e898: 4879 0005 e6eb pea 5e6eb <IMFS_ops+0x2d3> <== NOT EXECUTED 4e89e: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e8a4: 4878 02ef pea 2ef <DBL_MANT_DIG+0x2ba> <== NOT EXECUTED 4e8a8: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e8ae: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4e8b4: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4e8ba: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e8c0: 4878 0346 pea 346 <DBL_MANT_DIG+0x311> <== NOT EXECUTED 4e8c4: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e8ca: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
assert( block_ptr );
4e8d0: 4879 0005 f088 pea 5f088 <CSWTCH.8+0x94> <== NOT EXECUTED 4e8d6: 4879 0005 f101 pea 5f101 <__FUNCTION__.6308> <== NOT EXECUTED 4e8dc: 4878 031c pea 31c <DBL_MANT_DIG+0x2e7> <== NOT EXECUTED 4e8e0: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e8e6: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
000422e8 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
422e8: 4e56 ffb0 linkw %fp,#-80 422ec: 48d7 007c moveml %d2-%d6,%sp@ 422f0: 242e 0008 movel %fp@(8),%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 );
422f4: 260e movel %fp,%d3 422f6: 0683 ffff ffc7 addil #-57,%d3 422fc: 2f02 movel %d2,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
422fe: 282e 000c movel %fp@(12),%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 );
42302: 4eb9 0005 19e4 jsr 519e4 <strlen> 42308: 588f addql #4,%sp 4230a: 486e fffc pea %fp@(-4)
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4230e: 2c2e 0010 movel %fp@(16),%d6
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 );
42312: 2f03 movel %d3,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42314: 2a2e 0014 movel %fp@(20),%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 );
42318: 2f00 movel %d0,%sp@- 4231a: 2f02 movel %d2,%sp@- 4231c: 4eb9 0004 b900 jsr 4b900 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
42322: 4fef 0010 lea %sp@(16),%sp 42326: 2004 movel %d4,%d0 42328: 0280 0000 f000 andil #61440,%d0 4232e: 0c80 0000 4000 cmpil #16384,%d0
42334: 675e beqs 42394 <IMFS_mknod+0xac>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
42336: 0c80 0000 8000 cmpil #32768,%d0
4233c: 6750 beqs 4238e <IMFS_mknod+0xa6>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4233e: 0c80 0000 6000 cmpil #24576,%d0
42344: 673c beqs 42382 <IMFS_mknod+0x9a>
42346: 0c80 0000 2000 cmpil #8192,%d0
4234c: 6734 beqs 42382 <IMFS_mknod+0x9a>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
4234e: 0c80 0000 1000 cmpil #4096,%d0
42354: 6642 bnes 42398 <IMFS_mknod+0xb0> <== NEVER TAKEN
42356: 303c 0007 movew #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(
4235a: 486e ffe8 pea %fp@(-24) 4235e: 2f04 movel %d4,%sp@- 42360: 2f03 movel %d3,%sp@- 42362: 2f00 movel %d0,%sp@- 42364: 2f2e 0018 movel %fp@(24),%sp@- 42368: 4eb9 0004 aae8 jsr 4aae8 <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
4236e: 4fef 0014 lea %sp@(20),%sp 42372: 4a80 tstl %d0
42374: 673a beqs 423b0 <IMFS_mknod+0xc8> <== NEVER TAKEN
42376: 4280 clrl %d0
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
42378: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 4237e: 4e5e unlk %fp 42380: 4e75 rts
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
42382: 2d46 ffe8 movel %d6,%fp@(-24) 42386: 7002 moveq #2,%d0 42388: 2d45 ffec movel %d5,%fp@(-20)
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4238c: 60cc bras 4235a <IMFS_mknod+0x72>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
4238e: 303c 0005 movew #5,%d0 42392: 60c6 bras 4235a <IMFS_mknod+0x72>
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
42394: 7001 moveq #1,%d0 42396: 60c2 bras 4235a <IMFS_mknod+0x72>
42398: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4239e: 7416 moveq #22,%d2 <== NOT EXECUTED 423a0: 2040 moveal %d0,%a0 <== NOT EXECUTED 423a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 423a4: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
423a6: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 423ac: 4e5e unlk %fp <== NOT EXECUTED 423ae: 4e75 rts <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
423b0: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 423b6: 720c moveq #12,%d1 <== NOT EXECUTED 423b8: 2040 moveal %d0,%a0 <== NOT EXECUTED 423ba: 70ff moveq #-1,%d0 <== NOT EXECUTED
return 0;
}
423bc: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
423c2: 2081 movel %d1,%a0@ <== NOT EXECUTED
return 0;
}
423c4: 4e5e unlk %fp <== NOT EXECUTED
000423c8 <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
423c8: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
423ca: 4e56 0000 linkw %fp,#0 423ce: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
423d2: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
423d6: b0a8 0048 cmpl %a0@(72),%d0
423da: 660a bnes 423e6 <IMFS_mount+0x1e> <== NEVER TAKEN
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
423dc: 2149 0058 movel %a1,%a0@(88) 423e0: 4280 clrl %d0
return 0; }
423e2: 4e5e unlk %fp 423e4: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
423e6: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 423ec: 7214 moveq #20,%d1 <== NOT EXECUTED 423ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 423f0: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
423f2: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
423f4: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
0004442a <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
4442a: 4e56 0000 linkw %fp,#0 4442e: 2f0a movel %a2,%sp@- 44430: 246e 0008 moveal %fp@(8),%a2
assert( the_jnode );
44434: 4a8a tstl %a2 44436: 6700 01ee beqw 44626 <IMFS_print_jnode+0x1fc>
fprintf(stdout, "%s", the_jnode->name );
4443a: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 44440: 2f28 0008 movel %a0@(8),%sp@- 44444: 486a 000c pea %a2@(12) 44448: 4eb9 0005 46ec jsr 546ec <fputs>
switch( the_jnode->type ) {
4444e: 202a 0048 movel %a2@(72),%d0 44452: 508f addql #8,%sp 44454: 7207 moveq #7,%d1 44456: b280 cmpl %d0,%d1
44458: 6434 bccs 4448e <IMFS_print_jnode+0x64> <== ALWAYS TAKEN
fprintf(stdout, " FIFO not printed\n" );
assert(0);
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
4445a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4445c: 4879 0006 3b52 pea 63b52 <IntUartPollCallbacks.6645+0xcc> <== NOT EXECUTED 44462: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 <== NOT EXECUTED 44468: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4446c: 4eb9 0005 4580 jsr 54580 <fprintf> <== NOT EXECUTED
assert(0);
44472: 4879 0006 2bd3 pea 62bd3 <rtems_filesystem_mount_table_size+0x1e3><== NOT EXECUTED 44478: 4879 0006 3c42 pea 63c42 <__FUNCTION__.6628> <== NOT EXECUTED 4447e: 4878 006c pea 6c <DBL_MANT_DIG+0x37> <== NOT EXECUTED 44482: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 44488: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
)
{
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
4448e: 323b 0a08 movew %pc@(44498 <IMFS_print_jnode+0x6e>,%d0:l:2),%d1 44492: 48c1 extl %d1 44494: 4efb 1802 jmp %pc@(44498 <IMFS_print_jnode+0x6e>,%d1:l)
44498: ffc2 0177702 <== NOT EXECUTED 4449a: 0162 bchg %d0,%a2@- <== NOT EXECUTED 4449c: 012a 00f0 btst %d0,%a2@(240) <== NOT EXECUTED 444a0: 00b6 0082 004a oril #8519754,%d6 <== NOT EXECUTED 444a6: 0010 020 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
444a8: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 <== NOT EXECUTED 444ae: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444b2: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED 444b6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 444ba: 4879 0006 3b3f pea 63b3f <IntUartPollCallbacks.6645+0xb9> <== NOT EXECUTED 444c0: 4eb9 0005 52b4 jsr 552b4 <fwrite> <== NOT EXECUTED
assert(0);
444c6: 4879 0006 2bd3 pea 62bd3 <rtems_filesystem_mount_table_size+0x1e3><== NOT EXECUTED 444cc: 4879 0006 3c42 pea 63c42 <__FUNCTION__.6628> <== NOT EXECUTED 444d2: 4878 0067 pea 67 <DBL_MANT_DIG+0x32> <== NOT EXECUTED 444d6: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 444dc: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
444e2: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 444e6: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 444ea: 4879 0006 3b10 pea 63b10 <IntUartPollCallbacks.6645+0x8a> <== NOT EXECUTED 444f0: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 <== NOT EXECUTED 444f6: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 444fa: 4eb9 0005 4580 jsr 54580 <fprintf> <== NOT EXECUTED
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
44500: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44504: 203c 0006 42bc movel #410300,%d0 <== NOT EXECUTED
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
4450a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
4450e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
44512: 4e5e unlk %fp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44514: 4ef9 0005 5fe4 jmp 55fe4 <puts> <== NOT EXECUTED
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
4451a: 2f2a 0050 movel %a2@(80),%sp@- 4451e: 4879 0006 3b1f pea 63b1f <IntUartPollCallbacks.6645+0x99> 44524: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 4452a: 2f28 0008 movel %a0@(8),%sp@- 4452e: 4eb9 0005 4580 jsr 54580 <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
44534: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44538: 203c 0006 42bc movel #410300,%d0
);
#else
fprintf(stdout, " (file %" PRId32 ")",
(uint32_t)the_jnode->info.file.size );
#endif
break;
4453e: 4fef 000c lea %sp@(12),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44542: 2d40 0008 movel %d0,%fp@(8)
}
44546: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44548: 4ef9 0005 5fe4 jmp 55fe4 <puts>
fprintf(stdout, " links not printed\n" );
assert(0);
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
4454e: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 <== NOT EXECUTED 44554: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44558: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 4455c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44560: 4879 0006 3b2b pea 63b2b <IntUartPollCallbacks.6645+0xa5> <== NOT EXECUTED 44566: 4eb9 0005 52b4 jsr 552b4 <fwrite> <== NOT EXECUTED
assert(0);
4456c: 4879 0006 2bd3 pea 62bd3 <rtems_filesystem_mount_table_size+0x1e3><== NOT EXECUTED 44572: 4879 0006 3c42 pea 63c42 <__FUNCTION__.6628> <== NOT EXECUTED 44578: 4878 0062 pea 62 <DBL_MANT_DIG+0x2d> <== NOT EXECUTED 4457c: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 44582: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
(uint32_t)the_jnode->info.file.size );
#endif
break;
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
44588: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 <== NOT EXECUTED 4458e: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44592: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 44596: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4459a: 4879 0006 3b2b pea 63b2b <IntUartPollCallbacks.6645+0xa5> <== NOT EXECUTED 445a0: 4eb9 0005 52b4 jsr 552b4 <fwrite> <== NOT EXECUTED
assert(0);
445a6: 4879 0006 2bd3 pea 62bd3 <rtems_filesystem_mount_table_size+0x1e3><== NOT EXECUTED 445ac: 4879 0006 3c42 pea 63c42 <__FUNCTION__.6628> <== NOT EXECUTED 445b2: 4878 005d pea 5d <DBL_MANT_DIG+0x28> <== NOT EXECUTED 445b6: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 445bc: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
445c2: 2f2a 0050 movel %a2@(80),%sp@- 445c6: 2f2a 004c movel %a2@(76),%sp@- 445ca: 4879 0006 3afd pea 63afd <IntUartPollCallbacks.6645+0x77> 445d0: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 445d6: 2f28 0008 movel %a0@(8),%sp@- 445da: 4eb9 0005 4580 jsr 54580 <fprintf>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
445e0: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445e4: 203c 0006 42bc movel #410300,%d0
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
445ea: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445ee: 2d40 0008 movel %d0,%fp@(8)
}
445f2: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
445f4: 4ef9 0005 5fe4 jmp 55fe4 <puts>
assert( the_jnode );
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
445fa: 2079 0006 5738 moveal 65738 <_impure_ptr>,%a0 44600: 2f28 0008 movel %a0@(8),%sp@- 44604: 4878 002f pea 2f <OPER2+0x1b> 44608: 4eb9 0005 45c0 jsr 545c0 <fputc>
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
}
4460e: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44612: 203c 0006 42bc movel #410300,%d0
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
44618: 508f addql #8,%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
4461a: 2d40 0008 movel %d0,%fp@(8)
}
4461e: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
44620: 4ef9 0005 5fe4 jmp 55fe4 <puts>
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
assert( the_jnode );
44626: 4879 0006 3aa6 pea 63aa6 <IntUartPollCallbacks.6645+0x20> <== NOT EXECUTED 4462c: 4879 0006 3c42 pea 63c42 <__FUNCTION__.6628> <== NOT EXECUTED 44632: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> <== NOT EXECUTED 44636: 4879 0006 3ab0 pea 63ab0 <IntUartPollCallbacks.6645+0x2a> <== NOT EXECUTED 4463c: 4eb9 0004 5070 jsr 45070 <__assert_func> <== NOT EXECUTED
0004240c <IMFS_readlink>:
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
4240c: 7004 moveq #4,%d0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4240e: 4e56 fff4 linkw %fp,#-12 42412: 206e 0008 moveal %fp@(8),%a0 42416: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
IMFS_jnode_t *node;
int i;
node = loc->node_access;
4241a: 2450 moveal %a0@,%a2
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4241c: 266e 000c moveal %fp@(12),%a3 42420: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
42424: b0aa 0048 cmpl %a2@(72),%d0
42428: 663c bnes 42466 <IMFS_readlink+0x5a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4242a: 4a82 tstl %d2
4242c: 672c beqs 4245a <IMFS_readlink+0x4e> <== NEVER TAKEN
4242e: 206a 004c moveal %a2@(76),%a0 42432: 1210 moveb %a0@,%d1
42434: 6724 beqs 4245a <IMFS_readlink+0x4e> <== NEVER TAKEN
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
42436: 91c8 subal %a0,%a0 42438: 4280 clrl %d0
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
4243a: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
4243c: 1781 8800 moveb %d1,%a3@(00000000,%a0:l)
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++ )
42440: 2040 moveal %d0,%a0 42442: b082 cmpl %d2,%d0
42444: 640a bccs 42450 <IMFS_readlink+0x44>
42446: 226a 004c moveal %a2@(76),%a1 4244a: 1231 0800 moveb %a1@(00000000,%d0:l),%d1
4244e: 66ea bnes 4243a <IMFS_readlink+0x2e>
buf[i] = node->info.sym_link.name[i];
return i;
}
42450: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 42456: 4e5e unlk %fp 42458: 4e75 rts
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++ )
4245a: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
4245c: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 42462: 4e5e unlk %fp <== NOT EXECUTED 42464: 4e75 rts <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
42466: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4246c: 7216 moveq #22,%d1 <== NOT EXECUTED 4246e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42470: 70ff moveq #-1,%d0 <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
return i;
}
42472: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
42478: 2081 movel %d1,%a0@ <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
return i;
}
4247a: 4e5e unlk %fp <== NOT EXECUTED
...
00042480 <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 */
)
{
42480: 4e56 fff8 linkw %fp,#-8
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42484: 206e 000c moveal %fp@(12),%a0
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
42488: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
4248a: 4878 0020 pea 20 <OPER2+0xc> 4248e: 2f2e 0014 movel %fp@(20),%sp@-
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
42492: 2450 moveal %a0@,%a2
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
42494: 486a 000c pea %a2@(12) 42498: 4eb9 0005 19fc jsr 519fc <strncpy>
if ( the_jnode->Parent != NULL )
4249e: 4fef 000c lea %sp@(12),%sp 424a2: 4aaa 0008 tstl %a2@(8)
424a6: 670a beqs 424b2 <IMFS_rename+0x32> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
424a8: 2f0a movel %a2,%sp@- 424aa: 4eb9 0004 71a8 jsr 471a8 <_Chain_Extract> 424b0: 588f addql #4,%sp
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
424b2: 206e 0010 moveal %fp@(16),%a0 424b6: 2050 moveal %a0@,%a0
the_jnode->Parent = new_parent;
424b8: 2548 0008 movel %a0,%a2@(8)
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
424bc: 2f0a movel %a2,%sp@- 424be: 4868 004c pea %a0@(76) 424c2: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
424c8: 42a7 clrl %sp@- 424ca: 486e fff8 pea %fp@(-8) 424ce: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 424d4: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
}
424da: 4280 clrl %d0 424dc: 246e fff4 moveal %fp@(-12),%a2
424e0: 4e5e unlk %fp <== NOT EXECUTED
0004b9e0 <IMFS_rmnod>:
int IMFS_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4b9e0: 4e56 fff8 linkw %fp,#-8 4b9e4: 2f0b movel %a3,%sp@- 4b9e6: 266e 000c moveal %fp@(12),%a3 4b9ea: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4b9ec: 2453 moveal %a3@,%a2
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
4b9ee: 4aaa 0008 tstl %a2@(8)
4b9f2: 670e beqs 4ba02 <IMFS_rmnod+0x22> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4b9f4: 2f0a movel %a2,%sp@- 4b9f6: 4eb9 0004 71a8 jsr 471a8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
4b9fc: 588f addql #4,%sp 4b9fe: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
4ba02: 302a 0032 movew %a2@(50),%d0 4ba06: 5380 subql #1,%d0 4ba08: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
4ba0c: 42a7 clrl %sp@- 4ba0e: 486e fff8 pea %fp@(-8) 4ba12: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4ba18: 256e fff8 0044 movel %fp@(-8),%a2@(68)
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
4ba1e: 2f0a movel %a2,%sp@- 4ba20: 4eb9 0004 befa jsr 4befa <rtems_libio_is_file_open> 4ba26: 4fef 000c lea %sp@(12),%sp 4ba2a: 4a80 tstl %d0
4ba2c: 6628 bnes 4ba56 <IMFS_rmnod+0x76> <== NEVER TAKEN
4ba2e: 4a6a 0032 tstw %a2@(50)
4ba32: 6622 bnes 4ba56 <IMFS_rmnod+0x76> <== NEVER TAKEN
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
4ba34: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4ba3a: 2653 moveal %a3@,%a3 4ba3c: b7e8 0004 cmpal %a0@(4),%a3
4ba40: 6736 beqs 4ba78 <IMFS_rmnod+0x98> <== NEVER TAKEN
4ba42: 47f9 0004 2ddc lea 42ddc <free>,%a3
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
4ba48: 7004 moveq #4,%d0 4ba4a: b0aa 0048 cmpl %a2@(72),%d0
4ba4e: 6714 beqs 4ba64 <IMFS_rmnod+0x84>
if ( the_jnode->info.sym_link.name )
free( (void*) the_jnode->info.sym_link.name );
}
free( the_jnode );
4ba50: 2f0a movel %a2,%sp@- 4ba52: 4e93 jsr %a3@ 4ba54: 588f addql #4,%sp
}
return 0;
}
4ba56: 246e fff0 moveal %fp@(-16),%a2 4ba5a: 4280 clrl %d0 4ba5c: 266e fff4 moveal %fp@(-12),%a3 4ba60: 4e5e unlk %fp 4ba62: 4e75 rts
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
if ( the_jnode->info.sym_link.name )
4ba64: 202a 004c movel %a2@(76),%d0
4ba68: 67e6 beqs 4ba50 <IMFS_rmnod+0x70> <== NEVER TAKEN
free( (void*) the_jnode->info.sym_link.name );
4ba6a: 2f00 movel %d0,%sp@- 4ba6c: 4e93 jsr %a3@ 4ba6e: 588f addql #4,%sp
}
free( the_jnode );
4ba70: 2f0a movel %a2,%sp@- 4ba72: 4e93 jsr %a3@ 4ba74: 588f addql #4,%sp 4ba76: 60de bras 4ba56 <IMFS_rmnod+0x76>
/*
* Is rtems_filesystem_current this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
4ba78: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED 4ba7c: 47f9 0004 2ddc lea 42ddc <free>,%a3 <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if ( the_jnode->type == IMFS_SYM_LINK ) {
4ba82: 7004 moveq #4,%d0 <== NOT EXECUTED 4ba84: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4ba88: 66c6 bnes 4ba50 <IMFS_rmnod+0x70> <== NOT EXECUTED 4ba8a: 60d8 bras 4ba64 <IMFS_rmnod+0x84> <== NOT EXECUTED
0004ba8c <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4ba8c: 7007 moveq #7,%d0
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4ba8e: 4e56 0000 linkw %fp,#0 4ba92: 206e 000c moveal %fp@(12),%a0 4ba96: 2f0a movel %a2,%sp@- 4ba98: 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;
4ba9c: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4ba9e: b0a9 0048 cmpl %a1@(72),%d0
4baa2: 6418 bccs 4babc <IMFS_stat+0x30> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4baa4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4baaa: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4baae: 2040 moveal %d0,%a0 <== NOT EXECUTED 4bab0: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4bab2: 4e5e unlk %fp <== NOT EXECUTED
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4bab4: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4baba: 4e75 rts <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4babc: 2029 0048 movel %a1@(72),%d0 4bac0: d080 addl %d0,%d0 4bac2: 303b 0808 movew %pc@(4bacc <IMFS_stat+0x40>,%d0:l),%d0 4bac6: 48c0 extl %d0 4bac8: 4efb 0802 jmp %pc@(4bacc <IMFS_stat+0x40>,%d0:l)
4bacc: ffd8 0177730 <== NOT EXECUTED 4bace: ffd8 0177730 <== NOT EXECUTED 4bad0: 00c2 bitrev %d2 <== NOT EXECUTED 4bad2: ffd8 0177730 <== NOT EXECUTED 4bad4: 0010 020 <== NOT EXECUTED 4bad6: 006a 0152 <== NOT EXECUTED 4bad8: 006a 0152 <== NOT EXECUTED 4bada: 0010 020 <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4badc: 246a 0010 moveal %a2@(16),%a2 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
4bae0: 2169 002e 000c movel %a1@(46),%a0@(12) <== NOT EXECUTED
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4bae6: 2169 0034 0008 movel %a1@(52),%a0@(8) <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4baec: 246a 0034 moveal %a2@(52),%a2 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4baf0: 3169 0032 0010 movew %a1@(50),%a0@(16) <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4baf6: 4280 clrl %d0 <== NOT EXECUTED 4baf8: 4281 clrl %d1 <== NOT EXECUTED
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
4bafa: 2169 003c 0026 movel %a1@(60),%a0@(38) <== NOT EXECUTED
buf->st_mtime = the_jnode->stat_mtime;
4bb00: 2169 0040 002e movel %a1@(64),%a0@(46) <== NOT EXECUTED
buf->st_ctime = the_jnode->stat_ctime;
4bb06: 2169 0044 0036 movel %a1@(68),%a0@(54) <== NOT EXECUTED
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4bb0c: 3169 0038 0012 movew %a1@(56),%a0@(18) <== NOT EXECUTED
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4bb12: 2140 001e movel %d0,%a0@(30) <== NOT EXECUTED 4bb16: 2141 0022 movel %d1,%a0@(34) <== NOT EXECUTED
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bb1a: 2212 movel %a2@,%d1 <== NOT EXECUTED
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
4bb1c: 4280 clrl %d0 <== NOT EXECUTED
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4bb1e: 3169 003a 0014 movew %a1@(58),%a0@(20) <== NOT EXECUTED
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4bb24: 2141 0004 movel %d1,%a0@(4) <== NOT EXECUTED 4bb28: 20bc 0000 fffe movel #65534,%a0@ <== NOT EXECUTED
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4bb2e: 246e fffc moveal %fp@(-4),%a2 4bb32: 4e5e unlk %fp 4bb34: 4e75 rts
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bb36: 246a 0010 moveal %a2@(16),%a2
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
4bb3a: 2029 004c movel %a1@(76),%d0 4bb3e: 2229 0050 movel %a1@(80),%d1
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4bb42: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4bb48: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
4bb4e: 2169 003c 0026 movel %a1@(60),%a0@(38)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bb54: 246a 0034 moveal %a2@(52),%a2
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
4bb58: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4bb5e: 2169 0044 0036 movel %a1@(68),%a0@(54)
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
break;
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
4bb64: 2140 001e movel %d0,%a0@(30) 4bb68: 2141 0022 movel %d1,%a0@(34)
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4bb6c: 3169 0032 0010 movew %a1@(50),%a0@(16)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bb72: 2212 movel %a2@,%d1
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
4bb74: 4280 clrl %d0
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4bb76: 3169 0038 0012 movew %a1@(56),%a0@(18)
/* * 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 =
4bb7c: 2141 0004 movel %d1,%a0@(4)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4bb80: 3169 003a 0014 movew %a1@(58),%a0@(20)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4bb86: 20bc 0000 fffe movel #65534,%a0@ 4bb8c: 60a0 bras 4bb2e <IMFS_stat+0xa2>
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4bb8e: 2029 0050 movel %a1@(80),%d0 4bb92: 2169 004c 0016 movel %a1@(76),%a0@(22)
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
4bb98: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
4bb9e: 2169 0034 0008 movel %a1@(52),%a0@(8)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bba4: 246a 0010 moveal %a2@(16),%a2
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
4bba8: 2169 003c 0026 movel %a1@(60),%a0@(38)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bbae: 246a 0034 moveal %a2@(52),%a2
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
4bbb2: 2169 0040 002e movel %a1@(64),%a0@(46)
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
buf->st_dev =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4bbb8: 2212 movel %a2@,%d1
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
4bbba: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
4bbc0: 2169 0044 0036 movel %a1@(68),%a0@(54)
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
4bbc6: 3169 0038 0012 movew %a1@(56),%a0@(18)
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4bbcc: 2140 001a movel %d0,%a0@(26)
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
4bbd0: 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 =
4bbd2: 2141 0004 movel %d1,%a0@(4)
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;
4bbd6: 3169 003a 0014 movew %a1@(58),%a0@(20)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4bbdc: 20bc 0000 fffe movel #65534,%a0@ 4bbe2: 6000 ff4a braw 4bb2e <IMFS_stat+0xa2>
...
000424e4 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
424e4: 4e56 ffc4 linkw %fp,#-60 424e8: 2f03 movel %d3,%sp@-
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
424ea: 260e movel %fp,%d3 424ec: 0683 ffff ffc7 addil #-57,%d3
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
424f2: 2f02 movel %d2,%sp@- 424f4: 242e 0010 movel %fp@(16),%d2
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
424f8: 2f02 movel %d2,%sp@- 424fa: 4eb9 0005 19e4 jsr 519e4 <strlen> 42500: 588f addql #4,%sp 42502: 486e fffc pea %fp@(-4) 42506: 2f03 movel %d3,%sp@- 42508: 2f00 movel %d0,%sp@- 4250a: 2f02 movel %d2,%sp@- 4250c: 4eb9 0004 b900 jsr 4b900 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
42512: 2f2e 000c movel %fp@(12),%sp@- 42516: 4eb9 0005 1554 jsr 51554 <strdup>
if (info.sym_link.name == NULL) {
4251c: 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);
42520: 2d40 ffe8 movel %d0,%fp@(-24)
if (info.sym_link.name == NULL) {
42524: 6730 beqs 42556 <IMFS_symlink+0x72> <== NEVER TAKEN
* 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(
42526: 486e ffe8 pea %fp@(-24) 4252a: 2f3c 0000 a1ff movel #41471,%sp@- 42530: 2f03 movel %d3,%sp@- 42532: 4878 0004 pea 4 <CONTEXT_ARG> 42536: 2f2e 0008 movel %fp@(8),%sp@- 4253a: 4eb9 0004 aae8 jsr 4aae8 <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
42540: 4fef 0014 lea %sp@(20),%sp 42544: 4a80 tstl %d0
42546: 6728 beqs 42570 <IMFS_symlink+0x8c> <== NEVER TAKEN
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
42548: 242e ffbc movel %fp@(-68),%d2
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
4254c: 4280 clrl %d0
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
4254e: 262e ffc0 movel %fp@(-64),%d3 42552: 4e5e unlk %fp 42554: 4e75 rts
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
if (info.sym_link.name == NULL) {
rtems_set_errno_and_return_minus_one(ENOMEM);
42556: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4255c: 740c moveq #12,%d2 <== NOT EXECUTED 4255e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42560: 70ff moveq #-1,%d0 <== NOT EXECUTED 42562: 2082 movel %d2,%a0@ <== NOT EXECUTED
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
42564: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 42568: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 4256c: 4e5e unlk %fp <== NOT EXECUTED 4256e: 4e75 rts <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
42570: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 42574: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
4257a: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
}
return 0;
}
42580: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
42584: 2040 moveal %d0,%a0 <== NOT EXECUTED 42586: 720c moveq #12,%d1 <== NOT EXECUTED 42588: 588f addql #4,%sp <== NOT EXECUTED 4258a: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return 0;
}
4258c: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 42590: 4e5e unlk %fp <== NOT EXECUTED
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
42592: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return 0;
}
...
00042598 <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42598: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
4259a: 4e56 ffd0 linkw %fp,#-48 4259e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 425a2: 246e 000c moveal %fp@(12),%a2 425a6: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
425aa: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
425ac: b0ab 0048 cmpl %a3@(72),%d0
425b0: 671a beqs 425cc <IMFS_unlink+0x34>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
425b2: 2f0a movel %a2,%sp@- 425b4: 206a 0008 moveal %a2@(8),%a0 425b8: 2f02 movel %d2,%sp@- 425ba: 2068 0034 moveal %a0@(52),%a0 425be: 4e90 jsr %a0@
return result;
425c0: 508f addql #8,%sp
}
425c2: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 425c8: 4e5e unlk %fp 425ca: 4e75 rts
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
425cc: 202b 004c movel %a3@(76),%d0 425d0: 6700 0090 beqw 42662 <IMFS_unlink+0xca>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
425d4: 41ea 0004 lea %a2@(4),%a0
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
425d8: 260e movel %fp,%d3 425da: 0683 ffff ffe4 addil #-28,%d3
/*
* 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)
425e0: 7801 moveq #1,%d4
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
425e2: 2d58 ffe8 movel %a0@+,%fp@(-24) 425e6: 2d58 ffec movel %a0@+,%fp@(-20) 425ea: 2d58 fff0 movel %a0@+,%fp@(-16) 425ee: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
425f2: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
425f6: 2f03 movel %d3,%sp@- 425f8: 4eb9 0004 acf0 jsr 4acf0 <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)
425fe: 206b 004c moveal %a3@(76),%a0 42602: 4281 clrl %d1 42604: 588f addql #4,%sp 42606: 3028 0032 movew %a0@(50),%d0 4260a: 3200 movew %d0,%d1 4260c: b881 cmpl %d1,%d4
4260e: 6730 beqs 42640 <IMFS_unlink+0xa8>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
42610: 5380 subql #1,%d0 42612: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
42616: 42a7 clrl %sp@- 42618: 486e fff8 pea %fp@(-8) 4261c: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 42622: 206b 004c moveal %a3@(76),%a0 42626: 508f addql #8,%sp 42628: 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 );
4262e: 2f0a movel %a2,%sp@- 42630: 206a 0008 moveal %a2@(8),%a0 42634: 2f02 movel %d2,%sp@- 42636: 2068 0034 moveal %a0@(52),%a0 4263a: 4e90 jsr %a0@
return result;
4263c: 508f addql #8,%sp 4263e: 6082 bras 425c2 <IMFS_unlink+0x2a>
* to remove the node that is a link and the node itself.
*/
if ( node->info.hard_link.link_node->st_nlink == 1)
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
42640: 2f03 movel %d3,%sp@- 42642: 2f02 movel %d2,%sp@- 42644: 206e ffec moveal %fp@(-20),%a0 42648: 2068 0034 moveal %a0@(52),%a0 4264c: 4e90 jsr %a0@
if ( result != 0 )
4264e: 508f addql #8,%sp 42650: 4a80 tstl %d0 42652: 6700 ff5e beqw 425b2 <IMFS_unlink+0x1a> 42656: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42658: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4265e: 4e5e unlk %fp 42660: 4e75 rts
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
42662: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42668: 7216 moveq #22,%d1 <== NOT EXECUTED 4266a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4266c: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
4266e: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 <== NOT EXECUTED
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
42674: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
42676: 4e5e unlk %fp <== NOT EXECUTED
...
0004267c <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4267c: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
4267e: 4e56 0000 linkw %fp,#0 42682: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
42686: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4268a: b0a8 0048 cmpl %a0@(72),%d0
4268e: 6610 bnes 426a0 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
42690: 4aa8 0058 tstl %a0@(88)
42694: 671c beqs 426b2 <IMFS_unmount+0x36> <== NEVER TAKEN
/*
* 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;
42696: 42a8 0058 clrl %a0@(88) 4269a: 4280 clrl %d0
return 0;
}
4269c: 4e5e unlk %fp 4269e: 4e75 rts
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
426a0: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 426a6: 7214 moveq #20,%d1 <== NOT EXECUTED 426a8: 2040 moveal %d0,%a0 <== NOT EXECUTED 426aa: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
426ac: 4e5e unlk %fp <== NOT EXECUTED
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
426ae: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
426b0: 4e75 rts <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
426b2: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 426b8: 7216 moveq #22,%d1 <== NOT EXECUTED 426ba: 2040 moveal %d0,%a0 <== NOT EXECUTED 426bc: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
426be: 4e5e unlk %fp <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
426c0: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
00043034 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43034: 4e56 0000 linkw %fp,#0
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
43038: 2079 0006 0256 moveal 60256 <rtems_malloc_statistics_helpers>,%a0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
4303e: 2f03 movel %d3,%sp@- 43040: 262e 0008 movel %fp@(8),%d3 43044: 2f02 movel %d2,%sp@- 43046: 242e 000c movel %fp@(12),%d2
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
4304a: 4a88 tstl %a0
4304c: 6704 beqs 43052 <RTEMS_Malloc_Initialize+0x1e> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->initialize)();
4304e: 2050 moveal %a0@,%a0 <== NOT EXECUTED 43050: 4e90 jsr %a0@ <== NOT EXECUTED
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
43052: 4eb9 0004 2fb8 jsr 42fb8 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
43058: 2079 0006 025a moveal 6025a <rtems_malloc_sbrk_helpers>,%a0 4305e: 4a88 tstl %a0
43060: 6712 beqs 43074 <RTEMS_Malloc_Initialize+0x40> <== ALWAYS TAKEN
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
43062: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
43066: d483 addl %d3,%d2 <== NOT EXECUTED
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
43068: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4306a: 2050 moveal %a0@,%a0 <== NOT EXECUTED 4306c: 4e90 jsr %a0@ <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
4306e: 508f addql #8,%sp <== NOT EXECUTED 43070: 9480 subl %d0,%d2 <== NOT EXECUTED 43072: 2600 movel %d0,%d3 <== NOT EXECUTED
* of the time under UNIX because zero'ing memory when it is first
* given to a process eliminates the chance of a process seeing data
* left over from another process. This would be a security violation.
*/
if (
43074: 4a39 0006 0255 tstb 60255 <rtems_unified_work_area>
4307a: 6624 bnes 430a0 <RTEMS_Malloc_Initialize+0x6c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
4307c: 4a39 0005 fc7c tstb 5fc7c <Configuration+0x28>
43082: 6644 bnes 430c8 <RTEMS_Malloc_Initialize+0x94>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
43084: 4878 0004 pea 4 <CONTEXT_ARG> 43088: 2f02 movel %d2,%sp@- 4308a: 2f03 movel %d3,%sp@- 4308c: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 43092: 4eb9 0004 7738 jsr 47738 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
43098: 4fef 0010 lea %sp@(16),%sp 4309c: 4a80 tstl %d0
4309e: 675c beqs 430fc <RTEMS_Malloc_Initialize+0xc8> <== NEVER TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
430a0: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 430a6: 2439 0006 12e4 movel 612e4 <rtems_malloc_statistics>,%d2 430ac: 4eb9 0004 8374 jsr 48374 <_Protected_heap_Get_size>
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
430b2: 262e fffc movel %fp@(-4),%d3
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
430b6: d082 addl %d2,%d0 430b8: 588f addql #4,%sp
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
430ba: 242e fff8 movel %fp@(-8),%d2 430be: 4e5e unlk %fp
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
430c0: 23c0 0006 12e4 movel %d0,612e4 <rtems_malloc_statistics>
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
430c6: 4e75 rts
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
430c8: 2f02 movel %d2,%sp@- 430ca: 42a7 clrl %sp@- 430cc: 2f03 movel %d3,%sp@- 430ce: 4eb9 0005 0e48 jsr 50e48 <memset>
* Unfortunately we cannot use assert if this fails because if this
* has failed we do not have a heap and if we do not have a heap
* STDIO cannot work because there will be no buffers.
*/
if ( !rtems_unified_work_area ) {
430d4: 4fef 000c lea %sp@(12),%sp 430d8: 4a39 0006 0255 tstb 60255 <rtems_unified_work_area>
430de: 66c0 bnes 430a0 <RTEMS_Malloc_Initialize+0x6c> <== NEVER TAKEN
430e0: 4878 0004 pea 4 <CONTEXT_ARG> 430e4: 2f02 movel %d2,%sp@- 430e6: 2f03 movel %d3,%sp@- 430e8: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 430ee: 4eb9 0004 7738 jsr 47738 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
430f4: 4fef 0010 lea %sp@(16),%sp 430f8: 4a80 tstl %d0
430fa: 66a4 bnes 430a0 <RTEMS_Malloc_Initialize+0x6c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
430fc: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED 43100: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
00042102 <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
42102: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42106: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4210a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
4210e: 4a8a tstl %a2 <== NOT EXECUTED 42110: 6700 00c2 beqw 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
return;
if ( !print_handler )
42114: 2879 0006 117c moveal 6117c <print_handler>,%a4 <== NOT EXECUTED 4211a: 4a8c tstl %a4 <== NOT EXECUTED 4211c: 6700 00b6 beqw 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
42120: 70ff moveq #-1,%d0 <== NOT EXECUTED 42122: b08a cmpl %a2,%d0 <== NOT EXECUTED 42124: 6700 00d8 beqw 421fe <Stack_check_Dump_threads_usage+0xfc><== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
42128: 47ea 00be lea %a2@(190),%a3 <== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
4212c: 2413 movel %a3@,%d2 <== NOT EXECUTED 4212e: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
42134: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 42138: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
4213e: 282a 00fe movel %a2@(254),%d4 <== NOT EXECUTED
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
42142: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42144: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42146: 4eb9 0004 20ce jsr 420ce <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4214c: 508f addql #8,%sp <== NOT EXECUTED 4214e: 4a80 tstl %d0 <== NOT EXECUTED 42150: 6700 00e2 beqw 42234 <Stack_check_Dump_threads_usage+0x132><== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
42154: d682 addl %d2,%d3 <== NOT EXECUTED 42156: 9680 subl %d0,%d3 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
42158: 4a8a tstl %a2 <== NOT EXECUTED 4215a: 6700 00e0 beqw 4223c <Stack_check_Dump_threads_usage+0x13a><== NOT EXECUTED
(*print_handler)(
4215e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42162: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 42166: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4216a: 4eb9 0004 692c jsr 4692c <rtems_object_get_name> <== NOT EXECUTED 42170: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42172: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42176: 4879 0005 e940 pea 5e940 <IntUartPollCallbacks.6645+0x20> <== NOT EXECUTED 4217c: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 42182: 4e94 jsr %a4@ <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
42184: 206b 0004 moveal %a3@(4),%a0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
(*print_handler)(
42188: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
4218c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4218e: 2f04 movel %d4,%sp@- <== NOT EXECUTED 42190: 2013 movel %a3@,%d0 <== NOT EXECUTED 42192: 5380 subql #1,%d0 <== NOT EXECUTED 42194: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42198: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4219a: 4879 0005 e95b pea 5e95b <IntUartPollCallbacks.6645+0x3b> <== NOT EXECUTED 421a0: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 421a6: 2079 0006 117c moveal 6117c <print_handler>,%a0 <== NOT EXECUTED 421ac: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
421ae: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 421b2: 4ab9 0006 1174 tstl 61174 <Stack_check_Initialized> <== NOT EXECUTED 421b8: 6724 beqs 421de <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
421ba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 421bc: 4879 0005 e986 pea 5e986 <IntUartPollCallbacks.6645+0x66> <== NOT EXECUTED 421c2: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 421c8: 2079 0006 117c moveal 6117c <print_handler>,%a0 <== NOT EXECUTED 421ce: 4e90 jsr %a0@ <== NOT EXECUTED 421d0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
421d4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421da: 4e5e unlk %fp <== NOT EXECUTED 421dc: 4e75 rts <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
421de: 4879 0005 e979 pea 5e979 <IntUartPollCallbacks.6645+0x59> <== NOT EXECUTED 421e4: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 421ea: 2079 0006 117c moveal 6117c <print_handler>,%a0 <== NOT EXECUTED 421f0: 4e90 jsr %a0@ <== NOT EXECUTED 421f2: 508f addql #8,%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
421f4: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
if (Stack_check_Interrupt_stack.area) {
421fe: 4ab9 0006 1998 tstl 61998 <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED 42204: 67ce beqs 421d4 <Stack_check_Dump_threads_usage+0xd2><== NOT EXECUTED 42206: 47f9 0006 1994 lea 61994 <Stack_check_Interrupt_stack>,%a3 <== NOT EXECUTED 4220c: 4284 clrl %d4 <== NOT EXECUTED 4220e: 95ca subal %a2,%a2 <== NOT EXECUTED
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
42210: 2413 movel %a3@,%d2 <== NOT EXECUTED 42212: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
42218: 262b 0004 movel %a3@(4),%d3 <== NOT EXECUTED 4221c: 0683 0000 0010 addil #16,%d3 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
high_water_mark = Stack_check_find_high_water_mark(low, size);
42222: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42224: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42226: 4eb9 0004 20ce jsr 420ce <Stack_check_find_high_water_mark><== NOT EXECUTED
if ( high_water_mark )
4222c: 508f addql #8,%sp <== NOT EXECUTED 4222e: 4a80 tstl %d0 <== NOT EXECUTED 42230: 6600 ff22 bnew 42154 <Stack_check_Dump_threads_usage+0x52><== NOT EXECUTED 42234: 4283 clrl %d3 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
42236: 4a8a tstl %a2 <== NOT EXECUTED 42238: 6600 ff24 bnew 4215e <Stack_check_Dump_threads_usage+0x5c><== 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 );
4223c: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 42240: 4879 0005 e94d pea 5e94d <IntUartPollCallbacks.6645+0x2d> <== NOT EXECUTED 42246: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 4224c: 4e94 jsr %a4@ <== NOT EXECUTED
}
(*print_handler)(
4224e: 206b 0004 moveal %a3@(4),%a0 <== 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 );
42252: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
(*print_handler)(
42256: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42258: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4225a: 2013 movel %a3@,%d0 <== NOT EXECUTED 4225c: 5380 subql #1,%d0 <== NOT EXECUTED 4225e: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42262: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42264: 4879 0005 e95b pea 5e95b <IntUartPollCallbacks.6645+0x3b> <== NOT EXECUTED 4226a: 2f39 0006 1178 movel 61178 <print_context>,%sp@- <== NOT EXECUTED 42270: 2079 0006 117c moveal 6117c <print_handler>,%a0 <== NOT EXECUTED 42276: 4e90 jsr %a0@ <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
42278: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4227c: 4ab9 0006 1174 tstl 61174 <Stack_check_Initialized> <== NOT EXECUTED 42282: 6600 ff36 bnew 421ba <Stack_check_Dump_threads_usage+0xb8><== NOT EXECUTED 42286: 6000 ff56 braw 421de <Stack_check_Dump_threads_usage+0xdc><== NOT EXECUTED
000424c8 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
424c8: 4e56 0000 linkw %fp,#0
static uint32_t pattern[ 4 ] = {
0xFEEDF00D, 0x0BAD0D06, /* FEED FOOD to BAD DOG */
0xDEADF00D, 0x600D0D06 /* DEAD FOOD but GOOD DOG */
};
if (Stack_check_Initialized)
424cc: 4ab9 0006 1174 tstl 61174 <Stack_check_Initialized>
424d2: 6656 bnes 4252a <Stack_check_Initialize+0x62>
424d4: 41f9 0006 1984 lea 61984 <Stack_check_Pattern>,%a0 424da: 4280 clrl %d0 424dc: 43f9 0005 eabe lea 5eabe <pattern.4584>,%a1
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
p[i] = pattern[ i%4 ];
424e2: 7203 moveq #3,%d1 424e4: c280 andl %d0,%d1
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
424e6: 5280 addql #1,%d0
p[i] = pattern[ i%4 ];
424e8: 20f1 1c00 movel %a1@(00000000,%d1:l:4),%a0@+
/*
* Dope the pattern and fill areas
*/
p = Stack_check_Pattern.pattern;
for ( i = 0; i < PATTERN_SIZE_WORDS; i++ ) {
424ec: 7204 moveq #4,%d1 424ee: b280 cmpl %d0,%d1
424f0: 66f0 bnes 424e2 <Stack_check_Initialize+0x1a>
/*
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
424f2: 2039 0006 1b10 movel 61b10 <_CPU_Interrupt_stack_low>,%d0
424f8: 6728 beqs 42522 <Stack_check_Initialize+0x5a> <== NEVER TAKEN
424fa: 2239 0006 1ab4 movel 61ab4 <_CPU_Interrupt_stack_high>,%d1
42500: 6720 beqs 42522 <Stack_check_Initialize+0x5a> <== NEVER TAKEN
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42502: 9280 subl %d0,%d1
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42504: 2f01 movel %d1,%sp@- 42506: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70>
* If appropriate, setup the interrupt stack for high water testing
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
4250a: 23c0 0006 1998 movel %d0,61998 <Stack_check_Interrupt_stack+0x4>
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42510: 2f00 movel %d0,%sp@-
* also.
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (_CPU_Interrupt_stack_low && _CPU_Interrupt_stack_high) {
Stack_check_Interrupt_stack.area = _CPU_Interrupt_stack_low;
Stack_check_Interrupt_stack.size = (char *) _CPU_Interrupt_stack_high -
42512: 23c1 0006 1994 movel %d1,61994 <Stack_check_Interrupt_stack>
(char *) _CPU_Interrupt_stack_low;
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
42518: 4eb9 0005 1424 jsr 51424 <memset> 4251e: 4fef 000c lea %sp@(12),%sp
}
#endif
Stack_check_Initialized = 1;
42522: 7001 moveq #1,%d0 42524: 23c0 0006 1174 movel %d0,61174 <Stack_check_Initialized>
}
4252a: 4e5e unlk %fp <== NOT EXECUTED
000420ce <Stack_check_find_high_water_mark>:
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
420ce: 70fc moveq #-4,%d0 <== NOT EXECUTED
*/
void *Stack_check_find_high_water_mark(
const void *s,
size_t n
)
{
420d0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
420d4: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 420d8: 41e8 0010 lea %a0@(16),%a0 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
420dc: c0ae 000c andl %fp@(12),%d0 <== NOT EXECUTED 420e0: d088 addl %a0,%d0 <== NOT EXECUTED 420e2: b088 cmpl %a0,%d0 <== NOT EXECUTED 420e4: 6310 blss 420f6 <Stack_check_find_high_water_mark+0x28><== NOT EXECUTED
if (*base != U32_PATTERN)
420e6: 223c a5a5 a5a5 movel #-1515870811,%d1 <== NOT EXECUTED 420ec: b290 cmpl %a0@,%d1 <== NOT EXECUTED 420ee: 660c bnes 420fc <Stack_check_find_high_water_mark+0x2e><== NOT EXECUTED
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
420f0: 5888 addql #4,%a0 <== NOT EXECUTED 420f2: b1c0 cmpal %d0,%a0 <== NOT EXECUTED 420f4: 65f0 bcss 420e6 <Stack_check_find_high_water_mark+0x18><== NOT EXECUTED 420f6: 4280 clrl %d0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
420f8: 4e5e unlk %fp <== NOT EXECUTED 420fa: 4e75 rts <== NOT EXECUTED
*/
base += PATTERN_SIZE_WORDS;
for (ebase = base + length; base < ebase; base++)
if (*base != U32_PATTERN)
return (void *) base;
420fc: 2008 movel %a0,%d0 <== NOT EXECUTED
#endif
return (void *)0;
}
420fe: 4e5e unlk %fp <== NOT EXECUTED
00042304 <Stack_check_report_blown_task>:
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42304: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42308: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
4230c: 4879 0005 e9ed pea 5e9ed <IntUartPollCallbacks.6645+0xcd> <== NOT EXECUTED 42312: 47f9 0004 4198 lea 44198 <printk>,%a3 <== NOT EXECUTED
*
* NOTE: The system is in a questionable state... we may not get
* the following message out.
*/
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42318: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4231c: 242e 000c movel %fp@(12),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
42320: 286a 00c2 moveal %a2@(194),%a4 <== NOT EXECUTED
char name [32];
printk("BLOWN STACK!!!\n");
42324: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
42326: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42328: 4879 0005 e9fd pea 5e9fd <IntUartPollCallbacks.6645+0xdd> <== NOT EXECUTED 4232e: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
42330: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42334: 4879 0005 ea1a pea 5ea1a <IntUartPollCallbacks.6645+0xfa> <== NOT EXECUTED 4233a: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
4233c: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 42340: 4879 0005 ea2c pea 5ea2c <IntUartPollCallbacks.6645+0x10c> <== NOT EXECUTED 42346: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
42348: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 4234c: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 42350: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 42354: 4eb9 0004 692c jsr 4692c <rtems_object_get_name> <== NOT EXECUTED 4235a: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 4235e: 2e80 movel %d0,%sp@ <== NOT EXECUTED 42360: 4879 0005 ea40 pea 5ea40 <IntUartPollCallbacks.6645+0x120> <== NOT EXECUTED 42366: 4e93 jsr %a3@ <== NOT EXECUTED
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
42368: 202a 00be movel %a2@(190),%d0 <== NOT EXECUTED 4236c: 206a 00c2 moveal %a2@(194),%a0 <== NOT EXECUTED 42370: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42374: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42376: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42378: 4879 0005 ea56 pea 5ea56 <IntUartPollCallbacks.6645+0x136> <== NOT EXECUTED 4237e: 4e93 jsr %a3@ <== 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) {
42380: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 42384: 4a02 tstb %d2 <== NOT EXECUTED 42386: 670a beqs 42392 <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
42388: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 4238c: 4eb9 0004 72b4 jsr 472b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
42392: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42396: 486c 0008 pea %a4@(8) <== NOT EXECUTED 4239a: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4239e: 4879 0005 ea87 pea 5ea87 <IntUartPollCallbacks.6645+0x167> <== NOT EXECUTED 423a4: 4e93 jsr %a3@ <== NOT EXECUTED 423a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
423aa: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 423ae: 4eb9 0004 72b4 jsr 472b4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004713c <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
4713c: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47140: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 47146: 5280 addql #1,%d0 47148: 206e 0008 moveal %fp@(8),%a0 4714c: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
47152: 42a7 clrl %sp@- 47154: 2f28 0008 movel %a0@(8),%sp@- 47158: 4868 0010 pea %a0@(16) 4715c: 4eb9 0004 7444 jsr 47444 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47162: 4fef 000c lea %sp@(12),%sp
}
47166: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47168: 4ef9 0004 890c jmp 4890c <_Thread_Enable_dispatch>
...
00046ffc <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
46ffc: 4e56 0000 linkw %fp,#0 47000: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
47002: 2479 0006 15cc moveal 615cc <_API_extensions_List>,%a2 47008: b5fc 0006 15d0 cmpal #398800,%a2
4700e: 6710 beqs 47020 <_API_extensions_Run_postdriver+0x24><== NEVER TAKEN
* Currently all APIs configure this hook so it is always non-NULL.
*/
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
47010: 206a 0008 moveal %a2@(8),%a0 47014: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47016: 2452 moveal %a2@,%a2
void _API_extensions_Run_postdriver( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
47018: b5fc 0006 15d0 cmpal #398800,%a2
4701e: 66f0 bnes 47010 <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
47020: 246e fffc moveal %fp@(-4),%a2
47024: 4e5e unlk %fp <== NOT EXECUTED
00047028 <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
47028: 4e56 0000 linkw %fp,#0 4702c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4702e: 2479 0006 15cc moveal 615cc <_API_extensions_List>,%a2 47034: b5fc 0006 15d0 cmpal #398800,%a2
4703a: 6718 beqs 47054 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
* provide this hook.
*/
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
4703c: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 47042: 206a 000c moveal %a2@(12),%a0 47046: 4e90 jsr %a0@
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
47048: 2452 moveal %a2@,%a2
void _API_extensions_Run_postswitch( void )
{
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
4704a: 588f addql #4,%sp 4704c: b5fc 0006 15d0 cmpal #398800,%a2
47052: 66e8 bnes 4703c <_API_extensions_Run_postswitch+0x14>
#if defined(RTEMS_ITRON_API)
if ( the_extension->postswitch_hook )
#endif
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
47054: 246e fffc moveal %fp@(-4),%a2
47058: 4e5e unlk %fp <== NOT EXECUTED
00049558 <_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 );
49558: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
4955e: 4e56 ffe8 linkw %fp,#-24 49562: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 49566: 246e 0008 moveal %fp@(8),%a2 4956a: 2a2e 000c movel %fp@(12),%d5 4956e: 282e 0014 movel %fp@(20),%d4 49572: 162e 0013 moveb %fp@(19),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
49576: 2679 0006 422a moveal 6422a <_Thread_Executing>,%a3
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
4957c: 40c2 movew %sr,%d2 4957e: 8082 orl %d2,%d0 49580: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
49582: 202a 0044 movel %a2@(68),%d0
49586: 661a bnes 495a2 <_CORE_RWLock_Obtain_for_reading+0x4a>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
the_rwlock->number_of_readers += 1;
49588: 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;
4958c: 7001 moveq #1,%d0 4958e: 2540 0044 movel %d0,%a2@(68)
the_rwlock->number_of_readers += 1; _ISR_Enable( level );
49592: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49594: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49598: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4959e: 4e5e unlk %fp 495a0: 4e75 rts
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
switch ( the_rwlock->current_state ) {
495a2: 7201 moveq #1,%d1 495a4: b280 cmpl %d0,%d1
495a6: 674e beqs 495f6 <_CORE_RWLock_Obtain_for_reading+0x9e>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
495a8: 4a03 tstb %d3
495aa: 6612 bnes 495be <_CORE_RWLock_Obtain_for_reading+0x66>
_ISR_Enable( level );
495ac: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
495ae: 7202 moveq #2,%d1 495b0: 2741 0034 movel %d1,%a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495b4: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495ba: 4e5e unlk %fp 495bc: 4e75 rts 495be: 7001 moveq #1,%d0
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
495c0: 2745 0020 movel %d5,%a3@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
495c4: 42ab 0034 clrl %a3@(52)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
495c8: 274a 0044 movel %a2,%a3@(68)
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
495cc: 42ab 0030 clrl %a3@(48) 495d0: 2540 0030 movel %d0,%a2@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
495d4: 46c2 movew %d2,%sr
_Thread_queue_Enqueue_with_handler(
495d6: 2d44 000c movel %d4,%fp@(12) 495da: 223c 0004 9784 movel #300932,%d1 495e0: 2d4a 0008 movel %a2,%fp@(8)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495e4: 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(
495ea: 2d41 0010 movel %d1,%fp@(16)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495ee: 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(
495f0: 4ef9 0004 b078 jmp 4b078 <_Thread_queue_Enqueue_with_handler>
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 );
495f6: 2f0a movel %a2,%sp@- 495f8: 4eb9 0004 b3e0 jsr 4b3e0 <_Thread_queue_First>
if ( !waiter ) {
495fe: 588f addql #4,%sp 49600: 4a80 tstl %d0
49602: 66a4 bnes 495a8 <_CORE_RWLock_Obtain_for_reading+0x50><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
49604: 52aa 0048 addql #1,%a2@(72)
_ISR_Enable( level );
49608: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4960a: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4960e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
49614: 4e5e unlk %fp <== NOT EXECUTED
00049618 <_CORE_RWLock_Obtain_for_writing>:
* 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 );
49618: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
4961e: 4e56 fff4 linkw %fp,#-12 49622: 206e 0008 moveal %fp@(8),%a0 49626: 48d7 001c moveml %d2-%d4,%sp@ 4962a: 282e 000c movel %fp@(12),%d4 4962e: 242e 0010 movel %fp@(16),%d2 49632: 262e 0014 movel %fp@(20),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
49636: 2279 0006 422a moveal 6422a <_Thread_Executing>,%a1
* 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 );
4963c: 40c1 movew %sr,%d1 4963e: 8081 orl %d1,%d0 49640: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
49642: 4aa8 0044 tstl %a0@(68)
49646: 6614 bnes 4965c <_CORE_RWLock_Obtain_for_writing+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
49648: 7002 moveq #2,%d0 4964a: 2140 0044 movel %d0,%a0@(68)
_ISR_Enable( level );
4964e: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49650: 42a9 0034 clrl %a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49654: 4cd7 001c moveml %sp@,%d2-%d4 49658: 4e5e unlk %fp 4965a: 4e75 rts
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
4965c: 4a02 tstb %d2
4965e: 6610 bnes 49670 <_CORE_RWLock_Obtain_for_writing+0x58>
_ISR_Enable( level );
49660: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49662: 7002 moveq #2,%d0
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49664: 4cd7 001c moveml %sp@,%d2-%d4
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49668: 2340 0034 movel %d0,%a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4966c: 4e5e unlk %fp 4966e: 4e75 rts
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
49670: 7001 moveq #1,%d0
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
executing->Wait.id = id;
49672: 2344 0020 movel %d4,%a1@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49676: 42a9 0034 clrl %a1@(52)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
4967a: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
4967e: 2340 0030 movel %d0,%a1@(48) 49682: 2140 0030 movel %d0,%a0@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
49686: 46c1 movew %d1,%sr
_Thread_queue_Enqueue_with_handler(
49688: 2d43 000c movel %d3,%fp@(12) 4968c: 203c 0004 9784 movel #300932,%d0 49692: 2d48 0008 movel %a0,%fp@(8) 49696: 2d40 0010 movel %d0,%fp@(16)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4969a: 4cd7 001c moveml %sp@,%d2-%d4 4969e: 4e5e unlk %fp
executing->Wait.id = id;
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
_ISR_Enable( level );
_Thread_queue_Enqueue_with_handler(
496a0: 4ef9 0004 b078 jmp 4b078 <_Thread_queue_Enqueue_with_handler>
...
000496a8 <_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 );
496a8: 203c 0000 0700 movel #1792,%d0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496ae: 4e56 fff0 linkw %fp,#-16
ISR_Level level; Thread_Control *executing = _Thread_Executing;
496b2: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496b8: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 496bc: 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 );
496c0: 40c1 movew %sr,%d1 496c2: 8081 orl %d1,%d0 496c4: 46c0 movew %d0,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
496c6: 202a 0044 movel %a2@(68),%d0 496ca: 6700 0090 beqw 4975c <_CORE_RWLock_Release+0xb4>
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
496ce: 7401 moveq #1,%d2 496d0: b480 cmpl %d0,%d2
496d2: 676e beqs 49742 <_CORE_RWLock_Release+0x9a>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
496d4: 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;
496d8: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
496dc: 46c1 movew %d1,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
496de: 2f0a movel %a2,%sp@- 496e0: 4eb9 0004 af18 jsr 4af18 <_Thread_queue_Dequeue>
if ( next ) {
496e6: 588f addql #4,%sp 496e8: 4a80 tstl %d0
496ea: 674a beqs 49736 <_CORE_RWLock_Release+0x8e>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
496ec: 7201 moveq #1,%d1 496ee: 2040 moveal %d0,%a0 496f0: b2a8 0030 cmpl %a0@(48),%d1
496f4: 677c beqs 49772 <_CORE_RWLock_Release+0xca>
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
496f6: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
496f8: 52aa 0048 addql #1,%a2@(72) 496fc: 47f9 0004 b3e0 lea 4b3e0 <_Thread_queue_First>,%a3
next = _Thread_queue_First( &the_rwlock->Wait_queue );
if ( !next ||
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
49702: 49f9 0004 b28c lea 4b28c <_Thread_queue_Extract>,%a4
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
49708: 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 );
4970c: 2f0a movel %a2,%sp@- 4970e: 4e93 jsr %a3@
if ( !next ||
49710: 588f addql #4,%sp 49712: 4a80 tstl %d0
49714: 6720 beqs 49736 <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
49716: 7401 moveq #1,%d2 49718: 2040 moveal %d0,%a0 4971a: b4a8 0030 cmpl %a0@(48),%d2
4971e: 6716 beqs 49736 <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
49720: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
49724: 2f00 movel %d0,%sp@- 49726: 2f0a movel %a2,%sp@- 49728: 4e94 jsr %a4@
}
4972a: 508f addql #8,%sp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
4972c: 2f0a movel %a2,%sp@- 4972e: 4e93 jsr %a3@
if ( !next ||
49730: 588f addql #4,%sp 49732: 4a80 tstl %d0
49734: 66e0 bnes 49716 <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49736: 4280 clrl %d0 49738: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4973e: 4e5e unlk %fp 49740: 4e75 rts
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
return CORE_RWLOCK_SUCCESSFUL;
}
if ( the_rwlock->current_state == CORE_RWLOCK_LOCKED_FOR_READING ) {
the_rwlock->number_of_readers -= 1;
49742: 202a 0048 movel %a2@(72),%d0 49746: 5380 subql #1,%d0 49748: 2540 0048 movel %d0,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
4974c: 6786 beqs 496d4 <_CORE_RWLock_Release+0x2c>
/* must be unlocked again */
_ISR_Enable( level );
4974e: 46c1 movew %d1,%sr
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49750: 4280 clrl %d0 49752: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49758: 4e5e unlk %fp 4975a: 4e75 rts
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
4975c: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
4975e: 103c 0002 moveb #2,%d0
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49762: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49768: 2140 0034 movel %d0,%a0@(52)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
4976c: 4280 clrl %d0 4976e: 4e5e unlk %fp 49770: 4e75 rts
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
if ( next ) {
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
49772: 7002 moveq #2,%d0 49774: 2540 0044 movel %d0,%a2@(68)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49778: 4280 clrl %d0 4977a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
49780: 4e5e unlk %fp <== NOT EXECUTED
00049784 <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
49784: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49788: 486e fffc pea %fp@(-4) 4978c: 2f2e 0008 movel %fp@(8),%sp@- 49790: 4eb9 0004 ab44 jsr 4ab44 <_Thread_Get>
switch ( location ) {
49796: 508f addql #8,%sp 49798: 4aae fffc tstl %fp@(-4)
4979c: 6618 bnes 497b6 <_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 );
4979e: 2f00 movel %d0,%sp@- 497a0: 4eb9 0004 b4e8 jsr 4b4e8 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
497a6: 588f addql #4,%sp 497a8: 2039 0006 4170 movel 64170 <_Thread_Dispatch_disable_level>,%d0 497ae: 5380 subql #1,%d0 497b0: 23c0 0006 4170 movel %d0,64170 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
497b6: 4e5e unlk %fp
...
0004d3e4 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
4d3e4: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d3ea: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
4d3ee: 2279 0006 14e6 moveal 614e6 <_Thread_Executing>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d3f4: 48d7 001c moveml %d2-%d4,%sp@ 4d3f8: 242e 000c movel %fp@(12),%d2 4d3fc: 262e 0014 movel %fp@(20),%d3
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
4d400: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4d404: 206e 0008 moveal %fp@(8),%a0 4d408: 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 );
4d40c: 40c1 movew %sr,%d1 4d40e: 8081 orl %d1,%d0 4d410: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
4d412: 2028 0048 movel %a0@(72),%d0 4d416: 5280 addql #1,%d0 4d418: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
4d41c: 4aa8 0040 tstl %a0@(64)
4d420: 6606 bnes 4d428 <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
4d422: b0a8 0044 cmpl %a0@(68),%d0
4d426: 672e beqs 4d456 <_CORE_barrier_Wait+0x72>
4d428: 7001 moveq #1,%d0
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
4d42a: 2342 0020 movel %d2,%a1@(32)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
4d42e: 2348 0044 movel %a0,%a1@(68) 4d432: 2140 0030 movel %d0,%a0@(48)
executing->Wait.id = id; _ISR_Enable( level );
4d436: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4d438: 2d43 000c movel %d3,%fp@(12) 4d43c: 203c 0004 91c8 movel #299464,%d0 4d442: 2d48 0008 movel %a0,%fp@(8) 4d446: 2d40 0010 movel %d0,%fp@(16)
}
4d44a: 4cd7 001c moveml %sp@,%d2-%d4 4d44e: 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 );
4d450: 4ef9 0004 8e68 jmp 48e68 <_Thread_queue_Enqueue_with_handler>
_ISR_Disable( level );
the_barrier->number_of_waiting_threads++;
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;
4d456: 7001 moveq #1,%d0 4d458: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
4d45c: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4d45e: 2d44 0010 movel %d4,%fp@(16) 4d462: 2d42 000c movel %d2,%fp@(12) 4d466: 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 );
}
4d46a: 4cd7 001c moveml %sp@,%d2-%d4 4d46e: 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 );
4d470: 4ef9 0004 d3a8 jmp 4d3a8 <_CORE_barrier_Release>
...
0005a98c <_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
)
{
5a98c: 4e56 ffe0 linkw %fp,#-32 5a990: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a994: 266e 0008 moveal %fp@(8),%a3 5a998: 282e 000c movel %fp@(12),%d4 5a99c: 242e 0010 movel %fp@(16),%d2 5a9a0: 2a2e 001c movel %fp@(28),%d5
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5a9a4: b4ab 004c cmpl %a3@(76),%d2
5a9a8: 6262 bhis 5aa0c <_CORE_message_queue_Broadcast+0x80><== 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 ) {
5a9aa: 4aab 0048 tstl %a3@(72)
5a9ae: 664c bnes 5a9fc <_CORE_message_queue_Broadcast+0x70>
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9b0: 2f0b movel %a3,%sp@- 5a9b2: 49f9 0005 d164 lea 5d164 <_Thread_queue_Dequeue>,%a4 5a9b8: 4283 clrl %d3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5a9ba: 4bf9 0006 5018 lea 65018 <memcpy>,%a5 5a9c0: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9c2: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9c4: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9c6: 4a80 tstl %d0
5a9c8: 6722 beqs 5a9ec <_CORE_message_queue_Broadcast+0x60>
5a9ca: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
5a9cc: 5283 addql #1,%d3 5a9ce: 2f04 movel %d4,%sp@- 5a9d0: 2f2a 002c movel %a2@(44),%sp@- 5a9d4: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5a9d6: 206a 0028 moveal %a2@(40),%a0 5a9da: 4fef 000c lea %sp@(12),%sp 5a9de: 2082 movel %d2,%a0@
* There must be no pending messages if there is a thread waiting to
* receive a message.
*/
number_broadcasted = 0;
while ((the_thread =
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9e0: 2f0b movel %a3,%sp@- 5a9e2: 4e94 jsr %a4@
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9e4: 588f addql #4,%sp
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
5a9e6: 2440 moveal %d0,%a2
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a9e8: 4a80 tstl %d0
5a9ea: 66de bnes 5a9ca <_CORE_message_queue_Broadcast+0x3e>
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
5a9ec: 2045 moveal %d5,%a0 5a9ee: 4280 clrl %d0 5a9f0: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a9f2: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a9f8: 4e5e unlk %fp 5a9fa: 4e75 rts
* 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;
5a9fc: 2045 moveal %d5,%a0 5a9fe: 4280 clrl %d0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa00: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5
* 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;
5aa06: 4290 clrl %a0@
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa08: 4e5e unlk %fp 5aa0a: 4e75 rts
{
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
5aa0c: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5aa0e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5aa14: 4e5e unlk %fp <== NOT EXECUTED
0004e740 <_CORE_message_queue_Close>:
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4e740: 4e56 0000 linkw %fp,#0 4e744: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e746: 2f2e 0010 movel %fp@(16),%sp@- 4e74a: 2f2e 000c movel %fp@(12),%sp@-
void _CORE_message_queue_Close(
CORE_message_queue_Control *the_message_queue,
Thread_queue_Flush_callout remote_extract_callout,
uint32_t status
)
{
4e74e: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e752: 2f0a movel %a2,%sp@- 4e754: 4eb9 0005 0904 jsr 50904 <_Thread_queue_Flush>
* This removes all messages from the pending message queue. Since
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
4e75a: 4fef 000c lea %sp@(12),%sp 4e75e: 4aaa 0048 tstl %a2@(72)
4e762: 6612 bnes 4e776 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e764: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4e76a: 246e fffc moveal %fp@(-4),%a2 4e76e: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e770: 4ef9 0005 16c0 jmp 516c0 <_Workspace_Free>
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4e776: 2f0a movel %a2,%sp@- 4e778: 4eb9 0004 e794 jsr 4e794 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4e77e: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
* we just flushed all waiting threads, we don't have to worry about
* the flush satisfying any blocked senders as a side-effect.
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
4e784: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4e786: 246e fffc moveal %fp@(-4),%a2 4e78a: 4e5e unlk %fp
*/
if ( the_message_queue->number_of_pending_messages != 0 )
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e78c: 4ef9 0005 16c0 jmp 516c0 <_Workspace_Free>
...
000505cc <_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)) {
505cc: 7203 moveq #3,%d1
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
)
{
505ce: 4e56 fff4 linkw %fp,#-12 505d2: 202e 0014 movel %fp@(20),%d0 505d6: 48d7 040c moveml %d2-%d3/%a2,%sp@ 505da: 246e 0008 moveal %fp@(8),%a2 505de: 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)) {
505e2: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
505e4: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
505e8: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
505ec: 2540 004c movel %d0,%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;
505f0: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
505f4: 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)) {
505f8: 4a81 tstl %d1
505fa: 6620 bnes 5061c <_CORE_message_queue_Initialize+0x50>
505fc: 2200 movel %d0,%d1
/*
* 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));
505fe: 2601 movel %d1,%d3 50600: 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 *
50606: 2003 movel %d3,%d0 50608: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
5060c: b280 cmpl %d0,%d1
5060e: 631c blss 5062c <_CORE_message_queue_Initialize+0x60><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50610: 4200 clrb %d0
}
50612: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 50618: 4e5e unlk %fp 5061a: 4e75 rts
* 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)) {
allocated_message_size += sizeof(uint32_t);
5061c: 2200 movel %d0,%d1 5061e: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
50620: 76fc moveq #-4,%d3 50622: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
50624: b280 cmpl %d0,%d1
50626: 64d6 bccs 505fe <_CORE_message_queue_Initialize+0x32><== ALWAYS TAKEN
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50628: 4200 clrb %d0 <== NOT EXECUTED 5062a: 60e6 bras 50612 <_CORE_message_queue_Initialize+0x46><== NOT EXECUTED
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
5062c: 2f00 movel %d0,%sp@- 5062e: 4eb9 0005 34f8 jsr 534f8 <_Workspace_Allocate>
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
50634: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
50636: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
5063a: 67d4 beqs 50610 <_CORE_message_queue_Initialize+0x44>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
5063c: 2f03 movel %d3,%sp@- 5063e: 2f02 movel %d2,%sp@- 50640: 2f00 movel %d0,%sp@- 50642: 486a 0068 pea %a2@(104) 50646: 4eb9 0005 6aec jsr 56aec <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
5064c: 4878 0006 pea 6 <EXTENDSFDF> 50650: 7001 moveq #1,%d0 50652: 206e 000c moveal %fp@(12),%a0 50656: b090 cmpl %a0@,%d0 50658: 57c0 seq %d0 5065a: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 5065e: 49c0 extbl %d0 50660: 4480 negl %d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
50662: 41ea 0054 lea %a2@(84),%a0 50666: 2f00 movel %d0,%sp@- 50668: 2548 0050 movel %a0,%a2@(80)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
5066c: 41ea 0050 lea %a2@(80),%a0 50670: 2548 0058 movel %a0,%a2@(88) 50674: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
50676: 42aa 0054 clrl %a2@(84) 5067a: 4eb9 0005 2898 jsr 52898 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
50680: 4fef 0020 lea %sp@(32),%sp
}
50684: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
5068a: 7001 moveq #1,%d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5068c: 4e5e unlk %fp <== NOT EXECUTED
00056c40 <_CORE_message_queue_Insert_message>:
void _CORE_message_queue_Insert_message(
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message,
CORE_message_queue_Submit_types submit_type
)
{
56c40: 4e56 0000 linkw %fp,#0 56c44: 226e 000c moveal %fp@(12),%a1 56c48: 2f0b movel %a3,%sp@- 56c4a: 202e 0010 movel %fp@(16),%d0 56c4e: 206e 0008 moveal %fp@(8),%a0 56c52: 2f0a movel %a2,%sp@- 56c54: 2340 0008 movel %d0,%a1@(8)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
56c58: 0c80 7fff ffff cmpil #2147483647,%d0
56c5e: 6760 beqs 56cc0 <_CORE_message_queue_Insert_message+0x80>
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
56c60: 0c80 8000 0000 cmpil #-2147483648,%d0 56c66: 6700 008e beqw 56cf6 <_CORE_message_queue_Insert_message+0xb6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
56c6a: 2208 movel %a0,%d1 56c6c: 0681 0000 0054 addil #84,%d1
Chain_Control *the_header;
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
56c72: 2468 0050 moveal %a0@(80),%a2
while ( !_Chain_Is_tail( the_header, the_node ) ) {
56c76: b28a cmpl %a2,%d1
56c78: 670c beqs 56c86 <_CORE_message_queue_Insert_message+0x46>
this_message = (CORE_message_queue_Buffer_control *) the_node;
this_priority = _CORE_message_queue_Get_message_priority(this_message);
if ( this_priority <= the_priority ) {
56c7a: b0aa 0008 cmpl %a2@(8),%d0
56c7e: 6d06 blts 56c86 <_CORE_message_queue_Insert_message+0x46>
the_node = the_node->next;
56c80: 2452 moveal %a2@,%a2
int the_priority;
the_priority = _CORE_message_queue_Get_message_priority(the_message);
the_header = &the_message_queue->Pending_messages;
the_node = the_header->first;
while ( !_Chain_Is_tail( the_header, the_node ) ) {
56c82: b28a cmpl %a2,%d1
56c84: 66f4 bnes 56c7a <_CORE_message_queue_Insert_message+0x3a>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
56c86: 203c 0000 0700 movel #1792,%d0 56c8c: 40c1 movew %sr,%d1 56c8e: 8081 orl %d1,%d0 56c90: 46c0 movew %d0,%sr
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
56c92: 246a 0004 moveal %a2@(4),%a2
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56c96: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
56c9a: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
56c9c: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
56ca0: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
56ca2: 2749 0004 movel %a1,%a3@(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;
56ca6: 228b movel %a3,%a1@
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
56ca8: 46c1 movew %d1,%sr
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
56caa: 2268 0060 moveal %a0@(96),%a1 56cae: 4a89 tstl %a1
56cb0: 673c beqs 56cee <_CORE_message_queue_Insert_message+0xae>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
56cb2: 2d68 0064 0008 movel %a0@(100),%fp@(8)
#endif }
56cb8: 245f moveal %sp@+,%a2 56cba: 265f moveal %sp@+,%a3 56cbc: 4e5e unlk %fp
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
56cbe: 4ed1 jmp %a1@
else
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
#else
if ( submit_type == CORE_MESSAGE_QUEUE_SEND_REQUEST ) {
_ISR_Disable( level );
56cc0: 203c 0000 0700 movel #1792,%d0 56cc6: 40c1 movew %sr,%d1 56cc8: 8081 orl %d1,%d0 56cca: 46c0 movew %d0,%sr
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
56ccc: 45e8 0054 lea %a0@(84),%a2
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56cd0: 52a8 0048 addql #1,%a0@(72) 56cd4: 228a movel %a2,%a1@
old_last_node = the_chain->last;
56cd6: 2468 0058 moveal %a0@(88),%a2
the_chain->last = the_node;
56cda: 2149 0058 movel %a1,%a0@(88)
old_last_node->next = the_node; the_node->previous = old_last_node;
56cde: 234a 0004 movel %a2,%a1@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
56ce2: 2489 movel %a1,%a2@
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
56ce4: 46c1 movew %d1,%sr
/*
* According to POSIX, does this happen before or after the message
* is actually enqueued. It is logical to think afterwards, because
* the message is actually in the queue at this point.
*/
if ( notify && the_message_queue->notify_handler )
56ce6: 2268 0060 moveal %a0@(96),%a1 56cea: 4a89 tstl %a1
56cec: 66c4 bnes 56cb2 <_CORE_message_queue_Insert_message+0x72><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
56cee: 245f moveal %sp@+,%a2 56cf0: 265f moveal %sp@+,%a3 56cf2: 4e5e unlk %fp 56cf4: 4e75 rts
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
} else if ( submit_type == CORE_MESSAGE_QUEUE_URGENT_REQUEST ) {
_ISR_Disable( level );
56cf6: 203c 0000 0700 movel #1792,%d0 56cfc: 40c1 movew %sr,%d1 56cfe: 8081 orl %d1,%d0 56d00: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
56d02: 45e8 0050 lea %a0@(80),%a2
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
56d06: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
56d0a: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
56d0c: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
56d10: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
56d12: 2749 0004 movel %a1,%a3@(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;
56d16: 228b movel %a3,%a1@
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
56d18: 46c1 movew %d1,%sr 56d1a: 608e bras 56caa <_CORE_message_queue_Insert_message+0x6a>
00050690 <_CORE_message_queue_Seize>:
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
50690: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50696: 4e56 ffe8 linkw %fp,#-24
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
5069a: 2279 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
506a0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 506a4: 282e 000c movel %fp@(12),%d4 506a8: 286e 001c moveal %fp@(28),%a4 506ac: 246e 0008 moveal %fp@(8),%a2
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
506b0: 42a9 0034 clrl %a1@(52)
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
506b4: 262e 0010 movel %fp@(16),%d3 506b8: 206e 0014 moveal %fp@(20),%a0 506bc: 242e 0018 movel %fp@(24),%d2
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
_ISR_Disable( level );
506c0: 40c1 movew %sr,%d1 506c2: 8081 orl %d1,%d0 506c4: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
506c6: 200a movel %a2,%d0 506c8: 0680 0000 0054 addil #84,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
506ce: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
506d2: b08b cmpl %a3,%d0 506d4: 6700 0088 beqw 5075e <_CORE_message_queue_Seize+0xce>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
506d8: 2253 moveal %a3@,%a1
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
506da: 53aa 0048 subql #1,%a2@(72)
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
506de: 49ea 0050 lea %a2@(80),%a4
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
506e2: 2549 0050 movel %a1,%a2@(80)
new_first->previous = _Chain_Head(the_chain);
506e6: 234c 0004 movel %a4,%a1@(4)
_ISR_Enable( level );
506ea: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
506ec: 2279 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a1
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
506f2: 240b movel %a3,%d2 506f4: 0682 0000 0010 addil #16,%d2
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
506fa: 49f9 0005 a3e4 lea 5a3e4 <memcpy>,%a4
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
50700: 20ab 000c movel %a3@(12),%a0@
_Thread_Executing->Wait.count =
50704: 236b 0008 0024 movel %a3@(8),%a1@(36) 5070a: 2f10 movel %a0@,%sp@- 5070c: 2f02 movel %d2,%sp@- 5070e: 2f03 movel %d3,%sp@- 50710: 4e94 jsr %a4@
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
50712: 2f0a movel %a2,%sp@- 50714: 4eb9 0005 24bc jsr 524bc <_Thread_queue_Dequeue>
if ( !the_thread ) {
5071a: 4fef 0010 lea %sp@(16),%sp
* is not, then we can go ahead and free the buffer.
*
* NOTE: If we note that the queue was not full before this receive,
* then we can avoid this dequeue.
*/
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
5071e: 2040 moveal %d0,%a0
if ( !the_thread ) {
50720: 4a80 tstl %d0 50722: 6700 0088 beqw 507ac <_CORE_message_queue_Seize+0x11c>
*/
_CORE_message_queue_Set_message_priority(
the_message,
the_thread->Wait.count
);
the_message->Contents.size = (size_t) the_thread->Wait.option;
50726: 2028 0030 movel %a0@(48),%d0
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
5072a: 2768 0024 0008 movel %a0@(36),%a3@(8) 50730: 2740 000c movel %d0,%a3@(12)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
50734: 2f00 movel %d0,%sp@- 50736: 2f28 002c movel %a0@(44),%sp@- 5073a: 2f02 movel %d2,%sp@- 5073c: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
5073e: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 50744: 4fef 000c lea %sp@(12),%sp 50748: 2d4b 000c movel %a3,%fp@(12) 5074c: 2d4a 0008 movel %a2,%fp@(8)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
50750: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50756: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
50758: 4ef9 0005 6c40 jmp 56c40 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
5075e: 4a02 tstb %d2
50760: 6612 bnes 50774 <_CORE_message_queue_Seize+0xe4>
_ISR_Enable( level );
50762: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
50764: 7004 moveq #4,%d0
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
50766: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
#endif
}
if ( !wait ) {
_ISR_Enable( level );
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
5076c: 2340 0034 movel %d0,%a1@(52)
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
50770: 4e5e unlk %fp 50772: 4e75 rts
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
50774: 7001 moveq #1,%d0 50776: 2540 0030 movel %d0,%a2@(48)
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
5077a: 2348 0028 movel %a0,%a1@(40)
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.mutable_object = buffer;
5077e: 2343 002c movel %d3,%a1@(44)
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
50782: 2344 0020 movel %d4,%a1@(32)
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
return;
}
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
50786: 234a 0044 movel %a2,%a1@(68)
executing->Wait.id = id; executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p; /* Wait.count will be filled in with the message priority */ _ISR_Enable( level );
5078a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5078c: 2d4c 000c movel %a4,%fp@(12) 50790: 49f9 0005 297c lea 5297c <_Thread_queue_Timeout>,%a4 50796: 2d4a 0008 movel %a2,%fp@(8) 5079a: 2d4c 0010 movel %a4,%fp@(16)
}
5079e: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 507a4: 4e5e unlk %fp
executing->Wait.return_argument_second.mutable_object = buffer;
executing->Wait.return_argument = size_p;
/* Wait.count will be filled in with the message priority */
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
507a6: 4ef9 0005 261c jmp 5261c <_Thread_queue_Enqueue_with_handler>
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Free_message_buffer (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Append( &the_message_queue->Inactive_messages, &the_message->Node );
507ac: 45ea 0068 lea %a2@(104),%a2 507b0: 2d4b 000c movel %a3,%fp@(12) 507b4: 2d4a 0008 movel %a2,%fp@(8)
}
507b8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 507be: 4e5e unlk %fp 507c0: 4ef9 0005 0500 jmp 50500 <_Chain_Append>
...
000507c8 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
507c8: 4e56 ffec linkw %fp,#-20 507cc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 507d0: 246e 0008 moveal %fp@(8),%a2 507d4: 242e 0010 movel %fp@(16),%d2 507d8: 282e 001c movel %fp@(28),%d4 507dc: 162e 0023 moveb %fp@(35),%d3
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
507e0: b4aa 004c cmpl %a2@(76),%d2
507e4: 6228 bhis 5080e <_CORE_message_queue_Submit+0x46>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
507e6: 202a 0048 movel %a2@(72),%d0
507ea: 672e beqs 5081a <_CORE_message_queue_Submit+0x52>
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
the_message_queue->maximum_pending_messages ) {
507ec: b0aa 0044 cmpl %a2@(68),%d0 507f0: 6500 00ba bcsw 508ac <_CORE_message_queue_Submit+0xe4>
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
507f4: 4a03 tstb %d3 507f6: 6700 00f4 beqw 508ec <_CORE_message_queue_Submit+0x124>
/*
* Do NOT block on a send if the caller is in an ISR. It is
* deadly to block in an ISR.
*/
if ( _ISR_Is_in_progress() ) {
507fa: 2039 0006 b4ae movel 6b4ae <_ISR_Nest_level>,%d0
50800: 6754 beqs 50856 <_CORE_message_queue_Submit+0x8e>
50802: 7003 moveq #3,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50804: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5080a: 4e5e unlk %fp 5080c: 4e75 rts
)
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
5080e: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50810: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50816: 4e5e unlk %fp 50818: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
5081a: 2f0a movel %a2,%sp@- 5081c: 4eb9 0005 24bc jsr 524bc <_Thread_queue_Dequeue>
if ( the_thread ) {
50822: 588f addql #4,%sp
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
50824: 2640 moveal %d0,%a3
if ( the_thread ) {
50826: 4a80 tstl %d0 50828: 6700 00ce beqw 508f8 <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5082c: 2f02 movel %d2,%sp@- 5082e: 2f2e 000c movel %fp@(12),%sp@- 50832: 2f2b 002c movel %a3@(44),%sp@- 50836: 4eb9 0005 a3e4 jsr 5a3e4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5083c: 206b 0028 moveal %a3@(40),%a0
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50840: 4fef 000c lea %sp@(12),%sp
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
the_thread->Wait.count = (uint32_t) submit_type;
50844: 4280 clrl %d0
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
50846: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
50848: 2744 0024 movel %d4,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5084c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50852: 4e5e unlk %fp 50854: 4e75 rts
* Thus the unusual choice to open a new scope and declare
* it as a variable. Doing this emphasizes how dangerous it
* would be to use this variable prior to here.
*/
{
Thread_Control *executing = _Thread_Executing;
50856: 2079 0006 b4ce moveal 6b4ce <_Thread_Executing>,%a0
ISR_Level level;
_ISR_Disable( level );
5085c: 203c 0000 0700 movel #1792,%d0 50862: 40c1 movew %sr,%d1 50864: 8081 orl %d1,%d0 50866: 46c0 movew %d0,%sr 50868: 7001 moveq #1,%d0
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
5086a: 216e 0014 0020 movel %fp@(20),%a0@(32) 50870: 2540 0030 movel %d0,%a2@(48)
executing->Wait.return_argument_second.immutable_object = buffer;
50874: 202e 000c movel %fp@(12),%d0
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
50878: 2144 0024 movel %d4,%a0@(36)
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
5087c: 2140 002c movel %d0,%a0@(44)
executing->Wait.option = (uint32_t) size;
50880: 2142 0030 movel %d2,%a0@(48)
Thread_Control *executing = _Thread_Executing;
ISR_Level level;
_ISR_Disable( level );
_Thread_queue_Enter_critical_section( &the_message_queue->Wait_queue );
executing->Wait.queue = &the_message_queue->Wait_queue;
50884: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
50888: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
5088a: 4879 0005 297c pea 5297c <_Thread_queue_Timeout> 50890: 2f2e 0024 movel %fp@(36),%sp@- 50894: 2f0a movel %a2,%sp@- 50896: 4eb9 0005 261c jsr 5261c <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
5089c: 4fef 000c lea %sp@(12),%sp
executing->Wait.return_argument_second.immutable_object = buffer;
executing->Wait.option = (uint32_t) size;
executing->Wait.count = submit_type;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
508a0: 7007 moveq #7,%d0
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508a2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508a8: 4e5e unlk %fp 508aa: 4e75 rts
RTEMS_INLINE_ROUTINE CORE_message_queue_Buffer_control *
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
508ac: 486a 0068 pea %a2@(104) 508b0: 4eb9 0005 0560 jsr 50560 <_Chain_Get> 508b6: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
508b8: 2f02 movel %d2,%sp@- 508ba: 2f2e 000c movel %fp@(12),%sp@- 508be: 486b 0010 pea %a3@(16) 508c2: 4eb9 0005 a3e4 jsr 5a3e4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
508c8: 2742 000c movel %d2,%a3@(12)
CORE_message_queue_Buffer_control *the_message,
int priority
)
{
#if defined(RTEMS_SCORE_COREMSG_ENABLE_MESSAGE_PRIORITY)
the_message->priority = priority;
508cc: 2744 0008 movel %d4,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
508d0: 2f04 movel %d4,%sp@- 508d2: 2f0b movel %a3,%sp@- 508d4: 2f0a movel %a2,%sp@- 508d6: 4eb9 0005 6c40 jsr 56c40 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
508dc: 4fef 001c lea %sp@(28),%sp
size
);
the_message->Contents.size = size;
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
508e0: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508e2: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508e8: 4e5e unlk %fp 508ea: 4e75 rts
/*
* No message buffers were available so we may need to return an
* overflow error or block the sender until the message is placed
* on the queue.
*/
if ( !wait ) {
508ec: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
508ee: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 508f4: 4e5e unlk %fp 508f6: 4e75 rts
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
the_thread = _Thread_queue_Dequeue( &the_message_queue->Wait_queue );
if ( the_thread ) {
508f8: 202a 0048 movel %a2@(72),%d0
/*
* No one waiting on the message queue at this time, so attempt to
* queue the message up for a future receive.
*/
if ( the_message_queue->number_of_pending_messages <
the_message_queue->maximum_pending_messages ) {
508fc: b0aa 0044 cmpl %a2@(68),%d0 50900: 6400 fef2 bccw 507f4 <_CORE_message_queue_Submit+0x2c> 50904: 60a6 bras 508ac <_CORE_message_queue_Submit+0xe4>
...
00047394 <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
47394: 4e56 0000 linkw %fp,#0 47398: 202e 0010 movel %fp@(16),%d0 4739c: 2f0a movel %a2,%sp@- 4739e: 246e 0008 moveal %fp@(8),%a2 473a2: 2f02 movel %d2,%sp@-
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473a4: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
473aa: 1400 moveb %d0,%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473ac: 4a81 tstl %d1
473ae: 6704 beqs 473b4 <_CORE_mutex_Seize+0x20>
473b0: 4a00 tstb %d0
473b2: 6634 bnes 473e8 <_CORE_mutex_Seize+0x54> <== ALWAYS TAKEN
473b4: 486e 0018 pea %fp@(24) 473b8: 2f0a movel %a2,%sp@- 473ba: 4eb9 0004 d478 jsr 4d478 <_CORE_mutex_Seize_interrupt_trylock> 473c0: 508f addql #8,%sp 473c2: 4a80 tstl %d0
473c4: 6716 beqs 473dc <_CORE_mutex_Seize+0x48>
473c6: 4a02 tstb %d2
473c8: 6636 bnes 47400 <_CORE_mutex_Seize+0x6c>
473ca: 202e 0018 movel %fp@(24),%d0 473ce: 46c0 movew %d0,%sr 473d0: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 473d6: 7001 moveq #1,%d0 473d8: 2140 0034 movel %d0,%a0@(52)
}
473dc: 242e fff8 movel %fp@(-8),%d2 473e0: 246e fffc moveal %fp@(-4),%a2 473e4: 4e5e unlk %fp 473e6: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
473e8: 7001 moveq #1,%d0 473ea: b0b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d0
473f0: 64c2 bccs 473b4 <_CORE_mutex_Seize+0x20>
473f2: 4878 0013 pea 13 <INVALID_OPERATION+0x3> 473f6: 42a7 clrl %sp@- 473f8: 42a7 clrl %sp@- 473fa: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> 47400: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 47406: 5280 addql #1,%d0 47408: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 4740e: 216e 000c 0020 movel %fp@(12),%a0@(32) 47414: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4741a: 7001 moveq #1,%d0 4741c: 214a 0044 movel %a2,%a0@(68) 47420: 2540 0030 movel %d0,%a2@(48) 47424: 202e 0018 movel %fp@(24),%d0 47428: 46c0 movew %d0,%sr 4742a: 2f2e 0014 movel %fp@(20),%sp@- 4742e: 2f0a movel %a2,%sp@- 47430: 4eb9 0004 7308 jsr 47308 <_CORE_mutex_Seize_interrupt_blocking>
}
47436: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4743a: 508f addql #8,%sp
}
4743c: 246e fffc moveal %fp@(-4),%a2
47440: 4e5e unlk %fp <== NOT EXECUTED
000475a8 <_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
)
{
475a8: 4e56 0000 linkw %fp,#0 475ac: 2f0a movel %a2,%sp@- 475ae: 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)) ) {
475b2: 2f0a movel %a2,%sp@- 475b4: 4eb9 0004 8d08 jsr 48d08 <_Thread_queue_Dequeue> 475ba: 588f addql #4,%sp 475bc: 4a80 tstl %d0
475be: 670a beqs 475ca <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c0: 246e fffc moveal %fp@(-4),%a2
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( (the_thread = _Thread_queue_Dequeue(&the_semaphore->Wait_queue)) ) {
475c4: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
475c6: 4e5e unlk %fp 475c8: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
475ca: 203c 0000 0700 movel #1792,%d0 475d0: 40c1 movew %sr,%d1 475d2: 8081 orl %d1,%d0 475d4: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475d6: 202a 0048 movel %a2@(72),%d0 475da: b0aa 0040 cmpl %a2@(64),%d0
475de: 6412 bccs 475f2 <_CORE_semaphore_Surrender+0x4a> <== NEVER TAKEN
the_semaphore->count += 1;
475e0: 5280 addql #1,%d0 475e2: 2540 0048 movel %d0,%a2@(72) 475e6: 4280 clrl %d0
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475e8: 46c1 movew %d1,%sr
}
return status;
}
475ea: 246e fffc moveal %fp@(-4),%a2 475ee: 4e5e unlk %fp 475f0: 4e75 rts
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
475f2: 7004 moveq #4,%d0 <== NOT EXECUTED
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
475f4: 46c1 movew %d1,%sr <== NOT EXECUTED 475f6: 60f2 bras 475ea <_CORE_semaphore_Surrender+0x42> <== NOT EXECUTED
0004d324 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4d324: 4e56 0000 linkw %fp,#0 4d328: 202e 0010 movel %fp@(16),%d0 4d32c: 2f0a movel %a2,%sp@- 4d32e: 246e 0008 moveal %fp@(8),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4d332: 224a moveal %a2,%a1 4d334: 2f02 movel %d2,%sp@- 4d336: 242e 0014 movel %fp@(20),%d2
Chain_Node *current;
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
4d33a: 42aa 0004 clrl %a2@(4)
next = starting_address;
while ( count-- ) {
4d33e: 4a80 tstl %d0
4d340: 6718 beqs 4d35a <_Chain_Initialize+0x36> <== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
4d342: 206e 000c moveal %fp@(12),%a0
while ( count-- ) {
current->next = next;
next->previous = current;
4d346: 2149 0004 movel %a1,%a0@(4) 4d34a: 2208 movel %a0,%d1 4d34c: d282 addl %d2,%d1
current = next;
next = (Chain_Node *)
4d34e: 5380 subql #1,%d0
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
current->next = next;
4d350: 2288 movel %a0,%a1@
next->previous = current;
current = next;
next = (Chain_Node *)
4d352: 2248 moveal %a0,%a1
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4d354: 2041 moveal %d1,%a0 4d356: 4a80 tstl %d0
4d358: 66ec bnes 4d346 <_Chain_Initialize+0x22>
next->previous = current;
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
4d35a: 200a movel %a2,%d0 4d35c: 5880 addql #4,%d0 4d35e: 2280 movel %d0,%a1@
the_chain->last = current; }
4d360: 241f movel %sp@+,%d2
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
4d362: 2549 0008 movel %a1,%a2@(8)
}
4d366: 245f moveal %sp@+,%a2
4d368: 4e5e unlk %fp <== NOT EXECUTED
000460a8 <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
460a8: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460ae: 4e56 ffec linkw %fp,#-20 460b2: 222e 0008 movel %fp@(8),%d1 460b6: 48d7 043c moveml %d2-%d5/%a2,%sp@
rtems_event_set pending_events;
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
460ba: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460c0: 242e 000c movel %fp@(12),%d2 460c4: 2a2e 0010 movel %fp@(16),%d5
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
460c8: 42aa 0034 clrl %a2@(52)
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
460cc: 226e 0014 moveal %fp@(20),%a1
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
460d0: 206a 010a moveal %a2@(266),%a0
_ISR_Disable( level );
460d4: 40c4 movew %sr,%d4 460d6: 8084 orl %d4,%d0 460d8: 46c0 movew %d0,%sr
pending_events = api->pending_events;
460da: 2610 movel %a0@,%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 );
460dc: 2001 movel %d1,%d0 460de: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
460e0: 670c beqs 460ee <_Event_Seize+0x46>
460e2: b081 cmpl %d1,%d0 460e4: 6700 0084 beqw 4616a <_Event_Seize+0xc2> 460e8: 0802 0001 btst #1,%d2
460ec: 667c bnes 4616a <_Event_Seize+0xc2> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
460ee: 0802 0000 btst #0,%d2
460f2: 6662 bnes 46156 <_Event_Seize+0xae> * 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;
460f4: 2542 0030 movel %d2,%a2@(48)
executing->Wait.count = (uint32_t) event_in;
executing->Wait.return_argument = event_out;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
460f8: 7401 moveq #1,%d2
* * 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;
460fa: 2541 0024 movel %d1,%a2@(36)
executing->Wait.return_argument = event_out;
460fe: 2549 0028 movel %a1,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
46102: 23c2 0006 1ca8 movel %d2,61ca8 <_Event_Sync_state>
_ISR_Enable( level );
46108: 46c4 movew %d4,%sr
if ( ticks ) {
4610a: 4a85 tstl %d5
4610c: 6672 bnes 46180 <_Event_Seize+0xd8>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4610e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 46112: 2f0a movel %a2,%sp@- 46114: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
_ISR_Disable( level );
4611a: 203c 0000 0700 movel #1792,%d0 46120: 40c1 movew %sr,%d1 46122: 8081 orl %d1,%d0 46124: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46126: 7401 moveq #1,%d2 46128: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
4612a: 2039 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
46130: 42b9 0006 1ca8 clrl 61ca8 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46136: b480 cmpl %d0,%d2 46138: 6700 00a4 beqw 461de <_Event_Seize+0x136>
* 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 );
4613c: 2d4a 000c movel %a2,%fp@(12) 46140: 2d41 0010 movel %d1,%fp@(16)
}
46144: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
* 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 );
4614a: 2d40 0008 movel %d0,%fp@(8)
}
4614e: 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 );
46150: 4ef9 0004 8384 jmp 48384 <_Thread_blocking_operation_Cancel>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
46156: 46c4 movew %d4,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
46158: 720d moveq #13,%d1 4615a: 2541 0034 movel %d1,%a2@(52)
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
4615e: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
executing->Wait.return_code = RTEMS_UNSATISFIED;
*event_out = seized_events;
46164: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46166: 4e5e unlk %fp 46168: 4e75 rts
pending_events = api->pending_events;
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
4616a: 2200 movel %d0,%d1 4616c: 4681 notl %d1 4616e: c283 andl %d3,%d1 46170: 2081 movel %d1,%a0@
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
46172: 46c4 movew %d4,%sr
*event_out = seized_events;
46174: 2280 movel %d0,%a1@
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
46176: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4617c: 4e5e unlk %fp 4617e: 4e75 rts
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
46180: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46184: 223c 0004 6374 movel #287604,%d1
the_watchdog->id = id;
4618a: 2540 0068 movel %d0,%a2@(104)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4618e: 2541 0064 movel %d1,%a2@(100)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46192: 2545 0054 movel %d5,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46196: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
4619a: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4619e: 486a 0048 pea %a2@(72) 461a2: 4879 0006 1504 pea 61504 <_Watchdog_Ticks_chain> 461a8: 4eb9 0004 9aac jsr 49aac <_Watchdog_Insert> 461ae: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
461b0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 461b4: 2f0a movel %a2,%sp@- 461b6: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
_ISR_Disable( level );
461bc: 203c 0000 0700 movel #1792,%d0 461c2: 40c1 movew %sr,%d1 461c4: 8081 orl %d1,%d0 461c6: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461c8: 7401 moveq #1,%d2 461ca: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
461cc: 2039 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
461d2: 42b9 0006 1ca8 clrl 61ca8 <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
461d8: b480 cmpl %d0,%d2 461da: 6600 ff60 bnew 4613c <_Event_Seize+0x94>
_ISR_Enable( level );
461de: 46c1 movew %d1,%sr
* The blocking thread was satisfied by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ _Thread_blocking_operation_Cancel( sync_state, executing, level ); }
461e0: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 461e6: 4e5e unlk %fp
...
00046248 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
46248: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4624e: 4e56 ffec linkw %fp,#-20 46252: 48d7 043c moveml %d2-%d5/%a2,%sp@ 46256: 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 ];
4625a: 206a 010a moveal %a2@(266),%a0
option_set = (rtems_option) the_thread->Wait.option;
4625e: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
46262: 40c3 movew %sr,%d3 46264: 8083 orl %d3,%d0 46266: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
46268: 222a 0024 movel %a2@(36),%d1
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 );
4626c: 2001 movel %d1,%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;
4626e: 2410 movel %a0@,%d2 46270: 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 ) ) {
46272: 6778 beqs 462ec <_Event_Surrender+0xa4>
/*
* 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() &&
46274: 2279 0006 14c6 moveal 614c6 <_ISR_Nest_level>,%a1 4627a: 4a89 tstl %a1
4627c: 670a beqs 46288 <_Event_Surrender+0x40>
4627e: b5f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a2 46284: 6700 00a0 beqw 46326 <_Event_Surrender+0xde>
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
46288: 2a2a 0010 movel %a2@(16),%d5 4628c: 0285 0000 0100 andil #256,%d5
46292: 674c beqs 462e0 <_Event_Surrender+0x98>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
46294: b081 cmpl %d1,%d0
46296: 6706 beqs 4629e <_Event_Surrender+0x56>
46298: 0804 0001 btst #1,%d4
4629c: 6742 beqs 462e0 <_Event_Surrender+0x98> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
4629e: 2200 movel %d0,%d1 462a0: 4681 notl %d1 462a2: c282 andl %d2,%d1 462a4: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462a6: 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;
462aa: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462ae: 2080 movel %d0,%a0@
_ISR_Flash( level );
462b0: 203c 0000 0700 movel #1792,%d0 462b6: 46c3 movew %d3,%sr 462b8: 8083 orl %d3,%d0 462ba: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
462bc: 7a02 moveq #2,%d5 462be: baaa 0050 cmpl %a2@(80),%d5
462c2: 6734 beqs 462f8 <_Event_Surrender+0xb0>
_ISR_Enable( level );
462c4: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
462c6: 2f3c 1003 fff8 movel #268697592,%sp@- 462cc: 2f0a movel %a2,%sp@- 462ce: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 462d4: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
462d6: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462dc: 4e5e unlk %fp 462de: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
462e0: 46c3 movew %d3,%sr
}
462e2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462e8: 4e5e unlk %fp 462ea: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
462ec: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
462ee: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 462f4: 4e5e unlk %fp 462f6: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
462f8: 7003 moveq #3,%d0 462fa: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
_Thread_Unblock( the_thread );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
462fe: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
46300: 486a 0048 pea %a2@(72) 46304: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4630a: 2f3c 1003 fff8 movel #268697592,%sp@- 46310: 2f0a movel %a2,%sp@- 46312: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 46318: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
4631c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46322: 4e5e unlk %fp 46324: 4e75 rts
* 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) ||
46326: 2279 0006 1ca8 moveal 61ca8 <_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() &&
4632c: 7a02 moveq #2,%d5 4632e: ba89 cmpl %a1,%d5
46330: 6710 beqs 46342 <_Event_Surrender+0xfa> <== NEVER TAKEN
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
46332: 2279 0006 1ca8 moveal 61ca8 <_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() &&
46338: 1a3c 0001 moveb #1,%d5 4633c: ba89 cmpl %a1,%d5 4633e: 6600 ff48 bnew 46288 <_Event_Surrender+0x40>
_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) ) {
46342: b081 cmpl %d1,%d0
46344: 6706 beqs 4634c <_Event_Surrender+0x104>
46346: 0804 0001 btst #1,%d4
4634a: 671a beqs 46366 <_Event_Surrender+0x11e> <== NEVER TAKEN
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
4634c: 2200 movel %d0,%d1 4634e: 4681 notl %d1 46350: c282 andl %d2,%d1 46352: 2081 movel %d1,%a0@
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
46354: 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;
46358: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4635c: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
4635e: 7003 moveq #3,%d0 46360: 23c0 0006 1ca8 movel %d0,61ca8 <_Event_Sync_state>
}
_ISR_Enable( level );
46366: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46368: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4636e: 4e5e unlk %fp
...
00046374 <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
46374: 4e56 fffc linkw %fp,#-4 46378: 2f03 movel %d3,%sp@- 4637a: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
4637c: 486e fffc pea %fp@(-4) 46380: 2f2e 0008 movel %fp@(8),%sp@- 46384: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
4638a: 508f addql #8,%sp 4638c: 4aae fffc tstl %fp@(-4)
46390: 6642 bnes 463d4 <_Event_Timeout+0x60> <== 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 );
46392: 223c 0000 0700 movel #1792,%d1 46398: 40c2 movew %sr,%d2 4639a: 8282 orl %d2,%d1 4639c: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
4639e: 2040 moveal %d0,%a0 463a0: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
463a4: b0b9 0006 14e6 cmpl 614e6 <_Thread_Executing>,%d0
463aa: 6734 beqs 463e0 <_Event_Timeout+0x6c>
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463ac: 7606 moveq #6,%d3 463ae: 2040 moveal %d0,%a0 463b0: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
463b4: 46c2 movew %d2,%sr 463b6: 2f3c 1003 fff8 movel #268697592,%sp@- 463bc: 2f00 movel %d0,%sp@- 463be: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
463c4: 508f addql #8,%sp 463c6: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 463cc: 5380 subql #1,%d0 463ce: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
463d4: 242e fff4 movel %fp@(-12),%d2 463d8: 262e fff8 movel %fp@(-8),%d3 463dc: 4e5e unlk %fp 463de: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
463e0: 2239 0006 1ca8 movel 61ca8 <_Event_Sync_state>,%d1 463e6: 7601 moveq #1,%d3 463e8: b681 cmpl %d1,%d3
463ea: 66c0 bnes 463ac <_Event_Timeout+0x38> <== ALWAYS TAKEN
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463ec: 7606 moveq #6,%d3 <== NOT EXECUTED 463ee: 2040 moveal %d0,%a0 <== NOT EXECUTED
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
463f0: 7202 moveq #2,%d1 <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
463f2: 2143 0034 movel %d3,%a0@(52) <== NOT EXECUTED
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
463f6: 23c1 0006 1ca8 movel %d1,61ca8 <_Event_Sync_state> <== NOT EXECUTED
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
463fc: 46c2 movew %d2,%sr <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
463fe: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 46404: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46406: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4640c: 508f addql #8,%sp <== NOT EXECUTED 4640e: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 46414: 5380 subql #1,%d0 <== NOT EXECUTED 46416: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level><== NOT EXECUTED 4641c: 60b6 bras 463d4 <_Event_Timeout+0x60> <== NOT EXECUTED
...
0004d658 <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4d658: 4e56 ffcc linkw %fp,#-52 4d65c: 226e 000c moveal %fp@(12),%a1 4d660: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d664: 246e 0008 moveal %fp@(8),%a2
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap );
Heap_Block *block = _Heap_Free_list_first( heap );
uintptr_t const block_size_floor = alloc_size + HEAP_BLOCK_HEADER_SIZE
- HEAP_BLOCK_SIZE_OFFSET;
4d668: 2c09 movel %a1,%d6 4d66a: 5886 addql #4,%d6
uintptr_t const page_size = heap->page_size;
4d66c: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4d670: 222e 0010 movel %fp@(16),%d1 4d674: 282e 0014 movel %fp@(20),%d4
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4d678: 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;
4d67c: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4d680: bc89 cmpl %a1,%d6 4d682: 6500 0146 bcsw 4d7ca <_Heap_Allocate_aligned_with_boundary+0x172>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4d686: 4a84 tstl %d4 4d688: 6600 013c bnew 4d7c6 <_Heap_Allocate_aligned_with_boundary+0x16e>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d68c: b1ca cmpal %a2,%a0 4d68e: 6700 0152 beqw 4d7e2 <_Heap_Allocate_aligned_with_boundary+0x18a>
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;
4d692: 242e fffc movel %fp@(-4),%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d696: 7a04 moveq #4,%d5
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;
4d698: 5e82 addql #7,%d2
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d69a: 9a89 subl %a1,%d5
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d69c: 4283 clrl %d3
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;
4d69e: 2d42 fff8 movel %d2,%fp@(-8)
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d6a2: 2d45 fff4 movel %d5,%fp@(-12)
/*
* 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 ) {
4d6a6: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4d6aa: 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 ) {
4d6ac: b086 cmpl %d6,%d0
4d6ae: 630e blss 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alignment == 0 ) {
4d6b0: 4a81 tstl %d1
4d6b2: 6628 bnes 4d6dc <_Heap_Allocate_aligned_with_boundary+0x84>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4d6b4: 2408 movel %a0,%d2 4d6b6: 5082 addql #8,%d2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4d6b8: 4a82 tstl %d2 4d6ba: 6600 00ee bnew 4d7aa <_Heap_Allocate_aligned_with_boundary+0x152>
break;
}
block = block->next;
4d6be: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d6c2: b1ca cmpal %a2,%a0
4d6c4: 66e0 bnes 4d6a6 <_Heap_Allocate_aligned_with_boundary+0x4e>
4d6c6: 4280 clrl %d0
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
Heap_Statistics *const stats = &heap->stats;
4d6c8: b6aa 0044 cmpl %a2@(68),%d3
4d6cc: 6304 blss 4d6d2 <_Heap_Allocate_aligned_with_boundary+0x7a>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4d6ce: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4d6d2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4d6d8: 4e5e unlk %fp 4d6da: 4e75 rts
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;
4d6dc: 7efe moveq #-2,%d7 4d6de: 4be8 0008 lea %a0@(8),%a5 4d6e2: c087 andl %d7,%d0
uintptr_t alignment,
uintptr_t boundary
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
4d6e4: 286a 0014 moveal %a2@(20),%a4
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;
4d6e8: d088 addl %a0,%d0
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;
4d6ea: 2a2e fff8 movel %fp@(-8),%d5 4d6ee: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4d6f0: 242e fff4 movel %fp@(-12),%d2 4d6f4: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4d6f6: 2e02 movel %d2,%d7
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;
4d6f8: d085 addl %d5,%d0 4d6fa: 4c41 7005 remul %d1,%d5,%d7 4d6fe: 9485 subl %d5,%d2
uintptr_t alloc_begin = alloc_end - alloc_size;
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
/* Ensure that the we have a valid new block at the end */
if ( alloc_begin > alloc_begin_ceiling ) {
4d700: b480 cmpl %d0,%d2
4d702: 630a blss 4d70e <_Heap_Allocate_aligned_with_boundary+0xb6>
4d704: 2a00 movel %d0,%d5 4d706: 4c41 5002 remul %d1,%d2,%d5 4d70a: 9082 subl %d2,%d0 4d70c: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4d70e: 4a84 tstl %d4
4d710: 676c beqs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
/* 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;
4d712: 2002 movel %d2,%d0 4d714: d089 addl %a1,%d0 4d716: 2e00 movel %d0,%d7 4d718: 4c44 7005 remul %d4,%d5,%d7 4d71c: 2e00 movel %d0,%d7 4d71e: 9e85 subl %d5,%d7 4d720: 2a07 movel %d7,%d5
/* 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 ) {
4d722: be82 cmpl %d2,%d7
4d724: 6358 blss 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
4d726: be80 cmpl %d0,%d7
4d728: 6454 bccs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4d72a: 2e0d movel %a5,%d7 4d72c: de89 addl %a1,%d7
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4d72e: ba87 cmpl %d7,%d5
4d730: 658c bcss 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4d732: 9a89 subl %a1,%d5 4d734: 2005 movel %d5,%d0 4d736: 2647 moveal %d7,%a3 4d738: 4c41 0002 remul %d1,%d2,%d0 4d73c: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4d73e: 2005 movel %d5,%d0 4d740: d089 addl %a1,%d0 4d742: 2405 movel %d5,%d2 4d744: 2e00 movel %d0,%d7 4d746: 4c44 7005 remul %d4,%d5,%d7 4d74a: 2e00 movel %d0,%d7 4d74c: 9e85 subl %d5,%d7 4d74e: 2a07 movel %d7,%d5
/* 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 ) {
4d750: be82 cmpl %d2,%d7
4d752: 632a blss 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
4d754: be80 cmpl %d0,%d7
4d756: 6426 bccs 4d77e <_Heap_Allocate_aligned_with_boundary+0x126>
if ( boundary_line < boundary_floor ) {
4d758: ba8b cmpl %a3,%d5 4d75a: 6500 ff62 bcsw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4d75e: 9a89 subl %a1,%d5 4d760: 2005 movel %d5,%d0 4d762: 4c41 0002 remul %d1,%d2,%d0 4d766: 9a82 subl %d2,%d5
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4d768: 2005 movel %d5,%d0 4d76a: d089 addl %a1,%d0 4d76c: 2405 movel %d5,%d2 4d76e: 2e00 movel %d0,%d7 4d770: 4c44 7005 remul %d4,%d5,%d7 4d774: 2e00 movel %d0,%d7 4d776: 9e85 subl %d5,%d7 4d778: 2a07 movel %d7,%d5
/* 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 ) {
4d77a: be82 cmpl %d2,%d7
4d77c: 62d6 bhis 4d754 <_Heap_Allocate_aligned_with_boundary+0xfc><== ALWAYS TAKEN
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 ) {
4d77e: b48d cmpl %a5,%d2 4d780: 6500 ff3c bcsw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
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;
4d784: 70f8 moveq #-8,%d0 4d786: 9088 subl %a0,%d0 4d788: 2a40 moveal %d0,%a5 4d78a: 2e02 movel %d2,%d7 4d78c: dbc2 addal %d2,%a5 4d78e: 202e fffc movel %fp@(-4),%d0 4d792: 4c40 7005 remul %d0,%d5,%d7 4d796: 9bc5 subal %d5,%a5
if ( free_size >= min_block_size || free_size == 0 ) {
4d798: bbcc cmpal %a4,%a5 4d79a: 6400 ff1c bccw 4d6b8 <_Heap_Allocate_aligned_with_boundary+0x60> 4d79e: 4a8d tstl %a5 4d7a0: 6600 ff1c bnew 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4d7a4: 4a82 tstl %d2 4d7a6: 6700 ff16 beqw 4d6be <_Heap_Allocate_aligned_with_boundary+0x66>
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4d7aa: 2f09 movel %a1,%sp@-
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4d7ac: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4d7b0: 2f02 movel %d2,%sp@- 4d7b2: 2f08 movel %a0,%sp@- 4d7b4: 2f0a movel %a2,%sp@- 4d7b6: 4eb9 0004 796c jsr 4796c <_Heap_Block_allocate> 4d7bc: 4fef 0010 lea %sp@(16),%sp 4d7c0: 2002 movel %d2,%d0 4d7c2: 6000 ff04 braw 4d6c8 <_Heap_Allocate_aligned_with_boundary+0x70>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4d7c6: b889 cmpl %a1,%d4
4d7c8: 640c bccs 4d7d6 <_Heap_Allocate_aligned_with_boundary+0x17e>
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
4d7ca: 4280 clrl %d0
}
return (void *) alloc_begin;
}
4d7cc: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4d7d2: 4e5e unlk %fp 4d7d4: 4e75 rts
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4d7d6: 4a81 tstl %d1 4d7d8: 6600 feb2 bnew 4d68c <_Heap_Allocate_aligned_with_boundary+0x34> 4d7dc: 2200 movel %d0,%d1 4d7de: 6000 feac braw 4d68c <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4d7e2: 4283 clrl %d3 4d7e4: 4280 clrl %d0 4d7e6: 6000 fee0 braw 4d6c8 <_Heap_Allocate_aligned_with_boundary+0x70>
...
0004796c <_Heap_Block_allocate>:
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4796c: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4796e: 4e56 ffe0 linkw %fp,#-32 47972: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
47976: 2041 moveal %d1,%a0 47978: 5188 subql #8,%a0 4797a: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4797e: 246e 000c moveal %fp@(12),%a2
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47982: 7601 moveq #1,%d3
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const alloc_area_begin = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_area_offset = alloc_begin - alloc_area_begin;
47984: 2848 moveal %a0,%a4 47986: 240a movel %a2,%d2 47988: 99ca subal %a2,%a4
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4798a: c0aa 0004 andl %a2@(4),%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4798e: 266e 0008 moveal %fp@(8),%a3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
47992: c6b2 0804 andl %a2@(00000004,%d0:l),%d3
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
47996: 2a2e 0014 movel %fp@(20),%d5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4799a: 4a03 tstb %d3 4799c: 6600 00aa bnew 47a48 <_Heap_Block_allocate+0xdc>
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
479a0: 53ab 0038 subql #1,%a3@(56)
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479a4: 76fe moveq #-2,%d3
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
479a6: 52ab 0040 addql #1,%a3@(64)
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
479aa: 202a 0008 movel %a2@(8),%d0
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
479ae: 2a40 moveal %d0,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
479b0: 226a 000c moveal %a2@(12),%a1
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479b4: c6aa 0004 andl %a2@(4),%d3
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
479b8: 2340 0008 movel %d0,%a1@(8)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
479bc: 202b 0010 movel %a3@(16),%d0
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
479c0: 97ab 0030 subl %d3,%a3@(48)
next->prev = prev;
479c4: 2b49 000c movel %a1,%a5@(12)
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
479c8: b08c cmpl %a4,%d0 479ca: 6200 0088 bhiw 47a54 <_Heap_Block_allocate+0xe8>
- 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;
479ce: 262a 0004 movel %a2@(4),%d3
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 )
479d2: 4c40 1004 remul %d0,%d4,%d1
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
479d6: 7201 moveq #1,%d1 479d8: 91c4 subal %d4,%a0
_Heap_Block_of_alloc_area( alloc_begin, heap->page_size );
uintptr_t const new_block_begin = (uintptr_t) new_block;
uintptr_t const new_block_size = block_end - new_block_begin;
block_end = new_block_begin;
block_size = block_end - block_begin;
479da: 2008 movel %a0,%d0 479dc: 908a subl %a2,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
479de: d1ab 0030 addl %d0,%a3@(48)
if ( _Heap_Is_prev_used( block ) ) {
479e2: c2aa 0004 andl %a2@(4),%d1 479e6: 6700 0082 beqw 47a6a <_Heap_Block_allocate+0xfe>
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
479ea: 78fe moveq #-2,%d4
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
479ec: 52ab 0038 addql #1,%a3@(56) 479f0: 220a movel %a2,%d1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
479f2: 2869 0008 moveal %a1@(8),%a4
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
479f6: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
479f8: 7801 moveq #1,%d4 479fa: 8880 orl %d0,%d4
new_block->next = next;
479fc: 254c 0008 movel %a4,%a2@(8)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a00: d483 addl %d3,%d2 47a02: 9488 subl %a0,%d2
new_block->prev = block_before;
47a04: 2549 000c movel %a1,%a2@(12)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a08: 2544 0004 movel %d4,%a2@(4)
block_before->next = new_block;
47a0c: 234a 0008 movel %a2,%a1@(8)
next->prev = new_block;
47a10: 294a 000c movel %a2,%a4@(12)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a14: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
47a16: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
47a18: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a1c: 2f05 movel %d5,%sp@- 47a1e: 2f01 movel %d1,%sp@- 47a20: 2f08 movel %a0,%sp@- 47a22: 2f0b movel %a3,%sp@- 47a24: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a2a: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
47a2e: 202b 0030 movel %a3@(48),%d0
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
Heap_Statistics *const stats = &heap->stats;
47a32: b0ab 0034 cmpl %a3@(52),%d0
47a36: 6404 bccs 47a3c <_Heap_Block_allocate+0xd0>
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
47a38: 2740 0034 movel %d0,%a3@(52)
}
return block;
}
47a3c: 200a movel %a2,%d0 47a3e: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 47a44: 4e5e unlk %fp 47a46: 4e75 rts
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
47a48: 202b 0010 movel %a3@(16),%d0
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
47a4c: 224b moveal %a3,%a1
}
if ( alloc_area_offset < heap->page_size ) {
47a4e: b08c cmpl %a4,%d0 47a50: 6300 ff7c blsw 479ce <_Heap_Block_allocate+0x62>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
47a54: 4874 5800 pea %a4@(00000000,%d5:l) 47a58: 2f09 movel %a1,%sp@- 47a5a: 2f0a movel %a2,%sp@- 47a5c: 2f0b movel %a3,%sp@- 47a5e: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a64: 4fef 0010 lea %sp@(16),%sp 47a68: 60c4 bras 47a2e <_Heap_Block_allocate+0xc2>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
47a6a: 95d2 subal %a2@,%a2
Heap_Block *const prev_block = _Heap_Prev_block( block );
uintptr_t const prev_block_size = _Heap_Block_size( prev_block );
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
47a6c: 78fe moveq #-2,%d4 47a6e: 2209 movel %a1,%d1 47a70: c8aa 0004 andl %a2@(4),%d4 47a74: d084 addl %d4,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a76: 78fe moveq #-2,%d4 47a78: c684 andl %d4,%d3
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a7a: 7801 moveq #1,%d4 47a7c: 8880 orl %d0,%d4
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a7e: d483 addl %d3,%d2 47a80: 9488 subl %a0,%d2
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a82: 2544 0004 movel %d4,%a2@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a86: 2448 moveal %a0,%a2
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
new_block->prev_size = block_size;
47a88: 2080 movel %d0,%a0@
new_block->size_and_flag = new_block_size;
47a8a: 2142 0004 movel %d2,%a0@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a8e: 2f05 movel %d5,%sp@- 47a90: 2f01 movel %d1,%sp@- 47a92: 2f08 movel %a0,%sp@- 47a94: 2f0b movel %a3,%sp@- 47a96: 4eb9 0004 7878 jsr 47878 <_Heap_Block_split> 47a9c: 4fef 0010 lea %sp@(16),%sp 47aa0: 608c bras 47a2e <_Heap_Block_allocate+0xc2>
...
000526e4 <_Heap_Extend>:
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
526e4: 4e56 fff4 linkw %fp,#-12 526e8: 206e 0008 moveal %fp@(8),%a0 526ec: 202e 000c movel %fp@(12),%d0
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin; uintptr_t const heap_area_end = heap->area_end;
526f0: 2228 001c movel %a0@(28),%d1
uintptr_t const new_heap_area_end = heap_area_end + area_size; uintptr_t extend_size = 0; Heap_Block *const last_block = heap->last_block;
526f4: 2268 0024 moveal %a0@(36),%a1
Heap_Control *heap,
void *area_begin_ptr,
uintptr_t area_size,
uintptr_t *amount_extended
)
{
526f8: 48d7 040c moveml %d2-%d3/%a2,%sp@
Heap_Statistics *const stats = &heap->stats; uintptr_t const area_begin = (uintptr_t) area_begin_ptr; uintptr_t const heap_area_begin = heap->area_begin;
526fc: b0a8 0018 cmpl %a0@(24),%d0
52700: 6410 bccs 52712 <_Heap_Extend+0x2e>
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
return HEAP_EXTEND_ERROR; /* case 3 */
} else if ( area_begin != heap_area_end ) {
52702: b280 cmpl %d0,%d1
52704: 671c beqs 52722 <_Heap_Extend+0x3e>
52706: 7002 moveq #2,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
52708: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5270e: 4e5e unlk %fp 52710: 4e75 rts
* 5. non-contiguous higher address (NOT SUPPORTED)
*
* As noted, this code only supports (4).
*/
if ( area_begin >= heap_area_begin && area_begin < heap_area_end ) {
52712: b280 cmpl %d0,%d1
52714: 63ec blss 52702 <_Heap_Extend+0x1e>
52716: 7001 moveq #1,%d0
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
}
return HEAP_EXTEND_SUCCESSFUL;
}
52718: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5271e: 4e5e unlk %fp 52720: 4e75 rts
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const area_begin = (uintptr_t) area_begin_ptr;
uintptr_t const heap_area_begin = heap->area_begin;
uintptr_t const heap_area_end = heap->area_end;
uintptr_t const new_heap_area_end = heap_area_end + area_size;
52722: 2200 movel %d0,%d1 52724: d2ae 0010 addl %fp@(16),%d1
* block and free it.
*/
heap->area_end = new_heap_area_end;
extend_size = new_heap_area_end
52728: 70f8 moveq #-8,%d0 5272a: 9089 subl %a1,%d0 5272c: d081 addl %d1,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5272e: 2600 movel %d0,%d3 52730: 4c68 3002 0010 remul %a0@(16),%d2,%d3
* Currently only case 4 should make it to this point.
* The basic trick is to make the extend area look like a used
* block and free it.
*/
heap->area_end = new_heap_area_end;
52736: 2141 001c movel %d1,%a0@(28)
extend_size = new_heap_area_end
- (uintptr_t) last_block - HEAP_BLOCK_HEADER_SIZE;
extend_size = _Heap_Align_down( extend_size, heap->page_size );
*amount_extended = extend_size;
5273a: 246e 0014 moveal %fp@(20),%a2 5273e: 9082 subl %d2,%d0 52740: 2480 movel %d0,%a2@
if( extend_size >= heap->min_block_size ) {
52742: b0a8 0014 cmpl %a0@(20),%d0
52746: 640c bccs 52754 <_Heap_Extend+0x70> <== ALWAYS TAKEN
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52748: 4280 clrl %d0 <== NOT EXECUTED
}
return HEAP_EXTEND_SUCCESSFUL;
}
5274a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 52750: 4e5e unlk %fp 52752: 4e75 rts
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
52754: 7401 moveq #1,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
52756: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
block->size_and_flag = size | flag;
5275a: c4a9 0004 andl %a1@(4),%d2
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
5275e: 2228 0020 movel %a0@(32),%d1 52762: 928a subl %a2,%d1 52764: 8480 orl %d0,%d2
((uintptr_t) heap->first_block - (uintptr_t) new_last_block)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
52766: 214a 0024 movel %a2,%a0@(36) 5276a: 2342 0004 movel %d2,%a1@(4)
if( extend_size >= heap->min_block_size ) {
Heap_Block *const new_last_block = _Heap_Block_at( last_block, extend_size );
_Heap_Block_set_size( last_block, extend_size );
new_last_block->size_and_flag =
5276e: 7401 moveq #1,%d2 52770: 8481 orl %d1,%d2 52772: 2542 0004 movel %d2,%a2@(4)
/* Statistics */
stats->size += extend_size;
++stats->used_blocks;
--stats->frees; /* Do not count subsequent call as actual free() */
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52776: 4869 0008 pea %a1@(8)
| HEAP_PREV_BLOCK_USED;
heap->last_block = new_last_block;
/* Statistics */
stats->size += extend_size;
5277a: d1a8 002c addl %d0,%a0@(44)
++stats->used_blocks;
5277e: 52a8 0040 addql #1,%a0@(64)
--stats->frees; /* Do not count subsequent call as actual free() */
52782: 53a8 0050 subql #1,%a0@(80)
_Heap_Free( heap, (void *) _Heap_Alloc_area_of_block( last_block ));
52786: 2f08 movel %a0,%sp@- 52788: 4eb9 0004 bde8 jsr 4bde8 <_Heap_Free> 5278e: 508f addql #8,%sp 52790: 4280 clrl %d0 52792: 60b6 bras 5274a <_Heap_Extend+0x66>
0004d7ec <_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 )
{
4d7ec: 4e56 ffe4 linkw %fp,#-28 4d7f0: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4d7f4: 2040 moveal %d0,%a0 4d7f6: 5188 subql #8,%a0 4d7f8: 226e 0008 moveal %fp@(8),%a1 4d7fc: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4d802: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@
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;
4d806: 2029 0020 movel %a1@(32),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
4d80a: 91c1 subal %d1,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4d80c: b088 cmpl %a0,%d0 4d80e: 6200 00a0 bhiw 4d8b0 <_Heap_Free+0xc4>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4d812: 2229 0024 movel %a1@(36),%d1
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
4d816: b288 cmpl %a0,%d1 4d818: 6500 0096 bcsw 4d8b0 <_Heap_Free+0xc4>
- 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;
4d81c: 2628 0004 movel %a0@(4),%d3 4d820: 74fe moveq #-2,%d2 4d822: c483 andl %d3,%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4d824: 45f0 2800 lea %a0@(00000000,%d2:l),%a2
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
4d828: b5c0 cmpal %d0,%a2 4d82a: 6500 0084 bcsw 4d8b0 <_Heap_Free+0xc4> 4d82e: b5c1 cmpal %d1,%a2
4d830: 627e bhis 4d8b0 <_Heap_Free+0xc4> <== 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;
4d832: 282a 0004 movel %a2@(4),%d4
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
_HAssert( false );
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4d836: 7a01 moveq #1,%d5 4d838: ca84 andl %d4,%d5 4d83a: 4a05 tstb %d5
4d83c: 6772 beqs 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
- 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;
4d83e: 7afe moveq #-2,%d5 4d840: c885 andl %d5,%d4
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4d842: b5c1 cmpal %d1,%a2 4d844: 6700 00fa beqw 4d940 <_Heap_Free+0x154>
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4d848: 7a01 moveq #1,%d5 4d84a: 7c01 moveq #1,%d6 4d84c: cab2 4804 andl %a2@(00000004,%d4:l),%d5 4d850: bd85 eorl %d6,%d5
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 ));
if ( !_Heap_Is_prev_used( block ) ) {
4d852: 7c01 moveq #1,%d6 4d854: c686 andl %d6,%d3 4d856: 4a03 tstb %d3
4d858: 6660 bnes 4d8ba <_Heap_Free+0xce>
uintptr_t const prev_size = block->prev_size;
4d85a: 2610 movel %a0@,%d3
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4d85c: 91c3 subal %d3,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4d85e: b1c0 cmpal %d0,%a0
4d860: 654e bcss 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
4d862: b1c1 cmpal %d1,%a0
4d864: 624a bhis 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
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) ) {
4d866: 7001 moveq #1,%d0 4d868: c0a8 0004 andl %a0@(4),%d0 4d86c: 4a00 tstb %d0
4d86e: 6740 beqs 4d8b0 <_Heap_Free+0xc4> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4d870: 4a05 tstb %d5 4d872: 6700 00d2 beqw 4d946 <_Heap_Free+0x15a>
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
4d876: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4d87a: 53a9 0038 subql #1,%a1@(56)
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4d87e: d882 addl %d2,%d4 4d880: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d882: 7001 moveq #1,%d0
return _Heap_Free_list_tail(heap)->prev;
}
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
4d884: 246a 0008 moveal %a2@(8),%a2 4d888: 8083 orl %d3,%d0
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4d88a: 2183 3800 movel %d3,%a0@(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;
4d88e: 2140 0004 movel %d0,%a0@(4)
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
4d892: 254b 000c movel %a3,%a2@(12)
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4d896: 274a 0008 movel %a2,%a3@(8)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d89a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d89e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d8a2: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4d8a6: 7001 moveq #1,%d0
return( true );
}
4d8a8: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3 4d8ac: 4e5e unlk %fp 4d8ae: 4e75 rts 4d8b0: 4cd7 0c7c moveml %sp@,%d2-%d6/%a2-%a3
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4d8b4: 4200 clrb %d0
}
4d8b6: 4e5e unlk %fp 4d8b8: 4e75 rts
uintptr_t const size = block_size + prev_size;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
}
} else if ( next_is_free ) { /* coalesce next */
4d8ba: 4a05 tstb %d5
4d8bc: 6736 beqs 4d8f4 <_Heap_Free+0x108>
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
4d8be: 266a 000c moveal %a2@(12),%a3
uintptr_t const size = block_size + next_block_size;
4d8c2: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d8c4: 7001 moveq #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_replace(
Heap_Block *old_block,
Heap_Block *new_block
)
{
Heap_Block *next = old_block->next;
4d8c6: 246a 0008 moveal %a2@(8),%a2 4d8ca: 8084 orl %d4,%d0
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4d8cc: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
4d8d0: 214b 000c movel %a3,%a0@(12)
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4d8d4: 214a 0008 movel %a2,%a0@(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;
4d8d8: 2140 0004 movel %d0,%a0@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d8dc: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d8e0: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d8e4: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4d8e8: 7001 moveq #1,%d0
new_block->prev = prev;
next->prev = new_block;
4d8ea: 2548 000c movel %a0,%a2@(12)
prev->next = new_block;
4d8ee: 2748 0008 movel %a0,%a3@(8) 4d8f2: 60b4 bras 4d8a8 <_Heap_Free+0xbc>
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;
4d8f4: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d8f6: 7cfe moveq #-2,%d6
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;
4d8f8: 8a82 orl %d2,%d5
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4d8fa: 2669 0008 moveal %a1@(8),%a3 4d8fe: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d902: cdaa 0004 andl %d6,%a2@(4)
next_block->prev_size = block_size;
4d906: 2482 movel %d2,%a2@
/* Statistics */
++stats->free_blocks;
4d908: 2029 0038 movel %a1@(56),%d0 4d90c: 5280 addql #1,%d0
new_block->next = next;
4d90e: 214b 0008 movel %a3,%a0@(8)
new_block->prev = block_before;
4d912: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4d916: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
4d91a: 2748 000c movel %a0,%a3@(12) 4d91e: 2340 0038 movel %d0,%a1@(56)
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
{
Heap_Statistics *const stats = &heap->stats;
4d922: b0a9 003c cmpl %a1@(60),%d0 4d926: 6300 ff72 blsw 4d89a <_Heap_Free+0xae>
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d92a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d92e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d932: 52a9 0050 addql #1,%a1@(80)
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
if ( stats->max_free_blocks < stats->free_blocks ) {
stats->max_free_blocks = stats->free_blocks;
4d936: 2340 003c movel %d0,%a1@(60)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d93a: 7001 moveq #1,%d0 4d93c: 6000 ff6a braw 4d8a8 <_Heap_Free+0xbc>
_HAssert( false );
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
4d940: 4205 clrb %d5 4d942: 6000 ff0e braw 4d852 <_Heap_Free+0x66>
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;
} else { /* coalesce prev */
uintptr_t const size = block_size + prev_size;
4d946: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4d948: 7a01 moveq #1,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d94a: 7cfe moveq #-2,%d6
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;
4d94c: 8a83 orl %d3,%d5
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4d94e: 2483 movel %d3,%a2@
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d950: 7001 moveq #1,%d0
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;
4d952: 2145 0004 movel %d5,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4d956: cdaa 0004 andl %d6,%a2@(4)
}
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
4d95a: d5a9 0030 addl %d2,%a1@(48)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4d95e: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4d962: 52a9 0050 addql #1,%a1@(80) 4d966: 6000 ff40 braw 4d8a8 <_Heap_Free+0xbc>
...
00052794 <_Heap_Get_free_information>:
void _Heap_Get_free_information(
Heap_Control *the_heap,
Heap_Information *info
)
{
52794: 4e56 fff4 linkw %fp,#-12 52798: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 5279c: 266e 0008 moveal %fp@(8),%a3 527a0: 246e 000c moveal %fp@(12),%a2
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
527a4: 206b 0008 moveal %a3@(8),%a0
Heap_Block *the_block;
Heap_Block *const tail = _Heap_Free_list_tail(the_heap);
info->number = 0;
527a8: 4292 clrl %a2@
info->largest = 0;
527aa: 42aa 0004 clrl %a2@(4)
info->total = 0;
527ae: 42aa 0008 clrl %a2@(8)
for(the_block = _Heap_Free_list_first(the_heap);
527b2: b1cb cmpal %a3,%a0
527b4: 672e beqs 527e4 <_Heap_Get_free_information+0x50><== NEVER TAKEN
527b6: 327c 0001 moveaw #1,%a1 527ba: 4281 clrl %d1
- 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;
527bc: 70fe moveq #-2,%d0
the_block != tail;
the_block = the_block->next)
527be: 2409 movel %a1,%d2 527c0: 5282 addql #1,%d2 527c2: c0a8 0004 andl %a0@(4),%d0
/* As we always coalesce free blocks, prev block must have been used. */
_HAssert(_Heap_Is_prev_used(the_block));
info->number++;
info->total += the_size;
527c6: d280 addl %d0,%d1
if ( info->largest < the_size )
527c8: b0aa 0004 cmpl %a2@(4),%d0
527cc: 6304 blss 527d2 <_Heap_Get_free_information+0x3e>
info->largest = the_size;
527ce: 2540 0004 movel %d0,%a2@(4)
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
the_block != tail;
the_block = the_block->next)
527d2: 2068 0008 moveal %a0@(8),%a0
info->number = 0;
info->largest = 0;
info->total = 0;
for(the_block = _Heap_Free_list_first(the_heap);
527d6: b1cb cmpal %a3,%a0
527d8: 6704 beqs 527de <_Heap_Get_free_information+0x4a>
527da: 2242 moveal %d2,%a1 527dc: 60de bras 527bc <_Heap_Get_free_information+0x28> 527de: 2541 0008 movel %d1,%a2@(8) 527e2: 2489 movel %a1,%a2@
info->number++;
info->total += the_size;
if ( info->largest < the_size )
info->largest = the_size;
}
}
527e4: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3
527e8: 4e5e unlk %fp <== NOT EXECUTED
000527ec <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
527ec: 4e56 fff4 linkw %fp,#-12 527f0: 206e 0008 moveal %fp@(8),%a0 527f4: 48d7 040c moveml %d2-%d3/%a2,%sp@ 527f8: 246e 000c moveal %fp@(12),%a2
Heap_Block *the_block = the_heap->first_block; Heap_Block *const end = the_heap->last_block;
527fc: 2428 0024 movel %a0@(36),%d2
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
52800: 2268 0020 moveal %a0@(32),%a1
Heap_Block *const end = the_heap->last_block;
_HAssert(the_block->prev_size == the_heap->page_size);
_HAssert(_Heap_Is_prev_used(the_block));
the_info->Free.number = 0;
52804: 4292 clrl %a2@
the_info->Free.total = 0;
52806: 42aa 0008 clrl %a2@(8)
the_info->Free.largest = 0;
5280a: 42aa 0004 clrl %a2@(4)
the_info->Used.number = 0;
5280e: 42aa 000c clrl %a2@(12)
the_info->Used.total = 0;
52812: 42aa 0014 clrl %a2@(20)
the_info->Used.largest = 0;
52816: 42aa 0010 clrl %a2@(16)
while ( the_block != end ) {
5281a: b489 cmpl %a1,%d2
5281c: 6746 beqs 52864 <_Heap_Get_information+0x78> <== NEVER TAKEN
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
info = &the_info->Used;
5281e: 260a movel %a2,%d3 52820: 0683 0000 000c addil #12,%d3
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
52826: 2229 0004 movel %a1@(4),%d1 5282a: 70fe moveq #-2,%d0
uintptr_t const the_size = _Heap_Block_size(the_block);
Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
Heap_Information *info;
if ( _Heap_Is_prev_used(next_block) )
5282c: 204a moveal %a2,%a0 5282e: c081 andl %d1,%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
52830: d3c0 addal %d0,%a1
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;
52832: 2229 0004 movel %a1@(4),%d1 52836: 0801 0000 btst #0,%d1
5283a: 6702 beqs 5283e <_Heap_Get_information+0x52>
5283c: 2043 moveal %d3,%a0
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
5283e: 5290 addql #1,%a0@
info->total += the_size;
52840: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
52844: b0a8 0004 cmpl %a0@(4),%d0
52848: 6304 blss 5284e <_Heap_Get_information+0x62>
info->largest = the_size;
5284a: 2140 0004 movel %d0,%a0@(4)
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
5284e: b3c2 cmpal %d2,%a1
52850: 66d8 bnes 5282a <_Heap_Get_information+0x3e>
52852: 202a 0014 movel %a2@(20),%d0 52856: 5080 addql #8,%d0
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
52858: 2540 0014 movel %d0,%a2@(20)
}
5285c: 4cd7 040c moveml %sp@,%d2-%d3/%a2 52860: 4e5e unlk %fp 52862: 4e75 rts
the_info->Free.largest = 0;
the_info->Used.number = 0;
the_info->Used.total = 0;
the_info->Used.largest = 0;
while ( the_block != end ) {
52864: 7008 moveq #8,%d0 <== NOT EXECUTED
/* * Handle the last dummy block. Don't consider this block to be * "used" as client never allocated it. Make 'Used.total' contain this * blocks' overhead though. */ the_info->Used.total += HEAP_BLOCK_HEADER_SIZE;
52866: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED
}
5286a: 4cd7 040c moveml %sp@,%d2-%d3/%a2 <== NOT EXECUTED 5286e: 4e5e unlk %fp <== NOT EXECUTED
...
00047738 <_Heap_Initialize>:
Heap_Control *heap,
void *heap_area_begin_ptr,
uintptr_t heap_area_size,
uintptr_t page_size
)
{
47738: 4e56 ffe8 linkw %fp,#-24 4773c: 206e 0008 moveal %fp@(8),%a0 47740: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 47744: 226e 000c moveal %fp@(12),%a1 47748: 242e 0010 movel %fp@(16),%d2 4774c: 222e 0014 movel %fp@(20),%d1
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
47750: 6600 00ce bnew 47820 <_Heap_Initialize+0xe8>
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
47754: 2009 movel %a1,%d0 47756: 5080 addql #8,%d0
uintptr_t min_block_size = 0;
uintptr_t overhead = 0;
Heap_Block *first_block = NULL;
Heap_Block *last_block = NULL;
if ( page_size == 0 ) {
47758: 123c 0004 moveb #4,%d1
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4775c: 2a00 movel %d0,%d5 4775e: 7610 moveq #16,%d3 47760: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47764: 4a84 tstl %d4
47766: 6704 beqs 4776c <_Heap_Initialize+0x34> <== ALWAYS TAKEN
return value - remainder + alignment;
47768: d081 addl %d1,%d0 4776a: 9084 subl %d4,%d0
uintptr_t page_size
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
4776c: 2809 movel %a1,%d4 4776e: d882 addl %d2,%d4
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
47770: b889 cmpl %a1,%d4 47772: 6500 00bc bcsw 47830 <_Heap_Initialize+0xf8>
}
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
47776: 2a00 movel %d0,%d5 47778: 2440 moveal %d0,%a2 4777a: 9a89 subl %a1,%d5 4777c: 518a subql #8,%a2
first_block_size = heap_area_size - overhead;
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
4777e: ba82 cmpl %d2,%d5 47780: 6400 00ae bccw 47830 <_Heap_Initialize+0xf8>
min_block_size = _Heap_Align_up( sizeof( Heap_Block ), page_size );
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size );
first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE;
overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin);
first_block_size = heap_area_size - overhead;
47784: 9485 subl %d5,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
47786: 2a02 movel %d2,%d5 47788: 4c41 5000 remul %d1,%d0,%d5 4778c: 9480 subl %d0,%d2
first_block_size = _Heap_Align_down ( first_block_size, page_size );
alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
if (
4778e: b483 cmpl %d3,%d2 47790: 6500 009e bcsw 47830 <_Heap_Initialize+0xf8>
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
47794: 7a01 moveq #1,%d5
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47796: 47f2 2800 lea %a2@(00000000,%d2:l),%a3
alloc_area_begin = _Heap_Align_up( alloc_area_begin, page_size ); first_block_begin = alloc_area_begin - HEAP_BLOCK_HEADER_SIZE; overhead = HEAP_BLOCK_HEADER_SIZE + (first_block_begin - heap_area_begin); first_block_size = heap_area_size - overhead; first_block_size = _Heap_Align_down ( first_block_size, page_size ); alloc_area_size = first_block_size - HEAP_BLOCK_HEADER_SIZE;
4779a: 2002 movel %d2,%d0 4779c: 5180 subql #8,%d0
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
4779e: 8a82 orl %d2,%d5
return 0;
}
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
477a0: 2481 movel %d1,%a2@
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
477a2: 2545 0004 movel %d5,%a2@(4)
* last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size; last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
477a6: 2a0a movel %a2,%d5 477a8: 9a8b subl %a3,%d5 477aa: 2745 0004 movel %d5,%a3@(4)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
477ae: 2a39 0006 0bcc movel 60bcc <instance>,%d5
* block indicates that the previous block is used, this ensures that the * last block appears as used for the _Heap_Is_used() and _Heap_Is_free() * functions. */ last_block = _Heap_Block_at( first_block, first_block_size ); last_block->prev_size = first_block_size;
477b4: 2682 movel %d2,%a3@
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
477b6: 2141 0010 movel %d1,%a0@(16)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
477ba: 7201 moveq #1,%d1
/* First block */
first_block = (Heap_Block *) first_block_begin;
first_block->prev_size = page_size;
first_block->size_and_flag = first_block_size | HEAP_PREV_BLOCK_USED;
first_block->next = _Heap_Free_list_tail( heap );
477bc: 2548 0008 movel %a0,%a2@(8)
first_block->prev = _Heap_Free_list_head( heap );
477c0: 2548 000c movel %a0,%a2@(12)
last_block->prev_size = first_block_size;
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
477c4: 2143 0014 movel %d3,%a0@(20)
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end;
477c8: 2144 001c movel %d4,%a0@(28)
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
477cc: 2142 0034 movel %d2,%a0@(52)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
477d0: 2145 0028 movel %d5,%a0@(40) 477d4: 5285 addql #1,%d5
heap->last_block = last_block;
_Heap_Free_list_head( heap )->next = first_block;
_Heap_Free_list_tail( heap )->prev = first_block;
/* Statistics */
stats->size = first_block_size;
477d6: 2142 002c movel %d2,%a0@(44)
stats->free_size = first_block_size;
477da: 2142 0030 movel %d2,%a0@(48)
last_block->size_and_flag = first_block_begin - (uintptr_t) last_block;
/* Heap control */
heap->page_size = page_size;
heap->min_block_size = min_block_size;
heap->area_begin = heap_area_begin;
477de: 2149 0018 movel %a1,%a0@(24)
/* Statistics */
stats->size = first_block_size;
stats->free_size = first_block_size;
stats->min_free_size = first_block_size;
stats->free_blocks = 1;
477e2: 2141 0038 movel %d1,%a0@(56)
stats->max_free_blocks = 1;
477e6: 2141 003c movel %d1,%a0@(60)
stats->used_blocks = 0;
477ea: 42a8 0040 clrl %a0@(64)
stats->max_search = 0;
477ee: 42a8 0044 clrl %a0@(68)
stats->allocs = 0;
477f2: 42a8 0048 clrl %a0@(72)
stats->searches = 0;
477f6: 42a8 004c clrl %a0@(76)
stats->frees = 0;
477fa: 42a8 0050 clrl %a0@(80)
stats->resizes = 0;
477fe: 42a8 0054 clrl %a0@(84)
heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block;
47802: 214b 0024 movel %a3,%a0@(36)
stats->max_search = 0; stats->allocs = 0; stats->searches = 0; stats->frees = 0; stats->resizes = 0; stats->instance = instance++;
47806: 23c5 0006 0bcc movel %d5,60bcc <instance>
heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block; heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block; _Heap_Free_list_tail( heap )->prev = first_block;
4780c: 214a 000c movel %a2,%a0@(12)
/* Heap control */ heap->page_size = page_size; heap->min_block_size = min_block_size; heap->area_begin = heap_area_begin; heap->area_end = heap_area_end; heap->first_block = first_block;
47810: 214a 0020 movel %a2,%a0@(32)
heap->last_block = last_block; _Heap_Free_list_head( heap )->next = first_block;
47814: 214a 0008 movel %a2,%a0@(8)
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
}
47818: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4781c: 4e5e unlk %fp 4781e: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47820: 7003 moveq #3,%d0 47822: c081 andl %d1,%d0
if ( remainder != 0 ) {
47824: 6704 beqs 4782a <_Heap_Initialize+0xf2>
return value - remainder + alignment;
47826: 5881 addql #4,%d1 47828: 9280 subl %d0,%d1
if ( page_size == 0 ) {
page_size = CPU_ALIGNMENT;
} else {
page_size = _Heap_Align_up( page_size, CPU_ALIGNMENT );
if ( page_size < CPU_ALIGNMENT ) {
4782a: 7003 moveq #3,%d0 4782c: b081 cmpl %d1,%d0
4782e: 650a bcss 4783a <_Heap_Initialize+0x102>
);
_HAssert(
_Heap_Is_aligned( _Heap_Alloc_area_of_block( last_block ), page_size )
);
return alloc_area_size;
47830: 4280 clrl %d0
}
47832: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 47836: 4e5e unlk %fp 47838: 4e75 rts
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4783a: 7610 moveq #16,%d3 4783c: 4c41 3000 remul %d1,%d0,%d3
if ( remainder != 0 ) {
47840: 4a80 tstl %d0
47842: 671e beqs 47862 <_Heap_Initialize+0x12a>
return value - remainder + alignment;
47844: 2601 movel %d1,%d3 47846: 0683 0000 0010 addil #16,%d3 4784c: 9680 subl %d0,%d3
)
{
Heap_Statistics *const stats = &heap->stats;
uintptr_t const heap_area_begin = (uintptr_t) heap_area_begin_ptr;
uintptr_t const heap_area_end = heap_area_begin + heap_area_size;
uintptr_t alloc_area_begin = heap_area_begin + HEAP_BLOCK_HEADER_SIZE;
4784e: 2009 movel %a1,%d0 47850: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47852: 2a00 movel %d0,%d5 47854: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
47858: 4a84 tstl %d4 4785a: 6700 ff10 beqw 4776c <_Heap_Initialize+0x34> 4785e: 6000 ff08 braw 47768 <_Heap_Initialize+0x30> 47862: 2009 movel %a1,%d0 47864: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
47866: 2a00 movel %d0,%d5
if ( remainder != 0 ) {
47868: 7610 moveq #16,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4786a: 4c41 5004 remul %d1,%d4,%d5
if ( remainder != 0 ) {
4786e: 4a84 tstl %d4 47870: 6700 fefa beqw 4776c <_Heap_Initialize+0x34> 47874: 6000 fef2 braw 47768 <_Heap_Initialize+0x30>
0005dcf8 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5dcf8: 4e56 0000 linkw %fp,#0 5dcfc: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_of_alloc_area(
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
5dd00: 2040 moveal %d0,%a0 5dd02: 5188 subql #8,%a0 5dd04: 226e 0008 moveal %fp@(8),%a1 5dd08: 2f02 movel %d2,%sp@- 5dd0a: 2400 movel %d0,%d2 5dd0c: 4c69 2001 0010 remul %a1@(16),%d1,%d2 5dd12: 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;
5dd14: 2229 0020 movel %a1@(32),%d1
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
5dd18: b288 cmpl %a0,%d1
5dd1a: 6238 bhis 5dd54 <_Heap_Size_of_alloc_area+0x5c>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5dd1c: 2269 0024 moveal %a1@(36),%a1
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
5dd20: b3c8 cmpal %a0,%a1
5dd22: 6530 bcss 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5dd24: 74fe moveq #-2,%d2 5dd26: c4a8 0004 andl %a0@(4),%d2 5dd2a: d1c2 addal %d2,%a0
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
5dd2c: b1c1 cmpal %d1,%a0
5dd2e: 6524 bcss 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
5dd30: b1c9 cmpal %a1,%a0
5dd32: 6220 bhis 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
}
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
5dd34: 7201 moveq #1,%d1 5dd36: c2a8 0004 andl %a0@(4),%d1 5dd3a: 4a01 tstb %d1
5dd3c: 6716 beqs 5dd54 <_Heap_Size_of_alloc_area+0x5c> <== NEVER TAKEN
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5dd3e: 7204 moveq #4,%d1 5dd40: 9280 subl %d0,%d1 5dd42: 2001 movel %d1,%d0 5dd44: d088 addl %a0,%d0 5dd46: 226e 0010 moveal %fp@(16),%a1
return true;
}
5dd4a: 241f movel %sp@+,%d2 5dd4c: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5dd4e: 2280 movel %d0,%a1@ 5dd50: 7001 moveq #1,%d0
return true;
}
5dd52: 4e75 rts 5dd54: 241f movel %sp@+,%d2 5dd56: 4e5e unlk %fp
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
5dd58: 4200 clrb %d0 <== NOT EXECUTED
}
00048494 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48494: 4e56 ffc4 linkw %fp,#-60 48498: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4849c: 246e 0008 moveal %fp@(8),%a2
uintptr_t const page_size = heap->page_size;
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = heap->first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
484a0: 4bfa 049c lea %pc@(4893e <_Heap_Walk_print>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
484a4: 242e 000c movel %fp@(12),%d2
uintptr_t const page_size = heap->page_size;
484a8: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
484ac: 282a 0014 movel %a2@(20),%d4
Heap_Block *const last_block = heap->last_block;
484b0: 2a2a 0024 movel %a2@(36),%d5
Heap_Block *block = heap->first_block;
484b4: 266a 0020 moveal %a2@(32),%a3
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
484b8: 4a2e 0013 tstb %fp@(19)
484bc: 6604 bnes 484c2 <_Heap_Walk+0x2e>
484be: 4bfa ffcc lea %pc@(4848c <_Heap_Walk_print_nothing>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
484c2: 7003 moveq #3,%d0 484c4: b0b9 0006 3aac cmpl 63aac <_System_state_Current>,%d0
484ca: 670c beqs 484d8 <_Heap_Walk+0x44>
block = next_block;
}
return true;
}
484cc: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
484d2: 7001 moveq #1,%d0
block = next_block;
}
return true;
}
484d4: 4e5e unlk %fp 484d6: 4e75 rts
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)(
484d8: 2f2a 000c movel %a2@(12),%sp@- 484dc: 2f2a 0008 movel %a2@(8),%sp@- 484e0: 2f05 movel %d5,%sp@- 484e2: 2f0b movel %a3,%sp@- 484e4: 2f2a 001c movel %a2@(28),%sp@- 484e8: 2f2a 0018 movel %a2@(24),%sp@- 484ec: 2f04 movel %d4,%sp@- 484ee: 2f03 movel %d3,%sp@- 484f0: 4879 0005 fa5e pea 5fa5e <_Status_Object_name_errors_to_status+0x14> 484f6: 42a7 clrl %sp@- 484f8: 2f02 movel %d2,%sp@- 484fa: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
484fc: 4fef 002c lea %sp@(44),%sp 48500: 4a83 tstl %d3 48502: 6700 0158 beqw 4865c <_Heap_Walk+0x1c8>
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
48506: 7003 moveq #3,%d0 48508: c083 andl %d3,%d0 4850a: 6600 016e bnew 4867a <_Heap_Walk+0x1e6>
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
4850e: 2204 movel %d4,%d1 48510: 4c43 1000 remul %d3,%d0,%d1 48514: 4a80 tstl %d0 48516: 6600 017a bnew 48692 <_Heap_Walk+0x1fe>
);
return false;
}
if (
4851a: 200b movel %a3,%d0 4851c: 5080 addql #8,%d0 4851e: 4c43 0001 remul %d3,%d1,%d0 48522: 4a81 tstl %d1 48524: 6600 0184 bnew 486aa <_Heap_Walk+0x216>
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;
48528: 2c2b 0004 movel %a3@(4),%d6
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
4852c: 7201 moveq #1,%d1 4852e: c286 andl %d6,%d1 48530: 2d46 ffec movel %d6,%fp@(-20) 48534: 4a01 tstb %d1 48536: 6700 018a beqw 486c2 <_Heap_Walk+0x22e>
);
return false;
}
if ( first_block->prev_size != page_size ) {
4853a: 2053 moveal %a3@,%a0 4853c: b1c3 cmpal %d3,%a0 4853e: 6600 00e2 bnew 48622 <_Heap_Walk+0x18e>
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
48542: 2045 moveal %d5,%a0 48544: 7cfe moveq #-2,%d6 48546: 7001 moveq #1,%d0 48548: cca8 0004 andl %a0@(4),%d6 4854c: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 48550: 4a00 tstb %d0 48552: 6700 0184 beqw 486d8 <_Heap_Walk+0x244>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
48556: 2c2a 0010 movel %a2@(16),%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
4855a: 206a 0008 moveal %a2@(8),%a0 4855e: 2d46 fffc movel %d6,%fp@(-4)
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 ) {
48562: b1ca cmpal %a2,%a0 48564: 6700 0198 beqw 486fe <_Heap_Walk+0x26a>
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;
48568: 286a 0020 moveal %a2@(32),%a4
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
4856c: b1cc cmpal %a4,%a0 4856e: 6500 00cc bcsw 4863c <_Heap_Walk+0x1a8>
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
48572: 2e2a 0024 movel %a2@(36),%d7 48576: 2d47 fff8 movel %d7,%fp@(-8)
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
4857a: be88 cmpl %a0,%d7 4857c: 6500 00be bcsw 4863c <_Heap_Walk+0x1a8>
);
return false;
}
if (
48580: 2248 moveal %a0,%a1 48582: 5089 addql #8,%a1 48584: 2009 movel %a1,%d0 48586: 4c46 0007 remul %d6,%d7,%d0 4858a: 2d49 fff4 movel %a1,%fp@(-12) 4858e: 4a87 tstl %d7 48590: 6600 0378 bnew 4890a <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48594: 7cfe moveq #-2,%d6 48596: 7001 moveq #1,%d0 48598: cca8 0004 andl %a0@(4),%d6 4859c: c0b0 6804 andl %a0@(00000004,%d6:l),%d0 485a0: 6600 0382 bnew 48924 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
485a4: 2c28 000c movel %a0@(12),%d6 485a8: b5c6 cmpal %d6,%a2
485aa: 6654 bnes 48600 <_Heap_Walk+0x16c> <== NEVER TAKEN
485ac: 2e2e ffec movel %fp@(-20),%d7 485b0: 2243 moveal %d3,%a1 485b2: 2d47 fff4 movel %d7,%fp@(-12) 485b6: 2e0c movel %a4,%d7 485b8: 2841 moveal %d1,%a4 485ba: 2d44 fff0 movel %d4,%fp@(-16)
(*printer)(
485be: 2008 movel %a0,%d0
return false;
}
prev_block = free_block;
free_block = free_block->next;
485c0: 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 ) {
485c4: b1c6 cmpal %d6,%a0 485c6: 6700 0126 beqw 486ee <_Heap_Walk+0x25a> 485ca: b1c7 cmpal %d7,%a0
485cc: 656e bcss 4863c <_Heap_Walk+0x1a8>
);
return false;
}
if (
485ce: 2208 movel %a0,%d1 485d0: 5081 addql #8,%d1 485d2: b1ee fff8 cmpal %fp@(-8),%a0
485d6: 6264 bhis 4863c <_Heap_Walk+0x1a8> <== NEVER TAKEN
485d8: 282e fffc movel %fp@(-4),%d4 485dc: 4c44 1003 remul %d4,%d3,%d1 485e0: 4a83 tstl %d3 485e2: 6600 0326 bnew 4890a <_Heap_Walk+0x476>
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
485e6: 72fe moveq #-2,%d1 485e8: 7601 moveq #1,%d3 485ea: c2a8 0004 andl %a0@(4),%d1 485ee: c6b0 1804 andl %a0@(00000004,%d1:l),%d3 485f2: 6600 0330 bnew 48924 <_Heap_Walk+0x490>
);
return false;
}
if ( free_block->prev != prev_block ) {
485f6: 2228 000c movel %a0@(12),%d1 485fa: b081 cmpl %d1,%d0
485fc: 67c0 beqs 485be <_Heap_Walk+0x12a>
485fe: 2c01 movel %d1,%d6
(*printer)(
48600: 2f06 movel %d6,%sp@- 48602: 2f08 movel %a0,%sp@- 48604: 4879 0005 fc4f pea 5fc4f <_Status_Object_name_errors_to_status+0x205>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4860a: 4878 0001 pea 1 <ADD> 4860e: 2f02 movel %d2,%sp@- 48610: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48612: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48616: 4200 clrb %d0
block = next_block;
}
return true;
}
48618: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4861e: 4e5e unlk %fp 48620: 4e75 rts
return false;
}
if ( first_block->prev_size != page_size ) {
(*printer)(
48622: 2f03 movel %d3,%sp@- 48624: 2f08 movel %a0,%sp@- 48626: 4879 0005 fba3 pea 5fba3 <_Status_Object_name_errors_to_status+0x159>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4862c: 4878 0001 pea 1 <ADD> 48630: 2f02 movel %d2,%sp@- 48632: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48634: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48638: 4200 clrb %d0 4863a: 60dc bras 48618 <_Heap_Walk+0x184>
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 ) ) {
(*printer)(
4863c: 2f08 movel %a0,%sp@- 4863e: 4879 0005 fbe3 pea 5fbe3 <_Status_Object_name_errors_to_status+0x199>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48644: 4878 0001 pea 1 <ADD> 48648: 2f02 movel %d2,%sp@- 4864a: 4e95 jsr %a5@ 4864c: 4fef 0010 lea %sp@(16),%sp 48650: 4200 clrb %d0
block = next_block;
}
return true;
}
48652: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48658: 4e5e unlk %fp 4865a: 4e75 rts
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
4865c: 4879 0005 faef pea 5faef <_Status_Object_name_errors_to_status+0xa5>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48662: 4878 0001 pea 1 <ADD> 48666: 2f02 movel %d2,%sp@- 48668: 4e95 jsr %a5@ 4866a: 4fef 000c lea %sp@(12),%sp 4866e: 4200 clrb %d0
block = next_block;
}
return true;
}
48670: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48676: 4e5e unlk %fp 48678: 4e75 rts
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4867a: 2f03 movel %d3,%sp@- 4867c: 4879 0005 fb02 pea 5fb02 <_Status_Object_name_errors_to_status+0xb8>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48682: 4878 0001 pea 1 <ADD> 48686: 2f02 movel %d2,%sp@- 48688: 4e95 jsr %a5@ 4868a: 4fef 0010 lea %sp@(16),%sp 4868e: 4200 clrb %d0 48690: 60c0 bras 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
48692: 2f04 movel %d4,%sp@- 48694: 4879 0005 fb20 pea 5fb20 <_Status_Object_name_errors_to_status+0xd6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4869a: 4878 0001 pea 1 <ADD> 4869e: 2f02 movel %d2,%sp@- 486a0: 4e95 jsr %a5@ 486a2: 4fef 0010 lea %sp@(16),%sp 486a6: 4200 clrb %d0 486a8: 60a8 bras 48652 <_Heap_Walk+0x1be>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
486aa: 2f0b movel %a3,%sp@- 486ac: 4879 0005 fb44 pea 5fb44 <_Status_Object_name_errors_to_status+0xfa>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
486b2: 4878 0001 pea 1 <ADD> 486b6: 2f02 movel %d2,%sp@- 486b8: 4e95 jsr %a5@ 486ba: 4fef 0010 lea %sp@(16),%sp 486be: 4200 clrb %d0 486c0: 6090 bras 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
486c2: 4879 0005 fb75 pea 5fb75 <_Status_Object_name_errors_to_status+0x12b> 486c8: 4878 0001 pea 1 <ADD> 486cc: 2f02 movel %d2,%sp@- 486ce: 4e95 jsr %a5@ 486d0: 4fef 000c lea %sp@(12),%sp 486d4: 4200 clrb %d0 486d6: 6098 bras 48670 <_Heap_Walk+0x1dc>
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
486d8: 4879 0005 fbce pea 5fbce <_Status_Object_name_errors_to_status+0x184>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
486de: 4878 0001 pea 1 <ADD> 486e2: 2f02 movel %d2,%sp@- 486e4: 4e95 jsr %a5@ 486e6: 4fef 000c lea %sp@(12),%sp 486ea: 4200 clrb %d0 486ec: 6082 bras 48670 <_Heap_Walk+0x1dc> 486ee: 202e fff4 movel %fp@(-12),%d0 486f2: 2609 movel %a1,%d3 486f4: 220c movel %a4,%d1 486f6: 282e fff0 movel %fp@(-16),%d4 486fa: 2d40 ffec movel %d0,%fp@(-20)
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
486fe: b7c5 cmpal %d5,%a3 48700: 6700 fdca beqw 484cc <_Heap_Walk+0x38> 48704: 2c2e ffec movel %fp@(-20),%d6 48708: 2d43 fff8 movel %d3,%fp@(-8)
- 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;
4870c: 76fe moveq #-2,%d3 4870e: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48710: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
48714: 4a01 tstb %d1 48716: 6700 0126 beqw 4883e <_Heap_Walk+0x3aa>
(*printer)(
4871a: 2f06 movel %d6,%sp@- 4871c: 2f0b movel %a3,%sp@- 4871e: 4879 0005 fc81 pea 5fc81 <_Status_Object_name_errors_to_status+0x237> 48724: 42a7 clrl %sp@- 48726: 2f02 movel %d2,%sp@- 48728: 4e95 jsr %a5@ 4872a: 4fef 0014 lea %sp@(20),%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
4872e: b9ea 0020 cmpal %a2@(32),%a4 48732: 6500 00d0 bcsw 48804 <_Heap_Walk+0x370> 48736: b9ea 0024 cmpal %a2@(36),%a4 4873a: 6200 00c8 bhiw 48804 <_Heap_Walk+0x370>
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
4873e: 2e2e fff8 movel %fp@(-8),%d7 48742: 2206 movel %d6,%d1 48744: 4c47 1000 remul %d7,%d0,%d1 48748: 4a80 tstl %d0 4874a: 6600 0162 bnew 488ae <_Heap_Walk+0x41a>
);
return false;
}
if ( block_size < min_block_size ) {
4874e: bc84 cmpl %d4,%d6 48750: 6500 0178 bcsw 488ca <_Heap_Walk+0x436>
);
return false;
}
if ( next_block_begin <= block_begin ) {
48754: b9cb cmpal %a3,%a4 48756: 6300 0196 blsw 488ee <_Heap_Walk+0x45a>
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
4875a: 7001 moveq #1,%d0 4875c: c0ac 0004 andl %a4@(4),%d0 48760: 4a00 tstb %d0 48762: 6600 00bc bnew 48820 <_Heap_Walk+0x38c>
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;
48766: 262b 0004 movel %a3@(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;
4876a: 7cfe moveq #-2,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4876c: 2e0b movel %a3,%d7
return _Heap_Free_list_head(heap)->next;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
4876e: 43f9 0005 fd77 lea 5fd77 <_Status_Object_name_errors_to_status+0x32d>,%a1
- 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;
48774: cc83 andl %d3,%d6
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48776: 206a 0008 moveal %a2@(8),%a0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4877a: de86 addl %d6,%d7
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)(
4877c: 222b 0008 movel %a3@(8),%d1
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48780: 2d48 fffc movel %a0,%fp@(-4)
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_last( Heap_Control *heap )
{
return _Heap_Free_list_tail(heap)->prev;
48784: b2aa 000c cmpl %a2@(12),%d1
48788: 6710 beqs 4879a <_Heap_Walk+0x306>
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
4878a: 43f9 0005 fd81 lea 5fd81 <_Status_Object_name_errors_to_status+0x337>,%a1 48790: b5c1 cmpal %d1,%a2
48792: 6706 beqs 4879a <_Heap_Walk+0x306>
48794: 43f9 0005 f9bc lea 5f9bc <rtems_filesystem_default_pathconf+0x40>,%a1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
4879a: 202b 000c movel %a3@(12),%d0 4879e: 41f9 0005 fd8b lea 5fd8b <_Status_Object_name_errors_to_status+0x341>,%a0 487a4: b0ae fffc cmpl %fp@(-4),%d0
487a8: 6710 beqs 487ba <_Heap_Walk+0x326>
"block 0x%08x: prev 0x%08x%s, next 0x%08x%s\n",
block,
block->prev,
block->prev == first_free_block ?
" (= first)"
: (block->prev == free_list_head ? " (= head)" : ""),
487aa: 41f9 0005 fd96 lea 5fd96 <_Status_Object_name_errors_to_status+0x34c>,%a0 487b0: b5c0 cmpal %d0,%a2
487b2: 6706 beqs 487ba <_Heap_Walk+0x326>
487b4: 41f9 0005 f9bc lea 5f9bc <rtems_filesystem_default_pathconf+0x40>,%a0
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)(
487ba: 2f09 movel %a1,%sp@- 487bc: 2f01 movel %d1,%sp@- 487be: 2f08 movel %a0,%sp@- 487c0: 2f00 movel %d0,%sp@- 487c2: 2f0b movel %a3,%sp@- 487c4: 4879 0005 fda0 pea 5fda0 <_Status_Object_name_errors_to_status+0x356> 487ca: 42a7 clrl %sp@- 487cc: 2f02 movel %d2,%sp@- 487ce: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
487d0: 4fef 0020 lea %sp@(32),%sp 487d4: 2247 moveal %d7,%a1 487d6: 2011 movel %a1@,%d0 487d8: b086 cmpl %d6,%d0 487da: 6700 0082 beqw 4885e <_Heap_Walk+0x3ca>
(*printer)(
487de: 2f07 movel %d7,%sp@- 487e0: 2f00 movel %d0,%sp@- 487e2: 2f06 movel %d6,%sp@- 487e4: 2f0b movel %a3,%sp@- 487e6: 4879 0005 fdcc pea 5fdcc <_Status_Object_name_errors_to_status+0x382> 487ec: 4878 0001 pea 1 <ADD> 487f0: 2f02 movel %d2,%sp@- 487f2: 4e95 jsr %a5@ 487f4: 4fef 001c lea %sp@(28),%sp
block = next_block;
}
return true;
}
487f8: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
" (= last)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
487fe: 4200 clrb %d0
block = next_block;
}
return true;
}
48800: 4e5e unlk %fp 48802: 4e75 rts
block->prev_size
);
}
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
48804: 2f0c movel %a4,%sp@- 48806: 2f0b movel %a3,%sp@- 48808: 4879 0005 fcbd pea 5fcbd <_Status_Object_name_errors_to_status+0x273>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4880e: 4878 0001 pea 1 <ADD> 48812: 2f02 movel %d2,%sp@- 48814: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48816: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
4881a: 4200 clrb %d0 4881c: 6000 fdfa braw 48618 <_Heap_Walk+0x184>
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
}
while ( block != last_block ) {
48820: b9c5 cmpal %d5,%a4 48822: 6700 fca8 beqw 484cc <_Heap_Walk+0x38>
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 ) {
48826: 2c2c 0004 movel %a4@(4),%d6 4882a: 7201 moveq #1,%d1
- 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;
4882c: 76fe moveq #-2,%d3 4882e: 264c moveal %a4,%a3 48830: c286 andl %d6,%d1 48832: cc83 andl %d3,%d6
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48834: 49f3 6800 lea %a3@(00000000,%d6:l),%a4
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
if ( prev_used ) {
48838: 4a01 tstb %d1 4883a: 6600 fede bnew 4871a <_Heap_Walk+0x286>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
4883e: 2f13 movel %a3@,%sp@- 48840: 2f06 movel %d6,%sp@- 48842: 2f0b movel %a3,%sp@- 48844: 4879 0005 fc98 pea 5fc98 <_Status_Object_name_errors_to_status+0x24e> 4884a: 42a7 clrl %sp@- 4884c: 2f02 movel %d2,%sp@- 4884e: 4e95 jsr %a5@ 48850: 4fef 0018 lea %sp@(24),%sp
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
48854: b9ea 0020 cmpal %a2@(32),%a4
48858: 65aa bcss 48804 <_Heap_Walk+0x370> <== NEVER TAKEN
4885a: 6000 feda braw 48736 <_Heap_Walk+0x2a2>
);
return false;
}
if ( !prev_used ) {
4885e: 7001 moveq #1,%d0 48860: c680 andl %d0,%d3 48862: 4a03 tstb %d3
48864: 672e beqs 48894 <_Heap_Walk+0x400>
return &heap->free_list;
}
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Free_list_first( Heap_Control *heap )
{
return _Heap_Free_list_head(heap)->next;
48866: 206a 0008 moveal %a2@(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 ) {
4886a: b5c8 cmpal %a0,%a2
4886c: 670c beqs 4887a <_Heap_Walk+0x3e6> <== NEVER TAKEN
if ( free_block == block ) {
4886e: b7c8 cmpal %a0,%a3
48870: 67ae beqs 48820 <_Heap_Walk+0x38c>
return true;
}
free_block = free_block->next;
48872: 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 ) {
48876: b5c8 cmpal %a0,%a2
48878: 66f4 bnes 4886e <_Heap_Walk+0x3da>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4887a: 2f0b movel %a3,%sp@- 4887c: 4879 0005 fe34 pea 5fe34 <_Status_Object_name_errors_to_status+0x3ea> 48882: 4878 0001 pea 1 <ADD> 48886: 2f02 movel %d2,%sp@- 48888: 4e95 jsr %a5@ 4888a: 4fef 0010 lea %sp@(16),%sp 4888e: 4200 clrb %d0 48890: 6000 fdc0 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !prev_used ) {
(*printer)(
48894: 2f0b movel %a3,%sp@- 48896: 4879 0005 fe05 pea 5fe05 <_Status_Object_name_errors_to_status+0x3bb>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4889c: 4878 0001 pea 1 <ADD> 488a0: 2f02 movel %d2,%sp@- 488a2: 4e95 jsr %a5@ 488a4: 4fef 0010 lea %sp@(16),%sp 488a8: 4200 clrb %d0 488aa: 6000 fda6 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) ) {
(*printer)(
488ae: 2f06 movel %d6,%sp@- 488b0: 2f0b movel %a3,%sp@- 488b2: 4879 0005 fcea pea 5fcea <_Status_Object_name_errors_to_status+0x2a0>
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488b8: 4878 0001 pea 1 <ADD> 488bc: 2f02 movel %d2,%sp@- 488be: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
488c0: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488c4: 4200 clrb %d0 488c6: 6000 fd50 braw 48618 <_Heap_Walk+0x184>
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
488ca: 2f04 movel %d4,%sp@- 488cc: 2f06 movel %d6,%sp@- 488ce: 2f0b movel %a3,%sp@- 488d0: 4879 0005 fd18 pea 5fd18 <_Status_Object_name_errors_to_status+0x2ce> 488d6: 4878 0001 pea 1 <ADD> 488da: 2f02 movel %d2,%sp@- 488dc: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
488de: 4fef 0018 lea %sp@(24),%sp
block = next_block;
}
return true;
}
488e2: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( block_size < min_block_size ) {
(*printer)(
488e8: 4200 clrb %d0
block = next_block;
}
return true;
}
488ea: 4e5e unlk %fp 488ec: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
488ee: 2f0c movel %a4,%sp@- 488f0: 2f0b movel %a3,%sp@- 488f2: 4879 0005 fd43 pea 5fd43 <_Status_Object_name_errors_to_status+0x2f9> 488f8: 4878 0001 pea 1 <ADD> 488fc: 2f02 movel %d2,%sp@- 488fe: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
48900: 4fef 0014 lea %sp@(20),%sp
return false;
}
if ( next_block_begin <= block_begin ) {
(*printer)(
48904: 4200 clrb %d0 48906: 6000 fd10 braw 48618 <_Heap_Walk+0x184>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4890a: 2f08 movel %a0,%sp@- 4890c: 4879 0005 fc03 pea 5fc03 <_Status_Object_name_errors_to_status+0x1b9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48912: 4878 0001 pea 1 <ADD> 48916: 2f02 movel %d2,%sp@- 48918: 4e95 jsr %a5@ 4891a: 4fef 0010 lea %sp@(16),%sp 4891e: 4200 clrb %d0 48920: 6000 fd30 braw 48652 <_Heap_Walk+0x1be>
return false;
}
if ( _Heap_Is_used( free_block ) ) {
(*printer)(
48924: 2f08 movel %a0,%sp@- 48926: 4879 0005 fc33 pea 5fc33 <_Status_Object_name_errors_to_status+0x1e9>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4892c: 4878 0001 pea 1 <ADD> 48930: 2f02 movel %d2,%sp@- 48932: 4e95 jsr %a5@ 48934: 4fef 0010 lea %sp@(16),%sp 48938: 4200 clrb %d0 4893a: 6000 fd16 braw 48652 <_Heap_Walk+0x1be>
00046e44 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46e44: 4e56 0000 linkw %fp,#0 46e48: 2f0a movel %a2,%sp@- 46e4a: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e4c: 4ab9 0006 1ce6 tstl 61ce6 <_IO_Number_of_drivers>
46e52: 671e beqs 46e72 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46e54: 4282 clrl %d2 46e56: 45f9 0004 d2c8 lea 4d2c8 <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46e5c: 42a7 clrl %sp@- 46e5e: 42a7 clrl %sp@- 46e60: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e62: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46e64: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e66: 4fef 000c lea %sp@(12),%sp 46e6a: b4b9 0006 1ce6 cmpl 61ce6 <_IO_Number_of_drivers>,%d2
46e70: 65ea bcss 46e5c <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46e72: 242e fff8 movel %fp@(-8),%d2 46e76: 246e fffc moveal %fp@(-4),%a2
46e7a: 4e5e unlk %fp <== NOT EXECUTED
00046e7e <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46e7e: 4e56 fff0 linkw %fp,#-16 46e82: 48d7 003c moveml %d2-%d5,%sp@
uint32_t index;
rtems_driver_address_table *driver_table;
uint32_t drivers_in_table;
uint32_t number_of_drivers;
driver_table = Configuration.Device_driver_table;
46e86: 2639 0005 fc86 movel 5fc86 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46e8c: 2439 0005 fc82 movel 5fc82 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46e92: 2839 0005 fc7e movel 5fc7e <Configuration+0x2a>,%d4
/*
* If the user claims there are less drivers than are actually in
* the table, then let's just go with the table's count.
*/
if ( number_of_drivers <= drivers_in_table )
46e98: b882 cmpl %d2,%d4
46e9a: 6216 bhis 46eb2 <_IO_Manager_initialization+0x34>
* If the maximum number of driver is the same as the number in the
* table, then we do not have to copy the driver table. They can't
* register any dynamically.
*/
if ( number_of_drivers == drivers_in_table ) {
_IO_Driver_address_table = driver_table;
46e9c: 23c3 0006 1cea movel %d3,61cea <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46ea2: 23c2 0006 1ce6 movel %d2,61ce6 <_IO_Number_of_drivers>
);
for ( index = 0 ; index < drivers_in_table ; index++ )
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
46ea8: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46eae: 4e5e unlk %fp 46eb0: 4e75 rts
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
46eb2: 2004 movel %d4,%d0 46eb4: 2a04 movel %d4,%d5 46eb6: e788 lsll #3,%d0 46eb8: eb8d lsll #5,%d5 46eba: 9a80 subl %d0,%d5 46ebc: 2f05 movel %d5,%sp@- 46ebe: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ec4: 2f05 movel %d5,%sp@- 46ec6: 42a7 clrl %sp@-
_IO_Driver_address_table = (rtems_driver_address_table *)
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
46ec8: 23c4 0006 1ce6 movel %d4,61ce6 <_IO_Number_of_drivers>
memset(
46ece: 2f00 movel %d0,%sp@-
/*
* The application requested extra slots in the driver table, so we
* have to allocate a new driver table and copy theirs to it.
*/
_IO_Driver_address_table = (rtems_driver_address_table *)
46ed0: 23c0 0006 1cea movel %d0,61cea <_IO_Driver_address_table>
_Workspace_Allocate_or_fatal_error(
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46ed6: 4eb9 0005 0e48 jsr 50e48 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46edc: 4fef 0010 lea %sp@(16),%sp 46ee0: 4a82 tstl %d2
46ee2: 67c4 beqs 46ea8 <_IO_Manager_initialization+0x2a><== NEVER TAKEN
46ee4: 2839 0006 1cea movel 61cea <_IO_Driver_address_table>,%d4 46eea: 4280 clrl %d0 46eec: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46eee: 2243 moveal %d3,%a1 46ef0: 2044 moveal %d4,%a0 46ef2: d3c0 addal %d0,%a1 46ef4: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46ef6: 5281 addql #1,%d1 46ef8: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46efe: 20d9 movel %a1@+,%a0@+ 46f00: 20d9 movel %a1@+,%a0@+ 46f02: 20d9 movel %a1@+,%a0@+ 46f04: 20d9 movel %a1@+,%a0@+ 46f06: 20d9 movel %a1@+,%a0@+ 46f08: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f0a: b282 cmpl %d2,%d1
46f0c: 649a bccs 46ea8 <_IO_Manager_initialization+0x2a>
_IO_Driver_address_table[index] = driver_table[index];
46f0e: 2243 moveal %d3,%a1 46f10: 2044 moveal %d4,%a0 46f12: d3c0 addal %d0,%a1 46f14: d1c0 addal %d0,%a0
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f16: 5281 addql #1,%d1 46f18: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46f1e: 20d9 movel %a1@+,%a0@+ 46f20: 20d9 movel %a1@+,%a0@+ 46f22: 20d9 movel %a1@+,%a0@+ 46f24: 20d9 movel %a1@+,%a0@+ 46f26: 20d9 movel %a1@+,%a0@+ 46f28: 2091 movel %a1@,%a0@
memset(
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46f2a: b282 cmpl %d2,%d1
46f2c: 65c0 bcss 46eee <_IO_Manager_initialization+0x70><== NEVER TAKEN
46f2e: 6000 ff78 braw 46ea8 <_IO_Manager_initialization+0x2a>
...
00047b00 <_ISR_Handler_initialization>:
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
47b00: 4e56 0000 linkw %fp,#0
_ISR_Signals_to_thread_executing = false;
47b04: 4200 clrb %d0
*
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
47b06: 2f0a movel %a2,%sp@-
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b08: 4878 0400 pea 400 <D_BIAS+0x2> 47b0c: 45f9 0004 9d10 lea 49d10 <_Workspace_Allocate_or_fatal_error>,%a2
* Output parameters: NONE
*/
void _ISR_Handler_initialization( void )
{
_ISR_Signals_to_thread_executing = false;
47b12: 13c0 0006 1574 moveb %d0,61574 <_ISR_Signals_to_thread_executing>
_ISR_Nest_level = 0;
47b18: 42b9 0006 14c6 clrl 614c6 <_ISR_Nest_level>
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b1e: 4e92 jsr %a2@
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
47b20: 2239 0005 fc70 movel 5fc70 <Configuration+0x1c>,%d1 47b26: 588f addql #4,%sp
_ISR_Signals_to_thread_executing = false;
_ISR_Nest_level = 0;
#if (CPU_SIMPLE_VECTORED_INTERRUPTS == TRUE)
_ISR_Vector_table = _Workspace_Allocate_or_fatal_error(
47b28: 23c0 0006 14a6 movel %d0,614a6 <_ISR_Vector_table>
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
47b2e: b2b9 0005 fc4e cmpl 5fc4e <rtems_minimum_stack_size>,%d1
47b34: 6522 bcss 47b58 <_ISR_Handler_initialization+0x58><== NEVER TAKEN
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
47b36: 2f01 movel %d1,%sp@- 47b38: 4e92 jsr %a2@
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b3a: 246e fffc moveal %fp@(-4),%a2
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
47b3e: 2200 movel %d0,%d1 47b40: d2b9 0005 fc70 addl 5fc70 <Configuration+0x1c>,%d1 47b46: 588f addql #4,%sp
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b48: 4e5e unlk %fp
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
Configuration.interrupt_stack_size
);
_CPU_Interrupt_stack_high = _Addresses_Add_offset(
47b4a: 23c1 0006 13e0 movel %d1,613e0 <_CPU_Interrupt_stack_high>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_INTERRUPT_STACK_TOO_SMALL
);
_CPU_Interrupt_stack_low = _Workspace_Allocate_or_fatal_error(
47b50: 23c0 0006 143c movel %d0,6143c <_CPU_Interrupt_stack_low>
#if ( CPU_HAS_HARDWARE_INTERRUPT_STACK == TRUE )
_CPU_Install_interrupt_stack();
#endif
}
47b56: 4e75 rts
_CPU_Initialize_vectors();
#if ( CPU_ALLOCATE_INTERRUPT_STACK == TRUE )
if ( !_Stack_Is_enough(Configuration.interrupt_stack_size) )
_Internal_error_Occurred(
47b58: 4878 0005 pea 5 <COMPARE> 47b5c: 4878 0001 pea 1 <ADD> 47b60: 42a7 clrl %sp@- 47b62: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
00047aa4 <_Internal_error_Occurred>:
_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 );
47aa4: 4280 clrl %d0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47aa6: 4e56 0000 linkw %fp,#0 47aaa: 222e 000c movel %fp@(12),%d1
_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 );
47aae: 1001 moveb %d1,%d0 47ab0: 2040 moveal %d0,%a0
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47ab2: 2f03 movel %d3,%sp@- 47ab4: 202e 0008 movel %fp@(8),%d0 47ab8: 2f02 movel %d2,%sp@- 47aba: 242e 0010 movel %fp@(16),%d2
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47abe: 2f02 movel %d2,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47ac0: 13c1 0006 14d6 moveb %d1,614d6 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47ac6: 2f08 movel %a0,%sp@-
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47ac8: 23c0 0006 14d2 movel %d0,614d2 <_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 );
47ace: 2f00 movel %d0,%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;
47ad0: 23c2 0006 14d8 movel %d2,614d8 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47ad6: 4eb9 0004 9942 jsr 49942 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47adc: 307c 0700 moveaw #1792,%a0 47ae0: 2608 movel %a0,%d3 47ae2: 40c0 movew %sr,%d0 47ae4: 8083 orl %d3,%d0 47ae6: 46c0 movew %d0,%sr
47ae8: 2002 movel %d2,%d0 <== NOT EXECUTED 47aea: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47af0: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47af2: 7005 moveq #5,%d0 47af4: 4fef 000c lea %sp@(12),%sp 47af8: 23c0 0006 15b4 movel %d0,615b4 <_System_state_Current> 47afe: 60fe bras 47afe <_Internal_error_Occurred+0x5a>
00047b68 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47b68: 4e56 fff0 linkw %fp,#-16 47b6c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47b70: 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 )
47b74: 4aaa 0014 tstl %a2@(20)
47b78: 660c bnes 47b86 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
47b7a: 4280 clrl %d0 <== NOT EXECUTED
information->inactive--;
}
}
return the_object;
}
47b7c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b82: 4e5e unlk %fp 47b84: 4e75 rts
/*
* 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 );
47b86: 240a movel %a2,%d2 47b88: 0682 0000 001c addil #28,%d2 47b8e: 47f9 0004 71d0 lea 471d0 <_Chain_Get>,%a3 47b94: 2f02 movel %d2,%sp@- 47b96: 4e93 jsr %a3@
if ( information->auto_extend ) {
47b98: 588f addql #4,%sp 47b9a: 4a2a 0010 tstb %a2@(16)
47b9e: 67dc beqs 47b7c <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47ba0: 4a80 tstl %d0
47ba2: 6738 beqs 47bdc <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47ba4: 2040 moveal %d0,%a0 47ba6: 4281 clrl %d1 47ba8: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47baa: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bac: 362a 0008 movew %a2@(8),%d3 47bb0: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47bb4: 306a 0028 moveaw %a2@(40),%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bb8: 342a 0012 movew %a2@(18),%d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47bbc: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
information->inactive--;
47bbe: 5388 subql #1,%a0
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bc0: 4c42 1001 remul %d2,%d1,%d1
information->inactive--;
47bc4: 3548 0028 movew %a0,%a2@(40)
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bc8: 206a 002a moveal %a2@(42),%a0 47bcc: e589 lsll #2,%d1
information->inactive--;
}
}
return the_object;
}
47bce: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47bd4: 4e5e unlk %fp
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47bd6: d1c1 addal %d1,%a0 47bd8: 5390 subql #1,%a0@
information->inactive--;
}
}
return the_object;
}
47bda: 4e75 rts
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
_Objects_Extend_information( information );
47bdc: 2f0a movel %a2,%sp@- 47bde: 4eb9 0004 7c24 jsr 47c24 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47be4: 2f02 movel %d2,%sp@- 47be6: 4e93 jsr %a3@
}
if ( the_object ) {
47be8: 508f addql #8,%sp 47bea: 4a80 tstl %d0
47bec: 66b6 bnes 47ba4 <_Objects_Allocate+0x3c>
information->inactive--;
}
}
return the_object;
}
47bee: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47bf4: 4e5e unlk %fp <== NOT EXECUTED
00047bf8 <_Objects_Close>:
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47bf8: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47bfa: 4e56 0000 linkw %fp,#0 47bfe: 226e 000c moveal %fp@(12),%a1 47c02: 206e 0008 moveal %fp@(8),%a0 47c06: 2f0a movel %a2,%sp@- 47c08: 2468 0018 moveal %a0@(24),%a2 47c0c: 3029 000a movew %a1@(10),%d0 47c10: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c14: 2d49 000c movel %a1,%fp@(12)
}
47c18: 245f moveal %sp@+,%a2 47c1a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47c1c: 4ef9 0004 8180 jmp 48180 <_Objects_Namespace_remove>
...
00047c24 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47c24: 4e56 ffcc linkw %fp,#-52 47c28: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47c2c: 246e 0008 moveal %fp@(8),%a2
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
47c30: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c32: 206a 002e moveal %a2@(46),%a0
/*
* Search for a free block of indexes. The block variable ends up set
* to block_count + 1 if the table needs to be extended.
*/
minimum_index = _Objects_Get_index( information->minimum_id );
47c36: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47c3a: 4a88 tstl %a0 47c3c: 6700 022c beqw 47e6a <_Objects_Extend_information+0x246>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47c40: 322a 000e movew %a2@(14),%d1 47c44: 302a 0012 movew %a2@(18),%d0 47c48: 3801 movew %d1,%d4 47c4a: 0284 0000 ffff andil #65535,%d4 47c50: 88c0 divuw %d0,%d4 47c52: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47c58: 6700 0224 beqw 47e7e <_Objects_Extend_information+0x25a>
if ( information->object_blocks[ block ] == NULL )
47c5c: 4a90 tstl %a0@ 47c5e: 6700 021e beqw 47e7e <_Objects_Extend_information+0x25a> 47c62: 5888 addql #4,%a0 47c64: 2605 movel %d5,%d3 47c66: 4282 clrl %d2 47c68: 0280 0000 ffff andil #65535,%d0
break;
else
index_base += information->allocation_size;
47c6e: d680 addl %d0,%d3
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47c70: 5282 addql #1,%d2 47c72: b484 cmpl %d4,%d2
47c74: 6404 bccs 47c7a <_Objects_Extend_information+0x56>
if ( information->object_blocks[ block ] == NULL )
47c76: 4a98 tstl %a0@+
47c78: 66f4 bnes 47c6e <_Objects_Extend_information+0x4a>
else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47c7a: 0281 0000 ffff andil #65535,%d1 47c80: 2641 moveal %d1,%a3 47c82: d7c0 addal %d0,%a3
/*
* We need to limit the number of objects to the maximum number
* representable in the index portion of the object Id. In the
* case of 16-bit Ids, this is only 256 object instances.
*/
if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
47c84: b7fc 0000 ffff cmpal #65535,%a3 47c8a: 6200 0186 bhiw 47e12 <_Objects_Extend_information+0x1ee>
/*
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
47c8e: 41ea 0014 lea %a2@(20),%a0 47c92: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47c96: 4a2a 0010 tstb %a2@(16) 47c9a: 6700 0180 beqw 47e1c <_Objects_Extend_information+0x1f8>
new_object_block = _Workspace_Allocate( block_size );
47c9e: 2f00 movel %d0,%sp@- 47ca0: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !new_object_block )
47ca6: 588f addql #4,%sp
* Allocate the name table, and the objects and if it fails either return or
* generate a fatal error depending on auto-extending being active.
*/
block_size = information->allocation_size * information->size;
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
47ca8: 2c00 movel %d0,%d6
if ( !new_object_block )
47caa: 6700 0166 beqw 47e12 <_Objects_Extend_information+0x1ee>
}
/*
* If the index_base is the maximum we need to grow the tables.
*/
if (index_base >= information->maximum ) {
47cae: 4280 clrl %d0 47cb0: 302a 000e movew %a2@(14),%d0 47cb4: b083 cmpl %d3,%d0 47cb6: 6200 00c4 bhiw 47d7c <_Objects_Extend_information+0x158>
*/
/*
* Up the block count and maximum
*/
block_count++;
47cba: 2a44 moveal %d4,%a5 47cbc: 528d addql #1,%a5
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47cbe: 200b movel %a3,%d0 47cc0: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0 47cc4: d088 addl %a0,%d0 47cc6: d085 addl %d5,%d0 47cc8: e588 lsll #2,%d0 47cca: 2f00 movel %d0,%sp@- 47ccc: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !object_blocks ) {
47cd2: 588f addql #4,%sp
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47cd4: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47cd6: 4a80 tstl %d0 47cd8: 6700 01b2 beqw 47e8c <_Objects_Extend_information+0x268>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47cdc: 2e0d movel %a5,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47cde: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47ce0: e58f lsll #2,%d7
* Take the block count down. Saves all the (block_count - 1)
* in the copies.
*/
block_count--;
if ( information->maximum > minimum_index ) {
47ce2: 302a 000e movew %a2@(14),%d0
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
47ce6: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47cea: de8d addl %a5,%d7 47cec: b085 cmpl %d5,%d0 47cee: 6200 013c bhiw 47e2c <_Objects_Extend_information+0x208>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47cf2: 4a85 tstl %d5
47cf4: 670c beqs 47d02 <_Objects_Extend_information+0xde><== NEVER TAKEN
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47cf6: 2047 moveal %d7,%a0 47cf8: 4280 clrl %d0
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
local_table[ index ] = NULL;
47cfa: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47cfc: 5280 addql #1,%d0 47cfe: b085 cmpl %d5,%d0
47d00: 65f8 bcss 47cfa <_Objects_Extend_information+0xd6><== NEVER TAKEN
47d02: e58c lsll #2,%d4
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d04: 4281 clrl %d1 47d06: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47d0a: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47d0e: d283 addl %d3,%d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47d10: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d14: b283 cmpl %d3,%d1
47d16: 6310 blss 47d28 <_Objects_Extend_information+0x104><== NEVER TAKEN
47d18: 2247 moveal %d7,%a1 47d1a: 2003 movel %d3,%d0 47d1c: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47d20: 4298 clrl %a0@+
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
index++ ) {
47d22: 5280 addql #1,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47d24: b081 cmpl %d1,%d0
47d26: 65f8 bcss 47d20 <_Objects_Extend_information+0xfc>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47d28: 203c 0000 0700 movel #1792,%d0 47d2e: 40c4 movew %sr,%d4 47d30: 8084 orl %d4,%d0 47d32: 46c0 movew %d0,%sr
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d34: 2012 movel %a2@,%d0 47d36: 7218 moveq #24,%d1 47d38: 4285 clrl %d5 47d3a: e3a8 lsll %d1,%d0 47d3c: 3a0b movew %a3,%d5 47d3e: 4281 clrl %d1 47d40: 2245 moveal %d5,%a1 47d42: 7a1b moveq #27,%d5 47d44: 322a 0004 movew %a2@(4),%d1 47d48: 08c0 0010 bset #16,%d0
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47d4c: 206a 002e moveal %a2@(46),%a0
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d50: eba9 lsll %d5,%d1
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47d52: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
47d56: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d5a: 8081 orl %d1,%d0 47d5c: 2209 movel %a1,%d1 47d5e: 8280 orl %d0,%d1
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
47d60: 254d 002a movel %a5,%a2@(42)
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
information->maximum_id = _Objects_Build_id(
47d64: 2541 000a movel %d1,%a2@(10)
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
47d68: 2547 0018 movel %d7,%a2@(24)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47d6c: 46c4 movew %d4,%sr
if ( old_tables )
47d6e: 4a88 tstl %a0
47d70: 670a beqs 47d7c <_Objects_Extend_information+0x158>
_Workspace_Free( old_tables );
47d72: 2f08 movel %a0,%sp@- 47d74: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 47d7a: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d7c: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d80: 4280 clrl %d0 47d82: 280e movel %fp,%d4 47d84: 0684 ffff fff4 addil #-12,%d4 47d8a: 47f9 0004 71d0 lea 471d0 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d90: 2a0a movel %a2,%d5 47d92: 0685 0000 001c addil #28,%d5 47d98: 49f9 0004 7170 lea 47170 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d9e: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47da0: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47da4: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47da8: 2f2a 0014 movel %a2@(20),%sp@- 47dac: 2f00 movel %d0,%sp@- 47dae: 2f06 movel %d6,%sp@- 47db0: 2f04 movel %d4,%sp@- 47db2: 4eb9 0004 d324 jsr 4d324 <_Chain_Initialize>
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47db8: 4fef 0010 lea %sp@(16),%sp 47dbc: 2f04 movel %d4,%sp@- 47dbe: 4e93 jsr %a3@ 47dc0: 588f addql #4,%sp 47dc2: 4a80 tstl %d0
47dc4: 6732 beqs 47df8 <_Objects_Extend_information+0x1d4><== NEVER TAKEN
the_object->id = _Objects_Build_id(
47dc6: 2212 movel %a2@,%d1 47dc8: 7c18 moveq #24,%d6 47dca: 7e1b moveq #27,%d7 47dcc: 2040 moveal %d0,%a0 47dce: eda9 lsll %d6,%d1 47dd0: 4286 clrl %d6 47dd2: 3c2a 0004 movew %a2@(4),%d6 47dd6: 08c1 0010 bset #16,%d1 47dda: efae lsll %d7,%d6 47ddc: 8286 orl %d6,%d1 47dde: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47de0: 5283 addql #1,%d3
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
the_object->id = _Objects_Build_id(
47de2: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47de6: 2f00 movel %d0,%sp@- 47de8: 2f05 movel %d5,%sp@- 47dea: 4e94 jsr %a4@
index++;
47dec: 508f addql #8,%sp
/*
* Move from the local chain, initialise, then append to the inactive chain
*/
index = index_base;
while ((the_object = (Objects_Control *) _Chain_Get( &Inactive )) != NULL ) {
47dee: 2f04 movel %d4,%sp@- 47df0: 4e93 jsr %a3@ 47df2: 588f addql #4,%sp 47df4: 4a80 tstl %d0
47df6: 66ce bnes 47dc6 <_Objects_Extend_information+0x1a2>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47df8: 4280 clrl %d0
information->inactive =
47dfa: 322a 0028 movew %a2@(40),%d1 47dfe: 326a 0012 moveaw %a2@(18),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e02: 206a 002a moveal %a2@(42),%a0
information->inactive =
47e06: d289 addl %a1,%d1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e08: 3009 movew %a1,%d0
information->inactive =
47e0a: 3541 0028 movew %d1,%a2@(40)
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47e0e: 2180 2800 movel %d0,%a0@(00000000,%d2:l)
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e12: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e18: 4e5e unlk %fp 47e1a: 4e75 rts
if ( information->auto_extend ) {
new_object_block = _Workspace_Allocate( block_size );
if ( !new_object_block )
return;
} else {
new_object_block = _Workspace_Allocate_or_fatal_error( block_size );
47e1c: 2f00 movel %d0,%sp@- 47e1e: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error> 47e24: 588f addql #4,%sp 47e26: 2c00 movel %d0,%d6 47e28: 6000 fe84 braw 47cae <_Objects_Extend_information+0x8a>
/*
* Copy each section of the table over. This has to be performed as
* separate parts as size of each block has changed.
*/
memcpy( object_blocks,
47e2c: e58c lsll #2,%d4 47e2e: 2f04 movel %d4,%sp@- 47e30: 2f2a 002e movel %a2@(46),%sp@- 47e34: 2f0c movel %a4,%sp@- 47e36: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47e3c: 2f04 movel %d4,%sp@- 47e3e: 2f2a 002a movel %a2@(42),%sp@- 47e42: 2f0d movel %a5,%sp@- 47e44: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47e4a: 4280 clrl %d0 47e4c: 302a 000e movew %a2@(14),%d0 47e50: da80 addl %d0,%d5 47e52: e58d lsll #2,%d5 47e54: 2f05 movel %d5,%sp@- 47e56: 2f2a 0018 movel %a2@(24),%sp@- 47e5a: 2f07 movel %d7,%sp@- 47e5c: 4eb9 0005 0dd8 jsr 50dd8 <memcpy> 47e62: 4fef 0024 lea %sp@(36),%sp 47e66: 6000 fe9c braw 47d04 <_Objects_Extend_information+0xe0>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47e6a: 4280 clrl %d0 47e6c: 2605 movel %d5,%d3 47e6e: 4282 clrl %d2 47e70: 4284 clrl %d4 47e72: 322a 000e movew %a2@(14),%d1 47e76: 302a 0012 movew %a2@(18),%d0 47e7a: 6000 fdfe braw 47c7a <_Objects_Extend_information+0x56>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL )
47e7e: 2605 movel %d5,%d3 <== NOT EXECUTED 47e80: 4282 clrl %d2 <== NOT EXECUTED 47e82: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED 47e88: 6000 fdf0 braw 47c7a <_Objects_Extend_information+0x56><== NOT EXECUTED
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
if ( !object_blocks ) {
_Workspace_Free( new_object_block );
47e8c: 2f06 movel %d6,%sp@- 47e8e: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free>
return;
47e94: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e96: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
47e9c: 4e5e unlk %fp <== NOT EXECUTED
00047f50 <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
47f50: 4e56 0000 linkw %fp,#0 47f54: 2f02 movel %d2,%sp@- 47f56: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47f5a: 660a bnes 47f66 <_Objects_Get_information+0x16>
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
47f5c: 4280 clrl %d0
return NULL;
#endif
return info;
}
47f5e: 242e fffc movel %fp@(-4),%d2 47f62: 4e5e unlk %fp 47f64: 4e75 rts
/*
* 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 );
47f66: 2f2e 0008 movel %fp@(8),%sp@- 47f6a: 4eb9 0004 d96c jsr 4d96c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47f70: 588f addql #4,%sp 47f72: 4a80 tstl %d0
47f74: 67e6 beqs 47f5c <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47f76: b082 cmpl %d2,%d0
47f78: 65e2 bcss 47f5c <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47f7a: 202e 0008 movel %fp@(8),%d0 47f7e: 41f9 0006 13e4 lea 613e4 <_Objects_Information_table>,%a0 47f84: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f88: 4a88 tstl %a0
47f8a: 67d0 beqs 47f5c <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47f8c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47f90: 67cc beqs 47f5e <_Objects_Get_information+0xe> <== NEVER TAKEN
* In a multprocessing configuration, we may access remote objects.
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
47f92: 2040 moveal %d0,%a0 47f94: 4a68 000e tstw %a0@(14)
47f98: 67c2 beqs 47f5c <_Objects_Get_information+0xc>
return NULL;
#endif
return info;
}
47f9a: 242e fffc movel %fp@(-4),%d2 47f9e: 4e5e unlk %fp
...
00049a38 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
49a38: 4e56 ffe0 linkw %fp,#-32 49a3c: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49a40: 262e 000c movel %fp@(12),%d3 49a44: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
49a48: 4a83 tstl %d3
49a4a: 660e bnes 49a5a <_Objects_Get_name_as_string+0x22>
}
}
*d = '\0';
_Thread_Enable_dispatch();
return name;
49a4c: 4282 clrl %d2
} return NULL; /* unreachable path */ }
49a4e: 2002 movel %d2,%d0 49a50: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49a56: 4e5e unlk %fp 49a58: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
49a5a: 4a82 tstl %d2
49a5c: 67f0 beqs 49a4e <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49a5e: 4aae 0008 tstl %fp@(8) 49a62: 6700 0092 beqw 49af6 <_Objects_Get_name_as_string+0xbe> 49a66: 282e 0008 movel %fp@(8),%d4
information = _Objects_Get_information_id( tmpId );
49a6a: 2f04 movel %d4,%sp@- 49a6c: 4eb9 0004 9958 jsr 49958 <_Objects_Get_information_id>
if ( !information )
49a72: 588f addql #4,%sp
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
information = _Objects_Get_information_id( tmpId );
49a74: 2440 moveal %d0,%a2
if ( !information )
49a76: 4a80 tstl %d0
49a78: 67d2 beqs 49a4c <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49a7a: 486e fffc pea %fp@(-4) 49a7e: 2f04 movel %d4,%sp@- 49a80: 2f00 movel %d0,%sp@- 49a82: 4eb9 0004 9b38 jsr 49b38 <_Objects_Get>
switch ( location ) {
49a88: 4fef 000c lea %sp@(12),%sp 49a8c: 4aae fffc tstl %fp@(-4)
49a90: 66ba bnes 49a4c <_Objects_Get_name_as_string+0x14>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
49a92: 4a2a 0032 tstb %a2@(50)
49a96: 676c beqs 49b04 <_Objects_Get_name_as_string+0xcc>
s = the_object->name.name_p;
49a98: 2040 moveal %d0,%a0 49a9a: 2468 000c moveal %a0@(12),%a2
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
49a9e: 4a8a tstl %a2
49aa0: 6748 beqs 49aea <_Objects_Get_name_as_string+0xb2>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49aa2: 5383 subql #1,%d3
49aa4: 6744 beqs 49aea <_Objects_Get_name_as_string+0xb2><== NEVER TAKEN
49aa6: 1012 moveb %a2@,%d0
49aa8: 6740 beqs 49aea <_Objects_Get_name_as_string+0xb2>
49aaa: 2042 moveal %d2,%a0 49aac: 4281 clrl %d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49aae: 4284 clrl %d4 49ab0: 1800 moveb %d0,%d4
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49ab2: 5281 addql #1,%d1
*d = (isprint((unsigned char)*s)) ? *s : '*';
49ab4: 2279 0006 2604 moveal 62604 <__ctype_ptr__>,%a1 49aba: 1831 4801 moveb %a1@(00000001,%d4:l),%d4 49abe: 49c4 extbl %d4 49ac0: 0284 0000 0097 andil #151,%d4
49ac6: 6602 bnes 49aca <_Objects_Get_name_as_string+0x92>
49ac8: 702a moveq #42,%d0 49aca: 10c0 moveb %d0,%a0@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49acc: b681 cmpl %d1,%d3
49ace: 6306 blss 49ad6 <_Objects_Get_name_as_string+0x9e>
49ad0: 1032 1800 moveb %a2@(00000000,%d1:l),%d0
49ad4: 66d8 bnes 49aae <_Objects_Get_name_as_string+0x76>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49ad6: 4210 clrb %a0@
_Thread_Enable_dispatch();
49ad8: 4eb9 0004 a3c0 jsr 4a3c0 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49ade: 2002 movel %d2,%d0 49ae0: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49ae6: 4e5e unlk %fp 49ae8: 4e75 rts
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49aea: 2042 moveal %d2,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49aec: 4210 clrb %a0@
_Thread_Enable_dispatch();
49aee: 4eb9 0004 a3c0 jsr 4a3c0 <_Thread_Enable_dispatch> 49af4: 60e8 bras 49ade <_Objects_Get_name_as_string+0xa6>
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49af6: 2079 0006 4116 moveal 64116 <_Thread_Executing>,%a0 49afc: 2828 0008 movel %a0@(8),%d4 49b00: 6000 ff68 braw 49a6a <_Objects_Get_name_as_string+0x32>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49b04: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b06: 7218 moveq #24,%d1
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b08: 45ee fff7 lea %fp@(-9),%a2
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49b0c: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b10: 2a00 movel %d0,%d5 49b12: e2ad lsrl %d1,%d5
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b14: 2200 movel %d0,%d1
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b16: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b18: e089 lsrl #8,%d1
lname[ 3 ] = (u32_name >> 0) & 0xff;
49b1a: 1d40 fffa moveb %d0,%fp@(-6)
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b1e: 4244 clrw %d4 49b20: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b22: 4200 clrb %d0
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49b24: 1d45 fff7 moveb %d5,%fp@(-9)
lname[ 1 ] = (u32_name >> 16) & 0xff;
49b28: 1d44 fff8 moveb %d4,%fp@(-8)
lname[ 2 ] = (u32_name >> 8) & 0xff;
49b2c: 1d41 fff9 moveb %d1,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49b30: 1d40 fffb moveb %d0,%fp@(-5) 49b34: 6000 ff6c braw 49aa2 <_Objects_Get_name_as_string+0x6a>
0005c368 <_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;
5c368: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5c36a: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c36c: 4e56 0000 linkw %fp,#0 5c370: 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;
5c374: 90a8 0006 subl %a0@(6),%d0 5c378: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5c37c: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5c380: 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 ) {
5c384: b280 cmpl %d0,%d1
5c386: 6510 bcss 5c398 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5c388: 2068 0018 moveal %a0@(24),%a0 5c38c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5c390: 6706 beqs 5c398 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5c392: 4291 clrl %a1@
* This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ *location = OBJECTS_ERROR; return NULL; }
5c394: 4e5e unlk %fp 5c396: 4e75 rts
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5c398: 7001 moveq #1,%d0
return NULL; }
5c39a: 4e5e unlk %fp
/*
* This isn't supported or required yet for Global objects so
* if it isn't local, we don't find it.
*/
*location = OBJECTS_ERROR;
5c39c: 2280 movel %d0,%a1@ 5c39e: 4280 clrl %d0
return NULL;
}
...
000497a4 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
497a4: 4e56 fffc linkw %fp,#-4 497a8: 222e 0008 movel %fp@(8),%d1 497ac: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
497ae: 4a81 tstl %d1
497b0: 660a bnes 497bc <_Objects_Id_to_name+0x18>
497b2: 2079 0006 321e moveal 6321e <_Thread_Executing>,%a0 497b8: 2228 0008 movel %a0@(8),%d1
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
497bc: 7418 moveq #24,%d2 497be: 2001 movel %d1,%d0 497c0: e4a8 lsrl %d2,%d0 497c2: 143c 0007 moveb #7,%d2 497c6: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
497c8: 143c 0003 moveb #3,%d2 497cc: 2040 moveal %d0,%a0 497ce: 5388 subql #1,%a0 497d0: b488 cmpl %a0,%d2
497d2: 6522 bcss 497f6 <_Objects_Id_to_name+0x52>
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
497d4: 41f9 0006 311c lea 6311c <_Objects_Information_table>,%a0 497da: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 497de: 4a88 tstl %a0
497e0: 6714 beqs 497f6 <_Objects_Id_to_name+0x52>
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
497e2: 2001 movel %d1,%d0 497e4: 741b moveq #27,%d2 497e6: e4a8 lsrl %d2,%d0 497e8: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
497ec: 4a88 tstl %a0
497ee: 6706 beqs 497f6 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
497f0: 4a28 0032 tstb %a0@(50)
497f4: 670a beqs 49800 <_Objects_Id_to_name+0x5c> <== ALWAYS TAKEN
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
497f6: 242e fff8 movel %fp@(-8),%d2
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
497fa: 7003 moveq #3,%d0
}
497fc: 4e5e unlk %fp 497fe: 4e75 rts
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
return OBJECTS_INVALID_ID;
#endif
the_object = _Objects_Get( information, tmpId, &ignored_location );
49800: 486e fffc pea %fp@(-4) 49804: 2f01 movel %d1,%sp@- 49806: 2f08 movel %a0,%sp@- 49808: 4eb9 0004 9738 jsr 49738 <_Objects_Get>
if ( !the_object )
4980e: 4fef 000c lea %sp@(12),%sp 49812: 4a80 tstl %d0
49814: 67e0 beqs 497f6 <_Objects_Id_to_name+0x52>
return OBJECTS_INVALID_ID;
*name = the_object->name;
49816: 206e 000c moveal %fp@(12),%a0 4981a: 2240 moveal %d0,%a1 4981c: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
49820: 4eb9 0004 a0cc jsr 4a0cc <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
49826: 242e fff8 movel %fp@(-8),%d2
the_object = _Objects_Get( information, tmpId, &ignored_location );
if ( !the_object )
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
4982a: 4280 clrl %d0
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
4982c: 4e5e unlk %fp <== NOT EXECUTED
000481b0 <_Objects_Name_to_id_u32>:
Objects_Information *information,
uint32_t name,
uint32_t node,
Objects_Id *id
)
{
481b0: 4e56 fff4 linkw %fp,#-12 481b4: 206e 0008 moveal %fp@(8),%a0 481b8: 48d7 040c moveml %d2-%d3/%a2,%sp@ 481bc: 222e 000c movel %fp@(12),%d1 481c0: 202e 0010 movel %fp@(16),%d0 481c4: 246e 0014 moveal %fp@(20),%a2
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
481c8: 4a8a tstl %a2
481ca: 675a beqs 48226 <_Objects_Name_to_id_u32+0x76>
return OBJECTS_INVALID_ADDRESS;
if ( name == 0 )
481cc: 4a81 tstl %d1
481ce: 6718 beqs 481e8 <_Objects_Name_to_id_u32+0x38>
return OBJECTS_INVALID_NAME;
search_local_node = false;
if ( information->maximum != 0 &&
481d0: 3428 000e movew %a0@(14),%d2
481d4: 6712 beqs 481e8 <_Objects_Name_to_id_u32+0x38> <== NEVER TAKEN
481d6: 4a80 tstl %d0
481d8: 6718 beqs 481f2 <_Objects_Name_to_id_u32+0x42>
481da: 0c80 7fff ffff cmpil #2147483647,%d0
481e0: 6710 beqs 481f2 <_Objects_Name_to_id_u32+0x42>
481e2: 7601 moveq #1,%d3 481e4: b680 cmpl %d0,%d3
481e6: 670a beqs 481f2 <_Objects_Name_to_id_u32+0x42>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
481e8: 7001 moveq #1,%d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
481ea: 4cd7 040c moveml %sp@,%d2-%d3/%a2 481ee: 4e5e unlk %fp 481f0: 4e75 rts
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
481f2: 2068 0018 moveal %a0@(24),%a0 481f6: 7001 moveq #1,%d0 481f8: 5888 addql #4,%a0 481fa: 0282 0000 ffff andil #65535,%d2
the_object = information->local_table[ index ];
48200: 2250 moveal %a0@,%a1
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
48202: 5280 addql #1,%d0 48204: 5888 addql #4,%a0
the_object = information->local_table[ index ];
if ( !the_object )
48206: 4a89 tstl %a1
48208: 6706 beqs 48210 <_Objects_Name_to_id_u32+0x60>
continue;
if ( name == the_object->name.name_u32 ) {
4820a: b2a9 000c cmpl %a1@(12),%d1
4820e: 6708 beqs 48218 <_Objects_Name_to_id_u32+0x68>
search_local_node = true;
if ( search_local_node ) {
name_length = information->name_length;
for ( index = 1; index <= information->maximum; index++ ) {
48210: b082 cmpl %d2,%d0
48212: 63ec blss 48200 <_Objects_Name_to_id_u32+0x50>
48214: 7001 moveq #1,%d0 48216: 60d2 bras 481ea <_Objects_Name_to_id_u32+0x3a>
the_object = information->local_table[ index ];
if ( !the_object )
continue;
if ( name == the_object->name.name_u32 ) {
*id = the_object->id;
48218: 24a9 0008 movel %a1@(8),%a2@ 4821c: 4280 clrl %d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
4821e: 4cd7 040c moveml %sp@,%d2-%d3/%a2 48222: 4e5e unlk %fp 48224: 4e75 rts
Objects_Name name_for_mp;
#endif
/* ASSERT: information->is_string == false */
if ( !id )
48226: 7002 moveq #2,%d0
name_for_mp.name_u32 = name; return _Objects_MP_Global_name_search( information, name_for_mp, node, id ); #else return OBJECTS_INVALID_NAME; #endif }
48228: 4cd7 040c moveml %sp@,%d2-%d3/%a2
4822c: 4e5e unlk %fp <== NOT EXECUTED
000485b0 <_Objects_Set_name>:
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485b0: 4280 clrl %d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
485b2: 4e56 fff0 linkw %fp,#-16 485b6: 48d7 3c00 moveml %a2-%a5,%sp@ 485ba: 286e 0008 moveal %fp@(8),%a4 485be: 246e 0010 moveal %fp@(16),%a2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485c2: 302c 0034 movew %a4@(52),%d0 485c6: 2f00 movel %d0,%sp@-
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
485c8: 2a6e 000c moveal %fp@(12),%a5
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485cc: 2f0a movel %a2,%sp@- 485ce: 4eb9 0005 22c4 jsr 522c4 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
485d4: 508f addql #8,%sp
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
485d6: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
485d8: 4a2c 0032 tstb %a4@(50)
485dc: 6662 bnes 48640 <_Objects_Set_name+0x90>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
485de: 7018 moveq #24,%d0 485e0: 1212 moveb %a2@,%d1 485e2: 49c1 extbl %d1 485e4: e1a9 lsll %d0,%d1 485e6: 103c 0001 moveb #1,%d0 485ea: b08b cmpl %a3,%d0
485ec: 643c bccs 4862a <_Objects_Set_name+0x7a>
485ee: 102a 0001 moveb %a2@(1),%d0 485f2: 49c0 extbl %d0 485f4: 4840 swap %d0 485f6: 4240 clrw %d0 485f8: 8081 orl %d1,%d0 485fa: 7202 moveq #2,%d1 485fc: b28b cmpl %a3,%d1
485fe: 6730 beqs 48630 <_Objects_Set_name+0x80>
48600: 122a 0002 moveb %a2@(2),%d1 48604: 49c1 extbl %d1 48606: e189 lsll #8,%d1 48608: 8081 orl %d1,%d0 4860a: 7203 moveq #3,%d1 4860c: b28b cmpl %a3,%d1 4860e: 6700 0088 beqw 48698 <_Objects_Set_name+0xe8> 48612: 122a 0003 moveb %a2@(3),%d1 48616: 49c1 extbl %d1 48618: 8081 orl %d1,%d0 4861a: 2b40 000c movel %d0,%a5@(12) 4861e: 7001 moveq #1,%d0
);
}
return true;
}
48620: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48626: 4e5e unlk %fp 48628: 4e75 rts
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
4862a: 2001 movel %d1,%d0 4862c: 08c0 0015 bset #21,%d0 48630: 7220 moveq #32,%d1 48632: 08c0 000d bset #13,%d0 48636: 8081 orl %d1,%d0 48638: 2b40 000c movel %d0,%a5@(12) 4863c: 7001 moveq #1,%d0 4863e: 60e0 bras 48620 <_Objects_Set_name+0x70>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
48640: 486b 0001 pea %a3@(1) 48644: 4eb9 0004 a1bc jsr 4a1bc <_Workspace_Allocate>
if ( !d )
4864a: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
4864c: 2840 moveal %d0,%a4
if ( !d )
4864e: 4a80 tstl %d0
48650: 673a beqs 4868c <_Objects_Set_name+0xdc> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
48652: 202d 000c movel %a5@(12),%d0
48656: 670e beqs 48666 <_Objects_Set_name+0xb6>
_Workspace_Free( (void *)the_object->name.name_p );
48658: 2f00 movel %d0,%sp@- 4865a: 4eb9 0004 a1d8 jsr 4a1d8 <_Workspace_Free>
the_object->name.name_p = NULL;
48660: 588f addql #4,%sp 48662: 42ad 000c clrl %a5@(12)
}
strncpy( d, name, length );
48666: 2f0b movel %a3,%sp@- 48668: 2f0a movel %a2,%sp@- 4866a: 2f0c movel %a4,%sp@- 4866c: 4eb9 0005 223c jsr 5223c <strncpy>
d[length] = '\0';
the_object->name.name_p = d;
48672: 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';
48676: 4200 clrb %d0 48678: 1980 b800 moveb %d0,%a4@(00000000,%a3:l)
the_object->name.name_p = d;
4867c: 7001 moveq #1,%d0 4867e: 2b4c 000c movel %a4,%a5@(12)
);
}
return true;
}
48682: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48688: 4e5e unlk %fp 4868a: 4e75 rts
4868c: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
48692: 4200 clrb %d0 <== NOT EXECUTED
);
}
return true;
}
48694: 4e5e unlk %fp <== NOT EXECUTED 48696: 4e75 rts <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
48698: 123c 0020 moveb #32,%d1 4869c: 8081 orl %d1,%d0 4869e: 2b40 000c movel %d0,%a5@(12) 486a2: 7001 moveq #1,%d0 486a4: 6000 ff7a braw 48620 <_Objects_Set_name+0x70>
00048230 <_Objects_Shrink_information>:
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
48230: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
48232: 4e56 ffec linkw %fp,#-20 48236: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4823a: 246e 0008 moveal %fp@(8),%a2
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
4823e: 4283 clrl %d3
block_count = (information->maximum - index_base) /
48240: 4284 clrl %d4
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
48242: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
48246: 382a 000e movew %a2@(14),%d4 4824a: 322a 0012 movew %a2@(18),%d1 4824e: 9883 subl %d3,%d4 48250: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48254: 672c beqs 48282 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
48256: 226a 002a moveal %a2@(42),%a1 4825a: b291 cmpl %a1@,%d1
4825c: 672e beqs 4828c <_Objects_Shrink_information+0x5c><== NEVER TAKEN
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4825e: 7404 moveq #4,%d2 48260: 4280 clrl %d0
}
index_base += information->allocation_size;
48262: 2042 moveal %d2,%a0 48264: d681 addl %d1,%d3 48266: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48268: 5280 addql #1,%d0 4826a: b084 cmpl %d4,%d0
4826c: 6414 bccs 48282 <_Objects_Shrink_information+0x52><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
4826e: b2b1 2800 cmpl %a1@(00000000,%d2:l),%d1
48272: 671a beqs 4828e <_Objects_Shrink_information+0x5e>
48274: 2408 movel %a0,%d2
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48276: 2042 moveal %d2,%a0 48278: d681 addl %d1,%d3 4827a: 5888 addql #4,%a0
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
4827c: 5280 addql #1,%d0 4827e: b084 cmpl %d4,%d0
48280: 65ec bcss 4826e <_Objects_Shrink_information+0x3e>
return;
}
index_base += information->allocation_size;
}
}
48282: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48288: 4e5e unlk %fp 4828a: 4e75 rts
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
if ( information->inactive_per_block[ block ] ==
4828c: 4282 clrl %d2 <== NOT EXECUTED
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
4828e: 206a 001c moveal %a2@(28),%a0
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
48292: 47f9 0004 71a8 lea 471a8 <_Chain_Extract>,%a3
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
do {
index = _Objects_Get_index( the_object->id );
48298: 4280 clrl %d0 4829a: 3028 000a movew %a0@(10),%d0
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
4829e: 2810 movel %a0@,%d4
if ((index >= index_base) &&
482a0: b680 cmpl %d0,%d3
482a2: 620c bhis 482b0 <_Objects_Shrink_information+0x80>
(index < (index_base + information->allocation_size))) {
482a4: 4281 clrl %d1 482a6: 322a 0012 movew %a2@(18),%d1 482aa: d283 addl %d3,%d1 482ac: b280 cmpl %d0,%d1
482ae: 623e bhis 482ee <_Objects_Shrink_information+0xbe>
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
482b0: 2044 moveal %d4,%a0 482b2: 4a84 tstl %d4
482b4: 66e2 bnes 48298 <_Objects_Shrink_information+0x68>
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
482b6: 206a 002e moveal %a2@(46),%a0 482ba: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 482be: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free>
information->object_blocks[ block ] = NULL;
482c4: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
482c8: 588f addql #4,%sp
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
482ca: 302a 0028 movew %a2@(40),%d0 482ce: 322a 0012 movew %a2@(18),%d1
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
482d2: 226a 002a moveal %a2@(42),%a1
information->inactive -= information->allocation_size;
482d6: 9081 subl %d1,%d0
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
information->inactive_per_block[ block ] = 0;
482d8: 42b1 2800 clrl %a1@(00000000,%d2:l)
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
482dc: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
482e0: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
482e4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 482ea: 4e5e unlk %fp 482ec: 4e75 rts
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
482ee: 2f08 movel %a0,%sp@- 482f0: 4e93 jsr %a3@ 482f2: 588f addql #4,%sp
}
}
while ( the_object );
482f4: 2044 moveal %d4,%a0 482f6: 4a84 tstl %d4
482f8: 669e bnes 48298 <_Objects_Shrink_information+0x68>
482fa: 60ba bras 482b6 <_Objects_Shrink_information+0x86>
000475a0 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475a0: 4e56 ffe8 linkw %fp,#-24 475a4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
475a8: 240e movel %fp,%d2 475aa: 5982 subql #4,%d2 475ac: 2f02 movel %d2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475ae: 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 ) ) {
475b2: 2f0a movel %a2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
475b4: 266e 0008 moveal %fp@(8),%a3 475b8: 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 ) ) {
475bc: 4eb9 0004 7796 jsr 47796 <_POSIX_Mutex_Get> 475c2: 508f addql #8,%sp 475c4: 4a80 tstl %d0
475c6: 6764 beqs 4762c <_POSIX_Condition_variables_Wait_support+0x8c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
475c8: 2039 0006 3e7c movel 63e7c <_Thread_Dispatch_disable_level>,%d0 475ce: 5380 subql #1,%d0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
475d0: 2f02 movel %d2,%sp@- 475d2: 23c0 0006 3e7c movel %d0,63e7c <_Thread_Dispatch_disable_level> 475d8: 2f0b movel %a3,%sp@- 475da: 4eb9 0004 738c jsr 4738c <_POSIX_Condition_variables_Get>
switch ( location ) {
475e0: 508f addql #8,%sp
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
475e2: 2840 moveal %d0,%a4
switch ( location ) {
475e4: 4aae fffc tstl %fp@(-4)
475e8: 6642 bnes 4762c <_POSIX_Condition_variables_Wait_support+0x8c>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
475ea: 202c 0014 movel %a4@(20),%d0
475ee: 6718 beqs 47608 <_POSIX_Condition_variables_Wait_support+0x68>
475f0: b092 cmpl %a2@,%d0
475f2: 6714 beqs 47608 <_POSIX_Condition_variables_Wait_support+0x68>
_Thread_Enable_dispatch();
475f4: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch> 475fa: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
475fc: 2002 movel %d2,%d0 475fe: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47604: 4e5e unlk %fp 47606: 4e75 rts
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
47608: 2f0a movel %a2,%sp@- 4760a: 4eb9 0004 79e4 jsr 479e4 <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
47610: 588f addql #4,%sp 47612: 4a03 tstb %d3
47614: 6724 beqs 4763a <_POSIX_Condition_variables_Wait_support+0x9a>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
47616: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch> 4761c: 7474 moveq #116,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
4761e: 2f0a movel %a2,%sp@- 47620: 4eb9 0004 7948 jsr 47948 <pthread_mutex_lock>
if ( mutex_status )
47626: 588f addql #4,%sp 47628: 4a80 tstl %d0
4762a: 67d0 beqs 475fc <_POSIX_Condition_variables_Wait_support+0x5c>
4762c: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4762e: 2002 movel %d2,%d0 47630: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47636: 4e5e unlk %fp 47638: 4e75 rts
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
4763a: 2952 0014 movel %a2@,%a4@(20)
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
4763e: 200c movel %a4,%d0 47640: 0680 0000 0018 addil #24,%d0
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
47646: 7201 moveq #1,%d1
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
47648: 2079 0006 3f36 moveal 63f36 <_Thread_Executing>,%a0 4764e: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
47652: 2153 0020 movel %a3@,%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;
47656: 2140 0044 movel %d0,%a0@(68) 4765a: 2941 0048 movel %d1,%a4@(72)
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
4765e: 4879 0004 b3d4 pea 4b3d4 <_Thread_queue_Timeout> 47664: 2f2e 0010 movel %fp@(16),%sp@- 47668: 2f00 movel %d0,%sp@- 4766a: 4eb9 0004 b018 jsr 4b018 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
47670: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
47676: 2079 0006 3f36 moveal 63f36 <_Thread_Executing>,%a0
if ( status && status != ETIMEDOUT )
4767c: 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;
47680: 2428 0034 movel %a0@(52),%d2
if ( status && status != ETIMEDOUT )
47684: 6798 beqs 4761e <_POSIX_Condition_variables_Wait_support+0x7e>
47686: 7074 moveq #116,%d0 47688: b082 cmpl %d2,%d0
4768a: 6792 beqs 4761e <_POSIX_Condition_variables_Wait_support+0x7e><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4768c: 2002 movel %d2,%d0 <== NOT EXECUTED 4768e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 47694: 4e5e unlk %fp <== NOT EXECUTED
0004f7c4 <_POSIX_Keys_Run_destructors>:
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
4f7c4: 7218 moveq #24,%d1
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4f7c6: 4e56 ffec linkw %fp,#-20 4f7ca: 206e 0008 moveal %fp@(8),%a0 4f7ce: 48d7 007c moveml %d2-%d6,%sp@
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
4f7d2: 2628 0008 movel %a0@(8),%d3 4f7d6: 2003 movel %d3,%d0 4f7d8: e2a8 lsrl %d1,%d0 4f7da: 123c 0007 moveb #7,%d1 4f7de: c081 andl %d1,%d0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
4f7e0: 0283 0000 ffff andil #65535,%d3 4f7e6: 2c00 movel %d0,%d6 4f7e8: 5a86 addql #5,%d6
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
4f7ea: 3039 0006 17ce movew 617ce <_POSIX_Keys_Information+0xe>,%d0
for ( index = 1 ; index <= max ; ++index ) {
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
if ( key != NULL && key->destructor != NULL ) {
void *value = key->Values [ thread_api ][ thread_index ];
4f7f0: e58b lsll #2,%d3
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f7f2: 4a40 tstw %d0
4f7f4: 660a bnes 4f800 <_POSIX_Keys_Run_destructors+0x3c>
done = false;
}
}
}
}
}
4f7f6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 4f7fc: 4e5e unlk %fp 4f7fe: 4e75 rts 4f800: 4285 clrl %d5 4f802: 7201 moveq #1,%d1 4f804: 3a00 movew %d0,%d5
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f806: 7401 moveq #1,%d2 4f808: 7801 moveq #1,%d4
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
4f80a: 2079 0006 17d8 moveal 617d8 <_POSIX_Keys_Information+0x18>,%a0
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f810: 5282 addql #1,%d2
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
4f812: 2070 1c00 moveal %a0@(00000000,%d1:l:4),%a0
if ( key != NULL && key->destructor != NULL ) {
4f816: 4a88 tstl %a0
4f818: 671e beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
4f81a: 4aa8 0010 tstl %a0@(16)
4f81e: 6718 beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
void *value = key->Values [ thread_api ][ thread_index ];
4f820: 2270 6c00 moveal %a0@(00000000,%d6:l:4),%a1 4f824: d3c3 addal %d3,%a1 4f826: 2211 movel %a1@,%d1
if ( value != NULL ) {
4f828: 670e beqs 4f838 <_POSIX_Keys_Run_destructors+0x74>
key->Values [ thread_api ][ thread_index ] = NULL;
4f82a: 4291 clrl %a1@
(*key->destructor)( value );
4f82c: 4204 clrb %d4 4f82e: 2f01 movel %d1,%sp@- 4f830: 2068 0010 moveal %a0@(16),%a0 4f834: 4e90 jsr %a0@ 4f836: 588f addql #4,%sp
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f838: 4281 clrl %d1 4f83a: 3202 movew %d2,%d1 4f83c: b285 cmpl %d5,%d1
4f83e: 63ca blss 4f80a <_POSIX_Keys_Run_destructors+0x46>
* number of iterations. An infinite loop may happen if destructors set
* thread specific data. This can be considered dubious.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
while ( !done ) {
4f840: 4a04 tstb %d4
4f842: 66b2 bnes 4f7f6 <_POSIX_Keys_Run_destructors+0x32>
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
4f844: 3039 0006 17ce movew 617ce <_POSIX_Keys_Information+0xe>,%d0
done = true;
for ( index = 1 ; index <= max ; ++index ) {
4f84a: 67aa beqs 4f7f6 <_POSIX_Keys_Run_destructors+0x32><== NEVER TAKEN
4f84c: 60b2 bras 4f800 <_POSIX_Keys_Run_destructors+0x3c>
...
0004c410 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c410: 4e56 ffe8 linkw %fp,#-24 4c414: 48d7 041c moveml %d2-%d4/%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(
4c418: 486e fffc pea %fp@(-4) 4c41c: 242e 0008 movel %fp@(8),%d2 4c420: 2f02 movel %d2,%sp@- 4c422: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c428: 246e 0014 moveal %fp@(20),%a2 4c42c: 262e 0018 movel %fp@(24),%d3 4c430: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c436: 4fef 000c lea %sp@(12),%sp 4c43a: 2040 moveal %d0,%a0 4c43c: 4aae fffc tstl %fp@(-4)
4c440: 671a beqs 4c45c <_POSIX_Message_queue_Receive_support+0x4c>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c442: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c448: 72ff moveq #-1,%d1 4c44a: 2040 moveal %d0,%a0 4c44c: 7009 moveq #9,%d0
}
4c44e: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c454: 2080 movel %d0,%a0@
}
4c456: 2001 movel %d1,%d0 4c458: 4e5e unlk %fp 4c45a: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
4c45c: 2028 0014 movel %a0@(20),%d0 4c460: 7203 moveq #3,%d1 4c462: 7801 moveq #1,%d4 4c464: c280 andl %d0,%d1 4c466: b881 cmpl %d1,%d4 4c468: 6700 00f2 beqw 4c55c <_POSIX_Message_queue_Receive_support+0x14c>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c46c: 2068 0010 moveal %a0@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4c470: 222e 0010 movel %fp@(16),%d1 4c474: b2a8 0066 cmpl %a0@(102),%d1 4c478: 6500 0098 bcsw 4c512 <_POSIX_Message_queue_Receive_support+0x102>
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c47c: 4a03 tstb %d3
4c47e: 6756 beqs 4c4d6 <_POSIX_Message_queue_Receive_support+0xc6><== NEVER TAKEN
4c480: 720e moveq #14,%d1 4c482: e2a8 lsrl %d1,%d0 4c484: 7801 moveq #1,%d4 4c486: b980 eorl %d4,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c488: 2f2e 001c movel %fp@(28),%sp@-
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c48c: c084 andl %d4,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c48e: 2f00 movel %d0,%sp@- 4c490: 486e fff8 pea %fp@(-8)
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c494: 70ff moveq #-1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c496: 2f2e 000c movel %fp@(12),%sp@- 4c49a: 2f02 movel %d2,%sp@- 4c49c: 4868 001a pea %a0@(26)
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4a0: 2d40 fff8 movel %d0,%fp@(-8)
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4a4: 4eb9 0004 e7f0 jsr 4e7f0 <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c4aa: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c4b0: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c4b6: 24a8 0024 movel %a0@(36),%a2@
4c4ba: 6d4e blts 4c50a <_POSIX_Message_queue_Receive_support+0xfa>
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
4c4bc: 4fef 0018 lea %sp@(24),%sp 4c4c0: 4aa8 0034 tstl %a0@(52)
4c4c4: 666c bnes 4c532 <_POSIX_Message_queue_Receive_support+0x122>
return length_out;
4c4c6: 222e fff8 movel %fp@(-8),%d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4ca: 2001 movel %d1,%d0 4c4cc: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c4d2: 4e5e unlk %fp 4c4d4: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4d6: 2f2e 001c movel %fp@(28),%sp@- <== NOT EXECUTED
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c4da: 4280 clrl %d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4dc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c4de: 486e fff8 pea %fp@(-8) <== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4e2: 70ff moveq #-1,%d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4e4: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c4e8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c4ea: 4868 001a pea %a0@(26) <== NOT EXECUTED
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c4ee: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c4f2: 4eb9 0004 e7f0 jsr 4e7f0 <_CORE_message_queue_Seize> <== NOT EXECUTED
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c4f8: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch> <== NOT EXECUTED
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c4fe: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 <== NOT EXECUTED
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c504: 24a8 0024 movel %a0@(36),%a2@ <== NOT EXECUTED 4c508: 6cb2 bges 4c4bc <_POSIX_Message_queue_Receive_support+0xac><== NOT EXECUTED
4c50a: 2212 movel %a2@,%d1 4c50c: 4481 negl %d1 4c50e: 2481 movel %d1,%a2@ 4c510: 60aa bras 4c4bc <_POSIX_Message_queue_Receive_support+0xac>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
4c512: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c518: 747a moveq #122,%d2 4c51a: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c520: 72ff moveq #-1,%d1 4c522: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c524: 2001 movel %d1,%d0
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c526: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c528: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c52e: 4e5e unlk %fp 4c530: 4e75 rts
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
return length_out;
rtems_set_errno_and_return_minus_one(
4c532: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c538: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 4c53e: 2440 moveal %d0,%a2 4c540: 2f28 0034 movel %a0@(52),%sp@- 4c544: 4eb9 0004 c810 jsr 4c810 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c54a: 588f addql #4,%sp 4c54c: 72ff moveq #-1,%d1 4c54e: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c550: 2001 movel %d1,%d0 4c552: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4c558: 4e5e unlk %fp 4c55a: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
4c55c: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c562: 7609 moveq #9,%d3 4c564: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c56a: 72ff moveq #-1,%d1 4c56c: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c56e: 2001 movel %d1,%d0
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
4c570: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c572: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2
4c578: 4e5e unlk %fp <== NOT EXECUTED
0004c5a0 <_POSIX_Message_queue_Send_support>:
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
4c5a0: 7020 moveq #32,%d0
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c5a2: 4e56 ffec linkw %fp,#-20 4c5a6: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4c5aa: 262e 0008 movel %fp@(8),%d3 4c5ae: 242e 0014 movel %fp@(20),%d2 4c5b2: 282e 0018 movel %fp@(24),%d4
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
4c5b6: b082 cmpl %d2,%d0 4c5b8: 6500 00e2 bcsw 4c69c <_POSIX_Message_queue_Send_support+0xfc> 4c5bc: 486e fffc pea %fp@(-4) 4c5c0: 2f03 movel %d3,%sp@- 4c5c2: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c5c8: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c5ce: 4fef 000c lea %sp@(12),%sp 4c5d2: 2040 moveal %d0,%a0 4c5d4: 4aae fffc tstl %fp@(-4) 4c5d8: 6600 00a8 bnew 4c682 <_POSIX_Message_queue_Send_support+0xe2>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
4c5dc: 2028 0014 movel %a0@(20),%d0 4c5e0: 7203 moveq #3,%d1 4c5e2: c280 andl %d0,%d1 4c5e4: 6700 00d0 beqw 4c6b6 <_POSIX_Message_queue_Send_support+0x116>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c5e8: 2068 0010 moveal %a0@(16),%a0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c5ec: 4a04 tstb %d4
4c5ee: 6752 beqs 4c642 <_POSIX_Message_queue_Send_support+0xa2>
4c5f0: 720e moveq #14,%d1 4c5f2: e2a8 lsrl %d1,%d0 4c5f4: 123c 0001 moveb #1,%d1
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5f8: 4482 negl %d2
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c5fa: b380 eorl %d1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5fc: 2f2e 001c movel %fp@(28),%sp@-
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c600: c081 andl %d1,%d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c602: 2f00 movel %d0,%sp@- 4c604: 2f02 movel %d2,%sp@- 4c606: 42a7 clrl %sp@- 4c608: 2f03 movel %d3,%sp@- 4c60a: 2f2e 0010 movel %fp@(16),%sp@- 4c60e: 2f2e 000c movel %fp@(12),%sp@- 4c612: 4868 001a pea %a0@(26) 4c616: 4eb9 0004 e928 jsr 4e928 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c61c: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c620: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c622: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
4c628: 7007 moveq #7,%d0 4c62a: b082 cmpl %d2,%d0
4c62c: 6748 beqs 4c676 <_POSIX_Message_queue_Send_support+0xd6>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
4c62e: 4a82 tstl %d2 4c630: 6600 00a4 bnew 4c6d6 <_POSIX_Message_queue_Send_support+0x136> 4c634: 4281 clrl %d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c636: 2001 movel %d1,%d0 4c638: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c63e: 4e5e unlk %fp 4c640: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c642: 2f2e 001c movel %fp@(28),%sp@-
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c646: 4280 clrl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c648: 4482 negl %d2 4c64a: 2f00 movel %d0,%sp@- 4c64c: 2f02 movel %d2,%sp@- 4c64e: 42a7 clrl %sp@- 4c650: 2f03 movel %d3,%sp@- 4c652: 2f2e 0010 movel %fp@(16),%sp@- 4c656: 2f2e 000c movel %fp@(12),%sp@- 4c65a: 4868 001a pea %a0@(26) 4c65e: 4eb9 0004 e928 jsr 4e928 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c664: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c668: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c66a: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
* after it wakes up. The returned status is correct for
* non-blocking operations but if we blocked, then we need
* to look at the status in our TCB.
*/
if ( msg_status == CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT )
4c670: 7007 moveq #7,%d0 4c672: b082 cmpl %d2,%d0
4c674: 66b8 bnes 4c62e <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN
msg_status = _Thread_Executing->Wait.return_code;
4c676: 2079 0006 b0b2 moveal 6b0b2 <_Thread_Executing>,%a0 4c67c: 2428 0034 movel %a0@(52),%d2 4c680: 60ac bras 4c62e <_POSIX_Message_queue_Send_support+0x8e>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c682: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c688: 72ff moveq #-1,%d1 4c68a: 2040 moveal %d0,%a0 4c68c: 7009 moveq #9,%d0
}
4c68e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c694: 2080 movel %d0,%a0@
}
4c696: 2001 movel %d1,%d0 4c698: 4e5e unlk %fp 4c69a: 4e75 rts
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
4c69c: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6a2: 7616 moveq #22,%d3 4c6a4: 72ff moveq #-1,%d1 4c6a6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6a8: 2001 movel %d1,%d0
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
4c6aa: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6ac: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c6b2: 4e5e unlk %fp 4c6b4: 4e75 rts
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
4c6b6: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c6bc: 7409 moveq #9,%d2 4c6be: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6c4: 72ff moveq #-1,%d1 4c6c6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6c8: 2001 movel %d1,%d0
switch ( location ) {
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
4c6ca: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6cc: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 4c6d2: 4e5e unlk %fp 4c6d4: 4e75 rts
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
4c6d6: 4eb9 0005 80b0 jsr 580b0 <__errno> 4c6dc: 2440 moveal %d0,%a2 4c6de: 2f02 movel %d2,%sp@- 4c6e0: 4eb9 0004 c810 jsr 4c810 <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c6e6: 588f addql #4,%sp 4c6e8: 72ff moveq #-1,%d1 4c6ea: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c6ec: 2001 movel %d1,%d0 4c6ee: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
4c6f4: 4e5e unlk %fp <== NOT EXECUTED
0004c7e4 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4c7e4: 4e56 0000 linkw %fp,#0 4c7e8: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c7ec: 2069 010e moveal %a1@(270),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4c7f0: 4aa8 00d4 tstl %a0@(212)
4c7f4: 6608 bnes 4c7fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
4c7f6: 7001 moveq #1,%d0 4c7f8: b0a8 00d8 cmpl %a0@(216),%d0
4c7fc: 6708 beqs 4c806 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4c7fe: 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();
4c800: 4ef9 0004 8c78 jmp 48c78 <_Thread_Enable_dispatch>
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
thread_support->cancelation_requested ) {
4c806: 4aa8 00dc tstl %a0@(220)
4c80a: 67f2 beqs 4c7fe <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4c80c: 4878 ffff pea ffffffff <LESS>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4c810: 2039 0006 1c30 movel 61c30 <_Thread_Dispatch_disable_level>,%d0 4c816: 5380 subql #1,%d0 4c818: 2f09 movel %a1,%sp@- 4c81a: 23c0 0006 1c30 movel %d0,61c30 <_Thread_Dispatch_disable_level> 4c820: 4eb9 0004 cf9c jsr 4cf9c <_POSIX_Thread_Exit>
{
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4c826: 508f addql #8,%sp
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4c828: 4e5e unlk %fp <== NOT EXECUTED
0004dd8c <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4dd8c: 4e56 ffe8 linkw %fp,#-24 4dd90: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4dd94: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4dd98: 47f9 0004 dd68 lea 4dd68 <_POSIX_Priority_Is_valid>,%a3 4dd9e: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4dda0: 242e 0008 movel %fp@(8),%d2 4dda4: 286e 0010 moveal %fp@(16),%a4 4dda8: 2a6e 0014 moveal %fp@(20),%a5
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4ddac: 4e93 jsr %a3@ 4ddae: 588f addql #4,%sp 4ddb0: 4a00 tstb %d0
4ddb2: 671e beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4ddb4: 4294 clrl %a4@
*budget_callout = NULL;
4ddb6: 4295 clrl %a5@
if ( policy == SCHED_OTHER ) {
4ddb8: 4a82 tstl %d2
4ddba: 6722 beqs 4ddde <_POSIX_Thread_Translate_sched_param+0x52>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
4ddbc: 7001 moveq #1,%d0 4ddbe: b082 cmpl %d2,%d0 4ddc0: 6700 0084 beqw 4de46 <_POSIX_Thread_Translate_sched_param+0xba>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4ddc4: 7002 moveq #2,%d0 4ddc6: b082 cmpl %d2,%d0 4ddc8: 6700 008a beqw 4de54 <_POSIX_Thread_Translate_sched_param+0xc8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
4ddcc: 7004 moveq #4,%d0 4ddce: b082 cmpl %d2,%d0
4ddd0: 671c beqs 4ddee <_POSIX_Thread_Translate_sched_param+0x62>
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
4ddd2: 7016 moveq #22,%d0
}
return EINVAL;
}
4ddd4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ddda: 4e5e unlk %fp 4dddc: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4ddde: 7201 moveq #1,%d1 4dde0: 4280 clrl %d0 4dde2: 2881 movel %d1,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4dde4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4ddea: 4e5e unlk %fp 4ddec: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
if ( (param->sched_ss_repl_period.tv_sec == 0) &&
4ddee: 4aaa 0008 tstl %a2@(8)
4ddf2: 6606 bnes 4ddfa <_POSIX_Thread_Translate_sched_param+0x6e>
(param->sched_ss_repl_period.tv_nsec == 0) )
4ddf4: 4aaa 000c tstl %a2@(12)
4ddf8: 67d8 beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4ddfa: 4aaa 0010 tstl %a2@(16)
4ddfe: 6606 bnes 4de06 <_POSIX_Thread_Translate_sched_param+0x7a>
(param->sched_ss_init_budget.tv_nsec == 0) )
4de00: 4aaa 0014 tstl %a2@(20)
4de04: 67cc beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4de06: 486a 0008 pea %a2@(8) 4de0a: 243c 0004 abb0 movel #306096,%d2 4de10: 2042 moveal %d2,%a0 4de12: 4e90 jsr %a0@ 4de14: 486a 0010 pea %a2@(16) 4de18: 2600 movel %d0,%d3 4de1a: 2042 moveal %d2,%a0 4de1c: 4e90 jsr %a0@ 4de1e: 508f addql #8,%sp 4de20: b083 cmpl %d3,%d0
4de22: 62ae bhis 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4de24: 2f2a 0004 movel %a2@(4),%sp@- 4de28: 4e93 jsr %a3@ 4de2a: 588f addql #4,%sp 4de2c: 4a00 tstb %d0
4de2e: 67a2 beqs 4ddd2 <_POSIX_Thread_Translate_sched_param+0x46>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4de30: 7003 moveq #3,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4de32: 2abc 0004 704c movel #290892,%a5@
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4de38: 2880 movel %d0,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
4de3a: 4280 clrl %d0
return 0;
}
return EINVAL;
}
4de3c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de42: 4e5e unlk %fp 4de44: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4de46: 4294 clrl %a4@ 4de48: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4de4a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de50: 4e5e unlk %fp 4de52: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4de54: 2880 movel %d0,%a4@ 4de56: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4de58: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4de5e: 4e5e unlk %fp
...
00046d30 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
46d30: 4e56 ff9c linkw %fp,#-100 46d34: 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;
46d38: 2479 0006 107e moveal 6107e <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
46d3e: 2839 0006 107a movel 6107a <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
46d44: 4a8a tstl %a2
46d46: 675a beqs 46da2 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46d48: 4a84 tstl %d4
46d4a: 6756 beqs 46da2 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46d4c: 240e movel %fp,%d2 46d4e: 2a0e movel %fp,%d5 46d50: 4283 clrl %d3 46d52: 0682 ffff ffc0 addil #-64,%d2 46d58: 2c3c 0004 de64 movel #319076,%d6 46d5e: 4bf9 0004 de94 lea 4de94 <pthread_attr_setinheritsched>,%a5 46d64: 49f9 0004 ded4 lea 4ded4 <pthread_attr_setstacksize>,%a4 46d6a: 5985 subql #4,%d5 46d6c: 47f9 0004 6984 lea 46984 <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 );
46d72: 2f02 movel %d2,%sp@- 46d74: 2046 moveal %d6,%a0 46d76: 4e90 jsr %a0@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46d78: 4878 0002 pea 2 <DOUBLE_FLOAT> 46d7c: 2f02 movel %d2,%sp@- 46d7e: 4e95 jsr %a5@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
46d80: 2f2a 0004 movel %a2@(4),%sp@- 46d84: 2f02 movel %d2,%sp@- 46d86: 4e94 jsr %a4@
status = pthread_create(
46d88: 42a7 clrl %sp@- 46d8a: 2f12 movel %a2@,%sp@- 46d8c: 2f02 movel %d2,%sp@- 46d8e: 2f05 movel %d5,%sp@- 46d90: 4e93 jsr %a3@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
46d92: 4fef 0024 lea %sp@(36),%sp 46d96: 4a80 tstl %d0
46d98: 6612 bnes 46dac <_POSIX_Threads_Initialize_user_threads_body+0x7c>
*
* Setting the attributes explicitly is critical, since we don't want
* to inherit the idle tasks attributes.
*/
for ( index=0 ; index < maximum ; index++ ) {
46d9a: 5283 addql #1,%d3 46d9c: 508a addql #8,%a2 46d9e: b684 cmpl %d4,%d3
46da0: 65d0 bcss 46d72 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
46da2: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 46da8: 4e5e unlk %fp 46daa: 4e75 rts
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
46dac: 2f00 movel %d0,%sp@- 46dae: 4878 0001 pea 1 <ADD> 46db2: 4878 0002 pea 2 <DOUBLE_FLOAT> 46db6: 4eb9 0004 8e68 jsr 48e68 <_Internal_error_Occurred>
0004cb0c <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4cb0c: 4e56 fff4 linkw %fp,#-12 4cb10: 48d7 1c00 moveml %a2-%a4,%sp@ 4cb14: 266e 000c moveal %fp@(12),%a3
the_thread = argument;
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 );
4cb18: 49f9 0004 ddc0 lea 4ddc0 <_Timespec_To_ticks>,%a4
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4cb1e: 246b 010e moveal %a3@(270),%a2
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4cb22: 486a 0094 pea %a2@(148) 4cb26: 4e94 jsr %a4@
*/
#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 ) {
4cb28: 588f addql #4,%sp 4cb2a: 4281 clrl %d1 4cb2c: 1239 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d1 4cb32: 92aa 0084 subl %a2@(132),%d1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
the_thread->cpu_time_budget = ticks;
4cb36: 2740 0076 movel %d0,%a3@(118)
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4cb3a: 2741 0018 movel %d1,%a3@(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 ) {
4cb3e: 4aab 001c tstl %a3@(28)
4cb42: 6606 bnes 4cb4a <_POSIX_Threads_Sporadic_budget_TSR+0x3e><== NEVER TAKEN
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
4cb44: b2ab 0014 cmpl %a3@(20),%d1
4cb48: 652c bcss 4cb76 <_POSIX_Threads_Sporadic_budget_TSR+0x6a>
#endif
}
}
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_repl_period );
4cb4a: 486a 008c pea %a2@(140) 4cb4e: 4e94 jsr %a4@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb50: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4cb52: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb56: 45ea 00a4 lea %a2@(164),%a2 4cb5a: 203c 0006 1504 movel #398596,%d0 4cb60: 2d4a 000c movel %a2,%fp@(12)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4cb64: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4cb6a: 2d40 0008 movel %d0,%fp@(8) 4cb6e: 4e5e unlk %fp 4cb70: 4ef9 0004 9aac jmp 49aac <_Watchdog_Insert>
if ( the_thread->resource_count == 0 ) {
/*
* If this would make them less important, then do not change it.
*/
if ( the_thread->current_priority > new_priority ) {
_Thread_Change_priority( the_thread, new_priority, true );
4cb76: 4878 0001 pea 1 <ADD> 4cb7a: 2f01 movel %d1,%sp@- 4cb7c: 2f0b movel %a3,%sp@- 4cb7e: 4eb9 0004 83ec jsr 483ec <_Thread_Change_priority> 4cb84: 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 );
4cb88: 486a 008c pea %a2@(140) 4cb8c: 4e94 jsr %a4@ 4cb8e: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4cb90: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4cb94: 45ea 00a4 lea %a2@(164),%a2 4cb98: 203c 0006 1504 movel #398596,%d0 4cb9e: 2d4a 000c movel %a2,%fp@(12)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
}
4cba2: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4cba8: 2d40 0008 movel %d0,%fp@(8) 4cbac: 4e5e unlk %fp 4cbae: 4ef9 0004 9aac jmp 49aac <_Watchdog_Insert>
0004cac4 <_POSIX_Threads_Sporadic_budget_callout>:
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4cac4: 4280 clrl %d0
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4cac6: 72ff moveq #-1,%d1
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4cac8: 4e56 0000 linkw %fp,#0 4cacc: 206e 0008 moveal %fp@(8),%a0 4cad0: 1039 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d0
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4cad6: 2268 010e moveal %a0@(270),%a1 4cada: 90a9 0088 subl %a1@(136),%d0
/*
* This will prevent the thread from consuming its entire "budget"
* while at low priority.
*/
the_thread->cpu_time_budget = 0xFFFFFFFF; /* XXX should be based on MAX_U32 */
4cade: 2141 0076 movel %d1,%a0@(118)
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4cae2: 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 ) {
4cae6: 4aa8 001c tstl %a0@(28)
4caea: 6606 bnes 4caf2 <_POSIX_Threads_Sporadic_budget_callout+0x2e><== 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 ) {
4caec: b0a8 0014 cmpl %a0@(20),%d0
4caf0: 6204 bhis 4caf6 <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4caf2: 4e5e unlk %fp <== NOT EXECUTED 4caf4: 4e75 rts <== NOT EXECUTED
* 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 ) {
_Thread_Change_priority( the_thread, new_priority, true );
4caf6: 4878 0001 pea 1 <ADD> 4cafa: 2f00 movel %d0,%sp@- 4cafc: 2f08 movel %a0,%sp@- 4cafe: 4eb9 0004 83ec jsr 483ec <_Thread_Change_priority> 4cb04: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4cb08: 4e5e unlk %fp <== NOT EXECUTED
0004f75c <_POSIX_Threads_cancel_run>:
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4f75c: 7001 moveq #1,%d0
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
4f75e: 4e56 ffec linkw %fp,#-20 4f762: 206e 0008 moveal %fp@(8),%a0 4f766: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
POSIX_Cancel_Handler_control *handler;
Chain_Control *handler_stack;
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f76a: 2668 010e moveal %a0@(270),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4f76e: 45eb 00e4 lea %a3@(228),%a2
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4f772: 2740 00d4 movel %d0,%a3@(212)
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
4f776: b5eb 00e0 cmpal %a3@(224),%a2
4f77a: 673c beqs 4f7b8 <_POSIX_Threads_cancel_run+0x5c>
4f77c: 49f9 0004 9d60 lea 49d60 <_Workspace_Free>,%a4
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
_ISR_Disable( level );
4f782: 243c 0000 0700 movel #1792,%d2 4f788: 2002 movel %d2,%d0 4f78a: 40c1 movew %sr,%d1 4f78c: 8081 orl %d1,%d0 4f78e: 46c0 movew %d0,%sr
handler = (POSIX_Cancel_Handler_control *)
4f790: 2a6a 0004 moveal %a2@(4),%a5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4f794: 2055 moveal %a5@,%a0
previous = the_node->previous;
4f796: 226d 0004 moveal %a5@(4),%a1
next->previous = previous; previous->next = next;
4f79a: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4f79c: 2149 0004 movel %a1,%a0@(4)
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
4f7a0: 46c1 movew %d1,%sr
(*handler->routine)( handler->arg );
4f7a2: 2f2d 000c movel %a5@(12),%sp@- 4f7a6: 206d 0008 moveal %a5@(8),%a0 4f7aa: 4e90 jsr %a0@
_Workspace_Free( handler );
4f7ac: 2f0d movel %a5,%sp@- 4f7ae: 4e94 jsr %a4@
POSIX_API_Control *thread_support;
ISR_Level level;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
4f7b0: 508f addql #8,%sp 4f7b2: b5eb 00e0 cmpal %a3@(224),%a2
4f7b6: 66d0 bnes 4f788 <_POSIX_Threads_cancel_run+0x2c> <== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
4f7b8: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4f7be: 4e5e unlk %fp
...
00046698 <_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)
{
46698: 4e56 0000 linkw %fp,#0 4669c: 2f0a movel %a2,%sp@- 4669e: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
466a2: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
466a6: 4aaa 0052 tstl %a2@(82)
466aa: 6606 bnes 466b2 <_POSIX_Timer_TSR+0x1a>
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
466ac: 4aaa 0056 tstl %a2@(86)
466b0: 672a beqs 466dc <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
activated = _POSIX_Timer_Insert_helper(
466b2: 2f0a movel %a2,%sp@- 466b4: 4879 0004 6698 pea 46698 <_POSIX_Timer_TSR> 466ba: 2f2a 0008 movel %a2@(8),%sp@- 466be: 2f2a 0062 movel %a2@(98),%sp@- 466c2: 486a 0010 pea %a2@(16) 466c6: 4eb9 0004 d5e8 jsr 4d5e8 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
466cc: 4fef 0014 lea %sp@(20),%sp 466d0: 4a00 tstb %d0
466d2: 662a bnes 466fe <_POSIX_Timer_TSR+0x66> <== ALWAYS TAKEN
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
}
466d4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 466d8: 4e5e unlk %fp <== NOT EXECUTED 466da: 4e75 rts <== NOT EXECUTED
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
} else {
/* Indicates that the timer is stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
466dc: 7004 moveq #4,%d0 <== NOT EXECUTED 466de: 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 ) ) {
466e2: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 466e6: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 466ea: 4eb9 0004 d0fc jsr 4d0fc <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
466f0: 508f addql #8,%sp <== NOT EXECUTED 466f2: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
}
466f6: 246e fffc moveal %fp@(-4),%a2 466fa: 4e5e unlk %fp 466fc: 4e75 rts
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
466fe: 486a 006a pea %a2@(106) 46702: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
46708: 588f addql #4,%sp
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
4670a: 7003 moveq #3,%d0 4670c: 1540 003c moveb %d0,%a2@(60)
/*
* The sending of the signal to the process running the handling function
* specified for that signal is simulated
*/
if ( pthread_kill ( ptimer->thread_id, ptimer->inf.sigev_signo ) ) {
46710: 2f2a 0042 movel %a2@(66),%sp@- 46714: 2f2a 0038 movel %a2@(56),%sp@- 46718: 4eb9 0004 d0fc jsr 4d0fc <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
4671e: 508f addql #8,%sp 46720: 42aa 0066 clrl %a2@(102) 46724: 60d0 bras 466f6 <_POSIX_Timer_TSR+0x5e>
...
0004c7f0 <_POSIX_signals_Abnormal_termination_handler>:
sigset_t _POSIX_signals_Pending;
void _POSIX_signals_Abnormal_termination_handler(
int signo __attribute__((unused)) )
{
4c7f0: 4e56 0000 linkw %fp,#0
exit( 1 );
4c7f4: 4878 0001 pea 1 <ADD> 4c7f8: 4eb9 0005 05c8 jsr 505c8 <exit>
...
0004fae8 <_POSIX_signals_Check_signal>:
)
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fae8: 4280 clrl %d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4faea: 4e56 ffdc linkw %fp,#-36 4faee: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4faf2: 4878 0001 pea 1 <ADD> 4faf6: 102e 0013 moveb %fp@(19),%d0 4fafa: 260e movel %fp,%d3 4fafc: 0683 ffff fff4 addil #-12,%d3
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4fb02: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fb06: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4fb08: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4fb0c: 2f03 movel %d3,%sp@- 4fb0e: 2f02 movel %d2,%sp@- 4fb10: 2f0a movel %a2,%sp@- 4fb12: 4eb9 0004 fb94 jsr 4fb94 <_POSIX_signals_Clear_signals> 4fb18: 4fef 0014 lea %sp@(20),%sp 4fb1c: 4a00 tstb %d0
4fb1e: 6766 beqs 4fb86 <_POSIX_signals_Check_signal+0x9e>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4fb20: 2202 movel %d2,%d1 4fb22: 2002 movel %d2,%d0 4fb24: 43f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a1 4fb2a: e589 lsll #2,%d1 4fb2c: e988 lsll #4,%d0 4fb2e: 9081 subl %d1,%d0 4fb30: 2040 moveal %d0,%a0 4fb32: d1fc 0006 18d6 addal #399574,%a0 4fb38: 7201 moveq #1,%d1 4fb3a: 2050 moveal %a0@,%a0 4fb3c: b288 cmpl %a0,%d1
4fb3e: 6746 beqs 4fb86 <_POSIX_signals_Check_signal+0x9e><== NEVER TAKEN
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4fb40: 2842 moveal %d2,%a4 4fb42: 47f4 2a01 lea %a4@(00000001,%d2:l:2),%a3
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
4fb46: 282a 00cc movel %a2@(204),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4fb4a: 2231 bc00 movel %a1@(00000000,%a3:l:4),%d1 4fb4e: 8284 orl %d4,%d1 4fb50: 2541 00cc movel %d1,%a2@(204)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4fb54: 7202 moveq #2,%d1 4fb56: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1
4fb5a: 6716 beqs 4fb72 <_POSIX_signals_Check_signal+0x8a>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4fb5c: 2f02 movel %d2,%sp@- 4fb5e: 4e90 jsr %a0@ 4fb60: 588f addql #4,%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4fb62: 7001 moveq #1,%d0 4fb64: 2544 00cc movel %d4,%a2@(204)
return true;
}
4fb68: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4 4fb6e: 4e5e unlk %fp 4fb70: 4e75 rts
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4fb72: 42a7 clrl %sp@- 4fb74: 2f03 movel %d3,%sp@- 4fb76: 2f02 movel %d2,%sp@- 4fb78: 4e90 jsr %a0@
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
4fb7a: 4fef 000c lea %sp@(12),%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4fb7e: 2544 00cc movel %d4,%a2@(204) 4fb82: 7001 moveq #1,%d0 4fb84: 60e2 bras 4fb68 <_POSIX_signals_Check_signal+0x80>
return true;
}
4fb86: 4cee 1c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a4
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
4fb8c: 4200 clrb %d0
}
4fb8e: 4e5e unlk %fp
...
00050518 <_POSIX_signals_Clear_process_signals>:
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
50518: 203c 0000 0700 movel #1792,%d0
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
5051e: 4e56 0000 linkw %fp,#0 50522: 222e 0008 movel %fp@(8),%d1 50526: 2f03 movel %d3,%sp@- 50528: 2f02 movel %d2,%sp@-
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
5052a: 40c2 movew %sr,%d2 5052c: 8082 orl %d2,%d0 5052e: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
50530: 2601 movel %d1,%d3 50532: 2001 movel %d1,%d0 50534: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 5053a: e58b lsll #2,%d3 5053c: e988 lsll #4,%d0 5053e: 9083 subl %d3,%d0 50540: 7602 moveq #2,%d3 50542: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3
50546: 6726 beqs 5056e <_POSIX_signals_Clear_process_signals+0x56>
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
50548: 5381 subql #1,%d1 5054a: 7001 moveq #1,%d0 5054c: e3a8 lsll %d1,%d0 5054e: 4680 notl %d0 50550: c0b9 0006 1ac2 andl 61ac2 <_POSIX_signals_Pending>,%d0 50556: 23c0 0006 1ac2 movel %d0,61ac2 <_POSIX_signals_Pending>
if ( !_POSIX_signals_Pending )
5055c: 6606 bnes 50564 <_POSIX_signals_Clear_process_signals+0x4c><== NEVER TAKEN
_Thread_Do_post_task_switch_extension--;
5055e: 53b9 0006 14ce subql #1,614ce <_Thread_Do_post_task_switch_extension>
}
_ISR_Enable( level );
50564: 46c2 movew %d2,%sr
}
50566: 241f movel %sp@+,%d2 50568: 261f movel %sp@+,%d3 5056a: 4e5e unlk %fp 5056c: 4e75 rts
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
5056e: 0680 0006 1ac6 addil #400070,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
50574: 2040 moveal %d0,%a0 50576: 5888 addql #4,%a0 50578: 2240 moveal %d0,%a1 5057a: b1d1 cmpal %a1@,%a0
5057c: 67ca beqs 50548 <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
if ( !_POSIX_signals_Pending )
_Thread_Do_post_task_switch_extension--;
}
_ISR_Enable( level );
5057e: 46c2 movew %d2,%sr <== NOT EXECUTED
}
50580: 241f movel %sp@+,%d2 <== NOT EXECUTED 50582: 261f movel %sp@+,%d3 <== NOT EXECUTED 50584: 4e5e unlk %fp <== NOT EXECUTED
0004fb94 <_POSIX_signals_Clear_signals>:
4fb94: 7001 moveq #1,%d0
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
4fb96: 4e56 ffe8 linkw %fp,#-24 4fb9a: 206e 0008 moveal %fp@(8),%a0 4fb9e: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4fba2: 242e 000c movel %fp@(12),%d2 4fba6: 2202 movel %d2,%d1 4fba8: 5381 subql #1,%d1 4fbaa: 1a2e 0017 moveb %fp@(23),%d5 4fbae: e3a8 lsll %d1,%d0
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
4fbb0: 4a2e 001b tstb %fp@(27)
4fbb4: 664e bnes 4fc04 <_POSIX_signals_Clear_signals+0x70>
4fbb6: 78ff moveq #-1,%d4
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
4fbb8: 223c 0000 0700 movel #1792,%d1 4fbbe: 40c3 movew %sr,%d3 4fbc0: 8283 orl %d3,%d1 4fbc2: 46c1 movew %d1,%sr
if ( is_global ) {
4fbc4: 4a05 tstb %d5
4fbc6: 6752 beqs 4fc1a <_POSIX_signals_Clear_signals+0x86>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
4fbc8: c0b9 0006 1ac2 andl 61ac2 <_POSIX_signals_Pending>,%d0 4fbce: c084 andl %d4,%d0
4fbd0: 676a beqs 4fc3c <_POSIX_signals_Clear_signals+0xa8>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4fbd2: 2202 movel %d2,%d1 4fbd4: 2002 movel %d2,%d0 4fbd6: 47f9 0005 0518 lea 50518 <_POSIX_signals_Clear_process_signals>,%a3 4fbdc: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 4fbe2: e589 lsll #2,%d1 4fbe4: e988 lsll #4,%d0 4fbe6: 9081 subl %d1,%d0 4fbe8: 7202 moveq #2,%d1 4fbea: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1
4fbee: 675a beqs 4fc4a <_POSIX_signals_Clear_signals+0xb6>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fbf0: 2f02 movel %d2,%sp@- 4fbf2: 4e93 jsr %a3@ 4fbf4: 588f addql #4,%sp 4fbf6: 7001 moveq #1,%d0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
4fbf8: 46c3 movew %d3,%sr
return do_callout; }
4fbfa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc00: 4e5e unlk %fp 4fc02: 4e75 rts
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
4fc04: 2828 00cc movel %a0@(204),%d4
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
4fc08: 223c 0000 0700 movel #1792,%d1
/* set blocked signals based on if checking for them, SIGNAL_ALL_MASK
* insures that no signals are blocked and all are checked.
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
4fc0e: 4684 notl %d4
signals_blocked = SIGNAL_ALL_MASK;
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
4fc10: 40c3 movew %sr,%d3 4fc12: 8283 orl %d3,%d1 4fc14: 46c1 movew %d1,%sr
if ( is_global ) {
4fc16: 4a05 tstb %d5
4fc18: 66ae bnes 4fbc8 <_POSIX_signals_Clear_signals+0x34>
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
4fc1a: 2428 00d0 movel %a0@(208),%d2 4fc1e: 2200 movel %d0,%d1 4fc20: c282 andl %d2,%d1 4fc22: c284 andl %d4,%d1
4fc24: 6716 beqs 4fc3c <_POSIX_signals_Clear_signals+0xa8>
api->signals_pending &= ~mask;
4fc26: 4680 notl %d0 4fc28: c082 andl %d2,%d0 4fc2a: 2140 00d0 movel %d0,%a0@(208) 4fc2e: 7001 moveq #1,%d0
do_callout = true;
}
}
_ISR_Enable( level );
4fc30: 46c3 movew %d3,%sr
return do_callout; }
4fc32: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc38: 4e5e unlk %fp 4fc3a: 4e75 rts
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
4fc3c: 4200 clrb %d0
do_callout = true;
}
}
_ISR_Enable( level );
4fc3e: 46c3 movew %d3,%sr
return do_callout; }
4fc40: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4fc46: 4e5e unlk %fp 4fc48: 4e75 rts
_ISR_Disable( level );
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
4fc4a: 0680 0006 1ac6 addil #400070,%d0
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4fc50: 2040 moveal %d0,%a0 4fc52: 2458 moveal %a0@+,%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4fc54: b1ca cmpal %a2,%a0
4fc56: 6744 beqs 4fc9c <_POSIX_signals_Clear_signals+0x108>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
4fc58: 2052 moveal %a2@,%a0
the_chain->first = new_first;
4fc5a: 2240 moveal %d0,%a1 4fc5c: 2288 movel %a0,%a1@
new_first->previous = _Chain_Head(the_chain);
4fc5e: 2140 0004 movel %d0,%a0@(4)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
4fc62: 2f02 movel %d2,%sp@- 4fc64: 4e93 jsr %a3@
* It may be impossible to get here with an empty chain
* BUT until that is proven we need to be defensive and
* protect against it.
*/
if ( psiginfo ) {
*info = psiginfo->Info;
4fc66: 206e 0010 moveal %fp@(16),%a0
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
the_node->previous = old_last_node;
4fc6a: 588f addql #4,%sp 4fc6c: 20ea 0008 movel %a2@(8),%a0@+ 4fc70: 20ea 000c movel %a2@(12),%a0@+ 4fc74: 20aa 0010 movel %a2@(16),%a0@
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4fc78: 24bc 0006 1a52 movel #399954,%a2@
old_last_node = the_chain->last;
4fc7e: 2279 0006 1a56 moveal 61a56 <_POSIX_signals_Inactive_siginfo+0x8>,%a1
the_chain->last = the_node;
4fc84: 23ca 0006 1a56 movel %a2,61a56 <_POSIX_signals_Inactive_siginfo+0x8>
old_last_node->next = the_node; the_node->previous = old_last_node;
4fc8a: 2549 0004 movel %a1,%a2@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4fc8e: 228a movel %a2,%a1@
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fc90: 2f02 movel %d2,%sp@- 4fc92: 4e93 jsr %a3@ 4fc94: 588f addql #4,%sp 4fc96: 7001 moveq #1,%d0 4fc98: 6000 ff5e braw 4fbf8 <_POSIX_signals_Clear_signals+0x64>
if ( is_global ) {
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
_POSIX_signals_Clear_process_signals( signo );
4fc9c: 2f02 movel %d2,%sp@- 4fc9e: 4e93 jsr %a3@ 4fca0: 588f addql #4,%sp
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4fca2: 2f02 movel %d2,%sp@- 4fca4: 4e93 jsr %a3@ 4fca6: 588f addql #4,%sp 4fca8: 7001 moveq #1,%d0 4fcaa: 6000 ff4c braw 4fbf8 <_POSIX_signals_Clear_signals+0x64>
...
0004746c <_POSIX_signals_Get_highest>:
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
4746c: 701b moveq #27,%d0 4746e: 4e56 fff4 linkw %fp,#-12 47472: 48d7 001c moveml %d2-%d4,%sp@ 47476: 242e 0008 movel %fp@(8),%d2
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
4747a: 7601 moveq #1,%d3 4747c: 2200 movel %d0,%d1 4747e: 5381 subql #1,%d1 47480: 2803 movel %d3,%d4 47482: e3ac lsll %d1,%d4 47484: 2204 movel %d4,%d1 47486: c282 andl %d2,%d1
47488: 6626 bnes 474b0 <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4748a: 5280 addql #1,%d0 4748c: 123c 0020 moveb #32,%d1 47490: b280 cmpl %d0,%d1
47492: 66e8 bnes 4747c <_POSIX_signals_Get_highest+0x10>
47494: 7001 moveq #1,%d0
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
47496: 7601 moveq #1,%d3 47498: 2200 movel %d0,%d1 4749a: 5381 subql #1,%d1 4749c: 2803 movel %d3,%d4 4749e: e3ac lsll %d1,%d4 474a0: 2204 movel %d4,%d1 474a2: c282 andl %d2,%d1
474a4: 660a bnes 474b0 <_POSIX_signals_Get_highest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
474a6: 5280 addql #1,%d0 474a8: 123c 001b moveb #27,%d1 474ac: b280 cmpl %d0,%d1
474ae: 66e8 bnes 47498 <_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; }
474b0: 4cd7 001c moveml %sp@,%d2-%d4
474b4: 4e5e unlk %fp <== NOT EXECUTED
0004c744 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
4c744: 4e56 fff0 linkw %fp,#-16 4c748: 206e 0008 moveal %fp@(8),%a0 4c74c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4c750: 2468 010e moveal %a0@(270),%a2
/*
* api may be NULL in case of a thread close in progress
*/
if ( !api )
4c754: 4a8a tstl %a2 4c756: 6700 008e beqw 4c7e6 <_POSIX_signals_Post_switch_extension+0xa2>
*
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
4c75a: 263c 0000 0700 movel #1792,%d3 4c760: 47f9 0004 fae8 lea 4fae8 <_POSIX_signals_Check_signal>,%a3 4c766: 2003 movel %d3,%d0 4c768: 40c1 movew %sr,%d1 4c76a: 8081 orl %d1,%d0 4c76c: 46c0 movew %d0,%sr
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c76e: 2039 0006 1ac2 movel 61ac2 <_POSIX_signals_Pending>,%d0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
4c774: 242a 00cc movel %a2@(204),%d2 4c778: 4682 notl %d2
(api->signals_pending | _POSIX_signals_Pending)) ) {
4c77a: 80aa 00d0 orl %a2@(208),%d0
* The first thing done is to check there are any signals to be
* processed at all. No point in doing this loop otherwise.
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
4c77e: c082 andl %d2,%d0
4c780: 6762 beqs 4c7e4 <_POSIX_signals_Post_switch_extension+0xa0>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
4c782: 46c1 movew %d1,%sr 4c784: 741b moveq #27,%d2
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
4c786: 42a7 clrl %sp@- 4c788: 2f02 movel %d2,%sp@- 4c78a: 2f0a movel %a2,%sp@- 4c78c: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c78e: 4878 0001 pea 1 <ADD> 4c792: 2f02 movel %d2,%sp@-
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c794: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c796: 2f0a movel %a2,%sp@- 4c798: 4e93 jsr %a3@
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4c79a: 4fef 0018 lea %sp@(24),%sp 4c79e: 7020 moveq #32,%d0 4c7a0: b082 cmpl %d2,%d0
4c7a2: 66e2 bnes 4c786 <_POSIX_signals_Post_switch_extension+0x42>
4c7a4: 7401 moveq #1,%d2
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
4c7a6: 42a7 clrl %sp@- 4c7a8: 2f02 movel %d2,%sp@- 4c7aa: 2f0a movel %a2,%sp@- 4c7ac: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c7ae: 4878 0001 pea 1 <ADD> 4c7b2: 2f02 movel %d2,%sp@-
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4c7b4: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c7b6: 2f0a movel %a2,%sp@- 4c7b8: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4c7ba: 4fef 0018 lea %sp@(24),%sp 4c7be: 701b moveq #27,%d0 4c7c0: b082 cmpl %d2,%d0
4c7c2: 67a2 beqs 4c766 <_POSIX_signals_Post_switch_extension+0x22><== NEVER TAKEN
_POSIX_signals_Check_signal( api, signo, false );
4c7c4: 42a7 clrl %sp@- 4c7c6: 2f02 movel %d2,%sp@- 4c7c8: 2f0a movel %a2,%sp@- 4c7ca: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4c7cc: 4878 0001 pea 1 <ADD> 4c7d0: 2f02 movel %d2,%sp@-
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4c7d2: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4c7d4: 2f0a movel %a2,%sp@- 4c7d6: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
/* Unfortunately - nothing like __SIGFIRSTNOTRT in newlib signal .h */
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
4c7d8: 4fef 0018 lea %sp@(24),%sp 4c7dc: 701b moveq #27,%d0 4c7de: b082 cmpl %d2,%d0
4c7e0: 66c4 bnes 4c7a6 <_POSIX_signals_Post_switch_extension+0x62>
4c7e2: 6082 bras 4c766 <_POSIX_signals_Post_switch_extension+0x22>
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
4c7e4: 46c1 movew %d1,%sr
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
}
4c7e6: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4c7ec: 4e5e unlk %fp <== NOT EXECUTED
00046560 <_POSIX_signals_Ualarm_TSR>:
void _POSIX_signals_Ualarm_TSR(
Objects_Id id __attribute__((unused)),
void *argument __attribute__((unused))
)
{
46560: 4e56 0000 linkw %fp,#0
/* * Send a SIGALRM but if there is a problem, ignore it. * It's OK, there isn't a way this should fail. */ (void) kill( getpid(), SIGALRM );
46564: 4eb9 0004 3084 jsr 43084 <getpid> 4656a: 4878 000e pea e <OPER1+0x2> 4656e: 2f00 movel %d0,%sp@- 46570: 4eb9 0004 625c jsr 4625c <kill>
RTEMS_INLINE_ROUTINE void _Watchdog_Reset(
Watchdog_Control *the_watchdog
)
{
(void) _Watchdog_Remove( the_watchdog );
46576: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 4657c: 4eb9 0004 a24c jsr 4a24c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46582: 4fef 000c lea %sp@(12),%sp 46586: 203c 0006 35e6 movel #407014,%d0 4658c: 2d40 000c movel %d0,%fp@(12) 46590: 203c 0006 2ea4 movel #405156,%d0 46596: 2d40 0008 movel %d0,%fp@(8)
/*
* If the reset interval is non-zero, reschedule ourselves.
*/
_Watchdog_Reset( &_POSIX_signals_Ualarm_timer );
}
4659a: 4e5e unlk %fp 4659c: 4ef9 0004 a104 jmp 4a104 <_Watchdog_Insert>
...
0004fce0 <_POSIX_signals_Unblock_thread>:
4fce0: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
4fce2: 4e56 fff4 linkw %fp,#-12 4fce6: 222e 000c movel %fp@(12),%d1 4fcea: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4fcee: 246e 0008 moveal %fp@(8),%a2 4fcf2: 2601 movel %d1,%d3 4fcf4: 5383 subql #1,%d3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4fcf6: 242a 0010 movel %a2@(16),%d2 4fcfa: 0282 1000 8000 andil #268468224,%d2
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
4fd00: 226e 0010 moveal %fp@(16),%a1
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4fd04: 206a 010e moveal %a2@(270),%a0 4fd08: e7a8 lsll %d3,%d0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
4fd0a: 0c82 1000 8000 cmpil #268468224,%d2
4fd10: 6772 beqs 4fd84 <_POSIX_signals_Unblock_thread+0xa4>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
4fd12: 2228 00cc movel %a0@(204),%d1 4fd16: 4681 notl %d1 4fd18: c081 andl %d1,%d0
4fd1a: 675c beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4fd1c: 202a 0010 movel %a2@(16),%d0
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
the_thread->do_post_task_switch_extension = true;
4fd20: 7201 moveq #1,%d1 4fd22: 1541 0074 moveb %d1,%a2@(116)
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
4fd26: 0800 001c btst #28,%d0
4fd2a: 6736 beqs 4fd62 <_POSIX_signals_Unblock_thread+0x82>
the_thread->Wait.return_code = EINTR;
4fd2c: 7004 moveq #4,%d0 4fd2e: 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) ){
4fd32: 103c 0008 moveb #8,%d0 4fd36: c0aa 0010 andl %a2@(16),%d0
4fd3a: 673c beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4fd3c: 7202 moveq #2,%d1 4fd3e: b2aa 0050 cmpl %a2@(80),%d1 4fd42: 6700 00a4 beqw 4fde8 <_POSIX_signals_Unblock_thread+0x108>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4fd46: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 4fd4c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4fd4e: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> <== NOT EXECUTED 4fd54: 508f addql #8,%sp <== NOT EXECUTED 4fd56: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fd58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fd5e: 4e5e unlk %fp 4fd60: 4e75 rts
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
4fd62: 4a80 tstl %d0
4fd64: 6612 bnes 4fd78 <_POSIX_signals_Unblock_thread+0x98><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
4fd66: 2039 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d0
4fd6c: 670a beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
4fd6e: b5f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a2 4fd74: 6700 0094 beqw 4fe0a <_POSIX_signals_Unblock_thread+0x12a>
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fd78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
4fd7e: 4200 clrb %d0
}
}
return false;
}
4fd80: 4e5e unlk %fp 4fd82: 4e75 rts
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
4fd84: 2400 movel %d0,%d2 4fd86: c4aa 0030 andl %a2@(48),%d2
4fd8a: 672a beqs 4fdb6 <_POSIX_signals_Unblock_thread+0xd6>
the_thread->Wait.return_code = EINTR;
4fd8c: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4fd8e: 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;
4fd92: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
4fd96: 4a89 tstl %a1
4fd98: 6734 beqs 4fdce <_POSIX_signals_Unblock_thread+0xee>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
4fd9a: 20d9 movel %a1@+,%a0@+ 4fd9c: 20d9 movel %a1@+,%a0@+ 4fd9e: 2091 movel %a1@,%a0@
}
_Thread_queue_Extract_with_proxy( the_thread );
4fda0: 2f0a movel %a2,%sp@- 4fda2: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy>
return true;
4fda8: 588f addql #4,%sp
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fdaa: 7001 moveq #1,%d0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
}
}
return false;
}
4fdac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fdb2: 4e5e unlk %fp 4fdb4: 4e75 rts
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
if ( (the_thread->Wait.option & mask) || (~api->signals_blocked & mask) ) {
4fdb6: 2428 00cc movel %a0@(204),%d2 4fdba: 4682 notl %d2 4fdbc: c082 andl %d2,%d0
4fdbe: 67b8 beqs 4fd78 <_POSIX_signals_Unblock_thread+0x98>
the_thread->Wait.return_code = EINTR;
4fdc0: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
4fdc2: 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;
4fdc6: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
4fdca: 4a89 tstl %a1
4fdcc: 66cc bnes 4fd9a <_POSIX_signals_Unblock_thread+0xba><== ALWAYS TAKEN
the_info->si_signo = signo;
4fdce: 2081 movel %d1,%a0@
the_info->si_code = SI_USER;
4fdd0: 7201 moveq #1,%d1
the_info->si_value.sival_int = 0;
4fdd2: 42a8 0008 clrl %a0@(8)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
the_info->si_code = SI_USER;
4fdd6: 2141 0004 movel %d1,%a0@(4)
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fdda: 2f0a movel %a2,%sp@- 4fddc: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy>
return true;
4fde2: 588f addql #4,%sp
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
4fde4: 7001 moveq #1,%d0 4fde6: 60c4 bras 4fdac <_POSIX_signals_Unblock_thread+0xcc>
_Thread_queue_Extract_with_proxy( the_thread );
else
#endif
if ( _States_Is_delaying(the_thread->current_state) ){
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
4fde8: 486a 0048 pea %a2@(72) 4fdec: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4fdf2: 588f addql #4,%sp 4fdf4: 2f3c 1003 fff8 movel #268697592,%sp@- 4fdfa: 2f0a movel %a2,%sp@- 4fdfc: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 4fe02: 508f addql #8,%sp 4fe04: 4200 clrb %d0 4fe06: 6000 ff50 braw 4fd58 <_POSIX_signals_Unblock_thread+0x78>
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
4fe0a: 7001 moveq #1,%d0
}
}
return false;
}
4fe0c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4fe12: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer );
_Thread_Unblock( the_thread );
}
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
4fe14: 13c0 0006 1574 moveb %d0,61574 <_ISR_Signals_to_thread_executing> 4fe1a: 4200 clrb %d0
}
}
return false;
}
...
0004d1ae <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4d1ae: 4e56 0000 linkw %fp,#0 4d1b2: 2f0a movel %a2,%sp@- 4d1b4: 246e 000c moveal %fp@(12),%a2
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4d1b8: 4a39 0005 fc24 tstb 5fc24 <Configuration_RTEMS_API+0x4>
4d1be: 665c bnes 4d21c <_RTEMS_tasks_Create_extension+0x6e>
4d1c0: 701e moveq #30,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d1c2: 2f00 movel %d0,%sp@- 4d1c4: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !api )
4d1ca: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d1cc: 2040 moveal %d0,%a0
if ( !api )
4d1ce: 4a80 tstl %d0
4d1d0: 675c beqs 4d22e <_RTEMS_tasks_Create_extension+0x80><== NEVER TAKEN
created->API_Extensions[ THREAD_API_RTEMS ] = api;
api->pending_events = EVENT_SETS_NONE_PENDING;
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
4d1d2: 42aa 011a clrl %a2@(282)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4d1d6: 4200 clrb %d0
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4d1d8: 2548 010a movel %a0,%a2@(266) 4d1dc: 1140 0008 moveb %d0,%a0@(8)
api->pending_events = EVENT_SETS_NONE_PENDING;
4d1e0: 4290 clrl %a0@
api->event_condition = 0;
4d1e2: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4d1e6: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4d1ea: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4d1ee: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4d1f2: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4d1f6: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
4d1fa: 4a39 0005 fc24 tstb 5fc24 <Configuration_RTEMS_API+0x4>
4d200: 6710 beqs 4d212 <_RTEMS_tasks_Create_extension+0x64>
4d202: 41e8 001e lea %a0@(30),%a0 4d206: 4280 clrl %d0
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4d208: 4298 clrl %a0@+
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4d20a: 5280 addql #1,%d0 4d20c: 7210 moveq #16,%d1 4d20e: b280 cmpl %d0,%d1
4d210: 66f6 bnes 4d208 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4d212: 246e fffc moveal %fp@(-4),%a2 4d216: 4e5e unlk %fp
api->event_condition = 0;
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
4d218: 7001 moveq #1,%d0
api->Notepads[i] = 0;
}
return true;
}
4d21a: 4e75 rts
/* * Notepads must be the last entry in the structure and they * can be left off if disabled in the configuration. */ to_allocate = sizeof( RTEMS_API_Control ); if ( !rtems_configuration_get_notepads_enabled() )
4d21c: 705e moveq #94,%d0
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d21e: 2f00 movel %d0,%sp@- 4d220: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !api )
4d226: 588f addql #4,%sp
*/
to_allocate = sizeof( RTEMS_API_Control );
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4d228: 2040 moveal %d0,%a0
if ( !api )
4d22a: 4a80 tstl %d0
4d22c: 66a4 bnes 4d1d2 <_RTEMS_tasks_Create_extension+0x24>
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4d22e: 246e fffc moveal %fp@(-4),%a2 4d232: 4e5e unlk %fp
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
4d234: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
00046b28 <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46b28: 4e56 ffe4 linkw %fp,#-28 46b2c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
rtems_initialization_tasks_table *user_tasks;
/*
* Move information into local variables
*/
user_tasks = Configuration_RTEMS_API.User_initialization_tasks_table;
46b30: 2479 0005 fc4a moveal 5fc4a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46b36: 2639 0005 fc46 movel 5fc46 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46b3c: 4a8a tstl %a2
46b3e: 6754 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b40: 4a83 tstl %d3
46b42: 6750 beqs 46b94 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46b44: 280e movel %fp,%d4 46b46: 4282 clrl %d2 46b48: 5984 subql #4,%d4 46b4a: 47f9 0004 68fc lea 468fc <rtems_task_create>,%a3
&id
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46b50: 49f9 0004 6bb0 lea 46bb0 <rtems_task_start>,%a4
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
return_value = rtems_task_create(
46b56: 2f04 movel %d4,%sp@- 46b58: 2f2a 000c movel %a2@(12),%sp@- 46b5c: 2f2a 0014 movel %a2@(20),%sp@- 46b60: 2f2a 0004 movel %a2@(4),%sp@- 46b64: 2f2a 0008 movel %a2@(8),%sp@- 46b68: 2f12 movel %a2@,%sp@- 46b6a: 4e93 jsr %a3@
user_tasks[ index ].stack_size,
user_tasks[ index ].mode_set,
user_tasks[ index ].attribute_set,
&id
);
if ( !rtems_is_status_successful( return_value ) )
46b6c: 4fef 0018 lea %sp@(24),%sp 46b70: 4a80 tstl %d0
46b72: 662a bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46b74: 2f2a 0018 movel %a2@(24),%sp@- 46b78: 2f2a 0010 movel %a2@(16),%sp@- 46b7c: 2f2e fffc movel %fp@(-4),%sp@- 46b80: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46b82: 4fef 000c lea %sp@(12),%sp 46b86: 4a80 tstl %d0
46b88: 6614 bnes 46b9e <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46b8a: 5282 addql #1,%d2 46b8c: 45ea 001c lea %a2@(28),%a2 46b90: b483 cmpl %d3,%d2
46b92: 65c2 bcss 46b56 <_RTEMS_tasks_Initialize_user_tasks_body+0x2e><== NEVER TAKEN
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
}
}
46b94: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46b9a: 4e5e unlk %fp 46b9c: 4e75 rts
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
46b9e: 2f00 movel %d0,%sp@- 46ba0: 4878 0001 pea 1 <ADD> 46ba4: 4878 0001 pea 1 <ADD> 46ba8: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
0004d0ea <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4d0ea: 4e56 ffec linkw %fp,#-20 4d0ee: 206e 0008 moveal %fp@(8),%a0 4d0f2: 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 ];
4d0f6: 2468 010a moveal %a0@(266),%a2
if ( !api )
4d0fa: 4a8a tstl %a2
4d0fc: 671a beqs 4d118 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4d0fe: 203c 0000 0700 movel #1792,%d0 4d104: 40c1 movew %sr,%d1 4d106: 8081 orl %d1,%d0 4d108: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4d10a: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4d10e: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4d112: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4d114: 4a82 tstl %d2
4d116: 660a bnes 4d122 <_RTEMS_tasks_Post_switch_extension+0x38>
(*asr->handler)( signal_set );
asr->nest_level -= 1;
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
}
4d118: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4d11e: 4e5e unlk %fp 4d120: 4e75 rts
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4d122: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4d126: 260e movel %fp,%d3 4d128: 5983 subql #4,%d3 4d12a: 47f9 0004 ffb4 lea 4ffb4 <rtems_task_mode>,%a3 4d130: 2f03 movel %d3,%sp@- 4d132: 2f3c 0000 ffff movel #65535,%sp@- 4d138: 2f2a 000e movel %a2@(14),%sp@- 4d13c: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4d13e: 2f02 movel %d2,%sp@- 4d140: 206a 000a moveal %a2@(10),%a0 4d144: 4e90 jsr %a0@
asr->nest_level -= 1;
4d146: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4d14a: 2f03 movel %d3,%sp@- 4d14c: 2f3c 0000 ffff movel #65535,%sp@- 4d152: 2f2e fffc movel %fp@(-4),%sp@- 4d156: 4e93 jsr %a3@ 4d158: 4fef 001c lea %sp@(28),%sp
}
4d15c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4d162: 4e5e unlk %fp <== NOT EXECUTED
0004d046 <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4d046: 4e56 0000 linkw %fp,#0 4d04a: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4d04e: 2068 011a moveal %a0@(282),%a0
while (tvp) {
4d052: 4a88 tstl %a0
4d054: 6712 beqs 4d068 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4d056: 2268 0004 moveal %a0@(4),%a1 4d05a: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4d05e: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4d062: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4d064: 4a88 tstl %a0
4d066: 66ee bnes 4d056 <_RTEMS_tasks_Switch_extension+0x10><== NEVER TAKEN
tvp->tval = *tvp->ptr;
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
4d068: 206e 000c moveal %fp@(12),%a0 4d06c: 2068 011a moveal %a0@(282),%a0
while (tvp) {
4d070: 4a88 tstl %a0
4d072: 6712 beqs 4d086 <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4d074: 2268 0004 moveal %a0@(4),%a1 4d078: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4d07c: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4d080: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4d082: 4a88 tstl %a0
4d084: 66ee bnes 4d074 <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4d086: 4e5e unlk %fp <== NOT EXECUTED
00047bfc <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47bfc: 4e56 fffc linkw %fp,#-4 47c00: 2f0a movel %a2,%sp@- 47c02: 486e fffc pea %fp@(-4) 47c06: 2f2e 0008 movel %fp@(8),%sp@- 47c0a: 4879 0006 3474 pea 63474 <_Rate_monotonic_Information> 47c10: 4eb9 0004 9b4c jsr 49b4c <_Objects_Get>
/*
* When we get here, the Timer is already off the chain so we do not
* have to worry about that -- hence no _Watchdog_Remove().
*/
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
47c16: 4fef 000c lea %sp@(12),%sp 47c1a: 2440 moveal %d0,%a2 47c1c: 4aae fffc tstl %fp@(-4)
47c20: 6636 bnes 47c58 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47c22: 206a 0040 moveal %a2@(64),%a0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47c26: 2028 0010 movel %a0@(16),%d0 47c2a: 0280 0000 4000 andil #16384,%d0
47c30: 670a beqs 47c3c <_Rate_monotonic_Timeout+0x40>
the_thread->Wait.id == the_period->Object.id ) {
47c32: 202a 0008 movel %a2@(8),%d0 47c36: b0a8 0020 cmpl %a0@(32),%d0
47c3a: 675e beqs 47c9a <_Rate_monotonic_Timeout+0x9e>
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
47c3c: 7001 moveq #1,%d0 47c3e: b0aa 0038 cmpl %a2@(56),%d0
47c42: 671c beqs 47c60 <_Rate_monotonic_Timeout+0x64>
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else
the_period->state = RATE_MONOTONIC_EXPIRED;
47c44: 7004 moveq #4,%d0 47c46: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47c4a: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47c50: 5380 subql #1,%d0 47c52: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47c58: 246e fff8 moveal %fp@(-8),%a2 47c5c: 4e5e unlk %fp 47c5e: 4e75 rts
_Rate_monotonic_Initiate_statistics( the_period );
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
} else if ( the_period->state == RATE_MONOTONIC_OWNER_IS_BLOCKING ) {
the_period->state = RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING;
47c60: 103c 0003 moveb #3,%d0 47c64: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47c68: 2f0a movel %a2,%sp@- 47c6a: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47c70: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47c76: 486a 0010 pea %a2@(16) 47c7a: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47c80: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert> 47c86: 4fef 000c lea %sp@(12),%sp 47c8a: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47c90: 5380 subql #1,%d0 47c92: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47c98: 60be bras 47c58 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47c9a: 2f3c 1003 fff8 movel #268697592,%sp@- 47ca0: 2f08 movel %a0,%sp@- 47ca2: 4eb9 0004 a080 jsr 4a080 <_Thread_Clear_state>
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
the_thread->Wait.id == the_period->Object.id ) {
_Thread_Unblock( the_thread );
_Rate_monotonic_Initiate_statistics( the_period );
47ca8: 2f0a movel %a2,%sp@- 47caa: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47cb0: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47cb6: 486a 0010 pea %a2@(16) 47cba: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47cc0: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
the_thread = the_period->owner;
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47cc6: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47cca: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47cd0: 5380 subql #1,%d0 47cd2: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47cd8: 6000 ff7e braw 47c58 <_Rate_monotonic_Timeout+0x5c>
00049000 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
49000: 4e56 0000 linkw %fp,#0 49004: 2039 0006 405c movel 6405c <_Thread_Dispatch_disable_level>,%d0 4900a: 5280 addql #1,%d0 4900c: 2f0a movel %a2,%sp@- 4900e: 246e 0008 moveal %fp@(8),%a2 49012: 23c0 0006 405c movel %d0,6405c <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
49018: 2039 0006 40ee movel 640ee <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
4901e: 2212 movel %a2@,%d1 49020: b280 cmpl %d0,%d1
49022: 6d38 blts 4905c <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
49024: 9280 subl %d0,%d1 49026: 2f01 movel %d1,%sp@- 49028: 42a7 clrl %sp@- 4902a: 4879 0006 4128 pea 64128 <_Watchdog_Seconds_chain> 49030: 4eb9 0004 b76c jsr 4b76c <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
49036: 23d2 0006 40ee movel %a2@,640ee <_TOD_Now> 4903c: 588a addql #4,%a2 4903e: 4fef 000c lea %sp@(12),%sp 49042: 23d2 0006 40f2 movel %a2@,640f2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49048: 246e fffc moveal %fp@(-4),%a2 4904c: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
4904e: 7001 moveq #1,%d0 49050: 13c0 0006 4070 moveb %d0,64070 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49056: 4ef9 0004 a3c0 jmp 4a3c0 <_Thread_Enable_dispatch> 4905c: 9081 subl %d1,%d0 4905e: 2f00 movel %d0,%sp@- 49060: 4878 0001 pea 1 <ADD> 49064: 4879 0006 4128 pea 64128 <_Watchdog_Seconds_chain> 4906a: 4eb9 0004 b76c jsr 4b76c <_Watchdog_Adjust>
_Watchdog_Adjust_seconds( WATCHDOG_BACKWARD, seconds - time->tv_sec );
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
49070: 23d2 0006 40ee movel %a2@,640ee <_TOD_Now> 49076: 588a addql #4,%a2 49078: 4fef 000c lea %sp@(12),%sp 4907c: 23d2 0006 40f2 movel %a2@,640f2 <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
49082: 246e fffc moveal %fp@(-4),%a2 49086: 4e5e unlk %fp
else
_Watchdog_Adjust_seconds( WATCHDOG_FORWARD, time->tv_sec - seconds );
/* POSIX format TOD (timespec) */
_Timestamp_Set( &_TOD_Now, time->tv_sec, time->tv_nsec );
_TOD_Is_set = true;
49088: 7001 moveq #1,%d0 4908a: 13c0 0006 4070 moveb %d0,64070 <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
49090: 4ef9 0004 a3c0 jmp 4a3c0 <_Thread_Enable_dispatch>
...
00047610 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47610: 4e56 0000 linkw %fp,#0 47614: 206e 0008 moveal %fp@(8),%a0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
47618: 2039 0006 24b0 movel 624b0 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
4761e: 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) ||
47620: 4a88 tstl %a0
47622: 6762 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47624: 243c 000f 4240 movel #1000000,%d2 4762a: 4c40 2002 remul %d0,%d2,%d2
(the_tod->ticks >= ticks_per_second) ||
4762e: b4a8 0018 cmpl %a0@(24),%d2
47632: 6352 blss 47686 <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
47634: 703b moveq #59,%d0 47636: b0a8 0014 cmpl %a0@(20),%d0
4763a: 654a bcss 47686 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
4763c: b0a8 0010 cmpl %a0@(16),%d0
47640: 6544 bcss 47686 <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
47642: 7217 moveq #23,%d1 47644: b2a8 000c cmpl %a0@(12),%d1
47648: 653c bcss 47686 <_TOD_Validate+0x76>
(the_tod->month == 0) ||
4764a: 2028 0004 movel %a0@(4),%d0
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
4764e: 6736 beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
47650: 740c moveq #12,%d2 47652: b480 cmpl %d0,%d2
47654: 6530 bcss 47686 <_TOD_Validate+0x76>
(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) ||
47656: 2210 movel %a0@,%d1
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
47658: 0c81 0000 07c3 cmpil #1987,%d1
4765e: 6326 blss 47686 <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
47660: 2068 0008 moveal %a0@(8),%a0
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) ||
47664: 4a88 tstl %a0
47666: 671e beqs 47686 <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
47668: 143c 0003 moveb #3,%d2 4766c: c282 andl %d2,%d1
4766e: 661e bnes 4768e <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
47670: 43f9 0006 10e2 lea 610e2 <_TOD_Days_per_month>,%a1 47676: 2031 0c34 movel %a1@(00000034,%d0:l:4),%d0
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
4767a: b1c0 cmpal %d0,%a0 4767c: 53c0 sls %d0 4767e: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
47680: 241f movel %sp@+,%d2 47682: 4e5e unlk %fp 47684: 4e75 rts 47686: 241f movel %sp@+,%d2 47688: 4e5e unlk %fp
* false - if the the_tod is invalid
*
* NOTE: This routine only works for leap-years through 2099.
*/
bool _TOD_Validate(
4768a: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
4768c: 4e75 rts
return false;
if ( (the_tod->year % 4) == 0 )
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
else
days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ];
4768e: 43f9 0006 10e2 lea 610e2 <_TOD_Days_per_month>,%a1 47694: 2031 0c00 movel %a1@(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(
47698: b1c0 cmpal %d0,%a0 4769a: 53c0 sls %d0 4769c: 4480 negl %d0 4769e: 60e0 bras 47680 <_TOD_Validate+0x70>
000483ec <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
483ec: 4e56 fff0 linkw %fp,#-16 483f0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 483f4: 246e 0008 moveal %fp@(8),%a2
/* * Set a transient state for the thread so it is pulled off the Ready chains. * This will prevent it from being scheduled no matter what happens in an * ISR. */ _Thread_Set_transient( the_thread );
483f8: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
483fa: 242e 000c movel %fp@(12),%d2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
483fe: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48402: 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 );
48406: 4eb9 0004 9384 jsr 49384 <_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 )
4840c: 588f addql #4,%sp 4840e: b4aa 0014 cmpl %a2@(20),%d2
48412: 670c beqs 48420 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
48414: 2f02 movel %d2,%sp@- 48416: 2f0a movel %a2,%sp@- 48418: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority> 4841e: 508f addql #8,%sp
_ISR_Disable( level );
48420: 203c 0000 0700 movel #1792,%d0 48426: 40c1 movew %sr,%d1 48428: 8081 orl %d1,%d0 4842a: 46c0 movew %d0,%sr
/*
* 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;
4842c: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
48430: 7404 moveq #4,%d2 48432: b480 cmpl %d0,%d2
48434: 6738 beqs 4846e <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
48436: 44c3 movew %d3,%ccr
48438: 6708 beqs 48442 <_Thread_Change_priority+0x56> <== NEVER TAKEN
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
4843a: 74fb moveq #-5,%d2 4843c: c480 andl %d0,%d2 4843e: 2542 0010 movel %d2,%a2@(16)
_ISR_Enable( level );
48442: 46c1 movew %d1,%sr
if ( _States_Is_waiting_on_thread_queue( state ) ) {
48444: 0280 0003 bee0 andil #245472,%d0
4844a: 660a bnes 48456 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
4844c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48452: 4e5e unlk %fp 48454: 4e75 rts
/* 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 );
48456: 2d4a 000c movel %a2,%fp@(12) 4845a: 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 );
}
48460: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48466: 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 );
48468: 4ef9 0004 9154 jmp 49154 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
4846e: 44c3 movew %d3,%ccr
48470: 673c beqs 484ae <_Thread_Change_priority+0xc2> <== 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;
48472: 206a 008e moveal %a2@(142),%a0 48476: 302a 0094 movew %a2@(148),%d0 4847a: 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 );
4847c: 42aa 0010 clrl %a2@(16) 48480: 8082 orl %d2,%d0 48482: 3080 movew %d0,%a0@
_Priority_Major_bit_map |= the_priority_map->ready_major;
48484: 3439 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d2 4848a: 302a 0092 movew %a2@(146),%d0 4848e: 8082 orl %d2,%d0 48490: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
48496: 4a04 tstb %d4 48498: 6700 0082 beqw 4851c <_Thread_Change_priority+0x130>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4849c: 206a 008a moveal %a2@(138),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
484a0: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
484a2: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next; after_node->next = the_node;
484a6: 208a movel %a2,%a0@
the_node->next = before_node; before_node->previous = the_node;
484a8: 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;
484ac: 2489 movel %a1,%a2@
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
}
_ISR_Flash( level );
484ae: 203c 0000 0700 movel #1792,%d0 484b4: 46c1 movew %d1,%sr 484b6: 8081 orl %d1,%d0 484b8: 46c0 movew %d0,%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 );
484ba: 3039 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d0 484c0: 4840 swap %d0 484c2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
484c4: 4282 clrl %d2 484c6: 41f9 0006 154c lea 6154c <_Priority_Bit_map>,%a0 484cc: 3400 movew %d0,%d2 484ce: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 484d2: 4840 swap %d0 484d4: 04c0 ff1 %d0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
484d6: 4283 clrl %d3 484d8: e98a lsll #4,%d2 484da: 3600 movew %d0,%d3 484dc: 2279 0006 13d8 moveal 613d8 <_Thread_Ready_chain>,%a1 484e2: 2002 movel %d2,%d0 484e4: d083 addl %d3,%d0 484e6: 2400 movel %d0,%d2 484e8: e58a lsll #2,%d2 484ea: e988 lsll #4,%d0
* is also the heir thread, and false otherwise.
*/
RTEMS_INLINE_ROUTINE bool _Thread_Is_executing_also_the_heir( void )
{
return ( _Thread_Executing == _Thread_Heir );
484ec: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
484f2: 93c2 subal %d2,%a1 484f4: 2031 0800 movel %a1@(00000000,%d0:l),%d0 484f8: 23c0 0006 14ba movel %d0,614ba <_Thread_Heir>
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
484fe: b1c0 cmpal %d0,%a0
48500: 670e beqs 48510 <_Thread_Change_priority+0x124>
_Thread_Executing->is_preemptible )
48502: 4a28 0075 tstb %a0@(117)
48506: 6708 beqs 48510 <_Thread_Change_priority+0x124>
_Context_Switch_necessary = true;
48508: 7401 moveq #1,%d2 4850a: 13c2 0006 14f6 moveb %d2,614f6 <_Context_Switch_necessary>
_ISR_Enable( level );
48510: 46c1 movew %d1,%sr
}
48512: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 48518: 4e5e unlk %fp 4851a: 4e75 rts
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
_Chain_Prepend_unprotected( the_thread->ready, &the_thread->Object.Node );
else
_Chain_Append_unprotected( the_thread->ready, &the_thread->Object.Node );
4851c: 206a 008a moveal %a2@(138),%a0
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48520: 2008 movel %a0,%d0 48522: 5880 addql #4,%d0 48524: 2480 movel %d0,%a2@
old_last_node = the_chain->last;
48526: 2268 0008 moveal %a0@(8),%a1
the_chain->last = the_node;
4852a: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4852e: 2549 0004 movel %a1,%a2@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
48532: 228a movel %a2,%a1@ 48534: 6000 ff78 braw 484ae <_Thread_Change_priority+0xc2>
00048538 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
48538: 327c 0700 moveaw #1792,%a1 4853c: 2009 movel %a1,%d0
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
4853e: 4e56 ffec linkw %fp,#-20 48542: 206e 0008 moveal %fp@(8),%a0 48546: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4854a: 242e 000c movel %fp@(12),%d2
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4854e: 40c3 movew %sr,%d3 48550: 8083 orl %d3,%d0 48552: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
48554: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
48558: 2002 movel %d2,%d0 4855a: c081 andl %d1,%d0
4855c: 6776 beqs 485d4 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4855e: 2002 movel %d2,%d0 48560: 4680 notl %d0 48562: c081 andl %d1,%d0
current_state =
48564: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear( state, current_state );
if ( _States_Is_ready( current_state ) ) {
48568: 666a bnes 485d4 <_Thread_Clear_state+0x9c>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4856a: 2868 008e moveal %a0@(142),%a4 4856e: 3028 0094 movew %a0@(148),%d0 48572: 3214 movew %a4@,%d1
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
48574: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
48578: 240a movel %a2,%d2 4857a: 5882 addql #4,%d2 4857c: 8081 orl %d1,%d0 4857e: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
48580: 266a 0008 moveal %a2@(8),%a3 48584: 3880 movew %d0,%a4@
the_chain->last = the_node;
48586: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4858a: 3239 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d1 48590: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
48594: 214b 0004 movel %a3,%a0@(4) 48598: 8081 orl %d1,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4859a: 2688 movel %a0,%a3@ 4859c: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
_ISR_Flash( level );
485a2: 2009 movel %a1,%d0 485a4: 46c3 movew %d3,%sr 485a6: 8083 orl %d3,%d0 485a8: 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 ) {
485aa: 2028 0014 movel %a0@(20),%d0 485ae: 2279 0006 14ba moveal 614ba <_Thread_Heir>,%a1 485b4: b0a9 0014 cmpl %a1@(20),%d0
485b8: 641a bccs 485d4 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
485ba: 23c8 0006 14ba movel %a0,614ba <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
485c0: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0 485c6: 4a28 0075 tstb %a0@(117)
485ca: 6712 beqs 485de <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
485cc: 7001 moveq #1,%d0 485ce: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
485d4: 46c3 movew %d3,%sr
}
485d6: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 485da: 4e5e unlk %fp 485dc: 4e75 rts
* Even if the thread isn't preemptible, if the new heir is
* a pseudo-ISR system task, we need to do a context switch.
*/
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
485de: 4a80 tstl %d0
485e0: 66f2 bnes 485d4 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
485e2: 7001 moveq #1,%d0 <== NOT EXECUTED 485e4: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED 485ea: 60e8 bras 485d4 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
000485ec <_Thread_Close>:
485ec: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
485ee: 4e56 0000 linkw %fp,#0 485f2: 2f0b movel %a3,%sp@- 485f4: 266e 0008 moveal %fp@(8),%a3 485f8: 2f0a movel %a2,%sp@- 485fa: 246e 000c moveal %fp@(12),%a2 485fe: 206b 0018 moveal %a3@(24),%a0 48602: 302a 000a movew %a2@(10),%d0 48606: 42b0 0c00 clrl %a0@(00000000,%d0:l:4)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4860a: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48610: 5380 subql #1,%d0
* disappear and set a transient state on it. So we temporarily
* unnest dispatching.
*/
_Thread_Unnest_dispatch();
_User_extensions_Thread_delete( the_thread );
48612: 2f0a movel %a2,%sp@- 48614: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level> 4861a: 4eb9 0004 99e0 jsr 499e0 <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48620: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48626: 5280 addql #1,%d0 48628: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
/* * Now we are in a dispatching critical section again and we * can take the thread OUT of the published set. It is invalid * to use this thread's Id OR name after this call. */ _Objects_Close( information, &the_thread->Object );
4862e: 2f0a movel %a2,%sp@- 48630: 2f0b movel %a3,%sp@- 48632: 4eb9 0004 7bf8 jsr 47bf8 <_Objects_Close>
/*
* By setting the dormant state, the thread will not be considered
* for scheduling when we remove any blocking states.
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
48638: 4878 0001 pea 1 <ADD> 4863c: 2f0a movel %a2,%sp@- 4863e: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
48644: 2f0a movel %a2,%sp@- 48646: 4eb9 0004 907c jsr 4907c <_Thread_queue_Extract_with_proxy> 4864c: 4fef 0018 lea %sp@(24),%sp 48650: 4a00 tstb %d0
48652: 6608 bnes 4865c <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
48654: 7002 moveq #2,%d0 48656: b0aa 0050 cmpl %a2@(80),%d0
4865a: 6756 beqs 486b2 <_Thread_Close+0xc6> /* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) )
4865c: b5f9 0006 14b2 cmpal 614b2 <_Thread_Allocated_fp>,%a2
48662: 6746 beqs 486aa <_Thread_Close+0xbe>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
48664: 202a 00c6 movel %a2@(198),%d0
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( _Thread_Is_allocated_fp( the_thread ) )
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
48668: 42aa 0102 clrl %a2@(258)
if ( the_thread->Start.fp_context )
4866c: 4a80 tstl %d0
4866e: 670a beqs 4867a <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
48670: 2f00 movel %d0,%sp@- 48672: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48678: 588f addql #4,%sp
/*
* Free the rest of the memory associated with this task
* and set the associated pointers to NULL for safety.
*/
_Thread_Stack_Free( the_thread );
4867a: 2f0a movel %a2,%sp@- 4867c: 4eb9 0004 946c jsr 4946c <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
48682: 202a 0116 movel %a2@(278),%d0 48686: 588f addql #4,%sp
/* * Free the rest of the memory associated with this task * and set the associated pointers to NULL for safety. */ _Thread_Stack_Free( the_thread ); the_thread->Start.stack = NULL;
48688: 42aa 00ca clrl %a2@(202)
if ( the_thread->extensions )
4868c: 4a80 tstl %d0
4868e: 670a beqs 4869a <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
48690: 2f00 movel %d0,%sp@- 48692: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48698: 588f addql #4,%sp
the_thread->extensions = NULL;
4869a: 42aa 0116 clrl %a2@(278)
}
4869e: 246e fff8 moveal %fp@(-8),%a2 486a2: 266e fffc moveal %fp@(-4),%a3 486a6: 4e5e unlk %fp 486a8: 4e75 rts
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
486aa: 42b9 0006 14b2 clrl 614b2 <_Thread_Allocated_fp> 486b0: 60b2 bras 48664 <_Thread_Close+0x78>
*/
_Thread_Set_state( the_thread, STATES_DORMANT );
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
486b2: 486a 0048 pea %a2@(72) 486b6: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 486bc: 588f addql #4,%sp
/* * The thread might have been FP. So deal with that. */ #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) #if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE ) if ( _Thread_Is_allocated_fp( the_thread ) )
486be: b5f9 0006 14b2 cmpal 614b2 <_Thread_Allocated_fp>,%a2
486c4: 669e bnes 48664 <_Thread_Close+0x78> <== ALWAYS TAKEN
486c6: 60e2 bras 486aa <_Thread_Close+0xbe> <== NOT EXECUTED
00048778 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48778: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
4877c: 486e fffc pea %fp@(-4) 48780: 2f2e 0008 movel %fp@(8),%sp@- 48784: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
4878a: 508f addql #8,%sp 4878c: 4aae fffc tstl %fp@(-4)
48790: 661e bnes 487b0 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48792: 2f3c 1000 0018 movel #268435480,%sp@- 48798: 2f00 movel %d0,%sp@- 4879a: 4eb9 0004 8538 jsr 48538 <_Thread_Clear_state> 487a0: 508f addql #8,%sp 487a2: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 487a8: 5380 subql #1,%d0 487aa: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
487b0: 4e5e unlk %fp <== NOT EXECUTED
000487b4 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
487b4: 4e56 ffc8 linkw %fp,#-56 487b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
487bc: 2e3c 0000 0700 movel #1792,%d7 487c2: 2007 movel %d7,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
487c4: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
_ISR_Disable( level );
487ca: 40c1 movew %sr,%d1 487cc: 8081 orl %d1,%d0 487ce: 46c0 movew %d0,%sr
while ( _Context_Switch_necessary == true ) {
487d0: 1039 0006 14f6 moveb 614f6 <_Context_Switch_necessary>,%d0 487d6: 6700 00fa beqw 488d2 <_Thread_Dispatch+0x11e> 487da: 260e movel %fp,%d3 487dc: 240e movel %fp,%d2 487de: 5183 subql #8,%d3 487e0: 2c3c 0004 d5bc movel #316860,%d6 487e6: 0682 ffff fff0 addil #-16,%d2 487ec: 2a3c 0004 97ac movel #300972,%d5 487f2: 283c 0004 9764 movel #300900,%d4 487f8: 4bf9 0004 9a6c lea 49a6c <_User_extensions_Thread_switch>,%a5 487fe: 49f9 0004 9de0 lea 49de0 <_CPU_Context_switch>,%a4
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48804: 7001 moveq #1,%d0 48806: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
4880c: 2679 0006 14ba moveal 614ba <_Thread_Heir>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48812: 4200 clrb %d0
_Thread_Executing = heir;
48814: 23cb 0006 14e6 movel %a3,614e6 <_Thread_Executing>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
4881a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
_Thread_Executing = heir;
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
48820: 7001 moveq #1,%d0 48822: b0ab 007a cmpl %a3@(122),%d0 48826: 6700 00d6 beqw 488fe <_Thread_Dispatch+0x14a>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
4882a: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
4882c: 2f03 movel %d3,%sp@- 4882e: 2046 moveal %d6,%a0 48830: 4e90 jsr %a0@
_Timestamp_Subtract(
48832: 2045 moveal %d5,%a0 48834: 2f02 movel %d2,%sp@- 48836: 2f03 movel %d3,%sp@- 48838: 4879 0006 14ee pea 614ee <_Thread_Time_of_last_context_switch> 4883e: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
48840: 2044 moveal %d4,%a0 48842: 2f02 movel %d2,%sp@- 48844: 486a 0082 pea %a2@(130) 48848: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
4884a: 2079 0006 14b6 moveal 614b6 <_Thread_libc_reent>,%a0 48850: 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;
48854: 202e fff8 movel %fp@(-8),%d0 48858: 222e fffc movel %fp@(-4),%d1 4885c: 23c0 0006 14ee movel %d0,614ee <_Thread_Time_of_last_context_switch> 48862: 23c1 0006 14f2 movel %d1,614f2 <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
48868: 4a88 tstl %a0
4886a: 6708 beqs 48874 <_Thread_Dispatch+0xc0> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
4886c: 2550 0106 movel %a0@,%a2@(262)
*_Thread_libc_reent = heir->libc_reent;
48870: 20ab 0106 movel %a3@(262),%a0@
}
_User_extensions_Thread_switch( executing, heir );
48874: 2f0b movel %a3,%sp@- 48876: 2f0a movel %a2,%sp@- 48878: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
4887a: 486b 00ce pea %a3@(206) 4887e: 486a 00ce pea %a2@(206) 48882: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
48884: 4fef 0010 lea %sp@(16),%sp 48888: 4aaa 0102 tstl %a2@(258)
4888c: 672c beqs 488ba <_Thread_Dispatch+0x106>
#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 );
4888e: 2079 0006 14b2 moveal 614b2 <_Thread_Allocated_fp>,%a0 48894: b1ca cmpal %a2,%a0
48896: 6722 beqs 488ba <_Thread_Dispatch+0x106>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
48898: 4a88 tstl %a0
4889a: 670c beqs 488a8 <_Thread_Dispatch+0xf4>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4889c: 4868 0102 pea %a0@(258) 488a0: 4eb9 0004 9f16 jsr 49f16 <_CPU_Context_save_fp> 488a6: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
488a8: 486a 0102 pea %a2@(258) 488ac: 4eb9 0004 9f4e jsr 49f4e <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
488b2: 588f addql #4,%sp 488b4: 23ca 0006 14b2 movel %a2,614b2 <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
488ba: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
_ISR_Disable( level );
488c0: 2007 movel %d7,%d0 488c2: 40c1 movew %sr,%d1 488c4: 8081 orl %d1,%d0 488c6: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
488c8: 1039 0006 14f6 moveb 614f6 <_Context_Switch_necessary>,%d0 488ce: 6600 ff34 bnew 48804 <_Thread_Dispatch+0x50>
executing = _Thread_Executing;
_ISR_Disable( level );
}
_Thread_Dispatch_disable_level = 0;
488d2: 42b9 0006 142c clrl 6142c <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
488d8: 46c1 movew %d1,%sr
if ( _Thread_Do_post_task_switch_extension ||
488da: 4ab9 0006 14ce tstl 614ce <_Thread_Do_post_task_switch_extension>
488e0: 6606 bnes 488e8 <_Thread_Dispatch+0x134>
executing->do_post_task_switch_extension ) {
488e2: 4a2a 0074 tstb %a2@(116)
488e6: 670c beqs 488f4 <_Thread_Dispatch+0x140>
executing->do_post_task_switch_extension = false;
488e8: 4201 clrb %d1 488ea: 1541 0074 moveb %d1,%a2@(116)
_API_extensions_Run_postswitch();
488ee: 4eb9 0004 7028 jsr 47028 <_API_extensions_Run_postswitch>
}
}
488f4: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 488fa: 4e5e unlk %fp 488fc: 4e75 rts
#if __RTEMS_ADA__
executing->rtems_ada_self = rtems_ada_self;
rtems_ada_self = heir->rtems_ada_self;
#endif
if ( heir->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE )
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
488fe: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0 48904: 2750 0076 movel %a0@,%a3@(118) 48908: 6000 ff20 braw 4882a <_Thread_Dispatch+0x76>
0004890c <_Thread_Enable_dispatch>:
#if ( (defined(CPU_INLINE_ENABLE_DISPATCH) && \
(CPU_INLINE_ENABLE_DISPATCH == FALSE)) || \
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
4890c: 4e56 0000 linkw %fp,#0
if ( --_Thread_Dispatch_disable_level )
48910: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 48916: 5380 subql #1,%d0 48918: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level> 4891e: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0
48924: 6704 beqs 4892a <_Thread_Enable_dispatch+0x1e>
return;
_Thread_Dispatch();
}
48926: 4e5e unlk %fp 48928: 4e75 rts 4892a: 4e5e unlk %fp
(__RTEMS_DO_NOT_INLINE_THREAD_ENABLE_DISPATCH__ == 1) )
void _Thread_Enable_dispatch( void )
{
if ( --_Thread_Dispatch_disable_level )
return;
_Thread_Dispatch();
4892c: 4ef9 0004 87b4 jmp 487b4 <_Thread_Dispatch>
...
00050310 <_Thread_Evaluate_mode>:
*
* XXX
*/
bool _Thread_Evaluate_mode( void )
{
50310: 4e56 0000 linkw %fp,#0
Thread_Control *executing;
executing = _Thread_Executing;
50314: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
5031a: 4aa8 0010 tstl %a0@(16)
5031e: 660e bnes 5032e <_Thread_Evaluate_mode+0x1e> <== NEVER TAKEN
50320: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
50326: 6712 beqs 5033a <_Thread_Evaluate_mode+0x2a>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
50328: 4a28 0075 tstb %a0@(117)
5032c: 670c beqs 5033a <_Thread_Evaluate_mode+0x2a> <== NEVER TAKEN
_Context_Switch_necessary = true;
return true;
}
return false;
}
5032e: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
50330: 7001 moveq #1,%d0 50332: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
return true;
}
return false;
}
50338: 4e75 rts 5033a: 4e5e unlk %fp
executing = _Thread_Executing;
if ( !_States_Is_ready( executing->current_state ) ||
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
_Context_Switch_necessary = true;
return true;
5033c: 4200 clrb %d0 <== NOT EXECUTED
}
return false;
}
00050340 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
50340: 4e56 0000 linkw %fp,#0 50344: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
50346: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
5034c: 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;
5034e: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
50352: 40c0 movew %sr,%d0 50354: e189 lsll #8,%d1 50356: 0280 0000 f8ff andil #63743,%d0 5035c: 8081 orl %d1,%d0 5035e: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
50360: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
50362: 1439 0006 0be0 moveb 60be0 <doneConstructors.3606>,%d2
doneConstructors = 1;
50368: 13c0 0006 0be0 moveb %d0,60be0 <doneConstructors.3606>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
5036e: 4aaa 0102 tstl %a2@(258)
50372: 6720 beqs 50394 <_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 );
50374: 2079 0006 14b2 moveal 614b2 <_Thread_Allocated_fp>,%a0 5037a: b1ca cmpal %a2,%a0
5037c: 6716 beqs 50394 <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
5037e: 4a88 tstl %a0
50380: 670c beqs 5038e <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
50382: 4868 0102 pea %a0@(258) 50386: 4eb9 0004 9f16 jsr 49f16 <_CPU_Context_save_fp> 5038c: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
5038e: 23ca 0006 14b2 movel %a2,614b2 <_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 );
50394: 2f0a movel %a2,%sp@- 50396: 4eb9 0004 98c4 jsr 498c4 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
5039c: 4eb9 0004 890c jsr 4890c <_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) */ {
503a2: 588f addql #4,%sp 503a4: 4a02 tstb %d2
503a6: 6724 beqs 503cc <_Thread_Handler+0x8c>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
503a8: 202a 009e movel %a2@(158),%d0
503ac: 672a beqs 503d8 <_Thread_Handler+0x98>
(*(Thread_Entry_numeric) executing->Start.entry_point)(
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
503ae: 7201 moveq #1,%d1 503b0: b280 cmpl %d0,%d1
503b2: 674c beqs 50400 <_Thread_Handler+0xc0> <== ALWAYS TAKEN
* 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 );
503b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 503b6: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
503bc: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 503c0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 503c4: 42a7 clrl %sp@- <== NOT EXECUTED 503c6: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> <== NOT EXECUTED
* _init could be a weak symbol and we SHOULD test it but it isn't
* in any configuration I know of and it generates a warning on every
* RTEMS target configuration. --joel (12 May 2007)
*/
if (!doneCons) /* && (volatile void *)_init) */ {
INIT_NAME ();
503cc: 4eb9 0005 ddf4 jsr 5ddf4 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
503d2: 202a 009e movel %a2@(158),%d0
503d6: 66d6 bnes 503ae <_Thread_Handler+0x6e>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
503d8: 2f2a 00a6 movel %a2@(166),%sp@- 503dc: 206a 009a moveal %a2@(154),%a0 503e0: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
503e2: 588f addql #4,%sp 503e4: 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 );
503e8: 2f0a movel %a2,%sp@- 503ea: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
503f0: 4878 0006 pea 6 <EXTENDSFDF> 503f4: 4878 0001 pea 1 <ADD> 503f8: 42a7 clrl %sp@- 503fa: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
(*(Thread_Entry_pointer) executing->Start.entry_point)(
50400: 2f2a 00a2 movel %a2@(162),%sp@- 50404: 206a 009a moveal %a2@(154),%a0 50408: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
5040a: 588f addql #4,%sp 5040c: 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 );
50410: 2f0a movel %a2,%sp@- 50412: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
50418: 4878 0006 pea 6 <EXTENDSFDF> <== NOT EXECUTED 5041c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 50420: 42a7 clrl %sp@- <== NOT EXECUTED 50422: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred> <== NOT EXECUTED
00048c28 <_Thread_Handler_initialization>:
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48c28: 4e56 0000 linkw %fp,#0
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48c2c: 4ab9 0005 fc78 tstl 5fc78 <Configuration+0x24> 48c32: 57c0 seq %d0 48c34: 4ab9 0005 fc74 tstl 5fc74 <Configuration+0x20> 48c3a: 57c1 seq %d1 48c3c: 4480 negl %d0 48c3e: 4481 negl %d1 48c40: b380 eorl %d1,%d0
uint32_t maximum_extensions;
#if defined(RTEMS_MULTIPROCESSING)
uint32_t maximum_proxies;
#endif
ticks_per_timeslice = Configuration.ticks_per_timeslice;
48c42: 2239 0005 fc64 movel 5fc64 <Configuration+0x10>,%d1
maximum_extensions = Configuration.maximum_extensions;
48c48: 2079 0005 fc5c moveal 5fc5c <Configuration+0x8>,%a0
*
* Output parameters: NONE
*/
void _Thread_Handler_initialization(void)
{
48c4e: 2f02 movel %d2,%sp@-
#endif
/*
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
48c50: 4a00 tstb %d0 48c52: 6600 00a2 bnew 48cf6 <_Thread_Handler_initialization+0xce>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c56: 4280 clrl %d0 48c58: 1039 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48c5e: 4282 clrl %d2
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c60: 5280 addql #1,%d0
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
48c62: 23c1 0006 13dc movel %d1,613dc <_Thread_Ticks_per_timeslice>
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c68: 2200 movel %d0,%d1 48c6a: e588 lsll #2,%d0 48c6c: e989 lsll #4,%d1
_Thread_Allocated_fp = NULL;
#endif
_Thread_Do_post_task_switch_extension = 0;
_Thread_Maximum_extensions = maximum_extensions;
48c6e: 23c8 0006 14ca movel %a0,614ca <_Thread_Maximum_extensions>
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c74: 9280 subl %d0,%d1
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48c76: 4200 clrb %d0
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c78: 2f01 movel %d1,%sp@-
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_BAD_STACK_HOOK
);
_Context_Switch_necessary = false;
48c7a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary>
_Thread_Executing = NULL;
48c80: 42b9 0006 14e6 clrl 614e6 <_Thread_Executing>
_Thread_Heir = NULL;
48c86: 42b9 0006 14ba clrl 614ba <_Thread_Heir>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) _Thread_Allocated_fp = NULL;
48c8c: 42b9 0006 14b2 clrl 614b2 <_Thread_Allocated_fp>
#endif
_Thread_Do_post_task_switch_extension = 0;
48c92: 42b9 0006 14ce clrl 614ce <_Thread_Do_post_task_switch_extension>
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48c98: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error>
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48c9e: 588f addql #4,%sp 48ca0: 1439 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d2 48ca6: 2040 moveal %d0,%a0 48ca8: 4281 clrl %d1
_Thread_Maximum_extensions = maximum_extensions;
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
_Thread_Ready_chain = (Chain_Control *) _Workspace_Allocate_or_fatal_error(
48caa: 23c0 0006 13d8 movel %d0,613d8 <_Thread_Ready_chain>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48cb0: 2008 movel %a0,%d0 48cb2: 5880 addql #4,%d0
(PRIORITY_MAXIMUM + 1) * sizeof(Chain_Control)
);
for ( index=0; index <= PRIORITY_MAXIMUM ; index++ )
48cb4: 5281 addql #1,%d1 48cb6: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
48cb8: 42a8 0004 clrl %a0@(4)
the_chain->last = _Chain_Head(the_chain);
48cbc: 2148 0008 movel %a0,%a0@(8) 48cc0: 41e8 000c lea %a0@(12),%a0 48cc4: b481 cmpl %d1,%d2
48cc6: 64e8 bccs 48cb0 <_Thread_Handler_initialization+0x88>
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48cc8: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 48ccc: 42a7 clrl %sp@- 48cce: 4878 011e pea 11e <DBL_MANT_DIG+0xe9> 48cd2: 4878 0001 pea 1 <ADD> 48cd6: 4878 0001 pea 1 <ADD> 48cda: 4878 0001 pea 1 <ADD> 48cde: 4879 0006 157a pea 6157a <_Thread_Internal_information> 48ce4: 4eb9 0004 8070 jsr 48070 <_Objects_Initialize_information>
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48cea: 242e fffc movel %fp@(-4),%d2
/*
* Initialize this class of objects.
*/
_Objects_Initialize_information(
48cee: 4fef 001c lea %sp@(28),%sp
false, /* true if this is a global object class */
NULL /* Proxy extraction support callout */
#endif
);
}
48cf2: 4e5e unlk %fp 48cf4: 4e75 rts
* BOTH stacks hooks must be set or both must be NULL.
* Do not allow mixture.
*/
if ( !( (!Configuration.stack_allocate_hook)
== (!Configuration.stack_free_hook) ) )
_Internal_error_Occurred(
48cf6: 4878 000f pea f <FPTRAP> 48cfa: 4878 0001 pea 1 <ADD> 48cfe: 42a7 clrl %sp@- 48d00: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
000489d0 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489d0: 4e56 ffe8 linkw %fp,#-24 489d4: 202e 0010 movel %fp@(16),%d0 489d8: 48d7 047c moveml %d2-%d6/%a2,%sp@ 489dc: 246e 000c moveal %fp@(12),%a2 489e0: 282e 0014 movel %fp@(20),%d4 489e4: 242e 001c movel %fp@(28),%d2 489e8: 262e 0024 movel %fp@(36),%d3
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489ec: 42aa 010a clrl %a2@(266)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489f0: 1a2e 001b moveb %fp@(27),%d5
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489f4: 42aa 010e clrl %a2@(270)
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
489f8: 1c2e 0023 moveb %fp@(35),%d6
/*
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
489fc: 42aa 0112 clrl %a2@(274)
extensions_area = NULL;
the_thread->libc_reent = NULL;
48a00: 42aa 0106 clrl %a2@(262)
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
48a04: 4a80 tstl %d0 48a06: 6700 01f0 beqw 48bf8 <_Thread_Initialize+0x228>
stack = the_thread->Start.stack;
the_thread->Start.core_allocated_stack = true;
} else {
stack = stack_area;
actual_stack_size = stack_size;
the_thread->Start.core_allocated_stack = false;
48a0a: 2204 movel %d4,%d1 48a0c: 4204 clrb %d4 48a0e: 1544 00bc moveb %d4,%a2@(188)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
48a12: 2540 00c2 movel %d0,%a2@(194)
the_stack->size = size;
48a16: 2541 00be movel %d1,%a2@(190)
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
48a1a: 4a05 tstb %d5 48a1c: 6600 017e bnew 48b9c <_Thread_Initialize+0x1cc> 48a20: 4280 clrl %d0 48a22: 4285 clrl %d5
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
48a24: 2239 0006 14ca movel 614ca <_Thread_Maximum_extensions>,%d1
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
the_thread->Start.fp_context = fp_area;
48a2a: 2540 00c6 movel %d0,%a2@(198)
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
goto failed;
fp_area = _Context_Fp_start( fp_area, 0 );
}
the_thread->fp_context = fp_area;
48a2e: 2540 0102 movel %d0,%a2@(258)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48a32: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
48a36: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
48a3a: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
48a3e: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
48a42: 4a81 tstl %d1 48a44: 6600 0178 bnew 48bbe <_Thread_Initialize+0x1ee>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48a48: 42aa 0116 clrl %a2@(278) 48a4c: 4284 clrl %d4
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
48a4e: 2543 00ac movel %d3,%a2@(172)
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
48a52: 7002 moveq #2,%d0
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
48a54: 256e 0028 00b0 movel %fp@(40),%a2@(176)
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
48a5a: 1546 00aa moveb %d6,%a2@(170)
the_thread->Start.budget_algorithm = budget_algorithm;
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
48a5e: b083 cmpl %d3,%d0 48a60: 6700 00d6 beqw 48b38 <_Thread_Initialize+0x168>
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48a64: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48a66: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
48a6c: 7001 moveq #1,%d0
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48a6e: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48a70: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48a74: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48a78: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
48a7c: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48a80: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48a84: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a8a: 206e 0008 moveal %fp@(8),%a0 48a8e: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48a90: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a96: 2068 0018 moveal %a0@(24),%a0 48a9a: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
48a9e: 42aa 0082 clrl %a2@(130) 48aa2: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48aa6: 42aa 0086 clrl %a2@(134)
* enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread );
48aaa: 2f0a movel %a2,%sp@- 48aac: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48ab2: 4fef 000c lea %sp@(12),%sp 48ab6: 4a00 tstb %d0
48ab8: 6672 bnes 48b2c <_Thread_Initialize+0x15c>
return true;
failed:
if ( the_thread->libc_reent )
48aba: 202a 0106 movel %a2@(262),%d0
48abe: 670a beqs 48aca <_Thread_Initialize+0xfa>
_Workspace_Free( the_thread->libc_reent );
48ac0: 2f00 movel %d0,%sp@- 48ac2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ac8: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48aca: 202a 010a movel %a2@(266),%d0
48ace: 670a beqs 48ada <_Thread_Initialize+0x10a>
_Workspace_Free( the_thread->API_Extensions[i] );
48ad0: 2f00 movel %d0,%sp@- 48ad2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ad8: 588f addql #4,%sp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48ada: 202a 010e movel %a2@(270),%d0
48ade: 670a beqs 48aea <_Thread_Initialize+0x11a>
_Workspace_Free( the_thread->API_Extensions[i] );
48ae0: 2f00 movel %d0,%sp@- 48ae2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48ae8: 588f addql #4,%sp
failed:
if ( the_thread->libc_reent )
_Workspace_Free( the_thread->libc_reent );
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48aea: 202a 0112 movel %a2@(274),%d0
48aee: 670a beqs 48afa <_Thread_Initialize+0x12a> <== ALWAYS TAKEN
_Workspace_Free( the_thread->API_Extensions[i] );
48af0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 48af2: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> <== NOT EXECUTED 48af8: 588f addql #4,%sp <== NOT EXECUTED
if ( extensions_area )
48afa: 4a84 tstl %d4
48afc: 670a beqs 48b08 <_Thread_Initialize+0x138>
(void) _Workspace_Free( extensions_area );
48afe: 2f04 movel %d4,%sp@- 48b00: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48b06: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
48b08: 4a85 tstl %d5
48b0a: 670a beqs 48b16 <_Thread_Initialize+0x146>
(void) _Workspace_Free( fp_area );
48b0c: 2f05 movel %d5,%sp@- 48b0e: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 48b14: 588f addql #4,%sp
#endif
_Thread_Stack_Free( the_thread );
48b16: 2f0a movel %a2,%sp@- 48b18: 4eb9 0004 946c jsr 4946c <_Thread_Stack_Free>
return false;
48b1e: 588f addql #4,%sp
}
48b20: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
48b26: 4200 clrb %d0
return false;
}
48b28: 4e5e unlk %fp 48b2a: 4e75 rts 48b2c: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
* user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status )
48b32: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread );
return false;
}
48b34: 4e5e unlk %fp 48b36: 4e75 rts
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
48b38: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48b3e: 7001 moveq #1,%d0
case THREAD_CPU_BUDGET_ALGORITHM_NONE:
case THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE:
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
case THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
48b40: 2550 0076 movel %a0@,%a2@(118)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48b44: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48b46: 256e 002c 00b4 movel %fp@(44),%a2@(180)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
the_thread->Start.initial_priority = priority;
_Thread_Set_priority( the_thread, priority );
48b4c: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48b4e: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48b52: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48b56: 42aa 001c clrl %a2@(28)
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->real_priority = priority;
48b5a: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48b5e: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48b62: 4eb9 0004 9200 jsr 49200 <_Thread_Set_priority> 48b68: 206e 0008 moveal %fp@(8),%a0 48b6c: 4280 clrl %d0
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48b6e: 256e 0030 000c movel %fp@(48),%a2@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48b74: 2068 0018 moveal %a0@(24),%a0 48b78: 302a 000a movew %a2@(10),%d0
/*
* Initialize the CPU usage statistics
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_Timestamp_Set_to_zero( &the_thread->cpu_time_used );
48b7c: 42aa 0082 clrl %a2@(130) 48b80: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4) 48b84: 42aa 0086 clrl %a2@(134)
* enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread );
48b88: 2f0a movel %a2,%sp@- 48b8a: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48b90: 4fef 000c lea %sp@(12),%sp 48b94: 4a00 tstb %d0 48b96: 6700 ff22 beqw 48aba <_Thread_Initialize+0xea> 48b9a: 6090 bras 48b2c <_Thread_Initialize+0x15c>
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
48b9c: 4878 001c pea 1c <OPER2+0x8> 48ba0: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
if ( !fp_area )
48ba6: 588f addql #4,%sp
/*
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
48ba8: 2a00 movel %d0,%d5
if ( !fp_area )
48baa: 6600 fe78 bnew 48a24 <_Thread_Initialize+0x54>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48bae: 202a 0106 movel %a2@(262),%d0
* Allocate the floating point area for this thread
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( is_fp ) {
fp_area = _Workspace_Allocate( CONTEXT_FP_SIZE );
if ( !fp_area )
48bb2: 4284 clrl %d4
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48bb4: 4a80 tstl %d0 48bb6: 6600 ff08 bnew 48ac0 <_Thread_Initialize+0xf0> 48bba: 6000 ff0e braw 48aca <_Thread_Initialize+0xfa>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48bbe: e589 lsll #2,%d1 48bc0: 2041 moveal %d1,%a0 48bc2: 4868 0004 pea %a0@(4) 48bc6: 4eb9 0004 9d44 jsr 49d44 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48bcc: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48bce: 2800 movel %d0,%d4
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48bd0: 6700 fee8 beqw 48aba <_Thread_Initialize+0xea>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48bd4: 2040 moveal %d0,%a0
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
48bd6: 4281 clrl %d1 48bd8: 4280 clrl %d0 48bda: 2279 0006 14ca moveal 614ca <_Thread_Maximum_extensions>,%a1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48be0: 2544 0116 movel %d4,%a2@(278)
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
the_thread->extensions[i] = NULL;
48be4: 42b0 1c00 clrl %a0@(00000000,%d1:l:4)
* create the extension long after tasks have been created
* so they cannot rely on the thread create user extension
* call.
*/
if ( the_thread->extensions ) {
for ( i = 0; i <= _Thread_Maximum_extensions ; i++ )
48be8: 5280 addql #1,%d0 48bea: 2200 movel %d0,%d1 48bec: b089 cmpl %a1,%d0 48bee: 6200 fe5e bhiw 48a4e <_Thread_Initialize+0x7e> 48bf2: 206a 0116 moveal %a2@(278),%a0 48bf6: 60ec bras 48be4 <_Thread_Initialize+0x214>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48bf8: 2f04 movel %d4,%sp@- 48bfa: 2f0a movel %a2,%sp@- 48bfc: 4eb9 0004 9408 jsr 49408 <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
48c02: 508f addql #8,%sp
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48c04: 2200 movel %d0,%d1
if ( !actual_stack_size || actual_stack_size < stack_size )
48c06: 6712 beqs 48c1a <_Thread_Initialize+0x24a>
48c08: b084 cmpl %d4,%d0
48c0a: 650e bcss 48c1a <_Thread_Initialize+0x24a> <== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
48c0c: 202a 00ca movel %a2@(202),%d0
the_thread->Start.core_allocated_stack = true;
48c10: 7801 moveq #1,%d4 48c12: 1544 00bc moveb %d4,%a2@(188) 48c16: 6000 fdfa braw 48a12 <_Thread_Initialize+0x42>
_Thread_Stack_Free( the_thread );
return false;
}
48c1a: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
48c20: 4200 clrb %d0
}
48c22: 4e5e unlk %fp
...
0004ea20 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4ea20: 4e56 0000 linkw %fp,#0 4ea24: 2f0a movel %a2,%sp@- 4ea26: 246e 0008 moveal %fp@(8),%a2
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
4ea2a: 256e 0010 00a6 movel %fp@(16),%a2@(166)
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4ea30: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4ea36: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4ea3c: 256e 000c 00a2 movel %fp@(12),%a2@(162)
{
the_thread->resource_count = 0;
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count = 0;
#endif
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4ea42: 156a 00aa 0075 moveb %a2@(170),%a2@(117)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4ea48: 42aa 001c clrl %a2@(28)
the_thread->budget_callout = the_thread->Start.budget_callout;
the_thread->Start.pointer_argument = pointer_argument;
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
4ea4c: 2f0a movel %a2,%sp@- 4ea4e: 4eb9 0004 9c90 jsr 49c90 <_Thread_queue_Extract_with_proxy> 4ea54: 588f addql #4,%sp 4ea56: 4a00 tstb %d0
4ea58: 6608 bnes 4ea62 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4ea5a: 7002 moveq #2,%d0 4ea5c: b0aa 0050 cmpl %a2@(80),%d0
4ea60: 672a beqs 4ea8c <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4ea62: 202a 00b8 movel %a2@(184),%d0 4ea66: b0aa 0014 cmpl %a2@(20),%d0
4ea6a: 6718 beqs 4ea84 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4ea6c: 2d4a 0008 movel %a2,%fp@(8) 4ea70: 2d40 000c movel %d0,%fp@(12)
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
4ea74: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
}
}
4ea78: 246e fffc moveal %fp@(-4),%a2 4ea7c: 4e5e unlk %fp
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
the_thread->real_priority = the_thread->Start.initial_priority;
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4ea7e: 4ef9 0004 9ea0 jmp 49ea0 <_Thread_Set_priority>
} }
4ea84: 246e fffc moveal %fp@(-4),%a2 4ea88: 4e5e unlk %fp 4ea8a: 4e75 rts
the_thread->Start.numeric_argument = numeric_argument;
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
if ( _Watchdog_Is_active( &the_thread->Timer ) )
(void) _Watchdog_Remove( &the_thread->Timer );
4ea8c: 486a 0048 pea %a2@(72) 4ea90: 4eb9 0004 a8d8 jsr 4a8d8 <_Watchdog_Remove> 4ea96: 588f addql #4,%sp 4ea98: 60c8 bras 4ea62 <_Thread_Reset+0x42>
...
00049e14 <_Thread_Restart>:
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e14: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
49e16: 4e56 0000 linkw %fp,#0 49e1a: 2f0a movel %a2,%sp@- 49e1c: 246e 0008 moveal %fp@(8),%a2
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e20: c0aa 0010 andl %a2@(16),%d0 49e24: 4a00 tstb %d0
49e26: 670a beqs 49e32 <_Thread_Restart+0x1e>
return true;
}
return false;
}
49e28: 246e fffc moveal %fp@(-4),%a2 49e2c: 4e5e unlk %fp
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e2e: 4200 clrb %d0
return true;
}
return false;
}
49e30: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
49e32: 2f0a movel %a2,%sp@- 49e34: 4eb9 0004 a024 jsr 4a024 <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
49e3a: 2f2e 0010 movel %fp@(16),%sp@- 49e3e: 2f2e 000c movel %fp@(12),%sp@- 49e42: 2f0a movel %a2,%sp@- 49e44: 4eb9 0004 ea20 jsr 4ea20 <_Thread_Reset>
_Thread_Load_environment( the_thread );
49e4a: 2f0a movel %a2,%sp@- 49e4c: 4eb9 0004 e674 jsr 4e674 <_Thread_Load_environment>
_Thread_Ready( the_thread );
49e52: 2f0a movel %a2,%sp@- 49e54: 4eb9 0004 e960 jsr 4e960 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49e5a: 2f0a movel %a2,%sp@- 49e5c: 4eb9 0004 a6c8 jsr 4a6c8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
49e62: 4fef 001c lea %sp@(28),%sp 49e66: b5f9 0006 247e cmpal 6247e <_Thread_Executing>,%a2
49e6c: 670a beqs 49e78 <_Thread_Restart+0x64>
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
_Context_Restore_fp( &_Thread_Executing->fp_context );
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49e6e: 7001 moveq #1,%d0
return true;
}
return false;
}
49e70: 246e fffc moveal %fp@(-4),%a2 49e74: 4e5e unlk %fp 49e76: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Thread_Restart_self( void )
{
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( _Thread_Executing->fp_context != NULL )
49e78: 4aaa 0102 tstl %a2@(258)
49e7c: 6712 beqs 49e90 <_Thread_Restart+0x7c>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49e7e: 486a 0102 pea %a2@(258) 49e82: 4eb9 0004 ac32 jsr 4ac32 <_CPU_Context_restore_fp> 49e88: 2479 0006 247e moveal 6247e <_Thread_Executing>,%a2 49e8e: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49e90: 486a 00ce pea %a2@(206) 49e94: 4eb9 0004 aada jsr 4aada <_CPU_Context_Restart_self>
49e9a: 588f addql #4,%sp <== NOT EXECUTED 49e9c: 7001 moveq #1,%d0 <== NOT EXECUTED 49e9e: 60d0 bras 49e70 <_Thread_Restart+0x5c> <== NOT EXECUTED
0004c8a4 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8a4: 327c 0700 moveaw #1792,%a1 4c8a8: 2009 movel %a1,%d0
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4c8aa: 4e56 ffec linkw %fp,#-20 4c8ae: 206e 0008 moveal %fp@(8),%a0 4c8b2: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8b6: 40c1 movew %sr,%d1 4c8b8: 8081 orl %d1,%d0 4c8ba: 46c0 movew %d0,%sr
_ISR_Enable( level );
return;
}
#endif
current_state = the_thread->current_state;
4c8bc: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c8c0: 0800 0001 btst #1,%d0
4c8c4: 6774 beqs 4c93a <_Thread_Resume+0x96> <== NEVER TAKEN
4c8c6: 74fd moveq #-3,%d2 4c8c8: c082 andl %d2,%d0
current_state =
4c8ca: 2140 0010 movel %d0,%a0@(16)
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
if ( _States_Is_ready( current_state ) ) {
4c8ce: 666a bnes 4c93a <_Thread_Resume+0x96>
RTEMS_INLINE_ROUTINE void _Priority_Add_to_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor |= the_priority_map->ready_minor;
4c8d0: 2868 008e moveal %a0@(142),%a4 4c8d4: 3028 0094 movew %a0@(148),%d0 4c8d8: 3414 movew %a4@,%d2
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c8da: 2468 008a moveal %a0@(138),%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4c8de: 260a movel %a2,%d3 4c8e0: 5883 addql #4,%d3 4c8e2: 8082 orl %d2,%d0 4c8e4: 2083 movel %d3,%a0@
old_last_node = the_chain->last;
4c8e6: 266a 0008 moveal %a2@(8),%a3 4c8ea: 3880 movew %d0,%a4@
the_chain->last = the_node;
4c8ec: 2548 0008 movel %a0,%a2@(8)
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c8f0: 3439 0006 5034 movew 65034 <_Priority_Major_bit_map>,%d2 4c8f6: 3028 0092 movew %a0@(146),%d0
old_last_node->next = the_node; the_node->previous = old_last_node;
4c8fa: 214b 0004 movel %a3,%a0@(4) 4c8fe: 8082 orl %d2,%d0
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4c900: 2688 movel %a0,%a3@ 4c902: 33c0 0006 5034 movew %d0,65034 <_Priority_Major_bit_map>
_ISR_Flash( level );
4c908: 2009 movel %a1,%d0 4c90a: 46c1 movew %d1,%sr 4c90c: 8081 orl %d1,%d0 4c90e: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c910: 2028 0014 movel %a0@(20),%d0 4c914: 2279 0006 5012 moveal 65012 <_Thread_Heir>,%a1 4c91a: b0a9 0014 cmpl %a1@(20),%d0
4c91e: 641a bccs 4c93a <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c920: 23c8 0006 5012 movel %a0,65012 <_Thread_Heir>
if ( _Thread_Executing->is_preemptible ||
4c926: 2079 0006 503e moveal 6503e <_Thread_Executing>,%a0 4c92c: 4a28 0075 tstb %a0@(117)
4c930: 6712 beqs 4c944 <_Thread_Resume+0xa0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c932: 7001 moveq #1,%d0 4c934: 13c0 0006 504e moveb %d0,6504e <_Context_Switch_necessary>
}
}
}
_ISR_Enable( level );
4c93a: 46c1 movew %d1,%sr
}
4c93c: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4c940: 4e5e unlk %fp 4c942: 4e75 rts
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4c944: 4a80 tstl %d0
4c946: 66f2 bnes 4c93a <_Thread_Resume+0x96> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c948: 7001 moveq #1,%d0 <== NOT EXECUTED 4c94a: 13c0 0006 504e moveb %d0,6504e <_Context_Switch_necessary> <== NOT EXECUTED 4c950: 60e8 bras 4c93a <_Thread_Resume+0x96> <== NOT EXECUTED
...
00049548 <_Thread_Suspend>:
{
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
49548: 203c 0000 0700 movel #1792,%d0
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
4954e: 4e56 fff4 linkw %fp,#-12 49552: 206e 0008 moveal %fp@(8),%a0 49556: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
4955a: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
4955e: 40c1 movew %sr,%d1 49560: 8081 orl %d1,%d0 49562: 46c0 movew %d0,%sr
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
49564: 2028 0010 movel %a0@(16),%d0
49568: 6642 bnes 495ac <_Thread_Suspend+0x64>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
4956a: 7002 moveq #2,%d0
if ( _Chain_Has_only_one_node( ready ) ) {
4956c: 2429 0008 movel %a1@(8),%d2
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
49570: 2140 0010 movel %d0,%a0@(16)
if ( _Chain_Has_only_one_node( ready ) ) {
49574: b491 cmpl %a1@,%d2 49576: 6700 0098 beqw 49610 <_Thread_Suspend+0xc8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4957a: 2250 moveal %a0@,%a1
previous = the_node->previous;
4957c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49580: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49582: 234a 0004 movel %a2,%a1@(4)
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49586: 203c 0000 0700 movel #1792,%d0 4958c: 46c1 movew %d1,%sr 4958e: 8081 orl %d1,%d0 49590: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
49592: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
49598: 6730 beqs 495ca <_Thread_Suspend+0x82>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
4959a: b1f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a0
495a0: 671c beqs 495be <_Thread_Suspend+0x76> <== NEVER TAKEN
_Context_Switch_necessary = true;
_ISR_Enable( level );
495a2: 46c1 movew %d1,%sr
}
495a4: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495a8: 4e5e unlk %fp 495aa: 4e75 rts
_ISR_Disable( level );
#if defined(RTEMS_ITRON_API)
the_thread->suspend_count++;
#endif
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
495ac: 7402 moveq #2,%d2 495ae: 8480 orl %d0,%d2 495b0: 2142 0010 movel %d2,%a0@(16)
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
495b4: 46c1 movew %d1,%sr
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
495b6: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495ba: 4e5e unlk %fp 495bc: 4e75 rts
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
495be: 7401 moveq #1,%d2 495c0: 13c2 0006 14f6 moveb %d2,614f6 <_Context_Switch_necessary>
_ISR_Enable( level );
495c6: 46c1 movew %d1,%sr 495c8: 60da bras 495a4 <_Thread_Suspend+0x5c>
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 );
495ca: 3039 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d0 495d0: 4840 swap %d0 495d2: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
495d4: 4282 clrl %d2 495d6: 43f9 0006 154c lea 6154c <_Priority_Bit_map>,%a1 495dc: 3400 movew %d0,%d2 495de: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 495e2: 4840 swap %d0 495e4: 04c0 ff1 %d0 495e6: 4283 clrl %d3 495e8: e98a lsll #4,%d2 495ea: 3600 movew %d0,%d3 495ec: 2279 0006 13d8 moveal 613d8 <_Thread_Ready_chain>,%a1 495f2: 2002 movel %d2,%d0 495f4: d083 addl %d3,%d0 495f6: 2400 movel %d0,%d2 495f8: e58a lsll #2,%d2 495fa: e988 lsll #4,%d0 495fc: 93c2 subal %d2,%a1 495fe: d3c0 addal %d0,%a1 49600: 23d1 0006 14ba movel %a1@,614ba <_Thread_Heir>
_ISR_Flash( level );
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
49606: b1f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a0
4960c: 6694 bnes 495a2 <_Thread_Suspend+0x5a> <== NEVER TAKEN
4960e: 60ae bras 495be <_Thread_Suspend+0x76>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49610: 2009 movel %a1,%d0 49612: 5880 addql #4,%d0
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
49614: 2468 008e moveal %a0@(142),%a2 49618: 2280 movel %d0,%a1@ 4961a: 3412 movew %a2@,%d2 4961c: 3028 0098 movew %a0@(152),%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49620: 2349 0008 movel %a1,%a1@(8) 49624: c082 andl %d2,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
49626: 42a9 0004 clrl %a1@(4) 4962a: 3480 movew %d0,%a2@
the_thread->current_state = STATES_SUSPENDED;
if ( _Chain_Has_only_one_node( ready ) ) {
_Chain_Initialize_empty( ready );
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
4962c: 6600 ff58 bnew 49586 <_Thread_Suspend+0x3e>
if ( *the_priority_map->minor == 0 )
_Priority_Major_bit_map &= the_priority_map->block_major;
49630: 3439 0006 14dc movew 614dc <_Priority_Major_bit_map>,%d2 49636: 3028 0096 movew %a0@(150),%d0 4963a: c082 andl %d2,%d0 4963c: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
49642: 203c 0000 0700 movel #1792,%d0 49648: 46c1 movew %d1,%sr 4964a: 8081 orl %d1,%d0 4964c: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
4964e: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0 49654: 6600 ff44 bnew 4959a <_Thread_Suspend+0x52> 49658: 6000 ff70 braw 495ca <_Thread_Suspend+0x82>
0004965c <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
4965c: 4e56 0000 linkw %fp,#0 49660: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
49662: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
49668: 4a2a 0075 tstb %a2@(117)
4966c: 6720 beqs 4968e <_Thread_Tickle_timeslice+0x32>
return;
if ( !_States_Is_ready( executing->current_state ) )
4966e: 4aaa 0010 tstl %a2@(16)
49672: 661a bnes 4968e <_Thread_Tickle_timeslice+0x32>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
49674: 202a 007a movel %a2@(122),%d0 49678: 7201 moveq #1,%d1 4967a: b280 cmpl %d0,%d1
4967c: 6210 bhis 4968e <_Thread_Tickle_timeslice+0x32>
4967e: 123c 0002 moveb #2,%d1 49682: b280 cmpl %d0,%d1
49684: 642e bccs 496b4 <_Thread_Tickle_timeslice+0x58>
49686: 123c 0003 moveb #3,%d1 4968a: b280 cmpl %d0,%d1
4968c: 6708 beqs 49696 <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
4968e: 246e fffc moveal %fp@(-4),%a2 49692: 4e5e unlk %fp 49694: 4e75 rts
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
49696: 202a 0076 movel %a2@(118),%d0 4969a: 5380 subql #1,%d0 4969c: 2540 0076 movel %d0,%a2@(118)
496a0: 66ec bnes 4968e <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing );
496a2: 2f0a movel %a2,%sp@- 496a4: 206a 007e moveal %a2@(126),%a0 496a8: 4e90 jsr %a0@
break;
#endif
}
}
496aa: 246e fffc moveal %fp@(-4),%a2
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
496ae: 588f addql #4,%sp
break;
#endif
}
}
496b0: 4e5e unlk %fp 496b2: 4e75 rts
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 ) {
496b4: 202a 0076 movel %a2@(118),%d0 496b8: 5380 subql #1,%d0 496ba: 2540 0076 movel %d0,%a2@(118)
496be: 6ece bgts 4968e <_Thread_Tickle_timeslice+0x32>
_Thread_Reset_timeslice();
496c0: 4eb9 0004 dd3c jsr 4dd3c <_Thread_Reset_timeslice>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
496c6: 41f9 0006 13dc lea 613dc <_Thread_Ticks_per_timeslice>,%a0 496cc: 2550 0076 movel %a0@,%a2@(118)
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
496d0: 246e fffc moveal %fp@(-4),%a2
496d4: 4e5e unlk %fp <== NOT EXECUTED
000496d8 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496d8: 4e56 fff4 linkw %fp,#-12
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
496dc: 2079 0006 14e6 moveal 614e6 <_Thread_Executing>,%a0
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496e2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
496e6: 243c 0000 0700 movel #1792,%d2 496ec: 2002 movel %d2,%d0
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
496ee: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
496f2: 40c1 movew %sr,%d1 496f4: 8081 orl %d1,%d0 496f6: 46c0 movew %d0,%sr
if ( !_Chain_Has_only_one_node( ready ) ) {
496f8: 2029 0008 movel %a1@(8),%d0 496fc: b091 cmpl %a1@,%d0
496fe: 6750 beqs 49750 <_Thread_Yield_processor+0x78>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
49700: 2450 moveal %a0@,%a2
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
49702: 2009 movel %a1,%d0 49704: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49706: 2668 0004 moveal %a0@(4),%a3
next->previous = previous; previous->next = next;
4970a: 268a movel %a2,%a3@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
4970c: 254b 0004 movel %a3,%a2@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
49710: 2080 movel %d0,%a0@
old_last_node = the_chain->last;
49712: 2469 0008 moveal %a1@(8),%a2
the_chain->last = the_node;
49716: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
4971a: 214a 0004 movel %a2,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
4971e: 2488 movel %a0,%a2@
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
49720: 46c1 movew %d1,%sr 49722: 8481 orl %d1,%d2 49724: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
49726: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
4972c: 6712 beqs 49740 <_Thread_Yield_processor+0x68> <== ALWAYS TAKEN
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
4972e: 7001 moveq #1,%d0 <== NOT EXECUTED 49730: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED
_ISR_Enable( level );
49736: 46c1 movew %d1,%sr
}
49738: 4cd7 0c04 moveml %sp@,%d2/%a2-%a3 4973c: 4e5e unlk %fp 4973e: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
49740: 23d1 0006 14ba movel %a1@,614ba <_Thread_Heir>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
49746: 7001 moveq #1,%d0 49748: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> 4974e: 60e6 bras 49736 <_Thread_Yield_processor+0x5e>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
49750: b1f9 0006 14ba cmpal 614ba <_Thread_Heir>,%a0
49756: 67de beqs 49736 <_Thread_Yield_processor+0x5e> <== ALWAYS TAKEN
_Context_Switch_necessary = true;
49758: 7001 moveq #1,%d0 <== NOT EXECUTED 4975a: 13c0 0006 14f6 moveb %d0,614f6 <_Context_Switch_necessary> <== NOT EXECUTED 49760: 60d4 bras 49736 <_Thread_Yield_processor+0x5e> <== NOT EXECUTED
...
00048384 <_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 ) ) {
48384: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
48386: 4e56 0000 linkw %fp,#0 4838a: 202e 0010 movel %fp@(16),%d0 4838e: 2f0a movel %a2,%sp@- 48390: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
48394: 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 ) ) {
48398: b2aa 0050 cmpl %a2@(80),%d1
4839c: 671c beqs 483ba <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
4839e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
483a0: 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
}
483a4: 246e fffc moveal %fp@(-4),%a2 483a8: 203c 1003 fff8 movel #268697592,%d0 483ae: 2d40 000c movel %d0,%fp@(12) 483b2: 4e5e unlk %fp 483b4: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
483ba: 123c 0003 moveb #3,%d1 483be: 2541 0050 movel %d1,%a2@(80)
* 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 ) ) {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
483c2: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
483c4: 486a 0048 pea %a2@(72) 483c8: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 483ce: 588f addql #4,%sp 483d0: 203c 1003 fff8 movel #268697592,%d0 483d6: 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
}
483da: 246e fffc moveal %fp@(-4),%a2 483de: 2d40 000c movel %d0,%fp@(12) 483e2: 4e5e unlk %fp 483e4: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
00048f04 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
48f04: 4e56 ffe4 linkw %fp,#-28 48f08: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 48f0c: 266e 000c moveal %fp@(12),%a3
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
48f10: 41eb 003c lea %a3@(60),%a0
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
48f14: 263c 0000 0700 movel #1792,%d3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
48f1a: 222b 0014 movel %a3@(20),%d1
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ];
48f1e: 2401 movel %d1,%d2 48f20: ec8a lsrl #6,%d2 48f22: 2002 movel %d2,%d0 48f24: e58a lsll #2,%d2 48f26: e988 lsll #4,%d0
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
48f28: 286e 0008 moveal %fp@(8),%a4
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
48f2c: 9082 subl %d2,%d0 48f2e: 45f4 0800 lea %a4@(00000000,%d0:l),%a2 48f32: 2748 0038 movel %a0,%a3@(56)
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
48f36: 41eb 0038 lea %a3@(56),%a0
block_state = the_thread_queue->state;
48f3a: 242c 0038 movel %a4@(56),%d2 48f3e: 2748 0040 movel %a0,%a3@(64)
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48f42: 42ab 003c clrl %a3@(60)
if ( _Thread_queue_Is_reverse_search( priority ) )
48f46: 0801 0005 btst #5,%d1
48f4a: 6656 bnes 48fa2 <_Thread_queue_Enqueue_priority+0x9e>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48f4c: 2a0a movel %a2,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48f4e: 2803 movel %d3,%d4 48f50: 5885 addql #4,%d5 48f52: 2004 movel %d4,%d0 48f54: 40c3 movew %sr,%d3 48f56: 8083 orl %d3,%d0 48f58: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->first;
48f5a: 2052 moveal %a2@,%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f5c: ba88 cmpl %a0,%d5 48f5e: 6700 010a beqw 4906a <_Thread_queue_Enqueue_priority+0x166>
search_priority = search_thread->current_priority;
48f62: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
48f66: b3c1 cmpal %d1,%a1
48f68: 6418 bccs 48f82 <_Thread_queue_Enqueue_priority+0x7e>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
48f6a: 2004 movel %d4,%d0 48f6c: 46c3 movew %d3,%sr 48f6e: 8083 orl %d3,%d0 48f70: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48f72: 2002 movel %d2,%d0 48f74: c0a8 0010 andl %a0@(16),%d0 48f78: 6700 0092 beqw 4900c <_Thread_queue_Enqueue_priority+0x108>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
48f7c: 2050 moveal %a0@,%a0
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f7e: ba88 cmpl %a0,%d5
48f80: 66e0 bnes 48f62 <_Thread_queue_Enqueue_priority+0x5e>
48f82: 2403 movel %d3,%d2
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48f84: 7001 moveq #1,%d0 48f86: b0ac 0030 cmpl %a4@(48),%d0 48f8a: 6700 0094 beqw 49020 <_Thread_queue_Enqueue_priority+0x11c>
* For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
48f8e: 206e 0010 moveal %fp@(16),%a0
return the_thread_queue->sync_state;
48f92: 202c 0030 movel %a4@(48),%d0
* For example, the blocking thread could have been given * the mutex by an ISR or timed out. * * WARNING! Returning with interrupts disabled! */ *level_p = level;
48f96: 2082 movel %d2,%a0@
return the_thread_queue->sync_state; }
48f98: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 48f9c: 4e5e unlk %fp 48f9e: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48fa0: 46c4 movew %d4,%sr
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48fa2: 4284 clrl %d4 48fa4: 1839 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d4
_ISR_Disable( level );
48faa: 2003 movel %d3,%d0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48fac: 2244 moveal %d4,%a1 48fae: 5289 addql #1,%a1
_ISR_Disable( level );
48fb0: 40c4 movew %sr,%d4 48fb2: 8084 orl %d4,%d0 48fb4: 46c0 movew %d0,%sr
search_thread = (Thread_Control *) header->last;
48fb6: 206a 0008 moveal %a2@(8),%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48fba: b5c8 cmpal %a0,%a2
48fbc: 6720 beqs 48fde <_Thread_queue_Enqueue_priority+0xda>
search_priority = search_thread->current_priority;
48fbe: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
48fc2: b3c1 cmpal %d1,%a1
48fc4: 6318 blss 48fde <_Thread_queue_Enqueue_priority+0xda>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
48fc6: 2003 movel %d3,%d0 48fc8: 46c4 movew %d4,%sr 48fca: 8084 orl %d4,%d0 48fcc: 46c0 movew %d0,%sr
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48fce: 2002 movel %d2,%d0 48fd0: c0a8 0010 andl %a0@(16),%d0
48fd4: 67ca beqs 48fa0 <_Thread_queue_Enqueue_priority+0x9c>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
48fd6: 2068 0004 moveal %a0@(4),%a0
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48fda: b5c8 cmpal %a0,%a2
48fdc: 66e0 bnes 48fbe <_Thread_queue_Enqueue_priority+0xba>
48fde: 2404 movel %d4,%d2
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
48fe0: 7001 moveq #1,%d0 48fe2: b0ac 0030 cmpl %a4@(48),%d0
48fe6: 66a6 bnes 48f8e <_Thread_queue_Enqueue_priority+0x8a>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48fe8: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
48fec: b3c1 cmpal %d1,%a1
48fee: 6756 beqs 49046 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
48ff0: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
48ff2: 2748 0004 movel %a0,%a3@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
48ff6: 2689 movel %a1,%a3@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48ff8: 274c 0044 movel %a4,%a3@(68)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
48ffc: 208b movel %a3,%a0@
next_node->previous = the_node;
48ffe: 234b 0004 movel %a3,%a1@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
49002: 46c4 movew %d4,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49004: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49008: 4e5e unlk %fp 4900a: 4e75 rts
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
4900c: 46c3 movew %d3,%sr <== NOT EXECUTED
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
4900e: 2004 movel %d4,%d0 <== NOT EXECUTED 49010: 40c3 movew %sr,%d3 <== NOT EXECUTED 49012: 8083 orl %d3,%d0 <== NOT EXECUTED 49014: 46c0 movew %d0,%sr <== NOT EXECUTED
search_thread = (Thread_Control *) header->first;
49016: 2052 moveal %a2@,%a0 <== NOT EXECUTED
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
49018: ba88 cmpl %a0,%d5 <== NOT EXECUTED 4901a: 6600 ff46 bnew 48f62 <_Thread_queue_Enqueue_priority+0x5e><== NOT EXECUTED 4901e: 604a bras 4906a <_Thread_queue_Enqueue_priority+0x166><== NOT EXECUTED
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49020: 42ac 0030 clrl %a4@(48)
if ( priority == search_priority )
49024: b3c1 cmpal %d1,%a1
49026: 671e beqs 49046 <_Thread_queue_Enqueue_priority+0x142>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
49028: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
4902c: 2688 movel %a0,%a3@
the_node->previous = previous_node;
4902e: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
49032: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
49036: 228b movel %a3,%a1@
search_node->previous = the_node;
49038: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
4903c: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
4903e: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49042: 4e5e unlk %fp 49044: 4e75 rts 49046: 41e8 003c lea %a0@(60),%a0
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
equal_priority: /* add at end of priority group */
search_node = _Chain_Tail( &search_thread->Wait.Block2n );
previous_node = search_node->previous;
4904a: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
4904e: 2688 movel %a0,%a3@
the_node->previous = previous_node;
49050: 2749 0004 movel %a1,%a3@(4)
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
49054: 274c 0044 movel %a4,%a3@(68)
previous_node = search_node->previous;
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
the_node->previous = previous_node;
previous_node->next = the_node;
49058: 228b movel %a3,%a1@
search_node->previous = the_node;
4905a: 214b 0004 movel %a3,%a0@(4)
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
4905e: 46c2 movew %d2,%sr 49060: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49062: 4cd7 1c3c moveml %sp@,%d2-%d5/%a2-%a4 49066: 4e5e unlk %fp 49068: 4e75 rts
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->first;
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
4906a: 2403 movel %d3,%d2 4906c: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
49070: 7001 moveq #1,%d0 49072: b0ac 0030 cmpl %a4@(48),%d0 49076: 6600 ff16 bnew 48f8e <_Thread_queue_Enqueue_priority+0x8a> 4907a: 60a4 bras 49020 <_Thread_queue_Enqueue_priority+0x11c>
00048e68 <_Thread_queue_Enqueue_with_handler>:
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48e68: 4e56 fff0 linkw %fp,#-16 48e6c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 48e70: 266e 0008 moveal %fp@(8),%a3
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48e74: 2f2b 0038 movel %a3@(56),%sp@-
Thread_queue_Control *,
Thread_Control *,
ISR_Level *
);
the_thread = _Thread_Executing;
48e78: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
void _Thread_queue_Enqueue_with_handler(
Thread_queue_Control *the_thread_queue,
Watchdog_Interval timeout,
Thread_queue_Timeout_callout handler
)
{
48e7e: 242e 000c movel %fp@(12),%d2
else #endif /* * Set the blocking state for this thread queue in the thread. */ _Thread_Set_state( the_thread, the_thread_queue->state );
48e82: 2f0a movel %a2,%sp@- 48e84: 4eb9 0004 9270 jsr 49270 <_Thread_Set_state>
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
48e8a: 508f addql #8,%sp 48e8c: 4a82 tstl %d2
48e8e: 6644 bnes 48ed4 <_Thread_queue_Enqueue_with_handler+0x6c>
}
/*
* Now enqueue the thread per the discipline for this thread queue.
*/
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY )
48e90: 41f9 0004 8f04 lea 48f04 <_Thread_queue_Enqueue_priority>,%a0 48e96: 7001 moveq #1,%d0 48e98: b0ab 0034 cmpl %a3@(52),%d0
48e9c: 6706 beqs 48ea4 <_Thread_queue_Enqueue_with_handler+0x3c>
48e9e: 41f9 0004 dab0 lea 4dab0 <_Thread_queue_Enqueue_fifo>,%a0
enqueue_p = _Thread_queue_Enqueue_priority;
else /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
enqueue_p = _Thread_queue_Enqueue_fifo;
sync_state = (*enqueue_p)( the_thread_queue, the_thread, &level );
48ea4: 486e fffc pea %fp@(-4) 48ea8: 2f0a movel %a2,%sp@- 48eaa: 2f0b movel %a3,%sp@- 48eac: 4e90 jsr %a0@
if ( sync_state != THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
48eae: 4fef 000c lea %sp@(12),%sp 48eb2: 7201 moveq #1,%d1 48eb4: b280 cmpl %d0,%d1
48eb6: 6712 beqs 48eca <_Thread_queue_Enqueue_with_handler+0x62>
_Thread_blocking_operation_Cancel( sync_state, the_thread, level );
48eb8: 2f2e fffc movel %fp@(-4),%sp@- 48ebc: 2f0a movel %a2,%sp@- 48ebe: 2f00 movel %d0,%sp@- 48ec0: 4eb9 0004 8384 jsr 48384 <_Thread_blocking_operation_Cancel> 48ec6: 4fef 000c lea %sp@(12),%sp
}
48eca: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 48ed0: 4e5e unlk %fp 48ed2: 4e75 rts
/*
* If the thread wants to timeout, then schedule its timer.
*/
if ( timeout ) {
_Watchdog_Initialize(
48ed4: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
48ed8: 256e 0010 0064 movel %fp@(16),%a2@(100)
the_watchdog->id = id;
48ede: 2540 0068 movel %d0,%a2@(104)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
48ee2: 2542 0054 movel %d2,%a2@(84)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48ee6: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
48eea: 42aa 006c clrl %a2@(108)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
48eee: 486a 0048 pea %a2@(72) 48ef2: 4879 0006 1504 pea 61504 <_Watchdog_Ticks_chain> 48ef8: 4eb9 0004 9aac jsr 49aac <_Watchdog_Insert> 48efe: 508f addql #8,%sp 48f00: 608e bras 48e90 <_Thread_queue_Enqueue_with_handler+0x28>
...
00050428 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
50428: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
5042e: 4e56 0000 linkw %fp,#0 50432: 2f0a movel %a2,%sp@- 50434: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
50438: 40c1 movew %sr,%d1 5043a: 8081 orl %d1,%d0 5043c: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
5043e: 202a 0010 movel %a2@(16),%d0 50442: 0280 0003 bee0 andil #245472,%d0
50448: 6734 beqs 5047e <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5044a: 2052 moveal %a2@,%a0
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
5044c: 7002 moveq #2,%d0
previous = the_node->previous;
5044e: 226a 0004 moveal %a2@(4),%a1
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
50452: 42aa 0044 clrl %a2@(68)
next->previous = previous; previous->next = next;
50456: 2288 movel %a0,%a1@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
50458: 2149 0004 movel %a1,%a0@(4)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
5045c: b0aa 0050 cmpl %a2@(80),%d0
50460: 6726 beqs 50488 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
50462: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
50464: 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
}
50468: 246e fffc moveal %fp@(-4),%a2 5046c: 203c 1003 fff8 movel #268697592,%d0 50472: 2d40 000c movel %d0,%fp@(12) 50476: 4e5e unlk %fp 50478: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
5047e: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
50480: 246e fffc moveal %fp@(-4),%a2 50484: 4e5e unlk %fp 50486: 4e75 rts 50488: 7003 moveq #3,%d0 5048a: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
5048e: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
50490: 486a 0048 pea %a2@(72) 50494: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 5049a: 588f addql #4,%sp 5049c: 203c 1003 fff8 movel #268697592,%d0 504a2: 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
}
504a6: 246e fffc moveal %fp@(-4),%a2 504aa: 2d40 000c movel %d0,%fp@(12) 504ae: 4e5e unlk %fp 504b0: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
0004db44 <_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 );
4db44: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_priority_helper(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread,
bool requeuing
)
{
4db4a: 4e56 ffec linkw %fp,#-20 4db4e: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4db52: 246e 000c moveal %fp@(12),%a2 4db56: 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 );
4db5a: 40c1 movew %sr,%d1 4db5c: 8081 orl %d1,%d0 4db5e: 46c0 movew %d0,%sr
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4db60: 202a 0010 movel %a2@(16),%d0 4db64: 0280 0003 bee0 andil #245472,%d0
4db6a: 677e beqs 4dbea <_Thread_queue_Extract_priority_helper+0xa6>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4db6c: 200a movel %a2,%d0 4db6e: 0680 0000 003c addil #60,%d0
/*
* The thread was actually waiting on a thread queue so let's remove it.
*/
next_node = the_node->next;
4db74: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4db76: 226a 0004 moveal %a2@(4),%a1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4db7a: 206a 0038 moveal %a2@(56),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4db7e: b088 cmpl %a0,%d0
4db80: 6774 beqs 4dbf6 <_Thread_queue_Extract_priority_helper+0xb2>
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
4db82: 286a 0040 moveal %a2@(64),%a4
new_second_node = new_first_node->next;
4db86: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4db88: 2748 0004 movel %a0,%a3@(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;
4db8c: 2288 movel %a0,%a1@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4db8e: 2149 0004 movel %a1,%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;
4db92: 208b movel %a3,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4db94: 202a 0040 movel %a2@(64),%d0 4db98: b0aa 0038 cmpl %a2@(56),%d0
4db9c: 6716 beqs 4dbb4 <_Thread_queue_Extract_priority_helper+0x70>
/* > two threads on 2-n */
new_second_node->previous =
4db9e: 43e8 0038 lea %a0@(56),%a1 4dba2: 2b49 0004 movel %a1,%a5@(4)
_Chain_Head( &new_first_thread->Wait.Block2n );
new_first_thread->Wait.Block2n.first = new_second_node;
4dba6: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4dbaa: 214c 0040 movel %a4,%a0@(64)
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
4dbae: 41e8 003c lea %a0@(60),%a0 4dbb2: 2888 movel %a0,%a4@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4dbb4: 4a02 tstb %d2
4dbb6: 6626 bnes 4dbde <_Thread_queue_Extract_priority_helper+0x9a>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4dbb8: 7002 moveq #2,%d0 4dbba: b0aa 0050 cmpl %a2@(80),%d0
4dbbe: 6742 beqs 4dc02 <_Thread_queue_Extract_priority_helper+0xbe>
_ISR_Enable( level );
4dbc0: 46c1 movew %d1,%sr 4dbc2: 2d4a 0008 movel %a2,%fp@(8) 4dbc6: 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
}
4dbcc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbd2: 2d49 000c movel %a1,%fp@(12) 4dbd6: 4e5e unlk %fp 4dbd8: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4dbde: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dbe0: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbe6: 4e5e unlk %fp 4dbe8: 4e75 rts
Chain_Node *last_node;
the_node = (Chain_Node *) the_thread;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4dbea: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4dbec: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dbf2: 4e5e unlk %fp 4dbf4: 4e75 rts
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
next_node->previous = previous_node;
4dbf6: 2749 0004 movel %a1,%a3@(4)
new_first_thread->Wait.Block2n.last = last_node;
last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n );
}
} else {
previous_node->next = next_node;
4dbfa: 228b movel %a3,%a1@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4dbfc: 4a02 tstb %d2
4dbfe: 67b8 beqs 4dbb8 <_Thread_queue_Extract_priority_helper+0x74>
4dc00: 60dc bras 4dbde <_Thread_queue_Extract_priority_helper+0x9a> 4dc02: 7003 moveq #3,%d0 4dc04: 2540 0050 movel %d0,%a2@(80)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4dc08: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4dc0a: 486a 0048 pea %a2@(72) 4dc0e: 4eb9 0004 9bf4 jsr 49bf4 <_Watchdog_Remove> 4dc14: 588f addql #4,%sp 4dc16: 227c 1003 fff8 moveal #268697592,%a1 4dc1c: 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
}
4dc20: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4dc26: 2d49 000c movel %a1,%fp@(12) 4dc2a: 4e5e unlk %fp 4dc2c: 4ef9 0004 8538 jmp 48538 <_Thread_Clear_state>
...
000490e4 <_Thread_queue_Initialize>:
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
the_thread_queue->timeout_status = timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
490e4: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
490e6: 4e56 0000 linkw %fp,#0 490ea: 206e 0008 moveal %fp@(8),%a0
the_thread_queue->state = state;
490ee: 216e 0010 0038 movel %fp@(16),%a0@(56)
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
490f4: 202e 000c movel %fp@(12),%d0
the_thread_queue->state = state; the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
490f8: 216e 0014 003c movel %fp@(20),%a0@(60)
States_Control state,
uint32_t timeout_status
)
{
the_thread_queue->state = state;
the_thread_queue->discipline = the_discipline;
490fe: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
49102: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
49106: b280 cmpl %d0,%d1
49108: 6712 beqs 4911c <_Thread_queue_Initialize+0x38>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4910a: 2008 movel %a0,%d0 4910c: 5880 addql #4,%d0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4910e: 2148 0008 movel %a0,%a0@(8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49112: 2080 movel %d0,%a0@
the_chain->permanent_null = NULL;
49114: 42a8 0004 clrl %a0@(4)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
49118: 4e5e unlk %fp 4911a: 4e75 rts
* timeout_status - return on a timeout
*
* Output parameters: NONE
*/
void _Thread_queue_Initialize(
4911c: 2008 movel %a0,%d0 4911e: 0680 0000 0030 addil #48,%d0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49124: 2208 movel %a0,%d1 49126: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
49128: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4912c: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
4912e: 2148 0008 movel %a0,%a0@(8) 49132: 41e8 000c lea %a0@(12),%a0
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49136: b088 cmpl %a0,%d0
49138: 67de beqs 49118 <_Thread_queue_Initialize+0x34> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4913a: 2208 movel %a0,%d1 4913c: 5881 addql #4,%d1
the_chain->permanent_null = NULL;
4913e: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49142: 2081 movel %d1,%a0@
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49144: 2148 0008 movel %a0,%a0@(8) 49148: 41e8 000c lea %a0@(12),%a0 4914c: b088 cmpl %a0,%d0
4914e: 66d4 bnes 49124 <_Thread_queue_Initialize+0x40>
49150: 60c6 bras 49118 <_Thread_queue_Initialize+0x34>
...
0004dc34 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4dc34: 4e56 0000 linkw %fp,#0 4dc38: 206e 0008 moveal %fp@(8),%a0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4dc3c: 2268 0044 moveal %a0@(68),%a1
* If it is not satisfied, then it is "nothing happened" and
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
4dc40: 2029 0030 movel %a1@(48),%d0
4dc44: 6708 beqs 4dc4e <_Thread_queue_Process_timeout+0x1a>
4dc46: b1f9 0006 14e6 cmpal 614e6 <_Thread_Executing>,%a0
4dc4c: 6718 beqs 4dc66 <_Thread_queue_Process_timeout+0x32><== ALWAYS TAKEN
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
4dc4e: 2169 003c 0034 movel %a1@(60),%a0@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4dc54: 2f08 movel %a0,%sp@- 4dc56: 2f28 0044 movel %a0@(68),%sp@- 4dc5a: 4eb9 0004 db0c jsr 4db0c <_Thread_queue_Extract> 4dc60: 508f addql #8,%sp
} }
4dc62: 4e5e unlk %fp 4dc64: 4e75 rts
* a timeout is not allowed to occur.
*/
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SYNCHRONIZED &&
_Thread_Is_executing( the_thread ) ) {
if ( the_thread_queue->sync_state != THREAD_BLOCKING_OPERATION_SATISFIED ) {
4dc66: 7203 moveq #3,%d1 4dc68: b280 cmpl %d0,%d1
4dc6a: 67f6 beqs 4dc62 <_Thread_queue_Process_timeout+0x2e>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4dc6c: 7002 moveq #2,%d0
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
4dc6e: 4e5e unlk %fp
*/
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;
4dc70: 2169 003c 0034 movel %a1@(60),%a0@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4dc76: 2340 0030 movel %d0,%a1@(48)
}
} else {
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
}
}
00049154 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
49154: 4e56 fff0 linkw %fp,#-16 49158: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4915c: 246e 0008 moveal %fp@(8),%a2 49160: 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 )
49164: 4a8a tstl %a2
49166: 6708 beqs 49170 <_Thread_queue_Requeue+0x1c> <== 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 ) {
49168: 7001 moveq #1,%d0 4916a: b0aa 0034 cmpl %a2@(52),%d0
4916e: 670a beqs 4917a <_Thread_queue_Requeue+0x26> <== ALWAYS TAKEN
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
}
}
49170: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 49176: 4e5e unlk %fp <== NOT EXECUTED 49178: 4e75 rts <== NOT EXECUTED
if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
Thread_queue_Control *tq = the_thread_queue;
ISR_Level level;
ISR_Level level_ignored;
_ISR_Disable( level );
4917a: 303c 0700 movew #1792,%d0 4917e: 40c2 movew %sr,%d2 49180: 8082 orl %d2,%d0 49182: 46c0 movew %d0,%sr
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49184: 202b 0010 movel %a3@(16),%d0 49188: 0280 0003 bee0 andil #245472,%d0
4918e: 660c bnes 4919c <_Thread_queue_Requeue+0x48> <== ALWAYS TAKEN
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
}
_ISR_Enable( level );
49190: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
49192: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 49198: 4e5e unlk %fp 4919a: 4e75 rts
ISR_Level level_ignored;
_ISR_Disable( level );
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_Thread_queue_Enter_critical_section( tq );
_Thread_queue_Extract_priority_helper( tq, the_thread, true );
4919c: 4878 0001 pea 1 <ADD> 491a0: 7001 moveq #1,%d0 491a2: 2f0b movel %a3,%sp@- 491a4: 2540 0030 movel %d0,%a2@(48) 491a8: 2f0a movel %a2,%sp@- 491aa: 4eb9 0004 db44 jsr 4db44 <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
491b0: 486e fffc pea %fp@(-4) 491b4: 2f0b movel %a3,%sp@- 491b6: 2f0a movel %a2,%sp@- 491b8: 4eb9 0004 8f04 jsr 48f04 <_Thread_queue_Enqueue_priority> 491be: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
491c2: 46c2 movew %d2,%sr 491c4: 60cc bras 49192 <_Thread_queue_Requeue+0x3e>
...
000491c8 <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
491c8: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
491cc: 486e fffc pea %fp@(-4) 491d0: 2f2e 0008 movel %fp@(8),%sp@- 491d4: 4eb9 0004 8934 jsr 48934 <_Thread_Get>
switch ( location ) {
491da: 508f addql #8,%sp 491dc: 4aae fffc tstl %fp@(-4)
491e0: 6618 bnes 491fa <_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 );
491e2: 2f00 movel %d0,%sp@- 491e4: 4eb9 0004 dc34 jsr 4dc34 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
491ea: 588f addql #4,%sp 491ec: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 491f2: 5380 subql #1,%d0 491f4: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
491fa: 4e5e unlk %fp
...
00059e24 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59e24: 4e56 ffb0 linkw %fp,#-80 59e28: 41ee ffec lea %fp@(-20),%a0 59e2c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 59e30: 246e 0008 moveal %fp@(8),%a2 59e34: 2c0e movel %fp,%d6 59e36: 260e movel %fp,%d3 59e38: 5186 subql #8,%d6 59e3a: 0683 ffff ffe8 addil #-24,%d3
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e40: 240a movel %a2,%d2
/*
* 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 );
59e42: 2a0a movel %a2,%d5 59e44: 4bf9 0005 e184 lea 5e184 <_Watchdog_Adjust_to_chain>,%a5
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59e4a: 0682 0000 0030 addil #48,%d2
/*
* 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 );
59e50: 0685 0000 0068 addil #104,%d5 59e56: 47f9 0005 a908 lea 5a908 <_Chain_Get>,%a3 59e5c: 49f9 0005 e214 lea 5e214 <_Watchdog_Insert>,%a4
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59e62: 283c 0000 0700 movel #1792,%d4 59e68: 2d48 ffd8 movel %a0,%fp@(-40)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
59e6c: 41ea 0008 lea %a2@(8),%a0 59e70: 2d48 ffe0 movel %a0,%fp@(-32)
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
59e74: 41ea 0040 lea %a2@(64),%a0 59e78: 2d48 ffe4 movel %a0,%fp@(-28)
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
59e7c: 41ee fff4 lea %fp@(-12),%a0 59e80: 2d48 fffc movel %a0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e84: 41ee ffec lea %fp@(-20),%a0 59e88: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
59e8c: 42ae fff8 clrl %fp@(-8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59e90: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
59e94: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
59e98: 2d43 fff0 movel %d3,%fp@(-16)
{
/*
* 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;
59e9c: 41ee fff4 lea %fp@(-12),%a0 59ea0: 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;
59ea4: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59eaa: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
59eae: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59eb2: 9081 subl %d1,%d0 59eb4: 2f03 movel %d3,%sp@- 59eb6: 2f00 movel %d0,%sp@- 59eb8: 2f02 movel %d2,%sp@- 59eba: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59ebc: 2039 0008 0d52 movel 80d52 <_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 ) {
59ec2: 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;
59ec6: 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 ) {
59eca: b280 cmpl %d0,%d1 59ecc: 6500 0086 bcsw 59f54 <_Timer_server_Body+0x130>
* TOD has been set forward.
*/
delta = snapshot - last_snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
} else if ( snapshot < last_snapshot ) {
59ed0: b280 cmpl %d0,%d1 59ed2: 6200 00a4 bhiw 59f78 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59ed6: 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 );
59eda: 202a 0078 movel %a2@(120),%d0 59ede: 2f00 movel %d0,%sp@- 59ee0: 4e93 jsr %a3@
if ( timer == NULL ) {
59ee2: 588f addql #4,%sp 59ee4: 4a80 tstl %d0
59ee6: 672e beqs 59f16 <_Timer_server_Body+0xf2>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59ee8: 2040 moveal %d0,%a0 59eea: 7e01 moveq #1,%d7 59eec: 2228 0038 movel %a0@(56),%d1 59ef0: be81 cmpl %d1,%d7 59ef2: 6700 00a8 beqw 59f9c <_Timer_server_Body+0x178>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
59ef6: 7e03 moveq #3,%d7 59ef8: be81 cmpl %d1,%d7
59efa: 66de bnes 59eda <_Timer_server_Body+0xb6> <== NEVER TAKEN
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59efc: 2040 moveal %d0,%a0 59efe: 4868 0010 pea %a0@(16) 59f02: 2f05 movel %d5,%sp@- 59f04: 4e94 jsr %a4@
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59f06: 202a 0078 movel %a2@(120),%d0
)
{
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 );
59f0a: 508f addql #8,%sp
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59f0c: 2f00 movel %d0,%sp@- 59f0e: 4e93 jsr %a3@
if ( timer == NULL ) {
59f10: 588f addql #4,%sp 59f12: 4a80 tstl %d0
59f14: 66d2 bnes 59ee8 <_Timer_server_Body+0xc4> <== NEVER TAKEN
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59f16: 2004 movel %d4,%d0 59f18: 40c1 movew %sr,%d1 59f1a: 8081 orl %d1,%d0 59f1c: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
59f1e: bcae fff4 cmpl %fp@(-12),%d6 59f22: 6700 0086 beqw 59faa <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
59f26: 46c1 movew %d1,%sr
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
59f28: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
59f2e: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
59f32: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59f36: 9081 subl %d1,%d0 59f38: 2f03 movel %d3,%sp@- 59f3a: 2f00 movel %d0,%sp@- 59f3c: 2f02 movel %d2,%sp@- 59f3e: 4e95 jsr %a5@
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59f40: 2039 0008 0d52 movel 80d52 <_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 ) {
59f46: 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;
59f4a: 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 ) {
59f4e: b280 cmpl %d0,%d1 59f50: 6400 ff7e bccw 59ed0 <_Timer_server_Body+0xac>
/*
* 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 );
59f54: 2f03 movel %d3,%sp@- 59f56: 2e00 movel %d0,%d7 59f58: 9e81 subl %d1,%d7 59f5a: 2f07 movel %d7,%sp@- 59f5c: 2d40 ffdc movel %d0,%fp@(-36) 59f60: 2f05 movel %d5,%sp@- 59f62: 4eb9 0005 e184 jsr 5e184 <_Watchdog_Adjust_to_chain> 59f68: 202e ffdc movel %fp@(-36),%d0 59f6c: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59f70: 2540 0074 movel %d0,%a2@(116) 59f74: 6000 ff64 braw 59eda <_Timer_server_Body+0xb6>
/*
* 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 );
59f78: 9280 subl %d0,%d1 59f7a: 2f01 movel %d1,%sp@- 59f7c: 4878 0001 pea 1 <ADD> 59f80: 2d40 ffdc movel %d0,%fp@(-36) 59f84: 2f05 movel %d5,%sp@- 59f86: 4eb9 0005 e0f0 jsr 5e0f0 <_Watchdog_Adjust> 59f8c: 202e ffdc movel %fp@(-36),%d0 59f90: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
59f94: 2540 0074 movel %d0,%a2@(116) 59f98: 6000 ff40 braw 59eda <_Timer_server_Body+0xb6>
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
59f9c: 4868 0010 pea %a0@(16) 59fa0: 2f02 movel %d2,%sp@- 59fa2: 4e94 jsr %a4@ 59fa4: 508f addql #8,%sp 59fa6: 6000 ff32 braw 59eda <_Timer_server_Body+0xb6>
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
59faa: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
59fae: 46c1 movew %d1,%sr
_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 ) ) {
59fb0: 202e ffd8 movel %fp@(-40),%d0 59fb4: b0ae ffe8 cmpl %fp@(-24),%d0
59fb8: 6752 beqs 5a00c <_Timer_server_Body+0x1e8>
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59fba: 2204 movel %d4,%d1 59fbc: 40c0 movew %sr,%d0 59fbe: 8280 orl %d0,%d1 59fc0: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59fc2: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59fc6: b1ee ffd8 cmpal %fp@(-40),%a0
59fca: 6732 beqs 59ffe <_Timer_server_Body+0x1da> <== NEVER TAKEN
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
59fcc: 2250 moveal %a0@,%a1
the_chain->first = new_first;
59fce: 2d49 ffe8 movel %a1,%fp@(-24)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
59fd2: 42a8 0008 clrl %a0@(8)
new_first->previous = _Chain_Head(the_chain);
59fd6: 2343 0004 movel %d3,%a1@(4)
_ISR_Enable( level );
59fda: 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 );
59fdc: 2f28 0024 movel %a0@(36),%sp@- 59fe0: 2f28 0020 movel %a0@(32),%sp@- 59fe4: 2068 001c moveal %a0@(28),%a0 59fe8: 4e90 jsr %a0@
}
59fea: 508f addql #8,%sp
/*
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
59fec: 2204 movel %d4,%d1 59fee: 40c0 movew %sr,%d0 59ff0: 8280 orl %d0,%d1 59ff2: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59ff4: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59ff8: b1ee ffd8 cmpal %fp@(-40),%a0
59ffc: 66ce bnes 59fcc <_Timer_server_Body+0x1a8>
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
_ISR_Enable( level );
} else {
_ISR_Enable( level );
59ffe: 46c0 movew %d0,%sr
{
/*
* 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;
5a000: 41ee fff4 lea %fp@(-12),%a0 5a004: 2548 0078 movel %a0,%a2@(120) 5a008: 6000 fe9a braw 59ea4 <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
5a00c: 4207 clrb %d7 5a00e: 1547 007c moveb %d7,%a2@(124) 5a012: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 5a018: 5280 addql #1,%d0 5a01a: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5a020: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 5a024: 2f12 movel %a2@,%sp@- 5a026: 4eb9 0005 d808 jsr 5d808 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
5a02c: 2f0a movel %a2,%sp@- 5a02e: 4eba fd1c jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5a032: 2f0a movel %a2,%sp@- 5a034: 4eba fd80 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
5a038: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
ts->active = true;
5a03e: 7001 moveq #1,%d0 5a040: 1540 007c moveb %d0,%a2@(124)
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
5a044: 2f2e ffe0 movel %fp@(-32),%sp@- 5a048: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5a04e: 2f2e ffe4 movel %fp@(-28),%sp@- 5a052: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove> 5a058: 4fef 0018 lea %sp@(24),%sp 5a05c: 6000 fe3e braw 59e9c <_Timer_server_Body+0x78>
0005a060 <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
5a060: 4e56 fff0 linkw %fp,#-16 5a064: 206e 000c moveal %fp@(12),%a0 5a068: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5a06c: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
5a070: 202a 0078 movel %a2@(120),%d0
5a074: 671a beqs 5a090 <_Timer_server_Schedule_operation_method+0x30>
* 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 );
5a076: 202a 0078 movel %a2@(120),%d0 5a07a: 2d48 000c movel %a0,%fp@(12)
} }
5a07e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
* 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 );
5a084: 2d40 0008 movel %d0,%fp@(8)
} }
5a088: 4e5e unlk %fp
* 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 );
5a08a: 4ef9 0005 a8a8 jmp 5a8a8 <_Chain_Append> 5a090: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 5a096: 5280 addql #1,%d0 5a098: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
5a09e: 2028 0038 movel %a0@(56),%d0 5a0a2: 7201 moveq #1,%d1 5a0a4: b280 cmpl %d0,%d1 5a0a6: 6700 0088 beqw 5a130 <_Timer_server_Schedule_operation_method+0xd0>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
if ( !ts->active ) {
_Timer_server_Reset_interval_system_watchdog( ts );
}
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
5a0aa: 7203 moveq #3,%d1 5a0ac: b280 cmpl %d0,%d1
5a0ae: 670e beqs 5a0be <_Timer_server_Schedule_operation_method+0x5e>
* 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 );
}
}
5a0b0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a0b6: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a0b8: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
/*
* We have to advance the last known seconds value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
5a0be: 203c 0000 0700 movel #1792,%d0 5a0c4: 40c2 movew %sr,%d2 5a0c6: 8082 orl %d2,%d0 5a0c8: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0ca: 260a movel %a2,%d3 5a0cc: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5a0d2: 2039 0008 0d52 movel 80d52 <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
5a0d8: 222a 0074 movel %a2@(116),%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5a0dc: 226a 0068 moveal %a2@(104),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a0e0: b689 cmpl %a1,%d3
5a0e2: 671a beqs 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
5a0e4: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
5a0e8: b280 cmpl %d0,%d1 5a0ea: 6400 00b8 bccw 5a1a4 <_Timer_server_Schedule_operation_method+0x144>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
5a0ee: 2800 movel %d0,%d4 5a0f0: 9881 subl %d1,%d4
if (delta_interval > delta) {
5a0f2: b883 cmpl %d3,%d4 5a0f4: 6500 00ba bcsw 5a1b0 <_Timer_server_Schedule_operation_method+0x150>
5a0f8: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a0fa: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5a0fe: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
5a102: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
5a104: 4868 0010 pea %a0@(16) 5a108: 486a 0068 pea %a2@(104) 5a10c: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert>
if ( !ts->active ) {
5a112: 508f addql #8,%sp 5a114: 102a 007c moveb %a2@(124),%d0
5a118: 6696 bnes 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
5a11a: 2f0a movel %a2,%sp@- 5a11c: 4eba fc98 jsr %pc@(59db6 <_Timer_server_Reset_tod_system_watchdog>) 5a120: 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 );
}
}
5a122: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a128: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a12a: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
/*
* We have to advance the last known ticks value of the server and update
* the watchdog chain accordingly.
*/
_ISR_Disable( level );
5a130: 203c 0000 0700 movel #1792,%d0 5a136: 40c3 movew %sr,%d3 5a138: 8083 orl %d3,%d0 5a13a: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
5a13c: 2039 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d0 5a142: 240a movel %a2,%d2 5a144: 0682 0000 0034 addil #52,%d2
last_snapshot = ts->Interval_watchdogs.last_snapshot;
5a14a: 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));
5a14e: 226a 0030 moveal %a2@(48),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5a152: b489 cmpl %a1,%d2
5a154: 6712 beqs 5a168 <_Timer_server_Schedule_operation_method+0x108>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
5a156: 2800 movel %d0,%d4 5a158: 9881 subl %d1,%d4
delta_interval = first_watchdog->delta_interval;
5a15a: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
5a15e: b484 cmpl %d4,%d2
5a160: 623a bhis 5a19c <_Timer_server_Schedule_operation_method+0x13c>
5a162: 4282 clrl %d2
delta_interval -= delta;
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a164: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
5a168: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
5a16c: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
5a16e: 4868 0010 pea %a0@(16) 5a172: 486a 0030 pea %a2@(48) 5a176: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert>
if ( !ts->active ) {
5a17c: 508f addql #8,%sp 5a17e: 102a 007c moveb %a2@(124),%d0 5a182: 6600 ff2c bnew 5a0b0 <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
5a186: 2f0a movel %a2,%sp@- 5a188: 4eba fbc2 jsr %pc@(59d4c <_Timer_server_Reset_interval_system_watchdog>) 5a18c: 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 );
}
}
5a18e: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 5a194: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
5a196: 4ef9 0005 cd38 jmp 5cd38 <_Thread_Enable_dispatch>
*/
delta = snapshot - last_snapshot;
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
5a19c: 9484 subl %d4,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
5a19e: 2342 0010 movel %d2,%a1@(16) 5a1a2: 60c4 bras 5a168 <_Timer_server_Schedule_operation_method+0x108>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
5a1a4: d283 addl %d3,%d1
delta_interval += delta;
5a1a6: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
5a1a8: 2341 0010 movel %d1,%a1@(16) 5a1ac: 6000 ff50 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
5a1b0: 9684 subl %d4,%d3 5a1b2: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
5a1b4: 2341 0010 movel %d1,%a1@(16) 5a1b8: 6000 ff44 braw 5a0fe <_Timer_server_Schedule_operation_method+0x9e>
00049942 <_User_extensions_Fatal>:
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49942: 4e56 fff0 linkw %fp,#-16 49946: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4994a: 242e 0008 movel %fp@(8),%d2 4994e: 262e 0010 movel %fp@(16),%d3
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49952: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
void _User_extensions_Fatal (
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
49958: 182e 000f moveb %fp@(15),%d4
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
4995c: b5fc 0006 15c0 cmpal #398784,%a2
49962: 6726 beqs 4998a <_User_extensions_Fatal+0x48> <== NEVER TAKEN
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 );
49964: 0284 0000 00ff andil #255,%d4
!_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 )
4996a: 206a 0030 moveal %a2@(48),%a0 4996e: 4a88 tstl %a0
49970: 670c beqs 4997e <_User_extensions_Fatal+0x3c>
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
49972: 2f03 movel %d3,%sp@- 49974: 2f04 movel %d4,%sp@- 49976: 2f02 movel %d2,%sp@- 49978: 4e90 jsr %a0@ 4997a: 4fef 000c lea %sp@(12),%sp
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 ) {
4997e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49982: b5fc 0006 15c0 cmpal #398784,%a2
49988: 66e0 bnes 4996a <_User_extensions_Fatal+0x28>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4998a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
49990: 4e5e unlk %fp <== NOT EXECUTED
00049800 <_User_extensions_Handler_initialization>:
#include <rtems/score/userext.h>
#include <rtems/score/wkspace.h>
#include <string.h>
void _User_extensions_Handler_initialization(void)
{
49800: 4e56 ffec linkw %fp,#-20
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
49804: 203c 0006 15c4 movel #398788,%d0 4980a: 23c0 0006 15c0 movel %d0,615c0 <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49810: 203c 0006 15c0 movel #398784,%d0 49816: 23c0 0006 15c8 movel %d0,615c8 <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4981c: 203c 0006 1434 movel #398388,%d0 49822: 23c0 0006 1430 movel %d0,61430 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49828: 203c 0006 1430 movel #398384,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4982e: 42b9 0006 15c4 clrl 615c4 <_User_extensions_List+0x4> 49834: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%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;
49838: 2439 0005 fc8a movel 5fc8a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
4983e: 2639 0005 fc8e movel 5fc8e <Configuration+0x3a>,%d3 49844: 42b9 0006 1434 clrl 61434 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
4984a: 23c0 0006 1438 movel %d0,61438 <_User_extensions_Switches_list+0x8>
_Chain_Initialize_empty( &_User_extensions_List );
_Chain_Initialize_empty( &_User_extensions_Switches_list );
if ( initial_extensions ) {
49850: 4a83 tstl %d3
49852: 6764 beqs 498b8 <_User_extensions_Handler_initialization+0xb8>
extension = (User_extensions_Control *)
49854: 7834 moveq #52,%d4 49856: 4c02 4800 mulsl %d2,%d4 4985a: 2f04 movel %d4,%sp@- 4985c: 4eb9 0004 9d10 jsr 49d10 <_Workspace_Allocate_or_fatal_error> 49862: 2440 moveal %d0,%a2
_Workspace_Allocate_or_fatal_error(
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
49864: 2f04 movel %d4,%sp@- 49866: 42a7 clrl %sp@- 49868: 2f00 movel %d0,%sp@- 4986a: 4eb9 0005 0e48 jsr 50e48 <memset>
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
49870: 4fef 0010 lea %sp@(16),%sp 49874: 4a82 tstl %d2
49876: 6740 beqs 498b8 <_User_extensions_Handler_initialization+0xb8><== NEVER TAKEN
49878: 4284 clrl %d4 4987a: 47f9 0004 de20 lea 4de20 <_User_extensions_Add_set>,%a3
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
49880: 2043 moveal %d3,%a0 49882: 5284 addql #1,%d4 49884: 0683 0000 0020 addil #32,%d3 4988a: 2558 0014 movel %a0@+,%a2@(20) 4988e: 2558 0018 movel %a0@+,%a2@(24) 49892: 2558 001c movel %a0@+,%a2@(28) 49896: 2558 0020 movel %a0@+,%a2@(32) 4989a: 2558 0024 movel %a0@+,%a2@(36) 4989e: 2558 0028 movel %a0@+,%a2@(40) 498a2: 2558 002c movel %a0@+,%a2@(44) 498a6: 2550 0030 movel %a0@,%a2@(48)
_User_extensions_Add_set( extension );
498aa: 2f0a movel %a2,%sp@-
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
498ac: 45ea 0034 lea %a2@(52),%a2 498b0: 4e93 jsr %a3@
extension,
0,
number_of_extensions * sizeof( User_extensions_Control )
);
for ( i = 0 ; i < number_of_extensions ; i++ ) {
498b2: 588f addql #4,%sp 498b4: b882 cmpl %d2,%d4
498b6: 65c8 bcss 49880 <_User_extensions_Handler_initialization+0x80>
_User_extensions_Add_set_with_table (extension, &initial_extensions[i]);
extension++;
}
}
}
498b8: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 498be: 4e5e unlk %fp
...
000498c4 <_User_extensions_Thread_begin>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
498c4: 4e56 0000 linkw %fp,#0 498c8: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498ca: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_begin (
Thread_Control *executing
)
{
498d0: 2f02 movel %d2,%sp@- 498d2: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498d6: b5fc 0006 15c4 cmpal #398788,%a2
498dc: 6718 beqs 498f6 <_User_extensions_Thread_begin+0x32><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
498de: 206a 0028 moveal %a2@(40),%a0 498e2: 4a88 tstl %a0
498e4: 6706 beqs 498ec <_User_extensions_Thread_begin+0x28>
(*the_extension->Callouts.thread_begin)( executing );
498e6: 2f02 movel %d2,%sp@- 498e8: 4e90 jsr %a0@ 498ea: 588f addql #4,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
498ec: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
498ee: b5fc 0006 15c4 cmpal #398788,%a2
498f4: 66e8 bnes 498de <_User_extensions_Thread_begin+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_begin != NULL )
(*the_extension->Callouts.thread_begin)( executing );
}
}
498f6: 242e fff8 movel %fp@(-8),%d2 498fa: 246e fffc moveal %fp@(-4),%a2
498fe: 4e5e unlk %fp <== NOT EXECUTED
00049994 <_User_extensions_Thread_create>:
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
49994: 4e56 0000 linkw %fp,#0 49998: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
4999a: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
bool _User_extensions_Thread_create (
Thread_Control *the_thread
)
{
499a0: 2f02 movel %d2,%sp@- 499a2: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
499a6: b5fc 0006 15c4 cmpal #398788,%a2
499ac: 6722 beqs 499d0 <_User_extensions_Thread_create+0x3c><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_create != NULL ) {
499ae: 206a 0014 moveal %a2@(20),%a0 499b2: 4a88 tstl %a0
499b4: 6710 beqs 499c6 <_User_extensions_Thread_create+0x32>
status = (*the_extension->Callouts.thread_create)(
499b6: 2f02 movel %d2,%sp@- 499b8: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 499be: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
499c0: 508f addql #8,%sp 499c2: 4a00 tstb %d0
499c4: 670c beqs 499d2 <_User_extensions_Thread_create+0x3e>
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
499c6: 2452 moveal %a2@,%a2
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
bool status;
for ( the_node = _User_extensions_List.first ;
499c8: b5fc 0006 15c4 cmpal #398788,%a2
499ce: 66de bnes 499ae <_User_extensions_Thread_create+0x1a>
499d0: 7001 moveq #1,%d0
return false;
}
}
return true;
}
499d2: 242e fff8 movel %fp@(-8),%d2 499d6: 246e fffc moveal %fp@(-4),%a2 499da: 4e5e unlk %fp
...
000499e0 <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499e0: 4e56 0000 linkw %fp,#0 499e4: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499e6: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499ec: 2f02 movel %d2,%sp@- 499ee: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499f2: b5fc 0006 15c0 cmpal #398784,%a2
499f8: 6720 beqs 49a1a <_User_extensions_Thread_delete+0x3a><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_delete != NULL )
499fa: 206a 0020 moveal %a2@(32),%a0 499fe: 4a88 tstl %a0
49a00: 670c beqs 49a0e <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49a02: 2f02 movel %d2,%sp@- 49a04: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 49a0a: 4e90 jsr %a0@ 49a0c: 508f addql #8,%sp
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 ) {
49a0e: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49a12: b5fc 0006 15c0 cmpal #398784,%a2
49a18: 66e0 bnes 499fa <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a1a: 242e fff8 movel %fp@(-8),%d2 49a1e: 246e fffc moveal %fp@(-4),%a2 49a22: 4e5e unlk %fp
...
00049902 <_User_extensions_Thread_exitted>:
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
49902: 4e56 0000 linkw %fp,#0 49906: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49908: 2479 0006 15c8 moveal 615c8 <_User_extensions_List+0x8>,%a2
}
void _User_extensions_Thread_exitted (
Thread_Control *executing
)
{
4990e: 2f02 movel %d2,%sp@- 49910: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49914: b5fc 0006 15c0 cmpal #398784,%a2
4991a: 671a beqs 49936 <_User_extensions_Thread_exitted+0x34><== NEVER TAKEN
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
4991c: 206a 002c moveal %a2@(44),%a0 49920: 4a88 tstl %a0
49922: 6706 beqs 4992a <_User_extensions_Thread_exitted+0x28>
(*the_extension->Callouts.thread_exitted)( executing );
49924: 2f02 movel %d2,%sp@- 49926: 4e90 jsr %a0@ 49928: 588f addql #4,%sp
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 ) {
4992a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
4992e: b5fc 0006 15c0 cmpal #398784,%a2
49934: 66e6 bnes 4991c <_User_extensions_Thread_exitted+0x1a>
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_exitted != NULL )
(*the_extension->Callouts.thread_exitted)( executing );
}
}
49936: 242e fff8 movel %fp@(-8),%d2 4993a: 246e fffc moveal %fp@(-4),%a2
4993e: 4e5e unlk %fp <== NOT EXECUTED
0004a6c8 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6c8: 4e56 0000 linkw %fp,#0 4a6cc: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6ce: 2479 0006 2558 moveal 62558 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6d4: 2f02 movel %d2,%sp@- 4a6d6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6da: b5fc 0006 255c cmpal #402780,%a2
4a6e0: 671e beqs 4a700 <_User_extensions_Thread_restart+0x38><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_restart != NULL )
4a6e2: 206a 001c moveal %a2@(28),%a0 4a6e6: 4a88 tstl %a0
4a6e8: 670c beqs 4a6f6 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a6ea: 2f02 movel %d2,%sp@- 4a6ec: 2f39 0006 247e movel 6247e <_Thread_Executing>,%sp@- 4a6f2: 4e90 jsr %a0@ 4a6f4: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
4a6f6: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6f8: b5fc 0006 255c cmpal #402780,%a2
4a6fe: 66e2 bnes 4a6e2 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a700: 242e fff8 movel %fp@(-8),%d2 4a704: 246e fffc moveal %fp@(-4),%a2
4a708: 4e5e unlk %fp <== NOT EXECUTED
00049a28 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a28: 4e56 0000 linkw %fp,#0 49a2c: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a2e: 2479 0006 15c0 moveal 615c0 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a34: 2f02 movel %d2,%sp@- 49a36: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a3a: b5fc 0006 15c4 cmpal #398788,%a2
49a40: 671e beqs 49a60 <_User_extensions_Thread_start+0x38><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.thread_start != NULL )
49a42: 206a 0018 moveal %a2@(24),%a0 49a46: 4a88 tstl %a0
49a48: 670c beqs 49a56 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49a4a: 2f02 movel %d2,%sp@- 49a4c: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 49a52: 4e90 jsr %a0@ 49a54: 508f addql #8,%sp
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
!_Chain_Is_tail( &_User_extensions_List, the_node ) ;
the_node = the_node->next ) {
49a56: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a58: b5fc 0006 15c4 cmpal #398788,%a2
49a5e: 66e2 bnes 49a42 <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49a60: 242e fff8 movel %fp@(-8),%d2 49a64: 246e fffc moveal %fp@(-4),%a2
49a68: 4e5e unlk %fp <== NOT EXECUTED
00049a6c <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49a6c: 4e56 fff4 linkw %fp,#-12 49a70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49a74: 262e 0008 movel %fp@(8),%d3 49a78: 242e 000c movel %fp@(12),%d2
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49a7c: 2479 0006 1430 moveal 61430 <_User_extensions_Switches_list>,%a2 49a82: b5fc 0006 1434 cmpal #398388,%a2
49a88: 6716 beqs 49aa0 <_User_extensions_Thread_switch+0x34><== NEVER TAKEN
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
49a8a: 2f02 movel %d2,%sp@- 49a8c: 2f03 movel %d3,%sp@- 49a8e: 206a 0008 moveal %a2@(8),%a0 49a92: 4e90 jsr %a0@
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
!_Chain_Is_tail( &_User_extensions_Switches_list, the_node ) ;
the_node = the_node->next ) {
49a94: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49a96: 508f addql #8,%sp 49a98: b5fc 0006 1434 cmpal #398388,%a2
49a9e: 66ea bnes 49a8a <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49aa0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49aa6: 4e5e unlk %fp
...
0004b76c <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b76c: 4e56 ffe8 linkw %fp,#-24 4b770: 226e 000c moveal %fp@(12),%a1 4b774: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b778: 283c 0000 0700 movel #1792,%d4 4b77e: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b780: 266e 0008 moveal %fp@(8),%a3 4b784: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b788: 40c1 movew %sr,%d1 4b78a: 8081 orl %d1,%d0 4b78c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b78e: 244b moveal %a3,%a2 4b790: 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 ) ) {
4b792: b5c8 cmpal %a0,%a2
4b794: 6748 beqs 4b7de <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b796: 4a89 tstl %a1
4b798: 6650 bnes 4b7ea <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b79a: 4a82 tstl %d2
4b79c: 6740 beqs 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b79e: 2628 0010 movel %a0@(16),%d3 4b7a2: 49f9 0004 b9e8 lea 4b9e8 <_Watchdog_Tickle>,%a4 4b7a8: b682 cmpl %d2,%d3
4b7aa: 622c bhis 4b7d8 <_Watchdog_Adjust+0x6c> <== NEVER TAKEN
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
_Watchdog_First( header )->delta_interval = 1;
4b7ac: 7001 moveq #1,%d0 4b7ae: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b7b2: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b7b4: 2f0b movel %a3,%sp@- 4b7b6: 4e94 jsr %a4@
_ISR_Disable( level );
4b7b8: 2004 movel %d4,%d0 4b7ba: 40c1 movew %sr,%d1 4b7bc: 8081 orl %d1,%d0 4b7be: 46c0 movew %d0,%sr
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b7c0: 9483 subl %d3,%d2
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b7c2: 588f addql #4,%sp 4b7c4: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
4b7c6: 2040 moveal %d0,%a0 4b7c8: b08a cmpl %a2,%d0
4b7ca: 6712 beqs 4b7de <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b7cc: 4a82 tstl %d2
4b7ce: 670e beqs 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b7d0: 2628 0010 movel %a0@(16),%d3 4b7d4: b483 cmpl %d3,%d2
4b7d6: 64d4 bccs 4b7ac <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b7d8: 9682 subl %d2,%d3 4b7da: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7de: 46c1 movew %d1,%sr
}
4b7e0: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b7e6: 4e5e unlk %fp 4b7e8: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b7ea: 7001 moveq #1,%d0 4b7ec: b089 cmpl %a1,%d0
4b7ee: 66ee bnes 4b7de <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b7f0: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7f4: 46c1 movew %d1,%sr
}
4b7f6: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b7fc: 4e5e unlk %fp <== NOT EXECUTED
0005e184 <_Watchdog_Adjust_to_chain>:
Chain_Control *header,
Watchdog_Interval units_arg,
Chain_Control *to_fire
)
{
5e184: 4e56 ffe4 linkw %fp,#-28 5e188: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 5e18c: 2a6e 0008 moveal %fp@(8),%a5 5e190: 282e 000c movel %fp@(12),%d4 5e194: 266e 0010 moveal %fp@(16),%a3
Watchdog_Interval units = units_arg;
ISR_Level level;
Watchdog_Control *first;
if ( units <= 0 ) {
5e198: 675e beqs 5e1f8 <_Watchdog_Adjust_to_chain+0x74>
return;
}
_ISR_Disable( level );
5e19a: 263c 0000 0700 movel #1792,%d3 5e1a0: 2003 movel %d3,%d0 5e1a2: 40c1 movew %sr,%d1 5e1a4: 8081 orl %d1,%d0 5e1a6: 46c0 movew %d0,%sr 5e1a8: 284d moveal %a5,%a4
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5e1aa: 240b movel %a3,%d2 5e1ac: 5882 addql #4,%d2 5e1ae: 205c moveal %a4@+,%a0
while ( 1 ) {
if ( units <= 0 ) {
break;
}
if ( _Chain_Is_empty( header ) ) {
5e1b0: b1cc cmpal %a4,%a0
5e1b2: 6742 beqs 5e1f6 <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
5e1b4: 2028 0010 movel %a0@(16),%d0 5e1b8: b880 cmpl %d0,%d4
5e1ba: 654c bcss 5e208 <_Watchdog_Adjust_to_chain+0x84>
/*
* The first set happens in less than units, so take all of them
* off the chain and adjust units to reflect this.
*/
units -= first->delta_interval;
5e1bc: 9880 subl %d0,%d4
first->delta_interval = 0;
5e1be: 42a8 0010 clrl %a0@(16)
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
5e1c2: 2250 moveal %a0@,%a1
previous = the_node->previous;
5e1c4: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
5e1c8: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
5e1ca: 234a 0004 movel %a2,%a1@(4)
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
5e1ce: 2082 movel %d2,%a0@
old_last_node = the_chain->last;
5e1d0: 226b 0008 moveal %a3@(8),%a1
the_chain->last = the_node;
5e1d4: 2748 0008 movel %a0,%a3@(8)
old_last_node->next = the_node; the_node->previous = old_last_node;
5e1d8: 2149 0004 movel %a1,%a0@(4)
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
old_last_node->next = the_node;
5e1dc: 2288 movel %a0,%a1@
while ( 1 ) {
_Chain_Extract_unprotected( &first->Node );
_Chain_Append_unprotected( to_fire, &first->Node );
_ISR_Flash( level );
5e1de: 2003 movel %d3,%d0 5e1e0: 46c1 movew %d1,%sr 5e1e2: 8081 orl %d1,%d0 5e1e4: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5e1e6: 2055 moveal %a5@,%a0
if ( _Chain_Is_empty( header ) )
5e1e8: b1cc cmpal %a4,%a0
5e1ea: 6714 beqs 5e200 <_Watchdog_Adjust_to_chain+0x7c>
break;
first = _Watchdog_First( header );
if ( first->delta_interval != 0 )
5e1ec: 4aa8 0010 tstl %a0@(16)
5e1f0: 67d0 beqs 5e1c2 <_Watchdog_Adjust_to_chain+0x3e>
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5e1f2: 4a84 tstl %d4
5e1f4: 66ba bnes 5e1b0 <_Watchdog_Adjust_to_chain+0x2c>
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5e1f6: 46c1 movew %d1,%sr
}
5e1f8: 4cd7 3c1c moveml %sp@,%d2-%d4/%a2-%a5 5e1fc: 4e5e unlk %fp 5e1fe: 4e75 rts
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5e200: 204c moveal %a4,%a0
}
_ISR_Disable( level );
while ( 1 ) {
if ( units <= 0 ) {
5e202: 4a84 tstl %d4
5e204: 66aa bnes 5e1b0 <_Watchdog_Adjust_to_chain+0x2c>
5e206: 60ee bras 5e1f6 <_Watchdog_Adjust_to_chain+0x72>
/*
* If it is longer than "units" until the first element on the chain
* fires, then bump it and quit.
*/
if ( units < first->delta_interval ) {
first->delta_interval -= units;
5e208: 9084 subl %d4,%d0 5e20a: 2140 0010 movel %d0,%a0@(16)
if ( first->delta_interval != 0 )
break;
}
}
_ISR_Enable( level );
5e20e: 46c1 movew %d1,%sr 5e210: 60e6 bras 5e1f8 <_Watchdog_Adjust_to_chain+0x74>
...
00049aac <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
49aac: 4e56 ffec linkw %fp,#-20 49ab0: 226e 000c moveal %fp@(12),%a1 49ab4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49ab8: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
49abc: 2a3c 0000 0700 movel #1792,%d5 49ac2: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49ac4: 2839 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d4
_ISR_Disable( level );
49aca: 40c3 movew %sr,%d3 49acc: 8083 orl %d3,%d0 49ace: 46c0 movew %d0,%sr
/*
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
49ad0: 4aa9 0008 tstl %a1@(8) 49ad4: 6600 00c6 bnew 49b9c <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49ad8: 2039 0006 156c movel 6156c <_Watchdog_Sync_count>,%d0 49ade: 5280 addql #1,%d0 49ae0: 23c0 0006 156c movel %d0,6156c <_Watchdog_Sync_count>
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49ae6: 7001 moveq #1,%d0 49ae8: 2340 0008 movel %d0,%a1@(8)
_Watchdog_Sync_count++;
restart:
delta_interval = the_watchdog->initial;
49aec: 2029 000c movel %a1@(12),%d0
* cache *header!! * * Till Straumann, 7/2003 (gcc-3.2.2 -O4 on powerpc) * */ for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
49af0: 2052 moveal %a2@,%a0
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49af2: 6764 beqs 49b58 <_Watchdog_Insert+0xac>
49af4: 4a90 tstl %a0@
49af6: 6760 beqs 49b58 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49af8: 2228 0010 movel %a0@(16),%d1 49afc: b280 cmpl %d0,%d1
49afe: 6252 bhis 49b52 <_Watchdog_Insert+0xa6>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
49b00: 2405 movel %d5,%d2 49b02: 46c3 movew %d3,%sr 49b04: 8483 orl %d3,%d2 49b06: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b08: 7401 moveq #1,%d2 49b0a: b4a9 0008 cmpl %a1@(8),%d2
49b0e: 666e bnes 49b7e <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b10: 2439 0006 14e2 movel 614e2 <_Watchdog_Sync_level>,%d2 49b16: b484 cmpl %d4,%d2
49b18: 6230 bhis 49b4a <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b1a: 9081 subl %d1,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
49b1c: 2050 moveal %a0@,%a0
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b1e: 4a80 tstl %d0
49b20: 6736 beqs 49b58 <_Watchdog_Insert+0xac>
49b22: 4a90 tstl %a0@
49b24: 6732 beqs 49b58 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b26: 2228 0010 movel %a0@(16),%d1 49b2a: b081 cmpl %d1,%d0
49b2c: 6524 bcss 49b52 <_Watchdog_Insert+0xa6>
* used around this flash point allowed interrupts to execute
* which violated the design assumptions. The critical section
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
49b2e: 2405 movel %d5,%d2 49b30: 46c3 movew %d3,%sr 49b32: 8483 orl %d3,%d2 49b34: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b36: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b38: 7201 moveq #1,%d1 49b3a: b2a9 0008 cmpl %a1@(8),%d1
49b3e: 663e bnes 49b7e <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b40: 2239 0006 14e2 movel 614e2 <_Watchdog_Sync_level>,%d1 49b46: b284 cmpl %d4,%d1
49b48: 63d2 blss 49b1c <_Watchdog_Insert+0x70>
_Watchdog_Sync_level = insert_isr_nest_level;
49b4a: 23c4 0006 14e2 movel %d4,614e2 <_Watchdog_Sync_level>
goto restart;
49b50: 609a bras 49aec <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49b52: 9280 subl %d0,%d1 49b54: 2141 0010 movel %d1,%a0@(16)
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
49b58: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49b5c: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49b5e: 2450 moveal %a0@,%a2
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49b60: 2239 0006 1570 movel 61570 <_Watchdog_Ticks_since_boot>,%d1
after_node->next = the_node;
49b66: 2089 movel %a1,%a0@
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49b68: 2348 0004 movel %a0,%a1@(4) 49b6c: 2341 0014 movel %d1,%a1@(20)
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49b70: 2340 0010 movel %d0,%a1@(16)
before_node = after_node->next; after_node->next = the_node; the_node->next = before_node; before_node->previous = the_node;
49b74: 2549 0004 movel %a1,%a2@(4) 49b78: 2342 0008 movel %d2,%a1@(8)
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
after_node->next = the_node;
the_node->next = before_node;
49b7c: 228a movel %a2,%a1@
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
49b7e: 23c4 0006 14e2 movel %d4,614e2 <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49b84: 2039 0006 156c movel 6156c <_Watchdog_Sync_count>,%d0 49b8a: 5380 subql #1,%d0 49b8c: 23c0 0006 156c movel %d0,6156c <_Watchdog_Sync_count>
_ISR_Enable( level );
49b92: 46c3 movew %d3,%sr
}
49b94: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49b98: 4e5e unlk %fp 49b9a: 4e75 rts
* Check to see if the watchdog has just been inserted by a
* higher priority interrupt. If so, abandon this insert.
*/
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
49b9c: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49b9e: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49ba2: 4e5e unlk %fp
...
00049bf4 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49bf4: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49bfa: 4e56 0000 linkw %fp,#0 49bfe: 206e 0008 moveal %fp@(8),%a0 49c02: 2f0a movel %a2,%sp@- 49c04: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c06: 40c1 movew %sr,%d1 49c08: 8081 orl %d1,%d0 49c0a: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49c0c: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49c10: 7401 moveq #1,%d2 49c12: b480 cmpl %d0,%d2
49c14: 6764 beqs 49c7a <_Watchdog_Remove+0x86>
49c16: 6314 blss 49c2c <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c18: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1 49c1e: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c22: 46c1 movew %d1,%sr
return( previous_state ); }
49c24: 241f movel %sp@+,%d2 49c26: 245f moveal %sp@+,%a2 49c28: 4e5e unlk %fp 49c2a: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49c2c: 143c 0003 moveb #3,%d2 49c30: b480 cmpl %d0,%d2
49c32: 65e4 bcss 49c18 <_Watchdog_Remove+0x24> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_Next(
Watchdog_Control *the_watchdog
)
{
return ( (Watchdog_Control *) the_watchdog->Node.next );
49c34: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49c36: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49c3a: 4a91 tstl %a1@
49c3c: 6708 beqs 49c46 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49c3e: 2428 0010 movel %a0@(16),%d2 49c42: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49c46: 2479 0006 156c moveal 6156c <_Watchdog_Sync_count>,%a2 49c4c: 4a8a tstl %a2
49c4e: 670c beqs 49c5c <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49c50: 2479 0006 14c6 moveal 614c6 <_ISR_Nest_level>,%a2 49c56: 23ca 0006 14e2 movel %a2,614e2 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49c5c: 2468 0004 moveal %a0@(4),%a2
next->previous = previous; previous->next = next;
49c60: 2489 movel %a1,%a2@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49c62: 234a 0004 movel %a2,%a1@(4)
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c66: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1 49c6c: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c70: 46c1 movew %d1,%sr
return( previous_state ); }
49c72: 241f movel %sp@+,%d2 49c74: 245f moveal %sp@+,%a2 49c76: 4e5e unlk %fp 49c78: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c7a: 2279 0006 1570 moveal 61570 <_Watchdog_Ticks_since_boot>,%a1
/*
* 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;
49c80: 42a8 0008 clrl %a0@(8)
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c84: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c88: 46c1 movew %d1,%sr
return( previous_state ); }
49c8a: 241f movel %sp@+,%d2 49c8c: 245f moveal %sp@+,%a2 49c8e: 4e5e unlk %fp
...
0004b100 <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b100: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b106: 4e56 ffe8 linkw %fp,#-24 4b10a: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b10e: 242e 0008 movel %fp@(8),%d2 4b112: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b116: 40c3 movew %sr,%d3 4b118: 8083 orl %d3,%d0 4b11a: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b11c: 2f0b movel %a3,%sp@- 4b11e: 4bf9 0004 49c0 lea 449c0 <printk>,%a5 4b124: 2f02 movel %d2,%sp@- 4b126: 4879 0006 0a88 pea 60a88 <_Status_Object_name_errors_to_status+0x14> 4b12c: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b12e: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4b130: 4fef 000c lea %sp@(12),%sp 4b134: b7ca cmpal %a2,%a3
4b136: 672c beqs 4b164 <_Watchdog_Report_chain+0x64>
4b138: 49f9 0004 b17c lea 4b17c <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b13e: 2f0a movel %a2,%sp@- 4b140: 42a7 clrl %sp@- 4b142: 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 )
4b144: 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 ;
4b146: 508f addql #8,%sp 4b148: b7ca cmpal %a2,%a3
4b14a: 66f2 bnes 4b13e <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b14c: 2f02 movel %d2,%sp@- 4b14e: 4879 0006 0a9f pea 60a9f <_Status_Object_name_errors_to_status+0x2b> 4b154: 4e95 jsr %a5@ 4b156: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b158: 46c3 movew %d3,%sr
}
4b15a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b160: 4e5e unlk %fp 4b162: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b164: 4879 0006 0aae pea 60aae <_Status_Object_name_errors_to_status+0x3a> 4b16a: 4e95 jsr %a5@ 4b16c: 588f addql #4,%sp
}
_ISR_Enable( level );
4b16e: 46c3 movew %d3,%sr
}
4b170: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b176: 4e5e unlk %fp
...
00049c94 <_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 );
49c94: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49c9a: 4e56 ffe8 linkw %fp,#-24 49c9e: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49ca2: 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 );
49ca6: 40c2 movew %sr,%d2 49ca8: 8082 orl %d2,%d0 49caa: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
49cac: 264c moveal %a4,%a3 49cae: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49cb0: b7ca cmpal %a2,%a3
49cb2: 673e beqs 49cf2 <_Watchdog_Tickle+0x5e>
* 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) {
49cb4: 202a 0010 movel %a2@(16),%d0 49cb8: 4bf9 0004 9bf4 lea 49bf4 <_Watchdog_Remove>,%a5
49cbe: 6708 beqs 49cc8 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49cc0: 5380 subql #1,%d0 49cc2: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49cc6: 662a bnes 49cf2 <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49cc8: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49cce: 2f0a movel %a2,%sp@- 49cd0: 4e95 jsr %a5@
_ISR_Enable( level );
49cd2: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49cd4: 7202 moveq #2,%d1 49cd6: 588f addql #4,%sp 49cd8: b280 cmpl %d0,%d1
49cda: 6722 beqs 49cfe <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49cdc: 2003 movel %d3,%d0 49cde: 40c2 movew %sr,%d2 49ce0: 8082 orl %d2,%d0 49ce2: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49ce4: 2014 movel %a4@,%d0 49ce6: 2440 moveal %d0,%a2
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49ce8: b08b cmpl %a3,%d0
49cea: 6706 beqs 49cf2 <_Watchdog_Tickle+0x5e>
49cec: 4aaa 0010 tstl %a2@(16)
49cf0: 67dc beqs 49cce <_Watchdog_Tickle+0x3a>
leave:
_ISR_Enable(level);
49cf2: 46c2 movew %d2,%sr
}
49cf4: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49cfa: 4e5e unlk %fp 49cfc: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49cfe: 2f2a 0024 movel %a2@(36),%sp@- 49d02: 2f2a 0020 movel %a2@(32),%sp@- 49d06: 206a 001c moveal %a2@(28),%a0 49d0a: 4e90 jsr %a0@ 49d0c: 508f addql #8,%sp 49d0e: 60cc bras 49cdc <_Watchdog_Tickle+0x48>
00049d78 <_Workspace_Handler_initialization>:
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49d78: 4e56 0000 linkw %fp,#0 49d7c: 2f03 movel %d3,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start; uintptr_t size = Configuration.work_space_size;
49d7e: 2639 0005 fc58 movel 5fc58 <Configuration+0x4>,%d3
/*
* _Workspace_Handler_initialization
*/
void _Workspace_Handler_initialization(void)
{
49d84: 2f02 movel %d2,%sp@-
uintptr_t memory_available = 0; void *starting_address = Configuration.work_space_start;
49d86: 2439 0005 fc54 movel 5fc54 <Configuration>,%d2
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
49d8c: 4a39 0005 fc7c tstb 5fc7c <Configuration+0x28>
49d92: 6628 bnes 49dbc <_Workspace_Handler_initialization+0x44>
memset( starting_address, 0, size );
memory_available = _Heap_Initialize(
49d94: 4878 0004 pea 4 <CONTEXT_ARG> 49d98: 2f03 movel %d3,%sp@- 49d9a: 2f02 movel %d2,%sp@- 49d9c: 4879 0006 144e pea 6144e <_Workspace_Area> 49da2: 4eb9 0004 7738 jsr 47738 <_Heap_Initialize>
starting_address,
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
49da8: 4fef 0010 lea %sp@(16),%sp 49dac: 4a80 tstl %d0
49dae: 671e beqs 49dce <_Workspace_Handler_initialization+0x56>
_Internal_error_Occurred(
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_TOO_LITTLE_WORKSPACE
);
}
49db0: 242e fff8 movel %fp@(-8),%d2 49db4: 262e fffc movel %fp@(-4),%d3 49db8: 4e5e unlk %fp 49dba: 4e75 rts
uintptr_t memory_available = 0;
void *starting_address = Configuration.work_space_start;
uintptr_t size = Configuration.work_space_size;
if ( Configuration.do_zero_of_workspace )
memset( starting_address, 0, size );
49dbc: 2f03 movel %d3,%sp@- 49dbe: 42a7 clrl %sp@- 49dc0: 2f02 movel %d2,%sp@- 49dc2: 4eb9 0005 0e48 jsr 50e48 <memset> 49dc8: 4fef 000c lea %sp@(12),%sp 49dcc: 60c6 bras 49d94 <_Workspace_Handler_initialization+0x1c>
size,
CPU_HEAP_ALIGNMENT
);
if ( memory_available == 0 )
_Internal_error_Occurred(
49dce: 4878 0003 pea 3 <DIVIDE> 49dd2: 4878 0001 pea 1 <ADD> 49dd6: 42a7 clrl %sp@- 49dd8: 4eb9 0004 7aa4 jsr 47aa4 <_Internal_error_Occurred>
...
0005d57c <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5d57c: 4e56 0000 linkw %fp,#0 5d580: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5d584: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5d58a: 2d40 0008 movel %d0,%fp@(8)
}
5d58e: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5d590: 4ef9 0004 2918 jmp 42918 <calloc>
...
00043746 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
43746: 4e56 0000 linkw %fp,#0 4374a: 4eb9 0005 de08 jsr 5de08 <_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();
43750: 4eb9 0004 36e0 jsr 436e0 <libc_wrapup>
rtems_shutdown_executive(status);
43756: 2f2e 0008 movel %fp@(8),%sp@- 4375a: 4eb9 0004 6dd4 jsr 46dd4 <rtems_shutdown_executive>
43760: 588f addql #4,%sp <== NOT EXECUTED 43762: 60fe bras 43762 <_exit+0x1c> <== NOT EXECUTED
00043a7c <_fcntl_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
int cmd,
int arg
)
{
43a7c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43a80: 222e 0010 movel %fp@(16),%d1 <== NOT EXECUTED 43a84: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return fcntl( fd, cmd, arg );
43a88: 2d6e 0014 0010 movel %fp@(20),%fp@(16) <== NOT EXECUTED 43a8e: 2d41 000c movel %d1,%fp@(12) <== NOT EXECUTED 43a92: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
43a96: 4e5e unlk %fp <== NOT EXECUTED
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
43a98: 4ef9 0004 3858 jmp 43858 <fcntl> <== NOT EXECUTED
...
0005d598 <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5d598: 4e56 0000 linkw %fp,#0
free( ptr );
5d59c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5d5a2: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5d5a4: 4ef9 0004 2ddc jmp 42ddc <free>
...
0004bea2 <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
4bea2: 7001 moveq #1,%d0 <== NOT EXECUTED
#include <reent.h>
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
4bea4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpid(); }
4bea8: 4e5e unlk %fp <== NOT EXECUTED
00042ed0 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
42ed0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return gettimeofday( tp, tzp ); }
42ed4: 4e5e unlk %fp <== NOT EXECUTED
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
42ed6: 4ef9 0004 2e6c jmp 42e6c <gettimeofday> <== NOT EXECUTED
00042edc <_gettimeofday_r>:
int _gettimeofday_r(
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
struct timezone *tzp
)
{
42edc: 4e56 0000 linkw %fp,#0 42ee0: 202e 000c movel %fp@(12),%d0
return gettimeofday( tp, tzp );
42ee4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 42eea: 2d40 0008 movel %d0,%fp@(8)
}
42eee: 4e5e unlk %fp
struct _reent *ignored_reentrancy_stuff __attribute__((unused)),
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
42ef0: 4ef9 0004 2e6c jmp 42e6c <gettimeofday>
...
0005d688 <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5d688: 4e56 0000 linkw %fp,#0
return isatty( fd );
5d68c: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5d692: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5d694: 4ef9 0005 dd5c jmp 5dd5c <isatty>
...
00044584 <_link_r>:
int _link_r(
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
44584: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44588: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return link( existing, new );
4458c: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 44592: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
44596: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
44598: 4ef9 0004 43b4 jmp 443b4 <link> <== NOT EXECUTED
...
0005d840 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5d840: 4e56 0000 linkw %fp,#0
return malloc( size );
5d844: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5d84a: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5d84c: 4ef9 0004 3108 jmp 43108 <malloc>
...
0005d944 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5d944: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 5d948: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return realloc( ptr, size );
5d94c: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 5d952: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
5d956: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5d958: 4ef9 0005 d9a0 jmp 5d9a0 <realloc> <== NOT EXECUTED
...
00046fa4 <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
46fa4: 4e56 ffa4 linkw %fp,#-92 46fa8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 46fac: 262e 000c movel %fp@(12),%d3
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
46fb0: 2f03 movel %d3,%sp@-
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
46fb2: 282e 0010 movel %fp@(16),%d4
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
46fb6: 4eb9 0004 5674 jsr 45674 <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
46fbc: 588f addql #4,%sp 46fbe: 4a80 tstl %d0 46fc0: 6600 01d0 bnew 47192 <_rename_r+0x1ee>
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
46fc4: 45ee ffd0 lea %fp@(-48),%a2 46fc8: 4282 clrl %d2 46fca: 2f0a movel %a2,%sp@- 46fcc: 486e fffc pea %fp@(-4) 46fd0: 4205 clrb %d5 46fd2: 2f03 movel %d3,%sp@- 46fd4: 4eb9 0004 756c jsr 4756c <rtems_filesystem_get_start_loc> 46fda: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
46fde: 2d52 ffe4 movel %a2@,%fp@(-28)
name = old + old_parent_pathlen;
46fe2: d483 addl %d3,%d2
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46fe4: 47f9 0005 6cc8 lea 56cc8 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46fea: 260e movel %fp,%d3 46fec: 0683 ffff ffe4 addil #-28,%d3
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
46ff2: 2d6e ffd4 ffe8 movel %fp@(-44),%fp@(-24) 46ff8: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) 46ffe: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) 47004: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12)
name = old + old_parent_pathlen;
4700a: 2d42 fff8 movel %d2,%fp@(-8)
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4700e: 2f02 movel %d2,%sp@- 47010: 4e93 jsr %a3@ 47012: 2e80 movel %d0,%sp@ 47014: 2f02 movel %d2,%sp@- 47016: 4eb9 0004 5620 jsr 45620 <rtems_filesystem_prefix_separators> 4701c: d480 addl %d0,%d2 4701e: 2d42 fff8 movel %d2,%fp@(-8)
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
47022: 2f02 movel %d2,%sp@- 47024: 4e93 jsr %a3@ 47026: 4297 clrl %sp@ 47028: 2f03 movel %d3,%sp@- 4702a: 42a7 clrl %sp@- 4702c: 2f00 movel %d0,%sp@- 4702e: 2f02 movel %d2,%sp@- 47030: 4eb9 0004 56ba jsr 456ba <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false );
if ( result != 0 ) {
47036: 4fef 001c lea %sp@(28),%sp 4703a: 4a80 tstl %d0 4703c: 6600 011e bnew 4715c <_rename_r+0x1b8>
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
47040: 240e movel %fp,%d2 47042: 0682 ffff ffbc addil #-68,%d2 47048: 2f02 movel %d2,%sp@- 4704a: 486e fffc pea %fp@(-4) 4704e: 2f04 movel %d4,%sp@- 47050: 4eb9 0004 756c jsr 4756c <rtems_filesystem_get_start_loc>
if ( !new_parent_loc.ops->evalformake_h ) {
47056: 206e ffc8 moveal %fp@(-56),%a0 4705a: 4fef 000c lea %sp@(12),%sp 4705e: 2068 0004 moveal %a0@(4),%a0 47062: 4a88 tstl %a0 47064: 6700 01b8 beqw 4721e <_rename_r+0x27a>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
47068: 486e fff8 pea %fp@(-8) 4706c: 2f02 movel %d2,%sp@- 4706e: d8ae fffc addl %fp@(-4),%d4 47072: 2f04 movel %d4,%sp@- 47074: 4e90 jsr %a0@
if ( result != 0 ) {
47076: 4fef 000c lea %sp@(12),%sp 4707a: 4a80 tstl %d0 4707c: 6600 013a bnew 471b8 <_rename_r+0x214>
/*
* 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 ) {
47080: 202e ffcc movel %fp@(-52),%d0 47084: b0ae ffe0 cmpl %fp@(-32),%d0
47088: 6672 bnes 470fc <_rename_r+0x158>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
4708a: 226e ffc8 moveal %fp@(-56),%a1 4708e: 2069 0040 moveal %a1@(64),%a0 47092: 4a88 tstl %a0 47094: 6700 017a beqw 47210 <_rename_r+0x26c>
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
47098: 2f2e fff8 movel %fp@(-8),%sp@- 4709c: 2f02 movel %d2,%sp@- 4709e: 2f03 movel %d3,%sp@- 470a0: 2f0a movel %a2,%sp@- 470a2: 4e90 jsr %a0@
rtems_filesystem_freenode( &new_parent_loc );
470a4: 206e ffc8 moveal %fp@(-56),%a0
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
470a8: 2800 movel %d0,%d4
rtems_filesystem_freenode( &new_parent_loc );
470aa: 4fef 0010 lea %sp@(16),%sp 470ae: 4a88 tstl %a0
470b0: 670e beqs 470c0 <_rename_r+0x11c> <== NEVER TAKEN
470b2: 2068 001c moveal %a0@(28),%a0 470b6: 4a88 tstl %a0
470b8: 6706 beqs 470c0 <_rename_r+0x11c> <== NEVER TAKEN
470ba: 2f02 movel %d2,%sp@- 470bc: 4e90 jsr %a0@ 470be: 588f addql #4,%sp
if ( free_old_parentloc )
470c0: 4a05 tstb %d5
470c2: 6716 beqs 470da <_rename_r+0x136>
rtems_filesystem_freenode( &old_parent_loc );
470c4: 206e ffdc moveal %fp@(-36),%a0 470c8: 4a88 tstl %a0
470ca: 670e beqs 470da <_rename_r+0x136> <== NEVER TAKEN
470cc: 2068 001c moveal %a0@(28),%a0 470d0: 4a88 tstl %a0
470d2: 6706 beqs 470da <_rename_r+0x136> <== NEVER TAKEN
470d4: 2f0a movel %a2,%sp@- 470d6: 4e90 jsr %a0@ 470d8: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
470da: 206e fff0 moveal %fp@(-16),%a0 470de: 4a88 tstl %a0
470e0: 670e beqs 470f0 <_rename_r+0x14c> <== NEVER TAKEN
470e2: 2068 001c moveal %a0@(28),%a0 470e6: 4a88 tstl %a0
470e8: 6706 beqs 470f0 <_rename_r+0x14c> <== NEVER TAKEN
470ea: 2f03 movel %d3,%sp@- 470ec: 4e90 jsr %a0@ 470ee: 588f addql #4,%sp
return result;
}
470f0: 2004 movel %d4,%d0 470f2: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 470f8: 4e5e unlk %fp 470fa: 4e75 rts
* 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 ) {
rtems_filesystem_freenode( &new_parent_loc );
470fc: 206e ffc8 moveal %fp@(-56),%a0 47100: 4a88 tstl %a0
47102: 670e beqs 47112 <_rename_r+0x16e> <== NEVER TAKEN
47104: 2068 001c moveal %a0@(28),%a0 47108: 4a88 tstl %a0
4710a: 6706 beqs 47112 <_rename_r+0x16e> <== NEVER TAKEN
4710c: 2f02 movel %d2,%sp@- 4710e: 4e90 jsr %a0@ 47110: 588f addql #4,%sp
if ( free_old_parentloc )
47112: 4a05 tstb %d5
47114: 6716 beqs 4712c <_rename_r+0x188>
rtems_filesystem_freenode( &old_parent_loc );
47116: 206e ffdc moveal %fp@(-36),%a0 4711a: 4a88 tstl %a0
4711c: 670e beqs 4712c <_rename_r+0x188> <== NEVER TAKEN
4711e: 2068 001c moveal %a0@(28),%a0 47122: 4a88 tstl %a0
47124: 6706 beqs 4712c <_rename_r+0x188> <== NEVER TAKEN
47126: 2f0a movel %a2,%sp@- 47128: 4e90 jsr %a0@ 4712a: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
4712c: 206e fff0 moveal %fp@(-16),%a0 47130: 4a88 tstl %a0
47132: 670e beqs 47142 <_rename_r+0x19e> <== NEVER TAKEN
47134: 2068 001c moveal %a0@(28),%a0 47138: 4a88 tstl %a0
4713a: 6706 beqs 47142 <_rename_r+0x19e> <== NEVER TAKEN
4713c: 2f03 movel %d3,%sp@- 4713e: 4e90 jsr %a0@ 47140: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EXDEV );
47142: 4eb9 0005 3c60 jsr 53c60 <__errno> 47148: 78ff moveq #-1,%d4 4714a: 2040 moveal %d0,%a0 4714c: 7012 moveq #18,%d0 4714e: 2080 movel %d0,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47150: 2004 movel %d4,%d0 47152: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 47158: 4e5e unlk %fp 4715a: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &old_loc, false );
if ( result != 0 ) {
if ( free_old_parentloc )
4715c: 4a05 tstb %d5
4715e: 660e bnes 4716e <_rename_r+0x1ca> <== ALWAYS TAKEN
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
47160: 78ff moveq #-1,%d4 <== NOT EXECUTED
return result;
}
47162: 2004 movel %d4,%d0 <== NOT EXECUTED 47164: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4716a: 4e5e unlk %fp <== NOT EXECUTED 4716c: 4e75 rts <== 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 );
4716e: 206e ffdc moveal %fp@(-36),%a0 47172: 4a88 tstl %a0
47174: 67ea beqs 47160 <_rename_r+0x1bc> <== NEVER TAKEN
47176: 2028 001c movel %a0@(28),%d0
4717a: 67e4 beqs 47160 <_rename_r+0x1bc> <== NEVER TAKEN
4717c: 2f0a movel %a2,%sp@- 4717e: 2040 moveal %d0,%a0 47180: 78ff moveq #-1,%d4 47182: 4e90 jsr %a0@ 47184: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47186: 2004 movel %d4,%d0 47188: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 4718e: 4e5e unlk %fp 47190: 4e75 rts
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
else {
result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
47192: 42a7 clrl %sp@- 47194: 45ee ffd0 lea %fp@(-48),%a2 47198: 2400 movel %d0,%d2 4719a: 2f0a movel %a2,%sp@- 4719c: 4878 0002 pea 2 <DOUBLE_FLOAT> 471a0: 2f00 movel %d0,%sp@- 471a2: 2f03 movel %d3,%sp@- 471a4: 4eb9 0004 57c4 jsr 457c4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
471aa: 4fef 0014 lea %sp@(20),%sp 471ae: 4a80 tstl %d0
471b0: 66ae bnes 47160 <_rename_r+0x1bc> <== NEVER TAKEN
471b2: 7a01 moveq #1,%d5 471b4: 6000 fe28 braw 46fde <_rename_r+0x3a>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
471b8: 206e ffc8 moveal %fp@(-56),%a0 471bc: 4a88 tstl %a0
471be: 670e beqs 471ce <_rename_r+0x22a> <== NEVER TAKEN
471c0: 2068 001c moveal %a0@(28),%a0 471c4: 4a88 tstl %a0
471c6: 6706 beqs 471ce <_rename_r+0x22a> <== NEVER TAKEN
471c8: 2f02 movel %d2,%sp@- 471ca: 4e90 jsr %a0@ 471cc: 588f addql #4,%sp
if ( free_old_parentloc )
471ce: 4a05 tstb %d5
471d0: 6716 beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
471d2: 206e ffdc moveal %fp@(-36),%a0 471d6: 4a88 tstl %a0
471d8: 670e beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN
471da: 2068 001c moveal %a0@(28),%a0 471de: 4a88 tstl %a0
471e0: 6706 beqs 471e8 <_rename_r+0x244> <== NEVER TAKEN
471e2: 2f0a movel %a2,%sp@- 471e4: 4e90 jsr %a0@ 471e6: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
471e8: 206e fff0 moveal %fp@(-16),%a0 471ec: 4a88 tstl %a0 471ee: 6700 ff70 beqw 47160 <_rename_r+0x1bc> 471f2: 2028 001c movel %a0@(28),%d0 471f6: 6700 ff68 beqw 47160 <_rename_r+0x1bc> 471fa: 2f03 movel %d3,%sp@- 471fc: 2040 moveal %d0,%a0 471fe: 78ff moveq #-1,%d4 47200: 4e90 jsr %a0@ 47202: 588f addql #4,%sp
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47204: 2004 movel %d4,%d0 47206: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 4720c: 4e5e unlk %fp 4720e: 4e75 rts
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
47210: 2069 001c moveal %a1@(28),%a0 47214: 4a88 tstl %a0
47216: 6706 beqs 4721e <_rename_r+0x27a> <== NEVER TAKEN
47218: 2f02 movel %d2,%sp@- 4721a: 4e90 jsr %a0@ 4721c: 588f addql #4,%sp
if ( free_old_parentloc )
4721e: 4a05 tstb %d5
47220: 6716 beqs 47238 <_rename_r+0x294> <== NEVER TAKEN
rtems_filesystem_freenode( &old_parent_loc );
47222: 206e ffdc moveal %fp@(-36),%a0 47226: 4a88 tstl %a0
47228: 670e beqs 47238 <_rename_r+0x294> <== NEVER TAKEN
4722a: 2068 001c moveal %a0@(28),%a0 4722e: 4a88 tstl %a0
47230: 6706 beqs 47238 <_rename_r+0x294> <== NEVER TAKEN
47232: 2f0a movel %a2,%sp@- 47234: 4e90 jsr %a0@ 47236: 588f addql #4,%sp
rtems_filesystem_freenode( &old_loc );
47238: 206e fff0 moveal %fp@(-16),%a0 4723c: 4a88 tstl %a0
4723e: 670e beqs 4724e <_rename_r+0x2aa> <== NEVER TAKEN
47240: 2068 001c moveal %a0@(28),%a0 47244: 4a88 tstl %a0
47246: 6706 beqs 4724e <_rename_r+0x2aa> <== NEVER TAKEN
47248: 2f03 movel %d3,%sp@- 4724a: 4e90 jsr %a0@ 4724c: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTSUP );
4724e: 4eb9 0005 3c60 jsr 53c60 <__errno> 47254: 78ff moveq #-1,%d4 47256: 2040 moveal %d0,%a0
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47258: 2004 movel %d4,%d0 4725a: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3
if ( !new_parent_loc.ops->rename_h ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
47260: 20bc 0000 0086 movel #134,%a0@
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
47266: 4e5e unlk %fp
...
00045282 <_stat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
45282: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 45286: 202e 000c movel %fp@(12),%d0 <== NOT EXECUTED
return _STAT_NAME( path, buf );
4528a: 2d6e 0010 000c movel %fp@(16),%fp@(12) <== NOT EXECUTED 45290: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
45294: 4e5e unlk %fp <== NOT EXECUTED
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
45296: 4ef9 0004 519c jmp 4519c <stat> <== NOT EXECUTED
0004f74a <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
4f74a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return unlink( path );
4f74e: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED
}
4f754: 4e5e unlk %fp <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
4f756: 4ef9 0004 f560 jmp 4f560 <unlink> <== NOT EXECUTED
0005d960 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5d960: 4e56 0000 linkw %fp,#0 5d964: 222e 0010 movel %fp@(16),%d1 5d968: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5d96c: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5d972: 2d41 000c movel %d1,%fp@(12) 5d976: 2d40 0008 movel %d0,%fp@(8)
}
5d97a: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5d97c: 4ef9 0005 dabc jmp 5dabc <write>
...
00044820 <access>:
int access(
const char *path,
int amode
)
{
44820: 4e56 ffb8 linkw %fp,#-72 44824: 2f02 movel %d2,%sp@-
struct stat statbuf;
if ( stat(path, &statbuf) )
44826: 486e ffba pea %fp@(-70) 4482a: 2f2e 0008 movel %fp@(8),%sp@-
int access(
const char *path,
int amode
)
{
4482e: 242e 000c movel %fp@(12),%d2
struct stat statbuf;
if ( stat(path, &statbuf) )
44832: 4eb9 0004 6640 jsr 46640 <stat> 44838: 508f addql #8,%sp 4483a: 4a80 tstl %d0
4483c: 6626 bnes 44864 <access+0x44>
return -1;
if ( amode & R_OK ) {
4483e: 44c2 movew %d2,%ccr
44840: 6716 beqs 44858 <access+0x38>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
44842: 0802 0001 btst #1,%d2
44846: 6626 bnes 4486e <access+0x4e>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
44848: 0802 0000 btst #0,%d2
4484c: 6632 bnes 44880 <access+0x60>
if ( !( statbuf.st_mode & S_IEXEC ) )
4484e: 4280 clrl %d0
return -1;
}
return 0;
}
44850: 242e ffb4 movel %fp@(-76),%d2 44854: 4e5e unlk %fp 44856: 4e75 rts
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
44858: 202e ffc6 movel %fp@(-58),%d0 4485c: 0280 0000 0100 andil #256,%d0
44862: 66de bnes 44842 <access+0x22>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44864: 242e ffb4 movel %fp@(-76),%d2
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
44868: 70ff moveq #-1,%d0
return -1;
}
return 0;
}
4486a: 4e5e unlk %fp 4486c: 4e75 rts
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
4486e: 202e ffc6 movel %fp@(-58),%d0 44872: 0280 0000 0080 andil #128,%d0
44878: 67ea beqs 44864 <access+0x44>
return -1;
}
if ( amode & X_OK ) {
4487a: 0802 0000 btst #0,%d2
4487e: 67ce beqs 4484e <access+0x2e> <== NEVER TAKEN
if ( !( statbuf.st_mode & S_IEXEC ) )
44880: 7040 moveq #64,%d0 44882: c0ae ffc6 andl %fp@(-58),%d0
44886: 67dc beqs 44864 <access+0x44>
44888: 4280 clrl %d0 4488a: 60c4 bras 44850 <access+0x30>
00046648 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
46648: 4e56 ffec linkw %fp,#-20 4664c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 46650: 246e 0008 moveal %fp@(8),%a2 46654: 266e 000c moveal %fp@(12),%a3
long adjustment;
/*
* Simple validations
*/
if ( !delta )
46658: 4a8a tstl %a2 4665a: 6700 00ec beqw 46748 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
4665e: 202a 0004 movel %a2@(4),%d0 46662: 0c80 000f 423f cmpil #999999,%d0 46668: 6200 00de bhiw 46748 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
4666c: 4a8b tstl %a3
4666e: 670a beqs 4667a <adjtime+0x32>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
46670: 42ab 0004 clrl %a3@(4) 46674: 202a 0004 movel %a2@(4),%d0
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
olddelta->tv_sec = 0;
46678: 4293 clrl %a3@
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
4667a: 223c 000f 4240 movel #1000000,%d1 46680: 4c12 1800 mulsl %a2@,%d1
adjustment += delta->tv_usec;
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
46684: d081 addl %d1,%d0 46686: b0b9 0006 11a0 cmpl 611a0 <Configuration+0xc>,%d0
4668c: 640c bccs 4669a <adjtime+0x52>
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
4668e: 4280 clrl %d0
return 0;
}
46690: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46696: 4e5e unlk %fp 46698: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4669a: 2039 0006 2a94 movel 62a94 <_Thread_Dispatch_disable_level>,%d0 466a0: 5280 addql #1,%d0 466a2: 23c0 0006 2a94 movel %d0,62a94 <_Thread_Dispatch_disable_level>
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
466a8: 240e movel %fp,%d2 466aa: 5182 subql #8,%d2 466ac: 2f02 movel %d2,%sp@- 466ae: 4eb9 0004 8040 jsr 48040 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466b4: 202a 0004 movel %a2@(4),%d0 466b8: 223c 0000 03e8 movel #1000,%d1 466be: 4c01 0800 mulsl %d1,%d0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
466c2: 588f addql #4,%sp
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
466c4: 2212 movel %a2@,%d1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466c6: d0ae fffc addl %fp@(-4),%d0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
466ca: d3ae fff8 addl %d1,%fp@(-8)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
466ce: 2d40 fffc movel %d0,%fp@(-4)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
466d2: 0c80 3b9a c9ff cmpil #999999999,%d0
466d8: 631c blss 466f6 <adjtime+0xae>
466da: 222e fff8 movel %fp@(-8),%d1
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
466de: 5281 addql #1,%d1
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
466e0: 0680 c465 3600 addil #-1000000000,%d0
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
466e6: 0c80 3b9a c9ff cmpil #999999999,%d0
466ec: 62f0 bhis 466de <adjtime+0x96> <== NEVER TAKEN
466ee: 2d41 fff8 movel %d1,%fp@(-8) 466f2: 2d40 fffc movel %d0,%fp@(-4)
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
466f6: 0c80 c465 3600 cmpil #-1000000000,%d0
466fc: 621c bhis 4671a <adjtime+0xd2> <== NEVER TAKEN
466fe: 222e fff8 movel %fp@(-8),%d1
* At one point there was a static variable named adjustment
* used by this implementation. I don't see any reason for it
* to be here based upon the GNU/Linux documentation.
*/
int adjtime(
46702: 5381 subql #1,%d1
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
46704: 0680 3b9a ca00 addil #1000000000,%d0
ts.tv_nsec -= TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec++;
}
/* if adjustment is too much negative */
while ( ts.tv_nsec <= (-1 * TOD_NANOSECONDS_PER_SECOND) ) {
4670a: 0c80 c465 3600 cmpil #-1000000000,%d0
46710: 63f0 blss 46702 <adjtime+0xba>
46712: 2d40 fffc movel %d0,%fp@(-4) 46716: 2d41 fff8 movel %d1,%fp@(-8)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
4671a: 2f02 movel %d2,%sp@- 4671c: 4eb9 0004 810c jsr 4810c <_TOD_Set>
_Thread_Enable_dispatch();
46722: 4eb9 0004 936c jsr 4936c <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
46728: 588f addql #4,%sp 4672a: 4a8b tstl %a3 4672c: 6700 ff60 beqw 4668e <adjtime+0x46>
*olddelta = *delta;
46730: 4280 clrl %d0 46732: 2212 movel %a2@,%d1 46734: 242a 0004 movel %a2@(4),%d2 46738: 2681 movel %d1,%a3@ 4673a: 2742 0004 movel %d2,%a3@(4)
return 0;
}
4673e: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 46744: 4e5e unlk %fp 46746: 4e75 rts
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
46748: 4eb9 0005 1150 jsr 51150 <__errno> 4674e: 7216 moveq #22,%d1 46750: 2040 moveal %d0,%a0 46752: 70ff moveq #-1,%d0
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
46754: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3
*/
if ( !delta )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
rtems_set_errno_and_return_minus_one( EINVAL );
4675a: 2081 movel %d1,%a0@
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
4675c: 4e5e unlk %fp <== NOT EXECUTED
00048658 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
48658: 4e56 fff4 linkw %fp,#-12 4865c: 48d7 001c moveml %d2-%d4,%sp@ 48660: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
48664: 4ab9 0006 62b4 tstl 662b4 <_POSIX_signals_Alarm_timer+0x1c>
4866a: 674e beqs 486ba <alarm+0x62>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4866c: 4879 0006 6298 pea 66298 <_POSIX_signals_Alarm_timer> 48672: 4eb9 0004 d578 jsr 4d578 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
48678: 588f addql #4,%sp 4867a: 7201 moveq #1,%d1 4867c: 5580 subql #2,%d0 4867e: b280 cmpl %d0,%d1
48680: 645e bccs 486e0 <alarm+0x88>
48682: 4283 clrl %d3
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
48684: 4a82 tstl %d2
48686: 660c bnes 48694 <alarm+0x3c> <== NEVER TAKEN
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
48688: 2003 movel %d3,%d0 4868a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48690: 4e5e unlk %fp 48692: 4e75 rts
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48694: 4879 0006 6298 pea 66298 <_POSIX_signals_Alarm_timer> 4869a: 4879 0006 6600 pea 66600 <_Watchdog_Seconds_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
486a0: 23c2 0006 62a4 movel %d2,662a4 <_POSIX_signals_Alarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
486a6: 4eb9 0004 d430 jsr 4d430 <_Watchdog_Insert> 486ac: 508f addql #8,%sp 486ae: 2003 movel %d3,%d0 486b0: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 486b6: 4e5e unlk %fp 486b8: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
486ba: 42b9 0006 62a0 clrl 662a0 <_POSIX_signals_Alarm_timer+0x8>
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
486c0: 4283 clrl %d3
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
486c2: 203c 0004 8704 movel #296708,%d0
the_watchdog->id = id;
486c8: 42b9 0006 62b8 clrl 662b8 <_POSIX_signals_Alarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
486ce: 23c0 0006 62b4 movel %d0,662b4 <_POSIX_signals_Alarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
486d4: 42b9 0006 62bc clrl 662bc <_POSIX_signals_Alarm_timer+0x24>
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
486da: 4a82 tstl %d2
486dc: 67aa beqs 48688 <alarm+0x30> <== NEVER TAKEN
486de: 60b4 bras 48694 <alarm+0x3c>
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
486e0: 2839 0006 62b0 movel 662b0 <_POSIX_signals_Alarm_timer+0x18>,%d4 486e6: 98b9 0006 62ac subl 662ac <_POSIX_signals_Alarm_timer+0x14>,%d4
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
486ec: 2639 0006 62a4 movel 662a4 <_POSIX_signals_Alarm_timer+0xc>,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
486f2: 4eb9 0004 afc0 jsr 4afc0 <TOD_TICKS_PER_SECOND_method>
* The stop_time and start_time fields are snapshots of ticks since
* boot. Since alarm() is dealing in seconds, we must account for
* this.
*/
remaining = the_timer->initial -
486f8: 4c40 4004 remul %d0,%d4,%d4 486fc: 9684 subl %d4,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
486fe: 4a82 tstl %d2
48700: 6786 beqs 48688 <alarm+0x30> <== NEVER TAKEN
48702: 6090 bras 48694 <alarm+0x3c>
00042918 <calloc>:
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
42918: 4e56 0000 linkw %fp,#0
length = nelem * elsize;
4291c: 41ee 0008 lea %fp@(8),%a0
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
42920: 52b9 0006 12f8 addql #1,612f8 <rtems_malloc_statistics+0x14> 42926: 2f03 movel %d3,%sp@-
length = nelem * elsize;
42928: 262e 000c movel %fp@(12),%d3 4292c: 4c10 3800 mulsl %a0@,%d3
)
{
register char *cptr;
size_t length;
MSBUMP(calloc_calls, 1);
42930: 2f02 movel %d2,%sp@-
length = nelem * elsize;
cptr = malloc( length );
42932: 2f03 movel %d3,%sp@- 42934: 4eb9 0004 3108 jsr 43108 <malloc>
if ( cptr )
4293a: 588f addql #4,%sp
size_t length;
MSBUMP(calloc_calls, 1);
length = nelem * elsize;
cptr = malloc( length );
4293c: 2400 movel %d0,%d2
if ( cptr )
4293e: 6710 beqs 42950 <calloc+0x38> <== NEVER TAKEN
memset( cptr, '\0', length );
42940: 2f03 movel %d3,%sp@- 42942: 42a7 clrl %sp@- 42944: 2f00 movel %d0,%sp@- 42946: 4eb9 0005 0e48 jsr 50e48 <memset> 4294c: 4fef 000c lea %sp@(12),%sp
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
return cptr;
}
42950: 2002 movel %d2,%d0
length = nelem * elsize;
cptr = malloc( length );
if ( cptr )
memset( cptr, '\0', length );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
42952: 53b9 0006 12e8 subql #1,612e8 <rtems_malloc_statistics+0x4>
return cptr;
}
42958: 242e fff8 movel %fp@(-8),%d2 4295c: 262e fffc movel %fp@(-4),%d3
42960: 4e5e unlk %fp <== NOT EXECUTED
0004cb40 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
4cb40: 4e56 ffec linkw %fp,#-20 4cb44: 2f0a movel %a2,%sp@- 4cb46: 2f02 movel %d2,%sp@- 4cb48: 242e 0008 movel %fp@(8),%d2
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
4cb4c: 6700 0098 beqw 4cbe6 <chdir+0xa6>
rtems_set_errno_and_return_minus_one( EFAULT );
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
4cb50: 2f02 movel %d2,%sp@- 4cb52: 45ee ffec lea %fp@(-20),%a2 4cb56: 4eb9 0005 241c jsr 5241c <strlen> 4cb5c: 7201 moveq #1,%d1 4cb5e: 2e81 movel %d1,%sp@ 4cb60: 2f0a movel %a2,%sp@- 4cb62: 4878 0001 pea 1 <ADD> 4cb66: 2f00 movel %d0,%sp@- 4cb68: 2f02 movel %d2,%sp@- 4cb6a: 4eb9 0004 3220 jsr 43220 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
4cb70: 4fef 0014 lea %sp@(20),%sp 4cb74: 4a80 tstl %d0
4cb76: 6660 bnes 4cbd8 <chdir+0x98>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
4cb78: 226e fff8 moveal %fp@(-8),%a1 4cb7c: 2069 0010 moveal %a1@(16),%a0 4cb80: 4a88 tstl %a0 4cb82: 6700 00ac beqw 4cc30 <chdir+0xf0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
4cb86: 2f0a movel %a2,%sp@- 4cb88: 4e90 jsr %a0@ 4cb8a: 588f addql #4,%sp 4cb8c: 7201 moveq #1,%d1 4cb8e: b280 cmpl %d0,%d1
4cb90: 666e bnes 4cc00 <chdir+0xc0>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
4cb92: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 4cb98: 2268 0010 moveal %a0@(16),%a1 4cb9c: 4a89 tstl %a1
4cb9e: 6716 beqs 4cbb6 <chdir+0x76> <== NEVER TAKEN
4cba0: 2269 001c moveal %a1@(28),%a1 4cba4: 4a89 tstl %a1
4cba6: 670e beqs 4cbb6 <chdir+0x76> <== NEVER TAKEN
4cba8: 4868 0004 pea %a0@(4) 4cbac: 4e91 jsr %a1@ 4cbae: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 4cbb4: 588f addql #4,%sp
rtems_filesystem_current = loc;
4cbb6: 5888 addql #4,%a0 4cbb8: 4280 clrl %d0 4cbba: 20d2 movel %a2@,%a0@+ 4cbbc: 20ee fff0 movel %fp@(-16),%a0@+ 4cbc0: 20ee fff4 movel %fp@(-12),%a0@+ 4cbc4: 20ee fff8 movel %fp@(-8),%a0@+
return 0;
}
4cbc8: 242e ffe4 movel %fp@(-28),%d2
rtems_set_errno_and_return_minus_one( ENOTDIR );
}
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
4cbcc: 20ae fffc movel %fp@(-4),%a0@
return 0;
}
4cbd0: 246e ffe8 moveal %fp@(-24),%a2 4cbd4: 4e5e unlk %fp 4cbd6: 4e75 rts 4cbd8: 242e ffe4 movel %fp@(-28),%d2
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
4cbdc: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cbde: 246e ffe8 moveal %fp@(-24),%a2 4cbe2: 4e5e unlk %fp 4cbe4: 4e75 rts
{
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
4cbe6: 4eb9 0005 10a0 jsr 510a0 <__errno> 4cbec: 740e moveq #14,%d2 4cbee: 2040 moveal %d0,%a0 4cbf0: 70ff moveq #-1,%d0 4cbf2: 2082 movel %d2,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cbf4: 242e ffe4 movel %fp@(-28),%d2 4cbf8: 246e ffe8 moveal %fp@(-24),%a2 4cbfc: 4e5e unlk %fp 4cbfe: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
4cc00: 206e fff8 moveal %fp@(-8),%a0 4cc04: 4a88 tstl %a0
4cc06: 670e beqs 4cc16 <chdir+0xd6> <== NEVER TAKEN
4cc08: 2068 001c moveal %a0@(28),%a0 4cc0c: 4a88 tstl %a0
4cc0e: 6706 beqs 4cc16 <chdir+0xd6> <== NEVER TAKEN
4cc10: 2f0a movel %a2,%sp@- 4cc12: 4e90 jsr %a0@ 4cc14: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
4cc16: 4eb9 0005 10a0 jsr 510a0 <__errno>
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cc1c: 242e ffe4 movel %fp@(-28),%d2
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
4cc20: 2040 moveal %d0,%a0 4cc22: 7214 moveq #20,%d1 4cc24: 70ff moveq #-1,%d0
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cc26: 246e ffe8 moveal %fp@(-24),%a2 4cc2a: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
4cc2c: 2081 movel %d1,%a0@
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cc2e: 4e75 rts
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
4cc30: 2069 001c moveal %a1@(28),%a0 4cc34: 4a88 tstl %a0
4cc36: 6706 beqs 4cc3e <chdir+0xfe> <== NOT EXECUTED 4cc38: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cc3a: 4e90 jsr %a0@ <== NOT EXECUTED 4cc3c: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4cc3e: 4eb9 0005 10a0 jsr 510a0 <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cc44: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4cc48: 2040 moveal %d0,%a0 <== NOT EXECUTED 4cc4a: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
4cc4c: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 4cc50: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4cc52: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &rtems_filesystem_current );
rtems_filesystem_current = loc;
return 0;
}
...
00044af8 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
44af8: 4e56 ffec linkw %fp,#-20 44afc: 2f03 movel %d3,%sp@- 44afe: 262e 0008 movel %fp@(8),%d3 44b02: 2f02 movel %d2,%sp@-
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
44b04: 240e movel %fp,%d2 44b06: 0682 ffff ffec addil #-20,%d2 44b0c: 2f03 movel %d3,%sp@- 44b0e: 4eb9 0005 4fec jsr 54fec <strlen> 44b14: 7201 moveq #1,%d1 44b16: 2e81 movel %d1,%sp@ 44b18: 2f02 movel %d2,%sp@- 44b1a: 42a7 clrl %sp@- 44b1c: 2f00 movel %d0,%sp@- 44b1e: 2f03 movel %d3,%sp@- 44b20: 4eb9 0004 5084 jsr 45084 <rtems_filesystem_evaluate_path>
if ( status != 0 )
44b26: 4fef 0014 lea %sp@(20),%sp 44b2a: 4a80 tstl %d0
44b2c: 6640 bnes 44b6e <chmod+0x76>
return -1;
if ( !loc.handlers ){
44b2e: 206e fff4 moveal %fp@(-12),%a0 44b32: 4a88 tstl %a0
44b34: 677c beqs 44bb2 <chmod+0xba> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
44b36: 2068 001c moveal %a0@(28),%a0 44b3a: 4a88 tstl %a0
44b3c: 6740 beqs 44b7e <chmod+0x86> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
44b3e: 2f2e 000c movel %fp@(12),%sp@- 44b42: 2f02 movel %d2,%sp@- 44b44: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
44b46: 206e fff8 moveal %fp@(-8),%a0
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
44b4a: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
44b4c: 508f addql #8,%sp 44b4e: 4a88 tstl %a0
44b50: 670e beqs 44b60 <chmod+0x68> <== NEVER TAKEN
44b52: 2068 001c moveal %a0@(28),%a0 44b56: 4a88 tstl %a0
44b58: 6706 beqs 44b60 <chmod+0x68> <== NEVER TAKEN
44b5a: 2f02 movel %d2,%sp@- 44b5c: 4e90 jsr %a0@ 44b5e: 588f addql #4,%sp
return result;
}
44b60: 2003 movel %d3,%d0 44b62: 242e ffe4 movel %fp@(-28),%d2 44b66: 262e ffe8 movel %fp@(-24),%d3 44b6a: 4e5e unlk %fp 44b6c: 4e75 rts
int status;
rtems_filesystem_location_info_t loc;
int result;
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
44b6e: 76ff moveq #-1,%d3
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44b70: 2003 movel %d3,%d0 44b72: 242e ffe4 movel %fp@(-28),%d2 44b76: 262e ffe8 movel %fp@(-24),%d3 44b7a: 4e5e unlk %fp 44b7c: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
44b7e: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44b82: 4a88 tstl %a0 <== NOT EXECUTED 44b84: 670e beqs 44b94 <chmod+0x9c> <== NOT EXECUTED 44b86: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44b8a: 4a88 tstl %a0 <== NOT EXECUTED 44b8c: 6706 beqs 44b94 <chmod+0x9c> <== NOT EXECUTED 44b8e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44b90: 4e90 jsr %a0@ <== NOT EXECUTED 44b92: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44b94: 4eb9 0005 35d8 jsr 535d8 <__errno> <== NOT EXECUTED 44b9a: 76ff moveq #-1,%d3 <== NOT EXECUTED 44b9c: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44b9e: 2003 movel %d3,%d0 <== NOT EXECUTED 44ba0: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44ba4: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44ba8: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
}
if ( !loc.handlers->fchmod_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
44baa: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44bb0: 4e75 rts <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ), 0, &loc, true );
if ( status != 0 )
return -1;
if ( !loc.handlers ){
rtems_filesystem_freenode( &loc );
44bb2: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 44bb6: 4a88 tstl %a0 <== NOT EXECUTED 44bb8: 670e beqs 44bc8 <chmod+0xd0> <== NOT EXECUTED 44bba: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44bbe: 4a88 tstl %a0 <== NOT EXECUTED 44bc0: 6706 beqs 44bc8 <chmod+0xd0> <== NOT EXECUTED 44bc2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44bc4: 4e90 jsr %a0@ <== NOT EXECUTED 44bc6: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
44bc8: 4eb9 0005 35d8 jsr 535d8 <__errno> <== NOT EXECUTED 44bce: 76ff moveq #-1,%d3 <== NOT EXECUTED 44bd0: 2040 moveal %d0,%a0 <== NOT EXECUTED 44bd2: 7009 moveq #9,%d0 <== NOT EXECUTED 44bd4: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*loc.handlers->fchmod_h)( &loc, mode );
rtems_filesystem_freenode( &loc );
return result;
}
44bd6: 2003 movel %d3,%d0 <== NOT EXECUTED 44bd8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED 44bdc: 262e ffe8 movel %fp@(-24),%d3 <== NOT EXECUTED 44be0: 4e5e unlk %fp <== NOT EXECUTED
00044be4 <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44be4: 4e56 ffdc linkw %fp,#-36 44be8: 48d7 003c moveml %d2-%d5,%sp@ 44bec: 262e 0008 movel %fp@(8),%d3
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
44bf0: 240e movel %fp,%d2 44bf2: 0682 ffff ffec addil #-20,%d2 44bf8: 2f03 movel %d3,%sp@-
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44bfa: 382e 000e movew %fp@(14),%d4
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
44bfe: 4eb9 0005 4fec jsr 54fec <strlen> 44c04: 7201 moveq #1,%d1 44c06: 2e81 movel %d1,%sp@
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
44c08: 3a2e 0012 movew %fp@(18),%d5
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
44c0c: 2f02 movel %d2,%sp@- 44c0e: 42a7 clrl %sp@- 44c10: 2f00 movel %d0,%sp@- 44c12: 2f03 movel %d3,%sp@- 44c14: 4eb9 0004 5084 jsr 45084 <rtems_filesystem_evaluate_path> 44c1a: 4fef 0014 lea %sp@(20),%sp 44c1e: 4a80 tstl %d0
44c20: 6640 bnes 44c62 <chown+0x7e>
return -1;
if ( !loc.ops->chown_h ) {
44c22: 226e fff8 moveal %fp@(-8),%a1 44c26: 2069 0018 moveal %a1@(24),%a0 44c2a: 4a88 tstl %a0
44c2c: 6742 beqs 44c70 <chown+0x8c> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
44c2e: 3f05 movew %d5,%sp@- 44c30: 4267 clrw %sp@- 44c32: 3f04 movew %d4,%sp@- 44c34: 4267 clrw %sp@- 44c36: 2f02 movel %d2,%sp@- 44c38: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
44c3a: 206e fff8 moveal %fp@(-8),%a0
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->chown_h)( &loc, owner, group );
44c3e: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
44c40: 4fef 000c lea %sp@(12),%sp 44c44: 4a88 tstl %a0
44c46: 670e beqs 44c56 <chown+0x72> <== NEVER TAKEN
44c48: 2068 001c moveal %a0@(28),%a0 44c4c: 4a88 tstl %a0
44c4e: 6706 beqs 44c56 <chown+0x72> <== NEVER TAKEN
44c50: 2f02 movel %d2,%sp@- 44c52: 4e90 jsr %a0@ 44c54: 588f addql #4,%sp
return result;
}
44c56: 2003 movel %d3,%d0 44c58: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c5e: 4e5e unlk %fp 44c60: 4e75 rts
)
{
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
44c62: 76ff moveq #-1,%d3
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44c64: 2003 movel %d3,%d0 44c66: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 44c6c: 4e5e unlk %fp 44c6e: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
44c70: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44c74: 4a88 tstl %a0 <== NOT EXECUTED 44c76: 6706 beqs 44c7e <chown+0x9a> <== NOT EXECUTED 44c78: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c7a: 4e90 jsr %a0@ <== NOT EXECUTED 44c7c: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44c7e: 4eb9 0005 35d8 jsr 535d8 <__errno> <== NOT EXECUTED 44c84: 76ff moveq #-1,%d3 <== NOT EXECUTED 44c86: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44c88: 2003 movel %d3,%d0 <== NOT EXECUTED 44c8a: 4cee 003c ffdc moveml %fp@(-36),%d2-%d5 <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
return -1;
if ( !loc.ops->chown_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
44c90: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->chown_h)( &loc, owner, group );
rtems_filesystem_freenode( &loc );
return result;
}
44c96: 4e5e unlk %fp <== NOT EXECUTED
...
00042cac <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42cac: 4e56 ffec linkw %fp,#-20
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
42cb0: 203c 0006 1d8c movel #400780,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42cb6: 2f0b movel %a3,%sp@- 42cb8: 2f0a movel %a2,%sp@-
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
42cba: b0b9 0006 0738 cmpl 60738 <rtems_current_user_env>,%d0 42cc0: 6700 0086 beqw 42d48 <chroot+0x9c>
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = chdir(pathname);
42cc4: 2f2e 0008 movel %fp@(8),%sp@- 42cc8: 4eb9 0004 cb40 jsr 4cb40 <chdir>
if (result) {
42cce: 588f addql #4,%sp 42cd0: 4a80 tstl %d0 42cd2: 6600 00a6 bnew 42d7a <chroot+0xce>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
42cd6: 42a7 clrl %sp@- 42cd8: 45ee ffec lea %fp@(-20),%a2 42cdc: 2f0a movel %a2,%sp@- 42cde: 42a7 clrl %sp@- 42ce0: 4878 0001 pea 1 <ADD> 42ce4: 4879 0005 f7a3 pea 5f7a3 <__FUNCTION__.5435+0x18> 42cea: 4eb9 0004 3220 jsr 43220 <rtems_filesystem_evaluate_path> 42cf0: 4fef 0014 lea %sp@(20),%sp 42cf4: 4a80 tstl %d0 42cf6: 6600 0082 bnew 42d7a <chroot+0xce>
/* 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);
42cfa: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 42d00: 2268 0024 moveal %a0@(36),%a1 42d04: 4a89 tstl %a1
42d06: 6716 beqs 42d1e <chroot+0x72> <== NEVER TAKEN
42d08: 2269 001c moveal %a1@(28),%a1 42d0c: 4a89 tstl %a1
42d0e: 670e beqs 42d1e <chroot+0x72> <== NEVER TAKEN
42d10: 4868 0018 pea %a0@(24) 42d14: 4e91 jsr %a1@ 42d16: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 42d1c: 588f addql #4,%sp
rtems_filesystem_root = loc;
42d1e: 2152 0018 movel %a2@,%a0@(24) 42d22: 4280 clrl %d0 42d24: 216e fff0 001c movel %fp@(-16),%a0@(28) 42d2a: 216e fff4 0020 movel %fp@(-12),%a0@(32) 42d30: 216e fff8 0024 movel %fp@(-8),%a0@(36)
return 0;
}
42d36: 246e ffe4 moveal %fp@(-28),%a2 42d3a: 266e ffe8 moveal %fp@(-24),%a3
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
42d3e: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0;
}
42d44: 4e5e unlk %fp 42d46: 4e75 rts
int result;
rtems_filesystem_location_info_t loc;
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
42d48: 4eb9 0004 45bc jsr 445bc <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
42d4e: 203c 0006 1d8c movel #400780,%d0 42d54: b0b9 0006 0738 cmpl 60738 <rtems_current_user_env>,%d0 42d5a: 6600 ff68 bnew 42cc4 <chroot+0x18>
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d5e: 4eb9 0005 10a0 jsr 510a0 <__errno> <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d64: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d68: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d6a: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d6c: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d70: 4e5e unlk %fp <== NOT EXECUTED
/* an automatic call to new private env the first time */
if (rtems_current_user_env == &rtems_global_user_env) {
rtems_libio_set_private_env(); /* try to set a new private env*/
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d72: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d78: 4e75 rts <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
42d7a: 45f9 0005 10a0 lea 510a0 <__errno>,%a2 <== NOT EXECUTED 42d80: 4e92 jsr %a2@ <== NOT EXECUTED 42d82: 2640 moveal %d0,%a3 <== NOT EXECUTED 42d84: 4e92 jsr %a2@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d86: 246e ffe4 moveal %fp@(-28),%a2 <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
42d8a: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d8c: 70ff moveq #-1,%d0 <== NOT EXECUTED 42d8e: 2690 movel %a0@,%a3@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42d90: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42d94: 4e5e unlk %fp <== NOT EXECUTED
00046610 <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
46610: 4e56 0000 linkw %fp,#0 46614: 202e 0008 movel %fp@(8),%d0 46618: 222e 000c movel %fp@(12),%d1 4661c: 2f02 movel %d2,%sp@-
if ( !tp )
4661e: 4a81 tstl %d1
46620: 6718 beqs 4663a <clock_gettime+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
46622: 7401 moveq #1,%d2 46624: b480 cmpl %d0,%d2
46626: 6752 beqs 4667a <clock_gettime+0x6a>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
46628: 7404 moveq #4,%d2 4662a: b480 cmpl %d0,%d2
4662c: 6738 beqs 46666 <clock_gettime+0x56> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
4662e: 7402 moveq #2,%d2 46630: b480 cmpl %d0,%d2
46632: 6732 beqs 46666 <clock_gettime+0x56>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
46634: 7203 moveq #3,%d1 46636: b280 cmpl %d0,%d1
46638: 6716 beqs 46650 <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
4663a: 4eb9 0005 1618 jsr 51618 <__errno>
return 0;
}
46640: 242e fffc movel %fp@(-4),%d2
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46644: 2040 moveal %d0,%a0 46646: 7216 moveq #22,%d1 46648: 70ff moveq #-1,%d0
return 0;
}
4664a: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
4664c: 2081 movel %d1,%a0@
return 0;
}
4664e: 4e75 rts
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
46650: 4eb9 0005 1618 jsr 51618 <__errno> 46656: 7458 moveq #88,%d2 46658: 2040 moveal %d0,%a0 4665a: 70ff moveq #-1,%d0 4665c: 2082 movel %d2,%a0@
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4665e: 242e fffc movel %fp@(-4),%d2 46662: 4e5e unlk %fp 46664: 4e75 rts
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
46666: 2f01 movel %d1,%sp@- 46668: 4eb9 0004 87bc jsr 487bc <_TOD_Get_uptime_as_timespec>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4666e: 242e fffc movel %fp@(-4),%d2
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
46672: 588f addql #4,%sp
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
46674: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46676: 4e5e unlk %fp 46678: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
4667a: 2f01 movel %d1,%sp@- 4667c: 4eb9 0004 8720 jsr 48720 <_TOD_Get>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46682: 242e fffc movel %fp@(-4),%d2
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
return 0;
46686: 588f addql #4,%sp
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
46688: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4668a: 4e5e unlk %fp
...
00046690 <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
46690: 4e56 0000 linkw %fp,#0 46694: 202e 0008 movel %fp@(8),%d0 46698: 206e 000c moveal %fp@(12),%a0
if ( !tp )
4669c: 4a88 tstl %a0
4669e: 6712 beqs 466b2 <clock_settime+0x22> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
466a0: 7201 moveq #1,%d1 466a2: b280 cmpl %d0,%d1
466a4: 6730 beqs 466d6 <clock_settime+0x46>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
466a6: 7202 moveq #2,%d1 466a8: b280 cmpl %d0,%d1
466aa: 6718 beqs 466c4 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
466ac: 7203 moveq #3,%d1 466ae: b280 cmpl %d0,%d1
466b0: 6712 beqs 466c4 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
466b2: 4eb9 0005 1618 jsr 51618 <__errno> 466b8: 7216 moveq #22,%d1 466ba: 2040 moveal %d0,%a0 466bc: 70ff moveq #-1,%d0
return 0;
}
466be: 4e5e unlk %fp
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
466c0: 2081 movel %d1,%a0@
return 0;
}
466c2: 4e75 rts
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
466c4: 4eb9 0005 1618 jsr 51618 <__errno> 466ca: 7258 moveq #88,%d1 466cc: 2040 moveal %d0,%a0 466ce: 70ff moveq #-1,%d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
466d0: 4e5e unlk %fp
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
466d2: 2081 movel %d1,%a0@
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
466d4: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
466d6: 203c 21da e4ff movel #567993599,%d0 466dc: b090 cmpl %a0@,%d0
466de: 64d2 bccs 466b2 <clock_settime+0x22>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
466e0: 2039 0006 337c movel 6337c <_Thread_Dispatch_disable_level>,%d0 466e6: 5280 addql #1,%d0 466e8: 23c0 0006 337c movel %d0,6337c <_Thread_Dispatch_disable_level>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
466ee: 2f08 movel %a0,%sp@- 466f0: 4eb9 0004 8814 jsr 48814 <_TOD_Set>
_Thread_Enable_dispatch();
466f6: 4eb9 0004 9a74 jsr 49a74 <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
466fc: 588f addql #4,%sp
if ( tp->tv_sec < TOD_SECONDS_1970_THROUGH_1988 )
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
466fe: 4280 clrl %d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46700: 4e5e unlk %fp <== NOT EXECUTED
0004bce8 <close>:
#include <rtems/libio_.h>
int close(
int fd
)
{
4bce8: 4e56 0000 linkw %fp,#0 4bcec: 202e 0008 movel %fp@(8),%d0 4bcf0: 2f0a movel %a2,%sp@- 4bcf2: 2f02 movel %d2,%sp@-
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
4bcf4: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0
4bcfa: 645e bccs 4bd5a <close+0x72> iop = rtems_libio_iop(fd);
4bcfc: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 4bd02: ed88 lsll #6,%d0 4bd04: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4bd06: 202a 0014 movel %a2@(20),%d0 4bd0a: 0280 0000 0100 andil #256,%d0
4bd10: 6748 beqs 4bd5a <close+0x72>
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
4bd12: 206a 003c moveal %a2@(60),%a0 4bd16: 2068 0004 moveal %a0@(4),%a0 4bd1a: 4a88 tstl %a0
4bd1c: 6738 beqs 4bd56 <close+0x6e> <== NEVER TAKEN
rc = (*iop->handlers->close_h)( iop );
4bd1e: 2f0a movel %a2,%sp@- 4bd20: 4e90 jsr %a0@ 4bd22: 588f addql #4,%sp 4bd24: 2400 movel %d0,%d2
rtems_filesystem_freenode( &iop->pathinfo );
4bd26: 206a 0024 moveal %a2@(36),%a0 4bd2a: 4a88 tstl %a0
4bd2c: 6710 beqs 4bd3e <close+0x56> <== NEVER TAKEN
4bd2e: 2068 001c moveal %a0@(28),%a0 4bd32: 4a88 tstl %a0
4bd34: 6708 beqs 4bd3e <close+0x56>
4bd36: 486a 0018 pea %a2@(24) 4bd3a: 4e90 jsr %a0@ 4bd3c: 588f addql #4,%sp
rtems_libio_free( iop );
4bd3e: 2f0a movel %a2,%sp@- 4bd40: 4eb9 0004 bff6 jsr 4bff6 <rtems_libio_free>
return rc;
}
4bd46: 246e fffc moveal %fp@(-4),%a2 4bd4a: 2002 movel %d2,%d0
rc = (*iop->handlers->close_h)( iop );
rtems_filesystem_freenode( &iop->pathinfo );
rtems_libio_free( iop );
return rc;
4bd4c: 588f addql #4,%sp
}
4bd4e: 242e fff8 movel %fp@(-8),%d2 4bd52: 4e5e unlk %fp 4bd54: 4e75 rts
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
rc = RTEMS_SUCCESSFUL;
if ( iop->handlers->close_h )
4bd56: 4282 clrl %d2 <== NOT EXECUTED 4bd58: 60cc bras 4bd26 <close+0x3e> <== NOT EXECUTED
rtems_libio_t *iop;
rtems_status_code rc;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
4bd5a: 4eb9 0005 05b8 jsr 505b8 <__errno> 4bd60: 74ff moveq #-1,%d2 4bd62: 2040 moveal %d0,%a0 4bd64: 7009 moveq #9,%d0 4bd66: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &iop->pathinfo );
rtems_libio_free( iop );
return rc;
}
4bd68: 2002 movel %d2,%d0 4bd6a: 242e fff8 movel %fp@(-8),%d2 4bd6e: 246e fffc moveal %fp@(-4),%a2
4bd72: 4e5e unlk %fp <== NOT EXECUTED
000498c8 <devFS_close>:
#include "devfs.h"
int devFS_close(
rtems_libio_t *iop
)
{
498c8: 4e56 fff4 linkw %fp,#-12 498cc: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
498d0: 486e fff4 pea %fp@(-12)
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
498d4: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = 0;
498d8: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
498dc: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
498e0: 2f29 000c movel %a1@(12),%sp@- 498e4: 2f29 0008 movel %a1@(8),%sp@-
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
498e8: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
498ec: 4eb9 0004 b028 jsr 4b028 <rtems_io_close>
np->major,
np->minor,
(void *) &args
);
if ( status ) {
498f2: 4fef 000c lea %sp@(12),%sp 498f6: 4a80 tstl %d0
498f8: 6604 bnes 498fe <devFS_close+0x36> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
498fa: 4e5e unlk %fp 498fc: 4e75 rts
np->major,
np->minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
498fe: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49900: 4eb9 0004 99fc jsr 499fc <rtems_deviceio_errno> <== NOT EXECUTED 49906: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
49908: 4e5e unlk %fp <== NOT EXECUTED
0004991e <devFS_evaluate_path>:
{
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
4991e: 70f8 moveq #-8,%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
49920: 4e56 ffdc linkw %fp,#-36
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
49924: c0ae 0010 andl %fp@(16),%d0
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
49928: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 4992c: 2c2e 0008 movel %fp@(8),%d6 49930: 262e 000c movel %fp@(12),%d3 49934: 286e 0014 moveal %fp@(20),%a4
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
49938: 4a80 tstl %d0 4993a: 6600 0090 bnew 499cc <devFS_evaluate_path+0xae>
rtems_set_errno_and_return_minus_one( EPERM );
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
4993e: 2814 movel %a4@,%d4
if (!device_name_table)
49940: 6700 00a2 beqw 499e4 <devFS_evaluate_path+0xc6>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
49944: 2a39 0005 b098 movel 5b098 <rtems_device_table_size>,%d5
4994a: 673c beqs 49988 <devFS_evaluate_path+0x6a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EPERM );
/* 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 );
4994c: 4280 clrl %d0 4994e: 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)
49950: 4bf9 0004 d700 lea 4d700 <strncmp>,%a5
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++) {
if (!device_name_table[i].device_name)
49956: 2200 movel %d0,%d1
/* 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++) {
49958: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
4995a: e989 lsll #4,%d1 4995c: 2041 moveal %d1,%a0 4995e: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 49962: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 49966: 2453 moveal %a3@,%a2 49968: 4a8a tstl %a2
4996a: 6716 beqs 49982 <devFS_evaluate_path+0x64>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
4996c: 2f03 movel %d3,%sp@- 4996e: 2f0a movel %a2,%sp@- 49970: 2f06 movel %d6,%sp@- 49972: 4e95 jsr %a5@ 49974: 4fef 000c lea %sp@(12),%sp 49978: 4a80 tstl %d0
4997a: 6606 bnes 49982 <devFS_evaluate_path+0x64>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
4997c: 4a32 3800 tstb %a2@(00000000,%d3:l)
49980: 671e beqs 499a0 <devFS_evaluate_path+0x82> <== ALWAYS TAKEN
/* 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++) {
49982: 2002 movel %d2,%d0 49984: b485 cmpl %d5,%d2
49986: 65ce bcss 49956 <devFS_evaluate_path+0x38>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
49988: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> 4998e: 7202 moveq #2,%d1 49990: 2040 moveal %d0,%a0 49992: 70ff moveq #-1,%d0
}
49994: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
4999a: 2081 movel %d1,%a0@
}
4999c: 4e5e unlk %fp 4999e: 4e75 rts
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
499a0: 2079 0005 b218 moveal 5b218 <rtems_current_user_env>,%a0 499a6: 2968 0028 0010 movel %a0@(40),%a4@(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;
499ac: 223c 0005 b1c0 movel #373184,%d1
pathloc->ops = &devFS_ops;
499b2: 41f9 0005 b178 lea 5b178 <devFS_ops>,%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;
499b8: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
499bc: 2948 000c movel %a0,%a4@(12)
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
499c0: 288b movel %a3,%a4@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
499c2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 499c8: 4e5e unlk %fp 499ca: 4e75 rts
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
rtems_set_errno_and_return_minus_one( EPERM );
499cc: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 499d2: 7601 moveq #1,%d3 <== NOT EXECUTED 499d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 499d6: 70ff moveq #-1,%d0 <== NOT EXECUTED 499d8: 2083 movel %d3,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
499da: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 499e0: 4e5e unlk %fp <== NOT EXECUTED 499e2: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
/* 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 );
499e4: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 499ea: 740e moveq #14,%d2 <== NOT EXECUTED 499ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 499ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 499f0: 2082 movel %d2,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
499f2: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 499f8: 4e5e unlk %fp <== NOT EXECUTED
00042028 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
42028: 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(
4202c: 2039 0005 b098 movel 5b098 <rtems_device_table_size>,%d0 42032: 2200 movel %d0,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
42034: 2f0a movel %a2,%sp@- 42036: 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(
4203a: e989 lsll #4,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
4203c: 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(
4203e: 2041 moveal %d1,%a0 42040: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42044: 4eb9 0004 9684 jsr 49684 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
4204a: 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(
4204c: 2400 movel %d0,%d2
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
4204e: 6744 beqs 42094 <devFS_initialize+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
42050: 2039 0005 b098 movel 5b098 <rtems_device_table_size>,%d0 42056: 2200 movel %d0,%d1 42058: e989 lsll #4,%d1 4205a: 2041 moveal %d1,%a0 4205c: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42060: 42a7 clrl %sp@- 42062: 2f02 movel %d2,%sp@- 42064: 4eb9 0004 cc48 jsr 4cc48 <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;
4206a: 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;
4206e: 203c 0005 b1c0 movel #373184,%d0
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
42074: 41f9 0005 b178 lea 5b178 <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;
4207a: 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;
4207e: 4280 clrl %d0 42080: 2542 001c movel %d2,%a2@(28)
return 0;
}
42084: 242e fff8 movel %fp@(-8),%d2
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;
42088: 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;
return 0;
}
4208c: 246e fffc moveal %fp@(-4),%a2 42090: 4e5e unlk %fp 42092: 4e75 rts
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
42094: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
4209a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
4209e: 2040 moveal %d0,%a0 <== NOT EXECUTED 420a0: 720c moveq #12,%d1 <== NOT EXECUTED 420a2: 70ff moveq #-1,%d0 <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
420a4: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 420a8: 4e5e unlk %fp <== NOT EXECUTED
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
rtems_set_errno_and_return_minus_one( ENOMEM );
420aa: 2081 movel %d1,%a0@ <== NOT EXECUTED
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
}
...
00042224 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
42224: 4e56 fff0 linkw %fp,#-16 42228: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
4222c: 486e fff0 pea %fp@(-16)
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
42230: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.command = command;
42234: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
status = rtems_io_control(
4223a: 2f29 000c movel %a1@(12),%sp@- 4223e: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.command = command;
args.buffer = buffer;
42242: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
42248: 2d48 fff0 movel %a0,%fp@(-16)
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
4224c: 4eb9 0004 680c jsr 4680c <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
42252: 4fef 000c lea %sp@(12),%sp 42256: 4a80 tstl %d0
42258: 6608 bnes 42262 <devFS_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4225a: 202e fffc movel %fp@(-4),%d0
}
4225e: 4e5e unlk %fp 42260: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
42262: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42264: 4eb9 0004 99fc jsr 499fc <rtems_deviceio_errno> <== NOT EXECUTED 4226a: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
4226c: 4e5e unlk %fp <== NOT EXECUTED
000420b0 <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') &&
420b0: 7264 moveq #100,%d1
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420b2: 4e56 ffdc linkw %fp,#-36 420b6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 420ba: 266e 0008 moveal %fp@(8),%a3
* 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') &&
420be: 1013 moveb %a3@,%d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420c0: 2a2e 000c movel %fp@(12),%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') &&
420c4: 49c0 extbl %d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
420c6: 2e2e 0010 movel %fp@(16),%d7 420ca: 2c2e 0014 movel %fp@(20),%d6
* 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') &&
420ce: b280 cmpl %d0,%d1 420d0: 6700 00d0 beqw 421a2 <devFS_mknod+0xf2>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
420d4: 2005 movel %d5,%d0 420d6: 0280 0000 f000 andil #61440,%d0 420dc: 0c80 0000 6000 cmpil #24576,%d0
420e2: 670a beqs 420ee <devFS_mknod+0x3e> <== NEVER TAKEN
420e4: 0c80 0000 2000 cmpil #8192,%d0 420ea: 6600 00e2 bnew 421ce <devFS_mknod+0x11e>
rtems_set_errno_and_return_minus_one( EINVAL );
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;
420ee: 206e 0018 moveal %fp@(24),%a0 420f2: 2450 moveal %a0@,%a2
if (!device_name_table)
420f4: 4a8a tstl %a2 420f6: 6700 0106 beqw 421fe <devFS_mknod+0x14e>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
420fa: 2639 0005 b098 movel 5b098 <rtems_device_table_size>,%d3 42100: 6700 00e4 beqw 421e6 <devFS_mknod+0x136>
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 );
42104: 4280 clrl %d0 42106: 78ff moveq #-1,%d4 42108: 4282 clrl %d2
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)
4210a: 49f9 0004 d224 lea 4d224 <strcmp>,%a4
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++){
if (device_name_table[i].device_name == NULL)
42110: 2200 movel %d0,%d1 42112: e989 lsll #4,%d1 42114: 2241 moveal %d1,%a1 42116: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4211a: 2030 a800 movel %a0@(00000000,%a2:l),%d0
4211e: 675e beqs 4217e <devFS_mknod+0xce>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
42120: 2f00 movel %d0,%sp@- 42122: 2f0b movel %a3,%sp@- 42124: 4e94 jsr %a4@ 42126: 508f addql #8,%sp 42128: 4a80 tstl %d0
4212a: 675e beqs 4218a <devFS_mknod+0xda> <== NEVER TAKEN
/* 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++){
4212c: 5282 addql #1,%d2 4212e: 2002 movel %d2,%d0 42130: b682 cmpl %d2,%d3
42132: 62dc bhis 42110 <devFS_mknod+0x60>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
42134: 70ff moveq #-1,%d0 42136: b084 cmpl %d4,%d0 42138: 6700 00ac beqw 421e6 <devFS_mknod+0x136>
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
4213c: 203c 0000 0700 movel #1792,%d0 42142: 40c2 movew %sr,%d2 42144: 8082 orl %d2,%d0 42146: 46c0 movew %d0,%sr
device_name_table[slot].device_name = (char *)path;
42148: 2004 movel %d4,%d0 4214a: e988 lsll #4,%d0 4214c: 2240 moveal %d0,%a1 4214e: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 42152: d5c8 addal %a0,%a2 42154: 248b movel %a3,%a2@
device_name_table[slot].device_name_length = strlen(path);
42156: 2f0b movel %a3,%sp@- 42158: 4eb9 0004 d6e8 jsr 4d6e8 <strlen> 4215e: 588f addql #4,%sp
device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
42160: 2545 0010 movel %d5,%a2@(16)
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
device_name_table[slot].device_name_length = strlen(path);
42164: 2540 0004 movel %d0,%a2@(4)
device_name_table[slot].major = major;
42168: 2547 0008 movel %d7,%a2@(8)
device_name_table[slot].minor = minor;
4216c: 2546 000c movel %d6,%a2@(12)
device_name_table[slot].mode = mode; _ISR_Enable(level);
42170: 46c2 movew %d2,%sr 42172: 4280 clrl %d0
return 0;
}
42174: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4217a: 4e5e unlk %fp 4217c: 4e75 rts
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)
rtems_set_errno_and_return_minus_one( EEXIST );
4217e: 2802 movel %d2,%d4
/* 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++){
42180: 5282 addql #1,%d2 42182: 2002 movel %d2,%d0 42184: b682 cmpl %d2,%d3
42186: 6288 bhis 42110 <devFS_mknod+0x60>
42188: 60aa bras 42134 <devFS_mknod+0x84>
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
4218a: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 42190: 7411 moveq #17,%d2 <== NOT EXECUTED 42192: 2040 moveal %d0,%a0 <== NOT EXECUTED 42194: 70ff moveq #-1,%d0 <== NOT EXECUTED 42196: 2082 movel %d2,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
42198: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4219e: 4e5e unlk %fp <== NOT EXECUTED 421a0: 4e75 rts <== NOT EXECUTED
* 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') &&
421a2: 123c 0065 moveb #101,%d1 421a6: 102b 0001 moveb %a3@(1),%d0 421aa: 49c0 extbl %d0 421ac: b280 cmpl %d0,%d1 421ae: 6600 ff24 bnew 420d4 <devFS_mknod+0x24>
(path[2] == 'v') && (path[3] == '\0'))
421b2: 123c 0076 moveb #118,%d1 421b6: 102b 0002 moveb %a3@(2),%d0 421ba: 49c0 extbl %d0 421bc: b280 cmpl %d0,%d1 421be: 6600 ff14 bnew 420d4 <devFS_mknod+0x24> 421c2: 4a2b 0003 tstb %a3@(3) 421c6: 6600 ff0c bnew 420d4 <devFS_mknod+0x24>
device_name_table[slot].device_name = (char *)path; device_name_table[slot].device_name_length = strlen(path); device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level);
421ca: 4280 clrl %d0 421cc: 60a6 bras 42174 <devFS_mknod+0xc4>
(path[2] == 'v') && (path[3] == '\0'))
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
rtems_set_errno_and_return_minus_one( EINVAL );
421ce: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 421d4: 7816 moveq #22,%d4 <== NOT EXECUTED 421d6: 2040 moveal %d0,%a0 <== NOT EXECUTED 421d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 421da: 2084 movel %d4,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421dc: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 421e2: 4e5e unlk %fp <== NOT EXECUTED 421e4: 4e75 rts <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
421e6: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 421ec: 720c moveq #12,%d1 <== NOT EXECUTED 421ee: 2040 moveal %d0,%a0 <== NOT EXECUTED 421f0: 70ff moveq #-1,%d0 <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421f2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
421f8: 2081 movel %d1,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
421fa: 4e5e unlk %fp <== NOT EXECUTED 421fc: 4e75 rts <== NOT EXECUTED
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 );
421fe: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 42204: 760e moveq #14,%d3 <== NOT EXECUTED 42206: 2040 moveal %d0,%a0 <== NOT EXECUTED 42208: 70ff moveq #-1,%d0 <== NOT EXECUTED 4220a: 2083 movel %d3,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
4220c: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 42212: 4e5e unlk %fp <== NOT EXECUTED
...
00042270 <devFS_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
42270: 4e56 fff4 linkw %fp,#-12 42274: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
42278: 486e fff4 pea %fp@(-12)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.flags = iop->flags;
4227c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
42282: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
42286: 2d6e 0014 fffc movel %fp@(20),%fp@(-4)
status = rtems_io_open(
4228c: 2f29 000c movel %a1@(12),%sp@- 42290: 2f29 0008 movel %a1@(8),%sp@-
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
42294: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
42298: 4eb9 0004 6958 jsr 46958 <rtems_io_open>
np->major,
np->minor,
(void *) &args
);
if ( status )
4229e: 4fef 000c lea %sp@(12),%sp 422a2: 4a80 tstl %d0
422a4: 6604 bnes 422aa <devFS_open+0x3a> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
422a6: 4e5e unlk %fp 422a8: 4e75 rts
np->major,
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
422aa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422ac: 4eb9 0004 99fc jsr 499fc <rtems_deviceio_errno> <== NOT EXECUTED 422b2: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
422b4: 4e5e unlk %fp <== NOT EXECUTED
000422b8 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
422b8: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 422bc: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
422c0: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
422c4: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
422ca: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
422ce: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
422d4: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
422d8: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED 422dc: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
422e0: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
422e6: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 422ea: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
422ee: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
422f2: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 422f6: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
422fa: 4eb9 0004 69b4 jsr 469b4 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
42300: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42304: 4a80 tstl %d0 <== NOT EXECUTED 42306: 6608 bnes 42310 <devFS_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
42308: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4230c: 4e5e unlk %fp <== NOT EXECUTED 4230e: 4e75 rts <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
42310: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42312: 4eb9 0004 99fc jsr 499fc <rtems_deviceio_errno> <== NOT EXECUTED 42318: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4231a: 4e5e unlk %fp <== NOT EXECUTED
...
00042320 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42320: 4e56 0000 linkw %fp,#0 42324: 206e 0008 moveal %fp@(8),%a0 42328: 226e 000c moveal %fp@(12),%a1
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
4232c: 2050 moveal %a0@,%a0
if (!the_dev)
4232e: 4a88 tstl %a0
42330: 671a beqs 4234c <devFS_stat+0x2c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
42332: 2228 000c movel %a0@(12),%d1
buf->st_mode = the_dev->mode;
42336: 4280 clrl %d0
return 0;
}
42338: 4e5e unlk %fp
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 );
4233a: 2368 0008 0016 movel %a0@(8),%a1@(22)
buf->st_mode = the_dev->mode;
42340: 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 );
42346: 2341 001a movel %d1,%a1@(26)
buf->st_mode = the_dev->mode;
return 0;
}
4234a: 4e75 rts
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
4234c: 4eb9 0004 c3f8 jsr 4c3f8 <__errno> <== NOT EXECUTED 42352: 720e moveq #14,%d1 <== NOT EXECUTED 42354: 2040 moveal %d0,%a0 <== NOT EXECUTED 42356: 70ff moveq #-1,%d0 <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
return 0;
}
42358: 4e5e unlk %fp <== NOT EXECUTED
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
if (!the_dev)
rtems_set_errno_and_return_minus_one( EFAULT );
4235a: 2081 movel %d1,%a0@ <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
return 0;
}
...
00042360 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42360: 4e56 ffe4 linkw %fp,#-28 42364: 206e 0008 moveal %fp@(8),%a0
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
42368: 486e ffe4 pea %fp@(-28)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4236c: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
42372: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
42376: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
args.flags = iop->flags; args.bytes_moved = 0;
4237c: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
42380: 2f29 000c movel %a1@(12),%sp@- 42384: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
42388: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
args.offset = iop->offset;
4238e: 2028 000c movel %a0@(12),%d0 42392: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->file_info;
args.iop = iop;
42396: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
4239a: 2d40 ffe8 movel %d0,%fp@(-24) 4239e: 2d41 ffec movel %d1,%fp@(-20)
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
423a2: 4eb9 0004 6a10 jsr 46a10 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
423a8: 4fef 000c lea %sp@(12),%sp 423ac: 4a80 tstl %d0
423ae: 6608 bnes 423b8 <devFS_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
423b0: 202e fffc movel %fp@(-4),%d0
}
423b4: 4e5e unlk %fp 423b6: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
423b8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423ba: 4eb9 0004 99fc jsr 499fc <rtems_deviceio_errno> <== NOT EXECUTED 423c0: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
423c2: 4e5e unlk %fp <== NOT EXECUTED
...
0004efde <device_close>:
*/
int device_close(
rtems_libio_t *iop
)
{
4efde: 4e56 fff4 linkw %fp,#-12 4efe2: 226e 0008 moveal %fp@(8),%a1
args.iop = iop;
args.flags = 0;
args.mode = 0;
status = rtems_io_close(
4efe6: 486e fff4 pea %fp@(-12)
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4efea: 2069 0038 moveal %a1@(56),%a0
args.iop = iop;
4efee: 2d49 fff4 movel %a1,%fp@(-12)
args.flags = 0;
4eff2: 42ae fff8 clrl %fp@(-8)
args.mode = 0;
4eff6: 42ae fffc clrl %fp@(-4)
status = rtems_io_close(
4effa: 2f28 0050 movel %a0@(80),%sp@- 4effe: 2f28 004c movel %a0@(76),%sp@- 4f002: 4eb9 0005 012c jsr 5012c <rtems_io_close>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
4f008: 4fef 000c lea %sp@(12),%sp 4f00c: 4a80 tstl %d0
4f00e: 6604 bnes 4f014 <device_close+0x36> <== NEVER TAKEN
return rtems_deviceio_errno(status);
}
return 0;
}
4f010: 4e5e unlk %fp 4f012: 4e75 rts
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status ) {
return rtems_deviceio_errno(status);
4f014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f016: 4eb9 0005 04b8 jsr 504b8 <rtems_deviceio_errno> <== NOT EXECUTED 4f01c: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
4f01e: 4e5e unlk %fp <== NOT EXECUTED
0004eec6 <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
4eec6: 4e56 fff0 linkw %fp,#-16 4eeca: 226e 0008 moveal %fp@(8),%a1
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
4eece: 486e fff0 pea %fp@(-16)
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
4eed2: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
4eed8: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
the_jnode = iop->file_info;
4eede: 2069 0038 moveal %a1@(56),%a0
{
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
4eee2: 2d49 fff0 movel %a1,%fp@(-16)
args.command = command;
args.buffer = buffer;
the_jnode = iop->file_info;
status = rtems_io_control(
4eee6: 2f28 0050 movel %a0@(80),%sp@- 4eeea: 2f28 004c movel %a0@(76),%sp@- 4eeee: 4eb9 0005 0188 jsr 50188 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4eef4: 4fef 000c lea %sp@(12),%sp 4eef8: 4a80 tstl %d0
4eefa: 6608 bnes 4ef04 <device_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4eefc: 202e fffc movel %fp@(-4),%d0
}
4ef00: 4e5e unlk %fp 4ef02: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4ef04: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4ef06: 4eb9 0005 04b8 jsr 504b8 <rtems_deviceio_errno> <== NOT EXECUTED 4ef0c: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
4ef0e: 4e5e unlk %fp <== NOT EXECUTED
0004f022 <device_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4f022: 4e56 fff4 linkw %fp,#-12 4f026: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
4f02a: 486e fff4 pea %fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.flags = iop->flags;
4f02e: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
{
rtems_libio_open_close_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4f034: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
4f038: 2d6e 0014 fffc movel %fp@(20),%fp@(-4)
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
4f03e: 2d48 fff4 movel %a0,%fp@(-12)
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open(
4f042: 2f29 0050 movel %a1@(80),%sp@- 4f046: 2f29 004c movel %a1@(76),%sp@- 4f04a: 4eb9 0005 01e4 jsr 501e4 <rtems_io_open>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4f050: 4fef 000c lea %sp@(12),%sp 4f054: 4a80 tstl %d0
4f056: 6604 bnes 4f05c <device_open+0x3a> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return 0;
}
4f058: 4e5e unlk %fp 4f05a: 4e75 rts
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4f05c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4f05e: 4eb9 0005 04b8 jsr 504b8 <rtems_deviceio_errno> <== NOT EXECUTED 4f064: 588f addql #4,%sp <== NOT EXECUTED
return 0;
}
4f066: 4e5e unlk %fp <== NOT EXECUTED
...
0004ef78 <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4ef78: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4ef7c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4ef80: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
4ef84: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
4ef8a: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
4ef90: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4ef96: 2268 0038 moveal %a0@(56),%a1 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
4ef9a: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4ef9e: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
4efa2: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset;
4efa6: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4efaa: 2d41 ffec movel %d1,%fp@(-20) <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4efae: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
status = rtems_io_read(
4efb2: 2f29 0050 movel %a1@(80),%sp@- <== NOT EXECUTED 4efb6: 2f29 004c movel %a1@(76),%sp@- <== NOT EXECUTED 4efba: 4eb9 0005 0240 jsr 50240 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4efc0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4efc4: 4a80 tstl %d0 <== NOT EXECUTED 4efc6: 6608 bnes 4efd0 <device_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4efc8: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4efcc: 4e5e unlk %fp <== NOT EXECUTED 4efce: 4e75 rts <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4efd0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4efd2: 4eb9 0005 04b8 jsr 504b8 <rtems_deviceio_errno> <== NOT EXECUTED 4efd8: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4efda: 4e5e unlk %fp <== NOT EXECUTED
0004ef12 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4ef12: 4e56 ffe4 linkw %fp,#-28 4ef16: 206e 0008 moveal %fp@(8),%a0
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
4ef1a: 486e ffe4 pea %fp@(-28)
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4ef1e: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
4ef24: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
4ef2a: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4ef30: 2268 0038 moveal %a0@(56),%a1
args.iop = iop;
args.offset = iop->offset;
4ef34: 2028 000c movel %a0@(12),%d0 4ef38: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
4ef3c: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset;
4ef40: 2d40 ffe8 movel %d0,%fp@(-24) 4ef44: 2d41 ffec movel %d1,%fp@(-20)
args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4ef48: 42ae fffc clrl %fp@(-4)
status = rtems_io_write(
4ef4c: 2f29 0050 movel %a1@(80),%sp@- 4ef50: 2f29 004c movel %a1@(76),%sp@- 4ef54: 4eb9 0005 029c jsr 5029c <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4ef5a: 4fef 000c lea %sp@(12),%sp 4ef5e: 4a80 tstl %d0
4ef60: 6608 bnes 4ef6a <device_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4ef62: 202e fffc movel %fp@(-4),%d0
}
4ef66: 4e5e unlk %fp 4ef68: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4ef6a: 2f00 movel %d0,%sp@-
4ef6c: 4eb9 0005 04b8 jsr 504b8 <rtems_deviceio_errno> <== NOT EXECUTED 4ef72: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4ef74: 4e5e unlk %fp <== NOT EXECUTED
00044d8e <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
44d8e: 4e56 fff4 linkw %fp,#-12 44d92: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 44d96: 246e 0008 moveal %fp@(8),%a2
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
44d9a: 4aaa 00b4 tstl %a2@(180)
44d9e: 6750 beqs 44df0 <drainOutput+0x62> rtems_interrupt_disable (level);
44da0: 243c 0000 0700 movel #1792,%d2 44da6: 2002 movel %d2,%d0 44da8: 40c1 movew %sr,%d1 44daa: 8081 orl %d1,%d0 44dac: 46c0 movew %d0,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
44dae: 206a 0084 moveal %a2@(132),%a0 44db2: 202a 0080 movel %a2@(128),%d0 44db6: b088 cmpl %a0,%d0
44db8: 6734 beqs 44dee <drainOutput+0x60>
44dba: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3
tty->rawOutBufState = rob_wait;
44dc0: 7002 moveq #2,%d0 44dc2: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44dc6: 46c1 movew %d1,%sr
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
44dc8: 42a7 clrl %sp@- 44dca: 42a7 clrl %sp@- 44dcc: 2f2a 008c movel %a2@(140),%sp@- 44dd0: 4e93 jsr %a3@
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
44dd2: 4fef 000c lea %sp@(12),%sp 44dd6: 4a80 tstl %d0
44dd8: 6620 bnes 44dfa <drainOutput+0x6c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level);
44dda: 2002 movel %d2,%d0 44ddc: 40c1 movew %sr,%d1 44dde: 8081 orl %d1,%d0 44de0: 46c0 movew %d0,%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) {
44de2: 206a 0084 moveal %a2@(132),%a0 44de6: 202a 0080 movel %a2@(128),%d0 44dea: b088 cmpl %a0,%d0
44dec: 66d2 bnes 44dc0 <drainOutput+0x32> RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } rtems_interrupt_enable (level);
44dee: 46c1 movew %d1,%sr
} }
44df0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 44df6: 4e5e unlk %fp 44df8: 4e75 rts
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
44dfa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44dfc: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
00043368 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
43368: 4e56 ffac linkw %fp,#-84 4336c: 48d7 040c moveml %d2-%d3/%a2,%sp@
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
43370: 240e movel %fp,%d2 43372: 0682 ffff ffba addil #-70,%d2 43378: 45f9 0004 3cc0 lea 43cc0 <fstat>,%a2 4337e: 2f02 movel %d2,%sp@-
int dup2(
int fildes,
int fildes2
)
{
43380: 262e 0008 movel %fp@(8),%d3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
43384: 2f03 movel %d3,%sp@- 43386: 4e92 jsr %a2@
if ( status == -1 )
43388: 508f addql #8,%sp 4338a: 72ff moveq #-1,%d1 4338c: b280 cmpl %d0,%d1
4338e: 660c bnes 4339c <dup2+0x34> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
43390: 70ff moveq #-1,%d0
}
43392: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 43398: 4e5e unlk %fp 4339a: 4e75 rts
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
4339c: 2f02 movel %d2,%sp@- 4339e: 2f2e 000c movel %fp@(12),%sp@- 433a2: 4e92 jsr %a2@
if ( status == -1 )
433a4: 508f addql #8,%sp 433a6: 72ff moveq #-1,%d1 433a8: b280 cmpl %d0,%d1
433aa: 67e4 beqs 43390 <dup2+0x28> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
433ac: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 433b0: 42a7 clrl %sp@- <== NOT EXECUTED 433b2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 433b4: 4eb9 0004 3858 jsr 43858 <fcntl> <== NOT EXECUTED 433ba: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
433be: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 433c4: 4e5e unlk %fp <== NOT EXECUTED
000447b0 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
447b0: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED 447b4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447b6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 447ba: 2f02 movel %d2,%sp@- <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
447bc: 242a 003c movel %a2@(60),%d2 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
447c0: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
447c4: 0282 0000 0200 andil #512,%d2 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
447ca: 1001 moveb %d1,%d0 <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
447cc: 4a82 tstl %d2 <== NOT EXECUTED 447ce: 673e beqs 4480e <echo+0x5e> <== NOT EXECUTED 447d0: 1001 moveb %d1,%d0 <== NOT EXECUTED 447d2: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 <== NOT EXECUTED 447d8: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 447de: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 <== NOT EXECUTED 447e2: 49c2 extbl %d2 <== NOT EXECUTED 447e4: 0802 0005 btst #5,%d2 <== NOT EXECUTED 447e8: 670e beqs 447f8 <echo+0x48> <== NOT EXECUTED 447ea: 7409 moveq #9,%d2 <== NOT EXECUTED 447ec: b480 cmpl %d0,%d2 <== NOT EXECUTED 447ee: 6708 beqs 447f8 <echo+0x48> <== NOT EXECUTED 447f0: 143c 000a moveb #10,%d2 <== NOT EXECUTED 447f4: b480 cmpl %d0,%d2 <== NOT EXECUTED 447f6: 662a bnes 44822 <echo+0x72> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
447f8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 447fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 447fc: 4eba fdd2 jsr %pc@(445d0 <oproc>) <== NOT EXECUTED 44800: 508f addql #8,%sp <== NOT EXECUTED
} }
44802: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 44806: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 4480a: 4e5e unlk %fp <== NOT EXECUTED 4480c: 4e75 rts <== NOT EXECUTED 4480e: 1001 moveb %d1,%d0 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
44810: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44812: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44818: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4481a: 4eba fdb4 jsr %pc@(445d0 <oproc>) <== NOT EXECUTED 4481e: 508f addql #8,%sp <== NOT EXECUTED 44820: 60e0 bras 44802 <echo+0x52> <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44822: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44824: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44828: 7040 moveq #64,%d0 <== NOT EXECUTED
rtems_termios_puts (echobuf, 2, tty);
4482a: 486e fffe pea %fp@(-2) <== NOT EXECUTED
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
4482e: b181 eorl %d0,%d1 <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44830: 745e moveq #94,%d2 <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
44832: 1d41 ffff moveb %d1,%fp@(-1) <== NOT EXECUTED
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44836: 1d42 fffe moveb %d2,%fp@(-2) <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
4483a: 4eb9 0004 44a8 jsr 444a8 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
}
else {
oproc (c, tty);
}
}
44840: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
44844: 54aa 0028 addql #2,%a2@(40) <== NOT EXECUTED
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
44848: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->column += 2;
}
else {
oproc (c, tty);
}
}
4484c: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 44850: 4e5e unlk %fp <== NOT EXECUTED
00042ff0 <endgrent>:
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
42ff0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp != NULL)
42ff4: 2039 0006 2136 movel 62136 <group_fp>,%d0 <== NOT EXECUTED 42ffa: 670a beqs 43006 <endgrent+0x16> <== NOT EXECUTED
fclose(group_fp);
42ffc: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ffe: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED 43004: 588f addql #4,%sp <== NOT EXECUTED
}
43006: 4e5e unlk %fp <== NOT EXECUTED
0004300a <endpwent>:
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
4300a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp != NULL)
4300e: 2039 0006 204e movel 6204e <passwd_fp>,%d0 <== NOT EXECUTED 43014: 670a beqs 43020 <endpwent+0x16> <== NOT EXECUTED
fclose(passwd_fp);
43016: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43018: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED 4301e: 588f addql #4,%sp <== NOT EXECUTED
}
43020: 4e5e unlk %fp <== NOT EXECUTED
00044854 <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)
{
44854: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 44858: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ <== NOT EXECUTED 4485c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 44860: 282e 000c movel %fp@(12),%d4 <== NOT EXECUTED
if (tty->ccount == 0)
44864: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44868: 6732 beqs 4489c <erase+0x48> <== NOT EXECUTED
return;
if (lineFlag) {
4486a: 4a84 tstl %d4 <== NOT EXECUTED 4486c: 6738 beqs 448a6 <erase+0x52> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
4486e: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 44872: 44c3 movew %d3,%ccr <== NOT EXECUTED 44874: 6a00 01ae bplw 44a24 <erase+0x1d0> <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
44878: 0803 0004 btst #4,%d3 <== NOT EXECUTED 4487c: 662c bnes 448aa <erase+0x56> <== NOT EXECUTED
tty->ccount = 0; echo (tty->termios.c_cc[VKILL], tty);
4487e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44880: 4280 clrl %d0 <== NOT EXECUTED 44882: 102a 0044 moveb %a2@(68),%d0 <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
44886: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
4488a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4488c: 4eba ff22 jsr %pc@(447b0 <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
44890: 508f addql #8,%sp <== NOT EXECUTED 44892: 7020 moveq #32,%d0 <== NOT EXECUTED 44894: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44898: 6600 0198 bnew 44a32 <erase+0x1de> <== NOT EXECUTED
} } if (!lineFlag) break; } }
4489c: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 448a2: 4e5e unlk %fp <== NOT EXECUTED 448a4: 4e75 rts <== NOT EXECUTED 448a6: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 448aa: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
448b0: 5381 subql #1,%d1 <== NOT EXECUTED 448b2: 226a 001c moveal %a2@(28),%a1 <== NOT EXECUTED 448b6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 448ba: 1031 1800 moveb %a1@(00000000,%d1:l),%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
448be: 44c3 movew %d3,%ccr <== NOT EXECUTED 448c0: 6a36 bpls 448f8 <erase+0xa4> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
448c2: 4a84 tstl %d4 <== NOT EXECUTED 448c4: 6608 bnes 448ce <erase+0x7a> <== NOT EXECUTED 448c6: 0803 0004 btst #4,%d3 <== NOT EXECUTED 448ca: 6700 013e beqw 44a0a <erase+0x1b6> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
448ce: 7409 moveq #9,%d2 <== NOT EXECUTED 448d0: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 448d6: b480 cmpl %d0,%d2 <== NOT EXECUTED 448d8: 6700 008e beqw 44968 <erase+0x114> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
448dc: 2400 movel %d0,%d2 <== NOT EXECUTED 448de: 5282 addql #1,%d2 <== NOT EXECUTED 448e0: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 <== NOT EXECUTED 448e6: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 448ea: 49c0 extbl %d0 <== NOT EXECUTED 448ec: 0800 0005 btst #5,%d0 <== NOT EXECUTED 448f0: 6752 beqs 44944 <erase+0xf0> <== NOT EXECUTED 448f2: 0803 0009 btst #9,%d3 <== NOT EXECUTED 448f6: 6610 bnes 44908 <erase+0xb4> <== NOT EXECUTED
if (tty->column) tty->column--; } } } if (!lineFlag)
448f8: 4a84 tstl %d4 <== NOT EXECUTED 448fa: 67a0 beqs 4489c <erase+0x48> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
448fc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44900: 679a beqs 4489c <erase+0x48> <== NOT EXECUTED 44902: 262a 003c movel %a2@(60),%d3 <== NOT EXECUTED 44906: 60a8 bras 448b0 <erase+0x5c> <== NOT EXECUTED
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
44908: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4490a: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 4490e: 4879 0005 e951 pea 5e951 <rtems_filesystem_default_pathconf+0x3d><== NOT EXECUTED 44914: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
44916: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4491a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4491e: 6706 beqs 44926 <erase+0xd2> <== NOT EXECUTED
tty->column--;
44920: 5380 subql #1,%d0 <== NOT EXECUTED 44922: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
44926: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 <== NOT EXECUTED 4492c: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 44930: 49c0 extbl %d0 <== NOT EXECUTED 44932: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44936: 670c beqs 44944 <erase+0xf0> <== NOT EXECUTED 44938: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 4493c: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 44942: 67b4 beqs 448f8 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
44944: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44946: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 4494a: 4879 0005 e951 pea 5e951 <rtems_filesystem_default_pathconf+0x3d><== NOT EXECUTED 44950: 4eb9 0004 44a8 jsr 444a8 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
44956: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4495a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4495e: 6798 beqs 448f8 <erase+0xa4> <== NOT EXECUTED
tty->column--;
44960: 5380 subql #1,%d0 <== NOT EXECUTED 44962: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED 44966: 6090 bras 448f8 <erase+0xa4> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
echo (tty->termios.c_cc[VERASE], tty);
}
else if (c == '\t') {
int col = tty->read_start_column;
44968: 242a 002c movel %a2@(44),%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
4496c: 4a81 tstl %d1 <== NOT EXECUTED 4496e: 6734 beqs 449a4 <erase+0x150> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
44970: 2879 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a4 <== NOT EXECUTED 44976: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
44978: 0283 0000 0200 andil #512,%d3 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
4497e: 4285 clrl %d5 <== NOT EXECUTED 44980: 1a31 0800 moveb %a1@(00000000,%d0:l),%d5 <== NOT EXECUTED 44984: 5280 addql #1,%d0 <== NOT EXECUTED 44986: 2045 moveal %d5,%a0 <== NOT EXECUTED
if (c == '\t') {
44988: 7a09 moveq #9,%d5 <== NOT EXECUTED 4498a: ba88 cmpl %a0,%d5 <== NOT EXECUTED 4498c: 676c beqs 449fa <erase+0x1a6> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
4498e: 1a34 8801 moveb %a4@(00000001,%a0:l),%d5 <== NOT EXECUTED 44992: 49c5 extbl %d5 <== NOT EXECUTED 44994: 0805 0005 btst #5,%d5 <== NOT EXECUTED 44998: 6758 beqs 449f2 <erase+0x19e> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
4499a: 4a83 tstl %d3 <== NOT EXECUTED 4499c: 6702 beqs 449a0 <erase+0x14c> <== NOT EXECUTED
col += 2;
4499e: 5482 addql #2,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
449a0: b081 cmpl %d1,%d0 <== NOT EXECUTED 449a2: 66da bnes 4497e <erase+0x12a> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
449a4: b4aa 0028 cmpl %a2@(40),%d2 <== NOT EXECUTED 449a8: 6c00 ff4e bgew 448f8 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
449ac: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449ae: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 449b2: 4879 0005 e953 pea 5e953 <rtems_filesystem_default_pathconf+0x3f><== NOT EXECUTED 449b8: 4e93 jsr %a3@ <== NOT EXECUTED
tty->column--;
449ba: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 449be: 5380 subql #1,%d0 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
449c0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
449c4: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
449c8: b082 cmpl %d2,%d0 <== NOT EXECUTED 449ca: 6f00 ff2c blew 448f8 <erase+0xa4> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
449ce: 2f0a movel %a2,%sp@- <== NOT EXECUTED 449d0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 449d4: 4879 0005 e953 pea 5e953 <rtems_filesystem_default_pathconf+0x3f><== NOT EXECUTED 449da: 4e93 jsr %a3@ <== NOT EXECUTED
tty->column--;
449dc: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 449e0: 5380 subql #1,%d0 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
449e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
449e6: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
449ea: b082 cmpl %d2,%d0 <== NOT EXECUTED 449ec: 6ebe bgts 449ac <erase+0x158> <== NOT EXECUTED 449ee: 6000 ff08 braw 448f8 <erase+0xa4> <== NOT EXECUTED
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
}
else {
col++;
449f2: 5282 addql #1,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
449f4: b081 cmpl %d1,%d0 <== NOT EXECUTED 449f6: 6686 bnes 4497e <erase+0x12a> <== NOT EXECUTED 449f8: 60aa bras 449a4 <erase+0x150> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
449fa: 1a3c 0007 moveb #7,%d5 <== NOT EXECUTED 449fe: 8485 orl %d5,%d2 <== NOT EXECUTED 44a00: 5282 addql #1,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44a02: b081 cmpl %d1,%d0 <== NOT EXECUTED 44a04: 6600 ff78 bnew 4497e <erase+0x12a> <== NOT EXECUTED 44a08: 609a bras 449a4 <erase+0x150> <== 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);
44a0a: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 44a0e: 4280 clrl %d0 <== NOT EXECUTED 44a10: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
} } if (!lineFlag) break; } }
44a14: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== 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);
44a1a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44a1e: 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);
44a20: 6000 fd8e braw 447b0 <echo> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
44a24: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44a28: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED 44a2e: 4e5e unlk %fp <== NOT EXECUTED 44a30: 4e75 rts <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44a32: 700a moveq #10,%d0 <== NOT EXECUTED 44a34: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44a38: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44a3e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} } if (!lineFlag) break; } }
44a42: 4e5e unlk %fp <== NOT EXECUTED
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
44a44: 6000 fd6a braw 447b0 <echo> <== NOT EXECUTED
00043858 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
43858: 4e56 fff4 linkw %fp,#-12 4385c: 202e 0008 movel %fp@(8),%d0
#include <sys/types.h>
#include <sys/stat.h> /* sigh. for the mode bits for open/creat */
extern int open _PARAMS ((const char *, int, ...));
extern int creat _PARAMS ((const char *, mode_t));
extern int fcntl _PARAMS ((int, int, ...));
43860: 41ee 0010 lea %fp@(16),%a0 43864: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43868: 242e 000c movel %fp@(12),%d2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
4386c: 2239 0006 1964 movel 61964 <rtems_libio_number_iops>,%d1 43872: b280 cmpl %d0,%d1 43874: 6300 0192 blsw 43a08 <fcntl+0x1b0>
iop = rtems_libio_iop( fd );
43878: 2279 0006 308c moveal 6308c <rtems_libio_iops>,%a1 4387e: ed88 lsll #6,%d0 43880: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
43884: 202a 0014 movel %a2@(20),%d0 43888: 0800 0008 btst #8,%d0 4388c: 6700 017a beqw 43a08 <fcntl+0x1b0>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43890: 7609 moveq #9,%d3 43892: b682 cmpl %d2,%d3
43894: 641a bccs 438b0 <fcntl+0x58>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
43896: 4eb9 0005 18d0 jsr 518d0 <__errno> 4389c: 76ff moveq #-1,%d3 4389e: 2040 moveal %d0,%a0 438a0: 7016 moveq #22,%d0 438a2: 2080 movel %d0,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438a4: 2003 movel %d3,%d0 438a6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 438ac: 4e5e unlk %fp 438ae: 4e75 rts
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
438b0: 363b 2a08 movew %pc@(438ba <fcntl+0x62>,%d2:l:2),%d3 438b4: 48c3 extl %d3 438b6: 4efb 3802 jmp %pc@(438ba <fcntl+0x62>,%d3:l)
438ba: 00b8 00ac 009c oril #11272348,%d0 <== NOT EXECUTED 438c0: 0082 0030 0014 oril #3145748,%d2 <== NOT EXECUTED 438c6: 0014 024 <== NOT EXECUTED 438c8: 0014 024 <== NOT EXECUTED 438ca: 0014 024 <== NOT EXECUTED 438cc: 0014 024 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
438ce: 4eb9 0005 18d0 jsr 518d0 <__errno> 438d4: 76ff moveq #-1,%d3 438d6: 2040 moveal %d0,%a0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438d8: 2003 movel %d3,%d0 438da: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
438e0: 20bc 0000 0086 movel #134,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438e6: 4e5e unlk %fp 438e8: 4e75 rts
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
438ea: 2f10 movel %a0@,%sp@-
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
438ec: 4283 clrl %d3
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
438ee: 4eb9 0004 41d0 jsr 441d0 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
438f4: 222a 0014 movel %a2@(20),%d1 438f8: 588f addql #4,%sp 438fa: 0280 0000 0201 andil #513,%d0 43900: 0281 ffff fdfe andil #-514,%d1 43906: 8081 orl %d1,%d0 43908: 2540 0014 movel %d0,%a2@(20)
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
4390c: 206a 003c moveal %a2@(60),%a0 43910: 2068 0030 moveal %a0@(48),%a0 43914: 4a88 tstl %a0
43916: 678c beqs 438a4 <fcntl+0x4c> <== NEVER TAKEN
int err = (*iop->handlers->fcntl_h)( cmd, iop );
43918: 2f0a movel %a2,%sp@- 4391a: 2f02 movel %d2,%sp@- 4391c: 4e90 jsr %a0@
if (err) {
4391e: 508f addql #8,%sp
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
43920: 2400 movel %d0,%d2
if (err) {
43922: 6780 beqs 438a4 <fcntl+0x4c> <== ALWAYS TAKEN
errno = err;
43924: 4eb9 0005 18d0 jsr 518d0 <__errno> <== NOT EXECUTED 4392a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4392c: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
4392e: 2003 movel %d3,%d0 <== NOT EXECUTED
if (ret >= 0) {
if (iop->handlers->fcntl_h) {
int err = (*iop->handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
43930: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43932: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43938: 4e5e unlk %fp <== NOT EXECUTED 4393a: 4e75 rts <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
4393c: 2f00 movel %d0,%sp@- 4393e: 4eb9 0004 3f40 jsr 43f40 <rtems_libio_to_fcntl_flags> 43944: 588f addql #4,%sp 43946: 2600 movel %d0,%d3
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
43948: 6cc2 bges 4390c <fcntl+0xb4> <== ALWAYS TAKEN
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
4394a: 2003 movel %d3,%d0 <== NOT EXECUTED 4394c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43952: 4e5e unlk %fp <== NOT EXECUTED 43954: 4e75 rts <== NOT EXECUTED
* if a new process is exec()'ed. Since RTEMS does not support
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
43956: 4a90 tstl %a0@
43958: 6766 beqs 439c0 <fcntl+0x168> <== NEVER TAKEN
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
4395a: 4283 clrl %d3 4395c: 08c0 000b bset #11,%d0 43960: 2540 0014 movel %d0,%a2@(20) 43964: 60a6 bras 4390c <fcntl+0xb4>
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
43966: 2600 movel %d0,%d3 43968: 720b moveq #11,%d1 4396a: e2ab lsrl %d1,%d3 4396c: 7001 moveq #1,%d0 4396e: c680 andl %d0,%d3 43970: 609a bras 4390c <fcntl+0xb4>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
43972: 2010 movel %a0@,%d0
if ( fd2 )
43974: 6700 00ac beqw 43a22 <fcntl+0x1ca>
diop = rtems_libio_iop( fd2 );
43978: b081 cmpl %d1,%d0 <== NOT EXECUTED 4397a: 6452 bccs 439ce <fcntl+0x176> <== NOT EXECUTED 4397c: ed88 lsll #6,%d0 <== NOT EXECUTED 4397e: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 43982: 2608 movel %a0,%d3 <== NOT EXECUTED
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43984: 9689 subl %a1,%d3 <== NOT EXECUTED 43986: ec83 asrl #6,%d3 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43988: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 4398e: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43994: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 4399a: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
439a0: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
439a6: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
439ac: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
439b2: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
439b8: 4a83 tstl %d3 439ba: 6c00 ff50 bgew 4390c <fcntl+0xb4>
439be: 608a bras 4394a <fcntl+0xf2> <== NOT EXECUTED
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
439c0: 4283 clrl %d3 <== NOT EXECUTED 439c2: 0880 000b bclr #11,%d0 <== NOT EXECUTED 439c6: 2540 0014 movel %d0,%a2@(20) <== NOT EXECUTED 439ca: 6000 ff40 braw 4390c <fcntl+0xb4> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
439ce: 91c8 subal %a0,%a0 <== NOT EXECUTED 439d0: 4283 clrl %d3 <== NOT EXECUTED
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
439d2: 9689 subl %a1,%d3 <== NOT EXECUTED 439d4: ec83 asrl #6,%d3 <== NOT EXECUTED
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
439d6: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 439dc: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 439e2: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 439e8: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
439ee: 216a 003c 003c movel %a2@(60),%a0@(60) <== NOT EXECUTED
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
439f4: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
439fa: 216a 0038 0038 movel %a2@(56),%a0@(56) <== NOT EXECUTED
diop->flags = iop->flags;
43a00: 216a 0014 0014 movel %a2@(20),%a0@(20) <== NOT EXECUTED 43a06: 60b0 bras 439b8 <fcntl+0x160> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43a08: 4eb9 0005 18d0 jsr 518d0 <__errno> <== NOT EXECUTED 43a0e: 76ff moveq #-1,%d3 <== NOT EXECUTED 43a10: 7209 moveq #9,%d1 <== NOT EXECUTED 43a12: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43a14: 2003 movel %d3,%d0 <== NOT EXECUTED 43a16: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43a1c: 2081 movel %d1,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43a1e: 4e5e unlk %fp <== NOT EXECUTED 43a20: 4e75 rts <== NOT EXECUTED
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
43a22: 4eb9 0004 4118 jsr 44118 <rtems_libio_allocate> 43a28: 2040 moveal %d0,%a0
if ( diop == 0 ) {
43a2a: 4a80 tstl %d0
43a2c: 6740 beqs 43a6e <fcntl+0x216> <== NEVER TAKEN
43a2e: 2279 0006 308c moveal 6308c <rtems_libio_iops>,%a1 43a34: 2600 movel %d0,%d3
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43a36: 9689 subl %a1,%d3 43a38: ec83 asrl #6,%d3
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43a3a: 216a 0018 0018 movel %a2@(24),%a0@(24) 43a40: 216a 001c 001c movel %a2@(28),%a0@(28) 43a46: 216a 0020 0020 movel %a2@(32),%a0@(32) 43a4c: 216a 0024 0024 movel %a2@(36),%a0@(36)
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
43a52: 216a 003c 003c movel %a2@(60),%a0@(60)
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43a58: 216a 0028 0028 movel %a2@(40),%a0@(40)
break;
}
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
43a5e: 216a 0038 0038 movel %a2@(56),%a0@(56)
diop->flags = iop->flags;
43a64: 216a 0014 0014 movel %a2@(20),%a0@(20) 43a6a: 6000 ff4c braw 439b8 <fcntl+0x160>
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
if ( diop == 0 ) {
43a6e: 76ff moveq #-1,%d3 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43a70: 2003 movel %d3,%d0 <== NOT EXECUTED 43a72: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 43a78: 4e5e unlk %fp <== NOT EXECUTED
00043aa0 <fdatasync>:
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
43aa0: 4e56 0000 linkw %fp,#0 43aa4: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43aa8: b0b9 0006 1964 cmpl 61964 <rtems_libio_number_iops>,%d0
43aae: 642c bccs 43adc <fdatasync+0x3c> iop = rtems_libio_iop( fd );
43ab0: 2079 0006 308c moveal 6308c <rtems_libio_iops>,%a0 43ab6: ed88 lsll #6,%d0 43ab8: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43aba: 2028 0014 movel %a0@(20),%d0 43abe: 0800 0008 btst #8,%d0
43ac2: 6718 beqs 43adc <fdatasync+0x3c> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43ac4: 44c0 movew %d0,%ccr
43ac6: 6626 bnes 43aee <fdatasync+0x4e>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
43ac8: 2268 003c moveal %a0@(60),%a1 43acc: 2269 002c moveal %a1@(44),%a1 43ad0: 4a89 tstl %a1
43ad2: 672c beqs 43b00 <fdatasync+0x60>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
43ad4: 2d48 0008 movel %a0,%fp@(8)
}
43ad8: 4e5e unlk %fp
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
43ada: 4ed1 jmp %a1@
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43adc: 4eb9 0005 18d0 jsr 518d0 <__errno> 43ae2: 7209 moveq #9,%d1 43ae4: 2040 moveal %d0,%a0
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43ae6: 70ff moveq #-1,%d0 43ae8: 4e5e unlk %fp
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43aea: 2081 movel %d1,%a0@
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43aec: 4e75 rts
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43aee: 4eb9 0005 18d0 jsr 518d0 <__errno>
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43af4: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43af6: 2040 moveal %d0,%a0 43af8: 7016 moveq #22,%d0 43afa: 2080 movel %d0,%a0@
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fdatasync_h)( iop );
}
43afc: 70ff moveq #-1,%d0 43afe: 4e75 rts
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43b00: 4eb9 0005 18d0 jsr 518d0 <__errno>
return (*iop->handlers->fdatasync_h)( iop );
}
43b06: 4e5e unlk %fp
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43b08: 2040 moveal %d0,%a0
return (*iop->handlers->fdatasync_h)( iop );
}
43b0a: 70ff moveq #-1,%d0
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43b0c: 20bc 0000 0086 movel #134,%a0@
return (*iop->handlers->fdatasync_h)( iop );
}
0004a56c <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4a56c: 4e56 ffdc linkw %fp,#-36 4a570: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4a574: 42a7 clrl %sp@-
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4a576: 286e 0008 moveal %fp@(8),%a4
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4a57a: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3 4a580: 42a7 clrl %sp@- 4a582: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@-
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4a588: 262e 000c movel %fp@(12),%d3
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
4a58c: 4e93 jsr %a3@ 4a58e: 4fef 000c lea %sp@(12),%sp 4a592: 4a80 tstl %d0
4a594: 6710 beqs 4a5a6 <fifo_open+0x3a> <== NEVER TAKEN
4a596: 347c fffc moveaw #-4,%a2
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4a59a: 200a movel %a2,%d0 4a59c: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 4a5a2: 4e5e unlk %fp 4a5a4: 4e75 rts
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
4a5a6: 2a54 moveal %a4@,%a5 <== NOT EXECUTED
if (pipe == NULL) {
4a5a8: 4a8d tstl %a5 <== NOT EXECUTED 4a5aa: 6700 00e8 beqw 4a694 <fifo_open+0x128> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4a5ae: 42a7 clrl %sp@- <== NOT EXECUTED 4a5b0: 42a7 clrl %sp@- <== NOT EXECUTED 4a5b2: 2f2d 0028 movel %a5@(40),%sp@- <== NOT EXECUTED 4a5b6: 4e93 jsr %a3@ <== NOT EXECUTED 4a5b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a5bc: 4a80 tstl %d0 <== NOT EXECUTED 4a5be: 675c beqs 4a61c <fifo_open+0xb0> <== NOT EXECUTED 4a5c0: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
4a5c4: 4a94 tstl %a4@ <== NOT EXECUTED 4a5c6: 6700 02d6 beqw 4a89e <fifo_open+0x332> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a5ca: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a5d0: 243c 0004 6840 movel #288832,%d2 <== NOT EXECUTED 4a5d6: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a5d8: 4e90 jsr %a0@ <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4a5da: 588f addql #4,%sp <== NOT EXECUTED 4a5dc: 4a8a tstl %a2 <== NOT EXECUTED 4a5de: 66ba bnes 4a59a <fifo_open+0x2e> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4a5e0: 7006 moveq #6,%d0 <== NOT EXECUTED 4a5e2: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a5e4: 7204 moveq #4,%d1 <== NOT EXECUTED 4a5e6: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4a5ea: 2454 moveal %a4@,%a2 <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
4a5ec: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a5ee: 6700 0238 beqw 4a828 <fifo_open+0x2bc> <== NOT EXECUTED 4a5f2: 123c 0006 moveb #6,%d1 <== NOT EXECUTED 4a5f6: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a5f8: 6700 01e2 beqw 4a7dc <fifo_open+0x270> <== NOT EXECUTED 4a5fc: 123c 0002 moveb #2,%d1 <== NOT EXECUTED 4a600: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a602: 671c beqs 4a620 <fifo_open+0xb4> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4a604: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a608: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a60a: 95ca subal %a2,%a2 <== NOT EXECUTED 4a60c: 4e90 jsr %a0@ <== NOT EXECUTED
return 0;
4a60e: 588f addql #4,%sp <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
return err;
}
4a610: 200a movel %a2,%d0 <== NOT EXECUTED 4a612: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a618: 4e5e unlk %fp <== NOT EXECUTED 4a61a: 4e75 rts <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4a61c: 95ca subal %a2,%a2 <== NOT EXECUTED 4a61e: 60a4 bras 4a5c4 <fifo_open+0x58> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4a620: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4a624: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a626: 5288 addql #1,%a0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4a628: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4a62c: 2548 0010 movel %a0,%a2@(16) <== NOT EXECUTED 4a630: 4a80 tstl %d0 <== NOT EXECUTED 4a632: 6700 02ae beqw 4a8e2 <fifo_open+0x376> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
4a636: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a63a: 66c8 bnes 4a604 <fifo_open+0x98> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
4a63c: 7001 moveq #1,%d0 <== NOT EXECUTED 4a63e: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a640: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a644: 66be bnes 4a604 <fifo_open+0x98> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
4a646: 282a 0024 movel %a2@(36),%d4 <== NOT EXECUTED 4a64a: 4bf9 0004 ce58 lea 4ce58 <rtems_barrier_wait>,%a5 <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4a650: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a654: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a656: 4e90 jsr %a0@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4a658: 42a7 clrl %sp@- <== NOT EXECUTED 4a65a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a65e: 4e95 jsr %a5@ <== NOT EXECUTED 4a660: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a664: 4a80 tstl %d0 <== NOT EXECUTED 4a666: 6600 02d6 bnew 4a93e <fifo_open+0x3d2> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
4a66a: 42a7 clrl %sp@- <== NOT EXECUTED 4a66c: 42a7 clrl %sp@- <== NOT EXECUTED 4a66e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a672: 4e93 jsr %a3@ <== NOT EXECUTED 4a674: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a678: 4a80 tstl %d0 <== NOT EXECUTED 4a67a: 6600 02c2 bnew 4a93e <fifo_open+0x3d2> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
4a67e: b8aa 0024 cmpl %a2@(36),%d4 <== NOT EXECUTED 4a682: 67cc beqs 4a650 <fifo_open+0xe4> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4a684: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a688: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a68a: 95ca subal %a2,%a2 <== NOT EXECUTED 4a68c: 4e90 jsr %a0@ <== NOT EXECUTED
return 0;
4a68e: 588f addql #4,%sp <== NOT EXECUTED 4a690: 6000 ff7e braw 4a610 <fifo_open+0xa4> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4a694: 4878 0034 pea 34 <OPER2+0x20> <== NOT EXECUTED 4a698: 45f9 0004 3108 lea 43108 <malloc>,%a2 <== NOT EXECUTED 4a69e: 4e92 jsr %a2@ <== NOT EXECUTED
if (pipe == NULL)
4a6a0: 588f addql #4,%sp <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4a6a2: 2a40 moveal %d0,%a5 <== NOT EXECUTED 4a6a4: 2400 movel %d0,%d2 <== NOT EXECUTED
if (pipe == NULL)
4a6a6: 6700 0302 beqw 4a9aa <fifo_open+0x43e> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4a6aa: 2040 moveal %d0,%a0 <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4a6ac: 203c 0000 0200 movel #512,%d0 <== NOT EXECUTED 4a6b2: 283c 0004 2ddc movel #273884,%d4 <== NOT EXECUTED
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4a6b8: 4298 clrl %a0@+ <== NOT EXECUTED 4a6ba: 5888 addql #4,%a0 <== NOT EXECUTED 4a6bc: 4298 clrl %a0@+ <== NOT EXECUTED 4a6be: 4298 clrl %a0@+ <== NOT EXECUTED 4a6c0: 4298 clrl %a0@+ <== NOT EXECUTED 4a6c2: 4298 clrl %a0@+ <== NOT EXECUTED 4a6c4: 4298 clrl %a0@+ <== NOT EXECUTED 4a6c6: 4298 clrl %a0@+ <== NOT EXECUTED 4a6c8: 4298 clrl %a0@+ <== NOT EXECUTED 4a6ca: 4298 clrl %a0@+ <== NOT EXECUTED 4a6cc: 4298 clrl %a0@+ <== NOT EXECUTED 4a6ce: 4298 clrl %a0@+ <== NOT EXECUTED 4a6d0: 4290 clrl %a0@ <== NOT EXECUTED
pipe->Size = PIPE_BUF;
4a6d2: 2b40 0004 movel %d0,%a5@(4) <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
4a6d6: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> <== NOT EXECUTED 4a6da: 4e92 jsr %a2@ <== NOT EXECUTED
if (! pipe->Buffer)
4a6dc: 588f addql #4,%sp <== NOT EXECUTED
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4a6de: 2a80 movel %d0,%a5@ <== NOT EXECUTED
if (! pipe->Buffer)
4a6e0: 6700 02c0 beqw 4a9a2 <fifo_open+0x436> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4a6e4: 486d 002c pea %a5@(44) <== NOT EXECUTED 4a6e8: 45f9 0004 cc44 lea 4cc44 <rtems_barrier_create>,%a2 <== NOT EXECUTED 4a6ee: 1039 0005 fcc4 moveb 5fcc4 <c.6783>,%d0 <== NOT EXECUTED 4a6f4: 42a7 clrl %sp@- <== NOT EXECUTED 4a6f6: 49c0 extbl %d0 <== NOT EXECUTED 4a6f8: 42a7 clrl %sp@- <== NOT EXECUTED 4a6fa: 0080 5049 7200 oril #1346990592,%d0 <== NOT EXECUTED 4a700: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a702: 4e92 jsr %a2@ <== NOT EXECUTED 4a704: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a708: 4a80 tstl %d0 <== NOT EXECUTED 4a70a: 6600 0286 bnew 4a992 <fifo_open+0x426> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4a70e: 486d 0030 pea %a5@(48) <== NOT EXECUTED 4a712: 283c 0004 cd40 movel #314688,%d4 <== NOT EXECUTED 4a718: 1039 0005 fcc4 moveb 5fcc4 <c.6783>,%d0 <== NOT EXECUTED 4a71e: 42a7 clrl %sp@- <== NOT EXECUTED 4a720: 49c0 extbl %d0 <== NOT EXECUTED 4a722: 42a7 clrl %sp@- <== NOT EXECUTED 4a724: 0080 5049 7700 oril #1346991872,%d0 <== NOT EXECUTED 4a72a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a72c: 4e92 jsr %a2@ <== NOT EXECUTED 4a72e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4a732: 4a80 tstl %d0 <== NOT EXECUTED 4a734: 6600 0250 bnew 4a986 <fifo_open+0x41a> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4a738: 486d 0028 pea %a5@(40) <== NOT EXECUTED 4a73c: 1039 0005 fcc4 moveb 5fcc4 <c.6783>,%d0 <== NOT EXECUTED 4a742: 42a7 clrl %sp@- <== NOT EXECUTED 4a744: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4a748: 49c0 extbl %d0 <== NOT EXECUTED 4a74a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4a74e: 0080 5049 7300 oril #1346990848,%d0 <== NOT EXECUTED 4a754: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a756: 4eb9 0004 6464 jsr 46464 <rtems_semaphore_create> <== NOT EXECUTED 4a75c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4a760: 4a80 tstl %d0 <== NOT EXECUTED 4a762: 6600 0212 bnew 4a976 <fifo_open+0x40a> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
4a766: 280e movel %fp,%d4 <== NOT EXECUTED 4a768: 5184 subql #8,%d4 <== NOT EXECUTED 4a76a: 243c 0004 8004 movel #294916,%d2 <== NOT EXECUTED 4a770: 2042 moveal %d2,%a0 <== NOT EXECUTED
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4a772: 45f9 0004 890c lea 4890c <_Thread_Enable_dispatch>,%a2 <== NOT EXECUTED 4a778: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4a77a: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4a77e: 4879 0006 1c6e pea 61c6e <_Barrier_Information> <== NOT EXECUTED 4a784: 4e90 jsr %a0@ <== NOT EXECUTED
/* Set barriers to be interruptible by signals. */
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
4a786: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4a78c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a78e: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4a792: 4e92 jsr %a2@ <== NOT EXECUTED 4a794: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a796: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4a798: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4a79c: 4879 0006 1c6e pea 61c6e <_Barrier_Information> <== NOT EXECUTED 4a7a2: 4e90 jsr %a0@ <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
4a7a4: 223c 1000 0000 movel #268435456,%d1 <== NOT EXECUTED 4a7aa: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7ac: 83a8 004c orl %d1,%a0@(76) <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4a7b0: 4e92 jsr %a2@ <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4a7b2: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4a7b6: 1039 0005 fcc4 moveb 5fcc4 <c.6783>,%d0 <== NOT EXECUTED 4a7bc: 49c0 extbl %d0 <== NOT EXECUTED 4a7be: 2200 movel %d0,%d1 <== NOT EXECUTED 4a7c0: 5281 addql #1,%d1 <== NOT EXECUTED 4a7c2: 13c1 0005 fcc4 moveb %d1,5fcc4 <c.6783> <== NOT EXECUTED 4a7c8: 727a moveq #122,%d1 <== NOT EXECUTED 4a7ca: b280 cmpl %d0,%d1 <== NOT EXECUTED 4a7cc: 6600 fde0 bnew 4a5ae <fifo_open+0x42> <== NOT EXECUTED
c = 'a';
4a7d0: 7061 moveq #97,%d0 <== NOT EXECUTED 4a7d2: 13c0 0005 fcc4 moveb %d0,5fcc4 <c.6783> <== NOT EXECUTED 4a7d8: 6000 fdd4 braw 4a5ae <fifo_open+0x42> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4a7dc: 202a 0010 movel %a2@(16),%d0 <== NOT EXECUTED 4a7e0: 2200 movel %d0,%d1 <== NOT EXECUTED 4a7e2: 5281 addql #1,%d1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4a7e4: 52aa 0020 addql #1,%a2@(32) <== NOT EXECUTED
if (pipe->Readers ++ == 0)
4a7e8: 2541 0010 movel %d1,%a2@(16) <== NOT EXECUTED 4a7ec: 4a80 tstl %d0 <== NOT EXECUTED 4a7ee: 6700 00de beqw 4a8ce <fifo_open+0x362> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4a7f2: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4a7f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a7f8: 5288 addql #1,%a0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4a7fa: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4a7fe: 2548 0014 movel %a0,%a2@(20) <== NOT EXECUTED 4a802: 4a80 tstl %d0 <== NOT EXECUTED 4a804: 6600 fdfe bnew 4a604 <fifo_open+0x98> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4a808: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a80c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a810: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a816: 508f addql #8,%sp <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
4a818: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a81a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a81e: 95ca subal %a2,%a2 <== NOT EXECUTED 4a820: 4e90 jsr %a0@ <== NOT EXECUTED
return 0;
4a822: 588f addql #4,%sp <== NOT EXECUTED 4a824: 6000 fdea braw 4a610 <fifo_open+0xa4> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4a828: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4a82c: 2200 movel %d0,%d1 <== NOT EXECUTED 4a82e: 5281 addql #1,%d1 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4a830: 52aa 0024 addql #1,%a2@(36) <== NOT EXECUTED
if (pipe->Writers ++ == 0)
4a834: 2541 0014 movel %d1,%a2@(20) <== NOT EXECUTED 4a838: 4a80 tstl %d0 <== NOT EXECUTED 4a83a: 677e beqs 4a8ba <fifo_open+0x34e> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4a83c: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a840: 6600 fdc2 bnew 4a604 <fifo_open+0x98> <== NOT EXECUTED 4a844: 7001 moveq #1,%d0 <== NOT EXECUTED 4a846: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a848: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a84c: 6600 010c bnew 4a95a <fifo_open+0x3ee> <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4a850: 282a 0020 movel %a2@(32),%d4 <== NOT EXECUTED 4a854: 4bf9 0004 ce58 lea 4ce58 <rtems_barrier_wait>,%a5 <== NOT EXECUTED
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4a85a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a85e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a860: 4e90 jsr %a0@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4a862: 42a7 clrl %sp@- <== NOT EXECUTED 4a864: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a868: 4e95 jsr %a5@ <== NOT EXECUTED 4a86a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a86e: 4a80 tstl %d0 <== NOT EXECUTED 4a870: 6600 00cc bnew 4a93e <fifo_open+0x3d2> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
4a874: 42a7 clrl %sp@- <== NOT EXECUTED 4a876: 42a7 clrl %sp@- <== NOT EXECUTED 4a878: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a87c: 4e93 jsr %a3@ <== NOT EXECUTED 4a87e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a882: 4a80 tstl %d0 <== NOT EXECUTED 4a884: 6600 00b8 bnew 4a93e <fifo_open+0x3d2> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
4a888: b8aa 0020 cmpl %a2@(32),%d4 <== NOT EXECUTED 4a88c: 67cc beqs 4a85a <fifo_open+0x2ee> <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4a88e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a892: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a894: 95ca subal %a2,%a2 <== NOT EXECUTED 4a896: 4e90 jsr %a0@ <== NOT EXECUTED
return 0;
4a898: 588f addql #4,%sp <== NOT EXECUTED 4a89a: 6000 fd74 braw 4a610 <fifo_open+0xa4> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
4a89e: 4a8a tstl %a2 <== NOT EXECUTED 4a8a0: 6654 bnes 4a8f6 <fifo_open+0x38a> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a8a2: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a8a8: 243c 0004 6840 movel #288832,%d2 <== NOT EXECUTED 4a8ae: 2042 moveal %d2,%a0 <== NOT EXECUTED
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe;
4a8b0: 288d movel %a5,%a4@ <== NOT EXECUTED
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a8b2: 4e90 jsr %a0@ <== NOT EXECUTED 4a8b4: 588f addql #4,%sp <== NOT EXECUTED 4a8b6: 6000 fd28 braw 4a5e0 <fifo_open+0x74> <== NOT EXECUTED
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
4a8ba: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a8be: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a8c2: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a8c8: 508f addql #8,%sp <== NOT EXECUTED 4a8ca: 6000 ff70 braw 4a83c <fifo_open+0x2d0> <== NOT EXECUTED
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4a8ce: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a8d2: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a8d6: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a8dc: 508f addql #8,%sp <== NOT EXECUTED 4a8de: 6000 ff12 braw 4a7f2 <fifo_open+0x286> <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4a8e2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a8e6: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a8ea: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a8f0: 508f addql #8,%sp <== NOT EXECUTED 4a8f2: 6000 fd42 braw 4a636 <fifo_open+0xca> <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4a8f6: 2f2d 002c movel %a5@(44),%sp@- <== NOT EXECUTED 4a8fa: 49f9 0004 cd40 lea 4cd40 <rtems_barrier_delete>,%a4 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4a900: 47f9 0004 2ddc lea 42ddc <free>,%a3 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4a906: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4a908: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4a90c: 4e94 jsr %a4@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4a90e: 2f2d 0028 movel %a5@(40),%sp@- <== NOT EXECUTED 4a912: 4eb9 0004 662c jsr 4662c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4a918: 2f15 movel %a5@,%sp@- <== NOT EXECUTED 4a91a: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4a91c: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a91e: 4e93 jsr %a3@ <== NOT EXECUTED 4a920: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a924: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a92a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED 4a930: 588f addql #4,%sp <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4a932: 200a movel %a2,%d0 <== NOT EXECUTED 4a934: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a93a: 4e5e unlk %fp <== NOT EXECUTED 4a93c: 4e75 rts <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4a93e: 2f03 movel %d3,%sp@- <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
return 0;
4a940: 347c fffc moveaw #-4,%a2 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
4a944: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4a946: 4eb9 0004 a44c jsr 4a44c <pipe_release> <== NOT EXECUTED
return err;
4a94c: 508f addql #8,%sp <== NOT EXECUTED
}
4a94e: 200a movel %a2,%d0 <== NOT EXECUTED 4a950: 4cee 3c1c ffdc moveml %fp@(-36),%d2-%d4/%a2-%a5 <== NOT EXECUTED 4a956: 4e5e unlk %fp <== NOT EXECUTED 4a958: 4e75 rts <== NOT EXECUTED
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4a95a: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a95e: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a960: 347c fffa moveaw #-6,%a2 <== NOT EXECUTED 4a964: 4e90 jsr %a0@ <== NOT EXECUTED
err = -ENXIO;
goto out_error;
4a966: 588f addql #4,%sp <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4a968: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4a96a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4a96c: 4eb9 0004 a44c jsr 4a44c <pipe_release> <== NOT EXECUTED
return err;
4a972: 508f addql #8,%sp <== NOT EXECUTED 4a974: 60d8 bras 4a94e <fifo_open+0x3e2> <== NOT EXECUTED
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4a976: 2f2d 0030 movel %a5@(48),%sp@- <== NOT EXECUTED 4a97a: 283c 0004 cd40 movel #314688,%d4 <== NOT EXECUTED 4a980: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a982: 4e90 jsr %a0@ <== NOT EXECUTED 4a984: 588f addql #4,%sp <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
4a986: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a988: 2f28 002c movel %a0@(44),%sp@- <== NOT EXECUTED 4a98c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a98e: 4e90 jsr %a0@ <== NOT EXECUTED 4a990: 588f addql #4,%sp <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
4a992: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a994: 283c 0004 2ddc movel #273884,%d4 <== NOT EXECUTED 4a99a: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4a99c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a99e: 4e90 jsr %a0@ <== NOT EXECUTED 4a9a0: 588f addql #4,%sp <== NOT EXECUTED
err_buf: free(pipe);
4a9a2: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4a9a4: 2044 moveal %d4,%a0 <== NOT EXECUTED 4a9a6: 4e90 jsr %a0@ <== NOT EXECUTED 4a9a8: 588f addql #4,%sp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a9aa: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier); err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4a9b0: 347c fff4 moveaw #-12,%a2 <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
4a9b4: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED 4a9ba: 588f addql #4,%sp <== NOT EXECUTED 4a9bc: 6000 ff74 braw 4a932 <fifo_open+0x3c6> <== NOT EXECUTED
00043b14 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
43b14: 4e56 0000 linkw %fp,#0 43b18: 202e 0008 movel %fp@(8),%d0 43b1c: 222e 000c movel %fp@(12),%d1 43b20: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
43b22: b0b9 0006 1964 cmpl 61964 <rtems_libio_number_iops>,%d0 43b28: 6400 00f0 bccw 43c1a <fpathconf+0x106>
iop = rtems_libio_iop(fd);
43b2c: 2079 0006 308c moveal 6308c <rtems_libio_iops>,%a0 43b32: ed88 lsll #6,%d0 43b34: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43b36: 2428 0014 movel %a0@(20),%d2 43b3a: 0802 0008 btst #8,%d2 43b3e: 6700 00da beqw 43c1a <fpathconf+0x106>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43b42: 0802 0001 btst #1,%d2
43b46: 670a beqs 43b52 <fpathconf+0x3e> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43b48: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43b4c: 700b moveq #11,%d0 43b4e: b081 cmpl %d1,%d0
43b50: 6416 bccs 43b68 <fpathconf+0x54>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43b52: 4eb9 0005 18d0 jsr 518d0 <__errno>
break;
}
return return_value;
}
43b58: 242e fffc movel %fp@(-4),%d2
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43b5c: 2040 moveal %d0,%a0 43b5e: 7216 moveq #22,%d1 43b60: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43b62: 4e5e unlk %fp
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43b64: 2081 movel %d1,%a0@
break;
}
return return_value;
}
43b66: 4e75 rts
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
43b68: 303b 1a08 movew %pc@(43b72 <fpathconf+0x5e>,%d1:l:2),%d0 43b6c: 48c0 extl %d0 43b6e: 4efb 0802 jmp %pc@(43b72 <fpathconf+0x5e>,%d0:l)
43b72: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43b78: 006c 0154 <== NOT EXECUTED 43b7a: 0060 0140 <== NOT EXECUTED 43b7c: 0054 0124 <== NOT EXECUTED 43b7e: 0048 0110 <== NOT EXECUTED 43b80: 003c 074 <== NOT EXECUTED 43b82: 0030 060 <== NOT EXECUTED 43b84: 0024 044 <== NOT EXECUTED 43b86: 0018 030 <== NOT EXECUTED 43b88: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b8e: 4e5e unlk %fp
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
43b90: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b94: 4e75 rts 43b96: 242e fffc movel %fp@(-4),%d2 43b9a: 4e5e unlk %fp
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
break;
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
43b9c: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43ba0: 4e75 rts 43ba2: 242e fffc movel %fp@(-4),%d2 43ba6: 4e5e unlk %fp
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
break;
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
43ba8: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bac: 4e75 rts 43bae: 242e fffc movel %fp@(-4),%d2 43bb2: 4e5e unlk %fp
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
break;
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
43bb4: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bb8: 4e75 rts 43bba: 242e fffc movel %fp@(-4),%d2 43bbe: 4e5e unlk %fp
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
break;
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
43bc0: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bc4: 4e75 rts 43bc6: 242e fffc movel %fp@(-4),%d2 43bca: 4e5e unlk %fp
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
break;
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
43bcc: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bd0: 4e75 rts 43bd2: 242e fffc movel %fp@(-4),%d2 43bd6: 4e5e unlk %fp
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
break;
case _PC_PATH_MAX:
return_value = the_limits->path_max;
43bd8: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bdc: 4e75 rts 43bde: 242e fffc movel %fp@(-4),%d2 43be2: 4e5e unlk %fp
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
break;
case _PC_NAME_MAX:
return_value = the_limits->name_max;
43be4: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43be8: 4e75 rts 43bea: 242e fffc movel %fp@(-4),%d2 43bee: 4e5e unlk %fp
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
break;
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
43bf0: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43bf4: 4e75 rts 43bf6: 242e fffc movel %fp@(-4),%d2 43bfa: 4e5e unlk %fp
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
break;
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
43bfc: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c00: 4e75 rts 43c02: 242e fffc movel %fp@(-4),%d2 43c06: 4e5e unlk %fp
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
case _PC_LINK_MAX:
return_value = the_limits->link_max;
43c08: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c0c: 4e75 rts 43c0e: 242e fffc movel %fp@(-4),%d2 43c12: 4e5e unlk %fp
break;
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
43c14: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c18: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
iop = rtems_libio_iop(fd);
rtems_libio_check_is_open(iop);
43c1a: 4eb9 0005 18d0 jsr 518d0 <__errno> 43c20: 7409 moveq #9,%d2 43c22: 2040 moveal %d0,%a0 43c24: 70ff moveq #-1,%d0 43c26: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43c28: 242e fffc movel %fp@(-4),%d2
43c2c: 4e5e unlk %fp <== NOT EXECUTED
00042ddc <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
42ddc: 4e56 0000 linkw %fp,#0 42de0: 52b9 0006 12f0 addql #1,612f0 <rtems_malloc_statistics+0xc> 42de6: 2f02 movel %d2,%sp@- 42de8: 242e 0008 movel %fp@(8),%d2
if ( !ptr )
42dec: 6732 beqs 42e20 <free+0x44>
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42dee: 7003 moveq #3,%d0 42df0: b0b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d0
42df6: 6758 beqs 42e50 <free+0x74> <== ALWAYS TAKEN
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42df8: 2079 0006 0256 moveal 60256 <rtems_malloc_statistics_helpers>,%a0 42dfe: 4a88 tstl %a0
42e00: 670a beqs 42e0c <free+0x30> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_free)(ptr);
42e02: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42e04: 2068 0008 moveal %a0@(8),%a0 <== NOT EXECUTED 42e08: 4e90 jsr %a0@ <== NOT EXECUTED 42e0a: 588f addql #4,%sp <== NOT EXECUTED
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
42e0c: 2f02 movel %d2,%sp@- 42e0e: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 42e14: 4eb9 0004 833c jsr 4833c <_Protected_heap_Free> 42e1a: 508f addql #8,%sp 42e1c: 4a00 tstb %d0
42e1e: 6708 beqs 42e28 <free+0x4c> <== NEVER TAKEN
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e20: 242e fffc movel %fp@(-4),%d2 42e24: 4e5e unlk %fp 42e26: 4e75 rts
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
42e28: 2079 0005 fbb0 moveal 5fbb0 <RTEMS_Malloc_Heap>,%a0 <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
42e2e: 2f28 001c movel %a0@(28),%sp@- <== NOT EXECUTED 42e32: 2f28 0018 movel %a0@(24),%sp@- <== NOT EXECUTED 42e36: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42e38: 4879 0005 e8dc pea 5e8dc <rtems_status_assoc+0x168> <== NOT EXECUTED 42e3e: 4eb9 0004 3ce8 jsr 43ce8 <printk> <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e44: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
42e48: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e4c: 4e5e unlk %fp <== NOT EXECUTED 42e4e: 4e75 rts <== NOT EXECUTED
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42e50: 4eb9 0004 2f98 jsr 42f98 <malloc_is_system_state_OK> 42e56: 4a00 tstb %d0
42e58: 669e bnes 42df8 <free+0x1c> <== ALWAYS TAKEN
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42e5a: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e5e: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 42e62: 4e5e unlk %fp <== NOT EXECUTED
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42e64: 4ef9 0004 2fd8 jmp 42fd8 <malloc_deferred_free> <== NOT EXECUTED
...
000444a4 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
444a4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 444a8: 2f0a movel %a2,%sp@- <== NOT EXECUTED 444aa: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
444ae: b5fc 0006 1d8c cmpal #400780,%a2 <== NOT EXECUTED 444b4: 6740 beqs 444f6 <free_user_env+0x52> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
444b6: 206a 0010 moveal %a2@(16),%a0 <== NOT EXECUTED 444ba: 4a88 tstl %a0 <== NOT EXECUTED 444bc: 6710 beqs 444ce <free_user_env+0x2a> <== NOT EXECUTED 444be: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 444c2: 4a88 tstl %a0 <== NOT EXECUTED 444c4: 6708 beqs 444ce <free_user_env+0x2a> <== NOT EXECUTED 444c6: 486a 0004 pea %a2@(4) <== NOT EXECUTED 444ca: 4e90 jsr %a0@ <== NOT EXECUTED 444cc: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
444ce: 206a 0024 moveal %a2@(36),%a0 <== NOT EXECUTED 444d2: 4a88 tstl %a0 <== NOT EXECUTED 444d4: 6710 beqs 444e6 <free_user_env+0x42> <== NOT EXECUTED 444d6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 444da: 4a88 tstl %a0 <== NOT EXECUTED 444dc: 6708 beqs 444e6 <free_user_env+0x42> <== NOT EXECUTED 444de: 486a 0018 pea %a2@(24) <== NOT EXECUTED 444e2: 4e90 jsr %a0@ <== NOT EXECUTED 444e4: 588f addql #4,%sp <== NOT EXECUTED
free(env);
444e6: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
444ea: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444ee: 4e5e unlk %fp <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
444f0: 4ef9 0004 32b0 jmp 432b0 <free> <== NOT EXECUTED
} }
444f6: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 444fa: 4e5e unlk %fp <== NOT EXECUTED
0005d5ac <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
5d5ac: 4e56 0000 linkw %fp,#0 5d5b0: 202e 0008 movel %fp@(8),%d0 5d5b4: 2f0a movel %a2,%sp@- 5d5b6: 2f02 movel %d2,%sp@- 5d5b8: 242e 000c movel %fp@(12),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
5d5bc: 6700 0096 beqw 5d654 <fstat+0xa8>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
5d5c0: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0
5d5c6: 6456 bccs 5d61e <fstat+0x72>
5d5c8: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 5d5ce: ed88 lsll #6,%d0 5d5d0: d5c0 addal %d0,%a2
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
5d5d2: 202a 0014 movel %a2@(20),%d0 5d5d6: 0280 0000 0100 andil #256,%d0
5d5dc: 6740 beqs 5d61e <fstat+0x72> <== NEVER TAKEN
if ( !iop->handlers )
5d5de: 206a 003c moveal %a2@(60),%a0 5d5e2: 4a88 tstl %a0
5d5e4: 6738 beqs 5d61e <fstat+0x72> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
5d5e6: 4aa8 0018 tstl %a0@(24)
5d5ea: 674c beqs 5d638 <fstat+0x8c> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
5d5ec: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 5d5f0: 42a7 clrl %sp@- 5d5f2: 2f02 movel %d2,%sp@- 5d5f4: 4eb9 0005 0e48 jsr 50e48 <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
5d5fa: 206a 003c moveal %a2@(60),%a0 5d5fe: 45ea 0018 lea %a2@(24),%a2 5d602: 4fef 000c lea %sp@(12),%sp 5d606: 2d42 000c movel %d2,%fp@(12)
}
5d60a: 242e fff8 movel %fp@(-8),%d2
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
5d60e: 2d4a 0008 movel %a2,%fp@(8)
}
5d612: 246e fffc moveal %fp@(-4),%a2 5d616: 4e5e unlk %fp
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
5d618: 2268 0018 moveal %a0@(24),%a1 5d61c: 4ed1 jmp %a1@
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5d61e: 4eb9 0005 05b8 jsr 505b8 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d624: 242e fff8 movel %fp@(-8),%d2
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5d628: 2040 moveal %d0,%a0 5d62a: 7009 moveq #9,%d0
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d62c: 246e fffc moveal %fp@(-4),%a2 5d630: 4e5e unlk %fp
iop = rtems_libio_iop( fd );
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
5d632: 2080 movel %d0,%a0@
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d634: 70ff moveq #-1,%d0 5d636: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d638: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d63e: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d642: 2040 moveal %d0,%a0 <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d644: 70ff moveq #-1,%d0 <== NOT EXECUTED 5d646: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 5d64a: 4e5e unlk %fp <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fstat_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d64c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d652: 4e75 rts <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5d654: 4eb9 0005 05b8 jsr 505b8 <__errno>
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d65a: 242e fff8 movel %fp@(-8),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5d65e: 2040 moveal %d0,%a0 5d660: 720e moveq #14,%d1
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
5d662: 70ff moveq #-1,%d0 5d664: 246e fffc moveal %fp@(-4),%a2 5d668: 4e5e unlk %fp
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
rtems_set_errno_and_return_minus_one( EFAULT );
5d66a: 2081 movel %d1,%a0@ <== NOT EXECUTED
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
}
00043d9c <fsync>:
#include <rtems/seterr.h>
int fsync(
int fd
)
{
43d9c: 4e56 0000 linkw %fp,#0 43da0: 202e 0008 movel %fp@(8),%d0
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43da4: b0b9 0006 1964 cmpl 61964 <rtems_libio_number_iops>,%d0
43daa: 6430 bccs 43ddc <fsync+0x40> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
43dac: 2079 0006 308c moveal 6308c <rtems_libio_iops>,%a0 43db2: ed88 lsll #6,%d0 43db4: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43db6: 2028 0014 movel %a0@(20),%d0 43dba: 0800 0008 btst #8,%d0
43dbe: 671c beqs 43ddc <fsync+0x40> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43dc0: 44c0 movew %d0,%ccr
43dc2: 662a bnes 43dee <fsync+0x52>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
43dc4: 2268 003c moveal %a0@(60),%a1 43dc8: 4a89 tstl %a1
43dca: 6710 beqs 43ddc <fsync+0x40> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
43dcc: 2269 0028 moveal %a1@(40),%a1 43dd0: 4a89 tstl %a1
43dd2: 672c beqs 43e00 <fsync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
43dd4: 2d48 0008 movel %a0,%fp@(8)
}
43dd8: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
43dda: 4ed1 jmp %a1@
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
43ddc: 4eb9 0005 18d0 jsr 518d0 <__errno> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43de2: 4e5e unlk %fp <== NOT EXECUTED
/*
* Now process the fsync().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
43de4: 2040 moveal %d0,%a0 <== NOT EXECUTED 43de6: 7009 moveq #9,%d0 <== NOT EXECUTED 43de8: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43dea: 70ff moveq #-1,%d0 <== NOT EXECUTED 43dec: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43dee: 4eb9 0005 18d0 jsr 518d0 <__errno> 43df4: 7216 moveq #22,%d1 43df6: 2040 moveal %d0,%a0
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43df8: 70ff moveq #-1,%d0 43dfa: 4e5e unlk %fp
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43dfc: 2081 movel %d1,%a0@
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->fsync_h)( iop );
}
43dfe: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43e00: 4eb9 0005 18d0 jsr 518d0 <__errno>
return (*iop->handlers->fsync_h)( iop );
}
43e06: 4e5e unlk %fp
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43e08: 2040 moveal %d0,%a0
return (*iop->handlers->fsync_h)( iop );
}
43e0a: 70ff moveq #-1,%d0
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->fsync_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
43e0c: 20bc 0000 0086 movel #134,%a0@
return (*iop->handlers->fsync_h)( iop );
}
0004bd88 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
4bd88: 4e56 ffec linkw %fp,#-20 4bd8c: 202e 0008 movel %fp@(8),%d0 4bd90: 2f0a movel %a2,%sp@-
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
4bd92: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0
4bd98: 647a bccs 4be14 <ftruncate+0x8c> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
4bd9a: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 4bda0: ed88 lsll #6,%d0 4bda2: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4bda4: 202a 0014 movel %a2@(20),%d0 4bda8: 0280 0000 0100 andil #256,%d0
4bdae: 6764 beqs 4be14 <ftruncate+0x8c> <== NEVER TAKEN
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4bdb0: 43ee ffec lea %fp@(-20),%a1 4bdb4: 22aa 0018 movel %a2@(24),%a1@ 4bdb8: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4bdbe: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4bdc4: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
4bdca: 206e fff8 moveal %fp@(-8),%a0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4bdce: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
4bdd4: 2068 0010 moveal %a0@(16),%a0 4bdd8: 4a88 tstl %a0
4bdda: 6764 beqs 4be40 <ftruncate+0xb8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4bddc: 2f09 movel %a1,%sp@- 4bdde: 4e90 jsr %a0@ 4bde0: 588f addql #4,%sp 4bde2: 7201 moveq #1,%d1 4bde4: b280 cmpl %d0,%d1
4bde6: 6770 beqs 4be58 <ftruncate+0xd0>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4bde8: 7004 moveq #4,%d0 4bdea: c0aa 0014 andl %a2@(20),%d0
4bdee: 673a beqs 4be2a <ftruncate+0xa2> <== NEVER TAKEN
if ( !iop->handlers->ftruncate_h )
4bdf0: 206a 003c moveal %a2@(60),%a0 4bdf4: 2068 0020 moveal %a0@(32),%a0 4bdf8: 4a88 tstl %a0
4bdfa: 6744 beqs 4be40 <ftruncate+0xb8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
4bdfc: 2f2e 0010 movel %fp@(16),%sp@- 4be00: 2f2e 000c movel %fp@(12),%sp@- 4be04: 2f0a movel %a2,%sp@- 4be06: 4e90 jsr %a0@
}
4be08: 246e ffe8 moveal %fp@(-24),%a2
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
4be0c: 4fef 000c lea %sp@(12),%sp
}
4be10: 4e5e unlk %fp 4be12: 4e75 rts
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4be14: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be1a: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4be1e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4be20: 7209 moveq #9,%d1 <== NOT EXECUTED 4be22: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be24: 4e5e unlk %fp <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4be26: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be28: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4be2a: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be30: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4be34: 2040 moveal %d0,%a0 <== NOT EXECUTED 4be36: 7216 moveq #22,%d1 <== NOT EXECUTED 4be38: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be3a: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4be3c: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be3e: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4be40: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be46: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4be4a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4be4c: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be4e: 4e5e unlk %fp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
4be50: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be56: 4e75 rts <== NOT EXECUTED
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4be58: 4eb9 0005 05b8 jsr 505b8 <__errno>
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be5e: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4be62: 2040 moveal %d0,%a0 4be64: 7215 moveq #21,%d1 4be66: 70ff moveq #-1,%d0
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
4be68: 4e5e unlk %fp
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4be6a: 2081 movel %d1,%a0@
if ( !iop->handlers->ftruncate_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->ftruncate_h)( iop, length );
}
...
0005f430 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5f430: 4e56 ffec linkw %fp,#-20 5f434: 202e 0008 movel %fp@(8),%d0 5f438: 2f0a movel %a2,%sp@-
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5f43a: b0b9 0006 2294 cmpl 62294 <rtems_libio_number_iops>,%d0
5f440: 655e bcss 5f4a0 <getdents+0x70>
5f442: 95ca subal %a2,%a2 <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5f444: 43ee ffec lea %fp@(-20),%a1 5f448: 22aa 0018 movel %a2@(24),%a1@ 5f44c: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5f452: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5f458: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( !loc.ops->node_type_h )
5f45e: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5f462: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( !loc.ops->node_type_h )
5f468: 2068 0010 moveal %a0@(16),%a0 5f46c: 4a88 tstl %a0
5f46e: 6752 beqs 5f4c2 <getdents+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5f470: 2f09 movel %a1,%sp@- 5f472: 4e90 jsr %a0@ 5f474: 588f addql #4,%sp 5f476: 7201 moveq #1,%d1 5f478: b280 cmpl %d0,%d1
5f47a: 6630 bnes 5f4ac <getdents+0x7c>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
5f47c: 206a 003c moveal %a2@(60),%a0 5f480: 2068 0008 moveal %a0@(8),%a0 5f484: 4a88 tstl %a0
5f486: 673a beqs 5f4c2 <getdents+0x92> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5f488: 2f2e 0010 movel %fp@(16),%sp@- 5f48c: 2f2e 000c movel %fp@(12),%sp@- 5f490: 2f0a movel %a2,%sp@- 5f492: 4e90 jsr %a0@
}
5f494: 246e ffe8 moveal %fp@(-24),%a2
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5f498: 4fef 000c lea %sp@(12),%sp
}
5f49c: 4e5e unlk %fp 5f49e: 4e75 rts
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5f4a0: 2479 0006 3acc moveal 63acc <rtems_libio_iops>,%a2 5f4a6: ed88 lsll #6,%d0 5f4a8: d5c0 addal %d0,%a2 5f4aa: 6098 bras 5f444 <getdents+0x14>
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5f4ac: 4eb9 0005 1b7c jsr 51b7c <__errno>
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5f4b2: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5f4b6: 2040 moveal %d0,%a0 5f4b8: 7214 moveq #20,%d1 5f4ba: 70ff moveq #-1,%d0
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5f4bc: 4e5e unlk %fp
loc = iop->pathinfo;
if ( !loc.ops->node_type_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5f4be: 2081 movel %d1,%a0@
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5f4c0: 4e75 rts
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5f4c2: 4eb9 0005 1b7c jsr 51b7c <__errno> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5f4c8: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5f4cc: 2040 moveal %d0,%a0 <== NOT EXECUTED 5f4ce: 70ff moveq #-1,%d0 <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
5f4d0: 4e5e unlk %fp <== NOT EXECUTED
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5f4d2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
}
...
0004355e <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
4355e: 4e56 ffe0 linkw %fp,#-32 43562: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43566: 242e 0008 movel %fp@(8),%d2 4356a: 47fa fc26 lea %pc@(43192 <scangr>),%a3
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
4356e: 49f9 0005 2978 lea 52978 <strcmp>,%a4
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43574: 2c2e 000c movel %fp@(12),%d6 43578: 246e 0010 moveal %fp@(16),%a2 4357c: 2a2e 0014 movel %fp@(20),%d5 43580: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
43584: 4eb9 0004 341a jsr 4341a <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
4358a: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> 43590: 4879 0005 fe62 pea 5fe62 <rtems_status_assoc+0x218> 43596: 4eb9 0005 16f4 jsr 516f4 <fopen> 4359c: 508f addql #8,%sp 4359e: 2600 movel %d0,%d3
435a0: 6778 beqs 4361a <getgr_r+0xbc> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
435a2: 2f04 movel %d4,%sp@- 435a4: 2f05 movel %d5,%sp@- 435a6: 2f0a movel %a2,%sp@- 435a8: 2f03 movel %d3,%sp@- 435aa: 4e93 jsr %a3@ 435ac: 4fef 0010 lea %sp@(16),%sp 435b0: 4a80 tstl %d0
435b2: 6744 beqs 435f8 <getgr_r+0x9a> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
435b4: 4a82 tstl %d2
435b6: 672e beqs 435e6 <getgr_r+0x88> <== NEVER TAKEN
match = (strcmp(grp->gr_name, name) == 0);
435b8: 2f02 movel %d2,%sp@- 435ba: 2f12 movel %a2@,%sp@- 435bc: 4e94 jsr %a4@ 435be: 508f addql #8,%sp 435c0: 4a80 tstl %d0 435c2: 57c0 seq %d0 435c4: 49c0 extbl %d0 435c6: 4480 negl %d0
}
else {
match = (grp->gr_gid == gid);
}
if (match) {
435c8: 67d8 beqs 435a2 <getgr_r+0x44>
fclose(fp);
435ca: 2f03 movel %d3,%sp@- 435cc: 4eb9 0005 1072 jsr 51072 <fclose>
*result = grp;
435d2: 206e 001c moveal %fp@(28),%a0
return 0;
435d6: 588f addql #4,%sp
else {
match = (grp->gr_gid == gid);
}
if (match) {
fclose(fp);
*result = grp;
435d8: 4280 clrl %d0 435da: 208a movel %a2,%a0@
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
435dc: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 435e2: 4e5e unlk %fp 435e4: 4e75 rts
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
}
else {
match = (grp->gr_gid == gid);
435e6: 4280 clrl %d0 <== NOT EXECUTED 435e8: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 435ec: bc80 cmpl %d0,%d6 <== NOT EXECUTED 435ee: 57c0 seq %d0 <== NOT EXECUTED 435f0: 49c0 extbl %d0 <== NOT EXECUTED 435f2: 4480 negl %d0 <== NOT EXECUTED
}
if (match) {
435f4: 67ac beqs 435a2 <getgr_r+0x44> <== NOT EXECUTED 435f6: 60d2 bras 435ca <getgr_r+0x6c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
435f8: 4eb9 0005 0f34 jsr 50f34 <__errno> <== NOT EXECUTED 435fe: 2040 moveal %d0,%a0 <== NOT EXECUTED 43600: 7016 moveq #22,%d0 <== NOT EXECUTED 43602: 2080 movel %d0,%a0@ <== NOT EXECUTED
fclose(fp);
43604: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43606: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED
return -1;
4360c: 588f addql #4,%sp <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
errno = EINVAL;
fclose(fp);
4360e: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
43610: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 43616: 4e5e unlk %fp <== NOT EXECUTED 43618: 4e75 rts <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
4361a: 4eb9 0005 0f34 jsr 50f34 <__errno> <== NOT EXECUTED 43620: 7216 moveq #22,%d1 <== NOT EXECUTED 43622: 2040 moveal %d0,%a0 <== NOT EXECUTED 43624: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
43626: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
4362c: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
4362e: 4e5e unlk %fp <== NOT EXECUTED
000432ae <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
432ae: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (group_fp == NULL)
432b2: 2039 0006 2136 movel 62136 <group_fp>,%d0 <== NOT EXECUTED 432b8: 6608 bnes 432c2 <getgrent+0x14> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
432ba: 4281 clrl %d1 <== NOT EXECUTED
return NULL;
return &grent;
}
432bc: 2001 movel %d1,%d0 <== NOT EXECUTED 432be: 4e5e unlk %fp <== NOT EXECUTED 432c0: 4e75 rts <== NOT EXECUTED
struct group *getgrent(void)
{
if (group_fp == NULL)
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
432c2: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 432c6: 4879 0006 213a pea 6213a <grbuf> <== NOT EXECUTED 432cc: 4879 0006 2202 pea 62202 <grent> <== NOT EXECUTED 432d2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432d4: 4eba febc jsr %pc@(43192 <scangr>) <== NOT EXECUTED 432d8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 432dc: 223c 0006 2202 movel #401922,%d1 <== NOT EXECUTED 432e2: 4a80 tstl %d0 <== NOT EXECUTED 432e4: 67d4 beqs 432ba <getgrent+0xc> <== NOT EXECUTED
return NULL;
return &grent;
}
432e6: 2001 movel %d1,%d0 <== NOT EXECUTED 432e8: 4e5e unlk %fp <== NOT EXECUTED
00043658 <getgrgid>:
gid_t gid
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
43658: 4280 clrl %d0 <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
4365a: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
4365e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 43662: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 43666: 4879 0006 213a pea 6213a <grbuf> <== NOT EXECUTED 4366c: 4879 0006 2202 pea 62202 <grent> <== NOT EXECUTED 43672: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43676: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43678: 4eb9 0004 3632 jsr 43632 <getgrgid_r> <== NOT EXECUTED 4367e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 43682: 4a80 tstl %d0 <== NOT EXECUTED 43684: 6608 bnes 4368e <getgrgid+0x36> <== NOT EXECUTED
return NULL;
return p;
43686: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
4368a: 4e5e unlk %fp <== NOT EXECUTED 4368c: 4e75 rts <== NOT EXECUTED
gid_t gid
)
{
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
4368e: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
43690: 4e5e unlk %fp <== NOT EXECUTED
00043632 <getgrgid_r>:
char *buffer,
size_t bufsize,
struct group **result
)
{
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
43632: 4280 clrl %d0 <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
43634: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
43638: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 4363c: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 43640: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 43644: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43648: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 4364c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4364e: 42a7 clrl %sp@- <== NOT EXECUTED 43650: 4eba ff0c jsr %pc@(4355e <getgr_r>) <== NOT EXECUTED
}
43654: 4e5e unlk %fp <== NOT EXECUTED
000436b6 <getgrnam>:
struct group *getgrnam(
const char *name
)
{
436b6: 4e56 fffc linkw %fp,#-4
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
436ba: 486e fffc pea %fp@(-4) 436be: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 436c2: 4879 0006 213a pea 6213a <grbuf> 436c8: 4879 0006 2202 pea 62202 <grent> 436ce: 2f2e 0008 movel %fp@(8),%sp@- 436d2: 4eb9 0004 3694 jsr 43694 <getgrnam_r> 436d8: 4fef 0014 lea %sp@(20),%sp 436dc: 4a80 tstl %d0
436de: 6608 bnes 436e8 <getgrnam+0x32> <== NEVER TAKEN
return NULL;
return p;
436e0: 202e fffc movel %fp@(-4),%d0
}
436e4: 4e5e unlk %fp 436e6: 4e75 rts
const char *name
)
{
struct group *p;
if(getgrnam_r(name, &grent, grbuf, sizeof grbuf, &p))
436e8: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
436ea: 4e5e unlk %fp <== NOT EXECUTED
00043728 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
43728: 4e56 ffe0 linkw %fp,#-32 4372c: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 43730: 242e 0008 movel %fp@(8),%d2 43734: 47fa fbb6 lea %pc@(432ec <scanpw>),%a3
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
43738: 49f9 0005 2978 lea 52978 <strcmp>,%a4
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
4373e: 2c2e 000c movel %fp@(12),%d6 43742: 246e 0010 moveal %fp@(16),%a2 43746: 2a2e 0014 movel %fp@(20),%d5 4374a: 282e 0018 movel %fp@(24),%d4
FILE *fp;
int match;
init_etc_passwd_group();
4374e: 4eb9 0004 341a jsr 4341a <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
43754: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> 4375a: 4879 0005 fdef pea 5fdef <rtems_status_assoc+0x1a5> 43760: 4eb9 0005 16f4 jsr 516f4 <fopen> 43766: 508f addql #8,%sp 43768: 2600 movel %d0,%d3
4376a: 6778 beqs 437e4 <getpw_r+0xbc> <== NEVER TAKEN
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
4376c: 2f04 movel %d4,%sp@- 4376e: 2f05 movel %d5,%sp@- 43770: 2f0a movel %a2,%sp@- 43772: 2f03 movel %d3,%sp@- 43774: 4e93 jsr %a3@ 43776: 4fef 0010 lea %sp@(16),%sp 4377a: 4a80 tstl %d0
4377c: 6744 beqs 437c2 <getpw_r+0x9a> <== NEVER TAKEN
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
4377e: 4a82 tstl %d2
43780: 672e beqs 437b0 <getpw_r+0x88> <== NEVER TAKEN
match = (strcmp(pwd->pw_name, name) == 0);
43782: 2f02 movel %d2,%sp@- 43784: 2f12 movel %a2@,%sp@- 43786: 4e94 jsr %a4@ 43788: 508f addql #8,%sp 4378a: 4a80 tstl %d0 4378c: 57c0 seq %d0 4378e: 49c0 extbl %d0 43790: 4480 negl %d0
}
else {
match = (pwd->pw_uid == uid);
}
if (match) {
43792: 67d8 beqs 4376c <getpw_r+0x44>
fclose(fp);
43794: 2f03 movel %d3,%sp@- 43796: 4eb9 0005 1072 jsr 51072 <fclose>
*result = pwd;
4379c: 206e 001c moveal %fp@(28),%a0
return 0;
437a0: 588f addql #4,%sp
else {
match = (pwd->pw_uid == uid);
}
if (match) {
fclose(fp);
*result = pwd;
437a2: 4280 clrl %d0 437a4: 208a movel %a2,%a0@
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
437a6: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 437ac: 4e5e unlk %fp 437ae: 4e75 rts
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
}
else {
match = (pwd->pw_uid == uid);
437b0: 4280 clrl %d0 <== NOT EXECUTED 437b2: 302a 0008 movew %a2@(8),%d0 <== NOT EXECUTED 437b6: bc80 cmpl %d0,%d6 <== NOT EXECUTED 437b8: 57c0 seq %d0 <== NOT EXECUTED 437ba: 49c0 extbl %d0 <== NOT EXECUTED 437bc: 4480 negl %d0 <== NOT EXECUTED
}
if (match) {
437be: 67ac beqs 4376c <getpw_r+0x44> <== NOT EXECUTED 437c0: 60d2 bras 43794 <getpw_r+0x6c> <== NOT EXECUTED
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
437c2: 4eb9 0005 0f34 jsr 50f34 <__errno> <== NOT EXECUTED 437c8: 7416 moveq #22,%d2 <== NOT EXECUTED 437ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 437cc: 2082 movel %d2,%a0@ <== NOT EXECUTED
fclose(fp);
437ce: 2f03 movel %d3,%sp@- <== NOT EXECUTED 437d0: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED
return -1;
437d6: 588f addql #4,%sp <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
errno = EINVAL;
fclose(fp);
437d8: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
437da: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 437e0: 4e5e unlk %fp <== NOT EXECUTED 437e2: 4e75 rts <== NOT EXECUTED
int match;
init_etc_passwd_group();
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
437e4: 4eb9 0005 0f34 jsr 50f34 <__errno> <== NOT EXECUTED 437ea: 7616 moveq #22,%d3 <== NOT EXECUTED 437ec: 2040 moveal %d0,%a0 <== NOT EXECUTED 437ee: 70ff moveq #-1,%d0 <== NOT EXECUTED 437f0: 2083 movel %d3,%a0@ <== NOT EXECUTED
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
437f2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 437f8: 4e5e unlk %fp <== NOT EXECUTED
000433dc <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
433dc: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (passwd_fp == NULL)
433e0: 2039 0006 204e movel 6204e <passwd_fp>,%d0 <== NOT EXECUTED 433e6: 6608 bnes 433f0 <getpwent+0x14> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
433e8: 4281 clrl %d1 <== NOT EXECUTED
return NULL;
return &pwent;
}
433ea: 2001 movel %d1,%d0 <== NOT EXECUTED 433ec: 4e5e unlk %fp <== NOT EXECUTED 433ee: 4e75 rts <== NOT EXECUTED
struct passwd *getpwent(void)
{
if (passwd_fp == NULL)
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
433f0: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 433f4: 4879 0006 2052 pea 62052 <pwbuf> <== NOT EXECUTED 433fa: 4879 0006 211a pea 6211a <pwent> <== NOT EXECUTED 43400: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43402: 4eba fee8 jsr %pc@(432ec <scanpw>) <== NOT EXECUTED 43406: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4340a: 223c 0006 211a movel #401690,%d1 <== NOT EXECUTED 43410: 4a80 tstl %d0 <== NOT EXECUTED 43412: 67d4 beqs 433e8 <getpwent+0xc> <== NOT EXECUTED
return NULL;
return &pwent;
}
43414: 2001 movel %d1,%d0 <== NOT EXECUTED 43416: 4e5e unlk %fp <== NOT EXECUTED
00043880 <getpwnam>:
struct passwd *getpwnam(
const char *name
)
{
43880: 4e56 fffc linkw %fp,#-4
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
43884: 486e fffc pea %fp@(-4) 43888: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> 4388c: 4879 0006 2052 pea 62052 <pwbuf> 43892: 4879 0006 211a pea 6211a <pwent> 43898: 2f2e 0008 movel %fp@(8),%sp@- 4389c: 4eb9 0004 385e jsr 4385e <getpwnam_r> 438a2: 4fef 0014 lea %sp@(20),%sp 438a6: 4a80 tstl %d0
438a8: 6608 bnes 438b2 <getpwnam+0x32> <== NEVER TAKEN
return NULL;
return p;
438aa: 202e fffc movel %fp@(-4),%d0
}
438ae: 4e5e unlk %fp 438b0: 4e75 rts
const char *name
)
{
struct passwd *p;
if(getpwnam_r(name, &pwent, pwbuf, sizeof pwbuf, &p))
438b2: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
438b4: 4e5e unlk %fp <== NOT EXECUTED
00043822 <getpwuid>:
uid_t uid
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
43822: 4280 clrl %d0 <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
43824: 4e56 fffc linkw %fp,#-4 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
43828: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4382c: 4878 00c8 pea c8 <DBL_MANT_DIG+0x93> <== NOT EXECUTED 43830: 4879 0006 2052 pea 62052 <pwbuf> <== NOT EXECUTED 43836: 4879 0006 211a pea 6211a <pwent> <== NOT EXECUTED 4383c: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43840: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43842: 4eb9 0004 37fc jsr 437fc <getpwuid_r> <== NOT EXECUTED 43848: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4384c: 4a80 tstl %d0 <== NOT EXECUTED 4384e: 6608 bnes 43858 <getpwuid+0x36> <== NOT EXECUTED
return NULL;
return p;
43850: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
43854: 4e5e unlk %fp <== NOT EXECUTED 43856: 4e75 rts <== NOT EXECUTED
uid_t uid
)
{
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
43858: 4280 clrl %d0 <== NOT EXECUTED
return NULL;
return p;
}
4385a: 4e5e unlk %fp <== NOT EXECUTED
000437fc <getpwuid_r>:
char *buffer,
size_t bufsize,
struct passwd **result
)
{
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
437fc: 4280 clrl %d0 <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
437fe: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
43802: 2f2e 0018 movel %fp@(24),%sp@- <== NOT EXECUTED 43806: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED 4380a: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 4380e: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43812: 302e 000a movew %fp@(10),%d0 <== NOT EXECUTED 43816: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43818: 42a7 clrl %sp@- <== NOT EXECUTED 4381a: 4eba ff0c jsr %pc@(43728 <getpw_r>) <== NOT EXECUTED
}
4381e: 4e5e unlk %fp <== NOT EXECUTED
00042e6c <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
42e6c: 4e56 ffec linkw %fp,#-20 42e70: 48d7 040c moveml %d2-%d3/%a2,%sp@ 42e74: 246e 0008 moveal %fp@(8),%a2
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
42e78: 4a8a tstl %a2
42e7a: 673c beqs 42eb8 <gettimeofday+0x4c> <== NEVER TAKEN
{
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
42e7c: 203c 0000 0700 movel #1792,%d0 42e82: 40c2 movew %sr,%d2 42e84: 8082 orl %d2,%d0 42e86: 46c0 movew %d0,%sr
_TOD_Get( &now );
42e88: 486e fff8 pea %fp@(-8) 42e8c: 4eb9 0004 75f8 jsr 475f8 <_TOD_Get>
_ISR_Enable(level);
42e92: 46c2 movew %d2,%sr
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
42e94: 263c 0000 03e8 movel #1000,%d3
* Timezone information ignored by the OS proper. Per email
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
42e9a: 588f addql #4,%sp 42e9c: 4280 clrl %d0
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
42e9e: 222e fffc movel %fp@(-4),%d1
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
42ea2: 4c43 1801 remsl %d3,%d1,%d1 42ea6: 2541 0004 movel %d1,%a2@(4)
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
42eaa: 24ae fff8 movel %fp@(-8),%a2@
}
42eae: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 42eb4: 4e5e unlk %fp 42eb6: 4e75 rts
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
42eb8: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42ebe: 720e moveq #14,%d1 <== NOT EXECUTED 42ec0: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ec2: 70ff moveq #-1,%d0 <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
42ec4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED
void * __tz __attribute__((unused))
)
{
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
errno = EFAULT;
42eca: 2081 movel %d1,%a0@ <== NOT EXECUTED
* with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X
* do it. This puts us in good company.
*/
return 0;
}
42ecc: 4e5e unlk %fp <== NOT EXECUTED
0004f06c <imfs_dir_open>:
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
4f06c: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4f06e: 4e56 0000 linkw %fp,#0 4f072: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
4f076: 2268 0038 moveal %a0@(56),%a1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4f07a: 2f02 movel %d2,%sp@-
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
4f07c: b0a9 0048 cmpl %a1@(72),%d0
4f080: 6708 beqs 4f08a <imfs_dir_open+0x1e> <== ALWAYS TAKEN
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
4f082: 241f movel %sp@+,%d2 <== NOT EXECUTED
)
{
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->file_info;
4f084: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
4f086: 4e5e unlk %fp <== NOT EXECUTED 4f088: 4e75 rts <== NOT EXECUTED
the_jnode = (IMFS_jnode_t *) iop->file_info;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
4f08a: 4280 clrl %d0 4f08c: 4281 clrl %d1 4f08e: 4282 clrl %d2 4f090: 2141 000c movel %d1,%a0@(12) 4f094: 2142 0010 movel %d2,%a0@(16)
return 0; }
4f098: 241f movel %sp@+,%d2
4f09a: 4e5e unlk %fp <== NOT EXECUTED
0004f1da <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4f1da: 4e56 fff8 linkw %fp,#-8 4f1de: 2f0b movel %a3,%sp@- 4f1e0: 266e 000c moveal %fp@(12),%a3 4f1e4: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4f1e6: 2453 moveal %a3@,%a2 4f1e8: 200a movel %a2,%d0 4f1ea: 0680 0000 0050 addil #80,%d0 4f1f0: b0aa 004c cmpl %a2@(76),%d0 4f1f4: 6600 0090 bnew 4f286 <imfs_dir_rmnod+0xac>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
4f1f8: 206b 0010 moveal %a3@(16),%a0 4f1fc: b5e8 001c cmpal %a0@(28),%a2 4f200: 6700 009e beqw 4f2a0 <imfs_dir_rmnod+0xc6>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
4f204: 4aaa 0058 tstl %a2@(88) 4f208: 6600 0096 bnew 4f2a0 <imfs_dir_rmnod+0xc6>
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
4f20c: 4aaa 0008 tstl %a2@(8)
4f210: 670e beqs 4f220 <imfs_dir_rmnod+0x46>
4f212: 2f0a movel %a2,%sp@- 4f214: 4eb9 0004 71a8 jsr 471a8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
4f21a: 588f addql #4,%sp 4f21c: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
4f220: 302a 0032 movew %a2@(50),%d0 4f224: 5380 subql #1,%d0 4f226: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
4f22a: 42a7 clrl %sp@- 4f22c: 486e fff8 pea %fp@(-8) 4f230: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4f236: 256e fff8 0044 movel %fp@(-8),%a2@(68)
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
4f23c: 2f0a movel %a2,%sp@- 4f23e: 4eb9 0004 befa jsr 4befa <rtems_libio_is_file_open> 4f244: 4fef 000c lea %sp@(12),%sp 4f248: 4a80 tstl %d0
4f24a: 662c bnes 4f278 <imfs_dir_rmnod+0x9e>
4f24c: 4a6a 0032 tstw %a2@(50)
4f250: 6626 bnes 4f278 <imfs_dir_rmnod+0x9e>
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
4f252: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4f258: 2653 moveal %a3@,%a3 4f25a: b7e8 0004 cmpal %a0@(4),%a3
4f25e: 675a beqs 4f2ba <imfs_dir_rmnod+0xe0> <== NEVER TAKEN
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
4f260: 2f0a movel %a2,%sp@- 4f262: 4eb9 0004 2ddc jsr 42ddc <free> 4f268: 588f addql #4,%sp 4f26a: 4280 clrl %d0
}
return 0;
}
4f26c: 246e fff0 moveal %fp@(-16),%a2 4f270: 266e fff4 moveal %fp@(-12),%a3 4f274: 4e5e unlk %fp 4f276: 4e75 rts 4f278: 246e fff0 moveal %fp@(-16),%a2
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
4f27c: 4280 clrl %d0
}
return 0;
}
4f27e: 266e fff4 moveal %fp@(-12),%a3 4f282: 4e5e unlk %fp 4f284: 4e75 rts
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4f286: 4eb9 0005 05b8 jsr 505b8 <__errno>
free( the_jnode );
}
return 0;
}
4f28c: 246e fff0 moveal %fp@(-16),%a2
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4f290: 2040 moveal %d0,%a0 4f292: 725a moveq #90,%d1 4f294: 70ff moveq #-1,%d0
free( the_jnode );
}
return 0;
}
4f296: 266e fff4 moveal %fp@(-12),%a3 4f29a: 4e5e unlk %fp
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
rtems_set_errno_and_return_minus_one( ENOTEMPTY );
4f29c: 2081 movel %d1,%a0@
free( the_jnode );
}
return 0;
}
4f29e: 4e75 rts
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4f2a0: 4eb9 0005 05b8 jsr 505b8 <__errno>
free( the_jnode );
}
return 0;
}
4f2a6: 246e fff0 moveal %fp@(-16),%a2
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4f2aa: 2040 moveal %d0,%a0 4f2ac: 7210 moveq #16,%d1 4f2ae: 70ff moveq #-1,%d0
free( the_jnode );
}
return 0;
}
4f2b0: 266e fff4 moveal %fp@(-12),%a3 4f2b4: 4e5e unlk %fp
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4f2b6: 2081 movel %d1,%a0@
free( the_jnode );
}
return 0;
}
4f2b8: 4e75 rts
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == pathloc->node_access )
rtems_filesystem_current.node_access = NULL;
4f2ba: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
free( the_jnode );
4f2be: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f2c0: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 4f2c6: 588f addql #4,%sp <== NOT EXECUTED 4f2c8: 4280 clrl %d0 <== NOT EXECUTED 4f2ca: 60a0 bras 4f26c <imfs_dir_rmnod+0x92> <== NOT EXECUTED
0004341a <init_etc_passwd_group>:
/*
* Initialize useable but dummy databases
*/
void init_etc_passwd_group(void)
{
4341a: 4e56 0000 linkw %fp,#0 4341e: 2f0a movel %a2,%sp@- 43420: 2f02 movel %d2,%sp@-
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
43422: 4a39 0006 204c tstb 6204c <etc_passwd_initted.6362>
43428: 670c beqs 43436 <init_etc_passwd_group+0x1c>
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
4342a: 242e fff8 movel %fp@(-8),%d2 4342e: 246e fffc moveal %fp@(-4),%a2 43432: 4e5e unlk %fp 43434: 4e75 rts
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
43436: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
4343a: 45f9 0005 16f4 lea 516f4 <fopen>,%a2
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
mkdir("/etc", 0777);
43440: 4879 0005 fdea pea 5fdea <rtems_status_assoc+0x1a0>
FILE *fp;
static char etc_passwd_initted = 0;
if (etc_passwd_initted)
return;
etc_passwd_initted = 1;
43446: 7001 moveq #1,%d0 43448: 13c0 0006 204c moveb %d0,6204c <etc_passwd_initted.6362>
mkdir("/etc", 0777);
4344e: 4eb9 0004 3c20 jsr 43c20 <mkdir>
/*
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
43454: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> 4345a: 4879 0005 fdef pea 5fdef <rtems_status_assoc+0x1a5> 43460: 4e92 jsr %a2@ 43462: 4fef 0010 lea %sp@(16),%sp 43466: 4a80 tstl %d0
43468: 677e beqs 434e8 <init_etc_passwd_group+0xce> <== ALWAYS TAKEN
fclose(fp);
4346a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4346c: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED 43472: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
43474: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> 4347a: 4879 0005 fe62 pea 5fe62 <rtems_status_assoc+0x218> 43480: 4e92 jsr %a2@ 43482: 508f addql #8,%sp 43484: 4a80 tstl %d0
43486: 6716 beqs 4349e <init_etc_passwd_group+0x84> <== ALWAYS TAKEN
fclose(fp);
43488: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4348a: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
43490: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
/*
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
43494: 588f addql #4,%sp <== NOT EXECUTED
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
}
}
43496: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4349a: 4e5e unlk %fp <== NOT EXECUTED 4349c: 4e75 rts <== NOT EXECUTED
* Initialize /etc/group
*/
if ((fp = fopen("/etc/group", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
4349e: 4879 0005 f4f2 pea 5f4f2 <_rodata_start+0xf2> 434a4: 4879 0005 fe62 pea 5fe62 <rtems_status_assoc+0x218> 434aa: 4eb9 0005 16f4 jsr 516f4 <fopen> 434b0: 508f addql #8,%sp 434b2: 2440 moveal %d0,%a2 434b4: 4a80 tstl %d0 434b6: 6700 ff72 beqw 4342a <init_etc_passwd_group+0x10>
fprintf( fp, "root:x:0:root\n"
434ba: 2f00 movel %d0,%sp@- 434bc: 4878 002a pea 2a <OPER2+0x16> 434c0: 4878 0001 pea 1 <ADD> 434c4: 4879 0005 fe6d pea 5fe6d <rtems_status_assoc+0x223> 434ca: 4eb9 0005 1f1c jsr 51f1c <fwrite>
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
434d0: 2f0a movel %a2,%sp@- 434d2: 4eb9 0005 1072 jsr 51072 <fclose>
} }
434d8: 242e fff8 movel %fp@(-8),%d2
}
else if ((fp = fopen("/etc/group", "w")) != NULL) {
fprintf( fp, "root:x:0:root\n"
"rtems:x:1:rtems\n"
"tty:x:2:tty\n" );
fclose(fp);
434dc: 4fef 0014 lea %sp@(20),%sp
} }
434e0: 246e fffc moveal %fp@(-4),%a2 434e4: 4e5e unlk %fp 434e6: 4e75 rts
* Initialize /etc/passwd
*/
if ((fp = fopen("/etc/passwd", "r")) != NULL) {
fclose(fp);
}
else if ((fp = fopen("/etc/passwd", "w")) != NULL) {
434e8: 4879 0005 f4f2 pea 5f4f2 <_rodata_start+0xf2> 434ee: 4879 0005 fdef pea 5fdef <rtems_status_assoc+0x1a5> 434f4: 4e92 jsr %a2@ 434f6: 508f addql #8,%sp 434f8: 2400 movel %d0,%d2 434fa: 6700 ff78 beqw 43474 <init_etc_passwd_group+0x5a>
fprintf(fp, "root:*:0:0:root::/:/bin/sh\n"
434fe: 2f00 movel %d0,%sp@- 43500: 4878 0066 pea 66 <DBL_MANT_DIG+0x31> 43504: 4878 0001 pea 1 <ADD> 43508: 4879 0005 fdfb pea 5fdfb <rtems_status_assoc+0x1b1> 4350e: 4eb9 0005 1f1c jsr 51f1c <fwrite>
"rtems:*:1:1:RTEMS Application::/:/bin/sh\n"
"tty:!:2:2:tty owner::/:/bin/false\n" );
fclose(fp);
43514: 2f02 movel %d2,%sp@- 43516: 4eb9 0005 1072 jsr 51072 <fclose> 4351c: 4fef 0014 lea %sp@(20),%sp 43520: 6000 ff52 braw 43474 <init_etc_passwd_group+0x5a>
0004654c <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
4654c: 4e56 0000 linkw %fp,#0 46550: 202e 0008 movel %fp@(8),%d0
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
46554: b0b9 0006 3d44 cmpl 63d44 <rtems_libio_number_iops>,%d0
4655a: 643c bccs 46598 <ioctl+0x4c> iop = rtems_libio_iop( fd );
4655c: 2079 0006 5538 moveal 65538 <rtems_libio_iops>,%a0 46562: ed88 lsll #6,%d0 46564: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
46566: 2028 0014 movel %a0@(20),%d0 4656a: 0280 0000 0100 andil #256,%d0
46570: 6726 beqs 46598 <ioctl+0x4c> <== NEVER TAKEN
va_start(ap, command);
buffer = va_arg(ap, void *);
46572: 202e 0010 movel %fp@(16),%d0
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
46576: 2268 003c moveal %a0@(60),%a1 4657a: 4a89 tstl %a1
4657c: 671a beqs 46598 <ioctl+0x4c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
4657e: 2269 0010 moveal %a1@(16),%a1 46582: 4a89 tstl %a1
46584: 6724 beqs 465aa <ioctl+0x5e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
46586: 2f00 movel %d0,%sp@- 46588: 2f2e 000c movel %fp@(12),%sp@- 4658c: 2f08 movel %a0,%sp@- 4658e: 4e91 jsr %a1@
return rc;
46590: 4fef 000c lea %sp@(12),%sp
}
46594: 4e5e unlk %fp 46596: 4e75 rts
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
46598: 4eb9 0005 4924 jsr 54924 <__errno> 4659e: 7209 moveq #9,%d1 465a0: 2040 moveal %d0,%a0 465a2: 70ff moveq #-1,%d0
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
465a4: 4e5e unlk %fp
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
465a6: 2081 movel %d1,%a0@
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
465a8: 4e75 rts
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
465aa: 4eb9 0005 4924 jsr 54924 <__errno> <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
465b0: 4e5e unlk %fp <== NOT EXECUTED
if ( !iop->handlers )
rtems_set_errno_and_return_minus_one( EBADF );
if ( !iop->handlers->ioctl_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
465b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 465b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 465b6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
return rc;
}
...
00044a48 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44a48: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 44a4c: 48d7 040c moveml %d2-%d3/%a2,%sp@ <== NOT EXECUTED 44a50: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 44a54: 222e 0008 movel %fp@(8),%d1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
44a58: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44a5c: 1401 moveb %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
44a5e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44a62: 6704 beqs 44a68 <iproc+0x20> <== NOT EXECUTED
c &= 0x7f;
44a64: 747f moveq #127,%d2 <== NOT EXECUTED 44a66: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
44a68: 0800 0009 btst #9,%d0 <== NOT EXECUTED 44a6c: 6720 beqs 44a8e <iproc+0x46> <== NOT EXECUTED
c = tolower (c);
44a6e: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44a74: 7603 moveq #3,%d3 <== NOT EXECUTED 44a76: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44a7c: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 <== NOT EXECUTED 44a80: 49c1 extbl %d1 <== NOT EXECUTED 44a82: c283 andl %d3,%d1 <== NOT EXECUTED 44a84: 163c 0001 moveb #1,%d3 <== NOT EXECUTED 44a88: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a8a: 6700 00e0 beqw 44b6c <iproc+0x124> <== NOT EXECUTED
if (c == '\r') {
44a8e: 4281 clrl %d1 <== NOT EXECUTED 44a90: 1202 moveb %d2,%d1 <== NOT EXECUTED 44a92: 760d moveq #13,%d3 <== NOT EXECUTED 44a94: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a96: 6740 beqs 44ad8 <iproc+0x90> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
44a98: 760a moveq #10,%d3 <== NOT EXECUTED 44a9a: b681 cmpl %d1,%d3 <== NOT EXECUTED 44a9c: 6700 00c4 beqw 44b62 <iproc+0x11a> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
44aa0: 4a02 tstb %d2 <== NOT EXECUTED 44aa2: 664c bnes 44af0 <iproc+0xa8> <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
44aa4: 2039 0005 fcb0 movel 5fcb0 <rtems_termios_cbufsize>,%d0 <== NOT EXECUTED 44aaa: 5380 subql #1,%d0 <== NOT EXECUTED 44aac: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44ab0: b081 cmpl %d1,%d0 <== NOT EXECUTED 44ab2: 6f28 bles 44adc <iproc+0x94> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
44ab4: 7008 moveq #8,%d0 <== NOT EXECUTED 44ab6: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44aba: 6600 00ba bnew 44b76 <iproc+0x12e> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
44abe: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44ac2: 4280 clrl %d0 <== NOT EXECUTED 44ac4: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44ac8: 5281 addql #1,%d1 <== NOT EXECUTED 44aca: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
} return 0; }
44ace: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44ad4: 4e5e unlk %fp <== NOT EXECUTED 44ad6: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
44ad8: 4a00 tstb %d0 <== NOT EXECUTED 44ada: 6c0c bges 44ae8 <iproc+0xa0> <== NOT EXECUTED
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
44adc: 4280 clrl %d0 <== NOT EXECUTED
} return 0; }
44ade: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44ae4: 4e5e unlk %fp <== NOT EXECUTED 44ae6: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
44ae8: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44aec: 6702 beqs 44af0 <iproc+0xa8> <== NOT EXECUTED 44aee: 740a moveq #10,%d2 <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
44af0: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED 44af4: 0801 0001 btst #1,%d1 <== NOT EXECUTED 44af8: 67aa beqs 44aa4 <iproc+0x5c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
44afa: 4283 clrl %d3 <== NOT EXECUTED 44afc: 162a 0043 moveb %a2@(67),%d3 <== NOT EXECUTED 44b00: 4280 clrl %d0 <== NOT EXECUTED 44b02: 1002 moveb %d2,%d0 <== NOT EXECUTED 44b04: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b06: 6700 0122 beqw 44c2a <iproc+0x1e2> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
44b0a: 4283 clrl %d3 <== NOT EXECUTED 44b0c: 162a 0044 moveb %a2@(68),%d3 <== NOT EXECUTED 44b10: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b12: 6700 00a8 beqw 44bbc <iproc+0x174> <== NOT EXECUTED
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
44b16: 4283 clrl %d3 <== NOT EXECUTED 44b18: 162a 0045 moveb %a2@(69),%d3 <== NOT EXECUTED 44b1c: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b1e: 6700 00fe beqw 44c1e <iproc+0x1d6> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
44b22: 760a moveq #10,%d3 <== NOT EXECUTED 44b24: b680 cmpl %d0,%d3 <== NOT EXECUTED 44b26: 6700 00ac beqw 44bd4 <iproc+0x18c> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL)) echo (c, tty); tty->cbuf[tty->ccount++] = c; return 1; } else if ((c == tty->termios.c_cc[VEOL])
44b2a: 4283 clrl %d3 <== NOT EXECUTED 44b2c: 162a 004c moveb %a2@(76),%d3 <== NOT EXECUTED 44b30: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b32: 670c beqs 44b40 <iproc+0xf8> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
44b34: 4283 clrl %d3 <== NOT EXECUTED 44b36: 162a 0051 moveb %a2@(81),%d3 <== NOT EXECUTED 44b3a: b083 cmpl %d3,%d0 <== NOT EXECUTED 44b3c: 6600 ff66 bnew 44aa4 <iproc+0x5c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
44b40: 44c1 movew %d1,%ccr <== NOT EXECUTED 44b42: 6b58 bmis 44b9c <iproc+0x154> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
44b44: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44b48: 7001 moveq #1,%d0 <== NOT EXECUTED 44b4a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44b4e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44b52: 5281 addql #1,%d1 <== NOT EXECUTED 44b54: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44b58: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44b5e: 4e5e unlk %fp <== NOT EXECUTED 44b60: 4e75 rts <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
44b62: 0800 0006 btst #6,%d0 <== NOT EXECUTED 44b66: 6788 beqs 44af0 <iproc+0xa8> <== NOT EXECUTED 44b68: 740d moveq #13,%d2 <== NOT EXECUTED 44b6a: 6084 bras 44af0 <iproc+0xa8> <== NOT EXECUTED
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
44b6c: 0682 0000 0020 addil #32,%d2 <== NOT EXECUTED 44b72: 6000 ff1a braw 44a8e <iproc+0x46> <== NOT EXECUTED
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44b76: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b78: 4280 clrl %d0 <== NOT EXECUTED 44b7a: 1002 moveb %d2,%d0 <== NOT EXECUTED 44b7c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44b7e: 4eba fc30 jsr %pc@(447b0 <echo>) <== NOT EXECUTED 44b82: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44b86: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44b88: 4280 clrl %d0 <== NOT EXECUTED 44b8a: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44b8e: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44b92: 5281 addql #1,%d1 <== NOT EXECUTED 44b94: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44b98: 6000 ff34 braw 44ace <iproc+0x86> <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44b9c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b9e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44ba0: 4eba fc0e jsr %pc@(447b0 <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44ba4: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
|| (c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44ba8: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44baa: 7001 moveq #1,%d0 <== NOT EXECUTED 44bac: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44bb0: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44bb4: 5281 addql #1,%d1 <== NOT EXECUTED 44bb6: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44bba: 609c bras 44b58 <iproc+0x110> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
44bbc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44bc0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44bc2: 4eba fc90 jsr %pc@(44854 <erase>) <== NOT EXECUTED
return 0;
44bc6: 508f addql #8,%sp <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
44bc8: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44bca: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44bd0: 4e5e unlk %fp <== NOT EXECUTED 44bd2: 4e75 rts <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
44bd4: 7048 moveq #72,%d0 <== NOT EXECUTED 44bd6: c280 andl %d0,%d1 <== NOT EXECUTED 44bd8: 6620 bnes 44bfa <iproc+0x1b2> <== NOT EXECUTED
echo (c, tty); tty->cbuf[tty->ccount++] = c;
44bda: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 44bde: 7001 moveq #1,%d0 <== NOT EXECUTED 44be0: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44be4: 740a moveq #10,%d2 <== NOT EXECUTED 44be6: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44bea: 5281 addql #1,%d1 <== NOT EXECUTED 44bec: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44bf0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44bf6: 4e5e unlk %fp <== NOT EXECUTED 44bf8: 4e75 rts <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
44bfa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44bfc: 4878 000a pea a <LASTO> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44c00: 740a moveq #10,%d2 <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
44c02: 4eba fbac jsr %pc@(447b0 <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44c06: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
}
else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
44c0a: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44c0c: 7001 moveq #1,%d0 <== NOT EXECUTED 44c0e: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44c12: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44c16: 5281 addql #1,%d1 <== NOT EXECUTED 44c18: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44c1c: 60d2 bras 44bf0 <iproc+0x1a8> <== NOT EXECUTED
}
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
44c1e: 7001 moveq #1,%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44c20: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44c26: 4e5e unlk %fp <== NOT EXECUTED 44c28: 4e75 rts <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
44c2a: 42a7 clrl %sp@- <== NOT EXECUTED 44c2c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c2e: 4eba fc24 jsr %pc@(44854 <erase>) <== NOT EXECUTED
return 0;
44c32: 508f addql #8,%sp <== NOT EXECUTED
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
44c34: 4280 clrl %d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; }
44c36: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44c3c: 4e5e unlk %fp <== NOT EXECUTED
0004f850 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
4f850: 4e56 ffd0 linkw %fp,#-48 4f854: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4f858: 262e 000c movel %fp@(12),%d3 4f85c: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
4f860: 4eb9 0004 be98 jsr 4be98 <getpid> 4f866: b0ae 0008 cmpl %fp@(8),%d0 4f86a: 6600 022c bnew 4fa98 <killinfo+0x248>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
4f86e: 4a83 tstl %d3 4f870: 6700 023e beqw 4fab0 <killinfo+0x260>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
4f874: 2003 movel %d3,%d0 4f876: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
4f878: 721f moveq #31,%d1 4f87a: b280 cmpl %d0,%d1 4f87c: 6500 0232 bcsw 4fab0 <killinfo+0x260>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
4f880: 2203 movel %d3,%d1 4f882: 2803 movel %d3,%d4 4f884: 7e01 moveq #1,%d7 4f886: e589 lsll #2,%d1 4f888: e98c lsll #4,%d4 4f88a: 9881 subl %d1,%d4 4f88c: 2044 moveal %d4,%a0 4f88e: d1fc 0006 18d6 addal #399574,%a0 4f894: be90 cmpl %a0@,%d7 4f896: 6700 00d4 beqw 4f96c <killinfo+0x11c>
/* * 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 ) )
4f89a: 7208 moveq #8,%d1 4f89c: b283 cmpl %d3,%d1 4f89e: 6700 00d8 beqw 4f978 <killinfo+0x128> 4f8a2: 7e04 moveq #4,%d7 4f8a4: be83 cmpl %d3,%d7 4f8a6: 6700 00d0 beqw 4f978 <killinfo+0x128> 4f8aa: 123c 000b moveb #11,%d1 4f8ae: b283 cmpl %d3,%d1 4f8b0: 6700 00c6 beqw 4f978 <killinfo+0x128>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
4f8b4: 7401 moveq #1,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
4f8b6: 7e01 moveq #1,%d7 4f8b8: e1aa lsll %d0,%d2
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
4f8ba: 2d43 fff4 movel %d3,%fp@(-12)
siginfo->si_code = SI_USER;
4f8be: 2d47 fff8 movel %d7,%fp@(-8)
if ( !value ) {
4f8c2: 4a8a tstl %a2 4f8c4: 6700 01ca beqw 4fa90 <killinfo+0x240>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
4f8c8: 2d52 fffc movel %a2@,%fp@(-4)
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4f8cc: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 4f8d2: 5280 addql #1,%d0 4f8d4: 23c0 0006 142c movel %d0,6142c <_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;
4f8da: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f8e0: 206a 010e moveal %a2@(270),%a0 4f8e4: 2028 00cc movel %a0@(204),%d0 4f8e8: 4680 notl %d0 4f8ea: c082 andl %d2,%d0
4f8ec: 6642 bnes 4f930 <killinfo+0xe0>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
4f8ee: 2079 0006 1a5a moveal 61a5a <_POSIX_signals_Wait_queue>,%a0 4f8f4: b1fc 0006 1a5e cmpal #399966,%a0 4f8fa: 6700 00ec beqw 4f9e8 <killinfo+0x198>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f8fe: 2002 movel %d2,%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;
4f900: 2448 moveal %a0,%a2
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f902: 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 ];
4f906: 2268 010e moveal %a0@(270),%a1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f90a: 6624 bnes 4f930 <killinfo+0xe0>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
4f90c: 2029 00cc movel %a1@(204),%d0 4f910: 4680 notl %d0 4f912: c082 andl %d2,%d0
4f914: 661a bnes 4f930 <killinfo+0xe0>
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 ) {
4f916: 2050 moveal %a0@,%a0
the_thread = (Thread_Control *)the_node;
4f918: 2448 moveal %a0,%a2
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
4f91a: b1fc 0006 1a5e cmpal #399966,%a0 4f920: 6700 00c6 beqw 4f9e8 <killinfo+0x198>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f924: 2002 movel %d2,%d0 <== NOT EXECUTED 4f926: c0a8 0030 andl %a0@(48),%d0 <== NOT EXECUTED
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4f92a: 2268 010e moveal %a0@(270),%a1 <== NOT EXECUTED
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
4f92e: 67dc beqs 4f90c <killinfo+0xbc> <== NOT EXECUTED
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
4f930: 7001 moveq #1,%d0 4f932: 1540 0074 moveb %d0,%a2@(116)
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
4f936: 486e fff4 pea %fp@(-12) 4f93a: 2f03 movel %d3,%sp@- 4f93c: 2f0a movel %a2,%sp@- 4f93e: 4eb9 0004 fce0 jsr 4fce0 <_POSIX_signals_Unblock_thread> 4f944: 4fef 000c lea %sp@(12),%sp 4f948: 4a00 tstb %d0 4f94a: 6600 008a bnew 4f9d6 <killinfo+0x186>
/*
* 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 );
4f94e: 2f02 movel %d2,%sp@- 4f950: 4eb9 0004 fcb0 jsr 4fcb0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
4f956: 588f addql #4,%sp 4f958: 41f9 0006 18ce lea 618ce <_POSIX_signals_Vectors>,%a0 4f95e: 7202 moveq #2,%d1 4f960: b2b0 4800 cmpl %a0@(00000000,%d4:l),%d1
4f964: 672e beqs 4f994 <killinfo+0x144>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
4f966: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f96c: 4280 clrl %d0
return 0; }
4f96e: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f974: 4e5e unlk %fp 4f976: 4e75 rts
* 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 ) )
return pthread_kill( pthread_self(), sig );
4f978: 4eb9 0004 ff88 jsr 4ff88 <pthread_self> 4f97e: 2f03 movel %d3,%sp@- 4f980: 2f00 movel %d0,%sp@- 4f982: 4eb9 0004 feac jsr 4feac <pthread_kill> 4f988: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4f98a: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f990: 4e5e unlk %fp 4f992: 4e75 rts
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
4f994: 4879 0006 1a4e pea 61a4e <_POSIX_signals_Inactive_siginfo> 4f99a: 4eb9 0004 71d0 jsr 471d0 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
4f9a0: 588f addql #4,%sp
*/
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
4f9a2: 2040 moveal %d0,%a0
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
4f9a4: 4a80 tstl %d0 4f9a6: 6700 0120 beqw 4fac8 <killinfo+0x278>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
4f9aa: 216e fff4 0008 movel %fp@(-12),%a0@(8)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4f9b0: 0684 0006 1ac6 addil #400070,%d4
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
4f9b6: 216e fff8 000c movel %fp@(-8),%a0@(12) 4f9bc: 216e fffc 0010 movel %fp@(-4),%a0@(16)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
4f9c2: 2f00 movel %d0,%sp@- 4f9c4: 2f04 movel %d4,%sp@- 4f9c6: 4eb9 0004 7170 jsr 47170 <_Chain_Append> 4f9cc: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
4f9ce: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f9d4: 6096 bras 4f96c <killinfo+0x11c>
/*
* 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 ) ) {
_Thread_Enable_dispatch();
4f9d6: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4f9dc: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4f9de: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4f9e4: 4e5e unlk %fp 4f9e6: 4e75 rts
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4f9e8: 4285 clrl %d5 4f9ea: 1a39 0005 fc52 moveb 5fc52 <rtems_maximum_priority>,%d5 4f9f0: 49f9 0006 13ec lea 613ec <_Objects_Information_table+0x8>,%a4
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
4f9f6: 95ca subal %a2,%a2
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
4f9f8: 5285 addql #1,%d5
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and ITRON is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
4f9fa: 2054 moveal %a4@,%a0 4f9fc: 4a88 tstl %a0
4f9fe: 675e beqs 4fa5e <killinfo+0x20e>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
4fa00: 2068 0004 moveal %a0@(4),%a0
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
4fa04: 4286 clrl %d6 4fa06: 3c28 000e movew %a0@(14),%d6
object_table = the_info->local_table;
4fa0a: 2268 0018 moveal %a0@(24),%a1
for ( index = 1 ; index <= maximum ; index++ ) {
4fa0e: 4a86 tstl %d6
4fa10: 674c beqs 4fa5e <killinfo+0x20e>
4fa12: 5889 addql #4,%a1 4fa14: 7001 moveq #1,%d0
the_thread = (Thread_Control *) object_table[ index ];
4fa16: 2051 moveal %a1@,%a0
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
4fa18: 5280 addql #1,%d0 4fa1a: 5889 addql #4,%a1
the_thread = (Thread_Control *) object_table[ index ];
if ( !the_thread )
4fa1c: 4a88 tstl %a0
4fa1e: 673a beqs 4fa5a <killinfo+0x20a>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
4fa20: 2228 0014 movel %a0@(20),%d1 4fa24: ba81 cmpl %d1,%d5
4fa26: 6532 bcss 4fa5a <killinfo+0x20a>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4fa28: 2668 010e moveal %a0@(270),%a3 4fa2c: 2e2b 00cc movel %a3@(204),%d7 4fa30: 4687 notl %d7 4fa32: ce82 andl %d2,%d7
4fa34: 6724 beqs 4fa5a <killinfo+0x20a>
*
* 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 ) {
4fa36: ba81 cmpl %d1,%d5
4fa38: 621c bhis 4fa56 <killinfo+0x206>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
4fa3a: 2e2a 0010 movel %a2@(16),%d7
4fa3e: 671a beqs 4fa5a <killinfo+0x20a> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
4fa40: 2668 0010 moveal %a0@(16),%a3 4fa44: 4a8b tstl %a3
4fa46: 670e beqs 4fa56 <killinfo+0x206>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
4fa48: 0807 001c btst #28,%d7
4fa4c: 660c bnes 4fa5a <killinfo+0x20a>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
4fa4e: 2e0b movel %a3,%d7 4fa50: 0807 001c btst #28,%d7
4fa54: 6704 beqs 4fa5a <killinfo+0x20a>
4fa56: 2a01 movel %d1,%d5 4fa58: 2448 moveal %a0,%a2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
4fa5a: b086 cmpl %d6,%d0
4fa5c: 63b8 blss 4fa16 <killinfo+0x1c6>
4fa5e: 588c addql #4,%a4
* + 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++) {
4fa60: b9fc 0006 13f8 cmpal #398328,%a4
4fa66: 6692 bnes 4f9fa <killinfo+0x1aa>
}
}
}
}
if ( interested ) {
4fa68: 4a8a tstl %a2 4fa6a: 6700 fee2 beqw 4f94e <killinfo+0xfe>
* thread needs to do the post context switch extension so it can
* evaluate the signals pending.
*/
process_it:
the_thread->do_post_task_switch_extension = true;
4fa6e: 7001 moveq #1,%d0 4fa70: 1540 0074 moveb %d0,%a2@(116)
/*
* Returns true if the signal was synchronously given to a thread
* blocked waiting for the signal.
*/
if ( _POSIX_signals_Unblock_thread( the_thread, sig, siginfo ) ) {
4fa74: 486e fff4 pea %fp@(-12) 4fa78: 2f03 movel %d3,%sp@- 4fa7a: 2f0a movel %a2,%sp@- 4fa7c: 4eb9 0004 fce0 jsr 4fce0 <_POSIX_signals_Unblock_thread> 4fa82: 4fef 000c lea %sp@(12),%sp 4fa86: 4a00 tstb %d0 4fa88: 6700 fec4 beqw 4f94e <killinfo+0xfe>
4fa8c: 6000 ff48 braw 4f9d6 <killinfo+0x186> <== NOT EXECUTED
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
4fa90: 42ae fffc clrl %fp@(-4) 4fa94: 6000 fe36 braw 4f8cc <killinfo+0x7c>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
4fa98: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fa9e: 7603 moveq #3,%d3 4faa0: 2040 moveal %d0,%a0 4faa2: 70ff moveq #-1,%d0 4faa4: 2083 movel %d3,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4faa6: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4faac: 4e5e unlk %fp 4faae: 4e75 rts
*/
if ( !sig )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
rtems_set_errno_and_return_minus_one( EINVAL );
4fab0: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fab6: 7416 moveq #22,%d2 4fab8: 2040 moveal %d0,%a0 4faba: 70ff moveq #-1,%d0 4fabc: 2082 movel %d2,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fabe: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4 4fac4: 4e5e unlk %fp 4fac6: 4e75 rts
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
4fac8: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
4face: 4eb9 0005 05b8 jsr 505b8 <__errno> 4fad4: 720b moveq #11,%d1 4fad6: 2040 moveal %d0,%a0 4fad8: 70ff moveq #-1,%d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fada: 4cee 1cfc ffd0 moveml %fp@(-48),%d2-%d7/%a2-%a4
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
4fae0: 2081 movel %d1,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
4fae2: 4e5e unlk %fp
...
000443b4 <link>:
int link(
const char *existing,
const char *new
)
{
443b4: 4e56 ffc0 linkw %fp,#-64 443b8: 48d7 003c moveml %d2-%d5,%sp@ 443bc: 242e 0008 movel %fp@(8),%d2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
443c0: 260e movel %fp,%d3 443c2: 0683 ffff ffe4 addil #-28,%d3 443c8: 2f02 movel %d2,%sp@-
int link(
const char *existing,
const char *new
)
{
443ca: 282e 000c movel %fp@(12),%d4
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
443ce: 4eb9 0005 3048 jsr 53048 <strlen> 443d4: 7201 moveq #1,%d1 443d6: 2e81 movel %d1,%sp@ 443d8: 2f03 movel %d3,%sp@- 443da: 42a7 clrl %sp@- 443dc: 2f00 movel %d0,%sp@- 443de: 2f02 movel %d2,%sp@- 443e0: 4eb9 0004 3e98 jsr 43e98 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
443e6: 4fef 0014 lea %sp@(20),%sp 443ea: 4a80 tstl %d0
443ec: 670e beqs 443fc <link+0x48>
443ee: 74ff moveq #-1,%d2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
443f0: 2002 movel %d2,%d0 443f2: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 443f8: 4e5e unlk %fp 443fa: 4e75 rts
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
443fc: 2a0e movel %fp,%d5 443fe: 0685 ffff ffd0 addil #-48,%d5 44404: 2f05 movel %d5,%sp@- 44406: 486e fffc pea %fp@(-4) 4440a: 2f04 movel %d4,%sp@- 4440c: 4eb9 0004 5408 jsr 45408 <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
44412: 206e ffdc moveal %fp@(-36),%a0 44416: 4fef 000c lea %sp@(12),%sp 4441a: 2068 0004 moveal %a0@(4),%a0 4441e: 4a88 tstl %a0 44420: 6700 00f2 beqw 44514 <link+0x160>
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
44424: 486e fff8 pea %fp@(-8) 44428: 2f05 movel %d5,%sp@- 4442a: d8ae fffc addl %fp@(-4),%d4 4442e: 2f04 movel %d4,%sp@- 44430: 4e90 jsr %a0@
if ( result != 0 ) {
44432: 4fef 000c lea %sp@(12),%sp
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
44436: 2800 movel %d0,%d4
if ( result != 0 ) {
44438: 6600 00ac bnew 444e6 <link+0x132>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
4443c: 202e fff4 movel %fp@(-12),%d0 44440: b0ae ffe0 cmpl %fp@(-32),%d0
44444: 665a bnes 444a0 <link+0xec>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
44446: 226e ffdc moveal %fp@(-36),%a1 4444a: 2069 0008 moveal %a1@(8),%a0 4444e: 4a88 tstl %a0 44450: 6700 00f4 beqw 44546 <link+0x192>
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
44454: 2f2e fff8 movel %fp@(-8),%sp@- 44458: 2f05 movel %d5,%sp@- 4445a: 2f03 movel %d3,%sp@- 4445c: 4e90 jsr %a0@
rtems_filesystem_freenode( &existing_loc );
4445e: 206e fff0 moveal %fp@(-16),%a0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
44462: 2400 movel %d0,%d2
rtems_filesystem_freenode( &existing_loc );
44464: 4fef 000c lea %sp@(12),%sp 44468: 4a88 tstl %a0
4446a: 670e beqs 4447a <link+0xc6> <== NEVER TAKEN
4446c: 2068 001c moveal %a0@(28),%a0 44470: 4a88 tstl %a0
44472: 6706 beqs 4447a <link+0xc6> <== NEVER TAKEN
44474: 2f03 movel %d3,%sp@- 44476: 4e90 jsr %a0@ 44478: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
4447a: 206e ffdc moveal %fp@(-36),%a0 4447e: 4a88 tstl %a0 44480: 6700 ff6e beqw 443f0 <link+0x3c> 44484: 2068 001c moveal %a0@(28),%a0 44488: 4a88 tstl %a0 4448a: 6700 ff64 beqw 443f0 <link+0x3c> 4448e: 2f05 movel %d5,%sp@- 44490: 4e90 jsr %a0@ 44492: 588f addql #4,%sp
return result;
}
44494: 2002 movel %d2,%d0 44496: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 4449c: 4e5e unlk %fp 4449e: 4e75 rts
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
rtems_filesystem_freenode( &existing_loc );
444a0: 206e fff0 moveal %fp@(-16),%a0 444a4: 4a88 tstl %a0
444a6: 670e beqs 444b6 <link+0x102> <== NEVER TAKEN
444a8: 2068 001c moveal %a0@(28),%a0 444ac: 4a88 tstl %a0
444ae: 6706 beqs 444b6 <link+0x102> <== NEVER TAKEN
444b0: 2f03 movel %d3,%sp@- 444b2: 4e90 jsr %a0@ 444b4: 588f addql #4,%sp
rtems_filesystem_freenode( &parent_loc );
444b6: 206e ffdc moveal %fp@(-36),%a0 444ba: 4a88 tstl %a0
444bc: 670e beqs 444cc <link+0x118> <== NEVER TAKEN
444be: 2068 001c moveal %a0@(28),%a0 444c2: 4a88 tstl %a0
444c4: 6706 beqs 444cc <link+0x118> <== NEVER TAKEN
444c6: 2f05 movel %d5,%sp@- 444c8: 4e90 jsr %a0@ 444ca: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EXDEV );
444cc: 4eb9 0005 1b7c jsr 51b7c <__errno> 444d2: 74ff moveq #-1,%d2 444d4: 2040 moveal %d0,%a0 444d6: 7012 moveq #18,%d0 444d8: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
444da: 2002 movel %d2,%d0 444dc: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 444e2: 4e5e unlk %fp 444e4: 4e75 rts
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
444e6: 206e fff0 moveal %fp@(-16),%a0 444ea: 4a88 tstl %a0
444ec: 670e beqs 444fc <link+0x148> <== NEVER TAKEN
444ee: 2068 001c moveal %a0@(28),%a0 444f2: 4a88 tstl %a0
444f4: 6706 beqs 444fc <link+0x148> <== NEVER TAKEN
444f6: 2f03 movel %d3,%sp@- 444f8: 4e90 jsr %a0@ 444fa: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( result );
444fc: 4eb9 0005 1b7c jsr 51b7c <__errno> 44502: 74ff moveq #-1,%d2 44504: 2040 moveal %d0,%a0
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
44506: 2002 movel %d2,%d0
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
rtems_set_errno_and_return_minus_one( result );
44508: 2084 movel %d4,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
4450a: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 44510: 4e5e unlk %fp 44512: 4e75 rts
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
if ( !parent_loc.ops->evalformake_h ) {
rtems_filesystem_freenode( &existing_loc );
44514: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 44518: 4a88 tstl %a0 <== NOT EXECUTED 4451a: 670e beqs 4452a <link+0x176> <== NOT EXECUTED 4451c: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44520: 4a88 tstl %a0 <== NOT EXECUTED 44522: 6706 beqs 4452a <link+0x176> <== NOT EXECUTED 44524: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44526: 4e90 jsr %a0@ <== NOT EXECUTED 44528: 588f addql #4,%sp <== NOT EXECUTED
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4452a: 4eb9 0005 1b7c jsr 51b7c <__errno> <== NOT EXECUTED 44530: 74ff moveq #-1,%d2 <== NOT EXECUTED 44532: 2040 moveal %d0,%a0 <== NOT EXECUTED 44534: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
4453a: 2002 movel %d2,%d0 <== NOT EXECUTED 4453c: 4cee 003c ffc0 moveml %fp@(-64),%d2-%d5 <== NOT EXECUTED 44542: 4e5e unlk %fp <== NOT EXECUTED 44544: 4e75 rts <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
44546: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4454a: 4a88 tstl %a0 <== NOT EXECUTED 4454c: 6712 beqs 44560 <link+0x1ac> <== NOT EXECUTED 4454e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 44552: 4a88 tstl %a0 <== NOT EXECUTED 44554: 670a beqs 44560 <link+0x1ac> <== NOT EXECUTED 44556: 2f03 movel %d3,%sp@- <== NOT EXECUTED 44558: 4e90 jsr %a0@ <== NOT EXECUTED 4455a: 226e ffdc moveal %fp@(-36),%a1 <== NOT EXECUTED 4455e: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
44560: 4a89 tstl %a1 <== NOT EXECUTED 44562: 67c6 beqs 4452a <link+0x176> <== NOT EXECUTED 44564: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 44568: 4a88 tstl %a0 <== NOT EXECUTED 4456a: 67be beqs 4452a <link+0x176> <== NOT EXECUTED 4456c: 2f05 movel %d5,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4456e: 74ff moveq #-1,%d2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
}
if ( !parent_loc.ops->link_h ) {
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
44570: 4e90 jsr %a0@ <== NOT EXECUTED 44572: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
44574: 4eb9 0005 1b7c jsr 51b7c <__errno> <== NOT EXECUTED 4457a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4457c: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 44582: 60b6 bras 4453a <link+0x186> <== NOT EXECUTED
0005d69c <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
5d69c: 4e56 ffe4 linkw %fp,#-28 5d6a0: 222e 0008 movel %fp@(8),%d1 5d6a4: 48d7 04fc moveml %d2-%d7/%a2,%sp@ 5d6a8: 202e 0014 movel %fp@(20),%d0 5d6ac: 282e 000c movel %fp@(12),%d4 5d6b0: 2a2e 0010 movel %fp@(16),%d5
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
5d6b4: b2b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d1 5d6ba: 6400 0118 bccw 5d7d4 <lseek+0x138>
iop = rtems_libio_iop( fd );
5d6be: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 5d6c4: ed89 lsll #6,%d1 5d6c6: d5c1 addal %d1,%a2
rtems_libio_check_is_open(iop);
5d6c8: 222a 0014 movel %a2@(20),%d1 5d6cc: 0281 0000 0100 andil #256,%d1 5d6d2: 6700 0100 beqw 5d7d4 <lseek+0x138>
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
5d6d6: 206a 003c moveal %a2@(60),%a0 5d6da: 4aa8 0014 tstl %a0@(20) 5d6de: 6700 0112 beqw 5d7f2 <lseek+0x156>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
5d6e2: 7201 moveq #1,%d1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
5d6e4: 242a 000c movel %a2@(12),%d2 5d6e8: 262a 0010 movel %a2@(16),%d3
switch ( whence ) {
5d6ec: b280 cmpl %d0,%d1 5d6ee: 6700 00ae beqw 5d79e <lseek+0x102> 5d6f2: 7c02 moveq #2,%d6 5d6f4: bc80 cmpl %d0,%d6
5d6f6: 6752 beqs 5d74a <lseek+0xae>
5d6f8: 4a80 tstl %d0 5d6fa: 6600 0084 bnew 5d780 <lseek+0xe4>
case SEEK_SET:
iop->offset = offset;
5d6fe: 2544 000c movel %d4,%a2@(12) 5d702: 2545 0010 movel %d5,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d706: 2f00 movel %d0,%sp@- 5d708: 2f05 movel %d5,%sp@- 5d70a: 2f04 movel %d4,%sp@- 5d70c: 2f0a movel %a2,%sp@- 5d70e: 2068 0014 moveal %a0@(20),%a0 5d712: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5d714: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d718: 2800 movel %d0,%d4 5d71a: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5d71c: 70ff moveq #-1,%d0 5d71e: 72ff moveq #-1,%d1 5d720: 9285 subl %d5,%d1 5d722: 9184 subxl %d4,%d0
5d724: 670e beqs 5d734 <lseek+0x98> <== NEVER TAKEN
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5d726: 2205 movel %d5,%d1 5d728: 2004 movel %d4,%d0 5d72a: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5d730: 4e5e unlk %fp 5d732: 4e75 rts 5d734: 2205 movel %d5,%d1 5d736: 2004 movel %d4,%d0
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
if ( status == (off_t) -1 )
iop->offset = old_offset;
5d738: 2542 000c movel %d2,%a2@(12) 5d73c: 2543 0010 movel %d3,%a2@(16)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5d740: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5d746: 4e5e unlk %fp 5d748: 4e75 rts
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
5d74a: 2c2a 0004 movel %a2@(4),%d6 5d74e: 2e2a 0008 movel %a2@(8),%d7 5d752: de85 addl %d5,%d7 5d754: dd84 addxl %d4,%d6 5d756: 2546 000c movel %d6,%a2@(12) 5d75a: 2547 0010 movel %d7,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d75e: 2f00 movel %d0,%sp@- 5d760: 2f05 movel %d5,%sp@- 5d762: 2f04 movel %d4,%sp@- 5d764: 2f0a movel %a2,%sp@- 5d766: 2068 0014 moveal %a0@(20),%a0 5d76a: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5d76c: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d770: 2800 movel %d0,%d4 5d772: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5d774: 70ff moveq #-1,%d0 5d776: 72ff moveq #-1,%d1 5d778: 9285 subl %d5,%d1 5d77a: 9184 subxl %d4,%d0
5d77c: 66a8 bnes 5d726 <lseek+0x8a>
5d77e: 60b4 bras 5d734 <lseek+0x98>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
5d780: 4eb9 0005 05b8 jsr 505b8 <__errno> 5d786: 2040 moveal %d0,%a0 5d788: 7016 moveq #22,%d0 5d78a: 78ff moveq #-1,%d4 5d78c: 7aff moveq #-1,%d5 5d78e: 2080 movel %d0,%a0@
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5d790: 2205 movel %d5,%d1 5d792: 2004 movel %d4,%d0 5d794: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 5d79a: 4e5e unlk %fp 5d79c: 4e75 rts
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
5d79e: 2c04 movel %d4,%d6 5d7a0: 2e05 movel %d5,%d7 5d7a2: de83 addl %d3,%d7 5d7a4: dd82 addxl %d2,%d6 5d7a6: 2546 000c movel %d6,%a2@(12) 5d7aa: 2547 0010 movel %d7,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d7ae: 2f00 movel %d0,%sp@- 5d7b0: 2f05 movel %d5,%sp@- 5d7b2: 2f04 movel %d4,%sp@- 5d7b4: 2f0a movel %a2,%sp@- 5d7b6: 2068 0014 moveal %a0@(20),%a0 5d7ba: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5d7bc: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
5d7c0: 2800 movel %d0,%d4 5d7c2: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5d7c4: 70ff moveq #-1,%d0 5d7c6: 72ff moveq #-1,%d1 5d7c8: 9285 subl %d5,%d1 5d7ca: 9184 subxl %d4,%d0 5d7cc: 6600 ff58 bnew 5d726 <lseek+0x8a>
5d7d0: 6000 ff62 braw 5d734 <lseek+0x98> <== NOT EXECUTED
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
5d7d4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5d7da: 7209 moveq #9,%d1 <== NOT EXECUTED 5d7dc: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d7de: 78ff moveq #-1,%d4 <== NOT EXECUTED 5d7e0: 7aff moveq #-1,%d5 <== NOT EXECUTED 5d7e2: 2081 movel %d1,%a0@ <== NOT EXECUTED
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5d7e4: 2205 movel %d5,%d1 <== NOT EXECUTED 5d7e6: 2004 movel %d4,%d0 <== NOT EXECUTED 5d7e8: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5d7ee: 4e5e unlk %fp <== NOT EXECUTED 5d7f0: 4e75 rts <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d7f2: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5d7f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d7fa: 78ff moveq #-1,%d4 <== NOT EXECUTED 5d7fc: 7aff moveq #-1,%d5 <== NOT EXECUTED 5d7fe: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5d804: 2205 movel %d5,%d1 <== NOT EXECUTED 5d806: 2004 movel %d4,%d0 <== NOT EXECUTED 5d808: 4cee 04fc ffe4 moveml %fp@(-28),%d2-%d7/%a2 <== NOT EXECUTED 5d80e: 4e5e unlk %fp <== NOT EXECUTED
00043108 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
43108: 4e56 fff4 linkw %fp,#-12 4310c: 52b9 0006 12e8 addql #1,612e8 <rtems_malloc_statistics+0x4> 43112: 48d7 001c moveml %d2-%d4,%sp@ 43116: 262e 0008 movel %fp@(8),%d3
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4311a: 4eb9 0004 2ff2 jsr 42ff2 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
43120: 4a83 tstl %d3
43122: 6764 beqs 43188 <malloc+0x80> <== NEVER TAKEN
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
43124: 7003 moveq #3,%d0 43126: b0b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d0
4312c: 6750 beqs 4317e <malloc+0x76>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
4312e: 42a7 clrl %sp@- 43130: 42a7 clrl %sp@- 43132: 2f03 movel %d3,%sp@- 43134: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 4313a: 4eb9 0004 82fc jsr 482fc <_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 ) {
43140: 4fef 0010 lea %sp@(16),%sp 43144: 2400 movel %d0,%d2
43146: 675c beqs 431a4 <malloc+0x9c>
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
return (void *) 0;
43148: 2800 movel %d0,%d4
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
4314a: 2079 0006 025e moveal 6025e <rtems_malloc_dirty_helper>,%a0 43150: 4a88 tstl %a0
43152: 6708 beqs 4315c <malloc+0x54> <== ALWAYS TAKEN
(*rtems_malloc_dirty_helper)( return_this, size );
43154: 2f03 movel %d3,%sp@- <== NOT EXECUTED 43156: 2f04 movel %d4,%sp@- <== NOT EXECUTED 43158: 4e90 jsr %a0@ <== NOT EXECUTED 4315a: 508f addql #8,%sp <== NOT EXECUTED
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4315c: 2079 0006 0256 moveal 60256 <rtems_malloc_statistics_helpers>,%a0 43162: 4a88 tstl %a0
43164: 6730 beqs 43196 <malloc+0x8e> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
43166: 2f04 movel %d4,%sp@- <== NOT EXECUTED 43168: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 4316c: 2404 movel %d4,%d2 <== NOT EXECUTED 4316e: 4e90 jsr %a0@ <== NOT EXECUTED 43170: 588f addql #4,%sp <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
43172: 2002 movel %d2,%d0 <== NOT EXECUTED 43174: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 4317a: 4e5e unlk %fp <== NOT EXECUTED 4317c: 4e75 rts <== NOT EXECUTED
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4317e: 4eb9 0004 2f98 jsr 42f98 <malloc_is_system_state_OK> 43184: 4a00 tstb %d0
43186: 66a6 bnes 4312e <malloc+0x26> <== ALWAYS TAKEN
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
43188: 4282 clrl %d2 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
4318a: 2002 movel %d2,%d0 <== NOT EXECUTED 4318c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 43192: 4e5e unlk %fp <== NOT EXECUTED 43194: 4e75 rts <== NOT EXECUTED
(*rtems_malloc_dirty_helper)( return_this, size );
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
43196: 2404 movel %d4,%d2
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
43198: 2002 movel %d2,%d0 4319a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 431a0: 4e5e unlk %fp 431a2: 4e75 rts
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
431a4: 2079 0006 025a moveal 6025a <rtems_malloc_sbrk_helpers>,%a0 431aa: 4a88 tstl %a0
431ac: 670e beqs 431bc <malloc+0xb4> <== ALWAYS TAKEN
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
431ae: 2f03 movel %d3,%sp@- <== NOT EXECUTED 431b0: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 431b4: 4e90 jsr %a0@ <== NOT EXECUTED
if ( !return_this ) {
431b6: 588f addql #4,%sp <== NOT EXECUTED
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
431b8: 2800 movel %d0,%d4 <== NOT EXECUTED
if ( !return_this ) {
431ba: 668e bnes 4314a <malloc+0x42> <== NOT EXECUTED
errno = ENOMEM;
431bc: 4eb9 0005 05b8 jsr 505b8 <__errno> 431c2: 2040 moveal %d0,%a0 431c4: 700c moveq #12,%d0 431c6: 2080 movel %d0,%a0@
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
431c8: 2002 movel %d2,%d0 431ca: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
431d0: 4e5e unlk %fp <== NOT EXECUTED
00042fd8 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
42fd8: 4e56 0000 linkw %fp,#0 <== 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 );
42fdc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42fe0: 4879 0006 12d8 pea 612d8 <RTEMS_Malloc_GC_list> <== NOT EXECUTED 42fe6: 4eb9 0004 7170 jsr 47170 <_Chain_Append> <== NOT EXECUTED 42fec: 508f addql #8,%sp <== NOT EXECUTED
rtems_chain_append(&RTEMS_Malloc_GC_list, (rtems_chain_node *)pointer); }
42fee: 4e5e unlk %fp <== NOT EXECUTED
00042ff2 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
42ff2: 4e56 0000 linkw %fp,#0 42ff6: 2f0b movel %a3,%sp@-
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
free(to_be_freed);
42ff8: 47f9 0004 2ddc lea 42ddc <free>,%a3
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
42ffe: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
43000: 4879 0006 12d8 pea 612d8 <RTEMS_Malloc_GC_list> 43006: 45f9 0004 71d0 lea 471d0 <_Chain_Get>,%a2 4300c: 4e92 jsr %a2@
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
4300e: 588f addql #4,%sp 43010: 4a80 tstl %d0
43012: 6714 beqs 43028 <malloc_deferred_frees_process+0x36><== ALWAYS TAKEN
free(to_be_freed);
43014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43016: 4e93 jsr %a3@ <== NOT EXECUTED 43018: 588f addql #4,%sp <== NOT EXECUTED 4301a: 4879 0006 12d8 pea 612d8 <RTEMS_Malloc_GC_list> <== NOT EXECUTED 43020: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_chain_node *to_be_freed;
/*
* If some free's have been deferred, then do them now.
*/
while ((to_be_freed = rtems_chain_get(&RTEMS_Malloc_GC_list)) != NULL)
43022: 588f addql #4,%sp <== NOT EXECUTED 43024: 4a80 tstl %d0 <== NOT EXECUTED 43026: 66ec bnes 43014 <malloc_deferred_frees_process+0x22><== NOT EXECUTED
free(to_be_freed);
}
43028: 246e fff8 moveal %fp@(-8),%a2 4302c: 266e fffc moveal %fp@(-4),%a3
43030: 4e5e unlk %fp <== NOT EXECUTED
00042f98 <malloc_is_system_state_OK>:
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
42f98: 4e56 0000 linkw %fp,#0
if ( _Thread_Dispatch_disable_level > 0 )
42f9c: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0
42fa2: 660e bnes 42fb2 <malloc_is_system_state_OK+0x1a> <== NEVER TAKEN
return false;
if ( _ISR_Nest_level > 0 )
42fa4: 2039 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d0
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
42faa: 57c0 seq %d0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
42fac: 4e5e unlk %fp
#include "malloc_p.h"
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
42fae: 4480 negl %d0
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
42fb0: 4e75 rts
42fb2: 4e5e unlk %fp <== NOT EXECUTED
rtems_chain_control RTEMS_Malloc_GC_list;
bool malloc_is_system_state_OK(void)
{
if ( _Thread_Dispatch_disable_level > 0 )
42fb4: 4200 clrb %d0 <== NOT EXECUTED
if ( _ISR_Nest_level > 0 )
return false;
return true;
}
0004de88 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
4de88: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
4de8c: 2f39 0006 0ac4 movel 60ac4 <imfs_memfile_bytes_per_block>,%sp@- 4de92: 4878 0001 pea 1 <ADD> 4de96: 4eb9 0004 2918 jsr 42918 <calloc>
if ( memory )
4de9c: 508f addql #8,%sp 4de9e: 4a80 tstl %d0
4dea0: 6706 beqs 4dea8 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
4dea2: 52b9 0006 0bd8 addql #1,60bd8 <memfile_blocks_allocated>
return memory;
}
4dea8: 4e5e unlk %fp <== NOT EXECUTED
0004e27e <memfile_check_rmnod>:
return memfile_check_rmnod( the_jnode );
}
int memfile_check_rmnod( IMFS_jnode_t *the_jnode ){
4e27e: 4e56 0000 linkw %fp,#0 4e282: 2f0a movel %a2,%sp@- 4e284: 246e 0008 moveal %fp@(8),%a2
/*
* The file cannot be open and the link must be less than 1 to free.
*/
if ( !rtems_libio_is_file_open( the_jnode ) && (the_jnode->st_nlink < 1) ) {
4e288: 2f0a movel %a2,%sp@- 4e28a: 4eb9 0004 befa jsr 4befa <rtems_libio_is_file_open> 4e290: 588f addql #4,%sp 4e292: 4a80 tstl %d0
4e294: 662e bnes 4e2c4 <memfile_check_rmnod+0x46>
4e296: 4a6a 0032 tstw %a2@(50)
4e29a: 6628 bnes 4e2c4 <memfile_check_rmnod+0x46> <== NEVER TAKEN
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
4e29c: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4e2a2: b5e8 0004 cmpal %a0@(4),%a2
4e2a6: 6726 beqs 4e2ce <memfile_check_rmnod+0x50> <== NEVER TAKEN
rtems_filesystem_current.node_access = NULL;
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
4e2a8: 7006 moveq #6,%d0 4e2aa: b0aa 0048 cmpl %a2@(72),%d0
4e2ae: 670a beqs 4e2ba <memfile_check_rmnod+0x3c> <== NEVER TAKEN
IMFS_memfile_remove( the_jnode );
4e2b0: 2f0a movel %a2,%sp@- 4e2b2: 4eb9 0004 e12a jsr 4e12a <IMFS_memfile_remove> 4e2b8: 588f addql #4,%sp
free( the_jnode );
4e2ba: 2f0a movel %a2,%sp@- 4e2bc: 4eb9 0004 2ddc jsr 42ddc <free> 4e2c2: 588f addql #4,%sp
}
return 0;
}
4e2c4: 246e fffc moveal %fp@(-4),%a2 4e2c8: 4280 clrl %d0 4e2ca: 4e5e unlk %fp 4e2cc: 4e75 rts
/*
* Is the rtems_filesystem_current is this node?
*/
if ( rtems_filesystem_current.node_access == the_jnode )
rtems_filesystem_current.node_access = NULL;
4e2ce: 42a8 0004 clrl %a0@(4) <== NOT EXECUTED
/*
* Free memory associated with a memory file.
*/
if (the_jnode->type != IMFS_LINEAR_FILE)
4e2d2: 7006 moveq #6,%d0 <== NOT EXECUTED 4e2d4: b0aa 0048 cmpl %a2@(72),%d0 <== NOT EXECUTED 4e2d8: 66d6 bnes 4e2b0 <memfile_check_rmnod+0x32> <== NOT EXECUTED 4e2da: 60de bras 4e2ba <memfile_check_rmnod+0x3c> <== NOT EXECUTED
0004e078 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
4e078: 4e56 ffec linkw %fp,#-20 4e07c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4e080: 286e 0008 moveal %fp@(8),%a4 4e084: 262e 000c movel %fp@(12),%d3
/*
* Perform internal consistency checks
*/
assert( block_table );
4e088: 4a8c tstl %a4
4e08a: 6736 beqs 4e0c2 <memfile_free_blocks_in_table+0x4a><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
4e08c: 2454 moveal %a4@,%a2 4e08e: 47f9 0004 de6e lea 4de6e <memfile_free_block>,%a3
for ( i=0 ; i<entries ; i++ ) {
4e094: 4a83 tstl %d3
4e096: 6f18 bles 4e0b0 <memfile_free_blocks_in_table+0x38><== NEVER TAKEN
4e098: 4282 clrl %d2
if ( b[i] ) {
4e09a: 2012 movel %a2@,%d0
4e09c: 6708 beqs 4e0a6 <memfile_free_blocks_in_table+0x2e>
memfile_free_block( b[i] );
4e09e: 2f00 movel %d0,%sp@- 4e0a0: 4e93 jsr %a3@
b[i] = 0;
4e0a2: 588f addql #4,%sp 4e0a4: 4292 clrl %a2@
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4e0a6: 5282 addql #1,%d2 4e0a8: 588a addql #4,%a2 4e0aa: b483 cmpl %d3,%d2
4e0ac: 6dec blts 4e09a <memfile_free_blocks_in_table+0x22>
4e0ae: 2454 moveal %a4@,%a2
/*
* Now that all the blocks in the block table are free, we can
* free the block table itself.
*/
memfile_free_block( *block_table );
4e0b0: 2f0a movel %a2,%sp@- 4e0b2: 4e93 jsr %a3@
*block_table = 0;
4e0b4: 588f addql #4,%sp 4e0b6: 4294 clrl %a4@
}
4e0b8: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 4e0be: 4e5e unlk %fp 4e0c0: 4e75 rts
/*
* Perform internal consistency checks
*/
assert( block_table );
4e0c2: 4879 0005 f07c pea 5f07c <CSWTCH.8+0x88> <== NOT EXECUTED 4e0c8: 4879 0005 f13a pea 5f13a <__FUNCTION__.6118> <== NOT EXECUTED 4e0ce: 4878 01b3 pea 1b3 <DBL_MANT_DIG+0x17e> <== NOT EXECUTED 4e0d2: 4879 0005 f00e pea 5f00e <CSWTCH.8+0x1a> <== NOT EXECUTED 4e0d8: 4eb9 0004 bbe8 jsr 4bbe8 <__assert_func> <== NOT EXECUTED
0004e53e <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4e53e: 4e56 ffec linkw %fp,#-20 4e542: 206e 0008 moveal %fp@(8),%a0 4e546: 48d7 040c moveml %d2-%d3/%a2,%sp@
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4e54a: 2468 0038 moveal %a0@(56),%a2
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4e54e: 202e 000c movel %fp@(12),%d0 4e552: 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 )
4e556: 242a 004c movel %a2@(76),%d2 4e55a: 262a 0050 movel %a2@(80),%d3 4e55e: 9681 subl %d1,%d3 4e560: 9580 subxl %d0,%d2
4e562: 6d30 blts 4e594 <memfile_ftruncate+0x56> <== NEVER TAKEN
* 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;
4e564: 2540 004c movel %d0,%a2@(76) 4e568: 2541 0050 movel %d1,%a2@(80)
iop->size = the_jnode->info.file.size;
4e56c: 2140 0004 movel %d0,%a0@(4) 4e570: 2141 0008 movel %d1,%a0@(8)
IMFS_update_atime( the_jnode );
4e574: 42a7 clrl %sp@- 4e576: 486e fff8 pea %fp@(-8) 4e57a: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4e580: 256e fff8 003c movel %fp@(-8),%a2@(60)
return 0;
4e586: 508f addql #8,%sp
*/
the_jnode->info.file.size = length;
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
4e588: 4280 clrl %d0
return 0;
}
4e58a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4e590: 4e5e unlk %fp 4e592: 4e75 rts
* and the new length is greater than the current size. We treat this
* as an extend operation.
*/
if ( length > the_jnode->info.file.size )
return IMFS_memfile_extend( the_jnode, length );
4e594: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e596: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e598: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e59a: 4eb9 0004 e3ec jsr 4e3ec <IMFS_memfile_extend> <== NOT EXECUTED 4e5a0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
4e5a4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 4e5aa: 4e5e unlk %fp <== NOT EXECUTED
0004e5ae <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4e5ae: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4e5b0: 4e56 ffe8 linkw %fp,#-24 4e5b4: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4e5b8: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4e5bc: 266a 0038 moveal %a2@(56),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
4e5c0: b0ab 0048 cmpl %a3@(72),%d0
4e5c4: 673e beqs 4e604 <memfile_lseek+0x56> <== NEVER TAKEN
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
4e5c6: 2f2a 0010 movel %a2@(16),%sp@- 4e5ca: 2f2a 000c movel %a2@(12),%sp@- 4e5ce: 2f0b movel %a3,%sp@- 4e5d0: 4eb9 0004 e3ec jsr 4e3ec <IMFS_memfile_extend> 4e5d6: 4fef 000c lea %sp@(12),%sp 4e5da: 4a80 tstl %d0
4e5dc: 6668 bnes 4e646 <memfile_lseek+0x98> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
4e5de: 202b 004c movel %a3@(76),%d0 4e5e2: 222b 0050 movel %a3@(80),%d1 4e5e6: 242a 000c movel %a2@(12),%d2 4e5ea: 262a 0010 movel %a2@(16),%d3 4e5ee: 2540 0004 movel %d0,%a2@(4) 4e5f2: 2541 0008 movel %d1,%a2@(8)
} return iop->offset; }
4e5f6: 2203 movel %d3,%d1 4e5f8: 2002 movel %d2,%d0 4e5fa: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e600: 4e5e unlk %fp 4e602: 4e75 rts
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
4e604: 202a 000c movel %a2@(12),%d0 <== NOT EXECUTED 4e608: 222a 0010 movel %a2@(16),%d1 <== NOT EXECUTED 4e60c: 242b 004c movel %a3@(76),%d2 <== NOT EXECUTED 4e610: 262b 0050 movel %a3@(80),%d3 <== NOT EXECUTED 4e614: 2800 movel %d0,%d4 <== NOT EXECUTED 4e616: 2a01 movel %d1,%d5 <== NOT EXECUTED 4e618: 9a83 subl %d3,%d5 <== NOT EXECUTED 4e61a: 9982 subxl %d2,%d4 <== NOT EXECUTED 4e61c: 6e12 bgts 4e630 <memfile_lseek+0x82> <== NOT EXECUTED 4e61e: 2400 movel %d0,%d2 <== NOT EXECUTED 4e620: 2601 movel %d1,%d3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e622: 2203 movel %d3,%d1 <== NOT EXECUTED 4e624: 2002 movel %d2,%d0 <== NOT EXECUTED 4e626: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4e62c: 4e5e unlk %fp <== NOT EXECUTED 4e62e: 4e75 rts <== NOT EXECUTED 4e630: 2203 movel %d3,%d1 <== NOT EXECUTED 4e632: 2002 movel %d2,%d0 <== NOT EXECUTED
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
4e634: 2542 000c movel %d2,%a2@(12) <== NOT EXECUTED 4e638: 2543 0010 movel %d3,%a2@(16) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e63c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4e642: 4e5e unlk %fp <== NOT EXECUTED 4e644: 4e75 rts <== NOT EXECUTED
if (iop->offset > the_jnode->info.linearfile.size)
iop->offset = the_jnode->info.linearfile.size;
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
rtems_set_errno_and_return_minus_one( ENOSPC );
4e646: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4e64c: 761c moveq #28,%d3 <== NOT EXECUTED 4e64e: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e650: 2083 movel %d3,%a0@ <== NOT EXECUTED 4e652: 74ff moveq #-1,%d2 <== NOT EXECUTED 4e654: 76ff moveq #-1,%d3 <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4e656: 2203 movel %d3,%d1 <== NOT EXECUTED 4e658: 2002 movel %d2,%d0 <== NOT EXECUTED 4e65a: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4e660: 4e5e unlk %fp <== NOT EXECUTED
0004e92e <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4e92e: 4e56 fff0 linkw %fp,#-16 4e932: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4e936: 246e 0008 moveal %fp@(8),%a2
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4e93a: 202a 0014 movel %a2@(20),%d0 4e93e: 2200 movel %d0,%d1 4e940: 0281 0000 0204 andil #516,%d1
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
4e946: 266a 0038 moveal %a2@(56),%a3
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4e94a: 6708 beqs 4e954 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
4e94c: 7206 moveq #6,%d1 4e94e: b2ab 0048 cmpl %a3@(72),%d1
4e952: 6732 beqs 4e986 <memfile_open+0x58> <== NEVER TAKEN
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
4e954: 222b 004c movel %a3@(76),%d1 4e958: 242b 0050 movel %a3@(80),%d2
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4e95c: 0800 0009 btst #9,%d0
4e960: 6710 beqs 4e972 <memfile_open+0x44>
iop->offset = the_jnode->info.file.size;
4e962: 2541 000c movel %d1,%a2@(12) 4e966: 2542 0010 movel %d2,%a2@(16) 4e96a: 222b 004c movel %a3@(76),%d1 4e96e: 242b 0050 movel %a3@(80),%d2
iop->size = the_jnode->info.file.size;
4e972: 4280 clrl %d0 4e974: 2541 0004 movel %d1,%a2@(4) 4e978: 2542 0008 movel %d2,%a2@(8)
return 0; }
4e97c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4e982: 4e5e unlk %fp 4e984: 4e75 rts
/*
* 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;
4e986: 202b 0050 movel %a3@(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;
4e98a: 4282 clrl %d2 <== NOT EXECUTED 4e98c: 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;
4e98e: 222b 0054 movel %a3@(84),%d1 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4e992: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4e996: 2743 0050 movel %d3,%a3@(80) <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
4e99a: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
4e99c: 42ab 0054 clrl %a3@(84) <== NOT EXECUTED
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
uint32_t count = the_jnode->info.linearfile.size;
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
4e9a0: 2743 0048 movel %d3,%a3@(72) <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
4e9a4: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4e9a8: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
4e9ac: 4a80 tstl %d0 <== NOT EXECUTED 4e9ae: 6610 bnes 4e9c0 <memfile_open+0x92> <== NOT EXECUTED 4e9b0: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4e9b4: 4281 clrl %d1 <== NOT EXECUTED 4e9b6: 4282 clrl %d2 <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4e9b8: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4e9bc: 67b4 beqs 4e972 <memfile_open+0x44> <== NOT EXECUTED 4e9be: 60a2 bras 4e962 <memfile_open+0x34> <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4e9c0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4e9c2: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4e9c4: 42a7 clrl %sp@- <== NOT EXECUTED 4e9c6: 42a7 clrl %sp@- <== NOT EXECUTED 4e9c8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4e9ca: 4eb9 0004 e664 jsr 4e664 <IMFS_memfile_write> <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
4e9d0: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4e9d4: 72ff moveq #-1,%d1 <== NOT EXECUTED 4e9d6: b280 cmpl %d0,%d1 <== NOT EXECUTED 4e9d8: 6710 beqs 4e9ea <memfile_open+0xbc> <== NOT EXECUTED 4e9da: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED 4e9de: 222b 004c movel %a3@(76),%d1 <== NOT EXECUTED 4e9e2: 242b 0050 movel %a3@(80),%d2 <== NOT EXECUTED 4e9e6: 6000 ff74 braw 4e95c <memfile_open+0x2e> <== NOT EXECUTED 4e9ea: 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;
}
4e9ec: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4e9f2: 4e5e unlk %fp <== NOT EXECUTED
0004e2dc <memfile_rmnod>:
int memfile_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4e2dc: 4e56 fff8 linkw %fp,#-8 4e2e0: 206e 000c moveal %fp@(12),%a0 4e2e4: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4e2e6: 2450 moveal %a0@,%a2
/*
* Take the node out of the parent's chain that contains this node
*/
if ( the_jnode->Parent != NULL ) {
4e2e8: 4aaa 0008 tstl %a2@(8)
4e2ec: 670e beqs 4e2fc <memfile_rmnod+0x20> <== NEVER TAKEN
4e2ee: 2f0a movel %a2,%sp@- 4e2f0: 4eb9 0004 71a8 jsr 471a8 <_Chain_Extract>
rtems_chain_extract( (rtems_chain_node *) the_jnode );
the_jnode->Parent = NULL;
4e2f6: 588f addql #4,%sp 4e2f8: 42aa 0008 clrl %a2@(8)
/*
* Decrement the link counter and see if we can free the space.
*/
the_jnode->st_nlink--;
4e2fc: 302a 0032 movew %a2@(50),%d0 4e300: 5380 subql #1,%d0 4e302: 3540 0032 movew %d0,%a2@(50)
IMFS_update_ctime( the_jnode );
4e306: 42a7 clrl %sp@- 4e308: 486e fff8 pea %fp@(-8) 4e30c: 4eb9 0004 2e6c jsr 42e6c <gettimeofday> 4e312: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return memfile_check_rmnod( the_jnode );
4e318: 2f0a movel %a2,%sp@- 4e31a: 4eb9 0004 e27e jsr 4e27e <memfile_check_rmnod>
}
4e320: 246e fff4 moveal %fp@(-12),%a2
4e324: 4e5e unlk %fp <== NOT EXECUTED
000431f4 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
431f4: 4e56 ffd8 linkw %fp,#-40 431f8: 48d7 001c moveml %d2-%d4,%sp@ 431fc: 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) ) )
43200: 2003 movel %d3,%d0 43202: 0280 0000 f000 andil #61440,%d0
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
43208: 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) ) )
4320c: 4a80 tstl %d0 4320e: 6700 00bc beqw 432cc <mknod+0xd8>
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
43212: 240e movel %fp,%d2 43214: 0682 ffff ffe4 addil #-28,%d2 4321a: 2f02 movel %d2,%sp@- 4321c: 486e fffc pea %fp@(-4) 43220: 2f04 movel %d4,%sp@- 43222: 4eb9 0004 3d00 jsr 43d00 <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
43228: 206e fff0 moveal %fp@(-16),%a0 4322c: 4fef 000c lea %sp@(12),%sp 43230: 2068 0004 moveal %a0@(4),%a0 43234: 4a88 tstl %a0
43236: 6778 beqs 432b0 <mknod+0xbc> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->evalformake_h)(
43238: 486e fff8 pea %fp@(-8) 4323c: 2f02 movel %d2,%sp@- 4323e: d8ae fffc addl %fp@(-4),%d4 43242: 2f04 movel %d4,%sp@- 43244: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
43246: 4fef 000c lea %sp@(12),%sp 4324a: 4a80 tstl %d0
4324c: 6646 bnes 43294 <mknod+0xa0>
return -1;
if ( !temp_loc.ops->mknod_h ) {
4324e: 226e fff0 moveal %fp@(-16),%a1 43252: 2069 0014 moveal %a1@(20),%a0 43256: 4a88 tstl %a0
43258: 6748 beqs 432a2 <mknod+0xae> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
4325a: 2f02 movel %d2,%sp@- 4325c: 2f2e 0014 movel %fp@(20),%sp@- 43260: 2f2e 0010 movel %fp@(16),%sp@- 43264: 2f03 movel %d3,%sp@- 43266: 2f2e fff8 movel %fp@(-8),%sp@- 4326a: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
4326c: 206e fff0 moveal %fp@(-16),%a0
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
43270: 2600 movel %d0,%d3
rtems_filesystem_freenode( &temp_loc );
43272: 4fef 0014 lea %sp@(20),%sp 43276: 4a88 tstl %a0
43278: 670e beqs 43288 <mknod+0x94> <== NEVER TAKEN
4327a: 2068 001c moveal %a0@(28),%a0 4327e: 4a88 tstl %a0
43280: 6706 beqs 43288 <mknod+0x94>
43282: 2f02 movel %d2,%sp@- 43284: 4e90 jsr %a0@ 43286: 588f addql #4,%sp
return result;
}
43288: 2003 movel %d3,%d0 4328a: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 43290: 4e5e unlk %fp 43292: 4e75 rts
result = (*temp_loc.ops->evalformake_h)(
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
43294: 76ff moveq #-1,%d3
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43296: 2003 movel %d3,%d0 43298: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 4329e: 4e5e unlk %fp 432a0: 4e75 rts
);
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
432a2: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 432a6: 4a88 tstl %a0 <== NOT EXECUTED 432a8: 6706 beqs 432b0 <mknod+0xbc> <== NOT EXECUTED 432aa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 432ac: 4e90 jsr %a0@ <== NOT EXECUTED 432ae: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
432b0: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 432b6: 76ff moveq #-1,%d3 <== NOT EXECUTED 432b8: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
432ba: 2003 movel %d3,%d0 <== NOT EXECUTED 432bc: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 <== NOT EXECUTED
if ( result != 0 )
return -1;
if ( !temp_loc.ops->mknod_h ) {
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
432c2: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
432c8: 4e5e unlk %fp <== NOT EXECUTED 432ca: 4e75 rts <== NOT EXECUTED
int i;
const char *name_start;
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
432cc: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 432d2: 76ff moveq #-1,%d3 <== NOT EXECUTED 432d4: 2040 moveal %d0,%a0 <== NOT EXECUTED 432d6: 7016 moveq #22,%d0 <== NOT EXECUTED 432d8: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
432da: 2003 movel %d3,%d0 <== NOT EXECUTED 432dc: 4cee 001c ffd8 moveml %fp@(-40),%d2-%d4 <== NOT EXECUTED 432e2: 4e5e unlk %fp <== NOT EXECUTED
...
0004337c <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
4337c: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
4337e: 4e56 ffbc linkw %fp,#-68 43382: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43386: 262e 0008 movel %fp@(8),%d3 4338a: 282e 000c movel %fp@(12),%d4 4338e: 2a2e 0010 movel %fp@(16),%d5 43392: 2c2e 0014 movel %fp@(20),%d6
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
43396: b086 cmpl %d6,%d0 43398: 6500 028e bcsw 43628 <mount+0x2ac>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
4339c: 2f05 movel %d5,%sp@- 4339e: 4eb9 0004 c322 jsr 4c322 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
433a4: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
433a6: 2640 moveal %d0,%a3
if ( !mount_h )
433a8: 4a80 tstl %d0 433aa: 6700 027c beqw 43628 <mount+0x2ac>
{
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;
433ae: 4a84 tstl %d4 433b0: 56c0 sne %d0 433b2: 4480 negl %d0 433b4: 1e00 moveb %d0,%d7
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
433b6: 6700 0254 beqw 4360c <mount+0x290>
* 4) The mount point exists with the proper permissions to allow mounting
* 5) The selected mount point already has a file system mounted to it
*
*/
int mount(
433ba: 2f04 movel %d4,%sp@- 433bc: 45f9 0005 19e4 lea 519e4 <strlen>,%a2 433c2: 2d44 ffe4 movel %d4,%fp@(-28) 433c6: 4e92 jsr %a2@ 433c8: 588f addql #4,%sp 433ca: 2d40 ffe8 movel %d0,%fp@(-24)
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
433ce: 2f05 movel %d5,%sp@- 433d0: 4e92 jsr %a2@ 433d2: 588f addql #4,%sp 433d4: 2400 movel %d0,%d2 433d6: 5282 addql #1,%d2
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
433d8: 4a83 tstl %d3 433da: 6700 022a beqw 43606 <mount+0x28a> 433de: 2f03 movel %d3,%sp@- 433e0: 4eb9 0005 19e4 jsr 519e4 <strlen> 433e6: 588f addql #4,%sp 433e8: 2a40 moveal %d0,%a5 433ea: 528d addql #1,%a5
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 );
433ec: 226e ffe8 moveal %fp@(-24),%a1 433f0: 41f1 2875 lea %a1@(00000075,%d2:l),%a0 433f4: 4870 d800 pea %a0@(00000000,%a5:l) 433f8: 4878 0001 pea 1 <ADD> 433fc: 4eb9 0004 2918 jsr 42918 <calloc>
if ( mt_entry != NULL ) {
43402: 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 );
43404: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
43406: 4a80 tstl %d0 43408: 6700 01e4 beqw 435ee <mount+0x272>
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
4340c: 2f05 movel %d5,%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 );
4340e: 2a00 movel %d0,%d5 43410: 0685 0000 0074 addil #116,%d5
strcpy( str, filesystemtype );
43416: 49f9 0005 1538 lea 51538 <strcpy>,%a4
mt_entry->type = str;
str += filesystemtype_size;
4341c: d485 addl %d5,%d2
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
4341e: 2f05 movel %d5,%sp@- 43420: 4e94 jsr %a4@
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
43422: 508f addql #8,%sp
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
43424: 2545 006c movel %d5,%a2@(108)
str += filesystemtype_size;
if ( source_or_null != NULL ) {
43428: 4a83 tstl %d3
4342a: 670e beqs 4343a <mount+0xbe>
strcpy( str, source_or_null );
4342c: 2f03 movel %d3,%sp@- 4342e: 2f02 movel %d2,%sp@- 43430: 4e94 jsr %a4@
mt_entry->dev = str;
str += source_size;
43432: 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;
43434: 2542 0070 movel %d2,%a2@(112)
str += source_size;
43438: d48d addl %a5,%d2
}
strcpy( str, target );
4343a: 2f2e ffe4 movel %fp@(-28),%sp@- 4343e: 2f02 movel %d2,%sp@- 43440: 4e94 jsr %a4@
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
43442: 508f addql #8,%sp
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43444: 7005 moveq #5,%d0 43446: 223c 0000 0080 movel #128,%d1 4344c: 307c 0400 moveaw #1024,%a0 43450: 2540 0038 movel %d0,%a2@(56) 43454: 103c 0007 moveb #7,%d0 43458: 2541 003c movel %d1,%a2@(60) 4345c: 0681 0000 007f addil #127,%d1 43462: 2540 0040 movel %d0,%a2@(64) 43466: 103c 0001 moveb #1,%d0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
4346a: 2542 0068 movel %d2,%a2@(104)
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
mt_entry->options = options;
4346e: 2546 0030 movel %d6,%a2@(48)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
43472: 254a 002c movel %a2,%a2@(44)
mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43476: 2541 0044 movel %d1,%a2@(68) 4347a: 2541 0048 movel %d1,%a2@(72) 4347e: 2548 004c movel %a0,%a2@(76) 43482: 42aa 0050 clrl %a2@(80) 43486: 42aa 0054 clrl %a2@(84) 4348a: 2540 0058 movel %d0,%a2@(88) 4348e: 42aa 005c clrl %a2@(92) 43492: 42aa 0060 clrl %a2@(96) 43496: 42aa 0064 clrl %a2@(100)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
4349a: 4a07 tstb %d7 4349c: 6600 0092 bnew 43530 <mount+0x1b4>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
434a0: 43f9 0005 fca4 lea 5fca4 <mount_chain+0x4>,%a1 434a6: b3f9 0005 fca0 cmpal 5fca0 <mount_chain>,%a1 434ac: 6600 01c0 bnew 4366e <mount+0x2f2> 434b0: 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 ) ) {
434b2: 2f2e 0018 movel %fp@(24),%sp@- 434b6: 2f0a movel %a2,%sp@- 434b8: 4e93 jsr %a3@ 434ba: 508f addql #8,%sp 434bc: 4a80 tstl %d0 434be: 6600 0180 bnew 43640 <mount+0x2c4>
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 );
434c2: 42a7 clrl %sp@- 434c4: 42a7 clrl %sp@- 434c6: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 434cc: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
434d2: 2f0a movel %a2,%sp@- 434d4: 4879 0005 fca0 pea 5fca0 <mount_chain> 434da: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
434e0: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 434e6: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
434ec: 4fef 0018 lea %sp@(24),%sp 434f0: 4a07 tstb %d7
434f2: 6630 bnes 43524 <mount+0x1a8>
rtems_filesystem_root = mt_entry->mt_fs_root;
434f4: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 434fa: 4280 clrl %d0 434fc: 216a 001c 0018 movel %a2@(28),%a0@(24) 43502: 216a 0020 001c movel %a2@(32),%a0@(28) 43508: 216a 0024 0020 movel %a2@(36),%a0@(32) 4350e: 216a 0028 0024 movel %a2@(40),%a0@(36) 43514: 216a 002c 0028 movel %a2@(44),%a0@(40)
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
4351a: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 43520: 4e5e unlk %fp 43522: 4e75 rts
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
43524: 4280 clrl %d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43526: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 4352c: 4e5e unlk %fp 4352e: 4e75 rts
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
43530: 4878 0001 pea 1 <ADD> 43534: 240e movel %fp,%d2 43536: 0682 ffff ffec addil #-20,%d2 4353c: 2f02 movel %d2,%sp@- 4353e: 4878 0007 pea 7 <TRUNCDFSF> 43542: 2f2e ffe8 movel %fp@(-24),%sp@- 43546: 2f04 movel %d4,%sp@- 43548: 4eb9 0004 2d4c jsr 42d4c <rtems_filesystem_evaluate_path> 4354e: 4fef 0014 lea %sp@(20),%sp 43552: 72ff moveq #-1,%d1 43554: b280 cmpl %d0,%d1 43556: 6700 0122 beqw 4367a <mount+0x2fe>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
4355a: 206e fff8 moveal %fp@(-8),%a0 4355e: 2068 0010 moveal %a0@(16),%a0 43562: 4a88 tstl %a0 43564: 6700 015e beqw 436c4 <mount+0x348>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
43568: 2f02 movel %d2,%sp@- 4356a: 4e90 jsr %a0@ 4356c: 588f addql #4,%sp 4356e: 7201 moveq #1,%d1 43570: b280 cmpl %d0,%d1 43572: 6600 011c bnew 43690 <mount+0x314>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
43576: 2f2e ffec movel %fp@(-20),%sp@- 4357a: 487a fd6c pea %pc@(432e8 <is_node_fs_root>) 4357e: 4eb9 0004 3300 jsr 43300 <rtems_filesystem_mount_iterate> 43584: 508f addql #8,%sp 43586: 4a00 tstb %d0 43588: 6600 0120 bnew 436aa <mount+0x32e>
* 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;
4358c: 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;
43590: 256e ffec 0008 movel %fp@(-20),%a2@(8)
mt_entry->mt_point_node.handlers = loc.handlers;
43596: 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;
4359c: 256e fffc 0018 movel %fp@(-4),%a2@(24)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
435a2: 2268 0020 moveal %a0@(32),%a1
* 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;
435a6: 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 ){
435aa: 4a89 tstl %a1 435ac: 6700 0116 beqw 436c4 <mount+0x348>
errno = ENOTSUP;
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
435b0: 2f0a movel %a2,%sp@- 435b2: 4e91 jsr %a1@ 435b4: 588f addql #4,%sp 435b6: 4a80 tstl %d0 435b8: 6700 fef8 beqw 434b2 <mount+0x136>
return 0;
cleanup_and_bail:
free( mt_entry );
435bc: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435be: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 435c4: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
435c6: 2242 moveal %d2,%a1 435c8: 2069 000c moveal %a1@(12),%a0 435cc: 4a88 tstl %a0 435ce: 6700 0092 beqw 43662 <mount+0x2e6> 435d2: 2028 001c movel %a0@(28),%d0 435d6: 6700 008a beqw 43662 <mount+0x2e6> 435da: 2f02 movel %d2,%sp@- 435dc: 2040 moveal %d0,%a0 435de: 4e90 jsr %a0@ 435e0: 588f addql #4,%sp 435e2: 70ff moveq #-1,%d0
return -1;
}
435e4: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 435ea: 4e5e unlk %fp 435ec: 4e75 rts
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
435ee: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 435f4: 780c moveq #12,%d4 <== NOT EXECUTED 435f6: 2040 moveal %d0,%a0 <== NOT EXECUTED 435f8: 70ff moveq #-1,%d0 <== NOT EXECUTED 435fa: 2084 movel %d4,%a0@ <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
435fc: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43602: 4e5e unlk %fp <== NOT EXECUTED 43604: 4e75 rts <== NOT EXECUTED
)
{
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;
43606: 9bcd subal %a5,%a5 43608: 6000 fde2 braw 433ec <mount+0x70>
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
4360c: 307c 0001 moveaw #1,%a0 43610: 43f9 0005 e460 lea 5e460 <IMFS_ops+0x48>,%a1 43616: 45f9 0005 19e4 lea 519e4 <strlen>,%a2 4361c: 2d48 ffe8 movel %a0,%fp@(-24) 43620: 2d49 ffe4 movel %a1,%fp@(-28) 43624: 6000 fda8 braw 433ce <mount+0x52>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
43628: 4eb9 0005 05b8 jsr 505b8 <__errno> 4362e: 7a16 moveq #22,%d5 43630: 2040 moveal %d0,%a0 43632: 70ff moveq #-1,%d0 43634: 2085 movel %d5,%a0@
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43636: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 4363c: 4e5e unlk %fp 4363e: 4e75 rts
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
43640: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 43644: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 43648: 4a88 tstl %a0 <== NOT EXECUTED 4364a: 6706 beqs 43652 <mount+0x2d6> <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
4364c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4364e: 4e90 jsr %a0@ <== NOT EXECUTED 43650: 588f addql #4,%sp <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
43652: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43654: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
if ( loc_to_free )
4365a: 588f addql #4,%sp <== NOT EXECUTED 4365c: 4a82 tstl %d2 <== NOT EXECUTED 4365e: 6600 ff66 bnew 435c6 <mount+0x24a> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
43662: 70ff moveq #-1,%d0 <== NOT EXECUTED
return -1;
}
43664: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4366a: 4e5e unlk %fp <== NOT EXECUTED 4366c: 4e75 rts <== NOT EXECUTED
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
4366e: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 43674: 2040 moveal %d0,%a0 <== NOT EXECUTED 43676: 7016 moveq #22,%d0 <== NOT EXECUTED 43678: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
4367a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4367c: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 43682: 588f addql #4,%sp <== NOT EXECUTED 43684: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
43686: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4368c: 4e5e unlk %fp <== NOT EXECUTED 4368e: 4e75 rts <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
43690: 4eb9 0005 05b8 jsr 505b8 <__errno> 43696: 7614 moveq #20,%d3 43698: 2040 moveal %d0,%a0 4369a: 2083 movel %d3,%a0@
return 0;
cleanup_and_bail:
free( mt_entry );
4369c: 2f0a movel %a2,%sp@- 4369e: 4eb9 0004 2ddc jsr 42ddc <free> 436a4: 588f addql #4,%sp 436a6: 6000 ff1e braw 435c6 <mount+0x24a>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
errno = EBUSY;
436aa: 4eb9 0005 05b8 jsr 505b8 <__errno> 436b0: 7210 moveq #16,%d1 436b2: 2240 moveal %d0,%a1 436b4: 2281 movel %d1,%a1@
return 0;
cleanup_and_bail:
free( mt_entry );
436b6: 2f0a movel %a2,%sp@- 436b8: 4eb9 0004 2ddc jsr 42ddc <free> 436be: 588f addql #4,%sp 436c0: 6000 ff04 braw 435c6 <mount+0x24a>
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( !loc.ops->mount_h ){
errno = ENOTSUP;
436c4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 436ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 436cc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
436d2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 436d4: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 436da: 588f addql #4,%sp <== NOT EXECUTED 436dc: 6000 fee8 braw 435c6 <mount+0x24a> <== NOT EXECUTED
0004bfd8 <mq_close>:
*/
int mq_close(
mqd_t mqdes
)
{
4bfd8: 4e56 fffc linkw %fp,#-4 4bfdc: 2f0a movel %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(
4bfde: 486e fffc pea %fp@(-4) 4bfe2: 2f2e 0008 movel %fp@(8),%sp@- 4bfe6: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4bfec: 4eb9 0004 f888 jsr 4f888 <_Objects_Get>
POSIX_Message_queue_Control *the_mq;
POSIX_Message_queue_Control_fd *the_mq_fd;
Objects_Locations location;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
if ( location == OBJECTS_LOCAL ) {
4bff2: 4fef 000c lea %sp@(12),%sp 4bff6: 2440 moveal %d0,%a2 4bff8: 4aae fffc tstl %fp@(-4)
4bffc: 6640 bnes 4c03e <mq_close+0x66> <== NEVER TAKEN
* First update the actual message queue to reflect this descriptor
* being disassociated. This may result in the queue being really
* deleted.
*/
the_mq = the_mq_fd->Queue;
4bffe: 206a 0010 moveal %a2@(16),%a0
the_mq->open_count -= 1;
4c002: 53a8 0016 subql #1,%a0@(22)
_POSIX_Message_queue_Delete( the_mq );
4c006: 2f08 movel %a0,%sp@- 4c008: 4eb9 0004 c054 jsr 4c054 <_POSIX_Message_queue_Delete>
/*
* Now close this file descriptor.
*/
_Objects_Close(
4c00e: 2f0a movel %a2,%sp@- 4c010: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c016: 4eb9 0004 f47c jsr 4f47c <_Objects_Close>
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free_fd (
POSIX_Message_queue_Control_fd *the_mq_fd
)
{
_Objects_Free( &_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
4c01c: 2f0a movel %a2,%sp@- 4c01e: 4879 0006 b434 pea 6b434 <_POSIX_Message_queue_Information_fds> 4c024: 4eb9 0004 f724 jsr 4f724 <_Objects_Free>
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
4c02a: 4eb9 0005 0168 jsr 50168 <_Thread_Enable_dispatch>
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
4c030: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close(
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
return 0;
4c034: 4fef 0014 lea %sp@(20),%sp
_Objects_Close(
&_POSIX_Message_queue_Information_fds, &the_mq_fd->Object );
_POSIX_Message_queue_Free_fd( the_mq_fd );
_Thread_Enable_dispatch();
4c038: 4280 clrl %d0
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
}
4c03a: 4e5e unlk %fp 4c03c: 4e75 rts
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c03e: 4eb9 0005 80b0 jsr 580b0 <__errno>
}
4c044: 246e fff8 moveal %fp@(-8),%a2
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c048: 2040 moveal %d0,%a0 4c04a: 7209 moveq #9,%d1 4c04c: 70ff moveq #-1,%d0
}
4c04e: 4e5e unlk %fp
/*
* OBJECTS_REMOTE:
* OBJECTS_ERROR:
*/
rtems_set_errno_and_return_minus_one( EBADF );
4c050: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
0004376c <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
4376c: 4e56 fff4 linkw %fp,#-12 43770: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43774: 262e 0008 movel %fp@(8),%d3 43778: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
4377c: b5c3 cmpal %d3,%a2
4377e: 674c beqs 437cc <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
43780: 242a 0106 movel %a2@(262),%d2
}
if (ptr && ptr != _global_impure_ptr) {
43784: 4a82 tstl %d2
43786: 6722 beqs 437aa <newlib_delete_hook+0x3e> <== NEVER TAKEN
43788: b4b9 0005 f398 cmpl 5f398 <_global_impure_ptr>,%d2
4378e: 671a beqs 437aa <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
43790: 4879 0004 37d4 pea 437d4 <newlib_free_buffers> 43796: 2f02 movel %d2,%sp@- 43798: 4eb9 0005 0d5e jsr 50d5e <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
4379e: 2f02 movel %d2,%sp@- 437a0: 4eb9 0004 9d60 jsr 49d60 <_Workspace_Free> 437a6: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
437aa: 42aa 0106 clrl %a2@(262)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
437ae: b5c3 cmpal %d3,%a2
437b0: 670a beqs 437bc <newlib_delete_hook+0x50>
_REENT = 0;
}
}
437b2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 437b8: 4e5e unlk %fp 437ba: 4e75 rts
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
437bc: 42b9 0005 fd98 clrl 5fd98 <_impure_ptr>
} }
437c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 437c8: 4e5e unlk %fp 437ca: 4e75 rts
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
437cc: 2439 0005 fd98 movel 5fd98 <_impure_ptr>,%d2 437d2: 60b0 bras 43784 <newlib_delete_hook+0x18>
000437d4 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
437d4: 4e56 0000 linkw %fp,#0 437d8: 2f0a movel %a2,%sp@- 437da: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
437de: 2f0a movel %a2,%sp@- 437e0: 4eb9 0005 094c jsr 5094c <fileno> 437e6: 588f addql #4,%sp 437e8: 7202 moveq #2,%d1 437ea: b280 cmpl %d0,%d1
437ec: 6414 bccs 43802 <newlib_free_buffers+0x2e> <== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
437ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 437f0: 4eb9 0005 06f6 jsr 506f6 <fclose> <== NOT EXECUTED 437f6: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
437f8: 246e fffc moveal %fp@(-4),%a2 437fc: 4280 clrl %d0 437fe: 4e5e unlk %fp 43800: 4e75 rts
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
43802: 302a 000c movew %a2@(12),%d0 43806: 48c0 extl %d0 43808: 4a00 tstb %d0
4380a: 6cec bges 437f8 <newlib_free_buffers+0x24> <== ALWAYS TAKEN
free( fp->_bf._base );
4380c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43810: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43816: 588f addql #4,%sp <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43818: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
4381c: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43820: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43824: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43826: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
4382a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4382e: 4280 clrl %d0 <== NOT EXECUTED 43830: 4e5e unlk %fp <== NOT EXECUTED
0004333c <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
4333c: 4e56 0000 linkw %fp,#0 43340: 2f02 movel %d2,%sp@- 43342: 242e 0008 movel %fp@(8),%d2
rtems_device_driver status;
if ( !initialized ) {
43346: 4a39 0006 256c tstb 6256c <initialized>
4334c: 670a beqs 43358 <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
4334e: 242e fffc movel %fp@(-4),%d2 43352: 4280 clrl %d0 43354: 4e5e unlk %fp 43356: 4e75 rts
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
43358: 42a7 clrl %sp@-
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
4335a: 7001 moveq #1,%d0 4335c: 13c0 0006 256c moveb %d0,6256c <initialized>
status = rtems_io_register_name(
43362: 2f02 movel %d2,%sp@- 43364: 4879 0005 fe60 pea 5fe60 <IntUartPollCallbacks.6645+0x20> 4336a: 4eb9 0004 3abe jsr 43abe <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
43370: 4fef 000c lea %sp@(12),%sp 43374: 4a80 tstl %d0
43376: 6610 bnes 43388 <null_initialize+0x4c> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
43378: 23c2 0006 2d94 movel %d2,62d94 <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
4337e: 242e fffc movel %fp@(-4),%d2 43382: 4280 clrl %d0 43384: 4e5e unlk %fp 43386: 4e75 rts
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
43388: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4338a: 4eb9 0004 80bc jsr 480bc <rtems_fatal_error_occurred> <== NOT EXECUTED
0004331a <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
4331a: 4e56 0000 linkw %fp,#0 4331e: 206e 0010 moveal %fp@(16),%a0
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
43322: 4a88 tstl %a0
43324: 6706 beqs 4332c <null_write+0x12> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
43326: 2168 0010 0018 movel %a0@(16),%a0@(24)
return NULL_SUCCESSFUL;
}
4332c: 4280 clrl %d0
4332e: 4e5e unlk %fp <== NOT EXECUTED
00043a60 <open>:
int open(
const char *pathname,
int flags,
...
)
{
43a60: 4e56 ffcc linkw %fp,#-52 43a64: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43a68: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
43a6c: 2002 movel %d2,%d0 43a6e: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
43a70: 282e 0008 movel %fp@(8),%d4
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
43a74: 0800 0000 btst #0,%d0 43a78: 6600 00dc bnew 43b56 <open+0xf6> 43a7c: 4283 clrl %d3
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
43a7e: 0800 0001 btst #1,%d0
43a82: 6704 beqs 43a88 <open+0x28>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
43a84: 7002 moveq #2,%d0 43a86: 8680 orl %d0,%d3
va_start(ap, flags);
mode = va_arg( ap, int );
43a88: 2a2e 0010 movel %fp@(16),%d5
* code does not require changes here since network file
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
43a8c: 4eb9 0004 c084 jsr 4c084 <rtems_libio_allocate> 43a92: 2440 moveal %d0,%a2
if ( iop == 0 ) {
43a94: 4a80 tstl %d0 43a96: 6700 00c4 beqw 43b5c <open+0xfc>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43a9a: 2f04 movel %d4,%sp@- 43a9c: 4bf9 0005 19e4 lea 519e4 <strlen>,%a5 43aa2: 4e95 jsr %a5@ 43aa4: 47ee ffec lea %fp@(-20),%a3 43aa8: 7201 moveq #1,%d1 43aaa: 49f9 0004 2d4c lea 42d4c <rtems_filesystem_evaluate_path>,%a4 43ab0: 2e81 movel %d1,%sp@ 43ab2: 2f0b movel %a3,%sp@- 43ab4: 2f03 movel %d3,%sp@- 43ab6: 2f00 movel %d0,%sp@- 43ab8: 2f04 movel %d4,%sp@- 43aba: 4e94 jsr %a4@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
43abc: 4fef 0014 lea %sp@(20),%sp 43ac0: 72ff moveq #-1,%d1 43ac2: b280 cmpl %d0,%d1 43ac4: 6700 016c beqw 43c32 <open+0x1d2>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43ac8: 2002 movel %d2,%d0 43aca: 0280 0000 0a00 andil #2560,%d0 43ad0: 0c80 0000 0a00 cmpil #2560,%d0 43ad6: 6700 00a0 beqw 43b78 <open+0x118>
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
43ada: 262a 0014 movel %a2@(20),%d3
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
43ade: 256e fff4 003c movel %fp@(-12),%a2@(60)
iop->file_info = loc.node_access;
43ae4: 256e ffec 0038 movel %fp@(-20),%a2@(56)
iop->flags |= rtems_libio_fcntl_flags( flags );
43aea: 2f02 movel %d2,%sp@- 43aec: 4eb9 0004 c13c jsr 4c13c <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
43af2: 2553 0018 movel %a3@,%a2@(24)
if ( !iop->handlers || !iop->handlers->open_h ) {
43af6: 588f addql #4,%sp
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
43af8: 256e fff0 001c movel %fp@(-16),%a2@(28) 43afe: 256e fff4 0020 movel %fp@(-12),%a2@(32) 43b04: 256e fff8 0024 movel %fp@(-8),%a2@(36)
if ( !iop->handlers || !iop->handlers->open_h ) {
43b0a: 206a 003c moveal %a2@(60),%a0
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
43b0e: 8083 orl %d3,%d0
iop->pathinfo = loc;
43b10: 256e fffc 0028 movel %fp@(-4),%a2@(40)
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
43b16: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
43b1a: 4a88 tstl %a0 43b1c: 6700 0104 beqw 43c22 <open+0x1c2> 43b20: 2050 moveal %a0@,%a0 43b22: 4a88 tstl %a0 43b24: 6700 00fc beqw 43c22 <open+0x1c2>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
43b28: 2f05 movel %d5,%sp@- 43b2a: 2f02 movel %d2,%sp@- 43b2c: 2f04 movel %d4,%sp@- 43b2e: 2f0a movel %a2,%sp@- 43b30: 4e90 jsr %a0@
if ( rc ) {
43b32: 4fef 0010 lea %sp@(16),%sp 43b36: 4a80 tstl %d0
43b38: 667a bnes 43bb4 <open+0x154>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
43b3a: 0802 000a btst #10,%d2 43b3e: 6600 0092 bnew 43bd2 <open+0x172>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43b42: 200a movel %a2,%d0 43b44: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 43b4a: ec80 asrl #6,%d0
}
43b4c: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43b52: 4e5e unlk %fp 43b54: 4e75 rts
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
if ( ( status & _FREAD ) == _FREAD )
43b56: 7604 moveq #4,%d3 43b58: 6000 ff24 braw 43a7e <open+0x1e>
* descriptors are obtained using socket(), not open().
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
43b5c: 7417 moveq #23,%d2 43b5e: 263c 0005 05b8 movel #329144,%d3
if ( rc ) {
if ( iop )
rtems_libio_free( iop );
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
43b64: 2043 moveal %d3,%a0 43b66: 4e90 jsr %a0@ 43b68: 2040 moveal %d0,%a0 43b6a: 70ff moveq #-1,%d0 43b6c: 2082 movel %d2,%a0@
}
return iop - rtems_libio_iops;
}
43b6e: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43b74: 4e5e unlk %fp 43b76: 4e75 rts
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43b78: 7411 moveq #17,%d2 43b7a: 263c 0005 05b8 movel #329144,%d3
done:
va_end(ap);
if ( rc ) {
if ( iop )
43b80: 4a8a tstl %a2
43b82: 670a beqs 43b8e <open+0x12e> <== NEVER TAKEN
rtems_libio_free( iop );
43b84: 2f0a movel %a2,%sp@- 43b86: 4eb9 0004 bff6 jsr 4bff6 <rtems_libio_free> 43b8c: 588f addql #4,%sp
if ( loc_to_free )
43b8e: 4a8b tstl %a3
43b90: 67d2 beqs 43b64 <open+0x104>
rtems_filesystem_freenode( loc_to_free );
43b92: 206b 000c moveal %a3@(12),%a0 43b96: 4a88 tstl %a0
43b98: 67ca beqs 43b64 <open+0x104> <== NEVER TAKEN
43b9a: 2068 001c moveal %a0@(28),%a0 43b9e: 4a88 tstl %a0
43ba0: 67c2 beqs 43b64 <open+0x104> <== NEVER TAKEN
43ba2: 2f0b movel %a3,%sp@- 43ba4: 4e90 jsr %a0@ 43ba6: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
43ba8: 2043 moveal %d3,%a0 43baa: 4e90 jsr %a0@ 43bac: 2040 moveal %d0,%a0 43bae: 70ff moveq #-1,%d0 43bb0: 2082 movel %d2,%a0@ 43bb2: 60ba bras 43b6e <open+0x10e>
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
43bb4: 263c 0005 05b8 movel #329144,%d3 43bba: 2043 moveal %d3,%a0 43bbc: 4e90 jsr %a0@ 43bbe: 2040 moveal %d0,%a0 43bc0: 2410 movel %a0@,%d2
*/
done:
va_end(ap);
if ( rc ) {
43bc2: 66bc bnes 43b80 <open+0x120> <== ALWAYS TAKEN
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43bc4: 200a movel %a2,%d0 <== NOT EXECUTED 43bc6: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 <== NOT EXECUTED 43bcc: ec80 asrl #6,%d0 <== NOT EXECUTED 43bce: 6000 ff7c braw 43b4c <open+0xec> <== NOT EXECUTED
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43bd2: 200a movel %a2,%d0 43bd4: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 43bda: ec80 asrl #6,%d0 43bdc: 42a7 clrl %sp@- 43bde: 42a7 clrl %sp@- 43be0: 2f00 movel %d0,%sp@- 43be2: 4eb9 0004 bd88 jsr 4bd88 <ftruncate>
if ( rc ) {
43be8: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43bec: 2400 movel %d0,%d2
if ( rc ) {
43bee: 6700 ff52 beqw 43b42 <open+0xe2>
if(errno) rc = errno;
43bf2: 263c 0005 05b8 movel #329144,%d3 <== NOT EXECUTED 43bf8: 2043 moveal %d3,%a0 <== NOT EXECUTED 43bfa: 4e90 jsr %a0@ <== NOT EXECUTED 43bfc: 2040 moveal %d0,%a0 <== NOT EXECUTED 43bfe: 4a90 tstl %a0@ <== NOT EXECUTED 43c00: 6662 bnes 43c64 <open+0x204> <== NOT EXECUTED
close( iop - rtems_libio_iops );
43c02: 200a movel %a2,%d0 <== NOT EXECUTED 43c04: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 <== NOT EXECUTED 43c0a: 97cb subal %a3,%a3 <== NOT EXECUTED 43c0c: ec80 asrl #6,%d0 <== NOT EXECUTED 43c0e: 95ca subal %a2,%a2 <== NOT EXECUTED 43c10: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c12: 4eb9 0004 bce8 jsr 4bce8 <close> <== NOT EXECUTED 43c18: 588f addql #4,%sp <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
43c1a: 4a82 tstl %d2 <== NOT EXECUTED 43c1c: 67a6 beqs 43bc4 <open+0x164> <== NOT EXECUTED 43c1e: 6000 ff60 braw 43b80 <open+0x120> <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43c22: 243c 0000 0086 movel #134,%d2 <== NOT EXECUTED 43c28: 263c 0005 05b8 movel #329144,%d3 <== NOT EXECUTED 43c2e: 6000 ff50 braw 43b80 <open+0x120> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
43c32: 263c 0005 05b8 movel #329144,%d3 43c38: 2043 moveal %d3,%a0 43c3a: 4e90 jsr %a0@ 43c3c: 7202 moveq #2,%d1 43c3e: 2040 moveal %d0,%a0 43c40: b290 cmpl %a0@,%d1
43c42: 6712 beqs 43c56 <open+0x1f6>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43c44: 2043 moveal %d3,%a0 43c46: 97cb subal %a3,%a3 43c48: 4e90 jsr %a0@ 43c4a: 2040 moveal %d0,%a0 43c4c: 2410 movel %a0@,%d2
*/
done:
va_end(ap);
if ( rc ) {
43c4e: 6700 ff74 beqw 43bc4 <open+0x164> 43c52: 6000 ff2c braw 43b80 <open+0x120>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
43c56: 0802 0009 btst #9,%d2
43c5a: 662a bnes 43c86 <open+0x226>
43c5c: 97cb subal %a3,%a3 43c5e: 7402 moveq #2,%d2 43c60: 6000 ff1e braw 43b80 <open+0x120>
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43c64: 2043 moveal %d3,%a0 <== NOT EXECUTED
close( iop - rtems_libio_iops );
43c66: 97cb subal %a3,%a3 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43c68: 4e90 jsr %a0@ <== NOT EXECUTED 43c6a: 2040 moveal %d0,%a0 <== NOT EXECUTED
close( iop - rtems_libio_iops );
43c6c: 200a movel %a2,%d0 <== NOT EXECUTED 43c6e: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 <== NOT EXECUTED 43c74: 95ca subal %a2,%a2 <== NOT EXECUTED 43c76: ec80 asrl #6,%d0 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43c78: 2410 movel %a0@,%d2 <== NOT EXECUTED
close( iop - rtems_libio_iops );
43c7a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43c7c: 4eb9 0004 bce8 jsr 4bce8 <close> <== NOT EXECUTED 43c82: 588f addql #4,%sp <== NOT EXECUTED 43c84: 6094 bras 43c1a <open+0x1ba> <== NOT EXECUTED
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
43c86: 42a7 clrl %sp@- 43c88: 2005 movel %d5,%d0 43c8a: 42a7 clrl %sp@- 43c8c: 08c0 000f bset #15,%d0 43c90: 2f00 movel %d0,%sp@- 43c92: 2f04 movel %d4,%sp@- 43c94: 4eb9 0004 31f4 jsr 431f4 <mknod>
if ( rc ) {
43c9a: 4fef 0010 lea %sp@(16),%sp 43c9e: 4a80 tstl %d0
43ca0: 66a2 bnes 43c44 <open+0x1e4> <== NEVER TAKEN
rc = errno;
goto done;
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
43ca2: 2f04 movel %d4,%sp@- 43ca4: 4e95 jsr %a5@ 43ca6: 7201 moveq #1,%d1 43ca8: 2e81 movel %d1,%sp@ 43caa: 2f0b movel %a3,%sp@- 43cac: 42a7 clrl %sp@- 43cae: 2f00 movel %d0,%sp@- 43cb0: 2f04 movel %d4,%sp@- 43cb2: 4e94 jsr %a4@
if ( status != 0 ) { /* The file did not exist */
43cb4: 4fef 0014 lea %sp@(20),%sp 43cb8: 4a80 tstl %d0 43cba: 6700 fe1e beqw 43ada <open+0x7a>
43cbe: 97cb subal %a3,%a3 <== NOT EXECUTED 43cc0: 740d moveq #13,%d2 <== NOT EXECUTED 43cc2: 6000 febc braw 43b80 <open+0x120> <== NOT EXECUTED
000439ec <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
439ec: 4e56 0000 linkw %fp,#0 439f0: 2f0a movel %a2,%sp@-
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
439f2: 45f9 0004 3a60 lea 43a60 <open>,%a2 439f8: 42a7 clrl %sp@- 439fa: 42a7 clrl %sp@- 439fc: 4879 0005 e382 pea 5e382 <CSWTCH.59+0x100> 43a02: 4e92 jsr %a2@ 43a04: 4fef 000c lea %sp@(12),%sp 43a08: 72ff moveq #-1,%d1 43a0a: b280 cmpl %d0,%d1
43a0c: 6730 beqs 43a3e <open_dev_console+0x52> <== NEVER TAKEN
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
43a0e: 42a7 clrl %sp@- 43a10: 4878 0001 pea 1 <ADD> 43a14: 4879 0005 e382 pea 5e382 <CSWTCH.59+0x100> 43a1a: 4e92 jsr %a2@ 43a1c: 4fef 000c lea %sp@(12),%sp 43a20: 72ff moveq #-1,%d1 43a22: b280 cmpl %d0,%d1
43a24: 672c beqs 43a52 <open_dev_console+0x66> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
43a26: 42a7 clrl %sp@- 43a28: 4878 0001 pea 1 <ADD> 43a2c: 4879 0005 e382 pea 5e382 <CSWTCH.59+0x100> 43a32: 4e92 jsr %a2@ 43a34: 4fef 000c lea %sp@(12),%sp 43a38: 72ff moveq #-1,%d1 43a3a: b280 cmpl %d0,%d1
43a3c: 6708 beqs 43a46 <open_dev_console+0x5a> <== NEVER TAKEN
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
43a3e: 246e fffc moveal %fp@(-4),%a2 43a42: 4e5e unlk %fp 43a44: 4e75 rts
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
43a46: 2f3c 5554 4432 movel #1431585842,%sp@- <== NOT EXECUTED 43a4c: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* But if we find /dev/console once, we better find it twice more
* or something is REALLY wrong.
*/
if ((stdout_fd = open("/dev/console", O_WRONLY, 0)) == -1)
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
43a52: 2f3c 5554 4431 movel #1431585841,%sp@- <== NOT EXECUTED 43a58: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
000445d0 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
445d0: 4e56 fff0 linkw %fp,#-16 445d4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 445d8: 246e 000c moveal %fp@(12),%a2 445dc: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 445e2: 202e 0008 movel %fp@(8),%d0
int i;
if (tty->termios.c_oflag & OPOST) {
445e6: 222a 0034 movel %a2@(52),%d1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
445ea: 1d40 fffe moveb %d0,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
445ee: 0801 0000 btst #0,%d1
445f2: 6744 beqs 44638 <oproc+0x68> <== NEVER TAKEN
switch (c) {
445f4: 7409 moveq #9,%d2 445f6: 0280 0000 00ff andil #255,%d0 445fc: b480 cmpl %d0,%d2 445fe: 6700 00f8 beqw 446f8 <oproc+0x128>
44602: 644e bccs 44652 <oproc+0x82>
44604: 740a moveq #10,%d2 44606: b480 cmpl %d0,%d2
44608: 6774 beqs 4467e <oproc+0xae>
4460a: 143c 000d moveb #13,%d2 4460e: b480 cmpl %d0,%d2 44610: 6700 00a8 beqw 446ba <oproc+0xea>
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
44614: 0801 0001 btst #1,%d1 44618: 6600 011a bnew 44734 <oproc+0x164> 4461c: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 44622: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3
c = toupper(c); if (!iscntrl(c))
44628: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 4462c: 49c0 extbl %d0 4462e: 0800 0005 btst #5,%d0
44632: 6604 bnes 44638 <oproc+0x68> tty->column++;
44634: 52aa 0028 addql #1,%a2@(40)
break; } } rtems_termios_puts (&c, 1, tty);
44638: 2f0a movel %a2,%sp@- 4463a: 4878 0001 pea 1 <ADD> 4463e: 486e fffe pea %fp@(-2) 44642: 4e93 jsr %a3@ 44644: 4fef 000c lea %sp@(12),%sp
}
44648: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4464e: 4e5e unlk %fp 44650: 4e75 rts
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
44652: 143c 0008 moveb #8,%d2 44656: b480 cmpl %d0,%d2
44658: 66ba bnes 44614 <oproc+0x44> <== ALWAYS TAKEN
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
4465a: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 4465e: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44664: 6fd2 bles 44638 <oproc+0x68> <== NOT EXECUTED
tty->column--;
44666: 5380 subql #1,%d0 <== NOT EXECUTED 44668: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
4466c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4466e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44672: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44676: 4e93 jsr %a3@ <== NOT EXECUTED 44678: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4467c: 60ca bras 44648 <oproc+0x78> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
4467e: 0801 0005 btst #5,%d1
44682: 6704 beqs 44688 <oproc+0xb8> <== ALWAYS TAKEN
tty->column = 0;
44684: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
44688: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3
if (tty->termios.c_oflag & ONLCR) {
4468e: 44c1 movew %d1,%ccr
44690: 66a6 bnes 44638 <oproc+0x68> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
44692: 2f0a movel %a2,%sp@- 44694: 4878 0001 pea 1 <ADD> 44698: 4879 0005 e946 pea 5e946 <rtems_filesystem_default_pathconf+0x32> 4469e: 4e93 jsr %a3@
tty->column = 0;
446a0: 4fef 000c lea %sp@(12),%sp 446a4: 42aa 0028 clrl %a2@(40)
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
446a8: 2f0a movel %a2,%sp@- 446aa: 4878 0001 pea 1 <ADD> 446ae: 486e fffe pea %fp@(-2) 446b2: 4e93 jsr %a3@ 446b4: 4fef 000c lea %sp@(12),%sp 446b8: 608e bras 44648 <oproc+0x78>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
446ba: 0801 0004 btst #4,%d1 <== NOT EXECUTED 446be: 6706 beqs 446c6 <oproc+0xf6> <== NOT EXECUTED 446c0: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 446c4: 6782 beqs 44648 <oproc+0x78> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
446c6: 44c1 movew %d1,%ccr <== NOT EXECUTED 446c8: 6a00 0090 bplw 4475a <oproc+0x18a> <== NOT EXECUTED 446cc: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 <== NOT EXECUTED
c = '\n';
446d2: 700a moveq #10,%d0 <== NOT EXECUTED 446d4: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
446d8: 0801 0005 btst #5,%d1 <== NOT EXECUTED 446dc: 6700 ff5a beqw 44638 <oproc+0x68> <== NOT EXECUTED
tty->column = 0;
446e0: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
446e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 446e6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 446ea: 486e fffe pea %fp@(-2) <== NOT EXECUTED 446ee: 4e93 jsr %a3@ <== NOT EXECUTED 446f0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 446f4: 6000 ff52 braw 44648 <oproc+0x78> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
446f8: 202a 0028 movel %a2@(40),%d0 446fc: 7407 moveq #7,%d2 446fe: 307c 0008 moveaw #8,%a0 44702: c480 andl %d0,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44704: 0281 0000 1800 andil #6144,%d1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
4470a: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
4470c: 0c81 0000 1800 cmpil #6144,%d1
44712: 6778 beqs 4478c <oproc+0x1bc> <== ALWAYS TAKEN
tty->column += i; rtems_termios_puts ( " ", i, tty); return; } tty->column += i;
44714: d1c0 addal %d0,%a0 <== NOT EXECUTED 44716: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 <== NOT EXECUTED 4471c: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
44720: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44722: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44726: 486e fffe pea %fp@(-2) <== NOT EXECUTED 4472a: 4e93 jsr %a3@ <== NOT EXECUTED 4472c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44730: 6000 ff16 braw 44648 <oproc+0x78> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
44734: 2079 0005 fd94 moveal 5fd94 <__ctype_ptr__>,%a0 <== NOT EXECUTED 4473a: 7403 moveq #3,%d2 <== NOT EXECUTED 4473c: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 44740: 49c1 extbl %d1 <== NOT EXECUTED 44742: c282 andl %d2,%d1 <== NOT EXECUTED 44744: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 44748: b481 cmpl %d1,%d2 <== NOT EXECUTED 4474a: 672c beqs 44778 <oproc+0x1a8> <== NOT EXECUTED 4474c: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44750: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44756: 6000 feca braw 44622 <oproc+0x52> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0;
4475a: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED 4475e: 47f9 0004 44a8 lea 444a8 <rtems_termios_puts>,%a3 <== NOT EXECUTED
if (!iscntrl(c)) tty->column++; break; } } rtems_termios_puts (&c, 1, tty);
44764: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44766: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4476a: 486e fffe pea %fp@(-2) <== NOT EXECUTED 4476e: 4e93 jsr %a3@ <== NOT EXECUTED 44770: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44774: 6000 fed2 braw 44648 <oproc+0x78> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
44778: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 4477e: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44782: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44788: 6000 fe98 braw 44622 <oproc+0x52> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
4478c: 2f0a movel %a2,%sp@-
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
4478e: d088 addl %a0,%d0 44790: 2540 0028 movel %d0,%a2@(40)
rtems_termios_puts ( " ", i, tty);
44794: 2f08 movel %a0,%sp@- 44796: 4879 0005 e948 pea 5e948 <rtems_filesystem_default_pathconf+0x34> 4479c: 4eb9 0004 44a8 jsr 444a8 <rtems_termios_puts>
return;
447a2: 4fef 000c lea %sp@(12),%sp
tty->column++; break; } } rtems_termios_puts (&c, 1, tty); }
447a6: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
447ac: 4e5e unlk %fp <== NOT EXECUTED
0004ecdc <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4ecdc: 4e56 ffcc linkw %fp,#-52 4ece0: 48d7 3c00 moveml %a2-%a5,%sp@
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
4ece4: 4878 0001 pea 1 <ADD> 4ece8: 45ee ffdc lea %fp@(-36),%a2
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4ecec: 286e 0008 moveal %fp@(8),%a4
rtems_filesystem_location_info_t loc;
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
4ecf0: 2f0a movel %a2,%sp@- 4ecf2: 4878 0007 pea 7 <TRUNCDFSF> 4ecf6: 4878 0003 pea 3 <DIVIDE> 4ecfa: 4879 0005 f19b pea 5f19b <__FUNCTION__.6030+0x14> 4ed00: 4eb9 0004 2d4c jsr 42d4c <rtems_filesystem_evaluate_path> 4ed06: 4fef 0014 lea %sp@(20),%sp 4ed0a: 4a80 tstl %d0 4ed0c: 6600 00e0 bnew 4edee <pipe_create+0x112>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
return -1;
}
else
rtems_filesystem_freenode(&loc);
4ed10: 206e ffe8 moveal %fp@(-24),%a0 <== NOT EXECUTED 4ed14: 47f9 0005 05b8 lea 505b8 <__errno>,%a3 <== NOT EXECUTED 4ed1a: 4a88 tstl %a0 <== NOT EXECUTED 4ed1c: 670e beqs 4ed2c <pipe_create+0x50> <== NOT EXECUTED 4ed1e: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4ed22: 4a88 tstl %a0 <== NOT EXECUTED 4ed24: 6706 beqs 4ed2c <pipe_create+0x50> <== NOT EXECUTED 4ed26: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ed28: 4e90 jsr %a0@ <== NOT EXECUTED 4ed2a: 588f addql #4,%sp <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ed2c: 45ee fff1 lea %fp@(-15),%a2 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ed30: 3039 0006 0bdc movew 60bdc <rtems_pipe_no>,%d0 <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ed36: 24bc 2f74 6d70 movel #796159344,%a2@ <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ed3c: 2200 movel %d0,%d1 <== NOT EXECUTED 4ed3e: 5281 addql #1,%d1 <== NOT EXECUTED 4ed40: 3f00 movew %d0,%sp@- <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ed42: 203c 2f2e 6669 movel #791570025,%d0 <== NOT EXECUTED 4ed48: 2d40 fff5 movel %d0,%fp@(-11) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ed4c: 4267 clrw %sp@- <== NOT EXECUTED 4ed4e: 33c1 0006 0bdc movew %d1,60bdc <rtems_pipe_no> <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ed54: 323c 666f movew #26223,%d1 <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ed58: 4879 0005 f1a0 pea 5f1a0 <__FUNCTION__.6030+0x19> <== NOT EXECUTED 4ed5e: 486e fffb pea %fp@(-5) <== NOT EXECUTED
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ed62: 3d41 fff9 movew %d1,%fp@(-7) <== NOT EXECUTED
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ed66: 4eb9 0005 12b0 jsr 512b0 <sprintf> <== NOT EXECUTED
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4ed6c: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> <== NOT EXECUTED 4ed70: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4ed72: 4eb9 0004 f540 jsr 4f540 <mkfifo> <== NOT EXECUTED 4ed78: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4ed7c: 4a80 tstl %d0 <== NOT EXECUTED 4ed7e: 6660 bnes 4ede0 <pipe_create+0x104> <== NOT EXECUTED
return -1;
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
4ed80: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4ed84: 4bf9 0004 3a60 lea 43a60 <open>,%a5 4ed8a: 2f0a movel %a2,%sp@- 4ed8c: 4e95 jsr %a5@
if (filsdes[0] < 0) {
4ed8e: 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);
4ed90: 2880 movel %d0,%a4@
if (filsdes[0] < 0) {
4ed92: 6d00 00e0 bltw 4ee74 <pipe_create+0x198>
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4ed96: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0 <== NOT EXECUTED 4ed9c: 6400 00d0 bccw 4ee6e <pipe_create+0x192> <== NOT EXECUTED 4eda0: 2079 0006 12cc moveal 612cc <rtems_libio_iops>,%a0 <== NOT EXECUTED 4eda6: ed88 lsll #6,%d0 <== NOT EXECUTED 4eda8: d1c0 addal %d0,%a0 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4edaa: 70fe moveq #-2,%d0 <== NOT EXECUTED 4edac: c1a8 0014 andl %d0,%a0@(20) <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
4edb0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4edb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4edb6: 4e95 jsr %a5@ <== NOT EXECUTED
if (filsdes[1] < 0) {
4edb8: 508f addql #8,%sp <== NOT EXECUTED
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
4edba: 2940 0004 movel %d0,%a4@(4) <== NOT EXECUTED
if (filsdes[1] < 0) {
4edbe: 6d00 00ce bltw 4ee8e <pipe_create+0x1b2> <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4edc2: 2f0a movel %a2,%sp@- <== NOT EXECUTED
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
4edc4: 9bcd subal %a5,%a5 <== NOT EXECUTED
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4edc6: 4eb9 0004 f560 jsr 4f560 <unlink> <== NOT EXECUTED 4edcc: 588f addql #4,%sp <== NOT EXECUTED
}
rtems_set_errno_and_return_minus_one(err);
4edce: 4e93 jsr %a3@ <== NOT EXECUTED 4edd0: 2040 moveal %d0,%a0 <== NOT EXECUTED 4edd2: 208d movel %a5,%a0@ <== NOT EXECUTED
}
4edd4: 70ff moveq #-1,%d0 4edd6: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 4eddc: 4e5e unlk %fp 4edde: 4e75 rts
memcpy(fifopath, "/tmp/.fifo", 10);
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
if (errno != EEXIST){
4ede0: 4e93 jsr %a3@ <== NOT EXECUTED
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
}
4ede2: 4cee 3c00 ffcc moveml %fp@(-52),%a2-%a5 <== NOT EXECUTED 4ede8: 70ff moveq #-1,%d0 <== NOT EXECUTED 4edea: 4e5e unlk %fp <== NOT EXECUTED 4edec: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
int err = 0;
/* Create /tmp if not exists */
if (rtems_filesystem_evaluate_path("/tmp", 3, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE)
!= 0) {
if (errno != ENOENT)
4edee: 47f9 0005 05b8 lea 505b8 <__errno>,%a3 4edf4: 4e93 jsr %a3@ 4edf6: 7202 moveq #2,%d1 4edf8: 2040 moveal %d0,%a0 4edfa: b290 cmpl %a0@,%d1
4edfc: 66d6 bnes 4edd4 <pipe_create+0xf8> <== NEVER TAKEN
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
4edfe: 4878 03ff pea 3ff <D_BIAS+0x1> 4ee02: 4879 0005 f19b pea 5f19b <__FUNCTION__.6030+0x14> 4ee08: 4eb9 0004 31d4 jsr 431d4 <mkdir> 4ee0e: 508f addql #8,%sp 4ee10: 4a80 tstl %d0
4ee12: 66c0 bnes 4edd4 <pipe_create+0xf8> <== NEVER TAKEN
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ee14: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ee18: 3039 0006 0bdc movew 60bdc <rtems_pipe_no>,%d0
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ee1e: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ee24: 2200 movel %d0,%d1 4ee26: 5281 addql #1,%d1 4ee28: 3f00 movew %d0,%sp@-
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ee2a: 203c 2f2e 6669 movel #791570025,%d0 4ee30: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ee34: 4267 clrw %sp@- 4ee36: 33c1 0006 0bdc movew %d1,60bdc <rtems_pipe_no>
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ee3c: 323c 666f movew #26223,%d1
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ee40: 4879 0005 f1a0 pea 5f1a0 <__FUNCTION__.6030+0x19> 4ee46: 486e fffb pea %fp@(-5)
else
rtems_filesystem_freenode(&loc);
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4ee4a: 3d41 fff9 movew %d1,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4ee4e: 4eb9 0005 12b0 jsr 512b0 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4ee54: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> 4ee58: 2f0a movel %a2,%sp@- 4ee5a: 4eb9 0004 f540 jsr 4f540 <mkfifo> 4ee60: 4fef 0014 lea %sp@(20),%sp 4ee64: 4a80 tstl %d0 4ee66: 6700 ff18 beqw 4ed80 <pipe_create+0xa4>
4ee6a: 6000 ff74 braw 4ede0 <pipe_create+0x104> <== NOT EXECUTED
the file node will be deleted after it is closed by all. */
unlink(fifopath);
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
4ee6e: 91c8 subal %a0,%a0 <== NOT EXECUTED 4ee70: 6000 ff38 braw 4edaa <pipe_create+0xce> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
4ee74: 4e93 jsr %a3@ 4ee76: 2040 moveal %d0,%a0 4ee78: 2a50 moveal %a0@,%a5
/* 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);
4ee7a: 2f0a movel %a2,%sp@- 4ee7c: 4eb9 0004 f560 jsr 4f560 <unlink> 4ee82: 588f addql #4,%sp
close(filsdes[0]);
}
unlink(fifopath);
}
rtems_set_errno_and_return_minus_one(err);
4ee84: 4e93 jsr %a3@ 4ee86: 2040 moveal %d0,%a0 4ee88: 208d movel %a5,%a0@ 4ee8a: 6000 ff48 braw 4edd4 <pipe_create+0xf8>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
4ee8e: 4e93 jsr %a3@ <== NOT EXECUTED 4ee90: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ee92: 2a50 moveal %a0@,%a5 <== NOT EXECUTED
close(filsdes[0]);
4ee94: 2f14 movel %a4@,%sp@- <== NOT EXECUTED 4ee96: 4eb9 0004 bce8 jsr 4bce8 <close> <== NOT EXECUTED 4ee9c: 588f addql #4,%sp <== NOT EXECUTED
}
unlink(fifopath);
4ee9e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4eea0: 4eb9 0004 f560 jsr 4f560 <unlink> <== NOT EXECUTED 4eea6: 588f addql #4,%sp <== NOT EXECUTED 4eea8: 6000 ff24 braw 4edce <pipe_create+0xf2> <== NOT EXECUTED
00049fe6 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
49fe6: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if (cmd == FIONREAD) {
49fea: 203c 4004 667f movel #1074030207,%d0 <== NOT EXECUTED 49ff0: b0ae 000c cmpl %fp@(12),%d0 <== NOT EXECUTED 49ff4: 6706 beqs 49ffc <pipe_ioctl+0x16> <== NOT EXECUTED 49ff6: 70ea moveq #-22,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
49ff8: 4e5e unlk %fp <== NOT EXECUTED 49ffa: 4e75 rts <== NOT EXECUTED
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
49ffc: 4aae 0010 tstl %fp@(16) <== NOT EXECUTED 4a000: 6606 bnes 4a008 <pipe_ioctl+0x22> <== NOT EXECUTED 4a002: 70f2 moveq #-14,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4a004: 4e5e unlk %fp <== NOT EXECUTED 4a006: 4e75 rts <== NOT EXECUTED
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
4a008: 42a7 clrl %sp@- <== NOT EXECUTED 4a00a: 42a7 clrl %sp@- <== NOT EXECUTED 4a00c: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED 4a010: 2f28 0028 movel %a0@(40),%sp@- <== NOT EXECUTED 4a014: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain> <== NOT EXECUTED 4a01a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a01e: 4a80 tstl %d0 <== NOT EXECUTED 4a020: 6706 beqs 4a028 <pipe_ioctl+0x42> <== NOT EXECUTED 4a022: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4a024: 4e5e unlk %fp <== NOT EXECUTED 4a026: 4e75 rts <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
4a028: 226e 0008 moveal %fp@(8),%a1 <== NOT EXECUTED 4a02c: 2f29 0028 movel %a1@(40),%sp@- <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4a030: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4a034: 20a9 000c movel %a1@(12),%a0@ <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4a038: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
4a03e: 588f addql #4,%sp <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
4a040: 4280 clrl %d0 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
4a042: 4e5e unlk %fp <== NOT EXECUTED
00049f88 <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
49f88: 70e3 moveq #-29,%d0 <== NOT EXECUTED
pipe_control_t *pipe,
off_t offset,
int whence,
rtems_libio_t *iop
)
{
49f8a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
/* Seek on pipe is not supported */ return -ESPIPE; }
49f8e: 4e5e unlk %fp <== NOT EXECUTED
0004a046 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4a046: 4e56 ffc8 linkw %fp,#-56 <== NOT EXECUTED 4a04a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4a04e: 42a7 clrl %sp@- <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4a050: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4a054: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4a05a: 42a7 clrl %sp@- <== NOT EXECUTED 4a05c: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4a060: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED 4a064: 2a6e 0014 moveal %fp@(20),%a5 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4a068: 4e93 jsr %a3@ <== NOT EXECUTED 4a06a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a06e: 4a80 tstl %d0 <== NOT EXECUTED 4a070: 6600 00ac bnew 4a11e <pipe_read+0xd8> <== NOT EXECUTED
return -EINTR;
while (read < count) {
4a074: 4a84 tstl %d4 <== NOT EXECUTED 4a076: 6700 01ac beqw 4a224 <pipe_read+0x1de> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
if (ret != 0)
4a07a: 4285 clrl %d5 <== NOT EXECUTED 4a07c: 4283 clrl %d3 <== NOT EXECUTED 4a07e: 49f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4a084: 243c 0004 ce58 movel #314968,%d2 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4a08a: 2e3c 0004 cde0 movel #314848,%d7 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4a090: 2c3c 0005 0dd8 movel #331224,%d6 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4a096: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4a09a: 6600 0090 bnew 4a12c <pipe_read+0xe6> <== NOT EXECUTED
/* Not an error */
if (pipe->Writers == 0)
4a09e: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a0a2: 6700 010a beqw 4a1ae <pipe_read+0x168> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4a0a6: 7001 moveq #1,%d0 <== NOT EXECUTED 4a0a8: c0ad 0014 andl %a5@(20),%d0 <== NOT EXECUTED 4a0ac: 6600 0110 bnew 4a1be <pipe_read+0x178> <== NOT EXECUTED
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4a0b0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4a0b4: 52aa 0018 addql #1,%a2@(24) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4a0b8: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
4a0ba: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a0bc: 42a7 clrl %sp@- <== NOT EXECUTED 4a0be: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a0c2: 4e90 jsr %a0@ <== NOT EXECUTED 4a0c4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a0c8: 4a80 tstl %d0 <== NOT EXECUTED 4a0ca: 673c beqs 4a108 <pipe_read+0xc2> <== NOT EXECUTED 4a0cc: 70fc moveq #-4,%d0 <== NOT EXECUTED 4a0ce: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4a0d2: 42a7 clrl %sp@- <== NOT EXECUTED 4a0d4: 42a7 clrl %sp@- <== NOT EXECUTED 4a0d6: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a0da: 4e93 jsr %a3@ <== NOT EXECUTED 4a0dc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a0e0: 4a80 tstl %d0 <== NOT EXECUTED 4a0e2: 6600 00ec bnew 4a1d0 <pipe_read+0x18a> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4a0e6: 53aa 0018 subql #1,%a2@(24) <== NOT EXECUTED
if (ret != 0)
4a0ea: 4aae fff8 tstl %fp@(-8) <== NOT EXECUTED 4a0ee: 67a6 beqs 4a096 <pipe_read+0x50> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4a0f0: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a0f4: 4e94 jsr %a4@ <== NOT EXECUTED 4a0f6: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
if (read > 0)
4a0f8: 4a83 tstl %d3 <== NOT EXECUTED 4a0fa: 6f12 bles 4a10e <pipe_read+0xc8> <== NOT EXECUTED
return read;
return ret;
}
4a0fc: 2003 movel %d3,%d0 <== NOT EXECUTED 4a0fe: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a104: 4e5e unlk %fp <== NOT EXECUTED 4a106: 4e75 rts <== NOT EXECUTED
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4a108: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED 4a10c: 60c4 bras 4a0d2 <pipe_read+0x8c> <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4a10e: 262e fff8 movel %fp@(-8),%d3 <== NOT EXECUTED
return read;
return ret;
}
4a112: 2003 movel %d3,%d0 <== NOT EXECUTED 4a114: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a11a: 4e5e unlk %fp <== NOT EXECUTED 4a11c: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4a11e: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
4a120: 2003 movel %d3,%d0 <== NOT EXECUTED 4a122: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a128: 4e5e unlk %fp <== NOT EXECUTED 4a12a: 4e75 rts <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4a12c: 2004 movel %d4,%d0 <== NOT EXECUTED 4a12e: 9085 subl %d5,%d0 <== NOT EXECUTED 4a130: b081 cmpl %d1,%d0 <== NOT EXECUTED 4a132: 6402 bccs 4a136 <pipe_read+0xf0> <== NOT EXECUTED 4a134: 2200 movel %d0,%d1 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
4a136: 202a 0008 movel %a2@(8),%d0 <== NOT EXECUTED 4a13a: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4a13e: 91c0 subal %d0,%a0 <== NOT EXECUTED
if (chunk > chunk1) {
4a140: b1c1 cmpal %d1,%a0 <== NOT EXECUTED 4a142: 6d00 009c bltw 4a1e0 <pipe_read+0x19a> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
4a146: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a148: d092 addl %a2@,%d0 <== NOT EXECUTED 4a14a: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a14c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a14e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a152: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4a156: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a15a: 4e91 jsr %a1@ <== NOT EXECUTED 4a15c: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a160: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Start += chunk;
4a164: 2041 moveal %d1,%a0 <== NOT EXECUTED 4a166: d1ea 0008 addal %a2@(8),%a0 <== NOT EXECUTED
pipe->Start %= pipe->Size;
4a16a: 2008 movel %a0,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4a16c: 226a 000c moveal %a2@(12),%a1 <== NOT EXECUTED 4a170: 93c1 subal %d1,%a1 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4a172: 4c6a 0005 0004 remul %a2@(4),%d5,%d0 <== NOT EXECUTED
pipe->Length -= chunk;
4a178: 2549 000c movel %a1,%a2@(12) <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4a17c: 2545 0008 movel %d5,%a2@(8) <== NOT EXECUTED
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4a180: 4a89 tstl %a1 <== NOT EXECUTED 4a182: 6604 bnes 4a188 <pipe_read+0x142> <== NOT EXECUTED
pipe->Start = 0;
4a184: 42aa 0008 clrl %a2@(8) <== NOT EXECUTED
if (pipe->waitingWriters > 0)
4a188: 4aaa 001c tstl %a2@(28) <== NOT EXECUTED 4a18c: 6716 beqs 4a1a4 <pipe_read+0x15e> <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
4a18e: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a192: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a194: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a198: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a19c: 4e90 jsr %a0@ <== NOT EXECUTED 4a19e: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a1a2: 508f addql #8,%sp <== NOT EXECUTED
read += chunk;
4a1a4: d681 addl %d1,%d3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4a1a6: 2a03 movel %d3,%d5 <== NOT EXECUTED 4a1a8: b883 cmpl %d3,%d4 <== NOT EXECUTED 4a1aa: 6200 feea bhiw 4a096 <pipe_read+0x50> <== NOT EXECUTED 4a1ae: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4a1b2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a1b6: 4e94 jsr %a4@ <== NOT EXECUTED 4a1b8: 588f addql #4,%sp <== NOT EXECUTED 4a1ba: 6000 ff3c braw 4a0f8 <pipe_read+0xb2> <== NOT EXECUTED
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4a1be: 70f5 moveq #-11,%d0 <== NOT EXECUTED 4a1c0: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4a1c4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a1c8: 4e94 jsr %a4@ <== NOT EXECUTED 4a1ca: 588f addql #4,%sp <== NOT EXECUTED 4a1cc: 6000 ff2a braw 4a0f8 <pipe_read+0xb2> <== NOT EXECUTED
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4a1d0: 7afc moveq #-4,%d5 <== NOT EXECUTED 4a1d2: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4a1d6: 4a83 tstl %d3 <== NOT EXECUTED 4a1d8: 6e00 ff22 bgtw 4a0fc <pipe_read+0xb6> <== NOT EXECUTED 4a1dc: 6000 ff30 braw 4a10e <pipe_read+0xc8> <== NOT EXECUTED
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
4a1e0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4a1e2: d092 addl %a2@,%d0 <== NOT EXECUTED 4a1e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a1e6: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED 4a1ea: 4871 5800 pea %a1@(00000000,%d5:l) <== NOT EXECUTED 4a1ee: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a1f0: 2d41 fff4 movel %d1,%fp@(-12) <== NOT EXECUTED 4a1f4: 2d48 fff0 movel %a0,%fp@(-16) <== NOT EXECUTED 4a1f8: 4e91 jsr %a1@ <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4a1fa: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a1fe: 2001 movel %d1,%d0 <== NOT EXECUTED 4a200: 2246 moveal %d6,%a1 <== NOT EXECUTED 4a202: 206e fff0 moveal %fp@(-16),%a0 <== NOT EXECUTED 4a206: 9088 subl %a0,%d0 <== NOT EXECUTED 4a208: da88 addl %a0,%d5 <== NOT EXECUTED 4a20a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a20c: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a20e: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a212: 4870 5800 pea %a0@(00000000,%d5:l) <== NOT EXECUTED 4a216: 4e91 jsr %a1@ <== NOT EXECUTED 4a218: 222e fff4 movel %fp@(-12),%d1 <== NOT EXECUTED 4a21c: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 4a220: 6000 ff42 braw 4a164 <pipe_read+0x11e> <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4a224: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4a228: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a22c: 49f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a4 <== NOT EXECUTED 4a232: 4e94 jsr %a4@ <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4a234: 4283 clrl %d3 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4a236: 588f addql #4,%sp <== NOT EXECUTED 4a238: 6000 febe braw 4a0f8 <pipe_read+0xb2> <== NOT EXECUTED
0004a44c <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4a44c: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 4a450: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 4a454: 286e 0008 moveal %fp@(8),%a4 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
4a458: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4a45e: 42a7 clrl %sp@- <== NOT EXECUTED
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
pipe_control_t *pipe = *pipep;
4a460: 2454 moveal %a4@,%a2 <== NOT EXECUTED
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
4a462: 42a7 clrl %sp@- <== NOT EXECUTED 4a464: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a468: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
4a46a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a46e: 4a80 tstl %d0 <== NOT EXECUTED 4a470: 6600 00f2 bnew 4a564 <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
4a474: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a478: 7406 moveq #6,%d2 <== NOT EXECUTED 4a47a: c4a8 0014 andl %a0@(20),%d2 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
4a47e: 0802 0001 btst #1,%d2 <== NOT EXECUTED 4a482: 6704 beqs 4a488 <pipe_release+0x3c> <== NOT EXECUTED
pipe->Readers --;
4a484: 53aa 0010 subql #1,%a2@(16) <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
4a488: 44c2 movew %d2,%ccr <== NOT EXECUTED 4a48a: 675a beqs 4a4e6 <pipe_release+0x9a> <== NOT EXECUTED
pipe->Writers --;
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
4a48c: 42a7 clrl %sp@- <== NOT EXECUTED 4a48e: 42a7 clrl %sp@- <== NOT EXECUTED 4a490: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a496: 4e93 jsr %a3@ <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
4a498: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a49c: 4a80 tstl %d0 <== NOT EXECUTED 4a49e: 6600 00c4 bnew 4a564 <pipe_release+0x118> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
4a4a2: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a4a6: 47f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a3 <== NOT EXECUTED 4a4ac: 4e93 jsr %a3@ <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
4a4ae: 588f addql #4,%sp <== NOT EXECUTED 4a4b0: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a4b4: 6736 beqs 4a4ec <pipe_release+0xa0> <== NOT EXECUTED
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
4a4b6: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a4ba: 6616 bnes 4a4d2 <pipe_release+0x86> <== NOT EXECUTED 4a4bc: 7002 moveq #2,%d0 <== NOT EXECUTED 4a4be: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a4c0: 6710 beqs 4a4d2 <pipe_release+0x86> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
4a4c2: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a4c6: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a4ca: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a4d0: 508f addql #8,%sp <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
4a4d2: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a4d8: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4a4da: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a4e0: 4280 clrl %d0 <== NOT EXECUTED 4a4e2: 4e5e unlk %fp <== NOT EXECUTED 4a4e4: 4e75 rts <== NOT EXECUTED
mode = LIBIO_ACCMODE(iop);
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
4a4e6: 53aa 0014 subql #1,%a2@(20) <== NOT EXECUTED 4a4ea: 60a0 bras 4a48c <pipe_release+0x40> <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4a4ec: 4aaa 0014 tstl %a2@(20) <== NOT EXECUTED 4a4f0: 672a beqs 4a51c <pipe_release+0xd0> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4a4f2: 7004 moveq #4,%d0 <== NOT EXECUTED 4a4f4: b082 cmpl %d2,%d0 <== NOT EXECUTED 4a4f6: 67da beqs 4a4d2 <pipe_release+0x86> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4a4f8: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a4fc: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a500: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4a506: 508f addql #8,%sp <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
4a508: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a50e: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4a510: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a516: 4280 clrl %d0 <== NOT EXECUTED 4a518: 4e5e unlk %fp <== NOT EXECUTED 4a51a: 4e75 rts <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4a51c: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4a520: 4bf9 0004 2ddc lea 42ddc <free>,%a5 <== NOT EXECUTED
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4a526: 243c 0004 cd40 movel #314688,%d2 <== NOT EXECUTED 4a52c: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a52e: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4a530: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a534: 2042 moveal %d2,%a0 <== NOT EXECUTED 4a536: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4a538: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a53c: 4eb9 0004 662c jsr 4662c <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4a542: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a544: 4e95 jsr %a5@ <== NOT EXECUTED
free(pipe);
4a546: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4a548: 4e95 jsr %a5@ <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4a54a: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
4a54e: 4294 clrl %a4@ <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
rtems_semaphore_release(rtems_pipe_semaphore);
4a550: 2f39 0006 0bd4 movel 60bd4 <rtems_pipe_semaphore>,%sp@- <== NOT EXECUTED 4a556: 4e93 jsr %a3@ <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4a558: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 <== NOT EXECUTED 4a55e: 4280 clrl %d0 <== NOT EXECUTED 4a560: 4e5e unlk %fp <== NOT EXECUTED 4a562: 4e75 rts <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
4a564: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a566: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004a23c <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4a23c: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 4a240: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 4a244: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED 4a248: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4a24c: 660e bnes 4a25c <pipe_write+0x20> <== NOT EXECUTED 4a24e: 4282 clrl %d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4a250: 2002 movel %d2,%d0 <== NOT EXECUTED 4a252: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a258: 4e5e unlk %fp <== NOT EXECUTED 4a25a: 4e75 rts <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4a25c: 42a7 clrl %sp@- <== NOT EXECUTED 4a25e: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3 <== NOT EXECUTED 4a264: 42a7 clrl %sp@- <== NOT EXECUTED 4a266: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a26a: 4e93 jsr %a3@ <== NOT EXECUTED 4a26c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a270: 4a80 tstl %d0 <== NOT EXECUTED 4a272: 6600 00d2 bnew 4a346 <pipe_write+0x10a> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
4a276: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a27a: 6700 0088 beqw 4a304 <pipe_write+0xc8> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4a27e: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a282: b083 cmpl %d3,%d0 <== NOT EXECUTED 4a284: 6500 00e0 bcsw 4a366 <pipe_write+0x12a> <== NOT EXECUTED 4a288: 2a03 movel %d3,%d5 <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4a28a: 4286 clrl %d6 <== NOT EXECUTED 4a28c: 4282 clrl %d2 <== NOT EXECUTED 4a28e: 49f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4a294: 4bf9 0004 ce58 lea 4ce58 <rtems_barrier_wait>,%a5 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4a29a: 2e3c 0005 0dd8 movel #331224,%d7 <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
4a2a0: 222a 000c movel %a2@(12),%d1 <== NOT EXECUTED 4a2a4: 2800 movel %d0,%d4 <== NOT EXECUTED 4a2a6: 9881 subl %d1,%d4 <== NOT EXECUTED 4a2a8: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4a2aa: 6300 00d6 blsw 4a382 <pipe_write+0x146> <== NOT EXECUTED
if (LIBIO_NODELAY(iop)) {
4a2ae: 206e 0014 moveal %fp@(20),%a0 <== NOT EXECUTED 4a2b2: 7001 moveq #1,%d0 <== NOT EXECUTED 4a2b4: c0a8 0014 andl %a0@(20),%d0 <== NOT EXECUTED 4a2b8: 6600 0144 bnew 4a3fe <pipe_write+0x1c2> <== NOT EXECUTED
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4a2bc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4a2c0: 52aa 001c addql #1,%a2@(28) <== NOT EXECUTED
PIPE_UNLOCK(pipe);
4a2c4: 4e94 jsr %a4@ <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
4a2c6: 42a7 clrl %sp@- <== NOT EXECUTED 4a2c8: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED 4a2cc: 4e95 jsr %a5@ <== NOT EXECUTED 4a2ce: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a2d2: 4a80 tstl %d0 <== NOT EXECUTED 4a2d4: 672a beqs 4a300 <pipe_write+0xc4> <== NOT EXECUTED 4a2d6: 78fc moveq #-4,%d4 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4a2d8: 42a7 clrl %sp@- <== NOT EXECUTED 4a2da: 42a7 clrl %sp@- <== NOT EXECUTED 4a2dc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a2e0: 4e93 jsr %a3@ <== NOT EXECUTED 4a2e2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4a2e6: 4a80 tstl %d0 <== NOT EXECUTED 4a2e8: 6600 010e bnew 4a3f8 <pipe_write+0x1bc> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4a2ec: 53aa 001c subql #1,%a2@(28) <== NOT EXECUTED
if (ret != 0)
4a2f0: 4a84 tstl %d4 <== NOT EXECUTED 4a2f2: 661a bnes 4a30e <pipe_write+0xd2> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
4a2f4: 4aaa 0010 tstl %a2@(16) <== NOT EXECUTED 4a2f8: 675a beqs 4a354 <pipe_write+0x118> <== NOT EXECUTED 4a2fa: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a2fe: 60a0 bras 4a2a0 <pipe_write+0x64> <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4a300: 4284 clrl %d4 <== NOT EXECUTED 4a302: 60d4 bras 4a2d8 <pipe_write+0x9c> <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4a304: 78e0 moveq #-32,%d4 <== NOT EXECUTED 4a306: 4282 clrl %d2 <== NOT EXECUTED 4a308: 49f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a30e: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4a312: 4e94 jsr %a4@ <== NOT EXECUTED 4a314: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4a316: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4a318: b084 cmpl %d4,%d0 <== NOT EXECUTED 4a31a: 6714 beqs 4a330 <pipe_write+0xf4> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4a31c: 4a82 tstl %d2 <== NOT EXECUTED 4a31e: 6e00 ff30 bgtw 4a250 <pipe_write+0x14> <== NOT EXECUTED 4a322: 2404 movel %d4,%d2 <== NOT EXECUTED
return written;
return ret;
}
4a324: 2002 movel %d2,%d0 <== NOT EXECUTED 4a326: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a32c: 4e5e unlk %fp <== NOT EXECUTED 4a32e: 4e75 rts <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
4a330: 4eb9 0004 be98 jsr 4be98 <getpid> <== NOT EXECUTED 4a336: 4878 000d pea d <OPER1+0x1> <== NOT EXECUTED 4a33a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a33c: 4eb9 0004 c4e0 jsr 4c4e0 <kill> <== NOT EXECUTED 4a342: 508f addql #8,%sp <== NOT EXECUTED 4a344: 60d6 bras 4a31c <pipe_write+0xe0> <== NOT EXECUTED
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4a346: 74fc moveq #-4,%d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4a348: 2002 movel %d2,%d0 <== NOT EXECUTED 4a34a: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a350: 4e5e unlk %fp <== NOT EXECUTED 4a352: 4e75 rts <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a354: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4a358: 78e0 moveq #-32,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a35a: 4e94 jsr %a4@ <== NOT EXECUTED 4a35c: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4a35e: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4a360: b084 cmpl %d4,%d0 <== NOT EXECUTED 4a362: 66b8 bnes 4a31c <pipe_write+0xe0> <== NOT EXECUTED 4a364: 60ca bras 4a330 <pipe_write+0xf4> <== NOT EXECUTED
}
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
4a366: 7a01 moveq #1,%d5 <== NOT EXECUTED 4a368: 4286 clrl %d6 <== NOT EXECUTED 4a36a: 4282 clrl %d2 <== NOT EXECUTED 4a36c: 49f9 0004 6840 lea 46840 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4a372: 4bf9 0004 ce58 lea 4ce58 <rtems_barrier_wait>,%a5 <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4a378: 2e3c 0005 0dd8 movel #331224,%d7 <== NOT EXECUTED 4a37e: 6000 ff20 braw 4a2a0 <pipe_write+0x64> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4a382: 2043 moveal %d3,%a0 <== NOT EXECUTED 4a384: 91c6 subal %d6,%a0 <== NOT EXECUTED 4a386: b1c4 cmpal %d4,%a0 <== NOT EXECUTED 4a388: 6402 bccs 4a38c <pipe_write+0x150> <== NOT EXECUTED 4a38a: 2808 movel %a0,%d4 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4a38c: 2a01 movel %d1,%d5 <== NOT EXECUTED 4a38e: daaa 0008 addl %a2@(8),%d5 <== NOT EXECUTED 4a392: 4c40 5001 remul %d0,%d1,%d5 <== NOT EXECUTED 4a396: 2a00 movel %d0,%d5 <== NOT EXECUTED 4a398: 9a81 subl %d1,%d5 <== NOT EXECUTED
if (chunk > chunk1) {
4a39a: ba84 cmpl %d4,%d5 <== NOT EXECUTED 4a39c: 6c76 bges 4a414 <pipe_write+0x1d8> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4a39e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 4a3a0: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a3a4: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a3a8: d292 addl %a2@,%d1 <== NOT EXECUTED 4a3aa: 2047 moveal %d7,%a0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4a3ac: dc85 addl %d5,%d6 <== NOT EXECUTED
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4a3ae: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a3b0: 4e90 jsr %a0@ <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4a3b2: 2004 movel %d4,%d0 <== NOT EXECUTED 4a3b4: 9085 subl %d5,%d0 <== NOT EXECUTED 4a3b6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4a3b8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a3bc: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a3c0: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a3c2: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4a3c4: 4e90 jsr %a0@ <== NOT EXECUTED 4a3c6: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
4a3ca: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4a3ce: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4a3d2: 6612 bnes 4a3e6 <pipe_write+0x1aa> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
written += chunk;
4a3d4: d484 addl %d4,%d2 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4a3d6: 2c02 movel %d2,%d6 <== NOT EXECUTED 4a3d8: b483 cmpl %d3,%d2 <== NOT EXECUTED 4a3da: 645a bccs 4a436 <pipe_write+0x1fa> <== NOT EXECUTED 4a3dc: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a3e0: 7a01 moveq #1,%d5 <== NOT EXECUTED 4a3e2: 6000 febc braw 4a2a0 <pipe_write+0x64> <== NOT EXECUTED
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
4a3e6: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4a3ea: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4a3ee: 4eb9 0004 cde0 jsr 4cde0 <rtems_barrier_release> <== NOT EXECUTED 4a3f4: 508f addql #8,%sp <== NOT EXECUTED 4a3f6: 60dc bras 4a3d4 <pipe_write+0x198> <== NOT EXECUTED
/* 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)) {
4a3f8: 78fc moveq #-4,%d4 <== NOT EXECUTED 4a3fa: 6000 ff20 braw 4a31c <pipe_write+0xe0> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a3fe: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
4a402: 78f5 moveq #-11,%d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a404: 4e94 jsr %a4@ <== NOT EXECUTED 4a406: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4a408: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4a40a: b084 cmpl %d4,%d0 <== NOT EXECUTED 4a40c: 6600 ff0e bnew 4a31c <pipe_write+0xe0> <== NOT EXECUTED 4a410: 6000 ff1e braw 4a330 <pipe_write+0xf4> <== NOT EXECUTED
if (chunk > chunk1) {
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
4a414: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4a416: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4a41a: 4870 6800 pea %a0@(00000000,%d6:l) <== NOT EXECUTED 4a41e: d292 addl %a2@,%d1 <== NOT EXECUTED 4a420: 2047 moveal %d7,%a0 <== NOT EXECUTED 4a422: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4a424: 4e90 jsr %a0@ <== NOT EXECUTED 4a426: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
pipe->Length += chunk;
4a42a: d9aa 000c addl %d4,%a2@(12) <== NOT EXECUTED
if (pipe->waitingReaders > 0)
4a42e: 4aaa 0018 tstl %a2@(24) <== NOT EXECUTED 4a432: 67a0 beqs 4a3d4 <pipe_write+0x198> <== NOT EXECUTED 4a434: 60b0 bras 4a3e6 <pipe_write+0x1aa> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a436: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4a43a: 4284 clrl %d4 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4a43c: 4e94 jsr %a4@ <== NOT EXECUTED 4a43e: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4a440: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4a442: b084 cmpl %d4,%d0 <== NOT EXECUTED 4a444: 6600 fed6 bnew 4a31c <pipe_write+0xe0> <== NOT EXECUTED 4a448: 6000 fee6 braw 4a330 <pipe_write+0xf4> <== NOT EXECUTED
00047c8c <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
47c8c: 4e56 0000 linkw %fp,#0 47c90: 222e 000c movel %fp@(12),%d1
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47c94: 2001 movel %d1,%d0 47c96: 5380 subql #1,%d0
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
47c98: 52b9 0006 746c addql #1,6746c <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47c9e: c081 andl %d1,%d0
47ca0: 6608 bnes 47caa <posix_memalign+0x1e> <== NEVER TAKEN
47ca2: 103c 0003 moveb #3,%d0 47ca6: b081 cmpl %d1,%d0
47ca8: 6506 bcss 47cb0 <posix_memalign+0x24> /* * rtems_memalign does all of the error checking work EXCEPT * for adding restrictionso on the alignment. */ return rtems_memalign( pointer, alignment, size ); }
47caa: 7016 moveq #22,%d0 47cac: 4e5e unlk %fp 47cae: 4e75 rts 47cb0: 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 );
47cb2: 4ef9 0004 7e04 jmp 47e04 <rtems_memalign>
0004ab38 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
4ab38: 4e56 0000 linkw %fp,#0 4ab3c: 206e 0008 moveal %fp@(8),%a0 4ab40: 202e 000c movel %fp@(12),%d0 4ab44: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4ab46: 4a88 tstl %a0
4ab48: 672e beqs 4ab78 <pthread_attr_setschedpolicy+0x40>
4ab4a: 4a90 tstl %a0@
4ab4c: 672a beqs 4ab78 <pthread_attr_setschedpolicy+0x40>
return EINVAL;
switch ( policy ) {
4ab4e: 7204 moveq #4,%d1 4ab50: b280 cmpl %d0,%d1
4ab52: 640c bccs 4ab60 <pthread_attr_setschedpolicy+0x28>
return 0;
default:
return ENOTSUP;
}
}
4ab54: 241f movel %sp@+,%d2
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4ab56: 203c 0000 0086 movel #134,%d0
return 0;
default:
return ENOTSUP;
}
}
4ab5c: 4e5e unlk %fp 4ab5e: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4ab60: 123c 0001 moveb #1,%d1 4ab64: 7417 moveq #23,%d2 4ab66: e1a9 lsll %d0,%d1 4ab68: c282 andl %d2,%d1
4ab6a: 67e8 beqs 4ab54 <pthread_attr_setschedpolicy+0x1c><== NEVER TAKEN
return 0;
default:
return ENOTSUP;
}
}
4ab6c: 241f movel %sp@+,%d2 4ab6e: 4e5e unlk %fp
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
4ab70: 2140 0014 movel %d0,%a0@(20) 4ab74: 4280 clrl %d0
return 0;
default:
return ENOTSUP;
}
}
4ab76: 4e75 rts 4ab78: 241f movel %sp@+,%d2
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
4ab7a: 7016 moveq #22,%d0
default:
return ENOTSUP;
}
}
4ab7c: 4e5e unlk %fp <== NOT EXECUTED
0004ded4 <pthread_attr_setstacksize>:
int pthread_attr_setstacksize(
pthread_attr_t *attr,
size_t stacksize
)
{
4ded4: 4e56 0000 linkw %fp,#0 4ded8: 206e 0008 moveal %fp@(8),%a0 4dedc: 222e 000c movel %fp@(12),%d1
if ( !attr || !attr->is_initialized )
4dee0: 4a88 tstl %a0
4dee2: 6724 beqs 4df08 <pthread_attr_setstacksize+0x34> <== NEVER TAKEN
4dee4: 4a90 tstl %a0@
4dee6: 6720 beqs 4df08 <pthread_attr_setstacksize+0x34> <== NEVER TAKEN
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
4dee8: 2039 0006 1082 movel 61082 <rtems_minimum_stack_size>,%d0 4deee: d080 addl %d0,%d0 4def0: b280 cmpl %d0,%d1
4def2: 650a bcss 4defe <pthread_attr_setstacksize+0x2a>
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4def4: 4280 clrl %d0
return 0; }
4def6: 4e5e unlk %fp
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4def8: 2141 0008 movel %d1,%a0@(8)
return 0; }
4defc: 4e75 rts
{
if ( !attr || !attr->is_initialized )
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
4defe: 2140 0008 movel %d0,%a0@(8) 4df02: 4280 clrl %d0
else
attr->stacksize = stacksize;
return 0;
}
4df04: 4e5e unlk %fp 4df06: 4e75 rts
return EINVAL;
if (stacksize < PTHREAD_MINIMUM_STACK_SIZE)
attr->stacksize = PTHREAD_MINIMUM_STACK_SIZE;
else
attr->stacksize = stacksize;
4df08: 7016 moveq #22,%d0
return 0; }
4df0a: 4e5e unlk %fp
...
00046ad4 <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
46ad4: 4e56 ffe0 linkw %fp,#-32 46ad8: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46adc: 246e 0008 moveal %fp@(8),%a2 46ae0: 262e 000c movel %fp@(12),%d3 46ae4: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
46ae8: 4a8a tstl %a2
46aea: 677a beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
if ( count == 0 )
46aec: 4a82 tstl %d2
46aee: 6776 beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
46af0: 4a83 tstl %d3 46af2: 6700 0090 beqw 46b84 <pthread_barrier_init+0xb0> 46af6: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46af8: 4a90 tstl %a0@
46afa: 676a beqs 46b66 <pthread_barrier_init+0x92>
return EINVAL;
switch ( the_attr->process_shared ) {
46afc: 4aa8 0004 tstl %a0@(4)
46b00: 6664 bnes 46b66 <pthread_barrier_init+0x92> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46b02: 2039 0006 2b90 movel 62b90 <_Thread_Dispatch_disable_level>,%d0 46b08: 5280 addql #1,%d0
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
the_attributes.maximum_count = count;
46b0a: 2d42 fffc movel %d2,%fp@(-4) 46b0e: 23c0 0006 2b90 movel %d0,62b90 <_Thread_Dispatch_disable_level>
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
46b14: 42ae fff8 clrl %fp@(-8)
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
46b18: 4879 0006 2ed2 pea 62ed2 <_POSIX_Barrier_Information> 46b1e: 4eb9 0004 8eb8 jsr 48eb8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
46b24: 588f addql #4,%sp 46b26: 2640 moveal %d0,%a3 46b28: 4a80 tstl %d0
46b2a: 6746 beqs 46b72 <pthread_barrier_init+0x9e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46b2c: 486e fff8 pea %fp@(-8) 46b30: 486b 0010 pea %a3@(16) 46b34: 4eb9 0004 848c jsr 4848c <_CORE_barrier_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46b3a: 202b 0008 movel %a3@(8),%d0 46b3e: 4281 clrl %d1 46b40: 2079 0006 2eea moveal 62eea <_POSIX_Barrier_Information+0x18>,%a0 46b46: 3200 movew %d0,%d1 46b48: 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;
46b4c: 42ab 000c clrl %a3@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
46b50: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
46b52: 4eb9 0004 9bdc jsr 49bdc <_Thread_Enable_dispatch>
return 0;
46b58: 508f addql #8,%sp
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
_Thread_Enable_dispatch();
46b5a: 4280 clrl %d0
return 0; }
46b5c: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b62: 4e5e unlk %fp 46b64: 4e75 rts
/* * Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0;
46b66: 7016 moveq #22,%d0
}
46b68: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b6e: 4e5e unlk %fp 46b70: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
46b72: 4eb9 0004 9bdc jsr 49bdc <_Thread_Enable_dispatch> 46b78: 700b moveq #11,%d0
* Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; }
46b7a: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46b80: 4e5e unlk %fp 46b82: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
46b84: 260e movel %fp,%d3 46b86: 0683 ffff fff0 addil #-16,%d3 46b8c: 2f03 movel %d3,%sp@- 46b8e: 4eb9 0004 6a10 jsr 46a10 <pthread_barrierattr_init> 46b94: 588f addql #4,%sp 46b96: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46b98: 4a90 tstl %a0@ 46b9a: 6600 ff60 bnew 46afc <pthread_barrier_init+0x28>
46b9e: 60c6 bras 46b66 <pthread_barrier_init+0x92> <== NOT EXECUTED
00046540 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
46540: 4e56 0000 linkw %fp,#0 46544: 2f03 movel %d3,%sp@- 46546: 262e 000c movel %fp@(12),%d3 4654a: 2f02 movel %d2,%sp@- 4654c: 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 )
46550: 6754 beqs 465a6 <pthread_cleanup_push+0x66>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46552: 2039 0006 2638 movel 62638 <_Thread_Dispatch_disable_level>,%d0 46558: 5280 addql #1,%d0 4655a: 23c0 0006 2638 movel %d0,62638 <_Thread_Dispatch_disable_level>
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
46560: 4878 0010 pea 10 <INVALID_OPERATION> 46564: 4eb9 0004 ab54 jsr 4ab54 <_Workspace_Allocate>
if ( handler ) {
4656a: 588f addql #4,%sp 4656c: 4a80 tstl %d0
4656e: 6726 beqs 46596 <pthread_cleanup_push+0x56> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
handler_stack = &thread_support->Cancellation_Handlers;
46570: 2079 0006 26f2 moveal 626f2 <_Thread_Executing>,%a0 46576: 2228 010e movel %a0@(270),%d1
handler->routine = routine;
4657a: 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;
4657c: 0681 0000 00e0 addil #224,%d1
handler->routine = routine;
46582: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
46586: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
4658a: 2f00 movel %d0,%sp@- 4658c: 2f01 movel %d1,%sp@- 4658e: 4eb9 0004 7f5c jsr 47f5c <_Chain_Append> 46594: 508f addql #8,%sp
} _Thread_Enable_dispatch(); }
46596: 242e fff8 movel %fp@(-8),%d2 4659a: 262e fffc movel %fp@(-4),%d3 4659e: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
465a0: 4ef9 0004 9678 jmp 49678 <_Thread_Enable_dispatch>
}
465a6: 242e fff8 movel %fp@(-8),%d2 465aa: 262e fffc movel %fp@(-4),%d3 465ae: 4e5e unlk %fp
...
00047404 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
47404: 4e56 0000 linkw %fp,#0 47408: 202e 000c movel %fp@(12),%d0 4740c: 2f0b movel %a3,%sp@- 4740e: 2f0a movel %a2,%sp@-
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
47410: 45f9 0006 13a2 lea 613a2 <_POSIX_Condition_variables_Default_attributes>,%a2 47416: 4a80 tstl %d0
47418: 6702 beqs 4741c <pthread_cond_init+0x18>
4741a: 2440 moveal %d0,%a2
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
4741c: 7001 moveq #1,%d0 4741e: b0aa 0004 cmpl %a2@(4),%d0
47422: 6704 beqs 47428 <pthread_cond_init+0x24> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
47424: 4a92 tstl %a2@
47426: 660e bnes 47436 <pthread_cond_init+0x32>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47428: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
4742c: 7016 moveq #22,%d0
}
4742e: 266e fffc moveal %fp@(-4),%a3 47432: 4e5e unlk %fp 47434: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47436: 2039 0006 3e7c movel 63e7c <_Thread_Dispatch_disable_level>,%d0 4743c: 5280 addql #1,%d0 4743e: 23c0 0006 3e7c movel %d0,63e7c <_Thread_Dispatch_disable_level>
*/
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
47444: 4879 0006 424a pea 6424a <_POSIX_Condition_variables_Information> 4744a: 4eb9 0004 9d98 jsr 49d98 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
47450: 588f addql #4,%sp 47452: 2640 moveal %d0,%a3 47454: 4a80 tstl %d0
47456: 6752 beqs 474aa <pthread_cond_init+0xa6>
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
47458: 42ab 0014 clrl %a3@(20)
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
4745c: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
47462: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f> 47466: 4878 0800 pea 800 <D_MAX_EXP+0x1> 4746a: 42a7 clrl %sp@- 4746c: 486b 0018 pea %a3@(24) 47470: 4eb9 0004 b2f0 jsr 4b2f0 <_Thread_queue_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47476: 202b 0008 movel %a3@(8),%d0 4747a: 4281 clrl %d1 4747c: 2079 0006 4262 moveal 64262 <_POSIX_Condition_variables_Information+0x18>,%a0 47482: 3200 movew %d0,%d1 47484: 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;
47488: 42ab 000c clrl %a3@(12)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
4748c: 206e 0008 moveal %fp@(8),%a0 47490: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
47492: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
return 0;
}
47498: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
4749c: 4fef 0010 lea %sp@(16),%sp
0
);
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
474a0: 4280 clrl %d0
return 0;
}
474a2: 266e fffc moveal %fp@(-4),%a3 474a6: 4e5e unlk %fp 474a8: 4e75 rts
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
474aa: 4eb9 0004 aabc jsr 4aabc <_Thread_Enable_dispatch>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474b0: 246e fff8 moveal %fp@(-8),%a2
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
474b4: 700c moveq #12,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474b6: 266e fffc moveal %fp@(-4),%a3 474ba: 4e5e unlk %fp
...
00047264 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
47264: 4e56 0000 linkw %fp,#0 47268: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
4726c: 4a88 tstl %a0
4726e: 670c beqs 4727c <pthread_condattr_destroy+0x18>
47270: 4a90 tstl %a0@
47272: 6708 beqs 4727c <pthread_condattr_destroy+0x18> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
47274: 4280 clrl %d0
return 0; }
47276: 4e5e unlk %fp
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
47278: 4290 clrl %a0@
return 0; }
4727a: 4e75 rts
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
return 0;
4727c: 7016 moveq #22,%d0
}
4727e: 4e5e unlk %fp
...
0004fe90 <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4fe90: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4fe94: 2f2e 0008 movel %fp@(8),%sp@- 4fe98: 2f39 0006 14e6 movel 614e6 <_Thread_Executing>,%sp@- 4fe9e: 4eb9 0004 fe20 jsr 4fe20 <_POSIX_Thread_Exit>
4fea4: 508f addql #8,%sp <== NOT EXECUTED
}
4fea6: 4e5e unlk %fp <== NOT EXECUTED
...
00048e18 <pthread_getschedparam>:
int pthread_getschedparam(
pthread_t thread,
int *policy,
struct sched_param *param
)
{
48e18: 4e56 fff0 linkw %fp,#-16 48e1c: 48d7 1c00 moveml %a2-%a4,%sp@ 48e20: 266e 000c moveal %fp@(12),%a3 48e24: 246e 0010 moveal %fp@(16),%a2
Objects_Locations location;
POSIX_API_Control *api;
register Thread_Control *the_thread;
if ( !policy || !param )
48e28: 4a8b tstl %a3
48e2a: 676e beqs 48e9a <pthread_getschedparam+0x82> <== NEVER TAKEN
48e2c: 4a8a tstl %a2
48e2e: 676a beqs 48e9a <pthread_getschedparam+0x82> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Get (
pthread_t id,
Objects_Locations *location
)
{
return (Thread_Control *)
48e30: 486e fffc pea %fp@(-4) 48e34: 2f2e 0008 movel %fp@(8),%sp@- 48e38: 4879 0006 68d2 pea 668d2 <_POSIX_Threads_Information> 48e3e: 4eb9 0004 b468 jsr 4b468 <_Objects_Get>
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
48e44: 4fef 000c lea %sp@(12),%sp 48e48: 4aae fffc tstl %fp@(-4)
48e4c: 6640 bnes 48e8e <pthread_getschedparam+0x76>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48e4e: 2040 moveal %d0,%a0
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
param->sched_priority =
48e50: 4281 clrl %d1
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
48e52: 2868 010e moveal %a0@(270),%a4
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
48e56: 204a moveal %a2,%a0 48e58: 43ec 0084 lea %a4@(132),%a1
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( policy )
*policy = api->schedpolicy;
48e5c: 26ac 0080 movel %a4@(128),%a3@
if ( param ) {
*param = api->schedparam;
param->sched_priority =
48e60: 1239 0006 4ee6 moveb 64ee6 <rtems_maximum_priority>,%d1
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
48e66: 20d9 movel %a1@+,%a0@+ 48e68: 20d9 movel %a1@+,%a0@+ 48e6a: 20d9 movel %a1@+,%a0@+ 48e6c: 20d9 movel %a1@+,%a0@+ 48e6e: 20d9 movel %a1@+,%a0@+ 48e70: 20d9 movel %a1@+,%a0@+ 48e72: 2091 movel %a1@,%a0@
param->sched_priority =
48e74: 2040 moveal %d0,%a0 48e76: 92a8 0014 subl %a0@(20),%d1 48e7a: 2481 movel %d1,%a2@
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
48e7c: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch>
break;
}
return ESRCH;
}
48e82: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4
if ( param ) {
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
48e88: 4280 clrl %d0
break;
}
return ESRCH;
}
48e8a: 4e5e unlk %fp 48e8c: 4e75 rts
if ( !policy || !param )
return EINVAL;
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
48e8e: 7003 moveq #3,%d0
break;
}
return ESRCH;
}
48e90: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48e96: 4e5e unlk %fp 48e98: 4e75 rts
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
48e9a: 7016 moveq #22,%d0
break;
}
return ESRCH;
}
48e9c: 4cee 1c00 fff0 moveml %fp@(-16),%a2-%a4 48ea2: 4e5e unlk %fp
...
0004664c <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
4664c: 4e56 ffe4 linkw %fp,#-28 46650: 2039 0006 33bc movel 633bc <_Thread_Dispatch_disable_level>,%d0 46656: 5280 addql #1,%d0 46658: 23c0 0006 33bc movel %d0,633bc <_Thread_Dispatch_disable_level> 4665e: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
* 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 );
46662: 4879 0006 3750 pea 63750 <_POSIX_Keys_Information> 46668: 4eb9 0004 8bf4 jsr 48bf4 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
4666e: 588f addql #4,%sp 46670: 2840 moveal %d0,%a4 46672: 4a80 tstl %d0 46674: 6700 0098 beqw 4670e <pthread_key_create+0xc2>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
46678: 45f9 0006 3378 lea 63378 <_Objects_Information_table+0x4>,%a2 4667e: 47ec 0018 lea %a4@(24),%a3 46682: 7601 moveq #1,%d3
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 );
46684: 4bf9 0004 ae88 lea 4ae88 <_Workspace_Allocate>,%a5
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4668a: 283c 0005 1c70 movel #334960,%d4
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
46690: 296e 000c 0010 movel %fp@(12),%a4@(16)
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
46696: 2052 moveal %a2@,%a0 46698: 4a88 tstl %a0
4669a: 6762 beqs 466fe <pthread_key_create+0xb2>
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
4669c: 2068 0004 moveal %a0@(4),%a0 466a0: 4282 clrl %d2 466a2: 3428 000e movew %a0@(14),%d2 466a6: 5282 addql #1,%d2 466a8: e58a lsll #2,%d2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
466aa: 2f02 movel %d2,%sp@- 466ac: 4e95 jsr %a5@
if ( !table ) {
466ae: 588f addql #4,%sp 466b0: 4a80 tstl %d0
466b2: 676c beqs 46720 <pthread_key_create+0xd4>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
466b4: 2680 movel %d0,%a3@
memset( table, '\0', bytes_to_allocate );
466b6: 2044 moveal %d4,%a0
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
466b8: 5283 addql #1,%d3 466ba: 588a addql #4,%a2 466bc: 588b addql #4,%a3
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
466be: 2f02 movel %d2,%sp@- 466c0: 42a7 clrl %sp@- 466c2: 2f00 movel %d0,%sp@- 466c4: 4e90 jsr %a0@ 466c6: 4fef 000c lea %sp@(12),%sp
* This is a bit more complex than one might initially expect because
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
466ca: 7005 moveq #5,%d0 466cc: b083 cmpl %d3,%d0
466ce: 66c6 bnes 46696 <pthread_key_create+0x4a> <== ALWAYS TAKEN
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
466d0: 202c 0008 movel %a4@(8),%d0 466d4: 4281 clrl %d1 466d6: 2079 0006 3768 moveal 63768 <_POSIX_Keys_Information+0x18>,%a0 466dc: 3200 movew %d0,%d1 466de: 218c 1c00 movel %a4,%a0@(00000000,%d1:l:4)
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
466e2: 42ac 000c clrl %a4@(12)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
466e6: 206e 0008 moveal %fp@(8),%a0 466ea: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
466ec: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch>
return 0;
}
466f2: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
_Thread_Enable_dispatch();
466f8: 4280 clrl %d0
return 0;
}
466fa: 4e5e unlk %fp 466fc: 4e75 rts
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
466fe: 4293 clrl %a3@
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
46700: 5283 addql #1,%d3 46702: 588a addql #4,%a2 46704: 588b addql #4,%a3
* This is a bit more complex than one might initially expect because
* APIs are optional. Thus there may be no ITRON tasks to have keys
* for. [NOTE: Currently RTEMS Classic API tasks are always enabled.]
*/
for ( the_api = 1;
46706: 7005 moveq #5,%d0 46708: b083 cmpl %d3,%d0
4670a: 668a bnes 46696 <pthread_key_create+0x4a> <== NEVER TAKEN
4670c: 60c2 bras 466d0 <pthread_key_create+0x84>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4670e: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch> 46714: 700b moveq #11,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46716: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4671c: 4e5e unlk %fp 4671e: 4e75 rts
#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;
46720: 2403 movel %d3,%d2 46722: 5382 subql #1,%d2
46724: 6718 beqs 4673e <pthread_key_create+0xf2>
46726: 47f9 0004 aea4 lea 4aea4 <_Workspace_Free>,%a3 4672c: 45f4 3c10 lea %a4@(00000010,%d3:l:4),%a2
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
46730: 2f12 movel %a2@,%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-- )
46732: 5382 subql #1,%d2 46734: 598a subql #4,%a2
_Workspace_Free( the_key->Values[ the_api ] );
46736: 4e93 jsr %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;
46738: 588f addql #4,%sp 4673a: 4a82 tstl %d2
4673c: 66f2 bnes 46730 <pthread_key_create+0xe4>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
4673e: 2f0c movel %a4,%sp@- 46740: 4879 0006 3750 pea 63750 <_POSIX_Keys_Information> 46746: 4eb9 0004 8f2c jsr 48f2c <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
4674c: 4eb9 0004 9918 jsr 49918 <_Thread_Enable_dispatch>
return ENOMEM;
46752: 508f addql #8,%sp
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
46754: 700c moveq #12,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46756: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4675c: 4e5e unlk %fp <== NOT EXECUTED
00046338 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
46338: 4e56 0000 linkw %fp,#0 4633c: 206e 0008 moveal %fp@(8),%a0 46340: 226e 000c moveal %fp@(12),%a1
if ( !attr )
46344: 4a88 tstl %a0
46346: 6712 beqs 4635a <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !attr->is_initialized )
46348: 4a90 tstl %a0@
4634a: 670e beqs 4635a <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !type )
4634c: 4a89 tstl %a1
4634e: 670a beqs 4635a <pthread_mutexattr_gettype+0x22> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
46350: 22a8 0010 movel %a0@(16),%a1@ 46354: 4280 clrl %d0
return 0; }
46356: 4e5e unlk %fp 46358: 4e75 rts
if ( !type )
return EINVAL;
*type = attr->type;
return 0;
4635a: 7016 moveq #22,%d0
}
4635c: 4e5e unlk %fp <== NOT EXECUTED
000484b0 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
484b0: 4e56 0000 linkw %fp,#0 484b4: 206e 0008 moveal %fp@(8),%a0 484b8: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
484bc: 4a88 tstl %a0
484be: 670a beqs 484ca <pthread_mutexattr_setpshared+0x1a>
484c0: 4a90 tstl %a0@
484c2: 6706 beqs 484ca <pthread_mutexattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
484c4: 7201 moveq #1,%d1 484c6: b280 cmpl %d0,%d1
484c8: 6406 bccs 484d0 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
484ca: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
484cc: 4e5e unlk %fp 484ce: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
484d0: 2140 0004 movel %d0,%a0@(4) 484d4: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
484d6: 4e5e unlk %fp
...
0004639c <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
4639c: 4e56 0000 linkw %fp,#0 463a0: 206e 0008 moveal %fp@(8),%a0 463a4: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
463a8: 4a88 tstl %a0
463aa: 670a beqs 463b6 <pthread_mutexattr_settype+0x1a>
463ac: 4a90 tstl %a0@
463ae: 6706 beqs 463b6 <pthread_mutexattr_settype+0x1a> <== NEVER TAKEN
return EINVAL;
switch ( type ) {
463b0: 7203 moveq #3,%d1 463b2: b280 cmpl %d0,%d1
463b4: 6406 bccs 463bc <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
463b6: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
463b8: 4e5e unlk %fp 463ba: 4e75 rts
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
463bc: 2140 0010 movel %d0,%a0@(16) 463c0: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
463c2: 4e5e unlk %fp
...
0004713c <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
4713c: 4e56 ffec linkw %fp,#-20 47140: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 47144: 246e 0008 moveal %fp@(8),%a2 47148: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
4714c: 4a8a tstl %a2
4714e: 6766 beqs 471b6 <pthread_once+0x7a>
47150: 4a8b tstl %a3
47152: 6762 beqs 471b6 <pthread_once+0x7a>
return EINVAL;
if ( !once_control->init_executed ) {
47154: 4aaa 0004 tstl %a2@(4)
47158: 670c beqs 47166 <pthread_once+0x2a>
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
4715a: 4280 clrl %d0
} return 0; }
4715c: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47162: 4e5e unlk %fp 47164: 4e75 rts
if ( !once_control || !init_routine )
return EINVAL;
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
47166: 240e movel %fp,%d2 47168: 5982 subql #4,%d2 4716a: 49f9 0004 7dfc lea 47dfc <rtems_task_mode>,%a4 47170: 2f02 movel %d2,%sp@- 47172: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 47176: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4717a: 4e94 jsr %a4@
if ( !once_control->init_executed ) {
4717c: 4fef 000c lea %sp@(12),%sp 47180: 4aaa 0004 tstl %a2@(4)
47184: 6714 beqs 4719a <pthread_once+0x5e> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
47186: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47188: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 4718c: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 47190: 4e94 jsr %a4@ <== NOT EXECUTED 47192: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
47196: 4280 clrl %d0 47198: 60c2 bras 4715c <pthread_once+0x20>
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
once_control->init_executed = true;
4719a: 7001 moveq #1,%d0 4719c: 2540 0004 movel %d0,%a2@(4)
if ( !once_control->init_executed ) {
rtems_mode saveMode;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( !once_control->init_executed ) {
once_control->is_initialized = true;
471a0: 2480 movel %d0,%a2@
once_control->init_executed = true;
(*init_routine)();
471a2: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
471a4: 2f02 movel %d2,%sp@- 471a6: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 471aa: 2f2e fffc movel %fp@(-4),%sp@- 471ae: 4e94 jsr %a4@ 471b0: 4fef 000c lea %sp@(12),%sp 471b4: 60e0 bras 47196 <pthread_once+0x5a> 471b6: 7016 moveq #22,%d0
} return 0; }
471b8: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 471be: 4e5e unlk %fp
...
000473d0 <pthread_rwlock_destroy>:
*/
int pthread_rwlock_destroy(
pthread_rwlock_t *rwlock
)
{
473d0: 4e56 fffc linkw %fp,#-4 473d4: 206e 0008 moveal %fp@(8),%a0 473d8: 2f0a movel %a2,%sp@-
POSIX_RWLock_Control *the_rwlock = NULL;
Objects_Locations location;
if ( !rwlock )
473da: 4a88 tstl %a0
473dc: 673e beqs 4741c <pthread_rwlock_destroy+0x4c> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Get (
pthread_rwlock_t *RWLock,
Objects_Locations *location
)
{
return (POSIX_RWLock_Control *) _Objects_Get(
473de: 486e fffc pea %fp@(-4) 473e2: 2f10 movel %a0@,%sp@- 473e4: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 473ea: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
473f0: 4fef 000c lea %sp@(12),%sp 473f4: 2440 moveal %d0,%a2 473f6: 4aae fffc tstl %fp@(-4)
473fa: 6620 bnes 4741c <pthread_rwlock_destroy+0x4c> <== NEVER TAKEN
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
473fc: 486a 0010 pea %a2@(16) 47400: 4eb9 0004 b3e0 jsr 4b3e0 <_Thread_queue_First> 47406: 588f addql #4,%sp 47408: 4a80 tstl %d0
4740a: 671a beqs 47426 <pthread_rwlock_destroy+0x56>
_Thread_Enable_dispatch();
4740c: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47412: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL:
/*
* If there is at least one thread waiting, then do not delete it.
*/
if ( _Thread_queue_First( &the_rwlock->RWLock.Wait_queue ) != NULL ) {
_Thread_Enable_dispatch();
47416: 7010 moveq #16,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47418: 4e5e unlk %fp 4741a: 4e75 rts 4741c: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
47420: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47422: 4e5e unlk %fp 47424: 4e75 rts
/*
* POSIX doesn't require behavior when it is locked.
*/
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
47426: 2f0a movel %a2,%sp@- 47428: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 4742e: 4eb9 0004 9e88 jsr 49e88 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _POSIX_RWLock_Free (
POSIX_RWLock_Control *the_RWLock
)
{
_Objects_Free( &_POSIX_RWLock_Information, &the_RWLock->Object );
47434: 2f0a movel %a2,%sp@- 47436: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 4743c: 4eb9 0004 a130 jsr 4a130 <_Objects_Free>
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
47442: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47448: 246e fff8 moveal %fp@(-8),%a2
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
return 0;
4744c: 4fef 0010 lea %sp@(16),%sp
_Objects_Close( &_POSIX_RWLock_Information, &the_rwlock->Object );
_POSIX_RWLock_Free( the_rwlock );
_Thread_Enable_dispatch();
47450: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47452: 4e5e unlk %fp
...
00047458 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
47458: 4e56 ffe8 linkw %fp,#-24 4745c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 47460: 246e 0008 moveal %fp@(8),%a2 47464: 242e 000c movel %fp@(12),%d2
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
47468: 4a8a tstl %a2
4746a: 676e beqs 474da <pthread_rwlock_init+0x82>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
4746c: 4a82 tstl %d2 4746e: 6700 0088 beqw 474f8 <pthread_rwlock_init+0xa0> 47472: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
47474: 4a90 tstl %a0@
47476: 6762 beqs 474da <pthread_rwlock_init+0x82> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
47478: 4aa8 0004 tstl %a0@(4)
4747c: 665c bnes 474da <pthread_rwlock_init+0x82> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4747e: 2039 0006 4170 movel 64170 <_Thread_Dispatch_disable_level>,%d0 47484: 5280 addql #1,%d0 47486: 23c0 0006 4170 movel %d0,64170 <_Thread_Dispatch_disable_level>
* This function allocates a RWLock control block from
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
4748c: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 47492: 4eb9 0004 9df8 jsr 49df8 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
47498: 588f addql #4,%sp 4749a: 2640 moveal %d0,%a3 4749c: 4a80 tstl %d0
4749e: 6746 beqs 474e6 <pthread_rwlock_init+0x8e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
474a0: 486e fffc pea %fp@(-4) 474a4: 486b 0010 pea %a3@(16) 474a8: 4eb9 0004 9524 jsr 49524 <_CORE_RWLock_Initialize>
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
474ae: 202b 0008 movel %a3@(8),%d0 474b2: 4281 clrl %d1 474b4: 2079 0006 4334 moveal 64334 <_POSIX_RWLock_Information+0x18>,%a0 474ba: 3200 movew %d0,%d1 474bc: 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;
474c0: 42ab 000c clrl %a3@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
474c4: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
474c6: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
return 0;
474cc: 508f addql #8,%sp
0
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
474ce: 4280 clrl %d0
return 0; }
474d0: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474d6: 4e5e unlk %fp 474d8: 4e75 rts
);
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
474da: 7016 moveq #22,%d0
}
474dc: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474e2: 4e5e unlk %fp 474e4: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
474e6: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch> 474ec: 700b moveq #11,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
474ee: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 474f4: 4e5e unlk %fp 474f6: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
474f8: 240e movel %fp,%d2 474fa: 0682 ffff fff4 addil #-12,%d2 47500: 2f02 movel %d2,%sp@- 47502: 4eb9 0004 7f90 jsr 47f90 <pthread_rwlockattr_init> 47508: 588f addql #4,%sp 4750a: 2042 moveal %d2,%a0 4750c: 6000 ff66 braw 47474 <pthread_rwlock_init+0x1c>
0004757c <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
4757c: 4e56 ffec linkw %fp,#-20 47580: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47584: 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 )
47588: 4a8a tstl %a2 4758a: 6700 0082 beqw 4760e <pthread_rwlock_timedrdlock+0x92>
* * 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 );
4758e: 486e fff8 pea %fp@(-8) 47592: 2f2e 000c movel %fp@(12),%sp@- 47596: 4eb9 0004 eb60 jsr 4eb60 <_POSIX_Absolute_timeout_to_ticks> 4759c: 486e fffc pea %fp@(-4) 475a0: 2400 movel %d0,%d2 475a2: 2f12 movel %a2@,%sp@- 475a4: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 475aa: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
475b0: 4fef 0014 lea %sp@(20),%sp 475b4: 4aae fffc tstl %fp@(-4)
475b8: 6654 bnes 4760e <pthread_rwlock_timedrdlock+0x92> 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,
475ba: 7203 moveq #3,%d1 475bc: b282 cmpl %d2,%d1 475be: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
475c0: 42a7 clrl %sp@- 475c2: 2f2e fff8 movel %fp@(-8),%sp@- 475c6: 4483 negl %d3 475c8: 4281 clrl %d1 475ca: 1203 moveb %d3,%d1 475cc: 2040 moveal %d0,%a0 475ce: 2f01 movel %d1,%sp@- 475d0: 2f12 movel %a2@,%sp@- 475d2: 4868 0010 pea %a0@(16) 475d6: 4eb9 0004 9558 jsr 49558 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
475dc: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
if ( !do_wait ) {
475e2: 4fef 0014 lea %sp@(20),%sp 475e6: 4a03 tstb %d3
475e8: 6644 bnes 4762e <pthread_rwlock_timedrdlock+0xb2>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
475ea: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 475f0: 7202 moveq #2,%d1 475f2: 2028 0034 movel %a0@(52),%d0 475f6: b280 cmpl %d0,%d1
475f8: 6720 beqs 4761a <pthread_rwlock_timedrdlock+0x9e>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
475fa: 2f00 movel %d0,%sp@- 475fc: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47602: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47604: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4760a: 4e5e unlk %fp 4760c: 4e75 rts
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4760e: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47610: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47616: 4e5e unlk %fp 47618: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4761a: 4a82 tstl %d2
4761c: 67f0 beqs 4760e <pthread_rwlock_timedrdlock+0x92><== NEVER TAKEN
4761e: b282 cmpl %d2,%d1
47620: 65d8 bcss 475fa <pthread_rwlock_timedrdlock+0x7e><== NEVER TAKEN
47622: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47624: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4762a: 4e5e unlk %fp 4762c: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4762e: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 47634: 2028 0034 movel %a0@(52),%d0
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47638: 2f00 movel %d0,%sp@- 4763a: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47640: 588f addql #4,%sp 47642: 60c0 bras 47604 <pthread_rwlock_timedrdlock+0x88>
00047644 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
47644: 4e56 ffec linkw %fp,#-20 47648: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4764c: 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 )
47650: 4a8a tstl %a2 47652: 6700 0082 beqw 476d6 <pthread_rwlock_timedwrlock+0x92>
* * 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 );
47656: 486e fff8 pea %fp@(-8) 4765a: 2f2e 000c movel %fp@(12),%sp@- 4765e: 4eb9 0004 eb60 jsr 4eb60 <_POSIX_Absolute_timeout_to_ticks> 47664: 486e fffc pea %fp@(-4) 47668: 2400 movel %d0,%d2 4766a: 2f12 movel %a2@,%sp@- 4766c: 4879 0006 431c pea 6431c <_POSIX_RWLock_Information> 47672: 4eb9 0004 a294 jsr 4a294 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
47678: 4fef 0014 lea %sp@(20),%sp 4767c: 4aae fffc tstl %fp@(-4)
47680: 6654 bnes 476d6 <pthread_rwlock_timedwrlock+0x92>
(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,
47682: 7203 moveq #3,%d1 47684: b282 cmpl %d2,%d1 47686: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
47688: 42a7 clrl %sp@- 4768a: 2f2e fff8 movel %fp@(-8),%sp@- 4768e: 4483 negl %d3 47690: 4281 clrl %d1 47692: 1203 moveb %d3,%d1 47694: 2040 moveal %d0,%a0 47696: 2f01 movel %d1,%sp@- 47698: 2f12 movel %a2@,%sp@- 4769a: 4868 0010 pea %a0@(16) 4769e: 4eb9 0004 9618 jsr 49618 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
476a4: 4eb9 0004 ab1c jsr 4ab1c <_Thread_Enable_dispatch>
if ( !do_wait &&
476aa: 4fef 0014 lea %sp@(20),%sp 476ae: 4a03 tstb %d3
476b0: 6644 bnes 476f6 <pthread_rwlock_timedwrlock+0xb2>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476b2: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476b8: 7202 moveq #2,%d1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476ba: 2028 0034 movel %a0@(52),%d0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476be: b280 cmpl %d0,%d1
476c0: 6720 beqs 476e2 <pthread_rwlock_timedwrlock+0x9e>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
476c2: 2f00 movel %d0,%sp@- 476c4: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 476ca: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476cc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476d2: 4e5e unlk %fp 476d4: 4e75 rts
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
476d6: 7016 moveq #22,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476d8: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476de: 4e5e unlk %fp 476e0: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
476e2: 4a82 tstl %d2
476e4: 67f0 beqs 476d6 <pthread_rwlock_timedwrlock+0x92><== NEVER TAKEN
476e6: b282 cmpl %d2,%d1
476e8: 65d8 bcss 476c2 <pthread_rwlock_timedwrlock+0x7e><== NEVER TAKEN
476ea: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
476ec: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 476f2: 4e5e unlk %fp 476f4: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
476f6: 2079 0006 422a moveal 6422a <_Thread_Executing>,%a0 476fc: 2028 0034 movel %a0@(52),%d0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47700: 2f00 movel %d0,%sp@- 47702: 4eb9 0004 770c jsr 4770c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47708: 588f addql #4,%sp 4770a: 60c0 bras 476cc <pthread_rwlock_timedwrlock+0x88>
00047fb0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
47fb0: 4e56 0000 linkw %fp,#0 47fb4: 206e 0008 moveal %fp@(8),%a0 47fb8: 202e 000c movel %fp@(12),%d0
if ( !attr )
47fbc: 4a88 tstl %a0
47fbe: 670a beqs 47fca <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
if ( !attr->is_initialized )
47fc0: 4a90 tstl %a0@
47fc2: 6706 beqs 47fca <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
47fc4: 7201 moveq #1,%d1 47fc6: b280 cmpl %d0,%d1
47fc8: 6406 bccs 47fd0 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
47fca: 7016 moveq #22,%d0
default:
return EINVAL;
}
}
47fcc: 4e5e unlk %fp 47fce: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
47fd0: 2140 0004 movel %d0,%a0@(4) 47fd4: 4280 clrl %d0
return 0;
default:
return EINVAL;
}
}
47fd6: 4e5e unlk %fp
...
000492c8 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
492c8: 4e56 ffe0 linkw %fp,#-32 492cc: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 492d0: 282e 000c movel %fp@(12),%d4 492d4: 242e 0010 movel %fp@(16),%d2
int rc;
/*
* Check all the parameters
*/
if ( !param )
492d8: 6700 00c4 beqw 4939e <pthread_setschedparam+0xd6>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
492dc: 486e fff8 pea %fp@(-8) 492e0: 486e fffc pea %fp@(-4) 492e4: 2f02 movel %d2,%sp@- 492e6: 2f04 movel %d4,%sp@- 492e8: 4eb9 0004 fea4 jsr 4fea4 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
492ee: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
492f2: 2600 movel %d0,%d3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
492f4: 670c beqs 49302 <pthread_setschedparam+0x3a>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
492f6: 2003 movel %d3,%d0 492f8: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 492fe: 4e5e unlk %fp 49300: 4e75 rts 49302: 486e fff4 pea %fp@(-12) 49306: 2f2e 0008 movel %fp@(8),%sp@- 4930a: 4879 0006 68d2 pea 668d2 <_POSIX_Threads_Information> 49310: 4eb9 0004 b468 jsr 4b468 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
49316: 4fef 000c lea %sp@(12),%sp 4931a: 2440 moveal %d0,%a2 4931c: 4aae fff4 tstl %fp@(-12) 49320: 6600 008a bnew 493ac <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
49324: 266a 010e moveal %a2@(270),%a3
if ( api->schedpolicy == SCHED_SPORADIC )
49328: 7004 moveq #4,%d0 4932a: b0ab 0080 cmpl %a3@(128),%d0 4932e: 6700 00ba beqw 493ea <pthread_setschedparam+0x122>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
49332: 2242 moveal %d2,%a1 49334: 41eb 0084 lea %a3@(132),%a0
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
49338: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
4933c: 20d9 movel %a1@+,%a0@+ 4933e: 20d9 movel %a1@+,%a0@+ 49340: 20d9 movel %a1@+,%a0@+ 49342: 20d9 movel %a1@+,%a0@+ 49344: 20d9 movel %a1@+,%a0@+ 49346: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm;
49348: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
4934e: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
49350: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
49356: 4a84 tstl %d4
49358: 6d32 blts 4938c <pthread_setschedparam+0xc4> <== NEVER TAKEN
4935a: 7002 moveq #2,%d0 4935c: b084 cmpl %d4,%d0
4935e: 6d5c blts 493bc <pthread_setschedparam+0xf4>
49360: 4280 clrl %d0 49362: 1039 0006 4ee6 moveb 64ee6 <rtems_maximum_priority>,%d0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
49368: 41f9 0006 669c lea 6669c <_Thread_Ticks_per_timeslice>,%a0 4936e: 90ab 0084 subl %a3@(132),%d0 49372: 2550 0076 movel %a0@,%a2@(118)
the_thread->real_priority =
49376: 2540 0018 movel %d0,%a2@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
4937a: 4878 0001 pea 1 <ADD> 4937e: 2f00 movel %d0,%sp@- 49380: 2f0a movel %a2,%sp@- 49382: 4eb9 0004 b7d0 jsr 4b7d0 <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
49388: 4fef 000c lea %sp@(12),%sp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
4938c: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
49392: 2003 movel %d3,%d0 49394: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4939a: 4e5e unlk %fp 4939c: 4e75 rts
int rc;
/*
* Check all the parameters
*/
if ( !param )
4939e: 7616 moveq #22,%d3
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
493a0: 2003 movel %d3,%d0 493a2: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 493a8: 4e5e unlk %fp 493aa: 4e75 rts
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
493ac: 163c 0003 moveb #3,%d3
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
493b0: 2003 movel %d3,%d0 493b2: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 493b8: 4e5e unlk %fp 493ba: 4e75 rts
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
493bc: 103c 0004 moveb #4,%d0 493c0: b084 cmpl %d4,%d0
493c2: 66c8 bnes 4938c <pthread_setschedparam+0xc4> <== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
493c4: 276b 0084 00a0 movel %a3@(132),%a3@(160)
_Watchdog_Remove( &api->Sporadic_timer );
493ca: 486b 00a4 pea %a3@(164) 493ce: 4eb9 0004 d170 jsr 4d170 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
493d4: 2f0a movel %a2,%sp@- 493d6: 42a7 clrl %sp@- 493d8: 4eb9 0004 920c jsr 4920c <_POSIX_Threads_Sporadic_budget_TSR> 493de: 4fef 000c lea %sp@(12),%sp
break;
}
_Thread_Enable_dispatch();
493e2: 4eb9 0004 bcf0 jsr 4bcf0 <_Thread_Enable_dispatch> 493e8: 60a8 bras 49392 <pthread_setschedparam+0xca>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
493ea: 486b 00a4 pea %a3@(164) 493ee: 4eb9 0004 d170 jsr 4d170 <_Watchdog_Remove>
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
493f4: 256e fffc 007a movel %fp@(-4),%a2@(122)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
493fa: 2242 moveal %d2,%a1 493fc: 41eb 0084 lea %a3@(132),%a0
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
49400: 588f addql #4,%sp
api->schedpolicy = policy;
49402: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
49406: 20d9 movel %a1@+,%a0@+ 49408: 20d9 movel %a1@+,%a0@+ 4940a: 20d9 movel %a1@+,%a0@+ 4940c: 20d9 movel %a1@+,%a0@+ 4940e: 20d9 movel %a1@+,%a0@+ 49410: 20d9 movel %a1@+,%a0@+
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
49412: 256e fff8 007e movel %fp@(-8),%a2@(126)
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
49418: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
4941a: 4a84 tstl %d4 4941c: 6c00 ff3c bgew 4935a <pthread_setschedparam+0x92>
49420: 6000 ff6a braw 4938c <pthread_setschedparam+0xc4> <== NOT EXECUTED
0004e014 <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
4e014: 4e56 0000 linkw %fp,#0 4e018: 202e 0008 movel %fp@(8),%d0 4e01c: 2f0b movel %a3,%sp@- 4e01e: 226e 000c moveal %fp@(12),%a1 4e022: 2f0a movel %a2,%sp@- 4e024: 246e 0010 moveal %fp@(16),%a2
POSIX_API_Control *api;
if ( !set && !oset )
4e028: 4a89 tstl %a1 4e02a: 6700 0096 beqw 4e0c2 <pthread_sigmask+0xae>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4e02e: 2679 0006 3436 moveal 63436 <_Thread_Executing>,%a3 4e034: 206b 010e moveal %a3@(270),%a0
if ( oset )
4e038: 4a8a tstl %a2
4e03a: 6708 beqs 4e044 <pthread_sigmask+0x30>
*oset = api->signals_blocked;
4e03c: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4e040: 4a89 tstl %a1
4e042: 6744 beqs 4e088 <pthread_sigmask+0x74> <== NEVER TAKEN
return 0;
switch ( how ) {
4e044: 7201 moveq #1,%d1 4e046: b280 cmpl %d0,%d1
4e048: 6770 beqs 4e0ba <pthread_sigmask+0xa6>
4e04a: 123c 0002 moveb #2,%d1 4e04e: b280 cmpl %d0,%d1
4e050: 6744 beqs 4e096 <pthread_sigmask+0x82>
4e052: 4a80 tstl %d0
4e054: 664a bnes 4e0a0 <pthread_sigmask+0x8c>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
4e056: 2151 00cc movel %a1@,%a0@(204)
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
4e05a: 2039 0006 3a12 movel 63a12 <_POSIX_signals_Pending>,%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4e060: 2228 00cc movel %a0@(204),%d1 4e064: 4681 notl %d1
(api->signals_pending | _POSIX_signals_Pending) ) {
4e066: 80a8 00d0 orl %a0@(208),%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4e06a: c081 andl %d1,%d0
4e06c: 671a beqs 4e088 <pthread_sigmask+0x74>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
4e06e: 7201 moveq #1,%d1 4e070: 1741 0074 moveb %d1,%a3@(116)
_Thread_Dispatch();
4e074: 4eb9 0004 991c jsr 4991c <_Thread_Dispatch>
}
return 0;
}
4e07a: 246e fff8 moveal %fp@(-8),%a2
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
4e07e: 4280 clrl %d0
}
return 0;
}
4e080: 266e fffc moveal %fp@(-4),%a3 4e084: 4e5e unlk %fp 4e086: 4e75 rts 4e088: 246e fff8 moveal %fp@(-8),%a2
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
4e08c: 4280 clrl %d0
}
return 0;
}
4e08e: 266e fffc moveal %fp@(-4),%a3 4e092: 4e5e unlk %fp 4e094: 4e75 rts
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
4e096: 2011 movel %a1@,%d0 4e098: 4680 notl %d0 4e09a: c1a8 00cc andl %d0,%a0@(204)
break;
4e09e: 60ba bras 4e05a <pthread_sigmask+0x46>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0a0: 4eb9 0005 1618 jsr 51618 <__errno>
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0a6: 246e fff8 moveal %fp@(-8),%a2
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0aa: 2040 moveal %d0,%a0 4e0ac: 7216 moveq #22,%d1 4e0ae: 70ff moveq #-1,%d0
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0b0: 266e fffc moveal %fp@(-4),%a3 4e0b4: 4e5e unlk %fp
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4e0b6: 2081 movel %d1,%a0@
_Thread_Executing->do_post_task_switch_extension = true;
_Thread_Dispatch();
}
return 0;
}
4e0b8: 4e75 rts
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
4e0ba: 2011 movel %a1@,%d0 4e0bc: 81a8 00cc orl %d0,%a0@(204)
break;
4e0c0: 6098 bras 4e05a <pthread_sigmask+0x46>
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
4e0c2: 4a8a tstl %a2
4e0c4: 67da beqs 4e0a0 <pthread_sigmask+0x8c>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4e0c6: 2679 0006 3436 moveal 63436 <_Thread_Executing>,%a3 4e0cc: 206b 010e moveal %a3@(270),%a0
if ( oset )
*oset = api->signals_blocked;
4e0d0: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4e0d4: 4a89 tstl %a1 4e0d6: 6600 ff6c bnew 4e044 <pthread_sigmask+0x30> 4e0da: 60ac bras 4e088 <pthread_sigmask+0x74>
00046e2c <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
46e2c: 4e56 0000 linkw %fp,#0
* Don't even think about deleting a resource from an ISR.
* Besides this request is supposed to be for _Thread_Executing
* and the ISR context is not a thread.
*/
if ( _ISR_Is_in_progress() )
46e30: 2039 0006 26d2 movel 626d2 <_ISR_Nest_level>,%d0
46e36: 663c bnes 46e74 <pthread_testcancel+0x48> <== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46e38: 2079 0006 26f2 moveal 626f2 <_Thread_Executing>,%a0 46e3e: 2039 0006 2638 movel 62638 <_Thread_Dispatch_disable_level>,%d0 46e44: 5280 addql #1,%d0 46e46: 2068 010e moveal %a0@(270),%a0 46e4a: 23c0 0006 2638 movel %d0,62638 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
46e50: 4aa8 00d4 tstl %a0@(212)
46e54: 6622 bnes 46e78 <pthread_testcancel+0x4c> <== NEVER TAKEN
thread_support->cancelation_requested )
46e56: 4aa8 00dc tstl %a0@(220)
46e5a: 671c beqs 46e78 <pthread_testcancel+0x4c>
cancel = true;
_Thread_Enable_dispatch();
46e5c: 4eb9 0004 9678 jsr 49678 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
46e62: 4878 ffff pea ffffffff <LESS> 46e66: 2f39 0006 26f2 movel 626f2 <_Thread_Executing>,%sp@- 46e6c: 4eb9 0004 d928 jsr 4d928 <_POSIX_Thread_Exit>
46e72: 508f addql #8,%sp <== NOT EXECUTED
}
46e74: 4e5e unlk %fp <== NOT EXECUTED 46e76: 4e75 rts <== NOT EXECUTED
46e78: 4e5e unlk %fp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46e7a: 4ef9 0004 9678 jmp 49678 <_Thread_Enable_dispatch>
000432e0 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
432e0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 432e4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 432e6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
const char *p = s;
for (p=s ; *p ; p++ )
432ea: 1012 moveb %a2@,%d0 <== NOT EXECUTED 432ec: 6714 beqs 43302 <putk+0x22> <== NOT EXECUTED
BSP_output_char(*p);
432ee: 49c0 extbl %d0 <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
432f0: 528a addql #1,%a2 <== NOT EXECUTED
BSP_output_char(*p);
432f2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 432f4: 2079 0006 02c8 moveal 602c8 <BSP_output_char>,%a0 <== NOT EXECUTED 432fa: 4e90 jsr %a0@ <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
432fc: 588f addql #4,%sp <== NOT EXECUTED 432fe: 1012 moveb %a2@,%d0 <== NOT EXECUTED 43300: 66ec bnes 432ee <putk+0xe> <== NOT EXECUTED
BSP_output_char(*p);
BSP_output_char('\n');
43302: 2279 0006 02c8 moveal 602c8 <BSP_output_char>,%a1 <== NOT EXECUTED 43308: 700a moveq #10,%d0 <== NOT EXECUTED
}
4330a: 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');
4330e: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
43312: 4e5e unlk %fp <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
43314: 4ed1 jmp %a1@ <== NOT EXECUTED
...
0005d854 <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5d854: 4e56 fff4 linkw %fp,#-12 5d858: 202e 0008 movel %fp@(8),%d0 5d85c: 222e 000c movel %fp@(12),%d1 5d860: 206e 0010 moveal %fp@(16),%a0 5d864: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5d868: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0
5d86e: 6468 bccs 5d8d8 <read+0x84> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5d870: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 5d876: ed88 lsll #6,%d0 5d878: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5d87a: 202a 0014 movel %a2@(20),%d0 5d87e: 0800 0008 btst #8,%d0
5d882: 6754 beqs 5d8d8 <read+0x84> rtems_libio_check_buffer( buffer );
5d884: 4a81 tstl %d1
5d886: 6768 beqs 5d8f0 <read+0x9c> <== NEVER TAKEN
rtems_libio_check_count( count );
5d888: 4a88 tstl %a0
5d88a: 6740 beqs 5d8cc <read+0x78> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5d88c: 0800 0001 btst #1,%d0
5d890: 675e beqs 5d8f0 <read+0x9c> <== NEVER TAKEN
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
5d892: 226a 003c moveal %a2@(60),%a1 5d896: 2269 0008 moveal %a1@(8),%a1 5d89a: 4a89 tstl %a1
5d89c: 676a beqs 5d908 <read+0xb4> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->read_h)( iop, buffer, count );
5d89e: 2f08 movel %a0,%sp@- 5d8a0: 2f01 movel %d1,%sp@- 5d8a2: 2f0a movel %a2,%sp@- 5d8a4: 4e91 jsr %a1@
if ( rc > 0 )
5d8a6: 4fef 000c lea %sp@(12),%sp 5d8aa: 4a80 tstl %d0
5d8ac: 6f14 bles 5d8c2 <read+0x6e>
iop->offset += rc;
5d8ae: 2400 movel %d0,%d2 5d8b0: 5bc1 smi %d1 5d8b2: 49c1 extbl %d1 5d8b4: d5aa 0010 addl %d2,%a2@(16) 5d8b8: 262a 000c movel %a2@(12),%d3 5d8bc: d781 addxl %d1,%d3 5d8be: 2543 000c movel %d3,%a2@(12)
return rc;
}
5d8c2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5d8c8: 4e5e unlk %fp 5d8ca: 4e75 rts
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 );
5d8cc: 4280 clrl %d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d8ce: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5d8d4: 4e5e unlk %fp <== NOT EXECUTED 5d8d6: 4e75 rts <== NOT EXECUTED
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5d8d8: 4eb9 0005 05b8 jsr 505b8 <__errno> 5d8de: 7409 moveq #9,%d2 5d8e0: 2040 moveal %d0,%a0 5d8e2: 70ff moveq #-1,%d0 5d8e4: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d8e6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5d8ec: 4e5e unlk %fp 5d8ee: 4e75 rts
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5d8f0: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5d8f6: 7216 moveq #22,%d1 <== NOT EXECUTED 5d8f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d8fa: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d8fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5d902: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d904: 4e5e unlk %fp <== NOT EXECUTED 5d906: 4e75 rts <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d908: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5d90e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5d910: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d912: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5d918: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5d91e: 4e5e unlk %fp <== NOT EXECUTED
00046328 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
46328: 4e56 ffe0 linkw %fp,#-32 4632c: 48d7 001c moveml %d2-%d4,%sp@ 46330: 262e 0008 movel %fp@(8),%d3 46334: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
46338: 6700 0092 beqw 463cc <readlink+0xa4>
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
4633c: 2f03 movel %d3,%sp@- 4633e: 240e movel %fp,%d2 46340: 0682 ffff ffec addil #-20,%d2 46346: 4eb9 0005 4fec jsr 54fec <strlen> 4634c: 4297 clrl %sp@ 4634e: 2f02 movel %d2,%sp@- 46350: 42a7 clrl %sp@- 46352: 2f00 movel %d0,%sp@- 46354: 2f03 movel %d3,%sp@- 46356: 4eb9 0004 5084 jsr 45084 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
4635c: 4fef 0014 lea %sp@(20),%sp 46360: 4a80 tstl %d0
46362: 665a bnes 463be <readlink+0x96> <== NEVER TAKEN
return -1;
if ( !loc.ops->node_type_h ){
46364: 226e fff8 moveal %fp@(-8),%a1 46368: 2069 0010 moveal %a1@(16),%a0 4636c: 4a88 tstl %a0 4636e: 6700 00a6 beqw 46416 <readlink+0xee>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
46372: 2f02 movel %d2,%sp@- 46374: 4e90 jsr %a0@ 46376: 588f addql #4,%sp 46378: 7204 moveq #4,%d1 4637a: b280 cmpl %d0,%d1
4637c: 6668 bnes 463e6 <readlink+0xbe>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
4637e: 226e fff8 moveal %fp@(-8),%a1 46382: 2069 003c moveal %a1@(60),%a0 46386: 4a88 tstl %a0 46388: 6700 008c beqw 46416 <readlink+0xee>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
4638c: 2f2e 0010 movel %fp@(16),%sp@- 46390: 2f04 movel %d4,%sp@- 46392: 2f02 movel %d2,%sp@- 46394: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
46396: 206e fff8 moveal %fp@(-8),%a0
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
4639a: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
4639c: 4fef 000c lea %sp@(12),%sp 463a0: 4a88 tstl %a0
463a2: 670e beqs 463b2 <readlink+0x8a> <== NEVER TAKEN
463a4: 2068 001c moveal %a0@(28),%a0 463a8: 4a88 tstl %a0
463aa: 6706 beqs 463b2 <readlink+0x8a> <== NEVER TAKEN
463ac: 2f02 movel %d2,%sp@- 463ae: 4e90 jsr %a0@ 463b0: 588f addql #4,%sp
return result;
}
463b2: 2003 movel %d3,%d0 463b4: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 463ba: 4e5e unlk %fp 463bc: 4e75 rts
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
463be: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463c0: 2003 movel %d3,%d0 <== NOT EXECUTED 463c2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 463c8: 4e5e unlk %fp <== NOT EXECUTED 463ca: 4e75 rts <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
463cc: 4eb9 0005 35d8 jsr 535d8 <__errno> <== NOT EXECUTED 463d2: 76ff moveq #-1,%d3 <== NOT EXECUTED 463d4: 720e moveq #14,%d1 <== NOT EXECUTED 463d6: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463d8: 2003 movel %d3,%d0 <== NOT EXECUTED 463da: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
463e0: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
463e2: 4e5e unlk %fp <== NOT EXECUTED 463e4: 4e75 rts <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
463e6: 206e fff8 moveal %fp@(-8),%a0 463ea: 4a88 tstl %a0
463ec: 670e beqs 463fc <readlink+0xd4> <== NEVER TAKEN
463ee: 2068 001c moveal %a0@(28),%a0 463f2: 4a88 tstl %a0
463f4: 6706 beqs 463fc <readlink+0xd4> <== NEVER TAKEN
463f6: 2f02 movel %d2,%sp@- 463f8: 4e90 jsr %a0@ 463fa: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
463fc: 4eb9 0005 35d8 jsr 535d8 <__errno> 46402: 76ff moveq #-1,%d3 46404: 2040 moveal %d0,%a0 46406: 7016 moveq #22,%d0 46408: 2080 movel %d0,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
4640a: 2003 movel %d3,%d0 4640c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 46412: 4e5e unlk %fp 46414: 4e75 rts
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
46416: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4641a: 4a88 tstl %a0 <== NOT EXECUTED 4641c: 6706 beqs 46424 <readlink+0xfc> <== NOT EXECUTED 4641e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46420: 4e90 jsr %a0@ <== NOT EXECUTED 46422: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
46424: 4eb9 0005 35d8 jsr 535d8 <__errno> <== NOT EXECUTED 4642a: 76ff moveq #-1,%d3 <== NOT EXECUTED 4642c: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
4642e: 2003 movel %d3,%d0 <== NOT EXECUTED 46430: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( !loc.ops->readlink_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
46436: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
4643c: 4e5e unlk %fp <== NOT EXECUTED
00044998 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
44998: 4e56 ffe0 linkw %fp,#-32 4499c: 202e 0008 movel %fp@(8),%d0 449a0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 449a4: 246e 000c moveal %fp@(12),%a2 449a8: 242e 0010 movel %fp@(16),%d2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
449ac: b0b9 0006 16c4 cmpl 616c4 <rtems_libio_number_iops>,%d0 449b2: 6400 00f0 bccw 44aa4 <readv+0x10c>
iop = rtems_libio_iop( fd );
449b6: 2679 0006 35bc moveal 635bc <rtems_libio_iops>,%a3 449bc: ed88 lsll #6,%d0 449be: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
449c0: 202b 0014 movel %a3@(20),%d0 449c4: 0800 0008 btst #8,%d0 449c8: 6700 00da beqw 44aa4 <readv+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
449cc: 0800 0001 btst #1,%d0 449d0: 6700 009c beqw 44a6e <readv+0xd6>
/*
* Argument validation on IO vector
*/
if ( !iov )
449d4: 4a8a tstl %a2 449d6: 6700 0096 beqw 44a6e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
449da: 4a82 tstl %d2 449dc: 6f00 0090 blew 44a6e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
449e0: 0c82 0000 0400 cmpil #1024,%d2 449e6: 6e00 0086 bgtw 44a6e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
449ea: 206b 003c moveal %a3@(60),%a0 449ee: 2868 0008 moveal %a0@(8),%a4 449f2: 4a8c tstl %a4 449f4: 6700 00c8 beqw 44abe <readv+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
449f8: 204a moveal %a2,%a0 449fa: 93c9 subal %a1,%a1 449fc: 4281 clrl %d1 449fe: 7a01 moveq #1,%d5
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
44a00: 4a90 tstl %a0@
44a02: 676a beqs 44a6e <readv+0xd6>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
44a04: 2828 0004 movel %a0@(4),%d4 44a08: 2601 movel %d1,%d3 44a0a: d684 addl %d4,%d3
if ( total < old )
44a0c: b283 cmpl %d3,%d1
44a0e: 6e5e bgts 44a6e <readv+0xd6>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
44a10: 4a84 tstl %d4 44a12: 57c4 seq %d4
* are obvious errors in the iovec. So this extra loop ensures
* that we do not do anything if there is an argument error.
*/
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a14: 2203 movel %d3,%d1
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
44a16: 2605 movel %d5,%d3
* 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++ ) {
44a18: 5289 addql #1,%a1 44a1a: 5088 addql #8,%a0
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
44a1c: c684 andl %d4,%d3 44a1e: 1a03 moveb %d3,%d5
* 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++ ) {
44a20: b3c2 cmpal %d2,%a1
44a22: 6ddc blts 44a00 <readv+0x68> <== ALWAYS TAKEN
/*
* 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 ) {
44a24: 4a03 tstb %d3
44a26: 6660 bnes 44a88 <readv+0xf0> <== NOT EXECUTED 44a28: 588a addql #4,%a2 <== NOT EXECUTED 44a2a: 4283 clrl %d3 <== NOT EXECUTED 44a2c: 4284 clrl %d4 <== NOT EXECUTED
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
44a2e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a30: 5283 addql #1,%d3 <== NOT EXECUTED
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
44a32: 2f2a fffc movel %a2@(-4),%sp@- <== NOT EXECUTED 44a36: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44a38: 4e94 jsr %a4@ <== NOT EXECUTED
if ( bytes < 0 )
44a3a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44a3e: 4a80 tstl %d0 <== NOT EXECUTED 44a40: 6d54 blts 44a96 <readv+0xfe> <== NOT EXECUTED
return -1;
if ( bytes > 0 ) {
44a42: 6716 beqs 44a5a <readv+0xc2> <== NOT EXECUTED
iop->offset += bytes;
total += bytes;
44a44: d880 addl %d0,%d4 <== NOT EXECUTED
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
44a46: 2c00 movel %d0,%d6 <== NOT EXECUTED 44a48: 5bc5 smi %d5 <== NOT EXECUTED 44a4a: 49c5 extbl %d5 <== NOT EXECUTED 44a4c: ddab 0010 addl %d6,%a3@(16) <== NOT EXECUTED 44a50: 222b 000c movel %a3@(12),%d1 <== NOT EXECUTED 44a54: d385 addxl %d5,%d1 <== NOT EXECUTED 44a56: 2741 000c movel %d1,%a3@(12) <== NOT EXECUTED
total += bytes;
}
if (bytes != iov[ v ].iov_len)
44a5a: b092 cmpl %a2@,%d0 <== NOT EXECUTED 44a5c: 661e bnes 44a7c <readv+0xe4> <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a5e: 508a addql #8,%a2 <== NOT EXECUTED 44a60: b682 cmpl %d2,%d3 <== NOT EXECUTED 44a62: 6c18 bges 44a7c <readv+0xe4> <== NOT EXECUTED 44a64: 206b 003c moveal %a3@(60),%a0 <== NOT EXECUTED 44a68: 2868 0008 moveal %a0@(8),%a4 <== NOT EXECUTED 44a6c: 60c0 bras 44a2e <readv+0x96> <== NOT EXECUTED
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
44a6e: 4eb9 0005 1414 jsr 51414 <__errno> 44a74: 78ff moveq #-1,%d4 44a76: 2040 moveal %d0,%a0 44a78: 7016 moveq #22,%d0 44a7a: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a7c: 2004 movel %d4,%d0 44a7e: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 44a84: 4e5e unlk %fp 44a86: 4e75 rts
/*
* 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 ) {
44a88: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a8a: 2004 movel %d4,%d0 <== NOT EXECUTED 44a8c: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44a92: 4e5e unlk %fp <== NOT EXECUTED 44a94: 4e75 rts <== NOT EXECUTED
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44a96: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44a98: 2004 movel %d4,%d0 <== NOT EXECUTED 44a9a: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 44aa0: 4e5e unlk %fp <== NOT EXECUTED 44aa2: 4e75 rts <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
44aa4: 4eb9 0005 1414 jsr 51414 <__errno> <== NOT EXECUTED 44aaa: 78ff moveq #-1,%d4 <== NOT EXECUTED 44aac: 7209 moveq #9,%d1 <== NOT EXECUTED 44aae: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44ab0: 2004 movel %d4,%d0 <== NOT EXECUTED 44ab2: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
44ab8: 2081 movel %d1,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44aba: 4e5e unlk %fp <== NOT EXECUTED 44abc: 4e75 rts <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
44abe: 4eb9 0005 1414 jsr 51414 <__errno> <== NOT EXECUTED 44ac4: 78ff moveq #-1,%d4 <== NOT EXECUTED 44ac6: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44ac8: 2004 movel %d4,%d0 <== NOT EXECUTED 44aca: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
44ad0: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44ad6: 4e5e unlk %fp <== NOT EXECUTED
...
0005d9a0 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5d9a0: 7003 moveq #3,%d0
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
5d9a2: 4e56 fff0 linkw %fp,#-16 5d9a6: 52b9 0006 12f4 addql #1,612f4 <rtems_malloc_statistics+0x10> 5d9ac: 48d7 001c moveml %d2-%d4,%sp@ 5d9b0: 242e 0008 movel %fp@(8),%d2 5d9b4: 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())) {
5d9b8: b0b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d0
5d9be: 677a beqs 5da3a <realloc+0x9a> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
5d9c0: 4a82 tstl %d2 5d9c2: 6700 00de beqw 5daa2 <realloc+0x102>
return malloc( size );
if ( !size ) {
5d9c6: 4a83 tstl %d3
5d9c8: 673e beqs 5da08 <realloc+0x68> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5d9ca: 486e fffc pea %fp@(-4) 5d9ce: 2f02 movel %d2,%sp@- 5d9d0: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 5d9d6: 4eb9 0005 db88 jsr 5db88 <_Protected_heap_Get_block_size> 5d9dc: 4fef 000c lea %sp@(12),%sp 5d9e0: 4a00 tstb %d0
5d9e2: 673c beqs 5da20 <realloc+0x80>
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
if (rtems_malloc_boundary_helpers)
resize += (*rtems_malloc_boundary_helpers->overhead)();
#endif
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, resize ) ) {
5d9e4: 2f03 movel %d3,%sp@- 5d9e6: 2f02 movel %d2,%sp@- 5d9e8: 2f39 0005 fbb0 movel 5fbb0 <RTEMS_Malloc_Heap>,%sp@- 5d9ee: 4eb9 0005 dbc4 jsr 5dbc4 <_Protected_heap_Resize_block> 5d9f4: 4fef 000c lea %sp@(12),%sp 5d9f8: 4a00 tstb %d0
5d9fa: 6754 beqs 5da50 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5d9fc: 2002 movel %d2,%d0 5d9fe: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5da04: 4e5e unlk %fp 5da06: 4e75 rts
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5da08: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5da0a: 4282 clrl %d2 <== NOT EXECUTED 5da0c: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
return (void *) 0;
5da12: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5da14: 2002 movel %d2,%d0 <== NOT EXECUTED 5da16: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5da1c: 4e5e unlk %fp <== NOT EXECUTED 5da1e: 4e75 rts <== NOT EXECUTED
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5da20: 4eb9 0005 05b8 jsr 505b8 <__errno> 5da26: 4282 clrl %d2 5da28: 2040 moveal %d0,%a0 5da2a: 7016 moveq #22,%d0 5da2c: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5da2e: 2002 movel %d2,%d0 5da30: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5da36: 4e5e unlk %fp 5da38: 4e75 rts
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
5da3a: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0
5da40: 6752 beqs 5da94 <realloc+0xf4> <== ALWAYS TAKEN
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
5da42: 4282 clrl %d2
}
5da44: 2002 movel %d2,%d0 5da46: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5da4c: 4e5e unlk %fp 5da4e: 4e75 rts
* 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 );
5da50: 2f03 movel %d3,%sp@- 5da52: 4eb9 0004 3108 jsr 43108 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5da58: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5da5a: 53b9 0006 12e8 subql #1,612e8 <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 );
5da60: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5da62: 67de beqs 5da42 <realloc+0xa2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5da64: 202e fffc movel %fp@(-4),%d0 5da68: b083 cmpl %d3,%d0
5da6a: 6402 bccs 5da6e <realloc+0xce> <== NEVER TAKEN
5da6c: 2600 movel %d0,%d3 5da6e: 2f03 movel %d3,%sp@- 5da70: 2f02 movel %d2,%sp@- 5da72: 2f04 movel %d4,%sp@- 5da74: 4eb9 0005 0dd8 jsr 50dd8 <memcpy>
free( ptr );
5da7a: 2f02 movel %d2,%sp@- 5da7c: 2404 movel %d4,%d2 5da7e: 4eb9 0004 2ddc jsr 42ddc <free>
return new_area;
5da84: 4fef 0010 lea %sp@(16),%sp
}
5da88: 2002 movel %d2,%d0 5da8a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5da90: 4e5e unlk %fp 5da92: 4e75 rts
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
5da94: 2039 0006 14c6 movel 614c6 <_ISR_Nest_level>,%d0 5da9a: 6700 ff24 beqw 5d9c0 <realloc+0x20>
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
5da9e: 4282 clrl %d2 <== NOT EXECUTED 5daa0: 60a2 bras 5da44 <realloc+0xa4> <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5daa2: 2f03 movel %d3,%sp@- 5daa4: 4eb9 0004 3108 jsr 43108 <malloc> 5daaa: 588f addql #4,%sp 5daac: 2400 movel %d0,%d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5daae: 2002 movel %d2,%d0 5dab0: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5dab6: 4e5e unlk %fp
...
0004726c <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
4726c: 4e56 ffc0 linkw %fp,#-64 47270: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 47274: 242e 0008 movel %fp@(8),%d2
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
47278: 2f02 movel %d2,%sp@- 4727a: 4eb9 0004 5674 jsr 45674 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
47280: 588f addql #4,%sp 47282: 4a80 tstl %d0 47284: 6600 012e bnew 473b4 <rmdir+0x148>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
47288: 45ee ffe8 lea %fp@(-24),%a2 4728c: 4283 clrl %d3 4728e: 2f0a movel %a2,%sp@- 47290: 486e fffc pea %fp@(-4) 47294: 4204 clrb %d4 47296: 2f02 movel %d2,%sp@- 47298: 4eb9 0004 756c jsr 4756c <rtems_filesystem_get_start_loc> 4729e: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
472a2: 2d52 ffd4 movel %a2@,%fp@(-44)
name = pathname + parentpathlen;
472a6: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
472a8: 47f9 0005 6cc8 lea 56cc8 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
472ae: 240e movel %fp,%d2 472b0: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
472b6: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 472bc: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 472c2: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 472c8: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
472ce: 2f03 movel %d3,%sp@- 472d0: 4e93 jsr %a3@ 472d2: 2e80 movel %d0,%sp@ 472d4: 2f03 movel %d3,%sp@- 472d6: 4eb9 0004 5620 jsr 45620 <rtems_filesystem_prefix_separators> 472dc: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
472de: 2f03 movel %d3,%sp@- 472e0: 4e93 jsr %a3@ 472e2: 4297 clrl %sp@ 472e4: 2f02 movel %d2,%sp@- 472e6: 42a7 clrl %sp@- 472e8: 2f00 movel %d0,%sp@- 472ea: 2f03 movel %d3,%sp@- 472ec: 4eb9 0004 56ba jsr 456ba <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
472f2: 4fef 001c lea %sp@(28),%sp 472f6: 4a80 tstl %d0 472f8: 6600 00ee bnew 473e8 <rmdir+0x17c>
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
472fc: 226e ffe0 moveal %fp@(-32),%a1 47300: 2069 0010 moveal %a1@(16),%a0 47304: 4a88 tstl %a0 47306: 6700 0154 beqw 4745c <rmdir+0x1f0>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
4730a: 2f02 movel %d2,%sp@- 4730c: 4e90 jsr %a0@ 4730e: 588f addql #4,%sp 47310: 7201 moveq #1,%d1 47312: b280 cmpl %d0,%d1
47314: 6654 bnes 4736a <rmdir+0xfe>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
47316: 206e ffdc moveal %fp@(-36),%a0 4731a: 2068 0034 moveal %a0@(52),%a0 4731e: 4a88 tstl %a0 47320: 6700 00ee beqw 47410 <rmdir+0x1a4>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
47324: 2f02 movel %d2,%sp@- 47326: 2f0a movel %a2,%sp@- 47328: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4732a: 206e ffe0 moveal %fp@(-32),%a0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
4732e: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
47330: 508f addql #8,%sp 47332: 4a88 tstl %a0
47334: 670e beqs 47344 <rmdir+0xd8> <== NEVER TAKEN
47336: 2068 001c moveal %a0@(28),%a0 4733a: 4a88 tstl %a0
4733c: 6706 beqs 47344 <rmdir+0xd8> <== NEVER TAKEN
4733e: 2f02 movel %d2,%sp@- 47340: 4e90 jsr %a0@ 47342: 588f addql #4,%sp
if ( free_parentloc )
47344: 4a04 tstb %d4
47346: 6716 beqs 4735e <rmdir+0xf2>
rtems_filesystem_freenode( &parentloc );
47348: 206e fff4 moveal %fp@(-12),%a0 4734c: 4a88 tstl %a0
4734e: 670e beqs 4735e <rmdir+0xf2> <== NEVER TAKEN
47350: 2068 001c moveal %a0@(28),%a0 47354: 4a88 tstl %a0
47356: 6706 beqs 4735e <rmdir+0xf2> <== NEVER TAKEN
47358: 2f0a movel %a2,%sp@- 4735a: 4e90 jsr %a0@ 4735c: 588f addql #4,%sp
return result;
}
4735e: 2003 movel %d3,%d0 47360: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 47366: 4e5e unlk %fp 47368: 4e75 rts
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
4736a: 206e ffe0 moveal %fp@(-32),%a0 4736e: 4a88 tstl %a0
47370: 670e beqs 47380 <rmdir+0x114> <== NEVER TAKEN
47372: 2068 001c moveal %a0@(28),%a0 47376: 4a88 tstl %a0
47378: 6706 beqs 47380 <rmdir+0x114> <== NEVER TAKEN
4737a: 2f02 movel %d2,%sp@- 4737c: 4e90 jsr %a0@ 4737e: 588f addql #4,%sp
if ( free_parentloc )
47380: 4a04 tstb %d4
47382: 6716 beqs 4739a <rmdir+0x12e> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
47384: 206e fff4 moveal %fp@(-12),%a0 47388: 4a88 tstl %a0
4738a: 670e beqs 4739a <rmdir+0x12e> <== NEVER TAKEN
4738c: 2068 001c moveal %a0@(28),%a0 47390: 4a88 tstl %a0
47392: 6706 beqs 4739a <rmdir+0x12e> <== NEVER TAKEN
47394: 2f0a movel %a2,%sp@- 47396: 4e90 jsr %a0@ 47398: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
4739a: 4eb9 0005 3c60 jsr 53c60 <__errno> 473a0: 76ff moveq #-1,%d3 473a2: 2040 moveal %d0,%a0 473a4: 7014 moveq #20,%d0 473a6: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
473a8: 2003 movel %d3,%d0 473aa: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 473b0: 4e5e unlk %fp 473b2: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
473b4: 42a7 clrl %sp@- 473b6: 45ee ffe8 lea %fp@(-24),%a2 473ba: 2600 movel %d0,%d3 473bc: 2f0a movel %a2,%sp@- 473be: 4878 0002 pea 2 <DOUBLE_FLOAT> 473c2: 2f00 movel %d0,%sp@- 473c4: 2f02 movel %d2,%sp@- 473c6: 4eb9 0004 57c4 jsr 457c4 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
473cc: 4fef 0014 lea %sp@(20),%sp 473d0: 4a80 tstl %d0
473d2: 6606 bnes 473da <rmdir+0x16e> <== NEVER TAKEN
473d4: 7801 moveq #1,%d4 473d6: 6000 feca braw 472a2 <rmdir+0x36>
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
473da: 76ff moveq #-1,%d3
return result;
}
473dc: 2003 movel %d3,%d0 473de: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 473e4: 4e5e unlk %fp 473e6: 4e75 rts
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
473e8: 4a04 tstb %d4
473ea: 67ee beqs 473da <rmdir+0x16e> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
473ec: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 473f0: 4a88 tstl %a0 <== NOT EXECUTED 473f2: 67e6 beqs 473da <rmdir+0x16e> <== NOT EXECUTED 473f4: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 473f8: 67e0 beqs 473da <rmdir+0x16e> <== NOT EXECUTED 473fa: 2f0a movel %a2,%sp@- <== NOT EXECUTED 473fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 473fe: 76ff moveq #-1,%d3 <== NOT EXECUTED 47400: 4e90 jsr %a0@ <== NOT EXECUTED 47402: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47404: 2003 movel %d3,%d0 <== NOT EXECUTED 47406: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4740c: 4e5e unlk %fp <== NOT EXECUTED 4740e: 4e75 rts <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
47410: 206e ffe0 moveal %fp@(-32),%a0 <== NOT EXECUTED 47414: 4a88 tstl %a0 <== NOT EXECUTED 47416: 670e beqs 47426 <rmdir+0x1ba> <== NOT EXECUTED 47418: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4741c: 4a88 tstl %a0 <== NOT EXECUTED 4741e: 6706 beqs 47426 <rmdir+0x1ba> <== NOT EXECUTED 47420: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47422: 4e90 jsr %a0@ <== NOT EXECUTED 47424: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
47426: 4a04 tstb %d4 <== NOT EXECUTED 47428: 6716 beqs 47440 <rmdir+0x1d4> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
4742a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4742e: 4a88 tstl %a0 <== NOT EXECUTED 47430: 670e beqs 47440 <rmdir+0x1d4> <== NOT EXECUTED 47432: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 47436: 4a88 tstl %a0 <== NOT EXECUTED 47438: 6706 beqs 47440 <rmdir+0x1d4> <== NOT EXECUTED 4743a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4743c: 4e90 jsr %a0@ <== NOT EXECUTED 4743e: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
47440: 4eb9 0005 3c60 jsr 53c60 <__errno> <== NOT EXECUTED 47446: 76ff moveq #-1,%d3 <== NOT EXECUTED 47448: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4744a: 2003 movel %d3,%d0 <== NOT EXECUTED 4744c: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
47452: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
47458: 4e5e unlk %fp <== NOT EXECUTED 4745a: 4e75 rts <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
rtems_filesystem_freenode( &loc );
4745c: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 47460: 4a88 tstl %a0 <== NOT EXECUTED 47462: 67c2 beqs 47426 <rmdir+0x1ba> <== NOT EXECUTED
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
rtems_filesystem_freenode( &loc );
47464: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47466: 4e90 jsr %a0@ <== NOT EXECUTED 47468: 588f addql #4,%sp <== NOT EXECUTED 4746a: 60ba bras 47426 <rmdir+0x1ba> <== NOT EXECUTED
0004f458 <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4f458: 4e56 ffe8 linkw %fp,#-24 4f45c: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4f460: 2c2e 0008 movel %fp@(8),%d6 4f464: 4283 clrl %d3 4f466: 4285 clrl %d5 4f468: 7401 moveq #1,%d2
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4f46a: 45f9 0004 f4a4 lea 4f4a4 <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4f470: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
4f474: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4f476: 5283 addql #1,%d3
if (b & remote_value)
4f478: c084 andl %d4,%d0
4f47a: 6614 bnes 4f490 <rtems_assoc_local_by_remote_bitfield+0x38>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4f47c: 7020 moveq #32,%d0 4f47e: d482 addl %d2,%d2 4f480: b083 cmpl %d3,%d0
4f482: 66f0 bnes 4f474 <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
4f484: 2005 movel %d5,%d0 4f486: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4f48c: 4e5e unlk %fp 4f48e: 4e75 rts
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4f490: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4f492: d482 addl %d2,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4f494: 2f06 movel %d6,%sp@- 4f496: 4e92 jsr %a2@ 4f498: 508f addql #8,%sp 4f49a: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4f49c: 7020 moveq #32,%d0 4f49e: b083 cmpl %d3,%d0
4f4a0: 66d2 bnes 4f474 <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
4f4a2: 60e0 bras 4f484 <rtems_assoc_local_by_remote_bitfield+0x2c><== NOT EXECUTED
0004f4c8 <rtems_assoc_name_bad>:
uint32_t bad_value
#else
uint32_t bad_value __attribute((unused))
#endif
)
{
4f4c8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value);
#else
static char bad_buffer[40] = "<assocnamebad.c: : BAD NAME>";
#endif
return bad_buffer;
}
4f4cc: 203c 0005 fd5c movel #392540,%d0 <== NOT EXECUTED 4f4d2: 4e5e unlk %fp <== NOT EXECUTED
...
0004bc48 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4bc48: 4e56 0000 linkw %fp,#0 4bc4c: 2f02 movel %d2,%sp@- 4bc4e: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
4bc52: 2f02 movel %d2,%sp@- 4bc54: 2f2e 0008 movel %fp@(8),%sp@- 4bc58: 4eb9 0004 bc80 jsr 4bc80 <rtems_assoc_ptr_by_local>
if (nap)
4bc5e: 508f addql #8,%sp 4bc60: 4a80 tstl %d0
4bc62: 670c beqs 4bc70 <rtems_assoc_name_by_local+0x28> <== NEVER TAKEN
return nap->name;
return rtems_assoc_name_bad(local_value);
}
4bc64: 2040 moveal %d0,%a0 4bc66: 242e fffc movel %fp@(-4),%d2 4bc6a: 4e5e unlk %fp 4bc6c: 2010 movel %a0@,%d0 4bc6e: 4e75 rts
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
4bc70: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
}
4bc74: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4bc78: 4e5e unlk %fp <== NOT EXECUTED
nap = rtems_assoc_ptr_by_local(ap, local_value);
if (nap)
return nap->name;
return rtems_assoc_name_bad(local_value);
4bc7a: 4ef9 0004 f4c8 jmp 4f4c8 <rtems_assoc_name_bad> <== NOT EXECUTED
0004bc80 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4bc80: 4e56 0000 linkw %fp,#0 4bc84: 2f0a movel %a2,%sp@- 4bc86: 246e 0008 moveal %fp@(8),%a2 4bc8a: 2f02 movel %d2,%sp@- 4bc8c: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4bc90: 2012 movel %a2@,%d0
4bc92: 6742 beqs 4bcd6 <rtems_assoc_ptr_by_local+0x56> <== NEVER TAKEN
4bc94: 4879 0005 eda6 pea 5eda6 <IMFS_memfile_handlers+0x74> 4bc9a: 2f00 movel %d0,%sp@- 4bc9c: 4eb9 0005 14c0 jsr 514c0 <strcmp> 4bca2: 508f addql #8,%sp 4bca4: 4a80 tstl %d0
4bca6: 662a bnes 4bcd2 <rtems_assoc_ptr_by_local+0x52> <== ALWAYS TAKEN
default_ap = ap++;
4bca8: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4bcac: 4a90 tstl %a0@ <== NOT EXECUTED 4bcae: 6714 beqs 4bcc4 <rtems_assoc_ptr_by_local+0x44> <== NOT EXECUTED 4bcb0: 200a movel %a2,%d0 <== NOT EXECUTED 4bcb2: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->local_value == local_value)
4bcb4: b4aa 0004 cmpl %a2@(4),%d2
4bcb8: 670a beqs 4bcc4 <rtems_assoc_ptr_by_local+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4bcba: 45ea 000c lea %a2@(12),%a2 4bcbe: 4a92 tstl %a2@
4bcc0: 66f2 bnes 4bcb4 <rtems_assoc_ptr_by_local+0x34>
4bcc2: 2440 moveal %d0,%a2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4bcc4: 200a movel %a2,%d0 4bcc6: 242e fff8 movel %fp@(-8),%d2 4bcca: 246e fffc moveal %fp@(-4),%a2 4bcce: 4e5e unlk %fp 4bcd0: 4e75 rts
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4bcd2: 4280 clrl %d0 4bcd4: 60de bras 4bcb4 <rtems_assoc_ptr_by_local+0x34>
4bcd6: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4bcd8: 200a movel %a2,%d0 <== NOT EXECUTED 4bcda: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4bcde: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4bce2: 4e5e unlk %fp <== NOT EXECUTED
...
0004f4d8 <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4f4d8: 4e56 0000 linkw %fp,#0 4f4dc: 2f0a movel %a2,%sp@- 4f4de: 246e 0008 moveal %fp@(8),%a2 4f4e2: 2f02 movel %d2,%sp@- 4f4e4: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4f4e8: 2012 movel %a2@,%d0
4f4ea: 6742 beqs 4f52e <rtems_assoc_ptr_by_remote+0x56> <== NEVER TAKEN
4f4ec: 4879 0005 eda6 pea 5eda6 <IMFS_memfile_handlers+0x74> 4f4f2: 2f00 movel %d0,%sp@- 4f4f4: 4eb9 0005 14c0 jsr 514c0 <strcmp> 4f4fa: 508f addql #8,%sp 4f4fc: 4a80 tstl %d0
4f4fe: 662a bnes 4f52a <rtems_assoc_ptr_by_remote+0x52> <== ALWAYS TAKEN
default_ap = ap++;
4f500: 41ea 000c lea %a2@(12),%a0 <== NOT EXECUTED
for ( ; ap->name; ap++)
4f504: 4a90 tstl %a0@ <== NOT EXECUTED 4f506: 6714 beqs 4f51c <rtems_assoc_ptr_by_remote+0x44> <== NOT EXECUTED 4f508: 200a movel %a2,%d0 <== NOT EXECUTED 4f50a: 2448 moveal %a0,%a2 <== NOT EXECUTED
if (ap->remote_value == remote_value)
4f50c: b4aa 0008 cmpl %a2@(8),%d2
4f510: 670a beqs 4f51c <rtems_assoc_ptr_by_remote+0x44>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
4f512: 45ea 000c lea %a2@(12),%a2 4f516: 4a92 tstl %a2@
4f518: 66f2 bnes 4f50c <rtems_assoc_ptr_by_remote+0x34>
4f51a: 2440 moveal %d0,%a2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4f51c: 200a movel %a2,%d0 4f51e: 242e fff8 movel %fp@(-8),%d2 4f522: 246e fffc moveal %fp@(-4),%a2 4f526: 4e5e unlk %fp 4f528: 4e75 rts
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4f52a: 4280 clrl %d0 4f52c: 60de bras 4f50c <rtems_assoc_ptr_by_remote+0x34>
4f52e: 95ca subal %a2,%a2 <== NOT EXECUTED
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4f530: 200a movel %a2,%d0 <== NOT EXECUTED 4f532: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4f536: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4f53a: 4e5e unlk %fp <== NOT EXECUTED
...
000504f4 <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
504f4: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
504f8: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 504fc: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 50500: 4eb9 0004 bc80 jsr 4bc80 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
50506: 508f addql #8,%sp <== NOT EXECUTED 50508: 4a80 tstl %d0 <== NOT EXECUTED 5050a: 6706 beqs 50512 <rtems_assoc_remote_by_local+0x1e><== NOT EXECUTED
return nap->remote_value;
5050c: 2040 moveal %d0,%a0 <== NOT EXECUTED 5050e: 2028 0008 movel %a0@(8),%d0 <== NOT EXECUTED
return 0;
}
50512: 4e5e unlk %fp <== NOT EXECUTED
...
0004cc44 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4cc44: 4e56 ffe8 linkw %fp,#-24 4cc48: 202e 0010 movel %fp@(16),%d0 4cc4c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4cc50: 242e 0008 movel %fp@(8),%d2 4cc54: 262e 000c movel %fp@(12),%d3 4cc58: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4cc5c: 4a82 tstl %d2
4cc5e: 677a beqs 4ccda <rtems_barrier_create+0x96>
return RTEMS_INVALID_NAME;
if ( !id )
4cc60: 4a8a tstl %a2 4cc62: 6700 00ce beqw 4cd32 <rtems_barrier_create+0xee>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4cc66: 0803 0004 btst #4,%d3
4cc6a: 677a beqs 4cce6 <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4cc6c: 4a80 tstl %d0 4cc6e: 6700 00b4 beqw 4cd24 <rtems_barrier_create+0xe0> 4cc72: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1 4cc78: 5281 addql #1,%d1
if ( !id )
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4cc7a: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4cc7e: 2d40 fffc movel %d0,%fp@(-4) 4cc82: 23c1 0006 142c movel %d1,6142c <_Thread_Dispatch_disable_level>
* This function allocates a barrier control block from
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Allocate( void )
{
return (Barrier_Control *) _Objects_Allocate( &_Barrier_Information );
4cc88: 4879 0006 1c6e pea 61c6e <_Barrier_Information> 4cc8e: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cc94: 588f addql #4,%sp 4cc96: 2640 moveal %d0,%a3 4cc98: 4a80 tstl %d0
4cc9a: 6776 beqs 4cd12 <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4cc9c: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4cca0: 486e fff8 pea %fp@(-8) 4cca4: 486b 0014 pea %a3@(20) 4cca8: 4eb9 0004 d36c jsr 4d36c <_CORE_barrier_Initialize> 4ccae: 202b 0008 movel %a3@(8),%d0 4ccb2: 4281 clrl %d1 4ccb4: 2079 0006 1c86 moveal 61c86 <_Barrier_Information+0x18>,%a0 4ccba: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4ccbc: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4ccc0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4ccc4: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4ccc6: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4cccc: 508f addql #8,%sp
(Objects_Name) name
);
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
4ccce: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
4ccd0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ccd6: 4e5e unlk %fp 4ccd8: 4e75 rts
)
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4ccda: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4ccdc: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cce2: 4e5e unlk %fp 4cce4: 4e75 rts
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
4cce6: 7201 moveq #1,%d1 4cce8: 2d41 fff8 movel %d1,%fp@(-8) 4ccec: 2239 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d1 4ccf2: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4ccf4: 2d40 fffc movel %d0,%fp@(-4) 4ccf8: 23c1 0006 142c movel %d1,6142c <_Thread_Dispatch_disable_level> 4ccfe: 4879 0006 1c6e pea 61c6e <_Barrier_Information> 4cd04: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4cd0a: 588f addql #4,%sp 4cd0c: 2640 moveal %d0,%a3 4cd0e: 4a80 tstl %d0
4cd10: 668a bnes 4cc9c <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4cd12: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 4cd18: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd1a: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd20: 4e5e unlk %fp 4cd22: 4e75 rts
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
4cd24: 103c 000a moveb #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd28: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd2e: 4e5e unlk %fp 4cd30: 4e75 rts
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4cd32: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4cd34: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4cd3a: 4e5e unlk %fp
...
00042708 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42708: 4e56 ffec linkw %fp,#-20 4270c: 202e 0008 movel %fp@(8),%d0 42710: 48d7 043c moveml %d2-%d5/%a2,%sp@ 42714: 246e 000c moveal %fp@(12),%a2
const char *p;
if ( !name )
42718: 4a80 tstl %d0
4271a: 660e bnes 4272a <rtems_bsp_cmdline_get_param+0x22>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
4271c: 95ca subal %a2,%a2
return NULL;
copy_string( p, value, length );
return value;
}
4271e: 200a movel %a2,%d0 42720: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 42726: 4e5e unlk %fp 42728: 4e75 rts
const char *p;
if ( !name )
return NULL;
if ( !value )
4272a: 4a8a tstl %a2
4272c: 67f0 beqs 4271e <rtems_bsp_cmdline_get_param+0x16>
return NULL;
if ( !length )
4272e: 4aae 0010 tstl %fp@(16)
42732: 67e8 beqs 4271c <rtems_bsp_cmdline_get_param+0x14>
return NULL;
value[0] = '\0';
42734: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
42736: 2f00 movel %d0,%sp@- 42738: 4eb9 0004 2798 jsr 42798 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
4273e: 588f addql #4,%sp
if ( !length )
return NULL;
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
42740: 2240 moveal %d0,%a1
if ( !p )
42742: 4a80 tstl %d0
42744: 67d6 beqs 4271c <rtems_bsp_cmdline_get_param+0x14>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
42746: 1411 moveb %a1@,%d2
42748: 67d4 beqs 4271e <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
4274a: 202e 0010 movel %fp@(16),%d0 4274e: 5380 subql #1,%d0
42750: 67cc beqs 4271e <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
42752: 91c8 subal %a0,%a0 42754: 4281 clrl %d1 42756: 4284 clrl %d4
if ( *p == '\"' ) {
42758: 7a22 moveq #34,%d5 4275a: 1602 moveb %d2,%d3 4275c: 49c3 extbl %d3 4275e: ba83 cmpl %d3,%d5
42760: 6730 beqs 42792 <rtems_bsp_cmdline_get_param+0x8a><== NEVER TAKEN
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
42762: 0804 0000 btst #0,%d4
42766: 6606 bnes 4276e <rtems_bsp_cmdline_get_param+0x66><== NEVER TAKEN
42768: 7a20 moveq #32,%d5 4276a: ba83 cmpl %d3,%d5
4276c: 67b0 beqs 4271e <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
break;
value[i++] = *p++;
4276e: 5281 addql #1,%d1 42770: 1582 8800 moveb %d2,%a2@(00000000,%a0:l)
value[i] = '\0';
42774: 4202 clrb %d2
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
42776: 2041 moveal %d1,%a0
value[i] = '\0';
42778: 1582 1800 moveb %d2,%a2@(00000000,%d1:l)
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
4277c: 1431 1800 moveb %a1@(00000000,%d1:l),%d2
42780: 679c beqs 4271e <rtems_bsp_cmdline_get_param+0x16>
42782: b081 cmpl %d1,%d0
42784: 62d2 bhis 42758 <rtems_bsp_cmdline_get_param+0x50><== ALWAYS TAKEN
return NULL;
copy_string( p, value, length );
return value;
}
42786: 200a movel %a2,%d0 <== NOT EXECUTED 42788: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 <== NOT EXECUTED 4278e: 4e5e unlk %fp <== NOT EXECUTED 42790: 4e75 rts <== NOT EXECUTED
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
42792: 5284 addql #1,%d4 <== NOT EXECUTED 42794: 60d8 bras 4276e <rtems_bsp_cmdline_get_param+0x66><== NOT EXECUTED
...
000427c0 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427c0: 4e56 fff4 linkw %fp,#-12 427c4: 48d7 001c moveml %d2-%d4,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427c8: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427cc: 242e 000c movel %fp@(12),%d2
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427d0: 2f02 movel %d2,%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
427d2: 282e 0008 movel %fp@(8),%d4
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427d6: 2f04 movel %d4,%sp@- 427d8: 4eb9 0004 2708 jsr 42708 <rtems_bsp_cmdline_get_param>
if ( !p )
427de: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
427e2: 2600 movel %d0,%d3
if ( !p )
427e4: 660e bnes 427f4 <rtems_bsp_cmdline_get_param_rhs+0x34><== ALWAYS TAKEN
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
427e6: 4282 clrl %d2 <== NOT EXECUTED
}
427e8: 2002 movel %d2,%d0 <== NOT EXECUTED 427ea: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 <== NOT EXECUTED 427f0: 4e5e unlk %fp <== NOT EXECUTED 427f2: 4e75 rts <== NOT EXECUTED
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
427f4: 2f04 movel %d4,%sp@- 427f6: 4eb9 0005 2000 jsr 52000 <strlen> 427fc: 588f addql #4,%sp 427fe: 2043 moveal %d3,%a0 42800: d1c0 addal %d0,%a0
if ( *rhs != '=' )
42802: 723d moveq #61,%d1 42804: 1010 moveb %a0@,%d0 42806: 49c0 extbl %d0 42808: b280 cmpl %d0,%d1
4280a: 66da bnes 427e6 <rtems_bsp_cmdline_get_param_rhs+0x26><== NEVER TAKEN
return NULL;
rhs++;
4280c: 5288 addql #1,%a0
if ( *rhs == '\"' )
4280e: 7622 moveq #34,%d3 42810: 1010 moveb %a0@,%d0 42812: 1200 moveb %d0,%d1 42814: 49c1 extbl %d1 42816: b681 cmpl %d1,%d3
42818: 672a beqs 42844 <rtems_bsp_cmdline_get_param_rhs+0x84><== NEVER TAKEN
rhs++;
for ( d=value ; *rhs ; )
4281a: 4a00 tstb %d0
4281c: 672c beqs 4284a <rtems_bsp_cmdline_get_param_rhs+0x8a><== ALWAYS TAKEN
4281e: 2242 moveal %d2,%a1 <== NOT EXECUTED
*d++ = *rhs++;
42820: 5288 addql #1,%a0 <== NOT EXECUTED 42822: 12c0 moveb %d0,%a1@+ <== NOT EXECUTED
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42824: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42826: 66f8 bnes 42820 <rtems_bsp_cmdline_get_param_rhs+0x60><== NOT EXECUTED
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42828: 2049 moveal %a1,%a0 4282a: 7222 moveq #34,%d1 4282c: 1020 moveb %a0@-,%d0 4282e: 49c0 extbl %d0 42830: b280 cmpl %d0,%d1
42832: 6702 beqs 42836 <rtems_bsp_cmdline_get_param_rhs+0x76><== NEVER TAKEN
42834: 2049 moveal %a1,%a0
d--;
*d = '\0';
return value;
}
42836: 2002 movel %d2,%d0
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
d--;
*d = '\0';
42838: 4210 clrb %a0@
return value;
}
4283a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 42840: 4e5e unlk %fp 42842: 4e75 rts
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
42844: 5288 addql #1,%a0 <== NOT EXECUTED 42846: 1010 moveb %a0@,%d0 <== NOT EXECUTED 42848: 60d0 bras 4281a <rtems_bsp_cmdline_get_param_rhs+0x5a><== NOT EXECUTED
for ( d=value ; *rhs ; )
4284a: 2242 moveal %d2,%a1 4284c: 60da bras 42828 <rtems_bsp_cmdline_get_param_rhs+0x68>
...
000431b4 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
431b4: 4e56 ff9c linkw %fp,#-100 431b8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 431bc: 262e 0008 movel %fp@(8),%d3 431c0: 286e 000c moveal %fp@(12),%a4
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
431c4: 4a8c tstl %a4 431c6: 6700 0140 beqw 43308 <rtems_cpu_usage_report_with_plugin+0x154>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
431ca: 486e fff0 pea %fp@(-16)
}
}
}
#endif
(*print)(
431ce: 41f9 0006 4018 lea 64018 <_Objects_Information_table+0x4>,%a0
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
431d4: 280e movel %fp,%d4
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
431d6: 2a0e movel %fp,%d5
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
431d8: 0684 ffff ffcb addil #-53,%d4
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
431de: 0685 ffff ffe0 addil #-32,%d5
}
}
}
#endif
(*print)(
431e4: 2d48 ffc4 movel %a0,%fp@(-60)
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
431e8: 4eb9 0004 8f34 jsr 48f34 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
431ee: 486e ffe8 pea %fp@(-24) 431f2: 486e fff0 pea %fp@(-16) 431f6: 4879 0006 4538 pea 64538 <CPU_usage_Uptime_at_last_reset> 431fc: 4eb9 0004 b428 jsr 4b428 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
43202: 4879 0006 08ce pea 608ce <IntUartPollCallbacks.6645+0x20> 43208: 2f03 movel %d3,%sp@- 4320a: 4e94 jsr %a4@
/*PAGE
*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
4320c: 4fef 0018 lea %sp@(24),%sp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
43210: 226e ffc4 moveal %fp@(-60),%a1 43214: 2051 moveal %a1@,%a0 43216: 4a88 tstl %a0 43218: 6700 00ba beqw 432d4 <rtems_cpu_usage_report_with_plugin+0x120>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
4321c: 2668 0004 moveal %a0@(4),%a3
if ( information ) {
43220: 4a8b tstl %a3 43222: 6700 00b0 beqw 432d4 <rtems_cpu_usage_report_with_plugin+0x120>
for ( i=1 ; i <= information->maximum ; i++ ) {
43226: 4a6b 000e tstw %a3@(14) 4322a: 6700 00a8 beqw 432d4 <rtems_cpu_usage_report_with_plugin+0x120> 4322e: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
43230: 2c3c 0004 7ac0 movel #293568,%d6
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43236: 4bf9 0004 b340 lea 4b340 <_Timespec_Divide>,%a5
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
4323c: 206b 0018 moveal %a3@(24),%a0 43240: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
43244: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
43246: 4a8a tstl %a2
43248: 677e beqs 432c8 <rtems_cpu_usage_report_with_plugin+0x114><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
4324a: 2f04 movel %d4,%sp@- 4324c: 4878 000d pea d <OPER1+0x1> 43250: 2046 moveal %d6,%a0 43252: 2f2a 0008 movel %a2@(8),%sp@- 43256: 4e90 jsr %a0@
(*print)(
43258: 2f04 movel %d4,%sp@- 4325a: 2f2a 0008 movel %a2@(8),%sp@- 4325e: 4879 0006 0a40 pea 60a40 <IntUartPollCallbacks.6645+0x192> 43264: 2f03 movel %d3,%sp@- 43266: 4e94 jsr %a4@
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
43268: 2079 0006 4116 moveal 64116 <_Thread_Executing>,%a0 4326e: 4fef 001c lea %sp@(28),%sp
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
43272: 202a 0082 movel %a2@(130),%d0 43276: 222a 0086 movel %a2@(134),%d1 4327a: 2d40 ffe0 movel %d0,%fp@(-32) 4327e: 2d41 ffe4 movel %d1,%fp@(-28)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
43282: 246a 0008 moveal %a2@(8),%a2 43286: b5e8 0008 cmpal %a0@(8),%a2 4328a: 6700 0086 beqw 43312 <rtems_cpu_usage_report_with_plugin+0x15e>
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
4328e: 486e fff8 pea %fp@(-8)
/*
* Print the information
*/
(*print)( context,
43292: 2e3c 0000 03e8 movel #1000,%d7
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43298: 486e fffc pea %fp@(-4) 4329c: 486e ffe8 pea %fp@(-24) 432a0: 2f05 movel %d5,%sp@- 432a2: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
432a4: 2f2e fff8 movel %fp@(-8),%sp@- 432a8: 202e ffe4 movel %fp@(-28),%d0 432ac: 2f2e fffc movel %fp@(-4),%sp@- 432b0: 4c47 0000 remul %d7,%d0,%d0 432b4: 2f00 movel %d0,%sp@- 432b6: 2f2e ffe0 movel %fp@(-32),%sp@- 432ba: 4879 0006 0a53 pea 60a53 <IntUartPollCallbacks.6645+0x1a5> 432c0: 2f03 movel %d3,%sp@- 432c2: 4e94 jsr %a4@ 432c4: 4fef 0028 lea %sp@(40),%sp
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
432c8: 4280 clrl %d0 432ca: 302b 000e movew %a3@(14),%d0 432ce: b480 cmpl %d0,%d2 432d0: 6300 ff6a blsw 4323c <rtems_cpu_usage_report_with_plugin+0x88> 432d4: 58ae ffc4 addql #4,%fp@(-60)
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
432d8: 206e ffc4 moveal %fp@(-60),%a0 432dc: b1fc 0006 4028 cmpal #409640,%a0 432e2: 6600 ff2c bnew 43210 <rtems_cpu_usage_report_with_plugin+0x5c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
432e6: 202e ffec movel %fp@(-20),%d0 432ea: 243c 0000 03e8 movel #1000,%d2 432f0: 4c42 0000 remul %d2,%d0,%d0 432f4: 2f00 movel %d0,%sp@- 432f6: 2f2e ffe8 movel %fp@(-24),%sp@- 432fa: 4879 0006 0a6b pea 60a6b <IntUartPollCallbacks.6645+0x1bd> 43300: 2f03 movel %d3,%sp@- 43302: 4e94 jsr %a4@ 43304: 4fef 0010 lea %sp@(16),%sp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
43308: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 4330e: 4e5e unlk %fp 43310: 4e75 rts
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
43312: 486e ffd8 pea %fp@(-40)
/*
* Print the information
*/
(*print)( context,
43316: 2e3c 0000 03e8 movel #1000,%d7
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
4331c: 486e fff0 pea %fp@(-16) 43320: 4879 0006 411e pea 6411e <_Thread_Time_of_last_context_switch> 43326: 4eb9 0004 b428 jsr 4b428 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
4332c: 486e ffd8 pea %fp@(-40) 43330: 2f05 movel %d5,%sp@- 43332: 4eb9 0004 b2f8 jsr 4b2f8 <_Timespec_Add_to> 43338: 4fef 0014 lea %sp@(20),%sp
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
4333c: 486e fff8 pea %fp@(-8) 43340: 486e fffc pea %fp@(-4) 43344: 486e ffe8 pea %fp@(-24) 43348: 2f05 movel %d5,%sp@- 4334a: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
4334c: 2f2e fff8 movel %fp@(-8),%sp@- 43350: 202e ffe4 movel %fp@(-28),%d0 43354: 2f2e fffc movel %fp@(-4),%sp@- 43358: 4c47 0000 remul %d7,%d0,%d0 4335c: 2f00 movel %d0,%sp@- 4335e: 2f2e ffe0 movel %fp@(-32),%sp@- 43362: 4879 0006 0a53 pea 60a53 <IntUartPollCallbacks.6645+0x1a5> 43368: 2f03 movel %d3,%sp@- 4336a: 4e94 jsr %a4@ 4336c: 4fef 0028 lea %sp@(40),%sp 43370: 6000 ff56 braw 432c8 <rtems_cpu_usage_report_with_plugin+0x114>
000504b8 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
504b8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 504bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
504be: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 504c2: 4879 0005 f212 pea 5f212 <errno_assoc> <== NOT EXECUTED 504c8: 4eb9 0005 04f4 jsr 504f4 <rtems_assoc_remote_by_local> <== NOT EXECUTED 504ce: 508f addql #8,%sp <== NOT EXECUTED 504d0: 2400 movel %d0,%d2 <== NOT EXECUTED 504d2: 660a bnes 504de <rtems_deviceio_errno+0x26> <== NOT EXECUTED
{
errno = rc;
return -1;
}
return -1;
}
504d4: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 504d8: 70ff moveq #-1,%d0 <== NOT EXECUTED 504da: 4e5e unlk %fp <== NOT EXECUTED 504dc: 4e75 rts <== NOT EXECUTED
{
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
{
errno = rc;
504de: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 504e4: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
}
return -1;
}
504e6: 70ff moveq #-1,%d0 <== NOT EXECUTED
{
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
{
errno = rc;
504e8: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
}
return -1;
}
504ea: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 504ee: 4e5e unlk %fp <== NOT EXECUTED
...
00042b90 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
42b90: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
chars_written = rtems_verror(error_flag, printf_format, arglist);
42b94: 486e 0010 pea %fp@(16) <== NOT EXECUTED 42b98: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42b9c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42ba0: 4eba fdda jsr %pc@(4297c <rtems_verror>) <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
42ba4: 4e5e unlk %fp <== NOT EXECUTED
00042bfc <rtems_filesystem_dirname>:
}
int rtems_filesystem_dirname(
const char *pathname
)
{
42bfc: 4e56 fff4 linkw %fp,#-12 42c00: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42c04: 246e 0008 moveal %fp@(8),%a2
int len = strlen( pathname );
42c08: 2f0a movel %a2,%sp@- 42c0a: 4eb9 0005 19e4 jsr 519e4 <strlen> 42c10: 588f addql #4,%sp 42c12: 2400 movel %d0,%d2
while ( len ) {
42c14: 6720 beqs 42c36 <rtems_filesystem_dirname+0x3a> <== NEVER TAKEN
42c16: 47f9 0004 3d74 lea 43d74 <rtems_filesystem_is_separator>,%a3 42c1c: 45f2 08ff lea %a2@(ffffffff,%d0:l),%a2
len--;
42c20: 5382 subql #1,%d2
if ( rtems_filesystem_is_separator( pathname[len] ) )
42c22: 1012 moveb %a2@,%d0 42c24: 538a subql #1,%a2 42c26: 49c0 extbl %d0 42c28: 2f00 movel %d0,%sp@- 42c2a: 4e93 jsr %a3@ 42c2c: 588f addql #4,%sp 42c2e: 4a80 tstl %d0
42c30: 6604 bnes 42c36 <rtems_filesystem_dirname+0x3a>
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
42c32: 4a82 tstl %d2
42c34: 66ea bnes 42c20 <rtems_filesystem_dirname+0x24>
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
42c36: 2002 movel %d2,%d0 42c38: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
42c3e: 4e5e unlk %fp <== NOT EXECUTED
00042d4c <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42d4c: 4e56 fffc linkw %fp,#-4 42d50: 2f0a movel %a2,%sp@- 42d52: 246e 0008 moveal %fp@(8),%a2 42d56: 2f02 movel %d2,%sp@- 42d58: 242e 0014 movel %fp@(20),%d2
int i = 0;
42d5c: 42ae fffc clrl %fp@(-4)
/*
* Verify Input parameters.
*/
if ( !pathname )
42d60: 4a8a tstl %a2
42d62: 675c beqs 42dc0 <rtems_filesystem_evaluate_path+0x74><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42d64: 4a82 tstl %d2
42d66: 673e beqs 42da6 <rtems_filesystem_evaluate_path+0x5a><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
42d68: 2f02 movel %d2,%sp@- 42d6a: 486e fffc pea %fp@(-4) 42d6e: 2f0a movel %a2,%sp@- 42d70: 4eb9 0004 3d00 jsr 43d00 <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],
42d76: 202e fffc movel %fp@(-4),%d0 42d7a: 2f2e 0018 movel %fp@(24),%sp@- 42d7e: 2f02 movel %d2,%sp@- 42d80: 2f2e 0010 movel %fp@(16),%sp@- 42d84: 222e 000c movel %fp@(12),%d1 42d88: 9280 subl %d0,%d1 42d8a: 2f01 movel %d1,%sp@- 42d8c: 4872 0800 pea %a2@(00000000,%d0:l) 42d90: 4eb9 0004 2c42 jsr 42c42 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42d96: 242e fff4 movel %fp@(-12),%d2
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
/*
* We evaluation the path relative to the start location we get got.
*/
return rtems_filesystem_evaluate_relative_path( &pathname[i],
42d9a: 4fef 0020 lea %sp@(32),%sp
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42d9e: 246e fff8 moveal %fp@(-8),%a2 42da2: 4e5e unlk %fp 42da4: 4e75 rts
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
42da6: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42dac: 7405 moveq #5,%d2 <== NOT EXECUTED 42dae: 2040 moveal %d0,%a0 <== NOT EXECUTED 42db0: 70ff moveq #-1,%d0 <== NOT EXECUTED 42db2: 2082 movel %d2,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42db4: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 42db8: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42dbc: 4e5e unlk %fp <== NOT EXECUTED 42dbe: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42dc0: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42dc6: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42dca: 2040 moveal %d0,%a0 <== NOT EXECUTED 42dcc: 720e moveq #14,%d1 <== NOT EXECUTED 42dce: 70ff moveq #-1,%d0 <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42dd0: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42dd4: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42dd6: 2081 movel %d1,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
...
00042c42 <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42c42: 4e56 fff0 linkw %fp,#-16 42c46: 222e 0008 movel %fp@(8),%d1 42c4a: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42c4e: 202e 000c movel %fp@(12),%d0 42c52: 242e 0010 movel %fp@(16),%d2 42c56: 246e 0014 moveal %fp@(20),%a2 42c5a: 282e 0018 movel %fp@(24),%d4
/*
* Verify Input parameters.
*/
if ( !pathname )
42c5e: 4a81 tstl %d1 42c60: 6700 00d0 beqw 42d32 <rtems_filesystem_evaluate_relative_path+0xf0>
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42c64: 4a8a tstl %a2 42c66: 6700 00b0 beqw 42d18 <rtems_filesystem_evaluate_relative_path+0xd6>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
42c6a: 206a 000c moveal %a2@(12),%a0 42c6e: 2050 moveal %a0@,%a0 42c70: 4a88 tstl %a0
42c72: 6768 beqs 42cdc <rtems_filesystem_evaluate_relative_path+0x9a><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
42c74: 2f0a movel %a2,%sp@- 42c76: 2f02 movel %d2,%sp@- 42c78: 2f00 movel %d0,%sp@- 42c7a: 2f01 movel %d1,%sp@- 42c7c: 4e90 jsr %a0@
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42c7e: 4fef 0010 lea %sp@(16),%sp
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
if ( !pathloc->ops->evalpath_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
42c82: 2600 movel %d0,%d3
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42c84: 661e bnes 42ca4 <rtems_filesystem_evaluate_relative_path+0x62>
42c86: 4a84 tstl %d4
42c88: 671a beqs 42ca4 <rtems_filesystem_evaluate_relative_path+0x62>
if ( !pathloc->ops->node_type_h ){
42c8a: 226a 000c moveal %a2@(12),%a1 42c8e: 2069 0010 moveal %a1@(16),%a0 42c92: 4a88 tstl %a0
42c94: 6762 beqs 42cf8 <rtems_filesystem_evaluate_relative_path+0xb6><== NEVER TAKEN
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
42c96: 2f0a movel %a2,%sp@- 42c98: 4e90 jsr %a0@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
42c9a: 588f addql #4,%sp 42c9c: 7201 moveq #1,%d1 42c9e: 5780 subql #3,%d0 42ca0: b280 cmpl %d0,%d1
42ca2: 640c bccs 42cb0 <rtems_filesystem_evaluate_relative_path+0x6e>
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42ca4: 2003 movel %d3,%d0 42ca6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42cac: 4e5e unlk %fp 42cae: 4e75 rts
type = (*pathloc->ops->node_type_h)( pathloc );
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
42cb0: 206a 000c moveal %a2@(12),%a0 42cb4: 2268 0034 moveal %a0@(52),%a1 42cb8: 4a89 tstl %a1
42cba: 6712 beqs 42cce <rtems_filesystem_evaluate_relative_path+0x8c><== NEVER TAKEN
* 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 );
42cbc: 2d42 000c movel %d2,%fp@(12) 42cc0: 2d4a 0008 movel %a2,%fp@(8)
}
}
return result;
}
42cc4: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42cca: 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 );
42ccc: 4ed1 jmp %a1@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
42cce: 2028 001c movel %a0@(28),%d0 <== NOT EXECUTED 42cd2: 6708 beqs 42cdc <rtems_filesystem_evaluate_relative_path+0x9a><== NOT EXECUTED 42cd4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42cd6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cd8: 4e90 jsr %a0@ <== NOT EXECUTED 42cda: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
42cdc: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42ce2: 76ff moveq #-1,%d3 <== NOT EXECUTED 42ce4: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ce6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42cec: 2003 movel %d3,%d0 <== NOT EXECUTED 42cee: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42cf4: 4e5e unlk %fp <== NOT EXECUTED 42cf6: 4e75 rts <== NOT EXECUTED
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
42cf8: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 42cfc: 4a88 tstl %a0 <== NOT EXECUTED 42cfe: 67dc beqs 42cdc <rtems_filesystem_evaluate_relative_path+0x9a><== NOT EXECUTED 42d00: 2f0a movel %a2,%sp@- <== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d02: 76ff moveq #-1,%d3 <== NOT EXECUTED
*/
if ( (result == 0) && follow_link ) {
if ( !pathloc->ops->node_type_h ){
rtems_filesystem_freenode( pathloc );
42d04: 4e90 jsr %a0@ <== NOT EXECUTED 42d06: 588f addql #4,%sp <== NOT EXECUTED
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
42d08: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42d0e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d10: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED 42d16: 60d4 bras 42cec <rtems_filesystem_evaluate_relative_path+0xaa><== NOT EXECUTED
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
42d18: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42d1e: 76ff moveq #-1,%d3 <== NOT EXECUTED 42d20: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d22: 7005 moveq #5,%d0 <== NOT EXECUTED 42d24: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42d26: 2003 movel %d3,%d0 <== NOT EXECUTED 42d28: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42d2e: 4e5e unlk %fp <== NOT EXECUTED 42d30: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42d32: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42d38: 76ff moveq #-1,%d3 <== NOT EXECUTED 42d3a: 720e moveq #14,%d1 <== NOT EXECUTED 42d3c: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42d3e: 2003 movel %d3,%d0 <== NOT EXECUTED 42d40: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42d46: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42d48: 4e5e unlk %fp <== NOT EXECUTED
0004c322 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4c322: 4e56 fff8 linkw %fp,#-8 4c326: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
.type = type,
.mount_h = NULL
};
4c32a: 42ae fffc clrl %fp@(-4) 4c32e: 2d40 fff8 movel %d0,%fp@(-8)
if ( type != NULL ) {
4c332: 6714 beqs 4c348 <rtems_filesystem_get_mount_handler+0x26><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4c334: 486e fff8 pea %fp@(-8) 4c338: 487a fe42 pea %pc@(4c17c <find_handler>) 4c33c: 4eb9 0004 c278 jsr 4c278 <rtems_filesystem_iterate> 4c342: 202e fffc movel %fp@(-4),%d0 4c346: 508f addql #8,%sp
}
return fa.mount_h;
}
4c348: 4e5e unlk %fp <== NOT EXECUTED
00042814 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42814: 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 )
{
42816: 4e56 ffe0 linkw %fp,#-32
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
4281a: 2079 0005 fcc0 moveal 5fcc0 <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 )
{
42820: 48d7 1c00 moveml %a2-%a4,%sp@
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42824: 2140 002c movel %d0,%a0@(44)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
42828: 4ab9 0005 e0ae tstl 5e0ae <rtems_filesystem_mount_table_size> 4282e: 6700 00c2 beqw 428f2 <rtems_filesystem_initialize+0xde>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
42832: 2079 0005 fbac moveal 5fbac <rtems_filesystem_mount_table>,%a0
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
42838: 42a7 clrl %sp@- 4283a: 2f28 0004 movel %a0@(4),%sp@- 4283e: 2f10 movel %a0@,%sp@- 42840: 2f28 000c movel %a0@(12),%sp@- 42844: 2f28 0008 movel %a0@(8),%sp@- 42848: 4eb9 0004 337c jsr 4337c <mount>
if ( status == -1 )
4284e: 4fef 0014 lea %sp@(20),%sp 42852: 72ff moveq #-1,%d1 42854: b280 cmpl %d0,%d1 42856: 6700 00b2 beqw 4290a <rtems_filesystem_initialize+0xf6>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
4285a: 2079 0005 fcc0 moveal 5fcc0 <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);
42860: 45ee ffec lea %fp@(-20),%a2 42864: 49f9 0004 2d4c lea 42d4c <rtems_filesystem_evaluate_path>,%a4
rtems_filesystem_root = loc;
4286a: 264e moveal %fp,%a3
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;
4286c: 4240 clrw %d0 4286e: 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);
42872: 42a7 clrl %sp@- 42874: 2f0a movel %a2,%sp@- 42876: 42a7 clrl %sp@- 42878: 4878 0001 pea 1 <ADD> 4287c: 4879 0005 e460 pea 5e460 <IMFS_ops+0x48> 42882: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42884: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 4288a: 2152 0018 movel %a2@,%a0@(24) 4288e: 216e fff0 001c movel %fp@(-16),%a0@(28) 42894: 216e fff4 0020 movel %fp@(-12),%a0@(32) 4289a: 216e fff8 0024 movel %fp@(-8),%a0@(36) 428a0: 2163 0028 movel %a3@-,%a0@(40)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
428a4: 42a7 clrl %sp@- 428a6: 2f0a movel %a2,%sp@- 428a8: 42a7 clrl %sp@- 428aa: 4878 0001 pea 1 <ADD> 428ae: 4879 0005 e460 pea 5e460 <IMFS_ops+0x48> 428b4: 4e94 jsr %a4@
rtems_filesystem_current = loc;
428b6: 2079 0005 fcc0 moveal 5fcc0 <rtems_current_user_env>,%a0 428bc: 5888 addql #4,%a0
*
* 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);
428be: 4fef 0028 lea %sp@(40),%sp
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
428c2: 20d2 movel %a2@,%a0@+ 428c4: 20ee fff0 movel %fp@(-16),%a0@+ 428c8: 20ee fff4 movel %fp@(-12),%a0@+ 428cc: 20ee fff8 movel %fp@(-8),%a0@+ 428d0: 2093 movel %a3@,%a0@
*
* 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);
428d2: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 428d6: 4879 0005 e462 pea 5e462 <IMFS_ops+0x4a> 428dc: 4eb9 0004 31d4 jsr 431d4 <mkdir>
if ( status != 0 )
428e2: 508f addql #8,%sp 428e4: 4a80 tstl %d0
428e6: 6616 bnes 428fe <rtems_filesystem_initialize+0xea><== NEVER TAKEN
* 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. */ }
428e8: 4cee 1c00 ffe0 moveml %fp@(-32),%a2-%a4 428ee: 4e5e unlk %fp 428f0: 4e75 rts
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
428f2: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 428f8: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
428fe: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42904: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
mt = &rtems_filesystem_mount_table[0];
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
if ( status == -1 )
rtems_fatal_error_occurred( 0xABCD0002 );
4290a: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42910: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004c278 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4c278: 4e56 fff0 linkw %fp,#-16 4c27c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4c280: 266e 0008 moveal %fp@(8),%a3 4c284: 262e 000c movel %fp@(12),%d3
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4c288: 4ab9 0005 e08e tstl 5e08e <rtems_filesystem_table>
4c28e: 672a beqs 4c2ba <rtems_filesystem_iterate+0x42> <== NEVER TAKEN
4c290: 45f9 0005 e08e lea 5e08e <rtems_filesystem_table>,%a2
stop = (*routine)( table_entry, routine_arg );
4c296: 2f03 movel %d3,%sp@- 4c298: 2f0a movel %a2,%sp@-
++table_entry;
4c29a: 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 );
4c29c: 4e93 jsr %a3@
{
const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0];
rtems_chain_node *node = NULL;
bool stop = false;
while ( table_entry->type && !stop ) {
4c29e: 508f addql #8,%sp
stop = (*routine)( table_entry, routine_arg );
4c2a0: 1400 moveb %d0,%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 ) {
4c2a2: 4a92 tstl %a2@
4c2a4: 6710 beqs 4c2b6 <rtems_filesystem_iterate+0x3e> <== ALWAYS TAKEN
4c2a6: 4a00 tstb %d0 <== NOT EXECUTED 4c2a8: 67ec beqs 4c296 <rtems_filesystem_iterate+0x1e> <== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
4c2aa: 1002 moveb %d2,%d0 4c2ac: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4c2b2: 4e5e unlk %fp 4c2b4: 4e75 rts
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4c2b6: 4a00 tstb %d0
4c2b8: 66f0 bnes 4c2aa <rtems_filesystem_iterate+0x32>
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 );
4c2ba: 42a7 clrl %sp@- 4c2bc: 42a7 clrl %sp@- 4c2be: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c2c4: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
4c2ca: 2479 0005 fcc8 moveal 5fcc8 <filesystem_chain>,%a2
rtems_libio_lock();
for (
4c2d0: 4fef 000c lea %sp@(12),%sp 4c2d4: b5fc 0005 fccc cmpal #392396,%a2
4c2da: 6734 beqs 4c310 <rtems_filesystem_iterate+0x98>
!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 );
4c2dc: 2f03 movel %d3,%sp@- 4c2de: 486a 0008 pea %a2@(8) 4c2e2: 4e93 jsr %a3@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
4c2e4: 2452 moveal %a2@,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4c2e6: 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 );
4c2e8: 1400 moveb %d0,%d2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4c2ea: b5fc 0005 fccc cmpal #392396,%a2
4c2f0: 6704 beqs 4c2f6 <rtems_filesystem_iterate+0x7e>
4c2f2: 4a00 tstb %d0
4c2f4: 67e6 beqs 4c2dc <rtems_filesystem_iterate+0x64>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c2f6: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c2fc: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> 4c302: 588f addql #4,%sp
}
rtems_libio_unlock();
}
return stop;
}
4c304: 1002 moveb %d2,%d0 4c306: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4c30c: 4e5e unlk %fp 4c30e: 4e75 rts 4c310: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@-
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4c316: 4202 clrb %d2 4c318: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> 4c31e: 588f addql #4,%sp 4c320: 60e2 bras 4c304 <rtems_filesystem_iterate+0x8c>
00043300 <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
43300: 4e56 fff0 linkw %fp,#-16 43304: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
43308: 42a7 clrl %sp@- 4330a: 266e 0008 moveal %fp@(8),%a3 4330e: 42a7 clrl %sp@- 43310: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 43316: 262e 000c movel %fp@(12),%d3 4331a: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
43320: 2479 0005 fca0 moveal 5fca0 <mount_chain>,%a2
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
43326: 4fef 000c lea %sp@(12),%sp 4332a: b5fc 0005 fca4 cmpal #392356,%a2
43330: 6730 beqs 43362 <rtems_filesystem_mount_iterate+0x62><== NEVER TAKEN
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 );
43332: 2f03 movel %d3,%sp@- 43334: 2f0a movel %a2,%sp@- 43336: 4e93 jsr %a3@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
43338: 2452 moveal %a2@,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
4333a: 508f addql #8,%sp
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 );
4333c: 1400 moveb %d0,%d2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
4333e: b5fc 0005 fca4 cmpal #392356,%a2
43344: 6704 beqs 4334a <rtems_filesystem_mount_iterate+0x4a>
43346: 4a00 tstb %d0
43348: 67e8 beqs 43332 <rtems_filesystem_mount_iterate+0x32><== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4334a: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 43350: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43356: 1002 moveb %d2,%d0 43358: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4335e: 4e5e unlk %fp 43360: 4e75 rts
43362: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
43368: 4202 clrb %d2 <== NOT EXECUTED 4336a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
43370: 1002 moveb %d2,%d0 <== NOT EXECUTED 43372: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 43378: 4e5e unlk %fp <== NOT EXECUTED
00042ba8 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42ba8: 4e56 fff0 linkw %fp,#-16 42bac: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42bb0: 246e 0008 moveal %fp@(8),%a2
/* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42bb4: 1012 moveb %a2@,%d0
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42bb6: 262e 000c movel %fp@(12),%d3
/* * Eat any separators at start of the path. */ int stripped = 0; while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42bba: 4a00 tstb %d0
42bbc: 6730 beqs 42bee <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
42bbe: 4a83 tstl %d3
42bc0: 672c beqs 42bee <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
42bc2: 4282 clrl %d2 42bc4: 47f9 0004 3d74 lea 43d74 <rtems_filesystem_is_separator>,%a3 42bca: 49c0 extbl %d0 42bcc: 2f00 movel %d0,%sp@- 42bce: 4e93 jsr %a3@ 42bd0: 588f addql #4,%sp 42bd2: 4a80 tstl %d0
42bd4: 670c beqs 42be2 <rtems_filesystem_prefix_separators+0x3a>
{
pathname++;
pathnamelen--;
stripped++;
42bd6: 5282 addql #1,%d2
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42bd8: 1032 2800 moveb %a2@(00000000,%d2:l),%d0
42bdc: 6704 beqs 42be2 <rtems_filesystem_prefix_separators+0x3a><== NEVER TAKEN
42bde: b483 cmpl %d3,%d2
42be0: 66e8 bnes 42bca <rtems_filesystem_prefix_separators+0x22><== ALWAYS TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42be2: 2002 movel %d2,%d0 42be4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42bea: 4e5e unlk %fp 42bec: 4e75 rts
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42bee: 4282 clrl %d2 <== NOT EXECUTED
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42bf0: 2002 movel %d2,%d0 <== NOT EXECUTED 42bf2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 42bf8: 4e5e unlk %fp <== NOT EXECUTED
0004c34c <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
4c34c: 4e56 fff4 linkw %fp,#-12 4c350: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4c354: 242e 0008 movel %fp@(8),%d2
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
4c358: 2f02 movel %d2,%sp@- 4c35a: 4eb9 0005 19e4 jsr 519e4 <strlen>
filesystem_node *fsn = malloc( fsn_size );
4c360: 0680 0000 0011 addil #17,%d0 4c366: 2e80 movel %d0,%sp@ 4c368: 4eb9 0004 3108 jsr 43108 <malloc>
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
4c36e: 588f addql #4,%sp
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
4c370: 2440 moveal %d0,%a2
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
4c372: 4a80 tstl %d0 4c374: 6700 0096 beqw 4c40c <rtems_filesystem_register+0xc0>
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
4c378: 2f02 movel %d2,%sp@-
rtems_filesystem_fsmount_me_t mount_h
)
{
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
4c37a: 2600 movel %d0,%d3 4c37c: 0683 0000 0010 addil #16,%d3
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
4c382: 2f03 movel %d3,%sp@- 4c384: 4eb9 0005 1538 jsr 51538 <strcpy>
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 );
4c38a: 42a7 clrl %sp@- 4c38c: 42a7 clrl %sp@- 4c38e: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@-
fsn->entry.type = type_storage; fsn->entry.mount_h = mount_h;
4c394: 256e 000c 000c movel %fp@(12),%a2@(12)
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
fsn->entry.type = type_storage;
4c39a: 2543 0008 movel %d3,%a2@(8) 4c39e: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
fsn->entry.mount_h = mount_h;
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
4c3a4: 2f02 movel %d2,%sp@- 4c3a6: 4eb9 0004 c322 jsr 4c322 <rtems_filesystem_get_mount_handler> 4c3ac: 4fef 0018 lea %sp@(24),%sp 4c3b0: 4a80 tstl %d0
4c3b2: 662a bnes 4c3de <rtems_filesystem_register+0x92> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
4c3b4: 2f0a movel %a2,%sp@- 4c3b6: 4879 0005 fcc8 pea 5fcc8 <filesystem_chain> 4c3bc: 4eb9 0004 7170 jsr 47170 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c3c2: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c3c8: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
4c3ce: 4fef 000c lea %sp@(12),%sp 4c3d2: 4280 clrl %d0
}
4c3d4: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4c3da: 4e5e unlk %fp 4c3dc: 4e75 rts
4c3de: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
rtems_set_errno_and_return_minus_one( EINVAL );
4c3e4: 7616 moveq #22,%d3 <== NOT EXECUTED 4c3e6: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
rtems_chain_append( &filesystem_chain, &fsn->node );
} else {
rtems_libio_unlock();
free( fsn );
4c3ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c3ee: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
4c3f4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4c3fa: 508f addql #8,%sp <== NOT EXECUTED 4c3fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c3fe: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c400: 2083 movel %d3,%a0@ <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
4c402: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4c408: 4e5e unlk %fp <== NOT EXECUTED 4c40a: 4e75 rts <== NOT EXECUTED
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
4c40c: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4c412: 720c moveq #12,%d1 <== NOT EXECUTED 4c414: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c416: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
}
4c418: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
filesystem_node *fsn = malloc( fsn_size );
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
4c41e: 2081 movel %d1,%a0@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
}
4c420: 4e5e unlk %fp <== NOT EXECUTED
0004c1be <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
4c1be: 4e56 fff4 linkw %fp,#-12 <== NOT EXECUTED 4c1c2: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 4c1c6: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
4c1ca: 6700 0094 beqw 4c260 <rtems_filesystem_unregister+0xa2><== 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 );
4c1ce: 42a7 clrl %sp@- <== NOT EXECUTED 4c1d0: 42a7 clrl %sp@- <== NOT EXECUTED 4c1d2: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED 4c1d8: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
4c1de: 2479 0005 fcc8 moveal 5fcc8 <filesystem_chain>,%a2 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4c1e4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c1e8: b5fc 0005 fccc cmpal #392396,%a2 <== NOT EXECUTED 4c1ee: 671e beqs 4c20e <rtems_filesystem_unregister+0x50><== NOT EXECUTED 4c1f0: 47f9 0005 14c0 lea 514c0 <strcmp>,%a3 <== NOT EXECUTED
!rtems_chain_is_tail( &filesystem_chain, node );
node = rtems_chain_next( node )
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
4c1f6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c1f8: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4c1fc: 4e93 jsr %a3@ <== NOT EXECUTED 4c1fe: 508f addql #8,%sp <== NOT EXECUTED 4c200: 4a80 tstl %d0 <== NOT EXECUTED 4c202: 6730 beqs 4c234 <rtems_filesystem_unregister+0x76><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
4c204: 2452 moveal %a2@,%a2 <== NOT EXECUTED
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4c206: b5fc 0005 fccc cmpal #392396,%a2 <== NOT EXECUTED 4c20c: 66e8 bnes 4c1f6 <rtems_filesystem_unregister+0x38><== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c20e: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED 4c214: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4c21a: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4c220: 588f addql #4,%sp <== NOT EXECUTED 4c222: 7202 moveq #2,%d1 <== NOT EXECUTED 4c224: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c226: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
4c228: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4c22e: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
4c230: 4e5e unlk %fp <== NOT EXECUTED 4c232: 4e75 rts <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4c234: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c236: 4eb9 0004 71a8 jsr 471a8 <_Chain_Extract> <== NOT EXECUTED
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
rtems_chain_extract( node );
free( fsn );
4c23c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4c23e: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED 4c244: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED 4c24a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
rtems_libio_unlock();
return 0;
4c250: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4c254: 4280 clrl %d0 <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4c256: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4c25c: 4e5e unlk %fp <== NOT EXECUTED 4c25e: 4e75 rts <== NOT EXECUTED
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
4c260: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4c266: 7416 moveq #22,%d2 <== NOT EXECUTED 4c268: 2040 moveal %d0,%a0 <== NOT EXECUTED 4c26a: 70ff moveq #-1,%d0 <== NOT EXECUTED 4c26c: 2082 movel %d2,%a0@ <== NOT EXECUTED
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4c26e: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 4c274: 4e5e unlk %fp <== NOT EXECUTED
00046d26 <rtems_initialize_data_structures>:
#endif
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(void)
{
46d26: 4e56 0000 linkw %fp,#0 46d2a: 42b9 0006 15b4 clrl 615b4 <_System_state_Current>
#endif
/*
* Initialize any target architecture specific support as early as possible
*/
_CPU_Initialize();
46d30: 4eb9 0004 9ea4 jsr 49ea4 <_CPU_Initialize>
/*
* Do this as early as possible to ensure no debugging output
* is even attempted to be printed.
*/
_Debug_Manager_initialization();
46d36: 4eb9 0004 d27c jsr 4d27c <_Debug_Manager_initialization>
_API_extensions_Initialization();
46d3c: 4eb9 0004 6fdc jsr 46fdc <_API_extensions_Initialization>
* This routine initializes the thread dispatching subsystem.
*/
RTEMS_INLINE_ROUTINE void _Thread_Dispatch_initialization( void )
{
_Thread_Dispatch_disable_level = 1;
46d42: 7001 moveq #1,%d0 46d44: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
/*
* Before this is called, we are not allowed to allocate memory
* from the Workspace because it is not initialized.
*/
_Workspace_Handler_initialization();
46d4a: 4eb9 0004 9d78 jsr 49d78 <_Workspace_Handler_initialization>
_User_extensions_Handler_initialization();
46d50: 4eb9 0004 9800 jsr 49800 <_User_extensions_Handler_initialization>
_ISR_Handler_initialization();
46d56: 4eb9 0004 7b00 jsr 47b00 <_ISR_Handler_initialization>
/*
* Initialize the internal support API and allocator Mutex
*/
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
_API_Mutex_Initialization( 1 );
46d5c: 4878 0001 pea 1 <ADD>
_ISR_Handler_initialization();
/*
* Initialize the internal support API and allocator Mutex
*/
_Objects_Information_table[OBJECTS_INTERNAL_API] = _Internal_Objects;
46d60: 203c 0006 1442 movel #398402,%d0 46d66: 23c0 0006 13e8 movel %d0,613e8 <_Objects_Information_table+0x4>
_API_Mutex_Initialization( 1 );
46d6c: 4eb9 0004 7110 jsr 47110 <_API_Mutex_Initialization>
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
46d72: 4879 0006 14de pea 614de <_RTEMS_Allocator_Mutex> 46d78: 4eb9 0004 7078 jsr 47078 <_API_Mutex_Allocate>
#include <rtems/itron/itronapi.h>
#endif
Objects_Information *_Internal_Objects[ OBJECTS_INTERNAL_CLASSES_LAST + 1 ];
void rtems_initialize_data_structures(void)
46d7e: 508f addql #8,%sp
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
int index;
_Priority_Major_bit_map = 0;
46d80: 41f9 0006 154c lea 6154c <_Priority_Bit_map>,%a0 46d86: 4240 clrw %d0 46d88: 33c0 0006 14dc movew %d0,614dc <_Priority_Major_bit_map>
for ( index=0 ; index <16 ; index++ )
_Priority_Bit_map[ index ] = 0;
46d8e: 4258 clrw %a0@+
RTEMS_INLINE_ROUTINE void _Priority_Handler_initialization( void )
{
int index;
_Priority_Major_bit_map = 0;
for ( index=0 ; index <16 ; index++ )
46d90: b1fc 0006 156c cmpal #398700,%a0
46d96: 66f6 bnes 46d8e <rtems_initialize_data_structures+0x68>
_API_Mutex_Initialization( 1 );
_API_Mutex_Allocate( &_RTEMS_Allocator_Mutex );
_Priority_Handler_initialization();
_Watchdog_Handler_initialization();
46d98: 4eb9 0004 9ba8 jsr 49ba8 <_Watchdog_Handler_initialization>
_TOD_Handler_initialization();
46d9e: 4eb9 0004 7694 jsr 47694 <_TOD_Handler_initialization>
_Thread_Handler_initialization();
46da4: 4eb9 0004 8c28 jsr 48c28 <_Thread_Handler_initialization>
_MPCI_Handler_initialization( RTEMS_TIMEOUT );
#endif
/* MANAGERS */
_RTEMS_API_Initialize();
46daa: 4eb9 0004 6f88 jsr 46f88 <_RTEMS_API_Initialize>
_Extension_Manager_initialization();
46db0: 4eb9 0004 6e00 jsr 46e00 <_Extension_Manager_initialization>
_IO_Manager_initialization();
46db6: 4eb9 0004 6e7e jsr 46e7e <_IO_Manager_initialization>
#ifdef RTEMS_POSIX_API
_POSIX_API_Initialize();
46dbc: 4eb9 0004 6f34 jsr 46f34 <_POSIX_API_Initialize>
_Thread_Create_idle();
/*
* Scheduling can properly occur now as long as we avoid dispatching.
*/
}
46dc2: 4e5e unlk %fp 46dc4: 7001 moveq #1,%d0 46dc6: 23c0 0006 15b4 movel %d0,615b4 <_System_state_Current>
* _Thread_Executing and _Thread_Heir are not set. * * At this point all API extensions are in place. After the call to * _Thread_Create_idle() _Thread_Executing and _Thread_Heir will be set. */ _Thread_Create_idle();
46dcc: 4ef9 0004 86c8 jmp 486c8 <_Thread_Create_idle>
...
000426e0 <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
426e0: 4e56 ffd8 linkw %fp,#-40 <== NOT EXECUTED 426e4: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ <== NOT EXECUTED 426e8: 262e 0008 movel %fp@(8),%d3 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
426ec: 45f9 0005 19e4 lea 519e4 <strlen>,%a2 <== NOT EXECUTED 426f2: 240e movel %fp,%d2 <== NOT EXECUTED 426f4: 0682 ffff ffec addil #-20,%d2 <== NOT EXECUTED 426fa: 2f03 movel %d3,%sp@- <== NOT EXECUTED 426fc: 4e92 jsr %a2@ <== NOT EXECUTED 426fe: 7201 moveq #1,%d1 <== NOT EXECUTED 42700: 2e81 movel %d1,%sp@ <== NOT EXECUTED 42702: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42704: 42a7 clrl %sp@- <== NOT EXECUTED 42706: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42708: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4270a: 4eb9 0004 2d4c jsr 42d4c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
42710: 226e fff8 moveal %fp@(-8),%a1 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
42714: 2800 movel %d0,%d4 <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
42716: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
4271a: 266e ffec moveal %fp@(-20),%a3 <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
4271e: 2069 0010 moveal %a1@(16),%a0 <== NOT EXECUTED 42722: 4a88 tstl %a0 <== NOT EXECUTED 42724: 6730 beqs 42756 <rtems_io_lookup_name+0x76> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
42726: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42728: 4e90 jsr %a0@ <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
4272a: 588f addql #4,%sp <== NOT EXECUTED 4272c: 4a84 tstl %d4 <== NOT EXECUTED 4272e: 674e beqs 4277e <rtems_io_lookup_name+0x9e> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
42730: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 42734: 4a88 tstl %a0 <== NOT EXECUTED 42736: 6700 0092 beqw 427ca <rtems_io_lookup_name+0xea> <== NOT EXECUTED 4273a: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4273e: 4a88 tstl %a0 <== NOT EXECUTED 42740: 6700 0088 beqw 427ca <rtems_io_lookup_name+0xea> <== NOT EXECUTED 42744: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42746: 4e90 jsr %a0@ <== NOT EXECUTED 42748: 588f addql #4,%sp <== NOT EXECUTED 4274a: 700d moveq #13,%d0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
4274c: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 42752: 4e5e unlk %fp <== NOT EXECUTED 42754: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
42756: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4275a: 4a88 tstl %a0 <== NOT EXECUTED 4275c: 6706 beqs 42764 <rtems_io_lookup_name+0x84> <== NOT EXECUTED 4275e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42760: 4e90 jsr %a0@ <== NOT EXECUTED 42762: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
42764: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4276a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4276c: 70ff moveq #-1,%d0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
4276e: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
42774: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
4277a: 4e5e unlk %fp <== NOT EXECUTED 4277c: 4e75 rts <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
node_type = (*loc.ops->node_type_h)( &loc );
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
4277e: 7202 moveq #2,%d1 <== NOT EXECUTED 42780: b280 cmpl %d0,%d1 <== NOT EXECUTED 42782: 66ac bnes 42730 <rtems_io_lookup_name+0x50> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
42784: 2f03 movel %d3,%sp@- <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
42786: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED 4278a: 2083 movel %d3,%a0@ <== NOT EXECUTED
device_info->device_name_length = strlen( name );
4278c: 4e92 jsr %a2@ <== NOT EXECUTED 4278e: 226e 000c moveal %fp@(12),%a1 <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
42792: 41eb 004c lea %a3@(76),%a0 <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
42796: 47eb 0050 lea %a3@(80),%a3 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
4279a: 588f addql #4,%sp <== NOT EXECUTED 4279c: 2340 0004 movel %d0,%a1@(4) <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
427a0: 2350 0008 movel %a0@,%a1@(8) <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
427a4: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
427a8: 2353 000c movel %a3@,%a1@(12) <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
427ac: 4a88 tstl %a0 <== NOT EXECUTED 427ae: 6726 beqs 427d6 <rtems_io_lookup_name+0xf6> <== NOT EXECUTED 427b0: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 427b4: 4a88 tstl %a0 <== NOT EXECUTED 427b6: 671e beqs 427d6 <rtems_io_lookup_name+0xf6> <== NOT EXECUTED 427b8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 427ba: 4e90 jsr %a0@ <== NOT EXECUTED 427bc: 588f addql #4,%sp <== NOT EXECUTED 427be: 4280 clrl %d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
427c0: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427c6: 4e5e unlk %fp <== NOT EXECUTED 427c8: 4e75 rts <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
427ca: 700d moveq #13,%d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
427cc: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427d2: 4e5e unlk %fp <== NOT EXECUTED 427d4: 4e75 rts <== NOT EXECUTED
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
427d6: 4280 clrl %d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
427d8: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 <== NOT EXECUTED 427de: 4e5e unlk %fp <== NOT EXECUTED
00048394 <rtems_io_register_driver>:
rtems_status_code rtems_io_register_driver(
rtems_device_major_number major,
const rtems_driver_address_table *driver_table,
rtems_device_major_number *registered_major
)
{
48394: 4e56 fff4 linkw %fp,#-12 48398: 226e 000c moveal %fp@(12),%a1 4839c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 483a0: 242e 0008 movel %fp@(8),%d2 483a4: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
483a8: 2039 0006 5d0e movel 65d0e <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
483ae: 2239 0006 54ee movel 654ee <_ISR_Nest_level>,%d1 483b4: 6600 009c bnew 48452 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
483b8: 4a8a tstl %a2 483ba: 6700 00ea beqw 484a6 <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
483be: 2480 movel %d0,%a2@
if ( driver_table == NULL )
483c0: 4a89 tstl %a1 483c2: 6700 00e2 beqw 484a6 <rtems_io_register_driver+0x112>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483c6: 4a91 tstl %a1@ 483c8: 6700 00d4 beqw 4849e <rtems_io_register_driver+0x10a>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
483cc: b480 cmpl %d0,%d2
483ce: 6476 bccs 48446 <rtems_io_register_driver+0xb2> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
483d0: 2039 0006 5454 movel 65454 <_Thread_Dispatch_disable_level>,%d0 483d6: 5280 addql #1,%d0 483d8: 23c0 0006 5454 movel %d0,65454 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
483de: 4a82 tstl %d2
483e0: 667c bnes 4845e <rtems_io_register_driver+0xca> <== NEVER TAKEN
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
483e2: 2039 0006 5d0e movel 65d0e <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483e8: 6700 00fc beqw 484e6 <rtems_io_register_driver+0x152> 483ec: 2239 0006 5d12 movel 65d12 <_IO_Driver_address_table>,%d1 483f2: 2041 moveal %d1,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
483f4: 4a90 tstl %a0@ 483f6: 6700 008e beqw 48486 <rtems_io_register_driver+0xf2>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
483fa: 5282 addql #1,%d2 483fc: 41e8 0018 lea %a0@(24),%a0 48400: b480 cmpl %d0,%d2
48402: 65f0 bcss 483f4 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
48404: 2482 movel %d2,%a2@
if ( m != n )
48406: b480 cmpl %d0,%d2 48408: 6700 00de beqw 484e8 <rtems_io_register_driver+0x154> 4840c: 2602 movel %d2,%d3 4840e: 2002 movel %d2,%d0 48410: 2041 moveal %d1,%a0 48412: e78b lsll #3,%d3 48414: eb88 lsll #5,%d0 48416: 9083 subl %d3,%d0 48418: d1c0 addal %d0,%a0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
4841a: 20d9 movel %a1@+,%a0@+ 4841c: 20d9 movel %a1@+,%a0@+ 4841e: 20d9 movel %a1@+,%a0@+ 48420: 20d9 movel %a1@+,%a0@+ 48422: 20d9 movel %a1@+,%a0@+ 48424: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48426: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4842c: 2d42 0008 movel %d2,%fp@(8)
}
48430: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48436: 42ae 0010 clrl %fp@(16) 4843a: 42ae 000c clrl %fp@(12)
}
4843e: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
48440: 4ef9 0005 1650 jmp 51650 <rtems_io_initialize>
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
48446: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48448: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4844e: 4e5e unlk %fp 48450: 4e75 rts
rtems_device_major_number *registered_major
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
48452: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48454: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4845a: 4e5e unlk %fp 4845c: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
4845e: 2202 movel %d2,%d1 48460: 2002 movel %d2,%d0 48462: e789 lsll #3,%d1 48464: eb88 lsll #5,%d0 48466: 2079 0006 5d12 moveal 65d12 <_IO_Driver_address_table>,%a0 4846c: 9081 subl %d1,%d0 4846e: d1c0 addal %d0,%a0
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48470: 4a90 tstl %a0@
48472: 673e beqs 484b2 <rtems_io_register_driver+0x11e>
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
48474: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 4847a: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4847c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48482: 4e5e unlk %fp 48484: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
48486: 4aa8 0004 tstl %a0@(4) 4848a: 6700 ff78 beqw 48404 <rtems_io_register_driver+0x70>
rtems_device_major_number n = _IO_Number_of_drivers;
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
4848e: 5282 addql #1,%d2 48490: 41e8 0018 lea %a0@(24),%a0 48494: b480 cmpl %d0,%d2 48496: 6500 ff5c bcsw 483f4 <rtems_io_register_driver+0x60> 4849a: 6000 ff68 braw 48404 <rtems_io_register_driver+0x70>
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
4849e: 4aa9 0004 tstl %a1@(4) 484a2: 6600 ff28 bnew 483cc <rtems_io_register_driver+0x38>
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484a6: 7009 moveq #9,%d0
}
484a8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484ae: 4e5e unlk %fp 484b0: 4e75 rts
static inline bool rtems_io_is_empty_table(
const rtems_driver_address_table *table
)
{
return table->initialization_entry == NULL && table->open_entry == NULL;
484b2: 4aa8 0004 tstl %a0@(4)
484b6: 66bc bnes 48474 <rtems_io_register_driver+0xe0>
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
484b8: 20d9 movel %a1@+,%a0@+ 484ba: 20d9 movel %a1@+,%a0@+ 484bc: 20d9 movel %a1@+,%a0@+ 484be: 20d9 movel %a1@+,%a0@+ 484c0: 20d9 movel %a1@+,%a0@+ 484c2: 2091 movel %a1@,%a0@
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
484c4: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
484c6: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
484cc: 2d42 0008 movel %d2,%fp@(8)
}
484d0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484d6: 42ae 0010 clrl %fp@(16) 484da: 42ae 000c clrl %fp@(12)
}
484de: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
484e0: 4ef9 0005 1650 jmp 51650 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
484e6: 4292 clrl %a2@ <== NOT EXECUTED
if ( major == 0 ) {
rtems_status_code sc = rtems_io_obtain_major_number( registered_major );
if ( sc != RTEMS_SUCCESSFUL ) {
_Thread_Enable_dispatch();
484e8: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 484ee: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
484f0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 484f6: 4e5e unlk %fp
...
0004953c <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)
{
4953c: 4e56 fff0 linkw %fp,#-16 49540: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 49544: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
49548: 4a8b tstl %a3
4954a: 6744 beqs 49590 <rtems_iterate_over_all_threads+0x54><== NEVER TAKEN
4954c: 49f9 0006 4018 lea 64018 <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
49552: 2054 moveal %a4@,%a0 49554: 4a88 tstl %a0
49556: 672e beqs 49586 <rtems_iterate_over_all_threads+0x4a>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
49558: 2468 0004 moveal %a0@(4),%a2
if ( !information )
4955c: 4a8a tstl %a2
4955e: 6726 beqs 49586 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49560: 4a6a 000e tstw %a2@(14)
49564: 6720 beqs 49586 <rtems_iterate_over_all_threads+0x4a>
49566: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
49568: 206a 0018 moveal %a2@(24),%a0 4956c: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
49570: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
49572: 4a80 tstl %d0
49574: 6706 beqs 4957c <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
49576: 2f00 movel %d0,%sp@- 49578: 4e93 jsr %a3@ 4957a: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4957c: 4280 clrl %d0 4957e: 302a 000e movew %a2@(14),%d0 49582: b480 cmpl %d0,%d2
49584: 63e2 blss 49568 <rtems_iterate_over_all_threads+0x2c>
49586: 588c addql #4,%a4
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
49588: b9fc 0006 4028 cmpal #409640,%a4
4958e: 66c2 bnes 49552 <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
49590: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49596: 4e5e unlk %fp
...
0004c084 <rtems_libio_allocate>:
* This routine searches the IOP Table for an unused entry. If it
* finds one, it returns it. Otherwise, it returns NULL.
*/
rtems_libio_t *rtems_libio_allocate( void )
{
4c084: 4e56 fffc linkw %fp,#-4 4c088: 2f0a movel %a2,%sp@- 4c08a: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4c08c: 42a7 clrl %sp@- 4c08e: 42a7 clrl %sp@- 4c090: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c096: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
rtems_status_code rc;
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
4c09c: 2039 0006 12d0 movel 612d0 <rtems_libio_iop_freelist>,%d0 4c0a2: 4fef 000c lea %sp@(12),%sp
4c0a6: 661c bnes 4c0c4 <rtems_libio_allocate+0x40>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c0a8: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@-
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
4c0ae: 95ca subal %a2,%a2 4c0b0: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
4c0b6: 242e fff4 movel %fp@(-12),%d2 4c0ba: 200a movel %a2,%d0 4c0bc: 246e fff8 moveal %fp@(-8),%a2 4c0c0: 4e5e unlk %fp 4c0c2: 4e75 rts
rtems_id sema;
rtems_libio_lock();
if (rtems_libio_iop_freelist) {
rc = rtems_semaphore_create(
4c0c4: 486e fffc pea %fp@(-4) 4c0c8: 90b9 0006 12cc subl 612cc <rtems_libio_iops>,%d0 4c0ce: ec80 asrl #6,%d0 4c0d0: 42a7 clrl %sp@- 4c0d2: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4c0d6: 4878 0001 pea 1 <ADD> 4c0da: 0080 4c42 4900 oril #1279412480,%d0 4c0e0: 2f00 movel %d0,%sp@- 4c0e2: 4eb9 0004 6464 jsr 46464 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
0,
&sema
);
if (rc != RTEMS_SUCCESSFUL)
4c0e8: 4fef 0014 lea %sp@(20),%sp 4c0ec: 4a80 tstl %d0
4c0ee: 66b8 bnes 4c0a8 <rtems_libio_allocate+0x24> <== NEVER TAKEN
goto failed;
iop = rtems_libio_iop_freelist;
4c0f0: 2479 0006 12d0 moveal 612d0 <rtems_libio_iop_freelist>,%a2
next = iop->data1;
4c0f6: 242a 0034 movel %a2@(52),%d2
(void) memset( iop, 0, sizeof(rtems_libio_t) );
4c0fa: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 4c0fe: 42a7 clrl %sp@- 4c100: 2f0a movel %a2,%sp@- 4c102: 4eb9 0005 0e48 jsr 50e48 <memset>
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
4c108: 256e fffc 002c movel %fp@(-4),%a2@(44)
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
4c10e: 203c 0000 0100 movel #256,%d0
iop->sem = sema;
rtems_libio_iop_freelist = next;
goto done;
4c114: 4fef 000c lea %sp@(12),%sp
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
iop->sem = sema;
rtems_libio_iop_freelist = next;
4c118: 23c2 0006 12d0 movel %d2,612d0 <rtems_libio_iop_freelist>
if (rc != RTEMS_SUCCESSFUL)
goto failed;
iop = rtems_libio_iop_freelist;
next = iop->data1;
(void) memset( iop, 0, sizeof(rtems_libio_t) );
iop->flags = LIBIO_FLAGS_OPEN;
4c11e: 2540 0014 movel %d0,%a2@(20) 4c122: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c128: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
iop = 0;
done:
rtems_libio_unlock();
return iop;
}
4c12e: 242e fff4 movel %fp@(-12),%d2 4c132: 200a movel %a2,%d0 4c134: 246e fff8 moveal %fp@(-8),%a2
4c138: 4e5e unlk %fp <== NOT EXECUTED
0004bff6 <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
4bff6: 4e56 0000 linkw %fp,#0 4bffa: 2f0a movel %a2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4bffc: 42a7 clrl %sp@- 4bffe: 246e 0008 moveal %fp@(8),%a2 4c002: 42a7 clrl %sp@- 4c004: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4c00a: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
4c010: 202a 002c movel %a2@(44),%d0 4c014: 4fef 000c lea %sp@(12),%sp
4c018: 6630 bnes 4c04a <rtems_libio_free+0x54> <== ALWAYS TAKEN
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4c01a: 41f9 0006 12d0 lea 612d0 <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4c020: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4c026: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c02a: 41f9 0006 12d4 lea 612d4 <rtems_libio_semaphore>,%a0 <== NOT EXECUTED 4c030: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4c034: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4c038: 23ca 0006 12d0 movel %a2,612d0 <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock();
}
4c03e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4c042: 4e5e unlk %fp <== NOT EXECUTED 4c044: 4ef9 0004 6840 jmp 46840 <rtems_semaphore_release> <== NOT EXECUTED
)
{
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
4c04a: 2f00 movel %d0,%sp@- 4c04c: 4eb9 0004 662c jsr 4662c <rtems_semaphore_delete> 4c052: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4c054: 41f9 0006 12d0 lea 612d0 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4c05a: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4c060: 2550 0034 movel %a0@,%a2@(52) 4c064: 41f9 0006 12d4 lea 612d4 <rtems_libio_semaphore>,%a0 4c06a: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4c06e: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4c072: 23ca 0006 12d0 movel %a2,612d0 <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
4c078: 246e fffc moveal %fp@(-4),%a2 4c07c: 4e5e unlk %fp 4c07e: 4ef9 0004 6840 jmp 46840 <rtems_semaphore_release>
00042ef8 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
42ef8: 4e56 0000 linkw %fp,#0
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
42efc: 2039 0005 fba4 movel 5fba4 <rtems_libio_number_iops>,%d0
42f02: 674a beqs 42f4e <rtems_libio_init+0x56> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42f04: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 42f08: 2f00 movel %d0,%sp@- 42f0a: 4eb9 0004 2918 jsr 42918 <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42f10: 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,
42f12: 2040 moveal %d0,%a0 42f14: 23c0 0006 12cc movel %d0,612cc <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42f1a: 6770 beqs 42f8c <rtems_libio_init+0x94> <== NEVER TAKEN
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++)
42f1c: 2279 0005 fba4 moveal 5fba4 <rtems_libio_number_iops>,%a1 42f22: 7201 moveq #1,%d1
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
42f24: 23c0 0006 12d0 movel %d0,612d0 <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
42f2a: b289 cmpl %a1,%d1
42f2c: 641c bccs 42f4a <rtems_libio_init+0x52> <== NEVER TAKEN
42f2e: 2040 moveal %d0,%a0 42f30: 41e8 0040 lea %a0@(64),%a0
iop->data1 = iop + 1;
42f34: 2148 fff4 movel %a0,%a0@(-12) 42f38: 41e8 0040 lea %a0@(64),%a0 42f3c: 5281 addql #1,%d1
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++)
42f3e: b3c1 cmpal %d1,%a1
42f40: 66f2 bnes 42f34 <rtems_libio_init+0x3c>
42f42: ed89 lsll #6,%d1 42f44: 2241 moveal %d1,%a1 42f46: 41f1 08c0 lea %a1@(ffffffc0,%d0:l),%a0
iop->data1 = iop + 1;
iop->data1 = NULL;
42f4a: 42a8 0034 clrl %a0@(52)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
42f4e: 4879 0006 12d4 pea 612d4 <rtems_libio_semaphore> 42f54: 42a7 clrl %sp@- 42f56: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 42f5a: 4878 0001 pea 1 <ADD> 42f5e: 2f3c 4c42 494f movel #1279412559,%sp@- 42f64: 4eb9 0004 6464 jsr 46464 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
42f6a: 4fef 0014 lea %sp@(20),%sp 42f6e: 4a80 tstl %d0
42f70: 6612 bnes 42f84 <rtems_libio_init+0x8c> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
42f72: 2279 0005 fba0 moveal 5fba0 <rtems_fs_init_helper>,%a1 42f78: 4a89 tstl %a1
42f7a: 6704 beqs 42f80 <rtems_libio_init+0x88> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
42f7c: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
42f7e: 4ed1 jmp %a1@
}
42f80: 4e5e unlk %fp <== NOT EXECUTED 42f82: 4e75 rts <== NOT EXECUTED
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
rtems_fatal_error_occurred( rc );
42f84: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42f86: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
if (rtems_libio_number_iops > 0)
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
42f8c: 4878 001a pea 1a <OPER2+0x6> <== NOT EXECUTED 42f90: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004befa <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
4befa: 4e56 0000 linkw %fp,#0 4befe: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4bf00: 42a7 clrl %sp@- 4bf02: 242e 0008 movel %fp@(8),%d2 4bf06: 42a7 clrl %sp@- 4bf08: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4bf0e: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bf14: 2079 0006 12cc moveal 612cc <rtems_libio_iops>,%a0 4bf1a: 4fef 000c lea %sp@(12),%sp 4bf1e: 2279 0005 fba4 moveal 5fba4 <rtems_libio_number_iops>,%a1 4bf24: 4a89 tstl %a1
4bf26: 6720 beqs 4bf48 <rtems_libio_is_file_open+0x4e> <== NEVER TAKEN
4bf28: 41e8 0014 lea %a0@(20),%a0 4bf2c: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bf2e: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bf30: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bf32: 0281 0000 0100 andil #256,%d1
4bf38: 6706 beqs 4bf40 <rtems_libio_is_file_open+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
4bf3a: b4a8 0004 cmpl %a0@(4),%d2
4bf3e: 6720 beqs 4bf60 <rtems_libio_is_file_open+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bf40: 41e8 0040 lea %a0@(64),%a0 4bf44: b3c0 cmpal %d0,%a1
4bf46: 62e6 bhis 4bf2e <rtems_libio_is_file_open+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bf48: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4bf4e: 4282 clrl %d2 4bf50: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bf56: 2002 movel %d2,%d0 4bf58: 242e fffc movel %fp@(-4),%d2 4bf5c: 4e5e unlk %fp 4bf5e: 4e75 rts 4bf60: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@-
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.node_access == node_access ) {
4bf66: 7401 moveq #1,%d2 4bf68: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bf6e: 2002 movel %d2,%d0 4bf70: 242e fffc movel %fp@(-4),%d2
4bf74: 4e5e unlk %fp <== NOT EXECUTED
0004bf78 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
4bf78: 4e56 0000 linkw %fp,#0 4bf7c: 2f02 movel %d2,%sp@-
rtems_status_code rtems_libio_set_private_env(void);
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ;
static inline void rtems_libio_lock( void )
{
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
4bf7e: 42a7 clrl %sp@- 4bf80: 242e 0008 movel %fp@(8),%d2 4bf84: 42a7 clrl %sp@- 4bf86: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4bf8c: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bf92: 2079 0006 12cc moveal 612cc <rtems_libio_iops>,%a0 4bf98: 4fef 000c lea %sp@(12),%sp 4bf9c: 2279 0005 fba4 moveal 5fba4 <rtems_libio_number_iops>,%a1 4bfa2: 4a89 tstl %a1
4bfa4: 6720 beqs 4bfc6 <rtems_libio_is_open_files_in_fs+0x4e><== NEVER TAKEN
4bfa6: 41e8 0014 lea %a0@(20),%a0 4bfaa: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bfac: 2210 movel %a0@,%d1
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bfae: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4bfb0: 0281 0000 0100 andil #256,%d1
4bfb6: 6706 beqs 4bfbe <rtems_libio_is_open_files_in_fs+0x46>
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
4bfb8: b4a8 0014 cmpl %a0@(20),%d2
4bfbc: 6720 beqs 4bfde <rtems_libio_is_open_files_in_fs+0x66>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4bfbe: 41e8 0040 lea %a0@(64),%a0 4bfc2: b3c0 cmpal %d0,%a1
4bfc4: 62e6 bhis 4bfac <rtems_libio_is_open_files_in_fs+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4bfc6: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@- 4bfcc: 4282 clrl %d2 4bfce: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bfd4: 2002 movel %d2,%d0 4bfd6: 242e fffc movel %fp@(-4),%d2 4bfda: 4e5e unlk %fp 4bfdc: 4e75 rts 4bfde: 2f39 0006 12d4 movel 612d4 <rtems_libio_semaphore>,%sp@-
/*
* Check if this node is under the file system that we
* are trying to dismount.
*/
if ( iop->pathinfo.mt_entry == fs_mt_entry ) {
4bfe4: 7401 moveq #1,%d2 4bfe6: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4bfec: 2002 movel %d2,%d0 4bfee: 242e fffc movel %fp@(-4),%d2
4bff2: 4e5e unlk %fp <== NOT EXECUTED
000445bc <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
445bc: 4e56 ffd4 linkw %fp,#-44 445c0: 48d7 3c04 moveml %d2/%a2-%a5,%sp@
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
445c4: 486e fffc pea %fp@(-4) 445c8: 42a7 clrl %sp@- 445ca: 42a7 clrl %sp@- 445cc: 4eb9 0004 7650 jsr 47650 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
445d2: 4fef 000c lea %sp@(12),%sp 445d6: 4a80 tstl %d0 445d8: 6600 00a8 bnew 44682 <rtems_libio_set_private_env+0xc6>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
445dc: 2479 0006 0738 moveal 60738 <rtems_current_user_env>,%a2 445e2: b5fc 0006 1d8c cmpal #400780,%a2 445e8: 6700 00a6 beqw 44690 <rtems_libio_set_private_env+0xd4>
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
445ec: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
* 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);
445f0: 47ee ffe8 lea %fp@(-24),%a3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
445f4: 4879 0006 1d8c pea 61d8c <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);
445fa: 4bf9 0004 3220 lea 43220 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
44600: 49ee fff8 lea %fp@(-8),%a4
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
44604: 4282 clrl %d2
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
44606: 2f0a movel %a2,%sp@- 44608: 4eb9 0005 18c0 jsr 518c0 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
4460e: 24ae fffc movel %fp@(-4),%a2@
* 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);
44612: 42a7 clrl %sp@- 44614: 2f0b movel %a3,%sp@- 44616: 42a7 clrl %sp@- 44618: 4878 0001 pea 1 <ADD> 4461c: 4879 0005 eef6 pea 5eef6 <IMFS_ops+0x48> 44622: 4e95 jsr %a5@
rtems_filesystem_root = loc;
44624: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
4462a: 4fef 0020 lea %sp@(32),%sp
* 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);
rtems_filesystem_root = loc;
4462e: 2153 0018 movel %a3@,%a0@(24) 44632: 216e ffec 001c movel %fp@(-20),%a0@(28) 44638: 216e fff0 0020 movel %fp@(-16),%a0@(32) 4463e: 216e fff4 0024 movel %fp@(-12),%a0@(36) 44644: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44648: 42a7 clrl %sp@- 4464a: 2f0b movel %a3,%sp@- 4464c: 42a7 clrl %sp@- 4464e: 4878 0001 pea 1 <ADD> 44652: 4879 0005 eef6 pea 5eef6 <IMFS_ops+0x48> 44658: 4e95 jsr %a5@
rtems_filesystem_current = loc;
4465a: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 44660: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
44662: 4fef 0014 lea %sp@(20),%sp
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
44666: 20d3 movel %a3@,%a0@+ 44668: 20ee ffec movel %fp@(-20),%a0@+ 4466c: 20ee fff0 movel %fp@(-16),%a0@+ 44670: 20ee fff4 movel %fp@(-12),%a0@+ 44674: 2094 movel %a4@,%a0@
return RTEMS_SUCCESSFUL;
}
44676: 2002 movel %d2,%d0 44678: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 4467e: 4e5e unlk %fp 44680: 4e75 rts
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
if (sc != RTEMS_SUCCESSFUL) return sc;
44682: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
44684: 2002 movel %d2,%d0 <== NOT EXECUTED 44686: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4468c: 4e5e unlk %fp <== NOT EXECUTED 4468e: 4e75 rts <== NOT EXECUTED
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));
44690: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 44694: 4eb9 0004 38ac jsr 438ac <malloc>
if (!tmp)
4469a: 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));
4469c: 2440 moveal %d0,%a2
if (!tmp)
4469e: 4a80 tstl %d0 446a0: 6700 00b2 beqw 44754 <rtems_libio_set_private_env+0x198>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
446a4: 487a fdfe pea %pc@(444a4 <free_user_env>) 446a8: 4879 0006 0738 pea 60738 <rtems_current_user_env> 446ae: 42a7 clrl %sp@- 446b0: 4eb9 0004 77e4 jsr 477e4 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
446b6: 4fef 000c lea %sp@(12),%sp
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
446ba: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
446bc: 6600 00a4 bnew 44762 <rtems_libio_set_private_env+0x1a6>
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
446c0: 23ca 0006 0738 movel %a2,60738 <rtems_current_user_env>
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446c6: 4878 0048 pea 48 <DBL_MANT_DIG+0x13>
* 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);
446ca: 47ee ffe8 lea %fp@(-24),%a3
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446ce: 4879 0006 1d8c pea 61d8c <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);
446d4: 4bf9 0004 3220 lea 43220 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
446da: 49ee fff8 lea %fp@(-8),%a4
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446de: 2f0a movel %a2,%sp@-
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
446e0: 4282 clrl %d2
return sc;
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
446e2: 4eb9 0005 18c0 jsr 518c0 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
446e8: 24ae fffc movel %fp@(-4),%a2@
* 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);
446ec: 42a7 clrl %sp@- 446ee: 2f0b movel %a3,%sp@- 446f0: 42a7 clrl %sp@- 446f2: 4878 0001 pea 1 <ADD> 446f6: 4879 0005 eef6 pea 5eef6 <IMFS_ops+0x48> 446fc: 4e95 jsr %a5@
rtems_filesystem_root = loc;
446fe: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44704: 4fef 0020 lea %sp@(32),%sp
* 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);
rtems_filesystem_root = loc;
44708: 2153 0018 movel %a3@,%a0@(24) 4470c: 216e ffec 001c movel %fp@(-20),%a0@(28) 44712: 216e fff0 0020 movel %fp@(-16),%a0@(32) 44718: 216e fff4 0024 movel %fp@(-12),%a0@(36) 4471e: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44722: 42a7 clrl %sp@- 44724: 2f0b movel %a3,%sp@- 44726: 42a7 clrl %sp@- 44728: 4878 0001 pea 1 <ADD> 4472c: 4879 0005 eef6 pea 5eef6 <IMFS_ops+0x48> 44732: 4e95 jsr %a5@
rtems_filesystem_current = loc;
44734: 2079 0006 0738 moveal 60738 <rtems_current_user_env>,%a0 4473a: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
4473c: 4fef 0014 lea %sp@(20),%sp
*/
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
44740: 20d3 movel %a3@,%a0@+ 44742: 20ee ffec movel %fp@(-20),%a0@+ 44746: 20ee fff0 movel %fp@(-16),%a0@+ 4474a: 20ee fff4 movel %fp@(-12),%a0@+ 4474e: 2094 movel %a4@,%a0@ 44750: 6000 ff24 braw 44676 <rtems_libio_set_private_env+0xba>
if (sc != RTEMS_SUCCESSFUL) return sc;
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
44754: 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;
}
44756: 2002 movel %d2,%d0 <== NOT EXECUTED 44758: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 4475e: 4e5e unlk %fp <== NOT EXECUTED 44760: 4e75 rts <== NOT EXECUTED
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,(void(*)(void *))free_user_env);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
44762: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44764: 4eb9 0004 32b0 jsr 432b0 <free> <== NOT EXECUTED
return sc;
4476a: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_root = loc;
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
rtems_filesystem_current = loc;
return RTEMS_SUCCESSFUL;
}
4476c: 2002 movel %d2,%d0 <== NOT EXECUTED 4476e: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44774: 4e5e unlk %fp <== NOT EXECUTED
000444fe <rtems_libio_share_private_env>:
* b) mutex access to rtems_filesystem_current, rtems_filesytem_root
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id) {
444fe: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 44502: 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);
44504: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 44508: 42a7 clrl %sp@- <== NOT EXECUTED 4450a: 42a7 clrl %sp@- <== NOT EXECUTED 4450c: 4eb9 0004 7650 jsr 47650 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
44512: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44516: 4a80 tstl %d0 <== NOT EXECUTED 44518: 6636 bnes 44550 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
4451a: 2479 0006 0738 moveal 60738 <rtems_current_user_env>,%a2 <== NOT EXECUTED 44520: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 44524: b092 cmpl %a2@,%d0 <== NOT EXECUTED 44526: 6730 beqs 44558 <rtems_libio_share_private_env+0x5a><== NOT EXECUTED
free_user_env(tmp);
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
44528: 486e fffc pea %fp@(-4) <== NOT EXECUTED 4452c: 4879 0006 0738 pea 60738 <rtems_current_user_env> <== NOT EXECUTED 44532: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44536: 4eb9 0004 791c jsr 4791c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
4453c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44540: 4a80 tstl %d0 <== NOT EXECUTED 44542: 674c beqs 44590 <rtems_libio_share_private_env+0x92><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
44544: 223c 0006 1d8c movel #400780,%d1 <== NOT EXECUTED 4454a: 23c1 0006 0738 movel %d1,60738 <rtems_current_user_env> <== NOT EXECUTED
return sc; }
44550: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 44554: 4e5e unlk %fp <== NOT EXECUTED 44556: 4e75 rts <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
if (rtems_current_user_env->task_id==current_task_id) {
/* kill the current user env & task_var*/
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
44558: 4879 0006 0738 pea 60738 <rtems_current_user_env> <== NOT EXECUTED 4455e: 42a7 clrl %sp@- <== NOT EXECUTED 44560: 4eb9 0004 7888 jsr 47888 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
44566: 508f addql #8,%sp <== NOT EXECUTED 44568: 4a80 tstl %d0 <== NOT EXECUTED 4456a: 66e4 bnes 44550 <rtems_libio_share_private_env+0x52><== NOT EXECUTED
free_user_env(tmp);
4456c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4456e: 4eba ff34 jsr %pc@(444a4 <free_user_env>) <== NOT EXECUTED 44572: 588f addql #4,%sp <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
44574: 486e fffc pea %fp@(-4) <== NOT EXECUTED 44578: 4879 0006 0738 pea 60738 <rtems_current_user_env> <== NOT EXECUTED 4457e: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44582: 4eb9 0004 791c jsr 4791c <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
44588: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4458c: 4a80 tstl %d0 <== NOT EXECUTED 4458e: 66b4 bnes 44544 <rtems_libio_share_private_env+0x46><== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
44590: 487a ff12 pea %pc@(444a4 <free_user_env>) <== NOT EXECUTED 44594: 4879 0006 0738 pea 60738 <rtems_current_user_env> <== NOT EXECUTED 4459a: 42a7 clrl %sp@- <== NOT EXECUTED 4459c: 4eb9 0004 77e4 jsr 477e4 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
445a2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 445a6: 4a80 tstl %d0 <== NOT EXECUTED 445a8: 669a bnes 44544 <rtems_libio_share_private_env+0x46><== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
445aa: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
445ae: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 445b2: 4e5e unlk %fp <== NOT EXECUTED
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
445b4: 23d0 0006 0738 movel %a0@,60738 <rtems_current_user_env> <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
0004beac <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4beac: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4beae: 4e56 0000 linkw %fp,#0 4beb2: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4beb6: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4beb8: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4beba: 7406 moveq #6,%d2 4bebc: b480 cmpl %d0,%d2
4bebe: 6736 beqs 4bef6 <rtems_libio_to_fcntl_flags+0x4a><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4bec0: 0801 0001 btst #1,%d1
4bec4: 6726 beqs 4beec <rtems_libio_to_fcntl_flags+0x40><== NEVER TAKEN
4bec6: 4280 clrl %d0
fcntl_flags |= O_RDONLY;
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
4bec8: 0801 0000 btst #0,%d1
4becc: 6704 beqs 4bed2 <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4bece: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4bed2: 0801 0009 btst #9,%d1
4bed6: 6704 beqs 4bedc <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4bed8: 7408 moveq #8,%d2 4beda: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4bedc: 0801 000a btst #10,%d1
4bee0: 6704 beqs 4bee6 <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4bee2: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4bee6: 241f movel %sp@+,%d2 4bee8: 4e5e unlk %fp 4beea: 4e75 rts
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4beec: 2001 movel %d1,%d0 <== NOT EXECUTED 4beee: e488 lsrl #2,%d0 <== NOT EXECUTED 4bef0: 7401 moveq #1,%d2 <== NOT EXECUTED 4bef2: c082 andl %d2,%d0 <== NOT EXECUTED 4bef4: 60d2 bras 4bec8 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4bef6: 7002 moveq #2,%d0 <== NOT EXECUTED 4bef8: 60ce bras 4bec8 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
00050520 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
50520: 4e56 0000 linkw %fp,#0 50524: 2f0a movel %a2,%sp@- 50526: 246e 0008 moveal %fp@(8),%a2 5052a: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
5052c: 4a8a tstl %a2
5052e: 675e beqs 5058e <rtems_memalign+0x6e>
return EINVAL;
*pointer = NULL;
50530: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
50532: 7003 moveq #3,%d0 50534: b0b9 0006 55dc cmpl 655dc <_System_state_Current>,%d0
5053a: 6748 beqs 50584 <rtems_memalign+0x64> <== ALWAYS TAKEN
/*
*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
5053c: 4eb9 0004 418a jsr 4418a <malloc_deferred_frees_process>
uintptr_t size,
uintptr_t alignment
)
{
return
_Protected_heap_Allocate_aligned_with_boundary( heap, size, alignment, 0 );
50542: 42a7 clrl %sp@- 50544: 2f2e 000c movel %fp@(12),%sp@- 50548: 2f2e 0010 movel %fp@(16),%sp@- 5054c: 2f39 0006 3b20 movel 63b20 <RTEMS_Malloc_Heap>,%sp@- 50552: 4eb9 0004 98a0 jsr 498a0 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
50558: 4fef 0010 lea %sp@(16),%sp 5055c: 2400 movel %d0,%d2
5055e: 673c beqs 5059c <rtems_memalign+0x7c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
50560: 2079 0006 41e6 moveal 641e6 <rtems_malloc_statistics_helpers>,%a0 50566: 4a88 tstl %a0
50568: 670a beqs 50574 <rtems_memalign+0x54> <== ALWAYS TAKEN
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
5056a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5056c: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 50570: 4e90 jsr %a0@ <== NOT EXECUTED 50572: 588f addql #4,%sp <== NOT EXECUTED
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
50574: 2482 movel %d2,%a2@
return 0; }
50576: 242e fff8 movel %fp@(-8),%d2
*/
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
5057a: 4280 clrl %d0
return 0; }
5057c: 246e fffc moveal %fp@(-4),%a2 50580: 4e5e unlk %fp 50582: 4e75 rts
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
50584: 4eb9 0004 4130 jsr 44130 <malloc_is_system_state_OK> 5058a: 4a00 tstb %d0
5058c: 66ae bnes 5053c <rtems_memalign+0x1c> <== ALWAYS TAKEN
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
}
5058e: 242e fff8 movel %fp@(-8),%d2
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
50592: 7016 moveq #22,%d0
}
50594: 246e fffc moveal %fp@(-4),%a2 50598: 4e5e unlk %fp 5059a: 4e75 rts 5059c: 242e fff8 movel %fp@(-8),%d2
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
505a0: 700c moveq #12,%d0
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
*pointer = return_this;
return 0;
}
505a2: 246e fffc moveal %fp@(-4),%a2 505a6: 4e5e unlk %fp
...
00048148 <rtems_object_get_class_information>:
rtems_status_code rtems_object_get_class_information(
int the_api,
int the_class,
rtems_object_api_class_information *info
)
{
48148: 4e56 0000 linkw %fp,#0 4814c: 2f0a movel %a2,%sp@- 4814e: 246e 0010 moveal %fp@(16),%a2 48152: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
48154: 4a8a tstl %a2
48156: 6766 beqs 481be <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48158: 2f2e 000c movel %fp@(12),%sp@- 4815c: 2f2e 0008 movel %fp@(8),%sp@- 48160: 4eb9 0004 9e54 jsr 49e54 <_Objects_Get_information>
if ( !obj_info )
48166: 508f addql #8,%sp
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
48168: 2040 moveal %d0,%a0
if ( !obj_info )
4816a: 4a80 tstl %d0
4816c: 675e beqs 481cc <rtems_object_get_class_information+0x84>
return RTEMS_INVALID_NUMBER;
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
4816e: 24a8 0006 movel %a0@(6),%a2@
info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
48172: 4282 clrl %d2
/*
* Return information about this object class to the user.
*/
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
48174: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
4817a: 3428 000e movew %a0@(14),%d2
/* * Return information about this object class to the user. */ info->minimum_id = obj_info->minimum_id; info->maximum_id = obj_info->maximum_id; info->auto_extend = obj_info->auto_extend;
4817e: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
48184: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
48188: 6750 beqs 481da <rtems_object_get_class_information+0x92><== NEVER TAKEN
4818a: 2068 0018 moveal %a0@(24),%a0 4818e: 7201 moveq #1,%d1 48190: 7001 moveq #1,%d0 48192: 93c9 subal %a1,%a1 48194: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
48196: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
4819a: 6718 beqs 481b4 <rtems_object_get_class_information+0x6c>
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
4819c: 2200 movel %d0,%d1 4819e: b082 cmpl %d2,%d0
481a0: 63f2 blss 48194 <rtems_object_get_class_information+0x4c><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
481a2: 2549 000e movel %a1,%a2@(14) 481a6: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
481a8: 242e fff8 movel %fp@(-8),%d2 481ac: 246e fffc moveal %fp@(-4),%a2 481b0: 4e5e unlk %fp 481b2: 4e75 rts
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
481b4: 5289 addql #1,%a1
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
481b6: 2200 movel %d0,%d1 481b8: b082 cmpl %d2,%d0
481ba: 63d8 blss 48194 <rtems_object_get_class_information+0x4c><== NEVER TAKEN
481bc: 60e4 bras 481a2 <rtems_object_get_class_information+0x5a>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481be: 242e fff8 movel %fp@(-8),%d2
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
481c2: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481c4: 246e fffc moveal %fp@(-4),%a2 481c8: 4e5e unlk %fp 481ca: 4e75 rts 481cc: 242e fff8 movel %fp@(-8),%d2
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
481d0: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
481d2: 246e fffc moveal %fp@(-4),%a2 481d6: 4e5e unlk %fp 481d8: 4e75 rts
info->minimum_id = obj_info->minimum_id;
info->maximum_id = obj_info->maximum_id;
info->auto_extend = obj_info->auto_extend;
info->maximum = obj_info->maximum;
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
481da: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
481dc: 4280 clrl %d0 <== NOT EXECUTED 481de: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 481e2: 60c4 bras 481a8 <rtems_object_get_class_information+0x60><== NOT EXECUTED
00042b72 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
42b72: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
42b76: 486e 000c pea %fp@(12) <== NOT EXECUTED 42b7a: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 42b7e: 2f3c 2000 0000 movel #536870912,%sp@- <== NOT EXECUTED 42b84: 4eba fdf6 jsr %pc@(4297c <rtems_verror>) <== NOT EXECUTED 42b88: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
va_end(arglist);
}
42b8c: 4e5e unlk %fp <== NOT EXECUTED
00057304 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57304: 4e56 ffe8 linkw %fp,#-24 57308: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 5730c: 242e 0008 movel %fp@(8),%d2 57310: 2a2e 000c movel %fp@(12),%d5 57314: 282e 0010 movel %fp@(16),%d4 57318: 262e 0014 movel %fp@(20),%d3 5731c: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
57320: 4a82 tstl %d2
57322: 673a beqs 5735e <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57324: 4a85 tstl %d5
57326: 671e beqs 57346 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57328: 4a8a tstl %a2
5732a: 671a beqs 57346 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
5732c: 4a84 tstl %d4
5732e: 6722 beqs 57352 <rtems_partition_create+0x4e>
57330: 4a83 tstl %d3
57332: 671e beqs 57352 <rtems_partition_create+0x4e>
57334: b684 cmpl %d4,%d3
57336: 621a bhis 57352 <rtems_partition_create+0x4e>
57338: 7003 moveq #3,%d0 5733a: c083 andl %d3,%d0
5733c: 6614 bnes 57352 <rtems_partition_create+0x4e>
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
5733e: 103c 0003 moveb #3,%d0 57342: c085 andl %d5,%d0
57344: 6724 beqs 5736a <rtems_partition_create+0x66>
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57346: 7009 moveq #9,%d0
}
57348: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5734e: 4e5e unlk %fp 57350: 4e75 rts
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
57352: 7008 moveq #8,%d0
}
57354: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 5735a: 4e5e unlk %fp 5735c: 4e75 rts
rtems_id *id
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
5735e: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
57360: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 57366: 4e5e unlk %fp 57368: 4e75 rts 5736a: 2039 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d0 57370: 5280 addql #1,%d0 57372: 23c0 0008 0cc0 movel %d0,80cc0 <_Thread_Dispatch_disable_level>
* This function allocates a partition control block from
* the inactive chain of free partition control blocks.
*/
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Allocate ( void )
{
return (Partition_Control *) _Objects_Allocate( &_Partition_Information );
57378: 4879 0008 0b4a pea 80b4a <_Partition_Information> 5737e: 4eb9 0005 becc jsr 5becc <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
57384: 588f addql #4,%sp 57386: 2640 moveal %d0,%a3 57388: 4a80 tstl %d0
5738a: 675a beqs 573e6 <rtems_partition_create+0xe2>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
5738c: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57390: 2004 movel %d4,%d0
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
the_partition->buffer_size = buffer_size;
the_partition->attribute_set = attribute_set;
57392: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
57398: 4c43 0000 remul %d3,%d0,%d0
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
5739c: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size;
573a0: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
573a4: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
573a8: 2f03 movel %d3,%sp@- 573aa: 2f00 movel %d0,%sp@- 573ac: 2f05 movel %d5,%sp@- 573ae: 486b 0024 pea %a3@(36) 573b2: 4eb9 0005 a944 jsr 5a944 <_Chain_Initialize> 573b8: 202b 0008 movel %a3@(8),%d0 573bc: 4281 clrl %d1 573be: 2079 0008 0b62 moveal 80b62 <_Partition_Information+0x18>,%a0 573c4: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
573c6: 2742 000c movel %d2,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
573ca: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
573ce: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573d0: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
573d6: 4fef 0010 lea %sp@(16),%sp
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
573da: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
573dc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 573e2: 4e5e unlk %fp 573e4: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
573e6: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 573ec: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
573ee: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
573f4: 4e5e unlk %fp <== NOT EXECUTED
00057518 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
57518: 4e56 fffc linkw %fp,#-4 5751c: 2f0a movel %a2,%sp@- 5751e: 2f02 movel %d2,%sp@-
RTEMS_INLINE_ROUTINE Partition_Control *_Partition_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
57520: 486e fffc pea %fp@(-4) 57524: 2f2e 0008 movel %fp@(8),%sp@- 57528: 4879 0008 0b4a pea 80b4a <_Partition_Information> 5752e: 242e 000c movel %fp@(12),%d2 57532: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57538: 4fef 000c lea %sp@(12),%sp 5753c: 2440 moveal %d0,%a2 5753e: 4aae fffc tstl %fp@(-4)
57542: 670e beqs 57552 <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57544: 242e fff4 movel %fp@(-12),%d2
{
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
57548: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5754a: 246e fff8 moveal %fp@(-8),%a2 5754e: 4e5e unlk %fp 57550: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
57552: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
57556: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
5755a: b082 cmpl %d2,%d0
5755c: 623c bhis 5759a <rtems_partition_return_buffer+0x82>
5755e: d280 addl %d0,%d1 57560: b282 cmpl %d2,%d1
57562: 6536 bcss 5759a <rtems_partition_return_buffer+0x82><== NEVER TAKEN
return (
57564: 2202 movel %d2,%d1 57566: 9280 subl %d0,%d1 57568: 2001 movel %d1,%d0 5756a: 4c6a 0001 0018 remul %a2@(24),%d1,%d0 57570: 4a81 tstl %d1
57572: 6626 bnes 5759a <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void _Partition_Free_buffer (
Partition_Control *the_partition,
Chain_Node *the_buffer
)
{
_Chain_Append( &the_partition->Memory, the_buffer );
57574: 2f02 movel %d2,%sp@- 57576: 486a 0024 pea %a2@(36) 5757a: 4eb9 0005 a8a8 jsr 5a8a8 <_Chain_Append>
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
57580: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
57584: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5758a: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
5758e: 508f addql #8,%sp
case OBJECTS_LOCAL:
if ( _Partition_Is_buffer_valid( buffer, the_partition ) ) {
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
57590: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
57592: 246e fff8 moveal %fp@(-8),%a2 57596: 4e5e unlk %fp 57598: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
5759a: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a0: 242e fff4 movel %fp@(-12),%d2
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
575a4: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
575a6: 246e fff8 moveal %fp@(-8),%a2 575aa: 4e5e unlk %fp
...
00049f92 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
49f92: 4e56 0000 linkw %fp,#0
if (!rtems_pipe_configured)
49f96: 4a39 0006 0254 tstb 60254 <rtems_pipe_configured>
49f9c: 6708 beqs 49fa6 <rtems_pipe_initialize+0x14> <== ALWAYS TAKEN
return;
if (rtems_pipe_semaphore)
49f9e: 4ab9 0006 0bd4 tstl 60bd4 <rtems_pipe_semaphore> <== NOT EXECUTED 49fa4: 6704 beqs 49faa <rtems_pipe_initialize+0x18> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
}
49fa6: 4e5e unlk %fp 49fa8: 4e75 rts
if (rtems_pipe_semaphore)
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
49faa: 4879 0006 0bd4 pea 60bd4 <rtems_pipe_semaphore> <== NOT EXECUTED 49fb0: 42a7 clrl %sp@- <== NOT EXECUTED 49fb2: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> <== NOT EXECUTED 49fb6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 49fba: 2f3c 5049 5045 movel #1346981957,%sp@- <== NOT EXECUTED 49fc0: 4eb9 0004 6464 jsr 46464 <rtems_semaphore_create> <== NOT EXECUTED
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
49fc6: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 49fca: 4a80 tstl %d0 <== NOT EXECUTED 49fcc: 6610 bnes 49fde <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
49fce: 4eb9 0004 5fd4 jsr 45fd4 <rtems_clock_get_ticks_since_boot><== NOT EXECUTED
rtems_pipe_no = now; }
49fd4: 4e5e unlk %fp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
rtems_pipe_no = now;
49fd6: 33c0 0006 0bdc movew %d0,60bdc <rtems_pipe_no> <== NOT EXECUTED
}
49fdc: 4e75 rts <== NOT EXECUTED
sc = rtems_semaphore_create(
rtems_build_name ('P', 'I', 'P', 'E'), 1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY, &rtems_pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
49fde: 2f00 movel %d0,%sp@- <== NOT EXECUTED 49fe0: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
00047798 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
47798: 4e56 ffec linkw %fp,#-20 4779c: 48d7 040c moveml %d2-%d3/%a2,%sp@
RTEMS_INLINE_ROUTINE Rate_monotonic_Control *_Rate_monotonic_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
477a0: 486e fffc pea %fp@(-4) 477a4: 242e 0008 movel %fp@(8),%d2 477a8: 2f02 movel %d2,%sp@- 477aa: 4879 0006 3474 pea 63474 <_Rate_monotonic_Information> 477b0: 4eb9 0004 9b4c jsr 49b4c <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
477b6: 4fef 000c lea %sp@(12),%sp 477ba: 2440 moveal %d0,%a2 477bc: 4aae fffc tstl %fp@(-4)
477c0: 661e bnes 477e0 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
477c2: 2039 0006 3632 movel 63632 <_Thread_Executing>,%d0 477c8: b0aa 0040 cmpl %a2@(64),%d0
477cc: 671e beqs 477ec <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
477ce: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 477d4: 7017 moveq #23,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477d6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477dc: 4e5e unlk %fp 477de: 4e75 rts
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
477e0: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477e2: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477e8: 4e5e unlk %fp 477ea: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
477ec: 4aae 000c tstl %fp@(12) 477f0: 6700 00ce beqw 478c0 <rtems_rate_monotonic_period+0x128>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
477f4: 203c 0000 0700 movel #1792,%d0 477fa: 40c3 movew %sr,%d3 477fc: 8083 orl %d3,%d0 477fe: 46c0 movew %d0,%sr
switch ( the_period->state ) {
47800: 202a 0038 movel %a2@(56),%d0 47804: 7202 moveq #2,%d1 47806: b280 cmpl %d0,%d1 47808: 6700 00dc beqw 478e6 <rtems_rate_monotonic_period+0x14e> 4780c: 123c 0004 moveb #4,%d1 47810: b280 cmpl %d0,%d1
47812: 6762 beqs 47876 <rtems_rate_monotonic_period+0xde>
47814: 4a80 tstl %d0
47816: 66c8 bnes 477e0 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
47818: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
4781a: 2f0a movel %a2,%sp@- 4781c: 2d40 fff8 movel %d0,%fp@(-8) 47820: 4eb9 0004 7550 jsr 47550 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47826: 223c 0004 7bfc movel #293884,%d1
the_watchdog->id = id;
4782c: 2542 0030 movel %d2,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47830: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
47834: 2541 002c movel %d1,%a2@(44)
the_period->state = RATE_MONOTONIC_ACTIVE;
47838: 7202 moveq #2,%d1
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4783a: 2542 001c movel %d2,%a2@(28) 4783e: 2541 0038 movel %d1,%a2@(56)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47842: 42aa 0018 clrl %a2@(24)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
47846: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4784a: 2542 003c movel %d2,%a2@(60)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4784e: 486a 0010 pea %a2@(16) 47852: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 47858: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
4785e: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47864: 202e fff8 movel %fp@(-8),%d0 47868: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4786c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47872: 4e5e unlk %fp 47874: 4e75 rts
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
47876: 2f0a movel %a2,%sp@- 47878: 4eb9 0004 767e jsr 4767e <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
4787e: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
47880: 7202 moveq #2,%d1
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
47882: 7006 moveq #6,%d0
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47884: 242e 000c movel %fp@(12),%d2
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
47888: 2541 0038 movel %d1,%a2@(56) 4788c: 2542 001c movel %d2,%a2@(28)
the_period->next_length = length;
47890: 2542 003c movel %d2,%a2@(60)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47894: 486a 0010 pea %a2@(16) 47898: 4879 0006 3650 pea 63650 <_Watchdog_Ticks_chain> 4789e: 2d40 fff8 movel %d0,%fp@(-8) 478a2: 4eb9 0004 b71c jsr 4b71c <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
478a8: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
478ae: 202e fff8 movel %fp@(-8),%d0 478b2: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478b6: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478bc: 4e5e unlk %fp 478be: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478c0: 202a 0038 movel %a2@(56),%d0 478c4: 7204 moveq #4,%d1 478c6: b280 cmpl %d0,%d1 478c8: 6400 009c bccw 47966 <rtems_rate_monotonic_period+0x1ce>
478cc: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
478ce: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478d2: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
478d8: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478dc: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 478e2: 4e5e unlk %fp 478e4: 4e75 rts
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
478e6: 2f0a movel %a2,%sp@- 478e8: 4eb9 0004 767e jsr 4767e <_Rate_monotonic_Update_statistics>
* This tells the _Rate_monotonic_Timeout that this task is
* in the process of blocking on the period and that we
* may be changing the length of the next period.
*/
the_period->state = RATE_MONOTONIC_OWNER_IS_BLOCKING;
the_period->next_length = length;
478ee: 242e 000c movel %fp@(12),%d2
/*
* 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;
478f2: 7001 moveq #1,%d0
the_period->next_length = length;
478f4: 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;
478f8: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
478fc: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
478fe: 2079 0006 3632 moveal 63632 <_Thread_Executing>,%a0 47904: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4790a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4790e: 2f08 movel %a0,%sp@- 47910: 4eb9 0004 ade8 jsr 4ade8 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
47916: 203c 0000 0700 movel #1792,%d0 4791c: 40c1 movew %sr,%d1 4791e: 8081 orl %d1,%d0 47920: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
47922: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
47924: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
47928: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
4792c: 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 )
4792e: 7203 moveq #3,%d1 47930: 4fef 000c lea %sp@(12),%sp 47934: b280 cmpl %d0,%d1
47936: 6712 beqs 4794a <rtems_rate_monotonic_period+0x1b2>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
47938: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 4793e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47940: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47946: 4e5e unlk %fp 47948: 4e75 rts
/*
* If it did, then we want to unblock ourself and continue as
* if nothing happen. The period was reset in the timeout routine.
*/
if ( local_state == RATE_MONOTONIC_EXPIRED_WHILE_BLOCKING )
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4794a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4794e: 2f39 0006 3632 movel 63632 <_Thread_Executing>,%sp@- 47954: 4eb9 0004 a080 jsr 4a080 <_Thread_Clear_state> 4795a: 508f addql #8,%sp
_Thread_Enable_dispatch();
4795c: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch> 47962: 4280 clrl %d0 47964: 60da bras 47940 <rtems_rate_monotonic_period+0x1a8>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47966: 41f9 0006 0872 lea 60872 <CSWTCH.43>,%a0 4796c: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
47970: 2d40 fff8 movel %d0,%fp@(-8) 47974: 4eb9 0004 a454 jsr 4a454 <_Thread_Enable_dispatch>
return( return_value );
4797a: 202e fff8 movel %fp@(-8),%d0 4797e: 6000 ff5c braw 478dc <rtems_rate_monotonic_period+0x144>
...
00047984 <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
47984: 4e56 ff78 linkw %fp,#-136 47988: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4798c: 262e 0008 movel %fp@(8),%d3 47990: 246e 000c moveal %fp@(12),%a2
rtems_id id;
rtems_rate_monotonic_period_statistics the_stats;
rtems_rate_monotonic_period_status the_status;
char name[5];
if ( !print )
47994: 4a8a tstl %a2 47996: 6700 0082 beqw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
4799a: 4879 0006 0886 pea 60886 <CSWTCH.43+0x14> 479a0: 2f03 movel %d3,%sp@- 479a2: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
479a4: 4879 0006 08a4 pea 608a4 <CSWTCH.43+0x32> 479aa: 2f03 movel %d3,%sp@- 479ac: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
479ae: 4879 0006 08c6 pea 608c6 <CSWTCH.43+0x54> 479b4: 2f03 movel %d3,%sp@- 479b6: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
479b8: 4879 0006 08e9 pea 608e9 <CSWTCH.43+0x77> 479be: 2f03 movel %d3,%sp@- 479c0: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
479c2: 4fef 001c lea %sp@(28),%sp 479c6: 2ebc 0006 0934 movel #395572,%sp@ 479cc: 2f03 movel %d3,%sp@- 479ce: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
479d0: 2439 0006 347a movel 6347a <_Rate_monotonic_Information+0x6>,%d2 479d6: 508f addql #8,%sp 479d8: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
479de: 623a bhis 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
479e0: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479e2: 2a0e movel %fp,%d5 479e4: 0684 ffff ffa2 addil #-94,%d4 479ea: 47f9 0004 ebec lea 4ebec <rtems_rate_monotonic_get_statistics>,%a3
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
479f0: 4bf9 0004 ecac lea 4ecac <rtems_rate_monotonic_get_status>,%a5
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
479f6: 5b85 subql #5,%d5 479f8: 49f9 0004 7cdc lea 47cdc <rtems_object_get_name>,%a4
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
479fe: 2e3c 0004 b324 movel #308004,%d7
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
47a04: 2f04 movel %d4,%sp@- 47a06: 2f02 movel %d2,%sp@- 47a08: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47a0a: 508f addql #8,%sp 47a0c: 4a80 tstl %d0
47a0e: 6714 beqs 47a24 <rtems_rate_monotonic_report_statistics_with_plugin+0xa0>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47a10: 5282 addql #1,%d2
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47a12: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47a18: 63ea blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47a1a: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47a20: 4e5e unlk %fp 47a22: 4e75 rts
status = rtems_rate_monotonic_get_statistics( id, &the_stats );
if ( status != RTEMS_SUCCESSFUL )
continue;
/* If the above passed, so should this but check it anyway */
status = rtems_rate_monotonic_get_status( id, &the_status );
47a24: 486e ffda pea %fp@(-38) 47a28: 2f02 movel %d2,%sp@- 47a2a: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47a2c: 2f05 movel %d5,%sp@- 47a2e: 4878 0005 pea 5 <COMPARE> 47a32: 2f2e ffda movel %fp@(-38),%sp@- 47a36: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47a38: 2f2e ffa6 movel %fp@(-90),%sp@- 47a3c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a40: 2f05 movel %d5,%sp@- 47a42: 2f02 movel %d2,%sp@- 47a44: 4879 0006 0980 pea 60980 <CSWTCH.43+0x10e> 47a4a: 2f03 movel %d3,%sp@- 47a4c: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47a4e: 202e ffa2 movel %fp@(-94),%d0 47a52: 4fef 002c lea %sp@(44),%sp
47a56: 6618 bnes 47a70 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
47a58: 4879 0006 081e pea 6081e <rtems_status_assoc+0x19e>
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47a5e: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
47a60: 2f03 movel %d3,%sp@- 47a62: 4e92 jsr %a2@
continue;
47a64: 508f addql #8,%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47a66: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47a6c: 6396 blss 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
47a6e: 60aa bras 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47a70: 486e fff2 pea %fp@(-14) 47a74: 2047 moveal %d7,%a0
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47a76: 5282 addql #1,%d2
struct timespec cpu_average;
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
47a78: 2f00 movel %d0,%sp@- 47a7a: 486e ffba pea %fp@(-70) 47a7e: 4e90 jsr %a0@
(*print)( context,
47a80: 202e fff6 movel %fp@(-10),%d0 47a84: 223c 0000 03e8 movel #1000,%d1 47a8a: 4c41 0800 remsl %d1,%d0,%d0 47a8e: 2c2e ffb6 movel %fp@(-74),%d6 47a92: 2f00 movel %d0,%sp@- 47a94: 2001 movel %d1,%d0 47a96: 2f2e fff2 movel %fp@(-14),%sp@- 47a9a: 4c40 6806 remsl %d0,%d6,%d6 47a9e: 202e ffae movel %fp@(-82),%d0 47aa2: 2246 moveal %d6,%a1 47aa4: 223c 0000 03e8 movel #1000,%d1 47aaa: 2f09 movel %a1,%sp@- 47aac: 2f2e ffb2 movel %fp@(-78),%sp@- 47ab0: 4c41 0800 remsl %d1,%d0,%d0
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
(*print)( context,
47ab4: 2c3c 0000 03e8 movel #1000,%d6
struct timespec *min_cpu = &the_stats.min_cpu_time;
struct timespec *max_cpu = &the_stats.max_cpu_time;
struct timespec *total_cpu = &the_stats.total_cpu_time;
_Timespec_Divide_by_integer( total_cpu, the_stats.count, &cpu_average );
(*print)( context,
47aba: 2f00 movel %d0,%sp@- 47abc: 2f2e ffaa movel %fp@(-86),%sp@- 47ac0: 4879 0006 0997 pea 60997 <CSWTCH.43+0x125> 47ac6: 2f03 movel %d3,%sp@- 47ac8: 4e92 jsr %a2@
struct timespec wall_average;
struct timespec *min_wall = &the_stats.min_wall_time;
struct timespec *max_wall = &the_stats.max_wall_time;
struct timespec *total_wall = &the_stats.total_wall_time;
_Timespec_Divide_by_integer(total_wall, the_stats.count, &wall_average);
47aca: 4fef 002c lea %sp@(44),%sp 47ace: 2047 moveal %d7,%a0 47ad0: 486e fff2 pea %fp@(-14) 47ad4: 2f2e ffa2 movel %fp@(-94),%sp@- 47ad8: 486e ffd2 pea %fp@(-46) 47adc: 4e90 jsr %a0@
(*print)( context,
47ade: 202e fff6 movel %fp@(-10),%d0 47ae2: 4c46 0800 remsl %d6,%d0,%d0 47ae6: 222e ffce movel %fp@(-50),%d1 47aea: 2f00 movel %d0,%sp@- 47aec: 2f2e fff2 movel %fp@(-14),%sp@- 47af0: 4c46 1801 remsl %d6,%d1,%d1 47af4: 202e ffc6 movel %fp@(-58),%d0 47af8: 2241 moveal %d1,%a1 47afa: 2f09 movel %a1,%sp@- 47afc: 2f2e ffca movel %fp@(-54),%sp@- 47b00: 4c46 0800 remsl %d6,%d0,%d0 47b04: 2f00 movel %d0,%sp@- 47b06: 2f2e ffc2 movel %fp@(-62),%sp@- 47b0a: 4879 0006 09b6 pea 609b6 <CSWTCH.43+0x144> 47b10: 2f03 movel %d3,%sp@- 47b12: 4e92 jsr %a2@ 47b14: 4fef 002c lea %sp@(44),%sp
/*
* Cycle through all possible ids and try to report on each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47b18: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2 47b1e: 6300 fee4 blsw 47a04 <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47b22: 6000 fef6 braw 47a1a <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047b40 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47b40: 4e56 0000 linkw %fp,#0 47b44: 2039 0006 3578 movel 63578 <_Thread_Dispatch_disable_level>,%d0 47b4a: 5280 addql #1,%d0 47b4c: 2f0a movel %a2,%sp@- 47b4e: 23c0 0006 3578 movel %d0,63578 <_Thread_Dispatch_disable_level> 47b54: 2f02 movel %d2,%sp@-
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47b56: 2439 0006 347a movel 6347a <_Rate_monotonic_Information+0x6>,%d2 47b5c: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47b62: 6216 bhis 47b7a <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47b64: 45f9 0004 7b8c lea 47b8c <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
47b6a: 2f02 movel %d2,%sp@-
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
47b6c: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
47b6e: 4e92 jsr %a2@
/*
* Cycle through all possible ids and try to reset each one. If it
* is a period that is inactive, we just get an error back. No big deal.
*/
for ( id=_Rate_monotonic_Information.minimum_id ;
47b70: 588f addql #4,%sp 47b72: b4b9 0006 347e cmpl 6347e <_Rate_monotonic_Information+0xa>,%d2
47b78: 63f0 blss 47b6a <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47b7a: 242e fff8 movel %fp@(-8),%d2 47b7e: 246e fffc moveal %fp@(-4),%a2 47b82: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47b84: 4ef9 0004 a454 jmp 4a454 <_Thread_Enable_dispatch>
...
00057e40 <rtems_region_create>:
uintptr_t length,
uintptr_t page_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
57e40: 4e56 ffec linkw %fp,#-20 57e44: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 57e48: 262e 0008 movel %fp@(8),%d3 57e4c: 242e 000c movel %fp@(12),%d2 57e50: 246e 001c moveal %fp@(28),%a2
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57e54: 4a83 tstl %d3 57e56: 6700 0096 beqw 57eee <rtems_region_create+0xae>
return RTEMS_INVALID_NAME;
if ( !starting_address )
57e5a: 4a82 tstl %d2
57e5c: 670a beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !id )
57e5e: 4a8a tstl %a2
57e60: 6706 beqs 57e68 <rtems_region_create+0x28>
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
57e62: 7003 moveq #3,%d0 57e64: c082 andl %d2,%d0
57e66: 670c beqs 57e74 <rtems_region_create+0x34>
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
return return_status;
57e68: 7009 moveq #9,%d0
}
57e6a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57e70: 4e5e unlk %fp 57e72: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_Addresses_Is_aligned( starting_address ) )
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
57e74: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57e7a: 4eb9 0005 a814 jsr 5a814 <_API_Mutex_Lock>
* This function allocates a region control block from
* the inactive chain of free region control blocks.
*/
RTEMS_INLINE_ROUTINE Region_Control *_Region_Allocate( void )
{
return (Region_Control *) _Objects_Allocate( &_Region_Information );
57e80: 4879 0008 0bbe pea 80bbe <_Region_Information> 57e86: 4eb9 0005 becc jsr 5becc <_Objects_Allocate>
the_region = _Region_Allocate();
if ( !the_region )
57e8c: 508f addql #8,%sp 57e8e: 2640 moveal %d0,%a3 57e90: 4a80 tstl %d0
57e92: 6766 beqs 57efa <rtems_region_create+0xba>
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57e94: 2f2e 0014 movel %fp@(20),%sp@- 57e98: 2f2e 0010 movel %fp@(16),%sp@- 57e9c: 2f02 movel %d2,%sp@- 57e9e: 486b 0068 pea %a3@(104) 57ea2: 4eb9 0005 b950 jsr 5b950 <_Heap_Initialize>
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57ea8: 4fef 0010 lea %sp@(16),%sp
if ( !the_region )
return_status = RTEMS_TOO_MANY;
else {
the_region->maximum_segment_size = _Heap_Initialize(
57eac: 2740 005c movel %d0,%a3@(92)
&the_region->Memory, starting_address, length, page_size
);
if ( !the_region->maximum_segment_size ) {
57eb0: 6662 bnes 57f14 <rtems_region_create+0xd4>
*/
RTEMS_INLINE_ROUTINE void _Region_Free (
Region_Control *the_region
)
{
_Objects_Free( &_Region_Information, &the_region->Object );
57eb2: 2f0b movel %a3,%sp@- 57eb4: 4879 0008 0bbe pea 80bbe <_Region_Information> 57eba: 103c 0008 moveb #8,%d0 57ebe: 2d40 fffc movel %d0,%fp@(-4) 57ec2: 4eb9 0005 c204 jsr 5c204 <_Objects_Free> 57ec8: 202e fffc movel %fp@(-4),%d0 57ecc: 508f addql #8,%sp
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57ece: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57ed4: 2d40 fffc movel %d0,%fp@(-4) 57ed8: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57ede: 202e fffc movel %fp@(-4),%d0 57ee2: 588f addql #4,%sp
}
57ee4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57eea: 4e5e unlk %fp 57eec: 4e75 rts
)
{
rtems_status_code return_status;
Region_Control *the_region;
if ( !rtems_is_name_valid( name ) )
57eee: 7003 moveq #3,%d0
}
}
_RTEMS_Unlock_allocator();
return return_status;
}
57ef0: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 57ef6: 4e5e unlk %fp 57ef8: 4e75 rts
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57efa: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Allocate();
if ( !the_region )
57f00: 7005 moveq #5,%d0
*id = the_region->Object.id;
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f02: 2d40 fffc movel %d0,%fp@(-4) 57f06: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57f0c: 202e fffc movel %fp@(-4),%d0 57f10: 588f addql #4,%sp 57f12: 60d0 bras 57ee4 <rtems_region_create+0xa4>
return_status = RTEMS_INVALID_SIZE;
}
else {
the_region->starting_address = starting_address;
57f14: 2742 0050 movel %d2,%a3@(80)
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f18: 222e 0018 movel %fp@(24),%d1
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f1c: 202e 0010 movel %fp@(16),%d0
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f20: e489 lsrl #2,%d1
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f22: 242e 0014 movel %fp@(20),%d2
the_region->attribute_set = attribute_set;
57f26: 206e 0018 moveal %fp@(24),%a0
}
else {
the_region->starting_address = starting_address;
the_region->length = length;
57f2a: 2740 0054 movel %d0,%a3@(84)
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f2e: 4280 clrl %d0
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
57f30: 2742 0058 movel %d2,%a3@(88)
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f34: 7401 moveq #1,%d2
else {
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
57f36: 2748 0060 movel %a0,%a3@(96)
the_region->number_of_used_blocks = 0;
_Thread_queue_Initialize(
57f3a: c481 andl %d1,%d2
the_region->starting_address = starting_address;
the_region->length = length;
the_region->page_size = page_size;
the_region->attribute_set = attribute_set;
the_region->number_of_used_blocks = 0;
57f3c: 42ab 0064 clrl %a3@(100)
_Thread_queue_Initialize(
57f40: 4878 0006 pea 6 <EXTENDSFDF> 57f44: 4878 0040 pea 40 <DBL_MANT_DIG+0xb> 57f48: 2f02 movel %d2,%sp@- 57f4a: 486b 0010 pea %a3@(16)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f4e: 4282 clrl %d2 57f50: 2d40 fffc movel %d0,%fp@(-4) 57f54: 4eb9 0005 d540 jsr 5d540 <_Thread_queue_Initialize> 57f5a: 222b 0008 movel %a3@(8),%d1
&_Region_Information,
&the_region->Object,
(Objects_Name) name
);
*id = the_region->Object.id;
57f5e: 4fef 0010 lea %sp@(16),%sp 57f62: 2079 0008 0bd6 moveal 80bd6 <_Region_Information+0x18>,%a0 57f68: 3401 movew %d1,%d2
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
57f6a: 2743 000c movel %d3,%a3@(12) 57f6e: 202e fffc movel %fp@(-4),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
57f72: 218b 2c00 movel %a3,%a0@(00000000,%d2:l:4) 57f76: 2481 movel %d1,%a2@
return_status = RTEMS_SUCCESSFUL;
}
}
_RTEMS_Unlock_allocator();
57f78: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 57f7e: 2d40 fffc movel %d0,%fp@(-4) 57f82: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
57f88: 202e fffc movel %fp@(-4),%d0 57f8c: 588f addql #4,%sp 57f8e: 6000 ff54 braw 57ee4 <rtems_region_create+0xa4>
...
00058044 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
58044: 4e56 fff8 linkw %fp,#-8 58048: 2f0a movel %a2,%sp@- 5804a: 2f02 movel %d2,%sp@- 5804c: 242e 000c movel %fp@(12),%d2
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
58050: 677e beqs 580d0 <rtems_region_extend+0x8c>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
58052: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 58058: 4eb9 0005 a814 jsr 5a814 <_API_Mutex_Lock>
RTEMS_INLINE_ROUTINE Region_Control *_Region_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
5805e: 486e fff8 pea %fp@(-8) 58062: 2f2e 0008 movel %fp@(8),%sp@- 58066: 4879 0008 0bbe pea 80bbe <_Region_Information> 5806c: 4eb9 0005 c368 jsr 5c368 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
58072: 4fef 0010 lea %sp@(16),%sp 58076: 2440 moveal %d0,%a2 58078: 4aae fff8 tstl %fp@(-8)
5807c: 6640 bnes 580be <rtems_region_extend+0x7a>
case OBJECTS_LOCAL:
heap_status = _Heap_Extend(
5807e: 486e fffc pea %fp@(-4) 58082: 2f2e 0010 movel %fp@(16),%sp@- 58086: 2f02 movel %d2,%sp@- 58088: 486a 0068 pea %a2@(104) 5808c: 4eb9 0005 b640 jsr 5b640 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
58092: 4fef 0010 lea %sp@(16),%sp 58096: 4a80 tstl %d0
58098: 6748 beqs 580e2 <rtems_region_extend+0x9e>
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
5809a: 7201 moveq #1,%d1 5809c: b280 cmpl %d0,%d1
5809e: 6760 beqs 58100 <rtems_region_extend+0xbc>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a0: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
580a6: 7418 moveq #24,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580a8: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580ae: 588f addql #4,%sp
}
580b0: 2002 movel %d2,%d0 580b2: 242e fff0 movel %fp@(-16),%d2 580b6: 246e fff4 moveal %fp@(-12),%a2 580ba: 4e5e unlk %fp 580bc: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580be: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
the_region = _Region_Get( id, &location );
switch ( location ) {
580c4: 7404 moveq #4,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580c6: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580cc: 588f addql #4,%sp 580ce: 60e0 bras 580b0 <rtems_region_extend+0x6c>
Heap_Extend_status heap_status;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
580d0: 143c 0009 moveb #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
580d4: 2002 movel %d2,%d0 580d6: 242e fff0 movel %fp@(-16),%d2 580da: 246e fff4 moveal %fp@(-12),%a2 580de: 4e5e unlk %fp 580e0: 4e75 rts
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580e2: 202e fffc movel %fp@(-4),%d0
the_region->maximum_segment_size += amount_extended;
580e6: d1aa 005c addl %d0,%a2@(92) 580ea: 4282 clrl %d2
length,
&amount_extended
);
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
580ec: d1aa 0054 addl %d0,%a2@(84)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
580f0: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 580f6: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
580fc: 588f addql #4,%sp 580fe: 60b0 bras 580b0 <rtems_region_extend+0x6c>
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58100: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
58106: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58108: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
5810e: 588f addql #4,%sp 58110: 609e bras 580b0 <rtems_region_extend+0x6c>
...
00058398 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
58398: 4e56 fffc linkw %fp,#-4 5839c: 2f03 movel %d3,%sp@- 5839e: 262e 0010 movel %fp@(16),%d3 583a2: 2f02 movel %d2,%sp@- 583a4: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
583a8: 6700 0092 beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
583ac: 4a83 tstl %d3 583ae: 6700 008c beqw 5843c <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
583b2: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- 583b8: 4eb9 0005 a814 jsr 5a814 <_API_Mutex_Lock> 583be: 486e fffc pea %fp@(-4) 583c2: 2f2e 0008 movel %fp@(8),%sp@- 583c6: 4879 0008 0bbe pea 80bbe <_Region_Information> 583cc: 4eb9 0005 c368 jsr 5c368 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
583d2: 222e fffc movel %fp@(-4),%d1 583d6: 4fef 0010 lea %sp@(16),%sp
583da: 6636 bnes 58412 <rtems_region_get_segment_size+0x7a><== NEVER TAKEN
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
583dc: 2f03 movel %d3,%sp@- 583de: 2040 moveal %d0,%a0 583e0: 2f02 movel %d2,%sp@- 583e2: 4868 0068 pea %a0@(104) 583e6: 4eb9 0005 bda4 jsr 5bda4 <_Heap_Size_of_alloc_area> 583ec: 4fef 000c lea %sp@(12),%sp 583f0: 4a00 tstb %d0
583f2: 6624 bnes 58418 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583f4: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@- <== NOT EXECUTED
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
583fa: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
583fc: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
58402: 588f addql #4,%sp <== NOT EXECUTED
}
58404: 2002 movel %d2,%d0 58406: 242e fff4 movel %fp@(-12),%d2 5840a: 262e fff8 movel %fp@(-8),%d3 5840e: 4e5e unlk %fp 58410: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58412: 7001 moveq #1,%d0 58414: b081 cmpl %d1,%d0
58416: 6712 beqs 5842a <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58418: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
the_region = _Region_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
5841e: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58420: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
58426: 588f addql #4,%sp 58428: 60da bras 58404 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5842a: 2f39 0008 0d72 movel 80d72 <_RTEMS_Allocator_Mutex>,%sp@-
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
58430: 7404 moveq #4,%d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
58432: 4eb9 0005 a874 jsr 5a874 <_API_Mutex_Unlock>
return return_status;
58438: 588f addql #4,%sp 5843a: 60c8 bras 58404 <rtems_region_get_segment_size+0x6c> 5843c: 7409 moveq #9,%d2
}
5843e: 2002 movel %d2,%d0 58440: 242e fff4 movel %fp@(-12),%d2 58444: 262e fff8 movel %fp@(-8),%d3
58448: 4e5e unlk %fp <== NOT EXECUTED
00046464 <rtems_semaphore_create>:
uint32_t count,
rtems_attribute attribute_set,
rtems_task_priority priority_ceiling,
rtems_id *id
)
{
46464: 4e56 ffd4 linkw %fp,#-44 46468: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4646c: 262e 0008 movel %fp@(8),%d3 46470: 242e 0010 movel %fp@(16),%d2 46474: 246e 0018 moveal %fp@(24),%a2
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
46478: 4a83 tstl %d3
4647a: 6748 beqs 464c4 <rtems_semaphore_create+0x60>
return RTEMS_INVALID_NAME;
if ( !id )
4647c: 4a8a tstl %a2 4647e: 6700 00ea beqw 4656a <rtems_semaphore_create+0x106>
* id - semaphore id
* RTEMS_SUCCESSFUL - if successful
* error code - if unsuccessful
*/
rtems_status_code rtems_semaphore_create(
46482: 2002 movel %d2,%d0 46484: 0280 0000 00c0 andil #192,%d0
return RTEMS_NOT_DEFINED;
} else
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
4648a: 6744 beqs 464d0 <rtems_semaphore_create+0x6c>
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
4648c: 7230 moveq #48,%d1 4648e: 7810 moveq #16,%d4 46490: c282 andl %d2,%d1 46492: b881 cmpl %d1,%d4
46494: 670c beqs 464a2 <rtems_semaphore_create+0x3e>
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46496: 700b moveq #11,%d0
}
46498: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 4649e: 4e5e unlk %fp 464a0: 4e75 rts
#endif
if ( _Attributes_Is_inherit_priority( attribute_set ) ||
_Attributes_Is_priority_ceiling( attribute_set ) ) {
if ( ! (_Attributes_Is_binary_semaphore( attribute_set ) &&
464a2: 44c2 movew %d2,%ccr
464a4: 66f0 bnes 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority( attribute_set ) ) )
return RTEMS_NOT_DEFINED;
}
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
464a6: 0c80 0000 00c0 cmpil #192,%d0
464ac: 67e8 beqs 46496 <rtems_semaphore_create+0x32>
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
464ae: 7001 moveq #1,%d0 464b0: b0ae 000c cmpl %fp@(12),%d0
464b4: 6420 bccs 464d6 <rtems_semaphore_create+0x72>
464b6: 103c 000a moveb #10,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464ba: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464c0: 4e5e unlk %fp 464c2: 4e75 rts
register Semaphore_Control *the_semaphore;
CORE_mutex_Attributes the_mutex_attr;
CORE_semaphore_Attributes the_semaphore_attr;
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
464c4: 7003 moveq #3,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
464c6: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 464cc: 4e5e unlk %fp 464ce: 4e75 rts
*/
RTEMS_INLINE_ROUTINE bool _Attributes_Is_counting_semaphore(
rtems_attribute attribute_set
)
{
return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
464d0: 7830 moveq #48,%d4 464d2: c882 andl %d2,%d4
if ( _Attributes_Is_inherit_priority( attribute_set ) &&
_Attributes_Is_priority_ceiling( attribute_set ) )
return RTEMS_NOT_DEFINED;
if ( !_Attributes_Is_counting_semaphore( attribute_set ) && ( count > 1 ) )
464d4: 66d8 bnes 464ae <rtems_semaphore_create+0x4a>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
464d6: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0 464dc: 5280 addql #1,%d0 464de: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level>
* This function allocates a semaphore control block from
* the inactive chain of free semaphore control blocks.
*/
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Allocate( void )
{
return (Semaphore_Control *) _Objects_Allocate( &_Semaphore_Information );
464e4: 4879 0006 1364 pea 61364 <_Semaphore_Information> 464ea: 4eb9 0004 7b68 jsr 47b68 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
464f0: 588f addql #4,%sp 464f2: 2640 moveal %d0,%a3 464f4: 4a80 tstl %d0 464f6: 6700 00d8 beqw 465d0 <rtems_semaphore_create+0x16c>
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_semaphore->attribute_set = attribute_set;
464fa: 2742 0010 movel %d2,%a3@(16)
/*
* Initialize it as a counting semaphore.
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
464fe: 4a84 tstl %d4
46500: 6774 beqs 46576 <rtems_semaphore_create+0x112>
/*
* It is either simple binary semaphore or a more powerful mutex
* style binary semaphore. This is the mutex style.
*/
if ( _Attributes_Is_priority( attribute_set ) )
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
46502: 44c2 movew %d2,%ccr 46504: 56c0 sne %d0 46506: 49c0 extbl %d0 46508: 5280 addql #1,%d0 4650a: 2d40 fff0 movel %d0,%fp@(-16)
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
4650e: 7010 moveq #16,%d0 46510: b084 cmpl %d4,%d0 46512: 6700 00ce beqw 465e2 <rtems_semaphore_create+0x17e>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
46516: 7202 moveq #2,%d1
the_mutex_attr.only_owner_release = false;
46518: 4204 clrb %d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
the_mutex_attr.only_owner_release = true;
}
}
} else /* must be simple binary semaphore */ {
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_BLOCKS;
4651a: 2d41 ffea movel %d1,%fp@(-22)
the_mutex_attr.only_owner_release = false;
4651e: 1d44 ffee moveb %d4,%fp@(-18)
}
mutex_status = _CORE_mutex_Initialize(
46522: 7001 moveq #1,%d0 46524: b0ae 000c cmpl %fp@(12),%d0 46528: 57c0 seq %d0 4652a: 49c0 extbl %d0 4652c: 4480 negl %d0 4652e: 2f00 movel %d0,%sp@- 46530: 486e ffea pea %fp@(-22) 46534: 486b 0014 pea %a3@(20) 46538: 4eb9 0004 7218 jsr 47218 <_CORE_mutex_Initialize>
&the_semaphore->Core_control.mutex,
&the_mutex_attr,
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
4653e: 4fef 000c lea %sp@(12),%sp 46542: 7206 moveq #6,%d1 46544: b280 cmpl %d0,%d1
46546: 665e bnes 465a6 <rtems_semaphore_create+0x142>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
46548: 2f0b movel %a3,%sp@- 4654a: 4879 0006 1364 pea 61364 <_Semaphore_Information> 46550: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
46556: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_INVALID_PRIORITY;
4655c: 508f addql #8,%sp
(count == 1) ? CORE_MUTEX_UNLOCKED : CORE_MUTEX_LOCKED
);
if ( mutex_status == CORE_MUTEX_STATUS_CEILING_VIOLATED ) {
_Semaphore_Free( the_semaphore );
_Thread_Enable_dispatch();
4655e: 7013 moveq #19,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
46560: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46566: 4e5e unlk %fp 46568: 4e75 rts
CORE_mutex_Status mutex_status;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
4656a: 7009 moveq #9,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4656c: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 46572: 4e5e unlk %fp 46574: 4e75 rts
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
46576: 2f2e 000c movel %fp@(12),%sp@-
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
4657a: 72ff moveq #-1,%d1
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
_CORE_semaphore_Initialize(
4657c: 486e fff8 pea %fp@(-8) 46580: 486b 0014 pea %a3@(20)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46584: 44c2 movew %d2,%ccr 46586: 56c0 sne %d0
*/
if ( _Attributes_Is_counting_semaphore( attribute_set ) ) {
/*
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
46588: 2d41 fff8 movel %d1,%fp@(-8)
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
4658c: 49c0 extbl %d0 4658e: 5280 addql #1,%d0
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_FIFO;
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
46590: 42ae ffea clrl %fp@(-22)
* This effectively disables limit checking.
*/
the_semaphore_attr.maximum_count = 0xFFFFFFFF;
if ( _Attributes_Is_priority( attribute_set ) )
the_semaphore_attr.discipline = CORE_SEMAPHORE_DISCIPLINES_PRIORITY;
46594: 2d40 fffc movel %d0,%fp@(-4)
/*
* The following are just to make Purify happy.
*/
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.priority_ceiling = PRIORITY_MINIMUM;
46598: 42ae fff4 clrl %fp@(-12)
_CORE_semaphore_Initialize(
4659c: 4eb9 0004 7560 jsr 47560 <_CORE_semaphore_Initialize> 465a2: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465a6: 202b 0008 movel %a3@(8),%d0 465aa: 4281 clrl %d1 465ac: 2079 0006 137c moveal 6137c <_Semaphore_Information+0x18>,%a0 465b2: 3200 movew %d0,%d1
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
465b4: 2743 000c movel %d3,%a3@(12)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
465b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_Semaphore_Information,
&the_semaphore->Object,
(Objects_Name) name
);
*id = the_semaphore->Object.id;
465bc: 2480 movel %d0,%a2@
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465be: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL; }
465c4: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3
the_semaphore->Object.id,
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
465ca: 4280 clrl %d0
return RTEMS_SUCCESSFUL; }
465cc: 4e5e unlk %fp 465ce: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_semaphore = _Semaphore_Allocate();
if ( !the_semaphore ) {
_Thread_Enable_dispatch();
465d0: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch> 465d6: 7005 moveq #5,%d0
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
465d8: 4cee 0c1c ffd4 moveml %fp@(-44),%d2-%d4/%a2-%a3 465de: 4e5e unlk %fp 465e0: 4e75 rts
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
465e2: 42ae ffea clrl %fp@(-22)
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465e6: 7801 moveq #1,%d4
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465e8: 4201 clrb %d1
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY;
else
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_FIFO;
if ( _Attributes_Is_binary_semaphore( attribute_set ) ) {
the_mutex_attr.priority_ceiling = priority_ceiling;
465ea: 2d6e 0014 fff4 movel %fp@(20),%fp@(-12)
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
465f0: 1d41 ffee moveb %d1,%fp@(-18)
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
465f4: b8ae fff0 cmpl %fp@(-16),%d4 465f8: 6600 ff28 bnew 46522 <rtems_semaphore_create+0xbe>
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
465fc: 0802 0006 btst #6,%d2
46600: 6712 beqs 46614 <rtems_semaphore_create+0x1b0>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
46602: 103c 0002 moveb #2,%d0
the_mutex_attr.only_owner_release = true;
46606: 7201 moveq #1,%d1
the_mutex_attr.lock_nesting_behavior = CORE_MUTEX_NESTING_ACQUIRES;
the_mutex_attr.only_owner_release = false;
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
46608: 2d40 fff0 movel %d0,%fp@(-16)
the_mutex_attr.only_owner_release = true;
4660c: 1d41 ffee moveb %d1,%fp@(-18) 46610: 6000 ff10 braw 46522 <rtems_semaphore_create+0xbe>
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
46614: 4a02 tstb %d2 46616: 6c00 ff0a bgew 46522 <rtems_semaphore_create+0xbe>
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661a: 7803 moveq #3,%d4
the_mutex_attr.only_owner_release = true;
4661c: 7001 moveq #1,%d0
if ( the_mutex_attr.discipline == CORE_MUTEX_DISCIPLINES_PRIORITY ) {
if ( _Attributes_Is_inherit_priority( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
the_mutex_attr.only_owner_release = true;
} else if ( _Attributes_Is_priority_ceiling( attribute_set ) ) {
the_mutex_attr.discipline = CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
4661e: 2d44 fff0 movel %d4,%fp@(-16)
the_mutex_attr.only_owner_release = true;
46622: 1d40 ffee moveb %d0,%fp@(-18) 46626: 6000 fefa braw 46522 <rtems_semaphore_create+0xbe>
...
0004662c <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
4662c: 4e56 fffc linkw %fp,#-4 46630: 2f0a movel %a2,%sp@-
RTEMS_INLINE_ROUTINE Semaphore_Control *_Semaphore_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
46632: 486e fffc pea %fp@(-4) 46636: 2f2e 0008 movel %fp@(8),%sp@- 4663a: 4879 0006 1364 pea 61364 <_Semaphore_Information> 46640: 4eb9 0004 8004 jsr 48004 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46646: 4fef 000c lea %sp@(12),%sp 4664a: 2440 moveal %d0,%a2 4664c: 4aae fffc tstl %fp@(-4)
46650: 670a beqs 4665c <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46652: 246e fff8 moveal %fp@(-8),%a2
{
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
46656: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46658: 4e5e unlk %fp 4665a: 4e75 rts 4665c: 7030 moveq #48,%d0 4665e: c0aa 0010 andl %a2@(16),%d0
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
46662: 6760 beqs 466c4 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
46664: 4aaa 0062 tstl %a2@(98)
46668: 6616 bnes 46680 <rtems_semaphore_delete+0x54>
4666a: 7220 moveq #32,%d1 4666c: b280 cmpl %d0,%d1
4666e: 6710 beqs 46680 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
46670: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46676: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
4667a: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4667c: 4e5e unlk %fp 4667e: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
46680: 4878 0004 pea 4 <CONTEXT_ARG> 46684: 42a7 clrl %sp@- 46686: 486a 0014 pea %a2@(20) 4668a: 4eb9 0004 720c jsr 4720c <_CORE_mutex_Flush> 46690: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
46694: 2f0a movel %a2,%sp@- 46696: 4879 0006 1364 pea 61364 <_Semaphore_Information> 4669c: 4eb9 0004 7bf8 jsr 47bf8 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
466a2: 2f0a movel %a2,%sp@- 466a4: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466aa: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466b0: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466b6: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466ba: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
466bc: 246e fff8 moveal %fp@(-8),%a2 466c0: 4e5e unlk %fp 466c2: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
466c4: 4878 0002 pea 2 <DOUBLE_FLOAT> 466c8: 42a7 clrl %sp@- 466ca: 486a 0014 pea %a2@(20) 466ce: 4eb9 0004 7554 jsr 47554 <_CORE_semaphore_Flush> 466d4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
466d8: 2f0a movel %a2,%sp@- 466da: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466e0: 4eb9 0004 7bf8 jsr 47bf8 <_Objects_Close> 466e6: 2f0a movel %a2,%sp@- 466e8: 4879 0006 1364 pea 61364 <_Semaphore_Information> 466ee: 4eb9 0004 7ea0 jsr 47ea0 <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466f4: 4eb9 0004 890c jsr 4890c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
466fa: 4fef 0010 lea %sp@(16),%sp
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
466fe: 4280 clrl %d0 46700: 60ba bras 466bc <rtems_semaphore_delete+0x90>
...
00051184 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
51184: 4e56 fffc linkw %fp,#-4 51188: 486e fffc pea %fp@(-4) 5118c: 2f2e 0008 movel %fp@(8),%sp@- 51190: 4879 0006 538c pea 6538c <_Semaphore_Information> 51196: 4eb9 0004 9628 jsr 49628 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
5119c: 4fef 000c lea %sp@(12),%sp 511a0: 4aae fffc tstl %fp@(-4)
511a4: 6706 beqs 511ac <rtems_semaphore_flush+0x28>
511a6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
511a8: 4e5e unlk %fp 511aa: 4e75 rts
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
511ac: 7230 moveq #48,%d1 511ae: 2040 moveal %d0,%a0 511b0: c2a8 0010 andl %a0@(16),%d1
511b4: 6720 beqs 511d6 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
511b6: 4878 0001 pea 1 <ADD> 511ba: 42a7 clrl %sp@- 511bc: 4868 0014 pea %a0@(20) 511c0: 4eb9 0004 8830 jsr 48830 <_CORE_mutex_Flush> 511c6: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
511ca: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 511d0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
511d2: 4e5e unlk %fp 511d4: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
511d6: 4878 0001 pea 1 <ADD> 511da: 2040 moveal %d0,%a0 511dc: 42a7 clrl %sp@- 511de: 4868 0014 pea %a0@(20) 511e2: 4eb9 0004 8b78 jsr 48b78 <_CORE_semaphore_Flush> 511e8: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
511ec: 4eb9 0004 9f38 jsr 49f38 <_Thread_Enable_dispatch> 511f2: 4280 clrl %d0 511f4: 60dc bras 511d2 <rtems_semaphore_flush+0x4e>
...
00058b58 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58b58: 4e56 fffc linkw %fp,#-4 58b5c: 2f03 movel %d3,%sp@- 58b5e: 2f02 movel %d2,%sp@- 58b60: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b64: 660e bnes 58b74 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b66: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58b6a: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b6c: 262e fff8 movel %fp@(-8),%d3 58b70: 4e5e unlk %fp 58b72: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58b74: 486e fffc pea %fp@(-4) 58b78: 2f2e 0008 movel %fp@(8),%sp@- 58b7c: 4eb9 0005 cd90 jsr 5cd90 <_Thread_Get>
switch ( location ) {
58b82: 508f addql #8,%sp 58b84: 4aae fffc tstl %fp@(-4)
58b88: 670e beqs 58b98 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b8a: 242e fff4 movel %fp@(-12),%d2
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
58b8e: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58b90: 262e fff8 movel %fp@(-8),%d3 58b94: 4e5e unlk %fp 58b96: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58b98: 2240 moveal %d0,%a1 58b9a: 2069 010a moveal %a1@(266),%a0
asr = &api->Signal;
58b9e: 4aa8 000a tstl %a0@(10)
58ba2: 6770 beqs 58c14 <rtems_signal_send+0xbc> <== NEVER TAKEN
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
58ba4: 4a28 0008 tstb %a0@(8)
58ba8: 673e beqs 58be8 <rtems_signal_send+0x90>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58baa: 223c 0000 0700 movel #1792,%d1 58bb0: 40c3 movew %sr,%d3 58bb2: 8283 orl %d3,%d1 58bb4: 46c1 movew %d1,%sr
*signal_set |= signals;
58bb6: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
58bba: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bbc: 2239 0008 0d5a movel 80d5a <_ISR_Nest_level>,%d1
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
58bc2: 7401 moveq #1,%d2 58bc4: 1342 0074 moveb %d2,%a1@(116)
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
58bc8: 4a81 tstl %d1
58bca: 6708 beqs 58bd4 <rtems_signal_send+0x7c>
58bcc: b0b9 0008 0d7a cmpl 80d7a <_Thread_Executing>,%d0
58bd2: 6730 beqs 58c04 <rtems_signal_send+0xac> <== ALWAYS TAKEN
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bd4: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58bda: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58bdc: 242e fff4 movel %fp@(-12),%d2 58be0: 262e fff8 movel %fp@(-8),%d3 58be4: 4e5e unlk %fp 58be6: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58be8: 203c 0000 0700 movel #1792,%d0 58bee: 40c1 movew %sr,%d1 58bf0: 8081 orl %d1,%d0 58bf2: 46c0 movew %d0,%sr
*signal_set |= signals;
58bf4: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
58bf8: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58bfa: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58c00: 4280 clrl %d0 58c02: 60d8 bras 58bdc <rtems_signal_send+0x84>
_ASR_Post_signals( signal_set, &asr->signals_posted );
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_ISR_Signals_to_thread_executing = true;
58c04: 13c2 0008 0e08 moveb %d2,80e08 <_ISR_Signals_to_thread_executing>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
58c0a: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 58c10: 4280 clrl %d0 58c12: 60c8 bras 58bdc <rtems_signal_send+0x84>
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c14: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c1a: 242e fff4 movel %fp@(-12),%d2
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
58c1e: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c20: 262e fff8 movel %fp@(-8),%d3
58c24: 4e5e unlk %fp <== NOT EXECUTED
00042090 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
42090: 4e56 0000 linkw %fp,#0 42094: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
42098: 4aa8 0008 tstl %a0@(8)
4209c: 672c beqs 420ca <rtems_stack_checker_begin_extension+0x3a><== NEVER TAKEN
return;
the_pattern = Stack_check_Get_pattern_area(&the_thread->Start.Initial_stack);
*the_pattern = Stack_check_Pattern;
4209e: 2068 00c2 moveal %a0@(194),%a0 420a2: 43f9 0006 1984 lea 61984 <Stack_check_Pattern>,%a1 420a8: 2151 0008 movel %a1@,%a0@(8) 420ac: 43f9 0006 1988 lea 61988 <Stack_check_Pattern+0x4>,%a1 420b2: 2151 000c movel %a1@,%a0@(12) 420b6: 43f9 0006 198c lea 6198c <Stack_check_Pattern+0x8>,%a1 420bc: 2151 0010 movel %a1@,%a0@(16) 420c0: 43f9 0006 1990 lea 61990 <Stack_check_Pattern+0xc>,%a1 420c6: 2151 0014 movel %a1@,%a0@(20)
}
420ca: 4e5e unlk %fp <== NOT EXECUTED
0004252e <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
4252e: 4e56 0000 linkw %fp,#0 42532: 2f0a movel %a2,%sp@- 42534: 246e 000c moveal %fp@(12),%a2
Stack_check_Initialize();
42538: 4eb9 0004 24c8 jsr 424c8 <Stack_check_Initialize>
if (the_thread)
4253e: 4a8a tstl %a2
42540: 6716 beqs 42558 <rtems_stack_checker_create_extension+0x2a><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
42542: 2f2a 00be movel %a2@(190),%sp@- 42546: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70> 4254a: 2f2a 00c2 movel %a2@(194),%sp@- 4254e: 4eb9 0005 1424 jsr 51424 <memset> 42554: 4fef 000c lea %sp@(12),%sp
return true;
}
42558: 246e fffc moveal %fp@(-4),%a2 4255c: 4e5e unlk %fp 4255e: 7001 moveq #1,%d0
...
000423b4 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
423b4: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
423b8: 2279 0006 1bba moveal 61bba <_Thread_Executing>,%a1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
423be: 2069 00c2 moveal %a1@(194),%a0
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
423c2: 2f02 movel %d2,%sp@-
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
423c4: b1ce cmpal %fp,%a0
423c6: 6354 blss 4241c <rtems_stack_checker_is_blown+0x68>
423c8: 4202 clrb %d2 <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
423ca: 4ab9 0006 1174 tstl 61174 <Stack_check_Initialized>
423d0: 662a bnes 423fc <rtems_stack_checker_is_blown+0x48><== ALWAYS TAKEN
423d2: 7001 moveq #1,%d0 <== NOT EXECUTED
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
423d4: 4a02 tstb %d2
423d6: 6704 beqs 423dc <rtems_stack_checker_is_blown+0x28><== NEVER TAKEN
423d8: 4a00 tstb %d0
423da: 664e bnes 4242a <rtems_stack_checker_is_blown+0x76>
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
423dc: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 423e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 423e4: 2f39 0006 1bba movel 61bba <_Thread_Executing>,%sp@- <== NOT EXECUTED 423ea: 4eb9 0004 2304 jsr 42304 <Stack_check_report_blown_task> <== NOT EXECUTED
return true; }
423f0: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
423f4: 508f addql #8,%sp <== NOT EXECUTED
}
423f6: 4e5e unlk %fp <== NOT EXECUTED
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
423f8: 7001 moveq #1,%d0 <== NOT EXECUTED
return true; }
423fa: 4e75 rts <== NOT EXECUTED
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
pattern_ok = (!memcmp(
423fc: 4878 0010 pea 10 <INVALID_OPERATION> 42400: 4879 0006 1984 pea 61984 <Stack_check_Pattern> 42406: 4868 0008 pea %a0@(8) 4240a: 4eb9 0005 133c jsr 5133c <memcmp> 42410: 4fef 000c lea %sp@(12),%sp 42414: 4a80 tstl %d0 42416: 57c0 seq %d0 42418: 4480 negl %d0 4241a: 60b8 bras 423d4 <rtems_stack_checker_is_blown+0x20>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
4241c: 2008 movel %a0,%d0 4241e: d0a9 00be addl %a1@(190),%d0 42422: b08e cmpl %fp,%d0 42424: 54c2 scc %d2 42426: 4482 negl %d2 42428: 60a0 bras 423ca <rtems_stack_checker_is_blown+0x16>
/* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); return true; }
4242a: 242e fffc movel %fp@(-4),%d2 4242e: 4e5e unlk %fp
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
42430: 4200 clrb %d0 <== NOT EXECUTED
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
return true;
}
000422ec <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
422ec: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
422f0: 4879 0004 41b0 pea 441b0 <printk_plugin> <== NOT EXECUTED 422f6: 42a7 clrl %sp@- <== NOT EXECUTED 422f8: 4eb9 0004 228a jsr 4228a <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED 422fe: 508f addql #8,%sp <== NOT EXECUTED
}
42300: 4e5e unlk %fp <== NOT EXECUTED
0004228a <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
4228a: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 4228e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42290: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 42294: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
42296: 4879 0005 e98c pea 5e98c <IntUartPollCallbacks.6645+0x6c> <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
4229c: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
print_context = context; print_handler = print;
422a0: 23ca 0006 117c movel %a2,6117c <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
422a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
print_context = context;
422a8: 23c2 0006 1178 movel %d2,61178 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
422ae: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
422b0: 4879 0005 e9a3 pea 5e9a3 <IntUartPollCallbacks.6645+0x83> <== NOT EXECUTED 422b6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 422b8: 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 );
422ba: 4879 0004 2102 pea 42102 <Stack_check_Dump_threads_usage> <== NOT EXECUTED 422c0: 4eb9 0004 7fec jsr 47fec <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
422c6: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 422ca: 4eb9 0004 2102 jsr 42102 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
print_handler = NULL;
}
422d0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
print_context = NULL;
print_handler = NULL;
422d4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
422d8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 422dc: 4e5e unlk %fp <== NOT EXECUTED
rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage );
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
print_context = NULL;
422de: 42b9 0006 1178 clrl 61178 <print_context> <== NOT EXECUTED
print_handler = NULL;
422e4: 42b9 0006 117c clrl 6117c <print_handler> <== NOT EXECUTED
}
00042434 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
42434: 4e56 0000 linkw %fp,#0 42438: 2f0a movel %a2,%sp@- 4243a: 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;
4243e: 222a 00c2 movel %a2@(194),%d1 42442: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42444: 202a 00c2 movel %a2@(194),%d0 42448: b08e cmpl %fp,%d0
4244a: 6208 bhis 42454 <rtems_stack_checker_switch_extension+0x20><== NEVER TAKEN
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
Stack_Control *the_stack = &running->Start.Initial_stack;
4244c: d0aa 00be addl %a2@(190),%d0 42450: b08e cmpl %fp,%d0
42452: 6436 bccs 4248a <rtems_stack_checker_switch_extension+0x56><== ALWAYS TAKEN
/*
* 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,
42454: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 42458: 4879 0006 1984 pea 61984 <Stack_check_Pattern> <== NOT EXECUTED 4245e: 2f01 movel %d1,%sp@- <== NOT EXECUTED 42460: 4eb9 0005 133c jsr 5133c <memcmp> <== NOT EXECUTED 42466: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4246a: 4a80 tstl %d0 <== NOT EXECUTED 4246c: 57c0 seq %d0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
4246e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
42472: 246e fffc moveal %fp@(-4),%a2 <== 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,
42476: 4480 negl %d0 <== NOT EXECUTED
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
42478: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4247e: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
42482: 4e5e unlk %fp <== NOT EXECUTED
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
42484: 4ef9 0004 2304 jmp 42304 <Stack_check_report_blown_task> <== 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,
4248a: 4878 0010 pea 10 <INVALID_OPERATION> 4248e: 4879 0006 1984 pea 61984 <Stack_check_Pattern> 42494: 2f01 movel %d1,%sp@- 42496: 4eb9 0005 133c jsr 5133c <memcmp> 4249c: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
424a0: 4a80 tstl %d0
424a2: 671c beqs 424c0 <rtems_stack_checker_switch_extension+0x8c><== ALWAYS TAKEN
Stack_check_report_blown_task( running, pattern_ok );
424a4: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
424a8: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
sp_ok = Stack_check_Frame_pointer_in_range( the_stack );
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
424ac: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
424ae: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 424b4: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
} }
424b8: 4e5e unlk %fp <== NOT EXECUTED
pattern_ok = (!memcmp( pattern,
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( running, pattern_ok );
424ba: 4ef9 0004 2304 jmp 42304 <Stack_check_report_blown_task> <== NOT EXECUTED
} }
424c0: 246e fffc moveal %fp@(-4),%a2
424c4: 4e5e unlk %fp <== NOT EXECUTED
0004d610 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
4d610: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d614: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d618: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d61c: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d620: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
double result;
char *end;
if ( !n )
4d624: 4a8a tstl %a2 <== NOT EXECUTED 4d626: 6700 00ba beqw 4d6e2 <rtems_string_to_double+0xd2> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d62a: 49f9 0005 0768 lea 50768 <__errno>,%a4 <== NOT EXECUTED 4d630: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4d632: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d634: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4d636: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d638: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
result = strtod( s, &end );
4d63a: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d63e: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d640: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
result = strtod( s, &end );
4d644: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d646: 4eb9 0005 31bc jsr 531bc <strtod> <== NOT EXECUTED
if ( endptr )
4d64c: 508f addql #8,%sp <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
4d64e: 2600 movel %d0,%d3 <== NOT EXECUTED 4d650: 2801 movel %d1,%d4 <== NOT EXECUTED
if ( endptr )
4d652: 4a8b tstl %a3 <== NOT EXECUTED 4d654: 6704 beqs 4d65a <rtems_string_to_double+0x4a> <== NOT EXECUTED
*endptr = end;
4d656: 26ae fffc movel %fp@(-4),%a3@ <== NOT EXECUTED
if ( end == s )
4d65a: b4ae fffc cmpl %fp@(-4),%d2 <== NOT EXECUTED 4d65e: 6776 beqs 4d6d6 <rtems_string_to_double+0xc6> <== NOT EXECUTED
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d660: 4e94 jsr %a4@ <== NOT EXECUTED 4d662: 7222 moveq #34,%d1 <== NOT EXECUTED 4d664: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d666: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d668: 6712 beqs 4d67c <rtems_string_to_double+0x6c> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d66a: 2483 movel %d3,%a2@ <== NOT EXECUTED 4d66c: 4280 clrl %d0 <== NOT EXECUTED 4d66e: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
4d672: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d678: 4e5e unlk %fp <== NOT EXECUTED 4d67a: 4e75 rts <== NOT EXECUTED
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d67c: 42a7 clrl %sp@- <== NOT EXECUTED 4d67e: 42a7 clrl %sp@- <== NOT EXECUTED 4d680: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d682: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d684: 4eb9 0004 2eb4 jsr 42eb4 <__eqdf2> <== NOT EXECUTED 4d68a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d68e: 4a80 tstl %d0 <== NOT EXECUTED 4d690: 6738 beqs 4d6ca <rtems_string_to_double+0xba> <== NOT EXECUTED 4d692: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4d696: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d69c: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d69e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d6a0: 4eb9 0005 dfb8 jsr 5dfb8 <__gtdf2> <== NOT EXECUTED 4d6a6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d6aa: 4a80 tstl %d0 <== NOT EXECUTED 4d6ac: 6e1c bgts 4d6ca <rtems_string_to_double+0xba> <== NOT EXECUTED 4d6ae: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4d6b2: 2f3c ffef ffff movel #-1048577,%sp@- <== NOT EXECUTED 4d6b8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d6ba: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d6bc: 4eb9 0005 e000 jsr 5e000 <__ltdf2> <== NOT EXECUTED 4d6c2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d6c6: 4a80 tstl %d0 <== NOT EXECUTED 4d6c8: 6ca0 bges 4d66a <rtems_string_to_double+0x5a> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4d6ca: 700a moveq #10,%d0 <== NOT EXECUTED
}
4d6cc: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d6d2: 4e5e unlk %fp <== NOT EXECUTED 4d6d4: 4e75 rts <== NOT EXECUTED
result = strtod( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
4d6d6: 700b moveq #11,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d6d8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d6de: 4e5e unlk %fp <== NOT EXECUTED 4d6e0: 4e75 rts <== NOT EXECUTED
)
{
double result;
char *end;
if ( !n )
4d6e2: 7009 moveq #9,%d0 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d6e4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d6ea: 4e5e unlk %fp <== NOT EXECUTED
...
0004d6f0 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
4d6f0: 4e56 ffe8 linkw %fp,#-24 4d6f4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d6f8: 242e 0008 movel %fp@(8),%d2 4d6fc: 246e 000c moveal %fp@(12),%a2 4d700: 266e 0010 moveal %fp@(16),%a3
float result;
char *end;
if ( !n )
4d704: 4a8a tstl %a2 4d706: 6700 009e beqw 4d7a6 <rtems_string_to_float+0xb6>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d70a: 49f9 0005 0768 lea 50768 <__errno>,%a4 4d710: 4e94 jsr %a4@ 4d712: 2040 moveal %d0,%a0 4d714: 4290 clrl %a0@
*n = 0;
result = strtof( s, &end );
4d716: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d71a: 24bc 0000 0000 movel #0,%a2@
result = strtof( s, &end );
4d720: 2f02 movel %d2,%sp@- 4d722: 4eb9 0005 315e jsr 5315e <strtof>
if ( endptr )
4d728: 508f addql #8,%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
4d72a: 2600 movel %d0,%d3
if ( endptr )
4d72c: 4a8b tstl %a3
4d72e: 6704 beqs 4d734 <rtems_string_to_float+0x44>
*endptr = end;
4d730: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4d734: b4ae fffc cmpl %fp@(-4),%d2
4d738: 6760 beqs 4d79a <rtems_string_to_float+0xaa>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d73a: 4e94 jsr %a4@ 4d73c: 7222 moveq #34,%d1 4d73e: 2040 moveal %d0,%a0 4d740: b290 cmpl %a0@,%d1
4d742: 670e beqs 4d752 <rtems_string_to_float+0x62>
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d744: 2483 movel %d3,%a2@ 4d746: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4d748: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d74e: 4e5e unlk %fp 4d750: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d752: 2f3c 0000 0000 movel #0,%sp@- 4d758: 2f03 movel %d3,%sp@- 4d75a: 4eb9 0004 2ed8 jsr 42ed8 <__eqsf2> 4d760: 508f addql #8,%sp 4d762: 4a80 tstl %d0
4d764: 6728 beqs 4d78e <rtems_string_to_float+0x9e> <== NEVER TAKEN
4d766: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d76c: 2f03 movel %d3,%sp@- 4d76e: 4eb9 0005 e048 jsr 5e048 <__gtsf2> 4d774: 508f addql #8,%sp 4d776: 4a80 tstl %d0
4d778: 6e14 bgts 4d78e <rtems_string_to_float+0x9e> <== NEVER TAKEN
4d77a: 2f3c ff7f ffff movel #-8388609,%sp@- 4d780: 2f03 movel %d3,%sp@- 4d782: 4eb9 0005 e064 jsr 5e064 <__ltsf2> 4d788: 508f addql #8,%sp 4d78a: 4a80 tstl %d0
4d78c: 6cb6 bges 4d744 <rtems_string_to_float+0x54> <== ALWAYS TAKEN
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4d78e: 700a moveq #10,%d0 <== NOT EXECUTED
}
4d790: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d796: 4e5e unlk %fp <== NOT EXECUTED 4d798: 4e75 rts <== NOT EXECUTED
result = strtof( s, &end );
if ( endptr )
*endptr = end;
if ( end == s )
4d79a: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d79c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d7a2: 4e5e unlk %fp 4d7a4: 4e75 rts
)
{
float result;
char *end;
if ( !n )
4d7a6: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d7a8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d7ae: 4e5e unlk %fp
...
0004d7b4 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
4d7b4: 4e56 ffe8 linkw %fp,#-24 4d7b8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d7bc: 242e 0008 movel %fp@(8),%d2 4d7c0: 246e 000c moveal %fp@(12),%a2 4d7c4: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4d7c8: 4a8a tstl %a2
4d7ca: 6776 beqs 4d842 <rtems_string_to_int+0x8e> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d7cc: 49f9 0005 0768 lea 50768 <__errno>,%a4 4d7d2: 4e94 jsr %a4@ 4d7d4: 2040 moveal %d0,%a0 4d7d6: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4d7d8: 2f2e 0014 movel %fp@(20),%sp@- 4d7dc: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d7e0: 4292 clrl %a2@
result = strtol( s, &end, base );
4d7e2: 2f02 movel %d2,%sp@- 4d7e4: 4eb9 0005 333e jsr 5333e <strtol>
if ( endptr )
4d7ea: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4d7ee: 2600 movel %d0,%d3
if ( endptr )
4d7f0: 4a8b tstl %a3
4d7f2: 6704 beqs 4d7f8 <rtems_string_to_int+0x44>
*endptr = end;
4d7f4: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4d7f8: b4ae fffc cmpl %fp@(-4),%d2
4d7fc: 6738 beqs 4d836 <rtems_string_to_int+0x82> <== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d7fe: 4e94 jsr %a4@ 4d800: 7222 moveq #34,%d1 4d802: 2040 moveal %d0,%a0 4d804: b290 cmpl %a0@,%d1
4d806: 670e beqs 4d816 <rtems_string_to_int+0x62>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4d808: 2483 movel %d3,%a2@ 4d80a: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4d80c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d812: 4e5e unlk %fp 4d814: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d816: 4a83 tstl %d3
4d818: 6710 beqs 4d82a <rtems_string_to_int+0x76> <== NEVER TAKEN
4d81a: 0c83 7fff ffff cmpil #2147483647,%d3
4d820: 6708 beqs 4d82a <rtems_string_to_int+0x76> <== ALWAYS TAKEN
4d822: 0c83 8000 0000 cmpil #-2147483648,%d3 <== NOT EXECUTED 4d828: 66de bnes 4d808 <rtems_string_to_int+0x54> <== NOT EXECUTED
}
#endif
*n = result;
return RTEMS_SUCCESSFUL;
4d82a: 700a moveq #10,%d0
}
4d82c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d832: 4e5e unlk %fp 4d834: 4e75 rts
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4d836: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4d838: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d83e: 4e5e unlk %fp 4d840: 4e75 rts
)
{
long result;
char *end;
if ( !n )
4d842: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4d844: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d84a: 4e5e unlk %fp
...
0004d908 <rtems_string_to_long>:
const char *s,
long *n,
char **endptr,
int base
)
{
4d908: 4e56 ffe8 linkw %fp,#-24 4d90c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d910: 242e 0008 movel %fp@(8),%d2 4d914: 246e 000c moveal %fp@(12),%a2 4d918: 266e 0010 moveal %fp@(16),%a3
long result;
char *end;
if ( !n )
4d91c: 4a8a tstl %a2
4d91e: 6776 beqs 4d996 <rtems_string_to_long+0x8e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d920: 49f9 0005 0768 lea 50768 <__errno>,%a4 4d926: 4e94 jsr %a4@ 4d928: 2040 moveal %d0,%a0 4d92a: 4290 clrl %a0@
*n = 0;
result = strtol( s, &end, base );
4d92c: 2f2e 0014 movel %fp@(20),%sp@- 4d930: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d934: 4292 clrl %a2@
result = strtol( s, &end, base );
4d936: 2f02 movel %d2,%sp@- 4d938: 4eb9 0005 333e jsr 5333e <strtol>
if ( endptr )
4d93e: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
4d942: 2600 movel %d0,%d3
if ( endptr )
4d944: 4a8b tstl %a3
4d946: 6704 beqs 4d94c <rtems_string_to_long+0x44>
*endptr = end;
4d948: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4d94c: b4ae fffc cmpl %fp@(-4),%d2
4d950: 6738 beqs 4d98a <rtems_string_to_long+0x82>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d952: 4e94 jsr %a4@ 4d954: 7222 moveq #34,%d1 4d956: 2040 moveal %d0,%a0 4d958: b290 cmpl %a0@,%d1
4d95a: 670e beqs 4d96a <rtems_string_to_long+0x62>
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d95c: 2483 movel %d3,%a2@ 4d95e: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4d960: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d966: 4e5e unlk %fp 4d968: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d96a: 4a83 tstl %d3
4d96c: 6710 beqs 4d97e <rtems_string_to_long+0x76> <== NEVER TAKEN
4d96e: 0c83 7fff ffff cmpil #2147483647,%d3
4d974: 6708 beqs 4d97e <rtems_string_to_long+0x76>
4d976: 0c83 8000 0000 cmpil #-2147483648,%d3
4d97c: 66de bnes 4d95c <rtems_string_to_long+0x54> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4d97e: 700a moveq #10,%d0
}
4d980: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d986: 4e5e unlk %fp 4d988: 4e75 rts
result = strtol( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4d98a: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d98c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d992: 4e5e unlk %fp 4d994: 4e75 rts
)
{
long result;
char *end;
if ( !n )
4d996: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d998: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d99e: 4e5e unlk %fp
...
0004d850 <rtems_string_to_long_long>:
const char *s,
long long *n,
char **endptr,
int base
)
{
4d850: 4e56 ffe4 linkw %fp,#-28 4d854: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d858: 242e 0008 movel %fp@(8),%d2 4d85c: 246e 000c moveal %fp@(12),%a2 4d860: 266e 0010 moveal %fp@(16),%a3
long long result;
char *end;
if ( !n )
4d864: 4a8a tstl %a2 4d866: 6700 0094 beqw 4d8fc <rtems_string_to_long_long+0xac>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d86a: 49f9 0005 0768 lea 50768 <__errno>,%a4 4d870: 4e94 jsr %a4@ 4d872: 2040 moveal %d0,%a0
*n = 0;
4d874: 4280 clrl %d0 4d876: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d878: 4290 clrl %a0@
*n = 0;
4d87a: 2480 movel %d0,%a2@ 4d87c: 2541 0004 movel %d1,%a2@(4)
result = strtoll( s, &end, base );
4d880: 2f2e 0014 movel %fp@(20),%sp@- 4d884: 486e fffc pea %fp@(-4) 4d888: 2f02 movel %d2,%sp@- 4d88a: 4eb9 0005 3360 jsr 53360 <strtoll>
if ( endptr )
4d890: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoll( s, &end, base );
4d894: 2600 movel %d0,%d3 4d896: 2801 movel %d1,%d4
if ( endptr )
4d898: 4a8b tstl %a3
4d89a: 6704 beqs 4d8a0 <rtems_string_to_long_long+0x50>
*endptr = end;
4d89c: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4d8a0: b4ae fffc cmpl %fp@(-4),%d2
4d8a4: 674a beqs 4d8f0 <rtems_string_to_long_long+0xa0>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d8a6: 4e94 jsr %a4@ 4d8a8: 7222 moveq #34,%d1 4d8aa: 2040 moveal %d0,%a0 4d8ac: b290 cmpl %a0@,%d1
4d8ae: 6712 beqs 4d8c2 <rtems_string_to_long_long+0x72>
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
4d8b0: 4280 clrl %d0 4d8b2: 2483 movel %d3,%a2@ 4d8b4: 2544 0004 movel %d4,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4d8b8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d8be: 4e5e unlk %fp 4d8c0: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4d8c2: 2003 movel %d3,%d0 4d8c4: 8084 orl %d4,%d0
4d8c6: 671c beqs 4d8e4 <rtems_string_to_long_long+0x94> <== NEVER TAKEN
4d8c8: 203c 7fff ffff movel #2147483647,%d0 4d8ce: 72ff moveq #-1,%d1 4d8d0: 9284 subl %d4,%d1 4d8d2: 9183 subxl %d3,%d0
4d8d4: 670e beqs 4d8e4 <rtems_string_to_long_long+0x94>
4d8d6: 203c 8000 0000 movel #-2147483648,%d0 4d8dc: 4281 clrl %d1 4d8de: 9284 subl %d4,%d1 4d8e0: 9183 subxl %d3,%d0
4d8e2: 66cc bnes 4d8b0 <rtems_string_to_long_long+0x60> <== NEVER TAKEN
(( result == 0 ) || ( result == LONG_LONG_MAX ) || ( result == LONG_LONG_MIN )))
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
4d8e4: 700a moveq #10,%d0
}
4d8e6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d8ec: 4e5e unlk %fp 4d8ee: 4e75 rts
result = strtoll( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4d8f0: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d8f2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d8f8: 4e5e unlk %fp 4d8fa: 4e75 rts
)
{
long long result;
char *end;
if ( !n )
4d8fc: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4d8fe: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4d904: 4e5e unlk %fp <== NOT EXECUTED
0004d9c0 <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
4d9c0: 4e56 ffe8 linkw %fp,#-24 4d9c4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d9c8: 242e 0008 movel %fp@(8),%d2 4d9cc: 246e 000c moveal %fp@(12),%a2 4d9d0: 286e 0010 moveal %fp@(16),%a4
unsigned long result;
char *end;
if ( !n )
4d9d4: 4a8a tstl %a2 4d9d6: 6700 008a beqw 4da62 <rtems_string_to_unsigned_char+0xa2>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d9da: 47f9 0005 0768 lea 50768 <__errno>,%a3 4d9e0: 4e93 jsr %a3@ 4d9e2: 2040 moveal %d0,%a0 4d9e4: 4290 clrl %a0@
*n = 0;
4d9e6: 4212 clrb %a2@
result = strtoul( s, &end, base );
4d9e8: 2f2e 0014 movel %fp@(20),%sp@- 4d9ec: 486e fffc pea %fp@(-4) 4d9f0: 2f02 movel %d2,%sp@- 4d9f2: 4eb9 0005 3770 jsr 53770 <strtoul>
if ( endptr )
4d9f8: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4d9fc: 2600 movel %d0,%d3
if ( endptr )
4d9fe: 4a8c tstl %a4
4da00: 6704 beqs 4da06 <rtems_string_to_unsigned_char+0x46>
*endptr = end;
4da02: 28ae fffc movel %fp@(-4),%a4@
if ( end == s )
4da06: b4ae fffc cmpl %fp@(-4),%d2
4da0a: 674a beqs 4da56 <rtems_string_to_unsigned_char+0x96>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4da0c: 4e93 jsr %a3@ 4da0e: 7222 moveq #34,%d1 4da10: 2040 moveal %d0,%a0 4da12: b290 cmpl %a0@,%d1
4da14: 6716 beqs 4da2c <rtems_string_to_unsigned_char+0x6c><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
4da16: 0c83 0000 00ff cmpil #255,%d3
4da1c: 6224 bhis 4da42 <rtems_string_to_unsigned_char+0x82><== NEVER TAKEN
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4da1e: 4280 clrl %d0 4da20: 1483 moveb %d3,%a2@
return RTEMS_SUCCESSFUL;
}
4da22: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da28: 4e5e unlk %fp 4da2a: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4da2c: 2003 movel %d3,%d0 <== NOT EXECUTED 4da2e: 5380 subql #1,%d0 <== NOT EXECUTED 4da30: 72fd moveq #-3,%d1 <== NOT EXECUTED 4da32: b280 cmpl %d0,%d1 <== NOT EXECUTED 4da34: 64e0 bccs 4da16 <rtems_string_to_unsigned_char+0x56><== NOT EXECUTED 4da36: 700a moveq #10,%d0 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4da38: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4da3e: 4e5e unlk %fp <== NOT EXECUTED 4da40: 4e75 rts <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4da42: 4e93 jsr %a3@ <== NOT EXECUTED 4da44: 7222 moveq #34,%d1 <== NOT EXECUTED 4da46: 2040 moveal %d0,%a0 <== NOT EXECUTED 4da48: 700a moveq #10,%d0 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4da4a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
errno = ERANGE;
4da50: 2081 movel %d1,%a0@ <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4da52: 4e5e unlk %fp <== NOT EXECUTED 4da54: 4e75 rts <== NOT EXECUTED
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4da56: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4da58: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da5e: 4e5e unlk %fp 4da60: 4e75 rts
)
{
unsigned long result;
char *end;
if ( !n )
4da62: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4da64: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da6a: 4e5e unlk %fp
...
0004da70 <rtems_string_to_unsigned_int>:
const char *s,
unsigned int *n,
char **endptr,
int base
)
{
4da70: 4e56 ffe8 linkw %fp,#-24 4da74: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4da78: 242e 0008 movel %fp@(8),%d2 4da7c: 246e 000c moveal %fp@(12),%a2 4da80: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4da84: 4a8a tstl %a2
4da86: 676c beqs 4daf4 <rtems_string_to_unsigned_int+0x84>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4da88: 49f9 0005 0768 lea 50768 <__errno>,%a4 4da8e: 4e94 jsr %a4@ 4da90: 2040 moveal %d0,%a0 4da92: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4da94: 2f2e 0014 movel %fp@(20),%sp@- 4da98: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4da9c: 4292 clrl %a2@
result = strtoul( s, &end, base );
4da9e: 2f02 movel %d2,%sp@- 4daa0: 4eb9 0005 3770 jsr 53770 <strtoul>
if ( endptr )
4daa6: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4daaa: 2600 movel %d0,%d3
if ( endptr )
4daac: 4a8b tstl %a3
4daae: 6704 beqs 4dab4 <rtems_string_to_unsigned_int+0x44>
*endptr = end;
4dab0: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4dab4: b4ae fffc cmpl %fp@(-4),%d2
4dab8: 672e beqs 4dae8 <rtems_string_to_unsigned_int+0x78>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4daba: 4e94 jsr %a4@ 4dabc: 7222 moveq #34,%d1 4dabe: 2040 moveal %d0,%a0 4dac0: b290 cmpl %a0@,%d1
4dac2: 670e beqs 4dad2 <rtems_string_to_unsigned_int+0x62>
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
4dac4: 2483 movel %d3,%a2@ 4dac6: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4dac8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dace: 4e5e unlk %fp 4dad0: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dad2: 2003 movel %d3,%d0 4dad4: 5380 subql #1,%d0 4dad6: 72fd moveq #-3,%d1 4dad8: b280 cmpl %d0,%d1
4dada: 64e8 bccs 4dac4 <rtems_string_to_unsigned_int+0x54><== NEVER TAKEN
4dadc: 700a moveq #10,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4dade: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dae4: 4e5e unlk %fp 4dae6: 4e75 rts
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4dae8: 700b moveq #11,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4daea: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4daf0: 4e5e unlk %fp 4daf2: 4e75 rts
)
{
unsigned long result;
char *end;
if ( !n )
4daf4: 7009 moveq #9,%d0
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
4daf6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dafc: 4e5e unlk %fp <== NOT EXECUTED
0004dba8 <rtems_string_to_unsigned_long>:
const char *s,
unsigned long *n,
char **endptr,
int base
)
{
4dba8: 4e56 ffe8 linkw %fp,#-24 4dbac: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4dbb0: 242e 0008 movel %fp@(8),%d2 4dbb4: 246e 000c moveal %fp@(12),%a2 4dbb8: 266e 0010 moveal %fp@(16),%a3
unsigned long result;
char *end;
if ( !n )
4dbbc: 4a8a tstl %a2
4dbbe: 676c beqs 4dc2c <rtems_string_to_unsigned_long+0x84><== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
errno = 0;
4dbc0: 49f9 0005 0768 lea 50768 <__errno>,%a4 4dbc6: 4e94 jsr %a4@ 4dbc8: 2040 moveal %d0,%a0 4dbca: 4290 clrl %a0@
*n = 0;
result = strtoul( s, &end, base );
4dbcc: 2f2e 0014 movel %fp@(20),%sp@- 4dbd0: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4dbd4: 4292 clrl %a2@
result = strtoul( s, &end, base );
4dbd6: 2f02 movel %d2,%sp@- 4dbd8: 4eb9 0005 3770 jsr 53770 <strtoul>
if ( endptr )
4dbde: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
4dbe2: 2600 movel %d0,%d3
if ( endptr )
4dbe4: 4a8b tstl %a3
4dbe6: 6704 beqs 4dbec <rtems_string_to_unsigned_long+0x44>
*endptr = end;
4dbe8: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4dbec: b4ae fffc cmpl %fp@(-4),%d2
4dbf0: 672e beqs 4dc20 <rtems_string_to_unsigned_long+0x78><== NEVER TAKEN
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dbf2: 4e94 jsr %a4@ 4dbf4: 7222 moveq #34,%d1 4dbf6: 2040 moveal %d0,%a0 4dbf8: b290 cmpl %a0@,%d1
4dbfa: 670e beqs 4dc0a <rtems_string_to_unsigned_long+0x62><== NEVER TAKEN
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4dbfc: 2483 movel %d3,%a2@ 4dbfe: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
4dc00: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dc06: 4e5e unlk %fp 4dc08: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4dc0a: 2003 movel %d3,%d0 4dc0c: 5380 subql #1,%d0 4dc0e: 72fd moveq #-3,%d1 4dc10: b280 cmpl %d0,%d1
4dc12: 64e8 bccs 4dbfc <rtems_string_to_unsigned_long+0x54><== NEVER TAKEN
4dc14: 700a moveq #10,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc16: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dc1c: 4e5e unlk %fp 4dc1e: 4e75 rts
result = strtoul( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4dc20: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc22: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4dc28: 4e5e unlk %fp 4dc2a: 4e75 rts
)
{
unsigned long result;
char *end;
if ( !n )
4dc2c: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4dc2e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4dc34: 4e5e unlk %fp <== NOT EXECUTED
0004db00 <rtems_string_to_unsigned_long_long>:
const char *s,
unsigned long long *n,
char **endptr,
int base
)
{
4db00: 4e56 ffdc linkw %fp,#-36 4db04: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 4db08: 242e 0008 movel %fp@(8),%d2 4db0c: 246e 000c moveal %fp@(12),%a2 4db10: 266e 0010 moveal %fp@(16),%a3
unsigned long long result;
char *end;
if ( !n )
4db14: 4a8a tstl %a2 4db16: 6700 0084 beqw 4db9c <rtems_string_to_unsigned_long_long+0x9c>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4db1a: 49f9 0005 0768 lea 50768 <__errno>,%a4 4db20: 4e94 jsr %a4@ 4db22: 2040 moveal %d0,%a0
*n = 0;
4db24: 4280 clrl %d0 4db26: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4db28: 4290 clrl %a0@
*n = 0;
4db2a: 2480 movel %d0,%a2@ 4db2c: 2541 0004 movel %d1,%a2@(4)
result = strtoull( s, &end, base );
4db30: 2f2e 0014 movel %fp@(20),%sp@- 4db34: 486e fffc pea %fp@(-4) 4db38: 2f02 movel %d2,%sp@- 4db3a: 4eb9 0005 3790 jsr 53790 <strtoull>
if ( endptr )
4db40: 4fef 000c lea %sp@(12),%sp
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoull( s, &end, base );
4db44: 2600 movel %d0,%d3 4db46: 2801 movel %d1,%d4
if ( endptr )
4db48: 4a8b tstl %a3
4db4a: 6704 beqs 4db50 <rtems_string_to_unsigned_long_long+0x50>
*endptr = end;
4db4c: 26ae fffc movel %fp@(-4),%a3@
if ( end == s )
4db50: b4ae fffc cmpl %fp@(-4),%d2
4db54: 673a beqs 4db90 <rtems_string_to_unsigned_long_long+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4db56: 4e94 jsr %a4@ 4db58: 7222 moveq #34,%d1 4db5a: 2040 moveal %d0,%a0 4db5c: b290 cmpl %a0@,%d1
4db5e: 6712 beqs 4db72 <rtems_string_to_unsigned_long_long+0x72>
(( result == 0 ) || ( result == ULONG_LONG_MAX )))
return RTEMS_INVALID_NUMBER;
*n = result;
4db60: 4280 clrl %d0 4db62: 2483 movel %d3,%a2@ 4db64: 2544 0004 movel %d4,%a2@(4)
return RTEMS_SUCCESSFUL;
}
4db68: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4db6e: 4e5e unlk %fp 4db70: 4e75 rts
*endptr = end;
if ( end == s )
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
4db72: 70ff moveq #-1,%d0 4db74: 72ff moveq #-1,%d1 4db76: 7aff moveq #-1,%d5 4db78: 7cfd moveq #-3,%d6 4db7a: d284 addl %d4,%d1 4db7c: d183 addxl %d3,%d0 4db7e: 9c81 subl %d1,%d6 4db80: 9b80 subxl %d0,%d5
4db82: 64dc bccs 4db60 <rtems_string_to_unsigned_long_long+0x60><== NEVER TAKEN
4db84: 700a moveq #10,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4db86: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4db8c: 4e5e unlk %fp 4db8e: 4e75 rts
result = strtoull( s, &end, base );
if ( endptr )
*endptr = end;
if ( end == s )
4db90: 700b moveq #11,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4db92: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4 4db98: 4e5e unlk %fp 4db9a: 4e75 rts
)
{
unsigned long long result;
char *end;
if ( !n )
4db9c: 7009 moveq #9,%d0
return RTEMS_INVALID_NUMBER;
*n = result;
return RTEMS_SUCCESSFUL;
}
4db9e: 4cee 1c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a4
4dba4: 4e5e unlk %fp <== NOT EXECUTED
0004ffb4 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4ffb4: 4e56 ffe4 linkw %fp,#-28 4ffb8: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4ffbc: 2a2e 0008 movel %fp@(8),%d5 4ffc0: 242e 000c movel %fp@(12),%d2 4ffc4: 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 )
4ffc8: 4a8c tstl %a4 4ffca: 6700 0154 beqw 50120 <rtems_task_mode+0x16c>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4ffce: 2479 0006 14e6 moveal 614e6 <_Thread_Executing>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ffd4: 4a2a 0075 tstb %a2@(117) 4ffd8: 57c0 seq %d0 4ffda: 263c 0000 0100 movel #256,%d3 4ffe0: 49c0 extbl %d0
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4ffe2: 266a 010a moveal %a2@(266),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4ffe6: c680 andl %d0,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4ffe8: 4aaa 007a tstl %a2@(122) 4ffec: 6600 00d4 bnew 500c2 <rtems_task_mode+0x10e>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
4fff0: 4a2b 0008 tstb %a3@(8) 4fff4: 57c0 seq %d0 4fff6: 283c 0000 0400 movel #1024,%d4 4fffc: 49c0 extbl %d0 4fffe: c880 andl %d0,%d4
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
50000: 4eb9 0004 9eac jsr 49eac <_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;
50006: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
50008: 8083 orl %d3,%d0 5000a: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
5000c: 0802 0008 btst #8,%d2
50010: 670e beqs 50020 <rtems_task_mode+0x6c>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
50012: 2005 movel %d5,%d0 50014: 7201 moveq #1,%d1 50016: e088 lsrl #8,%d0 50018: b380 eorl %d1,%d0 5001a: c081 andl %d1,%d0 5001c: 1540 0075 moveb %d0,%a2@(117)
if ( mask & RTEMS_TIMESLICE_MASK ) {
50020: 0802 0009 btst #9,%d2
50024: 6718 beqs 5003e <rtems_task_mode+0x8a>
if ( _Modes_Is_timeslice(mode_set) ) {
50026: 0805 0009 btst #9,%d5 5002a: 6700 00c2 beqw 500ee <rtems_task_mode+0x13a>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
5002e: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
50030: 41f9 0006 13dc lea 613dc <_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;
50036: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
5003a: 2550 0076 movel %a0@,%a2@(118)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
5003e: 7007 moveq #7,%d0 50040: c082 andl %d2,%d0
50042: 6712 beqs 50056 <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 ) );
50044: 40c0 movew %sr,%d0 50046: 7207 moveq #7,%d1 50048: c285 andl %d5,%d1 5004a: 0280 0000 f8ff andil #63743,%d0 50050: e189 lsll #8,%d1 50052: 8081 orl %d1,%d0 50054: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
50056: 0802 000a btst #10,%d2
5005a: 6758 beqs 500b4 <rtems_task_mode+0x100>
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
5005c: 700a moveq #10,%d0 5005e: e0ad lsrl %d0,%d5 50060: 7201 moveq #1,%d1
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
50062: 4280 clrl %d0 50064: 102b 0008 moveb %a3@(8),%d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
50068: b385 eorl %d1,%d5 5006a: ca81 andl %d1,%d5
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
5006c: ba80 cmpl %d0,%d5
5006e: 6744 beqs 500b4 <rtems_task_mode+0x100>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
50070: 203c 0000 0700 movel #1792,%d0
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
50076: 1745 0008 moveb %d5,%a3@(8) 5007a: 40c1 movew %sr,%d1 5007c: 8081 orl %d1,%d0 5007e: 46c0 movew %d0,%sr
_signals = information->signals_pending;
50080: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
50084: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
5008a: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
5008e: 46c1 movew %d1,%sr
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
50090: 4aab 0012 tstl %a3@(18)
50094: 671e beqs 500b4 <rtems_task_mode+0x100>
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
50096: 7203 moveq #3,%d1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
50098: 7001 moveq #1,%d0 5009a: 7401 moveq #1,%d2 5009c: 1540 0074 moveb %d0,%a2@(116)
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500a0: b2b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d1
500a6: 6758 beqs 50100 <rtems_task_mode+0x14c> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
500a8: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
500aa: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 500b0: 4e5e unlk %fp 500b2: 4e75 rts
executing->do_post_task_switch_extension = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500b4: 7203 moveq #3,%d1
if ( is_asr_enabled != asr->is_enabled ) {
asr->is_enabled = is_asr_enabled;
_ASR_Swap_signals( asr );
if ( _ASR_Are_signals_pending( asr ) ) {
needs_asr_dispatching = true;
executing->do_post_task_switch_extension = true;
500b6: 4202 clrb %d2
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
500b8: b2b9 0006 15b4 cmpl 615b4 <_System_state_Current>,%d1
500be: 66e8 bnes 500a8 <rtems_task_mode+0xf4> <== NEVER TAKEN
500c0: 603e bras 50100 <rtems_task_mode+0x14c>
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
500c2: 4a2b 0008 tstb %a3@(8) 500c6: 57c0 seq %d0 500c8: 283c 0000 0400 movel #1024,%d4 500ce: 49c0 extbl %d0 500d0: c880 andl %d0,%d4
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
old_mode |= _ISR_Get_level();
500d2: 4eb9 0004 9eac jsr 49eac <_CPU_ISR_Get_level>
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
500d8: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
500dc: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
*previous_mode_set = old_mode;
500de: 8083 orl %d3,%d0 500e0: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
500e2: 0802 0008 btst #8,%d2 500e6: 6700 ff38 beqw 50020 <rtems_task_mode+0x6c> 500ea: 6000 ff26 braw 50012 <rtems_task_mode+0x5e>
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
500ee: 7007 moveq #7,%d0 500f0: c082 andl %d2,%d0
if ( mask & RTEMS_TIMESLICE_MASK ) {
if ( _Modes_Is_timeslice(mode_set) ) {
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
} else
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
500f2: 42aa 007a clrl %a2@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
500f6: 4a80 tstl %d0 500f8: 6700 ff5c beqw 50056 <rtems_task_mode+0xa2> 500fc: 6000 ff46 braw 50044 <rtems_task_mode+0x90>
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
50100: 4eb9 0005 0310 jsr 50310 <_Thread_Evaluate_mode> 50106: 4a00 tstb %d0
50108: 6604 bnes 5010e <rtems_task_mode+0x15a>
5010a: 4a02 tstb %d2
5010c: 679a beqs 500a8 <rtems_task_mode+0xf4>
_Thread_Dispatch();
5010e: 4eb9 0004 87b4 jsr 487b4 <_Thread_Dispatch> 50114: 4280 clrl %d0
return RTEMS_SUCCESSFUL;
}
50116: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 5011c: 4e5e unlk %fp 5011e: 4e75 rts
ASR_Information *asr;
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
50120: 7009 moveq #9,%d0
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
50122: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4
50128: 4e5e unlk %fp <== NOT EXECUTED
0004af5c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4af5c: 4e56 fffc linkw %fp,#-4 4af60: 2f0a movel %a2,%sp@- 4af62: 246e 0010 moveal %fp@(16),%a2 4af66: 2f02 movel %d2,%sp@- 4af68: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4af6c: 670c beqs 4af7a <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 ) &&
4af6e: 4280 clrl %d0 4af70: 1039 0006 3ec2 moveb 63ec2 <rtems_maximum_priority>,%d0 4af76: b082 cmpl %d2,%d0
4af78: 6566 bcss 4afe0 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af7a: 4a8a tstl %a2
4af7c: 6770 beqs 4afee <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4af7e: 486e fffc pea %fp@(-4) 4af82: 2f2e 0008 movel %fp@(8),%sp@- 4af86: 4eb9 0004 cf50 jsr 4cf50 <_Thread_Get>
switch ( location ) {
4af8c: 508f addql #8,%sp 4af8e: 4aae fffc tstl %fp@(-4)
4af92: 663e bnes 4afd2 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4af94: 2040 moveal %d0,%a0 4af96: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4af9a: 4a82 tstl %d2
4af9c: 6720 beqs 4afbe <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4af9e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4afa2: 4aa8 001c tstl %a0@(28)
4afa6: 6706 beqs 4afae <rtems_task_set_priority+0x52>
the_thread->current_priority > new_priority )
4afa8: b4a8 0014 cmpl %a0@(20),%d2
4afac: 6410 bccs 4afbe <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
_Thread_Change_priority( the_thread, new_priority, false );
4afae: 42a7 clrl %sp@- 4afb0: 2f02 movel %d2,%sp@- 4afb2: 2f00 movel %d0,%sp@- 4afb4: 4eb9 0004 c9d8 jsr 4c9d8 <_Thread_Change_priority> 4afba: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4afbe: 4eb9 0004 cef8 jsr 4cef8 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afc4: 242e fff4 movel %fp@(-12),%d2
the_thread->real_priority = new_priority;
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
4afc8: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afca: 246e fff8 moveal %fp@(-8),%a2 4afce: 4e5e unlk %fp 4afd0: 4e75 rts 4afd2: 242e fff4 movel %fp@(-12),%d2
if ( !old_priority )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
switch ( location ) {
4afd6: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afd8: 246e fff8 moveal %fp@(-8),%a2 4afdc: 4e5e unlk %fp 4afde: 4e75 rts 4afe0: 242e fff4 movel %fp@(-12),%d2 4afe4: 7013 moveq #19,%d0 4afe6: 246e fff8 moveal %fp@(-8),%a2 4afea: 4e5e unlk %fp 4afec: 4e75 rts 4afee: 242e fff4 movel %fp@(-12),%d2
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4aff2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4aff4: 246e fff8 moveal %fp@(-8),%a2
4aff8: 4e5e unlk %fp <== NOT EXECUTED
00047888 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47888: 4e56 fffc linkw %fp,#-4 4788c: 2f02 movel %d2,%sp@- 4788e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47892: 6762 beqs 478f6 <rtems_task_variable_delete+0x6e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47894: 486e fffc pea %fp@(-4) 47898: 2f2e 0008 movel %fp@(8),%sp@- 4789c: 4eb9 0004 96b4 jsr 496b4 <_Thread_Get>
switch (location) {
478a2: 508f addql #8,%sp 478a4: 4aae fffc tstl %fp@(-4)
478a8: 663c bnes 478e6 <rtems_task_variable_delete+0x5e>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
478aa: 2240 moveal %d0,%a1 478ac: 2069 011a moveal %a1@(282),%a0
while (tvp) {
478b0: 4a88 tstl %a0
478b2: 673c beqs 478f0 <rtems_task_variable_delete+0x68>
if (tvp->ptr == ptr) {
478b4: b4a8 0004 cmpl %a0@(4),%d2
478b8: 6746 beqs 47900 <rtems_task_variable_delete+0x78>
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
478ba: 2248 moveal %a0,%a1
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
478bc: 2050 moveal %a0@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
478be: 4a88 tstl %a0
478c0: 672e beqs 478f0 <rtems_task_variable_delete+0x68><== NEVER TAKEN
if (tvp->ptr == ptr) {
478c2: b4a8 0004 cmpl %a0@(4),%d2
478c6: 66f2 bnes 478ba <rtems_task_variable_delete+0x32>
if (prev)
prev->next = tvp->next;
478c8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
478ca: 2f08 movel %a0,%sp@- 478cc: 2f00 movel %d0,%sp@- 478ce: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
478d4: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
478da: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
478dc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478de: 242e fff8 movel %fp@(-8),%d2 478e2: 4e5e unlk %fp 478e4: 4e75 rts 478e6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
switch (location) {
478ea: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478ec: 4e5e unlk %fp 478ee: 4e75 rts
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478f0: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478f6: 242e fff8 movel %fp@(-8),%d2
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
478fa: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478fc: 4e5e unlk %fp 478fe: 4e75 rts
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
47900: 2240 moveal %d0,%a1 47902: 2350 011a movel %a0@,%a1@(282)
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47906: 2f08 movel %a0,%sp@- 47908: 2f00 movel %d0,%sp@- 4790a: 4eb9 0004 79a8 jsr 479a8 <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47910: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47916: 508f addql #8,%sp
prev->next = tvp->next;
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
47918: 4280 clrl %d0 4791a: 60c2 bras 478de <rtems_task_variable_delete+0x56>
0004791c <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
4791c: 4e56 fffc linkw %fp,#-4 47920: 2f0a movel %a2,%sp@- 47922: 246e 0010 moveal %fp@(16),%a2 47926: 2f02 movel %d2,%sp@- 47928: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
4792c: 6752 beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
4792e: 4a8a tstl %a2
47930: 674e beqs 47980 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47932: 486e fffc pea %fp@(-4) 47936: 2f2e 0008 movel %fp@(8),%sp@- 4793a: 4eb9 0004 96b4 jsr 496b4 <_Thread_Get>
switch (location) {
47940: 508f addql #8,%sp 47942: 4aae fffc tstl %fp@(-4)
47946: 662a bnes 47972 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
47948: 2240 moveal %d0,%a1 4794a: 2069 011a moveal %a1@(282),%a0
while (tvp) {
4794e: 4a88 tstl %a0
47950: 670c beqs 4795e <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47952: b4a8 0004 cmpl %a0@(4),%d2
47956: 6736 beqs 4798e <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
47958: 2050 moveal %a0@,%a0
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
while (tvp) {
4795a: 4a88 tstl %a0
4795c: 66f4 bnes 47952 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
4795e: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47964: 242e fff4 movel %fp@(-12),%d2
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47968: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4796a: 246e fff8 moveal %fp@(-8),%a2 4796e: 4e5e unlk %fp 47970: 4e75 rts 47972: 242e fff4 movel %fp@(-12),%d2
if ( !result )
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
switch (location) {
47976: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47978: 246e fff8 moveal %fp@(-8),%a2 4797c: 4e5e unlk %fp 4797e: 4e75 rts 47980: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
47984: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47986: 246e fff8 moveal %fp@(-8),%a2 4798a: 4e5e unlk %fp 4798c: 4e75 rts
if (tvp->ptr == ptr) {
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
4798e: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
47992: 4eb9 0004 968c jsr 4968c <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47998: 242e fff4 movel %fp@(-12),%d2
/*
* Should this return the current (i.e not the
* saved) value if `tid' is the current task?
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
4799c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4799e: 246e fff8 moveal %fp@(-8),%a2 479a2: 4e5e unlk %fp
...
00045024 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45024: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
45026: 4e56 0000 linkw %fp,#0 4502a: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
4502e: b280 cmpl %d0,%d1 45030: 6700 010a beqw 4513c <rtems_termios_baud_to_index+0x118>
45034: 6c32 bges 45068 <rtems_termios_baud_to_index+0x44><== ALWAYS TAKEN
45036: 720e moveq #14,%d1 <== NOT EXECUTED 45038: b280 cmpl %d0,%d1 <== NOT EXECUTED 4503a: 6700 00d6 beqw 45112 <rtems_termios_baud_to_index+0xee><== NOT EXECUTED 4503e: 6c56 bges 45096 <rtems_termios_baud_to_index+0x72><== NOT EXECUTED 45040: 0c80 0000 1002 cmpil #4098,%d0 <== NOT EXECUTED 45046: 6700 00e2 beqw 4512a <rtems_termios_baud_to_index+0x106><== NOT EXECUTED 4504a: 6f00 0098 blew 450e4 <rtems_termios_baud_to_index+0xc0><== NOT EXECUTED 4504e: 0c80 0000 1003 cmpil #4099,%d0 <== NOT EXECUTED 45054: 6700 00b6 beqw 4510c <rtems_termios_baud_to_index+0xe8><== NOT EXECUTED 45058: 0c80 0000 1004 cmpil #4100,%d0 <== NOT EXECUTED 4505e: 6700 009a beqw 450fa <rtems_termios_baud_to_index+0xd6><== NOT EXECUTED
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
case B460800: baud_index = 19; break;
45062: 70ff moveq #-1,%d0
default: baud_index = -1; break;
}
return baud_index;
}
45064: 4e5e unlk %fp 45066: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45068: 123c 0004 moveb #4,%d1 4506c: b280 cmpl %d0,%d1 4506e: 6700 00d2 beqw 45142 <rtems_termios_baud_to_index+0x11e>
45072: 6d46 blts 450ba <rtems_termios_baud_to_index+0x96><== NEVER TAKEN
45074: 123c 0001 moveb #1,%d1 45078: b280 cmpl %d0,%d1 4507a: 6700 00a2 beqw 4511e <rtems_termios_baud_to_index+0xfa> 4507e: 6c00 00c8 bgew 45148 <rtems_termios_baud_to_index+0x124>
45082: 7202 moveq #2,%d1 <== NOT EXECUTED 45084: b280 cmpl %d0,%d1 <== NOT EXECUTED 45086: 677e beqs 45106 <rtems_termios_baud_to_index+0xe2><== NOT EXECUTED 45088: 123c 0003 moveb #3,%d1 <== NOT EXECUTED 4508c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4508e: 66d2 bnes 45062 <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
45090: 7003 moveq #3,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45092: 4e5e unlk %fp <== NOT EXECUTED 45094: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45096: 123c 000b moveb #11,%d1 <== NOT EXECUTED 4509a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4509c: 6700 0086 beqw 45124 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED 450a0: 6e3c bgts 450de <rtems_termios_baud_to_index+0xba><== NOT EXECUTED 450a2: 123c 000c moveb #12,%d1 <== NOT EXECUTED 450a6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450a8: 6700 008c beqw 45136 <rtems_termios_baud_to_index+0x112><== NOT EXECUTED 450ac: 123c 000d moveb #13,%d1 <== NOT EXECUTED 450b0: b280 cmpl %d0,%d1 <== NOT EXECUTED 450b2: 66ae bnes 45062 <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
450b4: 700d moveq #13,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450b6: 4e5e unlk %fp <== NOT EXECUTED 450b8: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
450ba: 7206 moveq #6,%d1 <== NOT EXECUTED 450bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 450be: 6758 beqs 45118 <rtems_termios_baud_to_index+0xf4><== NOT EXECUTED 450c0: 6e16 bgts 450d8 <rtems_termios_baud_to_index+0xb4><== NOT EXECUTED 450c2: 123c 0007 moveb #7,%d1 <== NOT EXECUTED 450c6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450c8: 6766 beqs 45130 <rtems_termios_baud_to_index+0x10c><== NOT EXECUTED 450ca: 123c 0008 moveb #8,%d1 <== NOT EXECUTED 450ce: b280 cmpl %d0,%d1 <== NOT EXECUTED 450d0: 6690 bnes 45062 <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
450d2: 7008 moveq #8,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450d4: 4e5e unlk %fp <== NOT EXECUTED 450d6: 4e75 rts <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
450d8: 7005 moveq #5,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450da: 4e5e unlk %fp <== NOT EXECUTED 450dc: 4e75 rts <== NOT EXECUTED
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
450de: 700a moveq #10,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450e0: 4e5e unlk %fp <== NOT EXECUTED 450e2: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
450e4: 720f moveq #15,%d1 <== NOT EXECUTED 450e6: b280 cmpl %d0,%d1 <== NOT EXECUTED 450e8: 6716 beqs 45100 <rtems_termios_baud_to_index+0xdc><== NOT EXECUTED 450ea: 0c80 0000 1001 cmpil #4097,%d0 <== NOT EXECUTED 450f0: 6600 ff70 bnew 45062 <rtems_termios_baud_to_index+0x3e><== NOT EXECUTED
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
450f4: 7010 moveq #16,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450f6: 4e5e unlk %fp <== NOT EXECUTED 450f8: 4e75 rts <== NOT EXECUTED
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
450fa: 7013 moveq #19,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
450fc: 4e5e unlk %fp <== NOT EXECUTED 450fe: 4e75 rts <== NOT EXECUTED
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
45100: 700f moveq #15,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45102: 4e5e unlk %fp <== NOT EXECUTED 45104: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45106: 7002 moveq #2,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45108: 4e5e unlk %fp <== NOT EXECUTED 4510a: 4e75 rts <== NOT EXECUTED
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
case B115200: baud_index = 17; break;
4510c: 7012 moveq #18,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4510e: 4e5e unlk %fp <== NOT EXECUTED 45110: 4e75 rts <== NOT EXECUTED
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
45112: 700e moveq #14,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45114: 4e5e unlk %fp <== NOT EXECUTED 45116: 4e75 rts <== NOT EXECUTED
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
45118: 7006 moveq #6,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4511a: 4e5e unlk %fp <== NOT EXECUTED 4511c: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4511e: 7001 moveq #1,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45120: 4e5e unlk %fp <== NOT EXECUTED 45122: 4e75 rts <== NOT EXECUTED
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
45124: 700b moveq #11,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45126: 4e5e unlk %fp <== NOT EXECUTED 45128: 4e75 rts <== NOT EXECUTED
case B2400: baud_index = 11; break;
case B4800: baud_index = 12; break;
case B9600: baud_index = 13; break;
case B19200: baud_index = 14; break;
case B38400: baud_index = 15; break;
case B57600: baud_index = 16; break;
4512a: 7011 moveq #17,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4512c: 4e5e unlk %fp <== NOT EXECUTED 4512e: 4e75 rts <== NOT EXECUTED
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
45130: 7007 moveq #7,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45132: 4e5e unlk %fp <== NOT EXECUTED 45134: 4e75 rts <== NOT EXECUTED
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
case B1200: baud_index = 9; break;
case B1800: baud_index = 10; break;
case B2400: baud_index = 11; break;
45136: 700c moveq #12,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45138: 4e5e unlk %fp <== NOT EXECUTED 4513a: 4e75 rts <== NOT EXECUTED
case B110: baud_index = 3; break;
case B134: baud_index = 4; break;
case B150: baud_index = 5; break;
case B200: baud_index = 6; break;
case B300: baud_index = 7; break;
case B600: baud_index = 8; break;
4513c: 7009 moveq #9,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4513e: 4e5e unlk %fp <== NOT EXECUTED 45140: 4e75 rts <== NOT EXECUTED
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
45142: 7004 moveq #4,%d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45144: 4e5e unlk %fp <== NOT EXECUTED 45146: 4e75 rts <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45148: 4a80 tstl %d0 4514a: 6600 ff16 bnew 45062 <rtems_termios_baud_to_index+0x3e>
4514e: 4280 clrl %d0 <== NOT EXECUTED
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45150: 4e5e unlk %fp <== NOT EXECUTED
00043da8 <rtems_termios_baud_to_number>:
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;
43da8: 203c 0000 04b0 movel #1200,%d0
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
43dae: 4e56 0000 linkw %fp,#0 43db2: 222e 0008 movel %fp@(8),%d1 43db6: 2f02 movel %d2,%sp@-
int32_t baud;
switch (termios_baud) {
43db8: 7409 moveq #9,%d2 43dba: b481 cmpl %d1,%d2
43dbc: 6740 beqs 43dfe <rtems_termios_baud_to_number+0x56>
43dbe: 6c44 bges 43e04 <rtems_termios_baud_to_number+0x5c>
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;
43dc0: 203c 0000 4b00 movel #19200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dc6: 740e moveq #14,%d2 43dc8: b481 cmpl %d1,%d2
43dca: 6732 beqs 43dfe <rtems_termios_baud_to_number+0x56>
43dcc: 6c68 bges 43e36 <rtems_termios_baud_to_number+0x8e>
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;
43dce: 203c 0001 c200 movel #115200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dd4: 0c81 0000 1002 cmpil #4098,%d1
43dda: 6722 beqs 43dfe <rtems_termios_baud_to_number+0x56>
43ddc: 6f00 00c0 blew 43e9e <rtems_termios_baud_to_number+0xf6>
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;
43de0: 203c 0003 8400 movel #230400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43de6: 0c81 0000 1003 cmpil #4099,%d1
43dec: 6710 beqs 43dfe <rtems_termios_baud_to_number+0x56>
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;
43dee: 203c 0007 0800 movel #460800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43df4: 0c81 0000 1004 cmpil #4100,%d1
43dfa: 6702 beqs 43dfe <rtems_termios_baud_to_number+0x56><== ALWAYS TAKEN
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;
43dfc: 70ff moveq #-1,%d0
default: baud = -1; break;
}
return baud;
}
43dfe: 241f movel %sp@+,%d2 43e00: 4e5e unlk %fp 43e02: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e04: 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;
43e08: 303c 0086 movew #134,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e0c: b481 cmpl %d1,%d2
43e0e: 67ee beqs 43dfe <rtems_termios_baud_to_number+0x56> 43e10: 6d54 blts 43e66 <rtems_termios_baud_to_number+0xbe>
43e12: 103c 0001 moveb #1,%d0 43e16: b081 cmpl %d1,%d0 43e18: 6700 00a6 beqw 43ec0 <rtems_termios_baud_to_number+0x118> 43e1c: 6c00 00b2 bgew 43ed0 <rtems_termios_baud_to_number+0x128> 43e20: 7402 moveq #2,%d2 43e22: b481 cmpl %d1,%d2 43e24: 6700 00a2 beqw 43ec8 <rtems_termios_baud_to_number+0x120> 43e28: 7003 moveq #3,%d0 43e2a: b081 cmpl %d1,%d0
43e2c: 66ce bnes 43dfc <rtems_termios_baud_to_number+0x54><== NEVER TAKEN
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e2e: 241f movel %sp@+,%d2
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
43e30: 706e moveq #110,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e32: 4e5e unlk %fp 43e34: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e36: 143c 000b moveb #11,%d2
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
43e3a: 303c 0960 movew #2400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e3e: b481 cmpl %d1,%d2
43e40: 67bc beqs 43dfe <rtems_termios_baud_to_number+0x56>
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;
43e42: 303c 0708 movew #1800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e46: b481 cmpl %d1,%d2
43e48: 6eb4 bgts 43dfe <rtems_termios_baud_to_number+0x56>
43e4a: 143c 000c moveb #12,%d2
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
43e4e: 303c 12c0 movew #4800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e52: b481 cmpl %d1,%d2
43e54: 67a8 beqs 43dfe <rtems_termios_baud_to_number+0x56>
43e56: 143c 000d moveb #13,%d2
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
43e5a: 303c 2580 movew #9600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e5e: b481 cmpl %d1,%d2
43e60: 679c beqs 43dfe <rtems_termios_baud_to_number+0x56><== ALWAYS TAKEN
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;
43e62: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e64: 6098 bras 43dfe <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
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;
43e66: 203c 0000 00c8 movel #200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e6c: 7406 moveq #6,%d2 43e6e: b481 cmpl %d1,%d2
43e70: 678c beqs 43dfe <rtems_termios_baud_to_number+0x56>
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;
43e72: 0680 ffff ffce addil #-50,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e78: b481 cmpl %d1,%d2
43e7a: 6e82 bgts 43dfe <rtems_termios_baud_to_number+0x56>
43e7c: 143c 0007 moveb #7,%d2
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
43e80: 303c 012c movew #300,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e84: b481 cmpl %d1,%d2 43e86: 6700 ff76 beqw 43dfe <rtems_termios_baud_to_number+0x56> 43e8a: 143c 0008 moveb #8,%d2
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
43e8e: 303c 0258 movew #600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e92: b481 cmpl %d1,%d2 43e94: 6700 ff68 beqw 43dfe <rtems_termios_baud_to_number+0x56>
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;
43e98: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e9a: 6000 ff62 braw 43dfe <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e9e: 740f moveq #15,%d2
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
43ea0: 203c 0000 9600 movel #38400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43ea6: b481 cmpl %d1,%d2 43ea8: 6700 ff54 beqw 43dfe <rtems_termios_baud_to_number+0x56>
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;
43eac: 303c e100 movew #-7936,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43eb0: 0c81 0000 1001 cmpil #4097,%d1 43eb6: 6700 ff46 beqw 43dfe <rtems_termios_baud_to_number+0x56>
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;
43eba: 70ff moveq #-1,%d0 <== NOT EXECUTED 43ebc: 6000 ff40 braw 43dfe <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
default: baud = -1; break;
}
return baud;
}
43ec0: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43ec2: 7032 moveq #50,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43ec4: 4e5e unlk %fp 43ec6: 4e75 rts 43ec8: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43eca: 704b moveq #75,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43ecc: 4e5e unlk %fp 43ece: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43ed0: 4a81 tstl %d1 43ed2: 6600 ff28 bnew 43dfc <rtems_termios_baud_to_number+0x54>
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43ed6: 241f movel %sp@+,%d2
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43ed8: 4280 clrl %d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43eda: 4e5e unlk %fp
...
00043f1c <rtems_termios_bufsize>:
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
43f1c: 4280 clrl %d0 <== NOT EXECUTED
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
43f1e: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
43f22: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 43f26: 23d0 0005 fcb0 movel %a0@,5fcb0 <rtems_termios_cbufsize> <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
43f2c: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 43f30: 23d0 0005 fcb4 movel %a0@,5fcb4 <rtems_termios_raw_input_size><== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
43f36: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
43f3a: 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;
43f3c: 23d0 0005 fcb8 movel %a0@,5fcb8 <rtems_termios_raw_output_size><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
0004550c <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4550c: 4e56 fff4 linkw %fp,#-12 45510: 48d7 1c00 moveml %a2-%a4,%sp@ 45514: 266e 0008 moveal %fp@(8),%a3
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45518: 49f9 0004 6704 lea 46704 <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;
4551e: 2053 moveal %a3@,%a0 45520: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45524: 42a7 clrl %sp@- 45526: 42a7 clrl %sp@- 45528: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- 4552e: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
45530: 4fef 000c lea %sp@(12),%sp 45534: 4a80 tstl %d0 45536: 6600 011c bnew 45654 <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
4553a: 202a 0008 movel %a2@(8),%d0 4553e: 5380 subql #1,%d0 45540: 2540 0008 movel %d0,%a2@(8) 45544: 6600 00a4 bnew 455ea <rtems_termios_close+0xde>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
45548: 202a 00cc movel %a2@(204),%d0 4554c: 41f9 0006 0acc lea 60acc <rtems_termios_linesw>,%a0 45552: e788 lsll #3,%d0 45554: 2070 0c04 moveal %a0@(00000004,%d0:l:4),%a0 45558: 4a88 tstl %a0 4555a: 6700 012c beqw 45688 <rtems_termios_close+0x17c>
/* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4555e: 2f0a movel %a2,%sp@-
45560: 4e90 jsr %a0@ <== NOT EXECUTED 45562: 588f addql #4,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts
45564: 7002 moveq #2,%d0 <== NOT EXECUTED 45566: b0aa 00b4 cmpl %a2@(180),%d0 <== NOT EXECUTED 4556a: 6700 00c0 beqw 4562c <rtems_termios_close+0x120> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
4556e: 206a 009c moveal %a2@(156),%a0 45572: 4a88 tstl %a0
45574: 6710 beqs 45586 <rtems_termios_close+0x7a> (*tty->device.lastClose)(tty->major, tty->minor, arg);
45576: 2f0b movel %a3,%sp@- 45578: 2f2a 0010 movel %a2@(16),%sp@- 4557c: 2f2a 000c movel %a2@(12),%sp@- 45580: 4e90 jsr %a0@ 45582: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
45586: 2052 moveal %a2@,%a0 45588: 4a88 tstl %a0 4558a: 6700 00d0 beqw 4565c <rtems_termios_close+0x150>
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
4558e: 216a 0004 0004 movel %a2@(4),%a0@(4)
}
if (tty->back == NULL) {
45594: 206a 0004 moveal %a2@(4),%a0 45598: 4a88 tstl %a0 4559a: 6700 00d8 beqw 45674 <rtems_termios_close+0x168>
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
4559e: 2092 movel %a2@,%a0@
} rtems_semaphore_delete (tty->isem);
455a0: 2f2a 0014 movel %a2@(20),%sp@- 455a4: 47f9 0004 662c lea 4662c <rtems_semaphore_delete>,%a3 455aa: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
455ac: 2f2a 0018 movel %a2@(24),%sp@- 455b0: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
455b2: 2f2a 008c movel %a2@(140),%sp@- 455b6: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
455b8: 4fef 000c lea %sp@(12),%sp 455bc: 4aaa 00a0 tstl %a2@(160)
455c0: 6740 beqs 45602 <rtems_termios_close+0xf6> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
455c2: 7002 moveq #2,%d0 455c4: b0aa 00b4 cmpl %a2@(180),%d0
455c8: 6738 beqs 45602 <rtems_termios_close+0xf6> <== NEVER TAKEN
rtems_semaphore_delete (tty->rawInBuf.Semaphore); free (tty->rawInBuf.theBuf);
455ca: 2f2a 0058 movel %a2@(88),%sp@- 455ce: 47f9 0004 2ddc lea 42ddc <free>,%a3 455d4: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
455d6: 2f2a 007c movel %a2@(124),%sp@- 455da: 4e93 jsr %a3@
free (tty->cbuf);
455dc: 2f2a 001c movel %a2@(28),%sp@- 455e0: 4e93 jsr %a3@
free (tty);
455e2: 2f0a movel %a2,%sp@- 455e4: 4e93 jsr %a3@ 455e6: 4fef 0010 lea %sp@(16),%sp
} rtems_semaphore_release (rtems_termios_ttyMutex);
455ea: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- 455f0: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
455f6: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 455fc: 4280 clrl %d0 455fe: 4e5e unlk %fp 45600: 4e75 rts
rtems_semaphore_delete (tty->isem); rtems_semaphore_delete (tty->osem); rtems_semaphore_delete (tty->rawOutBuf.Semaphore); if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore);
45602: 2f2a 0068 movel %a2@(104),%sp@- 45606: 4e93 jsr %a3@ 45608: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
4560a: 47f9 0004 2ddc lea 42ddc <free>,%a3 45610: 2f2a 0058 movel %a2@(88),%sp@- 45614: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
45616: 2f2a 007c movel %a2@(124),%sp@- 4561a: 4e93 jsr %a3@
free (tty->cbuf);
4561c: 2f2a 001c movel %a2@(28),%sp@- 45620: 4e93 jsr %a3@
free (tty);
45622: 2f0a movel %a2,%sp@- 45624: 4e93 jsr %a3@ 45626: 4fef 0010 lea %sp@(16),%sp 4562a: 60be bras 455ea <rtems_termios_close+0xde>
if (tty->device.outputUsesInterrupts
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
4562c: 4878 0001 pea 1 <ADD>
45630: 49f9 0004 61ec lea 461ec <rtems_event_send>,%a4 <== NOT EXECUTED 45636: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4563a: 4e94 jsr %a4@ <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
4563c: 508f addql #8,%sp <== NOT EXECUTED 4563e: 4a80 tstl %d0 <== NOT EXECUTED 45640: 6612 bnes 45654 <rtems_termios_close+0x148> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
45642: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45646: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 4564a: 4e94 jsr %a4@ <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
4564c: 508f addql #8,%sp <== NOT EXECUTED 4564e: 4a80 tstl %d0 <== NOT EXECUTED 45650: 6700 ff1c beqw 4556e <rtems_termios_close+0x62> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
45654: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45656: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
4565c: 206a 0004 moveal %a2@(4),%a0 45660: 23c8 0006 1314 movel %a0,61314 <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
45666: 6748 beqs 456b0 <rtems_termios_close+0x1a4> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
45668: 4290 clrl %a0@
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
4566a: 206a 0004 moveal %a2@(4),%a0 <== NOT EXECUTED 4566e: 4a88 tstl %a0 <== NOT EXECUTED 45670: 6600 ff2c bnew 4559e <rtems_termios_close+0x92> <== NOT EXECUTED
45674: 2052 moveal %a2@,%a0
rtems_termios_ttyHead = tty->forw;
45676: 23c8 0006 1318 movel %a0,61318 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
4567c: 6700 ff22 beqw 455a0 <rtems_termios_close+0x94>
rtems_termios_ttyHead->back = NULL;
45680: 42a8 0004 clrl %a0@(4) 45684: 6000 ff1a braw 455a0 <rtems_termios_close+0x94>
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45688: 42a7 clrl %sp@- 4568a: 42a7 clrl %sp@- 4568c: 2f2a 0018 movel %a2@(24),%sp@- 45690: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
45692: 4fef 000c lea %sp@(12),%sp 45696: 4a80 tstl %d0
45698: 66ba bnes 45654 <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc); } drainOutput (tty);
4569a: 2f0a movel %a2,%sp@- 4569c: 4eba f6f0 jsr %pc@(44d8e <drainOutput>) 456a0: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts
456a2: 7002 moveq #2,%d0 456a4: b0aa 00b4 cmpl %a2@(180),%d0 456a8: 6600 fec4 bnew 4556e <rtems_termios_close+0x62> 456ac: 6000 ff7e braw 4562c <rtems_termios_close+0x120>
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
456b0: 42b9 0006 1318 clrl 61318 <rtems_termios_ttyHead> 456b6: 6000 fee8 braw 455a0 <rtems_termios_close+0x94>
00044192 <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)
{
44192: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
44196: 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)
{
4419a: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
4419e: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
441a2: 7002 moveq #2,%d0 441a4: b0a8 00b4 cmpl %a0@(180),%d0
441a8: 672a beqs 441d4 <rtems_termios_dequeue_characters+0x42><== NEVER TAKEN
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
441aa: 7005 moveq #5,%d0 441ac: b0a8 00cc cmpl %a0@(204),%d0
441b0: 670c beqs 441be <rtems_termios_dequeue_characters+0x2c><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
441b2: 2d48 0008 movel %a0,%fp@(8)
} }
441b6: 4e5e unlk %fp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
441b8: 4ef9 0004 3f60 jmp 43f60 <rtems_termios_refill_transmitter>
}
else if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
441be: 2279 0006 0b80 moveal 60b80 <rtems_termios_linesw+0xb4>,%a1 441c4: 4a89 tstl %a1
441c6: 6706 beqs 441ce <rtems_termios_dequeue_characters+0x3c><== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
441c8: 2f08 movel %a0,%sp@- <== NOT EXECUTED 441ca: 4e91 jsr %a1@ <== NOT EXECUTED 441cc: 588f addql #4,%sp <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
441ce: 4280 clrl %d0 <== NOT EXECUTED 441d0: 4e5e unlk %fp <== NOT EXECUTED 441d2: 4e75 rts <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
441d4: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 441d8: 2f28 00c8 movel %a0@(200),%sp@- <== NOT EXECUTED 441dc: 4eb9 0004 61ec jsr 461ec <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
441e2: 508f addql #8,%sp <== NOT EXECUTED 441e4: 4a80 tstl %d0 <== NOT EXECUTED 441e6: 67e6 beqs 441ce <rtems_termios_dequeue_characters+0x3c><== NOT EXECUTED
rtems_fatal_error_occurred (sc);
441e8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 441ea: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
000441f0 <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)
{
441f0: 4e56 ffcc linkw %fp,#-52 <== NOT EXECUTED 441f4: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 441f8: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
441fc: 49f9 0006 0acc lea 60acc <rtems_termios_linesw>,%a4 <== NOT EXECUTED 44202: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44206: eb88 lsll #5,%d0 <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
44208: 266e 000c moveal %fp@(12),%a3 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
4420c: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== 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)
{
44210: 262e 0010 movel %fp@(16),%d3 <== NOT EXECUTED
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
44214: 4a88 tstl %a0 <== NOT EXECUTED 44216: 6774 beqs 4428c <rtems_termios_enqueue_raw_characters+0x9c><== NOT EXECUTED
while (len--) {
44218: 4a83 tstl %d3 <== NOT EXECUTED 4421a: 6734 beqs 44250 <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED 4421c: 4282 clrl %d2 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
4421e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44220: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 44224: 5282 addql #1,%d2 <== NOT EXECUTED 44226: 49c1 extbl %d1 <== NOT EXECUTED 44228: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4422a: 4e90 jsr %a0@ <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
4422c: 508f addql #8,%sp <== NOT EXECUTED 4422e: b483 cmpl %d3,%d2 <== NOT EXECUTED 44230: 671e beqs 44250 <rtems_termios_enqueue_raw_characters+0x60><== NOT EXECUTED 44232: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44236: eb88 lsll #5,%d0 <== NOT EXECUTED 44238: 2074 0810 moveal %a4@(00000010,%d0:l),%a0 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
4423c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4423e: 1233 2800 moveb %a3@(00000000,%d2:l),%d1 <== NOT EXECUTED 44242: 5282 addql #1,%d2 <== NOT EXECUTED 44244: 49c1 extbl %d1 <== NOT EXECUTED 44246: 2f01 movel %d1,%sp@- <== NOT EXECUTED 44248: 4e90 jsr %a0@ <== NOT EXECUTED
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
4424a: 508f addql #8,%sp <== NOT EXECUTED 4424c: b483 cmpl %d3,%d2 <== NOT EXECUTED 4424e: 66e2 bnes 44232 <rtems_termios_enqueue_raw_characters+0x42><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
44250: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 44254: 6628 bnes 4427e <rtems_termios_enqueue_raw_characters+0x8e><== NOT EXECUTED 44256: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 4425a: 4a88 tstl %a0 <== NOT EXECUTED 4425c: 6720 beqs 4427e <rtems_termios_enqueue_raw_characters+0x8e><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4425e: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
44262: 4285 clrl %d5 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
44264: 486a 0030 pea %a2@(48) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
44268: 7c01 moveq #1,%d6 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4426a: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4426c: 508f addql #8,%sp <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
4426e: 2005 movel %d5,%d0 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
44270: 2546 00e4 movel %d6,%a2@(228) <== NOT EXECUTED
} } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; }
44274: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4427a: 4e5e unlk %fp <== NOT EXECUTED 4427c: 4e75 rts <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
4427e: 4285 clrl %d5 <== NOT EXECUTED
}
44280: 2005 movel %d5,%d0 <== NOT EXECUTED 44282: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44288: 4e5e unlk %fp <== NOT EXECUTED 4428a: 4e75 rts <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
4428c: 41ea 004a lea %a2@(74),%a0 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
44290: 4bea 0030 lea %a2@(48),%a5 <== NOT EXECUTED 44294: 4285 clrl %d5 <== NOT EXECUTED
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
/* disable interrupts */
rtems_interrupt_disable(level);
44296: 387c 0700 moveaw #1792,%a4 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4429a: 4200 clrb %d0 <== NOT EXECUTED
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
4429c: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
442a0: 1d40 fff7 moveb %d0,%fp@(-9) <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
442a4: 4a83 tstl %d3 <== NOT EXECUTED 442a6: 6700 00e8 beqw 44390 <rtems_termios_enqueue_raw_characters+0x1a0><== NOT EXECUTED
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
442aa: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
442ae: 1813 moveb %a3@,%d4 <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
442b0: 0800 0009 btst #9,%d0 <== NOT EXECUTED 442b4: 671c beqs 442d2 <rtems_termios_enqueue_raw_characters+0xe2><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
442b6: 4281 clrl %d1 <== NOT EXECUTED 442b8: 122a 004a moveb %a2@(74),%d1 <== NOT EXECUTED 442bc: 1004 moveb %d4,%d0 <== NOT EXECUTED 442be: 49c0 extbl %d0 <== NOT EXECUTED 442c0: b280 cmpl %d0,%d1 <== NOT EXECUTED 442c2: 6700 014a beqw 4440e <rtems_termios_enqueue_raw_characters+0x21e><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
442c6: 4281 clrl %d1 <== NOT EXECUTED 442c8: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 442cc: b280 cmpl %d0,%d1 <== NOT EXECUTED 442ce: 6700 00dc beqw 443ac <rtems_termios_enqueue_raw_characters+0x1bc><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
442d2: 4a2e fff7 tstb %fp@(-9) <== NOT EXECUTED 442d6: 6600 00e6 bnew 443be <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
442da: 2e2a 0060 movel %a2@(96),%d7 <== NOT EXECUTED 442de: 5287 addql #1,%d7 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level);
442e0: 200c movel %a4,%d0 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
442e2: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 442e6: 4c41 7002 remul %d1,%d2,%d7 <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level);
442ea: 40c7 movew %sr,%d7 <== NOT EXECUTED 442ec: 8087 orl %d7,%d0 <== NOT EXECUTED 442ee: 46c0 movew %d0,%sr <== NOT EXECUTED
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
442f0: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 442f4: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 442f8: 9081 subl %d1,%d0 <== NOT EXECUTED 442fa: 2240 moveal %d0,%a1 <== NOT EXECUTED 442fc: d3c2 addal %d2,%a1 <== NOT EXECUTED 442fe: 2209 movel %a1,%d1 <== NOT EXECUTED 44300: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED 44304: 4c40 1006 remul %d0,%d6,%d1 <== NOT EXECUTED 44308: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
4430c: bcaa 00c0 cmpl %a2@(192),%d6 <== NOT EXECUTED 44310: 633e blss 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
44312: 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)
44316: 0800 0000 btst #0,%d0 <== NOT EXECUTED 4431a: 6634 bnes 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
4431c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44320: 7201 moveq #1,%d1 <== NOT EXECUTED 44322: 8081 orl %d1,%d0 <== NOT EXECUTED 44324: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
44328: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4432c: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 44332: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 44338: 6700 0112 beqw 4444c <rtems_termios_enqueue_raw_characters+0x25c><== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
4433c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44340: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 44346: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 4434c: 6700 0136 beqw 44484 <rtems_termios_enqueue_raw_characters+0x294><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor); } } } /* reenable interrupts */ rtems_interrupt_enable(level);
44350: 46c7 movew %d7,%sr <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
44352: 202a 005c movel %a2@(92),%d0 <== NOT EXECUTED 44356: b480 cmpl %d0,%d2 <== NOT EXECUTED 44358: 6700 00d2 beqw 4442c <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
4435c: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED 44360: 1184 2800 moveb %d4,%a0@(00000000,%d2:l) <== NOT EXECUTED
tty->rawInBuf.Tail = newTail;
44364: 2542 0060 movel %d2,%a2@(96) <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
44368: 4aaa 00e4 tstl %a2@(228) <== NOT EXECUTED 4436c: 6618 bnes 44386 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED 4436e: 206a 00dc moveal %a2@(220),%a0 <== NOT EXECUTED 44372: 4a88 tstl %a0 <== NOT EXECUTED 44374: 6710 beqs 44386 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
44376: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 4437a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4437c: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4437e: 508f addql #8,%sp <== NOT EXECUTED 44380: 7201 moveq #1,%d1 <== NOT EXECUTED 44382: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
44386: 528b addql #1,%a3 <== NOT EXECUTED 44388: 5383 subql #1,%d3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
4438a: 4a83 tstl %d3 <== NOT EXECUTED 4438c: 6600 ff1c bnew 442aa <rtems_termios_enqueue_raw_characters+0xba><== NOT EXECUTED
} } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore);
44390: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
44394: dbaa 0078 addl %d5,%a2@(120) <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
44398: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
4439e: 588f addql #4,%sp <== NOT EXECUTED
}
443a0: 2005 movel %d5,%d0 <== NOT EXECUTED 443a2: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 443a8: 4e5e unlk %fp <== NOT EXECUTED 443aa: 4e75 rts <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
443ac: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443b0: 72ef moveq #-17,%d1 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
443b2: 7c01 moveq #1,%d6 <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
443b4: c081 andl %d1,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
443b6: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
443ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
flow_rcv = true;
}
}
if (flow_rcv) {
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
443be: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443c2: 7c30 moveq #48,%d6 <== NOT EXECUTED 443c4: 7220 moveq #32,%d1 <== NOT EXECUTED 443c6: c086 andl %d6,%d0 <== NOT EXECUTED 443c8: b280 cmpl %d0,%d1 <== NOT EXECUTED 443ca: 66ba bnes 44386 <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level);
443cc: 200c movel %a4,%d0 <== NOT EXECUTED 443ce: 40c2 movew %sr,%d2 <== NOT EXECUTED 443d0: 8082 orl %d2,%d0 <== NOT EXECUTED 443d2: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
443d4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 443d8: 7cdf moveq #-33,%d6 <== NOT EXECUTED 443da: c086 andl %d6,%d0 <== NOT EXECUTED 443dc: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
443e0: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 443e4: 6608 bnes 443ee <rtems_termios_enqueue_raw_characters+0x1fe><== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level);
443e6: 46c2 movew %d2,%sr <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
443e8: 528b addql #1,%a3 <== NOT EXECUTED 443ea: 5383 subql #1,%d3 <== NOT EXECUTED 443ec: 609c bras 4438a <rtems_termios_enqueue_raw_characters+0x19a><== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
443ee: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
443f2: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
443f6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 443fa: 2f00 movel %d0,%sp@- <== NOT EXECUTED 443fc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44400: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44404: 4e90 jsr %a0@ <== NOT EXECUTED 44406: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); } /* reenable interrupts */ rtems_interrupt_enable(level);
4440a: 46c2 movew %d2,%sr <== NOT EXECUTED 4440c: 60da bras 443e8 <rtems_termios_enqueue_raw_characters+0x1f8><== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
4440e: 4281 clrl %d1 <== NOT EXECUTED 44410: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 44414: b280 cmpl %d0,%d1 <== NOT EXECUTED 44416: 671e beqs 44436 <rtems_termios_enqueue_raw_characters+0x246><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
44418: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4441c: 7c10 moveq #16,%d6 <== NOT EXECUTED 4441e: 8086 orl %d6,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
44420: 7c01 moveq #1,%d6 <== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
44422: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
44426: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 4442a: 6092 bras 443be <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
4442c: 5285 addql #1,%d5 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
4442e: 528b addql #1,%a3 <== NOT EXECUTED 44430: 5383 subql #1,%d3 <== NOT EXECUTED 44432: 6000 ff56 braw 4438a <rtems_termios_enqueue_raw_characters+0x19a><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
44436: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4443a: 7210 moveq #16,%d1 <== NOT EXECUTED 4443c: b380 eorl %d1,%d0 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
4443e: 7c01 moveq #1,%d6 <== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
if (c == tty->termios.c_cc[VSTART]) {
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
44440: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
44444: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 44448: 6000 ff74 braw 443be <rtems_termios_enqueue_raw_characters+0x1ce><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
4444c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44450: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44454: 6608 bnes 4445e <rtems_termios_enqueue_raw_characters+0x26e><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
44456: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4445a: 6600 fef4 bnew 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; (*tty->device.write)(tty->minor,
4445e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
44462: 7c02 moveq #2,%d6 <== NOT EXECUTED 44464: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
44468: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4446c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44470: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
44474: 8286 orl %d6,%d1 <== NOT EXECUTED 44476: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
4447a: 4e90 jsr %a0@ <== NOT EXECUTED 4447c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44480: 6000 fece braw 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
44484: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44488: 303c 0004 movew #4,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
4448c: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
44490: 8280 orl %d0,%d1 <== NOT EXECUTED 44492: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
44496: 4a88 tstl %a0 <== NOT EXECUTED 44498: 6700 feb6 beqw 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
4449c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 444a0: 4e90 jsr %a0@ <== NOT EXECUTED 444a2: 588f addql #4,%sp <== NOT EXECUTED 444a4: 6000 feaa braw 44350 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
00043ee0 <rtems_termios_initialize>:
struct rtems_termios_tty *rtems_termios_ttyTail;
rtems_id rtems_termios_ttyMutex;
void
rtems_termios_initialize (void)
{
43ee0: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
43ee4: 4ab9 0006 1310 tstl 61310 <rtems_termios_ttyMutex>
43eea: 6704 beqs 43ef0 <rtems_termios_initialize+0x10>
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
43eec: 4e5e unlk %fp 43eee: 4e75 rts
/*
* Create the mutex semaphore for the tty list
*/
if (!rtems_termios_ttyMutex) {
sc = rtems_semaphore_create (
43ef0: 4879 0006 1310 pea 61310 <rtems_termios_ttyMutex> 43ef6: 42a7 clrl %sp@- 43ef8: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 43efc: 4878 0001 pea 1 <ADD> 43f00: 2f3c 5452 6d69 movel #1414688105,%sp@- 43f06: 4eb9 0004 6464 jsr 46464 <rtems_semaphore_create>
rtems_build_name ('T', 'R', 'm', 'i'),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_termios_ttyMutex);
if (sc != RTEMS_SUCCESSFUL)
43f0c: 4fef 0014 lea %sp@(20),%sp 43f10: 4a80 tstl %d0
43f12: 67d8 beqs 43eec <rtems_termios_initialize+0xc> <== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
43f14: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43f16: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004511e <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
4511e: 4e56 ffec linkw %fp,#-20 45122: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 45126: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
4512a: 2053 moveal %a3@,%a0 4512c: 2468 0034 moveal %a0@(52),%a2
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
45130: 42a7 clrl %sp@-
rtems_status_code
rtems_termios_ioctl (void *arg)
{
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
45132: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
45136: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4513a: 42a7 clrl %sp@- 4513c: 2f2a 0018 movel %a2@(24),%sp@- 45140: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
45146: 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);
4514a: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
4514c: 662c bnes 4517a <rtems_termios_ioctl+0x5c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
4514e: 202b 0004 movel %a3@(4),%d0 45152: 7204 moveq #4,%d1 45154: b280 cmpl %d0,%d1
45156: 6774 beqs 451cc <rtems_termios_ioctl+0xae> <== NEVER TAKEN 45158: 6530 bcss 4518a <rtems_termios_ioctl+0x6c> <== NEVER TAKEN
4515a: 7602 moveq #2,%d3 4515c: b680 cmpl %d0,%d3 4515e: 6700 00b6 beqw 45216 <rtems_termios_ioctl+0xf8> 45162: 6400 0224 bccw 45388 <rtems_termios_ioctl+0x26a>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
45166: 2f0a movel %a2,%sp@- 45168: 4eba fc24 jsr %pc@(44d8e <drainOutput>)
break;
4516c: 588f addql #4,%sp
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
4516e: 2f2a 0018 movel %a2@(24),%sp@- 45172: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
45178: 588f addql #4,%sp
}
4517a: 2002 movel %d2,%d0
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem); args->ioctl_return = sc;
4517c: 2742 000c movel %d2,%a3@(12)
return sc; }
45180: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 45186: 4e5e unlk %fp 45188: 4e75 rts
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
4518a: 0c80 4004 667f cmpil #1074030207,%d0 <== NOT EXECUTED 45190: 6756 beqs 451e8 <rtems_termios_ioctl+0xca> <== NOT EXECUTED 45192: 6200 0236 bhiw 453ca <rtems_termios_ioctl+0x2ac> <== NOT EXECUTED 45196: 7605 moveq #5,%d3 <== NOT EXECUTED 45198: b680 cmpl %d0,%d3 <== NOT EXECUTED 4519a: 6700 01ce beqw 4536a <rtems_termios_ioctl+0x24c> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
4519e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 451a2: eb88 lsll #5,%d0 <== NOT EXECUTED 451a4: 0680 0006 0ae4 addil #396004,%d0 <== NOT EXECUTED 451aa: 2240 moveal %d0,%a1 <== NOT EXECUTED 451ac: 2051 moveal %a1@,%a0 <== NOT EXECUTED 451ae: 4a88 tstl %a0 <== NOT EXECUTED 451b0: 6700 0292 beqw 45444 <rtems_termios_ioctl+0x326> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
451b4: 2f0b movel %a3,%sp@- <== NOT EXECUTED 451b6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 451b8: 4e90 jsr %a0@ <== NOT EXECUTED 451ba: 508f addql #8,%sp <== NOT EXECUTED 451bc: 2400 movel %d0,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
451be: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 451c2: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
451c8: 588f addql #4,%sp <== NOT EXECUTED 451ca: 60ae bras 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
451cc: 2014 movel %a4@,%d0 <== NOT EXECUTED 451ce: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 451d2: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 451d6: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
451da: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 451de: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
451e4: 588f addql #4,%sp <== NOT EXECUTED 451e6: 6092 bras 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
451e8: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 451ec: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 451f0: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
451f2: 6b00 02a4 bmiw 45498 <rtems_termios_ioctl+0x37a> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
451f6: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 451fa: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 451fe: d280 addl %d0,%d1 <== NOT EXECUTED 45200: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 45204: 2081 movel %d1,%a0@ <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
45206: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 4520a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
45210: 588f addql #4,%sp <== NOT EXECUTED 45212: 6000 ff66 braw 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
45216: 206b 0008 moveal %a3@(8),%a0 4521a: 49ea 0030 lea %a2@(48),%a4 4521e: 2898 movel %a0@+,%a4@ 45220: 2558 0034 movel %a0@+,%a2@(52) 45224: 2558 0038 movel %a0@+,%a2@(56) 45228: 2558 003c movel %a0@+,%a2@(60) 4522c: 2558 0040 movel %a0@+,%a2@(64) 45230: 2558 0044 movel %a0@+,%a2@(68) 45234: 2558 0048 movel %a0@+,%a2@(72) 45238: 2558 004c movel %a0@+,%a2@(76)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
4523c: 202a 00b8 movel %a2@(184),%d0
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
break;
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
45240: 2550 0050 movel %a0@,%a2@(80)
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
45244: 0800 0009 btst #9,%d0
45248: 6746 beqs 45290 <rtems_termios_ioctl+0x172>
4524a: 202a 0030 movel %a2@(48),%d0 4524e: 0280 0000 0400 andil #1024,%d0
45254: 663a bnes 45290 <rtems_termios_ioctl+0x172> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
45256: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4525a: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 45260: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
45264: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45268: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4526c: 6722 beqs 45290 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
4526e: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 45274: 40c3 movew %sr,%d3 <== NOT EXECUTED 45276: 8083 orl %d3,%d0 <== NOT EXECUTED 45278: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4527a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4527e: 72df moveq #-33,%d1 <== NOT EXECUTED 45280: c081 andl %d1,%d0 <== NOT EXECUTED 45282: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
45286: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4528a: 6600 0242 bnew 454ce <rtems_termios_ioctl+0x3b0> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
4528e: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
45290: 202a 00b8 movel %a2@(184),%d0 45294: 0800 000a btst #10,%d0
45298: 6724 beqs 452be <rtems_termios_ioctl+0x1a0> <== ALWAYS TAKEN
4529a: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 4529e: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 452a4: 6618 bnes 452be <rtems_termios_ioctl+0x1a0> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
452a6: 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);
452aa: 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);
452ac: 0880 000a bclr #10,%d0 <== NOT EXECUTED 452b0: 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);
452b4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452b8: c083 andl %d3,%d0 <== NOT EXECUTED 452ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
452be: 202a 00b8 movel %a2@(184),%d0 452c2: 0800 0008 btst #8,%d0
452c6: 6738 beqs 45300 <rtems_termios_ioctl+0x1e2> <== ALWAYS TAKEN
452c8: 4aaa 0038 tstl %a2@(56) <== NOT EXECUTED 452cc: 6d00 01e4 bltw 454b2 <rtems_termios_ioctl+0x394> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
452d0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452d4: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 452d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
452dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452e0: 44c0 movew %d0,%ccr <== NOT EXECUTED 452e2: 6610 bnes 452f4 <rtems_termios_ioctl+0x1d6> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
452e4: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
452e8: 4a88 tstl %a0 <== NOT EXECUTED 452ea: 6708 beqs 452f4 <rtems_termios_ioctl+0x1d6> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
452ec: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 452f0: 4e90 jsr %a0@ <== NOT EXECUTED 452f2: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
452f4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 452f8: 72fb moveq #-5,%d1 <== NOT EXECUTED 452fa: c081 andl %d1,%d0 <== NOT EXECUTED 452fc: 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) {
45300: 4aaa 0038 tstl %a2@(56) 45304: 6d00 01ac bltw 454b2 <rtems_termios_ioctl+0x394>
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
45308: 202a 0030 movel %a2@(48),%d0 4530c: 0800 000c btst #12,%d0
45310: 670c beqs 4531e <rtems_termios_ioctl+0x200>
tty->flow_ctrl |= FL_MDXOF;
45312: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 45316: 08c1 000a bset #10,%d1 <== NOT EXECUTED 4531a: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
4531e: 0800 000a btst #10,%d0
45322: 670c beqs 45330 <rtems_termios_ioctl+0x212> <== NEVER TAKEN
tty->flow_ctrl |= FL_MDXON;
45324: 202a 00b8 movel %a2@(184),%d0 45328: 08c0 0009 bset #9,%d0 4532c: 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) {
45330: 7002 moveq #2,%d0 45332: c0aa 003c andl %a2@(60),%d0 45336: 6700 011e beqw 45456 <rtems_termios_ioctl+0x338>
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
4533a: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4533e: 42aa 0070 clrl %a2@(112)
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
45342: 206a 00a8 moveal %a2@(168),%a0
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
45346: 42aa 0074 clrl %a2@(116)
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4534a: 4a88 tstl %a0 4534c: 6700 fe20 beqw 4516e <rtems_termios_ioctl+0x50>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
45350: 2f0c movel %a4,%sp@- 45352: 2f2a 0010 movel %a2@(16),%sp@- 45356: 4e90 jsr %a0@ 45358: 508f addql #8,%sp
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
4535a: 2f2a 0018 movel %a2@(24),%sp@- 4535e: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
45364: 588f addql #4,%sp 45366: 6000 fe12 braw 4517a <rtems_termios_ioctl+0x5c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
4536a: 2014 movel %a4@,%d0 <== NOT EXECUTED 4536c: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 45370: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 45374: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
45378: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 4537c: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
45382: 588f addql #4,%sp <== NOT EXECUTED 45384: 6000 fdf4 braw 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
45388: 123c 0001 moveb #1,%d1 4538c: b280 cmpl %d0,%d1 4538e: 6600 fe0e bnew 4519e <rtems_termios_ioctl+0x80>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
45392: 206b 0008 moveal %a3@(8),%a0 45396: 20ea 0030 movel %a2@(48),%a0@+ 4539a: 20ea 0034 movel %a2@(52),%a0@+ 4539e: 20ea 0038 movel %a2@(56),%a0@+ 453a2: 20ea 003c movel %a2@(60),%a0@+ 453a6: 20ea 0040 movel %a2@(64),%a0@+ 453aa: 20ea 0044 movel %a2@(68),%a0@+ 453ae: 20ea 0048 movel %a2@(72),%a0@+ 453b2: 20ea 004c movel %a2@(76),%a0@+ 453b6: 20aa 0050 movel %a2@(80),%a0@
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
453ba: 2f2a 0018 movel %a2@(24),%sp@- 453be: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
453c4: 588f addql #4,%sp 453c6: 6000 fdb2 braw 4517a <rtems_termios_ioctl+0x5c>
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL) {
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
453ca: 0c80 4004 741a cmpil #1074033690,%d0 <== NOT EXECUTED 453d0: 675a beqs 4542c <rtems_termios_ioctl+0x30e> <== NOT EXECUTED 453d2: 0c80 8004 741b cmpil #-2147191781,%d0 <== NOT EXECUTED 453d8: 6600 fdc4 bnew 4519e <rtems_termios_ioctl+0x80> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
453dc: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 453e0: 49f9 0006 0acc lea 60acc <rtems_termios_linesw>,%a4 <== NOT EXECUTED 453e6: e788 lsll #3,%d0 <== NOT EXECUTED 453e8: 2074 0c04 moveal %a4@(00000004,%d0:l:4),%a0 <== NOT EXECUTED 453ec: 4a88 tstl %a0 <== NOT EXECUTED 453ee: 6708 beqs 453f8 <rtems_termios_ioctl+0x2da> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
453f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 453f2: 4e90 jsr %a0@ <== NOT EXECUTED 453f4: 588f addql #4,%sp <== NOT EXECUTED 453f6: 2400 movel %d0,%d2 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
453f8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 453fc: 2010 movel %a0@,%d0 <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
453fe: 2200 movel %d0,%d1 <== NOT EXECUTED 45400: eb89 lsll #5,%d1 <== NOT EXECUTED
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
45402: 2540 00cc movel %d0,%a2@(204) <== NOT EXECUTED
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
45406: 2074 1800 moveal %a4@(00000000,%d1:l),%a0 <== NOT EXECUTED
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
}
tty->t_line=*(int*)(args->buffer);
tty->t_sc = NULL; /* ensure that no more valid data */
4540a: 42aa 00d0 clrl %a2@(208) <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4540e: 4a88 tstl %a0 <== NOT EXECUTED 45410: 6700 fd5c beqw 4516e <rtems_termios_ioctl+0x50> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
45414: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45416: 4e90 jsr %a0@ <== NOT EXECUTED 45418: 588f addql #4,%sp <== NOT EXECUTED 4541a: 2400 movel %d0,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
4541c: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 45420: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
45426: 588f addql #4,%sp <== NOT EXECUTED 45428: 6000 fd50 braw 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
4542c: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 45430: 20aa 00cc movel %a2@(204),%a0@ <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
45434: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 45438: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
4543e: 588f addql #4,%sp <== NOT EXECUTED 45440: 6000 fd38 braw 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
45444: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
45448: 740a moveq #10,%d2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; } break; } rtems_semaphore_release (tty->osem);
4544a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
45450: 588f addql #4,%sp <== NOT EXECUTED 45452: 6000 fd26 braw 4517a <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
rtems_clock_get_ticks_per_second() / 10;
45456: 4283 clrl %d3 <== NOT EXECUTED 45458: 162a 0046 moveb %a2@(70),%d3 <== NOT EXECUTED 4545c: 4eb9 0004 5fbc jsr 45fbc <rtems_clock_get_ticks_per_second><== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
45462: 4c03 0800 mulsl %d3,%d0 <== NOT EXECUTED 45466: 760a moveq #10,%d3 <== NOT EXECUTED 45468: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 4546c: 2540 0054 movel %d0,%a2@(84) <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
45470: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 45474: 677a beqs 454f0 <rtems_termios_ioctl+0x3d2> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
45476: 42aa 006c clrl %a2@(108) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
4547a: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
4547e: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 45482: 6600 febe bnew 45342 <rtems_termios_ioctl+0x224> <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
45486: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
4548a: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4548e: 4a88 tstl %a0 <== NOT EXECUTED 45490: 6600 febe bnew 45350 <rtems_termios_ioctl+0x232> <== NOT EXECUTED 45494: 6000 fcd8 braw 4516e <rtems_termios_ioctl+0x50> <== NOT EXECUTED
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
45498: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 4549c: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4549e: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 454a2: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 454a6: d280 addl %d0,%d1 <== NOT EXECUTED 454a8: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 454ac: 2081 movel %d1,%a0@ <== NOT EXECUTED 454ae: 6000 fd56 braw 45206 <rtems_termios_ioctl+0xe8> <== NOT EXECUTED
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
tty->flow_ctrl |= FL_MDRTS;
454b2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 454b6: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 454ba: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
454be: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 454c2: 0800 000c btst #12,%d0 <== NOT EXECUTED 454c6: 6700 fe56 beqw 4531e <rtems_termios_ioctl+0x200> <== NOT EXECUTED 454ca: 6000 fe46 braw 45312 <rtems_termios_ioctl+0x1f4> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
454ce: 202a 0084 movel %a2@(132),%d0 <== NOT EXECUTED
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
454d2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 454d6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 454da: 2f00 movel %d0,%sp@- <== NOT EXECUTED 454dc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 454e0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 454e4: 4e90 jsr %a0@ <== NOT EXECUTED 454e6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
454ea: 46c3 movew %d3,%sr <== NOT EXECUTED 454ec: 6000 fda2 braw 45290 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
454f0: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 454f4: 6600 fe44 bnew 4533a <rtems_termios_ioctl+0x21c> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
454f8: 7001 moveq #1,%d0 <== NOT EXECUTED
} } } if (tty->device.setAttributes)
454fa: 206a 00a8 moveal %a2@(168),%a0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
454fe: 2540 006c movel %d0,%a2@(108) <== NOT EXECUTED
} } } if (tty->device.setAttributes)
45502: 4a88 tstl %a0 <== NOT EXECUTED 45504: 6600 fe4a bnew 45350 <rtems_termios_ioctl+0x232> <== NOT EXECUTED 45508: 6000 fc64 braw 4516e <rtems_termios_ioctl+0x50> <== NOT EXECUTED
000452c8 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
452c8: 4e56 0000 linkw %fp,#0 452cc: 222e 0008 movel %fp@(8),%d1
int termios_baud;
switch (baud) {
452d0: 0c81 0000 04b0 cmpil #1200,%d1 452d6: 6700 011c beqw 453f4 <rtems_termios_number_to_baud+0x12c>
452da: 6f3c bles 45318 <rtems_termios_number_to_baud+0x50>
452dc: 0c81 0000 4b00 cmpil #19200,%d1 452e2: 6700 011c beqw 45400 <rtems_termios_number_to_baud+0x138>
452e6: 6f60 bles 45348 <rtems_termios_number_to_baud+0x80>
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;
452e8: 203c 0000 1002 movel #4098,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
452ee: 0c81 0001 c200 cmpil #115200,%d1
452f4: 671e beqs 45314 <rtems_termios_number_to_baud+0x4c>
452f6: 6f00 00a8 blew 453a0 <rtems_termios_number_to_baud+0xd8>
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;
452fa: 203c 0000 1003 movel #4099,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
45300: 0c81 0003 8400 cmpil #230400,%d1
45306: 670c beqs 45314 <rtems_termios_number_to_baud+0x4c>
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;
45308: 5280 addql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
4530a: 0c81 0007 0800 cmpil #460800,%d1
45310: 6702 beqs 45314 <rtems_termios_number_to_baud+0x4c><== ALWAYS TAKEN
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;
45312: 70ff moveq #-1,%d0
default: termios_baud = -1; break;
}
return termios_baud;
}
45314: 4e5e unlk %fp 45316: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45318: 0c81 0000 0086 cmpil #134,%d1 4531e: 6700 00da beqw 453fa <rtems_termios_number_to_baud+0x132>
45322: 6f46 bles 4536a <rtems_termios_number_to_baud+0xa2>
45324: 0c81 0000 00c8 cmpil #200,%d1 4532a: 6700 00b6 beqw 453e2 <rtems_termios_number_to_baud+0x11a>
4532e: 6f56 bles 45386 <rtems_termios_number_to_baud+0xbe>
45330: 0c81 0000 012c cmpil #300,%d1 45336: 6700 00a4 beqw 453dc <rtems_termios_number_to_baud+0x114> 4533a: 0c81 0000 0258 cmpil #600,%d1
45340: 66d0 bnes 45312 <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
45342: 7008 moveq #8,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45344: 4e5e unlk %fp 45346: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45348: 0c81 0000 0960 cmpil #2400,%d1 4534e: 6700 009e beqw 453ee <rtems_termios_number_to_baud+0x126>
45352: 6f66 bles 453ba <rtems_termios_number_to_baud+0xf2>
45354: 0c81 0000 12c0 cmpil #4800,%d1
4535a: 676e beqs 453ca <rtems_termios_number_to_baud+0x102>
4535c: 0c81 0000 2580 cmpil #9600,%d1
45362: 66ae bnes 45312 <rtems_termios_number_to_baud+0x4a>
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
45364: 700d moveq #13,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45366: 4e5e unlk %fp 45368: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
4536a: 7032 moveq #50,%d0 4536c: b081 cmpl %d1,%d0
4536e: 6778 beqs 453e8 <rtems_termios_number_to_baud+0x120> 45370: 6c22 bges 45394 <rtems_termios_number_to_baud+0xcc>
45372: 704b moveq #75,%d0 45374: b081 cmpl %d1,%d0
45376: 6758 beqs 453d0 <rtems_termios_number_to_baud+0x108>
45378: 103c 006e moveb #110,%d0 4537c: b081 cmpl %d1,%d0
4537e: 6692 bnes 45312 <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
45380: 7003 moveq #3,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45382: 4e5e unlk %fp 45384: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45386: 0c81 0000 0096 cmpil #150,%d1
4538c: 6684 bnes 45312 <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
4538e: 7005 moveq #5,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45390: 4e5e unlk %fp 45392: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45394: 4a81 tstl %d1 45396: 6600 ff7a bnew 45312 <rtems_termios_number_to_baud+0x4a> 4539a: 4280 clrl %d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4539c: 4e5e unlk %fp 4539e: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
453a0: 0c81 0000 9600 cmpil #38400,%d1
453a6: 672e beqs 453d6 <rtems_termios_number_to_baud+0x10e>
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
case 38400: termios_baud = B38400; break;
453a8: 5380 subql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
453aa: 0c81 0000 e100 cmpil #57600,%d1 453b0: 6700 ff62 beqw 45314 <rtems_termios_number_to_baud+0x4c>
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;
453b4: 70ff moveq #-1,%d0 <== NOT EXECUTED 453b6: 6000 ff5c braw 45314 <rtems_termios_number_to_baud+0x4c><== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
453ba: 0c81 0000 0708 cmpil #1800,%d1 453c0: 6600 ff50 bnew 45312 <rtems_termios_number_to_baud+0x4a>
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
453c4: 700a moveq #10,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453c6: 4e5e unlk %fp 453c8: 4e75 rts
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
453ca: 700c moveq #12,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453cc: 4e5e unlk %fp 453ce: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
453d0: 7002 moveq #2,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453d2: 4e5e unlk %fp 453d4: 4e75 rts
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
case 19200: termios_baud = B19200; break;
453d6: 700f moveq #15,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453d8: 4e5e unlk %fp 453da: 4e75 rts
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
453dc: 7007 moveq #7,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453de: 4e5e unlk %fp 453e0: 4e75 rts
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
453e2: 7006 moveq #6,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453e4: 4e5e unlk %fp 453e6: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
453e8: 7001 moveq #1,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453ea: 4e5e unlk %fp 453ec: 4e75 rts
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
453ee: 700b moveq #11,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453f0: 4e5e unlk %fp 453f2: 4e75 rts
case 110: termios_baud = B110; break;
case 134: termios_baud = B134; break;
case 150: termios_baud = B150; break;
case 200: termios_baud = B200; break;
case 300: termios_baud = B300; break;
case 600: termios_baud = B600; break;
453f4: 7009 moveq #9,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453f6: 4e5e unlk %fp 453f8: 4e75 rts
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
case 110: termios_baud = B110; break;
453fa: 7004 moveq #4,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
453fc: 4e5e unlk %fp 453fe: 4e75 rts
case 600: termios_baud = B600; break;
case 1200: termios_baud = B1200; break;
case 1800: termios_baud = B1800; break;
case 2400: termios_baud = B2400; break;
case 4800: termios_baud = B4800; break;
case 9600: termios_baud = B9600; break;
45400: 700e moveq #14,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45402: 4e5e unlk %fp
...
000456ba <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
456ba: 4e56 ffdc linkw %fp,#-36 456be: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
456c2: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
456c4: 242e 0008 movel %fp@(8),%d2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
456c8: 42a7 clrl %sp@- 456ca: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
456d0: 262e 000c movel %fp@(12),%d3 456d4: 266e 0010 moveal %fp@(16),%a3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
456d8: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
456de: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
456e2: 2800 movel %d0,%d4
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
456e4: 6600 027a bnew 45960 <rtems_termios_open+0x2a6>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
456e8: 2479 0006 1318 moveal 61318 <rtems_termios_ttyHead>,%a2 456ee: 4a8a tstl %a2
456f0: 670e beqs 45700 <rtems_termios_open+0x46> if ((tty->major == major) && (tty->minor == minor))
456f2: b4aa 000c cmpl %a2@(12),%d2 456f6: 6700 0274 beqw 4596c <rtems_termios_open+0x2b2>
*/
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) {
456fa: 2452 moveal %a2@,%a2 456fc: 4a8a tstl %a2
456fe: 66f2 bnes 456f2 <rtems_termios_open+0x38> <== NEVER TAKEN
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
45700: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3> 45704: 4878 0001 pea 1 <ADD> 45708: 4eb9 0004 2918 jsr 42918 <calloc>
if (tty == NULL) {
4570e: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
45710: 2840 moveal %d0,%a4 45712: 2440 moveal %d0,%a2
if (tty == NULL) {
45714: 4a80 tstl %d0 45716: 6700 0348 beqw 45a60 <rtems_termios_open+0x3a6>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
4571a: 41f9 0005 fcb4 lea 5fcb4 <rtems_termios_raw_input_size>,%a0
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
45720: 4bf9 0004 3108 lea 43108 <malloc>,%a5
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
45726: 2950 0064 movel %a0@,%a4@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4572a: 202c 0064 movel %a4@(100),%d0 4572e: 2f00 movel %d0,%sp@- 45730: 4e95 jsr %a5@
if (tty->rawInBuf.theBuf == NULL) {
45732: 588f addql #4,%sp
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
45734: 2940 0058 movel %d0,%a4@(88)
if (tty->rawInBuf.theBuf == NULL) {
45738: 6700 0342 beqw 45a7c <rtems_termios_open+0x3c2>
return RTEMS_NO_MEMORY; } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
4573c: 41f9 0005 fcb8 lea 5fcb8 <rtems_termios_raw_output_size>,%a0 45742: 2950 0088 movel %a0@,%a4@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
45746: 202c 0088 movel %a4@(136),%d0 4574a: 2f00 movel %d0,%sp@- 4574c: 4e95 jsr %a5@
if (tty->rawOutBuf.theBuf == NULL) {
4574e: 588f addql #4,%sp
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
45750: 2940 007c movel %d0,%a4@(124)
if (tty->rawOutBuf.theBuf == NULL) {
45754: 6700 034a beqw 45aa0 <rtems_termios_open+0x3e6>
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
45758: 2f39 0005 fcb0 movel 5fcb0 <rtems_termios_cbufsize>,%sp@- 4575e: 4e95 jsr %a5@
if (tty->cbuf == NULL) {
45760: 588f addql #4,%sp
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
45762: 2940 001c movel %d0,%a4@(28)
if (tty->cbuf == NULL) {
45766: 6700 0366 beqw 45ace <rtems_termios_open+0x414>
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
4576a: 2079 0006 1318 moveal 61318 <rtems_termios_ttyHead>,%a0
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
45770: 42ac 00d4 clrl %a4@(212)
tty->tty_snd.sw_arg = NULL;
45774: 42ac 00d8 clrl %a4@(216)
tty->tty_rcv.sw_pfn = NULL;
45778: 42ac 00dc clrl %a4@(220)
tty->tty_rcv.sw_arg = NULL;
4577c: 42ac 00e0 clrl %a4@(224)
tty->tty_rcvwakeup = 0;
45780: 42ac 00e4 clrl %a4@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
45784: 2888 movel %a0,%a4@
tty->back = NULL;
45786: 42ac 0004 clrl %a4@(4)
if (rtems_termios_ttyHead != NULL)
4578a: 4a88 tstl %a0
4578c: 6704 beqs 45792 <rtems_termios_open+0xd8> rtems_termios_ttyHead->back = tty;
4578e: 214c 0004 movel %a4,%a0@(4)
rtems_termios_ttyHead = tty;
45792: 23cc 0006 1318 movel %a4,61318 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
45798: 4ab9 0006 1314 tstl 61314 <rtems_termios_ttyTail> 4579e: 6700 02b6 beqw 45a56 <rtems_termios_open+0x39c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
457a2: 486c 0014 pea %a4@(20) 457a6: 4bf9 0004 6464 lea 46464 <rtems_semaphore_create>,%a5 457ac: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 457b2: 42a7 clrl %sp@- 457b4: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 457b8: 49c0 extbl %d0 457ba: 4878 0001 pea 1 <ADD> 457be: 0080 5452 6900 oril #1414686976,%d0 457c4: 2f00 movel %d0,%sp@-
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
457c6: 2943 0010 movel %d3,%a4@(16)
tty->major = major;
457ca: 2942 000c movel %d2,%a4@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
457ce: 4e95 jsr %a5@
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)
457d0: 4fef 0014 lea %sp@(20),%sp 457d4: 4a80 tstl %d0 457d6: 6600 020c bnew 459e4 <rtems_termios_open+0x32a>
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
457da: 486c 0018 pea %a4@(24) 457de: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 457e4: 42a7 clrl %sp@- 457e6: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 457ea: 49c0 extbl %d0 457ec: 4878 0001 pea 1 <ADD> 457f0: 0080 5452 6f00 oril #1414688512,%d0 457f6: 2f00 movel %d0,%sp@- 457f8: 4e95 jsr %a5@
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)
457fa: 4fef 0014 lea %sp@(20),%sp 457fe: 4a80 tstl %d0 45800: 6600 01e2 bnew 459e4 <rtems_termios_open+0x32a>
rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
45804: 486c 008c pea %a4@(140) 45808: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 4580e: 42a7 clrl %sp@- 45810: 4878 0020 pea 20 <OPER2+0xc> 45814: 49c0 extbl %d0 45816: 0080 5452 7800 oril #1414690816,%d0 4581c: 42a7 clrl %sp@- 4581e: 2f00 movel %d0,%sp@- 45820: 4e95 jsr %a5@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
45822: 4fef 0014 lea %sp@(20),%sp 45826: 4a80 tstl %d0 45828: 6600 01ba bnew 459e4 <rtems_termios_open+0x32a>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
4582c: 226e 0014 moveal %fp@(20),%a1 45830: 41ec 0098 lea %a4@(152),%a0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
45834: 7002 moveq #2,%d0
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
45836: 20d9 movel %a1@+,%a0@+ 45838: 20d9 movel %a1@+,%a0@+ 4583a: 20d9 movel %a1@+,%a0@+ 4583c: 20d9 movel %a1@+,%a0@+ 4583e: 20d9 movel %a1@+,%a0@+ 45840: 20d9 movel %a1@+,%a0@+ 45842: 20d9 movel %a1@+,%a0@+ 45844: 2091 movel %a1@,%a0@
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle;
45846: 42ac 0094 clrl %a4@(148)
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4584a: b0ac 00b4 cmpl %a4@(180),%d0 4584e: 6700 019c beqw 459ec <rtems_termios_open+0x332>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
45852: 4aac 00a0 tstl %a4@(160) 45856: 6700 0164 beqw 459bc <rtems_termios_open+0x302>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
4585a: 7202 moveq #2,%d1 4585c: b2ac 00b4 cmpl %a4@(180),%d1 45860: 6700 015a beqw 459bc <rtems_termios_open+0x302>
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;
45864: 42ac 00b8 clrl %a4@(184)
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
45868: 202c 0064 movel %a4@(100),%d0
tty->highwater = tty->rawInBuf.Size * 3/4;
4586c: 206c 0064 moveal %a4@(100),%a0
/* 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;
45870: e288 lsrl #1,%d0
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
45872: 1239 0005 fcbc moveb 5fcbc <c.6315>,%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;
45878: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
/* * Bump name characer */ if (c++ == 'z')
4587c: 49c1 extbl %d1 4587e: 2a41 moveal %d1,%a5 45880: 528d addql #1,%a5 45882: 2241 moveal %d1,%a1
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;
45884: 2208 movel %a0,%d1 45886: e489 lsrl #2,%d1
/* * 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;
45888: 307c 08bd moveaw #2237,%a0
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
4588c: 3a0d movew %a5,%d5 4588e: 13c5 0005 fcbc moveb %d5,5fcbc <c.6315>
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
45894: 7a03 moveq #3,%d5
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;
45896: 2941 00c0 movel %d1,%a4@(192)
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
4589a: 1945 0041 moveb %d5,%a4@(65)
tty->termios.c_cc[VQUIT] = '\034';
4589e: 7a1c moveq #28,%d5
/* 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;
458a0: 2940 00bc movel %d0,%a4@(188)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
458a4: 1945 0042 moveb %d5,%a4@(66)
tty->termios.c_cc[VERASE] = '\177';
458a8: 7a7f moveq #127,%d5
/* * 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;
458aa: 2948 0038 movel %a0,%a4@(56)
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';
458ae: 1945 0043 moveb %d5,%a4@(67)
tty->termios.c_cc[VKILL] = '\025';
458b2: 7a15 moveq #21,%d5
tty->termios.c_cc[VEOF] = '\004';
458b4: 7204 moveq #4,%d1
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
458b6: 1945 0044 moveb %d5,%a4@(68)
tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000';
458ba: 4205 clrb %d5
tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
458bc: 7011 moveq #17,%d0
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
458be: 1941 0045 moveb %d1,%a4@(69)
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023';
458c2: 7213 moveq #19,%d1
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';
458c4: 1945 004c moveb %d5,%a4@(76)
tty->termios.c_cc[VEOL2] = '\000';
458c8: 1945 0051 moveb %d5,%a4@(81)
tty->termios.c_cc[VSTART] = '\021';
458cc: 1940 0049 moveb %d0,%a4@(73)
tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032';
458d0: 7a1a moveq #26,%d5
tty->termios.c_cc[VREPRINT] = '\022';
458d2: 7012 moveq #18,%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';
458d4: 1941 004a moveb %d1,%a4@(74)
tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017';
458d8: 720f moveq #15,%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';
458da: 1945 004b moveb %d5,%a4@(75)
tty->termios.c_cc[VREPRINT] = '\022';
458de: 1940 004d moveb %d0,%a4@(77)
tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027';
458e2: 7a17 moveq #23,%d5
tty->termios.c_cc[VLNEXT] = '\026';
458e4: 7016 moveq #22,%d0
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';
458e6: 1941 004e moveb %d1,%a4@(78)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
458ea: 223c 0000 2502 movel #9474,%d1
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';
458f0: 1945 004f moveb %d5,%a4@(79)
tty->termios.c_cc[VLNEXT] = '\026';
458f4: 1940 0050 moveb %d0,%a4@(80)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
458f8: 2941 0030 movel %d1,%a4@(48)
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
458fc: 2a3c 0000 1805 movel #6149,%d5 45902: 2945 0034 movel %d5,%a4@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
45906: 203c 0000 823b movel #33339,%d0
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
4590c: 323c 007a movew #122,%d1
* 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 = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
45910: 2940 003c movel %d0,%a4@(60)
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
45914: b289 cmpl %a1,%d1
45916: 6608 bnes 45920 <rtems_termios_open+0x266> <== ALWAYS TAKEN
c = 'a';
45918: 7a61 moveq #97,%d5 <== NOT EXECUTED 4591a: 13c5 0005 fcbc moveb %d5,5fcbc <c.6315> <== NOT EXECUTED
}
args->iop->data1 = tty;
if (!tty->refcount++) {
45920: 202a 0008 movel %a2@(8),%d0 45924: 2200 movel %d0,%d1 45926: 5281 addql #1,%d1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
45928: 2053 moveal %a3@,%a0
if (!tty->refcount++) {
4592a: 2541 0008 movel %d1,%a2@(8)
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4592e: 214a 0034 movel %a2,%a0@(52)
if (!tty->refcount++) {
45932: 4a80 tstl %d0
45934: 661c bnes 45952 <rtems_termios_open+0x298> if (tty->device.firstOpen)
45936: 206a 0098 moveal %a2@(152),%a0 4593a: 4a88 tstl %a0
4593c: 670c beqs 4594a <rtems_termios_open+0x290> (*tty->device.firstOpen)(major, minor, arg);
4593e: 2f0b movel %a3,%sp@- 45940: 2f03 movel %d3,%sp@- 45942: 2f02 movel %d2,%sp@- 45944: 4e90 jsr %a0@ 45946: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4594a: 7a02 moveq #2,%d5 4594c: baaa 00b4 cmpl %a2@(180),%d5
45950: 672c beqs 4597e <rtems_termios_open+0x2c4> <== NEVER TAKEN
(rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
45952: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- 45958: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
4595e: 588f addql #4,%sp
}
45960: 2004 movel %d4,%d0 45962: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 45968: 4e5e unlk %fp 4596a: 4e75 rts
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) {
if ((tty->major == major) && (tty->minor == minor))
4596c: b6aa 0010 cmpl %a2@(16),%d3
45970: 67ae beqs 45920 <rtems_termios_open+0x266> <== ALWAYS TAKEN
*/
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) {
45972: 2452 moveal %a2@,%a2 <== NOT EXECUTED 45974: 4a8a tstl %a2 <== NOT EXECUTED 45976: 6600 fd7a bnew 456f2 <rtems_termios_open+0x38> <== NOT EXECUTED 4597a: 6000 fd84 braw 45700 <rtems_termios_open+0x46> <== NOT EXECUTED
(*tty->device.firstOpen)(major, minor, arg);
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(tty->rxTaskId,
4597e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45980: 487a 0202 pea %pc@(45b84 <rtems_termios_rxdaemon>) <== NOT EXECUTED 45984: 47f9 0004 6bb0 lea 46bb0 <rtems_task_start>,%a3 <== NOT EXECUTED 4598a: 2f2a 00c4 movel %a2@(196),%sp@- <== NOT EXECUTED 4598e: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
45990: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45994: 4a80 tstl %d0 <== NOT EXECUTED 45996: 664c bnes 459e4 <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
45998: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4599a: 487a 0166 pea %pc@(45b02 <rtems_termios_txdaemon>) <== NOT EXECUTED 4599e: 2f2a 00c8 movel %a2@(200),%sp@- <== NOT EXECUTED 459a2: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
459a4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 459a8: 4a80 tstl %d0 <== NOT EXECUTED 459aa: 6638 bnes 459e4 <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex);
459ac: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 459b2: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
459b8: 588f addql #4,%sp <== NOT EXECUTED 459ba: 60a4 bras 45960 <rtems_termios_open+0x2a6> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
459bc: 486c 0068 pea %a4@(104) 459c0: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 459c6: 42a7 clrl %sp@- 459c8: 4878 0024 pea 24 <OPER2+0x10> 459cc: 49c0 extbl %d0 459ce: 0080 5452 7200 oril #1414689280,%d0 459d4: 42a7 clrl %sp@- 459d6: 2f00 movel %d0,%sp@- 459d8: 4e95 jsr %a5@
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
459da: 4fef 0014 lea %sp@(20),%sp 459de: 4a80 tstl %d0 459e0: 6700 fe82 beqw 45864 <rtems_termios_open+0x1aa>
sc = rtems_task_start(tty->txTaskId,
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
459e4: 2f00 movel %d0,%sp@- <== NOT EXECUTED 459e6: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
459ec: 486c 00c8 pea %a4@(200) <== NOT EXECUTED 459f0: 41f9 0004 68fc lea 468fc <rtems_task_create>,%a0 <== NOT EXECUTED 459f6: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 <== NOT EXECUTED 459fc: 42a7 clrl %sp@- <== NOT EXECUTED 459fe: 4878 0500 pea 500 <DBL_MAX_EXP+0xff> <== NOT EXECUTED 45a02: 49c0 extbl %d0 <== NOT EXECUTED 45a04: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 45a08: 4878 000a pea a <LASTO> <== NOT EXECUTED 45a0c: 0080 5478 5400 oril #1417171968,%d0 <== NOT EXECUTED 45a12: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a14: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED 45a18: 4e90 jsr %a0@ <== NOT EXECUTED
TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL)
45a1a: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 45a1e: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a22: 4a80 tstl %d0 <== NOT EXECUTED 45a24: 66be bnes 459e4 <rtems_termios_open+0x32a> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
45a26: 486c 00c4 pea %a4@(196) <== NOT EXECUTED 45a2a: 1039 0005 fcbc moveb 5fcbc <c.6315>,%d0 <== NOT EXECUTED 45a30: 42a7 clrl %sp@- <== NOT EXECUTED 45a32: 4878 0500 pea 500 <DBL_MAX_EXP+0xff> <== NOT EXECUTED 45a36: 49c0 extbl %d0 <== NOT EXECUTED 45a38: 4878 0400 pea 400 <D_BIAS+0x2> <== NOT EXECUTED 45a3c: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> <== NOT EXECUTED 45a40: 0080 5278 5400 oril #1383617536,%d0 <== NOT EXECUTED 45a46: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45a48: 4e90 jsr %a0@ <== NOT EXECUTED
TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL)
45a4a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 45a4e: 4a80 tstl %d0 <== NOT EXECUTED 45a50: 6700 fe00 beqw 45852 <rtems_termios_open+0x198> <== NOT EXECUTED 45a54: 608e bras 459e4 <rtems_termios_open+0x32a> <== NOT EXECUTED
tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty;
45a56: 23cc 0006 1314 movel %a4,61314 <rtems_termios_ttyTail> 45a5c: 6000 fd44 braw 457a2 <rtems_termios_open+0xe8>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
45a60: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 45a66: 781a moveq #26,%d4 <== NOT EXECUTED 45a68: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
45a6e: 588f addql #4,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
45a70: 2004 movel %d4,%d0 <== NOT EXECUTED 45a72: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45a78: 4e5e unlk %fp <== NOT EXECUTED 45a7a: 4e75 rts <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
45a7c: 2f0c movel %a4,%sp@- <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
45a7e: 781a moveq #26,%d4 <== NOT EXECUTED
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
if (tty->rawInBuf.theBuf == NULL) {
free(tty);
45a80: 4eb9 0004 2ddc jsr 42ddc <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
45a86: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 45a8c: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
45a92: 508f addql #8,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
45a94: 2004 movel %d4,%d0 <== NOT EXECUTED 45a96: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45a9c: 4e5e unlk %fp <== NOT EXECUTED 45a9e: 4e75 rts <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
45aa0: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45aa4: 45f9 0004 2ddc lea 42ddc <free>,%a2 <== NOT EXECUTED
free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
45aaa: 781a moveq #26,%d4 <== NOT EXECUTED
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
if (tty->rawOutBuf.theBuf == NULL) {
free((void *)(tty->rawInBuf.theBuf));
45aac: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
45aae: 2f0c movel %a4,%sp@- <== NOT EXECUTED 45ab0: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
45ab2: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 45ab8: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
45abe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
45ac2: 2004 movel %d4,%d0 <== NOT EXECUTED 45ac4: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45aca: 4e5e unlk %fp <== NOT EXECUTED 45acc: 4e75 rts <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
45ace: 2f2c 007c movel %a4@(124),%sp@- <== NOT EXECUTED 45ad2: 45f9 0004 2ddc lea 42ddc <free>,%a2 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf)); free(tty); rtems_semaphore_release (rtems_termios_ttyMutex);
45ad8: 781a moveq #26,%d4 <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
45ada: 4e92 jsr %a2@ <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
45adc: 2f2c 0058 movel %a4@(88),%sp@- <== NOT EXECUTED 45ae0: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
45ae2: 2f0c movel %a4,%sp@- <== NOT EXECUTED 45ae4: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
45ae6: 2f39 0006 1310 movel 61310 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 45aec: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
45af2: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } } rtems_semaphore_release (rtems_termios_ttyMutex); return RTEMS_SUCCESSFUL; }
45af6: 2004 movel %d4,%d0 <== NOT EXECUTED 45af8: 4cee 3c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a5 <== NOT EXECUTED 45afe: 4e5e unlk %fp <== NOT EXECUTED
000444a8 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
444a8: 4e56 ffdc linkw %fp,#-36 444ac: 202e 0008 movel %fp@(8),%d0 444b0: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 444b4: 242e 000c movel %fp@(12),%d2
const unsigned char *buf = _buf;
444b8: 2840 moveal %d0,%a4
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
444ba: 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) {
444be: 4aaa 00b4 tstl %a2@(180) 444c2: 6700 00e8 beqw 445ac <rtems_termios_puts+0x104>
(*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head;
444c6: 2c2a 0080 movel %a2@(128),%d6
while (len) {
444ca: 4a82 tstl %d2 444cc: 6700 00d4 beqw 445a2 <rtems_termios_puts+0xfa>
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
444d0: 222a 0088 movel %a2@(136),%d1 444d4: 5286 addql #1,%d6
rtems_interrupt_disable (level);
444d6: 2a3c 0000 0700 movel #1792,%d5 444dc: 47f9 0004 6704 lea 46704 <rtems_semaphore_obtain>,%a3 444e2: 2005 movel %d5,%d0
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
444e4: 4c41 6007 remul %d1,%d7,%d6 444e8: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
444ea: 40c3 movew %sr,%d3 444ec: 8083 orl %d3,%d0 444ee: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
444f0: 282a 0084 movel %a2@(132),%d4 444f4: be84 cmpl %d4,%d7
444f6: 662c bnes 44524 <rtems_termios_puts+0x7c> tty->rawOutBufState = rob_wait;
444f8: 7002 moveq #2,%d0 444fa: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
444fe: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
44500: 42a7 clrl %sp@- 44502: 42a7 clrl %sp@- 44504: 2f2a 008c movel %a2@(140),%sp@- 44508: 4e93 jsr %a3@
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
4450a: 4fef 000c lea %sp@(12),%sp 4450e: 4a80 tstl %d0 44510: 6600 00b6 bnew 445c8 <rtems_termios_puts+0x120>
rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level);
44514: 2005 movel %d5,%d0 44516: 40c3 movew %sr,%d3 44518: 8083 orl %d3,%d0 4451a: 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) {
4451c: 202a 0084 movel %a2@(132),%d0 44520: b880 cmpl %d0,%d4
44522: 67d4 beqs 444f8 <rtems_termios_puts+0x50> <== NEVER TAKEN
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
44524: 202a 0080 movel %a2@(128),%d0 44528: 206a 007c moveal %a2@(124),%a0 4452c: 1194 0800 moveb %a4@,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
44530: 2547 0080 movel %d7,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
44534: 4aaa 0094 tstl %a2@(148)
44538: 661c bnes 44556 <rtems_termios_puts+0xae>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
4453a: 202a 00b8 movel %a2@(184),%d0 4453e: 0800 0004 btst #4,%d0
44542: 673a beqs 4457e <rtems_termios_puts+0xd6> <== ALWAYS TAKEN
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
44544: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44548: 7220 moveq #32,%d1 <== NOT EXECUTED 4454a: 8081 orl %d1,%d0 <== NOT EXECUTED 4454c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
} tty->rawOutBufState = rob_busy;
44550: 7001 moveq #1,%d0 <== NOT EXECUTED 44552: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
} rtems_interrupt_enable (level);
44556: 46c3 movew %d3,%sr
len--;
44558: 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) {
4455a: 6746 beqs 445a2 <rtems_termios_puts+0xfa>
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
4455c: 222a 0088 movel %a2@(136),%d1 44560: 5286 addql #1,%d6
RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
44562: 528c addql #1,%a4
* * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level);
44564: 2005 movel %d5,%d0
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
44566: 4c41 6007 remul %d1,%d7,%d6 4456a: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
4456c: 40c3 movew %sr,%d3 4456e: 8083 orl %d3,%d0 44570: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
44572: 282a 0084 movel %a2@(132),%d4 44576: be84 cmpl %d4,%d7 44578: 6700 ff7e beqw 444f8 <rtems_termios_puts+0x50> 4457c: 60a6 bras 44524 <rtems_termios_puts+0x7c>
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,
4457e: 4878 0001 pea 1 <ADD>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
44582: 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,
44586: d0aa 007c addl %a2@(124),%d0 4458a: 2f00 movel %d0,%sp@- 4458c: 2f2a 0010 movel %a2@(16),%sp@- 44590: 206a 00a4 moveal %a2@(164),%a0 44594: 4e90 jsr %a0@ 44596: 4fef 000c lea %sp@(12),%sp
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
4459a: 7001 moveq #1,%d0 4459c: 2540 0094 movel %d0,%a2@(148) 445a0: 60b4 bras 44556 <rtems_termios_puts+0xae>
} rtems_interrupt_enable (level); len--; } }
445a2: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 445a8: 4e5e unlk %fp 445aa: 4e75 rts
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);
445ac: 226a 00a4 moveal %a2@(164),%a1 <== NOT EXECUTED 445b0: 2d6a 0010 0008 movel %a2@(16),%fp@(8) <== NOT EXECUTED 445b6: 2d42 0010 movel %d2,%fp@(16) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } }
445ba: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
445c0: 2d40 000c movel %d0,%fp@(12) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; } rtems_interrupt_enable (level); len--; } }
445c4: 4e5e unlk %fp <== NOT EXECUTED
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
445c6: 4ed1 jmp %a1@ <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc);
445c8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 445ca: 4eb9 0004 6e30 jsr 46e30 <rtems_fatal_error_occurred> <== NOT EXECUTED
00044e02 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
44e02: 4e56 ffd4 linkw %fp,#-44 <== NOT EXECUTED 44e06: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ <== NOT EXECUTED 44e0a: 2a6e 0008 moveal %fp@(8),%a5 <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44e0e: 2c3c 0004 6704 movel #288516,%d6 <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
44e14: 2055 moveal %a5@,%a0 <== NOT EXECUTED 44e16: 2468 0034 moveal %a0@(52),%a2 <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44e1a: 2046 moveal %d6,%a0 <== NOT EXECUTED 44e1c: 42a7 clrl %sp@- <== NOT EXECUTED
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
44e1e: 262d 0010 movel %a5@(16),%d3 <== NOT EXECUTED
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44e22: 42a7 clrl %sp@- <== NOT EXECUTED 44e24: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
44e28: 286d 000c moveal %a5@(12),%a4 <== NOT EXECUTED
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44e2c: 4e90 jsr %a0@ <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
44e2e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44e32: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
44e34: 662e bnes 44e64 <rtems_termios_read+0x62> <== NOT EXECUTED
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
44e36: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 44e3a: 41f9 0006 0acc lea 60acc <rtems_termios_linesw>,%a0 <== NOT EXECUTED 44e40: eb88 lsll #5,%d0 <== NOT EXECUTED 44e42: 2070 0808 moveal %a0@(00000008,%d0:l),%a0 <== NOT EXECUTED 44e46: 4a88 tstl %a0 <== NOT EXECUTED 44e48: 6726 beqs 44e70 <rtems_termios_read+0x6e> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
44e4a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 44e4c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44e4e: 4e90 jsr %a0@ <== NOT EXECUTED 44e50: 2a00 movel %d0,%d5 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
44e52: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
44e56: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44e5a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
44e60: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
44e64: 2005 movel %d5,%d0 <== NOT EXECUTED 44e66: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44e6c: 4e5e unlk %fp <== NOT EXECUTED 44e6e: 4e75 rts <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
44e70: 202a 0020 movel %a2@(32),%d0 <== NOT EXECUTED 44e74: b0aa 0024 cmpl %a2@(36),%d0 <== NOT EXECUTED 44e78: 674e beqs 44ec8 <rtems_termios_read+0xc6> <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
44e7a: 4a83 tstl %d3 <== NOT EXECUTED 44e7c: 6724 beqs 44ea2 <rtems_termios_read+0xa0> <== NOT EXECUTED 44e7e: 202a 0024 movel %a2@(36),%d0 <== NOT EXECUTED 44e82: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44e86: 6c1a bges 44ea2 <rtems_termios_read+0xa0> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
44e88: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
count--;
44e8c: 5383 subql #1,%d3 <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
44e8e: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ <== NOT EXECUTED 44e92: 5280 addql #1,%d0 <== NOT EXECUTED 44e94: 2540 0024 movel %d0,%a2@(36) <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
44e98: 4a83 tstl %d3 <== NOT EXECUTED 44e9a: 6706 beqs 44ea2 <rtems_termios_read+0xa0> <== NOT EXECUTED 44e9c: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44ea0: 6de6 blts 44e88 <rtems_termios_read+0x86> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
44ea2: 202d 0010 movel %a5@(16),%d0 <== NOT EXECUTED 44ea6: 9083 subl %d3,%d0 <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
44ea8: 42aa 00e4 clrl %a2@(228) <== NOT EXECUTED
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
44eac: 2b40 0018 movel %d0,%a5@(24) <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem);
44eb0: 2f2a 0014 movel %a2@(20),%sp@- <== NOT EXECUTED 44eb4: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
44eba: 588f addql #4,%sp <== NOT EXECUTED
}
44ebc: 2005 movel %d5,%d0 <== NOT EXECUTED 44ebe: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44ec4: 4e5e unlk %fp <== NOT EXECUTED 44ec6: 4e75 rts <== NOT EXECUTED
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
44ec8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
44ecc: 256a 0028 002c movel %a2@(40),%a2@(44) <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
44ed2: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED 44ed6: 42aa 0024 clrl %a2@(36) <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
44eda: 4a88 tstl %a0 <== NOT EXECUTED 44edc: 6708 beqs 44ee6 <rtems_termios_read+0xe4> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
44ede: 4aaa 00b4 tstl %a2@(180) <== NOT EXECUTED 44ee2: 6700 0152 beqw 45036 <rtems_termios_read+0x234> <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
44ee6: 41ea 0049 lea %a2@(73),%a0 <== NOT EXECUTED 44eea: 7801 moveq #1,%d4 <== NOT EXECUTED 44eec: 47fa fd52 lea %pc@(44c40 <siproc>),%a3 <== NOT EXECUTED
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
44ef0: 242a 0074 movel %a2@(116),%d2 <== NOT EXECUTED
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
44ef4: 2d48 fffc movel %a0,%fp@(-4) <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44ef8: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 44efc: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44f00: b081 cmpl %d1,%d0 <== NOT EXECUTED 44f02: 6700 00c6 beqw 44fca <rtems_termios_read+0x1c8> <== NOT EXECUTED 44f06: 2039 0005 fcb0 movel 5fcb0 <rtems_termios_cbufsize>,%d0 <== NOT EXECUTED 44f0c: 5380 subql #1,%d0 <== NOT EXECUTED 44f0e: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44f12: 6f00 00b6 blew 44fca <rtems_termios_read+0x1c8> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
44f16: 242a 005c movel %a2@(92),%d2 <== NOT EXECUTED 44f1a: 5282 addql #1,%d2 <== NOT EXECUTED 44f1c: 202a 0064 movel %a2@(100),%d0 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
44f20: 206a 0058 moveal %a2@(88),%a0 <== NOT EXECUTED
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
44f24: 4c40 2001 remul %d0,%d1,%d2 <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
44f28: 1430 1800 moveb %a0@(00000000,%d1:l),%d2 <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
44f2c: 2541 005c movel %d1,%a2@(92) <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
44f30: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44f34: 206a 0064 moveal %a2@(100),%a0 <== NOT EXECUTED 44f38: d088 addl %a0,%d0 <== NOT EXECUTED 44f3a: 9081 subl %d1,%d0 <== NOT EXECUTED 44f3c: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44f40: 4c41 0007 remul %d1,%d7,%d0 <== NOT EXECUTED 44f44: beaa 00bc cmpl %a2@(188),%d7 <== NOT EXECUTED 44f48: 6446 bccs 44f90 <rtems_termios_read+0x18e> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
44f4a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f4e: 72fe moveq #-2,%d1 <== NOT EXECUTED 44f50: c081 andl %d1,%d0 <== NOT EXECUTED 44f52: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
44f56: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f5a: 0280 0000 0202 andil #514,%d0 <== NOT EXECUTED 44f60: 0c80 0000 0202 cmpil #514,%d0 <== NOT EXECUTED 44f66: 6700 00a2 beqw 4500a <rtems_termios_read+0x208> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
44f6a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44f6e: 0800 0008 btst #8,%d0 <== NOT EXECUTED 44f72: 671c beqs 44f90 <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
44f74: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 44f78: 7efb moveq #-5,%d7 <== NOT EXECUTED 44f7a: c287 andl %d7,%d1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
44f7c: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
44f80: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
44f84: 4a88 tstl %a0 <== NOT EXECUTED 44f86: 6708 beqs 44f90 <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
44f88: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 44f8c: 4e90 jsr %a0@ <== NOT EXECUTED 44f8e: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
44f90: 7002 moveq #2,%d0 <== NOT EXECUTED 44f92: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44f96: 6754 beqs 44fec <rtems_termios_read+0x1ea> <== NOT EXECUTED
if (siproc (c, tty))
44f98: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44f9a: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44fa0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44fa2: 4e93 jsr %a3@ <== NOT EXECUTED 44fa4: 508f addql #8,%sp <== NOT EXECUTED 44fa6: 4a80 tstl %d0 <== NOT EXECUTED 44fa8: 665c bnes 45006 <rtems_termios_read+0x204> <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44faa: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
44fae: 242a 0070 movel %a2@(112),%d2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
44fb2: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 44fb6: b081 cmpl %d1,%d0 <== NOT EXECUTED 44fb8: 6710 beqs 44fca <rtems_termios_read+0x1c8> <== NOT EXECUTED 44fba: 2039 0005 fcb0 movel 5fcb0 <rtems_termios_cbufsize>,%d0 <== NOT EXECUTED 44fc0: 5380 subql #1,%d0 <== NOT EXECUTED 44fc2: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 44fc6: 6e00 ff4e bgtw 44f16 <rtems_termios_read+0x114> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
44fca: 4a84 tstl %d4 <== NOT EXECUTED 44fcc: 6700 feac beqw 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
44fd0: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44fd2: 2f2a 006c movel %a2@(108),%sp@- <== NOT EXECUTED 44fd6: 2046 moveal %d6,%a0 <== NOT EXECUTED 44fd8: 2f2a 0068 movel %a2@(104),%sp@- <== NOT EXECUTED 44fdc: 4e90 jsr %a0@ <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
44fde: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44fe2: 4a80 tstl %d0 <== NOT EXECUTED 44fe4: 6700 ff12 beqw 44ef8 <rtems_termios_read+0xf6> <== NOT EXECUTED 44fe8: 6000 fe90 braw 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
}
else {
siproc (c, tty);
44fec: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fee: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ff6: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
44ff8: 508f addql #8,%sp <== NOT EXECUTED 44ffa: 4280 clrl %d0 <== NOT EXECUTED 44ffc: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 45000: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 45004: 6ea4 bgts 44faa <rtems_termios_read+0x1a8> <== NOT EXECUTED 45006: 4284 clrl %d4 <== NOT EXECUTED 45008: 60a0 bras 44faa <rtems_termios_read+0x1a8> <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
4500a: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4500e: 670c beqs 4501c <rtems_termios_read+0x21a> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
45010: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
45014: 0800 0005 btst #5,%d0 <== NOT EXECUTED 45018: 6700 ff50 beqw 44f6a <rtems_termios_read+0x168> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(tty->minor,
4501c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45020: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 45024: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45028: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 4502c: 4e90 jsr %a0@ <== NOT EXECUTED 4502e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45032: 6000 ff5c braw 44f90 <rtems_termios_read+0x18e> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45036: 7002 moveq #2,%d0 <== NOT EXECUTED 45038: 47fa fc06 lea %pc@(44c40 <siproc>),%a3 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4503c: 243c 0004 6c6c movel #289900,%d2 <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45042: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 45046: 6728 beqs 45070 <rtems_termios_read+0x26e> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45048: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4504c: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
4504e: 588f addql #4,%sp <== NOT EXECUTED 45050: 4a80 tstl %d0 <== NOT EXECUTED 45052: 6d00 00b8 bltw 4510c <rtems_termios_read+0x30a> <== NOT EXECUTED
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
45056: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45058: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4505e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45060: 4e93 jsr %a3@ <== NOT EXECUTED 45062: 508f addql #8,%sp <== NOT EXECUTED 45064: 4a80 tstl %d0 <== NOT EXECUTED 45066: 6600 fe12 bnew 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
4506a: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 4506e: 60d8 bras 45048 <rtems_termios_read+0x246> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
45070: 283c 0004 5fd4 movel #286676,%d4 <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45076: 243c 0004 6c6c movel #289900,%d2 <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
4507c: 2044 moveal %d4,%a0 <== NOT EXECUTED 4507e: 4e90 jsr %a0@ <== NOT EXECUTED 45080: 2c00 movel %d0,%d6 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45082: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45086: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 4508a: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
4508c: 588f addql #4,%sp <== NOT EXECUTED 4508e: 4a80 tstl %d0 <== NOT EXECUTED 45090: 6d38 blts 450ca <rtems_termios_read+0x2c8> <== NOT EXECUTED
}
}
rtems_task_wake_after (1);
}
else {
siproc (n, tty);
45092: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45094: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4509a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4509c: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
4509e: 508f addql #8,%sp <== NOT EXECUTED 450a0: 4281 clrl %d1 <== NOT EXECUTED 450a2: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 450a6: 1200 moveb %d0,%d1 <== NOT EXECUTED 450a8: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 450ac: 6f00 fdcc blew 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
450b0: 4a00 tstb %d0 <== NOT EXECUTED 450b2: 67ce beqs 45082 <rtems_termios_read+0x280> <== NOT EXECUTED 450b4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450b8: 66c2 bnes 4507c <rtems_termios_read+0x27a> <== NOT EXECUTED
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
450ba: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 450be: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 450c2: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
450c4: 588f addql #4,%sp <== NOT EXECUTED 450c6: 4a80 tstl %d0 <== NOT EXECUTED 450c8: 6cc8 bges 45092 <rtems_termios_read+0x290> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
450ca: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 450ce: 6718 beqs 450e8 <rtems_termios_read+0x2e6> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
450d0: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450d4: 6706 beqs 450dc <rtems_termios_read+0x2da> <== NOT EXECUTED 450d6: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 450da: 6614 bnes 450f0 <rtems_termios_read+0x2ee> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
450dc: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 450e0: 2042 moveal %d2,%a0 <== NOT EXECUTED 450e2: 4e90 jsr %a0@ <== NOT EXECUTED 450e4: 588f addql #4,%sp <== NOT EXECUTED 450e6: 609a bras 45082 <rtems_termios_read+0x280> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
450e8: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 450ec: 6700 fd8c beqw 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
450f0: 2044 moveal %d4,%a0 <== NOT EXECUTED 450f2: 4e90 jsr %a0@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
450f4: 9086 subl %d6,%d0 <== NOT EXECUTED 450f6: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 450fa: 6200 fd7e bhiw 44e7a <rtems_termios_read+0x78> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
450fe: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45102: 2042 moveal %d2,%a0 <== NOT EXECUTED 45104: 4e90 jsr %a0@ <== NOT EXECUTED 45106: 588f addql #4,%sp <== NOT EXECUTED 45108: 6000 ff78 braw 45082 <rtems_termios_read+0x280> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4510c: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45110: 2042 moveal %d2,%a0 <== NOT EXECUTED 45112: 4e90 jsr %a0@ <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45114: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45118: 588f addql #4,%sp <== NOT EXECUTED 4511a: 6000 ff2c braw 45048 <rtems_termios_read+0x246> <== NOT EXECUTED
00043f60 <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)
{
43f60: 4e56 fff4 linkw %fp,#-12 43f64: 48d7 040c moveml %d2-%d3/%a2,%sp@ 43f68: 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))
43f6c: 202a 00b8 movel %a2@(184),%d0 43f70: 0280 0000 0403 andil #1027,%d0 43f76: 0c80 0000 0401 cmpil #1025,%d0 43f7c: 6700 0140 beqw 440be <rtems_termios_refill_transmitter+0x15e>
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
43f80: 202a 00b8 movel %a2@(184),%d0 43f84: 7603 moveq #3,%d3 43f86: 7202 moveq #2,%d1 43f88: c083 andl %d3,%d0 43f8a: b280 cmpl %d0,%d1 43f8c: 6700 0172 beqw 44100 <rtems_termios_refill_transmitter+0x1a0>
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
43f90: 222a 0080 movel %a2@(128),%d1 43f94: 202a 0084 movel %a2@(132),%d0 43f98: b081 cmpl %d1,%d0 43f9a: 6700 009c beqw 44038 <rtems_termios_refill_transmitter+0xd8>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
43f9e: 203c 0000 0700 movel #1792,%d0 43fa4: 40c2 movew %sr,%d2 43fa6: 8082 orl %d2,%d0 43fa8: 46c0 movew %d0,%sr
len = tty->t_dqlen;
43faa: 222a 0090 movel %a2@(144),%d1
tty->t_dqlen = 0;
43fae: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
43fb2: 46c2 movew %d2,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
43fb4: 202a 0084 movel %a2@(132),%d0 43fb8: d280 addl %d0,%d1 43fba: 202a 0088 movel %a2@(136),%d0 43fbe: 4c40 1002 remul %d0,%d2,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
43fc2: 7002 moveq #2,%d0
len = tty->t_dqlen;
tty->t_dqlen = 0;
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
tty->rawOutBuf.Tail = newTail;
43fc4: 2542 0084 movel %d2,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
43fc8: b0aa 0094 cmpl %a2@(148),%d0 43fcc: 6700 00d8 beqw 440a6 <rtems_termios_refill_transmitter+0x146>
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
43fd0: 202a 0080 movel %a2@(128),%d0 43fd4: b480 cmpl %d0,%d2
43fd6: 6778 beqs 44050 <rtems_termios_refill_transmitter+0xf0>
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
43fd8: 202a 00b8 movel %a2@(184),%d0 43fdc: 0280 0000 0210 andil #528,%d0 43fe2: 0c80 0000 0210 cmpil #528,%d0 43fe8: 6700 015a beqw 44144 <rtems_termios_refill_transmitter+0x1e4>
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
43fec: 202a 0080 movel %a2@(128),%d0 43ff0: b082 cmpl %d2,%d0
43ff2: 647e bccs 44072 <rtems_termios_refill_transmitter+0x112> nToSend = tty->rawOutBuf.Size - newTail;
43ff4: 262a 0088 movel %a2@(136),%d3 43ff8: 9682 subl %d2,%d3
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
43ffa: 202a 00b8 movel %a2@(184),%d0 43ffe: 0280 0000 0600 andil #1536,%d0
44004: 677e beqs 44084 <rtems_termios_refill_transmitter+0x124><== ALWAYS TAKEN
44006: 7001 moveq #1,%d0 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
44008: 7201 moveq #1,%d1 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
/* when flow control XON or XOF, don't send blocks of data */
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
4400a: 7601 moveq #1,%d3 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
4400c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4400e: 202a 007c movel %a2@(124),%d0 <== NOT EXECUTED 44012: d082 addl %d2,%d0 <== NOT EXECUTED 44014: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44016: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4401a: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
4401e: 2541 0094 movel %d1,%a2@(148) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
44022: 4e90 jsr %a0@ <== NOT EXECUTED 44024: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
44028: 2542 0084 movel %d2,%a2@(132)
} return nToSend; }
4402c: 2003 movel %d3,%d0 4402e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44034: 4e5e unlk %fp 44036: 4e75 rts
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
44038: 7602 moveq #2,%d3 <== NOT EXECUTED 4403a: b6aa 0094 cmpl %a2@(148),%d3 <== NOT EXECUTED 4403e: 6700 012e beqw 4416e <rtems_termios_refill_transmitter+0x20e><== NOT EXECUTED 44042: 4203 clrb %d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
44044: 2003 movel %d3,%d0 <== NOT EXECUTED 44046: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4404c: 4e5e unlk %fp <== NOT EXECUTED 4404e: 4e75 rts <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44050: 206a 00d4 moveal %a2@(212),%a0
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
44054: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
44058: 4a88 tstl %a0 4405a: 6700 012c beqw 44188 <rtems_termios_refill_transmitter+0x228>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
4405e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED 44062: 4283 clrl %d3 <== NOT EXECUTED 44064: 486a 0030 pea %a2@(48) <== NOT EXECUTED 44068: 4e90 jsr %a0@ <== NOT EXECUTED 4406a: 508f addql #8,%sp <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
4406c: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 44070: 60ba bras 4402c <rtems_termios_refill_transmitter+0xcc><== NOT EXECUTED
* Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail;
44072: 262a 0080 movel %a2@(128),%d3 44076: 9682 subl %d2,%d3
/* 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)) {
44078: 202a 00b8 movel %a2@(184),%d0 4407c: 0280 0000 0600 andil #1536,%d0
44082: 6682 bnes 44006 <rtems_termios_refill_transmitter+0xa6><== NEVER TAKEN
44084: 2003 movel %d3,%d0
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
44086: 7201 moveq #1,%d1
(*tty->device.write)(tty->minor,
44088: 2f00 movel %d0,%sp@- 4408a: 202a 007c movel %a2@(124),%d0 4408e: d082 addl %d2,%d0 44090: 2f00 movel %d0,%sp@- 44092: 2f2a 0010 movel %a2@(16),%sp@- 44096: 206a 00a4 moveal %a2@(164),%a0
/* to allow fast reaction on incoming flow ctrl and low latency*/
/* for outgoing flow control */
if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) {
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
4409a: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(tty->minor,
4409e: 4e90 jsr %a0@ 440a0: 4fef 000c lea %sp@(12),%sp 440a4: 6082 bras 44028 <rtems_termios_refill_transmitter+0xc8>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
440a6: 2f2a 008c movel %a2@(140),%sp@- 440aa: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
440b0: 202a 0080 movel %a2@(128),%d0
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
440b4: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
440b6: b480 cmpl %d0,%d2 440b8: 6600 ff1e bnew 43fd8 <rtems_termios_refill_transmitter+0x78> 440bc: 6092 bras 44050 <rtems_termios_refill_transmitter+0xf0>
/* check for XOF/XON to send */
if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF))
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
440be: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 440c2: 486a 004a pea %a2@(74) <== NOT EXECUTED 440c6: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 440ca: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 440ce: 4e90 jsr %a0@ <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
440d0: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 440d6: 40c1 movew %sr,%d1 <== NOT EXECUTED 440d8: 8081 orl %d1,%d0 <== NOT EXECUTED 440da: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--; tty->flow_ctrl |= FL_ISNTXOF;
440dc: 7402 moveq #2,%d2 <== NOT EXECUTED
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
440de: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
440e2: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 440e6: 8082 orl %d2,%d0 <== NOT EXECUTED 440e8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
440ec: 46c1 movew %d1,%sr <== NOT EXECUTED 440ee: 7601 moveq #1,%d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
440f0: 2003 movel %d3,%d0 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
440f2: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
440f6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 440fc: 4e5e unlk %fp <== NOT EXECUTED 440fe: 4e75 rts <== NOT EXECUTED
* FIXME: this .write call will generate another * dequeue callback. This will advance the "Tail" in the data * buffer, although the corresponding data is not yet out! * Therefore the dequeue "length" should be reduced by 1 */ (*tty->device.write)(tty->minor,
44100: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44104: 486a 0049 pea %a2@(73) <== NOT EXECUTED 44108: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4410c: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 44110: 4e90 jsr %a0@ <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
44112: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44118: 40c1 movew %sr,%d1 <== NOT EXECUTED 4411a: 8081 orl %d1,%d0 <== NOT EXECUTED 4411c: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--; tty->flow_ctrl &= ~FL_ISNTXOF;
4411e: 74fd moveq #-3,%d2 <== NOT EXECUTED
*/
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
44120: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
44124: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44128: c082 andl %d2,%d0 <== NOT EXECUTED 4412a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
4412e: 46c1 movew %d1,%sr <== NOT EXECUTED 44130: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
44134: 2003 movel %d3,%d0 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
44136: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
4413a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44140: 4e5e unlk %fp <== NOT EXECUTED 44142: 4e75 rts <== NOT EXECUTED
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
44144: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 44148: 40c1 movew %sr,%d1 <== NOT EXECUTED 4414a: 8081 orl %d1,%d0 <== NOT EXECUTED 4414c: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
4414e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44152: 7620 moveq #32,%d3 <== NOT EXECUTED 44154: 8083 orl %d3,%d0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
44156: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
== (FL_MDXON | FL_ORCVXOF)) {
/* Buffer not empty, but output stops due to XOFF */
/* set flag, that output has been stopped */
rtems_interrupt_disable(level);
tty->flow_ctrl |= FL_OSTOP;
4415a: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
4415e: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
44162: 46c1 movew %d1,%sr <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
44164: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED
/* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); tty->flow_ctrl |= FL_OSTOP; tty->rawOutBufState = rob_busy; /*apm*/ rtems_interrupt_enable(level);
44168: 4203 clrb %d3 <== NOT EXECUTED 4416a: 6000 fec0 braw 4402c <rtems_termios_refill_transmitter+0xcc><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
4416e: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED 44172: 4283 clrl %d3 <== NOT EXECUTED 44174: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED 4417a: 588f addql #4,%sp <== NOT EXECUTED
nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; }
4417c: 2003 movel %d3,%d0 <== NOT EXECUTED 4417e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44184: 4e5e unlk %fp <== NOT EXECUTED 44186: 4e75 rts <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
44188: 2542 0084 movel %d2,%a2@(132)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
4418c: 4283 clrl %d3 4418e: 6000 fe9c braw 4402c <rtems_termios_refill_transmitter+0xcc>
00045b84 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
45b84: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 45b88: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ <== NOT EXECUTED 45b8c: 240e movel %fp,%d2 <== NOT EXECUTED 45b8e: 260e movel %fp,%d3 <== NOT EXECUTED 45b90: 5d82 subql #6,%d2 <== NOT EXECUTED 45b92: 47f9 0004 6044 lea 46044 <rtems_event_receive>,%a3 <== NOT EXECUTED 45b98: 4bf9 0004 6a44 lea 46a44 <rtems_task_delete>,%a5 <== NOT EXECUTED 45b9e: 5383 subql #1,%d3 <== NOT EXECUTED 45ba0: 49f9 0004 41f0 lea 441f0 <rtems_termios_enqueue_raw_characters>,%a4<== NOT EXECUTED 45ba6: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
45baa: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45bac: 42a7 clrl %sp@- <== NOT EXECUTED 45bae: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45bb2: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45bb6: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
45bb8: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45bbc: 7001 moveq #1,%d0 <== NOT EXECUTED 45bbe: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45bc2: 663e bnes 45c02 <rtems_termios_rxdaemon+0x7e> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
45bc4: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45bc8: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 45bcc: 4e90 jsr %a0@ <== NOT EXECUTED
if (c != EOF) {
45bce: 588f addql #4,%sp <== NOT EXECUTED 45bd0: 72ff moveq #-1,%d1 <== NOT EXECUTED 45bd2: b280 cmpl %d0,%d1 <== NOT EXECUTED 45bd4: 67d4 beqs 45baa <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
45bd6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
45bda: 1d40 ffff moveb %d0,%fp@(-1) <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
45bde: 2f03 movel %d3,%sp@- <== NOT EXECUTED 45be0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45be2: 4e94 jsr %a4@ <== NOT EXECUTED 45be4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
45be8: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45bea: 42a7 clrl %sp@- <== NOT EXECUTED 45bec: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45bf0: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45bf4: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
45bf6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45bfa: 7001 moveq #1,%d0 <== NOT EXECUTED 45bfc: c0ae fffa andl %fp@(-6),%d0 <== NOT EXECUTED 45c00: 67c2 beqs 45bc4 <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
45c02: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45c06: 42a7 clrl %sp@- <== NOT EXECUTED 45c08: 4e95 jsr %a5@ <== NOT EXECUTED 45c0a: 588f addql #4,%sp <== NOT EXECUTED 45c0c: 609c bras 45baa <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED
...
00043f44 <rtems_termios_rxirq_occured>:
* signal receive interrupt to rx daemon
* NOTE: This routine runs in the context of the
* device receive interrupt handler.
*/
void rtems_termios_rxirq_occured(struct rtems_termios_tty *tty)
{
43f44: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43f48: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
/* * send event to rx daemon task */ rtems_event_send(tty->rxTaskId,TERMIOS_RX_PROC_EVENT);
43f4c: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 43f50: 2f28 00c4 movel %a0@(196),%sp@- <== NOT EXECUTED 43f54: 4eb9 0004 61ec jsr 461ec <rtems_event_send> <== NOT EXECUTED 43f5a: 508f addql #8,%sp <== NOT EXECUTED
}
43f5c: 4e5e unlk %fp <== NOT EXECUTED
00045b02 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45b02: 4e56 ffe8 linkw %fp,#-24 <== NOT EXECUTED 45b06: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ <== NOT EXECUTED 45b0a: 240e movel %fp,%d2 <== NOT EXECUTED 45b0c: 5982 subql #4,%d2 <== NOT EXECUTED 45b0e: 47f9 0004 6044 lea 46044 <rtems_event_receive>,%a3 <== NOT EXECUTED 45b14: 4bf9 0004 6a44 lea 46a44 <rtems_task_delete>,%a5 <== NOT EXECUTED 45b1a: 49f9 0004 3f60 lea 43f60 <rtems_termios_refill_transmitter>,%a4<== NOT EXECUTED 45b20: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
45b24: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45b26: 42a7 clrl %sp@- <== NOT EXECUTED 45b28: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45b2c: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45b30: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45b32: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45b36: 7001 moveq #1,%d0 <== NOT EXECUTED 45b38: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45b3c: 663a bnes 45b78 <rtems_termios_txdaemon+0x76> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45b3e: 202a 00cc movel %a2@(204),%d0 <== NOT EXECUTED 45b42: eb88 lsll #5,%d0 <== NOT EXECUTED 45b44: 0680 0006 0ae0 addil #396000,%d0 <== NOT EXECUTED 45b4a: 2240 moveal %d0,%a1 <== NOT EXECUTED 45b4c: 2051 moveal %a1@,%a0 <== NOT EXECUTED 45b4e: 4a88 tstl %a0 <== NOT EXECUTED 45b50: 6706 beqs 45b58 <rtems_termios_txdaemon+0x56> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
45b52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45b54: 4e90 jsr %a0@ <== NOT EXECUTED 45b56: 588f addql #4,%sp <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
45b58: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45b5a: 4e94 jsr %a4@ <== NOT EXECUTED 45b5c: 588f addql #4,%sp <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
45b5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45b60: 42a7 clrl %sp@- <== NOT EXECUTED 45b62: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 45b66: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 45b6a: 4e93 jsr %a3@ <== NOT EXECUTED
TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45b6c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 45b70: 7001 moveq #1,%d0 <== NOT EXECUTED 45b72: c0ae fffc andl %fp@(-4),%d0 <== NOT EXECUTED 45b76: 67c6 beqs 45b3e <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
tty->txTaskId = 0;
45b78: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45b7c: 42a7 clrl %sp@- <== NOT EXECUTED 45b7e: 4e95 jsr %a5@ <== NOT EXECUTED 45b80: 588f addql #4,%sp <== NOT EXECUTED 45b82: 60a0 bras 45b24 <rtems_termios_txdaemon+0x22> <== NOT EXECUTED
00044cb4 <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
44cb4: 4e56 ffe4 linkw %fp,#-28 44cb8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 44cbc: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
44cc0: 2053 moveal %a3@,%a0 44cc2: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44cc6: 42a7 clrl %sp@- 44cc8: 42a7 clrl %sp@- 44cca: 2f2a 0018 movel %a2@(24),%sp@- 44cce: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
44cd4: 4fef 000c lea %sp@(12),%sp
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44cd8: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
44cda: 662a bnes 44d06 <rtems_termios_write+0x52> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
44cdc: 202a 00cc movel %a2@(204),%d0 44ce0: eb88 lsll #5,%d0 44ce2: 0680 0006 0ad8 addil #395992,%d0 44ce8: 2240 moveal %d0,%a1 44cea: 2051 moveal %a1@,%a0 44cec: 4a88 tstl %a0
44cee: 6722 beqs 44d12 <rtems_termios_write+0x5e> <== ALWAYS TAKEN
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
44cf0: 2f0b movel %a3,%sp@- <== NOT EXECUTED 44cf2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44cf4: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44cf6: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
44cfa: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44cfc: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
44d02: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_termios_puts (args->buffer, args->count, tty); args->bytes_moved = args->count; } rtems_semaphore_release (tty->osem); return sc; }
44d06: 2002 movel %d2,%d0 <== NOT EXECUTED 44d08: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 <== NOT EXECUTED 44d0e: 4e5e unlk %fp <== NOT EXECUTED 44d10: 4e75 rts <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
44d12: 7001 moveq #1,%d0 44d14: c0aa 0034 andl %a2@(52),%d0
44d18: 6744 beqs 44d5e <rtems_termios_write+0xaa> <== NEVER TAKEN
uint32_t count = args->count;
44d1a: 282b 0010 movel %a3@(16),%d4
char *buffer = args->buffer;
44d1e: 286b 000c moveal %a3@(12),%a4
while (count--)
44d22: 6762 beqs 44d86 <rtems_termios_write+0xd2> <== NEVER TAKEN
44d24: 4283 clrl %d3 44d26: 4bfa f8a8 lea %pc@(445d0 <oproc>),%a5
oproc (*buffer++, tty);
44d2a: 2f0a movel %a2,%sp@- 44d2c: 4280 clrl %d0 44d2e: 1034 3800 moveb %a4@(00000000,%d3:l),%d0 44d32: 5283 addql #1,%d3 44d34: 2f00 movel %d0,%sp@- 44d36: 4e95 jsr %a5@
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
44d38: 508f addql #8,%sp 44d3a: b883 cmpl %d3,%d4
44d3c: 66ec bnes 44d2a <rtems_termios_write+0x76>
44d3e: 202b 0010 movel %a3@(16),%d0
oproc (*buffer++, tty); args->bytes_moved = args->count;
44d42: 2740 0018 movel %d0,%a3@(24)
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
44d46: 2f2a 0018 movel %a2@(24),%sp@- 44d4a: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release>
return sc;
44d50: 588f addql #4,%sp
}
44d52: 2002 movel %d2,%d0 44d54: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 44d5a: 4e5e unlk %fp 44d5c: 4e75 rts
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
44d5e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44d60: 2f2b 0010 movel %a3@(16),%sp@- <== NOT EXECUTED 44d64: 2f2b 000c movel %a3@(12),%sp@- <== NOT EXECUTED 44d68: 4eb9 0004 44a8 jsr 444a8 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
44d6e: 276b 0010 0018 movel %a3@(16),%a3@(24) <== NOT EXECUTED 44d74: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} rtems_semaphore_release (tty->osem);
44d78: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44d7c: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
44d82: 588f addql #4,%sp <== NOT EXECUTED 44d84: 60cc bras 44d52 <rtems_termios_write+0x9e> <== NOT EXECUTED
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
44d86: 4280 clrl %d0 <== NOT EXECUTED
oproc (*buffer++, tty); args->bytes_moved = args->count;
44d88: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 44d8c: 60b8 bras 44d46 <rtems_termios_write+0x92> <== NOT EXECUTED
00059548 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
59548: 4e56 fffc linkw %fp,#-4
RTEMS_INLINE_ROUTINE Timer_Control *_Timer_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
5954c: 486e fffc pea %fp@(-4) 59550: 2f2e 0008 movel %fp@(8),%sp@- 59554: 4879 0008 1582 pea 81582 <_Timer_Information> 5955a: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59560: 4fef 000c lea %sp@(12),%sp 59564: 4aae fffc tstl %fp@(-4)
59568: 6706 beqs 59570 <rtems_timer_cancel+0x28>
5956a: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5956c: 4e5e unlk %fp 5956e: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
59570: 7204 moveq #4,%d1 59572: 2040 moveal %d0,%a0 59574: b2a8 0038 cmpl %a0@(56),%d1
59578: 670c beqs 59586 <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
5957a: 4868 0010 pea %a0@(16) 5957e: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove> 59584: 588f addql #4,%sp
_Thread_Enable_dispatch();
59586: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 5958c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5958e: 4e5e unlk %fp
...
00059784 <rtems_timer_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59784: 4e56 ffec linkw %fp,#-20 59788: 48d7 041c moveml %d2-%d4/%a2,%sp@ 5978c: 242e 000c movel %fp@(12),%d2 59790: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
if ( !_TOD_Is_set )
59794: 4a39 0008 0cd4 tstb 80cd4 <_TOD_Is_set>
5979a: 660c bnes 597a8 <rtems_timer_fire_when+0x24>
5979c: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5979e: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597a4: 4e5e unlk %fp 597a6: 4e75 rts
rtems_interval seconds;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
597a8: 2f02 movel %d2,%sp@- 597aa: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 597b0: 588f addql #4,%sp 597b2: 4a00 tstb %d0
597b4: 671a beqs 597d0 <rtems_timer_fire_when+0x4c>
return RTEMS_INVALID_CLOCK;
if ( !routine )
597b6: 4a83 tstl %d3 597b8: 6700 00a8 beqw 59862 <rtems_timer_fire_when+0xde>
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597bc: 2f02 movel %d2,%sp@- 597be: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
597c4: 588f addql #4,%sp
return RTEMS_INVALID_CLOCK;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
seconds = _TOD_To_seconds( wall_time );
597c6: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
597c8: b0b9 0008 0d52 cmpl 80d52 <_TOD_Now>,%d0
597ce: 620c bhis 597dc <rtems_timer_fire_when+0x58>
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
597d0: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
597d2: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 597d8: 4e5e unlk %fp 597da: 4e75 rts 597dc: 486e fffc pea %fp@(-4) 597e0: 2f2e 0008 movel %fp@(8),%sp@- 597e4: 4879 0008 1582 pea 81582 <_Timer_Information> 597ea: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
597f0: 4fef 000c lea %sp@(12),%sp 597f4: 2440 moveal %d0,%a2 597f6: 4aae fffc tstl %fp@(-4)
597fa: 665a bnes 59856 <rtems_timer_fire_when+0xd2> <== NEVER TAKEN
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
597fc: 2800 movel %d0,%d4 597fe: 0684 0000 0010 addil #16,%d4 59804: 2f04 movel %d4,%sp@- 59806: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
5980c: 202e 0008 movel %fp@(8),%d0 59810: 2540 0030 movel %d0,%a2@(48)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59814: 94b9 0008 0d52 subl 80d52 <_TOD_Now>,%d2
the_timer->the_class = TIMER_TIME_OF_DAY;
5981a: 7002 moveq #2,%d0
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
the_watchdog->user_data = user_data;
5981c: 256e 0014 0034 movel %fp@(20),%a2@(52) 59822: 2540 0038 movel %d0,%a2@(56)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
59826: 2542 001c movel %d2,%a2@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
5982a: 2543 002c movel %d3,%a2@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5982e: 42aa 0018 clrl %a2@(24)
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
59832: 2f04 movel %d4,%sp@- 59834: 4879 0008 0d8c pea 80d8c <_Watchdog_Seconds_chain> 5983a: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert>
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
59840: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59846: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
_Watchdog_Insert_seconds(
&the_timer->Ticker,
seconds - _TOD_Seconds_since_epoch()
);
_Thread_Enable_dispatch();
5984a: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5984c: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 59852: 4e5e unlk %fp 59854: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59856: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59858: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5985e: 4e5e unlk %fp 59860: 4e75 rts
return RTEMS_NOT_DEFINED;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
if ( !routine )
59862: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59864: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 5986a: 4e5e unlk %fp
...
00059b94 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
59b94: 4e56 fffc linkw %fp,#-4 59b98: 202e 0008 movel %fp@(8),%d0 59b9c: 2f03 movel %d3,%sp@- 59b9e: 2f02 movel %d2,%sp@- 59ba0: 4a80 tstl %d0
59ba2: 6748 beqs 59bec <rtems_timer_initiate_server+0x58>
59ba4: 4281 clrl %d1 59ba6: 1239 0007 b132 moveb 7b132 <rtems_maximum_priority>,%d1 59bac: b280 cmpl %d0,%d1
59bae: 644a bccs 59bfa <rtems_timer_initiate_server+0x66>
* structured so we check it is invalid before looking for
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
59bb0: 72ff moveq #-1,%d1 59bb2: b280 cmpl %d0,%d1
59bb4: 6636 bnes 59bec <rtems_timer_initiate_server+0x58>
59bb6: 2239 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d1 59bbc: 5281 addql #1,%d1 59bbe: 4283 clrl %d3 59bc0: 23c1 0008 0cc0 movel %d1,80cc0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59bc6: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59bc8: 1439 0007 c10c moveb 7c10c <initialized.4095>,%d2
initialized = true;
59bce: 13c0 0007 c10c moveb %d0,7c10c <initialized.4095>
_Thread_Enable_dispatch();
59bd4: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59bda: 4a02 tstb %d2
59bdc: 6744 beqs 59c22 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
59bde: 242e fff4 movel %fp@(-12),%d2
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
59be2: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59be4: 262e fff8 movel %fp@(-8),%d3 59be8: 4e5e unlk %fp 59bea: 4e75 rts 59bec: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59bf0: 7013 moveq #19,%d0
}
59bf2: 262e fff8 movel %fp@(-8),%d3 59bf6: 4e5e unlk %fp 59bf8: 4e75 rts 59bfa: 2239 0008 0cc0 movel 80cc0 <_Thread_Dispatch_disable_level>,%d1 59c00: 5281 addql #1,%d1 59c02: 2600 movel %d0,%d3 59c04: 23c1 0008 0cc0 movel %d1,80cc0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
59c0a: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59c0c: 1439 0007 c10c moveb 7c10c <initialized.4095>,%d2
initialized = true;
59c12: 13c0 0007 c10c moveb %d0,7c10c <initialized.4095>
_Thread_Enable_dispatch();
59c18: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59c1e: 4a02 tstb %d2
59c20: 66bc bnes 59bde <rtems_timer_initiate_server+0x4a><== NEVER TAKEN
* other library rules. For example, if using a TSR written in Ada the * Server should run at the same priority as the priority Ada task. * Otherwise, the priority ceiling for the mutex used to protect the * GNAT run-time is violated. */ status = rtems_task_create(
59c22: 486e fffc pea %fp@(-4) 59c26: 222e 0010 movel %fp@(16),%d1 59c2a: 08c1 000f bset #15,%d1 59c2e: 2f01 movel %d1,%sp@- 59c30: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 59c34: 2f2e 000c movel %fp@(12),%sp@- 59c38: 2f03 movel %d3,%sp@- 59c3a: 2f3c 5449 4d45 movel #1414090053,%sp@- 59c40: 4eb9 0005 8c28 jsr 58c28 <rtems_task_create>
/* user may want floating point but we need */
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
59c46: 4fef 0018 lea %sp@(24),%sp 59c4a: 4a80 tstl %d0
59c4c: 6714 beqs 59c62 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
59c4e: 242e fff4 movel %fp@(-12),%d2
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59c52: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
59c54: 262e fff8 movel %fp@(-8),%d3 59c58: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
59c5a: 13c1 0007 c10c moveb %d1,7c10c <initialized.4095>
initialized = false;
}
#endif
return status;
}
59c60: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c62: 41f9 0007 c142 lea 7c142 <_Timer_server_Default+0x34>,%a0
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
59c68: 4282 clrl %d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c6a: 223c 0007 c13e movel #508222,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59c70: 23c8 0007 c13e movel %a0,7c13e <_Timer_server_Default+0x30>
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
59c76: 202e fffc movel %fp@(-4),%d0 59c7a: 41f9 0007 c17a lea 7c17a <_Timer_server_Default+0x6c>,%a0 59c80: 23c8 0007 c176 movel %a0,7c176 <_Timer_server_Default+0x68>
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
59c86: 2079 0008 0c4a moveal 80c4a <_RTEMS_tasks_Information+0x18>,%a0 59c8c: 3400 movew %d0,%d2
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59c8e: 23c1 0007 c146 movel %d1,7c146 <_Timer_server_Default+0x38>
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
59c94: 2239 0008 0e04 movel 80e04 <_Watchdog_Ticks_since_boot>,%d1
/*
* We work with the TCB pointer, not the ID, so we need to convert
* to a TCB pointer from here out.
*/
ts->thread = (Thread_Control *)_Objects_Get_local_object(
59c9a: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 59c9e: 23d0 0007 c10e movel %a0@,7c10e <_Timer_server_Default> 59ca4: 41f9 0007 c176 lea 7c176 <_Timer_server_Default+0x68>,%a0 59caa: 23c8 0007 c17e movel %a0,7c17e <_Timer_server_Default+0x70>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cb0: 4879 0007 c10e pea 7c10e <_Timer_server_Default>
the_watchdog->routine = routine;
59cb6: 41f9 0005 cba4 lea 5cba4 <_Thread_Delay_ended>,%a0 59cbc: 23c8 0007 c132 movel %a0,7c132 <_Timer_server_Default+0x24> 59cc2: 487a 0160 pea %pc@(59e24 <_Timer_server_Body>) 59cc6: 23c8 0007 c16a movel %a0,7c16a <_Timer_server_Default+0x5c>
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59ccc: 41f9 0008 0d52 lea 80d52 <_TOD_Now>,%a0
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
59cd2: 23c1 0007 c14a movel %d1,7c14a <_Timer_server_Default+0x3c>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
59cd8: 23d0 0007 c182 movel %a0@,7c182 <_Timer_server_Default+0x74>
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59cde: 223c 0005 a060 movel #368736,%d1
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59ce4: 41f9 0007 c10e lea 7c10e <_Timer_server_Default>,%a0
/*
* Initialize the pointer to the timer schedule method so applications that
* do not use the Timer Server do not have to pull it in.
*/
ts->schedule_operation = _Timer_server_Schedule_operation_method;
59cea: 23c1 0007 c112 movel %d1,7c112 <_Timer_server_Default+0x4>
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
ts->active = false;
59cf0: 4201 clrb %d1
ts->schedule_operation = _Timer_server_Schedule_operation_method;
ts->Interval_watchdogs.last_snapshot = _Watchdog_Ticks_since_boot;
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
ts->insert_chain = NULL;
59cf2: 42b9 0007 c186 clrl 7c186 <_Timer_server_Default+0x78>
ts->active = false;
59cf8: 13c1 0007 c18a moveb %d1,7c18a <_Timer_server_Default+0x7c>
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
59cfe: 2f00 movel %d0,%sp@-
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59d00: 23c8 0008 15bc movel %a0,815bc <_Timer_server>
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
59d06: 42b9 0007 c142 clrl 7c142 <_Timer_server_Default+0x34> 59d0c: 42b9 0007 c17a clrl 7c17a <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d12: 42b9 0007 c11e clrl 7c11e <_Timer_server_Default+0x10>
the_watchdog->routine = routine; the_watchdog->id = id;
59d18: 23c0 0007 c136 movel %d0,7c136 <_Timer_server_Default+0x28>
the_watchdog->user_data = user_data;
59d1e: 42b9 0007 c13a clrl 7c13a <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59d24: 42b9 0007 c156 clrl 7c156 <_Timer_server_Default+0x48>
the_watchdog->routine = routine; the_watchdog->id = id;
59d2a: 23c0 0007 c16e movel %d0,7c16e <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
59d30: 42b9 0007 c172 clrl 7c172 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
59d36: 4eb9 0005 9330 jsr 59330 <rtems_task_start>
initialized = false;
}
#endif
return status;
}
59d3c: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
59d40: 4fef 000c lea %sp@(12),%sp
}
59d44: 262e fff8 movel %fp@(-8),%d3
59d48: 4e5e unlk %fp <== NOT EXECUTED
00059908 <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
59908: 4e56 fff0 linkw %fp,#-16 5990c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59910: 486e fffc pea %fp@(-4) 59914: 2f2e 0008 movel %fp@(8),%sp@- 59918: 4879 0008 1582 pea 81582 <_Timer_Information> 5991e: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59924: 4fef 000c lea %sp@(12),%sp 59928: 2440 moveal %d0,%a2 5992a: 4aae fffc tstl %fp@(-4)
5992e: 670e beqs 5993e <rtems_timer_reset+0x36>
59930: 7404 moveq #4,%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59932: 2002 movel %d2,%d0 59934: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5993a: 4e5e unlk %fp 5993c: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
5993e: 202a 0038 movel %a2@(56),%d0
59942: 671a beqs 5995e <rtems_timer_reset+0x56>
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59944: 7201 moveq #1,%d1 59946: b280 cmpl %d0,%d1
59948: 673c beqs 59986 <rtems_timer_reset+0x7e>
5994a: 740b moveq #11,%d2
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
5994c: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59952: 2002 movel %d2,%d0 59954: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5995a: 4e5e unlk %fp 5995c: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
5995e: 45ea 0010 lea %a2@(16),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59962: 4282 clrl %d2
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
59964: 2f0a movel %a2,%sp@- 59966: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
5996c: 2f0a movel %a2,%sp@- 5996e: 4879 0008 0d98 pea 80d98 <_Watchdog_Ticks_chain> 59974: 4eb9 0005 e214 jsr 5e214 <_Watchdog_Insert> 5997a: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
5997e: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 59984: 60cc bras 59952 <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59986: 486a 0010 pea %a2@(16)
(*timer_server->schedule_operation)( timer_server, the_timer );
5998a: 4282 clrl %d2
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
_Watchdog_Remove( &the_timer->Ticker );
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
} else if ( the_timer->the_class == TIMER_INTERVAL_ON_TASK ) {
Timer_server_Control *timer_server = _Timer_server;
5998c: 2679 0008 15bc moveal 815bc <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59992: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
59998: 2f0a movel %a2,%sp@- 5999a: 2f0b movel %a3,%sp@- 5999c: 206b 0004 moveal %a3@(4),%a0 599a0: 4e90 jsr %a0@ 599a2: 4fef 000c lea %sp@(12),%sp
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
}
_Thread_Enable_dispatch();
599a6: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch> 599ac: 60a4 bras 59952 <rtems_timer_reset+0x4a>
...
00059a98 <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
59a98: 4e56 ffec linkw %fp,#-20 59a9c: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59aa0: 242e 000c movel %fp@(12),%d2 59aa4: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
59aa8: 2479 0008 15bc moveal 815bc <_Timer_server>,%a2
if ( !timer_server )
59aae: 4a8a tstl %a2 59ab0: 6700 00c8 beqw 59b7a <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59ab4: 4a39 0008 0cd4 tstb 80cd4 <_TOD_Is_set> 59aba: 6700 00a6 beqw 59b62 <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
59abe: 4a83 tstl %d3 59ac0: 6700 00ac beqw 59b6e <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
59ac4: 2f02 movel %d2,%sp@- 59ac6: 4eb9 0005 676c jsr 5676c <_TOD_Validate> 59acc: 588f addql #4,%sp 59ace: 4a00 tstb %d0
59ad0: 660c bnes 59ade <rtems_timer_server_fire_when+0x46>
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
59ad2: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59ad4: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59ada: 4e5e unlk %fp 59adc: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ade: 2f02 movel %d2,%sp@- 59ae0: 4eb9 0005 665c jsr 5665c <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
59ae6: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
59ae8: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
59aea: b0b9 0008 0d52 cmpl 80d52 <_TOD_Now>,%d0
59af0: 63e0 blss 59ad2 <rtems_timer_server_fire_when+0x3a>
59af2: 486e fffc pea %fp@(-4) 59af6: 2f2e 0008 movel %fp@(8),%sp@- 59afa: 4879 0008 1582 pea 81582 <_Timer_Information> 59b00: 4eb9 0005 c3a4 jsr 5c3a4 <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b06: 4fef 000c lea %sp@(12),%sp 59b0a: 2640 moveal %d0,%a3 59b0c: 4aae fffc tstl %fp@(-4)
59b10: 6674 bnes 59b86 <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
59b12: 486b 0010 pea %a3@(16) 59b16: 4eb9 0005 e35c jsr 5e35c <_Watchdog_Remove>
the_watchdog->routine = routine; the_watchdog->id = id;
59b1c: 202e 0008 movel %fp@(8),%d0 59b20: 2740 0030 movel %d0,%a3@(48)
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();
59b24: 94b9 0008 0d52 subl 80d52 <_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;
59b2a: 7003 moveq #3,%d0
the_watchdog->user_data = user_data;
59b2c: 276e 0014 0034 movel %fp@(20),%a3@(52) 59b32: 2740 0038 movel %d0,%a3@(56)
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59b36: 2742 001c movel %d2,%a3@(28)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
59b3a: 2743 002c movel %d3,%a3@(44)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59b3e: 42ab 0018 clrl %a3@(24)
(*timer_server->schedule_operation)( timer_server, the_timer );
59b42: 2f0b movel %a3,%sp@- 59b44: 2f0a movel %a2,%sp@- 59b46: 206a 0004 moveal %a2@(4),%a0 59b4a: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59b4c: 4eb9 0005 cd38 jsr 5cd38 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59b52: 4fef 000c lea %sp@(12),%sp
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
(*timer_server->schedule_operation)( timer_server, the_timer );
_Thread_Enable_dispatch();
59b56: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b58: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b5e: 4e5e unlk %fp 59b60: 4e75 rts
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
59b62: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b64: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 59b6a: 4e5e unlk %fp <== NOT EXECUTED 59b6c: 4e75 rts <== NOT EXECUTED
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
59b6e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b70: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b76: 4e5e unlk %fp 59b78: 4e75 rts
Timer_Control *the_timer;
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
59b7a: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b7c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b82: 4e5e unlk %fp 59b84: 4e75 rts
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59b86: 7004 moveq #4,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59b88: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59b8e: 4e5e unlk %fp
...
0004297c <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
4297c: 4e56 ffe0 linkw %fp,#-32 <== NOT EXECUTED 42980: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ <== NOT EXECUTED 42984: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
42988: 2802 movel %d2,%d4 <== NOT EXECUTED 4298a: 0284 2000 0000 andil #536870912,%d4 <== NOT EXECUTED 42990: 6730 beqs 429c2 <rtems_verror+0x46> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
42992: 2239 0006 12c8 movel 612c8 <rtems_panic_in_progress>,%d1 <== NOT EXECUTED 42998: 2001 movel %d1,%d0 <== NOT EXECUTED 4299a: 5280 addql #1,%d0 <== NOT EXECUTED 4299c: 23c0 0006 12c8 movel %d0,612c8 <rtems_panic_in_progress> <== NOT EXECUTED 429a2: 4a81 tstl %d1 <== NOT EXECUTED 429a4: 6714 beqs 429ba <rtems_verror+0x3e> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
429a6: 2039 0006 142c movel 6142c <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 429ac: 5280 addql #1,%d0 <== NOT EXECUTED 429ae: 23c0 0006 142c movel %d0,6142c <_Thread_Dispatch_disable_level><== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
429b4: 2039 0006 12c8 movel 612c8 <rtems_panic_in_progress>,%d0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
429ba: 7202 moveq #2,%d1 <== NOT EXECUTED 429bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 429be: 6d00 00de bltw 42a9e <rtems_verror+0x122> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429c2: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 429c8: 45f9 0005 0914 lea 50914 <fflush>,%a2 <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
429ce: 2c02 movel %d2,%d6 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429d0: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
429d4: 0286 8fff ffff andil #-1879048193,%d6 <== NOT EXECUTED
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429da: 4e92 jsr %a2@ <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
429dc: 588f addql #4,%sp <== NOT EXECUTED 429de: 0802 001e btst #30,%d2 <== NOT EXECUTED 429e2: 6600 0106 bnew 42aea <rtems_verror+0x16e> <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
429e6: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
429ea: 4283 clrl %d3 <== NOT EXECUTED 429ec: 47f9 0005 0ca0 lea 50ca0 <fprintf>,%a3 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
429f2: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 429f6: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 429fc: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a00: 4eb9 0005 6e5c jsr 56e5c <vfprintf> <== NOT EXECUTED
if (status)
42a06: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42a0a: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (status)
42a0c: 4a86 tstl %d6 <== NOT EXECUTED 42a0e: 6600 009a bnew 42aaa <rtems_verror+0x12e> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
42a12: 4a83 tstl %d3 <== NOT EXECUTED 42a14: 6732 beqs 42a48 <rtems_verror+0xcc> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
42a16: 4a83 tstl %d3 <== NOT EXECUTED 42a18: 6f14 bles 42a2e <rtems_verror+0xb2> <== NOT EXECUTED 42a1a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a1c: 49f9 0005 15b4 lea 515b4 <strerror>,%a4 <== NOT EXECUTED 42a22: 4e94 jsr %a4@ <== NOT EXECUTED 42a24: 588f addql #4,%sp <== NOT EXECUTED 42a26: 2040 moveal %d0,%a0 <== NOT EXECUTED 42a28: 4a10 tstb %a0@ <== NOT EXECUTED 42a2a: 6600 00f4 bnew 42b20 <rtems_verror+0x1a4> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
42a2e: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a30: 4879 0005 e482 pea 5e482 <IMFS_ops+0x6a> <== NOT EXECUTED 42a36: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42a3c: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a40: 4e93 jsr %a3@ <== NOT EXECUTED 42a42: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42a46: da80 addl %d0,%d5 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
42a48: 4879 0005 e912 pea 5e912 <rtems_status_assoc+0x19e> <== NOT EXECUTED 42a4e: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42a54: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42a58: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42a5e: 4e93 jsr %a3@ <== NOT EXECUTED
(void) fflush(stderr);
42a60: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42a66: 2c00 movel %d0,%d6 <== NOT EXECUTED
(void) fflush(stderr);
42a68: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42a6c: 4e92 jsr %a2@ <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42a6e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42a72: 4a82 tstl %d2 <== NOT EXECUTED 42a74: 671a beqs 42a90 <rtems_verror+0x114> <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
42a76: 4a84 tstl %d4 <== NOT EXECUTED 42a78: 675c beqs 42ad6 <rtems_verror+0x15a> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
42a7a: 4879 0005 e496 pea 5e496 <IMFS_ops+0x7e> <== NOT EXECUTED 42a80: 42a7 clrl %sp@- <== NOT EXECUTED 42a82: 4eb9 0004 2b90 jsr 42b90 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
42a88: 2f03 movel %d3,%sp@- <== NOT EXECUTED 42a8a: 4eb9 0004 3746 jsr 43746 <_exit> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42a90: 2006 movel %d6,%d0 <== NOT EXECUTED 42a92: d085 addl %d5,%d0 <== NOT EXECUTED
rtems_error(0, "fatal error, aborting");
abort();
}
}
return chars_written;
}
42a94: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 42a9a: 4e5e unlk %fp <== NOT EXECUTED 42a9c: 4e75 rts <== NOT EXECUTED
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
abort();
42a9e: 4280 clrl %d0 <== NOT EXECUTED
}
}
return chars_written;
}
42aa0: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4 <== NOT EXECUTED 42aa6: 4e5e unlk %fp <== NOT EXECUTED 42aa8: 4e75 rts <== NOT EXECUTED
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
42aaa: 2f06 movel %d6,%sp@- <== NOT EXECUTED 42aac: 4eb9 0004 2964 jsr 42964 <rtems_status_text> <== NOT EXECUTED 42ab2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42ab4: 4879 0005 e467 pea 5e467 <IMFS_ops+0x4f> <== NOT EXECUTED 42aba: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42ac0: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42ac4: 4e93 jsr %a3@ <== NOT EXECUTED 42ac6: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 42aca: da80 addl %d0,%d5 <== NOT EXECUTED
if (local_errno)
42acc: 4a83 tstl %d3 <== NOT EXECUTED 42ace: 6700 ff78 beqw 42a48 <rtems_verror+0xcc> <== NOT EXECUTED 42ad2: 6000 ff42 braw 42a16 <rtems_verror+0x9a> <== NOT EXECUTED
rtems_error(0, "fatal error, exiting");
_exit(local_errno);
}
else
{
rtems_error(0, "fatal error, aborting");
42ad6: 4879 0005 e4ab pea 5e4ab <IMFS_ops+0x93> <== NOT EXECUTED 42adc: 42a7 clrl %sp@- <== NOT EXECUTED 42ade: 4eb9 0004 2b90 jsr 42b90 <rtems_error> <== NOT EXECUTED
abort();
42ae4: 4eb9 0005 0588 jsr 50588 <abort> <== NOT EXECUTED
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
local_errno = errno;
42aea: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 42af0: 47f9 0005 0ca0 lea 50ca0 <fprintf>,%a3 <== NOT EXECUTED 42af6: 2040 moveal %d0,%a0 <== NOT EXECUTED 42af8: 2610 movel %a0@,%d3 <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42afa: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 42afe: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 42b02: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42b08: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b0c: 4eb9 0005 6e5c jsr 56e5c <vfprintf> <== NOT EXECUTED
if (status)
42b12: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42b16: 2a00 movel %d0,%d5 <== NOT EXECUTED
if (status)
42b18: 4a86 tstl %d6 <== NOT EXECUTED 42b1a: 6700 fef6 beqw 42a12 <rtems_verror+0x96> <== NOT EXECUTED 42b1e: 608a bras 42aaa <rtems_verror+0x12e> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
42b20: 2f03 movel %d3,%sp@- <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42b22: 0282 3000 0000 andil #805306368,%d2 <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
42b28: 4e94 jsr %a4@ <== NOT EXECUTED 42b2a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42b2c: 4879 0005 e475 pea 5e475 <IMFS_ops+0x5d> <== NOT EXECUTED 42b32: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42b38: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b3c: 4e93 jsr %a3@ <== NOT EXECUTED
if (status)
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno)
{
if ((local_errno > 0) && *strerror(local_errno))
42b3e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
42b42: da80 addl %d0,%d5 <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42b44: 4879 0005 e912 pea 5e912 <rtems_status_assoc+0x19e> <== NOT EXECUTED 42b4a: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED 42b50: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b54: 4e93 jsr %a3@ <== NOT EXECUTED
(void) fflush(stderr);
42b56: 2079 0005 fd98 moveal 5fd98 <_impure_ptr>,%a0 <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42b5c: 2c00 movel %d0,%d6 <== NOT EXECUTED
(void) fflush(stderr);
42b5e: 2f28 000c movel %a0@(12),%sp@- <== NOT EXECUTED 42b62: 4e92 jsr %a2@ <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
42b64: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42b68: 4a82 tstl %d2 <== NOT EXECUTED 42b6a: 6600 ff0a bnew 42a76 <rtems_verror+0xfa> <== NOT EXECUTED 42b6e: 6000 ff20 braw 42a90 <rtems_verror+0x114> <== NOT EXECUTED
00043024 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
43024: 4e56 ffe4 linkw %fp,#-28 43028: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4302c: 246e 0008 moveal %fp@(8),%a2 43030: 4284 clrl %d4 43032: 263c 7fff ffff movel #2147483647,%d3 43038: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4303a: 47f9 0005 2554 lea 52554 <__srget_r>,%a3 43040: 202a 0004 movel %a2@(4),%d0 43044: 5380 subql #1,%d0 43046: 2540 0004 movel %d0,%a2@(4)
4304a: 6d62 blts 430ae <scanInt+0x8a> <== NEVER TAKEN
4304c: 2052 moveal %a2@,%a0 4304e: 4280 clrl %d0 43050: 1010 moveb %a0@,%d0 43052: 5288 addql #1,%a0
if (c == ':')
43054: 723a moveq #58,%d1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43056: 2488 movel %a0,%a2@
if (c == ':')
43058: b280 cmpl %d0,%d1
4305a: 6764 beqs 430c0 <scanInt+0x9c>
break;
if (sign == 0) {
4305c: 4a84 tstl %d4
4305e: 660a bnes 4306a <scanInt+0x46> <== NEVER TAKEN
if (c == '-') {
43060: 7c2d moveq #45,%d6 43062: bc80 cmpl %d0,%d6 43064: 6700 0084 beqw 430ea <scanInt+0xc6>
sign = -1;
limit++;
continue;
43068: 7801 moveq #1,%d4
}
sign = 1;
}
if (!isdigit(c))
4306a: 2079 0006 1314 moveal 61314 <__ctype_ptr__>,%a0 43070: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43074: 49c1 extbl %d1 43076: 44c1 movew %d1,%ccr
43078: 6664 bnes 430de <scanInt+0xba> <== NEVER TAKEN
return 0;
d = c - '0';
if ((i > (limit / 10))
4307a: 2203 movel %d3,%d1 4307c: 7c0a moveq #10,%d6 4307e: 4c46 1005 remul %d6,%d5,%d1 43082: 4c46 1001 remul %d6,%d1,%d1 43086: b282 cmpl %d2,%d1
43088: 6554 bcss 430de <scanInt+0xba> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
4308a: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
43090: b282 cmpl %d2,%d1
43092: 6746 beqs 430da <scanInt+0xb6> <== NEVER TAKEN
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
43094: 2202 movel %d2,%d1 43096: e789 lsll #3,%d1 43098: 2241 moveal %d1,%a1 4309a: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 4309e: 2400 movel %d0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
430a0: 202a 0004 movel %a2@(4),%d0 430a4: 5380 subql #1,%d0
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
430a6: d488 addl %a0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
430a8: 2540 0004 movel %d0,%a2@(4)
430ac: 6c9e bges 4304c <scanInt+0x28> <== ALWAYS TAKEN
430ae: 2f0a movel %a2,%sp@- <== NOT EXECUTED 430b0: 2f39 0006 1318 movel 61318 <_impure_ptr>,%sp@- <== NOT EXECUTED 430b6: 4e93 jsr %a3@ <== NOT EXECUTED 430b8: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
430ba: 723a moveq #58,%d1 <== NOT EXECUTED 430bc: b280 cmpl %d0,%d1 <== NOT EXECUTED 430be: 669c bnes 4305c <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
430c0: 4a84 tstl %d4
430c2: 671a beqs 430de <scanInt+0xba> <== NEVER TAKEN
return 0;
*val = i * sign;
430c4: 4c02 4800 mulsl %d2,%d4 430c8: 7001 moveq #1,%d0 430ca: 206e 000c moveal %fp@(12),%a0 430ce: 2084 movel %d4,%a0@
return 1; }
430d0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 430d6: 4e5e unlk %fp 430d8: 4e75 rts
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
430da: ba80 cmpl %d0,%d5 <== NOT EXECUTED 430dc: 64b6 bccs 43094 <scanInt+0x70> <== NOT EXECUTED
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
return 1;
430de: 4280 clrl %d0 <== NOT EXECUTED
}
430e0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 430e6: 4e5e unlk %fp <== NOT EXECUTED 430e8: 4e75 rts <== NOT EXECUTED
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
430ea: 5283 addql #1,%d3 <== NOT EXECUTED 430ec: 78ff moveq #-1,%d4 <== NOT EXECUTED
continue;
430ee: 6000 ff50 braw 43040 <scanInt+0x1c> <== NOT EXECUTED
000430f2 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
430f2: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
430f6: 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)
{
430fa: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 430fe: 246e 0008 moveal %fp@(8),%a2
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43102: 4bf9 0005 2554 lea 52554 <__srget_r>,%a5 43108: 202a 0004 movel %a2@(4),%d0 4310c: 5380 subql #1,%d0
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
4310e: 266e 0010 moveal %fp@(16),%a3 43112: 242e 0018 movel %fp@(24),%d2 43116: 286e 0014 moveal %fp@(20),%a4
int c;
*name = *bufp;
4311a: 2093 movel %a3@,%a0@
for (;;) {
c = getc(fp);
4311c: 2540 0004 movel %d0,%a2@(4)
43120: 6d36 blts 43158 <scanString+0x66>
43122: 2052 moveal %a2@,%a0 43124: 4280 clrl %d0 43126: 1010 moveb %a0@,%d0 43128: 5288 addql #1,%a0
if (c == ':') {
4312a: 723a moveq #58,%d1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
4312c: 2488 movel %a0,%a2@
if (c == ':') {
4312e: b280 cmpl %d0,%d1
43130: 6738 beqs 4316a <scanString+0x78>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
43132: 720a moveq #10,%d1 43134: b280 cmpl %d0,%d1
43136: 674a beqs 43182 <scanString+0x90>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
43138: 72ff moveq #-1,%d1 4313a: b280 cmpl %d0,%d1
4313c: 6748 beqs 43186 <scanString+0x94> <== NEVER TAKEN
return 0;
if (*nleft < 2)
4313e: 7201 moveq #1,%d1 43140: b294 cmpl %a4@,%d1
43142: 6442 bccs 43186 <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
43144: 2053 moveal %a3@,%a0 43146: 1080 moveb %d0,%a0@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43148: 202a 0004 movel %a2@(4),%d0 4314c: 5380 subql #1,%d0
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
4314e: 5293 addql #1,%a3@
--(*nleft);
43150: 5394 subql #1,%a4@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43152: 2540 0004 movel %d0,%a2@(4)
43156: 6cca bges 43122 <scanString+0x30> <== ALWAYS TAKEN
43158: 2f0a movel %a2,%sp@- 4315a: 2f39 0006 1318 movel 61318 <_impure_ptr>,%sp@- 43160: 4e95 jsr %a5@ 43162: 508f addql #8,%sp
if (c == ':') {
43164: 723a moveq #58,%d1 43166: b280 cmpl %d0,%d1
43168: 66c8 bnes 43132 <scanString+0x40> <== ALWAYS TAKEN
if (nlFlag)
4316a: 4a82 tstl %d2
4316c: 6618 bnes 43186 <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
4316e: 2053 moveal %a3@,%a0
++(*bufp); --(*nleft);
43170: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
43172: 4210 clrb %a0@
++(*bufp);
43174: 5293 addql #1,%a3@
--(*nleft);
43176: 5394 subql #1,%a4@
return 1; }
43178: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4317e: 4e5e unlk %fp 43180: 4e75 rts
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
43182: 4a82 tstl %d2
43184: 66e8 bnes 4316e <scanString+0x7c> <== ALWAYS TAKEN
--(*nleft);
}
**bufp = '\0';
++(*bufp);
--(*nleft);
return 1;
43186: 4280 clrl %d0 <== NOT EXECUTED
}
43188: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4318e: 4e5e unlk %fp <== NOT EXECUTED
00043192 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
43192: 4e56 ffe4 linkw %fp,#-28 43196: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4319a: 42a7 clrl %sp@- 4319c: 280e movel %fp,%d4 4319e: 0684 0000 0014 addil #20,%d4 431a4: 260e movel %fp,%d3 431a6: 0683 0000 0010 addil #16,%d3 431ac: 47fa ff44 lea %pc@(430f2 <scanString>),%a3 431b0: 2f04 movel %d4,%sp@- 431b2: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
431b4: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
431b8: 2f0a movel %a2,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
431ba: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
431be: 2f02 movel %d2,%sp@- 431c0: 4e93 jsr %a3@ 431c2: 4fef 0014 lea %sp@(20),%sp 431c6: 4a80 tstl %d0
431c8: 660c bnes 431d6 <scangr+0x44> <== ALWAYS TAKEN
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
431ca: 4280 clrl %d0 <== NOT EXECUTED
}
431cc: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 <== NOT EXECUTED 431d2: 4e5e unlk %fp <== NOT EXECUTED 431d4: 4e75 rts <== NOT EXECUTED
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
431d6: 42a7 clrl %sp@- 431d8: 2f04 movel %d4,%sp@- 431da: 2f03 movel %d3,%sp@- 431dc: 486a 0004 pea %a2@(4) 431e0: 2f02 movel %d2,%sp@- 431e2: 4e93 jsr %a3@
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
431e4: 4fef 0014 lea %sp@(20),%sp 431e8: 4a80 tstl %d0
431ea: 67de beqs 431ca <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
431ec: 486e fffc pea %fp@(-4) 431f0: 2f02 movel %d2,%sp@- 431f2: 4eba fe30 jsr %pc@(43024 <scanInt>)
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
431f6: 508f addql #8,%sp 431f8: 4a80 tstl %d0
431fa: 67ce beqs 431ca <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
431fc: 4878 0001 pea 1 <ADD> 43200: 2f04 movel %d4,%sp@- 43202: 2f03 movel %d3,%sp@- 43204: 486e fff8 pea %fp@(-8) 43208: 2f02 movel %d2,%sp@- 4320a: 4e93 jsr %a3@
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4320c: 4fef 0014 lea %sp@(20),%sp 43210: 4a80 tstl %d0
43212: 67b6 beqs 431ca <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43214: 226e fff8 moveal %fp@(-8),%a1
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;
43218: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4321e: 1011 moveb %a1@,%d0
43220: 677a beqs 4329c <scangr+0x10a> <== NEVER TAKEN
43222: 2049 moveal %a1,%a0 43224: 7201 moveq #1,%d1 43226: 5288 addql #1,%a0
if(*cp == ',')
43228: 49c0 extbl %d0 4322a: 742c moveq #44,%d2 4322c: b480 cmpl %d0,%d2
4322e: 6756 beqs 43286 <scangr+0xf4> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43230: 1010 moveb %a0@,%d0
43232: 66f2 bnes 43226 <scangr+0x94>
43234: e589 lsll #2,%d1 43236: 0681 0000 0013 addil #19,%d1
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
4323c: b2ae 0014 cmpl %fp@(20),%d1
43240: 6288 bhis 431ca <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
43242: 202e 0010 movel %fp@(16),%d0 43246: 72f0 moveq #-16,%d1 43248: 0680 0000 000f addil #15,%d0 4324e: c081 andl %d1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
43250: 2040 moveal %d0,%a0 43252: 2089 movel %a1,%a0@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43254: 206e fff8 moveal %fp@(-8),%a0
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
43258: 2540 000a movel %d0,%a2@(10)
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4325c: 1010 moveb %a0@,%d0
4325e: 6740 beqs 432a0 <scangr+0x10e> <== NEVER TAKEN
43260: 5288 addql #1,%a0 43262: 7201 moveq #1,%d1
if(*cp == ',') {
43264: 49c0 extbl %d0 43266: 742c moveq #44,%d2 43268: b480 cmpl %d0,%d2
4326a: 671e beqs 4328a <scangr+0xf8> <== NEVER TAKEN
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4326c: 1018 moveb %a0@+,%d0
4326e: 66f4 bnes 43264 <scangr+0xd2>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43270: 206a 000a moveal %a2@(10),%a0 43274: 7001 moveq #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43276: e589 lsll #2,%d1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43278: 42b0 1800 clrl %a0@(00000000,%d1:l)
return 1; }
4327c: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43282: 4e5e unlk %fp 43284: 4e75 rts
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
memcount++;
43286: 5281 addql #1,%d1 <== NOT EXECUTED 43288: 60a6 bras 43230 <scangr+0x9e> <== NOT EXECUTED
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
4328a: 4200 clrb %d0 <== NOT EXECUTED 4328c: 1140 ffff moveb %d0,%a0@(-1) <== NOT EXECUTED
grp->gr_mem[memcount++] = cp + 1;
43290: 226a 000a moveal %a2@(10),%a1 <== NOT EXECUTED 43294: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) <== NOT EXECUTED 43298: 5281 addql #1,%d1 <== NOT EXECUTED 4329a: 60d0 bras 4326c <scangr+0xda> <== NOT EXECUTED
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4329c: 7217 moveq #23,%d1 <== NOT EXECUTED 4329e: 609c bras 4323c <scangr+0xaa> <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
432a0: 206a 000a moveal %a2@(10),%a0 <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
432a4: 7204 moveq #4,%d1 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
432a6: 7001 moveq #1,%d0 <== NOT EXECUTED 432a8: 42b0 1800 clrl %a0@(00000000,%d1:l) <== NOT EXECUTED 432ac: 60ce bras 4327c <scangr+0xea> <== NOT EXECUTED
000432ec <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
432ec: 4e56 ffe0 linkw %fp,#-32 432f0: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
432f4: 42a7 clrl %sp@- 432f6: 280e movel %fp,%d4 432f8: 0684 0000 0014 addil #20,%d4 432fe: 260e movel %fp,%d3 43300: 0683 0000 0010 addil #16,%d3 43306: 47fa fdea lea %pc@(430f2 <scanString>),%a3 4330a: 2f04 movel %d4,%sp@- 4330c: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
4330e: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43312: 2f0a movel %a2,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
43314: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43318: 2f02 movel %d2,%sp@- 4331a: 4e93 jsr %a3@ 4331c: 4fef 0014 lea %sp@(20),%sp 43320: 4a80 tstl %d0
43322: 660c bnes 43330 <scanpw+0x44> <== ALWAYS TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
43324: 4280 clrl %d0 <== NOT EXECUTED
}
43326: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4332c: 4e5e unlk %fp <== NOT EXECUTED 4332e: 4e75 rts <== NOT EXECUTED
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
43330: 42a7 clrl %sp@- 43332: 2f04 movel %d4,%sp@- 43334: 2f03 movel %d3,%sp@- 43336: 486a 0004 pea %a2@(4) 4333a: 2f02 movel %d2,%sp@- 4333c: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
4333e: 4fef 0014 lea %sp@(20),%sp 43342: 4a80 tstl %d0
43344: 67de beqs 43324 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
43346: 486e fffc pea %fp@(-4) 4334a: 49fa fcd8 lea %pc@(43024 <scanInt>),%a4 4334e: 2f02 movel %d2,%sp@- 43350: 4e94 jsr %a4@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43352: 508f addql #8,%sp 43354: 4a80 tstl %d0
43356: 67cc beqs 43324 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
43358: 486e fff8 pea %fp@(-8) 4335c: 2f02 movel %d2,%sp@- 4335e: 4e94 jsr %a4@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43360: 508f addql #8,%sp 43362: 4a80 tstl %d0
43364: 67be beqs 43324 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
43366: 42a7 clrl %sp@- 43368: 2f04 movel %d4,%sp@- 4336a: 2f03 movel %d3,%sp@- 4336c: 486a 000c pea %a2@(12) 43370: 2f02 movel %d2,%sp@- 43372: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43374: 4fef 0014 lea %sp@(20),%sp 43378: 4a80 tstl %d0
4337a: 67a8 beqs 43324 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
4337c: 42a7 clrl %sp@- 4337e: 2f04 movel %d4,%sp@- 43380: 2f03 movel %d3,%sp@- 43382: 486a 0010 pea %a2@(16) 43386: 2f02 movel %d2,%sp@- 43388: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
4338a: 4fef 0014 lea %sp@(20),%sp 4338e: 4a80 tstl %d0
43390: 6792 beqs 43324 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
43392: 42a7 clrl %sp@- 43394: 2f04 movel %d4,%sp@- 43396: 2f03 movel %d3,%sp@- 43398: 486a 0014 pea %a2@(20) 4339c: 2f02 movel %d2,%sp@- 4339e: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433a0: 4fef 0014 lea %sp@(20),%sp 433a4: 4a80 tstl %d0 433a6: 6700 ff7c beqw 43324 <scanpw+0x38>
|| !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0) || !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
433aa: 4878 0001 pea 1 <ADD> 433ae: 2f04 movel %d4,%sp@- 433b0: 2f03 movel %d3,%sp@- 433b2: 486a 0018 pea %a2@(24) 433b6: 2f02 movel %d2,%sp@- 433b8: 4e93 jsr %a3@
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
433ba: 4fef 0014 lea %sp@(20),%sp 433be: 4a80 tstl %d0 433c0: 6700 ff62 beqw 43324 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
433c4: 7001 moveq #1,%d0 433c6: 356e fffa 000a movew %fp@(-6),%a2@(10)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
433cc: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid; return 1; }
433d2: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
433d8: 4e5e unlk %fp <== NOT EXECUTED
000471d8 <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
471d8: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
471da: 4e56 0000 linkw %fp,#0 471de: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
471e2: b081 cmpl %d1,%d0
471e4: 6412 bccs 471f8 <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
471e6: 4eb9 0005 1534 jsr 51534 <__errno> 471ec: 7216 moveq #22,%d1 471ee: 2040 moveal %d0,%a0 471f0: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
471f2: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
471f4: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
471f6: 4e75 rts
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
471f8: 103c 0001 moveb #1,%d0 471fc: e3a8 lsll %d1,%d0 471fe: 7217 moveq #23,%d1 47200: c081 andl %d1,%d0
47202: 67e2 beqs 471e6 <sched_get_priority_max+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
47204: 4280 clrl %d0 47206: 1039 0006 1086 moveb 61086 <rtems_maximum_priority>,%d0
}
4720c: 4e5e unlk %fp
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
4720e: 5380 subql #1,%d0
}
...
00047214 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47214: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
47216: 4e56 0000 linkw %fp,#0 4721a: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
4721e: b081 cmpl %d1,%d0
47220: 6412 bccs 47234 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47222: 4eb9 0005 1534 jsr 51534 <__errno> 47228: 7216 moveq #22,%d1 4722a: 2040 moveal %d0,%a0 4722c: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
4722e: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47230: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47232: 4e75 rts
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47234: 103c 0001 moveb #1,%d0 47238: e3a8 lsll %d1,%d0 4723a: 7217 moveq #23,%d1 4723c: c081 andl %d1,%d0
4723e: 67e2 beqs 47222 <sched_get_priority_min+0xe> <== NEVER TAKEN
47240: 7001 moveq #1,%d0
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47242: 4e5e unlk %fp
...
00047248 <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
47248: 4e56 0000 linkw %fp,#0 4724c: 2f03 movel %d3,%sp@- 4724e: 262e 0008 movel %fp@(8),%d3 47252: 2f02 movel %d2,%sp@- 47254: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
47258: 4a83 tstl %d3
4725a: 6622 bnes 4727e <sched_rr_get_interval+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
4725c: 4a82 tstl %d2
4725e: 6742 beqs 472a2 <sched_rr_get_interval+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
47260: 2f02 movel %d2,%sp@- 47262: 2f39 0006 27dc movel 627dc <_Thread_Ticks_per_timeslice>,%sp@- 47268: 4eb9 0004 ab20 jsr 4ab20 <_Timespec_From_ticks>
return 0; }
4726e: 242e fff8 movel %fp@(-8),%d2
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
47272: 508f addql #8,%sp
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
47274: 4280 clrl %d0
return 0; }
47276: 262e fffc movel %fp@(-4),%d3 4727a: 4e5e unlk %fp 4727c: 4e75 rts
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
4727e: 4eb9 0004 378c jsr 4378c <getpid> 47284: b680 cmpl %d0,%d3
47286: 67d4 beqs 4725c <sched_rr_get_interval+0x14>
rtems_set_errno_and_return_minus_one( ESRCH );
47288: 4eb9 0005 1534 jsr 51534 <__errno> 4728e: 7403 moveq #3,%d2 47290: 2040 moveal %d0,%a0 47292: 70ff moveq #-1,%d0 47294: 2082 movel %d2,%a0@
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
47296: 242e fff8 movel %fp@(-8),%d2 4729a: 262e fffc movel %fp@(-4),%d3 4729e: 4e5e unlk %fp 472a0: 4e75 rts
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472a2: 4eb9 0005 1534 jsr 51534 <__errno>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
472a8: 242e fff8 movel %fp@(-8),%d2
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472ac: 2040 moveal %d0,%a0 472ae: 7216 moveq #22,%d1 472b0: 70ff moveq #-1,%d0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
472b2: 262e fffc movel %fp@(-4),%d3 472b6: 4e5e unlk %fp
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
472b8: 2081 movel %d1,%a0@ <== NOT EXECUTED
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
00049404 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
49404: 4e56 ffe0 linkw %fp,#-32
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
49408: 2039 0006 64b8 movel 664b8 <_Thread_Dispatch_disable_level>,%d0 4940e: 5280 addql #1,%d0 49410: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49414: 23c0 0006 64b8 movel %d0,664b8 <_Thread_Dispatch_disable_level> 4941a: 2a2e 0008 movel %fp@(8),%d5 4941e: 262e 000c movel %fp@(12),%d3
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
49422: 2803 movel %d3,%d4 49424: 0284 0000 0200 andil #512,%d4 4942a: 6600 0086 bnew 494b2 <sem_open+0xae> 4942e: 95ca subal %a2,%a2
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 );
49430: 486e fffc pea %fp@(-4) 49434: 2f05 movel %d5,%sp@- 49436: 4eb9 0005 0810 jsr 50810 <_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 ) {
4943c: 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 );
4943e: 2400 movel %d0,%d2
* 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 ) {
49440: 6726 beqs 49468 <sem_open+0x64>
/*
* 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) ) ) {
49442: 7002 moveq #2,%d0 49444: b082 cmpl %d2,%d0
49446: 6604 bnes 4944c <sem_open+0x48> <== NEVER TAKEN
49448: 4a84 tstl %d4
4944a: 666e bnes 494ba <sem_open+0xb6>
_Thread_Enable_dispatch();
4944c: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
49452: 4eb9 0005 45e8 jsr 545e8 <__errno> 49458: 2040 moveal %d0,%a0 4945a: 70ff moveq #-1,%d0 4945c: 2082 movel %d2,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
4945e: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49464: 4e5e unlk %fp 49466: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
49468: 0283 0000 0a00 andil #2560,%d3 4946e: 0c83 0000 0a00 cmpil #2560,%d3
49474: 676e beqs 494e4 <sem_open+0xe0>
49476: 486e fff4 pea %fp@(-12)
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
4947a: 45f9 0004 bf3c lea 4bf3c <_Thread_Enable_dispatch>,%a2 49480: 2f2e fffc movel %fp@(-4),%sp@- 49484: 4879 0006 6712 pea 66712 <_POSIX_Semaphore_Information> 4948a: 4eb9 0004 b65c jsr 4b65c <_Objects_Get>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
}
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
49490: 2040 moveal %d0,%a0 49492: 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 );
49496: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
4949a: 4e92 jsr %a2@
_Thread_Enable_dispatch();
4949c: 4e92 jsr %a2@
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;
4949e: 202e fff8 movel %fp@(-8),%d0
the_semaphore = _POSIX_Semaphore_Get( &the_semaphore_id, &location );
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
_Thread_Enable_dispatch();
goto return_id;
494a2: 4fef 000c lea %sp@(12),%sp
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;
494a6: 5080 addql #8,%d0
#endif return id; }
494a8: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 494ae: 4e5e unlk %fp 494b0: 4e75 rts
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
va_start(arg, oflag);
mode = (mode_t) va_arg( arg, unsigned int );
value = va_arg( arg, unsigned int );
494b2: 246e 0014 moveal %fp@(20),%a2 494b6: 6000 ff78 braw 49430 <sem_open+0x2c>
/*
* 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(
494ba: 486e fff8 pea %fp@(-8) 494be: 2f0a movel %a2,%sp@- 494c0: 42a7 clrl %sp@- 494c2: 2f05 movel %d5,%sp@- 494c4: 4eb9 0005 0658 jsr 50658 <_POSIX_Semaphore_Create_support> 494ca: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
494cc: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
if ( status == -1 )
494d2: 4fef 0010 lea %sp@(16),%sp 494d6: 70ff moveq #-1,%d0 494d8: b082 cmpl %d2,%d0
494da: 6782 beqs 4945e <sem_open+0x5a>
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;
494dc: 202e fff8 movel %fp@(-8),%d0 494e0: 5080 addql #8,%d0 494e2: 60c4 bras 494a8 <sem_open+0xa4>
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
494e4: 4eb9 0004 bf3c jsr 4bf3c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
494ea: 4eb9 0005 45e8 jsr 545e8 <__errno> 494f0: 7211 moveq #17,%d1 494f2: 2040 moveal %d0,%a0 494f4: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
494f6: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
494fc: 2081 movel %d1,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
494fe: 4e5e unlk %fp
...
0004955c <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
4955c: 4e56 fffc linkw %fp,#-4 49560: 2f02 movel %d2,%sp@-
* * 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 );
49562: 486e fffc pea %fp@(-4) 49566: 2f2e 000c movel %fp@(12),%sp@-
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
4956a: 242e 0008 movel %fp@(8),%d2
* * 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 );
4956e: 4eb9 0004 fc1c jsr 4fc1c <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
49574: 508f addql #8,%sp 49576: 7203 moveq #3,%d1 49578: b280 cmpl %d0,%d1
4957a: 671a beqs 49596 <sem_timedwait+0x3a> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
4957c: 2f2e fffc movel %fp@(-4),%sp@- 49580: 42a7 clrl %sp@- 49582: 2f02 movel %d2,%sp@- 49584: 4eb9 0005 0888 jsr 50888 <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
4958a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
4958e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
}
}
return lock_status;
}
49592: 4e5e unlk %fp <== NOT EXECUTED 49594: 4e75 rts <== NOT EXECUTED
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
49596: 2f2e fffc movel %fp@(-4),%sp@- 4959a: 4878 0001 pea 1 <ADD> 4959e: 2f02 movel %d2,%sp@- 495a0: 4eb9 0005 0888 jsr 50888 <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
495a6: 242e fff8 movel %fp@(-8),%d2
*/
status = _POSIX_Absolute_timeout_to_ticks( abstime, &ticks );
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
495aa: 4fef 000c lea %sp@(12),%sp
break;
}
}
return lock_status;
}
495ae: 4e5e unlk %fp
...
00043524 <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
43524: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
43528: 4eb9 0004 341a jsr 4341a <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
4352e: 2039 0006 2136 movel 62136 <group_fp>,%d0 <== NOT EXECUTED 43534: 670a beqs 43540 <setgrent+0x1c> <== NOT EXECUTED
fclose(group_fp);
43536: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43538: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED 4353e: 588f addql #4,%sp <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
43540: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> <== NOT EXECUTED 43546: 4879 0005 fe62 pea 5fe62 <rtems_status_assoc+0x218> <== NOT EXECUTED 4354c: 4eb9 0005 16f4 jsr 516f4 <fopen> <== NOT EXECUTED 43552: 508f addql #8,%sp <== NOT EXECUTED
}
43554: 4e5e unlk %fp <== NOT EXECUTED
{
init_etc_passwd_group();
if (group_fp != NULL)
fclose(group_fp);
group_fp = fopen("/etc/group", "r");
43556: 23c0 0006 2136 movel %d0,62136 <group_fp> <== NOT EXECUTED
}
000436ee <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
436ee: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
init_etc_passwd_group();
436f2: 4eb9 0004 341a jsr 4341a <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
436f8: 2039 0006 204e movel 6204e <passwd_fp>,%d0 <== NOT EXECUTED 436fe: 670a beqs 4370a <setpwent+0x1c> <== NOT EXECUTED
fclose(passwd_fp);
43700: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43702: 4eb9 0005 1072 jsr 51072 <fclose> <== NOT EXECUTED 43708: 588f addql #4,%sp <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
4370a: 4879 0006 09d7 pea 609d7 <_global_impure_ptr+0xbf> <== NOT EXECUTED 43710: 4879 0005 fdef pea 5fdef <rtems_status_assoc+0x1a5> <== NOT EXECUTED 43716: 4eb9 0005 16f4 jsr 516f4 <fopen> <== NOT EXECUTED 4371c: 508f addql #8,%sp <== NOT EXECUTED
}
4371e: 4e5e unlk %fp <== NOT EXECUTED
{
init_etc_passwd_group();
if (passwd_fp != NULL)
fclose(passwd_fp);
passwd_fp = fopen("/etc/passwd", "r");
43720: 23c0 0006 204e movel %d0,6204e <passwd_fp> <== NOT EXECUTED
}
00047040 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
47040: 4e56 fff4 linkw %fp,#-12 47044: 226e 0010 moveal %fp@(16),%a1 47048: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4704c: 242e 0008 movel %fp@(8),%d2 47050: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
47054: 4a89 tstl %a1
47056: 6718 beqs 47070 <sigaction+0x30>
*oact = _POSIX_signals_Vectors[ sig ];
47058: 2202 movel %d2,%d1 4705a: 2002 movel %d2,%d0 4705c: e989 lsll #4,%d1 4705e: e588 lsll #2,%d0 47060: 2041 moveal %d1,%a0 47062: 91c0 subal %d0,%a0 47064: d1fc 0006 381e addal #407582,%a0 4706a: 22d8 movel %a0@+,%a1@+ 4706c: 22d8 movel %a0@+,%a1@+ 4706e: 2290 movel %a0@,%a1@
if ( !sig )
47070: 4a82 tstl %d2
47072: 6778 beqs 470ec <sigaction+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
47074: 2002 movel %d2,%d0 47076: 5380 subql #1,%d0 47078: 721f moveq #31,%d1 4707a: b280 cmpl %d0,%d1
4707c: 656e bcss 470ec <sigaction+0xac>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
4707e: 7009 moveq #9,%d0 47080: b082 cmpl %d2,%d0
47082: 6768 beqs 470ec <sigaction+0xac>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
47084: 4a8a tstl %a2
47086: 6736 beqs 470be <sigaction+0x7e> <== 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 );
47088: 203c 0000 0700 movel #1792,%d0 4708e: 40c3 movew %sr,%d3 47090: 8083 orl %d3,%d0 47092: 46c0 movew %d0,%sr
if ( act->sa_handler == SIG_DFL ) {
47094: 4aaa 0008 tstl %a2@(8)
47098: 6730 beqs 470ca <sigaction+0x8a>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
4709a: 2f02 movel %d2,%sp@- 4709c: 4eb9 0004 da1c jsr 4da1c <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
470a2: 588f addql #4,%sp 470a4: 2202 movel %d2,%d1 470a6: 224a moveal %a2,%a1 470a8: e989 lsll #4,%d1 470aa: e58a lsll #2,%d2 470ac: 2041 moveal %d1,%a0 470ae: 91c2 subal %d2,%a0 470b0: d1fc 0006 381e addal #407582,%a0 470b6: 20d9 movel %a1@+,%a0@+ 470b8: 20d9 movel %a1@+,%a0@+ 470ba: 2091 movel %a1@,%a0@
}
_ISR_Enable( level );
470bc: 46c3 movew %d3,%sr 470be: 4280 clrl %d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
470c0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 470c6: 4e5e unlk %fp 470c8: 4e75 rts
* we can just copy the provided sigaction structure into the vectors.
*/
_ISR_Disable( level );
if ( act->sa_handler == SIG_DFL ) {
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
470ca: 2002 movel %d2,%d0 470cc: e58a lsll #2,%d2 470ce: e988 lsll #4,%d0 470d0: 9082 subl %d2,%d0 470d2: 2040 moveal %d0,%a0 470d4: 2240 moveal %d0,%a1 470d6: d1fc 0006 381e addal #407582,%a0 470dc: d3fc 0006 0c6a addal #396394,%a1 470e2: 20d9 movel %a1@+,%a0@+ 470e4: 20d9 movel %a1@+,%a0@+ 470e6: 2091 movel %a1@,%a0@
} else {
_POSIX_signals_Clear_process_signals( sig );
_POSIX_signals_Vectors[ sig ] = *act;
}
_ISR_Enable( level );
470e8: 46c3 movew %d3,%sr 470ea: 60d2 bras 470be <sigaction+0x7e>
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
470ec: 4eb9 0005 1618 jsr 51618 <__errno> 470f2: 7216 moveq #22,%d1 470f4: 2040 moveal %d0,%a0 470f6: 70ff moveq #-1,%d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
470f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
470fe: 2081 movel %d1,%a0@
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
47100: 4e5e unlk %fp <== NOT EXECUTED
00047104 <sigaddset>:
int sigaddset(
sigset_t *set,
int signo
)
{
47104: 4e56 0000 linkw %fp,#0 47108: 206e 0008 moveal %fp@(8),%a0 4710c: 202e 000c movel %fp@(12),%d0 47110: 2f02 movel %d2,%sp@-
if ( !set )
47112: 4a88 tstl %a0
47114: 671e beqs 47134 <sigaddset+0x30> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !signo )
47116: 4a80 tstl %d0
47118: 671a beqs 47134 <sigaddset+0x30> <== NEVER TAKEN
4711a: 2400 movel %d0,%d2 4711c: 5382 subql #1,%d2
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
4711e: 701f moveq #31,%d0 47120: b082 cmpl %d2,%d0
47122: 6510 bcss 47134 <sigaddset+0x30> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
47124: 7201 moveq #1,%d1 47126: 4280 clrl %d0 47128: e5a9 lsll %d2,%d1
return 0; }
4712a: 242e fffc movel %fp@(-4),%d2 4712e: 4e5e unlk %fp
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
*set |= signo_to_mask(signo);
47130: 8390 orl %d1,%a0@
return 0; }
47132: 4e75 rts
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
47134: 4eb9 0005 1618 jsr 51618 <__errno>
*set |= signo_to_mask(signo);
return 0;
}
4713a: 242e fffc movel %fp@(-4),%d2
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
4713e: 2040 moveal %d0,%a0 47140: 7216 moveq #22,%d1 47142: 70ff moveq #-1,%d0
*set |= signo_to_mask(signo);
return 0;
}
47144: 4e5e unlk %fp
if ( !signo )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(signo) )
rtems_set_errno_and_return_minus_one( EINVAL );
47146: 2081 movel %d1,%a0@
*set |= signo_to_mask(signo);
return 0;
}
...
00049554 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
49554: 4e56 ffec linkw %fp,#-20 49558: 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 );
4955c: 240e movel %fp,%d2 4955e: 5982 subql #4,%d2 49560: 45f9 0004 952c lea 4952c <sigprocmask>,%a2
(void) sigfillset( &all_signals );
49566: 260e movel %fp,%d3 49568: 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 );
4956a: 2f02 movel %d2,%sp@- 4956c: 2f2e 0008 movel %fp@(8),%sp@- 49570: 4878 0001 pea 1 <ADD> 49574: 4e92 jsr %a2@
(void) sigfillset( &all_signals );
49576: 2f03 movel %d3,%sp@- 49578: 4eb9 0004 9488 jsr 49488 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
4957e: 42a7 clrl %sp@- 49580: 42a7 clrl %sp@- 49582: 2f03 movel %d3,%sp@- 49584: 4eb9 0004 9610 jsr 49610 <sigtimedwait> 4958a: 2600 movel %d0,%d3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
4958c: 42a7 clrl %sp@- 4958e: 2f02 movel %d2,%sp@- 49590: 42a7 clrl %sp@- 49592: 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 )
49594: 4fef 0028 lea %sp@(40),%sp 49598: 70ff moveq #-1,%d0 4959a: b083 cmpl %d3,%d0
4959c: 660c bnes 495aa <sigsuspend+0x56> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
4959e: 70ff moveq #-1,%d0 <== NOT EXECUTED 495a0: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 495a6: 4e5e unlk %fp <== NOT EXECUTED 495a8: 4e75 rts <== NOT EXECUTED
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
495aa: 4eb9 0005 38b0 jsr 538b0 <__errno> 495b0: 2040 moveal %d0,%a0 495b2: 7004 moveq #4,%d0
return status;
}
495b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2
/*
* sigtimedwait() returns the signal number while sigsuspend()
* is supposed to return -1 and EINTR when a signal is caught.
*/
if ( status != -1 )
rtems_set_errno_and_return_minus_one( EINTR );
495ba: 2080 movel %d0,%a0@
return status;
}
495bc: 70ff moveq #-1,%d0 495be: 4e5e unlk %fp
...
000497f8 <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
497f8: 4e56 0000 linkw %fp,#0 497fc: 2f0a movel %a2,%sp@-
int status;
status = sigtimedwait( set, NULL, NULL );
497fe: 42a7 clrl %sp@-
int sigwait(
const sigset_t *set,
int *sig
)
{
49800: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
49804: 42a7 clrl %sp@- 49806: 2f2e 0008 movel %fp@(8),%sp@- 4980a: 4eb9 0004 9610 jsr 49610 <sigtimedwait>
if ( status != -1 ) {
49810: 4fef 000c lea %sp@(12),%sp 49814: 72ff moveq #-1,%d1 49816: b280 cmpl %d0,%d1
49818: 6710 beqs 4982a <sigwait+0x32>
if ( sig )
4981a: 4a8a tstl %a2
4981c: 6702 beqs 49820 <sigwait+0x28> <== NEVER TAKEN
*sig = status;
4981e: 2480 movel %d0,%a2@
return 0;
}
return errno;
}
49820: 246e fffc moveal %fp@(-4),%a2
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
49824: 4280 clrl %d0
return 0;
}
return errno;
}
49826: 4e5e unlk %fp 49828: 4e75 rts
if ( sig )
*sig = status;
return 0;
}
return errno;
4982a: 4eb9 0005 38b0 jsr 538b0 <__errno>
}
49830: 246e fffc moveal %fp@(-4),%a2
if ( sig )
*sig = status;
return 0;
}
return errno;
49834: 2040 moveal %d0,%a0
}
49836: 4e5e unlk %fp
if ( sig )
*sig = status;
return 0;
}
return errno;
49838: 2010 movel %a0@,%d0 <== NOT EXECUTED
}
00044c40 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
44c40: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44c44: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c46: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
44c4a: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 44c4e: 0280 0000 0e78 andil #3704,%d0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
44c54: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c56: 142e 000b moveb %fp@(11),%d2 <== NOT EXECUTED
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
44c5a: 4a80 tstl %d0 <== NOT EXECUTED 44c5c: 661c bnes 44c7a <siproc+0x3a> <== 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);
44c5e: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} return i; }
44c62: 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);
44c66: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 44c6c: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
} return i; }
44c70: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44c74: 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);
44c76: 6000 fdd0 braw 44a48 <iproc> <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44c7a: 42a7 clrl %sp@- <== NOT EXECUTED
i = iproc (c, tty);
44c7c: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44c82: 42a7 clrl %sp@- <== NOT EXECUTED 44c84: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44c88: 4eb9 0004 6704 jsr 46704 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
44c8e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c90: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44c92: 4eba fdb4 jsr %pc@(44a48 <iproc>) <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44c96: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
44c9a: 2400 movel %d0,%d2 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
44c9c: 4eb9 0004 6840 jsr 46840 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
44ca2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 44ca6: 2002 movel %d2,%d0 <== NOT EXECUTED
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
44ca8: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
44cac: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44cb0: 4e5e unlk %fp <== NOT EXECUTED
0004519c <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
4519c: 4e56 ffe0 linkw %fp,#-32 451a0: 48d7 001c moveml %d2-%d4,%sp@ 451a4: 262e 0008 movel %fp@(8),%d3 451a8: 242e 000c movel %fp@(12),%d2
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
451ac: 6700 0088 beqw 45236 <stat+0x9a>
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
451b0: 2f03 movel %d3,%sp@- 451b2: 280e movel %fp,%d4 451b4: 0684 ffff ffec addil #-20,%d4 451ba: 4eb9 0005 39b4 jsr 539b4 <strlen> 451c0: 7201 moveq #1,%d1 451c2: 2e81 movel %d1,%sp@ 451c4: 2f04 movel %d4,%sp@- 451c6: 42a7 clrl %sp@- 451c8: 2f00 movel %d0,%sp@- 451ca: 2f03 movel %d3,%sp@- 451cc: 4eb9 0004 37c8 jsr 437c8 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
451d2: 4fef 0014 lea %sp@(20),%sp 451d6: 4a80 tstl %d0
451d8: 664e bnes 45228 <stat+0x8c>
return -1;
if ( !loc.handlers->fstat_h ){
451da: 206e fff4 moveal %fp@(-12),%a0 451de: 4aa8 0018 tstl %a0@(24)
451e2: 676c beqs 45250 <stat+0xb4> <== NEVER TAKEN
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
451e4: 4878 0046 pea 46 <DBL_MANT_DIG+0x11> 451e8: 42a7 clrl %sp@- 451ea: 2f02 movel %d2,%sp@- 451ec: 4eb9 0005 2b70 jsr 52b70 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
451f2: 2f02 movel %d2,%sp@- 451f4: 2f04 movel %d4,%sp@- 451f6: 206e fff4 moveal %fp@(-12),%a0 451fa: 2068 0018 moveal %a0@(24),%a0 451fe: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
45200: 206e fff8 moveal %fp@(-8),%a0
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
45204: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
45206: 4fef 0014 lea %sp@(20),%sp 4520a: 4a88 tstl %a0
4520c: 670e beqs 4521c <stat+0x80> <== NEVER TAKEN
4520e: 2068 001c moveal %a0@(28),%a0 45212: 4a88 tstl %a0
45214: 6706 beqs 4521c <stat+0x80> <== NEVER TAKEN
45216: 2f04 movel %d4,%sp@- 45218: 4e90 jsr %a0@ 4521a: 588f addql #4,%sp
return status;
}
4521c: 2002 movel %d2,%d0 4521e: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45224: 4e5e unlk %fp 45226: 4e75 rts
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
status = rtems_filesystem_evaluate_path( path, strlen( path ),
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
45228: 74ff moveq #-1,%d2
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
4522a: 2002 movel %d2,%d0 4522c: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 45232: 4e5e unlk %fp 45234: 4e75 rts
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
45236: 4eb9 0005 18d0 jsr 518d0 <__errno> 4523c: 74ff moveq #-1,%d2 4523e: 760e moveq #14,%d3 45240: 2040 moveal %d0,%a0
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45242: 2002 movel %d2,%d0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
rtems_set_errno_and_return_minus_one( EFAULT );
45244: 2083 movel %d3,%a0@
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45246: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 4524c: 4e5e unlk %fp 4524e: 4e75 rts
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
45250: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 45254: 4a88 tstl %a0 <== NOT EXECUTED 45256: 670e beqs 45266 <stat+0xca> <== NOT EXECUTED 45258: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4525c: 4a88 tstl %a0 <== NOT EXECUTED 4525e: 6706 beqs 45266 <stat+0xca> <== NOT EXECUTED 45260: 2f04 movel %d4,%sp@- <== NOT EXECUTED 45262: 4e90 jsr %a0@ <== NOT EXECUTED 45264: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
45266: 4eb9 0005 18d0 jsr 518d0 <__errno> <== NOT EXECUTED 4526c: 74ff moveq #-1,%d2 <== NOT EXECUTED 4526e: 2040 moveal %d0,%a0 <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
45270: 2002 movel %d2,%d0 <== NOT EXECUTED 45272: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED
if ( status != 0 )
return -1;
if ( !loc.handlers->fstat_h ){
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
45278: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
rtems_filesystem_freenode( &loc );
return status;
}
4527e: 4e5e unlk %fp <== NOT EXECUTED
000454b0 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
454b0: 4e56 ffe4 linkw %fp,#-28 454b4: 2f03 movel %d3,%sp@- 454b6: 2f02 movel %d2,%sp@-
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
454b8: 240e movel %fp,%d2 454ba: 0682 ffff ffe4 addil #-28,%d2 454c0: 2f02 movel %d2,%sp@- 454c2: 486e fffc pea %fp@(-4)
int symlink(
const char *actualpath,
const char *sympath
)
{
454c6: 262e 000c movel %fp@(12),%d3
rtems_filesystem_location_info_t loc;
int i;
const char *name_start;
int result;
rtems_filesystem_get_start_loc( sympath, &i, &loc );
454ca: 2f03 movel %d3,%sp@- 454cc: 4eb9 0004 5408 jsr 45408 <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
454d2: 206e fff0 moveal %fp@(-16),%a0 454d6: 4fef 000c lea %sp@(12),%sp 454da: 2068 0004 moveal %a0@(4),%a0 454de: 4a88 tstl %a0
454e0: 6776 beqs 45558 <symlink+0xa8> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
454e2: 486e fff8 pea %fp@(-8) 454e6: 2f02 movel %d2,%sp@- 454e8: d6ae fffc addl %fp@(-4),%d3 454ec: 2f03 movel %d3,%sp@- 454ee: 4e90 jsr %a0@
if ( result != 0 )
454f0: 4fef 000c lea %sp@(12),%sp 454f4: 4a80 tstl %d0
454f6: 6642 bnes 4553a <symlink+0x8a>
return -1;
if ( !loc.ops->symlink_h ) {
454f8: 226e fff0 moveal %fp@(-16),%a1 454fc: 2069 0038 moveal %a1@(56),%a0 45500: 4a88 tstl %a0
45502: 6746 beqs 4554a <symlink+0x9a> <== NEVER TAKEN
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
45504: 2f2e fff8 movel %fp@(-8),%sp@- 45508: 2f2e 0008 movel %fp@(8),%sp@- 4550c: 2f02 movel %d2,%sp@- 4550e: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
45510: 206e fff0 moveal %fp@(-16),%a0
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
45514: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
45516: 4fef 000c lea %sp@(12),%sp 4551a: 4a88 tstl %a0
4551c: 670e beqs 4552c <symlink+0x7c> <== NEVER TAKEN
4551e: 2068 001c moveal %a0@(28),%a0 45522: 4a88 tstl %a0
45524: 6706 beqs 4552c <symlink+0x7c> <== NEVER TAKEN
45526: 2f02 movel %d2,%sp@- 45528: 4e90 jsr %a0@ 4552a: 588f addql #4,%sp
return result;
}
4552c: 2003 movel %d3,%d0 4552e: 242e ffdc movel %fp@(-36),%d2 45532: 262e ffe0 movel %fp@(-32),%d3 45536: 4e5e unlk %fp 45538: 4e75 rts
if ( !loc.ops->evalformake_h ) {
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
4553a: 76ff moveq #-1,%d3
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
4553c: 2003 movel %d3,%d0 4553e: 242e ffdc movel %fp@(-36),%d2 45542: 262e ffe0 movel %fp@(-32),%d3 45546: 4e5e unlk %fp 45548: 4e75 rts
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
4554a: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4554e: 4a88 tstl %a0 <== NOT EXECUTED 45550: 6706 beqs 45558 <symlink+0xa8> <== NOT EXECUTED 45552: 2f02 movel %d2,%sp@- <== NOT EXECUTED 45554: 4e90 jsr %a0@ <== NOT EXECUTED 45556: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
45558: 4eb9 0005 1b7c jsr 51b7c <__errno> <== NOT EXECUTED 4555e: 76ff moveq #-1,%d3 <== NOT EXECUTED 45560: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
45562: 2003 movel %d3,%d0 <== NOT EXECUTED 45564: 242e ffdc movel %fp@(-36),%d2 <== NOT EXECUTED 45568: 262e ffe0 movel %fp@(-32),%d3 <== NOT EXECUTED 4556c: 4e5e unlk %fp <== NOT EXECUTED
if ( result != 0 )
return -1;
if ( !loc.ops->symlink_h ) {
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4556e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
rtems_filesystem_freenode( &loc );
return result;
}
...
00045344 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45344: 4e56 0000 linkw %fp,#0 45348: 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;
4534c: 2028 0106 movel %a0@(262),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45350: 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 ) {
45352: 4a80 tstl %d0
45354: 6728 beqs 4537e <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
45356: 2279 0006 32a6 moveal 632a6 <_Thread_Executing>,%a1 4535c: 2429 0106 movel %a1@(262),%d2
_Thread_Executing->libc_reent = this_reent;
45360: 2340 0106 movel %d0,%a1@(262)
_fwalk (t->libc_reent, sync_wrapper);
45364: 487a 0046 pea %pc@(453ac <sync_wrapper>) 45368: 2f28 0106 movel %a0@(262),%sp@- 4536c: 4eb9 0005 284e jsr 5284e <_fwalk>
_Thread_Executing->libc_reent = current_reent;
45372: 2079 0006 32a6 moveal 632a6 <_Thread_Executing>,%a0 45378: 508f addql #8,%sp 4537a: 2142 0106 movel %d2,%a0@(262)
} }
4537e: 242e fffc movel %fp@(-4),%d2
45382: 4e5e unlk %fp <== NOT EXECUTED
00044fb4 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
44fb4: 4e56 0000 linkw %fp,#0 44fb8: 202e 000c movel %fp@(12),%d0 44fbc: 2f03 movel %d3,%sp@- 44fbe: 262e 0010 movel %fp@(16),%d3 44fc2: 2f02 movel %d2,%sp@- 44fc4: 242e 0008 movel %fp@(8),%d2
switch (opt) {
44fc8: 4a80 tstl %d0
44fca: 6738 beqs 45004 <tcsetattr+0x50>
44fcc: 7201 moveq #1,%d1 44fce: b280 cmpl %d0,%d1
44fd0: 671c beqs 44fee <tcsetattr+0x3a> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
44fd2: 4eb9 0005 1880 jsr 51880 <__errno> <== NOT EXECUTED 44fd8: 2040 moveal %d0,%a0 <== NOT EXECUTED 44fda: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
44fe0: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 44fe4: 70ff moveq #-1,%d0 <== NOT EXECUTED 44fe6: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 44fea: 4e5e unlk %fp <== NOT EXECUTED 44fec: 4e75 rts <== NOT EXECUTED
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
44fee: 42a7 clrl %sp@- <== NOT EXECUTED 44ff0: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 44ff4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 44ff6: 4eb9 0004 d4a8 jsr 4d4a8 <ioctl> <== NOT EXECUTED 44ffc: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 45000: 4a80 tstl %d0 <== NOT EXECUTED 45002: 6ddc blts 44fe0 <tcsetattr+0x2c> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
45004: 2d43 0010 movel %d3,%fp@(16) 45008: 7002 moveq #2,%d0 4500a: 2d42 0008 movel %d2,%fp@(8)
} }
4500e: 242e fff8 movel %fp@(-8),%d2 45012: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
45016: 2d40 000c movel %d0,%fp@(12)
} }
4501a: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4501c: 4ef9 0004 d4a8 jmp 4d4a8 <ioctl>
...
000463cc <timer_settime>:
timer_t timerid,
int flags,
const struct itimerspec *value,
struct itimerspec *ovalue
)
{
463cc: 4e56 ffc8 linkw %fp,#-56 463d0: 202e 000c movel %fp@(12),%d0 463d4: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 463d8: 266e 0010 moveal %fp@(16),%a3 463dc: 282e 0014 movel %fp@(20),%d4
Objects_Locations location;
bool activated;
uint32_t initial_period;
struct itimerspec normalize;
if ( !value )
463e0: 4a8b tstl %a3 463e2: 6700 0194 beqw 46578 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL );
/* First, it verifies if the structure "value" is correct */
if ( ( value->it_value.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) ||
463e6: 223c 3b9a c9ff movel #999999999,%d1 463ec: b2ab 000c cmpl %a3@(12),%d1 463f0: 6500 0186 bcsw 46578 <timer_settime+0x1ac>
( value->it_value.tv_nsec < 0 ) ||
( value->it_interval.tv_nsec >= TOD_NANOSECONDS_PER_SECOND) ||
463f4: b2ab 0004 cmpl %a3@(4),%d1 463f8: 6500 017e bcsw 46578 <timer_settime+0x1ac>
( value->it_interval.tv_nsec < 0 )) {
/* The number of nanoseconds is not correct */
rtems_set_errno_and_return_minus_one( EINVAL );
}
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
463fc: 7204 moveq #4,%d1 463fe: b280 cmpl %d0,%d1 46400: 6700 00fa beqw 464fc <timer_settime+0x130> 46404: 4a80 tstl %d0 46406: 6600 0170 bnew 46578 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
4640a: 260e movel %fp,%d3 4640c: 0683 ffff ffe4 addil #-28,%d3 46412: 204b moveal %a3,%a0 46414: 2243 moveal %d3,%a1 46416: 240e movel %fp,%d2 46418: 0682 ffff ffe8 addil #-24,%d2 4641e: 49ee ffec lea %fp@(-20),%a4 46422: 4bee fff0 lea %fp@(-16),%a5 46426: 2298 movel %a0@+,%a1@ 46428: 2242 moveal %d2,%a1 4642a: 2298 movel %a0@+,%a1@ 4642c: 2898 movel %a0@+,%a4@ 4642e: 2a90 movel %a0@,%a5@
RTEMS_INLINE_ROUTINE POSIX_Timer_Control *_POSIX_Timer_Get (
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
46430: 486e fffc pea %fp@(-4) 46434: 2f2e 0008 movel %fp@(8),%sp@- 46438: 4879 0006 23d0 pea 623d0 <_POSIX_Timer_Information> 4643e: 4eb9 0004 88b8 jsr 488b8 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
46444: 4fef 000c lea %sp@(12),%sp 46448: 2440 moveal %d0,%a2 4644a: 4aae fffc tstl %fp@(-4) 4644e: 6600 0128 bnew 46578 <timer_settime+0x1ac>
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
46452: 4aae ffec tstl %fp@(-20)
46456: 6608 bnes 46460 <timer_settime+0x94>
46458: 4aae fff0 tstl %fp@(-16) 4645c: 6700 0132 beqw 46590 <timer_settime+0x1c4>
_Thread_Enable_dispatch();
return 0;
}
/* Convert from seconds and nanoseconds to ticks */
ptimer->ticks = _Timespec_To_ticks( &value->it_interval );
46460: 2f0b movel %a3,%sp@- 46462: 47f9 0004 a068 lea 4a068 <_Timespec_To_ticks>,%a3 46468: 4e93 jsr %a3@ 4646a: 2540 0062 movel %d0,%a2@(98)
initial_period = _Timespec_To_ticks( &normalize.it_value );
4646e: 2f0c movel %a4,%sp@- 46470: 4e93 jsr %a3@
activated = _POSIX_Timer_Insert_helper(
46472: 2f0a movel %a2,%sp@- 46474: 4879 0004 6698 pea 46698 <_POSIX_Timer_TSR> 4647a: 2f2a 0008 movel %a2@(8),%sp@- 4647e: 2f00 movel %d0,%sp@- 46480: 486a 0010 pea %a2@(16) 46484: 4eb9 0004 d5e8 jsr 4d5e8 <_POSIX_Timer_Insert_helper>
initial_period,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
4648a: 4fef 001c lea %sp@(28),%sp 4648e: 4a00 tstb %d0 46490: 6700 0166 beqw 465f8 <timer_settime+0x22c>
/*
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
46494: 4a84 tstl %d4 46496: 6700 0172 beqw 4660a <timer_settime+0x23e>
*ovalue = ptimer->timer_data;
4649a: 220a movel %a2,%d1 4649c: 0681 0000 0052 addil #82,%d1 464a2: 2044 moveal %d4,%a0 464a4: 2241 moveal %d1,%a1 464a6: 200a movel %a2,%d0 464a8: 0680 0000 0056 addil #86,%d0 464ae: 47ea 005a lea %a2@(90),%a3 464b2: 280a movel %a2,%d4 464b4: 0684 0000 005e addil #94,%d4 464ba: 20d1 movel %a1@,%a0@+ 464bc: 2240 moveal %d0,%a1 464be: 20d1 movel %a1@,%a0@+ 464c0: 2244 moveal %d4,%a1 464c2: 20d3 movel %a3@,%a0@+ 464c4: 2091 movel %a1@,%a0@
ptimer->timer_data = normalize;
464c6: 2041 moveal %d1,%a0 464c8: 2243 moveal %d3,%a1 464ca: 2091 movel %a1@,%a0@ 464cc: 2040 moveal %d0,%a0 464ce: 2242 moveal %d2,%a1 464d0: 2091 movel %a1@,%a0@ 464d2: 2044 moveal %d4,%a0 464d4: 2694 movel %a4@,%a3@ 464d6: 2095 movel %a5@,%a0@
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
464d8: 7003 moveq #3,%d0 464da: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
464de: 486a 006a pea %a2@(106) 464e2: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
_Thread_Enable_dispatch();
464e8: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch>
return 0;
464ee: 588f addql #4,%sp
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
464f0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
464f2: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 464f8: 4e5e unlk %fp 464fa: 4e75 rts
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
464fc: 260e movel %fp,%d3 464fe: 0683 ffff ffe4 addil #-28,%d3 46504: 204b moveal %a3,%a0 46506: 2243 moveal %d3,%a1 46508: 240e movel %fp,%d2 4650a: 0682 ffff ffe8 addil #-24,%d2 46510: 200e movel %fp,%d0 46512: 0680 ffff ffec addil #-20,%d0
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
46518: 2840 moveal %d0,%a4
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
4651a: 4bee fff0 lea %fp@(-16),%a5
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
4651e: 45ee fff4 lea %fp@(-12),%a2
if ( flags != TIMER_ABSTIME && flags != POSIX_TIMER_RELATIVE ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
normalize = *value;
46522: 2298 movel %a0@+,%a1@ 46524: 2242 moveal %d2,%a1 46526: 2298 movel %a0@+,%a1@ 46528: 2898 movel %a0@+,%a4@ 4652a: 2a90 movel %a0@,%a5@
/* Convert absolute to relative time */
if (flags == TIMER_ABSTIME) {
struct timespec now;
_TOD_Get( &now );
4652c: 2f0a movel %a2,%sp@- 4652e: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
/* Check for seconds in the past */
if ( _Timespec_Greater_than( &now, &normalize.it_value ) )
46534: 2f0c movel %a4,%sp@- 46536: 2f0a movel %a2,%sp@- 46538: 4eb9 0004 9fe0 jsr 49fe0 <_Timespec_Greater_than> 4653e: 4fef 000c lea %sp@(12),%sp 46542: 4a00 tstb %d0
46544: 6632 bnes 46578 <timer_settime+0x1ac>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_Subtract( &now, &normalize.it_value, &normalize.it_value );
46546: 2f0c movel %a4,%sp@- 46548: 2f0c movel %a4,%sp@- 4654a: 2f0a movel %a2,%sp@- 4654c: 4eb9 0004 a014 jsr 4a014 <_Timespec_Subtract> 46552: 4fef 000c lea %sp@(12),%sp 46556: 486e fffc pea %fp@(-4) 4655a: 2f2e 0008 movel %fp@(8),%sp@- 4655e: 4879 0006 23d0 pea 623d0 <_POSIX_Timer_Information> 46564: 4eb9 0004 88b8 jsr 488b8 <_Objects_Get>
* something with the structure of times of the timer: to stop, start
* or start it again
*/
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
4656a: 4fef 000c lea %sp@(12),%sp 4656e: 2440 moveal %d0,%a2 46570: 4aae fffc tstl %fp@(-4) 46574: 6700 fedc beqw 46452 <timer_settime+0x86>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
46578: 4eb9 0005 0e94 jsr 50e94 <__errno> 4657e: 7216 moveq #22,%d1 46580: 2040 moveal %d0,%a0 46582: 70ff moveq #-1,%d0
}
46584: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
4658a: 2081 movel %d1,%a0@
}
4658c: 4e5e unlk %fp 4658e: 4e75 rts
case OBJECTS_LOCAL:
/* First, it verifies if the timer must be stopped */
if ( normalize.it_value.tv_sec == 0 && normalize.it_value.tv_nsec == 0 ) {
/* Stop the timer */
(void) _Watchdog_Remove( &ptimer->Timer );
46590: 486a 0010 pea %a2@(16) 46594: 4eb9 0004 a4bc jsr 4a4bc <_Watchdog_Remove>
/* The old data of the timer are returned */
if ( ovalue )
4659a: 588f addql #4,%sp 4659c: 4a84 tstl %d4 4659e: 6700 00b6 beqw 46656 <timer_settime+0x28a>
*ovalue = ptimer->timer_data;
465a2: 220a movel %a2,%d1 465a4: 0681 0000 0052 addil #82,%d1 465aa: 2244 moveal %d4,%a1 465ac: 2041 moveal %d1,%a0 465ae: 200a movel %a2,%d0 465b0: 0680 0000 0056 addil #86,%d0 465b6: 47ea 005a lea %a2@(90),%a3 465ba: 280a movel %a2,%d4 465bc: 0684 0000 005e addil #94,%d4 465c2: 22d0 movel %a0@,%a1@+ 465c4: 2040 moveal %d0,%a0 465c6: 22d0 movel %a0@,%a1@+ 465c8: 2044 moveal %d4,%a0 465ca: 22d3 movel %a3@,%a1@+ 465cc: 2290 movel %a0@,%a1@
/* The new data are set */
ptimer->timer_data = normalize;
465ce: 2241 moveal %d1,%a1 465d0: 2043 moveal %d3,%a0 465d2: 2290 movel %a0@,%a1@ 465d4: 2240 moveal %d0,%a1 465d6: 2042 moveal %d2,%a0 465d8: 2290 movel %a0@,%a1@ 465da: 2244 moveal %d4,%a1 465dc: 2694 movel %a4@,%a3@ 465de: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
465e0: 7004 moveq #4,%d0 465e2: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */
_Thread_Enable_dispatch();
465e6: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 465ec: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
465ee: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 465f4: 4e5e unlk %fp 465f6: 4e75 rts
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated ) {
_Thread_Enable_dispatch();
465f8: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 465fe: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
46600: 4cee 3c1c ffc8 moveml %fp@(-56),%d2-%d4/%a2-%a5 46606: 4e5e unlk %fp 46608: 4e75 rts 4660a: 220a movel %a2,%d1 4660c: 0681 0000 0052 addil #82,%d1
* The timer has been started and is running. So we return the
* old ones in "ovalue"
*/
if ( ovalue )
*ovalue = ptimer->timer_data;
ptimer->timer_data = normalize;
46612: 2041 moveal %d1,%a0 46614: 2243 moveal %d3,%a1 46616: 200a movel %a2,%d0 46618: 0680 0000 0056 addil #86,%d0 4661e: 47ea 005a lea %a2@(90),%a3 46622: 280a movel %a2,%d4 46624: 0684 0000 005e addil #94,%d4 4662a: 2091 movel %a1@,%a0@ 4662c: 2040 moveal %d0,%a0 4662e: 2242 moveal %d2,%a1 46630: 2091 movel %a1@,%a0@ 46632: 2044 moveal %d4,%a0 46634: 2694 movel %a4@,%a3@ 46636: 2095 movel %a5@,%a0@
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
46638: 7003 moveq #3,%d0 4663a: 1540 003c moveb %d0,%a2@(60)
_TOD_Get( &ptimer->time );
4663e: 486a 006a pea %a2@(106) 46642: 4eb9 0004 7eac jsr 47eac <_TOD_Get>
_Thread_Enable_dispatch();
46648: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch>
return 0;
4664e: 588f addql #4,%sp
ptimer->timer_data = normalize;
/* Indicate that the time is running */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
_TOD_Get( &ptimer->time );
_Thread_Enable_dispatch();
46650: 4280 clrl %d0 46652: 6000 fe9e braw 464f2 <timer_settime+0x126> 46656: 220a movel %a2,%d1 46658: 0681 0000 0052 addil #82,%d1
(void) _Watchdog_Remove( &ptimer->Timer );
/* The old data of the timer are returned */
if ( ovalue )
*ovalue = ptimer->timer_data;
/* The new data are set */
ptimer->timer_data = normalize;
4665e: 2241 moveal %d1,%a1 46660: 2043 moveal %d3,%a0 46662: 200a movel %a2,%d0 46664: 0680 0000 0056 addil #86,%d0 4666a: 47ea 005a lea %a2@(90),%a3 4666e: 280a movel %a2,%d4 46670: 0684 0000 005e addil #94,%d4 46676: 2290 movel %a0@,%a1@ 46678: 2240 moveal %d0,%a1 4667a: 2042 moveal %d2,%a0 4667c: 2290 movel %a0@,%a1@ 4667e: 2244 moveal %d4,%a1 46680: 2694 movel %a4@,%a3@ 46682: 2295 movel %a5@,%a1@
/* Indicates that the timer is created and stopped */
ptimer->state = POSIX_TIMER_STATE_CREATE_STOP;
46684: 7004 moveq #4,%d0 46686: 1540 003c moveb %d0,%a2@(60)
/* Returns with success */
_Thread_Enable_dispatch();
4668a: 4eb9 0004 9140 jsr 49140 <_Thread_Enable_dispatch> 46690: 4280 clrl %d0 46692: 6000 ff5a braw 465ee <timer_settime+0x222>
...
00046454 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
46454: 4e56 ffe8 linkw %fp,#-24 46458: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4645c: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
46460: 4ab9 0006 3602 tstl 63602 <_POSIX_signals_Ualarm_timer+0x1c> 46466: 6700 0086 beqw 464ee <ualarm+0x9a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4646a: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 46470: 4eb9 0004 a24c jsr 4a24c <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
46476: 588f addql #4,%sp 46478: 7201 moveq #1,%d1 4647a: 5580 subql #2,%d0 4647c: b280 cmpl %d0,%d1 4647e: 6400 0098 bccw 46518 <ualarm+0xc4>
46482: 4283 clrl %d3 <== NOT EXECUTED
/*
* 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 ) {
46484: 4a82 tstl %d2 <== NOT EXECUTED 46486: 660c bnes 46494 <ualarm+0x40> <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
46488: 2003 movel %d3,%d0 4648a: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46490: 4e5e unlk %fp 46492: 4e75 rts
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
46494: 280e movel %fp,%d4
* less than a single clock tick, then fudge it to a clock tick.
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
46496: 223c 000f 4240 movel #1000000,%d1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
4649c: 5184 subql #8,%d4 4649e: 45f9 0004 9d64 lea 49d64 <_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;
464a4: 4c41 2000 remul %d1,%d0,%d2 464a8: 4c41 2002 remul %d1,%d2,%d2
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464ac: 223c 0000 03e8 movel #1000,%d1
* 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;
464b2: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464b6: 4c00 1800 mulsl %d0,%d1
ticks = _Timespec_To_ticks( &tp );
464ba: 2f04 movel %d4,%sp@-
*/
if ( useconds ) {
Watchdog_Interval ticks;
tp.tv_sec = useconds / TOD_MICROSECONDS_PER_SECOND;
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
464bc: 2d41 fffc movel %d1,%fp@(-4)
ticks = _Timespec_To_ticks( &tp );
464c0: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
464c2: 2f04 movel %d4,%sp@- 464c4: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
464c6: 4879 0006 35e6 pea 635e6 <_POSIX_signals_Ualarm_timer> 464cc: 4879 0006 2ea4 pea 62ea4 <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
464d2: 23c0 0006 35f2 movel %d0,635f2 <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
464d8: 4eb9 0004 a104 jsr 4a104 <_Watchdog_Insert> 464de: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
464e2: 2003 movel %d3,%d0 464e4: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 464ea: 4e5e unlk %fp 464ec: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
464ee: 42b9 0006 35ee clrl 635ee <_POSIX_signals_Ualarm_timer+0x8>
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
464f4: 4283 clrl %d3
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
464f6: 203c 0004 6560 movel #288096,%d0
the_watchdog->id = id;
464fc: 42b9 0006 3606 clrl 63606 <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
46502: 23c0 0006 3602 movel %d0,63602 <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
46508: 42b9 0006 360a clrl 6360a <_POSIX_signals_Ualarm_timer+0x24>
/*
* 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 ) {
4650e: 4a82 tstl %d2 46510: 6700 ff76 beqw 46488 <ualarm+0x34> 46514: 6000 ff7e braw 46494 <ualarm+0x40>
* 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);
46518: 2039 0006 35fa movel 635fa <_POSIX_signals_Ualarm_timer+0x14>,%d0 4651e: d0b9 0006 35f2 addl 635f2 <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
46524: 486e fff8 pea %fp@(-8) 46528: 90b9 0006 35fe subl 635fe <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4652e: 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 );
46534: 2f00 movel %d0,%sp@- 46536: 4eb9 0004 9cd4 jsr 49cd4 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
4653c: 202e fff8 movel %fp@(-8),%d0 46540: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
46544: 283c 0000 03e8 movel #1000,%d4 4654a: 508f addql #8,%sp 4654c: 262e fffc movel %fp@(-4),%d3 46550: 4c44 3803 remsl %d4,%d3,%d3 46554: d680 addl %d0,%d3
/*
* 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 ) {
46556: 4a82 tstl %d2 46558: 6700 ff2e beqw 46488 <ualarm+0x34> 4655c: 6000 ff36 braw 46494 <ualarm+0x40>
0004f560 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
4f560: 4e56 ffc0 linkw %fp,#-64 4f564: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4f568: 242e 0008 movel %fp@(8),%d2
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
4f56c: 2f02 movel %d2,%sp@- 4f56e: 4eb9 0004 2bfc jsr 42bfc <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
4f574: 588f addql #4,%sp 4f576: 4a80 tstl %d0 4f578: 6600 00e6 bnew 4f660 <unlink+0x100>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
4f57c: 45ee ffe8 lea %fp@(-24),%a2 4f580: 4283 clrl %d3 4f582: 2f0a movel %a2,%sp@- 4f584: 486e fffc pea %fp@(-4) 4f588: 4204 clrb %d4 4f58a: 2f02 movel %d2,%sp@- 4f58c: 4eb9 0004 3d00 jsr 43d00 <rtems_filesystem_get_start_loc> 4f592: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4f596: 2d52 ffd4 movel %a2@,%fp@(-44)
name = path + parentpathlen;
4f59a: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4f59c: 47f9 0005 19e4 lea 519e4 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4f5a2: 240e movel %fp,%d2 4f5a4: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
4f5aa: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 4f5b0: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 4f5b6: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 4f5bc: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4f5c2: 2f03 movel %d3,%sp@- 4f5c4: 4e93 jsr %a3@ 4f5c6: 2e80 movel %d0,%sp@ 4f5c8: 2f03 movel %d3,%sp@- 4f5ca: 4eb9 0004 2ba8 jsr 42ba8 <rtems_filesystem_prefix_separators> 4f5d0: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4f5d2: 2f03 movel %d3,%sp@- 4f5d4: 4e93 jsr %a3@ 4f5d6: 4297 clrl %sp@ 4f5d8: 2f02 movel %d2,%sp@- 4f5da: 42a7 clrl %sp@- 4f5dc: 2f00 movel %d0,%sp@- 4f5de: 2f03 movel %d3,%sp@- 4f5e0: 4eb9 0004 2c42 jsr 42c42 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
4f5e6: 4fef 001c lea %sp@(28),%sp 4f5ea: 4a80 tstl %d0 4f5ec: 6600 00a6 bnew 4f694 <unlink+0x134>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( !loc.ops->node_type_h ) {
4f5f0: 226e ffe0 moveal %fp@(-32),%a1 4f5f4: 2069 0010 moveal %a1@(16),%a0 4f5f8: 4a88 tstl %a0 4f5fa: 6700 00c0 beqw 4f6bc <unlink+0x15c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
4f5fe: 2f02 movel %d2,%sp@- 4f600: 4e90 jsr %a0@ 4f602: 588f addql #4,%sp 4f604: 7201 moveq #1,%d1 4f606: b280 cmpl %d0,%d1 4f608: 6700 00f6 beqw 4f700 <unlink+0x1a0>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
4f60c: 226e ffe0 moveal %fp@(-32),%a1 4f610: 2069 000c moveal %a1@(12),%a0 4f614: 4a88 tstl %a0 4f616: 6700 00a4 beqw 4f6bc <unlink+0x15c>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
4f61a: 2f02 movel %d2,%sp@- 4f61c: 2f0a movel %a2,%sp@- 4f61e: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4f620: 206e ffe0 moveal %fp@(-32),%a0
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
4f624: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
4f626: 508f addql #8,%sp 4f628: 4a88 tstl %a0
4f62a: 670e beqs 4f63a <unlink+0xda> <== NEVER TAKEN
4f62c: 2068 001c moveal %a0@(28),%a0 4f630: 4a88 tstl %a0
4f632: 6706 beqs 4f63a <unlink+0xda> <== NEVER TAKEN
4f634: 2f02 movel %d2,%sp@- 4f636: 4e90 jsr %a0@ 4f638: 588f addql #4,%sp
if ( free_parentloc )
4f63a: 4a04 tstb %d4
4f63c: 6716 beqs 4f654 <unlink+0xf4> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
4f63e: 206e fff4 moveal %fp@(-12),%a0 4f642: 4a88 tstl %a0
4f644: 670e beqs 4f654 <unlink+0xf4> <== NEVER TAKEN
4f646: 2068 001c moveal %a0@(28),%a0 4f64a: 4a88 tstl %a0
4f64c: 6706 beqs 4f654 <unlink+0xf4> <== NEVER TAKEN
4f64e: 2f0a movel %a2,%sp@- 4f650: 4e90 jsr %a0@ 4f652: 588f addql #4,%sp
return result;
}
4f654: 2003 movel %d3,%d0 4f656: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 4f65c: 4e5e unlk %fp 4f65e: 4e75 rts
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
4f660: 42a7 clrl %sp@- 4f662: 45ee ffe8 lea %fp@(-24),%a2 4f666: 2600 movel %d0,%d3 4f668: 2f0a movel %a2,%sp@- 4f66a: 4878 0002 pea 2 <DOUBLE_FLOAT> 4f66e: 2f00 movel %d0,%sp@- 4f670: 2f02 movel %d2,%sp@- 4f672: 4eb9 0004 2d4c jsr 42d4c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
4f678: 4fef 0014 lea %sp@(20),%sp 4f67c: 4a80 tstl %d0
4f67e: 6606 bnes 4f686 <unlink+0x126> <== NEVER TAKEN
4f680: 7801 moveq #1,%d4 4f682: 6000 ff12 braw 4f596 <unlink+0x36>
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
4f686: 76ff moveq #-1,%d3 <== NOT EXECUTED
return result;
}
4f688: 2003 movel %d3,%d0 <== NOT EXECUTED 4f68a: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 4f690: 4e5e unlk %fp <== NOT EXECUTED 4f692: 4e75 rts <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
4f694: 4a04 tstb %d4
4f696: 67ee beqs 4f686 <unlink+0x126> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
4f698: 206e fff4 moveal %fp@(-12),%a0 4f69c: 4a88 tstl %a0
4f69e: 67e6 beqs 4f686 <unlink+0x126> <== NEVER TAKEN
4f6a0: 2028 001c movel %a0@(28),%d0
4f6a4: 67e0 beqs 4f686 <unlink+0x126> <== NEVER TAKEN
4f6a6: 2f0a movel %a2,%sp@- 4f6a8: 2040 moveal %d0,%a0 4f6aa: 76ff moveq #-1,%d3 4f6ac: 4e90 jsr %a0@ 4f6ae: 588f addql #4,%sp
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4f6b0: 2003 movel %d3,%d0 4f6b2: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 4f6b8: 4e5e unlk %fp 4f6ba: 4e75 rts
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
4f6bc: 2069 001c moveal %a1@(28),%a0 <== NOT EXECUTED 4f6c0: 4a88 tstl %a0 <== NOT EXECUTED 4f6c2: 6706 beqs 4f6ca <unlink+0x16a> <== NOT EXECUTED 4f6c4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4f6c6: 4e90 jsr %a0@ <== NOT EXECUTED 4f6c8: 588f addql #4,%sp <== NOT EXECUTED
if ( free_parentloc )
4f6ca: 4a04 tstb %d4 <== NOT EXECUTED 4f6cc: 6716 beqs 4f6e4 <unlink+0x184> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
4f6ce: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4f6d2: 4a88 tstl %a0 <== NOT EXECUTED 4f6d4: 670e beqs 4f6e4 <unlink+0x184> <== NOT EXECUTED 4f6d6: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4f6da: 4a88 tstl %a0 <== NOT EXECUTED 4f6dc: 6706 beqs 4f6e4 <unlink+0x184> <== NOT EXECUTED 4f6de: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f6e0: 4e90 jsr %a0@ <== NOT EXECUTED 4f6e2: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
4f6e4: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 4f6ea: 76ff moveq #-1,%d3 <== NOT EXECUTED 4f6ec: 2040 moveal %d0,%a0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4f6ee: 2003 movel %d3,%d0 <== NOT EXECUTED 4f6f0: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED
if ( !loc.ops->unlink_h ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
4f6f6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4f6fc: 4e5e unlk %fp <== NOT EXECUTED 4f6fe: 4e75 rts <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
4f700: 206e ffe0 moveal %fp@(-32),%a0 4f704: 4a88 tstl %a0
4f706: 670e beqs 4f716 <unlink+0x1b6> <== NEVER TAKEN
4f708: 2068 001c moveal %a0@(28),%a0 4f70c: 4a88 tstl %a0
4f70e: 6706 beqs 4f716 <unlink+0x1b6> <== NEVER TAKEN
4f710: 2f02 movel %d2,%sp@- 4f712: 4e90 jsr %a0@ 4f714: 588f addql #4,%sp
if ( free_parentloc )
4f716: 4a04 tstb %d4
4f718: 6716 beqs 4f730 <unlink+0x1d0> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
4f71a: 206e fff4 moveal %fp@(-12),%a0 <== NOT EXECUTED 4f71e: 4a88 tstl %a0 <== NOT EXECUTED 4f720: 670e beqs 4f730 <unlink+0x1d0> <== NOT EXECUTED 4f722: 2068 001c moveal %a0@(28),%a0 <== NOT EXECUTED 4f726: 4a88 tstl %a0 <== NOT EXECUTED 4f728: 6706 beqs 4f730 <unlink+0x1d0> <== NOT EXECUTED 4f72a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4f72c: 4e90 jsr %a0@ <== NOT EXECUTED 4f72e: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
4f730: 4eb9 0005 05b8 jsr 505b8 <__errno> 4f736: 76ff moveq #-1,%d3 4f738: 2040 moveal %d0,%a0 4f73a: 7015 moveq #21,%d0 4f73c: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
4f73e: 2003 movel %d3,%d0 4f740: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3
4f746: 4e5e unlk %fp <== NOT EXECUTED
00049704 <unmount>:
*/
int unmount(
const char *path
)
{
49704: 4e56 ffec linkw %fp,#-20 49708: 2f0a movel %a2,%sp@- 4970a: 246e 0008 moveal %fp@(8),%a2 4970e: 2f02 movel %d2,%sp@-
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
49710: 240e movel %fp,%d2 49712: 0682 ffff ffec addil #-20,%d2 49718: 2f0a movel %a2,%sp@- 4971a: 4eb9 0005 6cc8 jsr 56cc8 <strlen> 49720: 7201 moveq #1,%d1 49722: 2e81 movel %d1,%sp@ 49724: 2f02 movel %d2,%sp@- 49726: 42a7 clrl %sp@- 49728: 2f00 movel %d0,%sp@- 4972a: 2f0a movel %a2,%sp@- 4972c: 4eb9 0004 57c4 jsr 457c4 <rtems_filesystem_evaluate_path> 49732: 4fef 0014 lea %sp@(20),%sp 49736: 4a80 tstl %d0 49738: 6600 0088 bnew 497c2 <unmount+0xbe>
return -1;
mt_entry = loc.mt_entry;
4973c: 246e fffc moveal %fp@(-4),%a2
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
49740: 202e ffec movel %fp@(-20),%d0 49744: b0aa 001c cmpl %a2@(28),%d0 49748: 6600 00f2 bnew 4983c <unmount+0x138>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
4974c: 206e fff8 moveal %fp@(-8),%a0 49750: 4a88 tstl %a0
49752: 670e beqs 49762 <unmount+0x5e> <== NEVER TAKEN
49754: 2068 001c moveal %a0@(28),%a0 49758: 4a88 tstl %a0
4975a: 6706 beqs 49762 <unmount+0x5e> <== NEVER TAKEN
4975c: 2f02 movel %d2,%sp@- 4975e: 4e90 jsr %a0@ 49760: 588f addql #4,%sp
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
fs_mount_loc = &mt_entry->mt_point_node;
49762: 206a 0014 moveal %a2@(20),%a0 49766: 4aa8 0028 tstl %a0@(40) 4976a: 6700 0136 beqw 498a2 <unmount+0x19e>
fs_root_loc = &mt_entry->mt_fs_root;
4976e: 206a 0028 moveal %a2@(40),%a0 49772: 4aa8 002c tstl %a0@(44) 49776: 6700 012a beqw 498a2 <unmount+0x19e>
* 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 )
4977a: 2079 0006 566c moveal 6566c <rtems_current_user_env>,%a0 49780: b5e8 0014 cmpal %a0@(20),%a2 49784: 6700 00e6 beqw 4986c <unmount+0x168>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
49788: 2f2a 002c movel %a2@(44),%sp@- 4978c: 487a ff5e pea %pc@(496ec <is_fs_below_mount_point>) 49790: 4eb9 0004 64b4 jsr 464b4 <rtems_filesystem_mount_iterate> 49796: 508f addql #8,%sp 49798: 4a00 tstb %d0 4979a: 6600 00d0 bnew 4986c <unmount+0x168>
* 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 )
4979e: 2f0a movel %a2,%sp@- 497a0: 4eb9 0004 5adc jsr 45adc <rtems_libio_is_open_files_in_fs> 497a6: 588f addql #4,%sp 497a8: 7201 moveq #1,%d1 497aa: b280 cmpl %d0,%d1 497ac: 6700 00be beqw 4986c <unmount+0x168>
* 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 )
497b0: 206a 0014 moveal %a2@(20),%a0 497b4: 2f0a movel %a2,%sp@- 497b6: 2068 0028 moveal %a0@(40),%a0 497ba: 4e90 jsr %a0@ 497bc: 588f addql #4,%sp 497be: 4a80 tstl %d0
497c0: 670e beqs 497d0 <unmount+0xcc> <== ALWAYS TAKEN
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
497c2: 242e ffe4 movel %fp@(-28),%d2
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
497c6: 70ff moveq #-1,%d0
}
497c8: 246e ffe8 moveal %fp@(-24),%a2 497cc: 4e5e unlk %fp 497ce: 4e75 rts
* 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){
497d0: 206a 0028 moveal %a2@(40),%a0 497d4: 2f0a movel %a2,%sp@- 497d6: 2068 002c moveal %a0@(44),%a0 497da: 4e90 jsr %a0@ 497dc: 588f addql #4,%sp 497de: 4a80 tstl %d0 497e0: 6600 00a4 bnew 49886 <unmount+0x182>
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 );
497e4: 42a7 clrl %sp@- 497e6: 42a7 clrl %sp@- 497e8: 2f39 0006 754c movel 6754c <rtems_libio_semaphore>,%sp@- 497ee: 4eb9 0004 a6b0 jsr 4a6b0 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
497f4: 2f0a movel %a2,%sp@- 497f6: 4eb9 0004 b104 jsr 4b104 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
497fc: 2f39 0006 754c movel 6754c <rtems_libio_semaphore>,%sp@- 49802: 4eb9 0004 a7ec jsr 4a7ec <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 );
49808: 206a 0014 moveal %a2@(20),%a0 4980c: 4fef 0014 lea %sp@(20),%sp 49810: 4a88 tstl %a0
49812: 6710 beqs 49824 <unmount+0x120> <== NEVER TAKEN
49814: 2068 001c moveal %a0@(28),%a0 49818: 4a88 tstl %a0
4981a: 6708 beqs 49824 <unmount+0x120> <== NEVER TAKEN
4981c: 486a 0008 pea %a2@(8) 49820: 4e90 jsr %a0@ 49822: 588f addql #4,%sp
free( mt_entry );
49824: 2f0a movel %a2,%sp@- 49826: 4eb9 0004 5854 jsr 45854 <free>
return 0;
}
4982c: 242e ffe4 movel %fp@(-28),%d2
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
49830: 588f addql #4,%sp
* Free the memory node that was allocated in mount
* Free the memory associated with the extracted mount table entry.
*/
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
49832: 4280 clrl %d0
return 0;
}
49834: 246e ffe8 moveal %fp@(-24),%a2 49838: 4e5e unlk %fp 4983a: 4e75 rts
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
rtems_filesystem_freenode( &loc );
4983c: 206e fff8 moveal %fp@(-8),%a0 49840: 4a88 tstl %a0
49842: 670e beqs 49852 <unmount+0x14e> <== NEVER TAKEN
49844: 2068 001c moveal %a0@(28),%a0 49848: 4a88 tstl %a0
4984a: 6706 beqs 49852 <unmount+0x14e> <== NEVER TAKEN
4984c: 2f02 movel %d2,%sp@- 4984e: 4e90 jsr %a0@ 49850: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EACCES );
49852: 4eb9 0005 3c60 jsr 53c60 <__errno> 49858: 740d moveq #13,%d2 4985a: 2040 moveal %d0,%a0 4985c: 70ff moveq #-1,%d0 4985e: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49860: 242e ffe4 movel %fp@(-28),%d2 49864: 246e ffe8 moveal %fp@(-24),%a2 49868: 4e5e unlk %fp 4986a: 4e75 rts
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
4986c: 4eb9 0005 3c60 jsr 53c60 <__errno>
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49872: 242e ffe4 movel %fp@(-28),%d2
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
49876: 2040 moveal %d0,%a0 49878: 7210 moveq #16,%d1 4987a: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
4987c: 246e ffe8 moveal %fp@(-24),%a2 49880: 4e5e unlk %fp
* descriptors that are currently active and reference nodes in the
* file system that we are trying to unmount
*/
if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 )
rtems_set_errno_and_return_minus_one( EBUSY );
49882: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
49884: 4e75 rts
* This was response was questionable but the best we could
* come up with.
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
49886: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 4988a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4988c: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 49890: 4e90 jsr %a0@ <== NOT EXECUTED 49892: 588f addql #4,%sp <== NOT EXECUTED 49894: 4a80 tstl %d0 <== NOT EXECUTED 49896: 6700 ff2a beqw 497c2 <unmount+0xbe> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
4989a: 42a7 clrl %sp@- <== NOT EXECUTED 4989c: 4eb9 0004 ad8c jsr 4ad8c <rtems_fatal_error_occurred> <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
498a2: 4eb9 0005 3c60 jsr 53c60 <__errno> <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
498a8: 242e ffe4 movel %fp@(-28),%d2 <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
498ac: 2040 moveal %d0,%a0 <== NOT EXECUTED 498ae: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
498b0: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED 498b4: 4e5e unlk %fp <== NOT EXECUTED
if ( !fs_mount_loc->ops->unmount_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( !fs_root_loc->ops->fsunmount_me_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
498b6: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
...
00047258 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
47258: 4e56 ffe0 linkw %fp,#-32 4725c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 47260: 262e 0008 movel %fp@(8),%d3
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
47264: 240e movel %fp,%d2 47266: 0682 ffff ffec addil #-20,%d2 4726c: 2f03 movel %d3,%sp@-
int utime(
const char *path,
const struct utimbuf *times
)
{
4726e: 246e 000c moveal %fp@(12),%a2
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
47272: 4eb9 0005 39b4 jsr 539b4 <strlen> 47278: 7201 moveq #1,%d1 4727a: 2e81 movel %d1,%sp@ 4727c: 2f02 movel %d2,%sp@- 4727e: 42a7 clrl %sp@- 47280: 2f00 movel %d0,%sp@- 47282: 2f03 movel %d3,%sp@- 47284: 4eb9 0004 37c8 jsr 437c8 <rtems_filesystem_evaluate_path> 4728a: 4fef 0014 lea %sp@(20),%sp 4728e: 4a80 tstl %d0
47290: 663e bnes 472d0 <utime+0x78>
return -1;
if ( !temp_loc.ops->utime_h ){
47292: 226e fff8 moveal %fp@(-8),%a1 47296: 2069 0030 moveal %a1@(48),%a0 4729a: 4a88 tstl %a0
4729c: 6740 beqs 472de <utime+0x86> <== NEVER TAKEN
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
4729e: 2f2a 0004 movel %a2@(4),%sp@- 472a2: 2f12 movel %a2@,%sp@- 472a4: 2f02 movel %d2,%sp@- 472a6: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
472a8: 206e fff8 moveal %fp@(-8),%a0
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
472ac: 2600 movel %d0,%d3
rtems_filesystem_freenode( &temp_loc );
472ae: 4fef 000c lea %sp@(12),%sp 472b2: 4a88 tstl %a0
472b4: 670e beqs 472c4 <utime+0x6c> <== NEVER TAKEN
472b6: 2068 001c moveal %a0@(28),%a0 472ba: 4a88 tstl %a0
472bc: 6706 beqs 472c4 <utime+0x6c> <== NEVER TAKEN
472be: 2f02 movel %d2,%sp@- 472c0: 4e90 jsr %a0@ 472c2: 588f addql #4,%sp
return result;
}
472c4: 2003 movel %d3,%d0 472c6: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 472cc: 4e5e unlk %fp 472ce: 4e75 rts
)
{
rtems_filesystem_location_info_t temp_loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
472d0: 76ff moveq #-1,%d3
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
472d2: 2003 movel %d3,%d0 472d4: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 472da: 4e5e unlk %fp 472dc: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
472de: 2069 001c moveal %a1@(28),%a0 472e2: 4a88 tstl %a0
472e4: 6706 beqs 472ec <utime+0x94>
472e6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 472e8: 4e90 jsr %a0@ <== NOT EXECUTED 472ea: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
472ec: 4eb9 0005 18d0 jsr 518d0 <__errno> <== NOT EXECUTED 472f2: 76ff moveq #-1,%d3 <== NOT EXECUTED 472f4: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
472f6: 2003 movel %d3,%d0 <== NOT EXECUTED 472f8: 4cee 040c ffe0 moveml %fp@(-32),%d2-%d3/%a2 <== NOT EXECUTED
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( !temp_loc.ops->utime_h ){
rtems_filesystem_freenode( &temp_loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
472fe: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
47304: 4e5e unlk %fp <== NOT EXECUTED
00045c10 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45c10: 4e56 ffc0 linkw %fp,#-64 45c14: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45c18: 246e 0008 moveal %fp@(8),%a2
for (; *fmt != '\0'; fmt++) {
45c1c: 1012 moveb %a2@,%d0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45c1e: 2c2e 000c movel %fp@(12),%d6
for (; *fmt != '\0'; fmt++) {
45c22: 4a00 tstb %d0 45c24: 6700 0130 beqw 45d56 <vprintk+0x146>
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45c28: 49ee ffec lea %fp@(-20),%a4 45c2c: 4bf9 0005 e955 lea 5e955 <rtems_filesystem_default_pathconf+0x41>,%a5
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45c32: 49c0 extbl %d0 45c34: 7225 moveq #37,%d1 45c36: b280 cmpl %d0,%d1
45c38: 6724 beqs 45c5e <vprintk+0x4e>
BSP_output_char(*fmt);
45c3a: 2f00 movel %d0,%sp@- 45c3c: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45c42: 2d46 ffe8 movel %d6,%fp@(-24) 45c46: 4e90 jsr %a0@
continue;
45c48: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45c4a: 528a addql #1,%a2 45c4c: 1012 moveb %a2@,%d0 45c4e: 6700 0106 beqw 45d56 <vprintk+0x146> 45c52: 2c2e ffe8 movel %fp@(-24),%d6
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45c56: 49c0 extbl %d0 45c58: 7225 moveq #37,%d1 45c5a: b280 cmpl %d0,%d1
45c5c: 66dc bnes 45c3a <vprintk+0x2a>
BSP_output_char(*fmt);
continue;
}
fmt++;
45c5e: 528a addql #1,%a2
if (*fmt == '0' ) {
45c60: 7430 moveq #48,%d2 45c62: 1012 moveb %a2@,%d0 45c64: 1200 moveb %d0,%d1 45c66: 49c1 extbl %d1 45c68: b481 cmpl %d1,%d2 45c6a: 6700 01f8 beqw 45e64 <vprintk+0x254>
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45c6e: 762d moveq #45,%d3
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
45c70: 7e20 moveq #32,%d7
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45c72: b681 cmpl %d1,%d3 45c74: 6700 0200 beqw 45e76 <vprintk+0x266>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c78: 0680 ffff ffd0 addil #-48,%d0 45c7e: 7a09 moveq #9,%d5 45c80: 0280 0000 00ff andil #255,%d0
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45c86: 4204 clrb %d4
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c88: ba80 cmpl %d0,%d5 45c8a: 6500 0208 bcsw 45e94 <vprintk+0x284> 45c8e: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
45c90: 2602 movel %d2,%d3
fmt++;
45c92: 528a addql #1,%a2
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c94: 7a09 moveq #9,%d5
width *= 10;
width += ((unsigned) *fmt - '0');
45c96: e78b lsll #3,%d3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c98: 1012 moveb %a2@,%d0
width *= 10;
width += ((unsigned) *fmt - '0');
45c9a: 2043 moveal %d3,%a0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c9c: 2600 movel %d0,%d3 45c9e: 0683 ffff ffd0 addil #-48,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
45ca4: 41f0 2a00 lea %a0@(00000000,%d2:l:2),%a0
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45ca8: 0283 0000 00ff andil #255,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
45cae: 41f0 18d0 lea %a0@(ffffffd0,%d1:l),%a0 45cb2: 1200 moveb %d0,%d1 45cb4: 2408 movel %a0,%d2 45cb6: 49c1 extbl %d1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45cb8: ba83 cmpl %d3,%d5
45cba: 64d4 bccs 45c90 <vprintk+0x80>
45cbc: 1200 moveb %d0,%d1
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45cbe: 706c moveq #108,%d0 45cc0: 49c1 extbl %d1 45cc2: b081 cmpl %d1,%d0 45cc4: 6700 009a beqw 45d60 <vprintk+0x150>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
45cc8: 7663 moveq #99,%d3 45cca: b681 cmpl %d1,%d3 45ccc: 6700 00a0 beqw 45d6e <vprintk+0x15e>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
continue;
}
if ( c == 's' ) {
45cd0: 7673 moveq #115,%d3 45cd2: b681 cmpl %d1,%d3 45cd4: 6700 01cc beqw 45ea2 <vprintk+0x292>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45cd8: 766f moveq #111,%d3 45cda: b681 cmpl %d1,%d3 45cdc: 6700 017a beqw 45e58 <vprintk+0x248> 45ce0: 7a4f moveq #79,%d5 45ce2: ba81 cmpl %d1,%d5 45ce4: 6700 0172 beqw 45e58 <vprintk+0x248>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
45ce8: 163c 0069 moveb #105,%d3 45cec: b681 cmpl %d1,%d3 45cee: 6700 009a beqw 45d8a <vprintk+0x17a> 45cf2: 1a3c 0049 moveb #73,%d5 45cf6: ba81 cmpl %d1,%d5 45cf8: 6700 0090 beqw 45d8a <vprintk+0x17a> 45cfc: 163c 0064 moveb #100,%d3 45d00: b681 cmpl %d1,%d3 45d02: 6700 0086 beqw 45d8a <vprintk+0x17a> 45d06: 1a3c 0044 moveb #68,%d5 45d0a: ba81 cmpl %d1,%d5
45d0c: 677c beqs 45d8a <vprintk+0x17a> <== NEVER TAKEN
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
45d0e: 163c 0075 moveb #117,%d3 45d12: b681 cmpl %d1,%d3 45d14: 6700 0270 beqw 45f86 <vprintk+0x376> 45d18: 1a3c 0055 moveb #85,%d5 45d1c: ba81 cmpl %d1,%d5 45d1e: 6700 0266 beqw 45f86 <vprintk+0x376>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
45d22: 163c 0078 moveb #120,%d3 45d26: b681 cmpl %d1,%d3 45d28: 6700 027a beqw 45fa4 <vprintk+0x394> 45d2c: 1a3c 0058 moveb #88,%d5 45d30: ba81 cmpl %d1,%d5 45d32: 6700 0270 beqw 45fa4 <vprintk+0x394>
base = 16; sign = false;
} else if ( c == 'p' ) {
45d36: 7070 moveq #112,%d0 45d38: b081 cmpl %d1,%d0 45d3a: 6700 0274 beqw 45fb0 <vprintk+0x3a0>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45d3e: 2f01 movel %d1,%sp@- 45d40: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45d46: 528a addql #1,%a2
} 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);
45d48: 2d46 ffe8 movel %d6,%fp@(-24) 45d4c: 4e90 jsr %a0@
continue;
45d4e: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45d50: 1012 moveb %a2@,%d0 45d52: 6600 fefe bnew 45c52 <vprintk+0x42>
sign,
width,
lead
);
}
}
45d56: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45d5c: 4e5e unlk %fp 45d5e: 4e75 rts
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
45d60: 528a addql #1,%a2
}
if ( c == 'c' ) {
45d62: 7663 moveq #99,%d3 45d64: 1212 moveb %a2@,%d1 45d66: 49c1 extbl %d1 45d68: b681 cmpl %d1,%d3 45d6a: 6600 ff64 bnew 45cd0 <vprintk+0xc0>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
BSP_output_char(chr);
45d6e: 2046 moveal %d6,%a0
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);
45d70: 5886 addql #4,%d6
BSP_output_char(chr);
45d72: 2010 movel %a0@,%d0 45d74: 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);
45d76: 2d46 ffe8 movel %d6,%fp@(-24)
BSP_output_char(chr);
45d7a: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45d80: 2f00 movel %d0,%sp@- 45d82: 4e90 jsr %a0@
continue;
45d84: 588f addql #4,%sp 45d86: 6000 fec2 braw 45c4a <vprintk+0x3a>
} else {
BSP_output_char(c);
continue;
}
printNum(
45d8a: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45d8c: 7a0a moveq #10,%d5
}
printNum(
45d8e: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45d90: 7201 moveq #1,%d1
}
printNum(
45d92: 2046 moveal %d6,%a0
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
45d94: 5886 addql #4,%d6
} else {
BSP_output_char(c);
continue;
}
printNum(
45d96: 2810 movel %a0@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
45d98: 2d46 ffe8 movel %d6,%fp@(-24)
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
45d9c: 4a01 tstb %d1
45d9e: 6706 beqs 45da6 <vprintk+0x196>
45da0: 4a84 tstl %d4 45da2: 6d00 01ae bltw 45f52 <vprintk+0x342>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45da6: 2004 movel %d4,%d0 45da8: 4c45 0000 remul %d5,%d0,%d0 45dac: 6700 01c6 beqw 45f74 <vprintk+0x364> 45db0: 2600 movel %d0,%d3 45db2: 4281 clrl %d1 45db4: 3045 moveaw %d5,%a0 45db6: 4c45 3003 remul %d5,%d3,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
45dba: 3e08 movew %a0,%d7 45dbc: cfc0 mulsw %d0,%d7 45dbe: 9887 subl %d7,%d4 45dc0: 2e04 movel %d4,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45dc2: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45dc4: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 45dc8: 5281 addql #1,%d1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45dca: 4a83 tstl %d3
45dcc: 671c beqs 45dea <vprintk+0x1da>
45dce: 2003 movel %d3,%d0 45dd0: 2600 movel %d0,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
45dd2: 3e08 movew %a0,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45dd4: 4c45 3003 remul %d5,%d3,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
45dd8: cfc0 mulsw %d0,%d7 45dda: 9887 subl %d7,%d4 45ddc: 2e04 movel %d4,%d7
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45dde: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45de0: 1987 1800 moveb %d7,%a4@(00000000,%d1:l) 45de4: 5281 addql #1,%d1
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45de6: 4a83 tstl %d3
45de8: 66e4 bnes 45dce <vprintk+0x1be>
45dea: 2800 movel %d0,%d4 45dec: 2601 movel %d1,%d3 45dee: 5283 addql #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45df0: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l)
for (n=maxwidth ; n > count; n-- )
45df4: b682 cmpl %d2,%d3
45df6: 6412 bccs 45e0a <vprintk+0x1fa>
BSP_output_char(lead);
45df8: 2f0b movel %a3,%sp@- 45dfa: 2079 0005 fc9c moveal 5fc9c <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-- )
45e00: 5382 subql #1,%d2
BSP_output_char(lead);
45e02: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45e04: 588f addql #4,%sp 45e06: b682 cmpl %d2,%d3
45e08: 65ee bcss 45df8 <vprintk+0x1e8>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e0a: 4a83 tstl %d3 45e0c: 6700 fe3c beqw 45c4a <vprintk+0x3a> 45e10: 4282 clrl %d2 45e12: 47f4 38ff lea %a4@(ffffffff,%d3:l),%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e16: 2079 0005 fc9c moveal 5fc9c <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++) {
45e1c: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e1e: 1013 moveb %a3@,%d0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e20: 538b subql #1,%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e22: 49c0 extbl %d0 45e24: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45e28: 49c0 extbl %d0 45e2a: 2f00 movel %d0,%sp@- 45e2c: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e2e: 588f addql #4,%sp 45e30: b682 cmpl %d2,%d3 45e32: 6300 fe16 blsw 45c4a <vprintk+0x3a>
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e36: 2079 0005 fc9c moveal 5fc9c <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++) {
45e3c: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e3e: 1013 moveb %a3@,%d0
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e40: 538b subql #1,%a3
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45e42: 49c0 extbl %d0 45e44: 1035 0800 moveb %a5@(00000000,%d0:l),%d0 45e48: 49c0 extbl %d0 45e4a: 2f00 movel %d0,%sp@- 45e4c: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45e4e: 588f addql #4,%sp 45e50: b682 cmpl %d2,%d3
45e52: 62c2 bhis 45e16 <vprintk+0x206>
45e54: 6000 fdf4 braw 45c4a <vprintk+0x3a>
} else {
BSP_output_char(c);
continue;
}
printNum(
45e58: 49c7 extbl %d7 <== NOT EXECUTED
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45e5a: 7a08 moveq #8,%d5 <== NOT EXECUTED
}
printNum(
45e5c: 2647 moveal %d7,%a3 <== NOT EXECUTED
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45e5e: 4201 clrb %d1 <== NOT EXECUTED 45e60: 6000 ff30 braw 45d92 <vprintk+0x182> <== NOT EXECUTED
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45e64: 528a addql #1,%a2
}
if (*fmt == '-' ) {
45e66: 762d moveq #45,%d3
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45e68: 1012 moveb %a2@,%d0 45e6a: 7e30 moveq #48,%d7 45e6c: 1200 moveb %d0,%d1 45e6e: 49c1 extbl %d1
}
if (*fmt == '-' ) {
45e70: b681 cmpl %d1,%d3 45e72: 6600 fe04 bnew 45c78 <vprintk+0x68>
minus = true;
fmt++;
45e76: 528a addql #1,%a2
}
while (*fmt >= '0' && *fmt <= '9' ) {
45e78: 7a09 moveq #9,%d5
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
45e7a: 1012 moveb %a2@,%d0 45e7c: 7801 moveq #1,%d4 45e7e: 1200 moveb %d0,%d1
}
while (*fmt >= '0' && *fmt <= '9' ) {
45e80: 0680 ffff ffd0 addil #-48,%d0 45e86: 0280 0000 00ff andil #255,%d0 45e8c: 49c1 extbl %d1 45e8e: ba80 cmpl %d0,%d5 45e90: 6400 fdfc bccw 45c8e <vprintk+0x7e> 45e94: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45e96: 706c moveq #108,%d0 45e98: b081 cmpl %d1,%d0 45e9a: 6600 fe2c bnew 45cc8 <vprintk+0xb8> 45e9e: 6000 fec0 braw 45d60 <vprintk+0x150>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
45ea2: 2046 moveal %d6,%a0 45ea4: 5886 addql #4,%d6 45ea6: 2650 moveal %a0@,%a3 45ea8: 2d46 ffe8 movel %d6,%fp@(-24)
if ( str == NULL ) {
45eac: 4a8b tstl %a3 45eae: 6700 00e2 beqw 45f92 <vprintk+0x382>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45eb2: 4a13 tstb %a3@ 45eb4: 6700 00e8 beqw 45f9e <vprintk+0x38e> 45eb8: 4283 clrl %d3 45eba: 5283 addql #1,%d3 45ebc: 4a33 3800 tstb %a3@(00000000,%d3:l)
45ec0: 66f8 bnes 45eba <vprintk+0x2aa>
;
/* leading spaces */
if ( !minus )
45ec2: 4a04 tstb %d4
45ec4: 661a bnes 45ee0 <vprintk+0x2d0>
for ( i=len ; i<width ; i++ )
45ec6: b682 cmpl %d2,%d3
45ec8: 6416 bccs 45ee0 <vprintk+0x2d0> <== ALWAYS TAKEN
45eca: 2a03 movel %d3,%d5 <== NOT EXECUTED
BSP_output_char(' ');
45ecc: 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++ )
45ed0: 5285 addql #1,%d5 <== NOT EXECUTED
BSP_output_char(' ');
45ed2: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 <== NOT EXECUTED 45ed8: 4e90 jsr %a0@ <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45eda: 588f addql #4,%sp <== NOT EXECUTED 45edc: b485 cmpl %d5,%d2 <== NOT EXECUTED 45ede: 62ec bhis 45ecc <vprintk+0x2bc> <== NOT EXECUTED
BSP_output_char(' ');
/* no width option */
if (width == 0) {
45ee0: 4a82 tstl %d2
45ee2: 6606 bnes 45eea <vprintk+0x2da>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45ee4: 4a83 tstl %d3
45ee6: 6730 beqs 45f18 <vprintk+0x308>
45ee8: 2403 movel %d3,%d2 45eea: 1013 moveb %a3@,%d0
45eec: 672a beqs 45f18 <vprintk+0x308> <== NEVER TAKEN
BSP_output_char(*str);
45eee: 49c0 extbl %d0
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45ef0: 528b addql #1,%a3
BSP_output_char(*str);
45ef2: 2f00 movel %d0,%sp@- 45ef4: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45efa: 4e90 jsr %a0@
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45efc: 588f addql #4,%sp 45efe: 1013 moveb %a3@,%d0 45f00: 528b addql #1,%a3
45f02: 6714 beqs 45f18 <vprintk+0x308>
BSP_output_char(*str);
45f04: 49c0 extbl %d0 45f06: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45f0c: 2f00 movel %d0,%sp@- 45f0e: 4e90 jsr %a0@
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45f10: 588f addql #4,%sp 45f12: 1013 moveb %a3@,%d0 45f14: 528b addql #1,%a3
45f16: 66ec bnes 45f04 <vprintk+0x2f4>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
45f18: 4a04 tstb %d4 45f1a: 6700 fd2e beqw 45c4a <vprintk+0x3a>
for ( i=len ; i<width ; i++ )
45f1e: b483 cmpl %d3,%d2 45f20: 6300 fd28 blsw 45c4a <vprintk+0x3a>
BSP_output_char(' ');
45f24: 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++ )
45f28: 5283 addql #1,%d3
BSP_output_char(' ');
45f2a: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45f30: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45f32: 588f addql #4,%sp 45f34: b483 cmpl %d3,%d2 45f36: 6300 fd12 blsw 45c4a <vprintk+0x3a>
BSP_output_char(' ');
45f3a: 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++ )
45f3e: 5283 addql #1,%d3
BSP_output_char(' ');
45f40: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 45f46: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45f48: 588f addql #4,%sp 45f4a: b483 cmpl %d3,%d2
45f4c: 62d6 bhis 45f24 <vprintk+0x314>
45f4e: 6000 fcfa braw 45c4a <vprintk+0x3a>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45f52: 4878 002d pea 2d <OPER2+0x19> <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
45f56: 4484 negl %d4 <== NOT EXECUTED
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45f58: 2079 0005 fc9c moveal 5fc9c <BSP_output_char>,%a0 <== NOT EXECUTED 45f5e: 4e90 jsr %a0@ <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45f60: 588f addql #4,%sp <== NOT EXECUTED 45f62: 4a82 tstl %d2 <== NOT EXECUTED 45f64: 6700 fe40 beqw 45da6 <vprintk+0x196> <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45f68: 2004 movel %d4,%d0 <== NOT EXECUTED
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45f6a: 5382 subql #1,%d2 <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45f6c: 4c45 0000 remul %d5,%d0,%d0 <== NOT EXECUTED 45f70: 6600 fe3e bnew 45db0 <vprintk+0x1a0> <== NOT EXECUTED
45f74: 4281 clrl %d1 45f76: 7601 moveq #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45f78: 1d84 18ec moveb %d4,%fp@(ffffffec,%d1:l)
for (n=maxwidth ; n > count; n-- )
45f7c: b682 cmpl %d2,%d3 45f7e: 6500 fe78 bcsw 45df8 <vprintk+0x1e8> 45f82: 6000 fe86 braw 45e0a <vprintk+0x1fa>
} else {
BSP_output_char(c);
continue;
}
printNum(
45f86: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45f88: 7a0a moveq #10,%d5
}
printNum(
45f8a: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45f8c: 4201 clrb %d1 45f8e: 6000 fe02 braw 45d92 <vprintk+0x182>
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
45f92: 47f9 0005 e954 lea 5e954 <rtems_filesystem_default_pathconf+0x40>,%a3
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45f98: 4a13 tstb %a3@ 45f9a: 6600 ff1c bnew 45eb8 <vprintk+0x2a8> 45f9e: 4283 clrl %d3 45fa0: 6000 ff20 braw 45ec2 <vprintk+0x2b2>
} else {
BSP_output_char(c);
continue;
}
printNum(
45fa4: 49c7 extbl %d7
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45fa6: 7a10 moveq #16,%d5
}
printNum(
45fa8: 2647 moveal %d7,%a3
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
continue;
45faa: 4201 clrb %d1 45fac: 6000 fde4 braw 45d92 <vprintk+0x182>
}
printNum(
45fb0: 49c7 extbl %d7 45fb2: 2647 moveal %d7,%a3 45fb4: 7a10 moveq #16,%d5 45fb6: 4201 clrb %d1 45fb8: 6000 fdd8 braw 45d92 <vprintk+0x182>
0005dabc <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5dabc: 4e56 fff4 linkw %fp,#-12 5dac0: 202e 0008 movel %fp@(8),%d0 5dac4: 222e 000c movel %fp@(12),%d1 5dac8: 206e 0010 moveal %fp@(16),%a0 5dacc: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5dad0: b0b9 0005 fba4 cmpl 5fba4 <rtems_libio_number_iops>,%d0
5dad6: 6466 bccs 5db3e <write+0x82> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5dad8: 2479 0006 12cc moveal 612cc <rtems_libio_iops>,%a2 5dade: ed88 lsll #6,%d0 5dae0: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5dae2: 202a 0014 movel %a2@(20),%d0 5dae6: 0800 0008 btst #8,%d0
5daea: 6752 beqs 5db3e <write+0x82> <== NEVER TAKEN
rtems_libio_check_buffer( buffer );
5daec: 4a81 tstl %d1
5daee: 6766 beqs 5db56 <write+0x9a> <== NEVER TAKEN
rtems_libio_check_count( count );
5daf0: 4a88 tstl %a0
5daf2: 673e beqs 5db32 <write+0x76> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5daf4: 44c0 movew %d0,%ccr
5daf6: 665e bnes 5db56 <write+0x9a> <== NEVER TAKEN
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
5daf8: 226a 003c moveal %a2@(60),%a1 5dafc: 2269 000c moveal %a1@(12),%a1 5db00: 4a89 tstl %a1
5db02: 676a beqs 5db6e <write+0xb2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOTSUP );
rc = (*iop->handlers->write_h)( iop, buffer, count );
5db04: 2f08 movel %a0,%sp@- 5db06: 2f01 movel %d1,%sp@- 5db08: 2f0a movel %a2,%sp@- 5db0a: 4e91 jsr %a1@
if ( rc > 0 )
5db0c: 4fef 000c lea %sp@(12),%sp 5db10: 4a80 tstl %d0
5db12: 6f14 bles 5db28 <write+0x6c> <== NEVER TAKEN
iop->offset += rc;
5db14: 2400 movel %d0,%d2 5db16: 5bc1 smi %d1 5db18: 49c1 extbl %d1 5db1a: d5aa 0010 addl %d2,%a2@(16) 5db1e: 262a 000c movel %a2@(12),%d3 5db22: d781 addxl %d1,%d3 5db24: 2543 000c movel %d3,%a2@(12)
return rc;
}
5db28: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5db2e: 4e5e unlk %fp 5db30: 4e75 rts
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 );
5db32: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db34: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5db3a: 4e5e unlk %fp 5db3c: 4e75 rts
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
5db3e: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5db44: 7409 moveq #9,%d2 <== NOT EXECUTED 5db46: 2040 moveal %d0,%a0 <== NOT EXECUTED 5db48: 70ff moveq #-1,%d0 <== NOT EXECUTED 5db4a: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db4c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5db52: 4e5e unlk %fp <== NOT EXECUTED 5db54: 4e75 rts <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5db56: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5db5c: 7216 moveq #22,%d1 <== NOT EXECUTED 5db5e: 2040 moveal %d0,%a0 <== NOT EXECUTED 5db60: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db62: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5db68: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db6a: 4e5e unlk %fp <== NOT EXECUTED 5db6c: 4e75 rts <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5db6e: 4eb9 0005 05b8 jsr 505b8 <__errno> <== NOT EXECUTED 5db74: 2040 moveal %d0,%a0 <== NOT EXECUTED 5db76: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db78: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
5db7e: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5db84: 4e5e unlk %fp <== NOT EXECUTED
00046f94 <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
46f94: 4e56 ffe4 linkw %fp,#-28 46f98: 202e 0008 movel %fp@(8),%d0 46f9c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 46fa0: 246e 000c moveal %fp@(12),%a2 46fa4: 242e 0010 movel %fp@(16),%d2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
46fa8: b0b9 0006 16c4 cmpl 616c4 <rtems_libio_number_iops>,%d0 46fae: 6400 00f0 bccw 470a0 <writev+0x10c>
iop = rtems_libio_iop( fd );
46fb2: 2679 0006 35bc moveal 635bc <rtems_libio_iops>,%a3 46fb8: ed88 lsll #6,%d0 46fba: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
46fbc: 202b 0014 movel %a3@(20),%d0 46fc0: 0800 0008 btst #8,%d0 46fc4: 6700 00da beqw 470a0 <writev+0x10c>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
46fc8: 44c0 movew %d0,%ccr
46fca: 666e bnes 4703a <writev+0xa6> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
46fcc: 4a8a tstl %a2
46fce: 676a beqs 4703a <writev+0xa6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
46fd0: 4a82 tstl %d2
46fd2: 6f66 bles 4703a <writev+0xa6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
46fd4: 0c82 0000 0400 cmpil #1024,%d2
46fda: 6e5e bgts 4703a <writev+0xa6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
46fdc: 206b 003c moveal %a3@(60),%a0 46fe0: 4aa8 000c tstl %a0@(12) 46fe4: 6700 00d4 beqw 470ba <writev+0x126>
rtems_set_errno_and_return_minus_one( ENOTSUP );
46fe8: 204a moveal %a2,%a0 46fea: 93c9 subal %a1,%a1 46fec: 4281 clrl %d1 46fee: 7601 moveq #1,%d3
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
46ff0: 4a90 tstl %a0@
46ff2: 6746 beqs 4703a <writev+0xa6> <== NEVER TAKEN
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 )
46ff4: 2028 0004 movel %a0@(4),%d0 46ff8: 57c4 seq %d4
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
46ffa: d081 addl %d1,%d0
* 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++ ) {
46ffc: 5289 addql #1,%a1 46ffe: 5088 addql #8,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
47000: c883 andl %d3,%d4 47002: 1604 moveb %d4,%d3
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
47004: b081 cmpl %d1,%d0
47006: 6d32 blts 4703a <writev+0xa6>
* 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++ ) {
47008: 2200 movel %d0,%d1
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
4700a: 0c80 0000 7fff cmpil #32767,%d0
47010: 6e28 bgts 4703a <writev+0xa6> <== NEVER TAKEN
* 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++ ) {
47012: b3c2 cmpal %d2,%a1
47014: 6dda blts 46ff0 <writev+0x5c> <== NEVER TAKEN
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
47016: 4a04 tstb %d4
47018: 663a bnes 47054 <writev+0xc0> <== NEVER TAKEN
4701a: 588a addql #4,%a2 4701c: 4283 clrl %d3 4701e: 4284 clrl %d4
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
47020: 2012 movel %a2@,%d0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47022: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
47024: 4a80 tstl %d0
47026: 663a bnes 47062 <writev+0xce> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47028: 508a addql #8,%a2 <== NOT EXECUTED 4702a: b682 cmpl %d2,%d3 <== NOT EXECUTED 4702c: 6df2 blts 47020 <writev+0x8c> <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4702e: 2004 movel %d4,%d0 47030: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47036: 4e5e unlk %fp 47038: 4e75 rts
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
4703a: 4eb9 0005 1414 jsr 51414 <__errno> 47040: 78ff moveq #-1,%d4 47042: 2040 moveal %d0,%a0 47044: 7016 moveq #22,%d0 47046: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47048: 2004 movel %d4,%d0 4704a: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47050: 4e5e unlk %fp 47052: 4e75 rts
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
47054: 4284 clrl %d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47056: 2004 movel %d4,%d0 <== NOT EXECUTED 47058: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4705e: 4e5e unlk %fp <== NOT EXECUTED 47060: 4e75 rts <== NOT EXECUTED
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
47062: 206b 003c moveal %a3@(60),%a0 47066: 2f00 movel %d0,%sp@- 47068: 2f2a fffc movel %a2@(-4),%sp@- 4706c: 2f0b movel %a3,%sp@- 4706e: 2068 000c moveal %a0@(12),%a0 47072: 4e90 jsr %a0@
if ( bytes < 0 )
47074: 4fef 000c lea %sp@(12),%sp 47078: 4a80 tstl %d0
4707a: 6d5a blts 470d6 <writev+0x142> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
4707c: 6716 beqs 47094 <writev+0x100> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
4707e: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
47080: 2c00 movel %d0,%d6 47082: 5bc5 smi %d5 47084: 49c5 extbl %d5 47086: ddab 0010 addl %d6,%a3@(16) 4708a: 222b 000c movel %a3@(12),%d1 4708e: d385 addxl %d5,%d1 47090: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
47094: b092 cmpl %a2@,%d0
47096: 6696 bnes 4702e <writev+0x9a> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47098: 508a addql #8,%a2 4709a: b682 cmpl %d2,%d3
4709c: 6d82 blts 47020 <writev+0x8c>
4709e: 608e bras 4702e <writev+0x9a>
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
470a0: 4eb9 0005 1414 jsr 51414 <__errno> 470a6: 78ff moveq #-1,%d4 470a8: 7209 moveq #9,%d1 470aa: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
470ac: 2004 movel %d4,%d0 470ae: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
470b4: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
470b6: 4e5e unlk %fp 470b8: 4e75 rts
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
470ba: 4eb9 0005 1414 jsr 51414 <__errno> <== NOT EXECUTED 470c0: 78ff moveq #-1,%d4 <== NOT EXECUTED 470c2: 2040 moveal %d0,%a0 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
470c4: 2004 movel %d4,%d0 <== NOT EXECUTED 470c6: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED
if ( iovcnt > IOV_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
470cc: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
470d2: 4e5e unlk %fp <== NOT EXECUTED 470d4: 4e75 rts <== NOT EXECUTED
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
470d6: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
470d8: 2004 movel %d4,%d0 <== NOT EXECUTED 470da: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 470e0: 4e5e unlk %fp <== NOT EXECUTED