0004a31c <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 ) {
4a31c: 7007 moveq #7,%d0
#define MAXSYMLINK 5
int IMFS_Set_handlers(
rtems_filesystem_location_info_t *loc
)
{
4a31e: 4e56 0000 linkw %fp,#0 4a322: 206e 0008 moveal %fp@(8),%a0 4a326: 2f0a movel %a2,%sp@-
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a328: 2468 0010 moveal %a0@(16),%a2
switch( node->type ) {
4a32c: 2250 moveal %a0@,%a1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
4a32e: 246a 0034 moveal %a2@(52),%a2
switch( node->type ) {
4a332: b0a9 0048 cmpl %a1@(72),%d0
4a336: 6526 bcss 4a35e <IMFS_Set_handlers+0x42> <== NEVER TAKEN
4a338: 2029 0048 movel %a1@(72),%d0 4a33c: d080 addl %d0,%d0 4a33e: 303b 0808 movew %pc@(4a348 <IMFS_Set_handlers+0x2c>,%d0:l),%d0 4a342: 48c0 extl %d0 4a344: 4efb 0802 jmp %pc@(4a348 <IMFS_Set_handlers+0x2c>,%d0:l)
4a348: 0016 026 <== NOT EXECUTED 4a34a: 0010 020 <== NOT EXECUTED 4a34c: 004c 0114 <== NOT EXECUTED 4a34e: 002c 054 <== NOT EXECUTED 4a350: 002c 054 <== NOT EXECUTED 4a352: 001e 036 <== NOT EXECUTED 4a354: 001e 036 <== NOT EXECUTED 4a356: 003e 076 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
4a358: 216a 000c 0008 movel %a2@(12),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a35e: 245f moveal %sp@+,%a2 4a360: 4280 clrl %d0 4a362: 4e5e unlk %fp 4a364: 4e75 rts 4a366: 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;
4a368: 216a 0008 0008 movel %a2@(8),%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a36e: 245f moveal %sp@+,%a2 4a370: 4e5e unlk %fp 4a372: 4e75 rts 4a374: 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;
4a376: 203c 0005 d626 movel #382502,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a37c: 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;
4a37e: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a382: 4280 clrl %d0 4a384: 4e75 rts 4a386: 4280 clrl %d0
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_FIFO:
loc->handlers = fs_info->fifo_handlers;
4a388: 216a 0010 0008 movel %a2@(16),%a0@(8)
break;
}
return 0;
}
4a38e: 245f moveal %sp@+,%a2 4a390: 4e5e unlk %fp 4a392: 4e75 rts 4a394: 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;
4a396: 203c 0005 d5b6 movel #382390,%d0
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a39c: 4e5e unlk %fp
switch( node->type ) {
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
4a39e: 2140 0008 movel %d0,%a0@(8)
loc->handlers = fs_info->fifo_handlers;
break;
}
return 0;
}
4a3a2: 4280 clrl %d0 <== NOT EXECUTED
0004ad50 <IMFS_check_node_remove>:
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
4ad50: 4e56 0000 linkw %fp,#0 4ad54: 2f0a movel %a2,%sp@- 4ad56: 246e 0008 moveal %fp@(8),%a2
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
4ad5a: 2f0a movel %a2,%sp@- 4ad5c: 4eb9 0004 b3e6 jsr 4b3e6 <rtems_libio_is_file_open> 4ad62: 588f addql #4,%sp 4ad64: 4a80 tstl %d0
4ad66: 6634 bnes 4ad9c <IMFS_check_node_remove+0x4c>
4ad68: 4a6a 0032 tstw %a2@(50)
4ad6c: 662e bnes 4ad9c <IMFS_check_node_remove+0x4c>
if ( rtems_filesystem_current.node_access == jnode )
4ad6e: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0 4ad74: b5e8 0004 cmpal %a0@(4),%a2
4ad78: 6744 beqs 4adbe <IMFS_check_node_remove+0x6e>
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
4ad7a: 202a 0048 movel %a2@(72),%d0 4ad7e: 7204 moveq #4,%d1 4ad80: b280 cmpl %d0,%d1
4ad82: 6748 beqs 4adcc <IMFS_check_node_remove+0x7c>
4ad84: 123c 0005 moveb #5,%d1 4ad88: b280 cmpl %d0,%d1
4ad8a: 6718 beqs 4ada4 <IMFS_check_node_remove+0x54>
break;
default:
break;
}
free( jnode );
4ad8c: 2d4a 0008 movel %a2,%fp@(8)
} }
4ad90: 246e fffc moveal %fp@(-4),%a2 4ad94: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4ad96: 4ef9 0004 2db8 jmp 42db8 <free>
} }
4ad9c: 246e fffc moveal %fp@(-4),%a2 4ada0: 4e5e unlk %fp 4ada2: 4e75 rts
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
4ada4: 2f0a movel %a2,%sp@- 4ada6: 4eb9 0004 d420 jsr 4d420 <IMFS_memfile_remove>
break;
4adac: 588f addql #4,%sp
break;
default:
break;
}
free( jnode );
4adae: 2d4a 0008 movel %a2,%fp@(8)
} }
4adb2: 246e fffc moveal %fp@(-4),%a2 4adb6: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4adb8: 4ef9 0004 2db8 jmp 42db8 <free>
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
switch ( jnode->type ) {
4adbe: 202a 0048 movel %a2@(72),%d0 4adc2: 7204 moveq #4,%d1
void IMFS_check_node_remove( IMFS_jnode_t *jnode )
{
if ( !rtems_libio_is_file_open( jnode ) && jnode->st_nlink < 1 ) {
if ( rtems_filesystem_current.node_access == jnode )
rtems_filesystem_current.node_access = NULL;
4adc4: 42a8 0004 clrl %a0@(4)
switch ( jnode->type ) {
4adc8: b280 cmpl %d0,%d1
4adca: 66b8 bnes 4ad84 <IMFS_check_node_remove+0x34> <== ALWAYS TAKEN
case IMFS_MEMORY_FILE:
IMFS_memfile_remove( jnode );
break;
case IMFS_SYM_LINK:
free( jnode->info.sym_link.name );
4adcc: 2f2a 004c movel %a2@(76),%sp@- 4add0: 4eb9 0004 2db8 jsr 42db8 <free>
break;
4add6: 588f addql #4,%sp
default:
break;
}
free( jnode );
4add8: 2d4a 0008 movel %a2,%fp@(8)
} }
4addc: 246e fffc moveal %fp@(-4),%a2 4ade0: 4e5e unlk %fp
break;
default:
break;
}
free( jnode );
4ade2: 4ef9 0004 2db8 jmp 42db8 <free>
0004a03c <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a03c: 4e56 ffe8 linkw %fp,#-24 4a040: 206e 0008 moveal %fp@(8),%a0 4a044: 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;
4a048: 2450 moveal %a0@,%a2
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a04a: 4284 clrl %d4
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
4a04c: 362e 000e movew %fp@(14),%d3 4a050: 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();
4a054: 4eb9 0004 b174 jsr 4b174 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4a05a: 4281 clrl %d1 4a05c: 382a 0038 movew %a2@(56),%d4 4a060: 3200 movew %d0,%d1 4a062: b284 cmpl %d4,%d1
4a064: 6704 beqs 4a06a <IMFS_chown+0x2e> <== ALWAYS TAKEN
4a066: 4a40 tstw %d0 <== NOT EXECUTED 4a068: 6628 bnes 4a092 <IMFS_chown+0x56> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EPERM );
#endif
jnode->st_uid = owner;
4a06a: 3543 0038 movew %d3,%a2@(56)
jnode->st_gid = group;
4a06e: 3542 003a movew %d2,%a2@(58)
IMFS_update_ctime( jnode );
4a072: 42a7 clrl %sp@- 4a074: 486e fff8 pea %fp@(-8) 4a078: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4a07e: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4a084: 508f addql #8,%sp 4a086: 4280 clrl %d0
}
4a088: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4a08e: 4e5e unlk %fp 4a090: 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 );
4a092: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4a098: 7201 moveq #1,%d1 <== NOT EXECUTED 4a09a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a09c: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4a09e: 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 );
4a0a4: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode->st_gid = group;
IMFS_update_ctime( jnode );
return 0;
}
4a0a6: 4e5e unlk %fp <== NOT EXECUTED
...
0004a12a <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
4a12a: 4e56 ffec linkw %fp,#-20 4a12e: 206e 0008 moveal %fp@(8),%a0 4a132: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a136: 242e 000c movel %fp@(12),%d2 4a13a: 286e 0018 moveal %fp@(24),%a4
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
4a13e: 4a88 tstl %a0
4a140: 6776 beqs 4a1b8 <IMFS_create_node+0x8e> <== NEVER TAKEN
return NULL;
parent = parent_loc->node_access;
fs_info = parent_loc->mt_entry->fs_info;
4a142: 2268 0010 moveal %a0@(16),%a1
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a146: 7007 moveq #7,%d0
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
return NULL;
parent = parent_loc->node_access;
4a148: 2650 moveal %a0@,%a3
fs_info = parent_loc->mt_entry->fs_info;
4a14a: 2469 0034 moveal %a1@(52),%a2
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a14e: b082 cmpl %d2,%d0
4a150: 675a beqs 4a1ac <IMFS_create_node+0x82>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4a152: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0 4a158: 2028 002c movel %a0@(44),%d0 4a15c: 4680 notl %d0 4a15e: c0ae 0014 andl %fp@(20),%d0 4a162: 2f00 movel %d0,%sp@- 4a164: 2f2e 0010 movel %fp@(16),%sp@- 4a168: 2f02 movel %d2,%sp@- 4a16a: 4eb9 0004 a0ac jsr 4a0ac <IMFS_allocate_node>
if ( !node )
4a170: 4fef 000c lea %sp@(12),%sp
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
4a174: 2a40 moveal %d0,%a5
if ( !node )
4a176: 4a80 tstl %d0
4a178: 6726 beqs 4a1a0 <IMFS_create_node+0x76>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4a17a: 7007 moveq #7,%d0 4a17c: b082 cmpl %d2,%d0
4a17e: 6446 bccs 4a1c6 <IMFS_create_node+0x9c> <== ALWAYS TAKEN
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a180: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED 4a184: 5280 addql #1,%d0 <== NOT EXECUTED
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a186: 2b4b 0008 movel %a3,%a5@(8) <== NOT EXECUTED
node->st_ino = ++fs_info->ino_count;
4a18a: 2540 0004 movel %d0,%a2@(4) <== NOT EXECUTED 4a18e: 2b40 0034 movel %d0,%a5@(52) <== NOT EXECUTED 4a192: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4a194: 486b 004c pea %a3@(76) <== NOT EXECUTED 4a198: 4eb9 0004 7098 jsr 47098 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a19e: 508f addql #8,%sp <== NOT EXECUTED
}
4a1a0: 200d movel %a5,%d0 4a1a2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a1a8: 4e5e unlk %fp 4a1aa: 4e75 rts
fs_info = parent_loc->mt_entry->fs_info;
/*
* Reject creation of FIFOs if support is disabled.
*/
if ( type == IMFS_FIFO &&
4a1ac: 223c 0005 d546 movel #382278,%d1 4a1b2: b2aa 0010 cmpl %a2@(16),%d1
4a1b6: 669a bnes 4a152 <IMFS_create_node+0x28>
fs_info->fifo_handlers == &rtems_filesystem_handlers_default )
return NULL;
4a1b8: 9bcd subal %a5,%a5
node->st_ino = ++fs_info->ino_count;
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
4a1ba: 200d movel %a5,%d0 4a1bc: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a1c2: 4e5e unlk %fp 4a1c4: 4e75 rts
return NULL;
/*
* Set the type specific information
*/
switch (type) {
4a1c6: 303b 2a08 movew %pc@(4a1d0 <IMFS_create_node+0xa6>,%d2:l:2),%d0 4a1ca: 48c0 extl %d0 4a1cc: 4efb 0802 jmp %pc@(4a1d0 <IMFS_create_node+0xa6>,%d0:l)
4a1d0: ffb0 0177660 <== NOT EXECUTED 4a1d2: 00d8 0330 <== NOT EXECUTED 4a1d4: 00aa 0010 0010 oril #1048592,%d2 <== NOT EXECUTED 4a1da: 0046 0106 <== NOT EXECUTED 4a1dc: 0036 066 <== NOT EXECUTED 4a1de: 0082 2b54 004c oril #726925388,%d2 <== NOT EXECUTED
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a1e4: 202a 0004 movel %a2@(4),%d0 4a1e8: 5280 addql #1,%d0
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a1ea: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a1ee: 2540 0004 movel %d0,%a2@(4) 4a1f2: 2b40 0034 movel %d0,%a5@(52) 4a1f6: 2f0d movel %a5,%sp@- 4a1f8: 486b 004c pea %a3@(76) 4a1fc: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a202: 508f addql #8,%sp 4a204: 609a bras 4a1a0 <IMFS_create_node+0x76>
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
4a206: 42ad 0054 clrl %a5@(84)
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
4a20a: 4280 clrl %d0 4a20c: 4281 clrl %d1 4a20e: 2b40 004c movel %d0,%a5@(76) 4a212: 2b41 0050 movel %d1,%a5@(80)
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
4a216: 42ad 0054 clrl %a5@(84)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4a21a: 4280 clrl %d0 4a21c: 4281 clrl %d1
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
4a21e: 42ad 0058 clrl %a5@(88)
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
node->info.linearfile.direct = 0;
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
4a222: 2b40 004c movel %d0,%a5@(76) 4a226: 2b41 0050 movel %d1,%a5@(80)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a22a: 202a 0004 movel %a2@(4),%d0 4a22e: 5280 addql #1,%d0
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;
4a230: 42ad 005c clrl %a5@(92)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a234: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a238: 2540 0004 movel %d0,%a2@(4) 4a23c: 2b40 0034 movel %d0,%a5@(52) 4a240: 2f0d movel %a5,%sp@- 4a242: 486b 004c pea %a3@(76) 4a246: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a24c: 508f addql #8,%sp 4a24e: 6000 ff50 braw 4a1a0 <IMFS_create_node+0x76>
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a252: 202a 0004 movel %a2@(4),%d0 4a256: 5280 addql #1,%d0
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
break;
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
4a258: 42ad 004c clrl %a5@(76)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a25c: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a260: 2540 0004 movel %d0,%a2@(4) 4a264: 2b40 0034 movel %d0,%a5@(52) 4a268: 2f0d movel %a5,%sp@- 4a26a: 486b 004c pea %a3@(76) 4a26e: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a274: 508f addql #8,%sp 4a276: 6000 ff28 braw 4a1a0 <IMFS_create_node+0x76>
case IMFS_SYM_LINK:
node->info.sym_link.name = info->sym_link.name;
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
4a27a: 2b54 004c movel %a4@,%a5@(76)
node->info.device.minor = info->device.minor;
4a27e: 2b6c 0004 0050 movel %a4@(4),%a5@(80)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a284: 202a 0004 movel %a2@(4),%d0 4a288: 5280 addql #1,%d0
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a28a: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a28e: 2540 0004 movel %d0,%a2@(4) 4a292: 2b40 0034 movel %d0,%a5@(52) 4a296: 2f0d movel %a5,%sp@- 4a298: 486b 004c pea %a3@(76) 4a29c: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a2a2: 508f addql #8,%sp 4a2a4: 6000 fefa braw 4a1a0 <IMFS_create_node+0x76>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4a2a8: 41ed 0050 lea %a5@(80),%a0 4a2ac: 2b48 004c movel %a0,%a5@(76)
/*
* Set the type specific information
*/
switch (type) {
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
4a2b0: 41ed 004c lea %a5@(76),%a0
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
4a2b4: 202a 0004 movel %a2@(4),%d0 4a2b8: 5280 addql #1,%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4a2ba: 42ad 0050 clrl %a5@(80)
/*
* Set the type specific information
*/
switch (type) {
case IMFS_DIRECTORY:
rtems_chain_initialize_empty(&node->info.directory.Entries);
4a2be: 2b48 0054 movel %a0,%a5@(84)
/*
* This node MUST have a parent, so put it in that directory list.
*/
node->Parent = parent;
4a2c2: 2b4b 0008 movel %a3,%a5@(8)
node->st_ino = ++fs_info->ino_count;
4a2c6: 2540 0004 movel %d0,%a2@(4) 4a2ca: 2b40 0034 movel %d0,%a5@(52) 4a2ce: 2f0d movel %a5,%sp@- 4a2d0: 486b 004c pea %a3@(76) 4a2d4: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
4a2da: 508f addql #8,%sp 4a2dc: 6000 fec2 braw 4a1a0 <IMFS_create_node+0x76>
0004a2e0 <IMFS_create_root_node>:
return node;
}
IMFS_jnode_t *IMFS_create_root_node(void)
{
4a2e0: 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) );
4a2e4: 4878 41ed pea 41ed <D_MAX_EXP+0x39ee> 4a2e8: 4879 0005 d3a4 pea 5d3a4 <rtems_filesystem_default_pathconf+0x40> 4a2ee: 4878 0001 pea 1 <ADD> 4a2f2: 4eb9 0004 a0ac jsr 4a0ac <IMFS_allocate_node>
if ( !node )
4a2f8: 4fef 000c lea %sp@(12),%sp 4a2fc: 4a80 tstl %d0
4a2fe: 6716 beqs 4a316 <IMFS_create_root_node+0x36> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4a300: 2240 moveal %d0,%a1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4a302: 2040 moveal %d0,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4a304: 43e9 0050 lea %a1@(80),%a1 4a308: 2149 004c movel %a1,%a0@(76)
/* * Set the type specific information * * NOTE: Root node is always a directory. */ rtems_chain_initialize_empty(&node->info.directory.Entries);
4a30c: 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;
4a30e: 42a8 0050 clrl %a0@(80) 4a312: 2149 0054 movel %a1,%a0@(84)
return node;
}
4a316: 4e5e unlk %fp
...
00044290 <IMFS_dump_directory>:
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
44290: 4e56 ffe0 linkw %fp,#-32 44294: 206e 0008 moveal %fp@(8),%a0 44298: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4429c: 2808 movel %a0,%d4 4429e: 0684 0000 0050 addil #80,%d4 442a4: 262e 000c movel %fp@(12),%d3
assert( the_directory->type == IMFS_DIRECTORY );
#endif
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
442a8: 2668 004c moveal %a0@(76),%a3 442ac: b88b cmpl %a3,%d4
442ae: 6754 beqs 44304 <IMFS_dump_directory+0x74> <== NEVER TAKEN
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 );
442b0: 2a03 movel %d3,%d5 442b2: 49f9 0004 4104 lea 44104 <IMFS_print_jnode>,%a4 442b8: 45f9 0005 3170 lea 53170 <fwrite>,%a2 442be: 5285 addql #1,%d5 442c0: 4bf9 0004 4290 lea 44290 <IMFS_dump_directory>,%a5
!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++ )
442c6: 4a83 tstl %d3
442c8: 6d26 blts 442f0 <IMFS_dump_directory+0x60> <== NEVER TAKEN
442ca: 4282 clrl %d2
fprintf(stdout, "...." );
442cc: 2079 0006 3694 moveal 63694 <_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++ )
442d2: 5282 addql #1,%d2
fprintf(stdout, "...." );
442d4: 2f28 0008 movel %a0@(8),%sp@- 442d8: 4878 0004 pea 4 <CONTEXT_ARG> 442dc: 4878 0001 pea 1 <ADD> 442e0: 4879 0006 1ed5 pea 61ed5 <IntUartPollCallbacks.6236+0x83> 442e6: 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++ )
442e8: 4fef 0010 lea %sp@(16),%sp 442ec: b483 cmpl %d3,%d2
442ee: 6fdc bles 442cc <IMFS_dump_directory+0x3c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
442f0: 2f0b movel %a3,%sp@- 442f2: 4e94 jsr %a4@
if ( the_jnode->type == IMFS_DIRECTORY )
442f4: 588f addql #4,%sp 442f6: 7001 moveq #1,%d0 442f8: b0ab 0048 cmpl %a3@(72),%d0
442fc: 6710 beqs 4430e <IMFS_dump_directory+0x7e>
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 ) {
442fe: 2653 moveal %a3@,%a3
assert( the_directory->type == IMFS_DIRECTORY );
#endif
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
44300: b88b cmpl %a3,%d4
44302: 66c2 bnes 442c6 <IMFS_dump_directory+0x36>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
44304: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4430a: 4e5e unlk %fp 4430c: 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 );
4430e: 2f05 movel %d5,%sp@- 44310: 2f0b movel %a3,%sp@- 44312: 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 ) {
44314: 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 );
44316: 508f addql #8,%sp
assert( the_directory->type == IMFS_DIRECTORY );
#endif
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
44318: b88b cmpl %a3,%d4
4431a: 66aa bnes 442c6 <IMFS_dump_directory+0x36> <== NEVER TAKEN
4431c: 60e6 bras 44304 <IMFS_dump_directory+0x74>
0004a492 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a492: 4e56 ffb0 linkw %fp,#-80 4a496: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a49a: 286e 0014 moveal %fp@(20),%a4 4a49e: 2c0e movel %fp,%d6 4a4a0: 280e movel %fp,%d4
int i = 0;
4a4a2: 4282 clrl %d2 4a4a4: 5986 subql #4,%d6 4a4a6: 0684 ffff ffdb addil #-37,%d4 4a4ac: 2a3c 0004 ac2c movel #306220,%d5
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a4b2: 2e3c 0004 aba0 movel #306080,%d7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4a4b8: 2a6e 0008 moveal %fp@(8),%a5 4a4bc: 246e 000c moveal %fp@(12),%a2
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4a4c0: 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 );
4a4c2: 2f06 movel %d6,%sp@- 4a4c4: 2045 moveal %d5,%a0 4a4c6: 2f04 movel %d4,%sp@- 4a4c8: 2f0a movel %a2,%sp@- 4a4ca: 4875 2800 pea %a5@(00000000,%d2:l) 4a4ce: 4e90 jsr %a0@
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4a4d0: 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 );
4a4d2: 2600 movel %d0,%d3
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
4a4d4: 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;
4a4d8: 202e fffc movel %fp@(-4),%d0
i += len;
if ( !pathloc->node_access )
4a4dc: 4a88 tstl %a0 4a4de: 6700 00f8 beqw 4a5d8 <IMFS_eval_path+0x146>
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
4a4e2: 95c0 subal %d0,%a2
i += len;
4a4e4: d480 addl %d0,%d2
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4a4e6: 4a83 tstl %d3
4a4e8: 6662 bnes 4a54c <IMFS_eval_path+0xba>
* 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 ) {
4a4ea: 7201 moveq #1,%d1 4a4ec: b2a8 0048 cmpl %a0@(72),%d1 4a4f0: 6600 0132 bnew 4a624 <IMFS_eval_path+0x192>
if ( node->info.directory.mt_fs != NULL ) {
4a4f4: 2068 0058 moveal %a0@(88),%a0 4a4f8: 4a88 tstl %a0 4a4fa: 6700 0128 beqw 4a624 <IMFS_eval_path+0x192> 4a4fe: 28a8 001c movel %a0@(28),%a4@ 4a502: 2268 0028 moveal %a0@(40),%a1 4a506: 2628 0020 movel %a0@(32),%d3 4a50a: 2228 0024 movel %a0@(36),%d1 4a50e: 2028 002c movel %a0@(44),%d0
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4a512: 2f0c movel %a4,%sp@- 4a514: 2f2e 0010 movel %fp@(16),%sp@- 4a518: 206e fffc moveal %fp@(-4),%a0 4a51c: 4872 8800 pea %a2@(00000000,%a0:l) 4a520: 9488 subl %a0,%d2 4a522: 4875 2800 pea %a5@(00000000,%d2:l) 4a526: 2051 moveal %a1@,%a0
*
* 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 ) {
4a528: 2943 0004 movel %d3,%a4@(4) 4a52c: 2941 0008 movel %d1,%a4@(8) 4a530: 2949 000c movel %a1,%a4@(12) 4a534: 2940 0010 movel %d0,%a4@(16)
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
4a538: 4e90 jsr %a0@ 4a53a: 4fef 0010 lea %sp@(16),%sp 4a53e: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a540: 2003 movel %d3,%d0 4a542: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a548: 4e5e unlk %fp 4a54a: 4e75 rts
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
if ( node->type == IMFS_DIRECTORY )
4a54c: 7001 moveq #1,%d0 4a54e: b0ab 0048 cmpl %a3@(72),%d0 4a552: 6700 00b8 beqw 4a60c <IMFS_eval_path+0x17a>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
4a556: 2648 moveal %a0,%a3
switch( type ) {
4a558: 7003 moveq #3,%d0 4a55a: b083 cmpl %d3,%d0
4a55c: 671c beqs 4a57a <IMFS_eval_path+0xe8>
4a55e: 7204 moveq #4,%d1 4a560: b283 cmpl %d3,%d1 4a562: 6700 008e beqw 4a5f2 <IMFS_eval_path+0x160> 4a566: 103c 0002 moveb #2,%d0 4a56a: b083 cmpl %d3,%d0
4a56c: 6748 beqs 4a5b6 <IMFS_eval_path+0x124>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
4a56e: 7004 moveq #4,%d0 4a570: b083 cmpl %d3,%d0 4a572: 6600 ff4e bnew 4a4c2 <IMFS_eval_path+0x30>
4a576: 6000 ff72 braw 4a4ea <IMFS_eval_path+0x58> <== NOT EXECUTED
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
4a57a: 2028 0048 movel %a0@(72),%d0 4a57e: 7203 moveq #3,%d1 4a580: b280 cmpl %d0,%d1 4a582: 6700 00d8 beqw 4a65c <IMFS_eval_path+0x1ca>
node = pathloc->node_access;
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
4a586: 7204 moveq #4,%d1 4a588: b280 cmpl %d0,%d1 4a58a: 6700 0138 beqw 4a6c4 <IMFS_eval_path+0x232>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4a58e: 7201 moveq #1,%d1 4a590: b280 cmpl %d0,%d1 4a592: 6600 0152 bnew 4a6e6 <IMFS_eval_path+0x254>
/*
* 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 ) {
4a596: 206b 0058 moveal %a3@(88),%a0 4a59a: 4a88 tstl %a0 4a59c: 6600 ff60 bnew 4a4fe <IMFS_eval_path+0x6c>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a5a0: 2f04 movel %d4,%sp@- 4a5a2: 2047 moveal %d7,%a0 4a5a4: 2f0b movel %a3,%sp@- 4a5a6: 4e90 jsr %a0@
if ( !node )
4a5a8: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a5aa: 2640 moveal %d0,%a3
if ( !node )
4a5ac: 4a80 tstl %d0
4a5ae: 6728 beqs 4a5d8 <IMFS_eval_path+0x146>
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
4a5b0: 288b movel %a3,%a4@ 4a5b2: 6000 ff0e braw 4a4c2 <IMFS_eval_path+0x30>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
4a5b6: 2279 0005 e390 moveal 5e390 <rtems_current_user_env>,%a1 4a5bc: b1e9 0018 cmpal %a1@(24),%a0 4a5c0: 6700 ff00 beqw 4a4c2 <IMFS_eval_path+0x30>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
4a5c4: 226c 0010 moveal %a4@(16),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a5c8: b1e9 001c cmpal %a1@(28),%a0 4a5cc: 6700 00a8 beqw 4a676 <IMFS_eval_path+0x1e4>
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
4a5d0: 2668 0008 moveal %a0@(8),%a3 4a5d4: 4a8b tstl %a3
4a5d6: 66d8 bnes 4a5b0 <IMFS_eval_path+0x11e>
* 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 );
4a5d8: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a5de: 76ff moveq #-1,%d3 4a5e0: 7a02 moveq #2,%d5 4a5e2: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a5e4: 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 );
4a5e6: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a5e8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a5ee: 4e5e unlk %fp 4a5f0: 4e75 rts
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
4a5f2: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a5f8: 76ff moveq #-1,%d3 4a5fa: 785b moveq #91,%d4 4a5fc: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a5fe: 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 );
4a600: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a602: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a608: 4e5e unlk %fp 4a60a: 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 ) )
4a60c: 4878 0001 pea 1 <ADD> 4a610: 2f0c movel %a4,%sp@- 4a612: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4a618: 508f addql #8,%sp 4a61a: 4a80 tstl %d0
4a61c: 6724 beqs 4a642 <IMFS_eval_path+0x1b0>
4a61e: 2054 moveal %a4@,%a0 4a620: 6000 ff34 braw 4a556 <IMFS_eval_path+0xc4>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4a624: 2f0c movel %a4,%sp@- 4a626: 4eb9 0004 a31c jsr 4a31c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4a62c: 2eae 0010 movel %fp@(16),%sp@
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
4a630: 2600 movel %d0,%d3
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
4a632: 2f0c movel %a4,%sp@- 4a634: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4a63a: 508f addql #8,%sp 4a63c: 4a80 tstl %d0 4a63e: 6600 ff00 bnew 4a540 <IMFS_eval_path+0xae>
rtems_set_errno_and_return_minus_one( EACCES );
4a642: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a648: 76ff moveq #-1,%d3 4a64a: 740d moveq #13,%d2 4a64c: 2040 moveal %d0,%a0
return result;
}
4a64e: 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 );
4a650: 2082 movel %d2,%a0@
return result;
}
4a652: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a658: 4e5e unlk %fp 4a65a: 4e75 rts
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
IMFS_evaluate_hard_link( pathloc, 0 );
4a65c: 42a7 clrl %sp@- 4a65e: 2f0c movel %a4,%sp@- 4a660: 4eb9 0004 a432 jsr 4a432 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
4a666: 2654 moveal %a4@,%a3
if ( !node )
4a668: 508f addql #8,%sp 4a66a: 4a8b tstl %a3
4a66c: 6778 beqs 4a6e6 <IMFS_eval_path+0x254> <== NEVER TAKEN
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
node = pathloc->node_access;
4a66e: 202b 0048 movel %a3@(72),%d0 4a672: 6000 ff1a braw 4a58e <IMFS_eval_path+0xfc>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a676: 28a9 0008 movel %a1@(8),%a4@ 4a67a: 2069 0014 moveal %a1@(20),%a0 4a67e: 2629 000c movel %a1@(12),%d3 4a682: 2229 0010 movel %a1@(16),%d1 4a686: 2029 0018 movel %a1@(24),%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;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4a68a: 2f0c movel %a4,%sp@- 4a68c: 2f2e 0010 movel %fp@(16),%sp@- 4a690: 226e fffc moveal %fp@(-4),%a1 4a694: 4872 9800 pea %a2@(00000000,%a1:l) 4a698: 9489 subl %a1,%d2 4a69a: 4875 2800 pea %a5@(00000000,%d2:l) 4a69e: 2250 moveal %a0@,%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
4a6a0: 2943 0004 movel %d3,%a4@(4) 4a6a4: 2941 0008 movel %d1,%a4@(8) 4a6a8: 2948 000c movel %a0,%a4@(12) 4a6ac: 2940 0010 movel %d0,%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;
*pathloc = newloc;
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
4a6b0: 4e91 jsr %a1@ 4a6b2: 4fef 0010 lea %sp@(16),%sp 4a6b6: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a6b8: 2003 movel %d3,%d0 4a6ba: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a6c0: 4e5e unlk %fp 4a6c2: 4e75 rts
if ( !node )
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_sym_link( pathloc, 0 );
4a6c4: 42a7 clrl %sp@- 4a6c6: 2f0c movel %a4,%sp@- 4a6c8: 4eb9 0004 a700 jsr 4a700 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
4a6ce: 2654 moveal %a4@,%a3
if ( result == -1 )
4a6d0: 508f addql #8,%sp 4a6d2: 72ff moveq #-1,%d1 4a6d4: b280 cmpl %d0,%d1
4a6d6: 6696 bnes 4a66e <IMFS_eval_path+0x1dc> <== ALWAYS TAKEN
4a6d8: 2600 movel %d0,%d3 <== NOT EXECUTED
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a6da: 2003 movel %d3,%d0 <== NOT EXECUTED 4a6dc: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4a6e2: 4e5e unlk %fp <== NOT EXECUTED 4a6e4: 4e75 rts <== NOT EXECUTED
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4a6e6: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a6ec: 76ff moveq #-1,%d3 4a6ee: 7c14 moveq #20,%d6 4a6f0: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a6f2: 2003 movel %d3,%d0
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
4a6f4: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a6f6: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5
4a6fc: 4e5e unlk %fp <== NOT EXECUTED
0004a868 <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 */
)
{
4a868: 4e56 ffb0 linkw %fp,#-80 4a86c: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4a870: 286e 0008 moveal %fp@(8),%a4 4a874: 2e0e movel %fp,%d7 4a876: 2c0e movel %fp,%d6
int i = 0;
4a878: 4284 clrl %d4 4a87a: 5987 subql #4,%d7 4a87c: 0686 ffff ffdb addil #-37,%d6 4a882: 4bf9 0004 ac2c lea 4ac2c <IMFS_get_token>,%a5
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4a888: 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 */
)
{
4a88a: 266e 000c moveal %fp@(12),%a3
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
4a88e: 4eb9 0004 fe4c jsr 4fe4c <strlen>
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
4a894: 2453 moveal %a3@,%a2
/*
* Get the path length.
*/
pathlen = strlen( path );
4a896: 588f addql #4,%sp 4a898: 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 );
4a89a: 2f07 movel %d7,%sp@- 4a89c: 2f06 movel %d6,%sp@- 4a89e: 2f02 movel %d2,%sp@- 4a8a0: 4874 4800 pea %a4@(00000000,%d4:l) 4a8a4: 4e95 jsr %a5@
pathlen -= len;
4a8a6: 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 );
4a8aa: 2600 movel %d0,%d3
pathlen -= len;
i += len;
if ( !pathloc->node_access )
4a8ac: 4fef 0010 lea %sp@(16),%sp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
4a8b0: 9485 subl %d5,%d2
i += len;
if ( !pathloc->node_access )
4a8b2: 2053 moveal %a3@,%a0 4a8b4: 4a88 tstl %a0 4a8b6: 6700 00ca beqw 4a982 <IMFS_evaluate_for_make+0x11a>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
4a8ba: 4a80 tstl %d0
4a8bc: 6742 beqs 4a900 <IMFS_evaluate_for_make+0x98>
if ( node->type == IMFS_DIRECTORY )
4a8be: 7001 moveq #1,%d0 4a8c0: b0aa 0048 cmpl %a2@(72),%d0 4a8c4: 6700 00d6 beqw 4a99c <IMFS_evaluate_for_make+0x134>
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
4a8c8: 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;
4a8ca: 2448 moveal %a0,%a2
switch( type ) {
4a8cc: 7002 moveq #2,%d0 4a8ce: b083 cmpl %d3,%d0 4a8d0: 6700 008e beqw 4a960 <IMFS_evaluate_for_make+0xf8>
4a8d4: 6426 bccs 4a8fc <IMFS_evaluate_for_make+0x94>
4a8d6: 7203 moveq #3,%d1 4a8d8: b283 cmpl %d3,%d1
4a8da: 673e beqs 4a91a <IMFS_evaluate_for_make+0xb2>
4a8dc: 7004 moveq #4,%d0 4a8de: b083 cmpl %d3,%d0
4a8e0: 66b8 bnes 4a89a <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 );
4a8e2: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a8e8: 7c5b moveq #91,%d6 4a8ea: 76ff moveq #-1,%d3 4a8ec: 2040 moveal %d0,%a0 4a8ee: 2086 movel %d6,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a8f0: 2003 movel %d3,%d0 4a8f2: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a8f8: 4e5e unlk %fp 4a8fa: 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 ) {
4a8fc: 4a83 tstl %d3
4a8fe: 669a bnes 4a89a <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 );
4a900: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a906: 76ff moveq #-1,%d3 4a908: 7e11 moveq #17,%d7 4a90a: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a90c: 2003 movel %d3,%d0
pathloc->node_access = node;
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
4a90e: 2087 movel %d7,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a910: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a916: 4e5e unlk %fp 4a918: 4e75 rts
pathloc->node_access = node;
break;
case IMFS_NAME:
if ( node->type == IMFS_HARD_LINK ) {
4a91a: 2028 0048 movel %a0@(72),%d0 4a91e: 7203 moveq #3,%d1 4a920: b280 cmpl %d0,%d1 4a922: 6700 014e beqw 4aa72 <IMFS_evaluate_for_make+0x20a>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
4a926: 7204 moveq #4,%d1 4a928: b280 cmpl %d0,%d1 4a92a: 6700 0146 beqw 4aa72 <IMFS_evaluate_for_make+0x20a>
if ( result == -1 )
return -1;
}
node = pathloc->node_access;
if ( !node )
4a92e: 4a8a tstl %a2 4a930: 6700 015c beqw 4aa8e <IMFS_evaluate_for_make+0x226>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
4a934: 7001 moveq #1,%d0 4a936: b0aa 0048 cmpl %a2@(72),%d0 4a93a: 6600 0152 bnew 4aa8e <IMFS_evaluate_for_make+0x226>
/*
* 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 ) {
4a93e: 206a 0058 moveal %a2@(88),%a0 4a942: 4a88 tstl %a0 4a944: 6600 0162 bnew 4aaa8 <IMFS_evaluate_for_make+0x240>
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a948: 2f06 movel %d6,%sp@- 4a94a: 2f0a movel %a2,%sp@- 4a94c: 4eb9 0004 aba0 jsr 4aba0 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4a952: 508f addql #8,%sp
/*
* Otherwise find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
4a954: 2440 moveal %d0,%a2
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
4a956: 4a80 tstl %d0
4a958: 675a beqs 4a9b4 <IMFS_evaluate_for_make+0x14c>
done = true;
else
pathloc->node_access = node;
4a95a: 268a movel %a2,%a3@ 4a95c: 6000 ff3c braw 4a89a <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 )
4a960: 2279 0005 e390 moveal 5e390 <rtems_current_user_env>,%a1 4a966: b1e9 0018 cmpal %a1@(24),%a0 4a96a: 6700 ff2e beqw 4a89a <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){
4a96e: 226b 0010 moveal %a3@(16),%a1 4a972: b1e9 001c cmpal %a1@(28),%a0 4a976: 6700 00b0 beqw 4aa28 <IMFS_evaluate_for_make+0x1c0>
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
}
} else {
if ( !node->Parent )
4a97a: 2468 0008 moveal %a0@(8),%a2 4a97e: 4a8a tstl %a2
4a980: 66d8 bnes 4a95a <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 );
4a982: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a988: 76ff moveq #-1,%d3 4a98a: 7a02 moveq #2,%d5 4a98c: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a98e: 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 );
4a990: 2085 movel %d5,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a992: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4a998: 4e5e unlk %fp 4a99a: 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 ) )
4a99c: 4878 0001 pea 1 <ADD> 4a9a0: 2f0b movel %a3,%sp@- 4a9a2: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4a9a8: 508f addql #8,%sp 4a9aa: 4a80 tstl %d0
4a9ac: 6760 beqs 4aa0e <IMFS_evaluate_for_make+0x1a6>
4a9ae: 2053 moveal %a3@,%a0 4a9b0: 6000 ff16 braw 4a8c8 <IMFS_evaluate_for_make+0x60>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
4a9b4: 2004 movel %d4,%d0 4a9b6: 90ae fffc subl %fp@(-4),%d0 4a9ba: d08c addl %a4,%d0 4a9bc: 206e 0010 moveal %fp@(16),%a0 4a9c0: 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++) {
4a9c2: 1034 4800 moveb %a4@(00000000,%d4:l),%d0
4a9c6: 671a beqs 4a9e2 <IMFS_evaluate_for_make+0x17a>
4a9c8: 4bf9 0004 3cdc lea 43cdc <rtems_filesystem_is_separator>,%a5
* pathloc is returned with a pointer to the parent of the new node.
* name is returned with a pointer to the first character in the
* new node name. The parent node is verified to be a directory.
*/
int IMFS_evaluate_for_make(
4a9ce: 45f4 4801 lea %a4@(00000001,%d4:l),%a2
* We have evaluated the path as far as we can.
* Verify there is not any invalid stuff at the end of the name.
*/
for( ; path[i] != '\0'; i++) {
if ( !IMFS_is_separator( path[ i ] ) )
4a9d2: 49c0 extbl %d0 4a9d4: 2f00 movel %d0,%sp@- 4a9d6: 4e95 jsr %a5@ 4a9d8: 588f addql #4,%sp 4a9da: 4a80 tstl %d0
4a9dc: 67a4 beqs 4a982 <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++) {
4a9de: 101a moveb %a2@+,%d0
4a9e0: 66f0 bnes 4a9d2 <IMFS_evaluate_for_make+0x16a>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4a9e2: 2f0b movel %a3,%sp@- 4a9e4: 4eb9 0004 a31c jsr 4a31c <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4a9ea: 2053 moveal %a3@,%a0
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
4a9ec: 2600 movel %d0,%d3
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
if ( node->type != IMFS_DIRECTORY )
4a9ee: 588f addql #4,%sp 4a9f0: 7001 moveq #1,%d0 4a9f2: b0a8 0048 cmpl %a0@(72),%d0 4a9f6: 6600 0096 bnew 4aa8e <IMFS_evaluate_for_make+0x226>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
4a9fa: 4878 0003 pea 3 <DIVIDE> 4a9fe: 2f0b movel %a3,%sp@- 4aa00: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4aa06: 508f addql #8,%sp 4aa08: 4a80 tstl %d0 4aa0a: 6600 fee4 bnew 4a8f0 <IMFS_evaluate_for_make+0x88>
rtems_set_errno_and_return_minus_one( EACCES );
4aa0e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4aa14: 76ff moveq #-1,%d3 4aa16: 740d moveq #13,%d2 4aa18: 2040 moveal %d0,%a0
return result;
}
4aa1a: 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 );
4aa1c: 2082 movel %d2,%a0@
return result;
}
4aa1e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4aa24: 4e5e unlk %fp 4aa26: 4e75 rts
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa28: 2429 000c movel %a1@(12),%d2
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa2c: 98ae fffc subl %fp@(-4),%d4
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa30: 26a9 0008 movel %a1@(8),%a3@ 4aa34: 2069 0014 moveal %a1@(20),%a0 4aa38: 2229 0010 movel %a1@(16),%d1 4aa3c: 2029 0018 movel %a1@(24),%d0
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa40: 2f2e 0010 movel %fp@(16),%sp@- 4aa44: 2f0b movel %a3,%sp@- 4aa46: 4874 4800 pea %a4@(00000000,%d4:l) 4aa4a: 2268 0004 moveal %a0@(4),%a1
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
4aa4e: 2742 0004 movel %d2,%a3@(4) 4aa52: 2741 0008 movel %d1,%a3@(8) 4aa56: 2748 000c movel %a0,%a3@(12) 4aa5a: 2740 0010 movel %d0,%a3@(16)
break;
} else {
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aa5e: 4e91 jsr %a1@ 4aa60: 4fef 000c lea %sp@(12),%sp 4aa64: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aa66: 2003 movel %d3,%d0 4aa68: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4aa6e: 4e5e unlk %fp 4aa70: 4e75 rts
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4aa72: 42a7 clrl %sp@- 4aa74: 2f0b movel %a3,%sp@- 4aa76: 4eb9 0004 a7ae jsr 4a7ae <IMFS_evaluate_link>
if ( result == -1 )
4aa7c: 508f addql #8,%sp
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
4aa7e: 2600 movel %d0,%d3
if ( result == -1 )
4aa80: 70ff moveq #-1,%d0 4aa82: b083 cmpl %d3,%d0 4aa84: 6700 fe6a beqw 4a8f0 <IMFS_evaluate_for_make+0x88> 4aa88: 2453 moveal %a3@,%a2 4aa8a: 6000 fea2 braw 4a92e <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 );
4aa8e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4aa94: 76ff moveq #-1,%d3 4aa96: 7814 moveq #20,%d4 4aa98: 2040 moveal %d0,%a0
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aa9a: 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 );
4aa9c: 2084 movel %d4,%a0@
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aa9e: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4aaa4: 4e5e unlk %fp 4aaa6: 4e75 rts
/*
* 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 ) {
4aaa8: 2428 0020 movel %a0@(32),%d2
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aaac: 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 ) {
4aab0: 26a8 001c movel %a0@(28),%a3@ 4aab4: 2268 0028 moveal %a0@(40),%a1 4aab8: 2228 0024 movel %a0@(36),%d1 4aabc: 2028 002c movel %a0@(44),%d0
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aac0: 2f2e 0010 movel %fp@(16),%sp@- 4aac4: 2f0b movel %a3,%sp@- 4aac6: 4874 4800 pea %a4@(00000000,%d4:l) 4aaca: 2069 0004 moveal %a1@(4),%a0
/*
* 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 ) {
4aace: 2742 0004 movel %d2,%a3@(4) 4aad2: 2741 0008 movel %d1,%a3@(8) 4aad6: 2749 000c movel %a1,%a3@(12) 4aada: 2740 0010 movel %d0,%a3@(16)
newloc = node->info.directory.mt_fs->mt_fs_root;
*pathloc = newloc;
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
4aade: 4e90 jsr %a0@ 4aae0: 4fef 000c lea %sp@(12),%sp 4aae4: 2600 movel %d0,%d3
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4aae6: 2003 movel %d3,%d0 4aae8: 4cee 3cfc ffb0 moveml %fp@(-80),%d2-%d7/%a2-%a5 4aaee: 4e5e unlk %fp
...
0004a432 <IMFS_evaluate_hard_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
4a432: 7003 moveq #3,%d0
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a434: 4e56 0000 linkw %fp,#0 4a438: 2f0a movel %a2,%sp@- 4a43a: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = node->node_access;
4a43e: 2052 moveal %a2@,%a0
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
4a440: b0a8 0048 cmpl %a0@(72),%d0
4a444: 6640 bnes 4a486 <IMFS_evaluate_hard_link+0x54> <== NEVER TAKEN
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
4a446: 24a8 004c movel %a0@(76),%a2@
IMFS_Set_handlers( node );
4a44a: 2f0a movel %a2,%sp@- 4a44c: 4eb9 0004 a31c jsr 4a31c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
4a452: 2f2e 000c movel %fp@(12),%sp@- 4a456: 2f0a movel %a2,%sp@- 4a458: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4a45e: 4fef 000c lea %sp@(12),%sp 4a462: 4a80 tstl %d0
4a464: 670a beqs 4a470 <IMFS_evaluate_hard_link+0x3e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a466: 246e fffc moveal %fp@(-4),%a2
*/
if ( !IMFS_evaluate_permission( node, flags ) )
rtems_set_errno_and_return_minus_one( EACCES );
return result;
4a46a: 4280 clrl %d0
}
4a46c: 4e5e unlk %fp 4a46e: 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 );
4a470: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
return result;
}
4a476: 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 );
4a47a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a47c: 720d moveq #13,%d1 <== NOT EXECUTED 4a47e: 70ff moveq #-1,%d0 <== NOT EXECUTED
return result;
}
4a480: 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 );
4a482: 2081 movel %d1,%a0@ <== NOT EXECUTED
return result;
}
4a484: 4e75 rts <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
4a486: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4a48c: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004a7ae <IMFS_evaluate_link>:
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7ae: 4e56 ffec linkw %fp,#-20
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
rtems_filesystem_link_counts = 0;
rtems_set_errno_and_return_minus_one( ELOOP );
4a7b2: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7b8: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4a7bc: 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 );
4a7c0: 4bf9 0004 a700 lea 4a700 <IMFS_evaluate_sym_link>,%a5
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4a7c6: 49f9 0004 a432 lea 4a432 <IMFS_evaluate_hard_link>,%a4
int IMFS_evaluate_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a7cc: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode;
int result = 0;
do {
jnode = node->node_access;
4a7d0: 2453 moveal %a3@,%a2
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7d2: 4281 clrl %d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4a7d4: 3028 0030 movew %a0@(48),%d0 4a7d8: 5280 addql #1,%d0
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7da: 3200 movew %d0,%d1
/*
* Increment and check the link counter.
*/
rtems_filesystem_link_counts ++;
4a7dc: 3140 0030 movew %d0,%a0@(48)
if ( rtems_filesystem_link_counts > MAXSYMLINK ) {
4a7e0: 7005 moveq #5,%d0 4a7e2: b081 cmpl %d1,%d0
4a7e4: 6564 bcss 4a84a <IMFS_evaluate_link+0x9c>
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
4a7e6: 202a 0048 movel %a2@(72),%d0 4a7ea: 7203 moveq #3,%d1 4a7ec: b280 cmpl %d0,%d1
4a7ee: 6740 beqs 4a830 <IMFS_evaluate_link+0x82>
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
4a7f0: 7204 moveq #4,%d1 4a7f2: b280 cmpl %d0,%d1
4a7f4: 671a beqs 4a810 <IMFS_evaluate_link+0x62>
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a7f6: 5780 subql #3,%d0 4a7f8: 7201 moveq #1,%d1 4a7fa: b280 cmpl %d0,%d1
4a7fc: 64d2 bccs 4a7d0 <IMFS_evaluate_link+0x22> <== NEVER TAKEN
4a7fe: 4280 clrl %d0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4a800: 4241 clrw %d1 4a802: 3141 0030 movew %d1,%a0@(48)
return result;
}
4a806: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4a80c: 4e5e unlk %fp 4a80e: 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 );
4a810: 2f02 movel %d2,%sp@- 4a812: 2f0b movel %a3,%sp@- 4a814: 4e95 jsr %a5@ 4a816: 508f addql #8,%sp
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
( jnode->type == IMFS_HARD_LINK ) ) );
4a818: 4a80 tstl %d0
4a81a: 6620 bnes 4a83c <IMFS_evaluate_link+0x8e>
4a81c: 202a 0048 movel %a2@(72),%d0
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a820: 7201 moveq #1,%d1 4a822: 5780 subql #3,%d0
( jnode->type == IMFS_HARD_LINK ) ) );
4a824: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0
result = IMFS_evaluate_hard_link( node, flags );
else if (jnode->type == IMFS_SYM_LINK )
result = IMFS_evaluate_sym_link( node, flags );
} while ( ( result == 0 ) && ( ( jnode->type == IMFS_SYM_LINK ) ||
4a82a: b280 cmpl %d0,%d1
4a82c: 64a2 bccs 4a7d0 <IMFS_evaluate_link+0x22> <== ALWAYS TAKEN
4a82e: 60ce bras 4a7fe <IMFS_evaluate_link+0x50> <== NOT EXECUTED
/*
* Follow the Link node.
*/
if ( jnode->type == IMFS_HARD_LINK )
result = IMFS_evaluate_hard_link( node, flags );
4a830: 2f02 movel %d2,%sp@- 4a832: 2f0b movel %a3,%sp@- 4a834: 4e94 jsr %a4@ 4a836: 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 ) ) );
4a838: 4a80 tstl %d0
4a83a: 67e0 beqs 4a81c <IMFS_evaluate_link+0x6e> <== ALWAYS TAKEN
4a83c: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0
/*
* Clear link counter.
*/
rtems_filesystem_link_counts = 0;
4a842: 4241 clrw %d1 4a844: 3141 0030 movew %d1,%a0@(48) 4a848: 60bc bras 4a806 <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;
4a84a: 4241 clrw %d1 4a84c: 3141 0030 movew %d1,%a0@(48)
rtems_set_errno_and_return_minus_one( ELOOP );
4a850: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4a856: 725c moveq #92,%d1 4a858: 2040 moveal %d0,%a0 4a85a: 70ff moveq #-1,%d0
*/
rtems_filesystem_link_counts = 0;
return result;
}
4a85c: 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 );
4a862: 2081 movel %d1,%a0@
*/
rtems_filesystem_link_counts = 0;
return result;
}
4a864: 4e5e unlk %fp <== NOT EXECUTED
0004a3a6 <IMFS_evaluate_permission>:
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4a3a6: 4e56 fff4 linkw %fp,#-12
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
4a3aa: 206e 0008 moveal %fp@(8),%a0
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4a3ae: 48d7 040c moveml %d2-%d3/%a2,%sp@
if ( !rtems_libio_is_valid_perms( flags ) ) {
rtems_set_errno_and_return_minus_one( EIO );
}
jnode = node->node_access;
4a3b2: 2450 moveal %a0@,%a2
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
4a3b4: 262e 000c movel %fp@(12),%d3
}
jnode = node->node_access;
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4a3b8: 4eb9 0004 b174 jsr 4b174 <geteuid> 4a3be: 3400 movew %d0,%d2
st_gid = getegid();
4a3c0: 4eb9 0004 b160 jsr 4b160 <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
4a3c6: 4281 clrl %d1 4a3c8: 0282 0000 ffff andil #65535,%d2 4a3ce: 322a 0038 movew %a2@(56),%d1 4a3d2: b481 cmpl %d1,%d2
4a3d4: 6742 beqs 4a418 <IMFS_evaluate_permission+0x72>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
4a3d6: 4281 clrl %d1 4a3d8: 0280 0000 ffff andil #65535,%d0 4a3de: 322a 003a movew %a2@(58),%d1 4a3e2: b081 cmpl %d1,%d0
4a3e4: 6718 beqs 4a3fe <IMFS_evaluate_permission+0x58> <== ALWAYS TAKEN
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a3e6: 2003 movel %d3,%d0 <== NOT EXECUTED 4a3e8: c0aa 002e andl %a2@(46),%d0 <== NOT EXECUTED
return 1;
return 0;
4a3ec: b083 cmpl %d3,%d0 <== NOT EXECUTED 4a3ee: 57c0 seq %d0 <== NOT EXECUTED
}
4a3f0: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4a3f6: 4e5e unlk %fp <== NOT EXECUTED
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
4a3f8: 49c0 extbl %d0 <== NOT EXECUTED
}
4a3fa: 4480 negl %d0 <== NOT EXECUTED 4a3fc: 4e75 rts <== NOT EXECUTED
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;
4a3fe: e78b lsll #3,%d3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a400: 2003 movel %d3,%d0 4a402: c0aa 002e andl %a2@(46),%d0
return 1;
return 0;
4a406: b083 cmpl %d3,%d0 4a408: 57c0 seq %d0
}
4a40a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4a410: 4e5e unlk %fp
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
4a412: 49c0 extbl %d0
}
4a414: 4480 negl %d0 4a416: 4e75 rts
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
flags_to_test <<= 6;
4a418: ed8b lsll #6,%d3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
4a41a: 2003 movel %d3,%d0 4a41c: c0aa 002e andl %a2@(46),%d0
return 1;
return 0;
4a420: b083 cmpl %d3,%d0 4a422: 57c0 seq %d0
}
4a424: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4a42a: 4e5e unlk %fp
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
return 1;
return 0;
4a42c: 49c0 extbl %d0
}
4a42e: 4480 negl %d0 <== NOT EXECUTED
0004a700 <IMFS_evaluate_sym_link>:
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4a700: 7004 moveq #4,%d0
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
4a702: 4e56 ffec linkw %fp,#-20 4a706: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4a70a: 246e 0008 moveal %fp@(8),%a2 4a70e: 242e 000c movel %fp@(12),%d2
IMFS_jnode_t *jnode = node->node_access;
4a712: 2652 moveal %a2@,%a3
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
4a714: b0ab 0048 cmpl %a3@(72),%d0 4a718: 6600 0088 bnew 4a7a2 <IMFS_evaluate_sym_link+0xa2>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
4a71c: 202b 0008 movel %a3@(8),%d0
4a720: 6774 beqs 4a796 <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(
4a722: 2f0a movel %a2,%sp@- 4a724: 486e fffc pea %fp@(-4) 4a728: 2f2b 004c movel %a3@(76),%sp@-
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
4a72c: 2480 movel %d0,%a2@
rtems_filesystem_get_sym_start_loc(
4a72e: 4eb9 0004 b714 jsr 4b714 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
4a734: 262b 004c movel %a3@(76),%d3 4a738: d6ae fffc addl %fp@(-4),%d3 4a73c: 2f03 movel %d3,%sp@- 4a73e: 4eb9 0004 fe4c jsr 4fe4c <strlen> 4a744: 2e8a movel %a2,%sp@ 4a746: 2f02 movel %d2,%sp@- 4a748: 2f00 movel %d0,%sp@- 4a74a: 2f03 movel %d3,%sp@- 4a74c: 4eb9 0004 a492 jsr 4a492 <IMFS_eval_path> 4a752: 2600 movel %d0,%d3
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
4a754: 2f0a movel %a2,%sp@- 4a756: 4eb9 0004 a31c jsr 4a31c <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
4a75c: 4fef 001c lea %sp@(28),%sp 4a760: 2e82 movel %d2,%sp@ 4a762: 2f0a movel %a2,%sp@- 4a764: 4eb9 0004 a3a6 jsr 4a3a6 <IMFS_evaluate_permission> 4a76a: 508f addql #8,%sp 4a76c: 4a80 tstl %d0
4a76e: 670c beqs 4a77c <IMFS_evaluate_sym_link+0x7c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EACCES );
return result;
}
4a770: 2003 movel %d3,%d0 4a772: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4a778: 4e5e unlk %fp 4a77a: 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 );
4a77c: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4a782: 76ff moveq #-1,%d3 <== NOT EXECUTED 4a784: 2040 moveal %d0,%a0 <== NOT EXECUTED 4a786: 700d moveq #13,%d0 <== NOT EXECUTED 4a788: 2080 movel %d0,%a0@ <== NOT EXECUTED
return result;
}
4a78a: 2003 movel %d3,%d0 <== NOT EXECUTED 4a78c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4a792: 4e5e unlk %fp <== NOT EXECUTED 4a794: 4e75 rts <== NOT EXECUTED
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
rtems_fatal_error_occurred( 0xBAD00000 );
4a796: 2f3c bad0 0000 movel #-1160773632,%sp@- <== NOT EXECUTED 4a79c: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
4a7a2: 2f3c abcd 0000 movel #-1412628480,%sp@- <== NOT EXECUTED 4a7a8: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004dfa8 <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4dfa8: 4e56 fff8 linkw %fp,#-8 4dfac: 206e 0008 moveal %fp@(8),%a0 4dfb0: 2f0a movel %a2,%sp@-
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
4dfb2: 2450 moveal %a0@,%a2
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
4dfb4: 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 ) )
4dfb6: 4282 clrl %d2
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
4dfb8: 4eb9 0004 b174 jsr 4b174 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
4dfbe: 4281 clrl %d1 4dfc0: 342a 0038 movew %a2@(56),%d2 4dfc4: 3200 movew %d0,%d1 4dfc6: b282 cmpl %d2,%d1
4dfc8: 6704 beqs 4dfce <IMFS_fchmod+0x26> <== ALWAYS TAKEN
4dfca: 4a40 tstw %d0 <== NOT EXECUTED 4dfcc: 663c bnes 4e00a <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);
4dfce: 202a 002e movel %a2@(46),%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4dfd2: 222e 000c movel %fp@(12),%d1
/*
* Change only the RWX permissions on the jnode to mode.
*/
jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4dfd6: 0280 ffff f000 andil #-4096,%d0
jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
4dfdc: 0281 0000 0fff andil #4095,%d1 4dfe2: 8280 orl %d0,%d1 4dfe4: 2541 002e movel %d1,%a2@(46)
IMFS_update_ctime( jnode );
4dfe8: 42a7 clrl %sp@- 4dfea: 486e fff8 pea %fp@(-8) 4dfee: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4dff4: 256e fff8 0044 movel %fp@(-8),%a2@(68)
return 0;
4dffa: 508f addql #8,%sp 4dffc: 4280 clrl %d0
}
4dffe: 242e fff0 movel %fp@(-16),%d2 4e002: 246e fff4 moveal %fp@(-12),%a2 4e006: 4e5e unlk %fp 4e008: 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 );
4e00a: 4eb9 0004 e9f4 jsr 4e9f4 <__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;
}
4e010: 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 );
4e014: 2040 moveal %d0,%a0 <== NOT EXECUTED 4e016: 7201 moveq #1,%d1 <== NOT EXECUTED 4e018: 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;
}
4e01a: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4e01e: 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 );
4e020: 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;
}
00042f98 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
42f98: 4e56 fff4 linkw %fp,#-12 42f9c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42fa0: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
42fa4: 266a 0018 moveal %a2@(24),%a3
int err = pipe_release(&JNODE2PIPE(jnode), iop);
42fa8: 2f0a movel %a2,%sp@- 42faa: 486b 004c pea %a3@(76) 42fae: 4eb9 0004 c8b8 jsr 4c8b8 <pipe_release>
if (err == 0) {
42fb4: 508f addql #8,%sp
rtems_libio_t *iop
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
42fb6: 2400 movel %d0,%d2
if (err == 0) {
42fb8: 670e beqs 42fc8 <IMFS_fifo_close+0x30> <== ALWAYS TAKEN
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
42fba: 6d2c blts 42fe8 <IMFS_fifo_close+0x50> <== NOT EXECUTED
}
42fbc: 2002 movel %d2,%d0 <== NOT EXECUTED 42fbe: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 42fc4: 4e5e unlk %fp <== NOT EXECUTED 42fc6: 4e75 rts <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
42fc8: 203c ffff feff movel #-257,%d0
IMFS_check_node_remove(jnode);
42fce: 2f0b movel %a3,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
42fd0: c1aa 0014 andl %d0,%a2@(20)
IMFS_check_node_remove(jnode);
42fd4: 4eb9 0004 36b4 jsr 436b4 <IMFS_check_node_remove> 42fda: 588f addql #4,%sp
}
IMFS_FIFO_RETURN(err);
}
42fdc: 2002 movel %d2,%d0 42fde: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 42fe4: 4e5e unlk %fp 42fe6: 4e75 rts
if (err == 0) {
iop->flags &= ~LIBIO_FLAGS_OPEN;
IMFS_check_node_remove(jnode);
}
IMFS_FIFO_RETURN(err);
42fe8: 4eb9 0005 08dc jsr 508dc <__errno> <== NOT EXECUTED 42fee: 4482 negl %d2 <== NOT EXECUTED 42ff0: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ff2: 2082 movel %d2,%a0@ <== NOT EXECUTED 42ff4: 74ff moveq #-1,%d2 <== NOT EXECUTED
}
42ff6: 2002 movel %d2,%d0 <== NOT EXECUTED 42ff8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 42ffe: 4e5e unlk %fp <== NOT EXECUTED
00042dc0 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
42dc0: 4e56 0000 linkw %fp,#0 42dc4: 206e 0008 moveal %fp@(8),%a0 42dc8: 2f03 movel %d3,%sp@- 42dca: 2f02 movel %d2,%sp@-
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
42dcc: 2f08 movel %a0,%sp@- 42dce: 2f2e 0014 movel %fp@(20),%sp@- 42dd2: 2068 0018 moveal %a0@(24),%a0 42dd6: 2f2e 0010 movel %fp@(16),%sp@- 42dda: 2f2e 000c movel %fp@(12),%sp@- 42dde: 2f28 004c movel %a0@(76),%sp@- 42de2: 4eb9 0004 d252 jsr 4d252 <pipe_lseek>
IMFS_FIFO_RETURN(err);
42de8: 4fef 0014 lea %sp@(20),%sp
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
42dec: 2600 movel %d0,%d3 42dee: 2400 movel %d0,%d2 42df0: 5bc1 smi %d1 42df2: 49c1 extbl %d1
IMFS_FIFO_RETURN(err);
42df4: 4a81 tstl %d1
42df6: 6b10 bmis 42e08 <IMFS_fifo_lseek+0x48> <== ALWAYS TAKEN
}
42df8: 2001 movel %d1,%d0 <== NOT EXECUTED 42dfa: 2202 movel %d2,%d1 <== NOT EXECUTED 42dfc: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 42e00: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 42e04: 4e5e unlk %fp <== NOT EXECUTED 42e06: 4e75 rts <== NOT EXECUTED
rtems_off64_t offset,
int whence
)
{
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
IMFS_FIFO_RETURN(err);
42e08: 4eb9 0005 08dc jsr 508dc <__errno> 42e0e: 4483 negl %d3 42e10: 2040 moveal %d0,%a0 42e12: 72ff moveq #-1,%d1 42e14: 74ff moveq #-1,%d2 42e16: 2083 movel %d3,%a0@
}
42e18: 262e fffc movel %fp@(-4),%d3 42e1c: 2001 movel %d1,%d0 42e1e: 2202 movel %d2,%d1 42e20: 242e fff8 movel %fp@(-8),%d2
42e24: 4e5e unlk %fp <== NOT EXECUTED
00042eb6 <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42eb6: 4e56 fff8 linkw %fp,#-8 42eba: 206e 0008 moveal %fp@(8),%a0 42ebe: 2f0a movel %a2,%sp@- 42ec0: 2f02 movel %d2,%sp@-
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42ec2: 2f08 movel %a0,%sp@- 42ec4: 2f2e 0010 movel %fp@(16),%sp@-
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
42ec8: 2468 0018 moveal %a0@(24),%a2
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42ecc: 2f2e 000c movel %fp@(12),%sp@- 42ed0: 2f2a 004c movel %a2@(76),%sp@- 42ed4: 4eb9 0004 cfd4 jsr 4cfd4 <pipe_write>
if (err > 0) {
42eda: 4fef 0010 lea %sp@(16),%sp
size_t count
)
{
IMFS_jnode_t *jnode = iop->pathinfo.node_access;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
42ede: 2400 movel %d0,%d2
if (err > 0) {
42ee0: 6f28 bles 42f0a <IMFS_fifo_write+0x54>
IMFS_mtime_ctime_update(jnode);
42ee2: 42a7 clrl %sp@- 42ee4: 486e fff8 pea %fp@(-8) 42ee8: 4eb9 0004 4280 jsr 44280 <gettimeofday> 42eee: 202e fff8 movel %fp@(-8),%d0 42ef2: 508f addql #8,%sp 42ef4: 2540 0040 movel %d0,%a2@(64) 42ef8: 2540 0044 movel %d0,%a2@(68)
}
IMFS_FIFO_RETURN(err);
}
42efc: 2002 movel %d2,%d0 42efe: 242e fff0 movel %fp@(-16),%d2 42f02: 246e fff4 moveal %fp@(-12),%a2 42f06: 4e5e unlk %fp 42f08: 4e75 rts
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
if (err > 0) {
IMFS_mtime_ctime_update(jnode);
}
IMFS_FIFO_RETURN(err);
42f0a: 4a80 tstl %d0
42f0c: 67ee beqs 42efc <IMFS_fifo_write+0x46> <== NEVER TAKEN
42f0e: 4eb9 0005 08dc jsr 508dc <__errno> 42f14: 4482 negl %d2 42f16: 2040 moveal %d0,%a0 42f18: 2082 movel %d2,%a0@ 42f1a: 74ff moveq #-1,%d2
}
42f1c: 2002 movel %d2,%d0 42f1e: 242e fff0 movel %fp@(-16),%d2 42f22: 246e fff4 moveal %fp@(-12),%a2
42f26: 4e5e unlk %fp <== NOT EXECUTED
0004aba0 <IMFS_find_match_in_dir>:
IMFS_jnode_t *IMFS_find_match_in_dir(
IMFS_jnode_t *directory,
char *name
)
{
4aba0: 4e56 fff0 linkw %fp,#-16 4aba4: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4aba8: 246e 0008 moveal %fp@(8),%a2 4abac: 242e 000c movel %fp@(12),%d2
#if defined(RTEMS_DEBUG)
assert( directory );
assert( name );
#endif
if ( !name )
4abb0: 660e bnes 4abc0 <IMFS_find_match_in_dir+0x20> <== ALWAYS TAKEN
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
4abb2: 95ca subal %a2,%a2
}
4abb4: 200a movel %a2,%d0 4abb6: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 4abbc: 4e5e unlk %fp 4abbe: 4e75 rts
assert( name );
#endif
if ( !name )
return 0;
if ( !directory )
4abc0: 4a8a tstl %a2
4abc2: 67f0 beqs 4abb4 <IMFS_find_match_in_dir+0x14> <== NEVER TAKEN
/*
* Check for "." and ".."
*/
if ( !strcmp( name, dotname ) )
4abc4: 4879 0005 d5ae pea 5d5ae <dotname> 4abca: 47f9 0004 f8f4 lea 4f8f4 <strcmp>,%a3 4abd0: 2f02 movel %d2,%sp@- 4abd2: 4e93 jsr %a3@ 4abd4: 508f addql #8,%sp 4abd6: 4a80 tstl %d0
4abd8: 67da beqs 4abb4 <IMFS_find_match_in_dir+0x14> <== NEVER TAKEN
return directory;
if ( !strcmp( name, dotdotname ) )
4abda: 4879 0005 d5b0 pea 5d5b0 <dotdotname> 4abe0: 2f02 movel %d2,%sp@- 4abe2: 4e93 jsr %a3@ 4abe4: 508f addql #8,%sp 4abe6: 4a80 tstl %d0
4abe8: 6610 bnes 4abfa <IMFS_find_match_in_dir+0x5a> <== ALWAYS TAKEN
return directory->Parent;
4abea: 246a 0008 moveal %a2@(8),%a2 <== NOT EXECUTED
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4abee: 200a movel %a2,%d0 <== NOT EXECUTED 4abf0: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 <== NOT EXECUTED 4abf6: 4e5e unlk %fp <== NOT EXECUTED 4abf8: 4e75 rts <== NOT EXECUTED
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
4abfa: 286a 004c moveal %a2@(76),%a4 4abfe: 45ea 0050 lea %a2@(80),%a2 4ac02: b5cc cmpal %a4,%a2
4ac04: 67ac beqs 4abb2 <IMFS_find_match_in_dir+0x12>
!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 ) )
4ac06: 486c 000c pea %a4@(12) 4ac0a: 2f02 movel %d2,%sp@- 4ac0c: 4e93 jsr %a3@ 4ac0e: 508f addql #8,%sp 4ac10: 4a80 tstl %d0
4ac12: 670a beqs 4ac1e <IMFS_find_match_in_dir+0x7e>
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 ) {
4ac14: 2854 moveal %a4@,%a4
if ( !strcmp( name, dotdotname ) )
return directory->Parent;
the_chain = &directory->info.directory.Entries;
for ( the_node = the_chain->first;
4ac16: b5cc cmpal %a4,%a2
4ac18: 66ec bnes 4ac06 <IMFS_find_match_in_dir+0x66>
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
4ac1a: 95ca subal %a2,%a2 4ac1c: 6096 bras 4abb4 <IMFS_find_match_in_dir+0x14>
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;
4ac1e: 244c moveal %a4,%a2
if ( !strcmp( name, the_jnode->name ) )
return the_jnode;
}
return 0;
}
4ac20: 200a movel %a2,%d0 4ac22: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
4ac28: 4e5e unlk %fp <== NOT EXECUTED
0004aaf4 <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
)
{
4aaf4: 4e56 ffd8 linkw %fp,#-40 4aaf8: 206e 0008 moveal %fp@(8),%a0 4aafc: 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;
4ab00: 47ee ffec lea %fp@(-20),%a3 4ab04: 49f9 0004 a31c lea 4a31c <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 );
4ab0a: 4bf9 0004 25fc lea 425fc <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;
4ab10: 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;
4ab14: 2468 001c moveal %a0@(28),%a2
loc = temp_mt_entry->mt_fs_root;
4ab18: 2d68 0020 fff0 movel %a0@(32),%fp@(-16) 4ab1e: 2d68 0024 fff4 movel %a0@(36),%fp@(-12) 4ab24: 2d68 0028 fff8 movel %a0@(40),%fp@(-8) 4ab2a: 2d68 002c fffc movel %a0@(44),%fp@(-4)
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
4ab30: 42a8 001c clrl %a0@(28)
do {
next = jnode->Parent;
4ab34: 242a 0008 movel %a2@(8),%d2
loc.node_access = (void *)jnode;
4ab38: 2d4a ffec movel %a2,%fp@(-20)
IMFS_Set_handlers( &loc );
4ab3c: 2f0b movel %a3,%sp@- 4ab3e: 4e94 jsr %a4@
if ( jnode->type != IMFS_DIRECTORY ) {
4ab40: 588f addql #4,%sp
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4ab42: 200a movel %a2,%d0 4ab44: 0680 0000 0050 addil #80,%d0 4ab4a: 7201 moveq #1,%d1 4ab4c: b2aa 0048 cmpl %a2@(72),%d1
4ab50: 6634 bnes 4ab86 <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
4ab52: b0aa 004c cmpl %a2@(76),%d0
4ab56: 672e beqs 4ab86 <IMFS_fsunmount+0x92>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
}
if ( jnode != NULL ) {
4ab58: 4a8a tstl %a2
4ab5a: 671e beqs 4ab7a <IMFS_fsunmount+0x86>
if ( jnode->type == IMFS_DIRECTORY ) {
4ab5c: 7001 moveq #1,%d0 4ab5e: b0aa 0048 cmpl %a2@(72),%d0
4ab62: 66d0 bnes 4ab34 <IMFS_fsunmount+0x40> <== NEVER TAKEN
4ab64: 200a movel %a2,%d0 4ab66: 0680 0000 0050 addil #80,%d0
if ( jnode_has_children( jnode ) )
4ab6c: b0aa 004c cmpl %a2@(76),%d0
4ab70: 67c2 beqs 4ab34 <IMFS_fsunmount+0x40>
jnode = jnode_get_first_child( jnode );
4ab72: 246a 004c moveal %a2@(76),%a2
}
}
} while (jnode != NULL);
4ab76: 4a8a tstl %a2
4ab78: 66ba bnes 4ab34 <IMFS_fsunmount+0x40> <== ALWAYS TAKEN
return 0;
4ab7a: 4280 clrl %d0
}
4ab7c: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 4ab82: 4e5e unlk %fp 4ab84: 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 );
4ab86: 2f0b movel %a3,%sp@-
if (result != 0)
return -1;
jnode = next;
4ab88: 2442 moveal %d2,%a2
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
4ab8a: 42a7 clrl %sp@- 4ab8c: 4e95 jsr %a5@
if (result != 0)
4ab8e: 508f addql #8,%sp 4ab90: 4a80 tstl %d0
4ab92: 67c4 beqs 4ab58 <IMFS_fsunmount+0x64> <== ALWAYS TAKEN
return -1;
4ab94: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
}
} while (jnode != NULL);
return 0;
}
4ab96: 4cee 3c04 ffd8 moveml %fp@(-40),%d2/%a2-%a5 <== NOT EXECUTED 4ab9c: 4e5e unlk %fp <== NOT EXECUTED
0004ac2c <IMFS_get_token>:
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac2c: 4e56 ffe4 linkw %fp,#-28 4ac30: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac34: 246e 0008 moveal %fp@(8),%a2 4ac38: 49f9 0004 3cdc lea 43cdc <rtems_filesystem_is_separator>,%a4
int pathlen,
char *token,
int *token_len
)
{
register int i = 0;
4ac3e: 4282 clrl %d2
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac40: 161a moveb %a2@+,%d3
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac42: 2a6e 0010 moveal %fp@(16),%a5
register char c;
/*
* Copy a name into token. (Remember NULL is a token.)
*/
c = path[i];
4ac46: 264d moveal %a5,%a3
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
4ac48: 1003 moveb %d3,%d0
const char *path,
int pathlen,
char *token,
int *token_len
)
{
4ac4a: 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) ) {
4ac4e: 49c0 extbl %d0 4ac50: 2f00 movel %d0,%sp@- 4ac52: 4e94 jsr %a4@ 4ac54: 588f addql #4,%sp 4ac56: 4a80 tstl %d0
4ac58: 6620 bnes 4ac7a <IMFS_get_token+0x4e>
4ac5a: b882 cmpl %d2,%d4
4ac5c: 6f1c bles 4ac7a <IMFS_get_token+0x4e>
token[i] = c;
if ( i == IMFS_NAME_MAX )
4ac5e: 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;
4ac60: 16c3 moveb %d3,%a3@+
if ( i == IMFS_NAME_MAX )
4ac62: b082 cmpl %d2,%d0 4ac64: 6700 0082 beqw 4ace8 <IMFS_get_token+0xbc>
return IMFS_INVALID_TOKEN;
if ( !IMFS_is_valid_name_char(c) )
type = IMFS_INVALID_TOKEN;
c = path [++i];
4ac68: 5282 addql #1,%d2 4ac6a: 161a moveb %a2@+,%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) ) {
4ac6c: 1003 moveb %d3,%d0 4ac6e: 49c0 extbl %d0 4ac70: 2f00 movel %d0,%sp@- 4ac72: 4e94 jsr %a4@ 4ac74: 588f addql #4,%sp 4ac76: 4a80 tstl %d0
4ac78: 67e0 beqs 4ac5a <IMFS_get_token+0x2e>
/*
* Copy a seperator into token.
*/
if ( i == 0 ) {
4ac7a: 4a82 tstl %d2
4ac7c: 6626 bnes 4aca4 <IMFS_get_token+0x78>
token[i] = c;
4ac7e: 1a83 moveb %d3,%a5@
if ( (token[i] != '\0') && pathlen ) {
4ac80: 6718 beqs 4ac9a <IMFS_get_token+0x6e>
4ac82: 4a84 tstl %d4
4ac84: 6714 beqs 4ac9a <IMFS_get_token+0x6e>
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac86: 206e 0014 moveal %fp@(20),%a0
if ( i == 0 ) {
token[i] = c;
if ( (token[i] != '\0') && pathlen ) {
i++;
4ac8a: 7401 moveq #1,%d2
type = IMFS_CURRENT_DIR;
4ac8c: 7001 moveq #1,%d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac8e: 2082 movel %d2,%a0@
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4ac90: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4ac96: 4e5e unlk %fp 4ac98: 4e75 rts
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4ac9a: 206e 0014 moveal %fp@(20),%a0
if ( (token[i] != '\0') && pathlen ) {
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
4ac9e: 4280 clrl %d0
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4aca0: 2082 movel %d2,%a0@ 4aca2: 60ec bras 4ac90 <IMFS_get_token+0x64>
i++;
type = IMFS_CURRENT_DIR;
} else {
type = IMFS_NO_MORE_PATH;
}
} else if (token[ i-1 ] != '\0') {
4aca4: 4a35 28ff tstb %a5@(ffffffff,%d2:l)
4aca8: 6706 beqs 4acb0 <IMFS_get_token+0x84> <== NEVER TAKEN
token[i] = '\0';
4acaa: 4200 clrb %d0 4acac: 1b80 2800 moveb %d0,%a5@(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 )
4acb0: 4879 0005 d5b3 pea 5d5b3 <dotdotname+0x3> 4acb6: 45f9 0004 f8f4 lea 4f8f4 <strcmp>,%a2
/*
* Set token_len to the number of characters copied.
*/
*token_len = i;
4acbc: 206e 0014 moveal %fp@(20),%a0 4acc0: 2082 movel %d2,%a0@
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
4acc2: 2f0d movel %a5,%sp@- 4acc4: 4e92 jsr %a2@ 4acc6: 508f addql #8,%sp 4acc8: 4a80 tstl %d0
4acca: 6728 beqs 4acf4 <IMFS_get_token+0xc8>
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
4accc: 4879 0005 d5b4 pea 5d5b4 <dotdotname+0x4> 4acd2: 2f0d movel %a5,%sp@- 4acd4: 4e92 jsr %a2@ 4acd6: 508f addql #8,%sp 4acd8: 4a80 tstl %d0
4acda: 6724 beqs 4ad00 <IMFS_get_token+0xd4>
4acdc: 7003 moveq #3,%d0
type = IMFS_CURRENT_DIR;
}
return type;
}
4acde: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4ace4: 4e5e unlk %fp 4ace6: 4e75 rts
while ( (!IMFS_is_separator(c)) && (i < pathlen) && (i <= IMFS_NAME_MAX) ) {
token[i] = c;
if ( i == IMFS_NAME_MAX )
return IMFS_INVALID_TOKEN;
4ace8: 7004 moveq #4,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4acea: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4acf0: 4e5e unlk %fp 4acf2: 4e75 rts
* it was a special name.
*/
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
4acf4: 7002 moveq #2,%d0
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
}
return type;
}
4acf6: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 4acfc: 4e5e unlk %fp 4acfe: 4e75 rts
if ( type == IMFS_NAME ) {
if ( strcmp( token, "..") == 0 )
type = IMFS_UP_DIR;
else if ( strcmp( token, "." ) == 0 )
type = IMFS_CURRENT_DIR;
4ad00: 7001 moveq #1,%d0
}
return type;
}
4ad02: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
4ad08: 4e5e unlk %fp <== NOT EXECUTED
00042138 <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) {
42138: 7010 moveq #16,%d0
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
4213a: 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,
4213e: 2079 0005 e278 moveal 5e278 <imfs_rq_memfile_bytes_per_block>,%a0
const rtems_filesystem_operations_table *op_table,
const rtems_filesystem_file_handlers_r *memfile_handlers,
const rtems_filesystem_file_handlers_r *directory_handlers,
const rtems_filesystem_file_handlers_r *fifo_handlers
)
{
42144: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42148: 246e 0008 moveal %fp@(8),%a2 4214c: 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) {
42150: b088 cmpl %a0,%d0
42152: 6716 beqs 4216a <IMFS_initialize_support+0x32>
42154: 103c 0005 moveb #5,%d0 42158: 7220 moveq #32,%d1 4215a: 5380 subql #1,%d0 4215c: b288 cmpl %a0,%d1
4215e: 670a beqs 4216a <IMFS_initialize_support+0x32>
42160: d281 addl %d1,%d1 42162: 4a80 tstl %d0
42164: 66f4 bnes 4215a <IMFS_initialize_support+0x22> <== ALWAYS TAKEN
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
? requested_bytes_per_block
: default_bytes_per_block);
42166: 307c 0080 moveaw #128,%a0 <== NOT EXECUTED
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
4216a: 23c8 0005 f184 movel %a0,5f184 <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();
42170: 4eb9 0004 a2e0 jsr 4a2e0 <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 ) );
42176: 4878 0014 pea 14 <OPER2>
* 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;
4217a: 41f9 0005 d57e lea 5d57e <IMFS_LIMITS_AND_OPTIONS>,%a0 42180: 43f9 0005 d582 lea 5d582 <IMFS_LIMITS_AND_OPTIONS+0x4>,%a1
/* * 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();
42186: 2640 moveal %d0,%a3
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;
42188: 2550 0038 movel %a0@,%a2@(56) 4218c: 41f9 0005 d586 lea 5d586 <IMFS_LIMITS_AND_OPTIONS+0x8>,%a0 42192: 2551 003c movel %a1@,%a2@(60) 42196: 43f9 0005 d58a lea 5d58a <IMFS_LIMITS_AND_OPTIONS+0xc>,%a1 4219c: 2550 0040 movel %a0@,%a2@(64) 421a0: 41f9 0005 d58e lea 5d58e <IMFS_LIMITS_AND_OPTIONS+0x10>,%a0 421a6: 2551 0044 movel %a1@,%a2@(68) 421aa: 43f9 0005 d592 lea 5d592 <IMFS_LIMITS_AND_OPTIONS+0x14>,%a1
/*
* Create custom file system data.
*/
fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) );
421b0: 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;
421b4: 2550 0048 movel %a0@,%a2@(72) 421b8: 41f9 0005 d596 lea 5d596 <IMFS_LIMITS_AND_OPTIONS+0x18>,%a0 421be: 2551 004c movel %a1@,%a2@(76) 421c2: 43f9 0005 d59a lea 5d59a <IMFS_LIMITS_AND_OPTIONS+0x1c>,%a1 421c8: 2550 0050 movel %a0@,%a2@(80) 421cc: 41f9 0005 d59e lea 5d59e <IMFS_LIMITS_AND_OPTIONS+0x20>,%a0 421d2: 2551 0054 movel %a1@,%a2@(84) 421d6: 43f9 0005 d5a2 lea 5d5a2 <IMFS_LIMITS_AND_OPTIONS+0x24>,%a1 421dc: 2550 0058 movel %a0@,%a2@(88) 421e0: 41f9 0005 d5a6 lea 5d5a6 <IMFS_LIMITS_AND_OPTIONS+0x28>,%a0 421e6: 2551 005c movel %a1@,%a2@(92) 421ea: 43f9 0005 d5aa lea 5d5aa <IMFS_LIMITS_AND_OPTIONS+0x2c>,%a1 421f0: 2550 0060 movel %a0@,%a2@(96) 421f4: 2551 0064 movel %a1@,%a2@(100)
* * 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;
421f8: 256e 000c 0028 movel %fp@(12),%a2@(40)
/* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node();
421fe: 2540 001c movel %d0,%a2@(28)
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
42202: 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 ) );
42206: 4eb9 0004 292c jsr 4292c <calloc>
if ( !fs_info ) {
4220c: 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 ) );
4220e: 2040 moveal %d0,%a0
if ( !fs_info ) {
42210: 4a80 tstl %d0
42212: 673c beqs 42250 <IMFS_initialize_support+0x118> <== NEVER TAKEN
free(temp_mt_entry->mt_fs_root.node_access);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
temp_mt_entry->fs_info = fs_info;
42214: 2548 0034 movel %a0,%a2@(52)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
42218: 2239 0005 f188 movel 5f188 <imfs_instance.5838>,%d1 4221e: 2241 moveal %d1,%a1 42220: 5289 addql #1,%a1
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
42222: 4280 clrl %d0
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
42224: 2081 movel %d1,%a0@
fs_info->ino_count = 1;
42226: 7201 moveq #1,%d1
fs_info->memfile_handlers = memfile_handlers;
42228: 216e 0010 0008 movel %fp@(16),%a0@(8)
fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers;
4222e: 216e 0018 0010 movel %fp@(24),%a0@(16)
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
42234: 2142 000c movel %d2,%a0@(12)
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
42238: 2141 0004 movel %d1,%a0@(4)
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
fs_info->fifo_handlers = fifo_handlers;
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
4223c: 2741 0034 movel %d1,%a3@(52)
return 0;
}
42240: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
42246: 23c9 0005 f188 movel %a1,5f188 <imfs_instance.5838>
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
4224c: 4e5e unlk %fp 4224e: 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);
42250: 2f0b movel %a3,%sp@- <== NOT EXECUTED 42252: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
42258: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4225e: 588f addql #4,%sp <== NOT EXECUTED 42260: 720c moveq #12,%d1 <== NOT EXECUTED 42262: 2040 moveal %d0,%a0 <== NOT EXECUTED 42264: 70ff moveq #-1,%d0 <== NOT EXECUTED
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
42266: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== 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);
4226c: 2081 movel %d1,%a0@ <== NOT EXECUTED
jnode = temp_mt_entry->mt_fs_root.node_access;
jnode->st_ino = fs_info->ino_count;
return 0;
}
4226e: 4e5e unlk %fp <== NOT EXECUTED
...
00042274 <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 )
42274: 4280 clrl %d0 42276: 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 */
)
{
42278: 4e56 ffbc linkw %fp,#-68 4227c: 206e 0008 moveal %fp@(8),%a0 42280: 2f03 movel %d3,%sp@-
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
42282: 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 */
)
{
42284: 2f02 movel %d2,%sp@- 42286: 242e 0010 movel %fp@(16),%d2
/*
* 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 )
4228a: 3028 0032 movew %a0@(50),%d0
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
4228e: 2d48 ffe0 movel %a0,%fp@(-32)
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
42292: b280 cmpl %d0,%d1
42294: 6578 bcss 4230e <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 );
42296: 2f02 movel %d2,%sp@- 42298: 260e movel %fp,%d3 4229a: 0683 ffff ffbf addil #-65,%d3 422a0: 4eb9 0004 fe4c jsr 4fe4c <strlen> 422a6: 588f addql #4,%sp 422a8: 486e fffc pea %fp@(-4) 422ac: 2f03 movel %d3,%sp@- 422ae: 2f00 movel %d0,%sp@- 422b0: 2f02 movel %d2,%sp@- 422b2: 4eb9 0004 ac2c jsr 4ac2c <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(
422b8: 486e ffe0 pea %fp@(-32) 422bc: 2f3c 0000 a1ff movel #41471,%sp@- 422c2: 2f03 movel %d3,%sp@- 422c4: 4878 0003 pea 3 <DIVIDE> 422c8: 2f2e 000c movel %fp@(12),%sp@- 422cc: 4eb9 0004 a12a jsr 4a12a <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
422d2: 4fef 0024 lea %sp@(36),%sp 422d6: 4a80 tstl %d0
422d8: 674e beqs 42328 <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++;
422da: 206e ffe0 moveal %fp@(-32),%a0 422de: 3028 0032 movew %a0@(50),%d0 422e2: 5280 addql #1,%d0 422e4: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( info.hard_link.link_node );
422e8: 42a7 clrl %sp@- 422ea: 486e fff4 pea %fp@(-12) 422ee: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 422f4: 206e ffe0 moveal %fp@(-32),%a0
return 0;
422f8: 508f addql #8,%sp 422fa: 4280 clrl %d0
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
422fc: 216e fff4 0044 movel %fp@(-12),%a0@(68)
return 0;
}
42302: 242e ffb4 movel %fp@(-76),%d2 42306: 262e ffb8 movel %fp@(-72),%d3 4230a: 4e5e unlk %fp 4230c: 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 );
4230e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 42314: 741f moveq #31,%d2 42316: 2040 moveal %d0,%a0 42318: 70ff moveq #-1,%d0 4231a: 2082 movel %d2,%a0@
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
4231c: 242e ffb4 movel %fp@(-76),%d2 42320: 262e ffb8 movel %fp@(-72),%d3 42324: 4e5e unlk %fp 42326: 4e75 rts
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
42328: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
4232e: 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 );
42332: 2040 moveal %d0,%a0 <== NOT EXECUTED 42334: 720c moveq #12,%d1 <== NOT EXECUTED 42336: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
42338: 262e ffb8 movel %fp@(-72),%d3 <== NOT EXECUTED 4233c: 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 );
4233e: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
info.hard_link.link_node->st_nlink++;
IMFS_update_ctime( info.hard_link.link_node );
return 0;
}
...
0004d36e <IMFS_memfile_addblock>:
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4d36e: 4e56 0000 linkw %fp,#0 4d372: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4d374: 4878 0001 pea 1 <ADD> 4d378: 2f2e 000c movel %fp@(12),%sp@- 4d37c: 2f2e 0008 movel %fp@(8),%sp@- 4d380: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
4d386: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
4d38a: 2440 moveal %d0,%a2
if ( *block_entry_ptr )
4d38c: 4a92 tstl %a2@
4d38e: 670a beqs 4d39a <IMFS_memfile_addblock+0x2c>
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
4d390: 246e fffc moveal %fp@(-4),%a2
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 );
if ( *block_entry_ptr )
return 0;
4d394: 4280 clrl %d0
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
}
4d396: 4e5e unlk %fp 4d398: 4e75 rts
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
4d39a: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block>
if ( !memory )
4d3a0: 4a80 tstl %d0
4d3a2: 670c beqs 4d3b0 <IMFS_memfile_addblock+0x42> <== NEVER TAKEN
return 1;
*block_entry_ptr = memory;
4d3a4: 2480 movel %d0,%a2@
return 0;
}
4d3a6: 246e fffc moveal %fp@(-4),%a2
memory = memfile_alloc_block();
if ( !memory )
return 1;
*block_entry_ptr = memory;
return 0;
4d3aa: 4280 clrl %d0
}
4d3ac: 4e5e unlk %fp 4d3ae: 4e75 rts
4d3b0: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
return 1;
4d3b4: 7001 moveq #1,%d0 <== NOT EXECUTED
*block_entry_ptr = memory;
return 0;
}
4d3b6: 4e5e unlk %fp <== NOT EXECUTED
0004d56c <IMFS_memfile_extend>:
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4d56c: 4280 clrl %d0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4d56e: 4e56 ffdc linkw %fp,#-36 4d572: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4d576: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d57c: 2406 movel %d6,%d2 4d57e: e48a lsrl #2,%d2 4d580: 2802 movel %d2,%d4 4d582: 5284 addql #1,%d4 4d584: 4c02 4800 mulsl %d2,%d4
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4d588: 246e 0008 moveal %fp@(8),%a2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4d58c: 5284 addql #1,%d4 4d58e: 4c02 4800 mulsl %d2,%d4
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
4d592: 242e 000c movel %fp@(12),%d2 4d596: 262e 0010 movel %fp@(16),%d3
#if defined(RTEMS_DEBUG)
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
4d59a: 5384 subql #1,%d4 4d59c: 4c06 4800 mulsl %d6,%d4 4d5a0: 2204 movel %d4,%d1 4d5a2: 2800 movel %d0,%d4 4d5a4: 2a01 movel %d1,%d5 4d5a6: 9a83 subl %d3,%d5 4d5a8: 9982 subxl %d2,%d4 4d5aa: 6f00 00ae blew 4d65a <IMFS_memfile_extend+0xee>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
4d5ae: 282a 004c movel %a2@(76),%d4 4d5b2: 2a2a 0050 movel %a2@(80),%d5 4d5b6: 2002 movel %d2,%d0 4d5b8: 2203 movel %d3,%d1 4d5ba: 9285 subl %d5,%d1 4d5bc: 9184 subxl %d4,%d0
4d5be: 6f5e bles 4d61e <IMFS_memfile_extend+0xb2>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d5c0: 49f9 0005 a788 lea 5a788 <__divdi3>,%a4 4d5c6: 2e06 movel %d6,%d7 4d5c8: 5bc6 smi %d6 4d5ca: 49c6 extbl %d6 4d5cc: 2f07 movel %d7,%sp@- 4d5ce: 2f06 movel %d6,%sp@- 4d5d0: 2f03 movel %d3,%sp@- 4d5d2: 2f02 movel %d2,%sp@- 4d5d4: 4e94 jsr %a4@ 4d5d6: 4fef 0010 lea %sp@(16),%sp 4d5da: 2641 moveal %d1,%a3
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d5dc: 2f07 movel %d7,%sp@- 4d5de: 2f06 movel %d6,%sp@- 4d5e0: 2f05 movel %d5,%sp@- 4d5e2: 2f04 movel %d4,%sp@- 4d5e4: 4e94 jsr %a4@ 4d5e6: 4fef 0010 lea %sp@(16),%sp 4d5ea: 2c01 movel %d1,%d6
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4d5ec: b28b cmpl %a3,%d1
4d5ee: 621a bhis 4d60a <IMFS_memfile_extend+0x9e> <== NEVER TAKEN
4d5f0: 2801 movel %d1,%d4 4d5f2: 49f9 0004 d36e lea 4d36e <IMFS_memfile_addblock>,%a4
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
4d5f8: 2f04 movel %d4,%sp@- 4d5fa: 2f0a movel %a2,%sp@- 4d5fc: 4e94 jsr %a4@ 4d5fe: 508f addql #8,%sp 4d600: 4a80 tstl %d0
4d602: 6626 bnes 4d62a <IMFS_memfile_extend+0xbe> <== NEVER TAKEN
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
4d604: 5284 addql #1,%d4 4d606: b88b cmpl %a3,%d4
4d608: 63ee blss 4d5f8 <IMFS_memfile_extend+0x8c>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
4d60a: 4280 clrl %d0
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
4d60c: 2542 004c movel %d2,%a2@(76) 4d610: 2543 0050 movel %d3,%a2@(80)
return 0; }
4d614: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4d61a: 4e5e unlk %fp 4d61c: 4e75 rts
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( new_length <= the_jnode->info.file.size )
return 0;
4d61e: 4280 clrl %d0
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4d620: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4d626: 4e5e unlk %fp 4d628: 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-- ) {
4d62a: b886 cmpl %d6,%d4 <== NOT EXECUTED 4d62c: 6514 bcss 4d642 <IMFS_memfile_extend+0xd6> <== NOT EXECUTED 4d62e: 47f9 0004 d53a lea 4d53a <IMFS_memfile_remove_block>,%a3 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4d634: 2f04 movel %d4,%sp@- <== NOT EXECUTED
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
for ( ; block>=old_blocks ; block-- ) {
4d636: 5384 subql #1,%d4 <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
4d638: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d63a: 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-- ) {
4d63c: 508f addql #8,%sp <== NOT EXECUTED 4d63e: b886 cmpl %d6,%d4 <== NOT EXECUTED 4d640: 64f2 bccs 4d634 <IMFS_memfile_extend+0xc8> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
4d642: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4d648: 741c moveq #28,%d2 <== NOT EXECUTED 4d64a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d64c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4d64e: 2082 movel %d2,%a0@ <== NOT EXECUTED
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4d650: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4d656: 4e5e unlk %fp <== NOT EXECUTED 4d658: 4e75 rts <== NOT EXECUTED
assert( the_jnode );
assert( the_jnode->type == IMFS_MEMORY_FILE );
#endif
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
rtems_set_errno_and_return_minus_one( EINVAL );
4d65a: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4d660: 7616 moveq #22,%d3 4d662: 2040 moveal %d0,%a0 4d664: 70ff moveq #-1,%d0 4d666: 2083 movel %d3,%a0@
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
return 0;
}
4d668: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4
4d66e: 4e5e unlk %fp <== NOT EXECUTED
0004cf54 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4cf54: 4e56 fff0 linkw %fp,#-16
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4cf58: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1 4cf5e: e489 lsrl #2,%d1 4cf60: 2001 movel %d1,%d0 4cf62: 5380 subql #1,%d0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
4cf64: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4cf68: 246e 0008 moveal %fp@(8),%a2 4cf6c: 242e 000c movel %fp@(12),%d2 4cf70: 206e 0010 moveal %fp@(16),%a0
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
4cf74: b082 cmpl %d2,%d0
4cf76: 651e bcss 4cf96 <IMFS_memfile_get_block_pointer+0x42>
p = info->indirect;
4cf78: 226a 0054 moveal %a2@(84),%a1
if ( malloc_it ) {
4cf7c: 4a88 tstl %a0
4cf7e: 675c beqs 4cfdc <IMFS_memfile_get_block_pointer+0x88>
if ( !p ) {
4cf80: 4a89 tstl %a1 4cf82: 6700 00be beqw 4d042 <IMFS_memfile_get_block_pointer+0xee>
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4cf86: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4cf8a: 2009 movel %a1,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4cf8c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cf92: 4e5e unlk %fp 4cf94: 4e75 rts
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
4cf96: 2001 movel %d1,%d0 4cf98: 5280 addql #1,%d0 4cf9a: 4c01 0800 mulsl %d1,%d0 4cf9e: 2240 moveal %d0,%a1 4cfa0: 5389 subql #1,%a1 4cfa2: b3c2 cmpal %d2,%a1
4cfa4: 6546 bcss 4cfec <IMFS_memfile_get_block_pointer+0x98>
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
4cfa6: 9481 subl %d1,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
4cfa8: 226a 0058 moveal %a2@(88),%a1
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4cfac: 4c41 2003 remul %d1,%d3,%d2 4cfb0: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
p = info->doubly_indirect;
if ( malloc_it ) {
4cfb4: 4a88 tstl %a0 4cfb6: 6700 0132 beqw 4d0ea <IMFS_memfile_get_block_pointer+0x196>
if ( !p ) {
4cfba: 4a89 tstl %a1 4cfbc: 6700 009e beqw 4d05c <IMFS_memfile_get_block_pointer+0x108>
if ( !p )
return 0;
info->doubly_indirect = p;
}
p1 = (block_p *)p[ doubly ];
4cfc0: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4cfc4: 2052 moveal %a2@,%a0
if ( !p1 ) {
4cfc6: 4a88 tstl %a0 4cfc8: 6700 00b0 beqw 4d07a <IMFS_memfile_get_block_pointer+0x126>
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
4cfcc: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4cfd0: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4cfd2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4cfd8: 4e5e unlk %fp 4cfda: 4e75 rts
info->indirect = p;
}
return &info->indirect[ my_block ];
}
if ( !p )
4cfdc: 4a89 tstl %a1
4cfde: 66a6 bnes 4cf86 <IMFS_memfile_get_block_pointer+0x32><== ALWAYS TAKEN
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
if ( !p1 )
return 0;
4cfe0: 4280 clrl %d0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
4cfe2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 4cfe8: 4e5e unlk %fp <== NOT EXECUTED 4cfea: 4e75 rts <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
4cfec: 2600 movel %d0,%d3 4cfee: 5283 addql #1,%d3 4cff0: 4c01 3800 mulsl %d1,%d3 4cff4: 5383 subql #1,%d3 4cff6: b682 cmpl %d2,%d3
4cff8: 65e6 bcss 4cfe0 <IMFS_memfile_get_block_pointer+0x8c><== NEVER TAKEN
my_block -= FIRST_TRIPLY_INDIRECT;
4cffa: 9480 subl %d0,%d2
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
4cffc: 4c41 2004 remul %d1,%d4,%d2 4d000: 4c41 2002 remul %d1,%d2,%d2
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
4d004: 226a 005c moveal %a2@(92),%a1
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;
4d008: 4c41 2003 remul %d1,%d3,%d2 4d00c: 4c41 2002 remul %d1,%d2,%d2
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
p = info->triply_indirect;
if ( malloc_it ) {
4d010: 4a88 tstl %a0 4d012: 6700 00f0 beqw 4d104 <IMFS_memfile_get_block_pointer+0x1b0>
if ( !p ) {
4d016: 4a89 tstl %a1 4d018: 6700 00b0 beqw 4d0ca <IMFS_memfile_get_block_pointer+0x176>
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
4d01c: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d020: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d022: 4a88 tstl %a0 4d024: 6700 0086 beqw 4d0ac <IMFS_memfile_get_block_pointer+0x158>
if ( !p1 )
return 0;
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
4d028: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d02c: 2052 moveal %a2@,%a0
if ( !p2 ) {
4d02e: 4a88 tstl %a0
4d030: 6762 beqs 4d094 <IMFS_memfile_get_block_pointer+0x140><== NEVER TAKEN
p2 = memfile_alloc_block();
if ( !p2 )
return 0;
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
4d032: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d036: 2008 movel %a0,%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d038: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4d03e: 4e5e unlk %fp 4d040: 4e75 rts
p = info->indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d042: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d048: 2240 moveal %d0,%a1
if ( !p )
4d04a: 4a80 tstl %d0
4d04c: 6792 beqs 4cfe0 <IMFS_memfile_get_block_pointer+0x8c><== NEVER TAKEN
return 0;
info->indirect = p;
4d04e: 2540 0054 movel %d0,%a2@(84)
}
if ( !p )
return 0;
return &info->indirect[ my_block ];
4d052: 43f1 2c00 lea %a1@(00000000,%d2:l:4),%a1 4d056: 2009 movel %a1,%d0 4d058: 6000 ff32 braw 4cf8c <IMFS_memfile_get_block_pointer+0x38>
p = info->doubly_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d05c: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d062: 2240 moveal %d0,%a1
if ( !p )
4d064: 4a80 tstl %d0 4d066: 6700 ff78 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
info->doubly_indirect = p;
4d06a: 2540 0058 movel %d0,%a2@(88)
}
p1 = (block_p *)p[ doubly ];
4d06e: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d072: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d074: 4a88 tstl %a0 4d076: 6600 ff54 bnew 4cfcc <IMFS_memfile_get_block_pointer+0x78>
p1 = memfile_alloc_block();
4d07a: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d080: 2040 moveal %d0,%a0
if ( !p1 )
4d082: 4a80 tstl %d0 4d084: 6700 ff5a beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
p[ doubly ] = (block_p) p1;
4d088: 2480 movel %d0,%a2@
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
4d08a: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d08e: 2008 movel %a0,%d0 4d090: 6000 ff40 braw 4cfd2 <IMFS_memfile_get_block_pointer+0x7e>
p[ triply ] = (block_p) p1;
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
4d094: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d09a: 2040 moveal %d0,%a0
if ( !p2 )
4d09c: 4a80 tstl %d0 4d09e: 6700 ff40 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
p1[ doubly ] = (block_p) p2;
4d0a2: 2480 movel %d0,%a2@
}
return (block_p *)&p2[ singly ];
4d0a4: 41f0 4c00 lea %a0@(00000000,%d4:l:4),%a0 4d0a8: 2008 movel %a0,%d0 4d0aa: 608c bras 4d038 <IMFS_memfile_get_block_pointer+0xe4>
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
if ( !p1 ) {
p1 = memfile_alloc_block();
4d0ac: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d0b2: 2040 moveal %d0,%a0
if ( !p1 )
4d0b4: 4a80 tstl %d0 4d0b6: 6700 ff28 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
p[ triply ] = (block_p) p1;
4d0ba: 2480 movel %d0,%a2@
}
p2 = (block_p *)p1[ doubly ];
4d0bc: 45f0 3c00 lea %a0@(00000000,%d3:l:4),%a2 4d0c0: 2052 moveal %a2@,%a0
if ( !p2 ) {
4d0c2: 4a88 tstl %a0 4d0c4: 6600 ff6c bnew 4d032 <IMFS_memfile_get_block_pointer+0xde> 4d0c8: 60ca bras 4d094 <IMFS_memfile_get_block_pointer+0x140>
p = info->triply_indirect;
if ( malloc_it ) {
if ( !p ) {
p = memfile_alloc_block();
4d0ca: 4eb9 0004 cf30 jsr 4cf30 <memfile_alloc_block> 4d0d0: 2240 moveal %d0,%a1
if ( !p )
4d0d2: 4a80 tstl %d0 4d0d4: 6700 ff0a beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
info->triply_indirect = p;
4d0d8: 2540 005c movel %d0,%a2@(92)
}
p1 = (block_p *) p[ triply ];
4d0dc: 45f1 2c00 lea %a1@(00000000,%d2:l:4),%a2 4d0e0: 2052 moveal %a2@,%a0
if ( !p1 ) {
4d0e2: 4a88 tstl %a0 4d0e4: 6600 ff42 bnew 4d028 <IMFS_memfile_get_block_pointer+0xd4> 4d0e8: 60c2 bras 4d0ac <IMFS_memfile_get_block_pointer+0x158>
}
return (block_p *)&p1[ singly ];
}
if ( !p )
4d0ea: 4a89 tstl %a1 4d0ec: 6700 fef2 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
return 0;
p = (block_p *)p[ doubly ];
4d0f0: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p )
4d0f4: 4a88 tstl %a0 4d0f6: 6700 fee8 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
#if 0
fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly,
singly, p, &p[singly] );
fflush(stdout);
#endif
return (block_p *)&p[ singly ];
4d0fa: 41f0 3c00 lea %a0@(00000000,%d3:l:4),%a0 4d0fe: 2008 movel %a0,%d0 4d100: 6000 fed0 braw 4cfd2 <IMFS_memfile_get_block_pointer+0x7e>
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
4d104: 4a89 tstl %a1 4d106: 6700 fed8 beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
#if 0
fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly );
fflush(stdout);
#endif
p1 = (block_p *) p[ triply ];
4d10a: 2071 2c00 moveal %a1@(00000000,%d2:l:4),%a0
if ( !p1 )
4d10e: 4a88 tstl %a0 4d110: 6700 fece beqw 4cfe0 <IMFS_memfile_get_block_pointer+0x8c>
p2 = (block_p *)p1[ doubly ];
if ( !p )
return 0;
return (block_p *)&p2[ singly ];
4d114: 2004 movel %d4,%d0 4d116: e588 lsll #2,%d0 4d118: d0b0 3c00 addl %a0@(00000000,%d3:l:4),%d0
/*
* This means the requested block number is out of range.
*/
return 0;
}
4d11c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
4d122: 4e5e unlk %fp <== NOT EXECUTED
0004d126 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
4d126: 4e56 ffc0 linkw %fp,#-64 4d12a: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4d12e: 246e 0008 moveal %fp@(8),%a2 4d132: 266e 0014 moveal %fp@(20),%a3 4d136: 2e2e 0018 movel %fp@(24),%d7 4d13a: 242e 000c movel %fp@(12),%d2 4d13e: 262e 0010 movel %fp@(16),%d3
/*
* Error checks on arguments
*/
if ( !dest )
4d142: 4a8b tstl %a3 4d144: 6700 01ea beqw 4d330 <IMFS_memfile_read+0x20a>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
4d148: 4a87 tstl %d7 4d14a: 6700 01e4 beqw 4d330 <IMFS_memfile_read+0x20a>
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
4d14e: 7006 moveq #6,%d0 4d150: b0aa 0048 cmpl %a2@(72),%d0 4d154: 6700 013e beqw 4d294 <IMFS_memfile_read+0x16e>
/*
* 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;
4d158: 2043 moveal %d3,%a0 4d15a: 43f0 7800 lea %a0@(00000000,%d7:l),%a1
if ( last_byte > the_jnode->info.file.size )
4d15e: 99cc subal %a4,%a4 4d160: 2a49 moveal %a1,%a5 4d162: 282a 004c movel %a2@(76),%d4 4d166: 2a2a 0050 movel %a2@(80),%d5 4d16a: 200c movel %a4,%d0 4d16c: 220d movel %a5,%d1 4d16e: 9285 subl %d5,%d1 4d170: 9184 subxl %d4,%d0
4d172: 6f04 bles 4d178 <IMFS_memfile_read+0x52>
my_length = the_jnode->info.file.size - start;
4d174: 2e05 movel %d5,%d7 4d176: 9e83 subl %d3,%d7
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d178: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d17e: 2a06 movel %d6,%d5 4d180: 5bc4 smi %d4 4d182: 49c4 extbl %d4 4d184: 2f05 movel %d5,%sp@- 4d186: 2f04 movel %d4,%sp@- 4d188: 2f03 movel %d3,%sp@- 4d18a: 2f02 movel %d2,%sp@- 4d18c: 4eb9 0005 ab54 jsr 5ab54 <__moddi3> 4d192: 4fef 0010 lea %sp@(16),%sp 4d196: 2841 moveal %d1,%a4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d198: 2f05 movel %d5,%sp@- 4d19a: 2f04 movel %d4,%sp@- 4d19c: 2f03 movel %d3,%sp@- 4d19e: 2f02 movel %d2,%sp@- 4d1a0: 4eb9 0005 a788 jsr 5a788 <__divdi3> 4d1a6: 4fef 0010 lea %sp@(16),%sp 4d1aa: 2401 movel %d1,%d2
if ( start_offset ) {
4d1ac: 4a8c tstl %a4 4d1ae: 6700 00d0 beqw 4d280 <IMFS_memfile_read+0x15a>
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 );
4d1b2: 42a7 clrl %sp@- 4d1b4: 2f01 movel %d1,%sp@- 4d1b6: 2f0a movel %a2,%sp@- 4d1b8: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d1be: 4fef 000c lea %sp@(12),%sp 4d1c2: 4a80 tstl %d0 4d1c4: 6700 015e beqw 4d324 <IMFS_memfile_read+0x1fe>
*/
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;
4d1c8: 9c8c subl %a4,%d6 4d1ca: 2207 movel %d7,%d1 4d1cc: bc87 cmpl %d7,%d6 4d1ce: 6500 012a bcsw 4d2fa <IMFS_memfile_read+0x1d4>
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d1d2: 2f01 movel %d1,%sp@- 4d1d4: 2040 moveal %d0,%a0 4d1d6: d9d0 addal %a0@,%a4
dest += to_copy;
4d1d8: 280b movel %a3,%d4 4d1da: d881 addl %d1,%d4
block++;
my_length -= to_copy;
4d1dc: 9e81 subl %d1,%d7
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
block++;
4d1de: 5282 addql #1,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d1e0: 2f0c movel %a4,%sp@-
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d1e2: 2841 moveal %d1,%a4
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d1e4: 2f0b movel %a3,%sp@- 4d1e6: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4d1ec: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d1f2: 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 ) {
4d1f6: bc87 cmpl %d7,%d6
4d1f8: 623a bhis 4d234 <IMFS_memfile_read+0x10e>
4d1fa: 47f9 0004 cf54 lea 4cf54 <IMFS_memfile_get_block_pointer>,%a3
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4d200: 4bf9 0004 f2a0 lea 4f2a0 <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 );
4d206: 42a7 clrl %sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
4d208: 9e86 subl %d6,%d7
* 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 );
4d20a: 2f02 movel %d2,%sp@-
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
4d20c: 5282 addql #1,%d2
* 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 );
4d20e: 2f0a movel %a2,%sp@- 4d210: 4e93 jsr %a3@
if ( !block_ptr )
4d212: 4fef 000c lea %sp@(12),%sp 4d216: 4a80 tstl %d0
4d218: 676e beqs 4d288 <IMFS_memfile_read+0x162> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4d21a: 2040 moveal %d0,%a0
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d21c: d9c6 addal %d6,%a4
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4d21e: 2f06 movel %d6,%sp@- 4d220: 2f10 movel %a0@,%sp@- 4d222: 2f04 movel %d4,%sp@-
dest += to_copy;
4d224: d886 addl %d6,%d4
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
4d226: 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 ) {
4d228: 4fef 000c lea %sp@(12),%sp 4d22c: beb9 0005 f184 cmpl 5f184 <imfs_memfile_bytes_per_block>,%d7
4d232: 64d2 bccs 4d206 <IMFS_memfile_read+0xe0>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
if ( my_length ) {
4d234: 4a87 tstl %d7
4d236: 6728 beqs 4d260 <IMFS_memfile_read+0x13a>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4d238: 42a7 clrl %sp@- 4d23a: 2f02 movel %d2,%sp@- 4d23c: 2f0a movel %a2,%sp@- 4d23e: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d244: 4fef 000c lea %sp@(12),%sp 4d248: 4a80 tstl %d0
4d24a: 673c beqs 4d288 <IMFS_memfile_read+0x162> <== NEVER TAKEN
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4d24c: 2040 moveal %d0,%a0
copied += my_length;
4d24e: d9c7 addal %d7,%a4
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
4d250: 2f07 movel %d7,%sp@- 4d252: 2f10 movel %a0@,%sp@- 4d254: 2f04 movel %d4,%sp@- 4d256: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
copied += my_length;
4d25c: 4fef 000c lea %sp@(12),%sp
}
IMFS_update_atime( the_jnode );
4d260: 42a7 clrl %sp@- 4d262: 486e fff8 pea %fp@(-8) 4d266: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4d26c: 256e fff8 003c movel %fp@(-8),%a2@(60)
return copied;
4d272: 200c movel %a4,%d0 4d274: 508f addql #8,%sp
}
4d276: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4d27c: 4e5e unlk %fp 4d27e: 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 ) {
4d280: 280b movel %a3,%d4
last_byte = start + length;
if ( last_byte > the_jnode->info.file.size )
my_length = the_jnode->info.file.size - start;
copied = 0;
4d282: 99cc subal %a4,%a4 4d284: 6000 ff70 braw 4d1f6 <IMFS_memfile_read+0xd0>
#endif
if ( my_length ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4d288: 200c movel %a4,%d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d28a: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d290: 4e5e unlk %fp <== NOT EXECUTED 4d292: 4e75 rts <== NOT EXECUTED
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
4d294: 91c8 subal %a0,%a0 4d296: 202a 004c movel %a2@(76),%d0 4d29a: 222a 0050 movel %a2@(80),%d1 4d29e: 2d47 fff4 movel %d7,%fp@(-12)
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
4d2a2: 286a 0054 moveal %a2@(84),%a4
if (my_length > (the_jnode->info.linearfile.size - start))
4d2a6: 2d48 fff0 movel %a0,%fp@(-16) 4d2aa: 2d40 ffe8 movel %d0,%fp@(-24) 4d2ae: 2d41 ffec movel %d1,%fp@(-20) 4d2b2: 9283 subl %d3,%d1 4d2b4: 9182 subxl %d2,%d0 4d2b6: 282e fff0 movel %fp@(-16),%d4 4d2ba: 2a2e fff4 movel %fp@(-12),%d5 4d2be: 9a81 subl %d1,%d5 4d2c0: 9980 subxl %d0,%d4
4d2c2: 6f06 bles 4d2ca <IMFS_memfile_read+0x1a4> <== NEVER TAKEN
my_length = the_jnode->info.linearfile.size - start;
4d2c4: 2e2e ffec movel %fp@(-20),%d7 4d2c8: 9e83 subl %d3,%d7
memcpy(dest, &file_ptr[start], my_length);
4d2ca: 2f07 movel %d7,%sp@- 4d2cc: 4874 3800 pea %a4@(00000000,%d3:l) 4d2d0: 2f0b movel %a3,%sp@- 4d2d2: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
IMFS_update_atime( the_jnode );
4d2d8: 42a7 clrl %sp@- 4d2da: 486e fff8 pea %fp@(-8) 4d2de: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4d2e4: 256e fff8 003c movel %fp@(-8),%a2@(60)
return my_length;
4d2ea: 2007 movel %d7,%d0 4d2ec: 4fef 0014 lea %sp@(20),%sp
}
IMFS_update_atime( the_jnode );
return copied;
}
4d2f0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 4d2f6: 4e5e unlk %fp 4d2f8: 4e75 rts
*/
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;
4d2fa: 2206 movel %d6,%d1
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d2fc: 2040 moveal %d0,%a0
dest += to_copy;
4d2fe: 280b movel %a3,%d4 4d300: d881 addl %d1,%d4
block++;
my_length -= to_copy;
4d302: 9e81 subl %d1,%d7
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
dest += to_copy;
block++;
4d304: 5282 addql #1,%d2
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d306: 2f01 movel %d1,%sp@- 4d308: d9d0 addal %a0@,%a4 4d30a: 2f0c movel %a4,%sp@-
dest += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d30c: 2841 moveal %d1,%a4
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
4d30e: 2f0b movel %a3,%sp@- 4d310: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
dest += to_copy;
block++;
my_length -= to_copy;
4d316: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d31c: 4fef 000c lea %sp@(12),%sp 4d320: 6000 fed4 braw 4d1f6 <IMFS_memfile_read+0xd0>
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4d324: 4280 clrl %d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d326: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d32c: 4e5e unlk %fp <== NOT EXECUTED 4d32e: 4e75 rts <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
4d330: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4d336: 7216 moveq #22,%d1 <== NOT EXECUTED 4d338: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d33a: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d33c: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 <== NOT EXECUTED
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
rtems_set_errno_and_return_minus_one( EINVAL );
4d342: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
IMFS_update_atime( the_jnode );
return copied;
}
4d344: 4e5e unlk %fp <== NOT EXECUTED
0004d420 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4d420: 4e56 ffe0 linkw %fp,#-32 4d424: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@
/*
* Eventually this could be set smarter at each call to
* memfile_free_blocks_in_table to greatly speed this up.
*/
to_free = IMFS_MEMFILE_BLOCK_SLOTS;
4d428: 2839 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d4 4d42e: e48c lsrl #2,%d4
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
4d430: 286e 0008 moveal %fp@(8),%a4
* + triply indirect
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
4d434: 4aac 0054 tstl %a4@(84)
4d438: 670e beqs 4d448 <IMFS_memfile_remove+0x28>
memfile_free_blocks_in_table( &info->indirect, to_free );
4d43a: 2f04 movel %d4,%sp@- 4d43c: 486c 0054 pea %a4@(84) 4d440: 4eb9 0004 d3d4 jsr 4d3d4 <memfile_free_blocks_in_table> 4d446: 508f addql #8,%sp
}
if ( info->doubly_indirect ) {
4d448: 206c 0058 moveal %a4@(88),%a0 4d44c: 4a88 tstl %a0
4d44e: 6750 beqs 4d4a0 <IMFS_memfile_remove+0x80> <== ALWAYS TAKEN
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4d450: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4d456: 2001 movel %d1,%d0 <== NOT EXECUTED 4d458: e488 lsrl #2,%d0 <== NOT EXECUTED 4d45a: 47f9 0004 d3d4 lea 4d3d4 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 4d460: 6734 beqs 4d496 <IMFS_memfile_remove+0x76> <== NOT EXECUTED 4d462: 4280 clrl %d0 <== NOT EXECUTED 4d464: 4282 clrl %d2 <== NOT EXECUTED 4d466: 47f9 0004 d3d4 lea 4d3d4 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 4d46c: 5282 addql #1,%d2 <== NOT EXECUTED
if ( info->doubly_indirect[i] ) {
4d46e: e588 lsll #2,%d0 <== NOT EXECUTED 4d470: 4ab0 0800 tstl %a0@(00000000,%d0:l) <== NOT EXECUTED 4d474: 6710 beqs 4d486 <IMFS_memfile_remove+0x66> <== NOT EXECUTED
memfile_free_blocks_in_table(
4d476: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d478: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 4d47c: 4e93 jsr %a3@ <== NOT EXECUTED 4d47e: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4d484: 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++ ) {
4d486: 2601 movel %d1,%d3 <== NOT EXECUTED 4d488: 2002 movel %d2,%d0 <== NOT EXECUTED 4d48a: e48b lsrl #2,%d3 <== NOT EXECUTED 4d48c: b483 cmpl %d3,%d2 <== NOT EXECUTED 4d48e: 6406 bccs 4d496 <IMFS_memfile_remove+0x76> <== NOT EXECUTED 4d490: 206c 0058 moveal %a4@(88),%a0 <== NOT EXECUTED 4d494: 60d6 bras 4d46c <IMFS_memfile_remove+0x4c> <== 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 );
4d496: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d498: 486c 0058 pea %a4@(88) <== NOT EXECUTED 4d49c: 4e93 jsr %a3@ <== NOT EXECUTED 4d49e: 508f addql #8,%sp <== NOT EXECUTED
}
if ( info->triply_indirect ) {
4d4a0: 206c 005c moveal %a4@(92),%a0 4d4a4: 4a88 tstl %a0 4d4a6: 6700 0086 beqw 4d52e <IMFS_memfile_remove+0x10e>
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
4d4aa: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4d4b0: 2001 movel %d1,%d0 <== NOT EXECUTED 4d4b2: e488 lsrl #2,%d0 <== NOT EXECUTED 4d4b4: 47f9 0004 d3d4 lea 4d3d4 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED 4d4ba: 6768 beqs 4d524 <IMFS_memfile_remove+0x104> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
4d4bc: 2450 moveal %a0@,%a2 <== NOT EXECUTED 4d4be: 47f9 0004 d3d4 lea 4d3d4 <memfile_free_blocks_in_table>,%a3<== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4d4c4: 4a8a tstl %a2 <== NOT EXECUTED 4d4c6: 675c beqs 4d524 <IMFS_memfile_remove+0x104> <== NOT EXECUTED
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
4d4c8: 4286 clrl %d6 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4d4ca: 4285 clrl %d5 <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
4d4cc: 4a80 tstl %d0 <== NOT EXECUTED 4d4ce: 6728 beqs 4d4f8 <IMFS_memfile_remove+0xd8> <== NOT EXECUTED 4d4d0: 4280 clrl %d0 <== NOT EXECUTED 4d4d2: 4282 clrl %d2 <== NOT EXECUTED 4d4d4: 5282 addql #1,%d2 <== NOT EXECUTED
if ( p[j] ) {
4d4d6: e588 lsll #2,%d0 <== NOT EXECUTED 4d4d8: 4ab2 0800 tstl %a2@(00000000,%d0:l) <== NOT EXECUTED 4d4dc: 6710 beqs 4d4ee <IMFS_memfile_remove+0xce> <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
4d4de: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d4e0: 4872 0800 pea %a2@(00000000,%d0:l) <== NOT EXECUTED 4d4e4: 4e93 jsr %a3@ <== NOT EXECUTED 4d4e6: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4d4ec: 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++ ) {
4d4ee: 2601 movel %d1,%d3 <== NOT EXECUTED 4d4f0: 2002 movel %d2,%d0 <== NOT EXECUTED 4d4f2: e48b lsrl #2,%d3 <== NOT EXECUTED 4d4f4: b682 cmpl %d2,%d3 <== NOT EXECUTED 4d4f6: 62dc bhis 4d4d4 <IMFS_memfile_remove+0xb4> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
4d4f8: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d4fa: 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++ ) {
4d4fe: 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(
4d500: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4d502: 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++ ) {
4d504: 2239 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d1<== NOT EXECUTED 4d50a: 2001 movel %d1,%d0 <== NOT EXECUTED 4d50c: 508f addql #8,%sp <== NOT EXECUTED 4d50e: e488 lsrl #2,%d0 <== NOT EXECUTED 4d510: ba80 cmpl %d0,%d5 <== NOT EXECUTED 4d512: 6410 bccs 4d524 <IMFS_memfile_remove+0x104> <== NOT EXECUTED
p = (block_p *) info->triply_indirect[i];
if ( !p ) /* ensure we have a valid pointer */
4d514: 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];
4d516: 206c 005c moveal %a4@(92),%a0 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4d51a: 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];
4d51c: 2470 6800 moveal %a0@(00000000,%d6:l),%a2 <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
4d520: 4a8a tstl %a2 <== NOT EXECUTED 4d522: 66a8 bnes 4d4cc <IMFS_memfile_remove+0xac> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
4d524: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d526: 486c 005c pea %a4@(92) <== NOT EXECUTED 4d52a: 4e93 jsr %a3@ <== NOT EXECUTED 4d52c: 508f addql #8,%sp <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
4d52e: 4280 clrl %d0 4d530: 4cee 1c7c ffe0 moveml %fp@(-32),%d2-%d6/%a2-%a4
4d536: 4e5e unlk %fp <== NOT EXECUTED
0004d53a <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
4d53a: 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 );
4d53e: 42a7 clrl %sp@- <== NOT EXECUTED 4d540: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4d544: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 4d548: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( block_ptr );
#endif
if ( block_ptr ) {
4d54e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d552: 4a80 tstl %d0 <== NOT EXECUTED 4d554: 6710 beqs 4d566 <IMFS_memfile_remove_block+0x2c> <== NOT EXECUTED
ptr = *block_ptr;
4d556: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d558: 2210 movel %a0@,%d1 <== NOT EXECUTED
*block_ptr = 0;
4d55a: 4290 clrl %a0@ <== NOT EXECUTED
memfile_free_block( ptr );
4d55c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d55e: 4eb9 0004 d3ba jsr 4d3ba <memfile_free_block> <== NOT EXECUTED 4d564: 588f addql #4,%sp <== NOT EXECUTED
}
return 1;
}
4d566: 7001 moveq #1,%d0 <== NOT EXECUTED 4d568: 4e5e unlk %fp <== NOT EXECUTED
0004d672 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
4d672: 4e56 ffd4 linkw %fp,#-44 4d676: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 4d67a: 246e 0008 moveal %fp@(8),%a2 4d67e: 266e 0014 moveal %fp@(20),%a3 4d682: 2e2e 0018 movel %fp@(24),%d7 4d686: 242e 000c movel %fp@(12),%d2 4d68a: 262e 0010 movel %fp@(16),%d3
/*
* Error check arguments
*/
if ( !source )
4d68e: 4a8b tstl %a3 4d690: 6700 019c beqw 4d82e <IMFS_memfile_write+0x1bc>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
4d694: 4a87 tstl %d7 4d696: 6700 0196 beqw 4d82e <IMFS_memfile_write+0x1bc>
/*
* 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;
4d69a: 2047 moveal %d7,%a0 4d69c: d1c3 addal %d3,%a0
if ( last_byte > the_jnode->info.file.size ) {
4d69e: 2208 movel %a0,%d1 4d6a0: 4280 clrl %d0 4d6a2: 282a 004c movel %a2@(76),%d4 4d6a6: 2a2a 0050 movel %a2@(80),%d5 4d6aa: 9a81 subl %d1,%d5 4d6ac: 9980 subxl %d0,%d4 4d6ae: 6d00 0116 bltw 4d7c6 <IMFS_memfile_write+0x154>
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
4d6b2: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d6b8: 2a06 movel %d6,%d5 4d6ba: 5bc4 smi %d4 4d6bc: 49c4 extbl %d4 4d6be: 2f05 movel %d5,%sp@- 4d6c0: 2f04 movel %d4,%sp@- 4d6c2: 2f03 movel %d3,%sp@- 4d6c4: 2f02 movel %d2,%sp@- 4d6c6: 4eb9 0005 ab54 jsr 5ab54 <__moddi3> 4d6cc: 4fef 0010 lea %sp@(16),%sp 4d6d0: 2841 moveal %d1,%a4
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
4d6d2: 2f05 movel %d5,%sp@- 4d6d4: 2f04 movel %d4,%sp@- 4d6d6: 2f03 movel %d3,%sp@- 4d6d8: 2f02 movel %d2,%sp@- 4d6da: 4eb9 0005 a788 jsr 5a788 <__divdi3> 4d6e0: 4fef 0010 lea %sp@(16),%sp 4d6e4: 2401 movel %d1,%d2
if ( start_offset ) {
4d6e6: 4a8c tstl %a4 4d6e8: 6700 00d4 beqw 4d7be <IMFS_memfile_write+0x14c>
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 );
4d6ec: 42a7 clrl %sp@- 4d6ee: 2f01 movel %d1,%sp@- 4d6f0: 2f0a movel %a2,%sp@- 4d6f2: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d6f8: 4fef 000c lea %sp@(12),%sp 4d6fc: 4a80 tstl %d0 4d6fe: 6700 0120 beqw 4d820 <IMFS_memfile_write+0x1ae>
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
if ( start_offset ) {
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
4d702: 9c8c subl %a4,%d6 4d704: be86 cmpl %d6,%d7 4d706: 6500 00ee bcsw 4d7f6 <IMFS_memfile_write+0x184>
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4d70a: 2f06 movel %d6,%sp@- 4d70c: 2040 moveal %d0,%a0
src += to_copy;
4d70e: 280b movel %a3,%d4 4d710: d886 addl %d6,%d4
block++;
my_length -= to_copy;
4d712: 9e86 subl %d6,%d7
copied += to_copy;
4d714: 2606 movel %d6,%d3
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4d716: 5282 addql #1,%d2
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4d718: 2f0b movel %a3,%sp@- 4d71a: d9d0 addal %a0@,%a4 4d71c: 2f0c movel %a4,%sp@- 4d71e: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d724: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6 4d72a: 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 ) {
4d72e: bc87 cmpl %d7,%d6
4d730: 623a bhis 4d76c <IMFS_memfile_write+0xfa>
4d732: 47f9 0004 cf54 lea 4cf54 <IMFS_memfile_get_block_pointer>,%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 );
4d738: 49f9 0004 f2a0 lea 4f2a0 <memcpy>,%a4
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4d73e: 42a7 clrl %sp@-
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
my_length -= to_copy;
4d740: 9e86 subl %d6,%d7
* 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 );
4d742: 2f02 movel %d2,%sp@-
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
src += to_copy;
block++;
4d744: 5282 addql #1,%d2
* 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 );
4d746: 2f0a movel %a2,%sp@- 4d748: 4e93 jsr %a3@
if ( !block_ptr )
4d74a: 4fef 000c lea %sp@(12),%sp 4d74e: 4a80 tstl %d0
4d750: 6760 beqs 4d7b2 <IMFS_memfile_write+0x140> <== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, to_copy );
4d752: 2f06 movel %d6,%sp@- 4d754: 2040 moveal %d0,%a0
*
* 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(
4d756: d686 addl %d6,%d3
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 );
4d758: 2f04 movel %d4,%sp@- 4d75a: 2f10 movel %a0@,%sp@-
src += to_copy;
4d75c: d886 addl %d6,%d4
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 );
4d75e: 4e94 jsr %a4@
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
4d760: 4fef 000c lea %sp@(12),%sp 4d764: beb9 0005 f184 cmpl 5f184 <imfs_memfile_bytes_per_block>,%d7
4d76a: 64d2 bccs 4d73e <IMFS_memfile_write+0xcc>
#if defined(RTEMS_DEBUG)
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
#endif
to_copy = my_length;
if ( my_length ) {
4d76c: 4a87 tstl %d7
4d76e: 6728 beqs 4d798 <IMFS_memfile_write+0x126>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
4d770: 42a7 clrl %sp@- 4d772: 2f02 movel %d2,%sp@- 4d774: 2f0a movel %a2,%sp@- 4d776: 4eb9 0004 cf54 jsr 4cf54 <IMFS_memfile_get_block_pointer>
if ( !block_ptr )
4d77c: 4fef 000c lea %sp@(12),%sp 4d780: 4a80 tstl %d0
4d782: 672e beqs 4d7b2 <IMFS_memfile_write+0x140> <== NEVER TAKEN
return copied;
#if 0
fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src );
#endif
memcpy( &(*block_ptr)[ 0 ], src, my_length );
4d784: 2f07 movel %d7,%sp@- 4d786: 2040 moveal %d0,%a0
my_length = 0;
copied += to_copy;
4d788: d687 addl %d7,%d3
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 );
4d78a: 2f04 movel %d4,%sp@- 4d78c: 2f10 movel %a0@,%sp@- 4d78e: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
my_length = 0;
copied += to_copy;
4d794: 4fef 000c lea %sp@(12),%sp
}
IMFS_mtime_ctime_update( the_jnode );
4d798: 42a7 clrl %sp@- 4d79a: 486e fff8 pea %fp@(-8) 4d79e: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4d7a4: 202e fff8 movel %fp@(-8),%d0
return copied;
4d7a8: 508f addql #8,%sp
memcpy( &(*block_ptr)[ 0 ], src, my_length );
my_length = 0;
copied += to_copy;
}
IMFS_mtime_ctime_update( the_jnode );
4d7aa: 2540 0040 movel %d0,%a2@(64) 4d7ae: 2540 0044 movel %d0,%a2@(68)
return copied;
}
4d7b2: 2003 movel %d3,%d0 4d7b4: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 4d7ba: 4e5e unlk %fp 4d7bc: 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 ) {
4d7be: 280b movel %a3,%d4
status = IMFS_memfile_extend( the_jnode, last_byte );
if ( status )
rtems_set_errno_and_return_minus_one( ENOSPC );
}
copied = 0;
4d7c0: 4283 clrl %d3 4d7c2: 6000 ff6a braw 4d72e <IMFS_memfile_write+0xbc>
* 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 );
4d7c6: 2f08 movel %a0,%sp@- 4d7c8: 2f00 movel %d0,%sp@- 4d7ca: 2f0a movel %a2,%sp@- 4d7cc: 4eb9 0004 d56c jsr 4d56c <IMFS_memfile_extend>
if ( status )
4d7d2: 4fef 000c lea %sp@(12),%sp 4d7d6: 4a80 tstl %d0 4d7d8: 6700 fed8 beqw 4d6b2 <IMFS_memfile_write+0x40>
rtems_set_errno_and_return_minus_one( ENOSPC );
4d7dc: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4d7e2: 76ff moveq #-1,%d3 4d7e4: 781c moveq #28,%d4 4d7e6: 2040 moveal %d0,%a0
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4d7e8: 2003 movel %d3,%d0
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 );
4d7ea: 2084 movel %d4,%a0@
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4d7ec: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 4d7f2: 4e5e unlk %fp 4d7f4: 4e75 rts
*/
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;
4d7f6: 2c07 movel %d7,%d6 <== NOT EXECUTED
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4d7f8: 2040 moveal %d0,%a0 <== NOT EXECUTED
src += to_copy;
4d7fa: 280b movel %a3,%d4 <== NOT EXECUTED 4d7fc: d886 addl %d6,%d4 <== NOT EXECUTED
block++;
my_length -= to_copy;
4d7fe: 9e86 subl %d6,%d7 <== NOT EXECUTED
copied += to_copy;
4d800: 2606 movel %d6,%d3 <== NOT EXECUTED
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
src += to_copy;
block++;
4d802: 5282 addql #1,%d2 <== NOT EXECUTED
block,
to_copy,
src
);
#endif
memcpy( &(*block_ptr)[ start_offset ], src, to_copy );
4d804: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4d806: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4d808: d9d0 addal %a0@,%a4 <== NOT EXECUTED 4d80a: 2f0c movel %a4,%sp@- <== NOT EXECUTED 4d80c: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy> <== NOT EXECUTED
src += to_copy;
block++;
my_length -= to_copy;
copied += to_copy;
4d812: 2c39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%d6<== NOT EXECUTED 4d818: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4d81c: 6000 ff10 braw 4d72e <IMFS_memfile_write+0xbc> <== NOT EXECUTED
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset;
if ( to_copy > my_length )
to_copy = my_length;
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
if ( !block_ptr )
return copied;
4d820: 4283 clrl %d3 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4d822: 2003 movel %d3,%d0 <== NOT EXECUTED 4d824: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4d82a: 4e5e unlk %fp <== NOT EXECUTED 4d82c: 4e75 rts <== 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 );
4d82e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4d834: 76ff moveq #-1,%d3 <== NOT EXECUTED 4d836: 7a16 moveq #22,%d5 <== NOT EXECUTED 4d838: 2040 moveal %d0,%a0 <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4d83a: 2003 movel %d3,%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 );
4d83c: 2085 movel %d5,%a0@ <== NOT EXECUTED
}
IMFS_mtime_ctime_update( the_jnode );
return copied;
}
4d83e: 4cee 1cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4d844: 4e5e unlk %fp <== NOT EXECUTED
00042344 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42344: 4e56 ffb0 linkw %fp,#-80 42348: 48d7 007c moveml %d2-%d6,%sp@ 4234c: 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 );
42350: 260e movel %fp,%d3 42352: 0683 ffff ffc7 addil #-57,%d3 42358: 2f02 movel %d2,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
4235a: 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 );
4235e: 4eb9 0004 fe4c jsr 4fe4c <strlen> 42364: 588f addql #4,%sp 42366: 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 */
)
{
4236a: 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 );
4236e: 2f03 movel %d3,%sp@-
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
42370: 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 );
42374: 2f00 movel %d0,%sp@- 42376: 2f02 movel %d2,%sp@- 42378: 4eb9 0004 ac2c jsr 4ac2c <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
4237e: 4fef 0010 lea %sp@(16),%sp 42382: 2004 movel %d4,%d0 42384: 0280 0000 f000 andil #61440,%d0 4238a: 0c80 0000 4000 cmpil #16384,%d0
42390: 675a beqs 423ec <IMFS_mknod+0xa8>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
42392: 0c80 0000 8000 cmpil #32768,%d0
42398: 674e beqs 423e8 <IMFS_mknod+0xa4>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
4239a: 0c80 0000 6000 cmpil #24576,%d0
423a0: 673a beqs 423dc <IMFS_mknod+0x98>
423a2: 0c80 0000 2000 cmpil #8192,%d0
423a8: 6732 beqs 423dc <IMFS_mknod+0x98>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
423aa: 0c80 0000 1000 cmpil #4096,%d0
423b0: 663e bnes 423f0 <IMFS_mknod+0xac> <== NEVER TAKEN
type = IMFS_FIFO;
423b2: 7007 moveq #7,%d0
* was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node(
423b4: 486e ffe8 pea %fp@(-24) 423b8: 2f04 movel %d4,%sp@- 423ba: 2f03 movel %d3,%sp@- 423bc: 2f00 movel %d0,%sp@- 423be: 2f2e 0018 movel %fp@(24),%sp@- 423c2: 4eb9 0004 a12a jsr 4a12a <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
423c8: 4fef 0014 lea %sp@(20),%sp 423cc: 4a80 tstl %d0
423ce: 6738 beqs 42408 <IMFS_mknod+0xc4>
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
423d0: 4280 clrl %d0
}
423d2: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 423d8: 4e5e unlk %fp 423da: 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 );
423dc: 2d46 ffe8 movel %d6,%fp@(-24)
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
type = IMFS_DEVICE;
423e0: 7002 moveq #2,%d0
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
423e2: 2d45 ffec movel %d5,%fp@(-20) 423e6: 60cc bras 423b4 <IMFS_mknod+0x70>
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
type = IMFS_MEMORY_FILE;
423e8: 7005 moveq #5,%d0 423ea: 60c8 bras 423b4 <IMFS_mknod+0x70>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
type = IMFS_DIRECTORY;
423ec: 7001 moveq #1,%d0 423ee: 60c4 bras 423b4 <IMFS_mknod+0x70>
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 );
423f0: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 423f6: 7416 moveq #22,%d2 <== NOT EXECUTED 423f8: 2040 moveal %d0,%a0 <== NOT EXECUTED 423fa: 70ff moveq #-1,%d0 <== NOT EXECUTED 423fc: 2082 movel %d2,%a0@ <== NOT EXECUTED
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
return 0;
}
423fe: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6 <== NOT EXECUTED 42404: 4e5e unlk %fp <== NOT EXECUTED 42406: 4e75 rts <== NOT EXECUTED
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
42408: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4240e: 720c moveq #12,%d1 42410: 2040 moveal %d0,%a0 42412: 70ff moveq #-1,%d0
return 0;
}
42414: 4cee 007c ffb0 moveml %fp@(-80),%d2-%d6
mode,
&info
);
if ( !new_node )
rtems_set_errno_and_return_minus_one( ENOMEM );
4241a: 2081 movel %d1,%a0@
return 0;
}
4241c: 4e5e unlk %fp <== NOT EXECUTED
00042420 <IMFS_mount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
42420: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
42422: 4e56 0000 linkw %fp,#0 42426: 226e 0008 moveal %fp@(8),%a1
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
4242a: 2069 0008 moveal %a1@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
4242e: b0a8 0048 cmpl %a0@(72),%d0
42432: 660a bnes 4243e <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;
42434: 2149 0058 movel %a1,%a0@(88)
return 0;
42438: 4280 clrl %d0
}
4243a: 4e5e unlk %fp 4243c: 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 );
4243e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 42444: 7214 moveq #20,%d1 <== NOT EXECUTED 42446: 2040 moveal %d0,%a0 <== NOT EXECUTED 42448: 70ff moveq #-1,%d0 <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
4244a: 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 );
4244c: 2081 movel %d1,%a0@ <== NOT EXECUTED
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
return 0;
}
00044104 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
44104: 4e56 0000 linkw %fp,#0
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
44108: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
4410e: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
44110: 2f28 0008 movel %a0@(8),%sp@-
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
44114: 246e 0008 moveal %fp@(8),%a2
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
44118: 486a 000c pea %a2@(12) 4411c: 4eb9 0005 2600 jsr 52600 <fputs>
switch( the_jnode->type ) {
44122: 202a 0048 movel %a2@(72),%d0 44126: 508f addql #8,%sp 44128: 7207 moveq #7,%d1 4412a: b280 cmpl %d0,%d1
4412c: 6424 bccs 44152 <IMFS_print_jnode+0x4e> <== ALWAYS TAKEN
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
4412e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44130: 4879 0006 1ec7 pea 61ec7 <IntUartPollCallbacks.6236+0x75> <== NOT EXECUTED 44136: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 <== NOT EXECUTED 4413c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44140: 4eb9 0005 24b2 jsr 524b2 <fprintf> <== NOT EXECUTED
return;
}
puts("");
}
44146: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, " FIFO not printed\n" );
return;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
4414a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
puts("");
}
4414e: 4e5e unlk %fp <== NOT EXECUTED 44150: 4e75 rts <== NOT EXECUTED
#if defined(RTEMS_DEBUG)
assert( the_jnode );
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
44152: 323b 0a08 movew %pc@(4415c <IMFS_print_jnode+0x58>,%d0:l:2),%d1 44156: 48c1 extl %d1 44158: 4efb 1802 jmp %pc@(4415c <IMFS_print_jnode+0x58>,%d1:l)
4415c: ffd2 0177722 <== NOT EXECUTED 4415e: 003a 072 <== NOT EXECUTED 44160: 0066 0146 <== NOT EXECUTED 44162: 0010 020 <== NOT EXECUTED 44164: 0010 020 <== NOT EXECUTED 44166: 009e 00d2 010a oril #13762826,%d6 <== NOT EXECUTED
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
4416c: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 <== NOT EXECUTED 44172: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44176: 4878 0013 pea 13 <INVALID_OPERATION+0x3> <== NOT EXECUTED 4417a: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4417e: 4879 0006 1ea0 pea 61ea0 <IntUartPollCallbacks.6236+0x4e> <== NOT EXECUTED 44184: 4eb9 0005 3170 jsr 53170 <fwrite> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4418a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
return;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
4418e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
44192: 4e5e unlk %fp <== NOT EXECUTED 44194: 4e75 rts <== NOT EXECUTED
#endif
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
44196: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 4419c: 2f28 0008 movel %a0@(8),%sp@- 441a0: 4878 002f pea 2f <OPER2+0x1b> 441a4: 4eb9 0005 2530 jsr 52530 <fputc>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
441aa: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441ae: 203c 0006 2508 movel #402696,%d0
fprintf(stdout, "%s", the_jnode->name );
switch( the_jnode->type ) {
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
441b4: 508f addql #8,%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441b6: 2d40 0008 movel %d0,%fp@(8)
}
441ba: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441bc: 4ef9 0005 3ed2 jmp 53ed2 <puts>
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
441c2: 2f2a 0050 movel %a2@(80),%sp@- 441c6: 2f2a 004c movel %a2@(76),%sp@- 441ca: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 441d0: 4879 0006 1e72 pea 61e72 <IntUartPollCallbacks.6236+0x20> 441d6: 2f28 0008 movel %a0@(8),%sp@- 441da: 4eb9 0005 24b2 jsr 524b2 <fprintf>
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
441e0: 246e fffc moveal %fp@(-4),%a2
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441e4: 203c 0006 2508 movel #402696,%d0
break;
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
441ea: 4fef 0010 lea %sp@(16),%sp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441ee: 2d40 0008 movel %d0,%fp@(8)
}
441f2: 4e5e unlk %fp
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
441f4: 4ef9 0005 3ed2 jmp 53ed2 <puts>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
441fa: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 441fe: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 <== NOT EXECUTED 44204: 4879 0006 1e94 pea 61e94 <IntUartPollCallbacks.6236+0x42> <== NOT EXECUTED 4420a: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 4420e: 4eb9 0005 24b2 jsr 524b2 <fprintf> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
44214: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
44218: 203c 0006 2508 movel #402696,%d0 <== NOT EXECUTED
);
#else
fprintf(stdout, " (file %" PRId32 ")",
(uint32_t)the_jnode->info.file.size );
#endif
break;
4421e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
44222: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
44226: 4e5e unlk %fp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
44228: 4ef9 0005 3ed2 jmp 53ed2 <puts> <== 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)",
4422e: 2f2a 0054 movel %a2@(84),%sp@- <== NOT EXECUTED 44232: 2f2a 0050 movel %a2@(80),%sp@- <== NOT EXECUTED 44236: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 <== NOT EXECUTED 4423c: 4879 0006 1e85 pea 61e85 <IntUartPollCallbacks.6236+0x33> <== NOT EXECUTED 44242: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44246: 4eb9 0005 24b2 jsr 524b2 <fprintf> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4424c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
44250: 203c 0006 2508 movel #402696,%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;
44256: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
4425a: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
4425e: 4e5e unlk %fp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
44260: 4ef9 0005 3ed2 jmp 53ed2 <puts> <== NOT EXECUTED
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
44266: 2079 0006 3694 moveal 63694 <_impure_ptr>,%a0 <== NOT EXECUTED 4426c: 2f28 0008 movel %a0@(8),%sp@- <== NOT EXECUTED 44270: 4878 0012 pea 12 <INVALID_OPERATION+0x2> <== NOT EXECUTED 44274: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44278: 4879 0006 1eb4 pea 61eb4 <IntUartPollCallbacks.6236+0x62> <== NOT EXECUTED 4427e: 4eb9 0005 3170 jsr 53170 <fwrite> <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
44284: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
fprintf(stdout, " links not printed\n" );
return;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
return;
44288: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
return;
}
puts("");
}
4428c: 4e5e unlk %fp <== NOT EXECUTED
00042464 <IMFS_readlink>:
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
42464: 7004 moveq #4,%d0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
42466: 4e56 fff4 linkw %fp,#-12
IMFS_jnode_t *node;
int i;
node = loc->node_access;
4246a: 206e 0008 moveal %fp@(8),%a0
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
4246e: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42472: 266e 000c moveal %fp@(12),%a3 42476: 242e 0010 movel %fp@(16),%d2
IMFS_jnode_t *node;
int i;
node = loc->node_access;
4247a: 2450 moveal %a0@,%a2
if ( node->type != IMFS_SYM_LINK )
4247c: b0aa 0048 cmpl %a2@(72),%d0
42480: 663c bnes 424be <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++ )
42482: 4a82 tstl %d2
42484: 672c beqs 424b2 <IMFS_readlink+0x4e> <== NEVER TAKEN
42486: 206a 004c moveal %a2@(76),%a0 4248a: 1210 moveb %a0@,%d1
4248c: 6748 beqs 424d6 <IMFS_readlink+0x72> <== NEVER TAKEN
4248e: 91c8 subal %a0,%a0 42490: 4280 clrl %d0 42492: 5280 addql #1,%d0
buf[i] = node->info.sym_link.name[i];
42494: 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++ )
42498: 2040 moveal %d0,%a0 4249a: b082 cmpl %d2,%d0
4249c: 640a bccs 424a8 <IMFS_readlink+0x44>
4249e: 226a 004c moveal %a2@(76),%a1 424a2: 1231 0800 moveb %a1@(00000000,%d0:l),%d1
424a6: 66ea bnes 42492 <IMFS_readlink+0x2e>
buf[i] = node->info.sym_link.name[i];
return i;
}
424a8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 424ae: 4e5e unlk %fp 424b0: 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++ )
424b2: 4280 clrl %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
424b4: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 424ba: 4e5e unlk %fp <== NOT EXECUTED 424bc: 4e75 rts <== NOT EXECUTED
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
rtems_set_errno_and_return_minus_one( EINVAL );
424be: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 424c4: 7216 moveq #22,%d1 <== NOT EXECUTED 424c6: 2040 moveal %d0,%a0 <== NOT EXECUTED 424c8: 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;
}
424ca: 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 );
424d0: 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;
}
424d2: 4e5e unlk %fp <== NOT EXECUTED 424d4: 4e75 rts <== NOT EXECUTED
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++ )
424d6: 4200 clrb %d0 <== NOT EXECUTED
buf[i] = node->info.sym_link.name[i];
return i;
}
424d8: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 <== NOT EXECUTED 424de: 4e5e unlk %fp <== NOT EXECUTED
...
000424e4 <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 */
)
{
424e4: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
424e8: 206e 000c moveal %fp@(12),%a0 <== NOT EXECUTED
rtems_filesystem_location_info_t *old_parent_loc, /* IN */
rtems_filesystem_location_info_t *old_loc, /* IN */
rtems_filesystem_location_info_t *new_parent_loc, /* IN */
const char *new_name /* IN */
)
{
424ec: 2f0a movel %a2,%sp@- <== NOT EXECUTED
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 );
424ee: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 424f2: 2f2e 0014 movel %fp@(20),%sp@- <== NOT EXECUTED
)
{
IMFS_jnode_t *the_jnode;
IMFS_jnode_t *new_parent;
the_jnode = old_loc->node_access;
424f6: 2450 moveal %a0@,%a2 <== NOT EXECUTED
strncpy( the_jnode->name, new_name, IMFS_NAME_MAX );
424f8: 486a 000c pea %a2@(12) <== NOT EXECUTED 424fc: 4eb9 0004 fe64 jsr 4fe64 <strncpy> <== NOT EXECUTED
if ( the_jnode->Parent != NULL )
42502: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42506: 4aaa 0008 tstl %a2@(8) <== NOT EXECUTED 4250a: 670a beqs 42516 <IMFS_rename+0x32> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4250c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4250e: 4eb9 0004 70d0 jsr 470d0 <_Chain_Extract> <== NOT EXECUTED 42514: 588f addql #4,%sp <== NOT EXECUTED
rtems_chain_extract( (rtems_chain_node *) the_jnode );
new_parent = new_parent_loc->node_access;
42516: 206e 0010 moveal %fp@(16),%a0 <== NOT EXECUTED 4251a: 2050 moveal %a0@,%a0 <== NOT EXECUTED
the_jnode->Parent = new_parent;
4251c: 2548 0008 movel %a0,%a2@(8) <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
42520: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42522: 4868 004c pea %a0@(76) <== NOT EXECUTED 42526: 4eb9 0004 7098 jsr 47098 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node );
/*
* Update the time.
*/
IMFS_update_ctime( the_jnode );
4252c: 42a7 clrl %sp@- <== NOT EXECUTED 4252e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 42532: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> <== NOT EXECUTED 42538: 256e fff8 0044 movel %fp@(-8),%a2@(68) <== NOT EXECUTED
return 0;
}
4253e: 4280 clrl %d0 <== NOT EXECUTED 42540: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 42544: 4e5e unlk %fp <== NOT EXECUTED
0004ae10 <IMFS_stat>:
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4ae10: 7007 moveq #7,%d0
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
4ae12: 4e56 0000 linkw %fp,#0 4ae16: 206e 000c moveal %fp@(12),%a0 4ae1a: 2f0a movel %a2,%sp@- 4ae1c: 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;
4ae20: 2252 moveal %a2@,%a1
switch ( the_jnode->type ) {
4ae22: b0a9 0048 cmpl %a1@(72),%d0
4ae26: 6418 bccs 4ae40 <IMFS_stat+0x30> <== ALWAYS TAKEN
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4ae28: 4eb9 0004 e9f4 jsr 4e9f4 <__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;
}
4ae2e: 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 );
4ae32: 2040 moveal %d0,%a0 <== NOT EXECUTED 4ae34: 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;
}
4ae36: 4e5e unlk %fp <== NOT EXECUTED
case IMFS_FIFO:
buf->st_size = 0;
break;
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
4ae38: 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;
}
4ae3e: 4e75 rts <== NOT EXECUTED
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
4ae40: 2029 0048 movel %a1@(72),%d0 4ae44: d080 addl %d0,%d0 4ae46: 303b 0808 movew %pc@(4ae50 <IMFS_stat+0x40>,%d0:l),%d0 4ae4a: 48c0 extl %d0 4ae4c: 4efb 0802 jmp %pc@(4ae50 <IMFS_stat+0x40>,%d0:l)
4ae50: ffd8 0177730 <== NOT EXECUTED 4ae52: ffd8 0177730 <== NOT EXECUTED 4ae54: 00c2 bitrev %d2 <== NOT EXECUTED 4ae56: ffd8 0177730 <== NOT EXECUTED 4ae58: 0010 020 <== NOT EXECUTED 4ae5a: 006a 0152 <== NOT EXECUTED 4ae5c: 006a 0152 <== NOT EXECUTED 4ae5e: 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;
4ae60: 246a 0010 moveal %a2@(16),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4ae64: 4280 clrl %d0 4ae66: 4281 clrl %d1
* 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 );
4ae68: 246a 0034 moveal %a2@(52),%a2
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
4ae6c: 2140 001e movel %d0,%a0@(30) 4ae70: 2141 0022 movel %d1,%a0@(34)
* 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 );
4ae74: 2212 movel %a2@,%d1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4ae76: 4280 clrl %d0
*/
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;
4ae78: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4ae7e: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4ae84: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4ae8a: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4ae90: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4ae96: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4ae9c: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4aea2: 2169 0044 0036 movel %a1@(68),%a0@(54)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4aea8: 20bc 0000 fffe movel #65534,%a0@ 4aeae: 2141 0004 movel %d1,%a0@(4)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
}
4aeb2: 246e fffc moveal %fp@(-4),%a2 4aeb6: 4e5e unlk %fp 4aeb8: 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;
4aeba: 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;
4aebe: 2029 004c movel %a1@(76),%d0 4aec2: 2229 0050 movel %a1@(80),%d1
* 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 );
4aec6: 246a 0034 moveal %a2@(52),%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;
4aeca: 2140 001e movel %d0,%a0@(30) 4aece: 2141 0022 movel %d1,%a0@(34)
* 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 );
4aed2: 2212 movel %a2@,%d1
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4aed4: 4280 clrl %d0
*/
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;
4aed6: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4aedc: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4aee2: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4aee8: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4aeee: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4aef4: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4aefa: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4af00: 2169 0044 0036 movel %a1@(68),%a0@(54)
/* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev =
4af06: 20bc 0000 fffe movel #65534,%a0@ 4af0c: 2141 0004 movel %d1,%a0@(4) 4af10: 60a0 bras 4aeb2 <IMFS_stat+0xa2>
/*
* The device number of the IMFS is the major number and the minor is the
* instance.
*/
fs_info = loc->mt_entry->fs_info;
4af12: 246a 0010 moveal %a2@(16),%a2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af16: 2029 0050 movel %a1@(80),%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 =
rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
4af1a: 246a 0034 moveal %a2@(52),%a2
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af1e: 2169 004c 0016 movel %a1@(76),%a0@(22)
* 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 );
4af24: 2212 movel %a2@,%d1
buf->st_mode = the_jnode->st_mode;
4af26: 2169 002e 000c movel %a1@(46),%a0@(12)
buf->st_nlink = the_jnode->st_nlink;
4af2c: 3169 0032 0010 movew %a1@(50),%a0@(16)
buf->st_ino = the_jnode->st_ino;
4af32: 2169 0034 0008 movel %a1@(52),%a0@(8)
buf->st_uid = the_jnode->st_uid;
4af38: 3169 0038 0012 movew %a1@(56),%a0@(18)
buf->st_gid = the_jnode->st_gid;
4af3e: 3169 003a 0014 movew %a1@(58),%a0@(20)
buf->st_atime = the_jnode->stat_atime;
4af44: 2169 003c 0026 movel %a1@(60),%a0@(38)
buf->st_mtime = the_jnode->stat_mtime;
4af4a: 2169 0040 002e movel %a1@(64),%a0@(46)
buf->st_ctime = the_jnode->stat_ctime;
4af50: 2169 0044 0036 movel %a1@(68),%a0@(54)
switch ( the_jnode->type ) {
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
4af56: 2140 001a movel %d0,%a0@(26)
buf->st_atime = the_jnode->stat_atime;
buf->st_mtime = the_jnode->stat_mtime;
buf->st_ctime = the_jnode->stat_ctime;
return 0;
4af5a: 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 =
4af5c: 20bc 0000 fffe movel #65534,%a0@ 4af62: 2141 0004 movel %d1,%a0@(4) 4af66: 6000 ff4a braw 4aeb2 <IMFS_stat+0xa2>
...
00042548 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
42548: 4e56 ffc4 linkw %fp,#-60 4254c: 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 );
4254e: 260e movel %fp,%d3 42550: 0683 ffff ffc7 addil #-57,%d3
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
42556: 2f02 movel %d2,%sp@- 42558: 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 );
4255c: 2f02 movel %d2,%sp@- 4255e: 4eb9 0004 fe4c jsr 4fe4c <strlen> 42564: 588f addql #4,%sp 42566: 486e fffc pea %fp@(-4) 4256a: 2f03 movel %d3,%sp@- 4256c: 2f00 movel %d0,%sp@- 4256e: 2f02 movel %d2,%sp@- 42570: 4eb9 0004 ac2c jsr 4ac2c <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
42576: 2f2e 000c movel %fp@(12),%sp@- 4257a: 4eb9 0004 f9bc jsr 4f9bc <strdup>
if (info.sym_link.name == NULL) {
42580: 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);
42584: 2d40 ffe8 movel %d0,%fp@(-24)
if (info.sym_link.name == NULL) {
42588: 6730 beqs 425ba <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(
4258a: 486e ffe8 pea %fp@(-24) 4258e: 2f3c 0000 a1ff movel #41471,%sp@- 42594: 2f03 movel %d3,%sp@- 42596: 4878 0004 pea 4 <CONTEXT_ARG> 4259a: 2f2e 0008 movel %fp@(8),%sp@- 4259e: 4eb9 0004 a12a jsr 4a12a <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
425a4: 4fef 0014 lea %sp@(20),%sp 425a8: 4a80 tstl %d0
425aa: 6728 beqs 425d4 <IMFS_symlink+0x8c> <== NEVER TAKEN
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
425ac: 242e ffbc movel %fp@(-68),%d2
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
425b0: 4280 clrl %d0
}
425b2: 262e ffc0 movel %fp@(-64),%d3 425b6: 4e5e unlk %fp 425b8: 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);
425ba: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 425c0: 740c moveq #12,%d2 <== NOT EXECUTED 425c2: 2040 moveal %d0,%a0 <== NOT EXECUTED 425c4: 70ff moveq #-1,%d0 <== NOT EXECUTED 425c6: 2082 movel %d2,%a0@ <== NOT EXECUTED
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
}
return 0;
}
425c8: 242e ffbc movel %fp@(-68),%d2 <== NOT EXECUTED 425cc: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 425d0: 4e5e unlk %fp <== NOT EXECUTED 425d2: 4e75 rts <== NOT EXECUTED
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
425d4: 2f2e ffe8 movel %fp@(-24),%sp@- <== NOT EXECUTED 425d8: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
425de: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
}
return 0;
}
425e4: 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);
425e8: 2040 moveal %d0,%a0 <== NOT EXECUTED 425ea: 720c moveq #12,%d1 <== NOT EXECUTED 425ec: 588f addql #4,%sp <== NOT EXECUTED 425ee: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
return 0;
}
425f0: 262e ffc0 movel %fp@(-64),%d3 <== NOT EXECUTED 425f4: 4e5e unlk %fp <== NOT EXECUTED
&info
);
if (new_node == NULL) {
free(info.sym_link.name);
rtems_set_errno_and_return_minus_one(ENOMEM);
425f6: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
return 0;
}
...
000425fc <IMFS_unlink>:
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
425fc: 7003 moveq #3,%d0
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
425fe: 4e56 ffd0 linkw %fp,#-48 42602: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42606: 246e 000c moveal %fp@(12),%a2 4260a: 242e 0008 movel %fp@(8),%d2
IMFS_jnode_t *node;
rtems_filesystem_location_info_t the_link;
int result = 0;
node = loc->node_access;
4260e: 2652 moveal %a2@,%a3
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
42610: b0ab 0048 cmpl %a3@(72),%d0
42614: 671a beqs 42630 <IMFS_unlink+0x34>
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
42616: 2f0a movel %a2,%sp@- 42618: 206a 0008 moveal %a2@(8),%a0 4261c: 2f02 movel %d2,%sp@- 4261e: 2068 0034 moveal %a0@(52),%a0 42622: 4e90 jsr %a0@
return result;
42624: 508f addql #8,%sp
}
42626: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 4262c: 4e5e unlk %fp 4262e: 4e75 rts
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
42630: 202b 004c movel %a3@(76),%d0 42634: 6700 0090 beqw 426c6 <IMFS_unlink+0xca>
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
42638: 41ea 0004 lea %a2@(4),%a0
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
4263c: 260e movel %fp,%d3 4263e: 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)
42644: 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;
42646: 2d58 ffe8 movel %a0@+,%fp@(-24) 4264a: 2d58 ffec movel %a0@+,%fp@(-20) 4264e: 2d58 fff0 movel %a0@+,%fp@(-16) 42652: 2d50 fff4 movel %a0@,%fp@(-12)
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
42656: 2f03 movel %d3,%sp@-
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
the_link = *loc;
the_link.node_access = node->info.hard_link.link_node;
42658: 2d40 ffe4 movel %d0,%fp@(-28)
IMFS_Set_handlers( &the_link );
4265c: 4eb9 0004 a31c jsr 4a31c <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)
42662: 206b 004c moveal %a3@(76),%a0 42666: 4281 clrl %d1 42668: 588f addql #4,%sp 4266a: 3028 0032 movew %a0@(50),%d0 4266e: 3200 movew %d0,%d1 42670: b881 cmpl %d1,%d4
42672: 6730 beqs 426a4 <IMFS_unlink+0xa8>
if ( result != 0 )
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
42674: 5380 subql #1,%d0 42676: 3140 0032 movew %d0,%a0@(50)
IMFS_update_ctime( node->info.hard_link.link_node );
4267a: 42a7 clrl %sp@- 4267c: 486e fff8 pea %fp@(-8) 42680: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 42686: 206b 004c moveal %a3@(76),%a0 4268a: 508f addql #8,%sp 4268c: 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 );
42692: 2f0a movel %a2,%sp@- 42694: 206a 0008 moveal %a2@(8),%a0 42698: 2f02 movel %d2,%sp@- 4269a: 2068 0034 moveal %a0@(52),%a0 4269e: 4e90 jsr %a0@
return result;
426a0: 508f addql #8,%sp 426a2: 6082 bras 42626 <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 );
426a4: 2f03 movel %d3,%sp@- 426a6: 206e ffec moveal %fp@(-20),%a0 426aa: 2f02 movel %d2,%sp@- 426ac: 2068 0034 moveal %a0@(52),%a0 426b0: 4e90 jsr %a0@
if ( result != 0 )
426b2: 508f addql #8,%sp 426b4: 4a80 tstl %d0 426b6: 6700 ff5e beqw 42616 <IMFS_unlink+0x1a>
return -1;
426ba: 70ff moveq #-1,%d0
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
426bc: 4cee 0c1c ffd0 moveml %fp@(-48),%d2-%d4/%a2-%a3 426c2: 4e5e unlk %fp 426c4: 4e75 rts
*/
if ( node->type == IMFS_HARD_LINK ) {
if ( !node->info.hard_link.link_node )
rtems_set_errno_and_return_minus_one( EINVAL );
426c6: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 426cc: 7216 moveq #22,%d1 <== NOT EXECUTED 426ce: 2040 moveal %d0,%a0 <== NOT EXECUTED 426d0: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
426d2: 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 );
426d8: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
return result;
}
426da: 4e5e unlk %fp <== NOT EXECUTED
...
000426e0 <IMFS_unmount>:
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
426e0: 7001 moveq #1,%d0
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
426e2: 4e56 0000 linkw %fp,#0 426e6: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
426ea: 2068 0008 moveal %a0@(8),%a0
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
426ee: b0a8 0048 cmpl %a0@(72),%d0
426f2: 6610 bnes 42704 <IMFS_unmount+0x24> <== NEVER TAKEN
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
426f4: 4aa8 0058 tstl %a0@(88)
426f8: 671c beqs 42716 <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;
426fa: 42a8 0058 clrl %a0@(88)
return 0;
426fe: 4280 clrl %d0
}
42700: 4e5e unlk %fp 42702: 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 );
42704: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4270a: 7214 moveq #20,%d1 <== NOT EXECUTED 4270c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4270e: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42710: 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 );
42712: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42714: 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 */
42716: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4271c: 7216 moveq #22,%d1 <== NOT EXECUTED 4271e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42720: 70ff moveq #-1,%d0 <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
42722: 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 */
42724: 2081 movel %d1,%a0@ <== NOT EXECUTED
*/
node->info.directory.mt_fs = NULL;
return 0;
}
00043018 <RTEMS_Malloc_Initialize>:
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43018: 4e56 fff4 linkw %fp,#-12
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
4301c: 2079 0005 e916 moveal 5e916 <rtems_malloc_statistics_helpers>,%a0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
43022: 48d7 001c moveml %d2-%d4,%sp@ 43026: 242e 0008 movel %fp@(8),%d2 4302a: 262e 000c movel %fp@(12),%d3 4302e: 282e 0010 movel %fp@(16),%d4
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
43032: 4a88 tstl %a0
43034: 6704 beqs 4303a <RTEMS_Malloc_Initialize+0x22>
(*rtems_malloc_statistics_helpers->initialize)();
43036: 2050 moveal %a0@,%a0 43038: 4e90 jsr %a0@
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
4303a: 4eb9 0004 2f9c jsr 42f9c <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
43040: 2079 0005 e91a moveal 5e91a <rtems_malloc_sbrk_helpers>,%a0 43046: 4a88 tstl %a0
43048: 670e beqs 43058 <RTEMS_Malloc_Initialize+0x40>
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
4304a: 2f04 movel %d4,%sp@-
heap_begin,
sbrk_amount
);
heap_size = (uintptr_t) sbrk_amount;
4304c: 2604 movel %d4,%d3
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
4304e: 2f02 movel %d2,%sp@- 43050: 2050 moveal %a0@,%a0 43052: 4e90 jsr %a0@ 43054: 508f addql #8,%sp 43056: 2400 movel %d0,%d2
* 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 (
43058: 4a39 0005 e914 tstb 5e914 <rtems_unified_work_area>
4305e: 6624 bnes 43084 <RTEMS_Malloc_Initialize+0x6c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
43060: 4a39 0005 e34c tstb 5e34c <Configuration+0x28>
43066: 6642 bnes 430aa <RTEMS_Malloc_Initialize+0x92>
void *area_begin,
uintptr_t area_size,
uintptr_t page_size
)
{
return _Heap_Initialize( heap, area_begin, area_size, page_size );
43068: 4878 0004 pea 4 <CONTEXT_ARG> 4306c: 2f03 movel %d3,%sp@- 4306e: 2f02 movel %d2,%sp@- 43070: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 43076: 4eb9 0004 76ba jsr 476ba <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
4307c: 4fef 0010 lea %sp@(16),%sp 43080: 4a80 tstl %d0
43082: 675a beqs 430de <RTEMS_Malloc_Initialize+0xc6>
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
43084: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 4308a: 2439 0005 f99c movel 5f99c <rtems_malloc_statistics>,%d2 43090: 4eb9 0004 8304 jsr 48304 <_Protected_heap_Get_size> 43096: 588f addql #4,%sp 43098: d082 addl %d2,%d0
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
4309a: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4
if ( status == 0 ) {
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
430a0: 23c0 0005 f99c movel %d0,5f99c <rtems_malloc_statistics>
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
430a6: 4e5e unlk %fp 430a8: 4e75 rts
if (
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
) {
memset( heap_begin, 0, heap_size );
430aa: 2f03 movel %d3,%sp@- 430ac: 42a7 clrl %sp@- 430ae: 2f02 movel %d2,%sp@- 430b0: 4eb9 0004 f310 jsr 4f310 <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 ) {
430b6: 4fef 000c lea %sp@(12),%sp 430ba: 4a39 0005 e914 tstb 5e914 <rtems_unified_work_area>
430c0: 66c2 bnes 43084 <RTEMS_Malloc_Initialize+0x6c> <== NEVER TAKEN
430c2: 4878 0004 pea 4 <CONTEXT_ARG> 430c6: 2f03 movel %d3,%sp@- 430c8: 2f02 movel %d2,%sp@- 430ca: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 430d0: 4eb9 0004 76ba jsr 476ba <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
430d6: 4fef 0010 lea %sp@(16),%sp 430da: 4a80 tstl %d0
430dc: 66a6 bnes 43084 <RTEMS_Malloc_Initialize+0x6c> <== ALWAYS TAKEN
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
430de: 4878 001a pea 1a <OPER2+0x6> 430e2: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred>
000420e8 <Stack_check_Dump_threads_usage>:
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
420e8: 70ff moveq #-1,%d0 <== NOT EXECUTED
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
420ea: 4e56 ffec linkw %fp,#-20 <== NOT EXECUTED 420ee: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ <== NOT EXECUTED 420f2: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
420f6: b08a cmpl %a2,%d0 <== NOT EXECUTED 420f8: 6700 0092 beqw 4218c <Stack_check_Dump_threads_usage+0xa4><== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
420fc: 2439 0005 feb8 movel 5feb8 <Stack_check_Interrupt_stack>,%d2<== NOT EXECUTED 42102: 0682 ffff fff0 addil #-16,%d2 <== NOT EXECUTED
if ( high_water_mark )
used = Stack_check_Calculate_used( low, size, high_water_mark );
else
used = 0;
if ( the_thread ) {
42108: 4a8a tstl %a2 <== NOT EXECUTED 4210a: 6700 0094 beqw 421a0 <Stack_check_Dump_threads_usage+0xb8><== NOT EXECUTED
(*print_handler)(
4210e: 486e fffb pea %fp@(-5) <== NOT EXECUTED 42112: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 42116: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4211a: 2679 0005 f6a8 moveal 5f6a8 <print_handler>,%a3 <== NOT EXECUTED 42120: 4eb9 0004 6708 jsr 46708 <rtems_object_get_name> <== NOT EXECUTED 42126: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42128: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 4212c: 4879 0005 d21c pea 5d21c <IntUartPollCallbacks.6236+0x20> <== NOT EXECUTED 42132: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 42138: 4e93 jsr %a3@ <== NOT EXECUTED 4213a: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
4213e: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
42140: 2039 0005 feb8 movel 5feb8 <Stack_check_Interrupt_stack>,%d0<== NOT EXECUTED 42146: 5380 subql #1,%d0 <== NOT EXECUTED 42148: 2079 0005 febc moveal 5febc <Stack_check_Interrupt_stack+0x4>,%a0<== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
4214e: 42a7 clrl %sp@- <== NOT EXECUTED 42150: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 42154: 2f08 movel %a0,%sp@- <== NOT EXECUTED 42156: 4879 0005 d237 pea 5d237 <IntUartPollCallbacks.6236+0x3b> <== NOT EXECUTED 4215c: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 42162: 2079 0005 f6a8 moveal 5f6a8 <print_handler>,%a0 <== NOT EXECUTED 42168: 4e90 jsr %a0@ <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
4216a: 4879 0005 d255 pea 5d255 <IntUartPollCallbacks.6236+0x59> <== NOT EXECUTED 42170: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 42176: 2079 0005 f6a8 moveal 5f6a8 <print_handler>,%a0 <== NOT EXECUTED 4217c: 4e90 jsr %a0@ <== NOT EXECUTED 4217e: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
}
}
42182: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 <== NOT EXECUTED 42188: 4e5e unlk %fp <== NOT EXECUTED 4218a: 4e75 rts <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
if (the_thread == (Thread_Control *) -1) {
if (!Stack_check_Interrupt_stack.area)
4218c: 4ab9 0005 febc tstl 5febc <Stack_check_Interrupt_stack+0x4><== NOT EXECUTED 42192: 67ee beqs 42182 <Stack_check_Dump_threads_usage+0x9a><== NOT EXECUTED
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
#endif
low = Stack_check_usable_stack_start(stack);
size = Stack_check_usable_stack_size(stack);
42194: 2439 0005 feb8 movel 5feb8 <Stack_check_Interrupt_stack>,%d2<== NOT EXECUTED 4219a: 0682 ffff fff0 addil #-16,%d2 <== 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 );
421a0: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 421a4: 4879 0005 d229 pea 5d229 <IntUartPollCallbacks.6236+0x2d> <== NOT EXECUTED 421aa: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 421b0: 2079 0005 f6a8 moveal 5f6a8 <print_handler>,%a0 <== NOT EXECUTED 421b6: 4e90 jsr %a0@ <== NOT EXECUTED 421b8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
(*print_handler)(
421bc: 2f02 movel %d2,%sp@- <== NOT EXECUTED
print_context,
" %010p - %010p %010p %8" PRId32 " ",
stack->area,
stack->area + stack->size - 1,
421be: 2039 0005 feb8 movel 5feb8 <Stack_check_Interrupt_stack>,%d0<== NOT EXECUTED 421c4: 5380 subql #1,%d0 <== NOT EXECUTED 421c6: 2079 0005 febc moveal 5febc <Stack_check_Interrupt_stack+0x4>,%a0<== NOT EXECUTED
);
} else {
(*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 );
}
(*print_handler)(
421cc: 42a7 clrl %sp@- <== NOT EXECUTED 421ce: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 421d2: 2f08 movel %a0,%sp@- <== NOT EXECUTED 421d4: 4879 0005 d237 pea 5d237 <IntUartPollCallbacks.6236+0x3b> <== NOT EXECUTED 421da: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 421e0: 2079 0005 f6a8 moveal 5f6a8 <print_handler>,%a0 <== NOT EXECUTED 421e6: 4e90 jsr %a0@ <== NOT EXECUTED
current,
size
);
if (Stack_check_Initialized == 0) {
(*print_handler)( print_context, "Unavailable\n" );
421e8: 4879 0005 d255 pea 5d255 <IntUartPollCallbacks.6236+0x59> <== NOT EXECUTED 421ee: 2f39 0005 f6a4 movel 5f6a4 <print_context>,%sp@- <== NOT EXECUTED 421f4: 2079 0005 f6a8 moveal 5f6a8 <print_handler>,%a0 <== NOT EXECUTED 421fa: 4e90 jsr %a0@ <== NOT EXECUTED 421fc: 4fef 0020 lea %sp@(32),%sp <== NOT EXECUTED 42200: 6080 bras 42182 <Stack_check_Dump_threads_usage+0x9a><== NOT EXECUTED
00042202 <Stack_check_Initialize>:
/*
* Stack_check_Initialize
*/
void Stack_check_Initialize( void )
{
42202: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
Stack_check_Dope_stack(&Stack_check_Interrupt_stack);
}
#endif
Stack_check_Initialized = 1;
}
42206: 4e5e unlk %fp <== NOT EXECUTED
00042270 <Stack_check_report_blown_task>:
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42270: 4e56 ffd0 linkw %fp,#-48 <== NOT EXECUTED 42274: 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");
42278: 4879 0005 d262 pea 5d262 <IntUartPollCallbacks.6236+0x66> <== NOT EXECUTED 4227e: 47f9 0004 3f94 lea 43f94 <printk>,%a3 <== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
42284: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack);
42288: 286a 00c2 moveal %a2@(194),%a4 <== NOT EXECUTED
Thread_Control *running,
bool pattern_ok
) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE;
void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok)
{
4228c: 142e 000f moveb %fp@(15),%d2 <== NOT EXECUTED
Stack_Control *stack = &running->Start.Initial_stack;
void *pattern_area = Stack_check_Get_pattern_area(stack);
char name [32];
printk("BLOWN STACK!!!\n");
42290: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task control block: 0x%08" PRIxPTR "\n", running);
42292: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42294: 4879 0005 d272 pea 5d272 <IntUartPollCallbacks.6236+0x76> <== NOT EXECUTED 4229a: 4e93 jsr %a3@ <== NOT EXECUTED
printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id);
4229c: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 422a0: 4879 0005 d28f pea 5d28f <IntUartPollCallbacks.6236+0x93> <== NOT EXECUTED 422a6: 4e93 jsr %a3@ <== NOT EXECUTED
printk(
422a8: 2f2a 000c movel %a2@(12),%sp@- <== NOT EXECUTED 422ac: 4879 0005 d2a1 pea 5d2a1 <IntUartPollCallbacks.6236+0xa5> <== NOT EXECUTED 422b2: 4e93 jsr %a3@ <== NOT EXECUTED
"task name: 0x%08" PRIx32 "\n",
running->Object.name.name_u32
);
printk(
422b4: 486e ffe0 pea %fp@(-32) <== NOT EXECUTED 422b8: 4878 0020 pea 20 <OPER2+0xc> <== NOT EXECUTED 422bc: 2f2a 0008 movel %a2@(8),%sp@- <== NOT EXECUTED 422c0: 4eb9 0004 6708 jsr 46708 <rtems_object_get_name> <== NOT EXECUTED 422c6: 4fef 0024 lea %sp@(36),%sp <== NOT EXECUTED 422ca: 2e80 movel %d0,%sp@ <== NOT EXECUTED 422cc: 4879 0005 d2b5 pea 5d2b5 <IntUartPollCallbacks.6236+0xb9> <== NOT EXECUTED 422d2: 4e93 jsr %a3@ <== NOT EXECUTED
);
printk(
"task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n",
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
422d4: 206a 00c2 moveal %a2@(194),%a0 <== NOT EXECUTED 422d8: 202a 00be movel %a2@(190),%d0 <== NOT EXECUTED
);
printk(
"task name string: %s\n",
rtems_object_get_name(running->Object.id, sizeof(name), name)
);
printk(
422dc: 4870 0800 pea %a0@(00000000,%d0:l) <== NOT EXECUTED 422e0: 2f08 movel %a0,%sp@- <== NOT EXECUTED 422e2: 2f00 movel %d0,%sp@- <== NOT EXECUTED 422e4: 4879 0005 d2cb pea 5d2cb <IntUartPollCallbacks.6236+0xcf> <== NOT EXECUTED 422ea: 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) {
422ec: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 422f0: 4a02 tstb %d2 <== NOT EXECUTED 422f2: 670a beqs 422fe <Stack_check_report_blown_task+0x8e><== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
422f4: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 422f8: 4eb9 0004 708c jsr 4708c <rtems_fatal_error_occurred> <== NOT EXECUTED
(unsigned long) stack->size,
stack->area,
((char *) stack->area + stack->size)
);
if (!pattern_ok) {
printk(
422fe: 486c 0018 pea %a4@(24) <== NOT EXECUTED 42302: 486c 0008 pea %a4@(8) <== NOT EXECUTED 42306: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 4230a: 4879 0005 d2fc pea 5d2fc <IntUartPollCallbacks.6236+0x100> <== NOT EXECUTED 42310: 4e93 jsr %a3@ <== NOT EXECUTED 42312: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_configuration_get_user_multiprocessing_table()->node
);
}
#endif
rtems_fatal_error_occurred(0x81);
42316: 4878 0081 pea 81 <DBL_MANT_DIG+0x4c> <== NOT EXECUTED 4231a: 4eb9 0004 708c jsr 4708c <rtems_fatal_error_occurred> <== NOT EXECUTED
00047064 <_API_Mutex_Unlock>:
#include <rtems/score/apimutex.h>
void _API_Mutex_Unlock(
API_Mutex_Control *the_mutex
)
{
47064: 4e56 0000 linkw %fp,#0
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47068: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 4706e: 5280 addql #1,%d0 47070: 206e 0008 moveal %fp@(8),%a0 47074: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
_CORE_mutex_Surrender(
4707a: 42a7 clrl %sp@- 4707c: 2f28 0008 movel %a0@(8),%sp@- 47080: 4868 0010 pea %a0@(16) 47084: 4eb9 0004 736c jsr 4736c <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4708a: 4fef 000c lea %sp@(12),%sp
}
4708e: 4e5e unlk %fp
_CORE_mutex_Surrender(
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
47090: 4ef9 0004 88ae jmp 488ae <_Thread_Enable_dispatch>
...
00046f3e <_API_extensions_Run_postdriver>:
*
* _API_extensions_Run_postdriver
*/
void _API_extensions_Run_postdriver( void )
{
46f3e: 4e56 0000 linkw %fp,#0 46f42: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46f44: 2479 0005 fc5e moveal 5fc5e <_API_extensions_List>,%a2 46f4a: b5fc 0005 fc62 cmpal #392290,%a2
46f50: 6710 beqs 46f62 <_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)();
46f52: 206a 0008 moveal %a2@(8),%a0 46f56: 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 ) {
46f58: 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 ;
46f5a: b5fc 0005 fc62 cmpal #392290,%a2
46f60: 66f0 bnes 46f52 <_API_extensions_Run_postdriver+0x14>
#if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
if ( the_extension->postdriver_hook )
#endif
(*the_extension->postdriver_hook)();
}
}
46f62: 246e fffc moveal %fp@(-4),%a2
46f66: 4e5e unlk %fp <== NOT EXECUTED
00046f6a <_API_extensions_Run_postswitch>:
*
* _API_extensions_Run_postswitch
*/
void _API_extensions_Run_postswitch( void )
{
46f6a: 4e56 0000 linkw %fp,#0 46f6e: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
API_extensions_Control *the_extension;
for ( the_node = _API_extensions_List.first ;
46f70: 2479 0005 fc5e moveal 5fc5e <_API_extensions_List>,%a2 46f76: b5fc 0005 fc62 cmpal #392290,%a2
46f7c: 6718 beqs 46f96 <_API_extensions_Run_postswitch+0x2c><== NEVER TAKEN
!_Chain_Is_tail( &_API_extensions_List, the_node ) ;
the_node = the_node->next ) {
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
46f7e: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 46f84: 206a 000c moveal %a2@(12),%a0 46f88: 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 ) {
46f8a: 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 ;
46f8c: 588f addql #4,%sp 46f8e: b5fc 0005 fc62 cmpal #392290,%a2
46f94: 66e8 bnes 46f7e <_API_extensions_Run_postswitch+0x14>
the_extension = (API_extensions_Control *) the_node;
(*the_extension->postswitch_hook)( _Thread_Executing );
}
}
46f96: 246e fffc moveal %fp@(-4),%a2 46f9a: 4e5e unlk %fp
...
00049560 <_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 );
49560: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
49566: 4e56 ffe8 linkw %fp,#-24 4956a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4956e: 246e 0008 moveal %fp@(8),%a2 49572: 2a2e 000c movel %fp@(12),%d5 49576: 282e 0014 movel %fp@(20),%d4 4957a: 162e 0013 moveb %fp@(19),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
4957e: 2679 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a3
* If unlocked, then OK to read.
* If locked for reading and no waiters, then OK to read.
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
49584: 40c2 movew %sr,%d2 49586: 8082 orl %d2,%d0 49588: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
4958a: 202a 0044 movel %a2@(68),%d0
4958e: 661a bnes 495aa <_CORE_RWLock_Obtain_for_reading+0x4a>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_READING;
49590: 7001 moveq #1,%d0
the_rwlock->number_of_readers += 1;
49592: 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;
49596: 2540 0044 movel %d0,%a2@(68)
the_rwlock->number_of_readers += 1; _ISR_Enable( level );
4959a: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4959c: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495a0: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495a6: 4e5e unlk %fp 495a8: 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 ) {
495aa: 7201 moveq #1,%d1 495ac: b280 cmpl %d0,%d1
495ae: 674e beqs 495fe <_CORE_RWLock_Obtain_for_reading+0x9e>
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
495b0: 4a03 tstb %d3
495b2: 6612 bnes 495c6 <_CORE_RWLock_Obtain_for_reading+0x66>
_ISR_Enable( level );
495b4: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
495b6: 7202 moveq #2,%d1 495b8: 2741 0034 movel %d1,%a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495bc: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 495c2: 4e5e unlk %fp 495c4: 4e75 rts 495c6: 7001 moveq #1,%d0 495c8: 2540 0030 movel %d0,%a2@(48)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
495cc: 274a 0044 movel %a2,%a3@(68)
executing->Wait.id = id;
495d0: 2745 0020 movel %d5,%a3@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_READ;
495d4: 42ab 0030 clrl %a3@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
495d8: 42ab 0034 clrl %a3@(52)
_ISR_Enable( level );
495dc: 46c2 movew %d2,%sr
_Thread_queue_Enqueue_with_handler(
495de: 2d44 000c movel %d4,%fp@(12) 495e2: 223c 0004 978c movel #300940,%d1 495e8: 2d4a 0008 movel %a2,%fp@(8)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495ec: 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(
495f2: 2d41 0010 movel %d1,%fp@(16)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
495f6: 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(
495f8: 4ef9 0004 b104 jmp 4b104 <_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 );
495fe: 2f0a movel %a2,%sp@- 49600: 4eb9 0004 b4a4 jsr 4b4a4 <_Thread_queue_First>
if ( !waiter ) {
49606: 588f addql #4,%sp 49608: 4a80 tstl %d0
4960a: 66a4 bnes 495b0 <_CORE_RWLock_Obtain_for_reading+0x50><== NEVER TAKEN
the_rwlock->number_of_readers += 1;
4960c: 52aa 0048 addql #1,%a2@(72)
_ISR_Enable( level );
49610: 46c2 movew %d2,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49612: 42ab 0034 clrl %a3@(52)
timeout,
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49616: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3
4961c: 4e5e unlk %fp <== NOT EXECUTED
00049620 <_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 );
49620: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
49626: 4e56 fff4 linkw %fp,#-12 4962a: 206e 0008 moveal %fp@(8),%a0 4962e: 48d7 001c moveml %d2-%d4,%sp@ 49632: 282e 000c movel %fp@(12),%d4 49636: 262e 0014 movel %fp@(20),%d3
ISR_Level level; Thread_Control *executing = _Thread_Executing;
4963a: 2279 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_RWLock_API_mp_support_callout api_rwlock_mp_support
)
{
49640: 142e 0013 moveb %fp@(19),%d2
* 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 );
49644: 40c1 movew %sr,%d1 49646: 8081 orl %d1,%d0 49648: 46c0 movew %d0,%sr
switch ( the_rwlock->current_state ) {
4964a: 4aa8 0044 tstl %a0@(68)
4964e: 6614 bnes 49664 <_CORE_RWLock_Obtain_for_writing+0x44>
case CORE_RWLOCK_UNLOCKED:
the_rwlock->current_state = CORE_RWLOCK_LOCKED_FOR_WRITING;
49650: 7002 moveq #2,%d0 49652: 2140 0044 movel %d0,%a0@(68)
_ISR_Enable( level );
49656: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
49658: 42a9 0034 clrl %a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4965c: 4cd7 001c moveml %sp@,%d2-%d4 49660: 4e5e unlk %fp 49662: 4e75 rts
/*
* If the thread is not willing to wait, then return immediately.
*/
if ( !wait ) {
49664: 4a02 tstb %d2
49666: 6610 bnes 49678 <_CORE_RWLock_Obtain_for_writing+0x58>
_ISR_Enable( level );
49668: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
4966a: 7002 moveq #2,%d0
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4966c: 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;
49670: 2340 0034 movel %d0,%a1@(52)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
49674: 4e5e unlk %fp 49676: 4e75 rts 49678: 7001 moveq #1,%d0 4967a: 2140 0030 movel %d0,%a0@(48)
/*
* We need to wait to enter this critical section
*/
_Thread_queue_Enter_critical_section( &the_rwlock->Wait_queue );
executing->Wait.queue = &the_rwlock->Wait_queue;
4967e: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
49682: 2344 0020 movel %d4,%a1@(32)
executing->Wait.option = CORE_RWLOCK_THREAD_WAITING_FOR_WRITE;
49686: 2340 0030 movel %d0,%a1@(48)
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
4968a: 42a9 0034 clrl %a1@(52)
_ISR_Enable( level );
4968e: 46c1 movew %d1,%sr
_Thread_queue_Enqueue_with_handler(
49690: 2d43 000c movel %d3,%fp@(12) 49694: 203c 0004 978c movel #300940,%d0 4969a: 2d48 0008 movel %a0,%fp@(8)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
4969e: 4cd7 001c moveml %sp@,%d2-%d4
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(
496a2: 2d40 0010 movel %d0,%fp@(16)
_CORE_RWLock_Timeout
);
/* return to API level so it can dispatch and we block */
}
496a6: 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(
496a8: 4ef9 0004 b104 jmp 4b104 <_Thread_queue_Enqueue_with_handler>
...
000496b0 <_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 );
496b0: 203c 0000 0700 movel #1792,%d0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496b6: 4e56 fff0 linkw %fp,#-16
ISR_Level level; Thread_Control *executing = _Thread_Executing;
496ba: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0
*/
CORE_RWLock_Status _CORE_RWLock_Release(
CORE_RWLock_Control *the_rwlock
)
{
496c0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 496c4: 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 );
496c8: 40c1 movew %sr,%d1 496ca: 8081 orl %d1,%d0 496cc: 46c0 movew %d0,%sr
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
496ce: 202a 0044 movel %a2@(68),%d0 496d2: 6700 0090 beqw 49764 <_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 ) {
496d6: 7401 moveq #1,%d2 496d8: b480 cmpl %d0,%d2
496da: 676e beqs 4974a <_CORE_RWLock_Release+0x9a>
return CORE_RWLOCK_SUCCESSFUL;
}
}
/* CORE_RWLOCK_LOCKED_FOR_WRITING or READING with readers */
executing->Wait.return_code = CORE_RWLOCK_SUCCESSFUL;
496dc: 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;
496e0: 42aa 0044 clrl %a2@(68)
_ISR_Enable( level );
496e4: 46c1 movew %d1,%sr
next = _Thread_queue_Dequeue( &the_rwlock->Wait_queue );
496e6: 2f0a movel %a2,%sp@- 496e8: 4eb9 0004 af94 jsr 4af94 <_Thread_queue_Dequeue>
if ( next ) {
496ee: 588f addql #4,%sp 496f0: 4a80 tstl %d0
496f2: 674a beqs 4973e <_CORE_RWLock_Release+0x8e>
if ( next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE ) {
496f4: 7201 moveq #1,%d1 496f6: 2040 moveal %d0,%a0 496f8: b2a8 0030 cmpl %a0@(48),%d1
496fc: 677c beqs 4977a <_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;
496fe: 7201 moveq #1,%d1
}
/*
* Must be CORE_RWLOCK_THREAD_WAITING_FOR_READING
*/
the_rwlock->number_of_readers += 1;
49700: 52aa 0048 addql #1,%a2@(72) 49704: 47f9 0004 b4a4 lea 4b4a4 <_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 );
4970a: 49f9 0004 b354 lea 4b354 <_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;
49710: 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 );
49714: 2f0a movel %a2,%sp@- 49716: 4e93 jsr %a3@
if ( !next ||
49718: 588f addql #4,%sp 4971a: 4a80 tstl %d0
4971c: 6720 beqs 4973e <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
4971e: 7401 moveq #1,%d2 49720: 2040 moveal %d0,%a0 49722: b4a8 0030 cmpl %a0@(48),%d2
49726: 6716 beqs 4973e <_CORE_RWLock_Release+0x8e> <== NEVER TAKEN
next->Wait.option == CORE_RWLOCK_THREAD_WAITING_FOR_WRITE )
return CORE_RWLOCK_SUCCESSFUL;
the_rwlock->number_of_readers += 1;
49728: 52aa 0048 addql #1,%a2@(72)
_Thread_queue_Extract( &the_rwlock->Wait_queue, next );
4972c: 2f00 movel %d0,%sp@- 4972e: 2f0a movel %a2,%sp@- 49730: 4e94 jsr %a4@
}
49732: 508f addql #8,%sp
/*
* Now see if more readers can be let go.
*/
while ( 1 ) {
next = _Thread_queue_First( &the_rwlock->Wait_queue );
49734: 2f0a movel %a2,%sp@- 49736: 4e93 jsr %a3@
if ( !next ||
49738: 588f addql #4,%sp 4973a: 4a80 tstl %d0
4973c: 66e0 bnes 4971e <_CORE_RWLock_Release+0x6e> <== NEVER TAKEN
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
4973e: 4280 clrl %d0 49740: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49746: 4e5e unlk %fp 49748: 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;
4974a: 202a 0048 movel %a2@(72),%d0 4974e: 5380 subql #1,%d0 49750: 2540 0048 movel %d0,%a2@(72)
if ( the_rwlock->number_of_readers != 0 ) {
49754: 6786 beqs 496dc <_CORE_RWLock_Release+0x2c>
/* must be unlocked again */
_ISR_Enable( level );
49756: 46c1 movew %d1,%sr
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49758: 4280 clrl %d0 4975a: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4 49760: 4e5e unlk %fp 49762: 4e75 rts
* If any thread is waiting, then we wait.
*/
_ISR_Disable( level );
if ( the_rwlock->current_state == CORE_RWLOCK_UNLOCKED){
_ISR_Enable( level );
49764: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_RWLOCK_UNAVAILABLE;
49766: 103c 0002 moveb #2,%d0
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
4976a: 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;
49770: 2140 0034 movel %d0,%a0@(52)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49774: 4280 clrl %d0 49776: 4e5e unlk %fp 49778: 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;
4977a: 7002 moveq #2,%d0 4977c: 2540 0044 movel %d0,%a2@(68)
}
/* indentation is to match _ISR_Disable at top */
return CORE_RWLOCK_SUCCESSFUL;
}
49780: 4280 clrl %d0 49782: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
49788: 4e5e unlk %fp <== NOT EXECUTED
0004978c <_CORE_RWLock_Timeout>:
void _CORE_RWLock_Timeout(
Objects_Id id,
void *ignored
)
{
4978c: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
49790: 486e fffc pea %fp@(-4) 49794: 2f2e 0008 movel %fp@(8),%sp@- 49798: 4eb9 0004 abd4 jsr 4abd4 <_Thread_Get>
switch ( location ) {
4979e: 508f addql #8,%sp 497a0: 4aae fffc tstl %fp@(-4)
497a4: 6618 bnes 497be <_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 );
497a6: 2f00 movel %d0,%sp@- 497a8: 4eb9 0004 b5e0 jsr 4b5e0 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
497ae: 588f addql #4,%sp 497b0: 2039 0006 2910 movel 62910 <_Thread_Dispatch_disable_level>,%d0 497b6: 5380 subql #1,%d0 497b8: 23c0 0006 2910 movel %d0,62910 <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
497be: 4e5e unlk %fp
...
00048418 <_CORE_barrier_Wait>:
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
_ISR_Disable( level );
48418: 203c 0000 0700 movel #1792,%d0
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
4841e: 4e56 fff4 linkw %fp,#-12
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
48422: 2279 0006 1800 moveal 61800 <_Per_CPU_Information+0xc>,%a1
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
48428: 48d7 001c moveml %d2-%d4,%sp@ 4842c: 206e 0008 moveal %fp@(8),%a0
Thread_Control *executing;
ISR_Level level;
executing = _Thread_Executing;
executing->Wait.return_code = CORE_BARRIER_STATUS_SUCCESSFUL;
48430: 42a9 0034 clrl %a1@(52)
Objects_Id id,
bool wait,
Watchdog_Interval timeout,
CORE_barrier_API_mp_support_callout api_barrier_mp_support
)
{
48434: 242e 000c movel %fp@(12),%d2 48438: 262e 0014 movel %fp@(20),%d3 4843c: 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 );
48440: 40c1 movew %sr,%d1 48442: 8081 orl %d1,%d0 48444: 46c0 movew %d0,%sr
the_barrier->number_of_waiting_threads++;
48446: 2028 0048 movel %a0@(72),%d0 4844a: 5280 addql #1,%d0 4844c: 2140 0048 movel %d0,%a0@(72)
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
48450: 4aa8 0040 tstl %a0@(64)
48454: 6606 bnes 4845c <_CORE_barrier_Wait+0x44>
if ( the_barrier->number_of_waiting_threads ==
48456: b0a8 0044 cmpl %a0@(68),%d0
4845a: 672e beqs 4848a <_CORE_barrier_Wait+0x72>
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;
4845c: 7001 moveq #1,%d0 4845e: 2140 0030 movel %d0,%a0@(48)
return;
}
}
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
48462: 2348 0044 movel %a0,%a1@(68)
executing->Wait.id = id;
48466: 2342 0020 movel %d2,%a1@(32)
_ISR_Enable( level );
4846a: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4846c: 2d43 000c movel %d3,%fp@(12) 48470: 203c 0004 a4c4 movel #304324,%d0 48476: 2d48 0008 movel %a0,%fp@(8)
}
4847a: 4cd7 001c moveml %sp@,%d2-%d4
_Thread_queue_Enter_critical_section( &the_barrier->Wait_queue );
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
4847e: 2d40 0010 movel %d0,%fp@(16)
}
48482: 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 );
48484: 4ef9 0004 a0fc jmp 4a0fc <_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;
4848a: 7001 moveq #1,%d0 4848c: 2340 0034 movel %d0,%a1@(52)
_ISR_Enable( level );
48490: 46c1 movew %d1,%sr
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
48492: 2d44 0010 movel %d4,%fp@(16) 48496: 2d42 000c movel %d2,%fp@(12)
executing->Wait.queue = &the_barrier->Wait_queue;
executing->Wait.id = id;
_ISR_Enable( level );
_Thread_queue_Enqueue( &the_barrier->Wait_queue, timeout );
}
4849a: 4cd7 001c moveml %sp@,%d2-%d4
if ( _CORE_barrier_Is_automatic( &the_barrier->Attributes ) ) {
if ( the_barrier->number_of_waiting_threads ==
the_barrier->Attributes.maximum_count) {
executing->Wait.return_code = CORE_BARRIER_STATUS_AUTOMATICALLY_RELEASED;
_ISR_Enable( level );
_CORE_barrier_Release( the_barrier, id, api_barrier_mp_support );
4849e: 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 );
}
484a2: 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 );
484a4: 4ef9 0004 d878 jmp 4d878 <_CORE_barrier_Release>
...
0005a014 <_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
)
{
5a014: 4e56 ffe0 linkw %fp,#-32 5a018: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 5a01c: 266e 0008 moveal %fp@(8),%a3 5a020: 282e 000c movel %fp@(12),%d4 5a024: 242e 0010 movel %fp@(16),%d2 5a028: 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 ) {
5a02c: b4ab 004c cmpl %a3@(76),%d2
5a030: 6262 bhis 5a094 <_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 ) {
5a032: 4aab 0048 tstl %a3@(72)
5a036: 664c bnes 5a084 <_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 =
5a038: 2f0b movel %a3,%sp@- 5a03a: 49f9 0005 c92c lea 5c92c <_Thread_queue_Dequeue>,%a4
* 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 ) {
5a040: 4283 clrl %d3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5a042: 4bf9 0006 2da8 lea 62da8 <memcpy>,%a5
/* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread =
5a048: 4e94 jsr %a4@ 5a04a: 588f addql #4,%sp 5a04c: 2440 moveal %d0,%a2 5a04e: 4a80 tstl %d0
5a050: 6722 beqs 5a074 <_CORE_message_queue_Broadcast+0x60>
5a052: 2f02 movel %d2,%sp@-
_Thread_queue_Dequeue(&the_message_queue->Wait_queue))) {
waitp = &the_thread->Wait;
number_broadcasted += 1;
5a054: 5283 addql #1,%d3 5a056: 2f04 movel %d4,%sp@- 5a058: 2f2a 002c movel %a2@(44),%sp@- 5a05c: 4e95 jsr %a5@
buffer,
waitp->return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
5a05e: 206a 0028 moveal %a2@(40),%a0 5a062: 4fef 000c lea %sp@(12),%sp 5a066: 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 =
5a068: 2f0b movel %a3,%sp@- 5a06a: 4e94 jsr %a4@ 5a06c: 588f addql #4,%sp 5a06e: 2440 moveal %d0,%a2 5a070: 4a80 tstl %d0
5a072: 66de bnes 5a052 <_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;
5a074: 2045 moveal %d5,%a0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
5a076: 4280 clrl %d0
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_message_queue_mp_support) ( the_thread, id );
#endif
}
*count = number_broadcasted;
5a078: 2083 movel %d3,%a0@
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; }
5a07a: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 5a080: 4e5e unlk %fp 5a082: 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;
5a084: 2045 moveal %d5,%a0
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
5a086: 4280 clrl %d0
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a088: 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;
5a08e: 4290 clrl %a0@
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a090: 4e5e unlk %fp 5a092: 4e75 rts
Thread_Control *the_thread;
uint32_t number_broadcasted;
Thread_Wait_information *waitp;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
5a094: 7001 moveq #1,%d0 <== NOT EXECUTED
#endif
}
*count = number_broadcasted;
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
}
5a096: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 <== NOT EXECUTED 5a09c: 4e5e unlk %fp <== NOT EXECUTED
0004e68c <_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
)
{
4e68c: 4e56 0000 linkw %fp,#0 4e690: 2f0a movel %a2,%sp@-
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e692: 2f2e 0010 movel %fp@(16),%sp@- 4e696: 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
)
{
4e69a: 246e 0008 moveal %fp@(8),%a2
/*
* This will flush blocked threads whether they were blocked on
* a send or receive.
*/
_Thread_queue_Flush(
4e69e: 2f0a movel %a2,%sp@- 4e6a0: 4eb9 0005 0934 jsr 50934 <_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 )
4e6a6: 4fef 000c lea %sp@(12),%sp 4e6aa: 4aaa 0048 tstl %a2@(72)
4e6ae: 6612 bnes 4e6c2 <_CORE_message_queue_Close+0x36>
(void) _CORE_message_queue_Flush_support( the_message_queue );
(void) _Workspace_Free( the_message_queue->message_buffers );
4e6b0: 2d6a 005c 0008 movel %a2@(92),%fp@(8)
}
4e6b6: 246e fffc moveal %fp@(-4),%a2 4e6ba: 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 );
4e6bc: 4ef9 0005 1752 jmp 51752 <_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 );
4e6c2: 2f0a movel %a2,%sp@- 4e6c4: 4eb9 0004 e6e0 jsr 4e6e0 <_CORE_message_queue_Flush_support>
(void) _Workspace_Free( the_message_queue->message_buffers );
4e6ca: 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 );
4e6d0: 588f addql #4,%sp
(void) _Workspace_Free( the_message_queue->message_buffers );
}
4e6d2: 246e fffc moveal %fp@(-4),%a2 4e6d6: 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 );
4e6d8: 4ef9 0005 1752 jmp 51752 <_Workspace_Free>
...
00050338 <_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)) {
50338: 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
)
{
5033a: 4e56 fff4 linkw %fp,#-12 5033e: 202e 0014 movel %fp@(20),%d0 50342: 48d7 040c moveml %d2-%d3/%a2,%sp@ 50346: 246e 0008 moveal %fp@(8),%a2 5034a: 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)) {
5034e: c280 andl %d0,%d1
)
{
size_t message_buffering_required;
size_t allocated_message_size;
the_message_queue->maximum_pending_messages = maximum_pending_messages;
50350: 2542 0044 movel %d2,%a2@(68)
the_message_queue->number_of_pending_messages = 0;
50354: 42aa 0048 clrl %a2@(72)
the_message_queue->maximum_message_size = maximum_message_size;
50358: 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;
5035c: 42aa 0060 clrl %a2@(96)
the_message_queue->notify_argument = the_argument;
50360: 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)) {
50364: 4a81 tstl %d1
50366: 6718 beqs 50380 <_CORE_message_queue_Initialize+0x48>
allocated_message_size += sizeof(uint32_t);
50368: 2200 movel %d0,%d1 5036a: 5881 addql #4,%d1
allocated_message_size &= ~(sizeof(uint32_t) - 1);
5036c: 76fc moveq #-4,%d3 5036e: c283 andl %d3,%d1
}
if (allocated_message_size < maximum_message_size)
50370: b280 cmpl %d0,%d1
50372: 640e bccs 50382 <_CORE_message_queue_Initialize+0x4a><== ALWAYS TAKEN
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
50374: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
return false;
5037a: 4200 clrb %d0
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
}
5037c: 4e5e unlk %fp 5037e: 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)) {
50380: 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));
50382: 2601 movel %d1,%d3 50384: 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 *
5038a: 2003 movel %d3,%d0 5038c: 4c02 0800 mulsl %d2,%d0
(allocated_message_size + sizeof(CORE_message_queue_Buffer_control));
if (message_buffering_required < allocated_message_size)
50390: b280 cmpl %d0,%d1
50392: 62e0 bhis 50374 <_CORE_message_queue_Initialize+0x3c><== NEVER TAKEN
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
_Workspace_Allocate( message_buffering_required );
50394: 2f00 movel %d0,%sp@- 50396: 4eb9 0005 3346 jsr 53346 <_Workspace_Allocate>
if (the_message_queue->message_buffers == 0)
5039c: 588f addql #4,%sp
return false;
/*
* Attempt to allocate the message memory
*/
the_message_queue->message_buffers = (CORE_message_queue_Buffer *)
5039e: 2540 005c movel %d0,%a2@(92)
_Workspace_Allocate( message_buffering_required );
if (the_message_queue->message_buffers == 0)
503a2: 67d0 beqs 50374 <_CORE_message_queue_Initialize+0x3c>
/*
* Initialize the pool of inactive messages, pending messages,
* and set of waiting threads.
*/
_Chain_Initialize (
503a4: 2f03 movel %d3,%sp@- 503a6: 2f02 movel %d2,%sp@- 503a8: 2f00 movel %d0,%sp@- 503aa: 486a 0068 pea %a2@(104) 503ae: 4eb9 0005 5b1c jsr 55b1c <_Chain_Initialize>
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
_Thread_queue_Initialize(
503b4: 4878 0006 pea 6 <EXTENDSFDF> 503b8: 7001 moveq #1,%d0 503ba: 206e 000c moveal %fp@(12),%a0 503be: b090 cmpl %a0@,%d0 503c0: 57c0 seq %d0 503c2: 4878 0080 pea 80 <DBL_MANT_DIG+0x4b> 503c6: 49c0 extbl %d0 503c8: 4480 negl %d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
503ca: 41ea 0054 lea %a2@(84),%a0 503ce: 2f00 movel %d0,%sp@- 503d0: 2548 0050 movel %a0,%a2@(80)
the_message_queue->message_buffers,
(size_t) maximum_pending_messages,
allocated_message_size + sizeof( CORE_message_queue_Buffer_control )
);
_Chain_Initialize_empty( &the_message_queue->Pending_messages );
503d4: 41ea 0050 lea %a2@(80),%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
503d8: 42aa 0054 clrl %a2@(84) 503dc: 2548 0058 movel %a0,%a2@(88)
_Thread_queue_Initialize(
503e0: 2f0a movel %a2,%sp@- 503e2: 4eb9 0005 2684 jsr 52684 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
503e8: 4fef 0020 lea %sp@(32),%sp
}
503ec: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_MESSAGE,
CORE_MESSAGE_QUEUE_STATUS_TIMEOUT
);
return true;
503f2: 7001 moveq #1,%d0
}
503f4: 4e5e unlk %fp <== NOT EXECUTED
00055b84 <_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
)
{
55b84: 4e56 0000 linkw %fp,#0 55b88: 226e 000c moveal %fp@(12),%a1 55b8c: 2f0b movel %a3,%sp@- 55b8e: 202e 0010 movel %fp@(16),%d0 55b92: 2f0a movel %a2,%sp@- 55b94: 206e 0008 moveal %fp@(8),%a0 55b98: 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 ) {
55b9c: 0c80 7fff ffff cmpil #2147483647,%d0
55ba2: 6760 beqs 55c04 <_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 ) {
55ba4: 0c80 8000 0000 cmpil #-2147483648,%d0 55baa: 6700 008e beqw 55c3a <_CORE_message_queue_Insert_message+0xb6> 55bae: 2208 movel %a0,%d1 55bb0: 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;
55bb6: 2468 0050 moveal %a0@(80),%a2
while ( !_Chain_Is_tail( the_header, the_node ) ) {
55bba: b28a cmpl %a2,%d1
55bbc: 670c beqs 55bca <_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 ) {
55bbe: b0aa 0008 cmpl %a2@(8),%d0
55bc2: 6d06 blts 55bca <_CORE_message_queue_Insert_message+0x46>
the_node = the_node->next;
55bc4: 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 ) ) {
55bc6: b28a cmpl %a2,%d1
55bc8: 66f4 bnes 55bbe <_CORE_message_queue_Insert_message+0x3a>
the_node = the_node->next;
continue;
}
break;
}
_ISR_Disable( level );
55bca: 203c 0000 0700 movel #1792,%d0 55bd0: 40c1 movew %sr,%d1 55bd2: 8081 orl %d1,%d0 55bd4: 46c0 movew %d0,%sr
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
55bd6: 246a 0004 moveal %a2@(4),%a2
}
break;
}
_ISR_Disable( level );
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55bda: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
55bde: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
55be0: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
55be4: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
55be6: 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;
55bea: 228b movel %a3,%a1@
_Chain_Insert_unprotected( the_node->previous, &the_message->Node );
_ISR_Enable( level );
55bec: 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 )
55bee: 2268 0060 moveal %a0@(96),%a1 55bf2: 4a89 tstl %a1
55bf4: 673c beqs 55c32 <_CORE_message_queue_Insert_message+0xae>
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
55bf6: 245f moveal %sp@+,%a2
* 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);
55bf8: 2d68 0064 0008 movel %a0@(100),%fp@(8)
#endif }
55bfe: 265f moveal %sp@+,%a3 55c00: 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);
55c02: 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 );
55c04: 203c 0000 0700 movel #1792,%d0 55c0a: 40c1 movew %sr,%d1 55c0c: 8081 orl %d1,%d0 55c0e: 46c0 movew %d0,%sr
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55c10: 52a8 0048 addql #1,%a0@(72)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
55c14: 45e8 0054 lea %a0@(84),%a2 55c18: 228a movel %a2,%a1@
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
55c1a: 2468 0058 moveal %a0@(88),%a2
the_chain->last = the_node;
55c1e: 2149 0058 movel %a1,%a0@(88)
old_last_node->next = the_node;
55c22: 2489 movel %a1,%a2@
the_node->previous = old_last_node;
55c24: 234a 0004 movel %a2,%a1@(4)
_CORE_message_queue_Append_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
55c28: 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 )
55c2a: 2268 0060 moveal %a0@(96),%a1 55c2e: 4a89 tstl %a1
55c30: 66c4 bnes 55bf6 <_CORE_message_queue_Insert_message+0x72><== NEVER TAKEN
(*the_message_queue->notify_handler)(the_message_queue->notify_argument);
#endif
}
55c32: 245f moveal %sp@+,%a2 55c34: 265f moveal %sp@+,%a3 55c36: 4e5e unlk %fp 55c38: 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 );
55c3a: 203c 0000 0700 movel #1792,%d0 55c40: 40c1 movew %sr,%d1 55c42: 8081 orl %d1,%d0 55c44: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _CORE_message_queue_Prepend_unprotected (
CORE_message_queue_Control *the_message_queue,
CORE_message_queue_Buffer_control *the_message
)
{
_Chain_Prepend_unprotected(
55c46: 45e8 0050 lea %a0@(80),%a2
SET_NOTIFY();
the_message_queue->number_of_pending_messages++;
55c4a: 52a8 0048 addql #1,%a0@(72)
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
55c4e: 2652 moveal %a2@,%a3
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
55c50: 234a 0004 movel %a2,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
55c54: 2489 movel %a1,%a2@
the_node->next = before_node; before_node->previous = the_node;
55c56: 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;
55c5a: 228b movel %a3,%a1@
_CORE_message_queue_Prepend_unprotected(the_message_queue, the_message);
_ISR_Enable( level );
55c5c: 46c1 movew %d1,%sr 55c5e: 608e bras 55bee <_CORE_message_queue_Insert_message+0x6a>
000503f8 <_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 );
503f8: 203c 0000 0700 movel #1792,%d0
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
503fe: 4e56 ffe8 linkw %fp,#-24
ISR_Level level;
CORE_message_queue_Buffer_control *the_message;
Thread_Control *executing;
executing = _Thread_Executing;
50402: 2279 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a1
void *buffer,
size_t *size_p,
bool wait,
Watchdog_Interval timeout
)
{
50408: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 5040c: 246e 0008 moveal %fp@(8),%a2 50410: 282e 000c movel %fp@(12),%d4 50414: 262e 0010 movel %fp@(16),%d3 50418: 206e 0014 moveal %fp@(20),%a0 5041c: 286e 001c moveal %fp@(28),%a4 50420: 142e 001b moveb %fp@(27),%d2
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;
50424: 42a9 0034 clrl %a1@(52)
_ISR_Disable( level );
50428: 40c1 movew %sr,%d1 5042a: 8081 orl %d1,%d0 5042c: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
5042e: 200a movel %a2,%d0 50430: 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));
50436: 266a 0050 moveal %a2@(80),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
5043a: b08b cmpl %a3,%d0 5043c: 6700 0088 beqw 504c6 <_CORE_message_queue_Seize+0xce>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
50440: 2253 moveal %a3@,%a1
CORE_message_queue_Buffer_control *_CORE_message_queue_Get_pending_message (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get_unprotected( &the_message_queue->Pending_messages );
50442: 49ea 0050 lea %a2@(80),%a4
the_chain->first = new_first;
50446: 2549 0050 movel %a1,%a2@(80) 5044a: 234c 0004 movel %a4,%a1@(4)
the_message = _CORE_message_queue_Get_pending_message( the_message_queue );
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
5044e: 53aa 0048 subql #1,%a2@(72)
_ISR_Enable( level );
50452: 46c1 movew %d1,%sr
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
50454: 2279 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a1
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;
5045a: 20ab 000c movel %a3@(12),%a0@
_Thread_Executing->Wait.count =
_CORE_message_queue_Get_message_priority( the_message );
_CORE_message_queue_Copy_buffer(
the_message->Contents.buffer,
5045e: 240b movel %a3,%d2 50460: 0682 0000 0010 addil #16,%d2
if ( the_message != NULL ) {
the_message_queue->number_of_pending_messages -= 1;
_ISR_Enable( level );
*size_p = the_message->Contents.size;
_Thread_Executing->Wait.count =
50466: 236b 0008 0024 movel %a3@(8),%a1@(36)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5046c: 49f9 0005 88d4 lea 588d4 <memcpy>,%a4 50472: 2f10 movel %a0@,%sp@- 50474: 2f02 movel %d2,%sp@- 50476: 2f03 movel %d3,%sp@- 50478: 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 );
5047a: 2f0a movel %a2,%sp@- 5047c: 4eb9 0005 2258 jsr 52258 <_Thread_queue_Dequeue>
if ( !the_thread ) {
50482: 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 );
50486: 2040 moveal %d0,%a0
if ( !the_thread ) {
50488: 4a80 tstl %d0 5048a: 6700 0088 beqw 50514 <_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;
5048e: 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;
50492: 2768 0024 0008 movel %a0@(36),%a3@(8) 50498: 2740 000c movel %d0,%a3@(12)
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
5049c: 2f00 movel %d0,%sp@- 5049e: 2f28 002c movel %a0@(44),%sp@- 504a2: 2f02 movel %d2,%sp@- 504a4: 4e94 jsr %a4@
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
504a6: 2d6b 0008 0010 movel %a3@(8),%fp@(16) 504ac: 4fef 000c lea %sp@(12),%sp 504b0: 2d4b 000c movel %a3,%fp@(12) 504b4: 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 );
}
504b8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 504be: 4e5e unlk %fp
the_thread->Wait.return_argument_second.immutable_object,
the_message->Contents.buffer,
the_message->Contents.size
);
_CORE_message_queue_Insert_message(
504c0: 4ef9 0005 5b84 jmp 55b84 <_CORE_message_queue_Insert_message>
return;
}
#endif
}
if ( !wait ) {
504c6: 4a02 tstb %d2
504c8: 6612 bnes 504dc <_CORE_message_queue_Seize+0xe4>
_ISR_Enable( level );
504ca: 46c1 movew %d1,%sr
executing->Wait.return_code = CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_NOWAIT;
504cc: 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 );
}
504ce: 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;
504d4: 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 );
}
504d8: 4e5e unlk %fp 504da: 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;
504dc: 7001 moveq #1,%d0 504de: 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;
504e2: 2343 002c movel %d3,%a1@(44)
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;
504e6: 234a 0044 movel %a2,%a1@(68)
executing->Wait.id = id;
504ea: 2344 0020 movel %d4,%a1@(32)
executing->Wait.return_argument_second.mutable_object = buffer; executing->Wait.return_argument = size_p;
504ee: 2348 0028 movel %a0,%a1@(40)
/* Wait.count will be filled in with the message priority */ _ISR_Enable( level );
504f2: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
504f4: 2d4c 000c movel %a4,%fp@(12) 504f8: 49f9 0005 2790 lea 52790 <_Thread_queue_Timeout>,%a4 504fe: 2d4a 0008 movel %a2,%fp@(8) 50502: 2d4c 0010 movel %a4,%fp@(16)
}
50506: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 5050c: 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 );
5050e: 4ef9 0005 23c8 jmp 523c8 <_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 );
50514: 45ea 0068 lea %a2@(104),%a2 50518: 2d4b 000c movel %a3,%fp@(12) 5051c: 2d4a 0008 movel %a2,%fp@(8)
}
50520: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 50526: 4e5e unlk %fp 50528: 4ef9 0005 026c jmp 5026c <_Chain_Append>
...
00050530 <_CORE_message_queue_Submit>:
#endif
CORE_message_queue_Submit_types submit_type,
bool wait,
Watchdog_Interval timeout
)
{
50530: 4e56 ffec linkw %fp,#-20 50534: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 50538: 246e 0008 moveal %fp@(8),%a2 5053c: 242e 0010 movel %fp@(16),%d2 50540: 282e 001c movel %fp@(28),%d4 50544: 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 ) {
50548: b4aa 004c cmpl %a2@(76),%d2
5054c: 6228 bhis 50576 <_CORE_message_queue_Submit+0x46>
}
/*
* Is there a thread currently waiting on this message queue?
*/
if ( the_message_queue->number_of_pending_messages == 0 ) {
5054e: 202a 0048 movel %a2@(72),%d0
50552: 672e beqs 50582 <_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 <
50554: b0aa 0044 cmpl %a2@(68),%d0 50558: 6500 00ba bcsw 50614 <_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 ) {
5055c: 4a03 tstb %d3 5055e: 6700 00f4 beqw 50654 <_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() ) {
50562: 4ab9 0006 9f40 tstl 69f40 <_Per_CPU_Information+0x8>
50568: 6754 beqs 505be <_CORE_message_queue_Submit+0x8e>
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED;
5056a: 7003 moveq #3,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5056c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50572: 4e5e unlk %fp 50574: 4e75 rts
{
CORE_message_queue_Buffer_control *the_message;
Thread_Control *the_thread;
if ( size > the_message_queue->maximum_message_size ) {
return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE;
50576: 7001 moveq #1,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50578: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5057e: 4e5e unlk %fp 50580: 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 );
50582: 2f0a movel %a2,%sp@- 50584: 4eb9 0005 2258 jsr 52258 <_Thread_queue_Dequeue>
if ( the_thread ) {
5058a: 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 );
5058c: 2640 moveal %d0,%a3
if ( the_thread ) {
5058e: 4a80 tstl %d0 50590: 6700 00ce beqw 50660 <_CORE_message_queue_Submit+0x130>
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
50594: 2f02 movel %d2,%sp@- 50596: 2f2e 000c movel %fp@(12),%sp@- 5059a: 2f2b 002c movel %a3@(44),%sp@- 5059e: 4eb9 0005 88d4 jsr 588d4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_thread->Wait.return_argument_second.mutable_object,
size
);
*(size_t *) the_thread->Wait.return_argument = size;
505a4: 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;
505a8: 4fef 000c lea %sp@(12),%sp 505ac: 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;
505ae: 2082 movel %d2,%a0@
the_thread->Wait.count = (uint32_t) submit_type;
505b0: 2744 0024 movel %d4,%a3@(36)
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
505b4: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 505ba: 4e5e unlk %fp 505bc: 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;
505be: 2079 0006 9f44 moveal 69f44 <_Per_CPU_Information+0xc>,%a0
ISR_Level level;
_ISR_Disable( level );
505c4: 203c 0000 0700 movel #1792,%d0 505ca: 40c1 movew %sr,%d1 505cc: 8081 orl %d1,%d0 505ce: 46c0 movew %d0,%sr 505d0: 7001 moveq #1,%d0 505d2: 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.immutable_object = buffer;
505d6: 202e 000c movel %fp@(12),%d0
ISR_Level level;
_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;
505da: 216e 0014 0020 movel %fp@(20),%a0@(32)
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;
505e0: 214a 0044 movel %a2,%a0@(68)
executing->Wait.id = id;
executing->Wait.return_argument_second.immutable_object = buffer;
505e4: 2140 002c movel %d0,%a0@(44)
executing->Wait.option = (uint32_t) size;
505e8: 2142 0030 movel %d2,%a0@(48)
executing->Wait.count = submit_type;
505ec: 2144 0024 movel %d4,%a0@(36)
_ISR_Enable( level );
505f0: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
505f2: 4879 0005 2790 pea 52790 <_Thread_queue_Timeout> 505f8: 2f2e 0024 movel %fp@(36),%sp@- 505fc: 2f0a movel %a2,%sp@- 505fe: 4eb9 0005 23c8 jsr 523c8 <_Thread_queue_Enqueue_with_handler>
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
50604: 4fef 000c lea %sp@(12),%sp 50608: 7007 moveq #7,%d0
#endif }
5060a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50610: 4e5e unlk %fp 50612: 4e75 rts
_CORE_message_queue_Allocate_message_buffer (
CORE_message_queue_Control *the_message_queue
)
{
return (CORE_message_queue_Buffer_control *)
_Chain_Get( &the_message_queue->Inactive_messages );
50614: 486a 0068 pea %a2@(104) 50618: 4eb9 0005 02cc jsr 502cc <_Chain_Get> 5061e: 2640 moveal %d0,%a3
const void *source,
void *destination,
size_t size
)
{
memcpy(destination, source, size);
50620: 2f02 movel %d2,%sp@- 50622: 2f2e 000c movel %fp@(12),%sp@- 50626: 486b 0010 pea %a3@(16) 5062a: 4eb9 0005 88d4 jsr 588d4 <memcpy>
_CORE_message_queue_Copy_buffer(
buffer,
the_message->Contents.buffer,
size
);
the_message->Contents.size = size;
50630: 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;
50634: 2744 0008 movel %d4,%a3@(8)
_CORE_message_queue_Set_message_priority( the_message, submit_type );
_CORE_message_queue_Insert_message(
50638: 2f04 movel %d4,%sp@- 5063a: 2f0b movel %a3,%sp@- 5063c: 2f0a movel %a2,%sp@- 5063e: 4eb9 0005 5b84 jsr 55b84 <_CORE_message_queue_Insert_message>
the_message_queue,
the_message,
submit_type
);
return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL;
50644: 4fef 001c lea %sp@(28),%sp 50648: 4280 clrl %d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
5064a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 50650: 4e5e unlk %fp 50652: 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 ) {
return CORE_MESSAGE_QUEUE_STATUS_TOO_MANY;
50654: 7002 moveq #2,%d0
_Thread_queue_Enqueue( &the_message_queue->Wait_queue, timeout );
}
return CORE_MESSAGE_QUEUE_STATUS_UNSATISFIED_WAIT;
#endif
}
50656: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5065c: 4e5e unlk %fp 5065e: 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 ) {
50660: 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 <
50664: b0aa 0044 cmpl %a2@(68),%d0 50668: 6400 fef2 bccw 5055c <_CORE_message_queue_Submit+0x2c> 5066c: 60a6 bras 50614 <_CORE_message_queue_Submit+0xe4>
...
00047140 <_CORE_mutex_Initialize>:
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
47140: 4e56 0000 linkw %fp,#0 47144: 206e 0008 moveal %fp@(8),%a0 47148: 2f0a movel %a2,%sp@- 4714a: 246e 000c moveal %fp@(12),%a2
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
4714e: 224a moveal %a2,%a1 47150: 2159 0040 movel %a1@+,%a0@(64) 47154: 2159 0044 movel %a1@+,%a0@(68) 47158: 2159 0048 movel %a1@+,%a0@(72)
CORE_mutex_Status _CORE_mutex_Initialize(
CORE_mutex_Control *the_mutex,
CORE_mutex_Attributes *the_mutex_attributes,
uint32_t initial_lock
)
{
4715c: 202e 0010 movel %fp@(16),%d0
/* Add this to the RTEMS environment later ?????????
rtems_assert( initial_lock == CORE_MUTEX_LOCKED ||
initial_lock == CORE_MUTEX_UNLOCKED );
*/
the_mutex->Attributes = *the_mutex_attributes;
47160: 3151 004c movew %a1@,%a0@(76)
the_mutex->lock = initial_lock;
47164: 2140 004e movel %d0,%a0@(78)
the_mutex->blocked_count = 0;
47168: 42a8 0056 clrl %a0@(86)
if ( initial_lock == CORE_MUTEX_LOCKED ) {
4716c: 4a80 tstl %d0
4716e: 6654 bnes 471c4 <_CORE_mutex_Initialize+0x84>
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
47170: 2279 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a1
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
47176: 7201 moveq #1,%d1
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
47178: 2169 0008 005e movel %a1@(8),%a0@(94)
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
4717e: 2028 0046 movel %a0@(70),%d0
the_mutex->Attributes = *the_mutex_attributes;
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
47182: 2141 0052 movel %d1,%a0@(82)
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
47186: 123c 0002 moveb #2,%d1
the_mutex->lock = initial_lock;
the_mutex->blocked_count = 0;
if ( initial_lock == CORE_MUTEX_LOCKED ) {
the_mutex->nest_count = 1;
the_mutex->holder = _Thread_Executing;
4718a: 2149 005a movel %a1,%a0@(90)
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
4718e: b280 cmpl %d0,%d1
47190: 6762 beqs 471f4 <_CORE_mutex_Initialize+0xb4>
47192: 123c 0003 moveb #3,%d1 47196: b280 cmpl %d0,%d1
47198: 675a beqs 471f4 <_CORE_mutex_Initialize+0xb4> <== NEVER TAKEN
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
4719a: 4aaa 0006 tstl %a2@(6) 4719e: 56c0 sne %d0 471a0: 4878 0005 pea 5 <COMPARE> 471a4: 49c0 extbl %d0 471a6: 4878 0400 pea 400 <D_BIAS+0x2> 471aa: 4480 negl %d0 471ac: 2f00 movel %d0,%sp@- 471ae: 2f08 movel %a0,%sp@- 471b0: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
471b6: 4fef 0010 lea %sp@(16),%sp 471ba: 4280 clrl %d0
}
471bc: 246e fffc moveal %fp@(-4),%a2 471c0: 4e5e unlk %fp 471c2: 4e75 rts
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
471c4: 4aaa 0006 tstl %a2@(6) 471c8: 56c0 sne %d0
#endif
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
471ca: 42a8 0052 clrl %a0@(82)
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
471ce: 49c0 extbl %d0 471d0: 4480 negl %d0
_Thread_Executing->resource_count++;
}
} else {
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
471d2: 42a8 005a clrl %a0@(90)
the_mutex->holder_id = 0;
471d6: 42a8 005e clrl %a0@(94)
}
_Thread_queue_Initialize(
471da: 4878 0005 pea 5 <COMPARE> 471de: 4878 0400 pea 400 <D_BIAS+0x2> 471e2: 2f00 movel %d0,%sp@- 471e4: 2f08 movel %a0,%sp@- 471e6: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
471ec: 4fef 0010 lea %sp@(16),%sp 471f0: 4280 clrl %d0 471f2: 60c8 bras 471bc <_CORE_mutex_Initialize+0x7c>
the_mutex->holder = _Thread_Executing;
the_mutex->holder_id = _Thread_Executing->Object.id;
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
471f4: 2028 004a movel %a0@(74),%d0 471f8: b0a9 0014 cmpl %a1@(20),%d0
471fc: 6228 bhis 47226 <_CORE_mutex_Initialize+0xe6>
_Chain_Prepend_unprotected( &_Thread_Executing->lock_mutex,
&the_mutex->queue.lock_queue );
the_mutex->queue.priority_before = _Thread_Executing->current_priority;
#endif
_Thread_Executing->resource_count++;
471fe: 52a9 001c addql #1,%a1@(28)
the_mutex->nest_count = 0;
the_mutex->holder = NULL;
the_mutex->holder_id = 0;
}
_Thread_queue_Initialize(
47202: 4aaa 0006 tstl %a2@(6) 47206: 56c0 sne %d0 47208: 4878 0005 pea 5 <COMPARE> 4720c: 49c0 extbl %d0 4720e: 4878 0400 pea 400 <D_BIAS+0x2> 47212: 4480 negl %d0 47214: 2f00 movel %d0,%sp@- 47216: 2f08 movel %a0,%sp@- 47218: 4eb9 0004 90c0 jsr 490c0 <_Thread_queue_Initialize>
THREAD_QUEUE_DISCIPLINE_FIFO : THREAD_QUEUE_DISCIPLINE_PRIORITY,
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
4721e: 4fef 0010 lea %sp@(16),%sp 47222: 4280 clrl %d0 47224: 6096 bras 471bc <_CORE_mutex_Initialize+0x7c>
}
47226: 246e fffc moveal %fp@(-4),%a2
if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) ||
_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) {
if ( _Thread_Executing->current_priority <
the_mutex->Attributes.priority_ceiling )
return CORE_MUTEX_STATUS_CEILING_VIOLATED;
4722a: 7006 moveq #6,%d0
STATES_WAITING_FOR_MUTEX,
CORE_MUTEX_TIMEOUT
);
return CORE_MUTEX_STATUS_SUCCESSFUL;
}
4722c: 4e5e unlk %fp <== NOT EXECUTED
000472bc <_CORE_mutex_Seize>:
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
472bc: 4e56 0000 linkw %fp,#0
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
472c0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0
Objects_Id _id,
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
472c6: 2f0a movel %a2,%sp@- 472c8: 246e 0008 moveal %fp@(8),%a2 472cc: 2f02 movel %d2,%sp@- 472ce: 142e 0013 moveb %fp@(19),%d2
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
472d2: 4a80 tstl %d0
472d4: 6704 beqs 472da <_CORE_mutex_Seize+0x1e>
472d6: 4a02 tstb %d2
472d8: 6634 bnes 4730e <_CORE_mutex_Seize+0x52> <== ALWAYS TAKEN
472da: 486e 0018 pea %fp@(24) 472de: 2f0a movel %a2,%sp@- 472e0: 4eb9 0004 c5ac jsr 4c5ac <_CORE_mutex_Seize_interrupt_trylock> 472e6: 508f addql #8,%sp 472e8: 4a80 tstl %d0
472ea: 6716 beqs 47302 <_CORE_mutex_Seize+0x46>
472ec: 4a02 tstb %d2
472ee: 6636 bnes 47326 <_CORE_mutex_Seize+0x6a>
472f0: 202e 0018 movel %fp@(24),%d0 472f4: 46c0 movew %d0,%sr 472f6: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 472fc: 7001 moveq #1,%d0 472fe: 2140 0034 movel %d0,%a0@(52)
}
47302: 242e fff8 movel %fp@(-8),%d2 47306: 246e fffc moveal %fp@(-4),%a2 4730a: 4e5e unlk %fp 4730c: 4e75 rts
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
4730e: 7001 moveq #1,%d0 47310: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0
47316: 64c2 bccs 472da <_CORE_mutex_Seize+0x1e>
47318: 4878 0012 pea 12 <INVALID_OPERATION+0x2> 4731c: 42a7 clrl %sp@- 4731e: 42a7 clrl %sp@- 47320: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred>
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;
47326: 7001 moveq #1,%d0 47328: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 4732e: 2540 0030 movel %d0,%a2@(48) 47332: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 47338: 5280 addql #1,%d0 4733a: 216e 000c 0020 movel %fp@(12),%a0@(32) 47340: 214a 0044 movel %a2,%a0@(68) 47344: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 4734a: 202e 0018 movel %fp@(24),%d0 4734e: 46c0 movew %d0,%sr 47350: 2f2e 0014 movel %fp@(20),%sp@- 47354: 2f0a movel %a2,%sp@- 47356: 4eb9 0004 7230 jsr 47230 <_CORE_mutex_Seize_interrupt_blocking>
}
4735c: 242e fff8 movel %fp@(-8),%d2
bool _wait,
Watchdog_Interval _timeout,
ISR_Level _level
)
{
_CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level );
47360: 508f addql #8,%sp
}
47362: 246e fffc moveal %fp@(-4),%a2 47366: 4e5e unlk %fp
...
000474c0 <_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
)
{
474c0: 4e56 0000 linkw %fp,#0 474c4: 2f0a movel %a2,%sp@- 474c6: 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)) ) {
474ca: 2f0a movel %a2,%sp@- 474cc: 4eb9 0004 8c94 jsr 48c94 <_Thread_queue_Dequeue> 474d2: 588f addql #4,%sp 474d4: 4a80 tstl %d0
474d6: 670a beqs 474e2 <_CORE_semaphore_Surrender+0x22>
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
474d8: 246e fffc moveal %fp@(-4),%a2
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
474dc: 4280 clrl %d0
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
}
return status;
}
474de: 4e5e unlk %fp 474e0: 4e75 rts
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
(*api_semaphore_mp_support) ( the_thread, id );
#endif
} else {
_ISR_Disable( level );
474e2: 303c 0700 movew #1792,%d0 474e6: 40c1 movew %sr,%d1 474e8: 8081 orl %d1,%d0 474ea: 46c0 movew %d0,%sr
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
474ec: 202a 0048 movel %a2@(72),%d0 474f0: b0aa 0040 cmpl %a2@(64),%d0
474f4: 6412 bccs 47508 <_CORE_semaphore_Surrender+0x48> <== NEVER TAKEN
the_semaphore->count += 1;
474f6: 5280 addql #1,%d0 474f8: 2540 0048 movel %d0,%a2@(72)
{
Thread_Control *the_thread;
ISR_Level level;
CORE_semaphore_Status status;
status = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
474fc: 4280 clrl %d0
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
_ISR_Enable( level );
474fe: 46c1 movew %d1,%sr
}
return status;
}
47500: 246e fffc moveal %fp@(-4),%a2 47504: 4e5e unlk %fp 47506: 4e75 rts
} else {
_ISR_Disable( level );
if ( the_semaphore->count < the_semaphore->Attributes.maximum_count )
the_semaphore->count += 1;
else
status = CORE_SEMAPHORE_MAXIMUM_COUNT_EXCEEDED;
47508: 7004 moveq #4,%d0 <== NOT EXECUTED
_ISR_Enable( level );
4750a: 46c1 movew %d1,%sr <== NOT EXECUTED 4750c: 60f2 bras 47500 <_CORE_semaphore_Surrender+0x40> <== NOT EXECUTED
...
0004c544 <_Chain_Initialize>:
Chain_Control *the_chain,
void *starting_address,
size_t number_nodes,
size_t node_size
)
{
4c544: 4e56 fff0 linkw %fp,#-16 4c548: 48d7 041c moveml %d2-%d4/%a2,%sp@ 4c54c: 246e 0008 moveal %fp@(8),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4c550: 224a moveal %a2,%a1 4c552: 282e 000c movel %fp@(12),%d4 4c556: 262e 0010 movel %fp@(16),%d3 4c55a: 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;
4c55e: 42aa 0004 clrl %a2@(4)
next = starting_address;
while ( count-- ) {
4c562: 4a83 tstl %d3
4c564: 6732 beqs 4c598 <_Chain_Initialize+0x54> <== NEVER TAKEN
Chain_Node *next;
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
4c566: 2044 moveal %d4,%a0 4c568: 2003 movel %d3,%d0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4c56a: 2208 movel %a0,%d1 4c56c: d282 addl %d2,%d1 4c56e: 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;
4c570: 2288 movel %a0,%a1@
next->previous = current;
4c572: 2149 0004 movel %a1,%a0@(4)
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4c576: 4a80 tstl %d0
4c578: 6714 beqs 4c58e <_Chain_Initialize+0x4a>
4c57a: 2248 moveal %a0,%a1
current->next = next;
next->previous = current;
current = next;
next = (Chain_Node *)
4c57c: 2041 moveal %d1,%a0
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4c57e: 2208 movel %a0,%d1 4c580: d282 addl %d2,%d1 4c582: 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;
4c584: 2288 movel %a0,%a1@
next->previous = current;
4c586: 2149 0004 movel %a1,%a0@(4)
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4c58a: 4a80 tstl %d0
4c58c: 66ec bnes 4c57a <_Chain_Initialize+0x36>
* node_size - size of node in bytes
*
* Output parameters: NONE
*/
void _Chain_Initialize(
4c58e: 5383 subql #1,%d3 4c590: 4c02 3800 mulsl %d2,%d3
count = number_nodes;
current = _Chain_Head( the_chain );
the_chain->permanent_null = NULL;
next = starting_address;
while ( count-- ) {
4c594: 2244 moveal %d4,%a1 4c596: d3c3 addal %d3,%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4c598: 200a movel %a2,%d0 4c59a: 5880 addql #4,%d0 4c59c: 2280 movel %d0,%a1@
current = next;
next = (Chain_Node *)
_Addresses_Add_offset( (void *) next, node_size );
}
current->next = _Chain_Tail( the_chain );
the_chain->last = current;
4c59e: 2549 0008 movel %a1,%a2@(8)
}
4c5a2: 4cd7 041c moveml %sp@,%d2-%d4/%a2 4c5a6: 4e5e unlk %fp
...
00045ff4 <_Event_Seize>:
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
_ISR_Disable( level );
45ff4: 203c 0000 0700 movel #1792,%d0
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
45ffa: 4e56 ffec linkw %fp,#-20 45ffe: 222e 0008 movel %fp@(8),%d1 46002: 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;
46006: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
rtems_event_set event_in,
rtems_option option_set,
rtems_interval ticks,
rtems_event_set *event_out
)
{
4600c: 242e 000c movel %fp@(12),%d2 46010: 2a2e 0010 movel %fp@(16),%d5 46014: 226e 0014 moveal %fp@(20),%a1
ISR_Level level;
RTEMS_API_Control *api;
Thread_blocking_operation_States sync_state;
executing = _Thread_Executing;
executing->Wait.return_code = RTEMS_SUCCESSFUL;
46018: 42aa 0034 clrl %a2@(52)
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4601c: 206a 010a moveal %a2@(266),%a0
_ISR_Disable( level );
46020: 40c4 movew %sr,%d4 46022: 8084 orl %d4,%d0 46024: 46c0 movew %d0,%sr
pending_events = api->pending_events;
46026: 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 );
46028: 2001 movel %d1,%d0 4602a: c083 andl %d3,%d0
seized_events = _Event_sets_Get( pending_events, event_in );
if ( !_Event_sets_Is_empty( seized_events ) &&
4602c: 670c beqs 4603a <_Event_Seize+0x46>
4602e: b081 cmpl %d1,%d0 46030: 6700 0084 beqw 460b6 <_Event_Seize+0xc2>
(seized_events == event_in || _Options_Is_any( option_set )) ) {
46034: 0802 0001 btst #1,%d2
46038: 667c bnes 460b6 <_Event_Seize+0xc2> <== ALWAYS TAKEN
_ISR_Enable( level );
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
4603a: 0802 0000 btst #0,%d2
4603e: 6662 bnes 460a2 <_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;
46040: 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;
46044: 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;
46046: 2541 0024 movel %d1,%a2@(36)
executing->Wait.return_argument = event_out;
4604a: 2549 0028 movel %a1,%a2@(40)
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
4604e: 23c2 0006 031a movel %d2,6031a <_Event_Sync_state>
_ISR_Enable( level );
46054: 46c4 movew %d4,%sr
if ( ticks ) {
46056: 4a85 tstl %d5
46058: 6672 bnes 460cc <_Event_Seize+0xd8>
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
4605a: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4605e: 2f0a movel %a2,%sp@- 46060: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state>
_ISR_Disable( level );
46066: 203c 0000 0700 movel #1792,%d0 4606c: 40c1 movew %sr,%d1 4606e: 8081 orl %d1,%d0 46070: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46072: 7401 moveq #1,%d2 46074: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
46076: 2039 0006 031a movel 6031a <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4607c: 42b9 0006 031a clrl 6031a <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46082: b480 cmpl %d0,%d2 46084: 6700 00a4 beqw 4612a <_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 );
46088: 2d4a 000c movel %a2,%fp@(12) 4608c: 2d41 0010 movel %d1,%fp@(16)
}
46090: 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 );
46096: 2d40 0008 movel %d0,%fp@(8)
}
4609a: 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 );
4609c: 4ef9 0004 8314 jmp 48314 <_Thread_blocking_operation_Cancel>
*event_out = seized_events;
return;
}
if ( _Options_Is_no_wait( option_set ) ) {
_ISR_Enable( level );
460a2: 46c4 movew %d4,%sr
executing->Wait.return_code = RTEMS_UNSATISFIED;
460a4: 720d moveq #13,%d1 460a6: 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 ); }
460aa: 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;
460b0: 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 ); }
460b2: 4e5e unlk %fp 460b4: 4e75 rts
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
460b6: 2200 movel %d0,%d1 460b8: 4681 notl %d1 460ba: c283 andl %d3,%d1 460bc: 2081 movel %d1,%a0@
if ( !_Event_sets_Is_empty( seized_events ) &&
(seized_events == event_in || _Options_Is_any( option_set )) ) {
api->pending_events =
_Event_sets_Clear( pending_events, seized_events );
_ISR_Enable( level );
460be: 46c4 movew %d4,%sr
*event_out = seized_events;
460c0: 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 ); }
460c2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 460c8: 4e5e unlk %fp 460ca: 4e75 rts
_Event_Sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
_ISR_Enable( level );
if ( ticks ) {
_Watchdog_Initialize(
460cc: 202a 0008 movel %a2@(8),%d0
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
460d0: 223c 0004 62bc movel #287420,%d1
the_watchdog->id = id;
460d6: 2540 0068 movel %d0,%a2@(104)
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
460da: 2541 0064 movel %d1,%a2@(100)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
460de: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
460e2: 42aa 006c clrl %a2@(108)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
460e6: 2545 0054 movel %d5,%a2@(84)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
460ea: 486a 0048 pea %a2@(72) 460ee: 4879 0005 fb9e pea 5fb9e <_Watchdog_Ticks_chain> 460f4: 4eb9 0004 9ab8 jsr 49ab8 <_Watchdog_Insert> 460fa: 508f addql #8,%sp
NULL
);
_Watchdog_Insert_ticks( &executing->Timer, ticks );
}
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
460fc: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 46100: 2f0a movel %a2,%sp@- 46102: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state>
_ISR_Disable( level );
46108: 203c 0000 0700 movel #1792,%d0 4610e: 40c1 movew %sr,%d1 46110: 8081 orl %d1,%d0 46112: 46c0 movew %d0,%sr
sync_state = _Event_Sync_state;
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46114: 7401 moveq #1,%d2 46116: 508f addql #8,%sp
_Thread_Set_state( executing, STATES_WAITING_FOR_EVENT );
_ISR_Disable( level );
sync_state = _Event_Sync_state;
46118: 2039 0006 031a movel 6031a <_Event_Sync_state>,%d0
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
4611e: 42b9 0006 031a clrl 6031a <_Event_Sync_state>
if ( sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
46124: b480 cmpl %d0,%d2 46126: 6600 ff60 bnew 46088 <_Event_Seize+0x94>
_ISR_Enable( level );
4612a: 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 ); }
4612c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46132: 4e5e unlk %fp
...
00046194 <_Event_Surrender>:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
option_set = (rtems_option) the_thread->Wait.option;
_ISR_Disable( level );
46194: 203c 0000 0700 movel #1792,%d0
*/
void _Event_Surrender(
Thread_Control *the_thread
)
{
4619a: 4e56 ffec linkw %fp,#-20 4619e: 48d7 043c moveml %d2-%d5/%a2,%sp@ 461a2: 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 ];
461a6: 206a 010a moveal %a2@(266),%a0
option_set = (rtems_option) the_thread->Wait.option;
461aa: 282a 0030 movel %a2@(48),%d4
_ISR_Disable( level );
461ae: 40c3 movew %sr,%d3 461b0: 8083 orl %d3,%d0 461b2: 46c0 movew %d0,%sr
pending_events = api->pending_events; event_condition = (rtems_event_set) the_thread->Wait.count;
461b4: 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 );
461b8: 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;
461ba: 2410 movel %a0@,%d2 461bc: 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 ) ) {
461be: 6776 beqs 46236 <_Event_Surrender+0xa2>
/*
* 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() &&
461c0: 4ab9 0005 ff68 tstl 5ff68 <_Per_CPU_Information+0x8>
461c6: 670a beqs 461d2 <_Event_Surrender+0x3e>
461c8: b5f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a2 461ce: 6700 00a0 beqw 46270 <_Event_Surrender+0xdc>
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_event (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_EVENT);
461d2: 2a2a 0010 movel %a2@(16),%d5 461d6: 0285 0000 0100 andil #256,%d5
}
/*
* Otherwise, this is a normal send to another thread
*/
if ( _States_Is_waiting_for_event( the_thread->current_state ) ) {
461dc: 674c beqs 4622a <_Event_Surrender+0x96>
if ( seized_events == event_condition || _Options_Is_any( option_set ) ) {
461de: b081 cmpl %d1,%d0
461e0: 6706 beqs 461e8 <_Event_Surrender+0x54>
461e2: 0804 0001 btst #1,%d4
461e6: 6742 beqs 4622a <_Event_Surrender+0x96> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE rtems_event_set _Event_sets_Clear(
rtems_event_set the_event_set,
rtems_event_set the_mask
)
{
return ( the_event_set & ~(the_mask) );
461e8: 2200 movel %d0,%d1 461ea: 4681 notl %d1 461ec: c282 andl %d2,%d1 461ee: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events, seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
461f0: 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;
461f4: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
461f8: 2080 movel %d0,%a0@
_ISR_Flash( level );
461fa: 203c 0000 0700 movel #1792,%d0 46200: 46c3 movew %d3,%sr 46202: 8083 orl %d3,%d0 46204: 46c0 movew %d0,%sr
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
46206: 7a02 moveq #2,%d5 46208: baaa 0050 cmpl %a2@(80),%d5
4620c: 6734 beqs 46242 <_Event_Surrender+0xae>
_ISR_Enable( level );
4620e: 46c3 movew %d3,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46210: 2f3c 1003 fff8 movel #268697592,%sp@- 46216: 2f0a movel %a2,%sp@- 46218: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 4621e: 508f addql #8,%sp
}
return;
}
}
_ISR_Enable( level );
}
46220: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46226: 4e5e unlk %fp 46228: 4e75 rts
_Thread_Unblock( the_thread );
}
return;
}
}
_ISR_Enable( level );
4622a: 46c3 movew %d3,%sr
}
4622c: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 46232: 4e5e unlk %fp 46234: 4e75 rts
/*
* No events were seized in this operation
*/
if ( _Event_sets_Is_empty( seized_events ) ) {
_ISR_Enable( level );
46236: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
46238: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4623e: 4e5e unlk %fp 46240: 4e75 rts
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
46242: 7003 moveq #3,%d0 46244: 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 );
46248: 46c3 movew %d3,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4624a: 486a 0048 pea %a2@(72) 4624e: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 46254: 2f3c 1003 fff8 movel #268697592,%sp@- 4625a: 2f0a movel %a2,%sp@- 4625c: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 46262: 4fef 000c lea %sp@(12),%sp
}
return;
}
}
_ISR_Enable( level );
}
46266: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 4626c: 4e5e unlk %fp 4626e: 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) ||
46270: 2279 0006 031a moveal 6031a <_Event_Sync_state>,%a1
/*
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
46276: 7a02 moveq #2,%d5 46278: ba89 cmpl %a1,%d5
4627a: 6710 beqs 4628c <_Event_Surrender+0xf8> <== NEVER TAKEN
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
4627c: 2279 0006 031a moveal 6031a <_Event_Sync_state>,%a1
* If we are in an ISR and sending to the current thread, then
* we have a critical section issue to deal with.
*/
if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) &&
((_Event_Sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) ||
46282: 1a3c 0001 moveb #1,%d5 46286: ba89 cmpl %a1,%d5 46288: 6600 ff48 bnew 461d2 <_Event_Surrender+0x3e>
(_Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
4628c: b081 cmpl %d1,%d0
4628e: 6706 beqs 46296 <_Event_Surrender+0x102>
46290: 0804 0001 btst #1,%d4
46294: 671a beqs 462b0 <_Event_Surrender+0x11c> <== NEVER TAKEN
46296: 2200 movel %d0,%d1 46298: 4681 notl %d1 4629a: c282 andl %d2,%d1 4629c: 2081 movel %d1,%a0@
api->pending_events = _Event_sets_Clear( pending_events,seized_events );
the_thread->Wait.count = 0;
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
4629e: 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;
462a2: 42aa 0024 clrl %a2@(36)
*(rtems_event_set *)the_thread->Wait.return_argument = seized_events;
462a6: 2080 movel %d0,%a0@
_Event_Sync_state = THREAD_BLOCKING_OPERATION_SATISFIED;
462a8: 7003 moveq #3,%d0 462aa: 23c0 0006 031a movel %d0,6031a <_Event_Sync_state>
}
_ISR_Enable( level );
462b0: 46c3 movew %d3,%sr
}
return;
}
}
_ISR_Enable( level );
}
462b2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
462b8: 4e5e unlk %fp <== NOT EXECUTED
000462bc <_Event_Timeout>:
void _Event_Timeout(
Objects_Id id,
void *ignored
)
{
462bc: 4e56 fffc linkw %fp,#-4 462c0: 2f03 movel %d3,%sp@- 462c2: 2f02 movel %d2,%sp@-
Thread_Control *the_thread;
Objects_Locations location;
ISR_Level level;
the_thread = _Thread_Get( id, &location );
462c4: 486e fffc pea %fp@(-4) 462c8: 2f2e 0008 movel %fp@(8),%sp@- 462cc: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get>
switch ( location ) {
462d2: 508f addql #8,%sp 462d4: 4aae fffc tstl %fp@(-4)
462d8: 6642 bnes 4631c <_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 );
462da: 223c 0000 0700 movel #1792,%d1 462e0: 40c2 movew %sr,%d2 462e2: 8282 orl %d2,%d1 462e4: 46c1 movew %d1,%sr
_ISR_Enable( level );
return;
}
#endif
the_thread->Wait.count = 0;
462e6: 2040 moveal %d0,%a0 462e8: 42a8 0024 clrl %a0@(36)
if ( _Thread_Is_executing( the_thread ) ) {
462ec: b0b9 0005 ff6c cmpl 5ff6c <_Per_CPU_Information+0xc>,%d0
462f2: 6734 beqs 46328 <_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;
462f4: 7606 moveq #6,%d3 462f6: 2040 moveal %d0,%a0 462f8: 2143 0034 movel %d3,%a0@(52)
_ISR_Enable( level );
462fc: 46c2 movew %d2,%sr 462fe: 2f3c 1003 fff8 movel #268697592,%sp@- 46304: 2f00 movel %d0,%sp@- 46306: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
4630c: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4630e: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 46314: 5380 subql #1,%d0 46316: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
4631c: 242e fff4 movel %fp@(-12),%d2 46320: 262e fff8 movel %fp@(-8),%d3 46324: 4e5e unlk %fp 46326: 4e75 rts
}
#endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
46328: 2239 0006 031a movel 6031a <_Event_Sync_state>,%d1 4632e: 7601 moveq #1,%d3 46330: b681 cmpl %d1,%d3
46332: 66c0 bnes 462f4 <_Event_Timeout+0x38>
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
46334: 7606 moveq #6,%d3 46336: 2040 moveal %d0,%a0
#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;
46338: 7202 moveq #2,%d1
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
4633a: 2143 0034 movel %d3,%a0@(52)
#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;
4633e: 23c1 0006 031a movel %d1,6031a <_Event_Sync_state>
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;
_ISR_Enable( level );
46344: 46c2 movew %d2,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
46346: 2f3c 1003 fff8 movel #268697592,%sp@- 4634c: 2f00 movel %d0,%sp@- 4634e: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state>
_Thread_Unblock( the_thread );
_Thread_Unnest_dispatch();
break;
46354: 508f addql #8,%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
46356: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 4635c: 5380 subql #1,%d0 4635e: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 46364: 60b6 bras 4631c <_Event_Timeout+0x60>
...
0004c78c <_Heap_Allocate_aligned_with_boundary>:
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4c78c: 4e56 ffcc linkw %fp,#-52 4c790: 226e 000c moveal %fp@(12),%a1 4c794: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4c798: 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
4c79c: 2e09 movel %a1,%d7 4c79e: 5887 addql #4,%d7
- HEAP_BLOCK_SIZE_OFFSET;
uintptr_t const page_size = heap->page_size;
4c7a0: 202a 0010 movel %a2@(16),%d0
Heap_Control *heap,
uintptr_t alloc_size,
uintptr_t alignment,
uintptr_t boundary
)
{
4c7a4: 222e 0010 movel %fp@(16),%d1 4c7a8: 282e 0014 movel %fp@(20),%d4
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4c7ac: 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;
4c7b0: 2d40 fffc movel %d0,%fp@(-4)
uintptr_t alloc_begin = 0;
uint32_t search_count = 0;
if ( block_size_floor < alloc_size ) {
4c7b4: be89 cmpl %a1,%d7 4c7b6: 6500 0144 bcsw 4c8fc <_Heap_Allocate_aligned_with_boundary+0x170>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
4c7ba: 4a84 tstl %d4 4c7bc: 6600 013a bnew 4c8f8 <_Heap_Allocate_aligned_with_boundary+0x16c>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4c7c0: b1ca cmpal %a2,%a0 4c7c2: 6700 0138 beqw 4c8fc <_Heap_Allocate_aligned_with_boundary+0x170>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4c7c6: 242e fffc movel %fp@(-4),%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4c7ca: 7c04 moveq #4,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4c7cc: 5e82 addql #7,%d2
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4c7ce: 9c89 subl %a1,%d6
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4c7d0: 4283 clrl %d3
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4c7d2: 2647 moveal %d7,%a3
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4c7d4: 2d42 fff8 movel %d2,%fp@(-8)
+ HEAP_BLOCK_HEADER_SIZE + page_size - 1;
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
4c7d8: 2d46 fff4 movel %d6,%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 ) {
4c7dc: 2028 0004 movel %a0@(4),%d0
while ( block != free_list_tail ) {
_HAssert( _Heap_Is_prev_used( block ) );
/* Statistics */
++search_count;
4c7e0: 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 ) {
4c7e2: b08b cmpl %a3,%d0
4c7e4: 630e blss 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alignment == 0 ) {
4c7e6: 4a81 tstl %d1
4c7e8: 6628 bnes 4c812 <_Heap_Allocate_aligned_with_boundary+0x86>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4c7ea: 2408 movel %a0,%d2 4c7ec: 5082 addql #8,%d2
boundary
);
}
}
if ( alloc_begin != 0 ) {
4c7ee: 4a82 tstl %d2 4c7f0: 6600 00ea bnew 4c8dc <_Heap_Allocate_aligned_with_boundary+0x150>
break;
}
block = block->next;
4c7f4: 2068 0008 moveal %a0@(8),%a0
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4c7f8: b1ca cmpal %a2,%a0
4c7fa: 66e0 bnes 4c7dc <_Heap_Allocate_aligned_with_boundary+0x50>
4c7fc: 4280 clrl %d0
boundary
);
}
/* Statistics */
if ( stats->max_search < search_count ) {
4c7fe: b6aa 0044 cmpl %a2@(68),%d3
4c802: 6304 blss 4c808 <_Heap_Allocate_aligned_with_boundary+0x7c>
stats->max_search = search_count;
4c804: 2543 0044 movel %d3,%a2@(68)
}
return (void *) alloc_begin;
}
4c808: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c80e: 4e5e unlk %fp 4c810: 4e75 rts
- 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;
4c812: 7efe moveq #-2,%d7
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
4c814: 4be8 0008 lea %a0@(8),%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4c818: c087 andl %d7,%d0 4c81a: 286a 0014 moveal %a2@(20),%a4
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;
4c81e: 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;
4c820: 2a2e fff8 movel %fp@(-8),%d5 4c824: 9a8c subl %a4,%d5
uintptr_t alloc_end = block_end + HEAP_BLOCK_SIZE_OFFSET;
uintptr_t alloc_begin = alloc_end - alloc_size;
4c826: 242e fff4 movel %fp@(-12),%d2 4c82a: d480 addl %d0,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4c82c: 2c02 movel %d2,%d6
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
uintptr_t const block_end = block_begin + block_size;
uintptr_t const alloc_begin_floor = _Heap_Alloc_area_of_block( block );
uintptr_t const alloc_begin_ceiling = block_end - min_block_size
4c82e: d085 addl %d5,%d0 4c830: 4c41 6005 remul %d1,%d5,%d6 4c834: 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 ) {
4c836: b480 cmpl %d0,%d2
4c838: 630a blss 4c844 <_Heap_Allocate_aligned_with_boundary+0xb8>
4c83a: 2a00 movel %d0,%d5 4c83c: 4c41 5002 remul %d1,%d2,%d5 4c840: 9082 subl %d2,%d0 4c842: 2400 movel %d0,%d2
}
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
4c844: 4a84 tstl %d4
4c846: 676a beqs 4c8b2 <_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;
4c848: 2002 movel %d2,%d0 4c84a: d089 addl %a1,%d0 4c84c: 2c00 movel %d0,%d6 4c84e: 4c44 6005 remul %d4,%d5,%d6 4c852: 2c00 movel %d0,%d6 4c854: 9c85 subl %d5,%d6 4c856: 2a06 movel %d6,%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 ) {
4c858: bc82 cmpl %d2,%d6
4c85a: 6356 blss 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN
4c85c: bc80 cmpl %d0,%d6
4c85e: 6452 bccs 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN
alloc_end = alloc_begin + alloc_size;
/* Ensure boundary constaint */
if ( boundary != 0 ) {
uintptr_t const boundary_floor = alloc_begin_floor + alloc_size;
4c860: 2c0d movel %a5,%d6 4c862: dc89 addl %a1,%d6
uintptr_t boundary_line = _Heap_Align_down( alloc_end, boundary );
while ( alloc_begin < boundary_line && boundary_line < alloc_end ) {
if ( boundary_line < boundary_floor ) {
4c864: ba86 cmpl %d6,%d5
4c866: 658c bcss 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4c868: 2405 movel %d5,%d2 4c86a: 9489 subl %a1,%d2 4c86c: 2a02 movel %d2,%d5 4c86e: 4c41 5000 remul %d1,%d0,%d5 4c872: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4c874: 2002 movel %d2,%d0 4c876: d089 addl %a1,%d0 4c878: 2e00 movel %d0,%d7 4c87a: 4c44 7005 remul %d4,%d5,%d7 4c87e: 2e00 movel %d0,%d7 4c880: 9e85 subl %d5,%d7 4c882: 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 ) {
4c884: be82 cmpl %d2,%d7
4c886: 632a blss 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN
4c888: be80 cmpl %d0,%d7
4c88a: 6426 bccs 4c8b2 <_Heap_Allocate_aligned_with_boundary+0x126><== NEVER TAKEN
if ( boundary_line < boundary_floor ) {
4c88c: ba86 cmpl %d6,%d5 4c88e: 6500 ff64 bcsw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68>
return 0;
}
alloc_begin = boundary_line - alloc_size;
4c892: 2405 movel %d5,%d2 4c894: 9489 subl %a1,%d2 4c896: 2a02 movel %d2,%d5 4c898: 4c41 5000 remul %d1,%d0,%d5 4c89c: 9480 subl %d0,%d2
alloc_begin = _Heap_Align_down( alloc_begin, alignment );
alloc_end = alloc_begin + alloc_size;
4c89e: 2002 movel %d2,%d0 4c8a0: d089 addl %a1,%d0 4c8a2: 2e00 movel %d0,%d7 4c8a4: 4c44 7005 remul %d4,%d5,%d7 4c8a8: 2e00 movel %d0,%d7 4c8aa: 9e85 subl %d5,%d7 4c8ac: 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 ) {
4c8ae: be82 cmpl %d2,%d7
4c8b0: 62d6 bhis 4c888 <_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 ) {
4c8b2: b48d cmpl %a5,%d2 4c8b4: 6500 ff3e bcsw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68> 4c8b8: 2e2e fffc movel %fp@(-4),%d7 4c8bc: 2c02 movel %d2,%d6 4c8be: 70f8 moveq #-8,%d0 4c8c0: 9088 subl %a0,%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c8c2: d082 addl %d2,%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4c8c4: 4c47 6005 remul %d7,%d5,%d6
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;
4c8c8: 9085 subl %d5,%d0
if ( free_size >= min_block_size || free_size == 0 ) {
4c8ca: b08c cmpl %a4,%d0 4c8cc: 6400 ff20 bccw 4c7ee <_Heap_Allocate_aligned_with_boundary+0x62> 4c8d0: 4a80 tstl %d0 4c8d2: 6600 ff20 bnew 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68>
boundary
);
}
}
if ( alloc_begin != 0 ) {
4c8d6: 4a82 tstl %d2 4c8d8: 6700 ff1a beqw 4c7f4 <_Heap_Allocate_aligned_with_boundary+0x68>
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4c8dc: 2f09 movel %a1,%sp@-
block = block->next;
}
if ( alloc_begin != 0 ) {
/* Statistics */
stats->searches += search_count;
4c8de: d7aa 004c addl %d3,%a2@(76)
block = _Heap_Block_allocate( heap, block, alloc_begin, alloc_size );
4c8e2: 2f02 movel %d2,%sp@- 4c8e4: 2f08 movel %a0,%sp@- 4c8e6: 2f0a movel %a2,%sp@- 4c8e8: 4eb9 0004 7908 jsr 47908 <_Heap_Block_allocate> 4c8ee: 4fef 0010 lea %sp@(16),%sp 4c8f2: 2002 movel %d2,%d0 4c8f4: 6000 ff08 braw 4c7fe <_Heap_Allocate_aligned_with_boundary+0x72>
/* Integer overflow occured */
return NULL;
}
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
4c8f8: b889 cmpl %a1,%d4
4c8fa: 640c bccs 4c908 <_Heap_Allocate_aligned_with_boundary+0x17c>
if ( alignment == 0 ) {
alignment = page_size;
}
}
while ( block != free_list_tail ) {
4c8fc: 4280 clrl %d0
if ( stats->max_search < search_count ) {
stats->max_search = search_count;
}
return (void *) alloc_begin;
}
4c8fe: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4c904: 4e5e unlk %fp 4c906: 4e75 rts
if ( boundary != 0 ) {
if ( boundary < alloc_size ) {
return NULL;
}
if ( alignment == 0 ) {
4c908: 4a81 tstl %d1 4c90a: 6600 feb4 bnew 4c7c0 <_Heap_Allocate_aligned_with_boundary+0x34>
alignment = page_size;
4c90e: 2200 movel %d0,%d1 4c910: 6000 feae braw 4c7c0 <_Heap_Allocate_aligned_with_boundary+0x34>
00047908 <_Heap_Block_allocate>:
- 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;
47908: 70fe moveq #-2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4790a: 4e56 ffe0 linkw %fp,#-32 4790e: 206e 000c moveal %fp@(12),%a0 47912: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
}
return block;
}
47916: 2428 0004 movel %a0@(4),%d2
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;
4791a: 7801 moveq #1,%d4
- 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;
4791c: c082 andl %d2,%d0
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
4791e: 222e 0010 movel %fp@(16),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
47922: 49f0 0800 lea %a0@(00000000,%d0:l),%a4
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
47926: 2641 moveal %d1,%a3 47928: 518b subql #8,%a3
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;
4792a: 2a0b movel %a3,%d5 4792c: 9a88 subl %a0,%d5
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;
4792e: c8ac 0004 andl %a4@(4),%d4
Heap_Control *heap,
Heap_Block *block,
uintptr_t alloc_begin,
uintptr_t alloc_size
)
{
47932: 246e 0008 moveal %fp@(8),%a2 47936: 262e 0014 movel %fp@(20),%d3
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
4793a: 4a84 tstl %d4 4793c: 6600 0092 bnew 479d0 <_Heap_Block_allocate+0xc8>
if ( stats->min_free_size > stats->free_size ) {
stats->min_free_size = stats->free_size;
}
return block;
}
47940: 2828 0008 movel %a0@(8),%d4
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
next->prev = prev;
47944: 2a44 moveal %d4,%a5
Heap_Block *free_list_anchor = NULL;
_HAssert( alloc_area_begin <= alloc_begin );
if ( _Heap_Is_free( block ) ) {
free_list_anchor = block->prev;
47946: 2268 000c moveal %a0@(12),%a1
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4794a: 2344 0008 movel %d4,%a1@(8)
next->prev = prev;
4794e: 2b49 000c movel %a1,%a5@(12)
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
++stats->used_blocks;
stats->free_size -= _Heap_Block_size( block );
47952: 91aa 0030 subl %d0,%a2@(48)
free_list_anchor = block->prev;
_Heap_Free_list_remove( block );
/* Statistics */
--stats->free_blocks;
47956: 53aa 0038 subql #1,%a2@(56)
++stats->used_blocks;
4795a: 52aa 0040 addql #1,%a2@(64)
stats->free_size -= _Heap_Block_size( block );
} else {
free_list_anchor = _Heap_Free_list_head( heap );
}
if ( alloc_area_offset < heap->page_size ) {
4795e: 202a 0010 movel %a2@(16),%d0 47962: b085 cmpl %d5,%d0
47964: 6274 bhis 479da <_Heap_Block_allocate+0xd2>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
47966: 4c40 1004 remul %d0,%d4,%d1
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4796a: 97c4 subal %d4,%a3
_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;
4796c: 200b movel %a3,%d0 4796e: 9088 subl %a0,%d0
_HAssert( block_size >= heap->min_block_size );
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
47970: d1aa 0030 addl %d0,%a2@(48)
uintptr_t block_end = block_begin + block_size;
Heap_Block *const new_block =
_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;
47974: 99cb subal %a3,%a4
_HAssert( new_block_size >= heap->min_block_size );
/* Statistics */
stats->free_size += block_size;
if ( _Heap_Is_prev_used( block ) ) {
47976: 0802 0000 btst #0,%d2
4797a: 6778 beqs 479f4 <_Heap_Block_allocate+0xec>
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4797c: 2a69 0008 moveal %a1@(8),%a5
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47980: 7401 moveq #1,%d2
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47982: 2208 movel %a0,%d1
new_block->next = next;
47984: 214d 0008 movel %a5,%a0@(8)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47988: 8480 orl %d0,%d2
new_block->prev = block_before;
4798a: 2149 000c movel %a1,%a0@(12)
block_before->next = new_block;
4798e: 2348 0008 movel %a0,%a1@(8)
next->prev = new_block;
47992: 2b48 000c movel %a0,%a5@(12)
_Heap_Free_list_insert_after( free_list_anchor, block );
free_list_anchor = block;
/* Statistics */
++stats->free_blocks;
47996: 52aa 0038 addql #1,%a2@(56)
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
4799a: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
4799e: 2680 movel %d0,%a3@
new_block->size_and_flag = new_block_size;
479a0: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
479a4: 2f03 movel %d3,%sp@- 479a6: 2f01 movel %d1,%sp@- 479a8: 2f0b movel %a3,%sp@- 479aa: 2f0a movel %a2,%sp@- 479ac: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 479b2: 4fef 0010 lea %sp@(16),%sp
alloc_size
);
}
/* Statistics */
if ( stats->min_free_size > stats->free_size ) {
479b6: 202a 0030 movel %a2@(48),%d0 479ba: b0aa 0034 cmpl %a2@(52),%d0
479be: 6404 bccs 479c4 <_Heap_Block_allocate+0xbc>
stats->min_free_size = stats->free_size;
479c0: 2540 0034 movel %d0,%a2@(52)
}
return block;
}
479c4: 200b movel %a3,%d0 479c6: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 479cc: 4e5e unlk %fp 479ce: 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 ) {
479d0: 202a 0010 movel %a2@(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 );
479d4: 224a moveal %a2,%a1
}
if ( alloc_area_offset < heap->page_size ) {
479d6: b085 cmpl %d5,%d0
479d8: 638c blss 47966 <_Heap_Block_allocate+0x5e>
Heap_Block *block,
Heap_Block *free_list_anchor,
uintptr_t alloc_size
)
{
_Heap_Block_split( heap, block, free_list_anchor, alloc_size );
479da: 2645 moveal %d5,%a3 479dc: 4873 3800 pea %a3@(00000000,%d3:l) 479e0: 2648 moveal %a0,%a3 479e2: 2f09 movel %a1,%sp@- 479e4: 2f08 movel %a0,%sp@- 479e6: 2f0a movel %a2,%sp@- 479e8: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 479ee: 4fef 0010 lea %sp@(16),%sp 479f2: 60c2 bras 479b6 <_Heap_Block_allocate+0xae>
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Prev_block(
const Heap_Block *block
)
{
return (Heap_Block *) ((uintptr_t) block - block->prev_size);
479f4: 91d0 subal %a0@,%a0
- 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;
479f6: 74fe moveq #-2,%d2
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;
479f8: 2209 movel %a1,%d1 479fa: c4a8 0004 andl %a0@(4),%d2 479fe: d082 addl %d2,%d0
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a00: 7401 moveq #1,%d2 47a02: 8480 orl %d0,%d2
new_block->prev_size = block_size;
47a04: 2680 movel %d0,%a3@
block = prev_block;
block_begin = (uintptr_t) block;
block_size += prev_block_size;
}
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
47a06: 2142 0004 movel %d2,%a0@(4)
new_block->prev_size = block_size;
new_block->size_and_flag = new_block_size;
47a0a: 274c 0004 movel %a4,%a3@(4)
_Heap_Block_split( heap, new_block, free_list_anchor, alloc_size );
47a0e: 2f03 movel %d3,%sp@- 47a10: 2f01 movel %d1,%sp@- 47a12: 2f0b movel %a3,%sp@- 47a14: 2f0a movel %a2,%sp@- 47a16: 4eb9 0004 7814 jsr 47814 <_Heap_Block_split> 47a1c: 4fef 0010 lea %sp@(16),%sp 47a20: 6094 bras 479b6 <_Heap_Block_allocate+0xae>
...
0004cc20 <_Heap_Extend>:
Heap_Control *heap,
void *extend_area_begin_ptr,
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
4cc20: 4e56 ffcc linkw %fp,#-52 4cc24: 202e 0010 movel %fp@(16),%d0 4cc28: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cc2c: 246e 0008 moveal %fp@(8),%a2 4cc30: 242e 000c movel %fp@(12),%d2
Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size;
4cc34: 2602 movel %d2,%d3 4cc36: d680 addl %d0,%d3
uintptr_t extend_area_size,
uintptr_t *extended_size_ptr
)
{
Heap_Statistics *const stats = &heap->stats;
Heap_Block *const first_block = heap->first_block;
4cc38: 2a2a 0020 movel %a2@(32),%d5
Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL; Heap_Block *extend_last_block = NULL; uintptr_t const page_size = heap->page_size;
4cc3c: 282a 0010 movel %a2@(16),%d4
uintptr_t const min_block_size = heap->min_block_size;
4cc40: 222a 0014 movel %a2@(20),%d1
uintptr_t const extend_area_begin = (uintptr_t) extend_area_begin_ptr; uintptr_t const extend_area_end = extend_area_begin + extend_area_size; uintptr_t const free_size = stats->free_size;
4cc44: 2c2a 0030 movel %a2@(48),%d6
Heap_Block *start_block = first_block; Heap_Block *merge_below_block = NULL; Heap_Block *merge_above_block = NULL; Heap_Block *link_below_block = NULL; Heap_Block *link_above_block = NULL; Heap_Block *extend_first_block = NULL;
4cc48: 42ae fffc clrl %fp@(-4)
Heap_Block *extend_last_block = NULL;
4cc4c: 42ae fff8 clrl %fp@(-8)
uintptr_t const free_size = stats->free_size;
uintptr_t extend_first_block_size = 0;
uintptr_t extended_size = 0;
bool extend_area_ok = false;
if ( extend_area_end < extend_area_begin ) {
4cc50: b682 cmpl %d2,%d3
4cc52: 640c bccs 4cc60 <_Heap_Extend+0x40>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4cc54: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
4cc5a: 4200 clrb %d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4cc5c: 4e5e unlk %fp 4cc5e: 4e75 rts
if ( extend_area_end < extend_area_begin ) {
return false;
}
extend_area_ok = _Heap_Get_first_and_last_block(
4cc60: 486e fff8 pea %fp@(-8) 4cc64: 486e fffc pea %fp@(-4) 4cc68: 2f01 movel %d1,%sp@- 4cc6a: 2f04 movel %d4,%sp@- 4cc6c: 2f00 movel %d0,%sp@- 4cc6e: 2f02 movel %d2,%sp@- 4cc70: 4eb9 0004 7980 jsr 47980 <_Heap_Get_first_and_last_block>
page_size,
min_block_size,
&extend_first_block,
&extend_last_block
);
if (!extend_area_ok ) {
4cc76: 4fef 0018 lea %sp@(24),%sp 4cc7a: 4a00 tstb %d0
4cc7c: 67d6 beqs 4cc54 <_Heap_Extend+0x34>
4cc7e: 2045 moveal %d5,%a0 4cc80: 9bcd subal %a5,%a5 4cc82: 97cb subal %a3,%a3 4cc84: 99cc subal %a4,%a4 4cc86: 42ae fff4 clrl %fp@(-12)
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4cc8a: ba88 cmpl %a0,%d5 4cc8c: 6700 014a beqw 4cdd8 <_Heap_Extend+0x1b8> 4cc90: 2208 movel %a0,%d1
uintptr_t const sub_area_end = start_block->prev_size;
4cc92: 2010 movel %a0@,%d0
Heap_Block *const end_block =
_Heap_Block_of_alloc_area( sub_area_end, page_size );
if (
4cc94: b082 cmpl %d2,%d0
4cc96: 6304 blss 4cc9c <_Heap_Extend+0x7c>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
4cc98: b681 cmpl %d1,%d3
4cc9a: 62b8 bhis 4cc54 <_Heap_Extend+0x34>
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4cc9c: b681 cmpl %d1,%d3 4cc9e: 6700 0132 beqw 4cdd2 <_Heap_Extend+0x1b2>
merge_below_block = start_block;
} else if ( extend_area_end < sub_area_end ) {
4cca2: b083 cmpl %d3,%d0
4cca4: 6304 blss 4ccaa <_Heap_Extend+0x8a>
4cca6: 2d48 fff4 movel %a0,%fp@(-12) 4ccaa: 2e00 movel %d0,%d7 4ccac: 2240 moveal %d0,%a1 4ccae: 5189 subql #8,%a1 4ccb0: 4c44 7001 remul %d4,%d1,%d7
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4ccb4: 93c1 subal %d1,%a1
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
4ccb6: b480 cmpl %d0,%d2 4ccb8: 6700 0100 beqw 4cdba <_Heap_Extend+0x19a>
start_block->prev_size = extend_area_end;
merge_above_block = end_block;
} else if ( sub_area_end < extend_area_begin ) {
4ccbc: b082 cmpl %d2,%d0
4ccbe: 6402 bccs 4ccc2 <_Heap_Extend+0xa2>
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 )
4ccc0: 2a49 moveal %a1,%a5
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
4ccc2: 70fe moveq #-2,%d0 4ccc4: c0a9 0004 andl %a1@(4),%d0
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4ccc8: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4cccc: b1c5 cmpal %d5,%a0
4ccce: 66ba bnes 4cc8a <_Heap_Extend+0x6a>
if ( extend_area_begin < heap->area_begin ) {
4ccd0: b4aa 0018 cmpl %a2@(24),%d2 4ccd4: 6500 010a bcsw 4cde0 <_Heap_Extend+0x1c0>
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
4ccd8: b6aa 001c cmpl %a2@(28),%d3
4ccdc: 6304 blss 4cce2 <_Heap_Extend+0xc2>
heap->area_end = extend_area_end;
4ccde: 2543 001c movel %d3,%a2@(28)
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4cce2: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4cce6: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4cce8: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4ccea: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4ccee: 9088 subl %a0,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4ccf0: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4ccf2: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4ccf4: 2141 0004 movel %d1,%a0@(4)
extend_last_block->prev_size = extend_first_block_size;
4ccf8: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4ccfa: 42a9 0004 clrl %a1@(4)
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4ccfe: b1ea 0020 cmpal %a2@(32),%a0 4cd02: 6400 0104 bccw 4ce08 <_Heap_Extend+0x1e8>
heap->first_block = extend_first_block;
4cd06: 2548 0020 movel %a0,%a2@(32)
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
4cd0a: 4a8c tstl %a4 4cd0c: 6700 0148 beqw 4ce56 <_Heap_Extend+0x236>
Heap_Control *heap,
uintptr_t extend_area_begin,
Heap_Block *first_block
)
{
uintptr_t const page_size = heap->page_size;
4cd10: 202a 0010 movel %a2@(16),%d0
uintptr_t const new_first_block_alloc_begin =
_Heap_Align_up( extend_area_begin + HEAP_BLOCK_HEADER_SIZE, page_size );
4cd14: 5082 addql #8,%d2
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_up(
uintptr_t value,
uintptr_t alignment
)
{
uintptr_t remainder = value % alignment;
4cd16: 2802 movel %d2,%d4 4cd18: 4c40 4001 remul %d0,%d1,%d4
if ( remainder != 0 ) {
4cd1c: 4a81 tstl %d1
4cd1e: 6704 beqs 4cd24 <_Heap_Extend+0x104> <== ALWAYS TAKEN
return value - remainder + alignment;
4cd20: d480 addl %d0,%d2 <== NOT EXECUTED 4cd22: 9481 subl %d1,%d2 <== NOT EXECUTED
uintptr_t const new_first_block_begin =
4cd24: 2042 moveal %d2,%a0 4cd26: 5188 subql #8,%a0
new_first_block_alloc_begin - HEAP_BLOCK_HEADER_SIZE;
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
4cd28: 200c movel %a4,%d0 4cd2a: 9088 subl %a0,%d0
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4cd2c: 7201 moveq #1,%d1 4cd2e: 8280 orl %d0,%d1
uintptr_t const first_block_begin = (uintptr_t) first_block;
uintptr_t const new_first_block_size =
first_block_begin - new_first_block_begin;
Heap_Block *const new_first_block = (Heap_Block *) new_first_block_begin;
new_first_block->prev_size = first_block->prev_size;
4cd30: 2094 movel %a4@,%a0@
new_first_block->size_and_flag = new_first_block_size | HEAP_PREV_BLOCK_USED;
4cd32: 2141 0004 movel %d1,%a0@(4)
_Heap_Free_block( heap, new_first_block );
4cd36: 2f08 movel %a0,%sp@- 4cd38: 2f0a movel %a2,%sp@- 4cd3a: 4eba fec8 jsr %pc@(4cc04 <_Heap_Free_block>) 4cd3e: 508f addql #8,%sp
link_below_block,
extend_last_block
);
}
if ( merge_above_block != NULL ) {
4cd40: 4a8b tstl %a3 4cd42: 6700 00d4 beqw 4ce18 <_Heap_Extend+0x1f8>
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
extend_area_end - last_block_begin - HEAP_BLOCK_HEADER_SIZE,
4cd46: 5183 subql #8,%d3
uintptr_t extend_area_end
)
{
uintptr_t const page_size = heap->page_size;
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const last_block_new_size = _Heap_Align_down(
4cd48: 968b subl %a3,%d3
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
4cd4a: 2203 movel %d3,%d1 4cd4c: 4c6a 1000 0010 remul %a2@(16),%d0,%d1
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
| HEAP_PREV_BLOCK_USED;
4cd52: 7201 moveq #1,%d1 4cd54: 9680 subl %d0,%d3
);
Heap_Block *const new_last_block =
_Heap_Block_at( last_block, last_block_new_size );
new_last_block->size_and_flag =
(last_block->size_and_flag - last_block_new_size)
4cd56: 202b 0004 movel %a3@(4),%d0 4cd5a: 9083 subl %d3,%d0
| HEAP_PREV_BLOCK_USED;
4cd5c: 8280 orl %d0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4cd5e: 7001 moveq #1,%d0 4cd60: 2781 3804 movel %d1,%a3@(00000004,%d3:l) 4cd64: c0ab 0004 andl %a3@(4),%d0
block->size_and_flag = size | flag;
4cd68: 8680 orl %d0,%d3 4cd6a: 2743 0004 movel %d3,%a3@(4)
_Heap_Block_set_size( last_block, last_block_new_size );
_Heap_Free_block( heap, last_block );
4cd6e: 2f0b movel %a3,%sp@- 4cd70: 2f0a movel %a2,%sp@- 4cd72: 4eba fe90 jsr %pc@(4cc04 <_Heap_Free_block>) 4cd76: 508f addql #8,%sp
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4cd78: 4a8c tstl %a4 4cd7a: 6700 00c4 beqw 4ce40 <_Heap_Extend+0x220>
_Heap_Free_block( heap, extend_first_block );
}
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
4cd7e: 202a 0030 movel %a2@(48),%d0 4cd82: 9086 subl %d6,%d0 4cd84: 2c00 movel %d0,%d6
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4cd86: 7001 moveq #1,%d0
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4cd88: 206a 0024 moveal %a2@(36),%a0
* This feature will be used to terminate the scattered heap area list. See
* also _Heap_Extend().
*/
RTEMS_INLINE_ROUTINE void _Heap_Set_last_block_size( Heap_Control *heap )
{
_Heap_Block_set_size(
4cd8c: 222a 0020 movel %a2@(32),%d1 4cd90: 9288 subl %a0,%d1
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4cd92: c0a8 0004 andl %a0@(4),%d0
block->size_and_flag = size | flag;
4cd96: 8280 orl %d0,%d1 4cd98: 2141 0004 movel %d1,%a0@(4)
_Heap_Set_last_block_size( heap );
extended_size = stats->free_size - free_size;
/* Statistics */
stats->size += extended_size;
4cd9c: ddaa 002c addl %d6,%a2@(44)
if ( extended_size_ptr != NULL )
4cda0: 4aae 0014 tstl %fp@(20) 4cda4: 6700 00ca beqw 4ce70 <_Heap_Extend+0x250>
*extended_size_ptr = extended_size;
4cda8: 206e 0014 moveal %fp@(20),%a0 4cdac: 2086 movel %d6,%a0@
return true;
}
4cdae: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4cdb4: 7001 moveq #1,%d0
}
4cdb6: 4e5e unlk %fp 4cdb8: 4e75 rts
- 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;
4cdba: 70fe moveq #-2,%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 )
4cdbc: 2649 moveal %a1,%a3
- 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;
4cdbe: c0a9 0004 andl %a1@(4),%d0
} else if ( extend_area_end < sub_area_end ) {
link_below_block = start_block;
}
if ( sub_area_end == extend_area_begin ) {
start_block->prev_size = extend_area_end;
4cdc2: 2083 movel %d3,%a0@
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
4cdc4: 41f1 0800 lea %a1@(00000000,%d0:l),%a0
} else if ( sub_area_end < extend_area_begin ) {
link_above_block = end_block;
}
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
4cdc8: b1c5 cmpal %d5,%a0 4cdca: 6600 febe bnew 4cc8a <_Heap_Extend+0x6a> 4cdce: 6000 ff00 braw 4ccd0 <_Heap_Extend+0xb0>
sub_area_end > extend_area_begin && extend_area_end > sub_area_begin
) {
return false;
}
if ( extend_area_end == sub_area_begin ) {
4cdd2: 2848 moveal %a0,%a4 4cdd4: 6000 fed4 braw 4ccaa <_Heap_Extend+0x8a>
return false;
}
do {
uintptr_t const sub_area_begin = (start_block != first_block) ?
(uintptr_t) start_block : heap->area_begin;
4cdd8: 222a 0018 movel %a2@(24),%d1 4cddc: 6000 feb4 braw 4cc92 <_Heap_Extend+0x72>
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4cde0: 226e fff8 moveal %fp@(-8),%a1
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4cde4: 2009 movel %a1,%d0
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4cde6: 7201 moveq #1,%d1
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
4cde8: 206e fffc moveal %fp@(-4),%a0
heap->area_begin = extend_area_begin;
} else if ( heap->area_end < extend_area_end ) {
heap->area_end = extend_area_end;
}
extend_first_block_size =
4cdec: 9088 subl %a0,%d0
start_block = _Heap_Block_at( end_block, _Heap_Block_size( end_block ) );
} while ( start_block != first_block );
if ( extend_area_begin < heap->area_begin ) {
heap->area_begin = extend_area_begin;
4cdee: 2542 0018 movel %d2,%a2@(24)
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4cdf2: 8280 orl %d0,%d1
}
extend_first_block_size =
(uintptr_t) extend_last_block - (uintptr_t) extend_first_block;
extend_first_block->prev_size = extend_area_end;
4cdf4: 2083 movel %d3,%a0@
extend_first_block->size_and_flag =
extend_first_block_size | HEAP_PREV_BLOCK_USED;
4cdf6: 2141 0004 movel %d1,%a0@(4)
extend_last_block->prev_size = extend_first_block_size;
4cdfa: 2280 movel %d0,%a1@
extend_last_block->size_and_flag = 0;
4cdfc: 42a9 0004 clrl %a1@(4)
if ( (uintptr_t) extend_first_block < (uintptr_t) heap->first_block ) {
4ce00: b1ea 0020 cmpal %a2@(32),%a0 4ce04: 6500 ff00 bcsw 4cd06 <_Heap_Extend+0xe6>
heap->first_block = extend_first_block;
} else if ( (uintptr_t) extend_last_block > (uintptr_t) heap->last_block ) {
4ce08: b3ea 0024 cmpal %a2@(36),%a1 4ce0c: 6300 fefc blsw 4cd0a <_Heap_Extend+0xea>
heap->last_block = extend_last_block;
4ce10: 2549 0024 movel %a1,%a2@(36) 4ce14: 6000 fef4 braw 4cd0a <_Heap_Extend+0xea>
);
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
4ce18: 4a8d tstl %a5 4ce1a: 6700 ff5c beqw 4cd78 <_Heap_Extend+0x158>
RTEMS_INLINE_ROUTINE void _Heap_Block_set_size(
Heap_Block *block,
uintptr_t size
)
{
uintptr_t flag = block->size_and_flag & HEAP_PREV_BLOCK_USED;
4ce1e: 7001 moveq #1,%d0
)
{
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
4ce20: 222e fffc movel %fp@(-4),%d1 4ce24: 928d subl %a5,%d1 4ce26: c0ad 0004 andl %a5@(4),%d0
}
if ( merge_above_block != NULL ) {
_Heap_Merge_above( heap, merge_above_block, extend_area_end );
} else if ( link_above_block != NULL ) {
_Heap_Link_above(
4ce2a: 206e fff8 moveal %fp@(-8),%a0
block->size_and_flag = size | flag;
4ce2e: 8280 orl %d0,%d1
uintptr_t const link_begin = (uintptr_t) link;
uintptr_t const first_block_begin = (uintptr_t) first_block;
_Heap_Block_set_size( link, first_block_begin - link_begin );
last_block->size_and_flag |= HEAP_PREV_BLOCK_USED;
4ce30: 7001 moveq #1,%d0 4ce32: 2b41 0004 movel %d1,%a5@(4) 4ce36: 81a8 0004 orl %d0,%a0@(4)
extend_first_block,
extend_last_block
);
}
if ( merge_below_block == NULL && merge_above_block == NULL ) {
4ce3a: 4a8c tstl %a4 4ce3c: 6600 ff40 bnew 4cd7e <_Heap_Extend+0x15e> 4ce40: 4a8b tstl %a3 4ce42: 6600 ff3a bnew 4cd7e <_Heap_Extend+0x15e>
_Heap_Free_block( heap, extend_first_block );
4ce46: 2f2e fffc movel %fp@(-4),%sp@- 4ce4a: 2f0a movel %a2,%sp@- 4ce4c: 4eba fdb6 jsr %pc@(4cc04 <_Heap_Free_block>) 4ce50: 508f addql #8,%sp 4ce52: 6000 ff2a braw 4cd7e <_Heap_Extend+0x15e>
heap->last_block = extend_last_block;
}
if ( merge_below_block != NULL ) {
_Heap_Merge_below( heap, extend_area_begin, merge_below_block );
} else if ( link_below_block != NULL ) {
4ce56: 4aae fff4 tstl %fp@(-12) 4ce5a: 6700 fee4 beqw 4cd40 <_Heap_Extend+0x120>
{
uintptr_t const last_block_begin = (uintptr_t) last_block;
uintptr_t const link_begin = (uintptr_t) link;
last_block->size_and_flag =
(link_begin - last_block_begin) | HEAP_PREV_BLOCK_USED;
4ce5e: 202e fff4 movel %fp@(-12),%d0 4ce62: 7201 moveq #1,%d1 4ce64: 9089 subl %a1,%d0 4ce66: 8280 orl %d0,%d1 4ce68: 2341 0004 movel %d1,%a1@(4) 4ce6c: 6000 fed2 braw 4cd40 <_Heap_Extend+0x120>
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
}
4ce70: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED
stats->size += extended_size;
if ( extended_size_ptr != NULL )
*extended_size_ptr = extended_size;
return true;
4ce76: 7001 moveq #1,%d0 <== NOT EXECUTED
}
4ce78: 4e5e unlk %fp <== NOT EXECUTED
0004c914 <_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 )
{
4c914: 4e56 ffe8 linkw %fp,#-24 4c918: 202e 000c movel %fp@(12),%d0 4c91c: 2040 moveal %d0,%a0 4c91e: 5188 subql #8,%a0 4c920: 226e 0008 moveal %fp@(8),%a1 4c924: 4c69 0001 0010 remul %a1@(16),%d1,%d0 4c92a: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@
RTEMS_INLINE_ROUTINE bool _Heap_Is_block_in_heap(
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
4c92e: 2029 0020 movel %a1@(32),%d0
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
4c932: 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;
4c934: b088 cmpl %a0,%d0 4c936: 6200 0098 bhiw 4c9d0 <_Heap_Free+0xbc> 4c93a: 2229 0024 movel %a1@(36),%d1 4c93e: b288 cmpl %a0,%d1 4c940: 6500 008e bcsw 4c9d0 <_Heap_Free+0xbc>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c944: 2628 0004 movel %a0@(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;
4c948: 74fe moveq #-2,%d2 4c94a: 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);
4c94c: 45f0 2800 lea %a0@(00000000,%d2:l),%a2
const Heap_Control *heap,
const Heap_Block *block
)
{
return (uintptr_t) block >= (uintptr_t) heap->first_block
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
4c950: b5c0 cmpal %d0,%a2
4c952: 657c bcss 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN
4c954: b5c1 cmpal %d1,%a2
4c956: 6278 bhis 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN
4c958: 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 ) ) {
4c95c: 0804 0000 btst #0,%d4
4c960: 676e beqs 4c9d0 <_Heap_Free+0xbc> <== 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;
4c962: 7afe moveq #-2,%d5 4c964: c885 andl %d5,%d4
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4c966: b5c1 cmpal %d1,%a2 4c968: 6700 00f6 beqw 4ca60 <_Heap_Free+0x14c>
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;
4c96c: 7a01 moveq #1,%d5 4c96e: cab2 4804 andl %a2@(00000004,%d4:l),%d5
#include <rtems/system.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/heap.h>
bool _Heap_Free( Heap_Control *heap, void *alloc_begin_ptr )
4c972: 57c5 seq %d5 4c974: 4485 negl %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 ) ) {
4c976: 0803 0000 btst #0,%d3
4c97a: 665e bnes 4c9da <_Heap_Free+0xc6>
uintptr_t const prev_size = block->prev_size;
4c97c: 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);
4c97e: 91c3 subal %d3,%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;
4c980: b1c0 cmpal %d0,%a0
4c982: 654c bcss 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN
4c984: b1c1 cmpal %d1,%a0
4c986: 6248 bhis 4c9d0 <_Heap_Free+0xbc> <== 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;
4c988: 7001 moveq #1,%d0 4c98a: c0a8 0004 andl %a0@(4),%d0
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) ) {
4c98e: 6740 beqs 4c9d0 <_Heap_Free+0xbc> <== NEVER TAKEN
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
4c990: 4a05 tstb %d5 4c992: 6700 00d2 beqw 4ca66 <_Heap_Free+0x152>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c996: 266a 0008 moveal %a2@(8),%a3
_HAssert( false );
return( false );
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
4c99a: d882 addl %d2,%d4 4c99c: d684 addl %d4,%d3
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c99e: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c9a0: 246a 000c moveal %a2@(12),%a2
RTEMS_INLINE_ROUTINE void _Heap_Free_list_remove( Heap_Block *block )
{
Heap_Block *next = block->next;
Heap_Block *prev = block->prev;
prev->next = next;
4c9a4: 254b 0008 movel %a3,%a2@(8)
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;
4c9a8: 8083 orl %d3,%d0
next->prev = prev;
4c9aa: 274a 000c movel %a2,%a3@(12)
}
if ( next_is_free ) { /* coalesce both */
uintptr_t const size = block_size + prev_size + next_block_size;
_Heap_Free_list_remove( next_block );
stats->free_blocks -= 1;
4c9ae: 53a9 0038 subql #1,%a1@(56)
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
next_block = _Heap_Block_at( prev_block, size );
_HAssert(!_Heap_Is_prev_used( next_block));
next_block->prev_size = size;
4c9b2: 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;
4c9b6: 2140 0004 movel %d0,%a0@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4c9ba: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4c9be: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4c9c2: d5a9 0030 addl %d2,%a1@(48)
return( true );
4c9c6: 7001 moveq #1,%d0
}
4c9c8: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3 4c9cc: 4e5e unlk %fp 4c9ce: 4e75 rts 4c9d0: 4cd7 0c3c moveml %sp@,%d2-%d5/%a2-%a3
/* As we always coalesce free blocks, the block that preceedes prev_block
must have been used. */
if ( !_Heap_Is_prev_used ( prev_block) ) {
_HAssert( false );
return( false );
4c9d4: 4200 clrb %d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c9d6: 4e5e unlk %fp 4c9d8: 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 */
4c9da: 4a05 tstb %d5
4c9dc: 6736 beqs 4ca14 <_Heap_Free+0x100>
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c9de: 266a 0008 moveal %a2@(8),%a3
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 */
uintptr_t const size = block_size + next_block_size;
4c9e2: d882 addl %d2,%d4
_Heap_Free_list_replace( next_block, block );
block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4c9e4: 7001 moveq #1,%d0
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
}
4c9e6: 246a 000c moveal %a2@(12),%a2
)
{
Heap_Block *next = old_block->next;
Heap_Block *prev = old_block->prev;
new_block->next = next;
4c9ea: 214b 0008 movel %a3,%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;
4c9ee: 8084 orl %d4,%d0
new_block->prev = prev;
4c9f0: 214a 000c movel %a2,%a0@(12)
next_block = _Heap_Block_at( block, size );
next_block->prev_size = size;
4c9f4: 2184 4800 movel %d4,%a0@(00000000,%d4:l)
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;
4c9f8: 2140 0004 movel %d0,%a0@(4)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4c9fc: 7001 moveq #1,%d0
next->prev = new_block;
prev->next = new_block;
4c9fe: 2548 0008 movel %a0,%a2@(8)
Heap_Block *prev = old_block->prev;
new_block->next = next;
new_block->prev = prev;
next->prev = new_block;
4ca02: 2748 000c movel %a0,%a3@(12)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ca06: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ca0a: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4ca0e: d5a9 0030 addl %d2,%a1@(48) 4ca12: 60b4 bras 4c9c8 <_Heap_Free+0xb4>
block->size_and_flag = block_size | HEAP_PREV_BLOCK_USED;
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4ca14: 2029 0038 movel %a1@(56),%d0
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;
4ca18: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ca1a: 7afe moveq #-2,%d5
next_block->prev_size = block_size;
/* Statistics */
++stats->free_blocks;
4ca1c: 5280 addql #1,%d0
RTEMS_INLINE_ROUTINE void _Heap_Free_list_insert_after(
Heap_Block *block_before,
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
4ca1e: 2669 0008 moveal %a1@(8),%a3
new_block->next = next;
new_block->prev = block_before;
4ca22: 2149 000c movel %a1,%a0@(12)
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;
4ca26: 8282 orl %d2,%d1
Heap_Block *new_block
)
{
Heap_Block *next = block_before->next;
new_block->next = next;
4ca28: 214b 0008 movel %a3,%a0@(8) 4ca2c: 2141 0004 movel %d1,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ca30: cbaa 0004 andl %d5,%a2@(4)
new_block->prev = block_before; block_before->next = new_block; next->prev = new_block;
4ca34: 2748 000c movel %a0,%a3@(12)
next_block->prev_size = block_size;
4ca38: 2482 movel %d2,%a2@
{
Heap_Block *next = block_before->next;
new_block->next = next;
new_block->prev = block_before;
block_before->next = new_block;
4ca3a: 2348 0008 movel %a0,%a1@(8)
/* Statistics */
++stats->free_blocks;
4ca3e: 2340 0038 movel %d0,%a1@(56)
if ( stats->max_free_blocks < stats->free_blocks ) {
4ca42: b0a9 003c cmpl %a1@(60),%d0 4ca46: 6300 ff72 blsw 4c9ba <_Heap_Free+0xa6>
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ca4a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ca4e: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4ca52: d5a9 0030 addl %d2,%a1@(48)
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;
4ca56: 2340 003c movel %d0,%a1@(60)
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4ca5a: 7001 moveq #1,%d0 4ca5c: 6000 ff6a braw 4c9c8 <_Heap_Free+0xb4>
return false;
}
next_block_size = _Heap_Block_size( next_block );
next_is_free = next_block != heap->last_block
&& !_Heap_Is_prev_used( _Heap_Block_at( next_block, next_block_size ));
4ca60: 4205 clrb %d5 4ca62: 6000 ff12 braw 4c976 <_Heap_Free+0x62>
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;
4ca66: d682 addl %d2,%d3
prev_block->size_and_flag = size | HEAP_PREV_BLOCK_USED;
4ca68: 7201 moveq #1,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ca6a: 7afe moveq #-2,%d5
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;
4ca6c: 8283 orl %d3,%d1
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
next_block->prev_size = size;
4ca6e: 2483 movel %d3,%a2@
/* Statistics */
--stats->used_blocks;
++stats->frees;
stats->free_size += block_size;
return( true );
4ca70: 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;
4ca72: 2141 0004 movel %d1,%a0@(4)
next_block->size_and_flag &= ~HEAP_PREV_BLOCK_USED;
4ca76: cbaa 0004 andl %d5,%a2@(4)
stats->max_free_blocks = stats->free_blocks;
}
}
/* Statistics */
--stats->used_blocks;
4ca7a: 53a9 0040 subql #1,%a1@(64)
++stats->frees;
4ca7e: 52a9 0050 addql #1,%a1@(80)
stats->free_size += block_size;
4ca82: d5a9 0030 addl %d2,%a1@(48) 4ca86: 6000 ff40 braw 4c9c8 <_Heap_Free+0xb4>
...
00051a68 <_Heap_Get_information>:
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
51a68: 4e56 fff0 linkw %fp,#-16 51a6c: 226e 0008 moveal %fp@(8),%a1 51a70: 48d7 041c moveml %d2-%d4/%a2,%sp@ 51a74: 282e 000c movel %fp@(12),%d4
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
51a78: 2044 moveal %d4,%a0
void _Heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Block *the_block = the_heap->first_block;
51a7a: 2469 0020 moveal %a1@(32),%a2
Heap_Block *const end = the_heap->last_block;
51a7e: 2429 0024 movel %a1@(36),%d2
memset(the_info, 0, sizeof(*the_info));
51a82: 4298 clrl %a0@+ 51a84: 4298 clrl %a0@+ 51a86: 4298 clrl %a0@+ 51a88: 4298 clrl %a0@+ 51a8a: 4298 clrl %a0@+ 51a8c: 4290 clrl %a0@
while ( the_block != end ) {
51a8e: b48a cmpl %a2,%d2
51a90: 6738 beqs 51aca <_Heap_Get_information+0x62> <== 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;
51a92: 2604 movel %d4,%d3 51a94: 0683 0000 000c addil #12,%d3
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
51a9a: 222a 0004 movel %a2@(4),%d1 51a9e: 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) )
info = &the_info->Used;
51aa0: 2043 moveal %d3,%a0 51aa2: 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);
51aa4: 43f2 0800 lea %a2@(00000000,%d0:l),%a1
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
51aa8: 2229 0004 movel %a1@(4),%d1
while ( the_block != end ) {
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) )
51aac: 0801 0000 btst #0,%d1
51ab0: 6602 bnes 51ab4 <_Heap_Get_information+0x4c>
info = &the_info->Used;
else
info = &the_info->Free;
51ab2: 2044 moveal %d4,%a0
info->number++;
51ab4: 5290 addql #1,%a0@
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
51ab6: 2449 moveal %a1,%a2
info = &the_info->Used;
else
info = &the_info->Free;
info->number++;
info->total += the_size;
51ab8: d1a8 0008 addl %d0,%a0@(8)
if ( info->largest < the_size )
51abc: b0a8 0004 cmpl %a0@(4),%d0
51ac0: 6304 blss 51ac6 <_Heap_Get_information+0x5e>
info->largest = the_size;
51ac2: 2140 0004 movel %d0,%a0@(4)
Heap_Block *the_block = the_heap->first_block;
Heap_Block *const end = the_heap->last_block;
memset(the_info, 0, sizeof(*the_info));
while ( the_block != end ) {
51ac6: b3c2 cmpal %d2,%a1
51ac8: 66d4 bnes 51a9e <_Heap_Get_information+0x36>
if ( info->largest < the_size )
info->largest = the_size;
the_block = next_block;
}
}
51aca: 4cd7 041c moveml %sp@,%d2-%d4/%a2 51ace: 4e5e unlk %fp
...
0005c748 <_Heap_Size_of_alloc_area>:
bool _Heap_Size_of_alloc_area(
Heap_Control *heap,
void *alloc_begin_ptr,
uintptr_t *alloc_size
)
{
5c748: 4e56 0000 linkw %fp,#0 5c74c: 202e 000c movel %fp@(12),%d0
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Align_down(
uintptr_t value,
uintptr_t alignment
)
{
return value - (value % alignment);
5c750: 2040 moveal %d0,%a0 5c752: 5188 subql #8,%a0 5c754: 226e 0008 moveal %fp@(8),%a1 5c758: 2f02 movel %d2,%sp@- 5c75a: 2400 movel %d0,%d2 5c75c: 4c69 2001 0010 remul %a1@(16),%d1,%d2
uintptr_t alloc_begin,
uintptr_t page_size
)
{
return (Heap_Block *) (_Heap_Align_down( alloc_begin, page_size )
- HEAP_BLOCK_HEADER_SIZE);
5c762: 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
5c764: 2229 0020 movel %a1@(32),%d1
&& (uintptr_t) block <= (uintptr_t) heap->last_block;
5c768: b288 cmpl %a0,%d1
5c76a: 6236 bhis 5c7a2 <_Heap_Size_of_alloc_area+0x5a>
5c76c: 2269 0024 moveal %a1@(36),%a1 5c770: b3c8 cmpal %a0,%a1
5c772: 652e bcss 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== 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;
5c774: 74fe moveq #-2,%d2 5c776: c4a8 0004 andl %a0@(4),%d2
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
5c77a: d1c2 addal %d2,%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;
5c77c: b1c1 cmpal %d1,%a0
5c77e: 6522 bcss 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
5c780: b1c9 cmpal %a1,%a0
5c782: 621e bhis 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== 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;
5c784: 7201 moveq #1,%d1 5c786: c2a8 0004 andl %a0@(4),%d1
block_size = _Heap_Block_size( block );
next_block = _Heap_Block_at( block, block_size );
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
5c78a: 6716 beqs 5c7a2 <_Heap_Size_of_alloc_area+0x5a> <== NEVER TAKEN
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5c78c: 7204 moveq #4,%d1 5c78e: 9280 subl %d0,%d1 5c790: 2001 movel %d1,%d0 5c792: d088 addl %a0,%d0 5c794: 226e 0010 moveal %fp@(16),%a1
return true;
}
5c798: 241f movel %sp@+,%d2 5c79a: 4e5e unlk %fp
|| !_Heap_Is_prev_used( next_block )
) {
return false;
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
5c79c: 2280 movel %d0,%a1@
return true;
5c79e: 7001 moveq #1,%d0
}
5c7a0: 4e75 rts 5c7a2: 241f movel %sp@+,%d2 5c7a4: 4e5e unlk %fp
if (
!_Heap_Is_block_in_heap( heap, next_block )
|| !_Heap_Is_prev_used( next_block )
) {
return false;
5c7a6: 4200 clrb %d0
}
*alloc_size = (uintptr_t) next_block + HEAP_BLOCK_SIZE_OFFSET - alloc_begin;
return true;
}
...
00048432 <_Heap_Walk>:
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48432: 4e56 ffc4 linkw %fp,#-60 48436: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4843a: 246e 0008 moveal %fp@(8),%a2
uintptr_t const min_block_size = heap->min_block_size;
Heap_Block *const first_block = heap->first_block;
Heap_Block *const last_block = heap->last_block;
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
4843e: 4bfa ff94 lea %pc@(483d4 <_Heap_Walk_print_nothing>),%a5
bool _Heap_Walk(
Heap_Control *heap,
int source,
bool dump
)
{
48442: 2a2e 000c movel %fp@(12),%d5
uintptr_t const page_size = heap->page_size;
48446: 262a 0010 movel %a2@(16),%d3
uintptr_t const min_block_size = heap->min_block_size;
4844a: 2c2a 0014 movel %a2@(20),%d6
Heap_Block *const first_block = heap->first_block;
4844e: 282a 0020 movel %a2@(32),%d4
Heap_Block *const last_block = heap->last_block;
48452: 2e2a 0024 movel %a2@(36),%d7
Heap_Block *block = first_block;
Heap_Walk_printer printer = dump ?
_Heap_Walk_print : _Heap_Walk_print_nothing;
48456: 4a2e 0013 tstb %fp@(19)
4845a: 6704 beqs 48460 <_Heap_Walk+0x2e>
4845c: 4bfa ff7e lea %pc@(483dc <_Heap_Walk_print>),%a5
if ( !_System_state_Is_up( _System_state_Get() ) ) {
48460: 7003 moveq #3,%d0 48462: b0b9 0006 20e2 cmpl 620e2 <_System_state_Current>,%d0
48468: 670c beqs 48476 <_Heap_Walk+0x44>
block = next_block;
} while ( block != first_block );
return true;
}
4846a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
}
block = next_block;
} while ( block != first_block );
return true;
48470: 7001 moveq #1,%d0
}
48472: 4e5e unlk %fp 48474: 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)(
48476: 2f2a 000c movel %a2@(12),%sp@- 4847a: 2f2a 0008 movel %a2@(8),%sp@- 4847e: 2f07 movel %d7,%sp@- 48480: 2f04 movel %d4,%sp@- 48482: 2f2a 001c movel %a2@(28),%sp@- 48486: 2f2a 0018 movel %a2@(24),%sp@- 4848a: 2f06 movel %d6,%sp@- 4848c: 2f03 movel %d3,%sp@- 4848e: 4879 0005 e47f pea 5e47f <_Status_Object_name_errors_to_status+0x5d> 48494: 42a7 clrl %sp@- 48496: 2f05 movel %d5,%sp@- 48498: 4e95 jsr %a5@
heap->area_begin, heap->area_end,
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
4849a: 4fef 002c lea %sp@(44),%sp 4849e: 4a83 tstl %d3 484a0: 6700 0082 beqw 48524 <_Heap_Walk+0xf2>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
484a4: 7003 moveq #3,%d0 484a6: c083 andl %d3,%d0
(*printer)( source, true, "page size is zero\n" );
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
484a8: 6600 0090 bnew 4853a <_Heap_Walk+0x108>
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
484ac: 2206 movel %d6,%d1 484ae: 4c43 1000 remul %d3,%d0,%d1
);
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
484b2: 4a80 tstl %d0 484b4: 6600 00a4 bnew 4855a <_Heap_Walk+0x128>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
484b8: 2004 movel %d4,%d0 484ba: 5080 addql #8,%d0
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
484bc: 4c43 0001 remul %d3,%d1,%d0
);
return false;
}
if (
484c0: 4a81 tstl %d1 484c2: 6600 00ae bnew 48572 <_Heap_Walk+0x140>
block = next_block;
} while ( block != first_block );
return true;
}
484c6: 2044 moveal %d4,%a0 484c8: 2228 0004 movel %a0@(4),%d1 484cc: 2d41 fff0 movel %d1,%fp@(-16)
);
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
484d0: 0801 0000 btst #0,%d1 484d4: 6700 017e beqw 48654 <_Heap_Walk+0x222>
- 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;
484d8: 2047 moveal %d7,%a0 484da: 72fe moveq #-2,%d1 484dc: c2a8 0004 andl %a0@(4),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
484e0: d1c1 addal %d1,%a0
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;
484e2: 7201 moveq #1,%d1 484e4: c2a8 0004 andl %a0@(4),%d1
);
return false;
}
if ( _Heap_Is_free( last_block ) ) {
484e8: 6724 beqs 4850e <_Heap_Walk+0xdc>
);
return false;
}
if (
484ea: b1c4 cmpal %d4,%a0 484ec: 6700 009c beqw 4858a <_Heap_Walk+0x158>
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
484f0: 4879 0005 e5d9 pea 5e5d9 <_Status_Object_name_errors_to_status+0x1b7><== NOT EXECUTED 484f6: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 484fa: 2f05 movel %d5,%sp@- <== NOT EXECUTED 484fc: 4e95 jsr %a5@ <== NOT EXECUTED 484fe: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48502: 4200 clrb %d0 <== NOT EXECUTED
block = next_block;
} while ( block != first_block );
return true;
}
48504: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 4850a: 4e5e unlk %fp 4850c: 4e75 rts
return false;
}
if ( _Heap_Is_free( last_block ) ) {
(*printer)(
4850e: 4879 0005 e5c4 pea 5e5c4 <_Status_Object_name_errors_to_status+0x1a2>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
48514: 4878 0001 pea 1 <ADD> 48518: 2f05 movel %d5,%sp@- 4851a: 4e95 jsr %a5@ 4851c: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48520: 4200 clrb %d0 48522: 60e0 bras 48504 <_Heap_Walk+0xd2>
first_block, last_block,
first_free_block, last_free_block
);
if ( page_size == 0 ) {
(*printer)( source, true, "page size is zero\n" );
48524: 4879 0005 e510 pea 5e510 <_Status_Object_name_errors_to_status+0xee>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
4852a: 4878 0001 pea 1 <ADD> 4852e: 2f05 movel %d5,%sp@- 48530: 4e95 jsr %a5@ 48532: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48536: 4200 clrb %d0 48538: 60ca bras 48504 <_Heap_Walk+0xd2>
return false;
}
if ( !_Addresses_Is_aligned( (void *) page_size ) ) {
(*printer)(
4853a: 2f03 movel %d3,%sp@- 4853c: 4879 0005 e523 pea 5e523 <_Status_Object_name_errors_to_status+0x101>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48542: 4878 0001 pea 1 <ADD> 48546: 2f05 movel %d5,%sp@- 48548: 4e95 jsr %a5@ 4854a: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4854e: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48550: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48556: 4e5e unlk %fp 48558: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( min_block_size, page_size ) ) {
(*printer)(
4855a: 2f06 movel %d6,%sp@- 4855c: 4879 0005 e541 pea 5e541 <_Status_Object_name_errors_to_status+0x11f>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48562: 4878 0001 pea 1 <ADD> 48566: 2f05 movel %d5,%sp@- 48568: 4e95 jsr %a5@ 4856a: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4856e: 4200 clrb %d0 48570: 60de bras 48550 <_Heap_Walk+0x11e>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size )
) {
(*printer)(
48572: 2f04 movel %d4,%sp@- 48574: 4879 0005 e565 pea 5e565 <_Status_Object_name_errors_to_status+0x143>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
4857a: 4878 0001 pea 1 <ADD> 4857e: 2f05 movel %d5,%sp@- 48580: 4e95 jsr %a5@ 48582: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48586: 4200 clrb %d0 48588: 60c6 bras 48550 <_Heap_Walk+0x11e>
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
4858a: 202a 0010 movel %a2@(16),%d0
block = next_block;
} while ( block != first_block );
return true;
}
4858e: 206a 0008 moveal %a2@(8),%a0
int source,
Heap_Walk_printer printer,
Heap_Control *heap
)
{
uintptr_t const page_size = heap->page_size;
48592: 2d40 fffc movel %d0,%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 ) {
48596: b1ca cmpal %a2,%a0 48598: 6700 032c beqw 488c6 <_Heap_Walk+0x494>
block = next_block;
} while ( block != first_block );
return true;
}
4859c: 242a 0020 movel %a2@(32),%d2 485a0: 2d42 fff4 movel %d2,%fp@(-12)
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;
485a4: b1c2 cmpal %d2,%a0 485a6: 6500 0092 bcsw 4863a <_Heap_Walk+0x208> 485aa: 286a 0024 moveal %a2@(36),%a4 485ae: b1cc cmpal %a4,%a0 485b0: 6200 0088 bhiw 4863a <_Heap_Walk+0x208>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
485b4: 47e8 0008 lea %a0@(8),%a3
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
485b8: 200b movel %a3,%d0 485ba: 222e fffc movel %fp@(-4),%d1 485be: 4c41 0002 remul %d1,%d2,%d0
);
return false;
}
if (
485c2: 4a82 tstl %d2 485c4: 6600 00a6 bnew 4866c <_Heap_Walk+0x23a>
- 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;
485c8: 74fe moveq #-2,%d2
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;
485ca: 7001 moveq #1,%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
485cc: c4a8 0004 andl %a0@(4),%d2
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;
485d0: c0b0 2804 andl %a0@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
485d4: 664a bnes 48620 <_Heap_Walk+0x1ee> <== NEVER TAKEN
485d6: 222e fff4 movel %fp@(-12),%d1 485da: 224a moveal %a2,%a1 485dc: 2648 moveal %a0,%a3 485de: 2d43 fff8 movel %d3,%fp@(-8)
);
return false;
}
if ( free_block->prev != prev_block ) {
485e2: 2428 000c movel %a0@(12),%d2 485e6: b3c2 cmpal %d2,%a1 485e8: 6600 02c0 bnew 488aa <_Heap_Walk+0x478>
return false;
}
prev_block = free_block;
free_block = free_block->next;
485ec: 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 ) {
485f0: b1ca cmpal %a2,%a0 485f2: 6700 0092 beqw 48686 <_Heap_Walk+0x254>
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;
485f6: b1c1 cmpal %d1,%a0
485f8: 6540 bcss 4863a <_Heap_Walk+0x208>
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Alloc_area_of_block(
const Heap_Block *block
)
{
return (uintptr_t) block + HEAP_BLOCK_HEADER_SIZE;
485fa: 2408 movel %a0,%d2 485fc: 5082 addql #8,%d2
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;
485fe: b9c8 cmpal %a0,%a4
48600: 6538 bcss 4863a <_Heap_Walk+0x208> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
48602: 202e fffc movel %fp@(-4),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
48606: 224b moveal %a3,%a1 48608: 2648 moveal %a0,%a3 4860a: 4c40 2003 remul %d0,%d3,%d2
);
return false;
}
if (
4860e: 4a83 tstl %d3
48610: 665a bnes 4866c <_Heap_Walk+0x23a>
- 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;
48612: 74fe moveq #-2,%d2
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;
48614: 7001 moveq #1,%d0
- HEAP_BLOCK_HEADER_SIZE);
}
RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block )
{
return block->size_and_flag & ~HEAP_PREV_BLOCK_USED;
48616: c4a8 0004 andl %a0@(4),%d2
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;
4861a: c0b0 2804 andl %a0@(00000004,%d2:l),%d0
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4861e: 67c2 beqs 485e2 <_Heap_Walk+0x1b0>
(*printer)(
48620: 2f08 movel %a0,%sp@- 48622: 4879 0005 e658 pea 5e658 <_Status_Object_name_errors_to_status+0x236>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48628: 4878 0001 pea 1 <ADD> 4862c: 2f05 movel %d5,%sp@- 4862e: 4e95 jsr %a5@ 48630: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48634: 4200 clrb %d0 48636: 6000 ff18 braw 48550 <_Heap_Walk+0x11e>
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)(
4863a: 2f08 movel %a0,%sp@- 4863c: 4879 0005 e608 pea 5e608 <_Status_Object_name_errors_to_status+0x1e6>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48642: 4878 0001 pea 1 <ADD> 48646: 2f05 movel %d5,%sp@- 48648: 4e95 jsr %a5@ 4864a: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4864e: 4200 clrb %d0 48650: 6000 fefe braw 48550 <_Heap_Walk+0x11e>
return false;
}
if ( !_Heap_Is_prev_used( first_block ) ) {
(*printer)(
48654: 4879 0005 e596 pea 5e596 <_Status_Object_name_errors_to_status+0x174>
}
if (
_Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block
) {
(*printer)(
4865a: 4878 0001 pea 1 <ADD> 4865e: 2f05 movel %d5,%sp@- 48660: 4e95 jsr %a5@ 48662: 4fef 000c lea %sp@(12),%sp
if ( !_System_state_Is_up( _System_state_Get() ) ) {
return true;
}
if ( !_Heap_Walk_check_control( source, printer, heap ) ) {
return false;
48666: 4200 clrb %d0 48668: 6000 fe9a braw 48504 <_Heap_Walk+0xd2>
}
if (
!_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size )
) {
(*printer)(
4866c: 2f08 movel %a0,%sp@- 4866e: 4879 0005 e628 pea 5e628 <_Status_Object_name_errors_to_status+0x206>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48674: 4878 0001 pea 1 <ADD> 48678: 2f05 movel %d5,%sp@- 4867a: 4e95 jsr %a5@ 4867c: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48680: 4200 clrb %d0 48682: 6000 fecc braw 48550 <_Heap_Walk+0x11e> 48686: 262e fff8 movel %fp@(-8),%d3
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
4868a: 2844 moveal %d4,%a4 4868c: 2d41 fff4 movel %d1,%fp@(-12) 48690: 222e fff4 movel %fp@(-12),%d1 48694: 2d43 fffc movel %d3,%fp@(-4) 48698: 262e fff0 movel %fp@(-16),%d3 4869c: 2d47 ffec movel %d7,%fp@(-20)
- 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;
486a0: 74fe moveq #-2,%d2 486a2: 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);
486a4: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
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;
486a8: b7c1 cmpal %d1,%a3
486aa: 657e bcss 4872a <_Heap_Walk+0x2f8> <== NEVER TAKEN
486ac: b7ea 0024 cmpal %a2@(36),%a3
486b0: 6278 bhis 4872a <_Heap_Walk+0x2f8>
uintptr_t const block_begin = (uintptr_t) block;
uintptr_t const block_size = _Heap_Block_size( block );
bool const prev_used = _Heap_Is_prev_used( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
486b2: b9ee ffec cmpal %fp@(-20),%a4 486b6: 56c1 sne %d1
RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned(
uintptr_t value,
uintptr_t alignment
)
{
return (value % alignment) == 0;
486b8: 202e fffc movel %fp@(-4),%d0 486bc: 2e02 movel %d2,%d7 486be: 3241 moveaw %d1,%a1 486c0: 4c40 7001 remul %d0,%d1,%d7 486c4: 2009 movel %a1,%d0 486c6: 4480 negl %d0
);
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
486c8: 4a81 tstl %d1
486ca: 6704 beqs 486d0 <_Heap_Walk+0x29e>
486cc: 4a00 tstb %d0
486ce: 667c bnes 4874c <_Heap_Walk+0x31a>
);
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
486d0: b486 cmpl %d6,%d2
486d2: 6406 bccs 486da <_Heap_Walk+0x2a8>
486d4: 4a00 tstb %d0 486d6: 6600 008e bnew 48766 <_Heap_Walk+0x334>
);
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
486da: b7cc cmpal %a4,%a3
486dc: 6206 bhis 486e4 <_Heap_Walk+0x2b2>
486de: 4a00 tstb %d0 486e0: 6600 00a8 bnew 4878a <_Heap_Walk+0x358>
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;
486e4: 7001 moveq #1,%d0 486e6: 7e01 moveq #1,%d7 486e8: c0ab 0004 andl %a3@(4),%d0 486ec: c687 andl %d7,%d3
);
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
486ee: 4a80 tstl %d0 486f0: 6700 00cc beqw 487be <_Heap_Walk+0x38c>
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
}
} else if (prev_used) {
486f4: 4a83 tstl %d3 486f6: 6700 00ac beqw 487a4 <_Heap_Walk+0x372>
(*printer)(
486fa: 2f02 movel %d2,%sp@- 486fc: 2f0c movel %a4,%sp@- 486fe: 4879 0005 e7fd pea 5e7fd <_Status_Object_name_errors_to_status+0x3db> 48704: 42a7 clrl %sp@- 48706: 2f05 movel %d5,%sp@- 48708: 4e95 jsr %a5@ 4870a: 4fef 0014 lea %sp@(20),%sp
block->prev_size
);
}
block = next_block;
} while ( block != first_block );
4870e: b7c4 cmpal %d4,%a3 48710: 6700 fd58 beqw 4846a <_Heap_Walk+0x38> 48714: 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;
48718: 74fe moveq #-2,%d2 4871a: 284b moveal %a3,%a4 4871c: c483 andl %d3,%d2 4871e: 222a 0020 movel %a2@(32),%d1
RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at(
const Heap_Block *block,
uintptr_t offset
)
{
return (Heap_Block *) ((uintptr_t) block + offset);
48722: 47f4 2800 lea %a4@(00000000,%d2:l),%a3
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;
48726: b7c1 cmpal %d1,%a3
48728: 6482 bccs 486ac <_Heap_Walk+0x27a> <== ALWAYS TAKEN
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
uintptr_t const next_block_begin = (uintptr_t) next_block;
bool const is_not_last_block = block != last_block;
if ( !_Heap_Is_block_in_heap( heap, next_block ) ) {
(*printer)(
4872a: 2f0b movel %a3,%sp@- 4872c: 2f0c movel %a4,%sp@- 4872e: 4879 0005 e6a6 pea 5e6a6 <_Status_Object_name_errors_to_status+0x284>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
48734: 4878 0001 pea 1 <ADD> 48738: 2f05 movel %d5,%sp@- 4873a: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
4873c: 4fef 0014 lea %sp@(20),%sp 48740: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48742: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 48748: 4e5e unlk %fp 4874a: 4e75 rts
return false;
}
if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) {
(*printer)(
4874c: 2f02 movel %d2,%sp@- 4874e: 2f0c movel %a4,%sp@- 48750: 4879 0005 e6d3 pea 5e6d3 <_Status_Object_name_errors_to_status+0x2b1>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
48756: 4878 0001 pea 1 <ADD> 4875a: 2f05 movel %d5,%sp@- 4875c: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
4875e: 4fef 0014 lea %sp@(20),%sp 48762: 4200 clrb %d0 48764: 60dc bras 48742 <_Heap_Walk+0x310>
return false;
}
if ( block_size < min_block_size && is_not_last_block ) {
(*printer)(
48766: 2f06 movel %d6,%sp@- 48768: 2f02 movel %d2,%sp@- 4876a: 2f0c movel %a4,%sp@- 4876c: 4879 0005 e701 pea 5e701 <_Status_Object_name_errors_to_status+0x2df> 48772: 4878 0001 pea 1 <ADD> 48776: 2f05 movel %d5,%sp@- 48778: 4e95 jsr %a5@
block,
block_size,
min_block_size
);
return false;
4877a: 4fef 0018 lea %sp@(24),%sp
block = next_block;
} while ( block != first_block );
return true;
}
4877e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
block,
block_size,
min_block_size
);
return false;
48784: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48786: 4e5e unlk %fp 48788: 4e75 rts
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
4878a: 2f0b movel %a3,%sp@- 4878c: 2f0c movel %a4,%sp@- 4878e: 4879 0005 e72c pea 5e72c <_Status_Object_name_errors_to_status+0x30a> 48794: 4878 0001 pea 1 <ADD> 48798: 2f05 movel %d5,%sp@- 4879a: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
4879c: 4fef 0014 lea %sp@(20),%sp 487a0: 4200 clrb %d0 487a2: 609e bras 48742 <_Heap_Walk+0x310>
"block 0x%08x: size %u\n",
block,
block_size
);
} else {
(*printer)(
487a4: 2f14 movel %a4@,%sp@- 487a6: 2f02 movel %d2,%sp@- 487a8: 2f0c movel %a4,%sp@- 487aa: 4879 0005 e814 pea 5e814 <_Status_Object_name_errors_to_status+0x3f2> 487b0: 42a7 clrl %sp@- 487b2: 2f05 movel %d5,%sp@- 487b4: 4e95 jsr %a5@ 487b6: 4fef 0018 lea %sp@(24),%sp 487ba: 6000 ff52 braw 4870e <_Heap_Walk+0x2dc>
block = next_block;
} while ( block != first_block );
return true;
}
487be: 2e2a 0008 movel %a2@(8),%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)(
487c2: 43f9 0005 e44c lea 5e44c <_Status_Object_name_errors_to_status+0x2a>,%a1
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
487c8: 222c 0008 movel %a4@(8),%d1
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
487cc: b2aa 000c cmpl %a2@(12),%d1
487d0: 670a beqs 487dc <_Heap_Walk+0x3aa>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
487d2: 43f9 0005 e394 lea 5e394 <rtems_filesystem_default_pathconf+0x40>,%a1 487d8: b28a cmpl %a2,%d1
487da: 6764 beqs 48840 <_Heap_Walk+0x40e>
false,
"block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n",
block,
block_size,
block->prev,
block->prev == first_free_block ?
487dc: 202c 000c movel %a4@(12),%d0
Heap_Block *const last_free_block = _Heap_Free_list_last( heap );
bool const prev_used = _Heap_Is_prev_used( block );
uintptr_t const block_size = _Heap_Block_size( block );
Heap_Block *const next_block = _Heap_Block_at( block, block_size );
(*printer)(
487e0: 41f9 0005 e465 lea 5e465 <_Status_Object_name_errors_to_status+0x43>,%a0 487e6: b087 cmpl %d7,%d0
487e8: 670a beqs 487f4 <_Heap_Walk+0x3c2>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
487ea: 41f9 0005 e394 lea 5e394 <rtems_filesystem_default_pathconf+0x40>,%a0 487f0: b08a cmpl %a2,%d0
487f2: 6754 beqs 48848 <_Heap_Walk+0x416>
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)(
487f4: 2f09 movel %a1,%sp@- 487f6: 2f01 movel %d1,%sp@- 487f8: 2f08 movel %a0,%sp@- 487fa: 2f00 movel %d0,%sp@- 487fc: 2f02 movel %d2,%sp@- 487fe: 2f0c movel %a4,%sp@- 48800: 4879 0005 e760 pea 5e760 <_Status_Object_name_errors_to_status+0x33e> 48806: 42a7 clrl %sp@- 48808: 2f05 movel %d5,%sp@- 4880a: 4e95 jsr %a5@
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
4880c: 2213 movel %a3@,%d1 4880e: 4fef 0024 lea %sp@(36),%sp 48812: b282 cmpl %d2,%d1
48814: 663a bnes 48850 <_Heap_Walk+0x41e>
);
return false;
}
if ( !prev_used ) {
48816: 4a83 tstl %d3
48818: 6776 beqs 48890 <_Heap_Walk+0x45e>
block = next_block;
} while ( block != first_block );
return true;
}
4881a: 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 ) {
4881e: b1ca cmpal %a2,%a0
48820: 6754 beqs 48876 <_Heap_Walk+0x444> <== NEVER TAKEN
if ( free_block == block ) {
48822: b1cc cmpal %a4,%a0 48824: 6700 fee8 beqw 4870e <_Heap_Walk+0x2dc> 48828: 2e2e ffec movel %fp@(-20),%d7
return true;
}
free_block = free_block->next;
4882c: 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 ) {
48830: b1ca cmpal %a2,%a0
48832: 6742 beqs 48876 <_Heap_Walk+0x444>
if ( free_block == block ) {
48834: b1cc cmpal %a4,%a0
48836: 66f4 bnes 4882c <_Heap_Walk+0x3fa>
48838: 2d47 ffec movel %d7,%fp@(-20) 4883c: 6000 fed0 braw 4870e <_Heap_Walk+0x2dc>
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
block->next,
block->next == last_free_block ?
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
48840: 43f9 0005 e45b lea 5e45b <_Status_Object_name_errors_to_status+0x39>,%a1 48846: 6094 bras 487dc <_Heap_Walk+0x3aa>
block,
block_size,
block->prev,
block->prev == first_free_block ?
" (= first free)"
: (block->prev == free_list_head ? " (= head)" : ""),
48848: 41f9 0005 e475 lea 5e475 <_Status_Object_name_errors_to_status+0x53>,%a0 4884e: 60a4 bras 487f4 <_Heap_Walk+0x3c2>
" (= last free)"
: (block->next == free_list_tail ? " (= tail)" : "")
);
if ( block_size != next_block->prev_size ) {
(*printer)(
48850: 2f0b movel %a3,%sp@- 48852: 2f01 movel %d1,%sp@- 48854: 2f02 movel %d2,%sp@- 48856: 2f0c movel %a4,%sp@- 48858: 4879 0005 e795 pea 5e795 <_Status_Object_name_errors_to_status+0x373> 4885e: 4878 0001 pea 1 <ADD> 48862: 2f05 movel %d5,%sp@- 48864: 4e95 jsr %a5@ 48866: 4fef 001c lea %sp@(28),%sp
block = next_block;
} while ( block != first_block );
return true;
}
4886a: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
48870: 4200 clrb %d0
block = next_block;
} while ( block != first_block );
return true;
}
48872: 4e5e unlk %fp 48874: 4e75 rts
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48876: 2f0c movel %a4,%sp@- 48878: 4879 0005 e839 pea 5e839 <_Status_Object_name_errors_to_status+0x417> 4887e: 4878 0001 pea 1 <ADD> 48882: 2f05 movel %d5,%sp@- 48884: 4e95 jsr %a5@ 48886: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
4888a: 4200 clrb %d0 4888c: 6000 fcc2 braw 48550 <_Heap_Walk+0x11e>
return false;
}
if ( !prev_used ) {
(*printer)(
48890: 2f0c movel %a4,%sp@- 48892: 4879 0005 e7ce pea 5e7ce <_Status_Object_name_errors_to_status+0x3ac>
return false;
}
if ( !_Heap_Walk_is_in_free_list( heap, block ) ) {
(*printer)(
48898: 4878 0001 pea 1 <ADD> 4889c: 2f05 movel %d5,%sp@- 4889e: 4e95 jsr %a5@ 488a0: 4fef 0010 lea %sp@(16),%sp
return false;
}
if ( !_Heap_Is_prev_used( next_block ) ) {
if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) {
return false;
488a4: 4200 clrb %d0 488a6: 6000 fca8 braw 48550 <_Heap_Walk+0x11e>
return false;
}
if ( free_block->prev != prev_block ) {
(*printer)(
488aa: 2f02 movel %d2,%sp@- 488ac: 2f08 movel %a0,%sp@- 488ae: 4879 0005 e674 pea 5e674 <_Status_Object_name_errors_to_status+0x252>
return false;
}
if ( next_block_begin <= block_begin && is_not_last_block ) {
(*printer)(
488b4: 4878 0001 pea 1 <ADD> 488b8: 2f05 movel %d5,%sp@- 488ba: 4e95 jsr %a5@
"block 0x%08x: next block 0x%08x is not a successor\n",
block,
next_block
);
return false;
488bc: 4fef 0014 lea %sp@(20),%sp 488c0: 4200 clrb %d0 488c2: 6000 fe7e braw 48742 <_Heap_Walk+0x310>
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 ) {
488c6: 222a 0020 movel %a2@(32),%d1
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
488ca: 2844 moveal %d4,%a4
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 ) {
488cc: 2d41 fff4 movel %d1,%fp@(-12)
);
return false;
}
if ( _Heap_Is_used( free_block ) ) {
488d0: 222e fff4 movel %fp@(-12),%d1 488d4: 2d43 fffc movel %d3,%fp@(-4) 488d8: 262e fff0 movel %fp@(-16),%d3 488dc: 2d47 ffec movel %d7,%fp@(-20) 488e0: 6000 fdbe braw 486a0 <_Heap_Walk+0x26e>
000483dc <_Heap_Walk_print>:
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
483dc: 4e56 0000 linkw %fp,#0 483e0: 202e 0008 movel %fp@(8),%d0
va_list ap;
if ( error ) {
483e4: 4a2e 000f tstb %fp@(15)
483e8: 6624 bnes 4840e <_Heap_Walk_print+0x32> <== NEVER TAKEN
printk( "FAIL[%d]: ", source );
} else {
printk( "PASS[%d]: ", source );
483ea: 2f00 movel %d0,%sp@- 483ec: 4879 0005 e441 pea 5e441 <_Status_Object_name_errors_to_status+0x1f> 483f2: 4eb9 0004 4350 jsr 44350 <printk> 483f8: 508f addql #8,%sp
}
va_start( ap, fmt );
vprintk( fmt, ap );
483fa: 486e 0014 pea %fp@(20) 483fe: 2f2e 0010 movel %fp@(16),%sp@- 48402: 4eb9 0004 6274 jsr 46274 <vprintk>
va_end( ap );
48408: 508f addql #8,%sp
}
4840a: 4e5e unlk %fp 4840c: 4e75 rts
static void _Heap_Walk_print( int source, bool error, const char *fmt, ... )
{
va_list ap;
if ( error ) {
printk( "FAIL[%d]: ", source );
4840e: 2f00 movel %d0,%sp@- 48410: 4879 0005 e436 pea 5e436 <_Status_Object_name_errors_to_status+0x14> 48416: 4eb9 0004 4350 jsr 44350 <printk> 4841c: 508f addql #8,%sp
} else {
printk( "PASS[%d]: ", source );
}
va_start( ap, fmt );
vprintk( fmt, ap );
4841e: 486e 0014 pea %fp@(20) 48422: 2f2e 0010 movel %fp@(16),%sp@- 48426: 4eb9 0004 6274 jsr 46274 <vprintk>
va_end( ap );
4842c: 508f addql #8,%sp
}
4842e: 4e5e unlk %fp <== NOT EXECUTED
00046e22 <_IO_Initialize_all_drivers>:
*
* Output Parameters: NONE
*/
void _IO_Initialize_all_drivers( void )
{
46e22: 4e56 0000 linkw %fp,#0 46e26: 2f0a movel %a2,%sp@- 46e28: 2f02 movel %d2,%sp@-
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e2a: 4ab9 0006 0358 tstl 60358 <_IO_Number_of_drivers>
46e30: 671e beqs 46e50 <_IO_Initialize_all_drivers+0x2e><== NEVER TAKEN
46e32: 4282 clrl %d2 46e34: 45f9 0004 c4fc lea 4c4fc <rtems_io_initialize>,%a2
(void) rtems_io_initialize( major, 0, NULL );
46e3a: 42a7 clrl %sp@- 46e3c: 42a7 clrl %sp@- 46e3e: 2f02 movel %d2,%sp@-
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e40: 5282 addql #1,%d2
(void) rtems_io_initialize( major, 0, NULL );
46e42: 4e92 jsr %a2@
void _IO_Initialize_all_drivers( void )
{
rtems_device_major_number major;
for ( major=0 ; major < _IO_Number_of_drivers ; major ++ )
46e44: 4fef 000c lea %sp@(12),%sp 46e48: b4b9 0006 0358 cmpl 60358 <_IO_Number_of_drivers>,%d2
46e4e: 65ea bcss 46e3a <_IO_Initialize_all_drivers+0x18>
(void) rtems_io_initialize( major, 0, NULL );
}
46e50: 242e fff8 movel %fp@(-8),%d2 46e54: 246e fffc moveal %fp@(-4),%a2
46e58: 4e5e unlk %fp <== NOT EXECUTED
00046d88 <_IO_Manager_initialization>:
* workspace.
*
*/
void _IO_Manager_initialization(void)
{
46d88: 4e56 fff0 linkw %fp,#-16 46d8c: 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;
46d90: 2639 0005 e356 movel 5e356 <Configuration+0x32>,%d3
drivers_in_table = Configuration.number_of_device_drivers;
46d96: 2439 0005 e352 movel 5e352 <Configuration+0x2e>,%d2
number_of_drivers = Configuration.maximum_drivers;
46d9c: 2839 0005 e34e movel 5e34e <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 )
46da2: b882 cmpl %d2,%d4
46da4: 6366 blss 46e0c <_IO_Manager_initialization+0x84>
* 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 *)
_Workspace_Allocate_or_fatal_error(
46da6: 2004 movel %d4,%d0 46da8: 2a04 movel %d4,%d5 46daa: e788 lsll #3,%d0 46dac: eb8d lsll #5,%d5 46dae: 9a80 subl %d0,%d5 46db0: 2f05 movel %d5,%sp@- 46db2: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error>
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
_IO_Number_of_drivers = number_of_drivers;
memset(
46db8: 2f05 movel %d5,%sp@- 46dba: 42a7 clrl %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 *)
46dbc: 23c0 0006 035c movel %d0,6035c <_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(
46dc2: 2f00 movel %d0,%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;
46dc4: 23c4 0006 0358 movel %d4,60358 <_IO_Number_of_drivers>
memset(
46dca: 4eb9 0004 f310 jsr 4f310 <memset>
_IO_Driver_address_table, 0,
sizeof( rtems_driver_address_table ) * ( number_of_drivers )
);
for ( index = 0 ; index < drivers_in_table ; index++ )
46dd0: 4fef 0010 lea %sp@(16),%sp 46dd4: 4a82 tstl %d2
46dd6: 672a beqs 46e02 <_IO_Manager_initialization+0x7a><== NEVER TAKEN
46dd8: 2839 0006 035c movel 6035c <_IO_Driver_address_table>,%d4 46dde: 4280 clrl %d0 46de0: 4281 clrl %d1
_IO_Driver_address_table[index] = driver_table[index];
46de2: 2243 moveal %d3,%a1 46de4: 2044 moveal %d4,%a0 46de6: d3c0 addal %d0,%a1 46de8: 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++ )
46dea: 5281 addql #1,%d1 46dec: 0680 0000 0018 addil #24,%d0
_IO_Driver_address_table[index] = driver_table[index];
46df2: 20d9 movel %a1@+,%a0@+ 46df4: 20d9 movel %a1@+,%a0@+ 46df6: 20d9 movel %a1@+,%a0@+ 46df8: 20d9 movel %a1@+,%a0@+ 46dfa: 20d9 movel %a1@+,%a0@+ 46dfc: 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++ )
46dfe: b282 cmpl %d2,%d1
46e00: 65e0 bcss 46de2 <_IO_Manager_initialization+0x5a>
_IO_Driver_address_table[index] = driver_table[index];
number_of_drivers = drivers_in_table;
}
46e02: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5 46e08: 4e5e unlk %fp 46e0a: 4e75 rts
* 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;
46e0c: 23c3 0006 035c movel %d3,6035c <_IO_Driver_address_table>
_IO_Number_of_drivers = number_of_drivers;
46e12: 23c2 0006 0358 movel %d2,60358 <_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;
}
46e18: 4cee 003c fff0 moveml %fp@(-16),%d2-%d5
46e1e: 4e5e unlk %fp <== NOT EXECUTED
00047a24 <_Internal_error_Occurred>:
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47a24: 4e56 fffc linkw %fp,#-4 47a28: 206e 0010 moveal %fp@(16),%a0 47a2c: 2f02 movel %d2,%sp@- 47a2e: 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 );
47a32: 4282 clrl %d2 47a34: 1401 moveb %d1,%d2 47a36: 2242 moveal %d2,%a1 47a38: 2f08 movel %a0,%sp@-
void _Internal_error_Occurred(
Internal_errors_Source the_source,
bool is_internal,
Internal_errors_t the_error
)
{
47a3a: 202e 0008 movel %fp@(8),%d0
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47a3e: 2f09 movel %a1,%sp@-
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
_Internal_errors_What_happened.is_internal = is_internal;
47a40: 13c1 0005 fb76 moveb %d1,5fb76 <_Internal_errors_What_happened+0x4>
_Internal_errors_What_happened.the_error = the_error;
_User_extensions_Fatal( the_source, is_internal, the_error );
47a46: 2d48 fffc movel %a0,%fp@(-4)
bool is_internal,
Internal_errors_t the_error
)
{
_Internal_errors_What_happened.the_source = the_source;
47a4a: 23c0 0005 fb72 movel %d0,5fb72 <_Internal_errors_What_happened>
_Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error;
47a50: 23c8 0005 fb78 movel %a0,5fb78 <_Internal_errors_What_happened+0x6>
_User_extensions_Fatal( the_source, is_internal, the_error );
47a56: 2f00 movel %d0,%sp@- 47a58: 4eb9 0004 9942 jsr 49942 <_User_extensions_Fatal>
_System_state_Set( SYSTEM_STATE_FAILED );
_CPU_Fatal_halt( the_error );
47a5e: 206e fffc moveal %fp@(-4),%a0 <== NOT EXECUTED 47a62: 327c 0700 moveaw #1792,%a1 <== NOT EXECUTED 47a66: 2409 movel %a1,%d2 <== NOT EXECUTED 47a68: 40c0 movew %sr,%d0 <== NOT EXECUTED 47a6a: 8082 orl %d2,%d0 <== NOT EXECUTED 47a6c: 46c0 movew %d0,%sr <== NOT EXECUTED 47a6e: 2008 movel %a0,%d0 <== NOT EXECUTED 47a70: 223c dead beef movel #-559038737,%d1 <== NOT EXECUTED 47a76: 4ac8 halt <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _System_state_Set (
System_state_Codes state
)
{
_System_state_Current = state;
47a78: 7005 moveq #5,%d0 <== NOT EXECUTED 47a7a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 47a7e: 23c0 0005 fc4a movel %d0,5fc4a <_System_state_Current> <== NOT EXECUTED 47a84: 60fe bras 47a84 <_Internal_error_Occurred+0x60> <== NOT EXECUTED
...
00047ae8 <_Objects_Allocate>:
*/
Objects_Control *_Objects_Allocate(
Objects_Information *information
)
{
47ae8: 4e56 fff0 linkw %fp,#-16 47aec: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 47af0: 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 )
47af4: 4aaa 0014 tstl %a2@(20)
47af8: 660c bnes 47b06 <_Objects_Allocate+0x1e> <== ALWAYS TAKEN
return NULL;
47afa: 4280 clrl %d0 <== NOT EXECUTED
);
}
#endif
return the_object;
}
47afc: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b02: 4e5e unlk %fp 47b04: 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 );
47b06: 240a movel %a2,%d2 47b08: 0682 0000 001c addil #28,%d2 47b0e: 47f9 0004 70f8 lea 470f8 <_Chain_Get>,%a3 47b14: 2f02 movel %d2,%sp@- 47b16: 4e93 jsr %a3@
if ( information->auto_extend ) {
47b18: 588f addql #4,%sp 47b1a: 4a2a 0010 tstb %a2@(16)
47b1e: 67dc beqs 47afc <_Objects_Allocate+0x14>
/*
* If the list is empty then we are out of objects and need to
* extend information base.
*/
if ( !the_object ) {
47b20: 4a80 tstl %d0
47b22: 6738 beqs 47b5c <_Objects_Allocate+0x74>
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b24: 2040 moveal %d0,%a0 47b26: 4281 clrl %d1 47b28: 4283 clrl %d3
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47b2a: 4282 clrl %d2
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b2c: 362a 0008 movew %a2@(8),%d3 47b30: 3228 000a movew %a0@(10),%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47b34: 342a 0012 movew %a2@(18),%d2
information->inactive_per_block[ block ]--;
47b38: 206a 002a moveal %a2@(42),%a0
}
if ( the_object ) {
uint32_t block;
block = (uint32_t) _Objects_Get_index( the_object->id ) -
47b3c: 9283 subl %d3,%d1
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
47b3e: 4c42 1001 remul %d2,%d1,%d1
information->inactive_per_block[ block ]--;
information->inactive--;
47b42: 326a 0028 moveaw %a2@(40),%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b46: e589 lsll #2,%d1
information->inactive--;
47b48: 5389 subql #1,%a1
block = (uint32_t) _Objects_Get_index( the_object->id ) -
_Objects_Get_index( information->minimum_id );
block /= information->allocation_size;
information->inactive_per_block[ block ]--;
47b4a: d1c1 addal %d1,%a0 47b4c: 5390 subql #1,%a0@
information->inactive--;
47b4e: 3549 0028 movew %a1,%a2@(40)
);
}
#endif
return the_object;
}
47b52: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 47b58: 4e5e unlk %fp 47b5a: 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 );
47b5c: 2f0a movel %a2,%sp@- 47b5e: 4eb9 0004 7ba4 jsr 47ba4 <_Objects_Extend_information>
the_object = (Objects_Control *) _Chain_Get( &information->Inactive );
47b64: 2f02 movel %d2,%sp@- 47b66: 4e93 jsr %a3@
}
if ( the_object ) {
47b68: 508f addql #8,%sp 47b6a: 4a80 tstl %d0
47b6c: 66b6 bnes 47b24 <_Objects_Allocate+0x3c>
);
}
#endif
return the_object;
}
47b6e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
47b74: 4e5e unlk %fp <== NOT EXECUTED
00047b78 <_Objects_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47b78: 4280 clrl %d0
void _Objects_Close(
Objects_Information *information,
Objects_Control *the_object
)
{
47b7a: 4e56 0000 linkw %fp,#0 47b7e: 226e 000c moveal %fp@(12),%a1 47b82: 206e 0008 moveal %fp@(8),%a0 47b86: 2f0a movel %a2,%sp@-
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47b88: 2468 0018 moveal %a0@(24),%a2
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
47b8c: 3029 000a movew %a1@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
47b90: 42b2 0c00 clrl %a2@(00000000,%d0:l:4)
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
}
47b94: 245f moveal %sp@+,%a2
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47b96: 2d49 000c movel %a1,%fp@(12)
}
47b9a: 4e5e unlk %fp
Objects_Control *the_object
)
{
_Objects_Invalidate_Id( information, the_object );
_Objects_Namespace_remove( information, the_object );
47b9c: 4ef9 0004 8120 jmp 48120 <_Objects_Namespace_remove>
...
00047ba4 <_Objects_Extend_information>:
*/
void _Objects_Extend_information(
Objects_Information *information
)
{
47ba4: 4e56 ffcc linkw %fp,#-52 47ba8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 47bac: 246e 0008 moveal %fp@(8),%a2
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
47bb0: 4285 clrl %d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47bb2: 206a 002e moveal %a2@(46),%a0
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
47bb6: 3a2a 0008 movew %a2@(8),%d5
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47bba: 4a88 tstl %a0 47bbc: 6700 0232 beqw 47df0 <_Objects_Extend_information+0x24c>
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
47bc0: 322a 000e movew %a2@(14),%d1 47bc4: 302a 0012 movew %a2@(18),%d0 47bc8: 3801 movew %d1,%d4 47bca: 0284 0000 ffff andil #65535,%d4 47bd0: 88c0 divuw %d0,%d4 47bd2: 0284 0000 ffff andil #65535,%d4
for ( ; block < block_count; block++ ) {
47bd8: 6700 022c beqw 47e06 <_Objects_Extend_information+0x262>
if ( information->object_blocks[ block ] == NULL ) {
47bdc: 4a90 tstl %a0@ 47bde: 6700 0236 beqw 47e16 <_Objects_Extend_information+0x272>
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47be2: 5888 addql #4,%a0
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
47be4: 2605 movel %d5,%d3
index_base = minimum_index; block = 0;
47be6: 4282 clrl %d2
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47be8: 0280 0000 ffff andil #65535,%d0
do_extend = false;
break;
} else
index_base += information->allocation_size;
47bee: 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++ ) {
47bf0: 5282 addql #1,%d2 47bf2: b484 cmpl %d4,%d2 47bf4: 6400 01a6 bccw 47d9c <_Objects_Extend_information+0x1f8>
if ( information->object_blocks[ block ] == NULL ) {
47bf8: 4a98 tstl %a0@+
47bfa: 66f2 bnes 47bee <_Objects_Extend_information+0x4a>
do_extend = false;
47bfc: 4207 clrb %d7
} else
index_base += information->allocation_size;
}
}
maximum = (uint32_t) information->maximum + information->allocation_size;
47bfe: 0281 0000 ffff andil #65535,%d1 47c04: 2641 moveal %d1,%a3 47c06: 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 ) {
47c08: b7fc 0000 ffff cmpal #65535,%a3 47c0e: 6200 0182 bhiw 47d92 <_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;
47c12: 41ea 0014 lea %a2@(20),%a0 47c16: 4c10 0800 mulsl %a0@,%d0
if ( information->auto_extend ) {
47c1a: 4a2a 0010 tstb %a2@(16) 47c1e: 6700 0182 beqw 47da2 <_Objects_Extend_information+0x1fe>
new_object_block = _Workspace_Allocate( block_size );
47c22: 2f00 movel %d0,%sp@- 47c24: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
if ( !new_object_block )
47c2a: 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 );
47c2c: 2c00 movel %d0,%d6
if ( !new_object_block )
47c2e: 6700 0162 beqw 47d92 <_Objects_Extend_information+0x1ee>
}
/*
* Do we need to grow the tables?
*/
if ( do_extend ) {
47c32: 4a07 tstb %d7 47c34: 6700 00c4 beqw 47cfa <_Objects_Extend_information+0x156>
*/
/*
* Up the block count and maximum
*/
block_count++;
47c38: 2a44 moveal %d4,%a5 47c3a: 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 *));
47c3c: 200b movel %a3,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47c3e: 41f5 da00 lea %a5@(00000000,%a5:l:2),%a0
((maximum + minimum_index) * sizeof(Objects_Control *));
47c42: d088 addl %a0,%d0
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
47c44: d085 addl %d5,%d0
block_count++;
/*
* Allocate the tables and break it up.
*/
block_size = block_count *
47c46: e588 lsll #2,%d0
(sizeof(void *) + sizeof(uint32_t) + sizeof(Objects_Name *)) +
((maximum + minimum_index) * sizeof(Objects_Control *));
object_blocks = (void**) _Workspace_Allocate( block_size );
47c48: 2f00 movel %d0,%sp@- 47c4a: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
if ( !object_blocks ) {
47c50: 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 );
47c52: 2840 moveal %d0,%a4
if ( !object_blocks ) {
47c54: 4a80 tstl %d0 47c56: 6700 01ce beqw 47e26 <_Objects_Extend_information+0x282>
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47c5a: 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 ) {
47c5c: 4280 clrl %d0
}
/*
* Break the block into the various sections.
*/
inactive_per_block = (uint32_t *) _Addresses_Add_offset(
47c5e: 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 ) {
47c60: 302a 000e movew %a2@(14),%d0 47c64: 4bf4 7800 lea %a4@(00000000,%d7:l),%a5 47c68: de8d addl %a5,%d7 47c6a: b085 cmpl %d5,%d0 47c6c: 6200 0144 bhiw 47db2 <_Objects_Extend_information+0x20e>
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47c70: 4a85 tstl %d5
47c72: 670c beqs 47c80 <_Objects_Extend_information+0xdc><== NEVER TAKEN
47c74: 2047 moveal %d7,%a0 47c76: 4280 clrl %d0
local_table[ index ] = NULL;
47c78: 4298 clrl %a0@+
} else {
/*
* Deal with the special case of the 0 to minimum_index
*/
for ( index = 0; index < minimum_index; index++ ) {
47c7a: 5280 addql #1,%d0 47c7c: b085 cmpl %d5,%d0
47c7e: 65f8 bcss 47c78 <_Objects_Extend_information+0xd4><== NEVER TAKEN
47c80: 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 );
47c82: 4281 clrl %d1
}
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
47c84: 42b4 4800 clrl %a4@(00000000,%d4:l)
inactive_per_block[block_count] = 0;
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47c88: 322a 0012 movew %a2@(18),%d1
/*
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
47c8c: 42b5 4800 clrl %a5@(00000000,%d4:l)
for ( index=index_base ;
index < ( information->allocation_size + index_base );
47c90: d283 addl %d3,%d1
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47c92: b283 cmpl %d3,%d1
47c94: 6310 blss 47ca6 <_Objects_Extend_information+0x102><== NEVER TAKEN
47c96: 2247 moveal %d7,%a1
* information - object information table
*
* Output parameters: NONE
*/
void _Objects_Extend_information(
47c98: 2003 movel %d3,%d0
* Initialise the new entries in the table.
*/
object_blocks[block_count] = NULL;
inactive_per_block[block_count] = 0;
for ( index=index_base ;
47c9a: 41f1 3c00 lea %a1@(00000000,%d3:l:4),%a0
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
47c9e: 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++ ) {
47ca0: 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 ;
47ca2: b280 cmpl %d0,%d1
47ca4: 62f8 bhis 47c9e <_Objects_Extend_information+0xfa>
index < ( information->allocation_size + index_base );
index++ ) {
local_table[ index ] = NULL;
}
_ISR_Disable( level );
47ca6: 203c 0000 0700 movel #1792,%d0 47cac: 40c4 movew %sr,%d4 47cae: 8084 orl %d4,%d0 47cb0: 46c0 movew %d0,%sr
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47cb2: 2012 movel %a2@,%d0 47cb4: 7a18 moveq #24,%d5
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(
47cb6: 4281 clrl %d1 47cb8: eba8 lsll %d5,%d0 47cba: 4285 clrl %d5 47cbc: 3a0b movew %a3,%d5 47cbe: 322a 0004 movew %a2@(4),%d1 47cc2: 08c0 0010 bset #16,%d0 47cc6: 2245 moveal %d5,%a1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47cc8: 7a1b moveq #27,%d5 47cca: eba9 lsll %d5,%d1
local_table[ index ] = NULL;
}
_ISR_Disable( level );
old_tables = information->object_blocks;
47ccc: 206a 002e moveal %a2@(46),%a0 47cd0: 8081 orl %d1,%d0
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47cd2: 2209 movel %a1,%d1 47cd4: 8280 orl %d0,%d1
information->object_blocks = object_blocks;
information->inactive_per_block = inactive_per_block;
information->local_table = local_table;
information->maximum = (Objects_Maximum) maximum;
47cd6: 354b 000e movew %a3,%a2@(14)
_ISR_Disable( level );
old_tables = information->object_blocks;
information->object_blocks = object_blocks;
47cda: 254c 002e movel %a4,%a2@(46)
information->inactive_per_block = inactive_per_block;
47cde: 254d 002a movel %a5,%a2@(42) 47ce2: 2541 000a movel %d1,%a2@(10)
information->local_table = local_table;
47ce6: 2547 0018 movel %d7,%a2@(24)
information->the_class,
_Objects_Local_node,
information->maximum
);
_ISR_Enable( level );
47cea: 46c4 movew %d4,%sr
if ( old_tables )
47cec: 4a88 tstl %a0
47cee: 670a beqs 47cfa <_Objects_Extend_information+0x156>
_Workspace_Free( old_tables );
47cf0: 2f08 movel %a0,%sp@- 47cf2: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 47cf8: 588f addql #4,%sp
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47cfa: 206a 002e moveal %a2@(46),%a0
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47cfe: 4280 clrl %d0 47d00: 280e movel %fp,%d4 47d02: 0684 ffff fff4 addil #-12,%d4 47d08: 47f9 0004 70f8 lea 470f8 <_Chain_Get>,%a3
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d0e: 2a0a movel %a2,%d5 47d10: 0685 0000 001c addil #28,%d5 47d16: 49f9 0004 7098 lea 47098 <_Chain_Append>,%a4
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d1c: e58a lsll #2,%d2
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d1e: 302a 0012 movew %a2@(18),%d0
}
/*
* Assign the new object block to the object block table.
*/
information->object_blocks[ block ] = new_object_block;
47d22: 2186 2800 movel %d6,%a0@(00000000,%d2:l)
/*
* Initialize objects .. add to a local chain first.
*/
_Chain_Initialize(
47d26: 2f2a 0014 movel %a2@(20),%sp@- 47d2a: 2f00 movel %d0,%sp@- 47d2c: 2f06 movel %d6,%sp@- 47d2e: 2f04 movel %d4,%sp@- 47d30: 4eb9 0004 c544 jsr 4c544 <_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 ) {
47d36: 4fef 0010 lea %sp@(16),%sp 47d3a: 2f04 movel %d4,%sp@- 47d3c: 4e93 jsr %a3@ 47d3e: 588f addql #4,%sp 47d40: 4a80 tstl %d0
47d42: 6734 beqs 47d78 <_Objects_Extend_information+0x1d4><== NEVER TAKEN
47d44: 2212 movel %a2@,%d1 47d46: 7e18 moveq #24,%d7
the_object->id = _Objects_Build_id(
47d48: 4286 clrl %d6 47d4a: 2040 moveal %d0,%a0 47d4c: 3c2a 0004 movew %a2@(4),%d6 47d50: efa9 lsll %d7,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d52: 1e3c 001b moveb #27,%d7
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d56: 08c1 0010 bset #16,%d1
(( (Objects_Id) the_class ) << OBJECTS_CLASS_START_BIT) |
47d5a: efae lsll %d7,%d6 47d5c: 8286 orl %d6,%d1
uint32_t the_class,
uint32_t node,
uint32_t index
)
{
return (( (Objects_Id) the_api ) << OBJECTS_API_START_BIT) |
47d5e: 8283 orl %d3,%d1
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
47d60: 5283 addql #1,%d3 47d62: 2141 0008 movel %d1,%a0@(8)
information->the_class,
_Objects_Local_node,
index
);
_Chain_Append( &information->Inactive, &the_object->Node );
47d66: 2f00 movel %d0,%sp@- 47d68: 2f05 movel %d5,%sp@- 47d6a: 4e94 jsr %a4@
index++;
47d6c: 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 ) {
47d6e: 2f04 movel %d4,%sp@- 47d70: 4e93 jsr %a3@ 47d72: 588f addql #4,%sp 47d74: 4a80 tstl %d0
47d76: 66cc bnes 47d44 <_Objects_Extend_information+0x1a0>
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47d78: 4281 clrl %d1 47d7a: 302a 0012 movew %a2@(18),%d0
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47d7e: 326a 0028 moveaw %a2@(40),%a1
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47d82: 206a 002a moveal %a2@(42),%a0 47d86: 3200 movew %d0,%d1
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
47d88: d089 addl %a1,%d0
_Chain_Append( &information->Inactive, &the_object->Node );
index++;
}
information->inactive_per_block[ block ] = information->allocation_size;
47d8a: 2181 2800 movel %d1,%a0@(00000000,%d2:l)
information->inactive =
47d8e: 3540 0028 movew %d0,%a2@(40)
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47d92: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47d98: 4e5e unlk %fp 47d9a: 4e75 rts
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47d9c: 7e01 moveq #1,%d7 47d9e: 6000 fe5e braw 47bfe <_Objects_Extend_information+0x5a>
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 );
47da2: 2f00 movel %d0,%sp@- 47da4: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error> 47daa: 588f addql #4,%sp 47dac: 2c00 movel %d0,%d6 47dae: 6000 fe82 braw 47c32 <_Objects_Extend_information+0x8e>
/*
* 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,
47db2: e58c lsll #2,%d4 47db4: 2f04 movel %d4,%sp@- 47db6: 2f2a 002e movel %a2@(46),%sp@- 47dba: 2f0c movel %a4,%sp@- 47dbc: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
47dc2: 2f04 movel %d4,%sp@- 47dc4: 2f2a 002a movel %a2@(42),%sp@- 47dc8: 2f0d movel %a5,%sp@- 47dca: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
information->local_table,
(information->maximum + minimum_index) * sizeof(Objects_Control *) );
47dd0: 4280 clrl %d0 47dd2: 302a 000e movew %a2@(14),%d0 47dd6: da80 addl %d0,%d5
information->object_blocks,
block_count * sizeof(void*) );
memcpy( inactive_per_block,
information->inactive_per_block,
block_count * sizeof(uint32_t) );
memcpy( local_table,
47dd8: e58d lsll #2,%d5 47dda: 2f05 movel %d5,%sp@- 47ddc: 2f2a 0018 movel %a2@(24),%sp@- 47de0: 2f07 movel %d7,%sp@- 47de2: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy> 47de8: 4fef 0024 lea %sp@(36),%sp 47dec: 6000 fe94 braw 47c82 <_Objects_Extend_information+0xde>
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47df0: 4280 clrl %d0
/* * Search for a free block of indexes. If we do NOT need to allocate or * extend the block table, then we will change do_extend. */ do_extend = true; minimum_index = _Objects_Get_index( information->minimum_id );
47df2: 2605 movel %d5,%d3
index_base = minimum_index; block = 0;
47df4: 4282 clrl %d2
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
block_count = 0;
47df6: 4284 clrl %d4
minimum_index = _Objects_Get_index( information->minimum_id );
index_base = minimum_index;
block = 0;
/* if ( information->maximum < minimum_index ) */
if ( information->object_blocks == NULL )
47df8: 322a 000e movew %a2@(14),%d1 47dfc: 302a 0012 movew %a2@(18),%d0
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e00: 7e01 moveq #1,%d7 47e02: 6000 fdfa braw 47bfe <_Objects_Extend_information+0x5a>
minimum_index = _Objects_Get_index( information->minimum_id );
47e06: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index; block = 0;
47e08: 4282 clrl %d2 <== NOT EXECUTED
if ( information->object_blocks == NULL )
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
47e0a: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
/*
* Search for a free block of indexes. If we do NOT need to allocate or
* extend the block table, then we will change do_extend.
*/
do_extend = true;
47e10: 7e01 moveq #1,%d7 <== NOT EXECUTED 47e12: 6000 fdea braw 47bfe <_Objects_Extend_information+0x5a><== NOT EXECUTED
minimum_index = _Objects_Get_index( information->minimum_id );
47e16: 2605 movel %d5,%d3 <== NOT EXECUTED
index_base = minimum_index; block = 0;
47e18: 4282 clrl %d2 <== NOT EXECUTED
block_count = 0;
else {
block_count = information->maximum / information->allocation_size;
for ( ; block < block_count; block++ ) {
if ( information->object_blocks[ block ] == NULL ) {
47e1a: 0280 0000 ffff andil #65535,%d0 <== NOT EXECUTED
do_extend = false;
47e20: 4207 clrb %d7 <== NOT EXECUTED 47e22: 6000 fdda braw 47bfe <_Objects_Extend_information+0x5a><== 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 );
47e26: 2f06 movel %d6,%sp@- 47e28: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free>
return;
47e2e: 588f addql #4,%sp
}
information->inactive_per_block[ block ] = information->allocation_size;
information->inactive =
(Objects_Maximum)(information->inactive + information->allocation_size);
}
47e30: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 47e36: 4e5e unlk %fp
...
00047eec <_Objects_Get_information>:
Objects_Information *_Objects_Get_information(
Objects_APIs the_api,
uint32_t the_class
)
{
47eec: 4e56 0000 linkw %fp,#0 47ef0: 2f02 movel %d2,%sp@- 47ef2: 242e 000c movel %fp@(12),%d2
Objects_Information *info;
int the_class_api_maximum;
if ( !the_class )
47ef6: 660a bnes 47f02 <_Objects_Get_information+0x16>
if ( the_class > (uint32_t) the_class_api_maximum )
return NULL;
if ( !_Objects_Information_table[ the_api ] )
return NULL;
47ef8: 4280 clrl %d0
if ( info->maximum == 0 )
return NULL;
#endif
return info;
}
47efa: 242e fffc movel %fp@(-4),%d2 47efe: 4e5e unlk %fp 47f00: 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 );
47f02: 2f2e 0008 movel %fp@(8),%sp@- 47f06: 4eb9 0004 ca8c jsr 4ca8c <_Objects_API_maximum_class>
if ( the_class_api_maximum == 0 )
47f0c: 588f addql #4,%sp 47f0e: 4a80 tstl %d0
47f10: 67e6 beqs 47ef8 <_Objects_Get_information+0xc>
return NULL;
if ( the_class > (uint32_t) the_class_api_maximum )
47f12: b082 cmpl %d2,%d0
47f14: 65e2 bcss 47ef8 <_Objects_Get_information+0xc>
return NULL;
if ( !_Objects_Information_table[ the_api ] )
47f16: 202e 0008 movel %fp@(8),%d0 47f1a: 41f9 0005 fa98 lea 5fa98 <_Objects_Information_table>,%a0 47f20: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 47f24: 4a88 tstl %a0
47f26: 67d0 beqs 47ef8 <_Objects_Get_information+0xc> <== NEVER TAKEN
return NULL;
info = _Objects_Information_table[ the_api ][ the_class ];
47f28: 2030 2c00 movel %a0@(00000000,%d2:l:4),%d0
if ( !info )
47f2c: 67cc beqs 47efa <_Objects_Get_information+0xe> <== NEVER TAKEN
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47f2e: 2040 moveal %d0,%a0 47f30: 4a68 000e tstw %a0@(14) 47f34: 56c1 sne %d1
#endif
return info;
}
47f36: 242e fffc movel %fp@(-4),%d2
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47f3a: 49c1 extbl %d1
#endif
return info;
}
47f3c: 4e5e unlk %fp
* Thus we may have 0 local instances and still have a valid object
* pointer.
*/
#if !defined(RTEMS_MULTIPROCESSING)
if ( info->maximum == 0 )
return NULL;
47f3e: c081 andl %d1,%d0
#endif
return info;
}
...
000499e4 <_Objects_Get_name_as_string>:
char *_Objects_Get_name_as_string(
Objects_Id id,
size_t length,
char *name
)
{
499e4: 4e56 ffdc linkw %fp,#-36 499e8: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 499ec: 262e 000c movel %fp@(12),%d3 499f0: 242e 0010 movel %fp@(16),%d2
char lname[5];
Objects_Control *the_object;
Objects_Locations location;
Objects_Id tmpId;
if ( length == 0 )
499f4: 4a83 tstl %d3
499f6: 660e bnes 49a06 <_Objects_Get_name_as_string+0x22>
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE:
/* not supported */
#endif
case OBJECTS_ERROR:
return NULL;
499f8: 4282 clrl %d2
_Thread_Enable_dispatch();
return name;
}
return NULL; /* unreachable path */
}
499fa: 2002 movel %d2,%d0 499fc: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49a02: 4e5e unlk %fp 49a04: 4e75 rts
Objects_Id tmpId;
if ( length == 0 )
return NULL;
if ( name == NULL )
49a06: 4a82 tstl %d2
49a08: 67f0 beqs 499fa <_Objects_Get_name_as_string+0x16>
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49a0a: 4aae 0008 tstl %fp@(8) 49a0e: 6600 009a bnew 49aaa <_Objects_Get_name_as_string+0xc6> 49a12: 2079 0006 a5a6 moveal 6a5a6 <_Per_CPU_Information+0xc>,%a0 49a18: 2828 0008 movel %a0@(8),%d4
information = _Objects_Get_information_id( tmpId );
49a1c: 2f04 movel %d4,%sp@- 49a1e: 4eb9 0004 9900 jsr 49900 <_Objects_Get_information_id>
if ( !information )
49a24: 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 );
49a26: 2440 moveal %d0,%a2
if ( !information )
49a28: 4a80 tstl %d0
49a2a: 67cc beqs 499f8 <_Objects_Get_name_as_string+0x14>
return NULL;
the_object = _Objects_Get( information, tmpId, &location );
49a2c: 486e fffc pea %fp@(-4) 49a30: 2f04 movel %d4,%sp@- 49a32: 2f00 movel %d0,%sp@- 49a34: 4eb9 0004 9ae8 jsr 49ae8 <_Objects_Get>
switch ( location ) {
49a3a: 4fef 000c lea %sp@(12),%sp 49a3e: 4aae fffc tstl %fp@(-4)
49a42: 66b4 bnes 499f8 <_Objects_Get_name_as_string+0x14>
return NULL;
case OBJECTS_LOCAL:
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
49a44: 4a2a 0032 tstb %a2@(50)
49a48: 6768 beqs 49ab2 <_Objects_Get_name_as_string+0xce>
s = the_object->name.name_p;
49a4a: 2040 moveal %d0,%a0 49a4c: 2668 000c moveal %a0@(12),%a3
lname[ 4 ] = '\0';
s = lname;
}
d = name;
if ( s ) {
49a50: 4a8b tstl %a3
49a52: 674a beqs 49a9e <_Objects_Get_name_as_string+0xba>
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a54: 5383 subql #1,%d3
49a56: 6746 beqs 49a9e <_Objects_Get_name_as_string+0xba><== NEVER TAKEN
49a58: 1013 moveb %a3@,%d0
49a5a: 6742 beqs 49a9e <_Objects_Get_name_as_string+0xba>
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
49a5c: 528b addql #1,%a3
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a5e: 2242 moveal %d2,%a1
* This method objects the name of an object and returns its name
* in the form of a C string. It attempts to be careful about
* overflowing the user's string and about returning unprintable characters.
*/
char *_Objects_Get_name_as_string(
49a60: 91c8 subal %a0,%a0
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
*d = (isprint((unsigned char)*s)) ? *s : '*';
49a62: 4281 clrl %d1 49a64: 1200 moveb %d0,%d1
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a66: 5288 addql #1,%a0
*d = (isprint((unsigned char)*s)) ? *s : '*';
49a68: 2479 0006 0cb0 moveal 60cb0 <__ctype_ptr__>,%a2 49a6e: 1232 1801 moveb %a2@(00000001,%d1:l),%d1 49a72: 49c1 extbl %d1 49a74: 0281 0000 0097 andil #151,%d1
49a7a: 6602 bnes 49a7e <_Objects_Get_name_as_string+0x9a>
49a7c: 702a moveq #42,%d0 49a7e: 12c0 moveb %d0,%a1@+
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a80: 2449 moveal %a1,%a2 49a82: b688 cmpl %a0,%d3
49a84: 6304 blss 49a8a <_Objects_Get_name_as_string+0xa6>
49a86: 101b moveb %a3@+,%d0
49a88: 66d8 bnes 49a62 <_Objects_Get_name_as_string+0x7e>
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49a8a: 4212 clrb %a2@
_Thread_Enable_dispatch();
49a8c: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch>
return name;
}
return NULL; /* unreachable path */
}
49a92: 2002 movel %d2,%d0 49a94: 4cee 0c3c ffdc moveml %fp@(-36),%d2-%d5/%a2-%a3 49a9a: 4e5e unlk %fp 49a9c: 4e75 rts
s = lname;
}
d = name;
if ( s ) {
for ( i=0 ; i<(length-1) && *s ; i++, s++, d++ ) {
49a9e: 2442 moveal %d2,%a2
*d = (isprint((unsigned char)*s)) ? *s : '*';
}
}
*d = '\0';
49aa0: 4212 clrb %a2@
_Thread_Enable_dispatch();
49aa2: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch> 49aa8: 60e8 bras 49a92 <_Objects_Get_name_as_string+0xae>
return NULL;
if ( name == NULL )
return NULL;
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
49aaa: 282e 0008 movel %fp@(8),%d4 49aae: 6000 ff6c braw 49a1c <_Objects_Get_name_as_string+0x38>
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49ab2: 2040 moveal %d0,%a0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49ab4: 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';
s = lname;
49ab6: 47ee fff7 lea %fp@(-9),%a3
if ( information->is_string ) {
s = the_object->name.name_p;
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
49aba: 2028 000c movel %a0@(12),%d0
lname[ 0 ] = (u32_name >> 24) & 0xff;
49abe: 2a00 movel %d0,%d5 49ac0: e2ad lsrl %d1,%d5
lname[ 1 ] = (u32_name >> 16) & 0xff;
lname[ 2 ] = (u32_name >> 8) & 0xff;
49ac2: 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;
49ac4: 2800 movel %d0,%d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
49ac6: e089 lsrl #8,%d1
lname[ 3 ] = (u32_name >> 0) & 0xff;
49ac8: 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;
49acc: 4244 clrw %d4 49ace: 4844 swap %d4
lname[ 2 ] = (u32_name >> 8) & 0xff;
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49ad0: 4200 clrb %d0
} else
#endif
{
uint32_t u32_name = (uint32_t) the_object->name.name_u32;
lname[ 0 ] = (u32_name >> 24) & 0xff;
49ad2: 1d45 fff7 moveb %d5,%fp@(-9)
lname[ 1 ] = (u32_name >> 16) & 0xff;
49ad6: 1d44 fff8 moveb %d4,%fp@(-8)
lname[ 2 ] = (u32_name >> 8) & 0xff;
49ada: 1d41 fff9 moveb %d1,%fp@(-7)
lname[ 3 ] = (u32_name >> 0) & 0xff;
lname[ 4 ] = '\0';
49ade: 1d40 fffb moveb %d0,%fp@(-5) 49ae2: 6000 ff70 braw 49a54 <_Objects_Get_name_as_string+0x70>
...
0005bc00 <_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;
5bc00: 7001 moveq #1,%d0
if ( information->maximum >= index ) {
5bc02: 4281 clrl %d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bc04: 4e56 0000 linkw %fp,#0 5bc08: 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;
5bc0c: 90a8 0006 subl %a0@(6),%d0 5bc10: d0ae 000c addl %fp@(12),%d0
if ( information->maximum >= index ) {
5bc14: 3228 000e movew %a0@(14),%d1
Objects_Control *_Objects_Get_no_protection(
Objects_Information *information,
Objects_Id id,
Objects_Locations *location
)
{
5bc18: 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 ) {
5bc1c: b280 cmpl %d0,%d1
5bc1e: 6510 bcss 5bc30 <_Objects_Get_no_protection+0x30>
if ( (the_object = information->local_table[ index ]) != NULL ) {
5bc20: 2068 0018 moveal %a0@(24),%a0 5bc24: 2030 0c00 movel %a0@(00000000,%d0:l:4),%d0
5bc28: 6706 beqs 5bc30 <_Objects_Get_no_protection+0x30><== NEVER TAKEN
*location = OBJECTS_LOCAL;
5bc2a: 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; }
5bc2c: 4e5e unlk %fp 5bc2e: 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;
5bc30: 7001 moveq #1,%d0
return NULL; }
5bc32: 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;
5bc34: 2280 movel %d0,%a1@
return NULL;
5bc36: 4280 clrl %d0
}
...
00049700 <_Objects_Id_to_name>:
*/
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
Objects_Name *name
)
{
49700: 4e56 fffc linkw %fp,#-4 49704: 222e 0008 movel %fp@(8),%d1 49708: 2f02 movel %d2,%sp@-
/*
* Caller is trusted for name != NULL.
*/
tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id;
4970a: 4a81 tstl %d1
4970c: 660a bnes 49718 <_Objects_Id_to_name+0x18>
4970e: 2079 0006 1c44 moveal 61c44 <_Per_CPU_Information+0xc>,%a0 49714: 2228 0008 movel %a0@(8),%d1 49718: 7418 moveq #24,%d2 4971a: 2001 movel %d1,%d0 4971c: e4a8 lsrl %d2,%d0 4971e: 143c 0007 moveb #7,%d2 49722: c082 andl %d2,%d0
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
49724: 143c 0002 moveb #2,%d2 49728: 2040 moveal %d0,%a0 4972a: 5388 subql #1,%a0 4972c: b488 cmpl %a0,%d2
4972e: 6522 bcss 49752 <_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 ] )
49730: 41f9 0006 1770 lea 61770 <_Objects_Information_table>,%a0 49736: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0 4973a: 4a88 tstl %a0
4973c: 6714 beqs 49752 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
4973e: 2001 movel %d1,%d0 49740: 741b moveq #27,%d2 49742: e4a8 lsrl %d2,%d0
return OBJECTS_INVALID_ID;
the_class = _Objects_Get_class( tmpId );
information = _Objects_Information_table[ the_api ][ the_class ];
49744: 2070 0c00 moveal %a0@(00000000,%d0:l:4),%a0
if ( !information )
49748: 4a88 tstl %a0
4974a: 6706 beqs 49752 <_Objects_Id_to_name+0x52> <== NEVER TAKEN
return OBJECTS_INVALID_ID;
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string )
4974c: 4a28 0032 tstb %a0@(50)
49750: 670a beqs 4975c <_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;
}
49752: 242e fff8 movel %fp@(-8),%d2
the_api = _Objects_Get_API( tmpId );
if ( !_Objects_Is_api_valid( the_api ) )
return OBJECTS_INVALID_ID;
if ( !_Objects_Information_table[ the_api ] )
return OBJECTS_INVALID_ID;
49756: 7003 moveq #3,%d0
return OBJECTS_INVALID_ID;
*name = the_object->name;
_Thread_Enable_dispatch();
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL;
}
49758: 4e5e unlk %fp 4975a: 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 );
4975c: 486e fffc pea %fp@(-4) 49760: 2f01 movel %d1,%sp@- 49762: 2f08 movel %a0,%sp@- 49764: 4eb9 0004 9694 jsr 49694 <_Objects_Get>
if ( !the_object )
4976a: 4fef 000c lea %sp@(12),%sp 4976e: 4a80 tstl %d0
49770: 67e0 beqs 49752 <_Objects_Id_to_name+0x52>
return OBJECTS_INVALID_ID;
*name = the_object->name;
49772: 206e 000c moveal %fp@(12),%a0 49776: 2240 moveal %d0,%a1 49778: 20a9 000c movel %a1@(12),%a0@
_Thread_Enable_dispatch();
4977c: 4eb9 0004 a02a jsr 4a02a <_Thread_Enable_dispatch>
return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; }
49782: 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;
49786: 4280 clrl %d0
}
49788: 4e5e unlk %fp <== NOT EXECUTED
00048558 <_Objects_Set_name>:
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
48558: 4280 clrl %d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
4855a: 4e56 fff0 linkw %fp,#-16 4855e: 48d7 3c00 moveml %a2-%a5,%sp@ 48562: 286e 0008 moveal %fp@(8),%a4
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
48566: 302c 0034 movew %a4@(52),%d0
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
4856a: 246e 0010 moveal %fp@(16),%a2
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
4856e: 2f00 movel %d0,%sp@-
bool _Objects_Set_name(
Objects_Information *information,
Objects_Control *the_object,
const char *name
)
{
48570: 2a6e 000c moveal %fp@(12),%a5
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
48574: 2f0a movel %a2,%sp@- 48576: 4eb9 0005 0744 jsr 50744 <strnlen>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
4857c: 508f addql #8,%sp
{
size_t length;
const char *s;
s = name;
length = strnlen( name, information->name_length );
4857e: 2640 moveal %d0,%a3
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
48580: 4a2c 0032 tstb %a4@(50)
48584: 6662 bnes 485e8 <_Objects_Set_name+0x90>
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
48586: 7018 moveq #24,%d0 48588: 1212 moveb %a2@,%d1 4858a: 49c1 extbl %d1 4858c: e1a9 lsll %d0,%d1 4858e: 103c 0001 moveb #1,%d0 48592: b08b cmpl %a3,%d0
48594: 643c bccs 485d2 <_Objects_Set_name+0x7a>
48596: 102a 0001 moveb %a2@(1),%d0 4859a: 49c0 extbl %d0 4859c: 4840 swap %d0 4859e: 4240 clrw %d0 485a0: 8081 orl %d1,%d0 485a2: 7202 moveq #2,%d1 485a4: b28b cmpl %a3,%d1
485a6: 6730 beqs 485d8 <_Objects_Set_name+0x80>
485a8: 122a 0002 moveb %a2@(2),%d1 485ac: 49c1 extbl %d1 485ae: e189 lsll #8,%d1 485b0: 8081 orl %d1,%d0 485b2: 7203 moveq #3,%d1 485b4: b28b cmpl %a3,%d1 485b6: 6700 0088 beqw 48640 <_Objects_Set_name+0xe8> 485ba: 122a 0003 moveb %a2@(3),%d1 485be: 49c1 extbl %d1 485c0: 8081 orl %d1,%d0 485c2: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
485c6: 7001 moveq #1,%d0
}
485c8: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 485ce: 4e5e unlk %fp 485d0: 4e75 rts
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
485d2: 2001 movel %d1,%d0 485d4: 08c0 0015 bset #21,%d0 485d8: 7220 moveq #32,%d1 485da: 08c0 000d bset #13,%d0 485de: 8081 orl %d1,%d0 485e0: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
485e4: 7001 moveq #1,%d0 485e6: 60e0 bras 485c8 <_Objects_Set_name+0x70>
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
485e8: 486b 0001 pea %a3@(1) 485ec: 4eb9 0004 a202 jsr 4a202 <_Workspace_Allocate>
if ( !d )
485f2: 588f addql #4,%sp
#if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES)
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
485f4: 2840 moveal %d0,%a4
if ( !d )
485f6: 4a80 tstl %d0
485f8: 673a beqs 48634 <_Objects_Set_name+0xdc> <== NEVER TAKEN
return false;
if ( the_object->name.name_p ) {
485fa: 202d 000c movel %a5@(12),%d0
485fe: 670e beqs 4860e <_Objects_Set_name+0xb6>
_Workspace_Free( (void *)the_object->name.name_p );
48600: 2f00 movel %d0,%sp@- 48602: 4eb9 0004 a21e jsr 4a21e <_Workspace_Free>
the_object->name.name_p = NULL;
48608: 588f addql #4,%sp 4860a: 42ad 000c clrl %a5@(12)
}
strncpy( d, name, length );
4860e: 2f0b movel %a3,%sp@- 48610: 2f0a movel %a2,%sp@- 48612: 2f0c movel %a4,%sp@- 48614: 4eb9 0005 06c0 jsr 506c0 <strncpy>
d[length] = '\0';
the_object->name.name_p = d;
4861a: 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';
4861e: 4200 clrb %d0 48620: 1980 b800 moveb %d0,%a4@(00000000,%a3:l)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
48624: 7001 moveq #1,%d0
the_object->name.name_p = NULL;
}
strncpy( d, name, length );
d[length] = '\0';
the_object->name.name_p = d;
48626: 2b4c 000c movel %a4,%a5@(12)
);
}
return true;
}
4862a: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 48630: 4e5e unlk %fp 48632: 4e75 rts
48634: 4cee 3c00 fff0 moveml %fp@(-16),%a2-%a5 <== NOT EXECUTED
if ( information->is_string ) {
char *d;
d = _Workspace_Allocate( length + 1 );
if ( !d )
return false;
4863a: 4200 clrb %d0 <== NOT EXECUTED
);
}
return true;
}
4863c: 4e5e unlk %fp <== NOT EXECUTED 4863e: 4e75 rts <== NOT EXECUTED
d[length] = '\0';
the_object->name.name_p = d;
} else
#endif
{
the_object->name.name_u32 = _Objects_Build_name(
48640: 7220 moveq #32,%d1 48642: 8081 orl %d1,%d0 48644: 2b40 000c movel %d0,%a5@(12)
((3 < length) ? s[ 3 ] : ' ')
);
}
return true;
48648: 7001 moveq #1,%d0 4864a: 6000 ff7c braw 485c8 <_Objects_Set_name+0x70>
...
000481d0 <_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) /
481d0: 4281 clrl %d1
*/
void _Objects_Shrink_information(
Objects_Information *information
)
{
481d2: 4e56 ffec linkw %fp,#-20 481d6: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 481da: 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 );
481de: 4283 clrl %d3
block_count = (information->maximum - index_base) /
481e0: 4284 clrl %d4
/*
* Search the list to find block or chunk with all objects inactive.
*/
index_base = _Objects_Get_index( information->minimum_id );
481e2: 362a 0008 movew %a2@(8),%d3
block_count = (information->maximum - index_base) /
481e6: 382a 000e movew %a2@(14),%d4 481ea: 322a 0012 movew %a2@(18),%d1 481ee: 9883 subl %d3,%d4 481f0: 4c41 4004 remul %d1,%d4,%d4
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
481f4: 6774 beqs 4826a <_Objects_Shrink_information+0x9a><== NEVER TAKEN
if ( information->inactive_per_block[ block ] ==
481f6: 206a 002a moveal %a2@(42),%a0 481fa: b290 cmpl %a0@,%d1
481fc: 677e beqs 4827c <_Objects_Shrink_information+0xac><== NEVER TAKEN
* the_block - the block to remove
*
* Output parameters: NONE
*/
void _Objects_Shrink_information(
481fe: 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++ ) {
48200: 4280 clrl %d0 48202: 5280 addql #1,%d0
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
48204: d681 addl %d1,%d3
index_base = _Objects_Get_index( information->minimum_id );
block_count = (information->maximum - index_base) /
information->allocation_size;
for ( block = 0; block < block_count; block++ ) {
48206: b084 cmpl %d4,%d0
48208: 6460 bccs 4826a <_Objects_Shrink_information+0x9a>
information->inactive -= information->allocation_size;
return;
}
index_base += information->allocation_size;
4820a: 2400 movel %d0,%d2 4820c: e58a lsll #2,%d2
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 ] ==
4820e: b298 cmpl %a0@+,%d1
48210: 66f0 bnes 48202 <_Objects_Shrink_information+0x32>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
48212: 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 );
48216: 47f9 0004 70d0 lea 470d0 <_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 );
4821c: 4280 clrl %d0 4821e: 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;
48222: 2810 movel %a0@,%d4
if ((index >= index_base) &&
48224: b680 cmpl %d0,%d3
48226: 620c bhis 48234 <_Objects_Shrink_information+0x64>
(index < (index_base + information->allocation_size))) {
48228: 4281 clrl %d1 4822a: 322a 0012 movew %a2@(18),%d1 4822e: d283 addl %d3,%d1
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
if ((index >= index_base) &&
48230: b280 cmpl %d0,%d1
48232: 6240 bhis 48274 <_Objects_Shrink_information+0xa4>
(index < (index_base + information->allocation_size))) {
_Chain_Extract( &extract_me->Node );
}
}
while ( the_object );
48234: 4a84 tstl %d4
48236: 6704 beqs 4823c <_Objects_Shrink_information+0x6c>
index = _Objects_Get_index( the_object->id );
/*
* Get the next node before the node is extracted
*/
extract_me = the_object;
the_object = (Objects_Control *) the_object->Node.next;
48238: 2044 moveal %d4,%a0 4823a: 60e0 bras 4821c <_Objects_Shrink_information+0x4c>
while ( the_object );
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
4823c: 206a 002e moveal %a2@(46),%a0 48240: 2f30 2800 movel %a0@(00000000,%d2:l),%sp@- 48244: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free>
information->object_blocks[ block ] = NULL;
4824a: 206a 002e moveal %a2@(46),%a0
information->inactive_per_block[ block ] = 0;
information->inactive -= information->allocation_size;
return;
4824e: 588f addql #4,%sp
/*
* Free the memory and reset the structures in the object' information
*/
_Workspace_Free( information->object_blocks[ block ] );
information->object_blocks[ block ] = NULL;
48250: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive_per_block[ block ] = 0;
48254: 206a 002a moveal %a2@(42),%a0
information->inactive -= information->allocation_size;
48258: 302a 0028 movew %a2@(40),%d0 4825c: 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;
48260: 42b0 2800 clrl %a0@(00000000,%d2:l)
information->inactive -= information->allocation_size;
48264: 9081 subl %d1,%d0 48266: 3540 0028 movew %d0,%a2@(40)
return;
}
index_base += information->allocation_size;
}
}
4826a: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 48270: 4e5e unlk %fp 48272: 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 );
48274: 2f08 movel %a0,%sp@- 48276: 4e93 jsr %a3@ 48278: 588f addql #4,%sp 4827a: 60b8 bras 48234 <_Objects_Shrink_information+0x64>
information->allocation_size ) {
/*
* Assume the Inactive chain is never empty at this point
*/
the_object = (Objects_Control *) information->Inactive.first;
4827c: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
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 ] ==
48280: 4282 clrl %d2 <== NOT EXECUTED
*/
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 );
48282: 47f9 0004 70d0 lea 470d0 <_Chain_Extract>,%a3 <== NOT EXECUTED 48288: 6092 bras 4821c <_Objects_Shrink_information+0x4c><== NOT EXECUTED
...
000474f4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
474f4: 4e56 ffe8 linkw %fp,#-24 474f8: 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 ) ) {
474fc: 240e movel %fp,%d2 474fe: 5982 subql #4,%d2
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
47500: 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 ) ) {
47504: 2f02 movel %d2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
47506: 266e 0008 moveal %fp@(8),%a3
register POSIX_Condition_variables_Control *the_cond;
Objects_Locations location;
int status;
int mutex_status;
if ( !_POSIX_Mutex_Get( mutex, &location ) ) {
4750a: 2f0a movel %a2,%sp@-
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
4750c: 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 ) ) {
47510: 4eb9 0004 766c jsr 4766c <_POSIX_Mutex_Get> 47516: 508f addql #8,%sp 47518: 4a80 tstl %d0
4751a: 6764 beqs 47580 <_POSIX_Condition_variables_Wait_support+0x8c>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4751c: 2039 0006 252c movel 6252c <_Thread_Dispatch_disable_level>,%d0 47522: 5380 subql #1,%d0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
47524: 2f02 movel %d2,%sp@- 47526: 23c0 0006 252c movel %d0,6252c <_Thread_Dispatch_disable_level> 4752c: 2f0b movel %a3,%sp@- 4752e: 4eb9 0004 72dc jsr 472dc <_POSIX_Condition_variables_Get>
switch ( location ) {
47534: 508f addql #8,%sp
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
47536: 2840 moveal %d0,%a4
switch ( location ) {
47538: 4aae fffc tstl %fp@(-4)
4753c: 6642 bnes 47580 <_POSIX_Condition_variables_Wait_support+0x8c>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
4753e: 202c 0014 movel %a4@(20),%d0
47542: 6718 beqs 4755c <_POSIX_Condition_variables_Wait_support+0x68>
47544: b092 cmpl %a2@,%d0
47546: 6714 beqs 4755c <_POSIX_Condition_variables_Wait_support+0x68>
_Thread_Enable_dispatch();
47548: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch>
return EINVAL;
4754e: 7416 moveq #22,%d2
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47550: 2002 movel %d2,%d0 47552: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 47558: 4e5e unlk %fp 4755a: 4e75 rts
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
_Thread_Enable_dispatch();
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
4755c: 2f0a movel %a2,%sp@- 4755e: 4eb9 0004 793c jsr 4793c <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
47564: 588f addql #4,%sp 47566: 4a03 tstb %d3
47568: 6724 beqs 4758e <_POSIX_Condition_variables_Wait_support+0x9a>
status = _Thread_Executing->Wait.return_code;
if ( status && status != ETIMEDOUT )
return status;
} else {
_Thread_Enable_dispatch();
4756a: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch>
status = ETIMEDOUT;
47570: 7474 moveq #116,%d2
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
47572: 2f0a movel %a2,%sp@- 47574: 4eb9 0004 78a0 jsr 478a0 <pthread_mutex_lock>
if ( mutex_status )
4757a: 588f addql #4,%sp 4757c: 4a80 tstl %d0
4757e: 67d0 beqs 47550 <_POSIX_Condition_variables_Wait_support+0x5c>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
47580: 7416 moveq #22,%d2
}
47582: 2002 movel %d2,%d0 47584: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4758a: 4e5e unlk %fp 4758c: 4e75 rts
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
4758e: 2952 0014 movel %a2@,%a4@(20)
RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section (
Thread_queue_Control *the_thread_queue
)
{
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
47592: 7201 moveq #1,%d1
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
47594: 200c movel %a4,%d0 47596: 0680 0000 0018 addil #24,%d0 4759c: 2941 0048 movel %d1,%a4@(72)
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
475a0: 2079 0006 29bc moveal 629bc <_Per_CPU_Information+0xc>,%a0 475a6: 42a8 0034 clrl %a0@(52)
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
475aa: 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;
475ae: 2140 0044 movel %d0,%a0@(68)
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
475b2: 4879 0004 b3f0 pea 4b3f0 <_Thread_queue_Timeout> 475b8: 2f2e 0010 movel %fp@(16),%sp@- 475bc: 2f00 movel %d0,%sp@- 475be: 4eb9 0004 afc0 jsr 4afc0 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
475c4: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
475ca: 2079 0006 29bc moveal 629bc <_Per_CPU_Information+0xc>,%a0
if ( status && status != ETIMEDOUT )
475d0: 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;
475d4: 2428 0034 movel %a0@(52),%d2
if ( status && status != ETIMEDOUT )
475d8: 6798 beqs 47572 <_POSIX_Condition_variables_Wait_support+0x7e>
475da: 7074 moveq #116,%d0 475dc: b082 cmpl %d2,%d0
475de: 6792 beqs 47572 <_POSIX_Condition_variables_Wait_support+0x7e><== ALWAYS TAKEN
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
475e0: 2002 movel %d2,%d0 <== NOT EXECUTED 475e2: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 475e8: 4e5e unlk %fp <== NOT EXECUTED
0004e18c <_POSIX_Keys_Run_destructors>:
4e18c: 7018 moveq #24,%d0
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4e18e: 4e56 ffe8 linkw %fp,#-24
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
4e192: 206e 0008 moveal %fp@(8),%a0
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
4e196: 48d7 047c moveml %d2-%d6/%a2,%sp@
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
4e19a: 2628 0008 movel %a0@(8),%d3 4e19e: 2803 movel %d3,%d4 4e1a0: e0ac lsrl %d0,%d4 4e1a2: 103c 0007 moveb #7,%d0
thread_api = _Objects_Get_API( thread->Object.id );
iterations = 0;
4e1a6: 4286 clrl %d6
uint32_t iterations;
bool are_all_null;
POSIX_Keys_Control *the_key;
void *value;
thread_index = _Objects_Get_index( thread->Object.id );
4e1a8: 0283 0000 ffff andil #65535,%d3 4e1ae: c880 andl %d0,%d4 4e1b0: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1
if ( !the_key )
continue;
if ( !the_key->destructor )
continue;
value = the_key->Values[ thread_api ][ thread_index ];
4e1b6: e58b lsll #2,%d3 4e1b8: 5a84 addql #5,%d4
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
4e1ba: 4a41 tstw %d1
4e1bc: 6752 beqs 4e210 <_POSIX_Keys_Run_destructors+0x84>
4e1be: 7401 moveq #1,%d2 4e1c0: 7a01 moveq #1,%d5
the_key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table[ index ];
4e1c2: 2079 0005 fe6a moveal 5fe6a <_POSIX_Keys_Information+0x18>,%a0
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
the_key = (POSIX_Keys_Control *)
4e1c8: 2470 2c00 moveal %a0@(00000000,%d2:l:4),%a2
_POSIX_Keys_Information.local_table[ index ];
if ( !the_key )
4e1cc: 4a8a tstl %a2
4e1ce: 672a beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e>
continue;
if ( !the_key->destructor )
4e1d0: 206a 0010 moveal %a2@(16),%a0 4e1d4: 4a88 tstl %a0
4e1d6: 6722 beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e>
continue;
value = the_key->Values[ thread_api ][ thread_index ];
4e1d8: 2272 4c00 moveal %a2@(00000000,%d4:l:4),%a1 4e1dc: 2031 3800 movel %a1@(00000000,%d3:l),%d0
if ( value ) {
4e1e0: 6718 beqs 4e1fa <_POSIX_Keys_Run_destructors+0x6e>
(*the_key->destructor)( value );
4e1e2: 2f00 movel %d0,%sp@- 4e1e4: 4e90 jsr %a0@
if ( the_key->Values[ thread_api ][ thread_index ] )
4e1e6: 588f addql #4,%sp 4e1e8: 2072 4c00 moveal %a2@(00000000,%d4:l:4),%a0 4e1ec: 4ab0 3800 tstl %a0@(00000000,%d3:l)
4e1f0: 6728 beqs 4e21a <_POSIX_Keys_Run_destructors+0x8e>
4e1f2: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1
are_all_null = false;
4e1f8: 4205 clrb %d5
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
4e1fa: 4280 clrl %d0 4e1fc: 5282 addql #1,%d2 4e1fe: 3001 movew %d1,%d0 4e200: b480 cmpl %d0,%d2
4e202: 63be blss 4e1c2 <_POSIX_Keys_Run_destructors+0x36>
if ( the_key->Values[ thread_api ][ thread_index ] )
are_all_null = false;
}
}
if ( are_all_null == true )
4e204: 4a05 tstb %d5
4e206: 6608 bnes 4e210 <_POSIX_Keys_Run_destructors+0x84>
return;
iterations++;
4e208: 5286 addql #1,%d6
* loop. It seems rude to unnecessarily lock up a system.
*
* Reference: 17.1.1.2 P1003.1c/Draft 10, p. 163, line 99.
*/
if ( iterations >= PTHREAD_DESTRUCTOR_ITERATIONS )
4e20a: 7004 moveq #4,%d0 4e20c: b086 cmpl %d6,%d0
4e20e: 66aa bnes 4e1ba <_POSIX_Keys_Run_destructors+0x2e>
return;
}
}
4e210: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4e216: 4e5e unlk %fp 4e218: 4e75 rts
for ( ; ; ) {
are_all_null = true;
for ( index=1 ; index <= _POSIX_Keys_Information.maximum ; index++ ) {
4e21a: 4280 clrl %d0 4e21c: 5282 addql #1,%d2 4e21e: 3239 0005 fe60 movew 5fe60 <_POSIX_Keys_Information+0xe>,%d1 4e224: 3001 movew %d1,%d0 4e226: b480 cmpl %d0,%d2
4e228: 6398 blss 4e1c2 <_POSIX_Keys_Run_destructors+0x36><== NEVER TAKEN
4e22a: 60d8 bras 4e204 <_POSIX_Keys_Run_destructors+0x78>
0004c390 <_POSIX_Message_queue_Receive_support>:
size_t msg_len,
unsigned int *msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c390: 4e56 ffe4 linkw %fp,#-28 4c394: 48d7 043c moveml %d2-%d5/%a2,%sp@
RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control_fd *_POSIX_Message_queue_Get_fd (
mqd_t id,
Objects_Locations *location
)
{
return (POSIX_Message_queue_Control_fd *) _Objects_Get(
4c398: 486e fffc pea %fp@(-4) 4c39c: 242e 0008 movel %fp@(8),%d2 4c3a0: 2f02 movel %d2,%sp@- 4c3a2: 4879 0006 9c56 pea 69c56 <_POSIX_Message_queue_Information_fds> 4c3a8: 162e 001b moveb %fp@(27),%d3 4c3ac: 4eb9 0004 f84c jsr 4f84c <_Objects_Get>
Objects_Locations location;
size_t length_out;
bool do_wait;
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c3b2: 4fef 000c lea %sp@(12),%sp 4c3b6: 4aae fffc tstl %fp@(-4)
4c3ba: 671a beqs 4c3d6 <_POSIX_Message_queue_Receive_support+0x46>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c3bc: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c3c2: 72ff moveq #-1,%d1 4c3c4: 2040 moveal %d0,%a0 4c3c6: 7009 moveq #9,%d0
}
4c3c8: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c3ce: 2080 movel %d0,%a0@
}
4c3d0: 2001 movel %d1,%d0 4c3d2: 4e5e unlk %fp 4c3d4: 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 ) {
4c3d6: 2040 moveal %d0,%a0 4c3d8: 7803 moveq #3,%d4 4c3da: 7a01 moveq #1,%d5 4c3dc: 2228 0014 movel %a0@(20),%d1 4c3e0: c881 andl %d1,%d4 4c3e2: ba84 cmpl %d4,%d5 4c3e4: 6700 00f0 beqw 4c4d6 <_POSIX_Message_queue_Receive_support+0x146>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c3e8: 2240 moveal %d0,%a1
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4c3ea: 202e 0010 movel %fp@(16),%d0
if ( (the_mq_fd->oflag & O_ACCMODE) == O_WRONLY ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c3ee: 2069 0010 moveal %a1@(16),%a0
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
4c3f2: b0a8 0066 cmpl %a0@(102),%d0 4c3f6: 6500 0094 bcsw 4c48c <_POSIX_Message_queue_Receive_support+0xfc>
/*
* Now if something goes wrong, we return a "length" of -1
* to indicate an error.
*/
length_out = -1;
4c3fa: 70ff moveq #-1,%d0 4c3fc: 2d40 fff8 movel %d0,%fp@(-8)
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c400: 4a03 tstb %d3
4c402: 6756 beqs 4c45a <_POSIX_Message_queue_Receive_support+0xca><== NEVER TAKEN
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c404: 2f2e 001c movel %fp@(28),%sp@-
length_out = -1;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c408: 0801 000e btst #14,%d1 4c40c: 57c0 seq %d0 4c40e: 49c0 extbl %d0 4c410: 4480 negl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c412: 2f00 movel %d0,%sp@- 4c414: 486e fff8 pea %fp@(-8) 4c418: 2f2e 000c movel %fp@(12),%sp@- 4c41c: 2f02 movel %d2,%sp@- 4c41e: 4868 001a pea %a0@(26) 4c422: 4eb9 0004 e73c jsr 4e73c <_CORE_message_queue_Seize>
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c428: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c42e: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0
RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
CORE_message_queue_Submit_types priority
)
{
/* absolute value without a library dependency */
return ((priority >= 0) ? priority : -priority);
4c434: 2028 0024 movel %a0@(36),%d0
4c438: 6d4e blts 4c488 <_POSIX_Message_queue_Receive_support+0xf8>
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c43a: 226e 0014 moveal %fp@(20),%a1
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
4c43e: 4fef 0018 lea %sp@(24),%sp
do_wait,
timeout
);
_Thread_Enable_dispatch();
*msg_prio =
4c442: 2280 movel %d0,%a1@
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
if ( !_Thread_Executing->Wait.return_code )
4c444: 4aa8 0034 tstl %a0@(52)
4c448: 6662 bnes 4c4ac <_POSIX_Message_queue_Receive_support+0x11c>
return length_out;
4c44a: 222e fff8 movel %fp@(-8),%d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c44e: 2001 movel %d1,%d0 4c450: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c456: 4e5e unlk %fp 4c458: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c45a: 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 )
4c45e: 4280 clrl %d0 <== NOT EXECUTED
do_wait = wait;
/*
* Now perform the actual message receive
*/
_CORE_message_queue_Seize(
4c460: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4c462: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 4c466: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 4c46a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4c46c: 4868 001a pea %a0@(26) <== NOT EXECUTED 4c470: 4eb9 0004 e73c jsr 4e73c <_CORE_message_queue_Seize> <== NOT EXECUTED
&length_out,
do_wait,
timeout
);
_Thread_Enable_dispatch();
4c476: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch> <== NOT EXECUTED
*msg_prio =
_POSIX_Message_queue_Priority_from_core(_Thread_Executing->Wait.count);
4c47c: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 <== NOT EXECUTED 4c482: 2028 0024 movel %a0@(36),%d0 <== NOT EXECUTED 4c486: 6cb2 bges 4c43a <_POSIX_Message_queue_Receive_support+0xaa><== NOT EXECUTED
4c488: 4480 negl %d0 4c48a: 60ae bras 4c43a <_POSIX_Message_queue_Receive_support+0xaa>
}
the_mq = the_mq_fd->Queue;
if ( msg_len < the_mq->Message_queue.maximum_message_size ) {
_Thread_Enable_dispatch();
4c48c: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EMSGSIZE );
4c492: 747a moveq #122,%d2 4c494: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c49a: 72ff moveq #-1,%d1 4c49c: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c49e: 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 );
4c4a0: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4a2: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4a8: 4e5e unlk %fp 4c4aa: 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(
4c4ac: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c4b2: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 4c4b8: 2440 moveal %d0,%a2 4c4ba: 2f28 0034 movel %a0@(52),%sp@- 4c4be: 4eb9 0004 c78c jsr 4c78c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c4c4: 588f addql #4,%sp 4c4c6: 72ff moveq #-1,%d1 4c4c8: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4ca: 2001 movel %d1,%d0 4c4cc: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4d2: 4e5e unlk %fp 4c4d4: 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();
4c4d6: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c4dc: 7609 moveq #9,%d3 4c4de: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c4e4: 72ff moveq #-1,%d1 4c4e6: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4e8: 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 );
4c4ea: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c4ec: 4cee 043c ffe4 moveml %fp@(-28),%d2-%d5/%a2 4c4f2: 4e5e unlk %fp
...
0004c51c <_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 )
4c51c: 7020 moveq #32,%d0
size_t msg_len,
uint32_t msg_prio,
bool wait,
Watchdog_Interval timeout
)
{
4c51e: 4e56 ffe8 linkw %fp,#-24 4c522: 48d7 043c moveml %d2-%d5/%a2,%sp@ 4c526: 262e 0008 movel %fp@(8),%d3 4c52a: 242e 0014 movel %fp@(20),%d2 4c52e: 182e 001b moveb %fp@(27),%d4
/*
* Validate the priority.
* XXX - Do not validate msg_prio is not less than 0.
*/
if ( msg_prio > MQ_PRIO_MAX )
4c532: b082 cmpl %d2,%d0 4c534: 6500 00e2 bcsw 4c618 <_POSIX_Message_queue_Send_support+0xfc>
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(
4c538: 486e fffc pea %fp@(-4) 4c53c: 2f03 movel %d3,%sp@- 4c53e: 4879 0006 9c56 pea 69c56 <_POSIX_Message_queue_Information_fds> 4c544: 4eb9 0004 f84c jsr 4f84c <_Objects_Get>
rtems_set_errno_and_return_minus_one( EINVAL );
the_mq_fd = _POSIX_Message_queue_Get_fd( mqdes, &location );
switch ( location ) {
4c54a: 4fef 000c lea %sp@(12),%sp 4c54e: 4aae fffc tstl %fp@(-4) 4c552: 6600 00aa bnew 4c5fe <_POSIX_Message_queue_Send_support+0xe2>
case OBJECTS_LOCAL:
if ( (the_mq_fd->oflag & O_ACCMODE) == O_RDONLY ) {
4c556: 2240 moveal %d0,%a1 4c558: 7a03 moveq #3,%d5 4c55a: 2229 0014 movel %a1@(20),%d1 4c55e: ca81 andl %d1,%d5 4c560: 6700 00d0 beqw 4c632 <_POSIX_Message_queue_Send_support+0x116>
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EBADF );
}
the_mq = the_mq_fd->Queue;
4c564: 2240 moveal %d0,%a1 4c566: 2069 0010 moveal %a1@(16),%a0
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c56a: 4a04 tstb %d4
4c56c: 6750 beqs 4c5be <_POSIX_Message_queue_Send_support+0xa2>
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c56e: 2f2e 001c movel %fp@(28),%sp@- 4c572: 4482 negl %d2
the_mq = the_mq_fd->Queue;
/*
* A timed receive with a bad time will do a poll regardless.
*/
if ( wait )
4c574: 0801 000e btst #14,%d1 4c578: 57c0 seq %d0 4c57a: 49c0 extbl %d0 4c57c: 4480 negl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c57e: 2f00 movel %d0,%sp@- 4c580: 2f02 movel %d2,%sp@- 4c582: 42a7 clrl %sp@- 4c584: 2f03 movel %d3,%sp@- 4c586: 2f2e 0010 movel %fp@(16),%sp@- 4c58a: 2f2e 000c movel %fp@(12),%sp@- 4c58e: 4868 001a pea %a0@(26) 4c592: 4eb9 0004 e874 jsr 4e874 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c598: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c59c: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c59e: 4eb9 0005 015e jsr 5015e <_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 )
4c5a4: 7007 moveq #7,%d0 4c5a6: b082 cmpl %d2,%d0
4c5a8: 6748 beqs 4c5f2 <_POSIX_Message_queue_Send_support+0xd6>
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
4c5aa: 4a82 tstl %d2 4c5ac: 6600 00a4 bnew 4c652 <_POSIX_Message_queue_Send_support+0x136>
return msg_status;
4c5b0: 4281 clrl %d1
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c5b2: 2001 movel %d1,%d0 4c5b4: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c5ba: 4e5e unlk %fp 4c5bc: 4e75 rts
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5be: 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 )
4c5c2: 4280 clrl %d0
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5c4: 4482 negl %d2 4c5c6: 2f00 movel %d0,%sp@- 4c5c8: 2f02 movel %d2,%sp@- 4c5ca: 42a7 clrl %sp@- 4c5cc: 2f03 movel %d3,%sp@- 4c5ce: 2f2e 0010 movel %fp@(16),%sp@- 4c5d2: 2f2e 000c movel %fp@(12),%sp@- 4c5d6: 4868 001a pea %a0@(26) 4c5da: 4eb9 0004 e874 jsr 4e874 <_CORE_message_queue_Submit>
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c5e0: 4fef 0020 lea %sp@(32),%sp
do_wait = wait;
/*
* Now perform the actual message receive
*/
msg_status = _CORE_message_queue_Submit(
4c5e4: 2400 movel %d0,%d2
_POSIX_Message_queue_Priority_to_core( msg_prio ),
do_wait,
timeout /* no timeout */
);
_Thread_Enable_dispatch();
4c5e6: 4eb9 0005 015e jsr 5015e <_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 )
4c5ec: 7007 moveq #7,%d0 4c5ee: b082 cmpl %d2,%d0
4c5f0: 66b8 bnes 4c5aa <_POSIX_Message_queue_Send_support+0x8e><== ALWAYS TAKEN
msg_status = _Thread_Executing->Wait.return_code;
4c5f2: 2079 0006 9cc8 moveal 69cc8 <_Per_CPU_Information+0xc>,%a0 4c5f8: 2428 0034 movel %a0@(52),%d2 4c5fc: 60ac bras 4c5aa <_POSIX_Message_queue_Send_support+0x8e>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c5fe: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c604: 72ff moveq #-1,%d1 4c606: 2040 moveal %d0,%a0 4c608: 7009 moveq #9,%d0
}
4c60a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
4c610: 2080 movel %d0,%a0@
}
4c612: 2001 movel %d1,%d0 4c614: 4e5e unlk %fp 4c616: 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 );
4c618: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c61e: 7616 moveq #22,%d3 4c620: 72ff moveq #-1,%d1 4c622: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c624: 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 );
4c626: 2083 movel %d3,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c628: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c62e: 4e5e unlk %fp 4c630: 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();
4c632: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EBADF );
4c638: 7409 moveq #9,%d2 4c63a: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c640: 72ff moveq #-1,%d1 4c642: 2040 moveal %d0,%a0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c644: 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 );
4c646: 2082 movel %d2,%a0@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c648: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2 4c64e: 4e5e unlk %fp 4c650: 4e75 rts
msg_status = _Thread_Executing->Wait.return_code;
if ( !msg_status )
return msg_status;
rtems_set_errno_and_return_minus_one(
4c652: 4eb9 0005 6a7c jsr 56a7c <__errno> 4c658: 2440 moveal %d0,%a2 4c65a: 2f02 movel %d2,%sp@- 4c65c: 4eb9 0004 c78c jsr 4c78c <_POSIX_Message_queue_Translate_core_message_queue_return_code> 4c662: 588f addql #4,%sp 4c664: 72ff moveq #-1,%d1 4c666: 2480 movel %d0,%a2@
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EBADF );
}
4c668: 2001 movel %d1,%d0 4c66a: 4cee 043c ffe8 moveml %fp@(-24),%d2-%d5/%a2
4c670: 4e5e unlk %fp <== NOT EXECUTED
0004bacc <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch>:
#include <rtems/posix/pthread.h>
void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch(
Thread_Control *the_thread
)
{
4bacc: 4e56 0000 linkw %fp,#0 4bad0: 226e 0008 moveal %fp@(8),%a1
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
4bad4: 2069 010e moveal %a1@(270),%a0
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
4bad8: 4aa8 00d4 tstl %a0@(212)
4badc: 6608 bnes 4bae6 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a><== NEVER TAKEN
4bade: 7001 moveq #1,%d0 4bae0: b0a8 00d8 cmpl %a0@(216),%d0
4bae4: 6708 beqs 4baee <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x22>
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
} else
_Thread_Enable_dispatch();
}
4bae6: 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();
4bae8: 4ef9 0004 8c12 jmp 48c12 <_Thread_Enable_dispatch>
POSIX_API_Control *thread_support;
thread_support = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelability_type == PTHREAD_CANCEL_ASYNCHRONOUS &&
4baee: 4aa8 00dc tstl %a0@(220)
4baf2: 67f2 beqs 4bae6 <_POSIX_Thread_Evaluate_cancellation_and_enable_dispatch+0x1a>
thread_support->cancelation_requested ) {
_Thread_Unnest_dispatch();
_POSIX_Thread_Exit( the_thread, PTHREAD_CANCELED );
4baf4: 4878 ffff pea ffffffff <LESS>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
4baf8: 2039 0006 02d0 movel 602d0 <_Thread_Dispatch_disable_level>,%d0 4bafe: 5380 subql #1,%d0 4bb00: 2f09 movel %a1,%sp@- 4bb02: 23c0 0006 02d0 movel %d0,602d0 <_Thread_Dispatch_disable_level> 4bb08: 4eb9 0004 c418 jsr 4c418 <_POSIX_Thread_Exit> 4bb0e: 508f addql #8,%sp
} else
_Thread_Enable_dispatch();
}
4bb10: 4e5e unlk %fp <== NOT EXECUTED
0004d230 <_POSIX_Thread_Translate_sched_param>:
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4d230: 4e56 ffe8 linkw %fp,#-24 4d234: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4d238: 246e 000c moveal %fp@(12),%a2
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4d23c: 47f9 0004 d20c lea 4d20c <_POSIX_Priority_Is_valid>,%a3 4d242: 2f12 movel %a2@,%sp@-
int policy,
struct sched_param *param,
Thread_CPU_budget_algorithms *budget_algorithm,
Thread_CPU_budget_algorithm_callout *budget_callout
)
{
4d244: 242e 0008 movel %fp@(8),%d2 4d248: 286e 0010 moveal %fp@(16),%a4 4d24c: 2a6e 0014 moveal %fp@(20),%a5
if ( !_POSIX_Priority_Is_valid( param->sched_priority ) )
4d250: 4e93 jsr %a3@ 4d252: 588f addql #4,%sp 4d254: 4a00 tstb %d0
4d256: 6720 beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48><== NEVER TAKEN
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
4d258: 4294 clrl %a4@
*budget_callout = NULL;
4d25a: 4295 clrl %a5@
if ( policy == SCHED_OTHER ) {
4d25c: 4a82 tstl %d2
4d25e: 6724 beqs 4d284 <_POSIX_Thread_Translate_sched_param+0x54>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
return 0;
}
if ( policy == SCHED_FIFO ) {
4d260: 7001 moveq #1,%d0 4d262: b082 cmpl %d2,%d0 4d264: 6700 0086 beqw 4d2ec <_POSIX_Thread_Translate_sched_param+0xbc>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
4d268: 103c 0002 moveb #2,%d0 4d26c: b082 cmpl %d2,%d0 4d26e: 6700 0088 beqw 4d2f8 <_POSIX_Thread_Translate_sched_param+0xc8>
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
return 0;
}
if ( policy == SCHED_SPORADIC ) {
4d272: 7004 moveq #4,%d0 4d274: b082 cmpl %d2,%d0
4d276: 671c beqs 4d294 <_POSIX_Thread_Translate_sched_param+0x64>
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
return EINVAL;
4d278: 7016 moveq #22,%d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d27a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d280: 4e5e unlk %fp 4d282: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d284: 7201 moveq #1,%d1
return 0;
4d286: 4280 clrl %d0
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
*budget_callout = NULL;
if ( policy == SCHED_OTHER ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4d288: 2881 movel %d1,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d28a: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d290: 4e5e unlk %fp 4d292: 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) &&
4d294: 4aaa 0008 tstl %a2@(8)
4d298: 6606 bnes 4d2a0 <_POSIX_Thread_Translate_sched_param+0x70>
4d29a: 4aaa 000c tstl %a2@(12)
4d29e: 67d8 beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48>
(param->sched_ss_repl_period.tv_nsec == 0) )
return EINVAL;
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
4d2a0: 4aaa 0010 tstl %a2@(16)
4d2a4: 6606 bnes 4d2ac <_POSIX_Thread_Translate_sched_param+0x7c>
4d2a6: 4aaa 0014 tstl %a2@(20)
4d2aa: 67cc beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48>
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4d2ac: 486a 0008 pea %a2@(8) 4d2b0: 243c 0004 abac movel #306092,%d2 4d2b6: 2042 moveal %d2,%a0 4d2b8: 4e90 jsr %a0@
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4d2ba: 486a 0010 pea %a2@(16)
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4d2be: 2600 movel %d0,%d3
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
4d2c0: 2042 moveal %d2,%a0 4d2c2: 4e90 jsr %a0@
if ( (param->sched_ss_init_budget.tv_sec == 0) &&
(param->sched_ss_init_budget.tv_nsec == 0) )
return EINVAL;
if ( _Timespec_To_ticks( ¶m->sched_ss_repl_period ) <
4d2c4: 508f addql #8,%sp 4d2c6: b083 cmpl %d3,%d0
4d2c8: 62ae bhis 4d278 <_POSIX_Thread_Translate_sched_param+0x48>
_Timespec_To_ticks( ¶m->sched_ss_init_budget ) )
return EINVAL;
if ( !_POSIX_Priority_Is_valid( param->sched_ss_low_priority ) )
4d2ca: 2f2a 0004 movel %a2@(4),%sp@- 4d2ce: 4e93 jsr %a3@ 4d2d0: 588f addql #4,%sp 4d2d2: 4a00 tstb %d0
4d2d4: 67a2 beqs 4d278 <_POSIX_Thread_Translate_sched_param+0x48>
return EINVAL;
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_CALLOUT;
4d2d6: 7003 moveq #3,%d0 4d2d8: 2880 movel %d0,%a4@
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
4d2da: 4280 clrl %d0
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;
4d2dc: 2abc 0004 7000 movel #290816,%a5@
return 0;
}
return EINVAL;
}
4d2e2: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d2e8: 4e5e unlk %fp 4d2ea: 4e75 rts
return 0;
}
if ( policy == SCHED_FIFO ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
4d2ec: 4280 clrl %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d2ee: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d2f4: 4e5e unlk %fp 4d2f6: 4e75 rts
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE;
return 0;
}
if ( policy == SCHED_RR ) {
*budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE;
4d2f8: 2880 movel %d0,%a4@
return 0;
4d2fa: 4200 clrb %d0
*budget_callout = _POSIX_Threads_Sporadic_budget_callout;
return 0;
}
return EINVAL;
}
4d2fc: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4d302: 4e5e unlk %fp
...
00046c90 <_POSIX_Threads_Initialize_user_threads_body>:
*
* Output parameters: NONE
*/
void _POSIX_Threads_Initialize_user_threads_body(void)
{
46c90: 4e56 ff9c linkw %fp,#-100 46c94: 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;
46c98: 2479 0005 f7de moveal 5f7de <Configuration_POSIX_API+0x34>,%a2
maximum = Configuration_POSIX_API.number_of_initialization_threads;
46c9e: 2839 0005 f7da movel 5f7da <Configuration_POSIX_API+0x30>,%d4
if ( !user_threads || maximum == 0 )
46ca4: 4a8a tstl %a2
46ca6: 675a beqs 46d02 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46ca8: 4a84 tstl %d4
46caa: 6756 beqs 46d02 <_POSIX_Threads_Initialize_user_threads_body+0x72><== NEVER TAKEN
46cac: 240e movel %fp,%d2 46cae: 2a0e movel %fp,%d5 46cb0: 4283 clrl %d3 46cb2: 0682 ffff ffc0 addil #-64,%d2 46cb8: 2c3c 0004 d308 movel #316168,%d6 46cbe: 4bf9 0004 d334 lea 4d334 <pthread_attr_setinheritsched>,%a5 46cc4: 49f9 0004 d374 lea 4d374 <pthread_attr_setstacksize>,%a4 46cca: 5985 subql #4,%d5 46ccc: 47f9 0004 68dc lea 468dc <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 );
46cd2: 2f02 movel %d2,%sp@- 46cd4: 2046 moveal %d6,%a0 46cd6: 4e90 jsr %a0@
(void) pthread_attr_setinheritsched( &attr, PTHREAD_EXPLICIT_SCHED );
46cd8: 4878 0002 pea 2 <DOUBLE_FLOAT> 46cdc: 2f02 movel %d2,%sp@- 46cde: 4e95 jsr %a5@
(void) pthread_attr_setstacksize(&attr, user_threads[ index ].stack_size);
46ce0: 2f2a 0004 movel %a2@(4),%sp@- 46ce4: 2f02 movel %d2,%sp@- 46ce6: 4e94 jsr %a4@
status = pthread_create(
46ce8: 42a7 clrl %sp@- 46cea: 2f12 movel %a2@,%sp@- 46cec: 2f02 movel %d2,%sp@- 46cee: 2f05 movel %d5,%sp@- 46cf0: 4e93 jsr %a3@
&thread_id,
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
46cf2: 4fef 0024 lea %sp@(36),%sp 46cf6: 4a80 tstl %d0
46cf8: 6612 bnes 46d0c <_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++ ) {
46cfa: 5283 addql #1,%d3 46cfc: 508a addql #8,%a2 46cfe: b684 cmpl %d4,%d3
46d00: 65d0 bcss 46cd2 <_POSIX_Threads_Initialize_user_threads_body+0x42><== NEVER TAKEN
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
}
}
46d02: 4cee 3c7c ff9c moveml %fp@(-100),%d2-%d6/%a2-%a5 46d08: 4e5e unlk %fp 46d0a: 4e75 rts
&attr,
user_threads[ index ].thread_entry,
NULL
);
if ( status )
_Internal_error_Occurred( INTERNAL_ERROR_POSIX_API, true, status );
46d0c: 2f00 movel %d0,%sp@- 46d0e: 4878 0001 pea 1 <ADD> 46d12: 4878 0002 pea 2 <DOUBLE_FLOAT> 46d16: 4eb9 0004 8e14 jsr 48e14 <_Internal_error_Occurred>
0004bef0 <_POSIX_Threads_Sporadic_budget_TSR>:
*/
void _POSIX_Threads_Sporadic_budget_TSR(
Objects_Id id __attribute__((unused)),
void *argument
)
{
4bef0: 4e56 fff4 linkw %fp,#-12 4bef4: 48d7 1c00 moveml %a2-%a4,%sp@ 4bef8: 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 );
4befc: 49f9 0004 ce4c lea 4ce4c <_Timespec_To_ticks>,%a4
Thread_Control *the_thread;
POSIX_API_Control *api;
the_thread = argument;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4bf02: 246b 010e moveal %a3@(270),%a2
/* ticks is guaranteed to be at least one */
ticks = _Timespec_To_ticks( &api->schedparam.sched_ss_init_budget );
4bf06: 486a 0094 pea %a2@(148) 4bf0a: 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 ) {
4bf0c: 588f addql #4,%sp
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4bf0e: 4281 clrl %d1 4bf10: 1239 0005 e322 moveb 5e322 <rtems_maximum_priority>,%d1 4bf16: 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;
4bf1a: 2740 0076 movel %d0,%a3@(118)
new_priority = _POSIX_Priority_To_core( api->schedparam.sched_priority );
the_thread->real_priority = new_priority;
4bf1e: 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 ) {
4bf22: 4aab 001c tstl %a3@(28)
4bf26: 6606 bnes 4bf2e <_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 ) {
4bf28: b2ab 0014 cmpl %a3@(20),%d1
4bf2c: 652c bcss 4bf5a <_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 );
4bf2e: 486a 008c pea %a2@(140) 4bf32: 4e94 jsr %a4@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4bf34: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4bf36: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4bf3a: 45ea 00a4 lea %a2@(164),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4bf3e: 203c 0005 fb9e movel #392094,%d0 4bf44: 2d4a 000c movel %a2,%fp@(12)
}
4bf48: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4bf4e: 2d40 0008 movel %d0,%fp@(8) 4bf52: 4e5e unlk %fp 4bf54: 4ef9 0004 9ab8 jmp 49ab8 <_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 );
4bf5a: 4878 0001 pea 1 <ADD> 4bf5e: 2f01 movel %d1,%sp@- 4bf60: 2f0b movel %a3,%sp@- 4bf62: 4eb9 0004 837c jsr 4837c <_Thread_Change_priority> 4bf68: 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 );
4bf6c: 486a 008c pea %a2@(140) 4bf70: 4e94 jsr %a4@ 4bf72: 588f addql #4,%sp
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4bf74: 2540 00b0 movel %d0,%a2@(176)
_Watchdog_Insert_ticks( &api->Sporadic_timer, ticks );
4bf78: 45ea 00a4 lea %a2@(164),%a2
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4bf7c: 203c 0005 fb9e movel #392094,%d0 4bf82: 2d4a 000c movel %a2,%fp@(12)
}
4bf86: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4bf8c: 2d40 0008 movel %d0,%fp@(8) 4bf90: 4e5e unlk %fp 4bf92: 4ef9 0004 9ab8 jmp 49ab8 <_Watchdog_Insert>
0004bf98 <_POSIX_Threads_Sporadic_budget_callout>:
4bf98: 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 */
4bf9a: 72ff moveq #-1,%d1
* _POSIX_Threads_Sporadic_budget_callout
*/
void _POSIX_Threads_Sporadic_budget_callout(
Thread_Control *the_thread
)
{
4bf9c: 4e56 0000 linkw %fp,#0 4bfa0: 206e 0008 moveal %fp@(8),%a0 4bfa4: 1039 0005 e322 moveb 5e322 <rtems_maximum_priority>,%d0
POSIX_API_Control *api;
uint32_t new_priority;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4bfaa: 2268 010e moveal %a0@(270),%a1 4bfae: 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 */
4bfb2: 2141 0076 movel %d1,%a0@(118)
new_priority = _POSIX_Priority_To_core(api->schedparam.sched_ss_low_priority);
the_thread->real_priority = new_priority;
4bfb6: 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 ) {
4bfba: 4aa8 001c tstl %a0@(28)
4bfbe: 6606 bnes 4bfc6 <_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 ) {
4bfc0: b0a8 0014 cmpl %a0@(20),%d0
4bfc4: 6204 bhis 4bfca <_POSIX_Threads_Sporadic_budget_callout+0x32><== ALWAYS TAKEN
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4bfc6: 4e5e unlk %fp <== NOT EXECUTED 4bfc8: 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 );
4bfca: 4878 0001 pea 1 <ADD> 4bfce: 2f00 movel %d0,%sp@- 4bfd0: 2f08 movel %a0,%sp@- 4bfd2: 4eb9 0004 837c jsr 4837c <_Thread_Change_priority> 4bfd8: 4fef 000c lea %sp@(12),%sp
#if 0
printk( "lower priority\n" );
#endif
}
}
}
4bfdc: 4e5e unlk %fp <== NOT EXECUTED
0004e124 <_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;
4e124: 7001 moveq #1,%d0
#include <rtems/posix/threadsup.h>
void _POSIX_Threads_cancel_run(
Thread_Control *the_thread
)
{
4e126: 4e56 ffec linkw %fp,#-20 4e12a: 206e 0008 moveal %fp@(8),%a0 4e12e: 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 ];
4e132: 2668 010e moveal %a0@(270),%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4e136: 45eb 00e4 lea %a3@(228),%a2
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
4e13a: 2740 00d4 movel %d0,%a3@(212)
while ( !_Chain_Is_empty( handler_stack ) ) {
4e13e: b5eb 00e0 cmpal %a3@(224),%a2
4e142: 673c beqs 4e180 <_POSIX_Threads_cancel_run+0x5c>
4e144: 49f9 0004 9d9e lea 49d9e <_Workspace_Free>,%a4
_ISR_Disable( level );
4e14a: 243c 0000 0700 movel #1792,%d2 4e150: 2002 movel %d2,%d0 4e152: 40c1 movew %sr,%d1 4e154: 8081 orl %d1,%d0 4e156: 46c0 movew %d0,%sr
handler = (POSIX_Cancel_Handler_control *)
4e158: 2a6a 0004 moveal %a2@(4),%a5
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4e15c: 2255 moveal %a5@,%a1
previous = the_node->previous;
4e15e: 206d 0004 moveal %a5@(4),%a0
next->previous = previous;
4e162: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4e166: 2089 movel %a1,%a0@
_Chain_Tail( handler_stack )->previous;
_Chain_Extract_unprotected( &handler->Node );
_ISR_Enable( level );
4e168: 46c1 movew %d1,%sr
(*handler->routine)( handler->arg );
4e16a: 2f2d 000c movel %a5@(12),%sp@- 4e16e: 206d 0008 moveal %a5@(8),%a0 4e172: 4e90 jsr %a0@
_Workspace_Free( handler );
4e174: 2f0d movel %a5,%sp@- 4e176: 4e94 jsr %a4@
handler_stack = &thread_support->Cancellation_Handlers;
thread_support->cancelability_state = PTHREAD_CANCEL_DISABLE;
while ( !_Chain_Is_empty( handler_stack ) ) {
4e178: 508f addql #8,%sp 4e17a: b5eb 00e0 cmpal %a3@(224),%a2
4e17e: 66d0 bnes 4e150 <_POSIX_Threads_cancel_run+0x2c> <== NEVER TAKEN
(*handler->routine)( handler->arg );
_Workspace_Free( handler );
}
}
4e180: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4e186: 4e5e unlk %fp
...
000465f0 <_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)
{
465f0: 4e56 0000 linkw %fp,#0 465f4: 2f0a movel %a2,%sp@- 465f6: 246e 000c moveal %fp@(12),%a2
bool activated;
ptimer = (POSIX_Timer_Control *)data;
/* Increment the number of expirations. */
ptimer->overrun = ptimer->overrun + 1;
465fa: 52aa 0066 addql #1,%a2@(102)
/* The timer must be reprogrammed */
if ( ( ptimer->timer_data.it_interval.tv_sec != 0 ) ||
465fe: 4aaa 0052 tstl %a2@(82)
46602: 6606 bnes 4660a <_POSIX_Timer_TSR+0x1a>
46604: 4aaa 0056 tstl %a2@(86)
46608: 672a beqs 46634 <_POSIX_Timer_TSR+0x44> <== NEVER TAKEN
( ptimer->timer_data.it_interval.tv_nsec != 0 ) ) {
activated = _POSIX_Timer_Insert_helper(
4660a: 2f0a movel %a2,%sp@- 4660c: 4879 0004 65f0 pea 465f0 <_POSIX_Timer_TSR> 46612: 2f2a 0008 movel %a2@(8),%sp@- 46616: 2f2a 0062 movel %a2@(98),%sp@- 4661a: 486a 0010 pea %a2@(16) 4661e: 4eb9 0004 ca88 jsr 4ca88 <_POSIX_Timer_Insert_helper>
ptimer->ticks,
ptimer->Object.id,
_POSIX_Timer_TSR,
ptimer
);
if ( !activated )
46624: 4fef 0014 lea %sp@(20),%sp 46628: 4a00 tstb %d0
4662a: 662a bnes 46656 <_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;
}
4662c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 46630: 4e5e unlk %fp <== NOT EXECUTED 46632: 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;
46634: 7004 moveq #4,%d0 <== NOT EXECUTED 46636: 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 ) ) {
4663a: 2f2a 0042 movel %a2@(66),%sp@- <== NOT EXECUTED 4663e: 2f2a 0038 movel %a2@(56),%sp@- <== NOT EXECUTED 46642: 4eb9 0004 c5a8 jsr 4c5a8 <pthread_kill> <== NOT EXECUTED
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
46648: 508f addql #8,%sp <== NOT EXECUTED 4664a: 42aa 0066 clrl %a2@(102) <== NOT EXECUTED
}
4664e: 246e fffc moveal %fp@(-4),%a2 46652: 4e5e unlk %fp 46654: 4e75 rts
);
if ( !activated )
return;
/* Store the time when the timer was started again */
_TOD_Get( &ptimer->time );
46656: 486a 006a pea %a2@(106) 4665a: 4eb9 0004 7dc4 jsr 47dc4 <_TOD_Get>
/* The state really did not change but just to be safe */
ptimer->state = POSIX_TIMER_STATE_CREATE_RUN;
46660: 588f addql #4,%sp 46662: 7003 moveq #3,%d0 46664: 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 ) ) {
46668: 2f2a 0042 movel %a2@(66),%sp@- 4666c: 2f2a 0038 movel %a2@(56),%sp@- 46670: 4eb9 0004 c5a8 jsr 4c5a8 <pthread_kill>
}
/* After the signal handler returns, the count of expirations of the
* timer must be set to 0.
*/
ptimer->overrun = 0;
46676: 508f addql #8,%sp 46678: 42aa 0066 clrl %a2@(102) 4667c: 60d0 bras 4664e <_POSIX_Timer_TSR+0x5e>
...
0004e22c <_POSIX_signals_Check_signal>:
)
{
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4e22c: 4280 clrl %d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4e22e: 4e56 ffe4 linkw %fp,#-28
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4e232: 102e 0013 moveb %fp@(19),%d0
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4e236: 48d7 041c moveml %d2-%d4/%a2,%sp@
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4e23a: 4878 0001 pea 1 <ADD> 4e23e: 260e movel %fp,%d3 4e240: 0683 ffff fff4 addil #-12,%d3 4e246: 2f00 movel %d0,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4e248: 242e 000c movel %fp@(12),%d2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4e24c: 2f03 movel %d3,%sp@-
bool _POSIX_signals_Check_signal(
POSIX_API_Control *api,
int signo,
bool is_global
)
{
4e24e: 246e 0008 moveal %fp@(8),%a2
siginfo_t siginfo_struct;
sigset_t saved_signals_blocked;
if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct,
4e252: 2f02 movel %d2,%sp@- 4e254: 2f0a movel %a2,%sp@- 4e256: 4eb9 0004 e2d4 jsr 4e2d4 <_POSIX_signals_Clear_signals> 4e25c: 4fef 0014 lea %sp@(20),%sp 4e260: 4a00 tstb %d0
4e262: 6762 beqs 4e2c6 <_POSIX_signals_Check_signal+0x9a>
#endif
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
4e264: 2202 movel %d2,%d1 4e266: 2002 movel %d2,%d0 4e268: e589 lsll #2,%d1 4e26a: e988 lsll #4,%d0 4e26c: 9081 subl %d1,%d0 4e26e: 2240 moveal %d0,%a1 4e270: d3fc 0005 ff7a addal #393082,%a1 4e276: 7201 moveq #1,%d1 4e278: 2069 0008 moveal %a1@(8),%a0 4e27c: b288 cmpl %a0,%d1
4e27e: 6746 beqs 4e2c6 <_POSIX_signals_Check_signal+0x9a><== NEVER TAKEN
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4e280: 2229 0004 movel %a1@(4),%d1
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4e284: 43f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a1
return false;
/*
* Block the signals requested in sa_mask
*/
saved_signals_blocked = api->signals_blocked;
4e28a: 282a 00cc movel %a2@(204),%d4
api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask;
4e28e: 8284 orl %d4,%d1 4e290: 2541 00cc movel %d1,%a2@(204)
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
4e294: 7202 moveq #2,%d1 4e296: b2b1 0800 cmpl %a1@(00000000,%d0:l),%d1
4e29a: 6716 beqs 4e2b2 <_POSIX_signals_Check_signal+0x86>
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
default:
(*_POSIX_signals_Vectors[ signo ].sa_handler)( signo );
4e29c: 2f02 movel %d2,%sp@- 4e29e: 4e90 jsr %a0@
break;
4e2a0: 588f addql #4,%sp
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
4e2a2: 7001 moveq #1,%d0
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4e2a4: 2544 00cc movel %d4,%a2@(204)
return true;
}
4e2a8: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2 4e2ae: 4e5e unlk %fp 4e2b0: 4e75 rts
/*
* Here, the signal handler function executes
*/
switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) {
case SA_SIGINFO:
(*_POSIX_signals_Vectors[ signo ].sa_sigaction)(
4e2b2: 42a7 clrl %sp@- 4e2b4: 2f03 movel %d3,%sp@- 4e2b6: 2f02 movel %d2,%sp@- 4e2b8: 4e90 jsr %a0@
signo,
&siginfo_struct,
NULL /* context is undefined per 1003.1b-1993, p. 66 */
);
break;
4e2ba: 4fef 000c lea %sp@(12),%sp
}
/*
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
4e2be: 2544 00cc movel %d4,%a2@(204)
return true;
4e2c2: 7001 moveq #1,%d0 4e2c4: 60e2 bras 4e2a8 <_POSIX_signals_Check_signal+0x7c>
}
4e2c6: 4cee 041c ffe4 moveml %fp@(-28),%d2-%d4/%a2
/*
* Just to prevent sending a signal which is currently being ignored.
*/
if ( _POSIX_signals_Vectors[ signo ].sa_handler == SIG_IGN )
return false;
4e2cc: 4200 clrb %d0
* Restore the previous set of blocked signals
*/
api->signals_blocked = saved_signals_blocked;
return true;
}
4e2ce: 4e5e unlk %fp
...
0004e95c <_POSIX_signals_Clear_process_signals>:
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4e95c: 203c 0000 0700 movel #1792,%d0
*/
void _POSIX_signals_Clear_process_signals(
int signo
)
{
4e962: 4e56 0000 linkw %fp,#0 4e966: 222e 0008 movel %fp@(8),%d1 4e96a: 2f03 movel %d3,%sp@- 4e96c: 2f02 movel %d2,%sp@-
clear_signal = true;
mask = signo_to_mask( signo );
ISR_Level level;
_ISR_Disable( level );
4e96e: 40c2 movew %sr,%d2 4e970: 8082 orl %d2,%d0 4e972: 46c0 movew %d0,%sr
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4e974: 2601 movel %d1,%d3 4e976: 2001 movel %d1,%d0 4e978: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 4e97e: e58b lsll #2,%d3 4e980: e988 lsll #4,%d0 4e982: 9083 subl %d3,%d0 4e984: 7602 moveq #2,%d3 4e986: b6b0 0800 cmpl %a0@(00000000,%d0:l),%d3
4e98a: 6718 beqs 4e9a4 <_POSIX_signals_Clear_process_signals+0x48>
4e98c: 5381 subql #1,%d1 4e98e: 7001 moveq #1,%d0 4e990: e3a8 lsll %d1,%d0
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
4e992: 4680 notl %d0 4e994: c1b9 0006 016e andl %d0,6016e <_POSIX_signals_Pending>
}
_ISR_Enable( level );
4e99a: 46c2 movew %d2,%sr
}
4e99c: 241f movel %sp@+,%d2 4e99e: 261f movel %sp@+,%d3 4e9a0: 4e5e unlk %fp 4e9a2: 4e75 rts
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4e9a4: 2040 moveal %d0,%a0 4e9a6: d1fc 0006 0176 addal #393590,%a0
ISR_Level level;
_ISR_Disable( level );
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
if ( !_Chain_Is_empty( &_POSIX_signals_Siginfo[ signo ] ) )
4e9ac: 43f9 0006 0172 lea 60172 <_POSIX_signals_Siginfo>,%a1 4e9b2: b1f1 0800 cmpal %a1@(00000000,%d0:l),%a0
4e9b6: 67d4 beqs 4e98c <_POSIX_signals_Clear_process_signals+0x30><== ALWAYS TAKEN
clear_signal = false;
}
if ( clear_signal ) {
_POSIX_signals_Pending &= ~mask;
}
_ISR_Enable( level );
4e9b8: 46c2 movew %d2,%sr <== NOT EXECUTED
}
4e9ba: 241f movel %sp@+,%d2 <== NOT EXECUTED 4e9bc: 261f movel %sp@+,%d3 <== NOT EXECUTED 4e9be: 4e5e unlk %fp <== NOT EXECUTED
...
0004e2d4 <_POSIX_signals_Clear_signals>:
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
4e2d4: 7001 moveq #1,%d0
int signo,
siginfo_t *info,
bool is_global,
bool check_blocked
)
{
4e2d6: 4e56 ffe8 linkw %fp,#-24 4e2da: 206e 0008 moveal %fp@(8),%a0 4e2de: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4e2e2: 242e 000c movel %fp@(12),%d2 4e2e6: 2202 movel %d2,%d1 4e2e8: 5381 subql #1,%d1 4e2ea: 1a2e 0017 moveb %fp@(23),%d5 4e2ee: 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 )
4e2f0: 4a2e 001b tstb %fp@(27)
4e2f4: 6752 beqs 4e348 <_POSIX_signals_Clear_signals+0x74>
signals_blocked = ~api->signals_blocked;
4e2f6: 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 );
4e2fa: 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;
4e300: 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 );
4e302: 40c3 movew %sr,%d3 4e304: 8283 orl %d3,%d1 4e306: 46c1 movew %d1,%sr
if ( is_global ) {
4e308: 4a05 tstb %d5
4e30a: 674e beqs 4e35a <_POSIX_signals_Clear_signals+0x86>
if ( mask & (_POSIX_signals_Pending & signals_blocked) ) {
4e30c: c0b9 0006 016e andl 6016e <_POSIX_signals_Pending>,%d0 4e312: c084 andl %d4,%d0
4e314: 6768 beqs 4e37e <_POSIX_signals_Clear_signals+0xaa>
if ( _POSIX_signals_Vectors[ signo ].sa_flags == SA_SIGINFO ) {
4e316: 2202 movel %d2,%d1 4e318: 2002 movel %d2,%d0 4e31a: 47f9 0004 e95c lea 4e95c <_POSIX_signals_Clear_process_signals>,%a3 4e320: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 4e326: e589 lsll #2,%d1 4e328: e988 lsll #4,%d0 4e32a: 9081 subl %d1,%d0 4e32c: 7202 moveq #2,%d1 4e32e: b2b0 0800 cmpl %a0@(00000000,%d0:l),%d1
4e332: 6758 beqs 4e38c <_POSIX_signals_Clear_signals+0xb8>
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4e334: 2f02 movel %d2,%sp@- 4e336: 4e93 jsr %a3@ 4e338: 588f addql #4,%sp
do_callout = true;
4e33a: 7001 moveq #1,%d0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
4e33c: 46c3 movew %d3,%sr
return do_callout; }
4e33e: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e344: 4e5e unlk %fp 4e346: 4e75 rts
*/
if ( check_blocked )
signals_blocked = ~api->signals_blocked;
else
signals_blocked = SIGNAL_ALL_MASK;
4e348: 78ff moveq #-1,%d4
/* XXX is this right for siginfo type signals? */
/* XXX are we sure they can be cleared the same way? */
_ISR_Disable( level );
4e34a: 223c 0000 0700 movel #1792,%d1 4e350: 40c3 movew %sr,%d3 4e352: 8283 orl %d3,%d1 4e354: 46c1 movew %d1,%sr
if ( is_global ) {
4e356: 4a05 tstb %d5
4e358: 66b2 bnes 4e30c <_POSIX_signals_Clear_signals+0x38>
}
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
4e35a: 2428 00d0 movel %a0@(208),%d2 4e35e: 2200 movel %d0,%d1 4e360: c282 andl %d2,%d1 4e362: c284 andl %d4,%d1
4e364: 6718 beqs 4e37e <_POSIX_signals_Clear_signals+0xaa>
api->signals_pending &= ~mask;
4e366: 2200 movel %d0,%d1 4e368: 4681 notl %d1 4e36a: c282 andl %d2,%d1
do_callout = true;
4e36c: 7001 moveq #1,%d0
_POSIX_signals_Clear_process_signals( signo );
do_callout = true;
}
} else {
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
4e36e: 2141 00d0 movel %d1,%a0@(208)
do_callout = true;
}
}
_ISR_Enable( level );
4e372: 46c3 movew %d3,%sr
return do_callout; }
4e374: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e37a: 4e5e unlk %fp 4e37c: 4e75 rts
bool do_callout;
POSIX_signals_Siginfo_node *psiginfo;
mask = signo_to_mask( signo );
do_callout = false;
4e37e: 4200 clrb %d0
if ( mask & (api->signals_pending & signals_blocked) ) {
api->signals_pending &= ~mask;
do_callout = true;
}
}
_ISR_Enable( level );
4e380: 46c3 movew %d3,%sr
return do_callout; }
4e382: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4e388: 4e5e unlk %fp 4e38a: 4e75 rts
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4e38c: 41f9 0006 0172 lea 60172 <_POSIX_signals_Siginfo>,%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4e392: 2200 movel %d0,%d1 4e394: 0681 0006 0176 addil #393590,%d1
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4e39a: 2470 0800 moveal %a0@(00000000,%d0:l),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
4e39e: b28a cmpl %a2,%d1
4e3a0: 6746 beqs 4e3e8 <_POSIX_signals_Clear_signals+0x114>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
4e3a2: 2252 moveal %a2@,%a1
the_chain->first = new_first;
4e3a4: 2189 0800 movel %a1,%a0@(00000000,%d0:l)
_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 *)
_Chain_Get_unprotected( &_POSIX_signals_Siginfo[ signo ] );
4e3a8: d088 addl %a0,%d0 4e3aa: 2340 0004 movel %d0,%a1@(4)
_POSIX_signals_Clear_process_signals( signo );
4e3ae: 2f02 movel %d2,%sp@- 4e3b0: 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;
4e3b2: 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;
4e3b6: 588f addql #4,%sp 4e3b8: 20ea 0008 movel %a2@(8),%a0@+ 4e3bc: 20ea 000c movel %a2@(12),%a0@+ 4e3c0: 20aa 0010 movel %a2@(16),%a0@
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4e3c4: 2079 0006 0102 moveal 60102 <_POSIX_signals_Inactive_siginfo+0x8>,%a0
Chain_Node *the_node
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
4e3ca: 24bc 0006 00fe movel #393470,%a2@
old_last_node = the_chain->last; the_chain->last = the_node;
4e3d0: 23ca 0006 0102 movel %a2,60102 <_POSIX_signals_Inactive_siginfo+0x8>
old_last_node->next = the_node;
4e3d6: 208a movel %a2,%a0@
the_node->previous = old_last_node;
4e3d8: 2548 0004 movel %a0,%a2@(4)
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4e3dc: 2f02 movel %d2,%sp@- 4e3de: 4e93 jsr %a3@ 4e3e0: 588f addql #4,%sp
do_callout = true;
4e3e2: 7001 moveq #1,%d0 4e3e4: 6000 ff56 braw 4e33c <_POSIX_signals_Clear_signals+0x68>
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 );
4e3e8: 2f02 movel %d2,%sp@- 4e3ea: 4e93 jsr %a3@ 4e3ec: 588f addql #4,%sp
&psiginfo->Node
);
} else
do_callout = false;
}
_POSIX_signals_Clear_process_signals( signo );
4e3ee: 2f02 movel %d2,%sp@- 4e3f0: 4e93 jsr %a3@ 4e3f2: 588f addql #4,%sp
do_callout = true;
4e3f4: 7001 moveq #1,%d0 4e3f6: 6000 ff44 braw 4e33c <_POSIX_signals_Clear_signals+0x68>
...
000473c8 <_POSIX_signals_Get_highest>:
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
473c8: 701b moveq #27,%d0
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
sigset_t set
)
{
473ca: 4e56 fff4 linkw %fp,#-12 473ce: 48d7 001c moveml %d2-%d4,%sp@ 473d2: 242e 0008 movel %fp@(8),%d2 473d6: 7601 moveq #1,%d3
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
473d8: 2200 movel %d0,%d1 473da: 5381 subql #1,%d1 473dc: 2803 movel %d3,%d4 473de: e3ac lsll %d1,%d4 473e0: 2204 movel %d4,%d1
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
473e2: c282 andl %d2,%d1
473e4: 6626 bnes 4740c <_POSIX_signals_Get_highest+0x44><== NEVER TAKEN
sigset_t set
)
{
int signo;
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
473e6: 5280 addql #1,%d0 473e8: 123c 0020 moveb #32,%d1 473ec: b280 cmpl %d0,%d1
473ee: 66e8 bnes 473d8 <_POSIX_signals_Get_highest+0x10>
473f0: 7001 moveq #1,%d0 473f2: 7601 moveq #1,%d3
#include <rtems/posix/psignal.h>
#include <rtems/seterr.h>
#include <rtems/posix/time.h>
#include <rtems/score/isr.h>
int _POSIX_signals_Get_highest(
473f4: 2200 movel %d0,%d1 473f6: 5381 subql #1,%d1 473f8: 2803 movel %d3,%d4 473fa: e3ac lsll %d1,%d4 473fc: 2204 movel %d4,%d1
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
if ( set & signo_to_mask( signo ) ) {
473fe: c282 andl %d2,%d1
47400: 660a bnes 4740c <_POSIX_signals_Get_highest+0x44>
*/
#if (SIGHUP != 1)
#error "Assumption that SIGHUP==1 violated!!"
#endif
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
47402: 5280 addql #1,%d0 47404: 123c 001b moveb #27,%d1 47408: b280 cmpl %d0,%d1
4740a: 66e8 bnes 473f4 <_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; }
4740c: 4cd7 001c moveml %sp@,%d2-%d4
47410: 4e5e unlk %fp <== NOT EXECUTED
0004b906 <_POSIX_signals_Post_switch_extension>:
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
4b906: 4e56 fff0 linkw %fp,#-16
POSIX_API_Control *api;
int signo;
ISR_Level level;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
4b90a: 206e 0008 moveal %fp@(8),%a0
*/
void _POSIX_signals_Post_switch_extension(
Thread_Control *the_thread
)
{
4b90e: 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 ];
4b912: 2468 010e moveal %a0@(270),%a2
*
* 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 );
4b916: 263c 0000 0700 movel #1792,%d3 4b91c: 47f9 0004 e22c lea 4e22c <_POSIX_signals_Check_signal>,%a3 4b922: 2003 movel %d3,%d0 4b924: 40c1 movew %sr,%d1 4b926: 8081 orl %d1,%d0 4b928: 46c0 movew %d0,%sr
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
4b92a: 2039 0006 016e movel 6016e <_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 &
4b930: 242a 00cc movel %a2@(204),%d2 4b934: 4682 notl %d2
(api->signals_pending | _POSIX_signals_Pending)) ) {
4b936: 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 &
4b93a: c082 andl %d2,%d0
4b93c: 6762 beqs 4b9a0 <_POSIX_signals_Post_switch_extension+0x9a>
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
4b93e: 46c1 movew %d1,%sr
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4b940: 741b moveq #27,%d2
_POSIX_signals_Check_signal( api, signo, false );
4b942: 42a7 clrl %sp@- 4b944: 2f02 movel %d2,%sp@- 4b946: 2f0a movel %a2,%sp@- 4b948: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4b94a: 4878 0001 pea 1 <ADD> 4b94e: 2f02 movel %d2,%sp@-
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4b950: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4b952: 2f0a movel %a2,%sp@- 4b954: 4e93 jsr %a3@
_ISR_Enable( level );
break;
}
_ISR_Enable( level );
for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
4b956: 4fef 0018 lea %sp@(24),%sp 4b95a: 7020 moveq #32,%d0 4b95c: b082 cmpl %d2,%d0
4b95e: 66e2 bnes 4b942 <_POSIX_signals_Post_switch_extension+0x3c>
4b960: 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 );
4b962: 42a7 clrl %sp@- 4b964: 2f02 movel %d2,%sp@- 4b966: 2f0a movel %a2,%sp@- 4b968: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4b96a: 4878 0001 pea 1 <ADD> 4b96e: 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++ ) {
4b970: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4b972: 2f0a movel %a2,%sp@- 4b974: 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++ ) {
4b976: 4fef 0018 lea %sp@(24),%sp 4b97a: 701b moveq #27,%d0 4b97c: b082 cmpl %d2,%d0
4b97e: 67a2 beqs 4b922 <_POSIX_signals_Post_switch_extension+0x1c><== NEVER TAKEN
_POSIX_signals_Check_signal( api, signo, false );
4b980: 42a7 clrl %sp@- 4b982: 2f02 movel %d2,%sp@- 4b984: 2f0a movel %a2,%sp@- 4b986: 4e93 jsr %a3@
_POSIX_signals_Check_signal( api, signo, true );
4b988: 4878 0001 pea 1 <ADD> 4b98c: 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++ ) {
4b98e: 5282 addql #1,%d2
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
4b990: 2f0a movel %a2,%sp@- 4b992: 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++ ) {
4b994: 4fef 0018 lea %sp@(24),%sp 4b998: 701b moveq #27,%d0 4b99a: b082 cmpl %d2,%d0
4b99c: 66c4 bnes 4b962 <_POSIX_signals_Post_switch_extension+0x5c>
4b99e: 6082 bras 4b922 <_POSIX_signals_Post_switch_extension+0x1c>
*/
while (1) {
_ISR_Disable( level );
if ( !(~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending)) ) {
_ISR_Enable( level );
4b9a0: 46c1 movew %d1,%sr
for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
_POSIX_signals_Check_signal( api, signo, false );
_POSIX_signals_Check_signal( api, signo, true );
}
}
}
4b9a2: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3
4b9a8: 4e5e unlk %fp <== NOT EXECUTED
0005c3b0 <_POSIX_signals_Unblock_thread>:
5c3b0: 7001 moveq #1,%d0
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5c3b2: 4e56 ffec linkw %fp,#-20 5c3b6: 206e 000c moveal %fp@(12),%a0 5c3ba: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 5c3be: 246e 0008 moveal %fp@(8),%a2 5c3c2: 2608 movel %a0,%d3 5c3c4: 5383 subql #1,%d3
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5c3c6: 222a 0010 movel %a2@(16),%d1 5c3ca: 2401 movel %d1,%d2 5c3cc: 0282 1000 8000 andil #268468224,%d2
bool _POSIX_signals_Unblock_thread(
Thread_Control *the_thread,
int signo,
siginfo_t *info
)
{
5c3d2: 282e 0010 movel %fp@(16),%d4
POSIX_API_Control *api;
sigset_t mask;
siginfo_t *the_info = NULL;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
5c3d6: 226a 010e moveal %a2@(270),%a1 5c3da: e7a8 lsll %d3,%d0
/*
* Is the thread is specifically waiting for a signal?
*/
if ( _States_Is_interruptible_signal( the_thread->current_state ) ) {
5c3dc: 0c82 1000 8000 cmpil #268468224,%d2
5c3e2: 6764 beqs 5c448 <_POSIX_signals_Unblock_thread+0x98>
}
/*
* Thread is not waiting due to a sigwait.
*/
if ( ~api->signals_blocked & mask ) {
5c3e4: 2429 00cc movel %a1@(204),%d2 5c3e8: 4682 notl %d2 5c3ea: c082 andl %d2,%d0
5c3ec: 674e beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c>
* it is not blocked, THEN
* we need to dispatch at the end of this ISR.
* + Any other combination, do nothing.
*/
if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) {
5c3ee: 0801 001c btst #28,%d1
5c3f2: 6732 beqs 5c426 <_POSIX_signals_Unblock_thread+0x76>
the_thread->Wait.return_code = EINTR;
5c3f4: 7004 moveq #4,%d0 5c3f6: 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) ){
5c3fa: 44c1 movew %d1,%ccr
5c3fc: 6a3e bpls 5c43c <_POSIX_signals_Unblock_thread+0x8c><== NEVER TAKEN
if ( _Watchdog_Is_active( &the_thread->Timer ) )
5c3fe: 103c 0002 moveb #2,%d0 5c402: b0aa 0050 cmpl %a2@(80),%d0 5c406: 6700 00aa beqw 5c4b2 <_POSIX_signals_Unblock_thread+0x102>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
5c40a: 2f3c 1003 fff8 movel #268697592,%sp@- <== NOT EXECUTED 5c410: 2f0a movel %a2,%sp@- <== NOT EXECUTED 5c412: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> <== NOT EXECUTED 5c418: 508f addql #8,%sp <== NOT EXECUTED
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
5c41a: 4200 clrb %d0 <== NOT EXECUTED
}
5c41c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c422: 4e5e unlk %fp 5c424: 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 ) {
5c426: 4a81 tstl %d1
5c428: 6612 bnes 5c43c <_POSIX_signals_Unblock_thread+0x8c><== NEVER TAKEN
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
5c42a: 4ab9 0005 ff68 tstl 5ff68 <_Per_CPU_Information+0x8>
5c430: 670a beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c>
5c432: b5f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a2 5c438: 6700 009a beqw 5c4d4 <_POSIX_signals_Unblock_thread+0x124>
_Context_Switch_necessary = true;
}
}
return false;
}
5c43c: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
5c442: 4200 clrb %d0
}
5c444: 4e5e unlk %fp 5c446: 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) ) {
5c448: 2200 movel %d0,%d1 5c44a: c2aa 0030 andl %a2@(48),%d1
5c44e: 672e beqs 5c47e <_POSIX_signals_Unblock_thread+0xce>
the_thread->Wait.return_code = EINTR;
5c450: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5c452: 266a 0028 moveal %a2@(40),%a3
*/
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;
5c456: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5c45a: 4a84 tstl %d4
5c45c: 6738 beqs 5c496 <_POSIX_signals_Unblock_thread+0xe6>
the_info->si_signo = signo;
the_info->si_code = SI_USER;
the_info->si_value.sival_int = 0;
} else {
*the_info = *info;
5c45e: 2244 moveal %d4,%a1 5c460: 204b moveal %a3,%a0 5c462: 20d9 movel %a1@+,%a0@+ 5c464: 20d9 movel %a1@+,%a0@+ 5c466: 2091 movel %a1@,%a0@
}
_Thread_queue_Extract_with_proxy( the_thread );
5c468: 2f0a movel %a2,%sp@- 5c46a: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy>
return true;
5c470: 588f addql #4,%sp 5c472: 7001 moveq #1,%d0
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
}
5c474: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c47a: 4e5e unlk %fp 5c47c: 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) ) {
5c47e: 2229 00cc movel %a1@(204),%d1 5c482: 4681 notl %d1 5c484: c081 andl %d1,%d0
5c486: 67b4 beqs 5c43c <_POSIX_signals_Unblock_thread+0x8c>
the_thread->Wait.return_code = EINTR;
5c488: 7004 moveq #4,%d0
the_info = (siginfo_t *) the_thread->Wait.return_argument;
5c48a: 266a 0028 moveal %a2@(40),%a3
*/
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;
5c48e: 2540 0034 movel %d0,%a2@(52)
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
5c492: 4a84 tstl %d4
5c494: 66c8 bnes 5c45e <_POSIX_signals_Unblock_thread+0xae><== ALWAYS TAKEN
the_info->si_signo = signo;
the_info->si_code = SI_USER;
5c496: 103c 0001 moveb #1,%d0
the_thread->Wait.return_code = EINTR;
the_info = (siginfo_t *) the_thread->Wait.return_argument;
if ( !info ) {
the_info->si_signo = signo;
5c49a: 2688 movel %a0,%a3@
the_info->si_code = SI_USER;
5c49c: 2740 0004 movel %d0,%a3@(4)
the_info->si_value.sival_int = 0;
5c4a0: 42ab 0008 clrl %a3@(8)
} else {
*the_info = *info;
}
_Thread_queue_Extract_with_proxy( the_thread );
5c4a4: 2f0a movel %a2,%sp@- 5c4a6: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy>
return true;
5c4ac: 588f addql #4,%sp 5c4ae: 7001 moveq #1,%d0 5c4b0: 60c2 bras 5c474 <_POSIX_signals_Unblock_thread+0xc4>
_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 );
5c4b2: 486a 0048 pea %a2@(72) 5c4b6: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 5c4bc: 588f addql #4,%sp 5c4be: 2f3c 1003 fff8 movel #268697592,%sp@- 5c4c4: 2f0a movel %a2,%sp@- 5c4c6: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 5c4cc: 508f addql #8,%sp
} else if ( the_thread->current_state == STATES_READY ) {
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
}
}
return false;
5c4ce: 4200 clrb %d0 5c4d0: 6000 ff4a braw 5c41c <_POSIX_signals_Unblock_thread+0x6c>
(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 ) )
_Context_Switch_necessary = true;
5c4d4: 7001 moveq #1,%d0
}
}
return false;
}
5c4d6: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 5c4dc: 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 ) )
_Context_Switch_necessary = true;
5c4de: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
}
}
return false;
5c4e4: 4200 clrb %d0 <== NOT EXECUTED
}
0004c39a <_RTEMS_tasks_Create_extension>:
bool _RTEMS_tasks_Create_extension(
Thread_Control *executing,
Thread_Control *created
)
{
4c39a: 4e56 0000 linkw %fp,#0 4c39e: 2f0a movel %a2,%sp@- 4c3a0: 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() )
4c3a4: 4a39 0005 e2f4 tstb 5e2f4 <Configuration_RTEMS_API+0x4>
4c3aa: 6758 beqs 4c404 <_RTEMS_tasks_Create_extension+0x6a>
/*
* 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 );
4c3ac: 705e moveq #94,%d0
if ( !rtems_configuration_get_notepads_enabled() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
4c3ae: 2f00 movel %d0,%sp@- 4c3b0: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
if ( !api )
4c3b6: 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 );
4c3b8: 2040 moveal %d0,%a0
if ( !api )
4c3ba: 4a80 tstl %d0
4c3bc: 6758 beqs 4c416 <_RTEMS_tasks_Create_extension+0x7c>
return false;
created->API_Extensions[ THREAD_API_RTEMS ] = api;
4c3be: 2540 010a movel %d0,%a2@(266)
*/
RTEMS_INLINE_ROUTINE void _ASR_Initialize (
ASR_Information *information
)
{
information->is_enabled = false;
4c3c2: 4200 clrb %d0
api->pending_events = EVENT_SETS_NONE_PENDING;
4c3c4: 4290 clrl %a0@ 4c3c6: 1140 0008 moveb %d0,%a0@(8)
api->event_condition = 0;
4c3ca: 42a8 0004 clrl %a0@(4)
information->handler = NULL;
4c3ce: 42a8 000a clrl %a0@(10)
information->mode_set = RTEMS_DEFAULT_MODES;
4c3d2: 42a8 000e clrl %a0@(14)
information->signals_posted = 0;
4c3d6: 42a8 0012 clrl %a0@(18)
information->signals_pending = 0;
4c3da: 42a8 0016 clrl %a0@(22)
information->nest_level = 0;
4c3de: 42a8 001a clrl %a0@(26)
_ASR_Initialize( &api->Signal ); created->task_variables = NULL;
4c3e2: 42aa 0116 clrl %a2@(278)
if ( rtems_configuration_get_notepads_enabled() ) {
4c3e6: 4a39 0005 e2f4 tstb 5e2f4 <Configuration_RTEMS_API+0x4>
4c3ec: 670c beqs 4c3fa <_RTEMS_tasks_Create_extension+0x60>
* task is created via another API, then this routine is invoked
* and this API given the opportunity to initialize its extension
* area.
*/
bool _RTEMS_tasks_Create_extension(
4c3ee: 41e8 001e lea %a0@(30),%a0 4c3f2: 7010 moveq #16,%d0
_ASR_Initialize( &api->Signal );
created->task_variables = NULL;
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
4c3f4: 4298 clrl %a0@+ 4c3f6: 5380 subql #1,%d0
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++)
4c3f8: 66fa bnes 4c3f4 <_RTEMS_tasks_Create_extension+0x5a>
api->Notepads[i] = 0;
}
return true;
}
4c3fa: 246e fffc moveal %fp@(-4),%a2 4c3fe: 4e5e unlk %fp
if ( rtems_configuration_get_notepads_enabled() ) {
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
4c400: 7001 moveq #1,%d0
}
4c402: 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() )
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
4c404: 701e moveq #30,%d0
api = _Workspace_Allocate( to_allocate );
4c406: 2f00 movel %d0,%sp@- 4c408: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
if ( !api )
4c40e: 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 );
4c410: 2040 moveal %d0,%a0
if ( !api )
4c412: 4a80 tstl %d0
4c414: 66a8 bnes 4c3be <_RTEMS_tasks_Create_extension+0x24><== ALWAYS TAKEN
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
4c416: 246e fffc moveal %fp@(-4),%a2 4c41a: 4e5e unlk %fp
to_allocate -= (RTEMS_NUMBER_NOTEPADS * sizeof(uint32_t));
api = _Workspace_Allocate( to_allocate );
if ( !api )
return false;
4c41c: 4200 clrb %d0 <== NOT EXECUTED
for (i=0; i < RTEMS_NUMBER_NOTEPADS; i++)
api->Notepads[i] = 0;
}
return true;
}
0004c344 <_RTEMS_tasks_Delete_extension>:
void _RTEMS_tasks_Delete_extension(
Thread_Control *executing,
Thread_Control *deleted
)
{
4c344: 4e56 fff4 linkw %fp,#-12 4c348: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4c34c: 246e 000c moveal %fp@(12),%a2 4c350: 47f9 0004 c46c lea 4c46c <_RTEMS_Tasks_Invoke_task_variable_dtor>,%a3
/*
* Free per task variable memory
*/
tvp = deleted->task_variables;
4c356: 206a 0116 moveal %a2@(278),%a0
deleted->task_variables = NULL;
4c35a: 42aa 0116 clrl %a2@(278)
while (tvp) {
4c35e: 4a88 tstl %a0
4c360: 671e beqs 4c380 <_RTEMS_tasks_Delete_extension+0x3c>
next = (rtems_task_variable_t *)tvp->next;
4c362: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4c364: 2f08 movel %a0,%sp@- 4c366: 2f0a movel %a2,%sp@- 4c368: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4c36a: 508f addql #8,%sp 4c36c: 4a82 tstl %d2
4c36e: 6710 beqs 4c380 <_RTEMS_tasks_Delete_extension+0x3c><== NEVER TAKEN
next = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
tvp = next;
4c370: 2042 moveal %d2,%a0
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
next = (rtems_task_variable_t *)tvp->next;
4c372: 2410 movel %a0@,%d2
_RTEMS_Tasks_Invoke_task_variable_dtor( deleted, tvp );
4c374: 2f08 movel %a0,%sp@- 4c376: 2f0a movel %a2,%sp@- 4c378: 4e93 jsr %a3@
* Free per task variable memory
*/
tvp = deleted->task_variables;
deleted->task_variables = NULL;
while (tvp) {
4c37a: 508f addql #8,%sp 4c37c: 4a82 tstl %d2
4c37e: 66f0 bnes 4c370 <_RTEMS_tasks_Delete_extension+0x2c>
/*
* Free API specific memory
*/
(void) _Workspace_Free( deleted->API_Extensions[ THREAD_API_RTEMS ] );
4c380: 2f2a 010a movel %a2@(266),%sp@- 4c384: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free>
deleted->API_Extensions[ THREAD_API_RTEMS ] = NULL;
4c38a: 588f addql #4,%sp 4c38c: 42aa 010a clrl %a2@(266)
}
4c390: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
4c396: 4e5e unlk %fp <== NOT EXECUTED
00046a6c <_RTEMS_tasks_Initialize_user_tasks_body>:
*
* Output parameters: NONE
*/
void _RTEMS_tasks_Initialize_user_tasks_body( void )
{
46a6c: 4e56 ffe4 linkw %fp,#-28 46a70: 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;
46a74: 2479 0005 e31a moveal 5e31a <Configuration_RTEMS_API+0x2a>,%a2
maximum = Configuration_RTEMS_API.number_of_initialization_tasks;
46a7a: 2639 0005 e316 movel 5e316 <Configuration_RTEMS_API+0x26>,%d3
/*
* Verify that we have a set of user tasks to iterate
*/
if ( !user_tasks )
46a80: 4a8a tstl %a2
46a82: 6754 beqs 46ad8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46a84: 4a83 tstl %d3
46a86: 6750 beqs 46ad8 <_RTEMS_tasks_Initialize_user_tasks_body+0x6c><== NEVER TAKEN
46a88: 280e movel %fp,%d4 46a8a: 4282 clrl %d2 46a8c: 5984 subql #4,%d4 46a8e: 47f9 0004 6844 lea 46844 <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(
46a94: 49f9 0004 6af4 lea 46af4 <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(
46a9a: 2f04 movel %d4,%sp@- 46a9c: 2f2a 000c movel %a2@(12),%sp@- 46aa0: 2f2a 0014 movel %a2@(20),%sp@- 46aa4: 2f2a 0004 movel %a2@(4),%sp@- 46aa8: 2f2a 0008 movel %a2@(8),%sp@- 46aac: 2f12 movel %a2@,%sp@- 46aae: 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 ) )
46ab0: 4fef 0018 lea %sp@(24),%sp 46ab4: 4a80 tstl %d0
46ab6: 662a bnes 46ae2 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
_Internal_error_Occurred( INTERNAL_ERROR_RTEMS_API, true, return_value );
return_value = rtems_task_start(
46ab8: 2f2a 0018 movel %a2@(24),%sp@- 46abc: 2f2a 0010 movel %a2@(16),%sp@- 46ac0: 2f2e fffc movel %fp@(-4),%sp@- 46ac4: 4e94 jsr %a4@
id,
user_tasks[ index ].entry_point,
user_tasks[ index ].argument
);
if ( !rtems_is_status_successful( return_value ) )
46ac6: 4fef 000c lea %sp@(12),%sp 46aca: 4a80 tstl %d0
46acc: 6614 bnes 46ae2 <_RTEMS_tasks_Initialize_user_tasks_body+0x76>
return;
/*
* Now iterate over the initialization tasks and create/start them.
*/
for ( index=0 ; index < maximum ; index++ ) {
46ace: 5282 addql #1,%d2 46ad0: 45ea 001c lea %a2@(28),%a2 46ad4: b483 cmpl %d3,%d2
46ad6: 65c2 bcss 46a9a <_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 );
}
}
46ad8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 46ade: 4e5e unlk %fp 46ae0: 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 );
46ae2: 2f00 movel %d0,%sp@- 46ae4: 4878 0001 pea 1 <ADD> 46ae8: 4878 0001 pea 1 <ADD> 46aec: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred>
...
0004c2c8 <_RTEMS_tasks_Post_switch_extension>:
*/
void _RTEMS_tasks_Post_switch_extension(
Thread_Control *executing
)
{
4c2c8: 4e56 ffec linkw %fp,#-20 4c2cc: 206e 0008 moveal %fp@(8),%a0 4c2d0: 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 ];
4c2d4: 2468 010a moveal %a0@(266),%a2
if ( !api )
4c2d8: 4a8a tstl %a2
4c2da: 671a beqs 4c2f6 <_RTEMS_tasks_Post_switch_extension+0x2e><== NEVER TAKEN
* Signal Processing
*/
asr = &api->Signal;
_ISR_Disable( level );
4c2dc: 203c 0000 0700 movel #1792,%d0 4c2e2: 40c1 movew %sr,%d1 4c2e4: 8081 orl %d1,%d0 4c2e6: 46c0 movew %d0,%sr
signal_set = asr->signals_posted;
4c2e8: 242a 0012 movel %a2@(18),%d2
asr->signals_posted = 0;
4c2ec: 42aa 0012 clrl %a2@(18)
_ISR_Enable( level );
4c2f0: 46c1 movew %d1,%sr
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
4c2f2: 4a82 tstl %d2
4c2f4: 660a bnes 4c300 <_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 );
}
4c2f6: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4c2fc: 4e5e unlk %fp 4c2fe: 4e75 rts
if ( !signal_set ) /* similar to _ASR_Are_signals_pending( asr ) */
return;
asr->nest_level += 1;
4c300: 52aa 001a addql #1,%a2@(26)
rtems_task_mode( asr->mode_set, RTEMS_ALL_MODE_MASKS, &prev_mode );
4c304: 260e movel %fp,%d3 4c306: 5983 subql #4,%d3 4c308: 47f9 0004 e488 lea 4e488 <rtems_task_mode>,%a3 4c30e: 2f03 movel %d3,%sp@- 4c310: 2f3c 0000 ffff movel #65535,%sp@- 4c316: 2f2a 000e movel %a2@(14),%sp@- 4c31a: 4e93 jsr %a3@
(*asr->handler)( signal_set );
4c31c: 2f02 movel %d2,%sp@- 4c31e: 206a 000a moveal %a2@(10),%a0 4c322: 4e90 jsr %a0@
asr->nest_level -= 1;
4c324: 53aa 001a subql #1,%a2@(26)
rtems_task_mode( prev_mode, RTEMS_ALL_MODE_MASKS, &prev_mode );
4c328: 2f03 movel %d3,%sp@- 4c32a: 2f3c 0000 ffff movel #65535,%sp@- 4c330: 2f2e fffc movel %fp@(-4),%sp@- 4c334: 4e93 jsr %a3@ 4c336: 4fef 001c lea %sp@(28),%sp
}
4c33a: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3
4c340: 4e5e unlk %fp <== NOT EXECUTED
0004c26e <_RTEMS_tasks_Switch_extension>:
void _RTEMS_tasks_Switch_extension(
Thread_Control *executing,
Thread_Control *heir
)
{
4c26e: 4e56 0000 linkw %fp,#0 4c272: 206e 0008 moveal %fp@(8),%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
4c276: 2068 0116 moveal %a0@(278),%a0
while (tvp) {
4c27a: 4a88 tstl %a0
4c27c: 6712 beqs 4c290 <_RTEMS_tasks_Switch_extension+0x22>
tvp->tval = *tvp->ptr;
4c27e: 2268 0004 moveal %a0@(4),%a1 4c282: 2151 000c movel %a1@,%a0@(12)
*tvp->ptr = tvp->gval;
4c286: 22a8 0008 movel %a0@(8),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c28a: 2050 moveal %a0@,%a0
/*
* Per Task Variables
*/
tvp = executing->task_variables;
while (tvp) {
4c28c: 4a88 tstl %a0
4c28e: 66ee bnes 4c27e <_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;
4c290: 206e 000c moveal %fp@(12),%a0 4c294: 2068 0116 moveal %a0@(278),%a0
while (tvp) {
4c298: 4a88 tstl %a0
4c29a: 6712 beqs 4c2ae <_RTEMS_tasks_Switch_extension+0x40>
tvp->gval = *tvp->ptr;
4c29c: 2268 0004 moveal %a0@(4),%a1 4c2a0: 2151 0008 movel %a1@,%a0@(8)
*tvp->ptr = tvp->tval;
4c2a4: 22a8 000c movel %a0@(12),%a1@
tvp = (rtems_task_variable_t *)tvp->next;
4c2a8: 2050 moveal %a0@,%a0
*tvp->ptr = tvp->gval;
tvp = (rtems_task_variable_t *)tvp->next;
}
tvp = heir->task_variables;
while (tvp) {
4c2aa: 4a88 tstl %a0
4c2ac: 66ee bnes 4c29c <_RTEMS_tasks_Switch_extension+0x2e><== NEVER TAKEN
tvp->gval = *tvp->ptr;
*tvp->ptr = tvp->tval;
tvp = (rtems_task_variable_t *)tvp->next;
}
}
4c2ae: 4e5e unlk %fp <== NOT EXECUTED
00047b44 <_Rate_monotonic_Timeout>:
void _Rate_monotonic_Timeout(
Objects_Id id,
void *ignored
)
{
47b44: 4e56 fffc linkw %fp,#-4 47b48: 2f0a movel %a2,%sp@- 47b4a: 486e fffc pea %fp@(-4) 47b4e: 2f2e 0008 movel %fp@(8),%sp@- 47b52: 4879 0006 1b1c pea 61b1c <_Rate_monotonic_Information> 47b58: 4eb9 0004 9b08 jsr 49b08 <_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 ) {
47b5e: 4fef 000c lea %sp@(12),%sp 47b62: 2440 moveal %d0,%a2 47b64: 4aae fffc tstl %fp@(-4)
47b68: 6636 bnes 47ba0 <_Rate_monotonic_Timeout+0x5c> <== NEVER TAKEN
case OBJECTS_LOCAL:
the_thread = the_period->owner;
47b6a: 206a 0040 moveal %a2@(64),%a0
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_for_period (
States_Control the_states
)
{
return (the_states & STATES_WAITING_FOR_PERIOD);
47b6e: 2028 0010 movel %a0@(16),%d0 47b72: 0280 0000 4000 andil #16384,%d0
if ( _States_Is_waiting_for_period( the_thread->current_state ) &&
47b78: 670a beqs 47b84 <_Rate_monotonic_Timeout+0x40>
47b7a: 202a 0008 movel %a2@(8),%d0 47b7e: b0a8 0020 cmpl %a0@(32),%d0
47b82: 675e beqs 47be2 <_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 ) {
47b84: 7001 moveq #1,%d0 47b86: b0aa 0038 cmpl %a2@(56),%d0
47b8a: 671c beqs 47ba8 <_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;
47b8c: 7004 moveq #4,%d0 47b8e: 2540 0038 movel %d0,%a2@(56)
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47b92: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47b98: 5380 subql #1,%d0 47b9a: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level>
case OBJECTS_REMOTE: /* impossible */
#endif
case OBJECTS_ERROR:
break;
}
}
47ba0: 246e fff8 moveal %fp@(-8),%a2 47ba4: 4e5e unlk %fp 47ba6: 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;
47ba8: 103c 0003 moveb #3,%d0 47bac: 2540 0038 movel %d0,%a2@(56)
_Rate_monotonic_Initiate_statistics( the_period );
47bb0: 2f0a movel %a2,%sp@- 47bb2: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47bb8: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47bbe: 486a 0010 pea %a2@(16) 47bc2: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 47bc8: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert> 47bce: 4fef 000c lea %sp@(12),%sp 47bd2: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47bd8: 5380 subql #1,%d0 47bda: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47be0: 60be bras 47ba0 <_Rate_monotonic_Timeout+0x5c>
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
47be2: 2f3c 1003 fff8 movel #268697592,%sp@- 47be8: 2f08 movel %a0,%sp@- 47bea: 4eb9 0004 a02c jsr 4a02c <_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 );
47bf0: 2f0a movel %a2,%sp@- 47bf2: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47bf8: 256a 003c 001c movel %a2@(60),%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47bfe: 486a 0010 pea %a2@(16) 47c02: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 47c08: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, the_period->next_length );
47c0e: 4fef 0014 lea %sp@(20),%sp
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
47c12: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47c18: 5380 subql #1,%d0 47c1a: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47c20: 6000 ff7e braw 47ba0 <_Rate_monotonic_Timeout+0x5c>
00048f28 <_TOD_Set>:
*/
void _TOD_Set(
const struct timespec *time
)
{
48f28: 4e56 0000 linkw %fp,#0 48f2c: 2039 0006 a0dc movel 6a0dc <_Thread_Dispatch_disable_level>,%d0 48f32: 5280 addql #1,%d0 48f34: 2f0a movel %a2,%sp@- 48f36: 246e 0008 moveal %fp@(8),%a2 48f3a: 23c0 0006 a0dc movel %d0,6a0dc <_Thread_Dispatch_disable_level>
long seconds;
_Thread_Disable_dispatch();
_TOD_Deactivate();
seconds = _TOD_Seconds_since_epoch();
48f40: 2039 0006 a166 movel 6a166 <_TOD_Now>,%d0
if ( time->tv_sec < seconds )
48f46: 2212 movel %a2@,%d1 48f48: b280 cmpl %d0,%d1
48f4a: 6d38 blts 48f84 <_TOD_Set+0x5c>
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
_Watchdog_Adjust( &_Watchdog_Seconds_chain, direction, units );
48f4c: 9280 subl %d0,%d1 48f4e: 2f01 movel %d1,%sp@- 48f50: 42a7 clrl %sp@- 48f52: 4879 0006 a192 pea 6a192 <_Watchdog_Seconds_chain> 48f58: 4eb9 0004 b754 jsr 4b754 <_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 );
48f5e: 23d2 0006 a166 movel %a2@,6a166 <_TOD_Now> 48f64: 588a addql #4,%a2 48f66: 4fef 000c lea %sp@(12),%sp 48f6a: 23d2 0006 a16a movel %a2@,6a16a <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
48f70: 246e fffc moveal %fp@(-4),%a2 48f74: 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;
48f76: 7001 moveq #1,%d0 48f78: 13c0 0006 a0ec moveb %d0,6a0ec <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
48f7e: 4ef9 0004 a372 jmp 4a372 <_Thread_Enable_dispatch> 48f84: 9081 subl %d1,%d0 48f86: 2f00 movel %d0,%sp@- 48f88: 4878 0001 pea 1 <ADD> 48f8c: 4879 0006 a192 pea 6a192 <_Watchdog_Seconds_chain> 48f92: 4eb9 0004 b754 jsr 4b754 <_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 );
48f98: 23d2 0006 a166 movel %a2@,6a166 <_TOD_Now> 48f9e: 588a addql #4,%a2 48fa0: 4fef 000c lea %sp@(12),%sp 48fa4: 23d2 0006 a16a movel %a2@,6a16a <_TOD_Now+0x4>
_TOD_Is_set = true;
_TOD_Activate();
_Thread_Enable_dispatch();
}
48faa: 246e fffc moveal %fp@(-4),%a2 48fae: 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;
48fb0: 7001 moveq #1,%d0 48fb2: 13c0 0006 a0ec moveb %d0,6a0ec <_TOD_Is_set>
_TOD_Activate();
_Thread_Enable_dispatch();
48fb8: 4ef9 0004 a372 jmp 4a372 <_Thread_Enable_dispatch>
...
00047554 <_TOD_Validate>:
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47554: 4e56 0000 linkw %fp,#0 47558: 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();
4755c: 2039 0006 0b70 movel 60b70 <Configuration+0xc>,%d0
*/
bool _TOD_Validate(
const rtems_time_of_day *the_tod
)
{
47562: 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) ||
47564: 4a88 tstl %a0
47566: 6762 beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN
)
{
uint32_t days_in_month;
uint32_t ticks_per_second;
ticks_per_second = TOD_MICROSECONDS_PER_SECOND /
47568: 243c 000f 4240 movel #1000000,%d2 4756e: 4c40 2002 remul %d0,%d2,%d2
rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) ||
47572: b4a8 0018 cmpl %a0@(24),%d2
47576: 6352 blss 475ca <_TOD_Validate+0x76>
(the_tod->ticks >= ticks_per_second) ||
47578: 703b moveq #59,%d0 4757a: b0a8 0014 cmpl %a0@(20),%d0
4757e: 654a bcss 475ca <_TOD_Validate+0x76>
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
47580: b0a8 0010 cmpl %a0@(16),%d0
47584: 6544 bcss 475ca <_TOD_Validate+0x76>
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
47586: 7217 moveq #23,%d1 47588: b2a8 000c cmpl %a0@(12),%d1
4758c: 653c bcss 475ca <_TOD_Validate+0x76>
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
4758e: 2028 0004 movel %a0@(4),%d0
rtems_configuration_get_microseconds_per_tick();
if ((!the_tod) ||
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
47592: 6736 beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->month == 0) ||
47594: 740c moveq #12,%d2 47596: b480 cmpl %d0,%d2
47598: 6530 bcss 475ca <_TOD_Validate+0x76>
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
4759a: 2210 movel %a0@,%d1
(the_tod->ticks >= ticks_per_second) ||
(the_tod->second >= TOD_SECONDS_PER_MINUTE) ||
(the_tod->minute >= TOD_MINUTES_PER_HOUR) ||
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
4759c: 0c81 0000 07c3 cmpil #1987,%d1
475a2: 6326 blss 475ca <_TOD_Validate+0x76>
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
475a4: 2068 0008 moveal %a0@(8),%a0
(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) ||
475a8: 4a88 tstl %a0
475aa: 671e beqs 475ca <_TOD_Validate+0x76> <== NEVER TAKEN
(the_tod->day == 0) )
return false;
if ( (the_tod->year % 4) == 0 )
475ac: 143c 0003 moveb #3,%d2 475b0: c282 andl %d2,%d1
475b2: 661e bnes 475d2 <_TOD_Validate+0x7e>
days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ];
475b4: 43f9 0005 fb2a lea 5fb2a <_TOD_Days_per_month>,%a1 475ba: 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(
475be: b1c0 cmpal %d0,%a0 475c0: 53c0 sls %d0 475c2: 4480 negl %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
475c4: 241f movel %sp@+,%d2 475c6: 4e5e unlk %fp 475c8: 4e75 rts 475ca: 241f movel %sp@+,%d2 475cc: 4e5e unlk %fp
(the_tod->hour >= TOD_HOURS_PER_DAY) ||
(the_tod->month == 0) ||
(the_tod->month > TOD_MONTHS_PER_YEAR) ||
(the_tod->year < TOD_BASE_YEAR) ||
(the_tod->day == 0) )
return false;
475ce: 4200 clrb %d0
if ( the_tod->day > days_in_month )
return false;
return true;
}
475d0: 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 ];
475d2: 43f9 0005 fb2a lea 5fb2a <_TOD_Days_per_month>,%a1 475d8: 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(
475dc: b1c0 cmpal %d0,%a0 475de: 53c0 sls %d0 475e0: 4480 negl %d0 475e2: 60e0 bras 475c4 <_TOD_Validate+0x70>
0004837c <_Thread_Change_priority>:
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4837c: 4e56 fff0 linkw %fp,#-16 48380: 48d7 041c moveml %d2-%d4/%a2,%sp@ 48384: 246e 0008 moveal %fp@(8),%a2
*/
/*
* Save original state
*/
original_state = the_thread->current_state;
48388: 262a 0010 movel %a2@(16),%d3
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
4838c: 242e 000c movel %fp@(12),%d2
/* * 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 );
48390: 2f0a movel %a2,%sp@-
void _Thread_Change_priority(
Thread_Control *the_thread,
Priority_Control new_priority,
bool prepend_it
)
{
48392: 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 );
48396: 4eb9 0004 9388 jsr 49388 <_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 )
4839c: 588f addql #4,%sp 4839e: b4aa 0014 cmpl %a2@(20),%d2
483a2: 670c beqs 483b0 <_Thread_Change_priority+0x34>
_Thread_Set_priority( the_thread, new_priority );
483a4: 2f02 movel %d2,%sp@- 483a6: 2f0a movel %a2,%sp@- 483a8: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority> 483ae: 508f addql #8,%sp
_ISR_Disable( level );
483b0: 203c 0000 0700 movel #1792,%d0 483b6: 40c1 movew %sr,%d1 483b8: 8081 orl %d1,%d0 483ba: 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;
483bc: 202a 0010 movel %a2@(16),%d0
if ( state != STATES_TRANSIENT ) {
483c0: 7404 moveq #4,%d2 483c2: b480 cmpl %d0,%d2
483c4: 6738 beqs 483fe <_Thread_Change_priority+0x82>
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) )
483c6: 44c3 movew %d3,%ccr
483c8: 6708 beqs 483d2 <_Thread_Change_priority+0x56> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
483ca: 74fb moveq #-5,%d2 483cc: c480 andl %d0,%d2 483ce: 2542 0010 movel %d2,%a2@(16)
the_thread->current_state = _States_Clear( STATES_TRANSIENT, state );
_ISR_Enable( level );
483d2: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
483d4: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( state ) ) {
483da: 660a bnes 483e6 <_Thread_Change_priority+0x6a>
if ( !_Thread_Is_executing_also_the_heir() &&
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
483dc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483e2: 4e5e unlk %fp 483e4: 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 );
483e6: 2d4a 000c movel %a2,%fp@(12) 483ea: 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 );
}
483f0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 483f6: 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 );
483f8: 4ef9 0004 9158 jmp 49158 <_Thread_queue_Requeue>
}
return;
}
/* Only clear the transient state if it wasn't set already */
if ( ! _States_Is_transient( original_state ) ) {
483fe: 44c3 movew %d3,%ccr
48400: 673c beqs 4843e <_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;
48402: 206a 008e moveal %a2@(142),%a0 48406: 302a 0094 movew %a2@(148),%d0 4840a: 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 );
4840c: 42aa 0010 clrl %a2@(16) 48410: 8082 orl %d2,%d0 48412: 3080 movew %d0,%a0@
_Priority_Major_bit_map |= the_priority_map->ready_major;
48414: 3439 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d2 4841a: 302a 0092 movew %a2@(146),%d0 4841e: 8082 orl %d2,%d0 48420: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map>
_Priority_Add_to_bit_map( &the_thread->Priority_map );
if ( prepend_it )
48426: 4a04 tstb %d4 48428: 6700 0082 beqw 484ac <_Thread_Change_priority+0x130>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Head(
Chain_Control *the_chain
)
{
return (Chain_Node *) the_chain;
4842c: 206a 008a moveal %a2@(138),%a0
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
48430: 2250 moveal %a0@,%a1
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
48432: 2548 0004 movel %a0,%a2@(4)
before_node = after_node->next; after_node->next = the_node;
48436: 208a movel %a2,%a0@
the_node->next = before_node; before_node->previous = the_node;
48438: 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;
4843c: 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 );
4843e: 203c 0000 0700 movel #1792,%d0 48444: 46c1 movew %d1,%sr 48446: 8081 orl %d1,%d0 48448: 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 );
4844a: 3039 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d0 48450: 4840 swap %d0 48452: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
48454: 4282 clrl %d2 48456: 41f9 0005 fbe4 lea 5fbe4 <_Priority_Bit_map>,%a0 4845c: 3400 movew %d0,%d2 4845e: 3030 2a00 movew %a0@(00000000,%d2:l:2),%d0 48462: 4840 swap %d0 48464: 04c0 ff1 %d0
return (_Priority_Bits_index( major ) << 4) +
48466: 4283 clrl %d3 48468: e98a lsll #4,%d2 4846a: 3600 movew %d0,%d3
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
4846c: 2279 0005 fa90 moveal 5fa90 <_Thread_Ready_chain>,%a1 48472: 2002 movel %d2,%d0 48474: d083 addl %d3,%d0 48476: 2400 movel %d0,%d2 48478: e58a lsll #2,%d2 4847a: 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 );
4847c: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
48482: 93c2 subal %d2,%a1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
48484: 2031 0800 movel %a1@(00000000,%d0:l),%d0 48488: 23c0 0005 ff70 movel %d0,5ff70 <_Per_CPU_Information+0x10>
* We altered the set of thread priorities. So let's figure out
* who is the heir and if we need to switch to them.
*/
_Thread_Calculate_heir();
if ( !_Thread_Is_executing_also_the_heir() &&
4848e: b1c0 cmpal %d0,%a0
48490: 670e beqs 484a0 <_Thread_Change_priority+0x124>
48492: 4a28 0074 tstb %a0@(116)
48496: 6708 beqs 484a0 <_Thread_Change_priority+0x124>
_Thread_Executing->is_preemptible )
_Context_Switch_necessary = true;
48498: 7401 moveq #1,%d2 4849a: 13c2 0005 ff78 moveb %d2,5ff78 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
484a0: 46c1 movew %d1,%sr
}
484a2: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 484a8: 4e5e unlk %fp 484aa: 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 );
484ac: 206a 008a moveal %a2@(138),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
484b0: 2008 movel %a0,%d0 484b2: 5880 addql #4,%d0
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
484b4: 2268 0008 moveal %a0@(8),%a1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
484b8: 2480 movel %d0,%a2@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
484ba: 214a 0008 movel %a2,%a0@(8)
old_last_node->next = the_node;
484be: 228a movel %a2,%a1@
the_node->previous = old_last_node;
484c0: 2549 0004 movel %a1,%a2@(4) 484c4: 6000 ff78 braw 4843e <_Thread_Change_priority+0xc2>
000484c8 <_Thread_Clear_state>:
)
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
484c8: 327c 0700 moveaw #1792,%a1 484cc: 2009 movel %a1,%d0
void _Thread_Clear_state(
Thread_Control *the_thread,
States_Control state
)
{
484ce: 4e56 ffec linkw %fp,#-20 484d2: 206e 0008 moveal %fp@(8),%a0 484d6: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 484da: 242e 000c movel %fp@(12),%d2
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
484de: 40c3 movew %sr,%d3 484e0: 8083 orl %d3,%d0 484e2: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
484e4: 2228 0010 movel %a0@(16),%d1
if ( current_state & state ) {
484e8: 2002 movel %d2,%d0 484ea: c081 andl %d1,%d0
484ec: 6776 beqs 48564 <_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);
484ee: 2002 movel %d2,%d0 484f0: 4680 notl %d0 484f2: c081 andl %d1,%d0
current_state =
the_thread->current_state = _States_Clear( state, current_state );
484f4: 2140 0010 movel %d0,%a0@(16)
if ( _States_Is_ready( current_state ) ) {
484f8: 666a bnes 48564 <_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;
484fa: 2868 008e moveal %a0@(142),%a4
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
484fe: 2468 008a moveal %a0@(138),%a2 48502: 3214 movew %a4@,%d1 48504: 3028 0094 movew %a0@(148),%d0
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
48508: 266a 0008 moveal %a2@(8),%a3 4850c: 8081 orl %d1,%d0 4850e: 3880 movew %d0,%a4@
_Priority_Major_bit_map |= the_priority_map->ready_major;
48510: 3239 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d1 48516: 3028 0092 movew %a0@(146),%d0 4851a: 8081 orl %d1,%d0 4851c: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48522: 200a movel %a2,%d0 48524: 5880 addql #4,%d0 48526: 2080 movel %d0,%a0@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
48528: 2548 0008 movel %a0,%a2@(8)
old_last_node->next = the_node;
4852c: 2688 movel %a0,%a3@
the_node->previous = old_last_node;
4852e: 214b 0004 movel %a3,%a0@(4)
_ISR_Flash( level );
48532: 2009 movel %a1,%d0 48534: 46c3 movew %d3,%sr 48536: 8083 orl %d3,%d0 48538: 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 ) {
4853a: 2028 0014 movel %a0@(20),%d0 4853e: 2279 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a1 48544: b0a9 0014 cmpl %a1@(20),%d0
48548: 641a bccs 48564 <_Thread_Clear_state+0x9c>
_Thread_Heir = the_thread;
4854a: 23c8 0005 ff70 movel %a0,5ff70 <_Per_CPU_Information+0x10>
if ( _Thread_Executing->is_preemptible ||
48550: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 48556: 4a28 0074 tstb %a0@(116)
4855a: 6712 beqs 4856e <_Thread_Clear_state+0xa6>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4855c: 7001 moveq #1,%d0 4855e: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
}
}
}
_ISR_Enable( level );
48564: 46c3 movew %d3,%sr
}
48566: 4cd7 1c0c moveml %sp@,%d2-%d3/%a2-%a4 4856a: 4e5e unlk %fp 4856c: 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 ||
4856e: 4a80 tstl %d0
48570: 66f2 bnes 48564 <_Thread_Clear_state+0x9c> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
48572: 7001 moveq #1,%d0 <== NOT EXECUTED 48574: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4857a: 60e8 bras 48564 <_Thread_Clear_state+0x9c> <== NOT EXECUTED
0004857c <_Thread_Close>:
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
4857c: 4280 clrl %d0
void _Thread_Close(
Objects_Information *information,
Thread_Control *the_thread
)
{
4857e: 4e56 0000 linkw %fp,#0 48582: 2f0b movel %a3,%sp@- 48584: 266e 0008 moveal %fp@(8),%a3 48588: 2f0a movel %a2,%sp@- 4858a: 246e 000c moveal %fp@(12),%a2
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4858e: 206b 0018 moveal %a3@(24),%a0
RTEMS_INLINE_ROUTINE void _Objects_Invalidate_Id(
Objects_Information *information,
Objects_Control *the_object
)
{
_Objects_Set_local_object(
48592: 302a 000a movew %a2@(10),%d0
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48596: 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;
4859a: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 485a0: 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 );
485a2: 2f0a movel %a2,%sp@- 485a4: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 485aa: 4eb9 0004 99ec jsr 499ec <_User_extensions_Thread_delete>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
485b0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 485b6: 5280 addql #1,%d0 485b8: 23c0 0005 fadc movel %d0,5fadc <_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 );
485be: 2f0a movel %a2,%sp@- 485c0: 2f0b movel %a3,%sp@- 485c2: 4eb9 0004 7b78 jsr 47b78 <_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 );
485c8: 4878 0001 pea 1 <ADD> 485cc: 2f0a movel %a2,%sp@- 485ce: 4eb9 0004 9274 jsr 49274 <_Thread_Set_state>
if ( !_Thread_queue_Extract_with_proxy( the_thread ) ) {
485d4: 2f0a movel %a2,%sp@- 485d6: 4eb9 0004 9054 jsr 49054 <_Thread_queue_Extract_with_proxy> 485dc: 4fef 0018 lea %sp@(24),%sp 485e0: 4a00 tstb %d0
485e2: 6608 bnes 485ec <_Thread_Close+0x70>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
485e4: 7002 moveq #2,%d0 485e6: b0aa 0050 cmpl %a2@(80),%d0
485ea: 6756 beqs 48642 <_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 ) )
485ec: b5f9 0005 fb5e cmpal 5fb5e <_Thread_Allocated_fp>,%a2
485f2: 6746 beqs 4863a <_Thread_Close+0xbe>
_Thread_Deallocate_fp();
#endif
the_thread->fp_context = NULL;
if ( the_thread->Start.fp_context )
485f4: 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;
485f8: 42aa 0102 clrl %a2@(258)
if ( the_thread->Start.fp_context )
485fc: 4a80 tstl %d0
485fe: 670a beqs 4860a <_Thread_Close+0x8e>
(void) _Workspace_Free( the_thread->Start.fp_context );
48600: 2f00 movel %d0,%sp@- 48602: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48608: 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 );
4860a: 2f0a movel %a2,%sp@- 4860c: 4eb9 0004 9470 jsr 49470 <_Thread_Stack_Free>
the_thread->Start.stack = NULL;
if ( the_thread->extensions )
48612: 202a 0112 movel %a2@(274),%d0 48616: 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;
48618: 42aa 00ca clrl %a2@(202)
if ( the_thread->extensions )
4861c: 4a80 tstl %d0
4861e: 670a beqs 4862a <_Thread_Close+0xae>
(void) _Workspace_Free( the_thread->extensions );
48620: 2f00 movel %d0,%sp@- 48622: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48628: 588f addql #4,%sp
the_thread->extensions = NULL;
4862a: 42aa 0112 clrl %a2@(274)
}
4862e: 246e fff8 moveal %fp@(-8),%a2 48632: 266e fffc moveal %fp@(-4),%a3 48636: 4e5e unlk %fp 48638: 4e75 rts
*/
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
RTEMS_INLINE_ROUTINE void _Thread_Deallocate_fp( void )
{
_Thread_Allocated_fp = NULL;
4863a: 42b9 0005 fb5e clrl 5fb5e <_Thread_Allocated_fp> 48640: 60b2 bras 485f4 <_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 );
48642: 486a 0048 pea %a2@(72) 48646: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4864c: 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 ) )
4864e: b5f9 0005 fb5e cmpal 5fb5e <_Thread_Allocated_fp>,%a2
48654: 669e bnes 485f4 <_Thread_Close+0x78> <== ALWAYS TAKEN
48656: 60e2 bras 4863a <_Thread_Close+0xbe> <== NOT EXECUTED
00048708 <_Thread_Delay_ended>:
void _Thread_Delay_ended(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
48708: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
4870c: 486e fffc pea %fp@(-4) 48710: 2f2e 0008 movel %fp@(8),%sp@- 48714: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get>
switch ( location ) {
4871a: 508f addql #8,%sp 4871c: 4aae fffc tstl %fp@(-4)
48720: 661e bnes 48740 <_Thread_Delay_ended+0x38> <== NEVER TAKEN
#if defined(RTEMS_MULTIPROCESSING)
case OBJECTS_REMOTE: /* impossible */
#endif
break;
case OBJECTS_LOCAL:
_Thread_Clear_state(
48722: 2f3c 1000 0018 movel #268435480,%sp@- 48728: 2f00 movel %d0,%sp@- 4872a: 4eb9 0004 84c8 jsr 484c8 <_Thread_Clear_state> 48730: 508f addql #8,%sp 48732: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 48738: 5380 subql #1,%d0 4873a: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
| STATES_INTERRUPTIBLE_BY_SIGNAL
);
_Thread_Unnest_dispatch();
break;
}
}
48740: 4e5e unlk %fp <== NOT EXECUTED
00048744 <_Thread_Dispatch>:
* dispatch thread
* no dispatch thread
*/
void _Thread_Dispatch( void )
{
48744: 4e56 ffc8 linkw %fp,#-56 48748: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
4874c: 283c 0000 0700 movel #1792,%d4 48752: 2004 movel %d4,%d0
{
Thread_Control *executing;
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
48754: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
4875a: 40c1 movew %sr,%d1 4875c: 8081 orl %d1,%d0 4875e: 46c0 movew %d0,%sr
while ( _Context_Switch_necessary == true ) {
48760: 1039 0005 ff78 moveb 5ff78 <_Per_CPU_Information+0x18>,%d0 48766: 6700 0120 beqw 48888 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
4876a: 7001 moveq #1,%d0 4876c: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
48772: 2679 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48778: 4200 clrb %d0
_Thread_Executing = heir;
4877a: 23cb 0005 ff6c movel %a3,5ff6c <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48780: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48786: b7ca cmpal %a2,%a3 48788: 6700 00fe beqw 48888 <_Thread_Dispatch+0x144> 4878c: 260e movel %fp,%d3 4878e: 240e movel %fp,%d2 48790: 5183 subql #8,%d3 48792: 2e3c 0004 c6f0 movel #313072,%d7 48798: 0682 ffff fff0 addil #-16,%d2 4879e: 2c3c 0004 97b0 movel #300976,%d6 487a4: 2a3c 0004 9768 movel #300904,%d5 487aa: 4bf9 0004 9a78 lea 49a78 <_User_extensions_Thread_switch>,%a5 487b0: 49f9 0004 9dec lea 49dec <_CPU_Context_switch>,%a4
*/
#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 )
487b6: 7001 moveq #1,%d0 487b8: b0ab 007a cmpl %a3@(122),%d0 487bc: 6700 00e2 beqw 488a0 <_Thread_Dispatch+0x15c>
heir->cpu_time_budget = _Thread_Ticks_per_timeslice;
_ISR_Enable( level );
487c0: 46c1 movew %d1,%sr
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
{
Timestamp_Control uptime, ran;
_TOD_Get_uptime( &uptime );
487c2: 2f03 movel %d3,%sp@- 487c4: 2047 moveal %d7,%a0 487c6: 4e90 jsr %a0@
_Timestamp_Subtract(
487c8: 2046 moveal %d6,%a0 487ca: 2f02 movel %d2,%sp@- 487cc: 2f03 movel %d3,%sp@- 487ce: 4879 0005 fb8a pea 5fb8a <_Thread_Time_of_last_context_switch> 487d4: 4e90 jsr %a0@
&_Thread_Time_of_last_context_switch,
&uptime,
&ran
);
_Timestamp_Add_to( &executing->cpu_time_used, &ran );
487d6: 2045 moveal %d5,%a0 487d8: 2f02 movel %d2,%sp@- 487da: 486a 0082 pea %a2@(130) 487de: 4e90 jsr %a0@
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
487e0: 2079 0005 fb62 moveal 5fb62 <_Thread_libc_reent>,%a0 487e6: 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;
487ea: 202e fff8 movel %fp@(-8),%d0 487ee: 222e fffc movel %fp@(-4),%d1 487f2: 23c0 0005 fb8a movel %d0,5fb8a <_Thread_Time_of_last_context_switch> 487f8: 23c1 0005 fb8e movel %d1,5fb8e <_Thread_Time_of_last_context_switch+0x4>
#endif
/*
* Switch libc's task specific data.
*/
if ( _Thread_libc_reent ) {
487fe: 4a88 tstl %a0
48800: 6708 beqs 4880a <_Thread_Dispatch+0xc6> <== NEVER TAKEN
executing->libc_reent = *_Thread_libc_reent;
48802: 2550 0106 movel %a0@,%a2@(262)
*_Thread_libc_reent = heir->libc_reent;
48806: 20ab 0106 movel %a3@(262),%a0@
}
_User_extensions_Thread_switch( executing, heir );
4880a: 2f0b movel %a3,%sp@- 4880c: 2f0a movel %a2,%sp@- 4880e: 4e95 jsr %a5@
if ( executing->fp_context != NULL )
_Context_Save_fp( &executing->fp_context );
#endif
#endif
_Context_Switch( &executing->Registers, &heir->Registers );
48810: 486b 00ce pea %a3@(206) 48814: 486a 00ce pea %a2@(206) 48818: 4e94 jsr %a4@
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4881a: 4fef 0010 lea %sp@(16),%sp 4881e: 4aaa 0102 tstl %a2@(258)
48822: 672c beqs 48850 <_Thread_Dispatch+0x10c>
#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 );
48824: 2079 0005 fb5e moveal 5fb5e <_Thread_Allocated_fp>,%a0 4882a: b1ca cmpal %a2,%a0
4882c: 6722 beqs 48850 <_Thread_Dispatch+0x10c>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4882e: 4a88 tstl %a0
48830: 670c beqs 4883e <_Thread_Dispatch+0xfa>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
48832: 4868 0102 pea %a0@(258) 48836: 4eb9 0004 9f12 jsr 49f12 <_CPU_Context_save_fp> 4883c: 588f addql #4,%sp
_Context_Restore_fp( &executing->fp_context );
4883e: 486a 0102 pea %a2@(258) 48842: 4eb9 0004 9f4a jsr 49f4a <_CPU_Context_restore_fp>
_Thread_Allocated_fp = executing;
48848: 588f addql #4,%sp 4884a: 23ca 0005 fb5e movel %a2,5fb5e <_Thread_Allocated_fp>
if ( executing->fp_context != NULL )
_Context_Restore_fp( &executing->fp_context );
#endif
#endif
executing = _Thread_Executing;
48850: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
_ISR_Disable( level );
48856: 2004 movel %d4,%d0 48858: 40c1 movew %sr,%d1 4885a: 8081 orl %d1,%d0 4885c: 46c0 movew %d0,%sr
Thread_Control *heir;
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
4885e: 1039 0005 ff78 moveb 5ff78 <_Per_CPU_Information+0x18>,%d0
48864: 6722 beqs 48888 <_Thread_Dispatch+0x144>
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
48866: 7001 moveq #1,%d0 48868: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
ISR_Level level;
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
4886e: 2679 0005 ff70 moveal 5ff70 <_Per_CPU_Information+0x10>,%a3
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
48874: 4200 clrb %d0
_Thread_Executing = heir;
48876: 23cb 0005 ff6c movel %a3,5ff6c <_Per_CPU_Information+0xc>
executing = _Thread_Executing;
_ISR_Disable( level );
while ( _Context_Switch_necessary == true ) {
heir = _Thread_Heir;
_Thread_Dispatch_disable_level = 1;
_Context_Switch_necessary = false;
4887c: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
/*
* When the heir and executing are the same, then we are being
* requested to do the post switch dispatching. This is normally
* done to dispatch signals.
*/
if ( heir == executing )
48882: b5cb cmpal %a3,%a2 48884: 6600 ff30 bnew 487b6 <_Thread_Dispatch+0x72>
_ISR_Disable( level );
}
post_switch:
_Thread_Dispatch_disable_level = 0;
48888: 42b9 0005 fadc clrl 5fadc <_Thread_Dispatch_disable_level>
_ISR_Enable( level );
4888e: 46c1 movew %d1,%sr
_API_extensions_Run_postswitch();
48890: 4eb9 0004 6f6a jsr 46f6a <_API_extensions_Run_postswitch>
}
48896: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4889c: 4e5e unlk %fp 4889e: 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;
488a0: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0 488a6: 2750 0076 movel %a0@,%a3@(118) 488aa: 6000 ff14 braw 487c0 <_Thread_Dispatch+0x7c>
000488d4 <_Thread_Get>:
Thread_Control *_Thread_Get (
Objects_Id id,
Objects_Locations *location
)
{
488d4: 4e56 0000 linkw %fp,#0 488d8: 202e 0008 movel %fp@(8),%d0 488dc: 2f03 movel %d3,%sp@- 488de: 206e 000c moveal %fp@(12),%a0 488e2: 2f02 movel %d2,%sp@-
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
488e4: 4a80 tstl %d0
488e6: 6766 beqs 4894e <_Thread_Get+0x7a>
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
488e8: 7418 moveq #24,%d2 488ea: 2200 movel %d0,%d1 488ec: e4a9 lsrl %d2,%d1 488ee: 7607 moveq #7,%d3
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
488f0: 143c 0002 moveb #2,%d2
*/
RTEMS_INLINE_ROUTINE Objects_APIs _Objects_Get_API(
Objects_Id id
)
{
return (Objects_APIs) ((id >> OBJECTS_API_START_BIT) & OBJECTS_API_VALID_BITS);
488f4: c283 andl %d3,%d1
*/
RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid(
uint32_t the_api
)
{
if ( !the_api || the_api > OBJECTS_APIS_LAST )
488f6: 2241 moveal %d1,%a1 488f8: 5389 subql #1,%a1 488fa: b489 cmpl %a1,%d2
488fc: 653e bcss 4893c <_Thread_Get+0x68>
*/
RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class(
Objects_Id id
)
{
return (uint32_t)
488fe: 761b moveq #27,%d3 48900: 2400 movel %d0,%d2 48902: e6aa lsrl %d3,%d2
*location = OBJECTS_ERROR;
goto done;
}
the_class = _Objects_Get_class( id );
if ( the_class != 1 ) { /* threads are always first class :) */
48904: 163c 0001 moveb #1,%d3 48908: b682 cmpl %d2,%d3
4890a: 6630 bnes 4893c <_Thread_Get+0x68>
*location = OBJECTS_ERROR;
goto done;
}
api_information = _Objects_Information_table[ the_api ];
4890c: 43f9 0005 fa98 lea 5fa98 <_Objects_Information_table>,%a1 48912: 2271 1c00 moveal %a1@(00000000,%d1:l:4),%a1
if ( !api_information ) {
48916: 4a89 tstl %a1
48918: 6722 beqs 4893c <_Thread_Get+0x68> <== NEVER TAKEN
*location = OBJECTS_ERROR;
goto done;
}
information = api_information[ the_class ];
4891a: 2229 0004 movel %a1@(4),%d1
if ( !information ) {
4891e: 671c beqs 4893c <_Thread_Get+0x68>
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
48920: 2f08 movel %a0,%sp@- 48922: 2f00 movel %d0,%sp@- 48924: 2f01 movel %d1,%sp@- 48926: 4eb9 0004 7fa4 jsr 47fa4 <_Objects_Get>
done:
return tp;
}
4892c: 242e fff8 movel %fp@(-8),%d2
if ( !information ) {
*location = OBJECTS_ERROR;
goto done;
}
tp = (Thread_Control *) _Objects_Get( information, id, location );
48930: 4fef 000c lea %sp@(12),%sp
done:
return tp;
}
48934: 262e fffc movel %fp@(-4),%d3 48938: 4e5e unlk %fp 4893a: 4e75 rts
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
4893c: 7001 moveq #1,%d0
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
4893e: 242e fff8 movel %fp@(-8),%d2 48942: 262e fffc movel %fp@(-4),%d3 48946: 4e5e unlk %fp
goto done;
}
information = api_information[ the_class ];
if ( !information ) {
*location = OBJECTS_ERROR;
48948: 2080 movel %d0,%a0@
{
uint32_t the_api;
uint32_t the_class;
Objects_Information **api_information;
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
4894a: 4280 clrl %d0
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
4894c: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4894e: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 48954: 5280 addql #1,%d0 48956: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level> 4895c: 242e fff8 movel %fp@(-8),%d2 48960: 262e fffc movel %fp@(-4),%d3 48964: 4e5e unlk %fp
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
tp = _Thread_Executing;
48966: 2039 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%d0
Objects_Information *information;
Thread_Control *tp = (Thread_Control *) 0;
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
_Thread_Disable_dispatch();
*location = OBJECTS_LOCAL;
4896c: 4290 clrl %a0@ <== NOT EXECUTED
tp = (Thread_Control *) _Objects_Get( information, id, location );
done:
return tp;
}
0004e798 <_Thread_Handler>:
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4e798: 4e56 0000 linkw %fp,#0 4e79c: 2f0a movel %a2,%sp@-
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
static char doneConstructors;
char doneCons;
#endif
executing = _Thread_Executing;
4e79e: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
*
* Output parameters: NONE
*/
void _Thread_Handler( void )
{
4e7a4: 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;
4e7a6: 222a 00b4 movel %a2@(180),%d1
_ISR_Set_level(level);
4e7aa: 40c0 movew %sr,%d0 4e7ac: e189 lsll #8,%d1 4e7ae: 0280 0000 f8ff andil #63743,%d0 4e7b4: 8081 orl %d1,%d0 4e7b6: 46c0 movew %d0,%sr
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
doneConstructors = 1;
4e7b8: 7001 moveq #1,%d0
level = executing->Start.isr_level;
_ISR_Set_level(level);
#if defined(EXECUTE_GLOBAL_CONSTRUCTORS)
doneCons = doneConstructors;
4e7ba: 1439 0005 f298 moveb 5f298 <doneConstructors.3256>,%d2
doneConstructors = 1;
4e7c0: 13c0 0005 f298 moveb %d0,5f298 <doneConstructors.3256>
#endif
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
#if ( CPU_USE_DEFERRED_FP_SWITCH == TRUE )
if ( (executing->fp_context != NULL) &&
4e7c6: 4aaa 0102 tstl %a2@(258)
4e7ca: 6720 beqs 4e7ec <_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 );
4e7cc: 2079 0005 fb5e moveal 5fb5e <_Thread_Allocated_fp>,%a0 4e7d2: b1ca cmpal %a2,%a0
4e7d4: 6716 beqs 4e7ec <_Thread_Handler+0x54>
!_Thread_Is_allocated_fp( executing ) ) {
if ( _Thread_Allocated_fp != NULL )
4e7d6: 4a88 tstl %a0
4e7d8: 670c beqs 4e7e6 <_Thread_Handler+0x4e>
_Context_Save_fp( &_Thread_Allocated_fp->fp_context );
4e7da: 4868 0102 pea %a0@(258) 4e7de: 4eb9 0004 9f12 jsr 49f12 <_CPU_Context_save_fp> 4e7e4: 588f addql #4,%sp
_Thread_Allocated_fp = executing;
4e7e6: 23ca 0005 fb5e movel %a2,5fb5e <_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 );
4e7ec: 2f0a movel %a2,%sp@- 4e7ee: 4eb9 0004 98c4 jsr 498c4 <_User_extensions_Thread_begin>
/*
* At this point, the dispatch disable level BETTER be 1.
*/
_Thread_Enable_dispatch();
4e7f4: 4eb9 0004 88ae jsr 488ae <_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) */ {
4e7fa: 588f addql #4,%sp 4e7fc: 4a02 tstb %d2
4e7fe: 6724 beqs 4e824 <_Thread_Handler+0x8c>
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4e800: 202a 009e movel %a2@(158),%d0
4e804: 672a beqs 4e830 <_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 ) {
4e806: 7201 moveq #1,%d1 4e808: b280 cmpl %d0,%d1
4e80a: 674c beqs 4e858 <_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 );
4e80c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4e80e: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted> <== NOT EXECUTED
_Internal_error_Occurred(
4e814: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 4e818: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4e81c: 42a7 clrl %sp@- <== NOT EXECUTED 4e81e: 4eb9 0004 7a24 jsr 47a24 <_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 ();
4e824: 4eb9 0005 c840 jsr 5c840 <_init>
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
4e82a: 202a 009e movel %a2@(158),%d0
4e82e: 66d6 bnes 4e806 <_Thread_Handler+0x6e>
executing->Wait.return_argument =
(*(Thread_Entry_numeric) executing->Start.entry_point)(
4e830: 2f2a 00a6 movel %a2@(166),%sp@- 4e834: 206a 009a moveal %a2@(154),%a0 4e838: 4e90 jsr %a0@
INIT_NAME ();
}
#endif
if ( executing->Start.prototype == THREAD_START_NUMERIC ) {
executing->Wait.return_argument =
4e83a: 588f addql #4,%sp 4e83c: 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 );
4e840: 2f0a movel %a2,%sp@- 4e842: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4e848: 4878 0005 pea 5 <COMPARE> 4e84c: 4878 0001 pea 1 <ADD> 4e850: 42a7 clrl %sp@- 4e852: 4eb9 0004 7a24 jsr 47a24 <_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)(
4e858: 2f2a 00a2 movel %a2@(162),%sp@- 4e85c: 206a 009a moveal %a2@(154),%a0 4e860: 4e90 jsr %a0@
executing->Start.numeric_argument
);
}
#if defined(RTEMS_POSIX_API)
else if ( executing->Start.prototype == THREAD_START_POINTER ) {
executing->Wait.return_argument =
4e862: 588f addql #4,%sp 4e864: 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 );
4e868: 2f0a movel %a2,%sp@- 4e86a: 4eb9 0004 9902 jsr 49902 <_User_extensions_Thread_exitted>
_Internal_error_Occurred(
4e870: 4878 0005 pea 5 <COMPARE> <== NOT EXECUTED 4e874: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 4e878: 42a7 clrl %sp@- <== NOT EXECUTED 4e87a: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred> <== NOT EXECUTED
00048970 <_Thread_Initialize>:
Thread_CPU_budget_algorithms budget_algorithm,
Thread_CPU_budget_algorithm_callout budget_callout,
uint32_t isr_level,
Objects_Name name
)
{
48970: 4e56 ffe4 linkw %fp,#-28 48974: 202e 0010 movel %fp@(16),%d0 48978: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4897c: 246e 000c moveal %fp@(12),%a2 48980: 282e 0014 movel %fp@(20),%d4 48984: 242e 001c movel %fp@(28),%d2 48988: 262e 0024 movel %fp@(36),%d3 4898c: 1a2e 001b moveb %fp@(27),%d5 48990: 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;
48994: 42aa 010a clrl %a2@(266) 48998: 42aa 010e clrl %a2@(270)
extensions_area = NULL;
the_thread->libc_reent = NULL;
4899c: 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 ) {
489a0: 4a80 tstl %d0 489a2: 6700 01e8 beqw 48b8c <_Thread_Initialize+0x21c>
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;
489a6: 2204 movel %d4,%d1 489a8: 4204 clrb %d4 489aa: 1544 00bc moveb %d4,%a2@(188)
Stack_Control *the_stack,
void *starting_address,
size_t size
)
{
the_stack->area = starting_address;
489ae: 2540 00c2 movel %d0,%a2@(194)
the_stack->size = size;
489b2: 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 ) {
489b6: 4a05 tstb %d5 489b8: 6600 016e bnew 48b28 <_Thread_Initialize+0x1b8> 489bc: 4280 clrl %d0
extensions_area = NULL;
the_thread->libc_reent = NULL;
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
fp_area = NULL;
489be: 4284 clrl %d4
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
489c0: 2239 0005 fb6e movel 5fb6e <_Thread_Maximum_extensions>,%d1
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;
489c6: 2540 0102 movel %d0,%a2@(258)
the_thread->Start.fp_context = fp_area;
489ca: 2540 00c6 movel %d0,%a2@(198)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
489ce: 42aa 0050 clrl %a2@(80)
the_watchdog->routine = routine;
489d2: 42aa 0064 clrl %a2@(100)
the_watchdog->id = id;
489d6: 42aa 0068 clrl %a2@(104)
the_watchdog->user_data = user_data;
489da: 42aa 006c clrl %a2@(108)
#endif
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
489de: 4a81 tstl %d1 489e0: 6600 0166 bnew 48b48 <_Thread_Initialize+0x1d8>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
489e4: 42aa 0112 clrl %a2@(274)
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
489e8: 97cb subal %a3,%a3
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
the_thread->Start.budget_algorithm = budget_algorithm;
489ea: 2543 00ac movel %d3,%a2@(172)
the_thread->Start.budget_callout = budget_callout;
switch ( budget_algorithm ) {
489ee: 7002 moveq #2,%d0
/*
* General initialization
*/
the_thread->Start.is_preemptible = is_preemptible;
489f0: 1546 00aa moveb %d6,%a2@(170)
the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout;
489f4: 256e 0028 00b0 movel %fp@(40),%a2@(176)
switch ( budget_algorithm ) {
489fa: b083 cmpl %d3,%d0 489fc: 6700 00c6 beqw 48ac4 <_Thread_Initialize+0x154>
the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
48a00: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48a02: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT;
48a08: 7001 moveq #1,%d0
the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
48a0a: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48a0c: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48a10: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48a14: 42aa 001c clrl %a2@(28)
the_thread->real_priority = priority;
48a18: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48a1c: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48a20: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
48a26: 206e 0008 moveal %fp@(8),%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
48a2a: 4280 clrl %d0 48a2c: 2068 0018 moveal %a0@(24),%a0 48a30: 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 );
48a34: 42aa 0082 clrl %a2@(130) 48a38: 42aa 0086 clrl %a2@(134)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48a3c: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48a40: 256e 0030 000c movel %fp@(48),%a2@(12)
* 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 );
48a46: 2f0a movel %a2,%sp@- 48a48: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48a4e: 4fef 000c lea %sp@(12),%sp 48a52: 4a00 tstb %d0
48a54: 6662 bnes 48ab8 <_Thread_Initialize+0x148>
return true;
failed:
if ( the_thread->libc_reent )
48a56: 202a 0106 movel %a2@(262),%d0
48a5a: 670a beqs 48a66 <_Thread_Initialize+0xf6>
_Workspace_Free( the_thread->libc_reent );
48a5c: 2f00 movel %d0,%sp@- 48a5e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a64: 588f addql #4,%sp
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
if ( the_thread->API_Extensions[i] )
48a66: 202a 010a movel %a2@(266),%d0
48a6a: 670a beqs 48a76 <_Thread_Initialize+0x106>
_Workspace_Free( the_thread->API_Extensions[i] );
48a6c: 2f00 movel %d0,%sp@- 48a6e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a74: 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] )
48a76: 202a 010e movel %a2@(270),%d0
48a7a: 670a beqs 48a86 <_Thread_Initialize+0x116>
_Workspace_Free( the_thread->API_Extensions[i] );
48a7c: 2f00 movel %d0,%sp@- 48a7e: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a84: 588f addql #4,%sp
if ( extensions_area )
48a86: 4a8b tstl %a3
48a88: 670a beqs 48a94 <_Thread_Initialize+0x124>
(void) _Workspace_Free( extensions_area );
48a8a: 2f0b movel %a3,%sp@- 48a8c: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48a92: 588f addql #4,%sp
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
if ( fp_area )
48a94: 4a84 tstl %d4
48a96: 670a beqs 48aa2 <_Thread_Initialize+0x132>
(void) _Workspace_Free( fp_area );
48a98: 2f04 movel %d4,%sp@- 48a9a: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 48aa0: 588f addql #4,%sp
#endif
_Thread_Stack_Free( the_thread );
48aa2: 2f0a movel %a2,%sp@- 48aa4: 4eb9 0004 9470 jsr 49470 <_Thread_Stack_Free>
return false;
48aaa: 588f addql #4,%sp
}
48aac: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
if ( fp_area )
(void) _Workspace_Free( fp_area );
#endif
_Thread_Stack_Free( the_thread );
return false;
48ab2: 4200 clrb %d0
}
48ab4: 4e5e unlk %fp 48ab6: 4e75 rts 48ab8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
* Mutex provides sufficient protection to let the user extensions
* run safely.
*/
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
48abe: 7001 moveq #1,%d0
_Thread_Stack_Free( the_thread );
return false;
}
48ac0: 4e5e unlk %fp 48ac2: 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;
48ac4: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48aca: 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;
48acc: 2550 0076 movel %a0@,%a2@(118)
the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
48ad0: 2f02 movel %d2,%sp@-
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
break;
#endif
}
the_thread->Start.isr_level = isr_level;
48ad2: 256e 002c 00b4 movel %fp@(44),%a2@(180)
the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority );
48ad8: 2f0a movel %a2,%sp@-
#endif
}
the_thread->Start.isr_level = isr_level;
the_thread->current_state = STATES_DORMANT;
48ada: 2540 0010 movel %d0,%a2@(16)
the_thread->Wait.queue = NULL;
48ade: 42aa 0044 clrl %a2@(68)
the_thread->resource_count = 0;
48ae2: 42aa 001c clrl %a2@(28)
the_thread->real_priority = priority;
48ae6: 2542 0018 movel %d2,%a2@(24)
the_thread->Start.initial_priority = priority;
48aea: 2542 00b8 movel %d2,%a2@(184)
_Thread_Set_priority( the_thread, priority );
48aee: 4eb9 0004 9204 jsr 49204 <_Thread_Set_priority>
_Thread_Stack_Free( the_thread );
return false;
}
48af4: 206e 0008 moveal %fp@(8),%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
48af8: 4280 clrl %d0 48afa: 2068 0018 moveal %a0@(24),%a0 48afe: 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 );
48b02: 42aa 0082 clrl %a2@(130) 48b06: 42aa 0086 clrl %a2@(134)
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
48b0a: 218a 0c00 movel %a2,%a0@(00000000,%d0:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
48b0e: 256e 0030 000c movel %fp@(48),%a2@(12)
* 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 );
48b14: 2f0a movel %a2,%sp@- 48b16: 4eb9 0004 9994 jsr 49994 <_User_extensions_Thread_create>
if ( extension_status )
48b1c: 4fef 000c lea %sp@(12),%sp 48b20: 4a00 tstb %d0 48b22: 6700 ff32 beqw 48a56 <_Thread_Initialize+0xe6> 48b26: 6090 bras 48ab8 <_Thread_Initialize+0x148>
/*
* 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 );
48b28: 4878 001c pea 1c <OPER2+0x8> 48b2c: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
if ( !fp_area )
48b32: 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 );
48b34: 2800 movel %d0,%d4
if ( !fp_area )
48b36: 6600 fe88 bnew 489c0 <_Thread_Initialize+0x50>
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48b3a: 202a 0106 movel %a2@(262),%d0
* Zero out all the allocated memory fields
*/
for ( i=0 ; i <= THREAD_API_LAST ; i++ )
the_thread->API_Extensions[i] = NULL;
extensions_area = NULL;
48b3e: 97cb subal %a3,%a3
extension_status = _User_extensions_Thread_create( the_thread );
if ( extension_status )
return true;
failed:
if ( the_thread->libc_reent )
48b40: 6600 ff1a bnew 48a5c <_Thread_Initialize+0xec> 48b44: 6000 ff20 braw 48a66 <_Thread_Initialize+0xf6>
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48b48: e589 lsll #2,%d1 48b4a: 2041 moveal %d1,%a0 48b4c: 4868 0004 pea %a0@(4) 48b50: 4eb9 0004 9d82 jsr 49d82 <_Workspace_Allocate>
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48b56: 588f addql #4,%sp
/*
* Allocate the extensions area for this thread
*/
if ( _Thread_Maximum_extensions ) {
extensions_area = _Workspace_Allocate(
48b58: 2640 moveal %d0,%a3
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
48b5a: 4a80 tstl %d0 48b5c: 6700 fef8 beqw 48a56 <_Thread_Initialize+0xe6>
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48b60: 2079 0005 fb6e moveal 5fb6e <_Thread_Maximum_extensions>,%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++ )
48b66: 4281 clrl %d1
(_Thread_Maximum_extensions + 1) * sizeof( void * )
);
if ( !extensions_area )
goto failed;
}
the_thread->extensions = (void **) extensions_area;
48b68: 4280 clrl %d0 48b6a: 254b 0112 movel %a3,%a2@(274)
* 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;
48b6e: 42b3 1c00 clrl %a3@(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++ )
48b72: 5280 addql #1,%d0 48b74: 2200 movel %d0,%d1 48b76: b088 cmpl %a0,%d0 48b78: 6200 fe70 bhiw 489ea <_Thread_Initialize+0x7a>
the_thread->extensions[i] = NULL;
48b7c: 42b3 1c00 clrl %a3@(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++ )
48b80: 5280 addql #1,%d0 48b82: 2200 movel %d0,%d1 48b84: b088 cmpl %a0,%d0
48b86: 63e6 blss 48b6e <_Thread_Initialize+0x1fe>
48b88: 6000 fe60 braw 489ea <_Thread_Initialize+0x7a>
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
48b8c: 2f04 movel %d4,%sp@- 48b8e: 2f0a movel %a2,%sp@- 48b90: 4eb9 0004 940c jsr 4940c <_Thread_Stack_Allocate>
if ( !actual_stack_size || actual_stack_size < stack_size )
48b96: 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 );
48b98: 2200 movel %d0,%d1
if ( !actual_stack_size || actual_stack_size < stack_size )
48b9a: 6712 beqs 48bae <_Thread_Initialize+0x23e>
48b9c: b084 cmpl %d4,%d0
48b9e: 650e bcss 48bae <_Thread_Initialize+0x23e> <== NEVER TAKEN
return false; /* stack allocation failed */
stack = the_thread->Start.stack;
48ba0: 202a 00ca movel %a2@(202),%d0
the_thread->Start.core_allocated_stack = true;
48ba4: 7801 moveq #1,%d4 48ba6: 1544 00bc moveb %d4,%a2@(188) 48baa: 6000 fe02 braw 489ae <_Thread_Initialize+0x3e>
_Thread_Stack_Free( the_thread );
return false;
}
48bae: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
stack = the_thread->Start.stack;
#else
if ( !stack_area ) {
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
if ( !actual_stack_size || actual_stack_size < stack_size )
return false; /* stack allocation failed */
48bb4: 4200 clrb %d0
_Thread_Stack_Free( the_thread );
return false;
}
48bb6: 4e5e unlk %fp
...
0004db34 <_Thread_Reset>:
void _Thread_Reset(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
4db34: 4e56 0000 linkw %fp,#0 4db38: 2f0a movel %a2,%sp@- 4db3a: 246e 0008 moveal %fp@(8),%a2
the_thread->resource_count = 0; the_thread->is_preemptible = the_thread->Start.is_preemptible; the_thread->budget_algorithm = the_thread->Start.budget_algorithm;
4db3e: 256a 00ac 007a movel %a2@(172),%a2@(122)
the_thread->budget_callout = the_thread->Start.budget_callout;
4db44: 256a 00b0 007e movel %a2@(176),%a2@(126)
the_thread->Start.pointer_argument = pointer_argument;
4db4a: 256e 000c 00a2 movel %fp@(12),%a2@(162)
the_thread->Start.numeric_argument = numeric_argument;
4db50: 256e 0010 00a6 movel %fp@(16),%a2@(166)
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
the_thread->is_preemptible = the_thread->Start.is_preemptible;
4db56: 156a 00aa 0074 moveb %a2@(170),%a2@(116)
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
the_thread->resource_count = 0;
4db5c: 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 ) ) {
4db60: 2f0a movel %a2,%sp@- 4db62: 4eb9 0004 9c68 jsr 49c68 <_Thread_queue_Extract_with_proxy> 4db68: 588f addql #4,%sp 4db6a: 4a00 tstb %d0
4db6c: 6608 bnes 4db76 <_Thread_Reset+0x42>
if ( _Watchdog_Is_active( &the_thread->Timer ) )
4db6e: 7002 moveq #2,%d0 4db70: b0aa 0050 cmpl %a2@(80),%d0
4db74: 672a beqs 4dba0 <_Thread_Reset+0x6c>
(void) _Watchdog_Remove( &the_thread->Timer );
}
if ( the_thread->current_priority != the_thread->Start.initial_priority ) {
4db76: 202a 00b8 movel %a2@(184),%d0 4db7a: b0aa 0014 cmpl %a2@(20),%d0
4db7e: 6718 beqs 4db98 <_Thread_Reset+0x64>
the_thread->real_priority = the_thread->Start.initial_priority;
4db80: 2540 0018 movel %d0,%a2@(24)
_Thread_Set_priority( the_thread, the_thread->Start.initial_priority );
4db84: 2d4a 0008 movel %a2,%fp@(8)
} }
4db88: 246e fffc moveal %fp@(-4),%a2
(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 );
4db8c: 2d40 000c movel %d0,%fp@(12)
} }
4db90: 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 );
4db92: 4ef9 0004 9ea8 jmp 49ea8 <_Thread_Set_priority>
} }
4db98: 246e fffc moveal %fp@(-4),%a2 4db9c: 4e5e unlk %fp 4db9e: 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 );
4dba0: 486a 0048 pea %a2@(72) 4dba4: 4eb9 0004 a8e8 jsr 4a8e8 <_Watchdog_Remove> 4dbaa: 588f addql #4,%sp 4dbac: 60c8 bras 4db76 <_Thread_Reset+0x42>
...
00049e18 <_Thread_Restart>:
*/
RTEMS_INLINE_ROUTINE bool _States_Is_dormant (
States_Control the_states
)
{
return (the_states & STATES_DORMANT);
49e18: 7001 moveq #1,%d0
bool _Thread_Restart(
Thread_Control *the_thread,
void *pointer_argument,
Thread_Entry_numeric_type numeric_argument
)
{
49e1a: 4e56 0000 linkw %fp,#0 49e1e: 2f0a movel %a2,%sp@- 49e20: 246e 0008 moveal %fp@(8),%a2 49e24: c0aa 0010 andl %a2@(16),%d0
if ( !_States_Is_dormant( the_thread->current_state ) ) {
49e28: 670a beqs 49e34 <_Thread_Restart+0x1c>
return true;
}
return false;
}
49e2a: 246e fffc moveal %fp@(-4),%a2 49e2e: 4e5e unlk %fp
_Thread_Restart_self();
return true;
}
return false;
49e30: 4200 clrb %d0
}
49e32: 4e75 rts
Thread_Entry_numeric_type numeric_argument
)
{
if ( !_States_Is_dormant( the_thread->current_state ) ) {
_Thread_Set_transient( the_thread );
49e34: 2f0a movel %a2,%sp@- 49e36: 4eb9 0004 a02c jsr 4a02c <_Thread_Set_transient>
_Thread_Reset( the_thread, pointer_argument, numeric_argument );
49e3c: 2f2e 0010 movel %fp@(16),%sp@- 49e40: 2f2e 000c movel %fp@(12),%sp@- 49e44: 2f0a movel %a2,%sp@- 49e46: 4eb9 0004 db34 jsr 4db34 <_Thread_Reset>
_Thread_Load_environment( the_thread );
49e4c: 2f0a movel %a2,%sp@- 49e4e: 4eb9 0004 d798 jsr 4d798 <_Thread_Load_environment>
_Thread_Ready( the_thread );
49e54: 2f0a movel %a2,%sp@- 49e56: 4eb9 0004 da74 jsr 4da74 <_Thread_Ready>
_User_extensions_Thread_restart( the_thread );
49e5c: 2f0a movel %a2,%sp@- 49e5e: 4eb9 0004 a6d8 jsr 4a6d8 <_User_extensions_Thread_restart>
if ( _Thread_Is_executing ( the_thread ) )
49e64: 4fef 001c lea %sp@(28),%sp 49e68: b5f9 0006 0f04 cmpal 60f04 <_Per_CPU_Information+0xc>,%a2
49e6e: 670a beqs 49e7a <_Thread_Restart+0x62>
return true;
}
return false;
}
49e70: 246e fffc moveal %fp@(-4),%a2 49e74: 4e5e unlk %fp
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
49e76: 7001 moveq #1,%d0
}
return false;
}
49e78: 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 )
49e7a: 4aaa 0102 tstl %a2@(258)
49e7e: 6712 beqs 49e92 <_Thread_Restart+0x7a>
_Context_Restore_fp( &_Thread_Executing->fp_context );
49e80: 486a 0102 pea %a2@(258) 49e84: 4eb9 0004 ac32 jsr 4ac32 <_CPU_Context_restore_fp> 49e8a: 2479 0006 0f04 moveal 60f04 <_Per_CPU_Information+0xc>,%a2 49e90: 588f addql #4,%sp
#endif
_CPU_Context_Restart_self( &_Thread_Executing->Registers );
49e92: 486a 00ce pea %a2@(206) 49e96: 4eb9 0004 aaea jsr 4aaea <_CPU_Context_Restart_self>
49e9c: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 49ea0: 588f addql #4,%sp <== NOT EXECUTED 49ea2: 4e5e unlk %fp <== NOT EXECUTED
_User_extensions_Thread_restart( the_thread );
if ( _Thread_Is_executing ( the_thread ) )
_Thread_Restart_self();
return true;
49ea4: 7001 moveq #1,%d0 <== NOT EXECUTED
}
return false;
}
0004c8d0 <_Thread_Resume>:
{
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8d0: 327c 0700 moveaw #1792,%a1 4c8d4: 2009 movel %a1,%d0
void _Thread_Resume(
Thread_Control *the_thread,
bool force
)
{
4c8d6: 4e56 fff0 linkw %fp,#-16 4c8da: 206e 0008 moveal %fp@(8),%a0 4c8de: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
ISR_Level level;
States_Control current_state;
_ISR_Disable( level );
4c8e2: 40c1 movew %sr,%d1 4c8e4: 8081 orl %d1,%d0 4c8e6: 46c0 movew %d0,%sr
current_state = the_thread->current_state;
4c8e8: 2028 0010 movel %a0@(16),%d0
if ( current_state & STATES_SUSPENDED ) {
4c8ec: 0800 0001 btst #1,%d0
4c8f0: 6774 beqs 4c966 <_Thread_Resume+0x96> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE States_Control _States_Clear (
States_Control states_to_clear,
States_Control current_state
)
{
return (current_state & ~states_to_clear);
4c8f2: 74fd moveq #-3,%d2 4c8f4: c082 andl %d2,%d0
current_state =
the_thread->current_state = _States_Clear(STATES_SUSPENDED, current_state);
4c8f6: 2140 0010 movel %d0,%a0@(16)
if ( _States_Is_ready( current_state ) ) {
4c8fa: 666a bnes 4c966 <_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;
4c8fc: 2868 008e moveal %a0@(142),%a4
_Priority_Add_to_bit_map( &the_thread->Priority_map );
_Chain_Append_unprotected(the_thread->ready, &the_thread->Object.Node);
4c900: 2468 008a moveal %a0@(138),%a2 4c904: 3414 movew %a4@,%d2 4c906: 3028 0094 movew %a0@(148),%d0
)
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
4c90a: 266a 0008 moveal %a2@(8),%a3 4c90e: 8082 orl %d2,%d0 4c910: 3880 movew %d0,%a4@
_Priority_Major_bit_map |= the_priority_map->ready_major;
4c912: 3439 0006 3924 movew 63924 <_Priority_Major_bit_map>,%d2 4c918: 3028 0092 movew %a0@(146),%d0 4c91c: 8082 orl %d2,%d0 4c91e: 33c0 0006 3924 movew %d0,63924 <_Priority_Major_bit_map>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4c924: 200a movel %a2,%d0 4c926: 5880 addql #4,%d0 4c928: 2080 movel %d0,%a0@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
4c92a: 2548 0008 movel %a0,%a2@(8)
old_last_node->next = the_node;
4c92e: 2688 movel %a0,%a3@
the_node->previous = old_last_node;
4c930: 214b 0004 movel %a3,%a0@(4)
_ISR_Flash( level );
4c934: 2009 movel %a1,%d0 4c936: 46c1 movew %d1,%sr 4c938: 8081 orl %d1,%d0 4c93a: 46c0 movew %d0,%sr
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
4c93c: 2028 0014 movel %a0@(20),%d0 4c940: 2279 0006 3d18 moveal 63d18 <_Per_CPU_Information+0x10>,%a1 4c946: b0a9 0014 cmpl %a1@(20),%d0
4c94a: 641a bccs 4c966 <_Thread_Resume+0x96>
_Thread_Heir = the_thread;
4c94c: 23c8 0006 3d18 movel %a0,63d18 <_Per_CPU_Information+0x10>
if ( _Thread_Executing->is_preemptible ||
4c952: 2079 0006 3d14 moveal 63d14 <_Per_CPU_Information+0xc>,%a0 4c958: 4a28 0074 tstb %a0@(116)
4c95c: 6712 beqs 4c970 <_Thread_Resume+0xa0>
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c95e: 7401 moveq #1,%d2 4c960: 13c2 0006 3d20 moveb %d2,63d20 <_Per_CPU_Information+0x18>
}
}
}
_ISR_Enable( level );
4c966: 46c1 movew %d1,%sr
}
4c968: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4 4c96c: 4e5e unlk %fp 4c96e: 4e75 rts
_ISR_Flash( level );
if ( the_thread->current_priority < _Thread_Heir->current_priority ) {
_Thread_Heir = the_thread;
if ( _Thread_Executing->is_preemptible ||
4c970: 4a80 tstl %d0
4c972: 66f2 bnes 4c966 <_Thread_Resume+0x96> <== ALWAYS TAKEN
the_thread->current_priority == 0 )
_Context_Switch_necessary = true;
4c974: 7401 moveq #1,%d2 <== NOT EXECUTED 4c976: 13c2 0006 3d20 moveb %d2,63d20 <_Per_CPU_Information+0x18> <== NOT EXECUTED 4c97c: 60e8 bras 4c966 <_Thread_Resume+0x96> <== NOT EXECUTED
...
00049550 <_Thread_Suspend>:
{
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
_ISR_Disable( level );
49550: 203c 0000 0700 movel #1792,%d0
*/
void _Thread_Suspend(
Thread_Control *the_thread
)
{
49556: 4e56 fff4 linkw %fp,#-12 4955a: 206e 0008 moveal %fp@(8),%a0 4955e: 48d7 040c moveml %d2-%d3/%a2,%sp@
ISR_Level level;
Chain_Control *ready;
ready = the_thread->ready;
49562: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
49566: 40c1 movew %sr,%d1 49568: 8081 orl %d1,%d0 4956a: 46c0 movew %d0,%sr
if ( !_States_Is_ready( the_thread->current_state ) ) {
4956c: 2028 0010 movel %a0@(16),%d0
49570: 6642 bnes 495b4 <_Thread_Suspend+0x64>
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
49572: 7002 moveq #2,%d0
if ( _Chain_Has_only_one_node( ready ) ) {
49574: 2429 0008 movel %a1@(8),%d2
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
return;
}
the_thread->current_state = STATES_SUSPENDED;
49578: 2140 0010 movel %d0,%a0@(16)
if ( _Chain_Has_only_one_node( ready ) ) {
4957c: b491 cmpl %a1@,%d2 4957e: 6700 0098 beqw 49618 <_Thread_Suspend+0xc8>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
49582: 2450 moveal %a0@,%a2
previous = the_node->previous;
49584: 2268 0004 moveal %a0@(4),%a1
next->previous = previous;
49588: 2549 0004 movel %a1,%a2@(4)
previous->next = next;
4958c: 228a movel %a2,%a1@
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
4958e: 203c 0000 0700 movel #1792,%d0 49594: 46c1 movew %d1,%sr 49596: 8081 orl %d1,%d0 49598: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
4959a: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0
495a0: 6730 beqs 495d2 <_Thread_Suspend+0x82>
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
495a2: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0
495a8: 671c beqs 495c6 <_Thread_Suspend+0x76> <== NEVER TAKEN
_Context_Switch_necessary = true;
_ISR_Enable( level );
495aa: 46c1 movew %d1,%sr
}
495ac: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495b0: 4e5e unlk %fp 495b2: 4e75 rts
RTEMS_INLINE_ROUTINE States_Control _States_Set (
States_Control states_to_set,
States_Control current_state
)
{
return (current_state | states_to_set);
495b4: 7402 moveq #2,%d2 495b6: 8480 orl %d0,%d2 495b8: 2142 0010 movel %d2,%a0@(16)
ready = the_thread->ready;
_ISR_Disable( level );
if ( !_States_Is_ready( the_thread->current_state ) ) {
the_thread->current_state =
_States_Set( STATES_SUSPENDED, the_thread->current_state );
_ISR_Enable( level );
495bc: 46c1 movew %d1,%sr
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
495be: 4cd7 040c moveml %sp@,%d2-%d3/%a2 495c2: 4e5e unlk %fp 495c4: 4e75 rts
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
495c6: 7401 moveq #1,%d2 495c8: 13c2 0005 ff78 moveb %d2,5ff78 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
495ce: 46c1 movew %d1,%sr 495d0: 60da bras 495ac <_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 );
495d2: 3039 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d0 495d8: 4840 swap %d0 495da: 04c0 ff1 %d0
_Bitfield_Find_first_bit( _Priority_Bit_map[major], minor );
495dc: 4282 clrl %d2 495de: 43f9 0005 fbe4 lea 5fbe4 <_Priority_Bit_map>,%a1 495e4: 3400 movew %d0,%d2 495e6: 3031 2a00 movew %a1@(00000000,%d2:l:2),%d0 495ea: 4840 swap %d0 495ec: 04c0 ff1 %d0
return (_Priority_Bits_index( major ) << 4) +
495ee: 4283 clrl %d3 495f0: e98a lsll #4,%d2 495f2: 3600 movew %d0,%d3
_Thread_Ready_chain[ _Priority_Get_highest() ].first;
495f4: 2279 0005 fa90 moveal 5fa90 <_Thread_Ready_chain>,%a1 495fa: 2002 movel %d2,%d0 495fc: d083 addl %d3,%d0 495fe: 2400 movel %d0,%d2 49600: e58a lsll #2,%d2 49602: e988 lsll #4,%d0 49604: 93c2 subal %d2,%a1
* ready thread.
*/
RTEMS_INLINE_ROUTINE void _Thread_Calculate_heir( void )
{
_Thread_Heir = (Thread_Control *)
49606: d3c0 addal %d0,%a1 49608: 23d1 0005 ff70 movel %a1@,5ff70 <_Per_CPU_Information+0x10>
_ISR_Flash( level );
if ( _Thread_Is_heir( the_thread ) )
_Thread_Calculate_heir();
if ( _Thread_Is_executing( the_thread ) )
4960e: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0
49614: 6694 bnes 495aa <_Thread_Suspend+0x5a> <== NEVER TAKEN
49616: 60ae bras 495c6 <_Thread_Suspend+0x76>
RTEMS_INLINE_ROUTINE void _Priority_Remove_from_bit_map (
Priority_Information *the_priority_map
)
{
*the_priority_map->minor &= the_priority_map->block_minor;
49618: 2468 008e moveal %a0@(142),%a2
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4961c: 2009 movel %a1,%d0 4961e: 5880 addql #4,%d0 49620: 2280 movel %d0,%a1@ 49622: 3412 movew %a2@,%d2 49624: 3028 0098 movew %a0@(152),%d0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
49628: 42a9 0004 clrl %a1@(4) 4962c: c082 andl %d2,%d0
the_chain->last = _Chain_Head(the_chain);
4962e: 2349 0008 movel %a1,%a1@(8) 49632: 3480 movew %d0,%a2@
if ( *the_priority_map->minor == 0 )
49634: 6600 ff58 bnew 4958e <_Thread_Suspend+0x3e>
_Priority_Major_bit_map &= the_priority_map->block_major;
49638: 3439 0005 fb7c movew 5fb7c <_Priority_Major_bit_map>,%d2 4963e: 3028 0096 movew %a0@(150),%d0 49642: c082 andl %d2,%d0 49644: 33c0 0005 fb7c movew %d0,5fb7c <_Priority_Major_bit_map>
_Priority_Remove_from_bit_map( &the_thread->Priority_map );
} else
_Chain_Extract_unprotected( &the_thread->Object.Node );
_ISR_Flash( level );
4964a: 203c 0000 0700 movel #1792,%d0 49650: 46c1 movew %d1,%sr 49652: 8081 orl %d1,%d0 49654: 46c0 movew %d0,%sr
if ( _Thread_Is_heir( the_thread ) )
49656: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0 4965c: 6600 ff44 bnew 495a2 <_Thread_Suspend+0x52> 49660: 6000 ff70 braw 495d2 <_Thread_Suspend+0x82>
00049664 <_Thread_Tickle_timeslice>:
*
* Output parameters: NONE
*/
void _Thread_Tickle_timeslice( void )
{
49664: 4e56 0000 linkw %fp,#0 49668: 2f0a movel %a2,%sp@-
Thread_Control *executing;
executing = _Thread_Executing;
4966a: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
/*
* If the thread is not preemptible or is not ready, then
* just return.
*/
if ( !executing->is_preemptible )
49670: 4a2a 0074 tstb %a2@(116)
49674: 6720 beqs 49696 <_Thread_Tickle_timeslice+0x32>
return;
if ( !_States_Is_ready( executing->current_state ) )
49676: 4aaa 0010 tstl %a2@(16)
4967a: 661a bnes 49696 <_Thread_Tickle_timeslice+0x32>
/*
* The cpu budget algorithm determines what happens next.
*/
switch ( executing->budget_algorithm ) {
4967c: 202a 007a movel %a2@(122),%d0 49680: 7201 moveq #1,%d1 49682: b280 cmpl %d0,%d1
49684: 6210 bhis 49696 <_Thread_Tickle_timeslice+0x32>
49686: 123c 0002 moveb #2,%d1 4968a: b280 cmpl %d0,%d1
4968c: 642e bccs 496bc <_Thread_Tickle_timeslice+0x58>
4968e: 123c 0003 moveb #3,%d1 49692: b280 cmpl %d0,%d1
49694: 6708 beqs 4969e <_Thread_Tickle_timeslice+0x3a> <== ALWAYS TAKEN
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
49696: 246e fffc moveal %fp@(-4),%a2 4969a: 4e5e unlk %fp 4969c: 4e75 rts
}
break;
#if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT:
if ( --executing->cpu_time_budget == 0 )
4969e: 202a 0076 movel %a2@(118),%d0 496a2: 5380 subql #1,%d0 496a4: 2540 0076 movel %d0,%a2@(118)
496a8: 66ec bnes 49696 <_Thread_Tickle_timeslice+0x32> (*executing->budget_callout)( executing );
496aa: 2f0a movel %a2,%sp@- 496ac: 206a 007e moveal %a2@(126),%a0 496b0: 4e90 jsr %a0@
break;
#endif
}
}
496b2: 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 );
496b6: 588f addql #4,%sp
break;
#endif
}
}
496b8: 4e5e unlk %fp 496ba: 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 ) {
496bc: 202a 0076 movel %a2@(118),%d0 496c0: 5380 subql #1,%d0 496c2: 2540 0076 movel %d0,%a2@(118)
496c6: 6ece bgts 49696 <_Thread_Tickle_timeslice+0x32>
* at the priority of the currently executing thread, then the
* executing thread's timeslice is reset. Otherwise, the
* currently executing thread is placed at the rear of the
* FIFO for this priority and a new heir is selected.
*/
_Thread_Yield_processor();
496c8: 4eb9 0004 96e0 jsr 496e0 <_Thread_Yield_processor>
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
496ce: 41f9 0005 fa94 lea 5fa94 <_Thread_Ticks_per_timeslice>,%a0 496d4: 2550 0076 movel %a0@,%a2@(118)
if ( --executing->cpu_time_budget == 0 )
(*executing->budget_callout)( executing );
break;
#endif
}
}
496d8: 246e fffc moveal %fp@(-4),%a2
496dc: 4e5e unlk %fp <== NOT EXECUTED
000496e0 <_Thread_Yield_processor>:
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496e0: 4e56 fff0 linkw %fp,#-16
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
496e4: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
* ready chain
* select heir
*/
void _Thread_Yield_processor( void )
{
496ea: 48d7 1c04 moveml %d2/%a2-%a4,%sp@
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
496ee: 243c 0000 0700 movel #1792,%d2 496f4: 2002 movel %d2,%d0
ISR_Level level;
Thread_Control *executing;
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
496f6: 2268 008a moveal %a0@(138),%a1
_ISR_Disable( level );
496fa: 40c1 movew %sr,%d1 496fc: 8081 orl %d1,%d0 496fe: 46c0 movew %d0,%sr
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
_ISR_Enable( level );
}
49700: 2469 0008 moveal %a1@(8),%a2
Chain_Control *ready;
executing = _Thread_Executing;
ready = executing->ready;
_ISR_Disable( level );
if ( !_Chain_Has_only_one_node( ready ) ) {
49704: b5d1 cmpal %a1@,%a2
49706: 674c beqs 49754 <_Thread_Yield_processor+0x74>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
49708: 2650 moveal %a0@,%a3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4970a: 2009 movel %a1,%d0 4970c: 5880 addql #4,%d0
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
4970e: 2868 0004 moveal %a0@(4),%a4
next->previous = previous; previous->next = next;
49712: 288b movel %a3,%a4@
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
next->previous = previous;
49714: 274c 0004 movel %a4,%a3@(4)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
49718: 2080 movel %d0,%a0@
{
Chain_Node *old_last_node;
the_node->next = _Chain_Tail(the_chain);
old_last_node = the_chain->last;
the_chain->last = the_node;
4971a: 2348 0008 movel %a0,%a1@(8)
old_last_node->next = the_node;
4971e: 2488 movel %a0,%a2@
the_node->previous = old_last_node;
49720: 214a 0004 movel %a2,%a0@(4)
_Chain_Extract_unprotected( &executing->Object.Node );
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
49724: 46c1 movew %d1,%sr 49726: 8481 orl %d1,%d2 49728: 46c2 movew %d2,%sr
if ( _Thread_Is_heir( executing ) )
4972a: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0
49730: 6712 beqs 49744 <_Thread_Yield_processor+0x64>
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
49732: 7001 moveq #1,%d0 49734: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
_ISR_Enable( level );
4973a: 46c1 movew %d1,%sr
}
4973c: 4cd7 1c04 moveml %sp@,%d2/%a2-%a4 49740: 4e5e unlk %fp 49742: 4e75 rts
_Chain_Append_unprotected( ready, &executing->Object.Node );
_ISR_Flash( level );
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
49744: 23d1 0005 ff70 movel %a1@,5ff70 <_Per_CPU_Information+0x10>
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
_Context_Switch_necessary = true;
4974a: 7001 moveq #1,%d0 4974c: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> 49752: 60e6 bras 4973a <_Thread_Yield_processor+0x5a>
if ( _Thread_Is_heir( executing ) )
_Thread_Heir = (Thread_Control *) ready->first;
_Context_Switch_necessary = true;
}
else if ( !_Thread_Is_heir( executing ) )
49754: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0
4975a: 67de beqs 4973a <_Thread_Yield_processor+0x5a>
_Context_Switch_necessary = true;
4975c: 7001 moveq #1,%d0 4975e: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18> 49764: 60d4 bras 4973a <_Thread_Yield_processor+0x5a>
...
00048314 <_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 ) ) {
48314: 7202 moveq #2,%d1
Thread_blocking_operation_States sync_state __attribute__((unused)),
#endif
Thread_Control *the_thread,
ISR_Level level
)
{
48316: 4e56 0000 linkw %fp,#0 4831a: 202e 0010 movel %fp@(16),%d0 4831e: 2f0a movel %a2,%sp@- 48320: 246e 000c moveal %fp@(12),%a2
#endif
/*
* The thread is not waiting on anything after this completes.
*/
the_thread->Wait.queue = NULL;
48324: 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 ) ) {
48328: b2aa 0050 cmpl %a2@(80),%d1
4832c: 671c beqs 4834a <_Thread_blocking_operation_Cancel+0x36>
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
(void) _Watchdog_Remove( &the_thread->Timer );
} else
_ISR_Enable( level );
4832e: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
48330: 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
}
48334: 246e fffc moveal %fp@(-4),%a2 48338: 203c 1003 fff8 movel #268697592,%d0 4833e: 2d40 000c movel %d0,%fp@(12) 48342: 4e5e unlk %fp 48344: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state>
RTEMS_INLINE_ROUTINE void _Watchdog_Deactivate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_REMOVE_IT;
4834a: 123c 0003 moveb #3,%d1 4834e: 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 );
48352: 46c0 movew %d0,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
48354: 486a 0048 pea %a2@(72) 48358: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4835e: 588f addql #4,%sp 48360: 203c 1003 fff8 movel #268697592,%d0 48366: 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
}
4836a: 246e fffc moveal %fp@(-4),%a2 4836e: 2d40 000c movel %d0,%fp@(12) 48372: 4e5e unlk %fp 48374: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state>
...
00048eac <_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
)
{
48eac: 4e56 ffe0 linkw %fp,#-32 48eb0: 48d7 1c7c moveml %d2-%d6/%a2-%a4,%sp@ 48eb4: 246e 000c moveal %fp@(12),%a2 48eb8: 41ea 003c lea %a2@(60),%a0 48ebc: 266e 0008 moveal %fp@(8),%a3
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
48ec0: 222a 0014 movel %a2@(20),%d1
RTEMS_INLINE_ROUTINE uint32_t _Thread_queue_Header_number (
Priority_Control the_priority
)
{
return (the_priority / TASK_QUEUE_DATA_PRIORITIES_PER_HEADER);
48ec4: 2a01 movel %d1,%d5 48ec6: ec8d lsrl #6,%d5 48ec8: 2548 0038 movel %a0,%a2@(56)
header_index = _Thread_queue_Header_number( priority ); header = &the_thread_queue->Queues.Priority[ header_index ]; block_state = the_thread_queue->state;
48ecc: 242b 0038 movel %a3@(56),%d2
Chain_Node *previous_node;
Chain_Node *search_node;
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
48ed0: 41ea 0038 lea %a2@(56),%a0
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
48ed4: 42aa 003c clrl %a2@(60) 48ed8: 2548 0040 movel %a0,%a2@(64)
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
48edc: 0801 0005 btst #5,%d1
48ee0: 665e bnes 48f40 <_Thread_queue_Enqueue_priority+0x94>
48ee2: 700c moveq #12,%d0 48ee4: 4c00 5800 mulsl %d0,%d5
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48ee8: 2c3c 0000 0700 movel #1792,%d6 48eee: 2006 movel %d6,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
48ef0: 49f3 5804 lea %a3@(00000004,%d5:l),%a4 48ef4: 40c3 movew %sr,%d3 48ef6: 8083 orl %d3,%d0 48ef8: 46c0 movew %d0,%sr 48efa: 2803 movel %d3,%d4
search_thread = (Thread_Control *) header->first;
48efc: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48f00: b9c8 cmpal %a0,%a4 48f02: 6700 013c beqw 49040 <_Thread_queue_Enqueue_priority+0x194>
search_priority = search_thread->current_priority;
48f06: 2268 0014 moveal %a0@(20),%a1
if ( priority <= search_priority )
48f0a: b3c1 cmpal %d1,%a1
48f0c: 6418 bccs 48f26 <_Thread_queue_Enqueue_priority+0x7a>
break;
search_priority = search_thread->current_priority;
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
48f0e: 2006 movel %d6,%d0 48f10: 46c3 movew %d3,%sr 48f12: 8083 orl %d3,%d0 48f14: 46c0 movew %d0,%sr
RTEMS_INLINE_ROUTINE bool _States_Are_set (
States_Control the_states,
States_Control mask
)
{
return ( (the_states & mask) != STATES_READY);
48f16: 2002 movel %d2,%d0 48f18: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48f1c: 6700 00c0 beqw 48fde <_Thread_queue_Enqueue_priority+0x132>
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
48f20: 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 ) ) {
48f22: b9c8 cmpal %a0,%a4
48f24: 66e0 bnes 48f06 <_Thread_queue_Enqueue_priority+0x5a>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
48f26: 202b 0030 movel %a3@(48),%d0 48f2a: 7401 moveq #1,%d2 48f2c: b480 cmpl %d0,%d2 48f2e: 6700 00c6 beqw 48ff6 <_Thread_queue_Enqueue_priority+0x14a>
* 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;
48f32: 206e 0010 moveal %fp@(16),%a0 48f36: 2084 movel %d4,%a0@
return the_thread_queue->sync_state; }
48f38: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 48f3c: 4e5e unlk %fp 48f3e: 4e75 rts
_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 ];
48f40: 2005 movel %d5,%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;
48f42: 4283 clrl %d3 48f44: 1639 0005 e322 moveb 5e322 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
48f4a: 2c3c 0000 0700 movel #1792,%d6
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
48f50: 2243 moveal %d3,%a1 48f52: 5289 addql #1,%a1
_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 ];
48f54: e588 lsll #2,%d0 48f56: e98d lsll #4,%d5 48f58: 9a80 subl %d0,%d5 48f5a: da8b addl %a3,%d5
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
48f5c: 2845 moveal %d5,%a4 48f5e: 508c addql #8,%a4
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
_ISR_Disable( level );
48f60: 2006 movel %d6,%d0 48f62: 40c3 movew %sr,%d3 48f64: 8083 orl %d3,%d0 48f66: 46c0 movew %d0,%sr 48f68: 2803 movel %d3,%d4
search_thread = (Thread_Control *) header->last;
48f6a: 2054 moveal %a4@,%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48f6c: ba88 cmpl %a0,%d5
48f6e: 6720 beqs 48f90 <_Thread_queue_Enqueue_priority+0xe4>
search_priority = search_thread->current_priority;
48f70: 2268 0014 moveal %a0@(20),%a1
if ( priority >= search_priority )
48f74: b3c1 cmpal %d1,%a1
48f76: 6318 blss 48f90 <_Thread_queue_Enqueue_priority+0xe4>
break;
search_priority = search_thread->current_priority;
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
48f78: 2006 movel %d6,%d0 48f7a: 46c3 movew %d3,%sr 48f7c: 8083 orl %d3,%d0 48f7e: 46c0 movew %d0,%sr 48f80: 2002 movel %d2,%d0 48f82: c0a8 0010 andl %a0@(16),%d0
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
48f86: 6736 beqs 48fbe <_Thread_queue_Enqueue_priority+0x112>
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
48f88: 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 ) ) {
48f8c: ba88 cmpl %a0,%d5
48f8e: 66e0 bnes 48f70 <_Thread_queue_Enqueue_priority+0xc4>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
48f90: 202b 0030 movel %a3@(48),%d0 48f94: 7401 moveq #1,%d2 48f96: b480 cmpl %d0,%d2
48f98: 6698 bnes 48f32 <_Thread_queue_Enqueue_priority+0x86>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48f9a: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
48f9e: b3c1 cmpal %d1,%a1
48fa0: 677a beqs 4901c <_Thread_queue_Enqueue_priority+0x170>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
48fa2: 2250 moveal %a0@,%a1
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
48fa4: 2548 0004 movel %a0,%a2@(4)
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
48fa8: 2489 movel %a1,%a2@
the_node->previous = search_node; search_node->next = the_node; next_node->previous = the_node;
48faa: 234a 0004 movel %a2,%a1@(4)
next_node = search_node->next;
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
search_node->next = the_node;
48fae: 208a movel %a2,%a0@
next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
48fb0: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
48fb4: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
48fb6: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 48fba: 4e5e unlk %fp 48fbc: 4e75 rts
if ( priority >= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48fbe: 46c3 movew %d3,%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;
48fc0: 4283 clrl %d3 48fc2: 1639 0005 e322 moveb 5e322 <rtems_maximum_priority>,%d3
_ISR_Disable( level );
48fc8: 2006 movel %d6,%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;
48fca: 2243 moveal %d3,%a1 48fcc: 5289 addql #1,%a1
_ISR_Disable( level );
48fce: 40c3 movew %sr,%d3 48fd0: 8083 orl %d3,%d0 48fd2: 46c0 movew %d0,%sr 48fd4: 2803 movel %d3,%d4
search_thread = (Thread_Control *) header->last;
48fd6: 2054 moveal %a4@,%a0
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
48fd8: ba88 cmpl %a0,%d5
48fda: 6694 bnes 48f70 <_Thread_queue_Enqueue_priority+0xc4><== NEVER TAKEN
48fdc: 60b2 bras 48f90 <_Thread_queue_Enqueue_priority+0xe4>
if ( priority <= search_priority )
break;
#endif
_ISR_Flash( level );
if ( !_States_Are_set( search_thread->current_state, block_state) ) {
_ISR_Enable( level );
48fde: 46c3 movew %d3,%sr
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
_ISR_Disable( level );
48fe0: 2006 movel %d6,%d0 48fe2: 40c3 movew %sr,%d3 48fe4: 8083 orl %d3,%d0 48fe6: 46c0 movew %d0,%sr 48fe8: 2803 movel %d3,%d4
search_thread = (Thread_Control *) header->first;
48fea: 2073 5800 moveal %a3@(00000000,%d5:l),%a0
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
48fee: b9c8 cmpal %a0,%a4 48ff0: 6600 ff14 bnew 48f06 <_Thread_queue_Enqueue_priority+0x5a> 48ff4: 604a bras 49040 <_Thread_queue_Enqueue_priority+0x194>
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
48ff6: 42ab 0030 clrl %a3@(48)
if ( priority == search_priority )
48ffa: b3c1 cmpal %d1,%a1
48ffc: 671e beqs 4901c <_Thread_queue_Enqueue_priority+0x170>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
48ffe: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
49002: 2488 movel %a0,%a2@
the_node->previous = previous_node;
49004: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
49008: 228a movel %a2,%a1@
search_node->previous = the_node;
4900a: 214a 0004 movel %a2,%a0@(4)
the_thread->Wait.queue = the_thread_queue;
4900e: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
49012: 46c3 movew %d3,%sr
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49014: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 49018: 4e5e unlk %fp 4901a: 4e75 rts 4901c: 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;
49020: 2268 0004 moveal %a0@(4),%a1
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
49024: 2488 movel %a0,%a2@
the_node->previous = previous_node;
49026: 2549 0004 movel %a1,%a2@(4)
previous_node->next = the_node;
4902a: 228a movel %a2,%a1@
search_node->previous = the_node;
4902c: 214a 0004 movel %a2,%a0@(4)
the_thread->Wait.queue = the_thread_queue;
49030: 254b 0044 movel %a3,%a2@(68)
_ISR_Enable( level );
49034: 46c4 movew %d4,%sr
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
49036: 7001 moveq #1,%d0
* * WARNING! Returning with interrupts disabled! */ *level_p = level; return the_thread_queue->sync_state; }
49038: 4cd7 1c7c moveml %sp@,%d2-%d6/%a2-%a4 4903c: 4e5e unlk %fp 4903e: 4e75 rts
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
49040: 202b 0030 movel %a3@(48),%d0
if ( _Thread_queue_Is_reverse_search( priority ) )
goto restart_reverse_search;
restart_forward_search:
search_priority = PRIORITY_MINIMUM - 1;
49044: 327c ffff moveaw #-1,%a1
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
49048: 7401 moveq #1,%d2 4904a: b480 cmpl %d0,%d2 4904c: 6600 fee4 bnew 48f32 <_Thread_queue_Enqueue_priority+0x86> 49050: 60a4 bras 48ff6 <_Thread_queue_Enqueue_priority+0x14a>
...
0004e880 <_Thread_queue_Extract_fifo>:
Thread_Control *the_thread
)
{
ISR_Level level;
_ISR_Disable( level );
4e880: 203c 0000 0700 movel #1792,%d0
void _Thread_queue_Extract_fifo(
Thread_queue_Control *the_thread_queue __attribute__((unused)),
Thread_Control *the_thread
)
{
4e886: 4e56 0000 linkw %fp,#0 4e88a: 2f0a movel %a2,%sp@- 4e88c: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
_ISR_Disable( level );
4e890: 40c1 movew %sr,%d1 4e892: 8081 orl %d1,%d0 4e894: 46c0 movew %d0,%sr 4e896: 202a 0010 movel %a2@(16),%d0 4e89a: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4e8a0: 6734 beqs 4e8d6 <_Thread_queue_Extract_fifo+0x56>
)
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
4e8a2: 2252 moveal %a2@,%a1
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4e8a4: 7002 moveq #2,%d0
previous = the_node->previous;
4e8a6: 206a 0004 moveal %a2@(4),%a0
next->previous = previous;
4e8aa: 2348 0004 movel %a0,%a1@(4)
previous->next = next;
4e8ae: 2089 movel %a1,%a0@
return;
}
_Chain_Extract_unprotected( &the_thread->Object.Node );
the_thread->Wait.queue = NULL;
4e8b0: 42aa 0044 clrl %a2@(68)
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4e8b4: b0aa 0050 cmpl %a2@(80),%d0
4e8b8: 6726 beqs 4e8e0 <_Thread_queue_Extract_fifo+0x60>
_ISR_Enable( level );
4e8ba: 46c1 movew %d1,%sr
RTEMS_INLINE_ROUTINE void _Thread_Unblock (
Thread_Control *the_thread
)
{
_Thread_Clear_state( the_thread, STATES_BLOCKED );
4e8bc: 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
}
4e8c0: 246e fffc moveal %fp@(-4),%a2 4e8c4: 203c 1003 fff8 movel #268697592,%d0 4e8ca: 2d40 000c movel %d0,%fp@(12) 4e8ce: 4e5e unlk %fp 4e8d0: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state>
ISR_Level level;
_ISR_Disable( level );
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
_ISR_Enable( level );
4e8d6: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4e8d8: 246e fffc moveal %fp@(-4),%a2 4e8dc: 4e5e unlk %fp 4e8de: 4e75 rts 4e8e0: 7003 moveq #3,%d0 4e8e2: 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 );
4e8e6: 46c1 movew %d1,%sr
(void) _Watchdog_Remove( &the_thread->Timer );
4e8e8: 486a 0048 pea %a2@(72) 4e8ec: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> 4e8f2: 588f addql #4,%sp 4e8f4: 203c 1003 fff8 movel #268697592,%d0 4e8fa: 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
}
4e8fe: 246e fffc moveal %fp@(-4),%a2 4e902: 2d40 000c movel %d0,%fp@(12) 4e906: 4e5e unlk %fp 4e908: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state>
...
0004cc5c <_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 );
4cc5c: 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
)
{
4cc62: 4e56 ffec linkw %fp,#-20 4cc66: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4cc6a: 246e 000c moveal %fp@(12),%a2 4cc6e: 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 );
4cc72: 40c1 movew %sr,%d1 4cc74: 8081 orl %d1,%d0 4cc76: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue (
States_Control the_states
)
{
return (the_states & STATES_WAITING_ON_THREAD_QUEUE);
4cc78: 202a 0010 movel %a2@(16),%d0 4cc7c: 0280 0003 bee0 andil #245472,%d0
if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
4cc82: 6778 beqs 4ccfc <_Thread_queue_Extract_priority_helper+0xa0>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4cc84: 200a movel %a2,%d0 4cc86: 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;
4cc8c: 2652 moveal %a2@,%a3
previous_node = the_node->previous;
4cc8e: 286a 0004 moveal %a2@(4),%a4
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4cc92: 206a 0038 moveal %a2@(56),%a0
if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) {
4cc96: b088 cmpl %a0,%d0
4cc98: 676e beqs 4cd08 <_Thread_queue_Extract_priority_helper+0xac>
new_first_node = the_thread->Wait.Block2n.first;
new_first_thread = (Thread_Control *) new_first_node;
last_node = the_thread->Wait.Block2n.last;
4cc9a: 226a 0040 moveal %a2@(64),%a1
new_second_node = new_first_node->next;
4cc9e: 2a50 moveal %a0@,%a5
previous_node->next = new_first_node;
next_node->previous = new_first_node;
4cca0: 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;
4cca4: 2888 movel %a0,%a4@
next_node->previous = new_first_node;
new_first_node->next = next_node;
new_first_node->previous = previous_node;
4cca6: 214c 0004 movel %a4,%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;
4ccaa: 208b movel %a3,%a0@
new_first_node->previous = previous_node;
if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) {
4ccac: b1c9 cmpal %a1,%a0
4ccae: 6716 beqs 4ccc6 <_Thread_queue_Extract_priority_helper+0x6a>
/* > two threads on 2-n */
new_second_node->previous =
_Chain_Head( &new_first_thread->Wait.Block2n );
4ccb0: 47e8 0038 lea %a0@(56),%a3 4ccb4: 2b4b 0004 movel %a3,%a5@(4)
new_first_thread->Wait.Block2n.first = new_second_node;
4ccb8: 214d 0038 movel %a5,%a0@(56)
new_first_thread->Wait.Block2n.last = last_node;
4ccbc: 2149 0040 movel %a1,%a0@(64)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4ccc0: 41e8 003c lea %a0@(60),%a0 4ccc4: 2288 movel %a0,%a1@
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4ccc6: 4a02 tstb %d2
4ccc8: 6626 bnes 4ccf0 <_Thread_queue_Extract_priority_helper+0x94>
_ISR_Enable( level );
return;
}
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
4ccca: 7002 moveq #2,%d0 4cccc: b0aa 0050 cmpl %a2@(80),%d0
4ccd0: 6742 beqs 4cd14 <_Thread_queue_Extract_priority_helper+0xb8><== NEVER TAKEN
_ISR_Enable( level );
4ccd2: 46c1 movew %d1,%sr 4ccd4: 2d4a 0008 movel %a2,%fp@(8) 4ccd8: 267c 1003 fff8 moveal #268697592,%a3 4ccde: 2d4b 000c movel %a3,%fp@(12)
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4cce2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cce8: 4e5e unlk %fp 4ccea: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state>
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
_ISR_Enable( level );
4ccf0: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4ccf2: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4ccf8: 4e5e unlk %fp 4ccfa: 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 );
4ccfc: 46c1 movew %d1,%sr
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4ccfe: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 4cd04: 4e5e unlk %fp 4cd06: 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;
4cd08: 288b movel %a3,%a4@
next_node->previous = previous_node;
4cd0a: 274c 0004 movel %a4,%a3@(4)
/*
* If we are not supposed to touch timers or the thread's state, return.
*/
if ( requeuing ) {
4cd0e: 4a02 tstb %d2
4cd10: 67b8 beqs 4ccca <_Thread_queue_Extract_priority_helper+0x6e>
4cd12: 60dc bras 4ccf0 <_Thread_queue_Extract_priority_helper+0x94>
4cd14: 7003 moveq #3,%d0 <== NOT EXECUTED 4cd16: 2540 0050 movel %d0,%a2@(80) <== NOT EXECUTED
if ( !_Watchdog_Is_active( &the_thread->Timer ) ) {
_ISR_Enable( level );
} else {
_Watchdog_Deactivate( &the_thread->Timer );
_ISR_Enable( level );
4cd1a: 46c1 movew %d1,%sr <== NOT EXECUTED
(void) _Watchdog_Remove( &the_thread->Timer );
4cd1c: 486a 0048 pea %a2@(72) <== NOT EXECUTED 4cd20: 267c 1003 fff8 moveal #268697592,%a3 <== NOT EXECUTED 4cd26: 4eb9 0004 9c00 jsr 49c00 <_Watchdog_Remove> <== NOT EXECUTED 4cd2c: 588f addql #4,%sp <== NOT EXECUTED 4cd2e: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED 4cd32: 2d4b 000c movel %a3,%fp@(12) <== NOT EXECUTED
#if defined(RTEMS_MULTIPROCESSING)
if ( !_Objects_Is_local_id( the_thread->Object.id ) )
_Thread_MP_Free_proxy( the_thread );
#endif
}
4cd36: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 <== NOT EXECUTED 4cd3c: 4e5e unlk %fp <== NOT EXECUTED 4cd3e: 4ef9 0004 84c8 jmp 484c8 <_Thread_Clear_state> <== NOT EXECUTED
000490c0 <_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 ) {
490c0: 7201 moveq #1,%d1
Thread_queue_Control *the_thread_queue,
Thread_queue_Disciplines the_discipline,
States_Control state,
uint32_t timeout_status
)
{
490c2: 4e56 0000 linkw %fp,#0 490c6: 206e 0008 moveal %fp@(8),%a0 490ca: 2f0a movel %a2,%sp@- 490cc: 202e 000c movel %fp@(12),%d0 490d0: 2f02 movel %d2,%sp@-
the_thread_queue->state = state;
490d2: 216e 0010 0038 movel %fp@(16),%a0@(56)
the_thread_queue->discipline = the_discipline; the_thread_queue->timeout_status = timeout_status;
490d8: 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;
490de: 2140 0034 movel %d0,%a0@(52)
the_thread_queue->timeout_status = timeout_status; the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
490e2: 42a8 0030 clrl %a0@(48)
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
490e6: b280 cmpl %d0,%d1
490e8: 6716 beqs 49100 <_Thread_queue_Initialize+0x40>
490ea: 2448 moveal %a0,%a2 490ec: 588a addql #4,%a2
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
490ee: 42a8 0004 clrl %a0@(4)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
490f2: 208a movel %a2,%a0@
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
490f4: 2148 0008 movel %a0,%a0@(8)
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
} else { /* must be THREAD_QUEUE_DISCIPLINE_FIFO */
_Chain_Initialize_empty( &the_thread_queue->Queues.Fifo );
}
}
490f8: 241f movel %sp@+,%d2 490fa: 245f moveal %sp@+,%a2 490fc: 4e5e unlk %fp 490fe: 4e75 rts
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 ) {
49100: 2248 moveal %a0,%a1 49102: 4280 clrl %d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
49104: 2400 movel %d0,%d2 49106: 2200 movel %d0,%d1
uint32_t index;
for( index=0 ;
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
49108: 5280 addql #1,%d0 4910a: e58a lsll #2,%d2 4910c: e989 lsll #4,%d1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
4910e: 42a9 0004 clrl %a1@(4)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
49112: 9282 subl %d2,%d1
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
49114: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 49118: 234a 0008 movel %a2,%a1@(8) 4911c: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49120: 7204 moveq #4,%d1 49122: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
49124: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49128: b280 cmpl %d0,%d1
4912a: 67cc beqs 490f8 <_Thread_queue_Initialize+0x38> <== NEVER TAKEN
4912c: 2400 movel %d0,%d2 4912e: 2200 movel %d0,%d1
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
49130: 5280 addql #1,%d0 49132: e58a lsll #2,%d2 49134: e989 lsll #4,%d1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
49136: 42a9 0004 clrl %a1@(4)
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
4913a: 9282 subl %d2,%d1
_Chain_Initialize_empty( &the_thread_queue->Queues.Priority[index] );
4913c: 45f0 1800 lea %a0@(00000000,%d1:l),%a2 49140: 234a 0008 movel %a2,%a1@(8) 49144: 45f0 1804 lea %a0@(00000004,%d1:l),%a2
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49148: 7204 moveq #4,%d1 4914a: 228a movel %a2,%a1@
index < TASK_QUEUE_DATA_NUMBER_OF_PRIORITY_HEADERS ;
index++)
4914c: 43e9 000c lea %a1@(12),%a1
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( the_discipline == THREAD_QUEUE_DISCIPLINE_PRIORITY ) {
uint32_t index;
for( index=0 ;
49150: b280 cmpl %d0,%d1
49152: 66b0 bnes 49104 <_Thread_queue_Initialize+0x44>
49154: 60a2 bras 490f8 <_Thread_queue_Initialize+0x38>
...
0004cd44 <_Thread_queue_Process_timeout>:
#include <rtems/score/tqdata.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
)
{
4cd44: 4e56 0000 linkw %fp,#0 4cd48: 206e 0008 moveal %fp@(8),%a0
Thread_queue_Control *the_thread_queue = the_thread->Wait.queue;
4cd4c: 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 &&
4cd50: 2029 0030 movel %a1@(48),%d0
4cd54: 6708 beqs 4cd5e <_Thread_queue_Process_timeout+0x1a>
4cd56: b1f9 0005 ff6c cmpal 5ff6c <_Per_CPU_Information+0xc>,%a0
4cd5c: 6716 beqs 4cd74 <_Thread_queue_Process_timeout+0x30><== 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;
4cd5e: 2169 003c 0034 movel %a1@(60),%a0@(52)
_Thread_queue_Extract( the_thread->Wait.queue, the_thread );
4cd64: 2f08 movel %a0,%sp@- 4cd66: 2f09 movel %a1,%sp@- 4cd68: 4eb9 0004 cc24 jsr 4cc24 <_Thread_queue_Extract> 4cd6e: 508f addql #8,%sp
} }
4cd70: 4e5e unlk %fp 4cd72: 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 ) {
4cd74: 7203 moveq #3,%d1 4cd76: b280 cmpl %d0,%d1
4cd78: 67f6 beqs 4cd70 <_Thread_queue_Process_timeout+0x2c>
the_thread->Wait.return_code = the_thread->Wait.queue->timeout_status;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4cd7a: 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 );
}
}
4cd7c: 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;
4cd7e: 2169 003c 0034 movel %a1@(60),%a0@(52)
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
4cd84: 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 );
}
}
...
00049158 <_Thread_queue_Requeue>:
void _Thread_queue_Requeue(
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread
)
{
49158: 4e56 fff0 linkw %fp,#-16 4915c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 49160: 246e 0008 moveal %fp@(8),%a2 49164: 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 )
49168: 4a8a tstl %a2
4916a: 6708 beqs 49174 <_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 ) {
4916c: 7001 moveq #1,%d0 4916e: b0aa 0034 cmpl %a2@(52),%d0
49172: 670a beqs 4917e <_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 );
}
}
49174: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 4917a: 4e5e unlk %fp <== NOT EXECUTED 4917c: 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 );
4917e: 303c 0700 movew #1792,%d0 49182: 40c2 movew %sr,%d2 49184: 8082 orl %d2,%d0 49186: 46c0 movew %d0,%sr 49188: 202b 0010 movel %a3@(16),%d0 4918c: 0280 0003 bee0 andil #245472,%d0
if ( _States_Is_waiting_on_thread_queue( the_thread->current_state ) ) {
49192: 660c bnes 491a0 <_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 );
49194: 46c2 movew %d2,%sr <== NOT EXECUTED
} }
49196: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 4919c: 4e5e unlk %fp 4919e: 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 );
491a0: 4878 0001 pea 1 <ADD>
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;
491a4: 7001 moveq #1,%d0 491a6: 2f0b movel %a3,%sp@- 491a8: 2540 0030 movel %d0,%a2@(48) 491ac: 2f0a movel %a2,%sp@- 491ae: 4eb9 0004 cc5c jsr 4cc5c <_Thread_queue_Extract_priority_helper>
(void) _Thread_queue_Enqueue_priority( tq, the_thread, &level_ignored );
491b4: 486e fffc pea %fp@(-4) 491b8: 2f0b movel %a3,%sp@- 491ba: 2f0a movel %a2,%sp@- 491bc: 4eb9 0004 8eac jsr 48eac <_Thread_queue_Enqueue_priority> 491c2: 4fef 0018 lea %sp@(24),%sp
}
_ISR_Enable( level );
491c6: 46c2 movew %d2,%sr 491c8: 60cc bras 49196 <_Thread_queue_Requeue+0x3e>
...
000491cc <_Thread_queue_Timeout>:
void _Thread_queue_Timeout(
Objects_Id id,
void *ignored __attribute__((unused))
)
{
491cc: 4e56 fffc linkw %fp,#-4
Thread_Control *the_thread;
Objects_Locations location;
the_thread = _Thread_Get( id, &location );
491d0: 486e fffc pea %fp@(-4) 491d4: 2f2e 0008 movel %fp@(8),%sp@- 491d8: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get>
switch ( location ) {
491de: 508f addql #8,%sp 491e0: 4aae fffc tstl %fp@(-4)
491e4: 6618 bnes 491fe <_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 );
491e6: 2f00 movel %d0,%sp@- 491e8: 4eb9 0004 cd44 jsr 4cd44 <_Thread_queue_Process_timeout>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
491ee: 588f addql #4,%sp 491f0: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 491f6: 5380 subql #1,%d0 491f8: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level>
_Thread_Unnest_dispatch();
break;
}
}
491fe: 4e5e unlk %fp
...
00059360 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
59360: 4e56 ffb0 linkw %fp,#-80
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
59364: 41ee ffec lea %fp@(-20),%a0 59368: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5936c: 246e 0008 moveal %fp@(8),%a2 59370: 2c0e movel %fp,%d6 59372: 260e movel %fp,%d3 59374: 5186 subql #8,%d6 59376: 0683 ffff ffe8 addil #-24,%d3 5937c: 240a movel %a2,%d2 5937e: 2a0a movel %a2,%d5 59380: 4bf9 0005 d9d0 lea 5d9d0 <_Watchdog_Adjust_to_chain>,%a5 59386: 0682 0000 0030 addil #48,%d2 5938c: 0685 0000 0068 addil #104,%d5 59392: 47f9 0005 9f70 lea 59f70 <_Chain_Get>,%a3 59398: 49f9 0005 da58 lea 5da58 <_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 );
5939e: 283c 0000 0700 movel #1792,%d4 593a4: 2d48 ffd8 movel %a0,%fp@(-40) 593a8: 41ea 0008 lea %a2@(8),%a0 593ac: 2d48 ffe4 movel %a0,%fp@(-28) 593b0: 41ea 0040 lea %a2@(64),%a0 593b4: 2d48 ffe0 movel %a0,%fp@(-32)
{
Timer_server_Control *ts = (Timer_server_Control *) arg;
Chain_Control insert_chain;
Chain_Control fire_chain;
_Chain_Initialize_empty( &insert_chain );
593b8: 41ee fff4 lea %fp@(-12),%a0 593bc: 2d48 fffc movel %a0,%fp@(-4)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
593c0: 41ee ffec lea %fp@(-20),%a0 593c4: 2d46 fff4 movel %d6,%fp@(-12)
the_chain->permanent_null = NULL;
593c8: 42ae fff8 clrl %fp@(-8)
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
593cc: 2d48 ffe8 movel %a0,%fp@(-24)
the_chain->permanent_null = NULL;
593d0: 42ae ffec clrl %fp@(-20)
the_chain->last = _Chain_Head(the_chain);
593d4: 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;
593d8: 41ee fff4 lea %fp@(-12),%a0 593dc: 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;
593e0: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
593e6: 222a 003c movel %a2@(60),%d1
watchdogs->last_snapshot = snapshot;
593ea: 2540 003c movel %d0,%a2@(60)
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
593ee: 9081 subl %d1,%d0 593f0: 2f03 movel %d3,%sp@- 593f2: 2f00 movel %d0,%sp@- 593f4: 2f02 movel %d2,%sp@- 593f6: 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();
593f8: 2039 0007 eb4a movel 7eb4a <_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 ) {
593fe: 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;
59402: 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 ) {
59406: b280 cmpl %d0,%d1 59408: 6500 0086 bcsw 59490 <_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 ) {
5940c: b280 cmpl %d0,%d1 5940e: 6200 00a4 bhiw 594b4 <_Timer_server_Body+0x154>
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
59412: 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 );
59416: 202a 0078 movel %a2@(120),%d0 5941a: 2f00 movel %d0,%sp@- 5941c: 4e93 jsr %a3@
if ( timer == NULL ) {
5941e: 588f addql #4,%sp 59420: 4a80 tstl %d0
59422: 672e beqs 59452 <_Timer_server_Body+0xf2> <== ALWAYS TAKEN
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
59424: 2040 moveal %d0,%a0 <== NOT EXECUTED 59426: 7e01 moveq #1,%d7 <== NOT EXECUTED 59428: 2228 0038 movel %a0@(56),%d1 <== NOT EXECUTED 5942c: be81 cmpl %d1,%d7 <== NOT EXECUTED 5942e: 6700 00a8 beqw 594d8 <_Timer_server_Body+0x178> <== NOT EXECUTED
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
59432: 7e03 moveq #3,%d7 <== NOT EXECUTED 59434: be81 cmpl %d1,%d7 <== NOT EXECUTED 59436: 66de bnes 59416 <_Timer_server_Body+0xb6> <== NOT EXECUTED
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59438: 2040 moveal %d0,%a0 <== NOT EXECUTED 5943a: 4868 0010 pea %a0@(16) <== NOT EXECUTED 5943e: 2f05 movel %d5,%sp@- <== NOT EXECUTED 59440: 4e94 jsr %a4@ <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59442: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED
)
{
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 );
59446: 508f addql #8,%sp <== NOT EXECUTED
}
static void _Timer_server_Process_insertions( Timer_server_Control *ts )
{
while ( true ) {
Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain );
59448: 2f00 movel %d0,%sp@- <== NOT EXECUTED 5944a: 4e93 jsr %a3@ <== NOT EXECUTED
if ( timer == NULL ) {
5944c: 588f addql #4,%sp <== NOT EXECUTED 5944e: 4a80 tstl %d0 <== NOT EXECUTED 59450: 66d2 bnes 59424 <_Timer_server_Body+0xc4> <== NOT EXECUTED
* of zero it will be processed in the next iteration of the timer server
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
59452: 2004 movel %d4,%d0 59454: 40c1 movew %sr,%d1 59456: 8081 orl %d1,%d0 59458: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( insert_chain ) ) {
5945a: bcae fff4 cmpl %fp@(-12),%d6 5945e: 6700 0086 beqw 594e6 <_Timer_server_Body+0x186>
ts->insert_chain = NULL;
_ISR_Enable( level );
break;
} else {
_ISR_Enable( level );
59462: 46c1 movew %d1,%sr <== NOT EXECUTED
static void _Timer_server_Process_interval_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot;
59464: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0<== NOT EXECUTED
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
5946a: 222a 003c movel %a2@(60),%d1 <== NOT EXECUTED
watchdogs->last_snapshot = snapshot;
5946e: 2540 003c movel %d0,%a2@(60) <== NOT EXECUTED
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
59472: 9081 subl %d1,%d0 <== NOT EXECUTED 59474: 2f03 movel %d3,%sp@- <== NOT EXECUTED 59476: 2f00 movel %d0,%sp@- <== NOT EXECUTED 59478: 2f02 movel %d2,%sp@- <== NOT EXECUTED 5947a: 4e95 jsr %a5@ <== NOT EXECUTED
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5947c: 2039 0007 eb4a movel 7eb4a <_TOD_Now>,%d0 <== NOT EXECUTED
/*
* 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 ) {
59482: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
59486: 222a 0074 movel %a2@(116),%d1 <== NOT EXECUTED
/*
* 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 ) {
5948a: b280 cmpl %d0,%d1 <== NOT EXECUTED 5948c: 6400 ff7e bccw 5940c <_Timer_server_Body+0xac> <== NOT EXECUTED
/*
* 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 );
59490: 2f03 movel %d3,%sp@- 59492: 2e00 movel %d0,%d7 59494: 9e81 subl %d1,%d7 59496: 2f07 movel %d7,%sp@- 59498: 2d40 ffdc movel %d0,%fp@(-36) 5949c: 2f05 movel %d5,%sp@- 5949e: 4eb9 0005 d9d0 jsr 5d9d0 <_Watchdog_Adjust_to_chain> 594a4: 202e ffdc movel %fp@(-36),%d0 594a8: 4fef 000c lea %sp@(12),%sp
*/
delta = last_snapshot - snapshot;
_Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta );
}
watchdogs->last_snapshot = snapshot;
594ac: 2540 0074 movel %d0,%a2@(116) 594b0: 6000 ff64 braw 59416 <_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 );
594b4: 9280 subl %d0,%d1 594b6: 2f01 movel %d1,%sp@- 594b8: 4878 0001 pea 1 <ADD> 594bc: 2d40 ffdc movel %d0,%fp@(-36) 594c0: 2f05 movel %d5,%sp@- 594c2: 4eb9 0005 d93c jsr 5d93c <_Watchdog_Adjust> 594c8: 202e ffdc movel %fp@(-36),%d0 594cc: 4fef 000c lea %sp@(12),%sp
}
watchdogs->last_snapshot = snapshot;
594d0: 2540 0074 movel %d0,%a2@(116) 594d4: 6000 ff40 braw 59416 <_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 );
594d8: 4868 0010 pea %a0@(16) <== NOT EXECUTED 594dc: 2f02 movel %d2,%sp@- <== NOT EXECUTED 594de: 4e94 jsr %a4@ <== NOT EXECUTED 594e0: 508f addql #8,%sp <== NOT EXECUTED 594e2: 6000 ff32 braw 59416 <_Timer_server_Body+0xb6> <== NOT EXECUTED
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
ts->insert_chain = NULL;
594e6: 42aa 0078 clrl %a2@(120)
_ISR_Enable( level );
594ea: 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 ) ) {
594ec: 202e ffd8 movel %fp@(-40),%d0 594f0: b0ae ffe8 cmpl %fp@(-24),%d0
594f4: 6752 beqs 59548 <_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 );
594f6: 2204 movel %d4,%d1 594f8: 40c0 movew %sr,%d0 594fa: 8280 orl %d0,%d1 594fc: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
594fe: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59502: b1ee ffd8 cmpal %fp@(-40),%a0
59506: 6732 beqs 5953a <_Timer_server_Body+0x1da> <== NEVER TAKEN
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
59508: 2250 moveal %a0@,%a1
the_chain->first = new_first; new_first->previous = _Chain_Head(the_chain);
5950a: 2343 0004 movel %d3,%a1@(4)
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
watchdog->state = WATCHDOG_INACTIVE;
5950e: 42a8 0008 clrl %a0@(8)
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
the_chain->first = new_first;
59512: 2d49 ffe8 movel %a1,%fp@(-24)
_ISR_Enable( level );
59516: 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 );
59518: 2f28 0024 movel %a0@(36),%sp@- 5951c: 2f28 0020 movel %a0@(32),%sp@- 59520: 2068 001c moveal %a0@(28),%a0 59524: 4e90 jsr %a0@
}
59526: 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 );
59528: 2204 movel %d4,%d1 5952a: 40c0 movew %sr,%d0 5952c: 8280 orl %d0,%d1 5952e: 46c1 movew %d1,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
59530: 206e ffe8 moveal %fp@(-24),%a0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
59534: b1ee ffd8 cmpal %fp@(-40),%a0
59538: 66ce bnes 59508 <_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 );
5953a: 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;
5953c: 41ee fff4 lea %fp@(-12),%a0 59540: 2548 0078 movel %a0,%a2@(120) 59544: 6000 fe9a braw 593e0 <_Timer_server_Body+0x80>
* the active flag of the timer server is true.
*/
(*watchdog->routine)( watchdog->id, watchdog->user_data );
}
} else {
ts->active = false;
59548: 4207 clrb %d7 5954a: 1547 007c moveb %d7,%a2@(124) 5954e: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 59554: 5280 addql #1,%d0 59556: 23c0 0007 eac0 movel %d0,7eac0 <_Thread_Dispatch_disable_level>
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
5955c: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 59560: 2f12 movel %a2@,%sp@- 59562: 4eb9 0005 d04c jsr 5d04c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
59568: 2f0a movel %a2,%sp@- 5956a: 4eba fd1c jsr %pc@(59288 <_Timer_server_Reset_interval_system_watchdog>)
_Timer_server_Reset_tod_system_watchdog( ts );
5956e: 2f0a movel %a2,%sp@- 59570: 4eba fd80 jsr %pc@(592f2 <_Timer_server_Reset_tod_system_watchdog>)
_Thread_Enable_dispatch();
59574: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
ts->active = true;
5957a: 7001 moveq #1,%d0 5957c: 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 );
59580: 2f2e ffe4 movel %fp@(-28),%sp@- 59584: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
5958a: 2f2e ffe0 movel %fp@(-32),%sp@- 5958e: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> 59594: 4fef 0018 lea %sp@(24),%sp 59598: 6000 fe3e braw 593d8 <_Timer_server_Body+0x78>
0005959c <_Timer_server_Schedule_operation_method>:
static void _Timer_server_Schedule_operation_method(
Timer_server_Control *ts,
Timer_Control *timer
)
{
5959c: 4e56 fff0 linkw %fp,#-16 595a0: 206e 000c moveal %fp@(12),%a0 595a4: 48d7 041c moveml %d2-%d4/%a2,%sp@ 595a8: 246e 0008 moveal %fp@(8),%a2
if ( ts->insert_chain == NULL ) {
595ac: 202a 0078 movel %a2@(120),%d0
595b0: 671a beqs 595cc <_Timer_server_Schedule_operation_method+0x30><== ALWAYS TAKEN
* 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 );
595b2: 202a 0078 movel %a2@(120),%d0 <== NOT EXECUTED 595b6: 2d48 000c movel %a0,%fp@(12) <== NOT EXECUTED
} }
595ba: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
595c0: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
} }
595c4: 4e5e unlk %fp <== NOT EXECUTED
* server is not preemptible, so we must be in interrupt context here. No
* thread dispatch will happen until the timer server finishes its
* critical section. We have to use the protected chain methods because
* we may be interrupted by a higher priority interrupt.
*/
_Chain_Append( ts->insert_chain, &timer->Object.Node );
595c6: 4ef9 0005 9f10 jmp 59f10 <_Chain_Append> <== NOT EXECUTED
595cc: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 595d2: 5280 addql #1,%d0 595d4: 23c0 0007 eac0 movel %d0,7eac0 <_Thread_Dispatch_disable_level>
* being inserted. This could result in an integer overflow.
*/
_Thread_Disable_dispatch();
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
595da: 2028 0038 movel %a0@(56),%d0 595de: 7201 moveq #1,%d1 595e0: b280 cmpl %d0,%d1 595e2: 6700 008a beqw 5966e <_Timer_server_Schedule_operation_method+0xd2>
_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 ) {
595e6: 7803 moveq #3,%d4 595e8: b880 cmpl %d0,%d4
595ea: 670e beqs 595fa <_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 );
}
}
595ec: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 595f2: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
595f4: 4ef9 0005 c546 jmp 5c546 <_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 );
595fa: 203c 0000 0700 movel #1792,%d0 59600: 40c2 movew %sr,%d2 59602: 8082 orl %d2,%d0 59604: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
59606: 260a movel %a2,%d3 59608: 0683 0000 006c addil #108,%d3
snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5960e: 2039 0007 eb4a movel 7eb4a <_TOD_Now>,%d0
last_snapshot = ts->TOD_watchdogs.last_snapshot;
59614: 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));
59618: 226a 0068 moveal %a2@(104),%a1
if ( !_Chain_Is_empty( &ts->TOD_watchdogs.Chain ) ) {
5961c: b689 cmpl %a1,%d3
5961e: 671c beqs 5963c <_Timer_server_Schedule_operation_method+0xa0>
first_watchdog = _Watchdog_First( &ts->TOD_watchdogs.Chain );
delta_interval = first_watchdog->delta_interval;
59620: 2629 0010 movel %a1@(16),%d3
if ( snapshot > last_snapshot ) {
59624: b280 cmpl %d0,%d1 59626: 6400 00ba bccw 596e2 <_Timer_server_Schedule_operation_method+0x146>
/*
* We advanced in time.
*/
delta = snapshot - last_snapshot;
5962a: 2800 movel %d0,%d4 5962c: 9881 subl %d1,%d4
if (delta_interval > delta) {
5962e: b883 cmpl %d3,%d4 59630: 6400 00bc bccw 596ee <_Timer_server_Schedule_operation_method+0x152>
delta_interval -= delta;
59634: 9684 subl %d4,%d3 59636: 2203 movel %d3,%d1
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
59638: 2341 0010 movel %d1,%a1@(16)
}
ts->TOD_watchdogs.last_snapshot = snapshot;
5963c: 2540 0074 movel %d0,%a2@(116)
_ISR_Enable( level );
59640: 46c2 movew %d2,%sr
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
59642: 4868 0010 pea %a0@(16) 59646: 486a 0068 pea %a2@(104) 5964a: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert>
if ( !ts->active ) {
59650: 508f addql #8,%sp 59652: 102a 007c moveb %a2@(124),%d0
59656: 6694 bnes 595ec <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_tod_system_watchdog( ts );
59658: 2f0a movel %a2,%sp@- 5965a: 4eba fc96 jsr %pc@(592f2 <_Timer_server_Reset_tod_system_watchdog>) 5965e: 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 );
}
}
59660: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 59666: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
59668: 4ef9 0005 c546 jmp 5c546 <_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 );
5966e: 203c 0000 0700 movel #1792,%d0 59674: 40c3 movew %sr,%d3 59676: 8083 orl %d3,%d0 59678: 46c0 movew %d0,%sr
snapshot = _Watchdog_Ticks_since_boot;
5967a: 2039 0007 ebec movel 7ebec <_Watchdog_Ticks_since_boot>,%d0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
59680: 220a movel %a2,%d1 59682: 0681 0000 0034 addil #52,%d1
last_snapshot = ts->Interval_watchdogs.last_snapshot;
59688: 282a 003c movel %a2@(60),%d4
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
5968c: 226a 0030 moveal %a2@(48),%a1
if ( !_Chain_Is_empty( &ts->Interval_watchdogs.Chain ) ) {
59690: b289 cmpl %a1,%d1
59692: 6712 beqs 596a6 <_Timer_server_Schedule_operation_method+0x10a>
first_watchdog = _Watchdog_First( &ts->Interval_watchdogs.Chain );
/*
* We assume adequate unsigned arithmetic here.
*/
delta = snapshot - last_snapshot;
59694: 2200 movel %d0,%d1 59696: 9284 subl %d4,%d1
delta_interval = first_watchdog->delta_interval;
59698: 2429 0010 movel %a1@(16),%d2
if (delta_interval > delta) {
5969c: b481 cmpl %d1,%d2
5969e: 633a blss 596da <_Timer_server_Schedule_operation_method+0x13e>
delta_interval -= delta;
596a0: 9481 subl %d1,%d2
} else {
delta_interval = 0;
}
first_watchdog->delta_interval = delta_interval;
596a2: 2342 0010 movel %d2,%a1@(16)
}
ts->Interval_watchdogs.last_snapshot = snapshot;
596a6: 2540 003c movel %d0,%a2@(60)
_ISR_Enable( level );
596aa: 46c3 movew %d3,%sr
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
596ac: 4868 0010 pea %a0@(16) 596b0: 486a 0030 pea %a2@(48) 596b4: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert>
if ( !ts->active ) {
596ba: 508f addql #8,%sp 596bc: 102a 007c moveb %a2@(124),%d0 596c0: 6600 ff2a bnew 595ec <_Timer_server_Schedule_operation_method+0x50>
_Timer_server_Reset_interval_system_watchdog( ts );
596c4: 2f0a movel %a2,%sp@- 596c6: 4eba fbc0 jsr %pc@(59288 <_Timer_server_Reset_interval_system_watchdog>) 596ca: 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 );
}
}
596cc: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 596d2: 4e5e unlk %fp
if ( !ts->active ) {
_Timer_server_Reset_tod_system_watchdog( ts );
}
}
_Thread_Enable_dispatch();
596d4: 4ef9 0005 c546 jmp 5c546 <_Thread_Enable_dispatch>
delta_interval = first_watchdog->delta_interval;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
596da: 4282 clrl %d2
}
first_watchdog->delta_interval = delta_interval;
596dc: 2342 0010 movel %d2,%a1@(16) 596e0: 60c4 bras 596a6 <_Timer_server_Schedule_operation_method+0x10a>
}
} else {
/*
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
596e2: d283 addl %d3,%d1
delta_interval += delta;
596e4: 9280 subl %d0,%d1
}
first_watchdog->delta_interval = delta_interval;
596e6: 2341 0010 movel %d1,%a1@(16) 596ea: 6000 ff50 braw 5963c <_Timer_server_Schedule_operation_method+0xa0>
*/
delta = snapshot - last_snapshot;
if (delta_interval > delta) {
delta_interval -= delta;
} else {
delta_interval = 0;
596ee: 4281 clrl %d1 <== NOT EXECUTED
* Someone put us in the past.
*/
delta = last_snapshot - snapshot;
delta_interval += delta;
}
first_watchdog->delta_interval = delta_interval;
596f0: 2341 0010 movel %d1,%a1@(16) <== NOT EXECUTED 596f4: 6000 ff46 braw 5963c <_Timer_server_Schedule_operation_method+0xa0><== NOT EXECUTED
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 0005 fc5a moveal 5fc5a <_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 0005 fc52 cmpal #392274,%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 <== NOT EXECUTED
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
!_Chain_Is_head( &_User_extensions_List, the_node ) ;
the_node = the_node->previous ) {
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 0005 fc52 cmpal #392274,%a2
49988: 66e0 bnes 4996a <_User_extensions_Fatal+0x28> <== ALWAYS TAKEN
the_extension = (User_extensions_Control *) the_node;
if ( the_extension->Callouts.fatal != NULL )
(*the_extension->Callouts.fatal)( the_source, is_internal, the_error );
}
}
4998a: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 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 0005 fc56 movel #392278,%d0 4980a: 23c0 0005 fc52 movel %d0,5fc52 <_User_extensions_List>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49810: 203c 0005 fc52 movel #392274,%d0 49816: 23c0 0005 fc5a movel %d0,5fc5a <_User_extensions_List+0x8>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
4981c: 203c 0005 fae4 movel #391908,%d0 49822: 23c0 0005 fae0 movel %d0,5fae0 <_User_extensions_Switches_list>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
49828: 203c 0005 fae0 movel #391904,%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 0005 fc56 clrl 5fc56 <_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 e35a movel 5e35a <Configuration+0x36>,%d2
initial_extensions = Configuration.User_extension_table;
4983e: 2639 0005 e35e movel 5e35e <Configuration+0x3a>,%d3 49844: 42b9 0005 fae4 clrl 5fae4 <_User_extensions_Switches_list+0x4>
the_chain->last = _Chain_Head(the_chain);
4984a: 23c0 0005 fae8 movel %d0,5fae8 <_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><== NEVER TAKEN
extension = (User_extensions_Control *)
_Workspace_Allocate_or_fatal_error(
49854: 7834 moveq #52,%d4 49856: 4c02 4800 mulsl %d2,%d4 4985a: 2f04 movel %d4,%sp@- 4985c: 4eb9 0004 9db6 jsr 49db6 <_Workspace_Allocate_or_fatal_error> 49862: 2440 moveal %d0,%a2
number_of_extensions * sizeof( User_extensions_Control )
);
memset (
49864: 2f04 movel %d4,%sp@- 49866: 42a7 clrl %sp@- 49868: 2f00 movel %d0,%sp@- 4986a: 4eb9 0004 f310 jsr 4f310 <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 ceac lea 4ceac <_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 0005 fc52 moveal 5fc52 <_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 0005 fc56 cmpal #392278,%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 0005 fc56 cmpal #392278,%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 0005 fc52 moveal 5fc52 <_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 0005 fc56 cmpal #392278,%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 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 499be: 4e90 jsr %a0@
_Thread_Executing,
the_thread
);
if ( !status )
499c0: 508f addql #8,%sp 499c2: 4a00 tstb %d0
499c4: 6718 beqs 499de <_User_extensions_Thread_create+0x4a>
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 0005 fc56 cmpal #392278,%a2
499ce: 66de bnes 499ae <_User_extensions_Thread_create+0x1a>
return false;
}
}
return true;
}
499d0: 242e fff8 movel %fp@(-8),%d2 499d4: 246e fffc moveal %fp@(-4),%a2 499d8: 4e5e unlk %fp
if ( !status )
return false;
}
}
return true;
499da: 7001 moveq #1,%d0
}
499dc: 4e75 rts 499de: 242e fff8 movel %fp@(-8),%d2 499e2: 246e fffc moveal %fp@(-4),%a2 499e6: 4e5e unlk %fp
status = (*the_extension->Callouts.thread_create)(
_Thread_Executing,
the_thread
);
if ( !status )
return false;
499e8: 4200 clrb %d0 <== NOT EXECUTED
}
}
return true;
}
000499ec <_User_extensions_Thread_delete>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499ec: 4e56 0000 linkw %fp,#0 499f0: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499f2: 2479 0005 fc5a moveal 5fc5a <_User_extensions_List+0x8>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_delete (
Thread_Control *the_thread
)
{
499f8: 2f02 movel %d2,%sp@- 499fa: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
499fe: b5fc 0005 fc52 cmpal #392274,%a2
49a04: 6720 beqs 49a26 <_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 )
49a06: 206a 0020 moveal %a2@(32),%a0 49a0a: 4a88 tstl %a0
49a0c: 670c beqs 49a1a <_User_extensions_Thread_delete+0x2e>
(*the_extension->Callouts.thread_delete)(
49a0e: 2f02 movel %d2,%sp@- 49a10: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 49a16: 4e90 jsr %a0@ 49a18: 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 ) {
49a1a: 246a 0004 moveal %a2@(4),%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.last ;
49a1e: b5fc 0005 fc52 cmpal #392274,%a2
49a24: 66e0 bnes 49a06 <_User_extensions_Thread_delete+0x1a>
(*the_extension->Callouts.thread_delete)(
_Thread_Executing,
the_thread
);
}
}
49a26: 242e fff8 movel %fp@(-8),%d2 49a2a: 246e fffc moveal %fp@(-4),%a2 49a2e: 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 0005 fc5a moveal 5fc5a <_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 0005 fc52 cmpal #392274,%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 0005 fc52 cmpal #392274,%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
0004a6d8 <_User_extensions_Thread_restart>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6d8: 4e56 0000 linkw %fp,#0 4a6dc: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6de: 2479 0006 0bea moveal 60bea <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_restart (
Thread_Control *the_thread
)
{
4a6e4: 2f02 movel %d2,%sp@- 4a6e6: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a6ea: b5fc 0006 0bee cmpal #396270,%a2
4a6f0: 671e beqs 4a710 <_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 )
4a6f2: 206a 001c moveal %a2@(28),%a0 4a6f6: 4a88 tstl %a0
4a6f8: 670c beqs 4a706 <_User_extensions_Thread_restart+0x2e>
(*the_extension->Callouts.thread_restart)(
4a6fa: 2f02 movel %d2,%sp@- 4a6fc: 2f39 0006 0f04 movel 60f04 <_Per_CPU_Information+0xc>,%sp@- 4a702: 4e90 jsr %a0@ 4a704: 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 ) {
4a706: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
4a708: b5fc 0006 0bee cmpal #396270,%a2
4a70e: 66e2 bnes 4a6f2 <_User_extensions_Thread_restart+0x1a>
(*the_extension->Callouts.thread_restart)(
_Thread_Executing,
the_thread
);
}
}
4a710: 242e fff8 movel %fp@(-8),%d2 4a714: 246e fffc moveal %fp@(-4),%a2
4a718: 4e5e unlk %fp <== NOT EXECUTED
00049a34 <_User_extensions_Thread_start>:
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a34: 4e56 0000 linkw %fp,#0 49a38: 2f0a movel %a2,%sp@-
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a3a: 2479 0005 fc52 moveal 5fc52 <_User_extensions_List>,%a2
#include <rtems/score/userext.h>
void _User_extensions_Thread_start (
Thread_Control *the_thread
)
{
49a40: 2f02 movel %d2,%sp@- 49a42: 242e 0008 movel %fp@(8),%d2
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a46: b5fc 0005 fc56 cmpal #392278,%a2
49a4c: 671e beqs 49a6c <_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 )
49a4e: 206a 0018 moveal %a2@(24),%a0 49a52: 4a88 tstl %a0
49a54: 670c beqs 49a62 <_User_extensions_Thread_start+0x2e>
(*the_extension->Callouts.thread_start)(
49a56: 2f02 movel %d2,%sp@- 49a58: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 49a5e: 4e90 jsr %a0@ 49a60: 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 ) {
49a62: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Control *the_extension;
for ( the_node = _User_extensions_List.first ;
49a64: b5fc 0005 fc56 cmpal #392278,%a2
49a6a: 66e2 bnes 49a4e <_User_extensions_Thread_start+0x1a>
(*the_extension->Callouts.thread_start)(
_Thread_Executing,
the_thread
);
}
}
49a6c: 242e fff8 movel %fp@(-8),%d2 49a70: 246e fffc moveal %fp@(-4),%a2
49a74: 4e5e unlk %fp <== NOT EXECUTED
00049a78 <_User_extensions_Thread_switch>:
void _User_extensions_Thread_switch (
Thread_Control *executing,
Thread_Control *heir
)
{
49a78: 4e56 fff4 linkw %fp,#-12 49a7c: 48d7 040c moveml %d2-%d3/%a2,%sp@ 49a80: 262e 0008 movel %fp@(8),%d3 49a84: 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 ;
49a88: 2479 0005 fae0 moveal 5fae0 <_User_extensions_Switches_list>,%a2 49a8e: b5fc 0005 fae4 cmpal #391908,%a2
49a94: 6716 beqs 49aac <_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 );
49a96: 2f02 movel %d2,%sp@- 49a98: 2f03 movel %d3,%sp@- 49a9a: 206a 0008 moveal %a2@(8),%a0 49a9e: 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 ) {
49aa0: 2452 moveal %a2@,%a2
)
{
Chain_Node *the_node;
User_extensions_Switch_control *the_extension_switch;
for ( the_node = _User_extensions_Switches_list.first ;
49aa2: 508f addql #8,%sp 49aa4: b5fc 0005 fae4 cmpal #391908,%a2
49aaa: 66ea bnes 49a96 <_User_extensions_Thread_switch+0x1e>
the_extension_switch = (User_extensions_Switch_control *) the_node;
(*the_extension_switch->thread_switch)( executing, heir );
}
}
49aac: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 49ab2: 4e5e unlk %fp
...
0004b754 <_Watchdog_Adjust>:
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b754: 4e56 ffe8 linkw %fp,#-24 4b758: 226e 000c moveal %fp@(12),%a1 4b75c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
ISR_Level level;
_ISR_Disable( level );
4b760: 283c 0000 0700 movel #1792,%d4 4b766: 2004 movel %d4,%d0
void _Watchdog_Adjust(
Chain_Control *header,
Watchdog_Adjust_directions direction,
Watchdog_Interval units
)
{
4b768: 266e 0008 moveal %fp@(8),%a3 4b76c: 242e 0010 movel %fp@(16),%d2
ISR_Level level;
_ISR_Disable( level );
4b770: 40c1 movew %sr,%d1 4b772: 8081 orl %d1,%d0 4b774: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b776: 244b moveal %a3,%a2 4b778: 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 ) ) {
4b77a: b5c8 cmpal %a0,%a2
4b77c: 6748 beqs 4b7c6 <_Watchdog_Adjust+0x72>
switch ( direction ) {
4b77e: 4a89 tstl %a1
4b780: 6650 bnes 4b7d2 <_Watchdog_Adjust+0x7e>
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b782: 4a82 tstl %d2
4b784: 6740 beqs 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b786: 2628 0010 movel %a0@(16),%d3 4b78a: 49f9 0004 b9d0 lea 4b9d0 <_Watchdog_Tickle>,%a4 4b790: b682 cmpl %d2,%d3
4b792: 622c bhis 4b7c0 <_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;
4b794: 7001 moveq #1,%d0 4b796: 2140 0010 movel %d0,%a0@(16)
_ISR_Enable( level );
4b79a: 46c1 movew %d1,%sr
_Watchdog_Tickle( header );
4b79c: 2f0b movel %a3,%sp@- 4b79e: 4e94 jsr %a4@
_ISR_Disable( level );
4b7a0: 2004 movel %d4,%d0 4b7a2: 40c1 movew %sr,%d1 4b7a4: 8081 orl %d1,%d0 4b7a6: 46c0 movew %d0,%sr
if ( _Chain_Is_empty( header ) )
4b7a8: 588f addql #4,%sp
while ( units ) {
if ( units < _Watchdog_First( header )->delta_interval ) {
_Watchdog_First( header )->delta_interval -= units;
break;
} else {
units -= _Watchdog_First( header )->delta_interval;
4b7aa: 9483 subl %d3,%d2 4b7ac: 2013 movel %a3@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
4b7ae: 2040 moveal %d0,%a0
_Watchdog_Tickle( header );
_ISR_Disable( level );
if ( _Chain_Is_empty( header ) )
4b7b0: b08a cmpl %a2,%d0
4b7b2: 6712 beqs 4b7c6 <_Watchdog_Adjust+0x72>
switch ( direction ) {
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
break;
case WATCHDOG_FORWARD:
while ( units ) {
4b7b4: 4a82 tstl %d2
4b7b6: 670e beqs 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
if ( units < _Watchdog_First( header )->delta_interval ) {
4b7b8: 2628 0010 movel %a0@(16),%d3 4b7bc: b483 cmpl %d3,%d2
4b7be: 64d4 bccs 4b794 <_Watchdog_Adjust+0x40>
_Watchdog_First( header )->delta_interval -= units;
4b7c0: 9682 subl %d2,%d3 4b7c2: 2143 0010 movel %d3,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7c6: 46c1 movew %d1,%sr
}
4b7c8: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 4b7ce: 4e5e unlk %fp 4b7d0: 4e75 rts
* unmodified across that call.
*
* Till Straumann, 7/2003
*/
if ( !_Chain_Is_empty( header ) ) {
switch ( direction ) {
4b7d2: 7001 moveq #1,%d0 4b7d4: b089 cmpl %a1,%d0
4b7d6: 66ee bnes 4b7c6 <_Watchdog_Adjust+0x72> <== NEVER TAKEN
case WATCHDOG_BACKWARD:
_Watchdog_First( header )->delta_interval += units;
4b7d8: d5a8 0010 addl %d2,%a0@(16)
}
break;
}
}
_ISR_Enable( level );
4b7dc: 46c1 movew %d1,%sr
}
4b7de: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4
4b7e4: 4e5e unlk %fp <== NOT EXECUTED
00049ab8 <_Watchdog_Insert>:
void _Watchdog_Insert(
Chain_Control *header,
Watchdog_Control *the_watchdog
)
{
49ab8: 4e56 ffec linkw %fp,#-20 49abc: 226e 000c moveal %fp@(12),%a1 49ac0: 48d7 043c moveml %d2-%d5/%a2,%sp@ 49ac4: 246e 0008 moveal %fp@(8),%a2
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
_ISR_Disable( level );
49ac8: 2a3c 0000 0700 movel #1792,%d5 49ace: 2005 movel %d5,%d0
Watchdog_Control *after;
uint32_t insert_isr_nest_level;
Watchdog_Interval delta_interval;
insert_isr_nest_level = _ISR_Nest_level;
49ad0: 2839 0005 ff68 movel 5ff68 <_Per_CPU_Information+0x8>,%d4
_ISR_Disable( level );
49ad6: 40c3 movew %sr,%d3 49ad8: 8083 orl %d3,%d0 49ada: 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 ) {
49adc: 4aa9 0008 tstl %a1@(8) 49ae0: 6600 00c6 bnew 49ba8 <_Watchdog_Insert+0xf0>
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
_Watchdog_Sync_count++;
49ae4: 2039 0005 fc04 movel 5fc04 <_Watchdog_Sync_count>,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49aea: 7201 moveq #1,%d1
_Watchdog_Sync_count++;
49aec: 5280 addql #1,%d0
if ( the_watchdog->state != WATCHDOG_INACTIVE ) {
_ISR_Enable( level );
return;
}
the_watchdog->state = WATCHDOG_BEING_INSERTED;
49aee: 2341 0008 movel %d1,%a1@(8)
_Watchdog_Sync_count++;
49af2: 23c0 0005 fc04 movel %d0,5fc04 <_Watchdog_Sync_count>
restart:
delta_interval = the_watchdog->initial;
49af8: 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 ;
49afc: 2052 moveal %a2@,%a0
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49afe: 6764 beqs 49b64 <_Watchdog_Insert+0xac>
49b00: 4a90 tstl %a0@
49b02: 6760 beqs 49b64 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b04: 2228 0010 movel %a0@(16),%d1 49b08: b280 cmpl %d0,%d1
49b0a: 6252 bhis 49b5e <_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 );
49b0c: 2405 movel %d5,%d2 49b0e: 46c3 movew %d3,%sr 49b10: 8483 orl %d3,%d2 49b12: 46c2 movew %d2,%sr
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b14: 7401 moveq #1,%d2 49b16: b4a9 0008 cmpl %a1@(8),%d2
49b1a: 666e bnes 49b8a <_Watchdog_Insert+0xd2>
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b1c: 2439 0005 fb82 movel 5fb82 <_Watchdog_Sync_level>,%d2 49b22: b484 cmpl %d4,%d2
49b24: 6230 bhis 49b56 <_Watchdog_Insert+0x9e>
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b26: 9081 subl %d1,%d0
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49b28: 2050 moveal %a0@,%a0
*/
for ( after = (Watchdog_Control *) ((volatile Chain_Control *)header)->first ;
;
after = _Watchdog_Next( after ) ) {
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
49b2a: 4a80 tstl %d0
49b2c: 6736 beqs 49b64 <_Watchdog_Insert+0xac>
49b2e: 4a90 tstl %a0@
49b30: 6732 beqs 49b64 <_Watchdog_Insert+0xac>
break;
if ( delta_interval < after->delta_interval ) {
49b32: 2228 0010 movel %a0@(16),%d1 49b36: b081 cmpl %d1,%d0
49b38: 6524 bcss 49b5e <_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 );
49b3a: 2405 movel %d5,%d2 49b3c: 46c3 movew %d3,%sr 49b3e: 8483 orl %d3,%d2 49b40: 46c2 movew %d2,%sr
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
break;
}
delta_interval -= after->delta_interval;
49b42: 9081 subl %d1,%d0
* mechanism used here WAS redesigned to address this.
*/
_ISR_Flash( level );
if ( the_watchdog->state != WATCHDOG_BEING_INSERTED ) {
49b44: 7201 moveq #1,%d1 49b46: b2a9 0008 cmpl %a1@(8),%d1
49b4a: 663e bnes 49b8a <_Watchdog_Insert+0xd2> <== NEVER TAKEN
goto exit_insert;
}
if ( _Watchdog_Sync_level > insert_isr_nest_level ) {
49b4c: 2239 0005 fb82 movel 5fb82 <_Watchdog_Sync_level>,%d1 49b52: b284 cmpl %d4,%d1
49b54: 63d2 blss 49b28 <_Watchdog_Insert+0x70> <== ALWAYS TAKEN
_Watchdog_Sync_level = insert_isr_nest_level;
49b56: 23c4 0005 fb82 movel %d4,5fb82 <_Watchdog_Sync_level>
goto restart;
49b5c: 609a bras 49af8 <_Watchdog_Insert+0x40>
if ( delta_interval == 0 || !_Watchdog_Next( after ) )
break;
if ( delta_interval < after->delta_interval ) {
after->delta_interval -= delta_interval;
49b5e: 9280 subl %d0,%d1 49b60: 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 );
49b64: 2068 0004 moveal %a0@(4),%a0
RTEMS_INLINE_ROUTINE void _Watchdog_Activate(
Watchdog_Control *the_watchdog
)
{
the_watchdog->state = WATCHDOG_ACTIVE;
49b68: 7402 moveq #2,%d2
)
{
Chain_Node *before_node;
the_node->previous = after_node;
before_node = after_node->next;
49b6a: 2450 moveal %a0@,%a2
}
}
_Watchdog_Activate( the_watchdog );
the_watchdog->delta_interval = delta_interval;
49b6c: 2340 0010 movel %d0,%a1@(16)
_Chain_Insert_unprotected( after->Node.previous, &the_watchdog->Node );
the_watchdog->start_time = _Watchdog_Ticks_since_boot;
49b70: 2039 0005 fc08 movel 5fc08 <_Watchdog_Ticks_since_boot>,%d0 49b76: 2342 0008 movel %d2,%a1@(8)
Chain_Node *the_node
)
{
Chain_Node *before_node;
the_node->previous = after_node;
49b7a: 2348 0004 movel %a0,%a1@(4)
before_node = after_node->next; after_node->next = the_node;
49b7e: 2089 movel %a1,%a0@
the_node->next = before_node; before_node->previous = the_node;
49b80: 2549 0004 movel %a1,%a2@(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;
49b84: 228a movel %a2,%a1@ 49b86: 2340 0014 movel %d0,%a1@(20)
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
49b8a: 23c4 0005 fb82 movel %d4,5fb82 <_Watchdog_Sync_level>
_Watchdog_Sync_count--;
49b90: 2039 0005 fc04 movel 5fc04 <_Watchdog_Sync_count>,%d0 49b96: 5380 subql #1,%d0 49b98: 23c0 0005 fc04 movel %d0,5fc04 <_Watchdog_Sync_count>
_ISR_Enable( level );
49b9e: 46c3 movew %d3,%sr
}
49ba0: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49ba4: 4e5e unlk %fp 49ba6: 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 );
49ba8: 46c3 movew %d3,%sr
exit_insert:
_Watchdog_Sync_level = insert_isr_nest_level;
_Watchdog_Sync_count--;
_ISR_Enable( level );
}
49baa: 4cd7 043c moveml %sp@,%d2-%d5/%a2 49bae: 4e5e unlk %fp
...
00049c00 <_Watchdog_Remove>:
{
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c00: 203c 0000 0700 movel #1792,%d0
*/
Watchdog_States _Watchdog_Remove(
Watchdog_Control *the_watchdog
)
{
49c06: 4e56 0000 linkw %fp,#0 49c0a: 206e 0008 moveal %fp@(8),%a0 49c0e: 2f0a movel %a2,%sp@- 49c10: 2f02 movel %d2,%sp@-
ISR_Level level;
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
49c12: 40c1 movew %sr,%d1 49c14: 8081 orl %d1,%d0 49c16: 46c0 movew %d0,%sr
previous_state = the_watchdog->state;
49c18: 2028 0008 movel %a0@(8),%d0
switch ( previous_state ) {
49c1c: 7401 moveq #1,%d2 49c1e: b480 cmpl %d0,%d2
49c20: 6764 beqs 49c86 <_Watchdog_Remove+0x86>
49c22: 6314 blss 49c38 <_Watchdog_Remove+0x38>
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c24: 2279 0005 fc08 moveal 5fc08 <_Watchdog_Ticks_since_boot>,%a1 49c2a: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c2e: 46c1 movew %d1,%sr
return( previous_state ); }
49c30: 241f movel %sp@+,%d2 49c32: 245f moveal %sp@+,%a2 49c34: 4e5e unlk %fp 49c36: 4e75 rts
Watchdog_States previous_state;
Watchdog_Control *next_watchdog;
_ISR_Disable( level );
previous_state = the_watchdog->state;
switch ( previous_state ) {
49c38: 143c 0003 moveb #3,%d2 49c3c: b480 cmpl %d0,%d2
49c3e: 65e4 bcss 49c24 <_Watchdog_Remove+0x24> <== NEVER TAKEN
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
_ISR_Enable( level );
return( previous_state );
}
49c40: 2250 moveal %a0@,%a1
break;
case WATCHDOG_ACTIVE:
case WATCHDOG_REMOVE_IT:
the_watchdog->state = WATCHDOG_INACTIVE;
49c42: 42a8 0008 clrl %a0@(8)
next_watchdog = _Watchdog_Next( the_watchdog );
if ( _Watchdog_Next(next_watchdog) )
49c46: 4a91 tstl %a1@
49c48: 6708 beqs 49c52 <_Watchdog_Remove+0x52>
next_watchdog->delta_interval += the_watchdog->delta_interval;
49c4a: 2428 0010 movel %a0@(16),%d2 49c4e: d5a9 0010 addl %d2,%a1@(16)
if ( _Watchdog_Sync_count )
49c52: 2479 0005 fc04 moveal 5fc04 <_Watchdog_Sync_count>,%a2 49c58: 4a8a tstl %a2
49c5a: 670c beqs 49c68 <_Watchdog_Remove+0x68>
_Watchdog_Sync_level = _ISR_Nest_level;
49c5c: 45f9 0005 ff68 lea 5ff68 <_Per_CPU_Information+0x8>,%a2 49c62: 23d2 0005 fb82 movel %a2@,5fb82 <_Watchdog_Sync_level>
{
Chain_Node *next;
Chain_Node *previous;
next = the_node->next;
previous = the_node->previous;
49c68: 2468 0004 moveal %a0@(4),%a2
next->previous = previous;
49c6c: 234a 0004 movel %a2,%a1@(4)
previous->next = next;
49c70: 2489 movel %a1,%a2@
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c72: 2279 0005 fc08 moveal 5fc08 <_Watchdog_Ticks_since_boot>,%a1 49c78: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c7c: 46c1 movew %d1,%sr
return( previous_state ); }
49c7e: 241f movel %sp@+,%d2 49c80: 245f moveal %sp@+,%a2 49c82: 4e5e unlk %fp 49c84: 4e75 rts
_Watchdog_Sync_level = _ISR_Nest_level;
_Chain_Extract_unprotected( &the_watchdog->Node );
break;
}
the_watchdog->stop_time = _Watchdog_Ticks_since_boot;
49c86: 2279 0005 fc08 moveal 5fc08 <_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;
49c8c: 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;
49c90: 2149 0018 movel %a1,%a0@(24)
_ISR_Enable( level );
49c94: 46c1 movew %d1,%sr
return( previous_state ); }
49c96: 241f movel %sp@+,%d2 49c98: 245f moveal %sp@+,%a2 49c9a: 4e5e unlk %fp
...
0004b0fc <_Watchdog_Report_chain>:
)
{
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b0fc: 203c 0000 0700 movel #1792,%d0
void _Watchdog_Report_chain(
const char *name,
Chain_Control *header
)
{
4b102: 4e56 ffe8 linkw %fp,#-24 4b106: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 4b10a: 242e 0008 movel %fp@(8),%d2 4b10e: 266e 000c moveal %fp@(12),%a3
ISR_Level level;
Chain_Node *node;
_ISR_Disable( level );
4b112: 40c3 movew %sr,%d3 4b114: 8083 orl %d3,%d0 4b116: 46c0 movew %d0,%sr
printk( "Watchdog Chain: %s %p\n", name, header );
4b118: 2f0b movel %a3,%sp@- 4b11a: 4bf9 0004 4928 lea 44928 <printk>,%a5 4b120: 2f02 movel %d2,%sp@- 4b122: 4879 0005 f4cc pea 5f4cc <_Status_Object_name_errors_to_status+0x14> 4b128: 4e95 jsr %a5@
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
4b12a: 245b moveal %a3@+,%a2
if ( !_Chain_Is_empty( header ) ) {
4b12c: 4fef 000c lea %sp@(12),%sp 4b130: b7ca cmpal %a2,%a3
4b132: 672c beqs 4b160 <_Watchdog_Report_chain+0x64>
4b134: 49f9 0004 b178 lea 4b178 <_Watchdog_Report>,%a4
node != _Chain_Tail(header) ;
node = node->next )
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
4b13a: 2f0a movel %a2,%sp@- 4b13c: 42a7 clrl %sp@- 4b13e: 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 )
4b140: 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 ;
4b142: 508f addql #8,%sp 4b144: b7ca cmpal %a2,%a3
4b146: 66f2 bnes 4b13a <_Watchdog_Report_chain+0x3e> <== NEVER TAKEN
{
Watchdog_Control *watch = (Watchdog_Control *) node;
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
4b148: 2f02 movel %d2,%sp@- 4b14a: 4879 0005 f4e3 pea 5f4e3 <_Status_Object_name_errors_to_status+0x2b> 4b150: 4e95 jsr %a5@ 4b152: 508f addql #8,%sp
} else {
printk( "Chain is empty\n" );
}
_ISR_Enable( level );
4b154: 46c3 movew %d3,%sr
}
4b156: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b15c: 4e5e unlk %fp 4b15e: 4e75 rts
_Watchdog_Report( NULL, watch );
}
printk( "== end of %s \n", name );
} else {
printk( "Chain is empty\n" );
4b160: 4879 0005 f4f2 pea 5f4f2 <_Status_Object_name_errors_to_status+0x3a> 4b166: 4e95 jsr %a5@ 4b168: 588f addql #4,%sp
}
_ISR_Enable( level );
4b16a: 46c3 movew %d3,%sr
}
4b16c: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4b172: 4e5e unlk %fp
...
00049ca0 <_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 );
49ca0: 203c 0000 0700 movel #1792,%d0
*/
void _Watchdog_Tickle(
Chain_Control *header
)
{
49ca6: 4e56 ffe8 linkw %fp,#-24 49caa: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 49cae: 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 );
49cb2: 40c2 movew %sr,%d2 49cb4: 8082 orl %d2,%d0 49cb6: 46c0 movew %d0,%sr
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
49cb8: 264c moveal %a4,%a3 49cba: 245b moveal %a3@+,%a2
if ( _Chain_Is_empty( header ) )
49cbc: b7ca cmpal %a2,%a3
49cbe: 673e beqs 49cfe <_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) {
49cc0: 202a 0010 movel %a2@(16),%d0 49cc4: 4bf9 0004 9c00 lea 49c00 <_Watchdog_Remove>,%a5
49cca: 6708 beqs 49cd4 <_Watchdog_Tickle+0x34>
the_watchdog->delta_interval--;
49ccc: 5380 subql #1,%d0 49cce: 2540 0010 movel %d0,%a2@(16)
if ( the_watchdog->delta_interval != 0 )
49cd2: 662a bnes 49cfe <_Watchdog_Tickle+0x5e>
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49cd4: 263c 0000 0700 movel #1792,%d3
if ( the_watchdog->delta_interval != 0 )
goto leave;
}
do {
watchdog_state = _Watchdog_Remove( the_watchdog );
49cda: 2f0a movel %a2,%sp@- 49cdc: 4e95 jsr %a5@
_ISR_Enable( level );
49cde: 46c2 movew %d2,%sr
switch( watchdog_state ) {
49ce0: 7202 moveq #2,%d1 49ce2: 588f addql #4,%sp 49ce4: b280 cmpl %d0,%d1
49ce6: 6722 beqs 49d0a <_Watchdog_Tickle+0x6a> <== ALWAYS TAKEN
case WATCHDOG_REMOVE_IT:
break;
}
_ISR_Disable( level );
49ce8: 2003 movel %d3,%d0 49cea: 40c2 movew %sr,%d2 49cec: 8082 orl %d2,%d0 49cee: 46c0 movew %d0,%sr
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
}
49cf0: 2014 movel %a4@,%d0
RTEMS_INLINE_ROUTINE Watchdog_Control *_Watchdog_First(
Chain_Control *header
)
{
return ( (Watchdog_Control *) header->first );
49cf2: 2440 moveal %d0,%a2
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
(the_watchdog->delta_interval == 0) );
49cf4: b7c0 cmpal %d0,%a3
49cf6: 6706 beqs 49cfe <_Watchdog_Tickle+0x5e>
}
_ISR_Disable( level );
the_watchdog = _Watchdog_First( header );
} while ( !_Chain_Is_empty( header ) &&
49cf8: 4aaa 0010 tstl %a2@(16)
49cfc: 67dc beqs 49cda <_Watchdog_Tickle+0x3a>
(the_watchdog->delta_interval == 0) );
leave:
_ISR_Enable(level);
49cfe: 46c2 movew %d2,%sr
}
49d00: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 49d06: 4e5e unlk %fp 49d08: 4e75 rts
_ISR_Enable( level );
switch( watchdog_state ) {
case WATCHDOG_ACTIVE:
(*the_watchdog->routine)(
49d0a: 2f2a 0024 movel %a2@(36),%sp@- 49d0e: 2f2a 0020 movel %a2@(32),%sp@- 49d12: 206a 001c moveal %a2@(28),%a0 49d16: 4e90 jsr %a0@
the_watchdog->id,
the_watchdog->user_data
);
break;
49d18: 508f addql #8,%sp 49d1a: 60cc bras 49ce8 <_Watchdog_Tickle+0x48>
00049db6 <_Workspace_Allocate_or_fatal_error>:
* _Workspace_Allocate_or_fatal_error
*/
void *_Workspace_Allocate_or_fatal_error(
size_t size
)
{
49db6: 4e56 0000 linkw %fp,#0 49dba: 42a7 clrl %sp@- 49dbc: 42a7 clrl %sp@- 49dbe: 2f2e 0008 movel %fp@(8),%sp@- 49dc2: 4879 0005 fafa pea 5fafa <_Workspace_Area> 49dc8: 4eb9 0004 c78c jsr 4c78c <_Heap_Allocate_aligned_with_boundary>
__builtin_return_address( 1 ),
memory
);
#endif
if ( memory == NULL )
49dce: 4fef 0010 lea %sp@(16),%sp 49dd2: 4a80 tstl %d0
49dd4: 6704 beqs 49dda <_Workspace_Allocate_or_fatal_error+0x24>
true,
INTERNAL_ERROR_WORKSPACE_ALLOCATION
);
return memory;
}
49dd6: 4e5e unlk %fp 49dd8: 4e75 rts
memory
);
#endif
if ( memory == NULL )
_Internal_error_Occurred(
49dda: 4878 0003 pea 3 <DIVIDE> 49dde: 4878 0001 pea 1 <ADD> 49de2: 42a7 clrl %sp@- 49de4: 4eb9 0004 7a24 jsr 47a24 <_Internal_error_Occurred>
...
0005bb40 <_calloc_r>:
void *_calloc_r(
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
5bb40: 4e56 0000 linkw %fp,#0 5bb44: 202e 000c movel %fp@(12),%d0
return calloc( elements, size );
5bb48: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5bb4e: 2d40 0008 movel %d0,%fp@(8)
}
5bb52: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
size_t elements,
size_t size
)
{
return calloc( elements, size );
5bb54: 4ef9 0004 292c jmp 4292c <calloc>
...
000436ae <_exit>:
extern void FINI_SYMBOL( void );
#endif
void EXIT_SYMBOL(int status)
{
436ae: 4e56 0000 linkw %fp,#0
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
436b2: 4eb9 0005 c854 jsr 5c854 <_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();
436b8: 4eb9 0004 3648 jsr 43648 <libc_wrapup>
rtems_shutdown_executive(status);
436be: 2f2e 0008 movel %fp@(8),%sp@- 436c2: 4eb9 0004 6d18 jsr 46d18 <rtems_shutdown_executive>
436c8: 588f addql #4,%sp <== NOT EXECUTED 436ca: 60fe bras 436ca <_exit+0x1c> <== NOT EXECUTED
0005bb5c <_free_r>:
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
5bb5c: 4e56 0000 linkw %fp,#0
free( ptr );
5bb60: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5bb66: 4e5e unlk %fp
void _free_r(
struct _reent *ignored __attribute__((unused)),
void *ptr
)
{
free( ptr );
5bb68: 4ef9 0004 2db8 jmp 42db8 <free>
...
0005bc0c <_fstat_r>:
int _fstat_r(
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
5bc0c: 4e56 0000 linkw %fp,#0 5bc10: 202e 000c movel %fp@(12),%d0
return fstat( fd, buf );
5bc14: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5bc1a: 2d40 0008 movel %d0,%fp@(8)
}
5bc1e: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
int fd,
struct stat *buf
)
{
return fstat( fd, buf );
5bc20: 4ef9 0005 bb70 jmp 5bb70 <fstat>
...
00042ec6 <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
42ec6: 4e56 0000 linkw %fp,#0
return gettimeofday( tp, tzp ); }
42eca: 4e5e unlk %fp
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
42ecc: 4ef9 0004 2e48 jmp 42e48 <gettimeofday>
...
0005bc3c <_isatty_r>:
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
5bc3c: 4e56 0000 linkw %fp,#0
return isatty( fd );
5bc40: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5bc46: 4e5e unlk %fp
int _isatty_r(
struct _reent *ptr __attribute__((unused)),
int fd
)
{
return isatty( fd );
5bc48: 4ef9 0005 c7ac jmp 5c7ac <isatty>
...
0005bf04 <_kill_r>:
int _kill_r(
struct _reent *ptr,
pid_t pid,
int sig
)
{
5bf04: 4e56 0000 linkw %fp,#0
return killinfo( pid, sig, NULL );
5bf08: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
int _kill_r(
struct _reent *ptr,
pid_t pid,
int sig
)
{
5bf0e: 202e 0010 movel %fp@(16),%d0
return killinfo( pid, sig, NULL );
5bf12: 42ae 0010 clrl %fp@(16) 5bf16: 2d40 000c movel %d0,%fp@(12)
}
5bf1a: 4e5e unlk %fp
struct _reent *ptr,
pid_t pid,
int sig
)
{
return killinfo( pid, sig, NULL );
5bf1c: 4ef9 0005 c0f4 jmp 5c0f4 <killinfo>
...
0005bdac <_lseek_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
off_t offset,
int whence
)
{
5bdac: 4e56 0000 linkw %fp,#0 5bdb0: 206e 000c moveal %fp@(12),%a0 5bdb4: 202e 0010 movel %fp@(16),%d0 5bdb8: 222e 0014 movel %fp@(20),%d1
return lseek( fd, offset, whence );
5bdbc: 2d6e 0018 0014 movel %fp@(24),%fp@(20) 5bdc2: 2d40 000c movel %d0,%fp@(12) 5bdc6: 2d41 0010 movel %d1,%fp@(16) 5bdca: 2d48 0008 movel %a0,%fp@(8)
}
5bdce: 4e5e unlk %fp
int fd,
off_t offset,
int whence
)
{
return lseek( fd, offset, whence );
5bdd0: 4ef9 0005 bc50 jmp 5bc50 <lseek>
...
000458ac <_lstat_r>:
int _STAT_R_NAME(
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
458ac: 4e56 0000 linkw %fp,#0 458b0: 202e 000c movel %fp@(12),%d0
return _STAT_NAME( path, buf );
458b4: 2d6e 0010 000c movel %fp@(16),%fp@(12) 458ba: 2d40 0008 movel %d0,%fp@(8)
}
458be: 4e5e unlk %fp
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
458c0: 4ef9 0004 5814 jmp 45814 <lstat>
...
0005bdd8 <_malloc_r>:
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
5bdd8: 4e56 0000 linkw %fp,#0
return malloc( size );
5bddc: 2d6e 000c 0008 movel %fp@(12),%fp@(8)
}
5bde2: 4e5e unlk %fp
void *_malloc_r(
struct _reent *ignored __attribute__((unused)),
size_t size
)
{
return malloc( size );
5bde4: 4ef9 0004 30e8 jmp 430e8 <malloc>
...
0005bec4 <_realloc_r>:
void *_realloc_r(
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
5bec4: 4e56 0000 linkw %fp,#0 5bec8: 202e 000c movel %fp@(12),%d0
return realloc( ptr, size );
5becc: 2d6e 0010 000c movel %fp@(16),%fp@(12) 5bed2: 2d40 0008 movel %d0,%fp@(8)
}
5bed6: 4e5e unlk %fp
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
5bed8: 4ef9 0005 bf24 jmp 5bf24 <realloc>
...
000466ec <_rename_r>:
int _rename_r(
struct _reent *ptr __attribute__((unused)),
const char *old,
const char *new
)
{
466ec: 4e56 ffa4 linkw %fp,#-92 <== NOT EXECUTED 466f0: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ <== NOT EXECUTED 466f4: 262e 000c movel %fp@(12),%d3 <== NOT EXECUTED 466f8: 282e 0010 movel %fp@(16),%d4 <== NOT EXECUTED
/*
* Get the parent node of the old path to be renamed. Find the parent path.
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
466fc: 2f03 movel %d3,%sp@- <== NOT EXECUTED 466fe: 4eb9 0004 5122 jsr 45122 <rtems_filesystem_dirname> <== NOT EXECUTED
if ( old_parent_pathlen == 0 )
46704: 588f addql #4,%sp <== NOT EXECUTED 46706: 4a80 tstl %d0 <== NOT EXECUTED 46708: 6600 017c bnew 46886 <_rename_r+0x19a> <== NOT EXECUTED
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
4670c: 45ee ffd0 lea %fp@(-48),%a2 <== NOT EXECUTED 46710: 4282 clrl %d2 <== NOT EXECUTED 46712: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46714: 486e fffc pea %fp@(-4) <== NOT EXECUTED
rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false;
46718: 4205 clrb %d5 <== NOT EXECUTED
*/
old_parent_pathlen = rtems_filesystem_dirname ( old );
if ( old_parent_pathlen == 0 )
rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
4671a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4671c: 4eb9 0004 6b08 jsr 46b08 <rtems_filesystem_get_start_loc> <== NOT EXECUTED 46722: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
46726: 2d52 ffe4 movel %a2@,%fp@(-28) <== NOT EXECUTED
name = old + old_parent_pathlen;
4672a: d483 addl %d3,%d2 <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
4672c: 47f9 0005 4b50 lea 54b50 <strlen>,%a3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46732: 260e movel %fp,%d3 <== NOT EXECUTED 46734: 0683 ffff ffe4 addil #-28,%d3 <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
4673a: 2d6e ffd4 ffe8 movel %fp@(-44),%fp@(-24) <== NOT EXECUTED 46740: 2d6e ffd8 ffec movel %fp@(-40),%fp@(-20) <== NOT EXECUTED 46746: 2d6e ffdc fff0 movel %fp@(-36),%fp@(-16) <== NOT EXECUTED 4674c: 2d6e ffe0 fff4 movel %fp@(-32),%fp@(-12) <== NOT EXECUTED
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46752: 2f02 movel %d2,%sp@- <== NOT EXECUTED
/*
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
46754: 2d42 fff8 movel %d2,%fp@(-8) <== NOT EXECUTED
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46758: 4e93 jsr %a3@ <== NOT EXECUTED 4675a: 2e80 movel %d0,%sp@ <== NOT EXECUTED 4675c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4675e: 4eb9 0004 5164 jsr 45164 <rtems_filesystem_prefix_separators><== NOT EXECUTED 46764: d480 addl %d0,%d2 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46766: 2f02 movel %d2,%sp@- <== NOT EXECUTED
* Start from the parent to find the node that should be under it.
*/
old_loc = old_parent_loc;
name = old + old_parent_pathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46768: 2d42 fff8 movel %d2,%fp@(-8) <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
4676c: 4e93 jsr %a3@ <== NOT EXECUTED 4676e: 4297 clrl %sp@ <== NOT EXECUTED 46770: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46772: 42a7 clrl %sp@- <== NOT EXECUTED 46774: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46776: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46778: 4eb9 0004 4fe4 jsr 44fe4 <rtems_filesystem_evaluate_relative_path><== NOT EXECUTED
0, &old_loc, false );
if ( result != 0 ) {
4677e: 4fef 001c lea %sp@(28),%sp <== NOT EXECUTED 46782: 4a80 tstl %d0 <== NOT EXECUTED 46784: 6600 00d6 bnew 4685c <_rename_r+0x170> <== NOT EXECUTED
/*
* Get the parent of the new node we are renaming to.
*/
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
46788: 240e movel %fp,%d2 <== NOT EXECUTED 4678a: 0682 ffff ffbc addil #-68,%d2 <== NOT EXECUTED 46790: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46792: 486e fffc pea %fp@(-4) <== NOT EXECUTED 46796: 2f04 movel %d4,%sp@- <== NOT EXECUTED 46798: 4eb9 0004 6b08 jsr 46b08 <rtems_filesystem_get_start_loc> <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
4679e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 467a2: d8ae fffc addl %fp@(-4),%d4 <== NOT EXECUTED 467a6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467a8: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED 467ac: 2f04 movel %d4,%sp@- <== NOT EXECUTED 467ae: 2068 0004 moveal %a0@(4),%a0 <== NOT EXECUTED 467b2: 4e90 jsr %a0@ <== NOT EXECUTED
if ( result != 0 ) {
467b4: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED 467b8: 4a80 tstl %d0 <== NOT EXECUTED 467ba: 6600 00f0 bnew 468ac <_rename_r+0x1c0> <== NOT EXECUTED
/*
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
467be: 202e ffcc movel %fp@(-52),%d0 <== NOT EXECUTED 467c2: b0ae ffe0 cmpl %fp@(-32),%d0 <== NOT EXECUTED 467c6: 6648 bnes 46810 <_rename_r+0x124> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
467c8: 2f2e fff8 movel %fp@(-8),%sp@- <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
467cc: 47f9 0004 51b8 lea 451b8 <rtems_filesystem_freenode>,%a3 <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
467d2: 206e ffc8 moveal %fp@(-56),%a0 <== NOT EXECUTED 467d6: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467d8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 467da: 2f0a movel %a2,%sp@- <== NOT EXECUTED 467dc: 2068 0040 moveal %a0@(64),%a0 <== NOT EXECUTED 467e0: 4e90 jsr %a0@ <== NOT EXECUTED 467e2: 2800 movel %d0,%d4 <== NOT EXECUTED
rtems_filesystem_freenode( &new_parent_loc );
467e4: 2f02 movel %d2,%sp@- <== NOT EXECUTED 467e6: 4e93 jsr %a3@ <== NOT EXECUTED
if ( free_old_parentloc )
467e8: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 467ec: 4a05 tstb %d5 <== NOT EXECUTED 467ee: 6612 bnes 46802 <_rename_r+0x116> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
467f0: 2f03 movel %d3,%sp@- <== NOT EXECUTED 467f2: 4e93 jsr %a3@ <== NOT EXECUTED
return result;
467f4: 588f addql #4,%sp <== NOT EXECUTED
}
467f6: 2004 movel %d4,%d0 <== NOT EXECUTED 467f8: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 467fe: 4e5e unlk %fp <== NOT EXECUTED 46800: 4e75 rts <== NOT EXECUTED
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 );
46802: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46804: 4e93 jsr %a3@ <== NOT EXECUTED 46806: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
46808: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4680a: 4e93 jsr %a3@ <== NOT EXECUTED
return result;
4680c: 588f addql #4,%sp <== NOT EXECUTED 4680e: 60e6 bras 467f6 <_rename_r+0x10a> <== NOT EXECUTED
* Check to see if the caller is trying to rename across file system
* boundaries.
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
46810: 2f02 movel %d2,%sp@- <== NOT EXECUTED 46812: 47f9 0004 51b8 lea 451b8 <rtems_filesystem_freenode>,%a3 <== NOT EXECUTED 46818: 4e93 jsr %a3@ <== NOT EXECUTED
if ( free_old_parentloc )
4681a: 588f addql #4,%sp <== NOT EXECUTED 4681c: 4a05 tstb %d5 <== NOT EXECUTED 4681e: 6620 bnes 46840 <_rename_r+0x154> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
46820: 2f03 movel %d3,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
46822: 78ff moveq #-1,%d4 <== NOT EXECUTED
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
46824: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
46826: 4eb9 0005 1adc jsr 51adc <__errno> <== NOT EXECUTED 4682c: 588f addql #4,%sp <== NOT EXECUTED 4682e: 2040 moveal %d0,%a0 <== NOT EXECUTED 46830: 7012 moveq #18,%d0 <== NOT EXECUTED 46832: 2080 movel %d0,%a0@ <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46834: 2004 movel %d4,%d0 <== NOT EXECUTED 46836: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4683c: 4e5e unlk %fp <== NOT EXECUTED 4683e: 4e75 rts <== NOT EXECUTED
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
46840: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
46842: 78ff moveq #-1,%d4 <== NOT EXECUTED
*/
if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
46844: 4e93 jsr %a3@ <== NOT EXECUTED 46846: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
46848: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4684a: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EXDEV );
4684c: 4eb9 0005 1adc jsr 51adc <__errno> <== NOT EXECUTED 46852: 588f addql #4,%sp <== NOT EXECUTED 46854: 2040 moveal %d0,%a0 <== NOT EXECUTED 46856: 7012 moveq #18,%d0 <== NOT EXECUTED 46858: 2080 movel %d0,%a0@ <== NOT EXECUTED 4685a: 60d8 bras 46834 <_rename_r+0x148> <== NOT EXECUTED
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 )
4685c: 4a05 tstb %d5 <== NOT EXECUTED 4685e: 660e bnes 4686e <_rename_r+0x182> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
return -1;
46860: 78ff moveq #-1,%d4 <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
46862: 2004 movel %d4,%d0 <== NOT EXECUTED 46864: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 4686a: 4e5e unlk %fp <== NOT EXECUTED 4686c: 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 );
4686e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return -1;
46870: 78ff moveq #-1,%d4 <== 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 );
46872: 4eb9 0004 51b8 jsr 451b8 <rtems_filesystem_freenode> <== NOT EXECUTED 46878: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
4687a: 2004 movel %d4,%d0 <== NOT EXECUTED 4687c: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 46882: 4e5e unlk %fp <== NOT EXECUTED 46884: 4e75 rts <== NOT EXECUTED
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,
46886: 42a7 clrl %sp@- <== NOT EXECUTED 46888: 45ee ffd0 lea %fp@(-48),%a2 <== NOT EXECUTED 4688c: 2400 movel %d0,%d2 <== NOT EXECUTED 4688e: 2f0a movel %a2,%sp@- <== NOT EXECUTED 46890: 4878 0002 pea 2 <DOUBLE_FLOAT> <== NOT EXECUTED 46894: 2f00 movel %d0,%sp@- <== NOT EXECUTED 46896: 2f03 movel %d3,%sp@- <== NOT EXECUTED 46898: 4eb9 0004 5094 jsr 45094 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
RTEMS_LIBIO_PERMS_WRITE,
&old_parent_loc,
false );
if ( result != 0 )
4689e: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 468a2: 4a80 tstl %d0 <== NOT EXECUTED 468a4: 66ba bnes 46860 <_rename_r+0x174> <== NOT EXECUTED
return -1;
free_old_parentloc = true;
468a6: 7a01 moveq #1,%d5 <== NOT EXECUTED 468a8: 6000 fe7c braw 46726 <_rename_r+0x3a> <== NOT EXECUTED
rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
468ac: 2f02 movel %d2,%sp@- <== NOT EXECUTED 468ae: 47f9 0004 51b8 lea 451b8 <rtems_filesystem_freenode>,%a3 <== NOT EXECUTED 468b4: 4e93 jsr %a3@ <== NOT EXECUTED
if ( free_old_parentloc )
468b6: 588f addql #4,%sp <== NOT EXECUTED 468b8: 4a05 tstb %d5 <== NOT EXECUTED 468ba: 6614 bnes 468d0 <_rename_r+0x1e4> <== NOT EXECUTED
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
468bc: 2f03 movel %d3,%sp@- <== NOT EXECUTED
return -1;
468be: 78ff moveq #-1,%d4 <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
468c0: 4e93 jsr %a3@ <== NOT EXECUTED
return -1;
468c2: 588f addql #4,%sp <== NOT EXECUTED
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
rtems_filesystem_freenode( &old_loc );
return result;
}
468c4: 2004 movel %d4,%d0 <== NOT EXECUTED 468c6: 4cee 0c3c ffa4 moveml %fp@(-92),%d2-%d5/%a2-%a3 <== NOT EXECUTED 468cc: 4e5e unlk %fp <== NOT EXECUTED 468ce: 4e75 rts <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
468d0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
return -1;
468d2: 78ff moveq #-1,%d4 <== NOT EXECUTED
result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
if ( result != 0 ) {
rtems_filesystem_freenode( &new_parent_loc );
if ( free_old_parentloc )
rtems_filesystem_freenode( &old_parent_loc );
468d4: 4e93 jsr %a3@ <== NOT EXECUTED 468d6: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &old_loc );
468d8: 2f03 movel %d3,%sp@- <== NOT EXECUTED 468da: 4e93 jsr %a3@ <== NOT EXECUTED
return -1;
468dc: 588f addql #4,%sp <== NOT EXECUTED 468de: 60e4 bras 468c4 <_rename_r+0x1d8> <== NOT EXECUTED
00046f9c <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
46f9c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return unlink( path );
46fa0: 2d6e 000c 0008 movel %fp@(12),%fp@(8) <== NOT EXECUTED
}
46fa6: 4e5e unlk %fp <== NOT EXECUTED
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
46fa8: 4ef9 0004 6e28 jmp 46e28 <unlink> <== NOT EXECUTED
...
0005bee0 <_write_r>:
struct _reent *ptr __attribute__((unused)),
int fd,
const void *buf,
size_t nbytes
)
{
5bee0: 4e56 0000 linkw %fp,#0 5bee4: 222e 0010 movel %fp@(16),%d1 5bee8: 202e 000c movel %fp@(12),%d0
return write( fd, buf, nbytes );
5beec: 2d6e 0014 0010 movel %fp@(20),%fp@(16) 5bef2: 2d41 000c movel %d1,%fp@(12) 5bef6: 2d40 0008 movel %d0,%fp@(8)
}
5befa: 4e5e unlk %fp
int fd,
const void *buf,
size_t nbytes
)
{
return write( fd, buf, nbytes );
5befc: 4ef9 0005 c040 jmp 5c040 <write>
...
00044c44 <access>:
int access(
const char *path,
int amode
)
{
44c44: 4e56 ffb8 linkw %fp,#-72 44c48: 2f02 movel %d2,%sp@-
struct stat statbuf;
if ( stat(path, &statbuf) )
44c4a: 486e ffba pea %fp@(-70) 44c4e: 2f2e 0008 movel %fp@(8),%sp@-
int access(
const char *path,
int amode
)
{
44c52: 242e 000c movel %fp@(12),%d2
struct stat statbuf;
if ( stat(path, &statbuf) )
44c56: 4eb9 0004 67f0 jsr 467f0 <stat> 44c5c: 508f addql #8,%sp 44c5e: 4a80 tstl %d0
44c60: 6626 bnes 44c88 <access+0x44>
return -1;
if ( amode & R_OK ) {
44c62: 44c2 movew %d2,%ccr
44c64: 672c beqs 44c92 <access+0x4e>
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
44c66: 0802 0001 btst #1,%d2
44c6a: 6610 bnes 44c7c <access+0x38>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
44c6c: 0802 0000 btst #0,%d2
44c70: 6634 bnes 44ca6 <access+0x62>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44c72: 242e ffb4 movel %fp@(-76),%d2
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44c76: 4280 clrl %d0
}
44c78: 4e5e unlk %fp 44c7a: 4e75 rts
if (!( statbuf.st_mode & S_IREAD ))
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
44c7c: 202e ffc6 movel %fp@(-58),%d0 44c80: 0280 0000 0080 andil #128,%d0
44c86: 66e4 bnes 44c6c <access+0x28>
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44c88: 242e ffb4 movel %fp@(-76),%d2
return -1;
}
if ( amode & W_OK ) {
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
44c8c: 70ff moveq #-1,%d0
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
}
44c8e: 4e5e unlk %fp 44c90: 4e75 rts
if ( stat(path, &statbuf) )
return -1;
if ( amode & R_OK ) {
if (!( statbuf.st_mode & S_IREAD ))
44c92: 202e ffc6 movel %fp@(-58),%d0 44c96: 0280 0000 0100 andil #256,%d0
44c9c: 67ea beqs 44c88 <access+0x44>
return -1;
}
if ( amode & W_OK ) {
44c9e: 0802 0001 btst #1,%d2
44ca2: 67c8 beqs 44c6c <access+0x28> <== NEVER TAKEN
44ca4: 60d6 bras 44c7c <access+0x38>
if ( !( statbuf.st_mode & S_IWRITE ) )
return -1;
}
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
44ca6: 7040 moveq #64,%d0 44ca8: c0ae ffc6 andl %fp@(-58),%d0
return -1;
}
return 0;
}
44cac: 242e ffb4 movel %fp@(-76),%d2
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44cb0: 4a80 tstl %d0 44cb2: 57c0 seq %d0
}
44cb4: 4e5e unlk %fp
if ( amode & X_OK ) {
if ( !( statbuf.st_mode & S_IEXEC ) )
return -1;
}
return 0;
44cb6: 49c0 extbl %d0
}
...
000466f0 <adjtime>:
int adjtime(
struct timeval *delta,
struct timeval *olddelta
)
{
466f0: 4e56 ffec linkw %fp,#-20 466f4: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 466f8: 246e 0008 moveal %fp@(8),%a2 466fc: 266e 000c moveal %fp@(12),%a3
long adjustment;
/*
* Simple validations
*/
if ( !delta )
46700: 4a8a tstl %a2 46702: 6700 00ec beqw 467f0 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( delta->tv_usec >= TOD_MICROSECONDS_PER_SECOND )
46706: 202a 0004 movel %a2@(4),%d0 4670a: 0c80 000f 423f cmpil #999999,%d0 46710: 6200 00de bhiw 467f0 <adjtime+0x100>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( olddelta ) {
46714: 4a8b tstl %a3
46716: 670a beqs 46722 <adjtime+0x32>
olddelta->tv_sec = 0;
olddelta->tv_usec = 0;
46718: 42ab 0004 clrl %a3@(4) 4671c: 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;
46720: 4293 clrl %a3@
olddelta->tv_usec = 0;
}
/* convert delta to microseconds */
adjustment = (delta->tv_sec * TOD_MICROSECONDS_PER_SECOND);
46722: 223c 000f 4240 movel #1000000,%d1 46728: 4c12 1800 mulsl %a2@,%d1
adjustment += delta->tv_usec;
4672c: d081 addl %d1,%d0
/* too small to account for */
if ( adjustment < rtems_configuration_get_microseconds_per_tick() )
4672e: b0b9 0005 fa80 cmpl 5fa80 <Configuration+0xc>,%d0
46734: 640c bccs 46742 <adjtime+0x52>
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
46736: 4280 clrl %d0
}
46738: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 4673e: 4e5e unlk %fp 46740: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46742: 2039 0006 1354 movel 61354 <_Thread_Dispatch_disable_level>,%d0 46748: 5280 addql #1,%d0 4674a: 23c0 0006 1354 movel %d0,61354 <_Thread_Dispatch_disable_level>
* This prevents context switches while we are adjusting the TOD
*/
_Thread_Disable_dispatch();
_TOD_Get( &ts );
46750: 240e movel %fp,%d2 46752: 5182 subql #8,%d2 46754: 2f02 movel %d2,%sp@- 46756: 4eb9 0004 80a8 jsr 480a8 <_TOD_Get>
ts.tv_sec += delta->tv_sec;
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
4675c: 202a 0004 movel %a2@(4),%d0 46760: 223c 0000 03e8 movel #1000,%d1 46766: 4c01 0800 mulsl %d1,%d0
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
4676a: 588f addql #4,%sp
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
4676c: 2212 movel %a2@,%d1
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
4676e: d0ae fffc addl %fp@(-4),%d0
_Thread_Disable_dispatch();
_TOD_Get( &ts );
ts.tv_sec += delta->tv_sec;
46772: d3ae fff8 addl %d1,%fp@(-8)
ts.tv_nsec += delta->tv_usec * TOD_NANOSECONDS_PER_MICROSECOND;
46776: 2d40 fffc movel %d0,%fp@(-4)
/* if adjustment is too much positive */
while ( ts.tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) {
4677a: 0c80 3b9a c9ff cmpil #999999999,%d0
46780: 631c blss 4679e <adjtime+0xae>
46782: 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(
46786: 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;
46788: 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 ) {
4678e: 0c80 3b9a c9ff cmpil #999999999,%d0
46794: 62f0 bhis 46786 <adjtime+0x96> <== NEVER TAKEN
46796: 2d40 fffc movel %d0,%fp@(-4) 4679a: 2d41 fff8 movel %d1,%fp@(-8)
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) ) {
4679e: 0c80 c465 3600 cmpil #-1000000000,%d0
467a4: 621c bhis 467c2 <adjtime+0xd2> <== NEVER TAKEN
467a6: 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(
467aa: 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;
467ac: 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) ) {
467b2: 0c80 c465 3600 cmpil #-1000000000,%d0
467b8: 63f0 blss 467aa <adjtime+0xba>
467ba: 2d40 fffc movel %d0,%fp@(-4) 467be: 2d41 fff8 movel %d1,%fp@(-8)
ts.tv_nsec += TOD_NANOSECONDS_PER_SECOND;
ts.tv_sec--;
}
_TOD_Set( &ts );
467c2: 2f02 movel %d2,%sp@- 467c4: 4eb9 0004 8174 jsr 48174 <_TOD_Set>
_Thread_Enable_dispatch();
467ca: 4eb9 0004 945e jsr 4945e <_Thread_Enable_dispatch>
/* set the user's output */
if ( olddelta )
467d0: 588f addql #4,%sp 467d2: 4a8b tstl %a3 467d4: 6700 ff60 beqw 46736 <adjtime+0x46>
*olddelta = *delta;
return 0;
467d8: 4280 clrl %d0
_Thread_Enable_dispatch();
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
467da: 2212 movel %a2@,%d1 467dc: 242a 0004 movel %a2@(4),%d2 467e0: 2681 movel %d1,%a3@ 467e2: 2742 0004 movel %d2,%a3@(4)
return 0;
}
467e6: 4cee 0c04 ffec moveml %fp@(-20),%d2/%a2-%a3 467ec: 4e5e unlk %fp 467ee: 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 );
467f0: 4eb9 0004 f6dc jsr 4f6dc <__errno> 467f6: 7216 moveq #22,%d1 467f8: 2040 moveal %d0,%a0 467fa: 70ff moveq #-1,%d0
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
467fc: 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 );
46802: 2081 movel %d1,%a0@
/* set the user's output */
if ( olddelta )
*olddelta = *delta;
return 0;
}
46804: 4e5e unlk %fp <== NOT EXECUTED
000485c4 <alarm>:
}
unsigned int alarm(
unsigned int seconds
)
{
485c4: 4e56 fff4 linkw %fp,#-12 485c8: 48d7 001c moveml %d2-%d4,%sp@ 485cc: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
485d0: 4ab9 0006 49ec tstl 649ec <_POSIX_signals_Alarm_timer+0x1c>
485d6: 674e beqs 48626 <alarm+0x62>
_Watchdog_Initialize( the_timer, _POSIX_signals_Alarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
485d8: 4879 0006 49d0 pea 649d0 <_POSIX_signals_Alarm_timer> 485de: 4eb9 0004 d764 jsr 4d764 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
485e4: 588f addql #4,%sp 485e6: 7201 moveq #1,%d1 485e8: 5580 subql #2,%d0 485ea: b280 cmpl %d0,%d1
485ec: 645e bccs 4864c <alarm+0x88>
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
485ee: 4283 clrl %d3
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
485f0: 4a82 tstl %d2
485f2: 660c bnes 48600 <alarm+0x3c> <== NEVER TAKEN
_Watchdog_Insert_seconds( the_timer, seconds );
return remaining;
}
485f4: 2003 movel %d3,%d0 485f6: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 485fc: 4e5e unlk %fp 485fe: 4e75 rts
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48600: 4879 0006 49d0 pea 649d0 <_POSIX_signals_Alarm_timer> 48606: 4879 0006 4d1a pea 64d1a <_Watchdog_Seconds_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
4860c: 23c2 0006 49dc movel %d2,649dc <_POSIX_signals_Alarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Seconds_chain, the_watchdog );
48612: 4eb9 0004 d61c jsr 4d61c <_Watchdog_Insert> 48618: 508f addql #8,%sp 4861a: 2003 movel %d3,%d0 4861c: 4cee 001c fff4 moveml %fp@(-12),%d2-%d4 48622: 4e5e unlk %fp 48624: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
48626: 42b9 0006 49d8 clrl 649d8 <_POSIX_signals_Alarm_timer+0x8>
unsigned int alarm(
unsigned int seconds
)
{
unsigned int remaining = 0;
4862c: 4283 clrl %d3
the_watchdog->routine = routine;
4862e: 203c 0004 85a8 movel #296360,%d0
the_watchdog->id = id;
48634: 42b9 0006 49f0 clrl 649f0 <_POSIX_signals_Alarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4863a: 23c0 0006 49ec movel %d0,649ec <_POSIX_signals_Alarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
48640: 42b9 0006 49f4 clrl 649f4 <_POSIX_signals_Alarm_timer+0x24>
remaining = the_timer->initial -
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
48646: 4a82 tstl %d2
48648: 67aa beqs 485f4 <alarm+0x30> <== NEVER TAKEN
4864a: 60b4 bras 48600 <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);
4864c: 2839 0006 49e8 movel 649e8 <_POSIX_signals_Alarm_timer+0x18>,%d4 48652: 98b9 0006 49e4 subl 649e4 <_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 -
48658: 2639 0006 49dc movel 649dc <_POSIX_signals_Alarm_timer+0xc>,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
4865e: 4eb9 0004 b0b8 jsr 4b0b8 <TOD_TICKS_PER_SECOND_method> 48664: 4c40 4004 remul %d0,%d4,%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 -
48668: 9684 subl %d4,%d3
((the_timer->stop_time - the_timer->start_time) / TOD_TICKS_PER_SECOND);
}
}
if ( seconds )
4866a: 4a82 tstl %d2
4866c: 6786 beqs 485f4 <alarm+0x30> <== NEVER TAKEN
4866e: 6090 bras 48600 <alarm+0x3c>
00042be0 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42be0: 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) {
42be4: 203c 0006 02b4 movel #393908,%d0
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
42bea: 2f0b movel %a3,%sp@- 42bec: 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) {
42bee: b0b9 0005 ec78 cmpl 5ec78 <rtems_current_user_env>,%d0
42bf4: 6778 beqs 42c6e <chroot+0x8e>
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);
42bf6: 2f2e 0008 movel %fp@(8),%sp@- 42bfa: 4eb9 0004 bd10 jsr 4bd10 <chdir>
if (result) {
42c00: 588f addql #4,%sp 42c02: 4a80 tstl %d0 42c04: 6600 009a bnew 42ca0 <chroot+0xc0>
rtems_set_errno_and_return_minus_one( errno );
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
42c08: 42a7 clrl %sp@- 42c0a: 45ee ffec lea %fp@(-20),%a2 42c0e: 2f0a movel %a2,%sp@- 42c10: 42a7 clrl %sp@- 42c12: 4878 0001 pea 1 <ADD> 42c16: 4879 0005 df3e pea 5df3e <dotdotname+0x4> 42c1c: 4eb9 0004 3050 jsr 43050 <rtems_filesystem_evaluate_path> 42c22: 4fef 0014 lea %sp@(20),%sp 42c26: 4a80 tstl %d0
42c28: 6676 bnes 42ca0 <chroot+0xc0> <== NEVER TAKEN
/* our cwd has changed, though - but there is no easy way of return :-( */
rtems_set_errno_and_return_minus_one( errno );
}
rtems_filesystem_freenode(&rtems_filesystem_root);
42c2a: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0 42c30: 41e8 0018 lea %a0@(24),%a0 42c34: 2f08 movel %a0,%sp@- 42c36: 4eb9 0004 3174 jsr 43174 <rtems_filesystem_freenode>
rtems_filesystem_root = loc;
42c3c: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0
return 0;
42c42: 588f addql #4,%sp 42c44: 4280 clrl %d0
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;
42c46: 2152 0018 movel %a2@,%a0@(24) 42c4a: 216e fff0 001c movel %fp@(-16),%a0@(28) 42c50: 216e fff4 0020 movel %fp@(-12),%a0@(32) 42c56: 216e fff8 0024 movel %fp@(-8),%a0@(36) 42c5c: 216e fffc 0028 movel %fp@(-4),%a0@(40)
return 0;
}
42c62: 246e ffe4 moveal %fp@(-28),%a2 42c66: 266e ffe8 moveal %fp@(-24),%a3 42c6a: 4e5e unlk %fp 42c6c: 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*/
42c6e: 4eb9 0004 435c jsr 4435c <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
42c74: 41f9 0006 02b4 lea 602b4 <rtems_global_user_env>,%a0 42c7a: b1f9 0005 ec78 cmpal 5ec78 <rtems_current_user_env>,%a0 42c80: 6600 ff74 bnew 42bf6 <chroot+0x16>
rtems_set_errno_and_return_minus_one( ENOTSUP );
42c84: 4eb9 0004 f34c jsr 4f34c <__errno> <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42c8a: 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 );
42c8e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c90: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42c92: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42c96: 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 );
42c98: 20bc 0000 0086 movel #134,%a0@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42c9e: 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 );
42ca0: 45f9 0004 f34c lea 4f34c <__errno>,%a2 <== NOT EXECUTED 42ca6: 4e92 jsr %a2@ <== NOT EXECUTED 42ca8: 2640 moveal %d0,%a3 <== NOT EXECUTED 42caa: 4e92 jsr %a2@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42cac: 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 );
42cb0: 2040 moveal %d0,%a0 <== NOT EXECUTED 42cb2: 70ff moveq #-1,%d0 <== NOT EXECUTED 42cb4: 2690 movel %a0@,%a3@ <== NOT EXECUTED
}
rtems_filesystem_freenode(&rtems_filesystem_root);
rtems_filesystem_root = loc;
return 0;
}
42cb6: 266e ffe8 moveal %fp@(-24),%a3 <== NOT EXECUTED 42cba: 4e5e unlk %fp <== NOT EXECUTED
...
0004655c <clock_gettime>:
int clock_gettime(
clockid_t clock_id,
struct timespec *tp
)
{
4655c: 4e56 0000 linkw %fp,#0 46560: 202e 0008 movel %fp@(8),%d0 46564: 222e 000c movel %fp@(12),%d1 46568: 2f02 movel %d2,%sp@-
if ( !tp )
4656a: 4a81 tstl %d1
4656c: 6718 beqs 46586 <clock_gettime+0x2a>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
4656e: 7401 moveq #1,%d2 46570: b480 cmpl %d0,%d2
46572: 6752 beqs 465c6 <clock_gettime+0x6a>
_TOD_Get(tp);
return 0;
}
#ifdef CLOCK_MONOTONIC
if ( clock_id == CLOCK_MONOTONIC ) {
46574: 7404 moveq #4,%d2 46576: b480 cmpl %d0,%d2
46578: 6738 beqs 465b2 <clock_gettime+0x56> <== NEVER TAKEN
return 0;
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
4657a: 7402 moveq #2,%d2 4657c: b480 cmpl %d0,%d2
4657e: 6732 beqs 465b2 <clock_gettime+0x56>
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
46580: 7203 moveq #3,%d1 46582: b280 cmpl %d0,%d1
46584: 6716 beqs 4659c <clock_gettime+0x40>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
46586: 4eb9 0004 fc64 jsr 4fc64 <__errno>
return 0;
}
4658c: 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 );
46590: 2040 moveal %d0,%a0 46592: 7216 moveq #22,%d1 46594: 70ff moveq #-1,%d0
return 0;
}
46596: 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 );
46598: 2081 movel %d1,%a0@
return 0;
}
4659a: 4e75 rts
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
if ( clock_id == CLOCK_THREAD_CPUTIME )
rtems_set_errno_and_return_minus_one( ENOSYS );
4659c: 4eb9 0004 fc64 jsr 4fc64 <__errno> 465a2: 7458 moveq #88,%d2 465a4: 2040 moveal %d0,%a0 465a6: 70ff moveq #-1,%d0 465a8: 2082 movel %d2,%a0@
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
465aa: 242e fffc movel %fp@(-4),%d2 465ae: 4e5e unlk %fp 465b0: 4e75 rts
}
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
465b2: 2f01 movel %d1,%sp@- 465b4: 4eb9 0004 86cc jsr 486cc <_TOD_Get_uptime_as_timespec>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
465ba: 242e fffc movel %fp@(-4),%d2
#endif
#ifdef _POSIX_CPUTIME
if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
465be: 588f addql #4,%sp 465c0: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
465c2: 4e5e unlk %fp 465c4: 4e75 rts
{
if ( !tp )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
_TOD_Get(tp);
465c6: 2f01 movel %d1,%sp@- 465c8: 4eb9 0004 8630 jsr 48630 <_TOD_Get>
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
465ce: 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;
465d2: 588f addql #4,%sp 465d4: 4280 clrl %d0
#endif
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
465d6: 4e5e unlk %fp
...
000465dc <clock_settime>:
int clock_settime(
clockid_t clock_id,
const struct timespec *tp
)
{
465dc: 4e56 0000 linkw %fp,#0 465e0: 202e 0008 movel %fp@(8),%d0 465e4: 206e 000c moveal %fp@(12),%a0
if ( !tp )
465e8: 4a88 tstl %a0
465ea: 6712 beqs 465fe <clock_settime+0x22> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
if ( clock_id == CLOCK_REALTIME ) {
465ec: 7201 moveq #1,%d1 465ee: b280 cmpl %d0,%d1
465f0: 6730 beqs 46622 <clock_settime+0x46>
_Thread_Disable_dispatch();
_TOD_Set( tp );
_Thread_Enable_dispatch();
}
#ifdef _POSIX_CPUTIME
else if ( clock_id == CLOCK_PROCESS_CPUTIME )
465f2: 7202 moveq #2,%d1 465f4: b280 cmpl %d0,%d1
465f6: 6718 beqs 46610 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
#ifdef _POSIX_THREAD_CPUTIME
else if ( clock_id == CLOCK_THREAD_CPUTIME )
465f8: 7203 moveq #3,%d1 465fa: b280 cmpl %d0,%d1
465fc: 6712 beqs 46610 <clock_settime+0x34>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
465fe: 4eb9 0004 fc64 jsr 4fc64 <__errno> 46604: 7216 moveq #22,%d1 46606: 2040 moveal %d0,%a0 46608: 70ff moveq #-1,%d0
return 0;
}
4660a: 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 );
4660c: 2081 movel %d1,%a0@
return 0;
}
4660e: 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 );
46610: 4eb9 0004 fc64 jsr 4fc64 <__errno> 46616: 7258 moveq #88,%d1 46618: 2040 moveal %d0,%a0 4661a: 70ff moveq #-1,%d0
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
4661c: 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 );
4661e: 2081 movel %d1,%a0@
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
}
46620: 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 )
46622: 203c 21da e4ff movel #567993599,%d0 46628: b090 cmpl %a0@,%d0
4662a: 64d2 bccs 465fe <clock_settime+0x22>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4662c: 2039 0006 1b1c movel 61b1c <_Thread_Dispatch_disable_level>,%d0 46632: 5280 addql #1,%d0 46634: 23c0 0006 1b1c movel %d0,61b1c <_Thread_Dispatch_disable_level>
rtems_set_errno_and_return_minus_one( EINVAL );
_Thread_Disable_dispatch();
_TOD_Set( tp );
4663a: 2f08 movel %a0,%sp@- 4663c: 4eb9 0004 8724 jsr 48724 <_TOD_Set>
_Thread_Enable_dispatch();
46642: 4eb9 0004 9a0e jsr 49a0e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif
else
rtems_set_errno_and_return_minus_one( EINVAL );
return 0;
46648: 588f addql #4,%sp 4664a: 4280 clrl %d0
}
4664c: 4e5e unlk %fp <== NOT EXECUTED
000423e8 <devFS_Show>:
#include <rtems/seterr.h>
#include "devfs.h"
int devFS_Show(void)
{
423e8: 4e56 fff4 linkw %fp,#-12
int i;
rtems_filesystem_location_info_t *temp_loc;
rtems_device_name_t *device_name_table;
temp_loc = &rtems_filesystem_root;
423ec: 2079 0005 b720 moveal 5b720 <rtems_current_user_env>,%a0
#include <rtems/seterr.h>
#include "devfs.h"
int devFS_Show(void)
{
423f2: 48d7 040c moveml %d2-%d3/%a2,%sp@
int i;
rtems_filesystem_location_info_t *temp_loc;
rtems_device_name_t *device_name_table;
temp_loc = &rtems_filesystem_root;
device_name_table = (rtems_device_name_t *)temp_loc->node_access;
423f6: 2628 0018 movel %a0@(24),%d3
if (!device_name_table)
423fa: 6752 beqs 4244e <devFS_Show+0x66> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++){
423fc: 4ab9 0005 b588 tstl 5b588 <rtems_device_table_size>
42402: 673e beqs 42442 <devFS_Show+0x5a>
42404: 4280 clrl %d0 42406: 4282 clrl %d2
if (device_name_table[i].device_name){
printk("/%s %d %d\n", device_name_table[i].device_name,
42408: 45f9 0004 3824 lea 43824 <printk>,%a2
device_name_table = (rtems_device_name_t *)temp_loc->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){
4240e: 2200 movel %d0,%d1
temp_loc = &rtems_filesystem_root;
device_name_table = (rtems_device_name_t *)temp_loc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++){
42410: 5282 addql #1,%d2
if (device_name_table[i].device_name){
42412: e989 lsll #4,%d1 42414: 2241 moveal %d1,%a1 42416: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 4241a: 41f0 3800 lea %a0@(00000000,%d3:l),%a0 4241e: 2010 movel %a0@,%d0
42420: 6716 beqs 42438 <devFS_Show+0x50>
printk("/%s %d %d\n", device_name_table[i].device_name,
42422: 2f28 000c movel %a0@(12),%sp@- 42426: 2f28 0008 movel %a0@(8),%sp@- 4242a: 2f00 movel %d0,%sp@- 4242c: 4879 0005 a30e pea 5a30e <IntUartPollCallbacks.6236+0x20> 42432: 4e92 jsr %a2@ 42434: 4fef 0010 lea %sp@(16),%sp
temp_loc = &rtems_filesystem_root;
device_name_table = (rtems_device_name_t *)temp_loc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++){
42438: 2002 movel %d2,%d0 4243a: b4b9 0005 b588 cmpl 5b588 <rtems_device_table_size>,%d2
42440: 65cc bcss 4240e <devFS_Show+0x26>
if (device_name_table[i].device_name){
printk("/%s %d %d\n", device_name_table[i].device_name,
device_name_table[i].major, device_name_table[i].minor);
}
}
return 0;
42442: 4280 clrl %d0
}
42444: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4244a: 4e5e unlk %fp 4244c: 4e75 rts
rtems_device_name_t *device_name_table;
temp_loc = &rtems_filesystem_root;
device_name_table = (rtems_device_name_t *)temp_loc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
4244e: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> 42454: 720e moveq #14,%d1 42456: 2040 moveal %d0,%a0 42458: 70ff moveq #-1,%d0
printk("/%s %d %d\n", device_name_table[i].device_name,
device_name_table[i].major, device_name_table[i].minor);
}
}
return 0;
}
4245a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
rtems_device_name_t *device_name_table;
temp_loc = &rtems_filesystem_root;
device_name_table = (rtems_device_name_t *)temp_loc->node_access;
if (!device_name_table)
rtems_set_errno_and_return_minus_one( EFAULT );
42460: 2081 movel %d1,%a0@
printk("/%s %d %d\n", device_name_table[i].device_name,
device_name_table[i].major, device_name_table[i].minor);
}
}
return 0;
}
42462: 4e5e unlk %fp
...
00049c34 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
49c34: 4e56 ffdc linkw %fp,#-36 49c38: 48d7 3c7c moveml %d2-%d6/%a2-%a5,%sp@ 49c3c: 286e 0014 moveal %fp@(20),%a4 49c40: 2c2e 0008 movel %fp@(8),%d6 49c44: 262e 000c movel %fp@(12),%d3
assert( 0 );
rtems_set_errno_and_return_minus_one( EIO );
}
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
49c48: 2814 movel %a4@,%d4
if (!device_name_table)
49c4a: 6700 008a beqw 49cd6 <devFS_evaluate_path+0xa2>
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
49c4e: 2a39 0005 b588 movel 5b588 <rtems_device_table_size>,%d5
49c54: 673c beqs 49c92 <devFS_evaluate_path+0x5e> <== NEVER TAKEN
49c56: 4280 clrl %d0 49c58: 4282 clrl %d2
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
49c5a: 4bf9 0004 db20 lea 4db20 <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)
49c60: 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++) {
49c62: 5282 addql #1,%d2
if (!device_name_table[i].device_name)
49c64: e989 lsll #4,%d1 49c66: 2041 moveal %d1,%a0 49c68: 47f0 0c00 lea %a0@(00000000,%d0:l:4),%a3 49c6c: 47f3 4800 lea %a3@(00000000,%d4:l),%a3 49c70: 2453 moveal %a3@,%a2 49c72: 4a8a tstl %a2
49c74: 6716 beqs 49c8c <devFS_evaluate_path+0x58>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
49c76: 2f03 movel %d3,%sp@- 49c78: 2f0a movel %a2,%sp@- 49c7a: 2f06 movel %d6,%sp@- 49c7c: 4e95 jsr %a5@ 49c7e: 4fef 000c lea %sp@(12),%sp 49c82: 4a80 tstl %d0
49c84: 6606 bnes 49c8c <devFS_evaluate_path+0x58>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
49c86: 4a32 3800 tstb %a2@(00000000,%d3:l)
49c8a: 671e beqs 49caa <devFS_evaluate_path+0x76> <== 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++) {
49c8c: 2002 movel %d2,%d0 49c8e: b485 cmpl %d5,%d2
49c90: 65ce bcss 49c60 <devFS_evaluate_path+0x2c>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
49c92: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> 49c98: 7202 moveq #2,%d1 49c9a: 2040 moveal %d0,%a0 49c9c: 70ff moveq #-1,%d0
}
49c9e: 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 );
49ca4: 2081 movel %d1,%a0@
}
49ca6: 4e5e unlk %fp 49ca8: 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;
49caa: 2079 0005 b720 moveal 5b720 <rtems_current_user_env>,%a0 49cb0: 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;
49cb6: 223c 0005 b6c8 movel #374472,%d1
pathloc->ops = &devFS_ops;
49cbc: 41f9 0005 b680 lea 5b680 <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;
49cc2: 2941 0008 movel %d1,%a4@(8)
pathloc->ops = &devFS_ops;
49cc6: 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];
49cca: 288b movel %a3,%a4@
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
49ccc: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 49cd2: 4e5e unlk %fp 49cd4: 4e75 rts
}
/* 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 );
49cd6: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 49cdc: 740e moveq #14,%d2 <== NOT EXECUTED 49cde: 2040 moveal %d0,%a0 <== NOT EXECUTED 49ce0: 70ff moveq #-1,%d0 <== NOT EXECUTED 49ce2: 2082 movel %d2,%a0@ <== NOT EXECUTED
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
}
49ce4: 4cee 3c7c ffdc moveml %fp@(-36),%d2-%d6/%a2-%a5 <== NOT EXECUTED 49cea: 4e5e unlk %fp <== NOT EXECUTED
000421e4 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
421e4: 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(
421e8: 2039 0005 b588 movel 5b588 <rtems_device_table_size>,%d0 421ee: 2200 movel %d0,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
421f0: 2f0a movel %a2,%sp@- 421f2: 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(
421f6: e989 lsll #4,%d1
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
421f8: 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(
421fa: 2041 moveal %d1,%a0 421fc: 4870 0c00 pea %a0@(00000000,%d0:l:4) 42200: 4eb9 0004 982e jsr 4982e <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
42206: 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(
42208: 2400 movel %d0,%d2
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
4220a: 6744 beqs 42250 <devFS_initialize+0x6c> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOMEM );
memset(
4220c: 2039 0005 b588 movel 5b588 <rtems_device_table_size>,%d0 42212: 2200 movel %d0,%d1 42214: e989 lsll #4,%d1 42216: 2041 moveal %d1,%a0 42218: 4870 0c00 pea %a0@(00000000,%d0:l:4) 4221c: 42a7 clrl %sp@- 4221e: 2f02 movel %d2,%sp@- 42220: 4eb9 0004 d0e0 jsr 4d0e0 <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;
42226: 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;
4222a: 203c 0005 b6c8 movel #374472,%d0
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
42230: 41f9 0005 b680 lea 5b680 <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;
42236: 2540 0024 movel %d0,%a2@(36)
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
/* Set the node_access to device name table */
temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table;
return 0;
4223a: 4280 clrl %d0
/* set file handlers */
temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers;
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;
4223c: 2542 001c movel %d2,%a2@(28)
return 0;
}
42240: 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;
42244: 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;
}
42248: 246e fffc moveal %fp@(-4),%a2 4224c: 4e5e unlk %fp 4224e: 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 );
42250: 4eb9 0004 c7c4 jsr 4c7c4 <__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;
}
42256: 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 );
4225a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4225c: 720c moveq #12,%d1 <== NOT EXECUTED 4225e: 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;
}
42260: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42264: 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 );
42266: 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;
}
...
00042468 <devFS_ioctl>:
int devFS_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
42468: 4e56 fff0 linkw %fp,#-16 4246c: 206e 0008 moveal %fp@(8),%a0
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
42470: 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->pathinfo.node_access;
42474: 2268 0018 moveal %a0@(24),%a1
args.iop = iop;
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
42478: 2f29 000c movel %a1@(12),%sp@-
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
4247c: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
status = rtems_io_control(
42482: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.command = command;
args.buffer = buffer;
42486: 2d6e 0010 fff8 movel %fp@(16),%fp@(-8)
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
4248c: 2d48 fff0 movel %a0,%fp@(-16)
args.command = command;
args.buffer = buffer;
status = rtems_io_control(
42490: 4eb9 0004 690c jsr 4690c <rtems_io_control>
np->major,
np->minor,
(void *) &args
);
if ( status )
42496: 4fef 000c lea %sp@(12),%sp 4249a: 4a80 tstl %d0
4249c: 6608 bnes 424a6 <devFS_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4249e: 202e fffc movel %fp@(-4),%d0
}
424a2: 4e5e unlk %fp 424a4: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
424a6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 424a8: 4eb9 0004 9d00 jsr 49d00 <rtems_deviceio_errno> <== NOT EXECUTED 424ae: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
424b0: 4e5e unlk %fp <== NOT EXECUTED
0004226c <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') &&
4226c: 7264 moveq #100,%d1
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
4226e: 4e56 ffdc linkw %fp,#-36 42272: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 42276: 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') &&
4227a: 1013 moveb %a3@,%d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
4227c: 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') &&
42280: 49c0 extbl %d0
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
42282: 2e2e 0010 movel %fp@(16),%d7 42286: 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') &&
4228a: b280 cmpl %d0,%d1 4228c: 6700 00d0 beqw 4235e <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))
42290: 2005 movel %d5,%d0 42292: 0280 0000 f000 andil #61440,%d0 42298: 0c80 0000 6000 cmpil #24576,%d0
4229e: 670a beqs 422aa <devFS_mknod+0x3e> <== NEVER TAKEN
422a0: 0c80 0000 2000 cmpil #8192,%d0 422a6: 6600 00ea bnew 42392 <devFS_mknod+0x126>
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;
422aa: 206e 0018 moveal %fp@(24),%a0 422ae: 2450 moveal %a0@,%a2
if (!device_name_table)
422b0: 4a8a tstl %a2 422b2: 6700 010e beqw 423c2 <devFS_mknod+0x156>
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
422b6: 2639 0005 b588 movel 5b588 <rtems_device_table_size>,%d3 422bc: 6700 00ec beqw 423aa <devFS_mknod+0x13e> 422c0: 4280 clrl %d0 422c2: 78ff moveq #-1,%d4 422c4: 4282 clrl %d2
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
422c6: 49f9 0004 d610 lea 4d610 <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)
422cc: 2200 movel %d0,%d1 422ce: e989 lsll #4,%d1 422d0: 2241 moveal %d1,%a1 422d2: 41f1 0c00 lea %a1@(00000000,%d0:l:4),%a0 422d6: 2030 a800 movel %a0@(00000000,%a2:l),%d0
422da: 675e beqs 4233a <devFS_mknod+0xce>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
422dc: 2f00 movel %d0,%sp@- 422de: 2f0b movel %a3,%sp@- 422e0: 4e94 jsr %a4@ 422e2: 508f addql #8,%sp 422e4: 4a80 tstl %d0
422e6: 675e beqs 42346 <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++){
422e8: 5282 addql #1,%d2 422ea: 2002 movel %d2,%d0 422ec: b682 cmpl %d2,%d3
422ee: 62dc bhis 422cc <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)
422f0: 70ff moveq #-1,%d0 422f2: b084 cmpl %d4,%d0 422f4: 6700 00b4 beqw 423aa <devFS_mknod+0x13e>
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
422f8: 203c 0000 0700 movel #1792,%d0 422fe: 40c2 movew %sr,%d2 42300: 8082 orl %d2,%d0 42302: 46c0 movew %d0,%sr
device_name_table[slot].device_name = (char *)path;
42304: 2004 movel %d4,%d0 42306: e988 lsll #4,%d0 42308: 2240 moveal %d0,%a1 4230a: 41f1 4c00 lea %a1@(00000000,%d4:l:4),%a0 4230e: d5c8 addal %a0,%a2 42310: 248b movel %a3,%a2@
device_name_table[slot].device_name_length = strlen(path);
42312: 2f0b movel %a3,%sp@- 42314: 4eb9 0004 db08 jsr 4db08 <strlen> 4231a: 588f addql #4,%sp 4231c: 2540 0004 movel %d0,%a2@(4)
device_name_table[slot].major = major;
42320: 2547 0008 movel %d7,%a2@(8)
device_name_table[slot].minor = minor;
42324: 2546 000c movel %d6,%a2@(12)
device_name_table[slot].mode = mode;
42328: 2545 0010 movel %d5,%a2@(16)
_ISR_Enable(level);
4232c: 46c2 movew %d2,%sr
return 0;
4232e: 4280 clrl %d0
}
42330: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 42336: 4e5e unlk %fp 42338: 4e75 rts
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)
4233a: 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++){
4233c: 5282 addql #1,%d2 4233e: 2002 movel %d2,%d0 42340: b682 cmpl %d2,%d3
42342: 6288 bhis 422cc <devFS_mknod+0x60>
42344: 60aa bras 422f0 <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 );
42346: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 4234c: 7411 moveq #17,%d2 <== NOT EXECUTED 4234e: 2040 moveal %d0,%a0 <== NOT EXECUTED 42350: 70ff moveq #-1,%d0 <== NOT EXECUTED 42352: 2082 movel %d2,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
42354: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 4235a: 4e5e unlk %fp <== NOT EXECUTED 4235c: 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') &&
4235e: 123c 0065 moveb #101,%d1 42362: 102b 0001 moveb %a3@(1),%d0 42366: 49c0 extbl %d0 42368: b280 cmpl %d0,%d1 4236a: 6600 ff24 bnew 42290 <devFS_mknod+0x24> 4236e: 123c 0076 moveb #118,%d1 42372: 102b 0002 moveb %a3@(2),%d0 42376: 49c0 extbl %d0 42378: b280 cmpl %d0,%d1 4237a: 6600 ff14 bnew 42290 <devFS_mknod+0x24>
(path[2] == 'v') && (path[3] == '\0'))
4237e: 4a2b 0003 tstb %a3@(3) 42382: 6600 ff0c bnew 42290 <devFS_mknod+0x24>
return 0;
42386: 4280 clrl %d0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
42388: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4238e: 4e5e unlk %fp 42390: 4e75 rts
(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 );
42392: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 42398: 7816 moveq #22,%d4 <== NOT EXECUTED 4239a: 2040 moveal %d0,%a0 <== NOT EXECUTED 4239c: 70ff moveq #-1,%d0 <== NOT EXECUTED 4239e: 2084 movel %d4,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
423a0: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 423a6: 4e5e unlk %fp <== NOT EXECUTED 423a8: 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 );
423aa: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 423b0: 720c moveq #12,%d1 <== NOT EXECUTED 423b2: 2040 moveal %d0,%a0 <== NOT EXECUTED 423b4: 70ff moveq #-1,%d0 <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
423b6: 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 );
423bc: 2081 movel %d1,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
423be: 4e5e unlk %fp <== NOT EXECUTED 423c0: 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 );
423c2: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 423c8: 760e moveq #14,%d3 <== NOT EXECUTED 423ca: 2040 moveal %d0,%a0 <== NOT EXECUTED 423cc: 70ff moveq #-1,%d0 <== NOT EXECUTED 423ce: 2083 movel %d3,%a0@ <== NOT EXECUTED
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
423d0: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 <== NOT EXECUTED 423d6: 4e5e unlk %fp <== NOT EXECUTED
...
000424f0 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
424f0: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 424f4: 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(
424f8: 486e ffe4 pea %fp@(-28) <== NOT EXECUTED
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
424fc: 2268 0018 moveal %a0@(24),%a1 <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
42500: 2f29 000c movel %a1@(12),%sp@- <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
42504: 2d68 0014 fff8 movel %a0@(20),%fp@(-8) <== NOT EXECUTED
args.bytes_moved = 0;
status = rtems_io_read(
4250a: 2f29 0008 movel %a1@(8),%sp@- <== NOT EXECUTED
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
4250e: 2d6e 000c fff0 movel %fp@(12),%fp@(-16) <== NOT EXECUTED
args.count = count;
42514: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12) <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4251a: 2028 000c movel %a0@(12),%d0 <== NOT EXECUTED 4251e: 2228 0010 movel %a0@(16),%d1 <== NOT EXECUTED
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
42522: 2d48 ffe4 movel %a0,%fp@(-28) <== NOT EXECUTED
args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
42526: 42ae fffc clrl %fp@(-4) <== NOT EXECUTED
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4252a: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 4252e: 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(
42532: 4eb9 0004 6a70 jsr 46a70 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
42538: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4253c: 4a80 tstl %d0 <== NOT EXECUTED 4253e: 6608 bnes 42548 <devFS_read+0x58> <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
42540: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
}
42544: 4e5e unlk %fp <== NOT EXECUTED 42546: 4e75 rts <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
42548: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4254a: 4eb9 0004 9d00 jsr 49d00 <rtems_deviceio_errno> <== NOT EXECUTED 42550: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
42552: 4e5e unlk %fp <== NOT EXECUTED
...
00042558 <devFS_stat>:
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42558: 4e56 0000 linkw %fp,#0
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
4255c: 206e 0008 moveal %fp@(8),%a0
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
42560: 226e 000c moveal %fp@(12),%a1
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
42564: 2050 moveal %a0@,%a0
if (!the_dev)
42566: 4a88 tstl %a0
42568: 671a beqs 42584 <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 );
4256a: 2228 000c movel %a0@(12),%d1
buf->st_mode = the_dev->mode;
return 0;
4256e: 4280 clrl %d0
}
42570: 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 );
42572: 2368 0008 0016 movel %a0@(8),%a1@(22)
buf->st_mode = the_dev->mode;
42578: 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 );
4257e: 2341 001a movel %d1,%a1@(26)
buf->st_mode = the_dev->mode;
return 0;
}
42582: 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 );
42584: 4eb9 0004 c7c4 jsr 4c7c4 <__errno> <== NOT EXECUTED 4258a: 720e moveq #14,%d1 <== NOT EXECUTED 4258c: 2040 moveal %d0,%a0 <== NOT EXECUTED 4258e: 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;
}
42590: 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 );
42592: 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;
}
...
00042598 <devFS_write>:
ssize_t devFS_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
42598: 4e56 ffe4 linkw %fp,#-28 4259c: 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(
425a0: 486e ffe4 pea %fp@(-28)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
425a4: 2268 0018 moveal %a0@(24),%a1
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
425a8: 2f29 000c movel %a1@(12),%sp@-
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
425ac: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
args.bytes_moved = 0;
status = rtems_io_write(
425b2: 2f29 0008 movel %a1@(8),%sp@-
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
425b6: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
425bc: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
425c2: 2028 000c movel %a0@(12),%d0 425c6: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
425ca: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
425ce: 42ae fffc clrl %fp@(-4)
rtems_device_name_t *np;
np = (rtems_device_name_t *)iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
425d2: 2d40 ffe8 movel %d0,%fp@(-24) 425d6: 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(
425da: 4eb9 0004 6ab8 jsr 46ab8 <rtems_io_write>
np->major,
np->minor,
(void *) &args
);
if ( status )
425e0: 4fef 000c lea %sp@(12),%sp 425e4: 4a80 tstl %d0
425e6: 6608 bnes 425f0 <devFS_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
425e8: 202e fffc movel %fp@(-4),%d0
}
425ec: 4e5e unlk %fp 425ee: 4e75 rts
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
425f0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 425f2: 4eb9 0004 9d00 jsr 49d00 <rtems_deviceio_errno> <== NOT EXECUTED 425f8: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
425fa: 4e5e unlk %fp <== NOT EXECUTED
...
0004dcc6 <device_ftruncate>:
rtems_libio_t *iop,
rtems_off64_t length
)
{
return 0;
}
4dcc6: 4280 clrl %d0 <== NOT EXECUTED
int device_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4dcc8: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
return 0; }
4dccc: 4e5e unlk %fp <== NOT EXECUTED
0004dc6a <device_ioctl>:
int device_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
4dc6a: 4e56 fff0 linkw %fp,#-16 4dc6e: 206e 0008 moveal %fp@(8),%a0
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
4dc72: 486e fff0 pea %fp@(-16)
args.iop = iop;
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
4dc76: 2268 0018 moveal %a0@(24),%a1
status = rtems_io_control(
4dc7a: 2f29 0050 movel %a1@(80),%sp@-
rtems_libio_ioctl_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
4dc7e: 2d6e 000c fff4 movel %fp@(12),%fp@(-12)
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
4dc84: 2f29 004c movel %a1@(76),%sp@-
rtems_status_code status;
IMFS_jnode_t *the_jnode;
args.iop = iop;
args.command = command;
args.buffer = buffer;
4dc88: 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;
4dc8e: 2d48 fff0 movel %a0,%fp@(-16)
args.command = command;
args.buffer = buffer;
the_jnode = iop->pathinfo.node_access;
status = rtems_io_control(
4dc92: 4eb9 0004 e660 jsr 4e660 <rtems_io_control>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4dc98: 4fef 000c lea %sp@(12),%sp 4dc9c: 4a80 tstl %d0
4dc9e: 6608 bnes 4dca8 <device_ioctl+0x3e> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return args.ioctl_return;
4dca0: 202e fffc movel %fp@(-4),%d0
}
4dca4: 4e5e unlk %fp 4dca6: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4dca8: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dcaa: 4eb9 0004 e910 jsr 4e910 <rtems_deviceio_errno> <== NOT EXECUTED 4dcb0: 588f addql #4,%sp <== NOT EXECUTED
return args.ioctl_return;
}
4dcb2: 4e5e unlk %fp <== NOT EXECUTED
0004db9e <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
4db9e: 4e56 ffe4 linkw %fp,#-28 4dba2: 206e 0008 moveal %fp@(8),%a0
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4dba6: 486e ffe4 pea %fp@(-28)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4dbaa: 2268 0018 moveal %a0@(24),%a1
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4dbae: 2f29 0050 movel %a1@(80),%sp@-
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
4dbb2: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
args.bytes_moved = 0;
status = rtems_io_read(
4dbb8: 2f29 004c movel %a1@(76),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
4dbbc: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
4dbc2: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4dbc8: 2028 000c movel %a0@(12),%d0 4dbcc: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
4dbd0: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4dbd4: 42ae fffc clrl %fp@(-4)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4dbd8: 2d40 ffe8 movel %d0,%fp@(-24) 4dbdc: 2d41 ffec movel %d1,%fp@(-20)
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
4dbe0: 4eb9 0004 e6f0 jsr 4e6f0 <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4dbe6: 4fef 000c lea %sp@(12),%sp 4dbea: 4a80 tstl %d0
4dbec: 6608 bnes 4dbf6 <device_read+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4dbee: 202e fffc movel %fp@(-4),%d0
}
4dbf2: 4e5e unlk %fp 4dbf4: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4dbf6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dbf8: 4eb9 0004 e910 jsr 4e910 <rtems_deviceio_errno> <== NOT EXECUTED 4dbfe: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4dc00: 4e5e unlk %fp <== NOT EXECUTED
0004dc04 <device_write>:
ssize_t device_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
4dc04: 4e56 ffe4 linkw %fp,#-28 4dc08: 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(
4dc0c: 486e ffe4 pea %fp@(-28)
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4dc10: 2268 0018 moveal %a0@(24),%a1
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_write(
4dc14: 2f29 0050 movel %a1@(80),%sp@-
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
4dc18: 2d68 0014 fff8 movel %a0@(20),%fp@(-8)
args.bytes_moved = 0;
status = rtems_io_write(
4dc1e: 2f29 004c movel %a1@(76),%sp@-
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
4dc22: 2d6e 000c fff0 movel %fp@(12),%fp@(-16)
args.count = count;
4dc28: 2d6e 0010 fff4 movel %fp@(16),%fp@(-12)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4dc2e: 2028 000c movel %a0@(12),%d0 4dc32: 2228 0010 movel %a0@(16),%d1
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
4dc36: 2d48 ffe4 movel %a0,%fp@(-28)
args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
4dc3a: 42ae fffc clrl %fp@(-4)
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
args.iop = iop;
args.offset = iop->offset;
4dc3e: 2d40 ffe8 movel %d0,%fp@(-24) 4dc42: 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(
4dc46: 4eb9 0004 e738 jsr 4e738 <rtems_io_write>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
4dc4c: 4fef 000c lea %sp@(12),%sp 4dc50: 4a80 tstl %d0
4dc52: 6608 bnes 4dc5c <device_write+0x58> <== NEVER TAKEN
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
4dc54: 202e fffc movel %fp@(-4),%d0
}
4dc58: 4e5e unlk %fp 4dc5a: 4e75 rts
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
4dc5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4dc5e: 4eb9 0004 e910 jsr 4e910 <rtems_deviceio_errno> <== NOT EXECUTED 4dc64: 588f addql #4,%sp <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
4dc66: 4e5e unlk %fp <== NOT EXECUTED
00043e84 <drainOutput>:
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
43e84: 4e56 fff4 linkw %fp,#-12 43e88: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43e8c: 246e 0008 moveal %fp@(8),%a2
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
43e90: 4aaa 00b4 tstl %a2@(180)
43e94: 6750 beqs 43ee6 <drainOutput+0x62>
rtems_interrupt_disable (level);
43e96: 243c 0000 0700 movel #1792,%d2 43e9c: 2002 movel %d2,%d0 43e9e: 40c1 movew %sr,%d1 43ea0: 8081 orl %d1,%d0 43ea2: 46c0 movew %d0,%sr
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
43ea4: 206a 0084 moveal %a2@(132),%a0 43ea8: 202a 0080 movel %a2@(128),%d0 43eac: b088 cmpl %a0,%d0
43eae: 6734 beqs 43ee4 <drainOutput+0x60>
43eb0: 47f9 0004 6648 lea 46648 <rtems_semaphore_obtain>,%a3
tty->rawOutBufState = rob_wait;
43eb6: 7002 moveq #2,%d0 43eb8: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
43ebc: 46c1 movew %d1,%sr
sc = rtems_semaphore_obtain(
43ebe: 42a7 clrl %sp@- 43ec0: 42a7 clrl %sp@- 43ec2: 2f2a 008c movel %a2@(140),%sp@- 43ec6: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43ec8: 4fef 000c lea %sp@(12),%sp 43ecc: 4a80 tstl %d0
43ece: 6620 bnes 43ef0 <drainOutput+0x6c> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
43ed0: 2002 movel %d2,%d0 43ed2: 40c1 movew %sr,%d1 43ed4: 8081 orl %d1,%d0 43ed6: 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) {
43ed8: 206a 0084 moveal %a2@(132),%a0 43edc: 202a 0080 movel %a2@(128),%d0 43ee0: b088 cmpl %a0,%d0
43ee2: 66d2 bnes 43eb6 <drainOutput+0x32>
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
rtems_interrupt_enable (level);
43ee4: 46c1 movew %d1,%sr
} }
43ee6: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 43eec: 4e5e unlk %fp 43eee: 4e75 rts
tty->rawOutBufState = rob_wait;
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);
43ef0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43ef2: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
00043330 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
43330: 4e56 ffac linkw %fp,#-84 43334: 48d7 040c moveml %d2-%d3/%a2,%sp@
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
43338: 240e movel %fp,%d2 4333a: 0682 ffff ffba addil #-70,%d2 43340: 45f9 0004 3c30 lea 43c30 <fstat>,%a2 43346: 2f02 movel %d2,%sp@-
int dup2(
int fildes,
int fildes2
)
{
43348: 262e 0008 movel %fp@(8),%d3
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
4334c: 2f03 movel %d3,%sp@- 4334e: 4e92 jsr %a2@
if ( status == -1 )
43350: 508f addql #8,%sp 43352: 72ff moveq #-1,%d1 43354: b280 cmpl %d0,%d1
43356: 660c bnes 43364 <dup2+0x34> <== ALWAYS TAKEN
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
if ( status == -1 )
return -1;
43358: 70ff moveq #-1,%d0
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
}
4335a: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 43360: 4e5e unlk %fp 43362: 4e75 rts
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
43364: 2f02 movel %d2,%sp@- 43366: 2f2e 000c movel %fp@(12),%sp@- 4336a: 4e92 jsr %a2@
if ( status == -1 )
4336c: 508f addql #8,%sp 4336e: 72ff moveq #-1,%d1 43370: b280 cmpl %d0,%d1
43372: 67e4 beqs 43358 <dup2+0x28> <== ALWAYS TAKEN
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
43374: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 43378: 42a7 clrl %sp@- <== NOT EXECUTED 4337a: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4337c: 4eb9 0004 37d4 jsr 437d4 <fcntl> <== NOT EXECUTED 43382: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
43386: 4cee 040c ffac moveml %fp@(-84),%d2-%d3/%a2 <== NOT EXECUTED 4338c: 4e5e unlk %fp <== NOT EXECUTED
00044bc4 <echo>:
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44bc4: 4e56 fffc linkw %fp,#-4 44bc8: 222e 0008 movel %fp@(8),%d1 44bcc: 2f0a movel %a2,%sp@- 44bce: 246e 000c moveal %fp@(12),%a2 44bd2: 2f02 movel %d2,%sp@-
if ((tty->termios.c_lflag & ECHOCTL) &&
44bd4: 242a 003c movel %a2@(60),%d2 44bd8: 0282 0000 0200 andil #512,%d2
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
44bde: 1001 moveb %d1,%d0
if ((tty->termios.c_lflag & ECHOCTL) &&
44be0: 4a82 tstl %d2
44be2: 673e beqs 44c22 <echo+0x5e> <== NEVER TAKEN
iscntrl(c) && (c != '\t') && (c != '\n')) {
44be4: 1001 moveb %d1,%d0 44be6: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 44bec: 0280 0000 00ff andil #255,%d0 44bf2: 1430 0801 moveb %a0@(00000001,%d0:l),%d2 44bf6: 49c2 extbl %d2
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
44bf8: 0802 0005 btst #5,%d2
44bfc: 670e beqs 44c0c <echo+0x48>
iscntrl(c) && (c != '\t') && (c != '\n')) {
44bfe: 7409 moveq #9,%d2 44c00: b480 cmpl %d0,%d2
44c02: 6708 beqs 44c0c <echo+0x48>
44c04: 143c 000a moveb #10,%d2 44c08: b480 cmpl %d0,%d2
44c0a: 662a bnes 44c36 <echo+0x72>
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
44c0c: 2f0a movel %a2,%sp@- 44c0e: 2f00 movel %d0,%sp@- 44c10: 4eba fdd4 jsr %pc@(449e6 <oproc>) 44c14: 508f addql #8,%sp
} }
44c16: 242e fff4 movel %fp@(-12),%d2 44c1a: 246e fff8 moveal %fp@(-8),%a2 44c1e: 4e5e unlk %fp 44c20: 4e75 rts
44c22: 1001 moveb %d1,%d0 <== NOT EXECUTED
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
44c24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c26: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44c2c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44c2e: 4eba fdb6 jsr %pc@(449e6 <oproc>) <== NOT EXECUTED 44c32: 508f addql #8,%sp <== NOT EXECUTED 44c34: 60e0 bras 44c16 <echo+0x52> <== NOT EXECUTED
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44c36: 2f0a movel %a2,%sp@- 44c38: 4878 0002 pea 2 <DOUBLE_FLOAT>
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44c3c: 7040 moveq #64,%d0
rtems_termios_puts (echobuf, 2, tty);
44c3e: 486e fffe pea %fp@(-2)
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
44c42: b181 eorl %d0,%d1
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44c44: 745e moveq #94,%d2
echobuf[1] = c ^ 0x40;
44c46: 1d41 ffff moveb %d1,%fp@(-1)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
char echobuf[2];
echobuf[0] = '^';
44c4a: 1d42 fffe moveb %d2,%fp@(-2)
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
44c4e: 4eb9 0004 48e2 jsr 448e2 <rtems_termios_puts>
tty->column += 2;
} else {
oproc (c, tty);
}
}
44c54: 242e fff4 movel %fp@(-12),%d2
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
44c58: 54aa 0028 addql #2,%a2@(40)
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
if ((tty->termios.c_lflag & ECHOCTL) &&
iscntrl(c) && (c != '\t') && (c != '\n')) {
44c5c: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
} else {
oproc (c, tty);
}
}
44c60: 246e fff8 moveal %fp@(-8),%a2
44c64: 4e5e unlk %fp <== NOT EXECUTED
00043dae <endgrent>:
void endgrent(void)
{
43dae: 4e56 0000 linkw %fp,#0
if (group_fp != NULL)
43db2: 2039 0006 0c40 movel 60c40 <group_fp>,%d0
43db8: 670a beqs 43dc4 <endgrent+0x16> <== NEVER TAKEN
fclose(group_fp);
43dba: 2f00 movel %d0,%sp@- 43dbc: 4eb9 0004 fa2e jsr 4fa2e <fclose> 43dc2: 588f addql #4,%sp
}
43dc4: 4e5e unlk %fp <== NOT EXECUTED
00043c62 <endpwent>:
void endpwent(void)
{
43c62: 4e56 0000 linkw %fp,#0
if (passwd_fp != NULL)
43c66: 2039 0006 0d1a movel 60d1a <passwd_fp>,%d0
43c6c: 670a beqs 43c78 <endpwent+0x16> <== NEVER TAKEN
fclose(passwd_fp);
43c6e: 2f00 movel %d0,%sp@- 43c70: 4eb9 0004 fa2e jsr 4fa2e <fclose> 43c76: 588f addql #4,%sp
}
43c78: 4e5e unlk %fp <== NOT EXECUTED
00044c68 <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)
{
44c68: 4e56 ffe4 linkw %fp,#-28 44c6c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44c70: 246e 0008 moveal %fp@(8),%a2 44c74: 282e 000c movel %fp@(12),%d4
if (tty->ccount == 0)
44c78: 202a 0020 movel %a2@(32),%d0
44c7c: 6734 beqs 44cb2 <erase+0x4a>
return;
if (lineFlag) {
44c7e: 4a84 tstl %d4
44c80: 673a beqs 44cbc <erase+0x54>
if (!(tty->termios.c_lflag & ECHO)) {
44c82: 262a 003c movel %a2@(60),%d3 44c86: 7208 moveq #8,%d1 44c88: c283 andl %d3,%d1 44c8a: 6700 01b0 beqw 44e3c <erase+0x1d4>
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
44c8e: 0803 0004 btst #4,%d3
44c92: 6630 bnes 44cc4 <erase+0x5c> <== ALWAYS TAKEN
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
44c94: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44c96: 4280 clrl %d0 <== NOT EXECUTED 44c98: 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;
44c9c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
44ca0: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44ca2: 4eba ff20 jsr %pc@(44bc4 <echo>) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
44ca6: 508f addql #8,%sp <== NOT EXECUTED 44ca8: 7020 moveq #32,%d0 <== NOT EXECUTED 44caa: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 44cae: 6600 019a bnew 44e4a <erase+0x1e2> <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44cb2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44cb8: 4e5e unlk %fp 44cba: 4e75 rts
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
44cbc: 262a 003c movel %a2@(60),%d3 44cc0: 7208 moveq #8,%d1 44cc2: c283 andl %d3,%d1 44cc4: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3
unsigned char c = tty->cbuf[--tty->ccount];
44cca: 5380 subql #1,%d0 44ccc: 206a 001c moveal %a2@(28),%a0 44cd0: 2540 0020 movel %d0,%a2@(32) 44cd4: 1430 0800 moveb %a0@(00000000,%d0:l),%d2
if (tty->termios.c_lflag & ECHO) {
44cd8: 4a81 tstl %d1
44cda: 6734 beqs 44d10 <erase+0xa8> <== NEVER TAKEN
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
44cdc: 4a84 tstl %d4
44cde: 6608 bnes 44ce8 <erase+0x80>
44ce0: 0803 0004 btst #4,%d3 44ce4: 6700 013c beqw 44e22 <erase+0x1ba>
echo (tty->termios.c_cc[VERASE], tty);
} else if (c == '\t') {
44ce8: 7209 moveq #9,%d1 44cea: 0282 0000 00ff andil #255,%d2 44cf0: b282 cmpl %d2,%d1 44cf2: 6700 0090 beqw 44d84 <erase+0x11c>
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
44cf6: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 44cfc: 5282 addql #1,%d2 44cfe: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 44d02: 49c0 extbl %d0 44d04: 0800 0005 btst #5,%d0
44d08: 6756 beqs 44d60 <erase+0xf8> <== ALWAYS TAKEN
44d0a: 0803 0009 btst #9,%d3 <== NOT EXECUTED 44d0e: 6614 bnes 44d24 <erase+0xbc> <== NOT EXECUTED
if (tty->column)
tty->column--;
}
}
}
if (!lineFlag)
44d10: 4a84 tstl %d4
44d12: 679e beqs 44cb2 <erase+0x4a>
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
44d14: 202a 0020 movel %a2@(32),%d0
44d18: 6798 beqs 44cb2 <erase+0x4a>
}
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);
44d1a: 262a 003c movel %a2@(60),%d3 44d1e: 7208 moveq #8,%d1 44d20: c283 andl %d3,%d1 44d22: 60a6 bras 44cca <erase+0x62>
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
rtems_termios_puts ("\b \b", 3, tty);
44d24: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44d26: 4878 0003 pea 3 <DIVIDE> <== NOT EXECUTED 44d2a: 4879 0005 d3a1 pea 5d3a1 <rtems_filesystem_default_pathconf+0x3d><== NOT EXECUTED 44d30: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->column)
44d32: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44d36: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44d3a: 6706 beqs 44d42 <erase+0xda> <== NOT EXECUTED
tty->column--;
44d3c: 5380 subql #1,%d0 <== NOT EXECUTED 44d3e: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
44d42: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44d48: 1030 2800 moveb %a0@(00000000,%d2:l),%d0 <== NOT EXECUTED 44d4c: 49c0 extbl %d0 <== NOT EXECUTED 44d4e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 44d52: 670c beqs 44d60 <erase+0xf8> <== NOT EXECUTED 44d54: 202a 003c movel %a2@(60),%d0 <== NOT EXECUTED 44d58: 0280 0000 0200 andil #512,%d0 <== NOT EXECUTED 44d5e: 67b0 beqs 44d10 <erase+0xa8> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
44d60: 2f0a movel %a2,%sp@- 44d62: 4878 0003 pea 3 <DIVIDE> 44d66: 4879 0005 d3a1 pea 5d3a1 <rtems_filesystem_default_pathconf+0x3d> 44d6c: 4eb9 0004 48e2 jsr 448e2 <rtems_termios_puts>
if (tty->column)
44d72: 202a 0028 movel %a2@(40),%d0 44d76: 4fef 000c lea %sp@(12),%sp
44d7a: 6794 beqs 44d10 <erase+0xa8> <== NEVER TAKEN
tty->column--;
44d7c: 5380 subql #1,%d0 44d7e: 2540 0028 movel %d0,%a2@(40) 44d82: 608c bras 44d10 <erase+0xa8>
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;
44d84: 242a 002c movel %a2@(44),%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44d88: 4a80 tstl %d0
44d8a: 6732 beqs 44dbe <erase+0x156>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
44d8c: 2c03 movel %d3,%d6
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;
int i = 0;
44d8e: 4201 clrb %d1
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
44d90: 0286 0000 0200 andil #512,%d6
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
} else if (iscntrl (c)) {
44d96: 2279 0005 e450 moveal 5e450 <__ctype_ptr__>,%a1
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
44d9c: 4283 clrl %d3 44d9e: 1618 moveb %a0@+,%d3
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
44da0: 5281 addql #1,%d1
if (c == '\t') {
44da2: 7a09 moveq #9,%d5 44da4: ba83 cmpl %d3,%d5
44da6: 676c beqs 44e14 <erase+0x1ac>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
44da8: 1a31 3801 moveb %a1@(00000001,%d3:l),%d5 44dac: 49c5 extbl %d5 44dae: 0805 0005 btst #5,%d5
44db2: 6758 beqs 44e0c <erase+0x1a4> <== ALWAYS TAKEN
if (tty->termios.c_lflag & ECHOCTL)
44db4: 4a86 tstl %d6 <== NOT EXECUTED 44db6: 6702 beqs 44dba <erase+0x152> <== NOT EXECUTED
col += 2;
44db8: 5482 addql #2,%d2 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44dba: b280 cmpl %d0,%d1 <== NOT EXECUTED 44dbc: 66de bnes 44d9c <erase+0x134> <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44dbe: b4aa 0028 cmpl %a2@(40),%d2 44dc2: 6c00 ff4c bgew 44d10 <erase+0xa8>
rtems_termios_puts ("\b", 1, tty);
44dc6: 2f0a movel %a2,%sp@- 44dc8: 4878 0001 pea 1 <ADD> 44dcc: 4879 0005 d3a3 pea 5d3a3 <rtems_filesystem_default_pathconf+0x3f> 44dd2: 4e93 jsr %a3@
tty->column--;
44dd4: 202a 0028 movel %a2@(40),%d0 44dd8: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44dda: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
44dde: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44de2: b480 cmpl %d0,%d2 44de4: 6c00 ff2a bgew 44d10 <erase+0xa8>
rtems_termios_puts ("\b", 1, tty);
44de8: 2f0a movel %a2,%sp@- 44dea: 4878 0001 pea 1 <ADD> 44dee: 4879 0005 d3a3 pea 5d3a3 <rtems_filesystem_default_pathconf+0x3f> 44df4: 4e93 jsr %a3@
tty->column--;
44df6: 202a 0028 movel %a2@(40),%d0 44dfa: 5380 subql #1,%d0
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44dfc: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts ("\b", 1, tty);
tty->column--;
44e00: 2540 0028 movel %d0,%a2@(40)
}
/*
* Back up over the tab
*/
while (tty->column > col) {
44e04: b480 cmpl %d0,%d2
44e06: 6dbe blts 44dc6 <erase+0x15e>
44e08: 6000 ff06 braw 44d10 <erase+0xa8>
col = (col | 7) + 1;
} else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
col += 2;
} else {
col++;
44e0c: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44e0e: b280 cmpl %d0,%d1
44e10: 668a bnes 44d9c <erase+0x134>
44e12: 60aa bras 44dbe <erase+0x156>
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
44e14: 7607 moveq #7,%d3 44e16: 8483 orl %d3,%d2 44e18: 5282 addql #1,%d2
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
44e1a: b280 cmpl %d0,%d1 44e1c: 6600 ff7e bnew 44d9c <erase+0x134>
44e20: 609c bras 44dbe <erase+0x156> <== 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);
44e22: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED 44e26: 4280 clrl %d0 <== NOT EXECUTED 44e28: 102a 0043 moveb %a2@(67),%d0 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e2c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== 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);
44e32: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e36: 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);
44e38: 6000 fd8a braw 44bc4 <echo> <== NOT EXECUTED
{
if (tty->ccount == 0)
return;
if (lineFlag) {
if (!(tty->termios.c_lflag & ECHO)) {
tty->ccount = 0;
44e3c: 42aa 0020 clrl %a2@(32) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e40: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 44e46: 4e5e unlk %fp <== NOT EXECUTED 44e48: 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);
44e4a: 700a moveq #10,%d0 <== NOT EXECUTED 44e4c: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e50: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== 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);
44e56: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
44e5a: 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);
44e5c: 6000 fd66 braw 44bc4 <echo> <== NOT EXECUTED
00043b8c <fchown>:
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
43b8c: 4e56 0000 linkw %fp,#0 43b90: 302e 000e movew %fp@(14),%d0 43b94: 2f03 movel %d3,%sp@- 43b96: 322e 0012 movew %fp@(18),%d1 43b9a: 2f02 movel %d2,%sp@- 43b9c: 242e 0008 movel %fp@(8),%d2
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
43ba0: b4b9 0005 f7e4 cmpl 5f7e4 <rtems_libio_number_iops>,%d2
43ba6: 644e bccs 43bf6 <fchown+0x6a> iop = rtems_libio_iop( fd );
43ba8: 2602 movel %d2,%d3 43baa: ed8a lsll #6,%d2 43bac: e78b lsll #3,%d3 43bae: 2079 0006 0ef4 moveal 60ef4 <rtems_libio_iops>,%a0 43bb4: 9483 subl %d3,%d2 43bb6: d1c2 addal %d2,%a0
rtems_libio_check_is_open(iop);
43bb8: 2428 0014 movel %a0@(20),%d2 43bbc: 0802 0008 btst #8,%d2
43bc0: 6734 beqs 43bf6 <fchown+0x6a>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43bc2: 44c2 movew %d2,%ccr
43bc4: 664a bnes 43c10 <fchown+0x84> <== NEVER TAKEN
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
43bc6: 2268 0024 moveal %a0@(36),%a1 43bca: 41e8 0018 lea %a0@(24),%a0 43bce: 2269 0018 moveal %a1@(24),%a1 43bd2: 0281 0000 ffff andil #65535,%d1 43bd8: 0280 0000 ffff andil #65535,%d0
}
43bde: 242e fff8 movel %fp@(-8),%d2 43be2: 262e fffc movel %fp@(-4),%d3
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
43be6: 2d48 0008 movel %a0,%fp@(8) 43bea: 2d41 0010 movel %d1,%fp@(16) 43bee: 2d40 000c movel %d0,%fp@(12)
}
43bf2: 4e5e unlk %fp
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
43bf4: 4ed1 jmp %a1@
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43bf6: 4eb9 0004 fa20 jsr 4fa20 <__errno>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43bfc: 242e fff8 movel %fp@(-8),%d2
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43c00: 2040 moveal %d0,%a0 43c02: 7209 moveq #9,%d1
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43c04: 70ff moveq #-1,%d0 43c06: 262e fffc movel %fp@(-4),%d3 43c0a: 4e5e unlk %fp
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43c0c: 2081 movel %d1,%a0@
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43c0e: 4e75 rts
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43c10: 4eb9 0004 fa20 jsr 4fa20 <__errno>
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43c16: 242e fff8 movel %fp@(-8),%d2
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43c1a: 2040 moveal %d0,%a0 43c1c: 7016 moveq #22,%d0
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43c1e: 262e fffc movel %fp@(-4),%d3 43c22: 4e5e unlk %fp
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
43c24: 2080 movel %d0,%a0@
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
}
43c26: 70ff moveq #-1,%d0
...
000437d4 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
437d4: 4e56 fff0 linkw %fp,#-16 437d8: 202e 0008 movel %fp@(8),%d0
int ret; va_list ap; va_start( ap, cmd );
437dc: 41ee 0010 lea %fp@(16),%a0
int fcntl(
int fd,
int cmd,
...
)
{
437e0: 48d7 041c moveml %d2-%d4/%a2,%sp@ 437e4: 242e 000c movel %fp@(12),%d2
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
437e8: 2239 0005 fef4 movel 5fef4 <rtems_libio_number_iops>,%d1 437ee: b280 cmpl %d0,%d1 437f0: 6300 0188 blsw 4397a <fcntl+0x1a6>
iop = rtems_libio_iop( fd );
437f4: 2600 movel %d0,%d3 437f6: ed88 lsll #6,%d0 437f8: e78b lsll #3,%d3 437fa: 2279 0006 1604 moveal 61604 <rtems_libio_iops>,%a1 43800: 9083 subl %d3,%d0 43802: 45f1 0800 lea %a1@(00000000,%d0:l),%a2
rtems_libio_check_is_open(iop);
43806: 282a 0014 movel %a2@(20),%d4 4380a: 0804 0008 btst #8,%d4 4380e: 6700 016a beqw 4397a <fcntl+0x1a6>
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43812: 7009 moveq #9,%d0 43814: b082 cmpl %d2,%d0
43816: 641a bccs 43832 <fcntl+0x5e>
errno = ENOTSUP;
ret = -1;
break;
default:
errno = EINVAL;
43818: 4eb9 0004 fc28 jsr 4fc28 <__errno> 4381e: 2040 moveal %d0,%a0 43820: 7016 moveq #22,%d0 43822: 2080 movel %d0,%a0@
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43824: 76ff moveq #-1,%d3
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43826: 2003 movel %d3,%d0 43828: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 4382e: 4e5e unlk %fp 43830: 4e75 rts
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
43832: 303b 2a08 movew %pc@(4383c <fcntl+0x68>,%d2:l:2),%d0 43836: 48c0 extl %d0 43838: 4efb 0802 jmp %pc@(4383c <fcntl+0x68>,%d0:l)
4383c: 00aa 009e 008e oril #10354830,%d2 <== NOT EXECUTED 43842: 0074 0164 <== NOT EXECUTED 43844: 0026 046 <== NOT EXECUTED 43846: 0014 024 <== NOT EXECUTED 43848: 0014 024 <== NOT EXECUTED 4384a: 0014 024 <== NOT EXECUTED 4384c: 0014 024 <== NOT EXECUTED 4384e: 0014 024 <== NOT EXECUTED
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43850: 4eb9 0004 fc28 jsr 4fc28 <__errno>
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
43856: 76ff moveq #-1,%d3
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
43858: 2040 moveal %d0,%a0 4385a: 20bc 0000 0086 movel #134,%a0@ 43860: 60c4 bras 43826 <fcntl+0x52>
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 ) );
43862: 2f10 movel %a0@,%sp@-
rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0;
43864: 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 ) );
43866: 4eb9 0004 3e80 jsr 43e80 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
4386c: 222a 0014 movel %a2@(20),%d1 43870: 588f addql #4,%sp 43872: 0280 0000 0201 andil #513,%d0 43878: 0281 ffff fdfe andil #-514,%d1 4387e: 8081 orl %d1,%d0 43880: 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) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43884: 206a 0020 moveal %a2@(32),%a0 43888: 2f0a movel %a2,%sp@- 4388a: 2f02 movel %d2,%sp@- 4388c: 2068 0030 moveal %a0@(48),%a0 43890: 4e90 jsr %a0@
if (err) {
43892: 508f addql #8,%sp
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
43894: 2400 movel %d0,%d2
if (err) {
43896: 678e beqs 43826 <fcntl+0x52> <== ALWAYS TAKEN
errno = err;
43898: 4eb9 0004 fc28 jsr 4fc28 <__errno> <== NOT EXECUTED
ret = -1;
4389e: 76ff moveq #-1,%d3 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
438a0: 2040 moveal %d0,%a0 <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438a2: 2003 movel %d3,%d0 <== NOT EXECUTED
*/
if (ret >= 0) {
int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop );
if (err) {
errno = err;
438a4: 2082 movel %d2,%a0@ <== NOT EXECUTED
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438a6: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 438ac: 4e5e unlk %fp <== NOT EXECUTED 438ae: 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 );
438b0: 2f04 movel %d4,%sp@- 438b2: 4eb9 0004 3ec0 jsr 43ec0 <rtems_libio_to_fcntl_flags> 438b8: 588f addql #4,%sp 438ba: 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) {
438bc: 6cc6 bges 43884 <fcntl+0xb0> <== ALWAYS TAKEN
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
438be: 2003 movel %d3,%d0 <== NOT EXECUTED 438c0: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 438c6: 4e5e unlk %fp <== NOT EXECUTED 438c8: 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 ) )
438ca: 4a90 tstl %a0@
438cc: 6768 beqs 43936 <fcntl+0x162> <== NEVER TAKEN
rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0;
438ce: 4283 clrl %d3
* processes, then we can ignore this one except to make
* F_GETFD work.
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
438d0: 08c4 000b bset #11,%d4 438d4: 2544 0014 movel %d4,%a2@(20) 438d8: 60aa bras 43884 <fcntl+0xb0>
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);
438da: 0804 000b btst #11,%d4 438de: 56c3 sne %d3 438e0: 49c3 extbl %d3 438e2: 4483 negl %d3 438e4: 609e bras 43884 <fcntl+0xb0>
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
438e6: 2010 movel %a0@,%d0
if ( fd2 )
438e8: 6700 00aa beqw 43994 <fcntl+0x1c0>
diop = rtems_libio_iop( fd2 );
438ec: b081 cmpl %d1,%d0 <== NOT EXECUTED 438ee: 6454 bccs 43944 <fcntl+0x170> <== NOT EXECUTED 438f0: 2200 movel %d0,%d1 <== NOT EXECUTED 438f2: ed88 lsll #6,%d0 <== NOT EXECUTED 438f4: e789 lsll #3,%d1 <== NOT EXECUTED 438f6: 9081 subl %d1,%d0 <== NOT EXECUTED 438f8: 41f1 0800 lea %a1@(00000000,%d0:l),%a0 <== NOT EXECUTED 438fc: 2608 movel %a0,%d3 <== NOT EXECUTED
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
438fe: 9689 subl %a1,%d3 <== NOT EXECUTED 43900: e683 asrl #3,%d3 <== NOT EXECUTED 43902: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED 43908: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
4390c: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 43912: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43918: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 4391e: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED 43924: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
4392a: 2144 0014 movel %d4,%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) {
4392e: 4a83 tstl %d3 43930: 6c00 ff52 bgew 43884 <fcntl+0xb0>
43934: 6088 bras 438be <fcntl+0xea> <== NOT EXECUTED
rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0;
43936: 4283 clrl %d3 <== NOT EXECUTED
*/
if ( va_arg( ap, int ) )
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
43938: 0884 000b bclr #11,%d4 <== NOT EXECUTED 4393c: 2544 0014 movel %d4,%a2@(20) <== NOT EXECUTED 43940: 6000 ff42 braw 43884 <fcntl+0xb0> <== NOT EXECUTED
switch ( cmd ) {
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
43944: 91c8 subal %a0,%a0 <== NOT EXECUTED 43946: 4283 clrl %d3 <== NOT EXECUTED
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
43948: 9689 subl %a1,%d3 <== NOT EXECUTED 4394a: e683 asrl #3,%d3 <== NOT EXECUTED 4394c: 203c b6db 6db7 movel #-1227133513,%d0 <== NOT EXECUTED 43952: 4c00 3800 mulsl %d0,%d3 <== NOT EXECUTED
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
43956: 216a 0018 0018 movel %a2@(24),%a0@(24) <== NOT EXECUTED 4395c: 216a 001c 001c movel %a2@(28),%a0@(28) <== NOT EXECUTED 43962: 216a 0020 0020 movel %a2@(32),%a0@(32) <== NOT EXECUTED 43968: 216a 0024 0024 movel %a2@(36),%a0@(36) <== NOT EXECUTED 4396e: 216a 0028 0028 movel %a2@(40),%a0@(40) <== NOT EXECUTED
ret = -1;
break;
}
}
diop->flags = iop->flags;
43974: 2144 0014 movel %d4,%a0@(20) <== NOT EXECUTED 43978: 60b4 bras 4392e <fcntl+0x15a> <== NOT EXECUTED
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4397a: 4eb9 0004 fc28 jsr 4fc28 <__errno> 43980: 76ff moveq #-1,%d3 43982: 7209 moveq #9,%d1 43984: 2040 moveal %d0,%a0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43986: 2003 movel %d3,%d0 43988: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
4398e: 2081 movel %d1,%a0@
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
43990: 4e5e unlk %fp 43992: 4e75 rts
fd2 = va_arg( ap, int );
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
43994: 4eb9 0004 3f0e jsr 43f0e <rtems_libio_allocate> 4399a: 2040 moveal %d0,%a0
if ( diop == 0 ) {
4399c: 4a80 tstl %d0 4399e: 6700 fe84 beqw 43824 <fcntl+0x50> 439a2: 282a 0014 movel %a2@(20),%d4 439a6: 2600 movel %d0,%d3
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
439a8: 203c b6db 6db7 movel #-1227133513,%d0
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
439ae: 216a 0018 0018 movel %a2@(24),%a0@(24) 439b4: 216a 001c 001c movel %a2@(28),%a0@(28) 439ba: 216a 0020 0020 movel %a2@(32),%a0@(32) 439c0: 216a 0024 0024 movel %a2@(36),%a0@(36)
if ( fd2 )
diop = rtems_libio_iop( fd2 );
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
if ( diop == 0 ) {
439c6: 2279 0006 1604 moveal 61604 <rtems_libio_iops>,%a1
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
439cc: 9689 subl %a1,%d3 439ce: e683 asrl #3,%d3 439d0: 4c00 3800 mulsl %d0,%d3
break;
}
}
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
439d4: 216a 0028 0028 movel %a2@(40),%a0@(40)
ret = -1;
break;
}
}
diop->flags = iop->flags;
439da: 2144 0014 movel %d4,%a0@(20) 439de: 6000 ff4e braw 4392e <fcntl+0x15a>
0004c9ba <fifo_open>:
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c9ba: 4e56 ffd8 linkw %fp,#-40 4c9be: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4c9c2: 266e 0008 moveal %fp@(8),%a3 4c9c6: 2a6e 000c moveal %fp@(12),%a5
)
{
pipe_control_t *pipe;
int err = 0;
err = pipe_lock();
4c9ca: 4eba fe18 jsr %pc@(4c7e4 <pipe_lock>) 4c9ce: 2400 movel %d0,%d2
if (err)
4c9d0: 6664 bnes 4ca36 <fifo_open+0x7c> <== NEVER TAKEN
return err;
pipe = *pipep;
4c9d2: 2453 moveal %a3@,%a2
if (pipe == NULL) {
4c9d4: 4a8a tstl %a2 4c9d6: 6700 00e6 beqw 4cabe <fifo_open+0x104>
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
4c9da: 42a7 clrl %sp@- 4c9dc: 263c 0004 7f60 movel #294752,%d3 4c9e2: 42a7 clrl %sp@- 4c9e4: 2f2a 0028 movel %a2@(40),%sp@- 4c9e8: 2043 moveal %d3,%a0 4c9ea: 4e90 jsr %a0@ 4c9ec: 4fef 000c lea %sp@(12),%sp 4c9f0: 4a80 tstl %d0
4c9f2: 664e bnes 4ca42 <fifo_open+0x88> <== NEVER TAKEN
4c9f4: 99cc subal %a4,%a4
err = -EINTR;
if (*pipep == NULL) {
4c9f6: 4a93 tstl %a3@ 4c9f8: 6700 02c6 beqw 4ccc0 <fifo_open+0x306>
else
*pipep = pipe;
}
out:
pipe_unlock();
4c9fc: 4eba fe94 jsr %pc@(4c892 <pipe_unlock>)
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4ca00: 4a8c tstl %a4 4ca02: 6600 03cc bnew 4cdd0 <fifo_open+0x416>
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
4ca06: 7006 moveq #6,%d0 4ca08: 7204 moveq #4,%d1 4ca0a: c0ad 0014 andl %a5@(20),%d0
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
4ca0e: 2453 moveal %a3@,%a2
switch (LIBIO_ACCMODE(iop)) {
4ca10: b280 cmpl %d0,%d1 4ca12: 6700 0234 beqw 4cc48 <fifo_open+0x28e> 4ca16: 123c 0006 moveb #6,%d1 4ca1a: b280 cmpl %d0,%d1 4ca1c: 6700 01dc beqw 4cbfa <fifo_open+0x240> 4ca20: 123c 0002 moveb #2,%d1 4ca24: b280 cmpl %d0,%d1
4ca26: 6720 beqs 4ca48 <fifo_open+0x8e> <== ALWAYS TAKEN
4ca28: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4ca2e: 2f2a 0028 movel %a2@(40),%sp@- 4ca32: 4e94 jsr %a4@
return 0;
4ca34: 588f addql #4,%sp
out_error:
pipe_release(pipep, iop);
return err;
}
4ca36: 2002 movel %d2,%d0 4ca38: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4ca3e: 4e5e unlk %fp 4ca40: 4e75 rts
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
err = -EINTR;
4ca42: 387c fffc moveaw #-4,%a4 <== NOT EXECUTED 4ca46: 60ae bras 4c9f6 <fifo_open+0x3c> <== NOT EXECUTED
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4ca48: 202a 0010 movel %a2@(16),%d0 4ca4c: 2040 moveal %d0,%a0 4ca4e: 5288 addql #1,%a0
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
4ca50: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4ca54: 2548 0010 movel %a0,%a2@(16) 4ca58: 4a80 tstl %d0 4ca5a: 6700 029a beqw 4ccf6 <fifo_open+0x33c>
PIPE_WAKEUPWRITERS(pipe);
if (pipe->Writers == 0) {
4ca5e: 4aaa 0014 tstl %a2@(20)
4ca62: 66c4 bnes 4ca28 <fifo_open+0x6e>
/* Not an error */
if (LIBIO_NODELAY(iop))
4ca64: 7001 moveq #1,%d0 4ca66: c0ad 0014 andl %a5@(20),%d0
4ca6a: 66bc bnes 4ca28 <fifo_open+0x6e>
break;
prevCounter = pipe->writerCounter;
4ca6c: 2a2a 0024 movel %a2@(36),%d5 4ca70: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4 4ca76: 283c 0004 eb58 movel #322392,%d4
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
4ca7c: 2f2a 0028 movel %a2@(40),%sp@- 4ca80: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4ca82: 2044 moveal %d4,%a0 4ca84: 42a7 clrl %sp@- 4ca86: 2f2a 002c movel %a2@(44),%sp@- 4ca8a: 4e90 jsr %a0@ 4ca8c: 4fef 000c lea %sp@(12),%sp 4ca90: 4a80 tstl %d0 4ca92: 6600 02b6 bnew 4cd4a <fifo_open+0x390>
goto out_error;
if (! PIPE_LOCK(pipe))
4ca96: 42a7 clrl %sp@- 4ca98: 2043 moveal %d3,%a0 4ca9a: 42a7 clrl %sp@- 4ca9c: 2f2a 0028 movel %a2@(40),%sp@- 4caa0: 4e90 jsr %a0@ 4caa2: 4fef 000c lea %sp@(12),%sp 4caa6: 4a80 tstl %d0 4caa8: 6600 02a0 bnew 4cd4a <fifo_open+0x390>
goto out_error;
} while (prevCounter == pipe->writerCounter);
4caac: baaa 0024 cmpl %a2@(36),%d5
4cab0: 67ca beqs 4ca7c <fifo_open+0xc2> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4cab2: 2f2a 0028 movel %a2@(40),%sp@- 4cab6: 4e94 jsr %a4@
return 0;
4cab8: 588f addql #4,%sp 4caba: 6000 ff7a braw 4ca36 <fifo_open+0x7c>
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4cabe: 4878 0034 pea 34 <OPER2+0x20> 4cac2: 49f9 0004 47fc lea 447fc <malloc>,%a4 4cac8: 4e94 jsr %a4@
if (pipe == NULL)
4caca: 588f addql #4,%sp
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
4cacc: 2440 moveal %d0,%a2 4cace: 2600 movel %d0,%d3
if (pipe == NULL)
4cad0: 6700 02d6 beqw 4cda8 <fifo_open+0x3ee>
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4cad4: 2040 moveal %d0,%a0
pipe->Size = PIPE_BUF;
4cad6: 203c 0000 0200 movel #512,%d0
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
4cadc: 4298 clrl %a0@+ 4cade: 5888 addql #4,%a0 4cae0: 4298 clrl %a0@+ 4cae2: 4298 clrl %a0@+ 4cae4: 4298 clrl %a0@+ 4cae6: 4298 clrl %a0@+ 4cae8: 4298 clrl %a0@+ 4caea: 4298 clrl %a0@+ 4caec: 4298 clrl %a0@+ 4caee: 4298 clrl %a0@+ 4caf0: 4298 clrl %a0@+ 4caf2: 4298 clrl %a0@+ 4caf4: 4290 clrl %a0@
pipe->Size = PIPE_BUF;
4caf6: 2540 0004 movel %d0,%a2@(4)
pipe->Buffer = malloc(pipe->Size);
4cafa: 4878 0200 pea 200 <DBL_MANT_DIG+0x1cb> 4cafe: 4e94 jsr %a4@
if (! pipe->Buffer)
4cb00: 588f addql #4,%sp
if (pipe == NULL)
return err;
memset(pipe, 0, sizeof(pipe_control_t));
pipe->Size = PIPE_BUF;
pipe->Buffer = malloc(pipe->Size);
4cb02: 2480 movel %d0,%a2@
if (! pipe->Buffer)
4cb04: 6700 02bc beqw 4cdc2 <fifo_open+0x408>
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4cb08: 486a 002c pea %a2@(44) 4cb0c: 49f9 0004 e948 lea 4e948 <rtems_barrier_create>,%a4
rtems_build_name ('P', 'I', 'r', c),
4cb12: 1039 0005 fe84 moveb 5fe84 <c.6318>,%d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4cb18: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'r', c),
4cb1a: 49c0 extbl %d0
if (! pipe->Buffer)
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
4cb1c: 42a7 clrl %sp@- 4cb1e: 0080 5049 7200 oril #1346990592,%d0 4cb24: 2f00 movel %d0,%sp@- 4cb26: 4e94 jsr %a4@ 4cb28: 4fef 0010 lea %sp@(16),%sp 4cb2c: 4a80 tstl %d0 4cb2e: 6600 0264 bnew 4cd94 <fifo_open+0x3da>
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4cb32: 486a 0030 pea %a2@(48)
rtems_build_name ('P', 'I', 'w', c),
4cb36: 1039 0005 fe84 moveb 5fe84 <c.6318>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4cb3c: 42a7 clrl %sp@-
rtems_build_name ('P', 'I', 'w', c),
4cb3e: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'r', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->readBarrier) != RTEMS_SUCCESSFUL)
goto err_rbar;
if (rtems_barrier_create(
4cb40: 42a7 clrl %sp@- 4cb42: 0080 5049 7700 oril #1346991872,%d0 4cb48: 2f00 movel %d0,%sp@- 4cb4a: 4e94 jsr %a4@ 4cb4c: 4fef 0010 lea %sp@(16),%sp 4cb50: 4a80 tstl %d0 4cb52: 6600 025c bnew 4cdb0 <fifo_open+0x3f6>
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4cb56: 486a 0028 pea %a2@(40)
rtems_build_name ('P', 'I', 's', c), 1,
4cb5a: 1039 0005 fe84 moveb 5fe84 <c.6318>,%d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4cb60: 42a7 clrl %sp@- 4cb62: 4878 0010 pea 10 <INVALID_OPERATION>
rtems_build_name ('P', 'I', 's', c), 1,
4cb66: 49c0 extbl %d0
if (rtems_barrier_create(
rtems_build_name ('P', 'I', 'w', c),
RTEMS_BARRIER_MANUAL_RELEASE, 0,
&pipe->writeBarrier) != RTEMS_SUCCESSFUL)
goto err_wbar;
if (rtems_semaphore_create(
4cb68: 4878 0001 pea 1 <ADD> 4cb6c: 0080 5049 7300 oril #1346990848,%d0 4cb72: 2f00 movel %d0,%sp@- 4cb74: 4eb9 0004 7cc4 jsr 47cc4 <rtems_semaphore_create> 4cb7a: 4fef 0014 lea %sp@(20),%sp 4cb7e: 4a80 tstl %d0 4cb80: 6600 01fa bnew 4cd7c <fifo_open+0x3c2>
/* 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
4cb84: 280e movel %fp,%d4 4cb86: 5184 subql #8,%d4
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
_Objects_Get( &_Barrier_Information, id, location );
4cb88: 263c 0004 98d8 movel #301272,%d3 4cb8e: 2043 moveal %d3,%a0
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
4cb90: 49f9 0004 a162 lea 4a162 <_Thread_Enable_dispatch>,%a4 4cb96: 2f04 movel %d4,%sp@- 4cb98: 2f2a 002c movel %a2@(44),%sp@- 4cb9c: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4cba2: 4e90 jsr %a0@
static void pipe_interruptible(pipe_control_t *pipe)
{
Objects_Locations location;
_Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4cba4: 223c 1000 0000 movel #268435456,%d1 4cbaa: 2040 moveal %d0,%a0 4cbac: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4cbb0: 4e94 jsr %a4@ 4cbb2: 2043 moveal %d3,%a0 4cbb4: 2f04 movel %d4,%sp@- 4cbb6: 2f2a 0030 movel %a2@(48),%sp@- 4cbba: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4cbc0: 4e90 jsr %a0@
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
4cbc2: 223c 1000 0000 movel #268435456,%d1 4cbc8: 2040 moveal %d0,%a0 4cbca: 83a8 004c orl %d1,%a0@(76)
_Thread_Enable_dispatch();
4cbce: 4e94 jsr %a4@
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
4cbd0: 4fef 0018 lea %sp@(24),%sp 4cbd4: 1039 0005 fe84 moveb 5fe84 <c.6318>,%d0 4cbda: 49c0 extbl %d0 4cbdc: 2200 movel %d0,%d1 4cbde: 5281 addql #1,%d1 4cbe0: 13c1 0005 fe84 moveb %d1,5fe84 <c.6318> 4cbe6: 727a moveq #122,%d1 4cbe8: b280 cmpl %d0,%d1 4cbea: 6600 fdee bnew 4c9da <fifo_open+0x20>
c = 'a';
4cbee: 7061 moveq #97,%d0 4cbf0: 13c0 0005 fe84 moveb %d0,5fe84 <c.6318> 4cbf6: 6000 fde2 braw 4c9da <fifo_open+0x20>
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
4cbfa: 202a 0010 movel %a2@(16),%d0 4cbfe: 2200 movel %d0,%d1 4cc00: 5281 addql #1,%d1
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
4cc02: 52aa 0020 addql #1,%a2@(32)
if (pipe->Readers ++ == 0)
4cc06: 2541 0010 movel %d1,%a2@(16) 4cc0a: 4a80 tstl %d0 4cc0c: 6700 00d4 beqw 4cce2 <fifo_open+0x328>
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4cc10: 202a 0014 movel %a2@(20),%d0 4cc14: 2040 moveal %d0,%a0 4cc16: 5288 addql #1,%a0
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
4cc18: 52aa 0024 addql #1,%a2@(36) 4cc1c: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
if (pipe->Writers ++ == 0)
4cc22: 2548 0014 movel %a0,%a2@(20) 4cc26: 4a80 tstl %d0 4cc28: 6600 fe04 bnew 4ca2e <fifo_open+0x74>
PIPE_WAKEUPREADERS(pipe);
4cc2c: 486e fffc pea %fp@(-4) 4cc30: 2f2a 002c movel %a2@(44),%sp@- 4cc34: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4cc3a: 508f addql #8,%sp
break;
}
PIPE_UNLOCK(pipe);
4cc3c: 2f2a 0028 movel %a2@(40),%sp@- 4cc40: 4e94 jsr %a4@
return 0;
4cc42: 588f addql #4,%sp 4cc44: 6000 fdf0 braw 4ca36 <fifo_open+0x7c>
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
4cc48: 202a 0014 movel %a2@(20),%d0 4cc4c: 2200 movel %d0,%d1 4cc4e: 5281 addql #1,%d1
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
4cc50: 52aa 0024 addql #1,%a2@(36)
if (pipe->Writers ++ == 0)
4cc54: 2541 0014 movel %d1,%a2@(20) 4cc58: 4a80 tstl %d0
4cc5a: 6772 beqs 4ccce <fifo_open+0x314> <== ALWAYS TAKEN
4cc5c: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
4cc62: 4aaa 0010 tstl %a2@(16) 4cc66: 6600 fdc6 bnew 4ca2e <fifo_open+0x74> 4cc6a: 7001 moveq #1,%d0 4cc6c: c0ad 0014 andl %a5@(20),%d0 4cc70: 6600 00f2 bnew 4cd64 <fifo_open+0x3aa>
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
4cc74: 2a2a 0020 movel %a2@(32),%d5 4cc78: 283c 0004 eb58 movel #322392,%d4
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
4cc7e: 2f2a 0028 movel %a2@(40),%sp@- 4cc82: 4e94 jsr %a4@
if (! PIPE_WRITEWAIT(pipe))
4cc84: 2044 moveal %d4,%a0 4cc86: 42a7 clrl %sp@- 4cc88: 2f2a 0030 movel %a2@(48),%sp@- 4cc8c: 4e90 jsr %a0@ 4cc8e: 4fef 000c lea %sp@(12),%sp 4cc92: 4a80 tstl %d0 4cc94: 6600 00b4 bnew 4cd4a <fifo_open+0x390>
goto out_error;
if (! PIPE_LOCK(pipe))
4cc98: 42a7 clrl %sp@- 4cc9a: 2043 moveal %d3,%a0 4cc9c: 42a7 clrl %sp@- 4cc9e: 2f2a 0028 movel %a2@(40),%sp@- 4cca2: 4e90 jsr %a0@ 4cca4: 4fef 000c lea %sp@(12),%sp 4cca8: 4a80 tstl %d0 4ccaa: 6600 009e bnew 4cd4a <fifo_open+0x390>
goto out_error;
} while (prevCounter == pipe->readerCounter);
4ccae: baaa 0020 cmpl %a2@(32),%d5
4ccb2: 67ca beqs 4cc7e <fifo_open+0x2c4> <== NEVER TAKEN
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
break;
}
PIPE_UNLOCK(pipe);
4ccb4: 2f2a 0028 movel %a2@(40),%sp@- 4ccb8: 4e94 jsr %a4@
return 0;
4ccba: 588f addql #4,%sp 4ccbc: 6000 fd78 braw 4ca36 <fifo_open+0x7c>
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
4ccc0: 4a8c tstl %a4
4ccc2: 6646 bnes 4cd0a <fifo_open+0x350> <== NEVER TAKEN
pipe_free(pipe);
else
*pipep = pipe;
4ccc4: 268a movel %a2,%a3@
}
out:
pipe_unlock();
4ccc6: 4eba fbca jsr %pc@(4c892 <pipe_unlock>) 4ccca: 6000 fd3a braw 4ca06 <fifo_open+0x4c>
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
4ccce: 486e fffc pea %fp@(-4) 4ccd2: 2f2a 002c movel %a2@(44),%sp@- 4ccd6: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4ccdc: 508f addql #8,%sp 4ccde: 6000 ff7c braw 4cc5c <fifo_open+0x2a2>
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4cce2: 486e fffc pea %fp@(-4) 4cce6: 2f2a 0030 movel %a2@(48),%sp@- 4ccea: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4ccf0: 508f addql #8,%sp 4ccf2: 6000 ff1c braw 4cc10 <fifo_open+0x256>
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
4ccf6: 486e fffc pea %fp@(-4) 4ccfa: 2f2a 0030 movel %a2@(48),%sp@- 4ccfe: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4cd04: 508f addql #8,%sp 4cd06: 6000 fd56 braw 4ca5e <fifo_open+0xa4>
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4cd0a: 2f2a 002c movel %a2@(44),%sp@- <== NOT EXECUTED 4cd0e: 4bf9 0004 ea40 lea 4ea40 <rtems_barrier_delete>,%a5 <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4cd14: 47f9 0004 41c8 lea 441c8 <free>,%a3 <== NOT EXECUTED
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4cd1a: 4e95 jsr %a5@ <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
4cd1c: 2f2a 0030 movel %a2@(48),%sp@- <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer); free(pipe);
4cd20: 240c movel %a4,%d2 <== NOT EXECUTED
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
4cd22: 4e95 jsr %a5@ <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
4cd24: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cd28: 4eb9 0004 7e88 jsr 47e88 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
4cd2e: 2f12 movel %a2@,%sp@- <== NOT EXECUTED 4cd30: 4e93 jsr %a3@ <== NOT EXECUTED
free(pipe);
4cd32: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4cd34: 4e93 jsr %a3@ <== NOT EXECUTED 4cd36: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED
else
*pipep = pipe;
}
out:
pipe_unlock();
4cd3a: 4eba fb56 jsr %pc@(4c892 <pipe_unlock>) <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4cd3e: 2002 movel %d2,%d0 4cd40: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4cd46: 4e5e unlk %fp 4cd48: 4e75 rts
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4cd4a: 2f0d movel %a5,%sp@- <== NOT EXECUTED
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
4cd4c: 74fc moveq #-4,%d2 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4cd4e: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4cd50: 4eb9 0004 c8b8 jsr 4c8b8 <pipe_release> <== NOT EXECUTED
return err;
4cd56: 508f addql #8,%sp <== NOT EXECUTED
}
4cd58: 2002 movel %d2,%d0 4cd5a: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 4cd60: 4e5e unlk %fp 4cd62: 4e75 rts
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4cd64: 2f2a 0028 movel %a2@(40),%sp@-
err = -ENXIO;
4cd68: 74fa moveq #-6,%d2
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
PIPE_UNLOCK(pipe);
4cd6a: 4e94 jsr %a4@
err = -ENXIO;
goto out_error;
4cd6c: 588f addql #4,%sp
PIPE_UNLOCK(pipe);
return 0;
out_error:
pipe_release(pipep, iop);
4cd6e: 2f0d movel %a5,%sp@- 4cd70: 2f0b movel %a3,%sp@- 4cd72: 4eb9 0004 c8b8 jsr 4c8b8 <pipe_release>
return err;
4cd78: 508f addql #8,%sp 4cd7a: 60dc bras 4cd58 <fifo_open+0x39e>
if (c ++ == 'z')
c = 'a';
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
4cd7c: 2f2a 0030 movel %a2@(48),%sp@- 4cd80: 45f9 0004 ea40 lea 4ea40 <rtems_barrier_delete>,%a2 4cd86: 4e92 jsr %a2@ 4cd88: 588f addql #4,%sp
err_wbar: rtems_barrier_delete(pipe->readBarrier);
4cd8a: 2043 moveal %d3,%a0 4cd8c: 2f28 002c movel %a0@(44),%sp@- 4cd90: 4e92 jsr %a2@ 4cd92: 588f addql #4,%sp
err_rbar: free(pipe->Buffer);
4cd94: 2043 moveal %d3,%a0 4cd96: 45f9 0004 41c8 lea 441c8 <free>,%a2 4cd9c: 2f10 movel %a0@,%sp@- 4cd9e: 4e92 jsr %a2@ 4cda0: 588f addql #4,%sp
err_buf: free(pipe);
4cda2: 2f03 movel %d3,%sp@- 4cda4: 4e92 jsr %a2@ 4cda6: 588f addql #4,%sp
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
4cda8: 74f4 moveq #-12,%d2
else
*pipep = pipe;
}
out:
pipe_unlock();
4cdaa: 4eba fae6 jsr %pc@(4c892 <pipe_unlock>) 4cdae: 608e bras 4cd3e <fifo_open+0x384>
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
4cdb0: 2043 moveal %d3,%a0 4cdb2: 45f9 0004 ea40 lea 4ea40 <rtems_barrier_delete>,%a2 4cdb8: 2f28 002c movel %a0@(44),%sp@- 4cdbc: 4e92 jsr %a2@ 4cdbe: 588f addql #4,%sp 4cdc0: 60d2 bras 4cd94 <fifo_open+0x3da>
err_rbar: free(pipe->Buffer); err_buf: free(pipe);
4cdc2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4cdc4: 45f9 0004 41c8 lea 441c8 <free>,%a2 <== NOT EXECUTED 4cdca: 4e92 jsr %a2@ <== NOT EXECUTED 4cdcc: 588f addql #4,%sp <== NOT EXECUTED 4cdce: 60d8 bras 4cda8 <fifo_open+0x3ee> <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
4cdd0: 240c movel %a4,%d2 <== NOT EXECUTED
return 0;
out_error:
pipe_release(pipep, iop);
return err;
}
4cdd2: 2002 movel %d2,%d0 <== NOT EXECUTED 4cdd4: 4cee 3c3c ffd8 moveml %fp@(-40),%d2-%d5/%a2-%a5 <== NOT EXECUTED 4cdda: 4e5e unlk %fp <== NOT EXECUTED
00043a68 <fpathconf>:
long fpathconf(
int fd,
int name
)
{
43a68: 4e56 0000 linkw %fp,#0 43a6c: 202e 0008 movel %fp@(8),%d0 43a70: 222e 000c movel %fp@(12),%d1 43a74: 2f02 movel %d2,%sp@-
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
43a76: b0b9 0005 fef4 cmpl 5fef4 <rtems_libio_number_iops>,%d0 43a7c: 6400 00f6 bccw 43b74 <fpathconf+0x10c>
iop = rtems_libio_iop(fd);
43a80: 2400 movel %d0,%d2 43a82: ed88 lsll #6,%d0 43a84: e78a lsll #3,%d2 43a86: 2079 0006 1604 moveal 61604 <rtems_libio_iops>,%a0 43a8c: 9082 subl %d2,%d0 43a8e: d1c0 addal %d0,%a0
rtems_libio_check_is_open(iop);
43a90: 2428 0014 movel %a0@(20),%d2 43a94: 0802 0008 btst #8,%d2 43a98: 6700 00da beqw 43b74 <fpathconf+0x10c>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
43a9c: 0802 0001 btst #1,%d2
43aa0: 670a beqs 43aac <fpathconf+0x44> <== NEVER TAKEN
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
43aa2: 2068 0028 moveal %a0@(40),%a0
switch ( name ) {
43aa6: 700b moveq #11,%d0 43aa8: b081 cmpl %d1,%d0
43aaa: 6416 bccs 43ac2 <fpathconf+0x5a>
break;
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
43aac: 4eb9 0004 fc28 jsr 4fc28 <__errno>
break;
}
return return_value;
}
43ab2: 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 );
43ab6: 2040 moveal %d0,%a0 43ab8: 7216 moveq #22,%d1 43aba: 70ff moveq #-1,%d0
break;
}
return return_value;
}
43abc: 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 );
43abe: 2081 movel %d1,%a0@
break;
}
return return_value;
}
43ac0: 4e75 rts
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
switch ( name ) {
43ac2: 303b 1a08 movew %pc@(43acc <fpathconf+0x64>,%d1:l:2),%d0 43ac6: 48c0 extl %d0 43ac8: 4efb 0802 jmp %pc@(43acc <fpathconf+0x64>,%d0:l)
43acc: 0090 0084 0078 oril #8650872,%d0 <== NOT EXECUTED 43ad2: 006c 0154 <== NOT EXECUTED 43ad4: 0060 0140 <== NOT EXECUTED 43ad6: 0054 0124 <== NOT EXECUTED 43ad8: 0048 0110 <== NOT EXECUTED 43ada: 003c 074 <== NOT EXECUTED 43adc: 0030 060 <== NOT EXECUTED 43ade: 0024 044 <== NOT EXECUTED 43ae0: 0018 030 <== NOT EXECUTED 43ae2: 009c 242e fffc oril #607059964,%d4 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43ae8: 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;
43aea: 2028 005c movel %a0@(92),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43aee: 4e75 rts 43af0: 242e fffc movel %fp@(-4),%d2 43af4: 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;
43af6: 2028 0050 movel %a0@(80),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43afa: 4e75 rts 43afc: 242e fffc movel %fp@(-4),%d2 43b00: 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;
43b02: 2028 0064 movel %a0@(100),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b06: 4e75 rts 43b08: 242e fffc movel %fp@(-4),%d2 43b0c: 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;
43b0e: 2028 0058 movel %a0@(88),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b12: 4e75 rts 43b14: 242e fffc movel %fp@(-4),%d2 43b18: 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;
43b1a: 2028 0054 movel %a0@(84),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b1e: 4e75 rts 43b20: 242e fffc movel %fp@(-4),%d2 43b24: 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;
43b26: 2028 004c movel %a0@(76),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b2a: 4e75 rts 43b2c: 242e fffc movel %fp@(-4),%d2 43b30: 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;
43b32: 2028 0048 movel %a0@(72),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b36: 4e75 rts 43b38: 242e fffc movel %fp@(-4),%d2 43b3c: 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;
43b3e: 2028 0044 movel %a0@(68),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b42: 4e75 rts 43b44: 242e fffc movel %fp@(-4),%d2 43b48: 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;
43b4a: 2028 0040 movel %a0@(64),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b4e: 4e75 rts 43b50: 242e fffc movel %fp@(-4),%d2 43b54: 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;
43b56: 2028 003c movel %a0@(60),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b5a: 4e75 rts 43b5c: 242e fffc movel %fp@(-4),%d2 43b60: 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;
43b62: 2028 0038 movel %a0@(56),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b66: 4e75 rts 43b68: 242e fffc movel %fp@(-4),%d2 43b6c: 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;
43b6e: 2028 0060 movel %a0@(96),%d0
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b72: 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);
43b74: 4eb9 0004 fc28 jsr 4fc28 <__errno> 43b7a: 7409 moveq #9,%d2 43b7c: 2040 moveal %d0,%a0 43b7e: 70ff moveq #-1,%d0 43b80: 2082 movel %d2,%a0@
rtems_set_errno_and_return_minus_one( EINVAL );
break;
}
return return_value;
}
43b82: 242e fffc movel %fp@(-4),%d2 43b86: 4e5e unlk %fp
...
00042db8 <free>:
#include <stdlib.h>
void free(
void *ptr
)
{
42db8: 4e56 0000 linkw %fp,#0
MSBUMP(free_calls, 1);
42dbc: 52b9 0005 f9a8 addql #1,5f9a8 <rtems_malloc_statistics+0xc>
#include <stdlib.h>
void free(
void *ptr
)
{
42dc2: 2f02 movel %d2,%sp@- 42dc4: 242e 0008 movel %fp@(8),%d2
MSBUMP(free_calls, 1);
if ( !ptr )
42dc8: 6732 beqs 42dfc <free+0x44>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42dca: 7003 moveq #3,%d0 42dcc: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0
42dd2: 6758 beqs 42e2c <free+0x74> <== ALWAYS TAKEN
}
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
42dd4: 2079 0005 e916 moveal 5e916 <rtems_malloc_statistics_helpers>,%a0 42dda: 4a88 tstl %a0
42ddc: 670a beqs 42de8 <free+0x30>
(*rtems_malloc_statistics_helpers->at_free)(ptr);
42dde: 2f02 movel %d2,%sp@- 42de0: 2068 0008 moveal %a0@(8),%a0 42de4: 4e90 jsr %a0@ 42de6: 588f addql #4,%sp
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
42de8: 2f02 movel %d2,%sp@- 42dea: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 42df0: 4eb9 0004 82cc jsr 482cc <_Protected_heap_Free> 42df6: 508f addql #8,%sp 42df8: 4a00 tstb %d0
42dfa: 6708 beqs 42e04 <free+0x4c>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42dfc: 242e fffc movel %fp@(-4),%d2 42e00: 4e5e unlk %fp 42e02: 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
42e04: 2079 0005 e280 moveal 5e280 <RTEMS_Malloc_Heap>,%a0
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_free)(ptr);
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
42e0a: 2f28 001c movel %a0@(28),%sp@- 42e0e: 2f28 0018 movel %a0@(24),%sp@- 42e12: 2f02 movel %d2,%sp@- 42e14: 4879 0005 d32c pea 5d32c <rtems_status_assoc+0x168> 42e1a: 4eb9 0004 3c50 jsr 43c50 <printk>
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e20: 242e fffc movel %fp@(-4),%d2
*/
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",
42e24: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e28: 4e5e unlk %fp 42e2a: 4e75 rts
/*
* 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() ) {
42e2c: 4eb9 0004 2f7c jsr 42f7c <malloc_is_system_state_OK>
#endif
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
42e32: 4a00 tstb %d0
42e34: 669e bnes 42dd4 <free+0x1c>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42e36: 2d42 0008 movel %d2,%fp@(8)
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
42e3a: 242e fffc movel %fp@(-4),%d2 42e3e: 4e5e unlk %fp
/*
* Do not attempt to free memory if in a critical section or ISR.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
42e40: 4ef9 0004 2ffe jmp 42ffe <malloc_deferred_free>
...
00044314 <free_user_env>:
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
44314: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 44318: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4431a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4431c: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
44320: b5fc 0006 02b4 cmpal #393908,%a2 <== NOT EXECUTED 44326: 6728 beqs 44350 <free_user_env+0x3c> <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
44328: 486a 0004 pea %a2@(4) <== NOT EXECUTED 4432c: 47f9 0004 3174 lea 43174 <rtems_filesystem_freenode>,%a3 <== NOT EXECUTED 44332: 4e93 jsr %a3@ <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
44334: 486a 0018 pea %a2@(24) <== NOT EXECUTED 44338: 4e93 jsr %a3@ <== NOT EXECUTED
free(env); } }
4433a: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
4433e: 508f addql #8,%sp <== NOT EXECUTED 44340: 2d4a 0008 movel %a2,%fp@(8) <== NOT EXECUTED
} }
44344: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 44348: 4e5e unlk %fp <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
4434a: 4ef9 0004 3188 jmp 43188 <free> <== NOT EXECUTED
} }
44350: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 44354: 266e fffc moveal %fp@(-4),%a3 <== NOT EXECUTED 44358: 4e5e unlk %fp <== NOT EXECUTED
0004b094 <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
4b094: 4e56 ffec linkw %fp,#-20 4b098: 202e 0008 movel %fp@(8),%d0 4b09c: 2f0a movel %a2,%sp@-
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
4b09e: b0b9 0005 e274 cmpl 5e274 <rtems_libio_number_iops>,%d0
4b0a4: 6478 bccs 4b11e <ftruncate+0x8a> iop = rtems_libio_iop( fd );
4b0a6: 2200 movel %d0,%d1 4b0a8: ed88 lsll #6,%d0 4b0aa: e789 lsll #3,%d1 4b0ac: 2479 0005 f984 moveal 5f984 <rtems_libio_iops>,%a2 4b0b2: 9081 subl %d1,%d0 4b0b4: d5c0 addal %d0,%a2
rtems_libio_check_is_open(iop);
4b0b6: 202a 0014 movel %a2@(20),%d0 4b0ba: 0280 0000 0100 andil #256,%d0
4b0c0: 675c beqs 4b11e <ftruncate+0x8a>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4b0c2: 2d6a 0018 ffec movel %a2@(24),%fp@(-20) 4b0c8: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 4b0ce: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 4b0d4: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4b0da: 206e fff8 moveal %fp@(-8),%a0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
4b0de: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
4b0e4: 486e ffec pea %fp@(-20) 4b0e8: 2068 0010 moveal %a0@(16),%a0 4b0ec: 4e90 jsr %a0@ 4b0ee: 588f addql #4,%sp 4b0f0: 7201 moveq #1,%d1 4b0f2: b280 cmpl %d0,%d1
4b0f4: 6754 beqs 4b14a <ftruncate+0xb6> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
4b0f6: 7004 moveq #4,%d0 4b0f8: c0aa 0014 andl %a2@(20),%d0
4b0fc: 6736 beqs 4b134 <ftruncate+0xa0>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
4b0fe: 206a 0020 moveal %a2@(32),%a0 4b102: 2f2e 0010 movel %fp@(16),%sp@- 4b106: 2f2e 000c movel %fp@(12),%sp@- 4b10a: 2f0a movel %a2,%sp@- 4b10c: 2068 0020 moveal %a0@(32),%a0 4b110: 4e90 jsr %a0@
}
4b112: 246e ffe8 moveal %fp@(-24),%a2
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 );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
4b116: 4fef 000c lea %sp@(12),%sp
}
4b11a: 4e5e unlk %fp 4b11c: 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);
4b11e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b124: 246e ffe8 moveal %fp@(-24),%a2
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);
4b128: 2040 moveal %d0,%a0 4b12a: 7209 moveq #9,%d1 4b12c: 70ff moveq #-1,%d0
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b12e: 4e5e unlk %fp
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);
4b130: 2081 movel %d1,%a0@
rtems_set_errno_and_return_minus_one( EISDIR );
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b132: 4e75 rts
loc = iop->pathinfo;
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 );
4b134: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b13a: 246e ffe8 moveal %fp@(-24),%a2
loc = iop->pathinfo;
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 );
4b13e: 2040 moveal %d0,%a0 4b140: 7216 moveq #22,%d1 4b142: 70ff moveq #-1,%d0
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b144: 4e5e unlk %fp
loc = iop->pathinfo;
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 );
4b146: 2081 movel %d1,%a0@
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b148: 4e75 rts
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b14a: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b150: 246e ffe8 moveal %fp@(-24),%a2 <== NOT EXECUTED
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b154: 2040 moveal %d0,%a0 <== NOT EXECUTED 4b156: 7215 moveq #21,%d1 <== NOT EXECUTED 4b158: 70ff moveq #-1,%d0 <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
4b15a: 4e5e unlk %fp <== NOT EXECUTED
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( EISDIR );
4b15c: 2081 movel %d1,%a0@ <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
return (*iop->pathinfo.handlers->ftruncate_h)( iop, length );
}
0004300c <getchark>:
#include <rtems.h>
#include <rtems/bspIo.h>
int getchark(void)
{
4300c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
if ( BSP_poll_char )
43010: 2279 0005 f478 moveal 5f478 <BSP_poll_char>,%a1 <== NOT EXECUTED 43016: 4a89 tstl %a1 <== NOT EXECUTED 43018: 6704 beqs 4301e <getchark+0x12> <== NOT EXECUTED
return (*BSP_poll_char)();
return -1;
}
4301a: 4e5e unlk %fp <== NOT EXECUTED
#include <rtems/bspIo.h>
int getchark(void)
{
if ( BSP_poll_char )
return (*BSP_poll_char)();
4301c: 4ed1 jmp %a1@ <== NOT EXECUTED
return -1;
}
4301e: 70ff moveq #-1,%d0 <== NOT EXECUTED 43020: 4e5e unlk %fp <== NOT EXECUTED
0005d7a8 <getdents>:
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
5d7a8: 4e56 ffec linkw %fp,#-20 5d7ac: 202e 0008 movel %fp@(8),%d0 5d7b0: 2f0a movel %a2,%sp@-
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5d7b2: b0b9 0006 0724 cmpl 60724 <rtems_libio_number_iops>,%d0
5d7b8: 6464 bccs 5d81e <getdents+0x76> <== NEVER TAKEN
5d7ba: 2200 movel %d0,%d1 5d7bc: ed88 lsll #6,%d0 5d7be: e789 lsll #3,%d1 5d7c0: 2479 0006 1f44 moveal 61f44 <rtems_libio_iops>,%a2 5d7c6: 9081 subl %d1,%d0 5d7c8: d5c0 addal %d0,%a2
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5d7ca: 2d6a 0018 ffec movel %a2@(24),%fp@(-20) 5d7d0: 2d6a 001c fff0 movel %a2@(28),%fp@(-16) 5d7d6: 2d6a 0020 fff4 movel %a2@(32),%fp@(-12) 5d7dc: 2d6a 0024 fff8 movel %a2@(36),%fp@(-8)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5d7e2: 206e fff8 moveal %fp@(-8),%a0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
5d7e6: 2d6a 0028 fffc movel %a2@(40),%fp@(-4)
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
5d7ec: 486e ffec pea %fp@(-20) 5d7f0: 2068 0010 moveal %a0@(16),%a0 5d7f4: 4e90 jsr %a0@ 5d7f6: 588f addql #4,%sp 5d7f8: 7201 moveq #1,%d1 5d7fa: b280 cmpl %d0,%d1
5d7fc: 6624 bnes 5d822 <getdents+0x7a>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
5d7fe: 206a 0020 moveal %a2@(32),%a0 5d802: 2f2e 0010 movel %fp@(16),%sp@- 5d806: 2f2e 000c movel %fp@(12),%sp@- 5d80a: 2f0a movel %a2,%sp@- 5d80c: 2068 0008 moveal %a0@(8),%a0 5d810: 4e90 jsr %a0@
}
5d812: 246e ffe8 moveal %fp@(-24),%a2
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
5d816: 4fef 000c lea %sp@(12),%sp
}
5d81a: 4e5e unlk %fp 5d81c: 4e75 rts
rtems_filesystem_location_info_t loc;
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
5d81e: 95ca subal %a2,%a2 <== NOT EXECUTED 5d820: 60a8 bras 5d7ca <getdents+0x22> <== NOT EXECUTED
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d822: 4eb9 0004 fda0 jsr 4fda0 <__errno>
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); }
5d828: 246e ffe8 moveal %fp@(-24),%a2
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d82c: 2040 moveal %d0,%a0 5d82e: 7214 moveq #20,%d1 5d830: 70ff moveq #-1,%d0
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); }
5d832: 4e5e unlk %fp
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
5d834: 2081 movel %d1,%a0@ <== NOT EXECUTED
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len );
}
0004dcd0 <imfs_dir_open>:
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4dcd0: 7001 moveq #1,%d0
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4dcd2: 4e56 0000 linkw %fp,#0 4dcd6: 206e 0008 moveal %fp@(8),%a0
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4dcda: 2268 0018 moveal %a0@(24),%a1
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4dcde: 2f02 movel %d2,%sp@-
IMFS_jnode_t *the_jnode;
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
4dce0: b0a9 0048 cmpl %a1@(72),%d0
4dce4: 6708 beqs 4dcee <imfs_dir_open+0x1e> <== ALWAYS TAKEN
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
}
4dce6: 241f movel %sp@+,%d2 <== NOT EXECUTED
/* Is the node a directory ? */
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
4dce8: 70ff moveq #-1,%d0 <== NOT EXECUTED
iop->offset = 0;
return 0;
}
4dcea: 4e5e unlk %fp <== NOT EXECUTED 4dcec: 4e75 rts <== NOT EXECUTED
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
return 0;
4dcee: 4200 clrb %d0
the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access;
if ( the_jnode->type != IMFS_DIRECTORY )
return -1; /* It wasn't a directory --> return error */
iop->offset = 0;
4dcf0: 4281 clrl %d1 4dcf2: 4282 clrl %d2 4dcf4: 2141 000c movel %d1,%a0@(12) 4dcf8: 2142 0010 movel %d2,%a0@(16)
return 0; }
4dcfc: 241f movel %sp@+,%d2
4dcfe: 4e5e unlk %fp <== NOT EXECUTED
0004df34 <imfs_dir_rmnod>:
int imfs_dir_rmnod(
rtems_filesystem_location_info_t *parent_pathloc, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN */
)
{
4df34: 4e56 0000 linkw %fp,#0 4df38: 206e 000c moveal %fp@(12),%a0 4df3c: 2f0a movel %a2,%sp@-
IMFS_jnode_t *the_jnode;
the_jnode = (IMFS_jnode_t *) pathloc->node_access;
4df3e: 2450 moveal %a0@,%a2 4df40: 200a movel %a2,%d0 4df42: 0680 0000 0050 addil #80,%d0
/*
* You cannot remove a node that still has children
*/
if ( ! rtems_chain_is_empty( &the_jnode->info.directory.Entries ) )
4df48: b0aa 004c cmpl %a2@(76),%d0
4df4c: 6642 bnes 4df90 <imfs_dir_rmnod+0x5c>
/*
* You cannot remove the file system root node.
*/
if ( pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access )
4df4e: 2068 0010 moveal %a0@(16),%a0 4df52: b5e8 001c cmpal %a0@(28),%a2
4df56: 6722 beqs 4df7a <imfs_dir_rmnod+0x46>
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
4df58: 4aaa 0058 tstl %a2@(88)
4df5c: 661c bnes 4df7a <imfs_dir_rmnod+0x46> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
4df5e: 2f0a movel %a2,%sp@- 4df60: 4eb9 0004 ad0c jsr 4ad0c <IMFS_create_orphan>
IMFS_check_node_remove( the_jnode );
4df66: 2f0a movel %a2,%sp@- 4df68: 4eb9 0004 ad50 jsr 4ad50 <IMFS_check_node_remove>
return 0;
}
4df6e: 246e fffc moveal %fp@(-4),%a2
rtems_set_errno_and_return_minus_one( EBUSY );
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
4df72: 508f addql #8,%sp 4df74: 4280 clrl %d0
}
4df76: 4e5e unlk %fp 4df78: 4e75 rts
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4df7a: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4df80: 246e fffc moveal %fp@(-4),%a2
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4df84: 2040 moveal %d0,%a0 4df86: 7210 moveq #16,%d1 4df88: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4df8a: 4e5e unlk %fp
/*
* You cannot remove a mountpoint.
*/
if ( the_jnode->info.directory.mt_fs != NULL )
rtems_set_errno_and_return_minus_one( EBUSY );
4df8c: 2081 movel %d1,%a0@
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4df8e: 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 );
4df90: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4df96: 246e fffc moveal %fp@(-4),%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 );
4df9a: 2040 moveal %d0,%a0 4df9c: 725a moveq #90,%d1 4df9e: 70ff moveq #-1,%d0
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
4dfa0: 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 );
4dfa2: 2081 movel %d1,%a0@
IMFS_create_orphan( the_jnode );
IMFS_check_node_remove( the_jnode );
return 0;
}
...
00044e60 <iproc>:
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44e60: 4e56 fff4 linkw %fp,#-12 44e64: 222e 0008 movel %fp@(8),%d1 44e68: 48d7 040c moveml %d2-%d3/%a2,%sp@ 44e6c: 246e 000c moveal %fp@(12),%a2
if (tty->termios.c_iflag & ISTRIP)
44e70: 202a 0030 movel %a2@(48),%d0
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
44e74: 1401 moveb %d1,%d2
if (tty->termios.c_iflag & ISTRIP)
44e76: 0800 0005 btst #5,%d0
44e7a: 6704 beqs 44e80 <iproc+0x20> <== ALWAYS TAKEN
c &= 0x7f;
44e7c: 747f moveq #127,%d2 <== NOT EXECUTED 44e7e: c481 andl %d1,%d2 <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
44e80: 0800 0009 btst #9,%d0
44e84: 6720 beqs 44ea6 <iproc+0x46>
c = tolower (c);
44e86: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 44e8c: 7603 moveq #3,%d3 44e8e: 0282 0000 00ff andil #255,%d2 44e94: 1230 2801 moveb %a0@(00000001,%d2:l),%d1 44e98: 49c1 extbl %d1 44e9a: c283 andl %d3,%d1 44e9c: 163c 0001 moveb #1,%d3 44ea0: b681 cmpl %d1,%d3 44ea2: 6700 00e0 beqw 44f84 <iproc+0x124>
if (c == '\r') {
44ea6: 4281 clrl %d1 44ea8: 1202 moveb %d2,%d1 44eaa: 760d moveq #13,%d3 44eac: b681 cmpl %d1,%d3
44eae: 6740 beqs 44ef0 <iproc+0x90>
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)) {
44eb0: 760a moveq #10,%d3 44eb2: b681 cmpl %d1,%d3 44eb4: 6700 00c4 beqw 44f7a <iproc+0x11a>
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
44eb8: 4a02 tstb %d2
44eba: 664c bnes 44f08 <iproc+0xa8> <== ALWAYS TAKEN
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
44ebc: 2039 0005 e380 movel 5e380 <rtems_termios_cbufsize>,%d0 44ec2: 5380 subql #1,%d0 44ec4: 222a 0020 movel %a2@(32),%d1 44ec8: b081 cmpl %d1,%d0
44eca: 6f28 bles 44ef4 <iproc+0x94> <== NEVER TAKEN
if (tty->termios.c_lflag & ECHO)
44ecc: 7008 moveq #8,%d0 44ece: c0aa 003c andl %a2@(60),%d0 44ed2: 6600 00ba bnew 44f8e <iproc+0x12e>
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
44ed6: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED
} return 0;
44eda: 4280 clrl %d0 <== 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;
44edc: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44ee0: 5281 addql #1,%d1 <== NOT EXECUTED 44ee2: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
} return 0; }
44ee6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44eec: 4e5e unlk %fp 44eee: 4e75 rts
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
44ef0: 4a00 tstb %d0
44ef2: 6c0c bges 44f00 <iproc+0xa0> <== ALWAYS TAKEN
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
44ef4: 4280 clrl %d0 <== NOT EXECUTED
}
44ef6: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44efc: 4e5e unlk %fp <== NOT EXECUTED 44efe: 4e75 rts <== NOT EXECUTED
c = tolower (c);
if (c == '\r') {
if (tty->termios.c_iflag & IGNCR)
return 0;
if (tty->termios.c_iflag & ICRNL)
44f00: 0800 0008 btst #8,%d0
44f04: 6702 beqs 44f08 <iproc+0xa8> <== NEVER TAKEN
c = '\n';
44f06: 740a moveq #10,%d2
} else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
44f08: 222a 003c movel %a2@(60),%d1 44f0c: 0801 0001 btst #1,%d1
44f10: 67aa beqs 44ebc <iproc+0x5c> <== NEVER TAKEN
if (c == tty->termios.c_cc[VERASE]) {
44f12: 4283 clrl %d3 44f14: 162a 0043 moveb %a2@(67),%d3 44f18: 4280 clrl %d0 44f1a: 1002 moveb %d2,%d0 44f1c: b083 cmpl %d3,%d0 44f1e: 6700 0122 beqw 45042 <iproc+0x1e2>
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
44f22: 4283 clrl %d3 44f24: 162a 0044 moveb %a2@(68),%d3 44f28: b083 cmpl %d3,%d0 44f2a: 6700 00a8 beqw 44fd4 <iproc+0x174>
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
44f2e: 4283 clrl %d3 44f30: 162a 0045 moveb %a2@(69),%d3 44f34: b083 cmpl %d3,%d0 44f36: 6700 00fe beqw 45036 <iproc+0x1d6>
return 1;
} else if (c == '\n') {
44f3a: 760a moveq #10,%d3 44f3c: b680 cmpl %d0,%d3 44f3e: 6700 00ac beqw 44fec <iproc+0x18c>
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]) ||
44f42: 4283 clrl %d3 44f44: 162a 004c moveb %a2@(76),%d3 44f48: b083 cmpl %d3,%d0
44f4a: 670c beqs 44f58 <iproc+0xf8> <== NEVER TAKEN
44f4c: 4283 clrl %d3 44f4e: 162a 0051 moveb %a2@(81),%d3 44f52: b083 cmpl %d3,%d0 44f54: 6600 ff66 bnew 44ebc <iproc+0x5c>
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
44f58: 44c1 movew %d1,%ccr <== NOT EXECUTED 44f5a: 6b58 bmis 44fb4 <iproc+0x154> <== NOT EXECUTED
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
44f5c: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
44f60: 7001 moveq #1,%d0 <== 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);
tty->cbuf[tty->ccount++] = c;
44f62: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44f66: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44f6a: 5281 addql #1,%d1 <== NOT EXECUTED 44f6c: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
44f70: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 44f76: 4e5e unlk %fp <== NOT EXECUTED 44f78: 4e75 rts <== NOT EXECUTED
if (c == '\r') {
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)) {
44f7a: 0800 0006 btst #6,%d0
44f7e: 6788 beqs 44f08 <iproc+0xa8> <== ALWAYS TAKEN
c = '\r';
44f80: 740d moveq #13,%d2 <== NOT EXECUTED 44f82: 6084 bras 44f08 <iproc+0xa8> <== NOT EXECUTED
{
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
c = tolower (c);
44f84: 0682 0000 0020 addil #32,%d2 44f8a: 6000 ff1a braw 44ea6 <iproc+0x46>
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44f8e: 2f0a movel %a2,%sp@- 44f90: 4280 clrl %d0 44f92: 1002 moveb %d2,%d0 44f94: 2f00 movel %d0,%sp@- 44f96: 4eba fc2c jsr %pc@(44bc4 <echo>) 44f9a: 222a 0020 movel %a2@(32),%d1 44f9e: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
}
return 0;
44fa0: 4280 clrl %d0
* 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;
44fa2: 206a 001c moveal %a2@(28),%a0 44fa6: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 44faa: 5281 addql #1,%d1 44fac: 2541 0020 movel %d1,%a2@(32) 44fb0: 6000 ff34 braw 44ee6 <iproc+0x86>
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44fb4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44fb6: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44fb8: 4eba fc0a jsr %pc@(44bc4 <echo>) <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
44fbc: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
} else if ((c == tty->termios.c_cc[VEOL]) ||
(c == tty->termios.c_cc[VEOL2])) {
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
44fc0: 508f addql #8,%sp <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
return 1;
44fc2: 7001 moveq #1,%d0 <== 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);
tty->cbuf[tty->ccount++] = c;
44fc4: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44fc8: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 44fcc: 5281 addql #1,%d1 <== NOT EXECUTED 44fce: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED 44fd2: 609c bras 44f70 <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);
44fd4: 4878 0001 pea 1 <ADD> 44fd8: 2f0a movel %a2,%sp@- 44fda: 4eba fc8c jsr %pc@(44c68 <erase>)
return 0;
44fde: 508f addql #8,%sp 44fe0: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
44fe2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 44fe8: 4e5e unlk %fp 44fea: 4e75 rts
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
44fec: 7048 moveq #72,%d0 44fee: c280 andl %d0,%d1
44ff0: 6620 bnes 45012 <iproc+0x1b2> <== ALWAYS TAKEN
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
44ff2: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED
return 1;
44ff6: 7001 moveq #1,%d0 <== 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);
tty->cbuf[tty->ccount++] = c;
44ff8: 206a 001c moveal %a2@(28),%a0 <== NOT EXECUTED 44ffc: 740a moveq #10,%d2 <== NOT EXECUTED 44ffe: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) <== NOT EXECUTED 45002: 5281 addql #1,%d1 <== NOT EXECUTED 45004: 2541 0020 movel %d1,%a2@(32) <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45008: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4500e: 4e5e unlk %fp 45010: 4e75 rts
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
45012: 2f0a movel %a2,%sp@- 45014: 4878 000a pea a <LASTO>
tty->cbuf[tty->ccount++] = c;
45018: 740a moveq #10,%d2
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
4501a: 4eba fba8 jsr %pc@(44bc4 <echo>)
tty->cbuf[tty->ccount++] = c;
4501e: 222a 0020 movel %a2@(32),%d1
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
45022: 508f addql #8,%sp
tty->cbuf[tty->ccount++] = c;
return 1;
45024: 7001 moveq #1,%d0
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
} else if (c == '\n') {
if (tty->termios.c_lflag & (ECHO | ECHONL))
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
45026: 206a 001c moveal %a2@(28),%a0 4502a: 1182 1800 moveb %d2,%a0@(00000000,%d1:l) 4502e: 5281 addql #1,%d1 45030: 2541 0020 movel %d1,%a2@(32) 45034: 60d2 bras 45008 <iproc+0x1a8>
else if (c == tty->termios.c_cc[VKILL]) {
erase (tty, 1);
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
return 1;
45036: 7001 moveq #1,%d0 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
45038: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 4503e: 4e5e unlk %fp <== NOT EXECUTED 45040: 4e75 rts <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
if (c == tty->termios.c_cc[VERASE]) {
erase (tty, 0);
45042: 42a7 clrl %sp@- 45044: 2f0a movel %a2,%sp@- 45046: 4eba fc20 jsr %pc@(44c68 <erase>)
return 0;
4504a: 508f addql #8,%sp 4504c: 4280 clrl %d0
if (tty->termios.c_lflag & ECHO)
echo (c, tty);
tty->cbuf[tty->ccount++] = c;
}
return 0;
}
4504e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
45054: 4e5e unlk %fp <== NOT EXECUTED
0005c0f4 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
5c0f4: 4e56 ffc4 linkw %fp,#-60 5c0f8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 5c0fc: 262e 000c movel %fp@(12),%d3 5c100: 246e 0010 moveal %fp@(16),%a2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
5c104: 4eb9 0005 bc28 jsr 5bc28 <getpid> 5c10a: b0ae 0008 cmpl %fp@(8),%d0 5c10e: 6600 0230 bnew 5c340 <killinfo+0x24c>
rtems_set_errno_and_return_minus_one( ESRCH );
/*
* Validate the signal passed.
*/
if ( !sig )
5c112: 4a83 tstl %d3 5c114: 6700 0242 beqw 5c358 <killinfo+0x264>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
5c118: 2003 movel %d3,%d0 5c11a: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
5c11c: 721f moveq #31,%d1 5c11e: b280 cmpl %d0,%d1 5c120: 6500 0236 bcsw 5c358 <killinfo+0x264>
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 )
5c124: 2c03 movel %d3,%d6 5c126: 2a03 movel %d3,%d5 5c128: 7201 moveq #1,%d1 5c12a: e98e lsll #4,%d6 5c12c: e58d lsll #2,%d5 5c12e: 2806 movel %d6,%d4 5c130: 9885 subl %d5,%d4 5c132: 2044 moveal %d4,%a0 5c134: d1fc 0005 ff82 addal #393090,%a0 5c13a: b290 cmpl %a0@,%d1 5c13c: 6700 01ee beqw 5c32c <killinfo+0x238>
/* * 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 ) )
5c140: 123c 0008 moveb #8,%d1 5c144: b283 cmpl %d3,%d1 5c146: 6700 00d2 beqw 5c21a <killinfo+0x126> 5c14a: 123c 0004 moveb #4,%d1 5c14e: b283 cmpl %d3,%d1 5c150: 6700 00c8 beqw 5c21a <killinfo+0x126> 5c154: 123c 000b moveb #11,%d1 5c158: b283 cmpl %d3,%d1 5c15a: 6700 00be beqw 5c21a <killinfo+0x126>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
5c15e: 7401 moveq #1,%d2 5c160: e1aa lsll %d0,%d2
/* * Build up a siginfo structure */ siginfo = &siginfo_struct; siginfo->si_signo = sig; siginfo->si_code = SI_USER;
5c162: 7001 moveq #1,%d0
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
5c164: 2d43 fff4 movel %d3,%fp@(-12)
siginfo->si_code = SI_USER;
5c168: 2d40 fff8 movel %d0,%fp@(-8)
if ( !value ) {
5c16c: 4a8a tstl %a2 5c16e: 6700 01c8 beqw 5c338 <killinfo+0x244>
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
5c172: 2d52 fffc movel %a2@,%fp@(-4) 5c176: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0 5c17c: 5280 addql #1,%d0 5c17e: 23c0 0005 fadc movel %d0,5fadc <_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;
5c184: 2879 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a4
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( _POSIX_signals_Is_interested( api, mask ) ) {
5c18a: 206c 010e moveal %a4@(270),%a0 5c18e: 2028 00cc movel %a0@(204),%d0 5c192: 4680 notl %d0 5c194: c082 andl %d2,%d0
5c196: 6642 bnes 5c1da <killinfo+0xe6>
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
5c198: 2079 0006 0106 moveal 60106 <_POSIX_signals_Wait_queue>,%a0 5c19e: b1fc 0006 010a cmpal #393482,%a0 5c1a4: 6700 00d6 beqw 5c27c <killinfo+0x188>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5c1a8: 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;
5c1aa: 2848 moveal %a0,%a4
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5c1ac: 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 ];
5c1b0: 2268 010e moveal %a0@(270),%a1
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5c1b4: 6624 bnes 5c1da <killinfo+0xe6>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
5c1b6: 2029 00cc movel %a1@(204),%d0 5c1ba: 4680 notl %d0 5c1bc: c082 andl %d2,%d0
5c1be: 661a bnes 5c1da <killinfo+0xe6>
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 ) {
5c1c0: 2050 moveal %a0@,%a0
the_thread = (Thread_Control *)the_node;
5c1c2: 2848 moveal %a0,%a4
/* XXX violation of visibility -- need to define thread queue support */
the_chain = &_POSIX_signals_Wait_queue.Queues.Fifo;
for ( the_node = the_chain->first ;
5c1c4: b1fc 0006 010a cmpal #393482,%a0 5c1ca: 6700 00b0 beqw 5c27c <killinfo+0x188>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
5c1ce: 2002 movel %d2,%d0 <== NOT EXECUTED 5c1d0: 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 ];
5c1d4: 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)
5c1d8: 67dc beqs 5c1b6 <killinfo+0xc2> <== NOT EXECUTED
/*
* 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 ) ) {
5c1da: 486e fff4 pea %fp@(-12) 5c1de: 2f03 movel %d3,%sp@- 5c1e0: 2f0c movel %a4,%sp@- 5c1e2: 4eb9 0005 c3b0 jsr 5c3b0 <_POSIX_signals_Unblock_thread> 5c1e8: 4fef 000c lea %sp@(12),%sp 5c1ec: 4a00 tstb %d0
5c1ee: 6618 bnes 5c208 <killinfo+0x114>
/*
* 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 );
5c1f0: 2f02 movel %d2,%sp@- 5c1f2: 4eb9 0005 c390 jsr 5c390 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
5c1f8: 588f addql #4,%sp 5c1fa: 41f9 0005 ff7a lea 5ff7a <_POSIX_signals_Vectors>,%a0 5c200: 7002 moveq #2,%d0 5c202: b0b0 4800 cmpl %a0@(00000000,%d4:l),%d0
5c206: 672e beqs 5c236 <killinfo+0x142>
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
5c208: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
return 0;
5c20e: 4280 clrl %d0
}
5c210: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c216: 4e5e unlk %fp 5c218: 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 );
5c21a: 4eb9 0005 c5c0 jsr 5c5c0 <pthread_self> 5c220: 2f03 movel %d3,%sp@- 5c222: 2f00 movel %d0,%sp@- 5c224: 4eb9 0005 c4e8 jsr 5c4e8 <pthread_kill> 5c22a: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c22c: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c232: 4e5e unlk %fp 5c234: 4e75 rts
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
5c236: 4879 0006 00fa pea 600fa <_POSIX_signals_Inactive_siginfo> 5c23c: 4eb9 0004 70f8 jsr 470f8 <_Chain_Get>
if ( !psiginfo ) {
5c242: 588f addql #4,%sp
_POSIX_signals_Set_process_signals( mask );
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
5c244: 2040 moveal %d0,%a0
if ( !psiginfo ) {
5c246: 4a80 tstl %d0 5c248: 6700 0126 beqw 5c370 <killinfo+0x27c>
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5c24c: 9c85 subl %d5,%d6 5c24e: 0686 0006 0172 addil #393586,%d6
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
}
psiginfo->Info = *siginfo;
5c254: 216e fff4 0008 movel %fp@(-12),%a0@(8) 5c25a: 216e fff8 000c movel %fp@(-8),%a0@(12) 5c260: 216e fffc 0010 movel %fp@(-4),%a0@(16)
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
5c266: 2f00 movel %d0,%sp@- 5c268: 2f06 movel %d6,%sp@- 5c26a: 4eb9 0004 7098 jsr 47098 <_Chain_Append> 5c270: 508f addql #8,%sp
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
5c272: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
return 0;
5c278: 4280 clrl %d0 5c27a: 6094 bras 5c210 <killinfo+0x11c>
* NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL; interested_priority = PRIORITY_MAXIMUM + 1;
5c27c: 4287 clrl %d7 5c27e: 1e39 0005 e322 moveb 5e322 <rtems_maximum_priority>,%d7 5c284: 47f9 0005 faa0 lea 5faa0 <_Objects_Information_table+0x8>,%a3
* * NOTES: * * + rtems internal threads do not receive signals. */ interested = NULL;
5c28a: 99cc subal %a4,%a4
interested_priority = PRIORITY_MAXIMUM + 1;
5c28c: 5287 addql #1,%d7
for (the_api = OBJECTS_CLASSIC_API; the_api <= OBJECTS_APIS_LAST; the_api++) {
/*
* This can occur when no one is interested and an API is not configured.
*/
if ( !_Objects_Information_table[ the_api ] )
5c28e: 205b moveal %a3@+,%a0 5c290: 4a88 tstl %a0
5c292: 676e beqs 5c302 <killinfo+0x20e> <== NEVER TAKEN
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
5c294: 2068 0004 moveal %a0@(4),%a0
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5c298: 4281 clrl %d1 5c29a: 3228 000e movew %a0@(14),%d1
object_table = the_info->local_table;
5c29e: 2268 0018 moveal %a0@(24),%a1
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
5c2a2: 2441 moveal %d1,%a2
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5c2a4: 4a8a tstl %a2
5c2a6: 675a beqs 5c302 <killinfo+0x20e>
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
5c2a8: 5889 addql #4,%a1
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5c2aa: 7001 moveq #1,%d0 5c2ac: 2d43 ffec movel %d3,%fp@(-20)
the_thread = (Thread_Control *) object_table[ index ];
5c2b0: 2059 moveal %a1@+,%a0
if ( !the_thread )
5c2b2: 4a88 tstl %a0
5c2b4: 6742 beqs 5c2f8 <killinfo+0x204>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
5c2b6: 2228 0014 movel %a0@(20),%d1 5c2ba: be81 cmpl %d1,%d7
5c2bc: 653a bcss 5c2f8 <killinfo+0x204> <== NEVER TAKEN
#if defined(RTEMS_DEBUG)
if ( !api )
continue;
#endif
if ( !_POSIX_signals_Is_interested( api, mask ) )
5c2be: 2a68 010e moveal %a0@(270),%a5 5c2c2: 262d 00cc movel %a5@(204),%d3 5c2c6: 4683 notl %d3 5c2c8: c682 andl %d2,%d3
5c2ca: 672c beqs 5c2f8 <killinfo+0x204>
*
* 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 ) {
5c2cc: be81 cmpl %d1,%d7
5c2ce: 6224 bhis 5c2f4 <killinfo+0x200>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
5c2d0: 2a6c 0010 moveal %a4@(16),%a5 5c2d4: 4a8d tstl %a5
5c2d6: 6720 beqs 5c2f8 <killinfo+0x204> <== NEVER TAKEN
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5c2d8: 2628 0010 movel %a0@(16),%d3 5c2dc: 2d43 fff0 movel %d3,%fp@(-16)
5c2e0: 6712 beqs 5c2f4 <killinfo+0x200>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
5c2e2: 260d movel %a5,%d3 5c2e4: 0803 001c btst #28,%d3
5c2e8: 660e bnes 5c2f8 <killinfo+0x204>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
5c2ea: 262e fff0 movel %fp@(-16),%d3 5c2ee: 0803 001c btst #28,%d3
5c2f2: 6704 beqs 5c2f8 <killinfo+0x204>
*/
if ( !_States_Is_ready( interested->current_state ) ) {
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
5c2f4: 2e01 movel %d1,%d7 5c2f6: 2848 moveal %a0,%a4
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
5c2f8: 5280 addql #1,%d0 5c2fa: b08a cmpl %a2,%d0
5c2fc: 63b2 blss 5c2b0 <killinfo+0x1bc>
5c2fe: 262e ffec movel %fp@(-20),%d3
* + 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++) {
5c302: b7fc 0005 faa8 cmpal #391848,%a3
5c308: 6684 bnes 5c28e <killinfo+0x19a>
}
}
}
}
if ( interested ) {
5c30a: 4a8c tstl %a4 5c30c: 6700 fee2 beqw 5c1f0 <killinfo+0xfc>
/*
* 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 ) ) {
5c310: 486e fff4 pea %fp@(-12) 5c314: 2f03 movel %d3,%sp@- 5c316: 2f0c movel %a4,%sp@- 5c318: 4eb9 0005 c3b0 jsr 5c3b0 <_POSIX_signals_Unblock_thread> 5c31e: 4fef 000c lea %sp@(12),%sp 5c322: 4a00 tstb %d0 5c324: 6700 feca beqw 5c1f0 <killinfo+0xfc>
5c328: 6000 fede braw 5c208 <killinfo+0x114> <== NOT EXECUTED
/*
* If the signal is being ignored, then we are out of here.
*/
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN )
return 0;
5c32c: 4280 clrl %d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c32e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c334: 4e5e unlk %fp 5c336: 4e75 rts
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
if ( !value ) {
siginfo->si_value.sival_int = 0;
5c338: 42ae fffc clrl %fp@(-4) 5c33c: 6000 fe38 braw 5c176 <killinfo+0x82>
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
5c340: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c346: 7603 moveq #3,%d3 5c348: 2040 moveal %d0,%a0 5c34a: 70ff moveq #-1,%d0 5c34c: 2083 movel %d3,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c34e: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c354: 4e5e unlk %fp 5c356: 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 );
5c358: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c35e: 7416 moveq #22,%d2 5c360: 2040 moveal %d0,%a0 5c362: 70ff moveq #-1,%d0 5c364: 2082 movel %d2,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c366: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5 5c36c: 4e5e unlk %fp 5c36e: 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();
5c370: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
5c376: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c37c: 720b moveq #11,%d1 5c37e: 2040 moveal %d0,%a0 5c380: 70ff moveq #-1,%d0
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c382: 4cee 3cfc ffc4 moveml %fp@(-60),%d2-%d7/%a2-%a5
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
5c388: 2081 movel %d1,%a0@
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
return 0;
}
5c38a: 4e5e unlk %fp
...
00043648 <libc_wrapup>:
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
43648: 7003 moveq #3,%d0
extern void _wrapup_reent(struct _reent *);
extern void _reclaim_reent(struct _reent *);
void libc_wrapup(void)
{
4364a: 4e56 0000 linkw %fp,#0 4364e: 2f0a movel %a2,%sp@-
/*
* In case RTEMS is already down, don't do this. It could be
* dangerous.
*/
if (!_System_state_Is_up(_System_state_Get()))
43650: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0
43656: 6708 beqs 43660 <libc_wrapup+0x18> <== ALWAYS TAKEN
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
}
43658: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4365c: 4e5e unlk %fp <== NOT EXECUTED 4365e: 4e75 rts <== NOT EXECUTED
/*
* This was already done if the user called exit() directly .
_wrapup_reent(0);
*/
if (_REENT != _global_impure_ptr) {
43660: 2479 0005 da66 moveal 5da66 <_global_impure_ptr>,%a2 43666: b5f9 0005 e454 cmpal 5e454 <_impure_ptr>,%a2
4366c: 6710 beqs 4367e <libc_wrapup+0x36>
_wrapup_reent(_global_impure_ptr);
4366e: 2f0a movel %a2,%sp@- 43670: 4eb9 0004 f59e jsr 4f59e <_wrapup_reent>
/* Don't reclaim this one, just in case we do printfs
* on the way out to ROM.
*/
_reclaim_reent(&libc_global_reent);
#endif
_REENT = _global_impure_ptr;
43676: 588f addql #4,%sp 43678: 23ca 0005 e454 movel %a2,5e454 <_impure_ptr>
*
* Should this be changed to do *all* file streams?
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
4367e: 2f2a 0004 movel %a2@(4),%sp@- 43682: 45f9 0004 eb42 lea 4eb42 <fclose>,%a2 43688: 4e92 jsr %a2@
fclose (stdout);
4368a: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 43690: 2f28 0008 movel %a0@(8),%sp@- 43694: 4e92 jsr %a2@
fclose (stderr);
43696: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 4369c: 2f28 000c movel %a0@(12),%sp@- 436a0: 4e92 jsr %a2@
}
436a2: 246e fffc moveal %fp@(-4),%a2
* _fwalk (_REENT, fclose);
*/
fclose (stdin);
fclose (stdout);
fclose (stderr);
436a6: 4fef 000c lea %sp@(12),%sp
}
436aa: 4e5e unlk %fp <== NOT EXECUTED
0004566c <link>:
int link(
const char *existing,
const char *new
)
{
4566c: 4e56 ffbc linkw %fp,#-68 45670: 48d7 043c moveml %d2-%d5/%a2,%sp@ 45674: 242e 0008 movel %fp@(8),%d2
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
45678: 260e movel %fp,%d3 4567a: 0683 ffff ffe4 addil #-28,%d3 45680: 2f02 movel %d2,%sp@-
int link(
const char *existing,
const char *new
)
{
45682: 2a2e 000c movel %fp@(12),%d5
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
45686: 4eb9 0005 4b50 jsr 54b50 <strlen> 4568c: 7201 moveq #1,%d1 4568e: 2e81 movel %d1,%sp@ 45690: 2f03 movel %d3,%sp@- 45692: 42a7 clrl %sp@- 45694: 2f00 movel %d0,%sp@- 45696: 2f02 movel %d2,%sp@- 45698: 4eb9 0004 5094 jsr 45094 <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
4569e: 4fef 0014 lea %sp@(20),%sp 456a2: 4a80 tstl %d0
456a4: 670e beqs 456b4 <link+0x48>
return -1;
456a6: 74ff moveq #-1,%d2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
456a8: 2002 movel %d2,%d0 456aa: 4cee 043c ffbc moveml %fp@(-68),%d2-%d5/%a2 456b0: 4e5e unlk %fp 456b2: 4e75 rts
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
456b4: 280e movel %fp,%d4 456b6: 0684 ffff ffd0 addil #-48,%d4 456bc: 2f04 movel %d4,%sp@- 456be: 486e fffc pea %fp@(-4) 456c2: 2f05 movel %d5,%sp@- 456c4: 4eb9 0004 6b08 jsr 46b08 <rtems_filesystem_get_start_loc>
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
456ca: 486e fff8 pea %fp@(-8) 456ce: daae fffc addl %fp@(-4),%d5 456d2: 2f04 movel %d4,%sp@- 456d4: 206e ffdc moveal %fp@(-36),%a0 456d8: 2f05 movel %d5,%sp@- 456da: 2068 0004 moveal %a0@(4),%a0 456de: 4e90 jsr %a0@
if ( result != 0 ) {
456e0: 4fef 0018 lea %sp@(24),%sp 456e4: 4a80 tstl %d0
456e6: 6666 bnes 4574e <link+0xe2>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
456e8: 202e fff4 movel %fp@(-12),%d0 456ec: b0ae ffe0 cmpl %fp@(-32),%d0
456f0: 6632 bnes 45724 <link+0xb8> <== NEVER TAKEN
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
456f2: 2f2e fff8 movel %fp@(-8),%sp@-
rtems_filesystem_freenode( &existing_loc );
456f6: 45f9 0004 51b8 lea 451b8 <rtems_filesystem_freenode>,%a2
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
456fc: 206e ffdc moveal %fp@(-36),%a0 45700: 2f04 movel %d4,%sp@- 45702: 2f03 movel %d3,%sp@- 45704: 2068 0008 moveal %a0@(8),%a0 45708: 4e90 jsr %a0@ 4570a: 2400 movel %d0,%d2
rtems_filesystem_freenode( &existing_loc );
4570c: 2f03 movel %d3,%sp@- 4570e: 4e92 jsr %a2@
rtems_filesystem_freenode( &parent_loc );
45710: 2f04 movel %d4,%sp@- 45712: 4e92 jsr %a2@
return result;
45714: 4fef 0014 lea %sp@(20),%sp
}
45718: 2002 movel %d2,%d0 4571a: 4cee 043c ffbc moveml %fp@(-68),%d2-%d5/%a2 45720: 4e5e unlk %fp 45722: 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 );
45724: 2f03 movel %d3,%sp@- 45726: 45f9 0004 51b8 lea 451b8 <rtems_filesystem_freenode>,%a2
rtems_filesystem_freenode( &parent_loc );
rtems_set_errno_and_return_minus_one( EXDEV );
4572c: 74ff moveq #-1,%d2
* 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 );
4572e: 4e92 jsr %a2@
rtems_filesystem_freenode( &parent_loc );
45730: 2f04 movel %d4,%sp@- 45732: 4e92 jsr %a2@
rtems_set_errno_and_return_minus_one( EXDEV );
45734: 4eb9 0005 1adc jsr 51adc <__errno> 4573a: 508f addql #8,%sp 4573c: 2040 moveal %d0,%a0 4573e: 7012 moveq #18,%d0 45740: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
45742: 2002 movel %d2,%d0 45744: 4cee 043c ffbc moveml %fp@(-68),%d2-%d5/%a2 4574a: 4e5e unlk %fp 4574c: 4e75 rts
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
4574e: 2f03 movel %d3,%sp@-
return -1;
45750: 74ff moveq #-1,%d2
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
if ( result != 0 ) {
rtems_filesystem_freenode( &existing_loc );
45752: 4eb9 0004 51b8 jsr 451b8 <rtems_filesystem_freenode>
return -1;
45758: 588f addql #4,%sp
rtems_filesystem_freenode( &existing_loc );
rtems_filesystem_freenode( &parent_loc );
return result;
}
4575a: 2002 movel %d2,%d0 4575c: 4cee 043c ffbc moveml %fp@(-68),%d2-%d5/%a2
45762: 4e5e unlk %fp <== NOT EXECUTED
0005bc50 <lseek>:
off_t lseek(
int fd,
off_t offset,
int whence
)
{
5bc50: 4e56 ffec linkw %fp,#-20 5bc54: 206e 0014 moveal %fp@(20),%a0 5bc58: 48d7 043c moveml %d2-%d5/%a2,%sp@ 5bc5c: 242e 0008 movel %fp@(8),%d2 5bc60: 202e 000c movel %fp@(12),%d0 5bc64: 222e 0010 movel %fp@(16),%d1
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
5bc68: b4b9 0005 e274 cmpl 5e274 <rtems_libio_number_iops>,%d2 5bc6e: 6400 011e bccw 5bd8e <lseek+0x13e>
iop = rtems_libio_iop( fd );
5bc72: 2802 movel %d2,%d4 5bc74: ed8a lsll #6,%d2 5bc76: e78c lsll #3,%d4 5bc78: 2479 0005 f984 moveal 5f984 <rtems_libio_iops>,%a2 5bc7e: 9484 subl %d4,%d2 5bc80: d5c2 addal %d2,%a2
rtems_libio_check_is_open(iop);
5bc82: 242a 0014 movel %a2@(20),%d2 5bc86: 0282 0000 0100 andil #256,%d2 5bc8c: 6700 0100 beqw 5bd8e <lseek+0x13e>
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
5bc90: 7801 moveq #1,%d4
/*
* Now process the lseek().
*/
old_offset = iop->offset;
5bc92: 242a 000c movel %a2@(12),%d2 5bc96: 262a 0010 movel %a2@(16),%d3
switch ( whence ) {
5bc9a: b888 cmpl %a0,%d4 5bc9c: 6700 00b6 beqw 5bd54 <lseek+0x104> 5bca0: 7a02 moveq #2,%d5 5bca2: ba88 cmpl %a0,%d5
5bca4: 6756 beqs 5bcfc <lseek+0xac>
5bca6: 4a88 tstl %a0 5bca8: 6600 008c bnew 5bd36 <lseek+0xe6>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bcac: 226a 0020 moveal %a2@(32),%a1
*/
old_offset = iop->offset;
switch ( whence ) {
case SEEK_SET:
iop->offset = offset;
5bcb0: 2540 000c movel %d0,%a2@(12) 5bcb4: 2541 0010 movel %d1,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bcb8: 2f08 movel %a0,%sp@- 5bcba: 2f01 movel %d1,%sp@- 5bcbc: 2f00 movel %d0,%sp@- 5bcbe: 2f0a movel %a2,%sp@- 5bcc0: 2069 0014 moveal %a1@(20),%a0 5bcc4: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5bcc6: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bcca: 2800 movel %d0,%d4 5bccc: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5bcce: 70ff moveq #-1,%d0 5bcd0: 72ff moveq #-1,%d1 5bcd2: 9285 subl %d5,%d1 5bcd4: 9184 subxl %d4,%d0
5bcd6: 670e beqs 5bce6 <lseek+0x96> <== NEVER TAKEN
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5bcd8: 2004 movel %d4,%d0 5bcda: 2205 movel %d5,%d1 5bcdc: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 5bce2: 4e5e unlk %fp 5bce4: 4e75 rts 5bce6: 2004 movel %d4,%d0 5bce8: 2205 movel %d5,%d1
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
if ( status == (off_t) -1 )
iop->offset = old_offset;
5bcea: 2542 000c movel %d2,%a2@(12) 5bcee: 2543 0010 movel %d3,%a2@(16)
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5bcf2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 5bcf8: 4e5e unlk %fp 5bcfa: 4e75 rts
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bcfc: 226a 0020 moveal %a2@(32),%a1
case SEEK_CUR:
iop->offset += offset;
break;
case SEEK_END:
iop->offset = iop->size + offset;
5bd00: 282a 0004 movel %a2@(4),%d4 5bd04: 2a2a 0008 movel %a2@(8),%d5 5bd08: da81 addl %d1,%d5 5bd0a: d980 addxl %d0,%d4 5bd0c: 2544 000c movel %d4,%a2@(12) 5bd10: 2545 0010 movel %d5,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bd14: 2f08 movel %a0,%sp@- 5bd16: 2f01 movel %d1,%sp@- 5bd18: 2f00 movel %d0,%sp@- 5bd1a: 2f0a movel %a2,%sp@- 5bd1c: 2069 0014 moveal %a1@(20),%a0 5bd20: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5bd22: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bd26: 2800 movel %d0,%d4 5bd28: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5bd2a: 70ff moveq #-1,%d0 5bd2c: 72ff moveq #-1,%d1 5bd2e: 9285 subl %d5,%d1 5bd30: 9184 subxl %d4,%d0
5bd32: 66a4 bnes 5bcd8 <lseek+0x88>
5bd34: 60b0 bras 5bce6 <lseek+0x96>
case SEEK_END:
iop->offset = iop->size + offset;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
5bd36: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5bd3c: 2040 moveal %d0,%a0 5bd3e: 7016 moveq #22,%d0 5bd40: 78ff moveq #-1,%d4 5bd42: 7aff moveq #-1,%d5 5bd44: 2080 movel %d0,%a0@
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5bd46: 2004 movel %d4,%d0 5bd48: 2205 movel %d5,%d1 5bd4a: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2 5bd50: 4e5e unlk %fp 5bd52: 4e75 rts
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bd54: 226a 0020 moveal %a2@(32),%a1
case SEEK_SET:
iop->offset = offset;
break;
case SEEK_CUR:
iop->offset += offset;
5bd58: 2800 movel %d0,%d4 5bd5a: 2a01 movel %d1,%d5 5bd5c: da83 addl %d3,%d5 5bd5e: d982 addxl %d2,%d4 5bd60: 2544 000c movel %d4,%a2@(12) 5bd64: 2545 0010 movel %d5,%a2@(16)
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bd68: 2f08 movel %a0,%sp@- 5bd6a: 2f01 movel %d1,%sp@- 5bd6c: 2f00 movel %d0,%sp@- 5bd6e: 2f0a movel %a2,%sp@- 5bd70: 2069 0014 moveal %a1@(20),%a0 5bd74: 4e90 jsr %a0@
if ( status == (off_t) -1 )
5bd76: 4fef 0010 lea %sp@(16),%sp
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence );
5bd7a: 2800 movel %d0,%d4 5bd7c: 2a01 movel %d1,%d5
if ( status == (off_t) -1 )
5bd7e: 70ff moveq #-1,%d0 5bd80: 72ff moveq #-1,%d1 5bd82: 9285 subl %d5,%d1 5bd84: 9184 subxl %d4,%d0 5bd86: 6600 ff50 bnew 5bcd8 <lseek+0x88> 5bd8a: 6000 ff5a braw 5bce6 <lseek+0x96>
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
5bd8e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5bd94: 7209 moveq #9,%d1 5bd96: 2040 moveal %d0,%a0 5bd98: 78ff moveq #-1,%d4 5bd9a: 7aff moveq #-1,%d5 5bd9c: 2081 movel %d1,%a0@
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
5bd9e: 2004 movel %d4,%d0 5bda0: 2205 movel %d5,%d1 5bda2: 4cee 043c ffec moveml %fp@(-20),%d2-%d5/%a2
5bda8: 4e5e unlk %fp <== NOT EXECUTED
000430e8 <malloc>:
#include "malloc_p.h"
void *malloc(
size_t size
)
{
430e8: 4e56 0000 linkw %fp,#0
void *return_this;
MSBUMP(malloc_calls, 1);
430ec: 52b9 0005 f9a0 addql #1,5f9a0 <rtems_malloc_statistics+0x4>
#include "malloc_p.h"
void *malloc(
size_t size
)
{
430f2: 2f03 movel %d3,%sp@- 430f4: 262e 0008 movel %fp@(8),%d3 430f8: 2f02 movel %d2,%sp@-
MSBUMP(malloc_calls, 1);
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
430fa: 4eb9 0004 2fbc jsr 42fbc <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
43100: 4a83 tstl %d3
43102: 6762 beqs 43166 <malloc+0x7e>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
43104: 7003 moveq #3,%d0 43106: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0
4310c: 674e beqs 4315c <malloc+0x74>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
4310e: 42a7 clrl %sp@- 43110: 42a7 clrl %sp@- 43112: 2f03 movel %d3,%sp@- 43114: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 4311a: 4eb9 0004 828c jsr 4828c <_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 ) {
43120: 4fef 0010 lea %sp@(16),%sp 43124: 2400 movel %d0,%d2
43126: 674e beqs 43176 <malloc+0x8e>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
43128: 2079 0005 e91e moveal 5e91e <rtems_malloc_dirty_helper>,%a0 4312e: 4a88 tstl %a0
43130: 6708 beqs 4313a <malloc+0x52>
(*rtems_malloc_dirty_helper)( return_this, size );
43132: 2f03 movel %d3,%sp@- 43134: 2f02 movel %d2,%sp@- 43136: 4e90 jsr %a0@ 43138: 508f addql #8,%sp
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
4313a: 2079 0005 e916 moveal 5e916 <rtems_malloc_statistics_helpers>,%a0 43140: 4a88 tstl %a0
43142: 670a beqs 4314e <malloc+0x66>
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
43144: 2f02 movel %d2,%sp@- 43146: 2068 0004 moveal %a0@(4),%a0 4314a: 4e90 jsr %a0@ 4314c: 588f addql #4,%sp
return return_this;
}
4314e: 2002 movel %d2,%d0 43150: 242e fff8 movel %fp@(-8),%d2 43154: 262e fffc movel %fp@(-4),%d3 43158: 4e5e unlk %fp 4315a: 4e75 rts
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
4315c: 4eb9 0004 2f7c jsr 42f7c <malloc_is_system_state_OK>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
43162: 4a00 tstb %d0
43164: 66a8 bnes 4310e <malloc+0x26> <== ALWAYS TAKEN
!malloc_is_system_state_OK() )
return NULL;
43166: 4282 clrl %d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
43168: 2002 movel %d2,%d0 4316a: 242e fff8 movel %fp@(-8),%d2 4316e: 262e fffc movel %fp@(-4),%d3 43172: 4e5e unlk %fp 43174: 4e75 rts
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
43176: 2079 0005 e91a moveal 5e91a <rtems_malloc_sbrk_helpers>,%a0 4317c: 4a88 tstl %a0
4317e: 671c beqs 4319c <malloc+0xb4>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
43180: 2f03 movel %d3,%sp@- 43182: 2068 0004 moveal %a0@(4),%a0 43186: 4e90 jsr %a0@
if ( !return_this ) {
43188: 588f addql #4,%sp 4318a: 4a80 tstl %d0
4318c: 670e beqs 4319c <malloc+0xb4>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
4318e: 2079 0005 e91e moveal 5e91e <rtems_malloc_dirty_helper>,%a0
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 );
if ( !return_this ) {
43194: 2400 movel %d0,%d2
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
43196: 4a88 tstl %a0
43198: 6698 bnes 43132 <malloc+0x4a> <== NEVER TAKEN
4319a: 609e bras 4313a <malloc+0x52>
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
4319c: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
431a2: 262e fffc movel %fp@(-4),%d3
if ( !return_this ) {
if (rtems_malloc_sbrk_helpers)
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
if ( !return_this ) {
errno = ENOMEM;
431a6: 2040 moveal %d0,%a0 431a8: 700c moveq #12,%d0 431aa: 2080 movel %d0,%a0@
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
return return_this;
}
431ac: 2002 movel %d2,%d0 431ae: 242e fff8 movel %fp@(-8),%d2 431b2: 4e5e unlk %fp
...
00042fbc <malloc_deferred_frees_process>:
void malloc_deferred_frees_process(void)
{
42fbc: 4e56 0000 linkw %fp,#0 42fc0: 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);
42fc2: 47f9 0004 2db8 lea 42db8 <free>,%a3
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
42fc8: 2f0a movel %a2,%sp@-
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
42fca: 4879 0005 f990 pea 5f990 <RTEMS_Malloc_GC_list> 42fd0: 45f9 0004 70f8 lea 470f8 <_Chain_Get>,%a2 42fd6: 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)
42fd8: 588f addql #4,%sp 42fda: 4a80 tstl %d0
42fdc: 6714 beqs 42ff2 <malloc_deferred_frees_process+0x36>
free(to_be_freed);
42fde: 2f00 movel %d0,%sp@- 42fe0: 4e93 jsr %a3@ 42fe2: 588f addql #4,%sp 42fe4: 4879 0005 f990 pea 5f990 <RTEMS_Malloc_GC_list> 42fea: 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)
42fec: 588f addql #4,%sp 42fee: 4a80 tstl %d0
42ff0: 66ec bnes 42fde <malloc_deferred_frees_process+0x22><== NEVER TAKEN
free(to_be_freed);
}
42ff2: 246e fff8 moveal %fp@(-8),%a2 42ff6: 266e fffc moveal %fp@(-4),%a3
42ffa: 4e5e unlk %fp <== NOT EXECUTED
00043450 <malloc_sbrk_extend_and_allocate>:
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
43450: 4e56 0000 linkw %fp,#0
* Round to the "requested sbrk amount" so hopefully we won't have
* to grow again for a while. This effectively does sbrk() calls
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
43454: 2039 0006 0008 movel 60008 <RTEMS_Malloc_Sbrk_amount>,%d0
}
void *malloc_sbrk_extend_and_allocate(
size_t size
)
{
4345a: 2f0a movel %a2,%sp@- 4345c: 2f02 movel %d2,%sp@-
* in "page" amounts.
*/
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
4345e: 4a80 tstl %d0
43460: 660e bnes 43470 <malloc_sbrk_extend_and_allocate+0x20><== ALWAYS TAKEN
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43462: 242e fff8 movel %fp@(-8),%d2
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
starting_address = (void *) sbrk(the_size);
if ( starting_address == (void*) -1 )
return (void *) 0;
43466: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
43468: 246e fffc moveal %fp@(-4),%a2 4346c: 4e5e unlk %fp 4346e: 4e75 rts
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
43470: 242e 0008 movel %fp@(8),%d2 43474: d480 addl %d0,%d2
starting_address = (void *) sbrk(the_size);
43476: 45f9 0004 081a lea 4081a <sbrk>,%a2
sbrk_amount = RTEMS_Malloc_Sbrk_amount;
if ( sbrk_amount == 0 )
return (void *) 0;
the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount);
4347c: 4c40 2002 remul %d0,%d2,%d2 43480: 4c00 2800 mulsl %d0,%d2
starting_address = (void *) sbrk(the_size);
43484: 2f02 movel %d2,%sp@- 43486: 4e92 jsr %a2@
if ( starting_address == (void*) -1 )
43488: 588f addql #4,%sp 4348a: 72ff moveq #-1,%d1 4348c: b280 cmpl %d0,%d1
4348e: 67d2 beqs 43462 <malloc_sbrk_extend_and_allocate+0x12>
return (void *) 0;
if ( !_Protected_heap_Extend(
43490: 2f02 movel %d2,%sp@- 43492: 2f00 movel %d0,%sp@- 43494: 2f39 0005 e7e0 movel 5e7e0 <RTEMS_Malloc_Heap>,%sp@- 4349a: 4eb9 0004 857c jsr 4857c <_Protected_heap_Extend> 434a0: 4fef 000c lea %sp@(12),%sp 434a4: 4a00 tstb %d0
434a6: 672a beqs 434d2 <malloc_sbrk_extend_and_allocate+0x82>
434a8: 42a7 clrl %sp@-
sbrk(-the_size);
errno = ENOMEM;
return (void *) 0;
}
MSBUMP(space_available, the_size);
434aa: d5b9 0005 ffdc addl %d2,5ffdc <rtems_malloc_statistics> 434b0: 42a7 clrl %sp@- 434b2: 2f2e 0008 movel %fp@(8),%sp@- 434b6: 2f39 0005 e7e0 movel 5e7e0 <RTEMS_Malloc_Heap>,%sp@- 434bc: 4eb9 0004 853c jsr 4853c <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
434c2: 242e fff8 movel %fp@(-8),%d2
}
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
434c6: 4fef 0010 lea %sp@(16),%sp
}
434ca: 246e fffc moveal %fp@(-4),%a2 434ce: 4e5e unlk %fp 434d0: 4e75 rts
if ( starting_address == (void*) -1 )
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
434d2: 4482 negl %d2 434d4: 2f02 movel %d2,%sp@- 434d6: 4e92 jsr %a2@
errno = ENOMEM;
434d8: 4eb9 0004 ef5c jsr 4ef5c <__errno>
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
434de: 242e fff8 movel %fp@(-8),%d2
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
434e2: 2040 moveal %d0,%a0 434e4: 720c moveq #12,%d1
return (void *) 0;
434e6: 588f addql #4,%sp 434e8: 4280 clrl %d0
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
434ea: 246e fffc moveal %fp@(-4),%a2 434ee: 4e5e unlk %fp
return (void *) 0;
if ( !_Protected_heap_Extend(
RTEMS_Malloc_Heap, starting_address, the_size) ) {
sbrk(-the_size);
errno = ENOMEM;
434f0: 2081 movel %d1,%a0@ <== NOT EXECUTED
MSBUMP(space_available, the_size);
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
return return_this;
}
0004cf30 <memfile_alloc_block>:
*/
int memfile_blocks_allocated = 0;
void *memfile_alloc_block(void)
{
4cf30: 4e56 0000 linkw %fp,#0
void *memory;
memory = (void *)calloc(1, IMFS_MEMFILE_BYTES_PER_BLOCK);
4cf34: 2f39 0005 f184 movel 5f184 <imfs_memfile_bytes_per_block>,%sp@- 4cf3a: 4878 0001 pea 1 <ADD> 4cf3e: 4eb9 0004 292c jsr 4292c <calloc>
if ( memory )
4cf44: 508f addql #8,%sp 4cf46: 4a80 tstl %d0
4cf48: 6706 beqs 4cf50 <memfile_alloc_block+0x20> <== NEVER TAKEN
memfile_blocks_allocated++;
4cf4a: 52b9 0005 f294 addql #1,5f294 <memfile_blocks_allocated>
return memory;
}
4cf50: 4e5e unlk %fp <== NOT EXECUTED
0004d3d4 <memfile_free_blocks_in_table>:
void memfile_free_blocks_in_table(
block_p **block_table,
int entries
)
{
4d3d4: 4e56 ffec linkw %fp,#-20 4d3d8: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d3dc: 286e 0008 moveal %fp@(8),%a4 4d3e0: 262e 000c movel %fp@(12),%d3
*/
#if defined(RTEMS_DEBUG)
assert( block_table );
#endif
if ( !block_table )
4d3e4: 4a8c tstl %a4
4d3e6: 672e beqs 4d416 <memfile_free_blocks_in_table+0x42><== NEVER TAKEN
/*
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
4d3e8: 2454 moveal %a4@,%a2 4d3ea: 47f9 0004 d3ba lea 4d3ba <memfile_free_block>,%a3
for ( i=0 ; i<entries ; i++ ) {
4d3f0: 4a83 tstl %d3
4d3f2: 6f1a bles 4d40e <memfile_free_blocks_in_table+0x3a><== NEVER TAKEN
4d3f4: 4282 clrl %d2
if ( b[i] ) {
4d3f6: 201a movel %a2@+,%d0
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4d3f8: 5282 addql #1,%d2
if ( b[i] ) {
4d3fa: 4a80 tstl %d0
4d3fc: 670a beqs 4d408 <memfile_free_blocks_in_table+0x34>
memfile_free_block( b[i] );
4d3fe: 2f00 movel %d0,%sp@- 4d400: 4e93 jsr %a3@
b[i] = 0;
4d402: 588f addql #4,%sp 4d404: 42aa fffc clrl %a2@(-4)
* Now go through all the slots in the table and free the memory.
*/
b = *block_table;
for ( i=0 ; i<entries ; i++ ) {
4d408: b483 cmpl %d3,%d2
4d40a: 6dea blts 4d3f6 <memfile_free_blocks_in_table+0x22>
4d40c: 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 );
4d40e: 2f0a movel %a2,%sp@- 4d410: 4e93 jsr %a3@
*block_table = 0;
4d412: 588f addql #4,%sp 4d414: 4294 clrl %a4@
}
4d416: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4
4d41c: 4e5e unlk %fp <== NOT EXECUTED
0004d93e <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4d93e: 4e56 ffec linkw %fp,#-20 4d942: 206e 0008 moveal %fp@(8),%a0 4d946: 48d7 040c moveml %d2-%d3/%a2,%sp@
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4d94a: 2468 0018 moveal %a0@(24),%a2
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
4d94e: 202e 000c movel %fp@(12),%d0 4d952: 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 )
4d956: 242a 004c movel %a2@(76),%d2 4d95a: 262a 0050 movel %a2@(80),%d3 4d95e: 9681 subl %d1,%d3 4d960: 9580 subxl %d0,%d2
4d962: 6d30 blts 4d994 <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;
4d964: 2540 004c movel %d0,%a2@(76) 4d968: 2541 0050 movel %d1,%a2@(80)
iop->size = the_jnode->info.file.size;
4d96c: 2140 0004 movel %d0,%a0@(4) 4d970: 2141 0008 movel %d1,%a0@(8)
IMFS_update_atime( the_jnode );
4d974: 42a7 clrl %sp@- 4d976: 486e fff8 pea %fp@(-8) 4d97a: 4eb9 0004 2e48 jsr 42e48 <gettimeofday> 4d980: 256e fff8 003c movel %fp@(-8),%a2@(60)
return 0;
4d986: 508f addql #8,%sp 4d988: 4280 clrl %d0
}
4d98a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4d990: 4e5e unlk %fp 4d992: 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 );
4d994: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d996: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4d998: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4d99a: 4eb9 0004 d56c jsr 4d56c <IMFS_memfile_extend> <== NOT EXECUTED 4d9a0: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
IMFS_update_atime( the_jnode );
return 0;
}
4d9a4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 4d9aa: 4e5e unlk %fp <== NOT EXECUTED
0004d9ae <memfile_lseek>:
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
4d9ae: 7006 moveq #6,%d0
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
4d9b0: 4e56 ffe4 linkw %fp,#-28 4d9b4: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 4d9b8: 246e 0008 moveal %fp@(8),%a2
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4d9bc: 266a 0018 moveal %a2@(24),%a3
if (the_jnode->type == IMFS_LINEAR_FILE) {
4d9c0: b0ab 0048 cmpl %a3@(72),%d0
4d9c4: 673e beqs 4da04 <memfile_lseek+0x56>
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 ))
4d9c6: 2f2a 0010 movel %a2@(16),%sp@- 4d9ca: 2f2a 000c movel %a2@(12),%sp@- 4d9ce: 2f0b movel %a3,%sp@- 4d9d0: 4eb9 0004 d56c jsr 4d56c <IMFS_memfile_extend> 4d9d6: 4fef 000c lea %sp@(12),%sp 4d9da: 4a80 tstl %d0
4d9dc: 665a bnes 4da38 <memfile_lseek+0x8a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
4d9de: 202b 004c movel %a3@(76),%d0 4d9e2: 222b 0050 movel %a3@(80),%d1 4d9e6: 2540 0004 movel %d0,%a2@(4) 4d9ea: 2541 0008 movel %d1,%a2@(8) 4d9ee: 222a 000c movel %a2@(12),%d1 4d9f2: 242a 0010 movel %a2@(16),%d2
} return iop->offset; }
4d9f6: 2001 movel %d1,%d0 4d9f8: 2202 movel %d2,%d1 4d9fa: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4da00: 4e5e unlk %fp 4da02: 4e75 rts
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
if (the_jnode->type == IMFS_LINEAR_FILE) {
if (iop->offset > the_jnode->info.linearfile.size)
4da04: 222a 000c movel %a2@(12),%d1 4da08: 242a 0010 movel %a2@(16),%d2 4da0c: 262b 004c movel %a3@(76),%d3 4da10: 282b 0050 movel %a3@(80),%d4 4da14: 2a01 movel %d1,%d5 4da16: 2c02 movel %d2,%d6 4da18: 9c84 subl %d4,%d6 4da1a: 9b83 subxl %d3,%d5
4da1c: 6fd8 bles 4d9f6 <memfile_lseek+0x48> <== ALWAYS TAKEN
iop->offset = the_jnode->info.linearfile.size;
4da1e: 2203 movel %d3,%d1 <== NOT EXECUTED 4da20: 2404 movel %d4,%d2 <== NOT EXECUTED 4da22: 2543 000c movel %d3,%a2@(12) <== NOT EXECUTED 4da26: 2544 0010 movel %d4,%a2@(16) <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4da2a: 2001 movel %d1,%d0 <== NOT EXECUTED 4da2c: 2202 movel %d2,%d1 <== NOT EXECUTED 4da2e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4da34: 4e5e unlk %fp <== NOT EXECUTED 4da36: 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 );
4da38: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4da3e: 7c1c moveq #28,%d6 <== NOT EXECUTED 4da40: 2040 moveal %d0,%a0 <== NOT EXECUTED 4da42: 72ff moveq #-1,%d1 <== NOT EXECUTED 4da44: 74ff moveq #-1,%d2 <== NOT EXECUTED 4da46: 2086 movel %d6,%a0@ <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
}
return iop->offset;
}
4da48: 2001 movel %d1,%d0 <== NOT EXECUTED 4da4a: 2202 movel %d2,%d1 <== NOT EXECUTED 4da4c: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 4da52: 4e5e unlk %fp <== NOT EXECUTED
...
0004d88a <memfile_open>:
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
4d88a: 4e56 fff0 linkw %fp,#-16 4d88e: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4d892: 246e 0008 moveal %fp@(8),%a2
the_jnode = iop->pathinfo.node_access;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4d896: 202a 0014 movel %a2@(20),%d0 4d89a: 2200 movel %d0,%d1 4d89c: 0281 0000 0204 andil #516,%d1
uint32_t mode
)
{
IMFS_jnode_t *the_jnode;
the_jnode = iop->pathinfo.node_access;
4d8a2: 266a 0018 moveal %a2@(24),%a3
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
4d8a6: 6708 beqs 4d8b0 <memfile_open+0x26>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
4d8a8: 7206 moveq #6,%d1 4d8aa: b2ab 0048 cmpl %a3@(72),%d1
4d8ae: 6732 beqs 4d8e2 <memfile_open+0x58> <== NEVER TAKEN
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4d8b0: 0800 0009 btst #9,%d0
4d8b4: 6710 beqs 4d8c6 <memfile_open+0x3c>
iop->offset = the_jnode->info.file.size;
4d8b6: 242b 004c movel %a3@(76),%d2 4d8ba: 262b 0050 movel %a3@(80),%d3 4d8be: 2542 000c movel %d2,%a2@(12) 4d8c2: 2543 0010 movel %d3,%a2@(16)
iop->size = the_jnode->info.file.size;
return 0;
4d8c6: 4280 clrl %d0
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = the_jnode->info.file.size;
iop->size = the_jnode->info.file.size;
4d8c8: 222b 004c movel %a3@(76),%d1 4d8cc: 242b 0050 movel %a3@(80),%d2 4d8d0: 2541 0004 movel %d1,%a2@(4) 4d8d4: 2542 0008 movel %d2,%a2@(8)
return 0; }
4d8d8: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4d8de: 4e5e unlk %fp 4d8e0: 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;
4d8e2: 222b 0050 movel %a3@(80),%d1 <== NOT EXECUTED
const unsigned char *buffer = the_jnode->info.linearfile.direct;
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4d8e6: 4282 clrl %d2 <== NOT EXECUTED 4d8e8: 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;
4d8ea: 206b 0054 moveal %a3@(84),%a0 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
4d8ee: 2742 004c movel %d2,%a3@(76) <== NOT EXECUTED 4d8f2: 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;
4d8f6: 7605 moveq #5,%d3 <== NOT EXECUTED
the_jnode->info.file.size = 0;
the_jnode->info.file.indirect = 0;
4d8f8: 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;
4d8fc: 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;
4d900: 42ab 0058 clrl %a3@(88) <== NOT EXECUTED
the_jnode->info.file.triply_indirect = 0;
4d904: 42ab 005c clrl %a3@(92) <== NOT EXECUTED
if ((count != 0)
4d908: 4a81 tstl %d1 <== NOT EXECUTED 4d90a: 67a4 beqs 4d8b0 <memfile_open+0x26> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
4d90c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4d90e: 2f08 movel %a0,%sp@- <== NOT EXECUTED 4d910: 42a7 clrl %sp@- <== NOT EXECUTED 4d912: 42a7 clrl %sp@- <== NOT EXECUTED 4d914: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4d916: 4eb9 0004 d672 jsr 4d672 <IMFS_memfile_write> <== NOT EXECUTED 4d91c: 4fef 0014 lea %sp@(20),%sp <== NOT EXECUTED 4d920: 72ff moveq #-1,%d1 <== NOT EXECUTED 4d922: b280 cmpl %d0,%d1 <== NOT EXECUTED 4d924: 670c beqs 4d932 <memfile_open+0xa8> <== NOT EXECUTED 4d926: 202a 0014 movel %a2@(20),%d0 <== NOT EXECUTED
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
4d92a: 0800 0009 btst #9,%d0 <== NOT EXECUTED 4d92e: 6796 beqs 4d8c6 <memfile_open+0x3c> <== NOT EXECUTED 4d930: 6084 bras 4d8b6 <memfile_open+0x2c> <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
4d932: 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;
}
4d934: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 4d93a: 4e5e unlk %fp <== NOT EXECUTED
000431d8 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
431d8: 4e56 ffd4 linkw %fp,#-44 431dc: 48d7 001c moveml %d2-%d4,%sp@ 431e0: 242e 000c movel %fp@(12),%d2
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) ) )
431e4: 2002 movel %d2,%d0 431e6: 0280 0000 f000 andil #61440,%d0
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
431ec: 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) ) )
431f0: 4a80 tstl %d0
431f2: 6618 bnes 4320c <mknod+0x34> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
431f4: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 431fa: 7216 moveq #22,%d1 <== NOT EXECUTED 431fc: 2040 moveal %d0,%a0 <== NOT EXECUTED 431fe: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43200: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 <== 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 );
43206: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43208: 4e5e unlk %fp <== NOT EXECUTED 4320a: 4e75 rts <== NOT EXECUTED
int result;
if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
rtems_set_errno_and_return_minus_one( EINVAL );
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
4320c: 260e movel %fp,%d3 4320e: 0683 ffff ffe4 addil #-28,%d3 43214: 2f03 movel %d3,%sp@- 43216: 486e fffc pea %fp@(-4) 4321a: 2f04 movel %d4,%sp@- 4321c: 4eb9 0004 3c68 jsr 43c68 <rtems_filesystem_get_start_loc>
result = (*temp_loc.ops->evalformake_h)(
43222: 486e fff8 pea %fp@(-8) 43226: d8ae fffc addl %fp@(-4),%d4 4322a: 2f03 movel %d3,%sp@- 4322c: 206e fff0 moveal %fp@(-16),%a0 43230: 2f04 movel %d4,%sp@- 43232: 2068 0004 moveal %a0@(4),%a0 43236: 4e90 jsr %a0@
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
43238: 4fef 0018 lea %sp@(24),%sp 4323c: 4a80 tstl %d0
4323e: 670c beqs 4324c <mknod+0x74>
return -1;
43240: 70ff moveq #-1,%d0
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
rtems_filesystem_freenode( &temp_loc );
return result;
}
43242: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4 43248: 4e5e unlk %fp 4324a: 4e75 rts
&name_start
);
if ( result != 0 )
return -1;
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
4324c: 2f03 movel %d3,%sp@- 4324e: 2f2e 0014 movel %fp@(20),%sp@- 43252: 2f2e 0010 movel %fp@(16),%sp@- 43256: 206e fff0 moveal %fp@(-16),%a0 4325a: 2f02 movel %d2,%sp@- 4325c: 2f2e fff8 movel %fp@(-8),%sp@- 43260: 2068 0014 moveal %a0@(20),%a0 43264: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
43266: 2f03 movel %d3,%sp@- 43268: 2d40 ffe0 movel %d0,%fp@(-32) 4326c: 4eb9 0004 2da4 jsr 42da4 <rtems_filesystem_freenode>
return result;
43272: 202e ffe0 movel %fp@(-32),%d0 43276: 4fef 0018 lea %sp@(24),%sp
}
4327a: 4cee 001c ffd4 moveml %fp@(-44),%d2-%d4
43280: 4e5e unlk %fp <== NOT EXECUTED
00043318 <mount>:
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
43318: 7001 moveq #1,%d0
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
4331a: 4e56 ffbc linkw %fp,#-68 4331e: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43322: 242e 0008 movel %fp@(8),%d2 43326: 262e 000c movel %fp@(12),%d3 4332a: 2e2e 0010 movel %fp@(16),%d7 4332e: 2c2e 0014 movel %fp@(20),%d6
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
43332: b086 cmpl %d6,%d0 43334: 6500 027c bcsw 435b2 <mount+0x29a>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
43338: 2f07 movel %d7,%sp@- 4333a: 4eb9 0004 b550 jsr 4b550 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
43340: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
43342: 2640 moveal %d0,%a3
if ( !mount_h )
43344: 4a80 tstl %d0 43346: 6700 026a beqw 435b2 <mount+0x29a>
{
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;
4334a: 4a83 tstl %d3 4334c: 56c5 sne %d5 4334e: 4485 negl %d5
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
43350: 4a05 tstb %d5 43352: 6700 0230 beqw 43584 <mount+0x26c>
* 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(
43356: 2f03 movel %d3,%sp@- 43358: 45f9 0004 fe4c lea 4fe4c <strlen>,%a2 4335e: 2d43 ffe4 movel %d3,%fp@(-28) 43362: 4e92 jsr %a2@ 43364: 588f addql #4,%sp 43366: 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;
4336a: 2f07 movel %d7,%sp@- 4336c: 4e92 jsr %a2@ 4336e: 588f addql #4,%sp 43370: 2800 movel %d0,%d4 43372: 5284 addql #1,%d4
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
43374: 4a82 tstl %d2 43376: 6700 0234 beqw 435ac <mount+0x294> 4337a: 2f02 movel %d2,%sp@- 4337c: 4eb9 0004 fe4c jsr 4fe4c <strlen> 43382: 588f addql #4,%sp 43384: 2a40 moveal %d0,%a5 43386: 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;
43388: 226e ffe8 moveal %fp@(-24),%a1 4338c: 41f1 4875 lea %a1@(00000075,%d4:l),%a0
rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size );
43390: 4870 d800 pea %a0@(00000000,%a5:l) 43394: 4878 0001 pea 1 <ADD> 43398: 4eb9 0004 292c jsr 4292c <calloc>
if ( mt_entry != NULL ) {
4339e: 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 );
433a0: 2440 moveal %d0,%a2
if ( mt_entry != NULL ) {
433a2: 4a80 tstl %d0 433a4: 6700 01c6 beqw 4356c <mount+0x254>
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
433a8: 2f07 movel %d7,%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 );
433aa: 2e00 movel %d0,%d7 433ac: 0687 0000 0074 addil #116,%d7
strcpy( str, filesystemtype );
433b2: 49f9 0004 f9a0 lea 4f9a0 <strcpy>,%a4
mt_entry->type = str;
str += filesystemtype_size;
433b8: d887 addl %d7,%d4
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 );
433ba: 2f07 movel %d7,%sp@- 433bc: 4e94 jsr %a4@
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
433be: 508f addql #8,%sp
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
433c0: 2547 006c movel %d7,%a2@(108)
str += filesystemtype_size;
if ( source_or_null != NULL ) {
433c4: 4a82 tstl %d2
433c6: 670e beqs 433d6 <mount+0xbe>
strcpy( str, source_or_null );
433c8: 2f02 movel %d2,%sp@- 433ca: 2f04 movel %d4,%sp@- 433cc: 4e94 jsr %a4@
mt_entry->dev = str;
str += source_size;
433ce: 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;
433d0: 2544 0070 movel %d4,%a2@(112)
str += source_size;
433d4: d88d addl %a5,%d4
}
strcpy( str, target );
433d6: 2f2e ffe4 movel %fp@(-28),%sp@- 433da: 2f04 movel %d4,%sp@- 433dc: 4e94 jsr %a4@
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
433de: 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;
433e0: 7005 moveq #5,%d0 433e2: 223c 0000 0080 movel #128,%d1 433e8: 307c 0400 moveaw #1024,%a0 433ec: 2540 0038 movel %d0,%a2@(56) 433f0: 103c 0007 moveb #7,%d0 433f4: 2541 003c movel %d1,%a2@(60) 433f8: 0681 0000 007f addil #127,%d1 433fe: 2540 0040 movel %d0,%a2@(64) 43402: 103c 0001 moveb #1,%d0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
43406: 2544 0068 movel %d4,%a2@(104)
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
mt_entry->mt_fs_root.mt_entry = mt_entry;
4340a: 254a 002c movel %a2,%a2@(44)
mt_entry->options = options;
4340e: 2546 0030 movel %d6,%a2@(48)
mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf;
43412: 2541 0044 movel %d1,%a2@(68) 43416: 2541 0048 movel %d1,%a2@(72) 4341a: 2548 004c movel %a0,%a2@(76) 4341e: 42aa 0050 clrl %a2@(80) 43422: 42aa 0054 clrl %a2@(84) 43426: 2540 0058 movel %d0,%a2@(88) 4342a: 42aa 005c clrl %a2@(92) 4342e: 42aa 0060 clrl %a2@(96) 43432: 42aa 0064 clrl %a2@(100)
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
43436: 4a05 tstb %d5 43438: 6600 0092 bnew 434cc <mount+0x1b4>
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
4343c: 203c 0005 e374 movel #385908,%d0 43442: b0b9 0005 e370 cmpl 5e370 <mount_chain>,%d0 43448: 6600 0180 bnew 435ca <mount+0x2b2>
)
{
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;
4344c: 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 ) ) {
4344e: 2f2e 0018 movel %fp@(24),%sp@- 43452: 2f0a movel %a2,%sp@- 43454: 4e93 jsr %a3@ 43456: 508f addql #8,%sp 43458: 4a80 tstl %d0 4345a: 6600 0190 bnew 435ec <mount+0x2d4>
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 );
4345e: 42a7 clrl %sp@- 43460: 42a7 clrl %sp@- 43462: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 43468: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain> 4346e: 2f0a movel %a2,%sp@- 43470: 4879 0005 e370 pea 5e370 <mount_chain> 43476: 4eb9 0004 7098 jsr 47098 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4347c: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 43482: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
43488: 4fef 0018 lea %sp@(24),%sp 4348c: 4a05 tstb %d5
4348e: 6630 bnes 434c0 <mount+0x1a8>
rtems_filesystem_root = mt_entry->mt_fs_root;
43490: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0
return 0;
43496: 4280 clrl %d0
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
43498: 216a 001c 0018 movel %a2@(28),%a0@(24) 4349e: 216a 0020 001c movel %a2@(32),%a0@(28) 434a4: 216a 0024 0020 movel %a2@(36),%a0@(32) 434aa: 216a 0028 0024 movel %a2@(40),%a0@(36) 434b0: 216a 002c 0028 movel %a2@(44),%a0@(40)
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
434b6: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 434bc: 4e5e unlk %fp 434be: 4e75 rts
rtems_libio_unlock();
if ( !has_target )
rtems_filesystem_root = mt_entry->mt_fs_root;
return 0;
434c0: 4280 clrl %d0
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
434c2: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 434c8: 4e5e unlk %fp 434ca: 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(
434cc: 4878 0001 pea 1 <ADD> 434d0: 240e movel %fp,%d2 434d2: 0682 ffff ffec addil #-20,%d2 434d8: 2f02 movel %d2,%sp@- 434da: 4878 0007 pea 7 <TRUNCDFSF> 434de: 2f2e ffe8 movel %fp@(-24),%sp@- 434e2: 2f03 movel %d3,%sp@- 434e4: 4eb9 0004 2c80 jsr 42c80 <rtems_filesystem_evaluate_path> 434ea: 4fef 0014 lea %sp@(20),%sp 434ee: 72ff moveq #-1,%d1 434f0: b280 cmpl %d0,%d1 434f2: 6700 00e2 beqw 435d6 <mount+0x2be>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
434f6: 206e fff8 moveal %fp@(-8),%a0 434fa: 2f02 movel %d2,%sp@- 434fc: 2068 0010 moveal %a0@(16),%a0 43500: 4e90 jsr %a0@ 43502: 588f addql #4,%sp 43504: 7201 moveq #1,%d1 43506: b280 cmpl %d0,%d1 43508: 6600 010a bnew 43614 <mount+0x2fc>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
4350c: 2f2e ffec movel %fp@(-20),%sp@- 43510: 487a fd72 pea %pc@(43284 <is_node_fs_root>) 43514: 4eb9 0004 329c jsr 4329c <rtems_filesystem_mount_iterate> 4351a: 508f addql #8,%sp 4351c: 4a00 tstb %d0 4351e: 6600 010e bnew 4362e <mount+0x316>
* 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;
43522: 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;
43526: 256e ffec 0008 movel %fp@(-20),%a2@(8)
mt_entry->mt_point_node.handlers = loc.handlers;
4352c: 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;
43532: 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( mt_entry ) ) {
43538: 2f0a movel %a2,%sp@- 4353a: 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;
4353e: 2548 0014 movel %a0,%a2@(20)
/*
* This link to the parent is only done when we are dealing with system
* below the base file system
*/
if ( loc.ops->mount_h( mt_entry ) ) {
43542: 4e91 jsr %a1@ 43544: 588f addql #4,%sp 43546: 4a80 tstl %d0 43548: 6700 ff04 beqw 4344e <mount+0x136>
return 0;
cleanup_and_bail:
free( mt_entry );
4354c: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4354e: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED 43554: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
43556: 2f02 movel %d2,%sp@- 43558: 4eb9 0004 2da4 jsr 42da4 <rtems_filesystem_freenode> 4355e: 588f addql #4,%sp
return -1;
43560: 70ff moveq #-1,%d0
}
43562: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 43568: 4e5e unlk %fp 4356a: 4e75 rts
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
4356c: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 43572: 780c moveq #12,%d4 <== NOT EXECUTED 43574: 2040 moveal %d0,%a0 <== NOT EXECUTED 43576: 70ff moveq #-1,%d0 <== NOT EXECUTED 43578: 2084 movel %d4,%a0@ <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
4357a: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43580: 4e5e unlk %fp <== NOT EXECUTED 43582: 4e75 rts <== NOT EXECUTED
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
43584: 307c 0001 moveaw #1,%a0 43588: 43f9 0005 ceb0 lea 5ceb0 <IMFS_ops+0x48>,%a1 4358e: 45f9 0004 fe4c lea 4fe4c <strlen>,%a2
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
43594: 2f07 movel %d7,%sp@-
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
43596: 2d48 ffe8 movel %a0,%fp@(-24) 4359a: 2d49 ffe4 movel %a1,%fp@(-28)
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
4359e: 4e92 jsr %a2@ 435a0: 588f addql #4,%sp 435a2: 2800 movel %d0,%d4 435a4: 5284 addql #1,%d4
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
435a6: 4a82 tstl %d2 435a8: 6600 fdd0 bnew 4337a <mount+0x62> 435ac: 9bcd subal %a5,%a5 435ae: 6000 fdd8 braw 43388 <mount+0x70>
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
if ( !mount_h )
rtems_set_errno_and_return_minus_one( EINVAL );
435b2: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 435b8: 7a16 moveq #22,%d5 435ba: 2040 moveal %d0,%a0 435bc: 70ff moveq #-1,%d0 435be: 2085 movel %d5,%a0@
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
}
435c0: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 435c6: 4e5e unlk %fp 435c8: 4e75 rts
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
errno = EINVAL;
435ca: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 435d0: 2040 moveal %d0,%a0 <== NOT EXECUTED 435d2: 7016 moveq #22,%d0 <== NOT EXECUTED 435d4: 2080 movel %d0,%a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
435d6: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435d8: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED 435de: 588f addql #4,%sp <== NOT EXECUTED
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
return -1;
435e0: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
435e2: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 435e8: 4e5e unlk %fp <== NOT EXECUTED 435ea: 4e75 rts <== NOT EXECUTED
if ( (*mount_h)( mt_entry, data ) ) {
/*
* Try to undo the mount operation
*/
loc.ops->unmount_h( mt_entry );
435ec: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 435f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 435f2: 2068 0028 moveal %a0@(40),%a0 <== NOT EXECUTED 435f6: 4e90 jsr %a0@ <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
435f8: 2e8a movel %a2,%sp@ <== NOT EXECUTED 435fa: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
if ( loc_to_free )
43600: 588f addql #4,%sp <== NOT EXECUTED 43602: 4a82 tstl %d2 <== NOT EXECUTED 43604: 6600 ff50 bnew 43556 <mount+0x23e> <== NOT EXECUTED
rtems_filesystem_freenode( loc_to_free );
return -1;
43608: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
4360a: 4cee 3cfc ffbc moveml %fp@(-68),%d2-%d7/%a2-%a5 <== NOT EXECUTED 43610: 4e5e unlk %fp <== NOT EXECUTED 43612: 4e75 rts <== NOT EXECUTED
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
errno = ENOTDIR;
43614: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4361a: 7614 moveq #20,%d3 4361c: 2040 moveal %d0,%a0 4361e: 2083 movel %d3,%a0@
return 0;
cleanup_and_bail:
free( mt_entry );
43620: 2f0a movel %a2,%sp@- 43622: 4eb9 0004 2db8 jsr 42db8 <free> 43628: 588f addql #4,%sp 4362a: 6000 ff2a braw 43556 <mount+0x23e>
/*
* 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;
4362e: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 43634: 7210 moveq #16,%d1 43636: 2240 moveal %d0,%a1 43638: 2281 movel %d1,%a1@
return 0;
cleanup_and_bail:
free( mt_entry );
4363a: 2f0a movel %a2,%sp@- 4363c: 4eb9 0004 2db8 jsr 42db8 <free> 43642: 588f addql #4,%sp 43644: 6000 ff10 braw 43556 <mount+0x23e>
00043a5c <mount_and_make_target_path>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
43a5c: 4e56 ffec linkw %fp,#-20 43a60: 48d7 007c moveml %d2-%d6,%sp@ 43a64: 262e 0008 movel %fp@(8),%d3 43a68: 242e 000c movel %fp@(12),%d2 43a6c: 282e 0010 movel %fp@(16),%d4 43a70: 2a2e 0014 movel %fp@(20),%d5 43a74: 2c2e 0018 movel %fp@(24),%d6
int rv = -1;
if (target != NULL) {
43a78: 4a82 tstl %d2
43a7a: 673e beqs 43aba <mount_and_make_target_path+0x5e>
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
43a7c: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 43a80: 2f02 movel %d2,%sp@- 43a82: 4eb9 0004 44b8 jsr 444b8 <rtems_mkdir>
if (rv == 0) {
43a88: 508f addql #8,%sp 43a8a: 4a80 tstl %d0
43a8c: 670a beqs 43a98 <mount_and_make_target_path+0x3c><== ALWAYS TAKEN
} else {
errno = EINVAL;
}
return rv;
}
43a8e: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 <== NOT EXECUTED 43a94: 4e5e unlk %fp <== NOT EXECUTED 43a96: 4e75 rts <== NOT EXECUTED
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
43a98: 2d46 0018 movel %d6,%fp@(24) 43a9c: 2d45 0014 movel %d5,%fp@(20) 43aa0: 2d44 0010 movel %d4,%fp@(16) 43aa4: 2d42 000c movel %d2,%fp@(12) 43aa8: 2d43 0008 movel %d3,%fp@(8)
} else {
errno = EINVAL;
}
return rv;
}
43aac: 4cee 007c ffec moveml %fp@(-20),%d2-%d6 43ab2: 4e5e unlk %fp
int rv = -1;
if (target != NULL) {
rv = rtems_mkdir(target, S_IRWXU | S_IRWXG | S_IRWXO);
if (rv == 0) {
rv = mount(
43ab4: 4ef9 0004 3b68 jmp 43b68 <mount>
options,
data
);
}
} else {
errno = EINVAL;
43aba: 4eb9 0004 f1ac jsr 4f1ac <__errno> 43ac0: 7216 moveq #22,%d1 43ac2: 2040 moveal %d0,%a0
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
int rv = -1;
43ac4: 70ff moveq #-1,%d0
} else {
errno = EINVAL;
}
return rv;
}
43ac6: 4cee 007c ffec moveml %fp@(-20),%d2-%d6
options,
data
);
}
} else {
errno = EINVAL;
43acc: 2081 movel %d1,%a0@
}
return rv;
}
43ace: 4e5e unlk %fp
...
0004c7a4 <mq_unlink>:
*/
int mq_unlink(
const char *name
)
{
4c7a4: 4e56 fffc linkw %fp,#-4 4c7a8: 2039 0006 9838 movel 69838 <_Thread_Dispatch_disable_level>,%d0 4c7ae: 5280 addql #1,%d0 4c7b0: 2f0a movel %a2,%sp@- 4c7b2: 2f02 movel %d2,%sp@- 4c7b4: 23c0 0006 9838 movel %d0,69838 <_Thread_Dispatch_disable_level>
register POSIX_Message_queue_Control *the_mq;
Objects_Id the_mq_id;
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
4c7ba: 486e fffc pea %fp@(-4) 4c7be: 2f2e 0008 movel %fp@(8),%sp@- 4c7c2: 4eb9 0005 3438 jsr 53438 <_POSIX_Message_queue_Name_to_id>
if ( status != 0 ) {
4c7c8: 508f addql #8,%sp
register POSIX_Message_queue_Control *the_mq;
Objects_Id the_mq_id;
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
4c7ca: 2400 movel %d0,%d2
if ( status != 0 ) {
4c7cc: 6644 bnes 4c812 <mq_unlink+0x6e> <== NEVER TAKEN
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
4c7ce: 4280 clrl %d0
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
}
the_mq = (POSIX_Message_queue_Control *) _Objects_Get_local_object(
4c7d0: 2079 0006 9b00 moveal 69b00 <_POSIX_Message_queue_Information+0x18>,%a0 4c7d6: 302e fffe movew %fp@(-2),%d0 4c7da: 2470 0c00 moveal %a0@(00000000,%d0:l:4),%a2
&_POSIX_Message_queue_Information,
_Objects_Get_index( the_mq_id )
);
the_mq->linked = false;
4c7de: 4200 clrb %d0 4c7e0: 1540 0015 moveb %d0,%a2@(21)
RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
POSIX_Message_queue_Control *the_mq
)
{
_Objects_Namespace_remove(
4c7e4: 2f0a movel %a2,%sp@- 4c7e6: 4879 0006 9ae8 pea 69ae8 <_POSIX_Message_queue_Information> 4c7ec: 4eb9 0004 f9c8 jsr 4f9c8 <_Objects_Namespace_remove>
_POSIX_Message_queue_Namespace_remove( the_mq ); _POSIX_Message_queue_Delete( the_mq );
4c7f2: 2f0a movel %a2,%sp@- 4c7f4: 4eb9 0004 bfd8 jsr 4bfd8 <_POSIX_Message_queue_Delete>
_Thread_Enable_dispatch();
4c7fa: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
return 0; }
4c800: 242e fff4 movel %fp@(-12),%d2
the_mq->linked = false;
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
_Thread_Enable_dispatch();
return 0;
4c804: 4fef 000c lea %sp@(12),%sp 4c808: 4280 clrl %d0
}
4c80a: 246e fff8 moveal %fp@(-8),%a2 4c80e: 4e5e unlk %fp 4c810: 4e75 rts
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
4c812: 4eb9 0005 015e jsr 5015e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( status );
4c818: 4eb9 0005 6a7c jsr 56a7c <__errno>
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
_Thread_Enable_dispatch();
return 0;
}
4c81e: 246e fff8 moveal %fp@(-8),%a2
_Thread_Disable_dispatch();
status = _POSIX_Message_queue_Name_to_id( name, &the_mq_id );
if ( status != 0 ) {
_Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( status );
4c822: 2040 moveal %d0,%a0 4c824: 70ff moveq #-1,%d0 4c826: 2082 movel %d2,%a0@
_POSIX_Message_queue_Namespace_remove( the_mq );
_POSIX_Message_queue_Delete( the_mq );
_Thread_Enable_dispatch();
return 0;
}
4c828: 242e fff4 movel %fp@(-12),%d2
4c82c: 4e5e unlk %fp <== NOT EXECUTED
000438ec <newlib_delete_hook>:
void newlib_delete_hook(
rtems_tcb *current_task,
rtems_tcb *deleted_task
)
{
438ec: 4e56 fff4 linkw %fp,#-12 438f0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 438f4: 262e 0008 movel %fp@(8),%d3 438f8: 246e 000c moveal %fp@(12),%a2
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
438fc: b5c3 cmpal %d3,%a2
438fe: 674c beqs 4394c <newlib_delete_hook+0x60>
ptr = _REENT;
} else {
ptr = deleted_task->libc_reent;
43900: 242a 0106 movel %a2@(262),%d2
}
if (ptr && ptr != _global_impure_ptr) {
43904: 4a82 tstl %d2
43906: 6722 beqs 4392a <newlib_delete_hook+0x3e> <== NEVER TAKEN
43908: b4b9 0005 da66 cmpl 5da66 <_global_impure_ptr>,%d2
4390e: 671a beqs 4392a <newlib_delete_hook+0x3e>
_reclaim_reent(ptr);
*/
/*
* Just in case there are some buffers lying around.
*/
_fwalk(ptr, newlib_free_buffers);
43910: 4879 0004 36d4 pea 436d4 <newlib_free_buffers> 43916: 2f02 movel %d2,%sp@- 43918: 4eb9 0004 f1a8 jsr 4f1a8 <_fwalk>
#if REENT_MALLOCED
free(ptr);
#else
_Workspace_Free(ptr);
4391e: 2f02 movel %d2,%sp@- 43920: 4eb9 0004 9d9e jsr 49d9e <_Workspace_Free> 43926: 4fef 000c lea %sp@(12),%sp
#endif
}
deleted_task->libc_reent = NULL;
4392a: 42aa 0106 clrl %a2@(262)
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
4392e: b5c3 cmpal %d3,%a2
43930: 670a beqs 4393c <newlib_delete_hook+0x50>
_REENT = 0;
}
}
43932: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43938: 4e5e unlk %fp 4393a: 4e75 rts
/*
* Require the switch back to another task to install its own
*/
if ( current_task == deleted_task ) {
_REENT = 0;
4393c: 42b9 0005 e454 clrl 5e454 <_impure_ptr>
} }
43942: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 43948: 4e5e unlk %fp 4394a: 4e75 rts
/*
* The reentrancy structure was allocated by newlib using malloc()
*/
if (current_task == deleted_task) {
ptr = _REENT;
4394c: 2439 0005 e454 movel 5e454 <_impure_ptr>,%d2 43952: 60b0 bras 43904 <newlib_delete_hook+0x18>
000436d4 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
436d4: 4e56 0000 linkw %fp,#0 436d8: 2f0a movel %a2,%sp@- 436da: 246e 0008 moveal %fp@(8),%a2
switch ( fileno(fp) ) {
436de: 2f0a movel %a2,%sp@- 436e0: 4eb9 0004 ed94 jsr 4ed94 <fileno> 436e6: 588f addql #4,%sp 436e8: 7202 moveq #2,%d1 436ea: b280 cmpl %d0,%d1
436ec: 6414 bccs 43702 <newlib_free_buffers+0x2e> <== ALWAYS TAKEN
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
}
break;
default:
fclose(fp);
436ee: 2f0a movel %a2,%sp@- <== NOT EXECUTED 436f0: 4eb9 0004 eb42 jsr 4eb42 <fclose> <== NOT EXECUTED 436f6: 588f addql #4,%sp <== NOT EXECUTED
} return 0; }
436f8: 246e fffc moveal %fp@(-4),%a2 436fc: 4280 clrl %d0 436fe: 4e5e unlk %fp 43700: 4e75 rts
{
switch ( fileno(fp) ) {
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
43702: 302a 000c movew %a2@(12),%d0 43706: 48c0 extl %d0 43708: 4a00 tstb %d0
4370a: 6cec bges 436f8 <newlib_free_buffers+0x24> <== ALWAYS TAKEN
free( fp->_bf._base );
4370c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 43710: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43716: 588f addql #4,%sp <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43718: 302a 000c movew %a2@(12),%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
4371c: 4292 clrl %a2@ <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
4371e: 0880 0007 bclr #7,%d0 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
43722: 42aa 0010 clrl %a2@(16) <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
43726: 3540 000c movew %d0,%a2@(12) <== NOT EXECUTED
break;
default:
fclose(fp);
}
return 0;
}
4372a: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4372e: 4280 clrl %d0 <== NOT EXECUTED 43730: 4e5e unlk %fp <== NOT EXECUTED
000433f8 <null_initialize>:
rtems_device_driver null_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *pargp __attribute__((unused))
)
{
433f8: 4e56 0000 linkw %fp,#0 433fc: 2f02 movel %d2,%sp@- 433fe: 242e 0008 movel %fp@(8),%d2
rtems_device_driver status;
if ( !initialized ) {
43402: 4a39 0006 0c6c tstb 60c6c <initialized>
43408: 670a beqs 43414 <null_initialize+0x1c>
NULL_major = major;
}
return RTEMS_SUCCESSFUL;
}
4340a: 242e fffc movel %fp@(-4),%d2 4340e: 4280 clrl %d0 43410: 4e5e unlk %fp 43412: 4e75 rts
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
status = rtems_io_register_name(
43414: 42a7 clrl %sp@-
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
43416: 7001 moveq #1,%d0
status = rtems_io_register_name(
43418: 2f02 movel %d2,%sp@- 4341a: 4879 0005 e5c0 pea 5e5c0 <_rodata_start+0x780>
)
{
rtems_device_driver status;
if ( !initialized ) {
initialized = 1;
43420: 13c0 0006 0c6c moveb %d0,60c6c <initialized>
status = rtems_io_register_name(
43426: 4eb9 0004 3ad8 jsr 43ad8 <rtems_io_register_name>
"/dev/null",
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
4342c: 4fef 000c lea %sp@(12),%sp 43430: 4a80 tstl %d0
43432: 6610 bnes 43444 <null_initialize+0x4c> <== NEVER TAKEN
rtems_fatal_error_occurred(status);
NULL_major = major;
43434: 23c2 0006 146c movel %d2,6146c <NULL_major>
}
return RTEMS_SUCCESSFUL;
}
4343a: 242e fffc movel %fp@(-4),%d2 4343e: 4280 clrl %d0 43440: 4e5e unlk %fp 43442: 4e75 rts
major,
(rtems_device_minor_number) 0
);
if (status != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(status);
43444: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43446: 4eb9 0004 80a4 jsr 480a4 <rtems_fatal_error_occurred> <== NOT EXECUTED
0004346a <null_write>:
rtems_device_driver null_write(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void *pargp
)
{
4346a: 4e56 0000 linkw %fp,#0 4346e: 206e 0010 moveal %fp@(16),%a0
rtems_libio_rw_args_t *rw_args = (rtems_libio_rw_args_t *) pargp;
if ( rw_args )
43472: 4a88 tstl %a0
43474: 6706 beqs 4347c <null_write+0x12> <== ALWAYS TAKEN
rw_args->bytes_moved = rw_args->count;
43476: 2168 0010 0018 movel %a0@(16),%a0@(24) <== NOT EXECUTED
return NULL_SUCCESSFUL;
}
4347c: 4280 clrl %d0
4347e: 4e5e unlk %fp <== NOT EXECUTED
000439c8 <open>:
int open(
const char *pathname,
int flags,
...
)
{
439c8: 4e56 ffcc linkw %fp,#-52 439cc: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 439d0: 242e 000c movel %fp@(12),%d2
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
439d4: 2002 movel %d2,%d0 439d6: 5280 addql #1,%d0
int open(
const char *pathname,
int flags,
...
)
{
439d8: 262e 0008 movel %fp@(8),%d3
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; if ( ( status & _FREAD ) == _FREAD )
439dc: 0800 0000 btst #0,%d0 439e0: 6700 00cc beqw 43aae <open+0xe6>
eval_flags |= RTEMS_LIBIO_PERMS_READ;
439e4: 7804 moveq #4,%d4
if ( ( status & _FWRITE ) == _FWRITE )
439e6: 0800 0001 btst #1,%d0
439ea: 6704 beqs 439f0 <open+0x28>
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
439ec: 7002 moveq #2,%d0 439ee: 8880 orl %d0,%d4
va_start(ap, flags);
mode = va_arg( ap, int );
439f0: 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();
439f4: 4eb9 0004 b216 jsr 4b216 <rtems_libio_allocate> 439fa: 2440 moveal %d0,%a2
if ( iop == 0 ) {
439fc: 4a80 tstl %d0 439fe: 6700 00b4 beqw 43ab4 <open+0xec>
}
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
43a02: 2f03 movel %d3,%sp@- 43a04: 4bf9 0004 fe4c lea 4fe4c <strlen>,%a5 43a0a: 4e95 jsr %a5@ 43a0c: 47ee ffec lea %fp@(-20),%a3 43a10: 7201 moveq #1,%d1 43a12: 49f9 0004 2c80 lea 42c80 <rtems_filesystem_evaluate_path>,%a4 43a18: 2e81 movel %d1,%sp@ 43a1a: 2f0b movel %a3,%sp@- 43a1c: 2f04 movel %d4,%sp@- 43a1e: 2f00 movel %d0,%sp@- 43a20: 2f03 movel %d3,%sp@- 43a22: 4e94 jsr %a4@
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
43a24: 4fef 0014 lea %sp@(20),%sp 43a28: 72ff moveq #-1,%d1 43a2a: b280 cmpl %d0,%d1 43a2c: 6700 0162 beqw 43b90 <open+0x1c8>
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
43a30: 2002 movel %d2,%d0 43a32: 0280 0000 0a00 andil #2560,%d0 43a38: 0c80 0000 0a00 cmpil #2560,%d0 43a3e: 6700 0090 beqw 43ad0 <open+0x108>
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
43a42: 282a 0014 movel %a2@(20),%d4 43a46: 2f02 movel %d2,%sp@- 43a48: 4eb9 0004 b188 jsr 4b188 <rtems_libio_fcntl_flags>
iop->pathinfo = loc;
43a4e: 256e fff4 0020 movel %fp@(-12),%a2@(32) 43a54: 256e fff0 001c movel %fp@(-16),%a2@(28) 43a5a: 256e fff8 0024 movel %fp@(-8),%a2@(36) 43a60: 256e fffc 0028 movel %fp@(-4),%a2@(40) 43a66: 2553 0018 movel %a3@,%a2@(24)
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43a6a: 206a 0020 moveal %a2@(32),%a0
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->flags |= rtems_libio_fcntl_flags( flags );
43a6e: 8084 orl %d4,%d0 43a70: 2540 0014 movel %d0,%a2@(20)
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
43a74: 2f05 movel %d5,%sp@- 43a76: 2f02 movel %d2,%sp@- 43a78: 2f03 movel %d3,%sp@- 43a7a: 2f0a movel %a2,%sp@- 43a7c: 2050 moveal %a0@,%a0 43a7e: 4e90 jsr %a0@
if ( rc ) {
43a80: 4fef 0014 lea %sp@(20),%sp 43a84: 4a80 tstl %d0 43a86: 6600 00f4 bnew 43b7c <open+0x1b4>
}
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
43a8a: 0802 000a btst #10,%d2
43a8e: 6670 bnes 43b00 <open+0x138>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43a90: 200a movel %a2,%d0 43a92: 90b9 0005 f984 subl 5f984 <rtems_libio_iops>,%d0 43a98: 223c b6db 6db7 movel #-1227133513,%d1 43a9e: e680 asrl #3,%d0 43aa0: 4c01 0800 mulsl %d1,%d0
}
43aa4: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43aaa: 4e5e unlk %fp 43aac: 4e75 rts
int eval_flags;
/*
* Set the Evaluation flags
*/
eval_flags = 0;
43aae: 4284 clrl %d4 43ab0: 6000 ff34 braw 439e6 <open+0x1e>
*/
/* allocate a file control block */
iop = rtems_libio_allocate();
if ( iop == 0 ) {
rc = ENFILE;
43ab4: 7417 moveq #23,%d2 43ab6: 283c 0004 e9f4 movel #322036,%d4
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 );
43abc: 2044 moveal %d4,%a0 43abe: 4e90 jsr %a0@ 43ac0: 2040 moveal %d0,%a0 43ac2: 70ff moveq #-1,%d0 43ac4: 2082 movel %d2,%a0@
}
return iop - rtems_libio_iops;
}
43ac6: 4cee 3c3c ffcc moveml %fp@(-52),%d2-%d5/%a2-%a5 43acc: 4e5e unlk %fp 43ace: 4e75 rts
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
/* We were trying to create a file that already exists */
rc = EEXIST;
43ad0: 7411 moveq #17,%d2 43ad2: 283c 0004 e9f4 movel #322036,%d4
*/
done:
va_end(ap);
if ( rc ) {
if ( iop )
43ad8: 4a8a tstl %a2
43ada: 670a beqs 43ae6 <open+0x11e>
rtems_libio_free( iop );
43adc: 2f0a movel %a2,%sp@- 43ade: 4eb9 0004 b2da jsr 4b2da <rtems_libio_free> 43ae4: 588f addql #4,%sp
if ( loc_to_free )
43ae6: 4a8b tstl %a3
43ae8: 67d2 beqs 43abc <open+0xf4>
rtems_filesystem_freenode( loc_to_free );
43aea: 2f0b movel %a3,%sp@- 43aec: 4eb9 0004 2da4 jsr 42da4 <rtems_filesystem_freenode> 43af2: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( rc );
43af4: 2044 moveal %d4,%a0 43af6: 4e90 jsr %a0@ 43af8: 2040 moveal %d0,%a0 43afa: 70ff moveq #-1,%d0 43afc: 2082 movel %d2,%a0@ 43afe: 60c6 bras 43ac6 <open+0xfe>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43b00: 200a movel %a2,%d0 43b02: 90b9 0005 f984 subl 5f984 <rtems_libio_iops>,%d0 43b08: 223c b6db 6db7 movel #-1227133513,%d1 43b0e: e680 asrl #3,%d0 43b10: 4c00 1800 mulsl %d0,%d1 43b14: 42a7 clrl %sp@- 43b16: 42a7 clrl %sp@- 43b18: 2f01 movel %d1,%sp@- 43b1a: 4eb9 0004 b094 jsr 4b094 <ftruncate>
if ( rc ) {
43b20: 4fef 000c lea %sp@(12),%sp
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
43b24: 2400 movel %d0,%d2
if ( rc ) {
43b26: 6700 ff68 beqw 43a90 <open+0xc8>
if(errno) rc = errno;
43b2a: 283c 0004 e9f4 movel #322036,%d4 43b30: 2044 moveal %d4,%a0 43b32: 4e90 jsr %a0@ 43b34: 2040 moveal %d0,%a0 43b36: 4a90 tstl %a0@ 43b38: 6600 0086 bnew 43bc0 <open+0x1f8>
close( iop - rtems_libio_iops );
43b3c: 200a movel %a2,%d0 <== NOT EXECUTED 43b3e: 90b9 0005 f984 subl 5f984 <rtems_libio_iops>,%d0 <== NOT EXECUTED 43b44: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED 43b4a: e680 asrl #3,%d0 <== NOT EXECUTED 43b4c: 4c00 1800 mulsl %d0,%d1 <== NOT EXECUTED
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
43b50: 97cb subal %a3,%a3 <== NOT EXECUTED
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
43b52: 95ca subal %a2,%a2 <== NOT EXECUTED
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
43b54: 2f01 movel %d1,%sp@- <== NOT EXECUTED 43b56: 4eb9 0004 b00c jsr 4b00c <close> <== NOT EXECUTED 43b5c: 588f addql #4,%sp <== NOT EXECUTED
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43b5e: 4a82 tstl %d2 43b60: 6600 ff76 bnew 43ad8 <open+0x110>
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
43b64: 200a movel %a2,%d0 <== NOT EXECUTED 43b66: 90b9 0005 f984 subl 5f984 <rtems_libio_iops>,%d0 <== NOT EXECUTED 43b6c: 223c b6db 6db7 movel #-1227133513,%d1 <== NOT EXECUTED 43b72: e680 asrl #3,%d0 <== NOT EXECUTED 43b74: 4c01 0800 mulsl %d1,%d0 <== NOT EXECUTED 43b78: 6000 ff2a braw 43aa4 <open+0xdc> <== NOT EXECUTED
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode );
if ( rc ) {
rc = errno;
43b7c: 283c 0004 e9f4 movel #322036,%d4 43b82: 2044 moveal %d4,%a0 43b84: 4e90 jsr %a0@ 43b86: 2040 moveal %d0,%a0 43b88: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43b8a: 67d8 beqs 43b64 <open+0x19c> <== NEVER TAKEN
43b8c: 6000 ff4a braw 43ad8 <open+0x110>
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
if ( errno != ENOENT ) {
43b90: 283c 0004 e9f4 movel #322036,%d4 43b96: 2044 moveal %d4,%a0 43b98: 4e90 jsr %a0@ 43b9a: 7202 moveq #2,%d1 43b9c: 2040 moveal %d0,%a0 43b9e: b290 cmpl %a0@,%d1
43ba0: 6710 beqs 43bb2 <open+0x1ea>
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43ba2: 2044 moveal %d4,%a0
int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL;
43ba4: 97cb subal %a3,%a3
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
if ( rc ) {
rc = errno;
43ba6: 4e90 jsr %a0@ 43ba8: 2040 moveal %d0,%a0 43baa: 2410 movel %a0@,%d2
* Single exit and clean up path.
*/
done:
va_end(ap);
if ( rc ) {
43bac: 67b6 beqs 43b64 <open+0x19c> <== NEVER TAKEN
43bae: 6000 ff28 braw 43ad8 <open+0x110>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
43bb2: 0802 0009 btst #9,%d2
43bb6: 6636 bnes 43bee <open+0x226> int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL;
43bb8: 97cb subal %a3,%a3
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
rc = ENOENT;
43bba: 7402 moveq #2,%d2 43bbc: 6000 ff1a braw 43ad8 <open+0x110>
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43bc0: 2044 moveal %d4,%a0
close( iop - rtems_libio_iops );
/* those are released by close(): */
iop = 0;
loc_to_free = NULL;
43bc2: 97cb subal %a3,%a3
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43bc4: 4e90 jsr %a0@
close( iop - rtems_libio_iops );
43bc6: 223c b6db 6db7 movel #-1227133513,%d1
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43bcc: 2040 moveal %d0,%a0
close( iop - rtems_libio_iops );
43bce: 200a movel %a2,%d0 43bd0: 90b9 0005 f984 subl 5f984 <rtems_libio_iops>,%d0
/* those are released by close(): */
iop = 0;
43bd6: 95ca subal %a2,%a2
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
close( iop - rtems_libio_iops );
43bd8: e680 asrl #3,%d0 43bda: 4c00 1800 mulsl %d0,%d1
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
rc = ftruncate( iop - rtems_libio_iops, 0 );
if ( rc ) {
if(errno) rc = errno;
43bde: 2410 movel %a0@,%d2
close( iop - rtems_libio_iops );
43be0: 2f01 movel %d1,%sp@- 43be2: 4eb9 0004 b00c jsr 4b00c <close> 43be8: 588f addql #4,%sp 43bea: 6000 ff72 braw 43b5e <open+0x196>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
43bee: 42a7 clrl %sp@- 43bf0: 2005 movel %d5,%d0 43bf2: 42a7 clrl %sp@- 43bf4: 08c0 000f bset #15,%d0 43bf8: 2f00 movel %d0,%sp@- 43bfa: 2f03 movel %d3,%sp@- 43bfc: 4eb9 0004 31d8 jsr 431d8 <mknod>
if ( rc ) {
43c02: 4fef 0010 lea %sp@(16),%sp 43c06: 4a80 tstl %d0
43c08: 6698 bnes 43ba2 <open+0x1da> <== NEVER TAKEN
/*
* After we do the mknod(), we have to evaluate the path to get the
* "loc" structure needed to actually have the file itself open.
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
43c0a: 2f03 movel %d3,%sp@- 43c0c: 4e95 jsr %a5@ 43c0e: 7201 moveq #1,%d1 43c10: 2e81 movel %d1,%sp@ 43c12: 2f0b movel %a3,%sp@- 43c14: 42a7 clrl %sp@- 43c16: 2f00 movel %d0,%sp@- 43c18: 2f03 movel %d3,%sp@- 43c1a: 4e94 jsr %a4@
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
43c1c: 4fef 0014 lea %sp@(20),%sp 43c20: 4a80 tstl %d0 43c22: 6700 fe1e beqw 43a42 <open+0x7a>
int mode; int rc; rtems_libio_t *iop = 0; int status; rtems_filesystem_location_info_t loc; rtems_filesystem_location_info_t *loc_to_free = NULL;
43c26: 97cb subal %a3,%a3 <== NOT EXECUTED
* So we created it, and then we need to have "look it up."
*/
status = rtems_filesystem_evaluate_path(
pathname, strlen( pathname ), 0x0, &loc, true );
if ( status != 0 ) { /* The file did not exist */
rc = EACCES;
43c28: 740d moveq #13,%d2 <== NOT EXECUTED 43c2a: 6000 feac braw 43ad8 <open+0x110> <== NOT EXECUTED
00043954 <open_dev_console>:
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
43954: 4e56 0000 linkw %fp,#0 43958: 2f0a movel %a2,%sp@-
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
4395a: 45f9 0004 39c8 lea 439c8 <open>,%a2 43960: 42a7 clrl %sp@- 43962: 42a7 clrl %sp@- 43964: 4879 0005 cdd2 pea 5cdd2 <CSWTCH.55+0x100> 4396a: 4e92 jsr %a2@ 4396c: 4fef 000c lea %sp@(12),%sp 43970: 72ff moveq #-1,%d1 43972: b280 cmpl %d0,%d1
43974: 6730 beqs 439a6 <open_dev_console+0x52>
/*
* 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)
43976: 42a7 clrl %sp@- 43978: 4878 0001 pea 1 <ADD> 4397c: 4879 0005 cdd2 pea 5cdd2 <CSWTCH.55+0x100> 43982: 4e92 jsr %a2@ 43984: 4fef 000c lea %sp@(12),%sp 43988: 72ff moveq #-1,%d1 4398a: b280 cmpl %d0,%d1
4398c: 672c beqs 439ba <open_dev_console+0x66>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
4398e: 42a7 clrl %sp@- 43990: 4878 0001 pea 1 <ADD> 43994: 4879 0005 cdd2 pea 5cdd2 <CSWTCH.55+0x100> 4399a: 4e92 jsr %a2@ 4399c: 4fef 000c lea %sp@(12),%sp 439a0: 72ff moveq #-1,%d1 439a2: b280 cmpl %d0,%d1
439a4: 6708 beqs 439ae <open_dev_console+0x5a>
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
}
439a6: 246e fffc moveal %fp@(-4),%a2 439aa: 4e5e unlk %fp 439ac: 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 */
439ae: 2f3c 5554 4432 movel #1431585842,%sp@- 439b4: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred>
/*
* 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 */
439ba: 2f3c 5554 4431 movel #1431585841,%sp@- 439c0: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred>
...
000449e6 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
449e6: 4e56 fff0 linkw %fp,#-16 449ea: 202e 0008 movel %fp@(8),%d0 449ee: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 449f2: 246e 000c moveal %fp@(12),%a2
int i;
if (tty->termios.c_oflag & OPOST) {
449f6: 222a 0034 movel %a2@(52),%d1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
449fa: 1d40 fffe moveb %d0,%fp@(-2)
int i;
if (tty->termios.c_oflag & OPOST) {
449fe: 0801 0000 btst #0,%d1 44a02: 6700 0092 beqw 44a96 <oproc+0xb0>
switch (c) {
44a06: 7409 moveq #9,%d2 44a08: 0280 0000 00ff andil #255,%d0 44a0e: b480 cmpl %d0,%d2 44a10: 6700 0118 beqw 44b2a <oproc+0x144>
44a14: 6450 bccs 44a66 <oproc+0x80> <== NEVER TAKEN
44a16: 740a moveq #10,%d2 44a18: b480 cmpl %d0,%d2 44a1a: 6700 0092 beqw 44aae <oproc+0xc8> 44a1e: 143c 000d moveb #13,%d2 44a22: b480 cmpl %d0,%d2 44a24: 6700 00c6 beqw 44aec <oproc+0x106>
if (tty->column > 0)
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
44a28: 0801 0001 btst #1,%d1 44a2c: 6600 0138 bnew 44b66 <oproc+0x180> 44a30: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 44a36: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3
c = toupper(c);
if (!iscntrl(c))
44a3c: 1030 0801 moveb %a0@(00000001,%d0:l),%d0 44a40: 49c0 extbl %d0 44a42: 0800 0005 btst #5,%d0
44a46: 6604 bnes 44a4c <oproc+0x66> <== NEVER TAKEN
tty->column++;
44a48: 52aa 0028 addql #1,%a2@(40)
break;
}
}
rtems_termios_puts (&c, 1, tty);
44a4c: 2f0a movel %a2,%sp@- 44a4e: 4878 0001 pea 1 <ADD> 44a52: 486e fffe pea %fp@(-2) 44a56: 4e93 jsr %a3@ 44a58: 4fef 000c lea %sp@(12),%sp
}
44a5c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 44a62: 4e5e unlk %fp 44a64: 4e75 rts
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
44a66: 143c 0008 moveb #8,%d2 <== NOT EXECUTED 44a6a: b480 cmpl %d0,%d2 <== NOT EXECUTED 44a6c: 66ba bnes 44a28 <oproc+0x42> <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
44a6e: 202a 0028 movel %a2@(40),%d0 <== NOT EXECUTED 44a72: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44a78: 6fd2 bles 44a4c <oproc+0x66> <== NOT EXECUTED
tty->column--;
44a7a: 5380 subql #1,%d0 <== NOT EXECUTED 44a7c: 2540 0028 movel %d0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44a80: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a82: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44a86: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44a8a: 4e93 jsr %a3@ <== NOT EXECUTED 44a8c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44a90: 60ca bras 44a5c <oproc+0x76> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
44a92: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44a96: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44a98: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44a9c: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44aa2: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44aa6: 4e93 jsr %a3@ <== NOT EXECUTED 44aa8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44aac: 60ae bras 44a5c <oproc+0x76> <== NOT EXECUTED
int i;
if (tty->termios.c_oflag & OPOST) {
switch (c) {
case '\n':
if (tty->termios.c_oflag & ONLRET)
44aae: 0801 0005 btst #5,%d1
44ab2: 6704 beqs 44ab8 <oproc+0xd2> <== ALWAYS TAKEN
tty->column = 0;
44ab4: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
44ab8: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3
if (tty->termios.c_oflag & ONLCR) {
44abe: 44c1 movew %d1,%ccr
44ac0: 668a bnes 44a4c <oproc+0x66> <== NEVER TAKEN
rtems_termios_puts ("\r", 1, tty);
44ac2: 2f0a movel %a2,%sp@- 44ac4: 4878 0001 pea 1 <ADD> 44ac8: 4879 0005 d396 pea 5d396 <rtems_filesystem_default_pathconf+0x32> 44ace: 4e93 jsr %a3@
tty->column = 0;
44ad0: 4fef 000c lea %sp@(12),%sp 44ad4: 42aa 0028 clrl %a2@(40)
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44ad8: 2f0a movel %a2,%sp@- 44ada: 4878 0001 pea 1 <ADD> 44ade: 486e fffe pea %fp@(-2) 44ae2: 4e93 jsr %a3@ 44ae4: 4fef 000c lea %sp@(12),%sp 44ae8: 6000 ff72 braw 44a5c <oproc+0x76>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
44aec: 0801 0004 btst #4,%d1 <== NOT EXECUTED 44af0: 6708 beqs 44afa <oproc+0x114> <== NOT EXECUTED 44af2: 4aaa 0028 tstl %a2@(40) <== NOT EXECUTED 44af6: 6700 ff64 beqw 44a5c <oproc+0x76> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
44afa: 44c1 movew %d1,%ccr <== NOT EXECUTED 44afc: 6a94 bpls 44a92 <oproc+0xac> <== NOT EXECUTED 44afe: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3 <== NOT EXECUTED
c = '\n';
44b04: 700a moveq #10,%d0 <== NOT EXECUTED 44b06: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
44b0a: 0801 0005 btst #5,%d1 <== NOT EXECUTED 44b0e: 6700 ff3c beqw 44a4c <oproc+0x66> <== NOT EXECUTED
tty->column = 0;
44b12: 42aa 0028 clrl %a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44b16: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b18: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44b1c: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44b20: 4e93 jsr %a3@ <== NOT EXECUTED 44b22: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b26: 6000 ff34 braw 44a5c <oproc+0x76> <== NOT EXECUTED
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44b2a: 202a 0028 movel %a2@(40),%d0 44b2e: 7407 moveq #7,%d2 44b30: 307c 0008 moveaw #8,%a0 44b34: c480 andl %d0,%d2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44b36: 0281 0000 1800 andil #6144,%d1
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
44b3c: 91c2 subal %d2,%a0
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
44b3e: 0c81 0000 1800 cmpil #6144,%d1
44b44: 675a beqs 44ba0 <oproc+0x1ba> <== ALWAYS TAKEN
tty->column += i;
rtems_termios_puts ( " ", i, tty);
return;
}
tty->column += i;
44b46: d1c0 addal %d0,%a0 <== NOT EXECUTED 44b48: 47f9 0004 48e2 lea 448e2 <rtems_termios_puts>,%a3 <== NOT EXECUTED 44b4e: 2548 0028 movel %a0,%a2@(40) <== NOT EXECUTED
if (!iscntrl(c))
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
44b52: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44b54: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 44b58: 486e fffe pea %fp@(-2) <== NOT EXECUTED 44b5c: 4e93 jsr %a3@ <== NOT EXECUTED 44b5e: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44b62: 6000 fef8 braw 44a5c <oproc+0x76> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
c = toupper(c);
44b66: 2079 0005 e450 moveal 5e450 <__ctype_ptr__>,%a0 <== NOT EXECUTED 44b6c: 7403 moveq #3,%d2 <== NOT EXECUTED 44b6e: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 <== NOT EXECUTED 44b72: 49c1 extbl %d1 <== NOT EXECUTED 44b74: c282 andl %d2,%d1 <== NOT EXECUTED 44b76: 143c 0002 moveb #2,%d2 <== NOT EXECUTED 44b7a: b481 cmpl %d1,%d2 <== NOT EXECUTED 44b7c: 670e beqs 44b8c <oproc+0x1a6> <== NOT EXECUTED 44b7e: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44b82: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44b88: 6000 feac braw 44a36 <oproc+0x50> <== NOT EXECUTED 44b8c: 0680 ffff ffe0 addil #-32,%d0 <== NOT EXECUTED 44b92: 1d40 fffe moveb %d0,%fp@(-2) <== NOT EXECUTED 44b96: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 44b9c: 6000 fe98 braw 44a36 <oproc+0x50> <== NOT EXECUTED
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
rtems_termios_puts ( " ", i, tty);
44ba0: 2f0a movel %a2,%sp@-
break;
case '\t':
i = 8 - (tty->column & 7);
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
tty->column += i;
44ba2: d088 addl %a0,%d0 44ba4: 2540 0028 movel %d0,%a2@(40)
rtems_termios_puts ( " ", i, tty);
44ba8: 2f08 movel %a0,%sp@- 44baa: 4879 0005 d398 pea 5d398 <rtems_filesystem_default_pathconf+0x34> 44bb0: 4eb9 0004 48e2 jsr 448e2 <rtems_termios_puts>
return;
44bb6: 4fef 000c lea %sp@(12),%sp
tty->column++;
break;
}
}
rtems_termios_puts (&c, 1, tty);
}
44bba: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3
44bc0: 4e5e unlk %fp <== NOT EXECUTED
0004c3a0 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c3a0: 4e56 ffe4 linkw %fp,#-28 4c3a4: 48d7 1c00 moveml %a2-%a4,%sp@
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c3a8: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 4c3ac: 4879 0005 f1ac pea 5f1ac <_CPU_m68k_BFFFO_table+0x100>
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
4c3b2: 266e 0008 moveal %fp@(8),%a3
rtems_libio_t *iop;
int err = 0;
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
4c3b6: 4eb9 0004 dd60 jsr 4dd60 <rtems_mkdir> 4c3bc: 508f addql #8,%sp 4c3be: 4a80 tstl %d0
4c3c0: 670c beqs 4c3ce <pipe_create+0x2e> <== ALWAYS TAKEN
return -1;
4c3c2: 70ff moveq #-1,%d0 <== NOT EXECUTED
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c3c4: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 <== NOT EXECUTED 4c3ca: 4e5e unlk %fp <== NOT EXECUTED 4c3cc: 4e75 rts <== NOT EXECUTED
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c3ce: 45ee fff1 lea %fp@(-15),%a2
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c3d2: 3039 0006 0d98 movew 60d98 <rtems_pipe_no>,%d0
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c3d8: 24bc 2f74 6d70 movel #796159344,%a2@
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c3de: 2200 movel %d0,%d1 4c3e0: 5281 addql #1,%d1 4c3e2: 3f00 movew %d0,%sp@-
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c3e4: 203c 2f2e 6669 movel #791570025,%d0
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c3ea: 4267 clrw %sp@-
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c3ec: 307c 666f moveaw #26223,%a0 4c3f0: 2d40 fff5 movel %d0,%fp@(-11)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c3f4: 4879 0005 f1b1 pea 5f1b1 <_CPU_m68k_BFFFO_table+0x105> 4c3fa: 486e fffb pea %fp@(-5)
if (rtems_mkdir("/tmp", S_IRWXU | S_IRWXG | S_IRWXO) != 0)
return -1;
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
4c3fe: 3d48 fff9 movew %a0,%fp@(-7)
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
4c402: 33c1 0006 0d98 movew %d1,60d98 <rtems_pipe_no> 4c408: 4eb9 0005 1600 jsr 51600 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
4c40e: 4878 0180 pea 180 <DBL_MANT_DIG+0x14b> 4c412: 2f0a movel %a2,%sp@- 4c414: 4eb9 0004 da90 jsr 4da90 <mkfifo> 4c41a: 4fef 0014 lea %sp@(20),%sp 4c41e: 4a80 tstl %d0 4c420: 6600 009a bnew 4c4bc <pipe_create+0x11c>
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);
4c424: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4c428: 49f9 0004 50dc lea 450dc <open>,%a4 4c42e: 2f0a movel %a2,%sp@- 4c430: 4e94 jsr %a4@
if (filsdes[0] < 0) {
4c432: 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);
4c434: 2680 movel %d0,%a3@
if (filsdes[0] < 0) {
4c436: 6d4e blts 4c486 <pipe_create+0xe6>
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]);
4c438: b0b9 0005 fd64 cmpl 5fd64 <rtems_libio_number_iops>,%d0
4c43e: 6442 bccs 4c482 <pipe_create+0xe2> <== NEVER TAKEN
4c440: 2200 movel %d0,%d1 4c442: ed88 lsll #6,%d0 4c444: e789 lsll #3,%d1 4c446: 2079 0006 148c moveal 6148c <rtems_libio_iops>,%a0 4c44c: 9081 subl %d1,%d0 4c44e: d1c0 addal %d0,%a0
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
4c450: 70fe moveq #-2,%d0 4c452: c1a8 0014 andl %d0,%a0@(20)
filsdes[1] = open(fifopath, O_WRONLY);
4c456: 4878 0001 pea 1 <ADD> 4c45a: 2f0a movel %a2,%sp@- 4c45c: 4e94 jsr %a4@
if (filsdes[1] < 0) {
4c45e: 508f addql #8,%sp
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
4c460: 2740 0004 movel %d0,%a3@(4)
if (filsdes[1] < 0) {
4c464: 6d36 blts 4c49c <pipe_create+0xfc>
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c466: 2f0a movel %a2,%sp@-
int pipe_create(
int filsdes[2]
)
{
rtems_libio_t *iop;
int err = 0;
4c468: 99cc subal %a4,%a4
if (filsdes[1] < 0) {
err = errno;
close(filsdes[0]);
}
unlink(fifopath);
4c46a: 4eb9 0004 7304 jsr 47304 <unlink> 4c470: 588f addql #4,%sp
} if(err != 0)
4c472: 4a8c tstl %a4
4c474: 6658 bnes 4c4ce <pipe_create+0x12e>
rtems_set_errno_and_return_minus_one(err);
return 0;
4c476: 4280 clrl %d0
}
4c478: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 4c47e: 4e5e unlk %fp 4c480: 4e75 rts
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]);
4c482: 91c8 subal %a0,%a0 <== NOT EXECUTED 4c484: 60ca bras 4c450 <pipe_create+0xb0> <== NOT EXECUTED
}
/* Non-blocking open to avoid waiting for writers */
filsdes[0] = open(fifopath, O_RDONLY | O_NONBLOCK);
if (filsdes[0] < 0) {
err = errno;
4c486: 4eb9 0005 08dc jsr 508dc <__errno> 4c48c: 2040 moveal %d0,%a0 4c48e: 2850 moveal %a0@,%a4
/* 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);
4c490: 2f0a movel %a2,%sp@- 4c492: 4eb9 0004 7304 jsr 47304 <unlink> 4c498: 588f addql #4,%sp 4c49a: 60d6 bras 4c472 <pipe_create+0xd2>
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
filsdes[1] = open(fifopath, O_WRONLY);
if (filsdes[1] < 0) {
err = errno;
4c49c: 4eb9 0005 08dc jsr 508dc <__errno> 4c4a2: 2040 moveal %d0,%a0 4c4a4: 2850 moveal %a0@,%a4
close(filsdes[0]);
4c4a6: 2f13 movel %a3@,%sp@- 4c4a8: 4eb9 0004 3d00 jsr 43d00 <close> 4c4ae: 588f addql #4,%sp
}
unlink(fifopath);
4c4b0: 2f0a movel %a2,%sp@- 4c4b2: 4eb9 0004 7304 jsr 47304 <unlink> 4c4b8: 588f addql #4,%sp 4c4ba: 60b6 bras 4c472 <pipe_create+0xd2>
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){
4c4bc: 4eb9 0005 08dc jsr 508dc <__errno>
return -1;
4c4c2: 70ff moveq #-1,%d0
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
return 0;
}
4c4c4: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4 4c4ca: 4e5e unlk %fp 4c4cc: 4e75 rts
close(filsdes[0]);
}
unlink(fifopath);
}
if(err != 0)
rtems_set_errno_and_return_minus_one(err);
4c4ce: 4eb9 0005 08dc jsr 508dc <__errno> 4c4d4: 2040 moveal %d0,%a0 4c4d6: 70ff moveq #-1,%d0 4c4d8: 208c movel %a4,%a0@
return 0; }
4c4da: 4cee 1c00 ffe4 moveml %fp@(-28),%a2-%a4
4c4e0: 4e5e unlk %fp <== NOT EXECUTED
0004d1f2 <pipe_ioctl>:
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
4d1f2: 4e56 0000 linkw %fp,#0
if (cmd == FIONREAD) {
4d1f6: 203c 4004 667f movel #1074030207,%d0 4d1fc: b0ae 000c cmpl %fp@(12),%d0
4d200: 6706 beqs 4d208 <pipe_ioctl+0x16>
*(unsigned int *)buffer = pipe->Length;
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
4d202: 70ea moveq #-22,%d0
}
4d204: 4e5e unlk %fp 4d206: 4e75 rts
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
if (buffer == NULL)
4d208: 4aae 0010 tstl %fp@(16)
4d20c: 6606 bnes 4d214 <pipe_ioctl+0x22>
return -EFAULT;
4d20e: 70f2 moveq #-14,%d0
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4d210: 4e5e unlk %fp 4d212: 4e75 rts
{
if (cmd == FIONREAD) {
if (buffer == NULL)
return -EFAULT;
if (! PIPE_LOCK(pipe))
4d214: 42a7 clrl %sp@- 4d216: 206e 0008 moveal %fp@(8),%a0 4d21a: 42a7 clrl %sp@- 4d21c: 2f28 0028 movel %a0@(40),%sp@- 4d220: 4eb9 0004 7f60 jsr 47f60 <rtems_semaphore_obtain> 4d226: 4fef 000c lea %sp@(12),%sp 4d22a: 4a80 tstl %d0
4d22c: 6706 beqs 4d234 <pipe_ioctl+0x42> <== ALWAYS TAKEN
return -EINTR;
4d22e: 70fc moveq #-4,%d0 <== NOT EXECUTED
PIPE_UNLOCK(pipe);
return 0;
}
return -EINVAL;
}
4d230: 4e5e unlk %fp <== NOT EXECUTED 4d232: 4e75 rts <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
4d234: 206e 0008 moveal %fp@(8),%a0 4d238: 226e 0010 moveal %fp@(16),%a1 4d23c: 22a8 000c movel %a0@(12),%a1@
PIPE_UNLOCK(pipe);
4d240: 2f28 0028 movel %a0@(40),%sp@- 4d244: 4eb9 0004 80a0 jsr 480a0 <rtems_semaphore_release>
return 0;
4d24a: 588f addql #4,%sp 4d24c: 4280 clrl %d0
}
return -EINVAL;
}
4d24e: 4e5e unlk %fp <== NOT EXECUTED
0004c7e4 <pipe_lock>:
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
4c7e4: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4c7e8: 2039 0006 0d9c movel 60d9c <pipe_semaphore>,%d0
free(pipe->Buffer);
free(pipe);
}
static rtems_status_code pipe_lock(void)
{
4c7ee: 2f0a movel %a2,%sp@- 4c7f0: 45f9 0004 7f60 lea 47f60 <rtems_semaphore_obtain>,%a2 4c7f6: 2f02 movel %d2,%sp@-
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
4c7f8: 4a80 tstl %d0
4c7fa: 671e beqs 4c81a <pipe_lock+0x36>
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4c7fc: 42a7 clrl %sp@- 4c7fe: 42a7 clrl %sp@- 4c800: 2f00 movel %d0,%sp@- 4c802: 4e92 jsr %a2@
}
if (sc == RTEMS_SUCCESSFUL) {
4c804: 4fef 000c lea %sp@(12),%sp 4c808: 4a80 tstl %d0
4c80a: 666e bnes 4c87a <pipe_lock+0x96> <== NEVER TAKEN
return 0;
} else {
return -ENOMEM;
}
}
4c80c: 242e fff8 movel %fp@(-8),%d2
if (sc == RTEMS_SUCCESSFUL) {
sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4c810: 4280 clrl %d0
} else {
return -ENOMEM;
}
}
4c812: 246e fffc moveal %fp@(-4),%a2 4c816: 4e5e unlk %fp 4c818: 4e75 rts
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 );
4c81a: 42a7 clrl %sp@- 4c81c: 42a7 clrl %sp@- 4c81e: 2f39 0006 1494 movel 61494 <rtems_libio_semaphore>,%sp@- 4c824: 4e92 jsr %a2@
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (pipe_semaphore == RTEMS_ID_NONE) {
rtems_libio_lock();
if (pipe_semaphore == RTEMS_ID_NONE) {
4c826: 4fef 000c lea %sp@(12),%sp 4c82a: 4ab9 0006 0d9c tstl 60d9c <pipe_semaphore>
4c830: 6716 beqs 4c848 <pipe_lock+0x64> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4c832: 2f39 0006 1494 movel 61494 <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED 4c838: 4eb9 0004 80a0 jsr 480a0 <rtems_semaphore_release> <== NOT EXECUTED 4c83e: 2039 0006 0d9c movel 60d9c <pipe_semaphore>,%d0 <== NOT EXECUTED 4c844: 588f addql #4,%sp <== NOT EXECUTED 4c846: 60b4 bras 4c7fc <pipe_lock+0x18> <== NOT EXECUTED
sc = rtems_semaphore_create(
4c848: 4879 0006 0d9c pea 60d9c <pipe_semaphore> 4c84e: 42a7 clrl %sp@- 4c850: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 4c854: 4878 0001 pea 1 <ADD> 4c858: 2f3c 5049 5045 movel #1346981957,%sp@- 4c85e: 4eb9 0004 7cc4 jsr 47cc4 <rtems_semaphore_create> 4c864: 2f39 0006 1494 movel 61494 <rtems_libio_semaphore>,%sp@- 4c86a: 2400 movel %d0,%d2 4c86c: 4eb9 0004 80a0 jsr 480a0 <rtems_semaphore_release>
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4c872: 4fef 0018 lea %sp@(24),%sp 4c876: 4a82 tstl %d2
4c878: 670e beqs 4c888 <pipe_lock+0xa4>
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
}
}
4c87a: 242e fff8 movel %fp@(-8),%d2
}
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
return -ENOMEM;
4c87e: 70f4 moveq #-12,%d0
} }
4c880: 246e fffc moveal %fp@(-4),%a2 4c884: 4e5e unlk %fp 4c886: 4e75 rts
}
rtems_libio_unlock();
}
if (sc == RTEMS_SUCCESSFUL) {
4c888: 2039 0006 0d9c movel 60d9c <pipe_semaphore>,%d0 4c88e: 6000 ff6c braw 4c7fc <pipe_lock+0x18>
0004cdde <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4cdde: 4e56 ffc8 linkw %fp,#-56 4cde2: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4cde6: 42a7 clrl %sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4cde8: 246e 0008 moveal %fp@(8),%a2
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4cdec: 47f9 0004 7f60 lea 47f60 <rtems_semaphore_obtain>,%a3 4cdf2: 42a7 clrl %sp@- 4cdf4: 2f2a 0028 movel %a2@(40),%sp@-
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4cdf8: 282e 0010 movel %fp@(16),%d4 4cdfc: 2a6e 0014 moveal %fp@(20),%a5
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
4ce00: 4e93 jsr %a3@ 4ce02: 4fef 000c lea %sp@(12),%sp 4ce06: 4a80 tstl %d0 4ce08: 6600 00ac bnew 4ceb6 <pipe_read+0xd8>
return -EINTR;
while (read < count) {
4ce0c: 4a84 tstl %d4 4ce0e: 6700 01ac beqw 4cfbc <pipe_read+0x1de> 4ce12: 4285 clrl %d5 4ce14: 4283 clrl %d3 4ce16: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
4ce1c: 243c 0004 eb58 movel #322392,%d2
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
4ce22: 2e3c 0004 eae0 movel #322272,%d7
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);
4ce28: 2c3c 0005 1188 movel #332168,%d6
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
4ce2e: 222a 000c movel %a2@(12),%d1 4ce32: 6600 0090 bnew 4cec4 <pipe_read+0xe6>
/* Not an error */
if (pipe->Writers == 0)
4ce36: 4aaa 0014 tstl %a2@(20) 4ce3a: 6700 010a beqw 4cf46 <pipe_read+0x168>
goto out_locked;
if (LIBIO_NODELAY(iop)) {
4ce3e: 7001 moveq #1,%d0 4ce40: c0ad 0014 andl %a5@(20),%d0 4ce44: 6600 0110 bnew 4cf56 <pipe_read+0x178>
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
4ce48: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
4ce4c: 52aa 0018 addql #1,%a2@(24)
PIPE_UNLOCK(pipe);
4ce50: 4e94 jsr %a4@
if (! PIPE_READWAIT(pipe))
4ce52: 2042 moveal %d2,%a0 4ce54: 42a7 clrl %sp@- 4ce56: 2f2a 002c movel %a2@(44),%sp@- 4ce5a: 4e90 jsr %a0@ 4ce5c: 4fef 000c lea %sp@(12),%sp 4ce60: 4a80 tstl %d0
4ce62: 663a bnes 4ce9e <pipe_read+0xc0> <== NEVER TAKEN
4ce64: 42ae fff8 clrl %fp@(-8)
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4ce68: 42a7 clrl %sp@- 4ce6a: 42a7 clrl %sp@- 4ce6c: 2f2a 0028 movel %a2@(40),%sp@- 4ce70: 4e93 jsr %a3@ 4ce72: 4fef 000c lea %sp@(12),%sp 4ce76: 4a80 tstl %d0 4ce78: 6600 00ee bnew 4cf68 <pipe_read+0x18a>
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
4ce7c: 53aa 0018 subql #1,%a2@(24)
if (ret != 0)
4ce80: 4aae fff8 tstl %fp@(-8)
4ce84: 67a8 beqs 4ce2e <pipe_read+0x50> <== ALWAYS TAKEN
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4ce86: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4ce8a: 4e94 jsr %a4@ <== NOT EXECUTED 4ce8c: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
if (read > 0)
4ce8e: 4a83 tstl %d3
4ce90: 6f14 bles 4cea6 <pipe_read+0xc8>
return read;
return ret;
}
4ce92: 2003 movel %d3,%d0 4ce94: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4ce9a: 4e5e unlk %fp 4ce9c: 4e75 rts
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
4ce9e: 70fc moveq #-4,%d0 <== NOT EXECUTED 4cea0: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 4cea4: 60c2 bras 4ce68 <pipe_read+0x8a> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
return read;
return ret;
4cea6: 262e fff8 movel %fp@(-8),%d3
}
4ceaa: 2003 movel %d3,%d0 4ceac: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 4ceb2: 4e5e unlk %fp 4ceb4: 4e75 rts
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4ceb6: 76fc moveq #-4,%d3 <== NOT EXECUTED
out_nolock:
if (read > 0)
return read;
return ret;
}
4ceb8: 2003 movel %d3,%d0 <== NOT EXECUTED 4ceba: 4cee 3cfc ffc8 moveml %fp@(-56),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4cec0: 4e5e unlk %fp <== NOT EXECUTED 4cec2: 4e75 rts <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
4cec4: 2004 movel %d4,%d0 4cec6: 9085 subl %d5,%d0 4cec8: b081 cmpl %d1,%d0
4ceca: 6402 bccs 4cece <pipe_read+0xf0>
4cecc: 2200 movel %d0,%d1
chunk1 = pipe->Size - pipe->Start;
4cece: 202a 0008 movel %a2@(8),%d0 4ced2: 206a 0004 moveal %a2@(4),%a0 4ced6: 91c0 subal %d0,%a0
if (chunk > chunk1) {
4ced8: b1c1 cmpal %d1,%a0 4ceda: 6d00 009c bltw 4cf78 <pipe_read+0x19a>
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);
4cede: 2f01 movel %d1,%sp@- 4cee0: d092 addl %a2@,%d0 4cee2: 2246 moveal %d6,%a1 4cee4: 206e 000c moveal %fp@(12),%a0 4cee8: 2f00 movel %d0,%sp@- 4ceea: 4870 5800 pea %a0@(00000000,%d5:l) 4ceee: 2d41 fff4 movel %d1,%fp@(-12) 4cef2: 4e91 jsr %a1@ 4cef4: 222e fff4 movel %fp@(-12),%d1 4cef8: 4fef 000c lea %sp@(12),%sp
pipe->Start += chunk;
4cefc: 2041 moveal %d1,%a0 4cefe: d1ea 0008 addal %a2@(8),%a0
pipe->Start %= pipe->Size;
4cf02: 2008 movel %a0,%d0
pipe->Length -= chunk;
4cf04: 226a 000c moveal %a2@(12),%a1 4cf08: 93c1 subal %d1,%a1
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4cf0a: 4c6a 0005 0004 remul %a2@(4),%d5,%d0
pipe->Length -= chunk;
4cf10: 2549 000c movel %a1,%a2@(12)
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
4cf14: 2545 0008 movel %d5,%a2@(8)
pipe->Length -= chunk;
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
4cf18: 4a89 tstl %a1
4cf1a: 6604 bnes 4cf20 <pipe_read+0x142>
pipe->Start = 0;
4cf1c: 42aa 0008 clrl %a2@(8)
if (pipe->waitingWriters > 0)
4cf20: 4aaa 001c tstl %a2@(28)
4cf24: 6716 beqs 4cf3c <pipe_read+0x15e>
PIPE_WAKEUPWRITERS(pipe);
4cf26: 486e fffc pea %fp@(-4) 4cf2a: 2047 moveal %d7,%a0 4cf2c: 2f2a 0030 movel %a2@(48),%sp@- 4cf30: 2d41 fff4 movel %d1,%fp@(-12) 4cf34: 4e90 jsr %a0@ 4cf36: 222e fff4 movel %fp@(-12),%d1 4cf3a: 508f addql #8,%sp
read += chunk;
4cf3c: d681 addl %d1,%d3
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4cf3e: 2a03 movel %d3,%d5 4cf40: b883 cmpl %d3,%d4 4cf42: 6200 feea bhiw 4ce2e <pipe_read+0x50>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cf46: 2f2a 0028 movel %a2@(40),%sp@-
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
4cf4a: 42ae fff8 clrl %fp@(-8)
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cf4e: 4e94 jsr %a4@ 4cf50: 588f addql #4,%sp 4cf52: 6000 ff3a braw 4ce8e <pipe_read+0xb0>
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4cf56: 70f5 moveq #-11,%d0
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cf58: 2f2a 0028 movel %a2@(40),%sp@-
/* Not an error */
if (pipe->Writers == 0)
goto out_locked;
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4cf5c: 2d40 fff8 movel %d0,%fp@(-8)
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cf60: 4e94 jsr %a4@ 4cf62: 588f addql #4,%sp 4cf64: 6000 ff28 braw 4ce8e <pipe_read+0xb0>
PIPE_UNLOCK(pipe);
if (! PIPE_READWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
4cf68: 7afc moveq #-4,%d5 <== NOT EXECUTED 4cf6a: 2d45 fff8 movel %d5,%fp@(-8) <== NOT EXECUTED
out_locked:
PIPE_UNLOCK(pipe);
out_nolock:
if (read > 0)
4cf6e: 4a83 tstl %d3 <== NOT EXECUTED 4cf70: 6e00 ff20 bgtw 4ce92 <pipe_read+0xb4> <== NOT EXECUTED 4cf74: 6000 ff30 braw 4cea6 <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);
4cf78: 2f08 movel %a0,%sp@- 4cf7a: d092 addl %a2@,%d0 4cf7c: 226e 000c moveal %fp@(12),%a1 4cf80: 2f00 movel %d0,%sp@- 4cf82: 4871 5800 pea %a1@(00000000,%d5:l) 4cf86: 2246 moveal %d6,%a1 4cf88: 2d41 fff4 movel %d1,%fp@(-12) 4cf8c: 2d48 fff0 movel %a0,%fp@(-16) 4cf90: 4e91 jsr %a1@
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
4cf92: 222e fff4 movel %fp@(-12),%d1 4cf96: 2001 movel %d1,%d0 4cf98: 2246 moveal %d6,%a1 4cf9a: 206e fff0 moveal %fp@(-16),%a0 4cf9e: 9088 subl %a0,%d0 4cfa0: da88 addl %a0,%d5 4cfa2: 2f00 movel %d0,%sp@- 4cfa4: 2f12 movel %a2@,%sp@- 4cfa6: 206e 000c moveal %fp@(12),%a0 4cfaa: 4870 5800 pea %a0@(00000000,%d5:l) 4cfae: 4e91 jsr %a1@ 4cfb0: 222e fff4 movel %fp@(-12),%d1 4cfb4: 4fef 0018 lea %sp@(24),%sp 4cfb8: 6000 ff42 braw 4cefc <pipe_read+0x11e>
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cfbc: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED 4cfc0: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
4cfc6: 4283 clrl %d3 <== NOT EXECUTED 4cfc8: 42ae fff8 clrl %fp@(-8) <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
4cfcc: 4e94 jsr %a4@ <== NOT EXECUTED 4cfce: 588f addql #4,%sp <== NOT EXECUTED 4cfd0: 6000 febc braw 4ce8e <pipe_read+0xb0> <== NOT EXECUTED
0004c8b8 <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
4c8b8: 4e56 ffe8 linkw %fp,#-24 4c8bc: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 4c8c0: 266e 0008 moveal %fp@(8),%a3
pipe_control_t *pipe = *pipep;
4c8c4: 2453 moveal %a3@,%a2
uint32_t mode;
if (pipe_lock())
4c8c6: 4eba ff1c jsr %pc@(4c7e4 <pipe_lock>) 4c8ca: 4a80 tstl %d0 4c8cc: 6600 00e0 bnew 4c9ae <pipe_release+0xf6>
/* WARN pipe not freed and pipep not set to NULL! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
4c8d0: 42a7 clrl %sp@- 4c8d2: 42a7 clrl %sp@- 4c8d4: 2f2a 0028 movel %a2@(40),%sp@- 4c8d8: 4eb9 0004 7f60 jsr 47f60 <rtems_semaphore_obtain> 4c8de: 4fef 000c lea %sp@(12),%sp 4c8e2: 4a80 tstl %d0 4c8e4: 6600 00c8 bnew 4c9ae <pipe_release+0xf6>
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
mode = LIBIO_ACCMODE(iop);
4c8e8: 206e 000c moveal %fp@(12),%a0 4c8ec: 7406 moveq #6,%d2 4c8ee: c4a8 0014 andl %a0@(20),%d2
if (mode & LIBIO_FLAGS_READ)
4c8f2: 0802 0001 btst #1,%d2
4c8f6: 6704 beqs 4c8fc <pipe_release+0x44>
pipe->Readers --;
4c8f8: 53aa 0010 subql #1,%a2@(16)
if (mode & LIBIO_FLAGS_WRITE)
4c8fc: 44c2 movew %d2,%ccr
4c8fe: 6604 bnes 4c904 <pipe_release+0x4c>
pipe->Writers --;
4c900: 53aa 0014 subql #1,%a2@(20)
PIPE_UNLOCK(pipe);
4c904: 2f2a 0028 movel %a2@(40),%sp@- 4c908: 4eb9 0004 80a0 jsr 480a0 <rtems_semaphore_release>
if (pipe->Readers == 0 && pipe->Writers == 0) {
4c90e: 588f addql #4,%sp 4c910: 4aaa 0010 tstl %a2@(16)
4c914: 672c beqs 4c942 <pipe_release+0x8a>
*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)
4c916: 4aaa 0014 tstl %a2@(20)
4c91a: 6616 bnes 4c932 <pipe_release+0x7a> <== NEVER TAKEN
4c91c: 7002 moveq #2,%d0 4c91e: b082 cmpl %d2,%d0
4c920: 6710 beqs 4c932 <pipe_release+0x7a> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
4c922: 486e fffc pea %fp@(-4) 4c926: 2f2a 002c movel %a2@(44),%sp@- 4c92a: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4c930: 508f addql #8,%sp
pipe_unlock();
4c932: 4eba ff5e jsr %pc@(4c892 <pipe_unlock>)
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c936: 4280 clrl %d0 4c938: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4c93e: 4e5e unlk %fp 4c940: 4e75 rts
if (mode & LIBIO_FLAGS_WRITE)
pipe->Writers --;
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
4c942: 4aaa 0014 tstl %a2@(20)
4c946: 6726 beqs 4c96e <pipe_release+0xb6>
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
4c948: 7004 moveq #4,%d0 4c94a: b082 cmpl %d2,%d0
4c94c: 67e4 beqs 4c932 <pipe_release+0x7a> <== NEVER TAKEN
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
4c94e: 486e fffc pea %fp@(-4) 4c952: 2f2a 0030 movel %a2@(48),%sp@- 4c956: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4c95c: 508f addql #8,%sp
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
4c95e: 4eba ff32 jsr %pc@(4c892 <pipe_unlock>)
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c962: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4c968: 4280 clrl %d0 4c96a: 4e5e unlk %fp 4c96c: 4e75 rts
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c96e: 2f2a 002c movel %a2@(44),%sp@- 4c972: 4bf9 0004 ea40 lea 4ea40 <rtems_barrier_delete>,%a5
rtems_barrier_delete(pipe->writeBarrier); rtems_semaphore_delete(pipe->Semaphore); free(pipe->Buffer);
4c978: 49f9 0004 41c8 lea 441c8 <free>,%a4
/* Called with pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
rtems_barrier_delete(pipe->readBarrier);
4c97e: 4e95 jsr %a5@
rtems_barrier_delete(pipe->writeBarrier);
4c980: 2f2a 0030 movel %a2@(48),%sp@- 4c984: 4e95 jsr %a5@
rtems_semaphore_delete(pipe->Semaphore);
4c986: 2f2a 0028 movel %a2@(40),%sp@- 4c98a: 4eb9 0004 7e88 jsr 47e88 <rtems_semaphore_delete>
free(pipe->Buffer);
4c990: 2f12 movel %a2@,%sp@- 4c992: 4e94 jsr %a4@
free(pipe);
4c994: 2f0a movel %a2,%sp@- 4c996: 4e94 jsr %a4@
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
4c998: 4fef 0014 lea %sp@(20),%sp 4c99c: 4293 clrl %a3@
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
PIPE_WAKEUPREADERS(pipe);
pipe_unlock();
4c99e: 4eba fef2 jsr %pc@(4c892 <pipe_unlock>)
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
4c9a2: 4cee 3c04 ffe8 moveml %fp@(-24),%d2/%a2-%a5 4c9a8: 4280 clrl %d0 4c9aa: 4e5e unlk %fp 4c9ac: 4e75 rts
rtems_fatal_error_occurred(0xdeadbeef);
if (!PIPE_LOCK(pipe))
/* WARN pipe not released! */
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
4c9ae: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4c9b4: 4eb9 0004 863c jsr 4863c <rtems_fatal_error_occurred> <== NOT EXECUTED
0004c892 <pipe_unlock>:
return -ENOMEM;
}
}
static void pipe_unlock(void)
{
4c892: 4e56 0000 linkw %fp,#0
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
4c896: 2f39 0006 0d9c movel 60d9c <pipe_semaphore>,%sp@- 4c89c: 4eb9 0004 80a0 jsr 480a0 <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
4c8a2: 588f addql #4,%sp 4c8a4: 4a80 tstl %d0
4c8a6: 6604 bnes 4c8ac <pipe_unlock+0x1a> <== NEVER TAKEN
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
}
}
4c8a8: 4e5e unlk %fp 4c8aa: 4e75 rts
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_semaphore_release(pipe_semaphore);
if (sc != RTEMS_SUCCESSFUL) {
/* FIXME */
rtems_fatal_error_occurred(0xdeadbeef);
4c8ac: 2f3c dead beef movel #-559038737,%sp@- <== NOT EXECUTED 4c8b2: 4eb9 0004 863c jsr 4863c <rtems_fatal_error_occurred> <== NOT EXECUTED
0004cfd4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
4cfd4: 4e56 ffcc linkw %fp,#-52 4cfd8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4cfdc: 246e 0008 moveal %fp@(8),%a2 4cfe0: 262e 0010 movel %fp@(16),%d3
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
4cfe4: 660e bnes 4cff4 <pipe_write+0x20> <== ALWAYS TAKEN
return 0;
4cfe6: 4282 clrl %d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4cfe8: 2002 movel %d2,%d0 4cfea: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4cff0: 4e5e unlk %fp 4cff2: 4e75 rts
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
4cff4: 42a7 clrl %sp@- 4cff6: 47f9 0004 7f60 lea 47f60 <rtems_semaphore_obtain>,%a3 4cffc: 42a7 clrl %sp@- 4cffe: 2f2a 0028 movel %a2@(40),%sp@- 4d002: 4e93 jsr %a3@ 4d004: 4fef 000c lea %sp@(12),%sp 4d008: 4a80 tstl %d0 4d00a: 6600 00ca bnew 4d0d6 <pipe_write+0x102>
return -EINTR;
if (pipe->Readers == 0) {
4d00e: 4aaa 0010 tstl %a2@(16) 4d012: 6700 00fe beqw 4d112 <pipe_write+0x13e>
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4d016: 202a 0004 movel %a2@(4),%d0 4d01a: b083 cmpl %d3,%d0 4d01c: 6500 00d8 bcsw 4d0f6 <pipe_write+0x122> 4d020: 2803 movel %d3,%d4 4d022: 4285 clrl %d5 4d024: 4282 clrl %d2 4d026: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
4d02c: 4bf9 0004 eb58 lea 4eb58 <rtems_barrier_wait>,%a5
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);
4d032: 2c3c 0005 1188 movel #332168,%d6
/* 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) {
4d038: 222a 000c movel %a2@(12),%d1 4d03c: 2040 moveal %d0,%a0 4d03e: 91c1 subal %d1,%a0 4d040: b888 cmpl %a0,%d4 4d042: 6300 00e8 blsw 4d12c <pipe_write+0x158>
if (LIBIO_NODELAY(iop)) {
4d046: 206e 0014 moveal %fp@(20),%a0 4d04a: 7001 moveq #1,%d0 4d04c: c0a8 0014 andl %a0@(20),%d0 4d050: 6600 0168 bnew 4d1ba <pipe_write+0x1e6>
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
4d054: 2f2a 0028 movel %a2@(40),%sp@-
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
4d058: 52aa 001c addql #1,%a2@(28)
PIPE_UNLOCK(pipe);
4d05c: 4e94 jsr %a4@
if (! PIPE_WRITEWAIT(pipe))
4d05e: 42a7 clrl %sp@- 4d060: 2f2a 0030 movel %a2@(48),%sp@- 4d064: 4e95 jsr %a5@ 4d066: 4fef 000c lea %sp@(12),%sp 4d06a: 4a80 tstl %d0
4d06c: 662a bnes 4d098 <pipe_write+0xc4> <== NEVER TAKEN
4d06e: 4287 clrl %d7
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
4d070: 42a7 clrl %sp@- 4d072: 42a7 clrl %sp@- 4d074: 2f2a 0028 movel %a2@(40),%sp@- 4d078: 4e93 jsr %a3@ 4d07a: 4fef 000c lea %sp@(12),%sp 4d07e: 4a80 tstl %d0 4d080: 6600 0132 bnew 4d1b4 <pipe_write+0x1e0>
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
4d084: 53aa 001c subql #1,%a2@(28)
if (ret != 0)
4d088: 4a87 tstl %d7
4d08a: 6612 bnes 4d09e <pipe_write+0xca> <== NEVER TAKEN
goto out_locked;
if (pipe->Readers == 0) {
4d08c: 4aaa 0010 tstl %a2@(16)
4d090: 6752 beqs 4d0e4 <pipe_write+0x110> <== NEVER TAKEN
4d092: 202a 0004 movel %a2@(4),%d0 4d096: 60a0 bras 4d038 <pipe_write+0x64>
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
4d098: 7efc moveq #-4,%d7 <== NOT EXECUTED 4d09a: 60d4 bras 4d070 <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) {
4d09c: 4287 clrl %d7
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d09e: 2f2a 0028 movel %a2@(40),%sp@- 4d0a2: 4e94 jsr %a4@ 4d0a4: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4d0a6: 70e0 moveq #-32,%d0 4d0a8: b087 cmpl %d7,%d0
4d0aa: 6714 beqs 4d0c0 <pipe_write+0xec> <== NEVER TAKEN
kill(getpid(), SIGPIPE);
#endif
if (written > 0)
4d0ac: 4a82 tstl %d2 4d0ae: 6e00 ff38 bgtw 4cfe8 <pipe_write+0x14> 4d0b2: 2407 movel %d7,%d2
return written;
return ret;
}
4d0b4: 2002 movel %d2,%d0 4d0b6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 4d0bc: 4e5e unlk %fp 4d0be: 4e75 rts
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
kill(getpid(), SIGPIPE);
4d0c0: 4eb9 0004 da7c jsr 4da7c <getpid> 4d0c6: 4878 000d pea d <OPER1+0x1> 4d0ca: 2f00 movel %d0,%sp@- 4d0cc: 4eb9 0004 e044 jsr 4e044 <kill> 4d0d2: 508f addql #8,%sp 4d0d4: 60d6 bras 4d0ac <pipe_write+0xd8>
/* Write nothing */
if (count == 0)
return 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
4d0d6: 74fc moveq #-4,%d2 <== NOT EXECUTED
#endif
if (written > 0)
return written;
return ret;
}
4d0d8: 2002 movel %d2,%d0 <== NOT EXECUTED 4d0da: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4d0e0: 4e5e unlk %fp <== NOT EXECUTED 4d0e2: 4e75 rts <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d0e4: 2f2a 0028 movel %a2@(40),%sp@- <== NOT EXECUTED
pipe->waitingWriters --;
if (ret != 0)
goto out_locked;
if (pipe->Readers == 0) {
ret = -EPIPE;
4d0e8: 7ee0 moveq #-32,%d7 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d0ea: 4e94 jsr %a4@ <== NOT EXECUTED 4d0ec: 588f addql #4,%sp <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4d0ee: 70e0 moveq #-32,%d0 <== NOT EXECUTED 4d0f0: b087 cmpl %d7,%d0 <== NOT EXECUTED 4d0f2: 66b8 bnes 4d0ac <pipe_write+0xd8> <== NOT EXECUTED 4d0f4: 60ca bras 4d0c0 <pipe_write+0xec> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
4d0f6: 7801 moveq #1,%d4 <== NOT EXECUTED 4d0f8: 4285 clrl %d5 <== NOT EXECUTED 4d0fa: 4282 clrl %d2 <== NOT EXECUTED 4d0fc: 49f9 0004 80a0 lea 480a0 <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))
4d102: 4bf9 0004 eb58 lea 4eb58 <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);
4d108: 2c3c 0005 1188 movel #332168,%d6 <== NOT EXECUTED 4d10e: 6000 ff28 braw 4d038 <pipe_write+0x64> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d112: 2f2a 0028 movel %a2@(40),%sp@- 4d116: 49f9 0004 80a0 lea 480a0 <rtems_semaphore_release>,%a4
if (! PIPE_LOCK(pipe))
return -EINTR;
if (pipe->Readers == 0) {
ret = -EPIPE;
4d11c: 7ee0 moveq #-32,%d7
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
int chunk, chunk1, written = 0, ret = 0;
4d11e: 4282 clrl %d2
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d120: 4e94 jsr %a4@ 4d122: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4d124: 70e0 moveq #-32,%d0 4d126: b087 cmpl %d7,%d0
4d128: 6682 bnes 4d0ac <pipe_write+0xd8> <== NEVER TAKEN
4d12a: 6094 bras 4d0c0 <pipe_write+0xec>
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
4d12c: 2243 moveal %d3,%a1 4d12e: 93c5 subal %d5,%a1 4d130: 2808 movel %a0,%d4 4d132: b3c8 cmpal %a0,%a1
4d134: 6402 bccs 4d138 <pipe_write+0x164>
4d136: 2809 movel %a1,%d4
chunk1 = pipe->Size - PIPE_WSTART(pipe);
4d138: 2241 moveal %d1,%a1 4d13a: d3ea 0008 addal %a2@(8),%a1 4d13e: 2209 movel %a1,%d1 4d140: 4c40 1007 remul %d0,%d7,%d1 4d144: 2200 movel %d0,%d1 4d146: 2047 moveal %d7,%a0 4d148: 9287 subl %d7,%d1
if (chunk > chunk1) {
4d14a: b284 cmpl %d4,%d1 4d14c: 6c00 0082 bgew 4d1d0 <pipe_write+0x1fc>
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
4d150: 226e 000c moveal %fp@(12),%a1 4d154: 2f01 movel %d1,%sp@- 4d156: 4871 5800 pea %a1@(00000000,%d5:l) 4d15a: d1d2 addal %a2@,%a0 4d15c: 2d41 fff4 movel %d1,%fp@(-12) 4d160: 2f08 movel %a0,%sp@- 4d162: 2046 moveal %d6,%a0 4d164: 4e90 jsr %a0@
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
4d166: 222e fff4 movel %fp@(-12),%d1 4d16a: 2004 movel %d4,%d0 4d16c: 9081 subl %d1,%d0 4d16e: da81 addl %d1,%d5 4d170: 2246 moveal %d6,%a1 4d172: 206e 000c moveal %fp@(12),%a0 4d176: 2f00 movel %d0,%sp@- 4d178: 4870 5800 pea %a0@(00000000,%d5:l) 4d17c: 2f12 movel %a2@,%sp@- 4d17e: 4e91 jsr %a1@ 4d180: 4fef 0018 lea %sp@(24),%sp
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
4d184: d9aa 000c addl %d4,%a2@(12)
if (pipe->waitingReaders > 0)
4d188: 4aaa 0018 tstl %a2@(24)
4d18c: 6614 bnes 4d1a2 <pipe_write+0x1ce> <== NEVER TAKEN
PIPE_WAKEUPREADERS(pipe);
written += chunk;
4d18e: d484 addl %d4,%d2
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
4d190: 2a02 movel %d2,%d5 4d192: b483 cmpl %d3,%d2 4d194: 6400 ff06 bccw 4d09c <pipe_write+0xc8>
4d198: 202a 0004 movel %a2@(4),%d0 <== NOT EXECUTED
pipe->Length += chunk;
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
written += chunk;
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
4d19c: 7801 moveq #1,%d4 <== NOT EXECUTED 4d19e: 6000 fe98 braw 4d038 <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);
4d1a2: 486e fffc pea %fp@(-4) 4d1a6: 2f2a 002c movel %a2@(44),%sp@- 4d1aa: 4eb9 0004 eae0 jsr 4eae0 <rtems_barrier_release> 4d1b0: 508f addql #8,%sp 4d1b2: 60da bras 4d18e <pipe_write+0x1ba>
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
4d1b4: 7efc moveq #-4,%d7 <== NOT EXECUTED 4d1b6: 6000 fef4 braw 4d0ac <pipe_write+0xd8> <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d1ba: 2f2a 0028 movel %a2@(40),%sp@-
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
ret = -EAGAIN;
4d1be: 7ef5 moveq #-11,%d7
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
4d1c0: 4e94 jsr %a4@ 4d1c2: 588f addql #4,%sp
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
4d1c4: 70e0 moveq #-32,%d0 4d1c6: b087 cmpl %d7,%d0 4d1c8: 6600 fee2 bnew 4d0ac <pipe_write+0xd8>
4d1cc: 6000 fef2 braw 4d0c0 <pipe_write+0xec> <== 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);
4d1d0: 226e 000c moveal %fp@(12),%a1 4d1d4: 2f04 movel %d4,%sp@- 4d1d6: 4871 5800 pea %a1@(00000000,%d5:l) 4d1da: d1d2 addal %a2@,%a0 4d1dc: 2f08 movel %a0,%sp@- 4d1de: 2046 moveal %d6,%a0 4d1e0: 4e90 jsr %a0@ 4d1e2: 4fef 000c lea %sp@(12),%sp
pipe->Length += chunk;
4d1e6: d9aa 000c addl %d4,%a2@(12)
if (pipe->waitingReaders > 0)
4d1ea: 4aaa 0018 tstl %a2@(24)
4d1ee: 679e beqs 4d18e <pipe_write+0x1ba>
4d1f0: 60b0 bras 4d1a2 <pipe_write+0x1ce>
00047b28 <posix_memalign>:
int posix_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
47b28: 4e56 0000 linkw %fp,#0 47b2c: 222e 000c movel %fp@(12),%d1
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47b30: 2001 movel %d1,%d0 47b32: 5380 subql #1,%d0
)
{
/*
* Update call statistics
*/
MSBUMP(memalign_calls, 1);
47b34: 52b9 0006 5dc0 addql #1,65dc0 <rtems_malloc_statistics+0x8>
if (((alignment - 1) & alignment) != 0 || (alignment < sizeof(void *)))
47b3a: c081 andl %d1,%d0
47b3c: 6608 bnes 47b46 <posix_memalign+0x1e> <== NEVER TAKEN
47b3e: 103c 0003 moveb #3,%d0 47b42: b081 cmpl %d1,%d0
47b44: 6506 bcss 47b4c <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 ); }
47b46: 7016 moveq #22,%d0 47b48: 4e5e unlk %fp 47b4a: 4e75 rts 47b4c: 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 );
47b4e: 4ef9 0004 7d00 jmp 47d00 <rtems_memalign>
0004aa84 <pthread_attr_setschedpolicy>:
int pthread_attr_setschedpolicy(
pthread_attr_t *attr,
int policy
)
{
4aa84: 4e56 0000 linkw %fp,#0 4aa88: 206e 0008 moveal %fp@(8),%a0 4aa8c: 202e 000c movel %fp@(12),%d0 4aa90: 2f02 movel %d2,%sp@-
if ( !attr || !attr->is_initialized )
4aa92: 4a88 tstl %a0
4aa94: 672e beqs 4aac4 <pthread_attr_setschedpolicy+0x40>
4aa96: 4a90 tstl %a0@
4aa98: 672a beqs 4aac4 <pthread_attr_setschedpolicy+0x40>
return EINVAL;
switch ( policy ) {
4aa9a: 7204 moveq #4,%d1 4aa9c: b280 cmpl %d0,%d1
4aa9e: 640c bccs 4aaac <pthread_attr_setschedpolicy+0x28>
return 0;
default:
return ENOTSUP;
}
}
4aaa0: 241f movel %sp@+,%d2
case SCHED_SPORADIC:
attr->schedpolicy = policy;
return 0;
default:
return ENOTSUP;
4aaa2: 203c 0000 0086 movel #134,%d0
} }
4aaa8: 4e5e unlk %fp 4aaaa: 4e75 rts
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
switch ( policy ) {
4aaac: 123c 0001 moveb #1,%d1 4aab0: 7417 moveq #23,%d2 4aab2: e1a9 lsll %d0,%d1 4aab4: c282 andl %d2,%d1
4aab6: 67e8 beqs 4aaa0 <pthread_attr_setschedpolicy+0x1c><== NEVER TAKEN
return 0;
default:
return ENOTSUP;
}
}
4aab8: 241f movel %sp@+,%d2 4aaba: 4e5e unlk %fp
switch ( policy ) {
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
case SCHED_SPORADIC:
attr->schedpolicy = policy;
4aabc: 2140 0014 movel %d0,%a0@(20)
return 0;
4aac0: 4280 clrl %d0
default:
return ENOTSUP;
}
}
4aac2: 4e75 rts 4aac4: 241f movel %sp@+,%d2
pthread_attr_t *attr,
int policy
)
{
if ( !attr || !attr->is_initialized )
return EINVAL;
4aac6: 7016 moveq #22,%d0
return 0;
default:
return ENOTSUP;
}
}
4aac8: 4e5e unlk %fp <== NOT EXECUTED
00046a4c <pthread_barrier_init>:
int pthread_barrier_init(
pthread_barrier_t *barrier,
const pthread_barrierattr_t *attr,
unsigned int count
)
{
46a4c: 4e56 ffe0 linkw %fp,#-32 46a50: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 46a54: 246e 0008 moveal %fp@(8),%a2 46a58: 262e 000c movel %fp@(12),%d3 46a5c: 242e 0010 movel %fp@(16),%d2
const pthread_barrierattr_t *the_attr;
/*
* Error check parameters
*/
if ( !barrier )
46a60: 4a8a tstl %a2
46a62: 677a beqs 46ade <pthread_barrier_init+0x92>
return EINVAL;
if ( count == 0 )
46a64: 4a82 tstl %d2
46a66: 6776 beqs 46ade <pthread_barrier_init+0x92>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
46a68: 4a83 tstl %d3 46a6a: 6700 0090 beqw 46afc <pthread_barrier_init+0xb0> 46a6e: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46a70: 4a90 tstl %a0@
46a72: 676a beqs 46ade <pthread_barrier_init+0x92>
return EINVAL;
switch ( the_attr->process_shared ) {
46a74: 4aa8 0004 tstl %a0@(4)
46a78: 6664 bnes 46ade <pthread_barrier_init+0x92> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
46a7a: 2039 0006 1370 movel 61370 <_Thread_Dispatch_disable_level>,%d0 46a80: 5280 addql #1,%d0
}
/*
* Convert from POSIX attributes to Core Barrier attributes
*/
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
46a82: 42ae fff8 clrl %fp@(-8)
the_attributes.maximum_count = count;
46a86: 2d42 fffc movel %d2,%fp@(-4) 46a8a: 23c0 0006 1370 movel %d0,61370 <_Thread_Dispatch_disable_level>
* the inactive chain of free barrier control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Barrier_Control *_POSIX_Barrier_Allocate( void )
{
return (POSIX_Barrier_Control *)
_Objects_Allocate( &_POSIX_Barrier_Information );
46a90: 4879 0006 1694 pea 61694 <_POSIX_Barrier_Information> 46a96: 4eb9 0004 8e60 jsr 48e60 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
46a9c: 588f addql #4,%sp 46a9e: 2640 moveal %d0,%a3 46aa0: 4a80 tstl %d0
46aa2: 6746 beqs 46aea <pthread_barrier_init+0x9e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
46aa4: 486e fff8 pea %fp@(-8) 46aa8: 486b 0010 pea %a3@(16) 46aac: 4eb9 0004 83dc jsr 483dc <_CORE_barrier_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
46ab2: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46ab6: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46ab8: 2079 0006 16ac moveal 616ac <_POSIX_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46abe: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46ac0: 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;
46ac4: 42ab 000c clrl %a3@(12)
);
/*
* Exit the critical section and return the user an operational barrier
*/
*barrier = the_barrier->Object.id;
46ac8: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
46aca: 4eb9 0004 9ba6 jsr 49ba6 <_Thread_Enable_dispatch>
return 0;
46ad0: 508f addql #8,%sp 46ad2: 4280 clrl %d0
}
46ad4: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46ada: 4e5e unlk %fp 46adc: 4e75 rts
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
46ade: 7016 moveq #22,%d0
* Exit the critical section and return the user an operational barrier */ *barrier = the_barrier->Object.id; _Thread_Enable_dispatch(); return 0; }
46ae0: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46ae6: 4e5e unlk %fp 46ae8: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _POSIX_Barrier_Allocate();
if ( !the_barrier ) {
_Thread_Enable_dispatch();
46aea: 4eb9 0004 9ba6 jsr 49ba6 <_Thread_Enable_dispatch>
return EAGAIN;
46af0: 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; }
46af2: 4cee 0c0c ffe0 moveml %fp@(-32),%d2-%d3/%a2-%a3 46af8: 4e5e unlk %fp 46afa: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_barrierattr_init( &my_attr );
46afc: 260e movel %fp,%d3 46afe: 0683 ffff fff0 addil #-16,%d3 46b04: 2f03 movel %d3,%sp@- 46b06: 4eb9 0004 6988 jsr 46988 <pthread_barrierattr_init> 46b0c: 588f addql #4,%sp
the_attr = &my_attr;
46b0e: 2043 moveal %d3,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
46b10: 4a90 tstl %a0@ 46b12: 6600 ff60 bnew 46a74 <pthread_barrier_init+0x28>
46b16: 60c6 bras 46ade <pthread_barrier_init+0x92> <== NOT EXECUTED
00046490 <pthread_cleanup_push>:
void pthread_cleanup_push(
void (*routine)( void * ),
void *arg
)
{
46490: 4e56 0000 linkw %fp,#0 46494: 2f03 movel %d3,%sp@- 46496: 262e 000c movel %fp@(12),%d3 4649a: 2f02 movel %d2,%sp@- 4649c: 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 )
464a0: 6754 beqs 464f6 <pthread_cleanup_push+0x66>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
464a2: 2039 0006 0cd8 movel 60cd8 <_Thread_Dispatch_disable_level>,%d0 464a8: 5280 addql #1,%d0 464aa: 23c0 0006 0cd8 movel %d0,60cd8 <_Thread_Dispatch_disable_level>
return;
_Thread_Disable_dispatch();
handler = _Workspace_Allocate( sizeof( POSIX_Cancel_Handler_control ) );
464b0: 4878 0010 pea 10 <INVALID_OPERATION> 464b4: 4eb9 0004 ab9e jsr 4ab9e <_Workspace_Allocate>
if ( handler ) {
464ba: 588f addql #4,%sp 464bc: 4a80 tstl %d0
464be: 6726 beqs 464e6 <pthread_cleanup_push+0x56> <== NEVER TAKEN
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
464c0: 2079 0006 1168 moveal 61168 <_Per_CPU_Information+0xc>,%a0
handler_stack = &thread_support->Cancellation_Handlers;
464c6: 2228 010e movel %a0@(270),%d1
handler->routine = routine;
464ca: 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;
464cc: 0681 0000 00e0 addil #224,%d1
handler->routine = routine;
464d2: 2142 0008 movel %d2,%a0@(8)
handler->arg = arg;
464d6: 2143 000c movel %d3,%a0@(12)
_Chain_Append( handler_stack, &handler->Node );
464da: 2f00 movel %d0,%sp@- 464dc: 2f01 movel %d1,%sp@- 464de: 4eb9 0004 7e90 jsr 47e90 <_Chain_Append> 464e4: 508f addql #8,%sp
} _Thread_Enable_dispatch(); }
464e6: 242e fff8 movel %fp@(-8),%d2 464ea: 262e fffc movel %fp@(-4),%d3 464ee: 4e5e unlk %fp
handler->routine = routine;
handler->arg = arg;
_Chain_Append( handler_stack, &handler->Node );
}
_Thread_Enable_dispatch();
464f0: 4ef9 0004 9626 jmp 49626 <_Thread_Enable_dispatch>
}
464f6: 242e fff8 movel %fp@(-8),%d2 464fa: 262e fffc movel %fp@(-4),%d3 464fe: 4e5e unlk %fp
...
00047354 <pthread_cond_init>:
int pthread_cond_init(
pthread_cond_t *cond,
const pthread_condattr_t *attr
)
{
47354: 4e56 0000 linkw %fp,#0 47358: 2f0b movel %a3,%sp@- 4735a: 2f0a movel %a2,%sp@- 4735c: 246e 000c moveal %fp@(12),%a2
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
47360: 4a8a tstl %a2 47362: 6700 0090 beqw 473f4 <pthread_cond_init+0xa0>
/*
* Be careful about attributes when global!!!
*/
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
47366: 7001 moveq #1,%d0 47368: b0aa 0004 cmpl %a2@(4),%d0
4736c: 6704 beqs 47372 <pthread_cond_init+0x1e> <== NEVER TAKEN
return EINVAL;
if ( !the_attr->is_initialized )
4736e: 4a92 tstl %a2@
47370: 660e bnes 47380 <pthread_cond_init+0x2c>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47372: 246e fff8 moveal %fp@(-8),%a2
if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED )
return EINVAL;
if ( !the_attr->is_initialized )
return EINVAL;
47376: 7016 moveq #22,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47378: 266e fffc moveal %fp@(-4),%a3 4737c: 4e5e unlk %fp 4737e: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
47380: 2039 0006 252c movel 6252c <_Thread_Dispatch_disable_level>,%d0 47386: 5280 addql #1,%d0 47388: 23c0 0006 252c movel %d0,6252c <_Thread_Dispatch_disable_level>
RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
*_POSIX_Condition_variables_Allocate( void )
{
return (POSIX_Condition_variables_Control *)
_Objects_Allocate( &_POSIX_Condition_variables_Information );
4738e: 4879 0006 28dc pea 628dc <_POSIX_Condition_variables_Information> 47394: 4eb9 0004 9d24 jsr 49d24 <_Objects_Allocate>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
4739a: 588f addql #4,%sp 4739c: 2640 moveal %d0,%a3 4739e: 4a80 tstl %d0
473a0: 675c beqs 473fe <pthread_cond_init+0xaa>
_Thread_Enable_dispatch();
return ENOMEM;
}
the_cond->process_shared = the_attr->process_shared;
473a2: 276a 0004 0010 movel %a2@(4),%a3@(16)
the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX;
473a8: 42ab 0014 clrl %a3@(20)
/* XXX some more initialization might need to go here */
_Thread_queue_Initialize(
473ac: 4878 0074 pea 74 <DBL_MANT_DIG+0x3f> 473b0: 4878 0800 pea 800 <D_MAX_EXP+0x1> 473b4: 42a7 clrl %sp@- 473b6: 486b 0018 pea %a3@(24) 473ba: 4eb9 0004 b2e4 jsr 4b2e4 <_Thread_queue_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
473c0: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
473c4: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
473c6: 2079 0006 28f4 moveal 628f4 <_POSIX_Condition_variables_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
473cc: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
473ce: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
&_POSIX_Condition_variables_Information,
&the_cond->Object,
0
);
*cond = the_cond->Object.id;
473d2: 206e 0008 moveal %fp@(8),%a0
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
473d6: 42ab 000c clrl %a3@(12) 473da: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
473dc: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch>
return 0;
}
473e2: 246e fff8 moveal %fp@(-8),%a2
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
473e6: 4fef 0010 lea %sp@(16),%sp 473ea: 4280 clrl %d0
}
473ec: 266e fffc moveal %fp@(-4),%a3 473f0: 4e5e unlk %fp 473f2: 4e75 rts
{
POSIX_Condition_variables_Control *the_cond;
const pthread_condattr_t *the_attr;
if ( attr ) the_attr = attr;
else the_attr = &_POSIX_Condition_variables_Default_attributes;
473f4: 45f9 0005 fde2 lea 5fde2 <_POSIX_Condition_variables_Default_attributes>,%a2 473fa: 6000 ff6a braw 47366 <pthread_cond_init+0x12>
_Thread_Disable_dispatch();
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
473fe: 4eb9 0004 aa6a jsr 4aa6a <_Thread_Enable_dispatch>
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
47404: 246e fff8 moveal %fp@(-8),%a2
the_cond = _POSIX_Condition_variables_Allocate();
if ( !the_cond ) {
_Thread_Enable_dispatch();
return ENOMEM;
47408: 700c moveq #12,%d0
*cond = the_cond->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4740a: 266e fffc moveal %fp@(-4),%a3 4740e: 4e5e unlk %fp
...
000471b4 <pthread_condattr_destroy>:
*/
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
471b4: 4e56 0000 linkw %fp,#0 471b8: 206e 0008 moveal %fp@(8),%a0
if ( !attr || attr->is_initialized == false )
471bc: 4a88 tstl %a0
471be: 670c beqs 471cc <pthread_condattr_destroy+0x18>
471c0: 4a90 tstl %a0@
471c2: 6708 beqs 471cc <pthread_condattr_destroy+0x18> <== NEVER TAKEN
return EINVAL;
attr->is_initialized = false;
return 0;
471c4: 4280 clrl %d0
}
471c6: 4e5e unlk %fp
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
attr->is_initialized = false;
471c8: 4290 clrl %a0@
return 0; }
471ca: 4e75 rts
int pthread_condattr_destroy(
pthread_condattr_t *attr
)
{
if ( !attr || attr->is_initialized == false )
return EINVAL;
471cc: 7016 moveq #22,%d0
attr->is_initialized = false;
return 0;
}
471ce: 4e5e unlk %fp
...
000468dc <pthread_create>:
pthread_t *thread,
const pthread_attr_t *attr,
void *(*start_routine)( void * ),
void *arg
)
{
468dc: 4e56 ff9c linkw %fp,#-100 468e0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 468e4: 246e 000c moveal %fp@(12),%a2 468e8: 262e 0010 movel %fp@(16),%d3
int schedpolicy = SCHED_RR;
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
468ec: 6700 01fc beqw 46aea <pthread_create+0x20e>
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
468f0: 4a8a tstl %a2
468f2: 6738 beqs 4692c <pthread_create+0x50>
if ( !the_attr->is_initialized )
468f4: 4a92 tstl %a2@
468f6: 6726 beqs 4691e <pthread_create+0x42> * stack space if it is allowed to allocate it itself. * * NOTE: If the user provides the stack we will let it drop below * twice the minimum. */ if ( the_attr->stackaddr && !_Stack_Is_enough(the_attr->stacksize) )
468f8: 4aaa 0004 tstl %a2@(4)
468fc: 670c beqs 4690a <pthread_create+0x2e>
468fe: 2039 0005 f7e2 movel 5f7e2 <rtems_minimum_stack_size>,%d0 46904: b0aa 0008 cmpl %a2@(8),%d0
46908: 6214 bhis 4691e <pthread_create+0x42>
* If inheritsched is set to PTHREAD_INHERIT_SCHED, then this thread
* inherits scheduling attributes from the creating thread. If it is
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
4690a: 202a 0010 movel %a2@(16),%d0 4690e: 7201 moveq #1,%d1 46910: b280 cmpl %d0,%d1 46912: 6700 0176 beqw 46a8a <pthread_create+0x1ae> 46916: 123c 0002 moveb #2,%d1 4691a: b280 cmpl %d0,%d1
4691c: 6716 beqs 46934 <pthread_create+0x58>
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
4691e: 7416 moveq #22,%d2
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46920: 2002 movel %d2,%d0 46922: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46928: 4e5e unlk %fp 4692a: 4e75 rts
int rc;
if ( !start_routine )
return EFAULT;
the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
4692c: 45f9 0005 e862 lea 5e862 <_POSIX_Threads_Default_attributes>,%a2 46932: 60c0 bras 468f4 <pthread_create+0x18>
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
46934: 226a 0014 moveal %a2@(20),%a1
schedparam = the_attr->schedparam;
46938: 2e0e movel %fp,%d7 4693a: 2c0e movel %fp,%d6 4693c: 0687 ffff ffe0 addil #-32,%d7 46942: 0686 ffff ffe4 addil #-28,%d6 46948: 2047 moveal %d7,%a0 4694a: 2a0e movel %fp,%d5 4694c: 280e movel %fp,%d4 4694e: 0685 ffff ffe8 addil #-24,%d5 46954: 0684 ffff ffec addil #-20,%d4 4695a: 47ee ffdc lea %fp@(-36),%a3 4695e: 4bee fff0 lea %fp@(-16),%a5 46962: 49ee fff4 lea %fp@(-12),%a4
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
break;
case PTHREAD_EXPLICIT_SCHED:
schedpolicy = the_attr->schedpolicy;
46966: 2d49 ffd8 movel %a1,%fp@(-40)
schedparam = the_attr->schedparam;
4696a: 2246 moveal %d6,%a1 4696c: 20aa 001c movel %a2@(28),%a0@ 46970: 2045 moveal %d5,%a0 46972: 22aa 0020 movel %a2@(32),%a1@ 46976: 2244 moveal %d4,%a1 46978: 26aa 0018 movel %a2@(24),%a3@ 4697c: 20aa 0024 movel %a2@(36),%a0@ 46980: 22aa 0028 movel %a2@(40),%a1@ 46984: 2aaa 002c movel %a2@(44),%a5@ 46988: 28aa 0030 movel %a2@(48),%a4@
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
return ENOTSUP;
4698c: 243c 0000 0086 movel #134,%d2
/*
* Check the contentionscope since rtems only supports PROCESS wide
* contention (i.e. no system wide contention).
*/
if ( the_attr->contentionscope != PTHREAD_SCOPE_PROCESS )
46992: 4aaa 000c tstl %a2@(12)
46996: 6688 bnes 46920 <pthread_create+0x44> <== NEVER TAKEN
return ENOTSUP;
/*
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
46998: 2f2e ffdc movel %fp@(-36),%sp@- 4699c: 4eb9 0004 d20c jsr 4d20c <_POSIX_Priority_Is_valid> 469a2: 588f addql #4,%sp 469a4: 4a00 tstb %d0 469a6: 6700 ff76 beqw 4691e <pthread_create+0x42>
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
469aa: 486e fff8 pea %fp@(-8) 469ae: 486e fffc pea %fp@(-4)
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
469b2: 202e ffdc movel %fp@(-36),%d0
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
469b6: 2f0b movel %a3,%sp@- 469b8: 2f2e ffd8 movel %fp@(-40),%sp@-
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
469bc: 1239 0005 f7e6 moveb 5f7e6 <rtems_maximum_priority>,%d1
* Interpret the scheduling parameters.
*/
if ( !_POSIX_Priority_Is_valid( schedparam.sched_priority ) )
return EINVAL;
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
469c2: 2d40 ffd4 movel %d0,%fp@(-44) 469c6: 1d41 ffd3 moveb %d1,%fp@(-45)
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
469ca: 4eb9 0004 d230 jsr 4d230 <_POSIX_Thread_Translate_sched_param>
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
469d0: 4fef 0010 lea %sp@(16),%sp
core_priority = _POSIX_Priority_To_core( schedparam.sched_priority );
/*
* Set the core scheduling policy information.
*/
rc = _POSIX_Thread_Translate_sched_param(
469d4: 2400 movel %d0,%d2
schedpolicy,
&schedparam,
&budget_algorithm,
&budget_callout
);
if ( rc )
469d6: 6600 ff48 bnew 46920 <pthread_create+0x44>
#endif
/*
* Lock the allocator mutex for protection
*/
_RTEMS_Lock_allocator();
469da: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 469e0: 4eb9 0004 83f4 jsr 483f4 <_API_Mutex_Lock>
* _POSIX_Threads_Allocate
*/
RTEMS_INLINE_ROUTINE Thread_Control *_POSIX_Threads_Allocate( void )
{
return (Thread_Control *) _Objects_Allocate( &_POSIX_Threads_Information );
469e6: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information> 469ec: 4eb9 0004 8ed8 jsr 48ed8 <_Objects_Allocate>
* Allocate the thread control block.
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
469f2: 508f addql #8,%sp 469f4: 2040 moveal %d0,%a0 469f6: 4a80 tstl %d0 469f8: 6700 01d4 beqw 46bce <pthread_create+0x2f2>
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
469fc: 222e fffc movel %fp@(-4),%d1
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
46a00: 2039 0005 f7e2 movel 5f7e2 <rtems_minimum_stack_size>,%d0
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
46a06: 2d41 ffce movel %d1,%fp@(-50) 46a0a: 226e fff8 moveal %fp@(-8),%a1
static inline size_t _POSIX_Threads_Ensure_minimum_stack (
size_t size
)
{
if ( size >= PTHREAD_MINIMUM_STACK_SIZE )
46a0e: d080 addl %d0,%d0
/*
* Initialize the core thread for this task.
*/
name.name_p = NULL; /* posix threads don't have a name by default */
status = _Thread_Initialize(
46a10: 222a 0008 movel %a2@(8),%d1 46a14: b280 cmpl %d0,%d1
46a16: 6302 blss 46a1a <pthread_create+0x13e>
46a18: 2001 movel %d1,%d0 46a1a: 42a7 clrl %sp@- 46a1c: 4281 clrl %d1 46a1e: 122e ffd3 moveb %fp@(-45),%d1 46a22: 92ae ffd4 subl %fp@(-44),%d1 46a26: 42a7 clrl %sp@- 46a28: 2f09 movel %a1,%sp@- 46a2a: 2f2e ffce movel %fp@(-50),%sp@- 46a2e: 4878 0001 pea 1 <ADD> 46a32: 2f01 movel %d1,%sp@- 46a34: 4878 0001 pea 1 <ADD> 46a38: 2f00 movel %d0,%sp@- 46a3a: 2f2a 0004 movel %a2@(4),%sp@- 46a3e: 2f08 movel %a0,%sp@- 46a40: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information> 46a46: 2d48 ffca movel %a0,%fp@(-54) 46a4a: 4eb9 0004 9ce0 jsr 49ce0 <_Thread_Initialize>
budget_callout,
0, /* isr level */
name /* posix threads don't have a name */
);
if ( !status ) {
46a50: 206e ffca moveal %fp@(-54),%a0 46a54: 4fef 002c lea %sp@(44),%sp 46a58: 4a00 tstb %d0 46a5a: 6600 009c bnew 46af8 <pthread_create+0x21c>
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free (
Thread_Control *the_pthread
)
{
_Objects_Free( &_POSIX_Threads_Information, &the_pthread->Object );
46a5e: 2f08 movel %a0,%sp@- 46a60: 4879 0006 1134 pea 61134 <_POSIX_Threads_Information>
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
return EAGAIN;
46a66: 740b moveq #11,%d2 46a68: 4eb9 0004 922c jsr 4922c <_Objects_Free>
name /* posix threads don't have a name */
);
if ( !status ) {
_POSIX_Threads_Free( the_thread );
_RTEMS_Unlock_allocator();
46a6e: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46a74: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock>
return EAGAIN;
46a7a: 4fef 000c lea %sp@(12),%sp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46a7e: 2002 movel %d2,%d0 46a80: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46a86: 4e5e unlk %fp 46a88: 4e75 rts
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46a8a: 2079 0006 13fc moveal 613fc <_Per_CPU_Information+0xc>,%a0
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
46a90: 47ee ffdc lea %fp@(-36),%a3 46a94: 2e0e movel %fp,%d7 46a96: 0687 ffff ffe0 addil #-32,%d7 46a9c: 2247 moveal %d7,%a1 46a9e: 2c0e movel %fp,%d6 46aa0: 0686 ffff ffe4 addil #-28,%d6 46aa6: 2a0e movel %fp,%d5 46aa8: 0685 ffff ffe8 addil #-24,%d5 46aae: 280e movel %fp,%d4 46ab0: 0684 ffff ffec addil #-20,%d4 46ab6: 4bee fff0 lea %fp@(-16),%a5 46aba: 49ee fff4 lea %fp@(-12),%a4
* PTHREAD_EXPLICIT_SCHED, then scheduling parameters come from the
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46abe: 2028 010e movel %a0@(270),%d0
schedpolicy = api->schedpolicy;
schedparam = api->schedparam;
46ac2: 2040 moveal %d0,%a0 46ac4: 41e8 0084 lea %a0@(132),%a0 46ac8: 2698 movel %a0@+,%a3@ 46aca: 2298 movel %a0@+,%a1@ 46acc: 2246 moveal %d6,%a1 46ace: 2298 movel %a0@+,%a1@ 46ad0: 2245 moveal %d5,%a1 46ad2: 2298 movel %a0@+,%a1@ 46ad4: 2244 moveal %d4,%a1 46ad6: 2298 movel %a0@+,%a1@ 46ad8: 2a98 movel %a0@+,%a5@ 46ada: 2890 movel %a0@,%a4@
* attributes structure.
*/
switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy;
46adc: 2040 moveal %d0,%a0 46ade: 2028 0080 movel %a0@(128),%d0 46ae2: 2d40 ffd8 movel %d0,%fp@(-40)
schedparam = api->schedparam;
break;
46ae6: 6000 fea4 braw 4698c <pthread_create+0xb0>
struct sched_param schedparam;
Objects_Name name;
int rc;
if ( !start_routine )
return EFAULT;
46aea: 740e moveq #14,%d2
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46aec: 2002 movel %d2,%d0 46aee: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46af4: 4e5e unlk %fp 46af6: 4e75 rts
}
/*
* finish initializing the per API structure
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
46af8: 2268 010e moveal %a0@(270),%a1
api->Attributes = *the_attr;
46afc: 4878 003c pea 3c <DBL_MANT_DIG+0x7> 46b00: 2f0a movel %a2,%sp@- 46b02: 2d48 ffca movel %a0,%fp@(-54) 46b06: 2f09 movel %a1,%sp@- 46b08: 2d49 ffc6 movel %a1,%fp@(-58) 46b0c: 4eb9 0005 025c jsr 5025c <memcpy>
api->detachstate = the_attr->detachstate;
46b12: 226e ffc6 moveal %fp@(-58),%a1 46b16: 236a 0038 003c movel %a2@(56),%a1@(60)
api->schedpolicy = schedpolicy; api->schedparam = schedparam;
46b1c: 45e9 0084 lea %a1@(132),%a2 46b20: 24d3 movel %a3@,%a2@+ 46b22: 2647 moveal %d7,%a3 46b24: 24d3 movel %a3@,%a2@+ 46b26: 2646 moveal %d6,%a3 46b28: 24d3 movel %a3@,%a2@+ 46b2a: 2645 moveal %d5,%a3 46b2c: 24d3 movel %a3@,%a2@+ 46b2e: 2644 moveal %d4,%a3 46b30: 24d3 movel %a3@,%a2@+ 46b32: 24d5 movel %a5@,%a2@+
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
46b34: 202e ffd8 movel %fp@(-40),%d0
api->schedparam = schedparam;
46b38: 2494 movel %a4@,%a2@
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
46b3a: 206e ffca moveal %fp@(-54),%a0
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *the_attr;
api->detachstate = the_attr->detachstate;
api->schedpolicy = schedpolicy;
46b3e: 2340 0080 movel %d0,%a1@(128)
api->schedparam = schedparam;
/*
* POSIX threads are allocated and started in one operation.
*/
status = _Thread_Start(
46b42: 42a7 clrl %sp@- 46b44: 2f2e 0014 movel %fp@(20),%sp@- 46b48: 2f03 movel %d3,%sp@- 46b4a: 4878 0001 pea 1 <ADD> 46b4e: 2f08 movel %a0,%sp@- 46b50: 4eb9 0004 a864 jsr 4a864 <_Thread_Start>
_RTEMS_Unlock_allocator();
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
46b56: 206e ffca moveal %fp@(-54),%a0 46b5a: 4fef 0020 lea %sp@(32),%sp 46b5e: 7204 moveq #4,%d1 46b60: 226e ffc6 moveal %fp@(-58),%a1 46b64: b2ae ffd8 cmpl %fp@(-40),%d1
46b68: 6722 beqs 46b8c <pthread_create+0x2b0>
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
46b6a: 226e 0008 moveal %fp@(8),%a1 46b6e: 22a8 0008 movel %a0@(8),%a1@
_RTEMS_Unlock_allocator();
46b72: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46b78: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock>
return 0;
46b7e: 588f addql #4,%sp
}
46b80: 2002 movel %d2,%d0 46b82: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 46b88: 4e5e unlk %fp 46b8a: 4e75 rts
return EINVAL;
}
#endif
if ( schedpolicy == SCHED_SPORADIC ) {
_Watchdog_Insert_ticks(
46b8c: 4869 008c pea %a1@(140) 46b90: 4eb9 0004 abac jsr 4abac <_Timespec_To_ticks>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46b96: 226e ffc6 moveal %fp@(-58),%a1 46b9a: 2340 00b0 movel %d0,%a1@(176)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46b9e: 4869 00a4 pea %a1@(164) 46ba2: 4879 0006 102e pea 6102e <_Watchdog_Ticks_chain> 46ba8: 4eb9 0004 af08 jsr 4af08 <_Watchdog_Insert> 46bae: 206e ffca moveal %fp@(-54),%a0 46bb2: 4fef 000c lea %sp@(12),%sp
}
/*
* Return the id and indicate we successfully created the thread
*/
*thread = the_thread->Object.id;
46bb6: 226e 0008 moveal %fp@(8),%a1 46bba: 22a8 0008 movel %a0@(8),%a1@
_RTEMS_Unlock_allocator();
46bbe: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@- 46bc4: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock>
return 0;
46bca: 588f addql #4,%sp 46bcc: 60b2 bras 46b80 <pthread_create+0x2a4>
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
46bce: 2f39 0006 100e movel 6100e <_RTEMS_Allocator_Mutex>,%sp@-
return EAGAIN;
46bd4: 143c 000b moveb #11,%d2
*
* NOTE: Global threads are not currently supported.
*/
the_thread = _POSIX_Threads_Allocate();
if ( !the_thread ) {
_RTEMS_Unlock_allocator();
46bd8: 4eb9 0004 8454 jsr 48454 <_API_Mutex_Unlock>
return EAGAIN;
46bde: 588f addql #4,%sp
*/
*thread = the_thread->Object.id;
_RTEMS_Unlock_allocator();
return 0;
}
46be0: 2002 movel %d2,%d0 46be2: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5
46be8: 4e5e unlk %fp <== NOT EXECUTED
0004e46c <pthread_exit>:
}
void pthread_exit(
void *value_ptr
)
{
4e46c: 4e56 0000 linkw %fp,#0
_POSIX_Thread_Exit( _Thread_Executing, value_ptr );
4e470: 2f2e 0008 movel %fp@(8),%sp@- 4e474: 2f39 0005 ff6c movel 5ff6c <_Per_CPU_Information+0xc>,%sp@- 4e47a: 4eb9 0004 e3fc jsr 4e3fc <_POSIX_Thread_Exit>
4e480: 508f addql #8,%sp <== NOT EXECUTED
}
4e482: 4e5e unlk %fp <== NOT EXECUTED
...
0004659c <pthread_key_create>:
int pthread_key_create(
pthread_key_t *key,
void (*destructor)( void * )
)
{
4659c: 4e56 ffe4 linkw %fp,#-28 465a0: 2039 0006 1aac movel 61aac <_Thread_Dispatch_disable_level>,%d0 465a6: 5280 addql #1,%d0 465a8: 48d7 3c1c moveml %d2-%d4/%a2-%a5,%sp@ 465ac: 23c0 0006 1aac movel %d0,61aac <_Thread_Dispatch_disable_level>
* the inactive chain of free keys control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void )
{
return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information );
465b2: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 465b8: 4eb9 0004 8b6c jsr 48b6c <_Objects_Allocate>
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
465be: 588f addql #4,%sp 465c0: 2640 moveal %d0,%a3 465c2: 4a80 tstl %d0 465c4: 6700 0094 beqw 4665a <pthread_key_create+0xbe>
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
465c8: 49f9 0006 1a6c lea 61a6c <_Objects_Information_table+0x4>,%a4
int _EXFUN(pthread_once,
(pthread_once_t *__once_control, void (*__init_routine)(void)));
/* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */
int _EXFUN(pthread_key_create,
465ce: 45eb 0018 lea %a3@(24),%a2
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
465d2: 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 );
465d4: 4bf9 0004 aebe lea 4aebe <_Workspace_Allocate>,%a5
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
465da: 283c 0005 0148 movel #328008,%d4
if ( !the_key ) {
_Thread_Enable_dispatch();
return EAGAIN;
}
the_key->destructor = destructor;
465e0: 276e 000c 0010 movel %fp@(12),%a3@(16)
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
if ( _Objects_Information_table[ the_api ] ) {
465e6: 205c moveal %a4@+,%a0 465e8: 4a88 tstl %a0
465ea: 6760 beqs 4664c <pthread_key_create+0xb0> <== NEVER TAKEN
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
465ec: 2068 0004 moveal %a0@(4),%a0 465f0: 4282 clrl %d2 465f2: 3428 000e movew %a0@(14),%d2 465f6: 5282 addql #1,%d2
INTERNAL_ERROR_CORE,
true,
INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY
);
#endif
bytes_to_allocate = sizeof( void * ) *
465f8: e58a lsll #2,%d2
(_Objects_Information_table[ the_api ][ 1 ]->maximum + 1);
table = _Workspace_Allocate( bytes_to_allocate );
465fa: 2f02 movel %d2,%sp@- 465fc: 4e95 jsr %a5@
if ( !table ) {
465fe: 588f addql #4,%sp 46600: 4a80 tstl %d0
46602: 6768 beqs 4666c <pthread_key_create+0xd0>
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
46604: 2480 movel %d0,%a2@
memset( table, '\0', bytes_to_allocate );
46606: 2044 moveal %d4,%a0
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
46608: 5283 addql #1,%d3 4660a: 588a addql #4,%a2
_Thread_Enable_dispatch();
return ENOMEM;
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
4660c: 2f02 movel %d2,%sp@- 4660e: 42a7 clrl %sp@- 46610: 2f00 movel %d0,%sp@- 46612: 4e90 jsr %a0@ 46614: 4fef 000c lea %sp@(12),%sp
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
46618: 7004 moveq #4,%d0 4661a: b083 cmpl %d3,%d0
4661c: 66c8 bnes 465e6 <pthread_key_create+0x4a>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
4661e: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
46622: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
46624: 2079 0006 1e3a moveal 61e3a <_POSIX_Keys_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
4662a: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4662c: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
}
_Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 );
*key = the_key->Object.id;
46630: 206e 0008 moveal %fp@(8),%a0
_Objects_Get_index( the_object->id ),
the_object
);
/* ASSERT: information->is_string == false */
the_object->name.name_u32 = name;
46634: 42ab 000c clrl %a3@(12) 46638: 2080 movel %d0,%a0@
_Thread_Enable_dispatch();
4663a: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch>
return 0;
}
46640: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
46646: 4280 clrl %d0
}
46648: 4e5e unlk %fp 4664a: 4e75 rts
}
the_key->Values[ the_api ] = table;
memset( table, '\0', bytes_to_allocate );
} else {
the_key->Values[ the_api ] = NULL;
4664c: 4292 clrl %a2@ <== NOT EXECUTED
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
the_api <= OBJECTS_APIS_LAST;
the_api++ ) {
4664e: 5283 addql #1,%d3 <== NOT EXECUTED 46650: 588a addql #4,%a2 <== NOT EXECUTED
* APIs are optional.
*
* NOTE: Currently RTEMS Classic API tasks are always enabled.
*/
for ( the_api = 1;
46652: 7004 moveq #4,%d0 <== NOT EXECUTED 46654: b083 cmpl %d3,%d0 <== NOT EXECUTED 46656: 668e bnes 465e6 <pthread_key_create+0x4a> <== NOT EXECUTED 46658: 60c4 bras 4661e <pthread_key_create+0x82> <== NOT EXECUTED
_Thread_Disable_dispatch();
the_key = _POSIX_Keys_Allocate();
if ( !the_key ) {
_Thread_Enable_dispatch();
4665a: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch>
return EAGAIN;
46660: 700b moveq #11,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
46662: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 46668: 4e5e unlk %fp 4666a: 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;
4666c: 2403 movel %d3,%d2 4666e: 5382 subql #1,%d2
46670: 6716 beqs 46688 <pthread_key_create+0xec>
46672: 49f9 0004 aeda lea 4aeda <_Workspace_Free>,%a4 46678: 45f3 3c14 lea %a3@(00000014,%d3:l:4),%a2
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
4667c: 2f22 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-- )
4667e: 5382 subql #1,%d2
_Workspace_Free( the_key->Values[ the_api ] );
46680: 4e94 jsr %a4@
#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;
46682: 588f addql #4,%sp 46684: 4a82 tstl %d2
46686: 66f4 bnes 4667c <pthread_key_create+0xe0>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
46688: 2f0b movel %a3,%sp@- 4668a: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 46690: 4eb9 0004 8ec0 jsr 48ec0 <_Objects_Free>
the_api >= 1;
the_api-- )
_Workspace_Free( the_key->Values[ the_api ] );
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
46696: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch>
return ENOMEM;
4669c: 508f addql #8,%sp 4669e: 700c moveq #12,%d0
*key = the_key->Object.id;
_Thread_Enable_dispatch();
return 0;
}
466a0: 4cee 3c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a5 466a6: 4e5e unlk %fp
...
000466ac <pthread_key_delete>:
*/
int pthread_key_delete(
pthread_key_t key
)
{
466ac: 4e56 ffec linkw %fp,#-20 466b0: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@
pthread_key_t id,
Objects_Locations *location
)
{
return (POSIX_Keys_Control *)
_Objects_Get( &_POSIX_Keys_Information, (Objects_Id) id, location );
466b4: 486e fffc pea %fp@(-4) 466b8: 2f2e 0008 movel %fp@(8),%sp@- 466bc: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 466c2: 4eb9 0004 9028 jsr 49028 <_Objects_Get>
register POSIX_Keys_Control *the_key;
Objects_Locations location;
uint32_t the_api;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
466c8: 4fef 000c lea %sp@(12),%sp 466cc: 2600 movel %d0,%d3 466ce: 4aae fffc tstl %fp@(-4)
466d2: 6652 bnes 46726 <pthread_key_delete+0x7a>
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
466d4: 2f00 movel %d0,%sp@- 466d6: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information>
(pthread_key_t __key, _CONST void *__value));
void * _EXFUN(pthread_getspecific, (pthread_key_t __key));
/* Thread-Specific Data Key Deletion, P1003.1c/Draft 10, p. 167 */
int _EXFUN(pthread_key_delete, (pthread_key_t __key));
466dc: 2440 moveal %d0,%a2 466de: 45ea 0018 lea %a2@(24),%a2 466e2: 7403 moveq #3,%d2
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
if ( the_key->Values[ the_api ] )
_Workspace_Free( the_key->Values[ the_api ] );
466e4: 47f9 0004 aeda lea 4aeda <_Workspace_Free>,%a3
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
466ea: 4eb9 0004 8bfc jsr 48bfc <_Objects_Close> 466f0: 508f addql #8,%sp
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
if ( the_key->Values[ the_api ] )
466f2: 201a movel %a2@+,%d0
_Workspace_Free( the_key->Values[ the_api ] );
466f4: 5382 subql #1,%d2
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
if ( the_key->Values[ the_api ] )
466f6: 4a80 tstl %d0
466f8: 6706 beqs 46700 <pthread_key_delete+0x54> <== NEVER TAKEN
_Workspace_Free( the_key->Values[ the_api ] );
466fa: 2f00 movel %d0,%sp@- 466fc: 4e93 jsr %a3@ 466fe: 588f addql #4,%sp
switch ( location ) {
case OBJECTS_LOCAL:
_Objects_Close( &_POSIX_Keys_Information, &the_key->Object );
for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ )
46700: 4a82 tstl %d2
46702: 66ee bnes 466f2 <pthread_key_delete+0x46>
*/
RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free (
POSIX_Keys_Control *the_key
)
{
_Objects_Free( &_POSIX_Keys_Information, &the_key->Object );
46704: 2f03 movel %d3,%sp@- 46706: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 4670c: 4eb9 0004 8ec0 jsr 48ec0 <_Objects_Free>
* NOTE: The destructor is not called and it is the responsibility
* of the application to free the memory.
*/
_POSIX_Keys_Free( the_key );
_Thread_Enable_dispatch();
46712: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch>
return 0;
46718: 508f addql #8,%sp 4671a: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4671c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 46722: 4e5e unlk %fp 46724: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
46726: 7016 moveq #22,%d0
}
46728: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 4672e: 4e5e unlk %fp
...
000487b8 <pthread_mutex_setprioceiling>:
int pthread_mutex_setprioceiling(
pthread_mutex_t *mutex,
int prioceiling,
int *old_ceiling
)
{
487b8: 4e56 ffec linkw %fp,#-20 487bc: 48d7 041c moveml %d2-%d4/%a2,%sp@ 487c0: 262e 0008 movel %fp@(8),%d3 487c4: 242e 000c movel %fp@(12),%d2 487c8: 246e 0010 moveal %fp@(16),%a2
register POSIX_Mutex_Control *the_mutex;
Objects_Locations location;
Priority_Control the_priority;
if ( !old_ceiling )
487cc: 4a8a tstl %a2
487ce: 670e beqs 487de <pthread_mutex_setprioceiling+0x26>
return EINVAL;
if ( !_POSIX_Priority_Is_valid( prioceiling ) )
487d0: 2f02 movel %d2,%sp@- 487d2: 4eb9 0004 89bc jsr 489bc <_POSIX_Priority_Is_valid> 487d8: 588f addql #4,%sp 487da: 4a00 tstb %d0
487dc: 660c bnes 487ea <pthread_mutex_setprioceiling+0x32>
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
487de: 7016 moveq #22,%d0
}
487e0: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2 487e6: 4e5e unlk %fp 487e8: 4e75 rts
/*
* Must acquire the mutex before we can change it's ceiling.
* POSIX says block until we acquire it.
*/
(void) pthread_mutex_lock( mutex );
487ea: 2f03 movel %d3,%sp@- 487ec: 1839 0006 3616 moveb 63616 <rtems_maximum_priority>,%d4 487f2: 4eb9 0004 8734 jsr 48734 <pthread_mutex_lock>
* operations. * * NOTE: This makes it easier to get 100% binary coverage since the * bad Id case is handled by the switch. */ the_mutex = _POSIX_Mutex_Get( mutex, &location );
487f8: 486e fffc pea %fp@(-4) 487fc: 2f03 movel %d3,%sp@- 487fe: 4eb9 0004 84b0 jsr 484b0 <_POSIX_Mutex_Get>
switch ( location ) {
48804: 4fef 000c lea %sp@(12),%sp 48808: 4aae fffc tstl %fp@(-4)
4880c: 66d0 bnes 487de <pthread_mutex_setprioceiling+0x26><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4880e: 4281 clrl %d1 48810: 1239 0006 3616 moveb 63616 <rtems_maximum_priority>,%d1 48816: 2040 moveal %d0,%a0 48818: 92a8 005e subl %a0@(94),%d1
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
4881c: 0284 0000 00ff andil #255,%d4
RTEMS_INLINE_ROUTINE int _POSIX_Priority_From_core(
Priority_Control priority
)
{
return (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
48822: 2481 movel %d1,%a2@
RTEMS_INLINE_ROUTINE Priority_Control _POSIX_Priority_To_core(
int priority
)
{
return (Priority_Control) (POSIX_SCHEDULER_MAXIMUM_PRIORITY - priority + 1);
48824: 9882 subl %d2,%d4 48826: 2144 005e movel %d4,%a0@(94)
);
the_mutex->Mutex.Attributes.priority_ceiling = the_priority;
/*
* We are required to unlock the mutex before we return.
*/
_CORE_mutex_Surrender(
4882a: 42a7 clrl %sp@- 4882c: 2f28 0008 movel %a0@(8),%sp@- 48830: 4868 0014 pea %a0@(20) 48834: 4eb9 0004 a744 jsr 4a744 <_CORE_mutex_Surrender>
&the_mutex->Mutex,
the_mutex->Object.id,
NULL
);
_Thread_Enable_dispatch();
4883a: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch>
return 0;
48840: 4fef 000c lea %sp@(12),%sp 48844: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
48846: 4cee 041c ffec moveml %fp@(-20),%d2-%d4/%a2
4884c: 4e5e unlk %fp <== NOT EXECUTED
00046288 <pthread_mutexattr_gettype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_gettype(
const pthread_mutexattr_t *attr,
int *type
)
{
46288: 4e56 0000 linkw %fp,#0 4628c: 206e 0008 moveal %fp@(8),%a0 46290: 226e 000c moveal %fp@(12),%a1
if ( !attr )
46294: 4a88 tstl %a0
46296: 6712 beqs 462aa <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !attr->is_initialized )
46298: 4a90 tstl %a0@
4629a: 670e beqs 462aa <pthread_mutexattr_gettype+0x22>
return EINVAL;
if ( !type )
4629c: 4a89 tstl %a1
4629e: 670a beqs 462aa <pthread_mutexattr_gettype+0x22> <== NEVER TAKEN
return EINVAL;
*type = attr->type;
462a0: 22a8 0010 movel %a0@(16),%a1@
return 0;
462a4: 4280 clrl %d0
}
462a6: 4e5e unlk %fp 462a8: 4e75 rts
if ( !attr->is_initialized )
return EINVAL;
if ( !type )
return EINVAL;
462aa: 7016 moveq #22,%d0
*type = attr->type;
return 0;
}
462ac: 4e5e unlk %fp <== NOT EXECUTED
00048404 <pthread_mutexattr_setpshared>:
int pthread_mutexattr_setpshared(
pthread_mutexattr_t *attr,
int pshared
)
{
48404: 4e56 0000 linkw %fp,#0 48408: 206e 0008 moveal %fp@(8),%a0 4840c: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
48410: 4a88 tstl %a0
48412: 670a beqs 4841e <pthread_mutexattr_setpshared+0x1a>
48414: 4a90 tstl %a0@
48416: 6706 beqs 4841e <pthread_mutexattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
48418: 7201 moveq #1,%d1 4841a: b280 cmpl %d0,%d1
4841c: 6406 bccs 48424 <pthread_mutexattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
4841e: 7016 moveq #22,%d0
} }
48420: 4e5e unlk %fp 48422: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
48424: 2140 0004 movel %d0,%a0@(4)
return 0;
48428: 4280 clrl %d0
default:
return EINVAL;
}
}
4842a: 4e5e unlk %fp
...
000462ec <pthread_mutexattr_settype>:
#if defined(_UNIX98_THREAD_MUTEX_ATTRIBUTES)
int pthread_mutexattr_settype(
pthread_mutexattr_t *attr,
int type
)
{
462ec: 4e56 0000 linkw %fp,#0 462f0: 206e 0008 moveal %fp@(8),%a0 462f4: 202e 000c movel %fp@(12),%d0
if ( !attr || !attr->is_initialized )
462f8: 4a88 tstl %a0
462fa: 670a beqs 46306 <pthread_mutexattr_settype+0x1a>
462fc: 4a90 tstl %a0@
462fe: 6706 beqs 46306 <pthread_mutexattr_settype+0x1a> <== NEVER TAKEN
return EINVAL;
switch ( type ) {
46300: 7203 moveq #3,%d1 46302: b280 cmpl %d0,%d1
46304: 6406 bccs 4630c <pthread_mutexattr_settype+0x20>
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
return 0;
default:
return EINVAL;
46306: 7016 moveq #22,%d0
} }
46308: 4e5e unlk %fp 4630a: 4e75 rts
switch ( type ) {
case PTHREAD_MUTEX_NORMAL:
case PTHREAD_MUTEX_RECURSIVE:
case PTHREAD_MUTEX_ERRORCHECK:
case PTHREAD_MUTEX_DEFAULT:
attr->type = type;
4630c: 2140 0010 movel %d0,%a0@(16)
return 0;
46310: 4280 clrl %d0
default:
return EINVAL;
}
}
46312: 4e5e unlk %fp
...
00047094 <pthread_once>:
int pthread_once(
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
47094: 4e56 ffec linkw %fp,#-20 47098: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 4709c: 246e 0008 moveal %fp@(8),%a2 470a0: 266e 000c moveal %fp@(12),%a3
if ( !once_control || !init_routine )
470a4: 4a8a tstl %a2
470a6: 6772 beqs 4711a <pthread_once+0x86>
470a8: 4a8b tstl %a3
470aa: 676e beqs 4711a <pthread_once+0x86>
return EINVAL;
if ( !once_control->init_executed ) {
470ac: 4aaa 0004 tstl %a2@(4)
470b0: 670c beqs 470be <pthread_once+0x2a>
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
470b2: 4280 clrl %d0
}
470b4: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 470ba: 4e5e unlk %fp 470bc: 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);
470be: 240e movel %fp,%d2 470c0: 5982 subql #4,%d2 470c2: 49f9 0004 7d54 lea 47d54 <rtems_task_mode>,%a4 470c8: 2f02 movel %d2,%sp@- 470ca: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 470ce: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 470d2: 4e94 jsr %a4@
if ( !once_control->init_executed ) {
470d4: 4fef 000c lea %sp@(12),%sp 470d8: 4aaa 0004 tstl %a2@(4)
470dc: 671c beqs 470fa <pthread_once+0x66> <== ALWAYS TAKEN
once_control->is_initialized = true;
once_control->init_executed = true;
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
470de: 2f02 movel %d2,%sp@- <== NOT EXECUTED 470e0: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 470e4: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 470e8: 4e94 jsr %a4@ <== NOT EXECUTED 470ea: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
} return 0;
470ee: 4280 clrl %d0 <== NOT EXECUTED
}
470f0: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 470f6: 4e5e unlk %fp 470f8: 4e75 rts
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;
470fa: 7001 moveq #1,%d0 470fc: 2480 movel %d0,%a2@
once_control->init_executed = true;
470fe: 7001 moveq #1,%d0 47100: 2540 0004 movel %d0,%a2@(4)
(*init_routine)();
47104: 4e93 jsr %a3@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
47106: 2f02 movel %d2,%sp@- 47108: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4710c: 2f2e fffc movel %fp@(-4),%sp@- 47110: 4e94 jsr %a4@ 47112: 4fef 000c lea %sp@(12),%sp
} return 0;
47116: 4280 clrl %d0 47118: 60d6 bras 470f0 <pthread_once+0x5c>
pthread_once_t *once_control,
void (*init_routine)(void)
)
{
if ( !once_control || !init_routine )
return EINVAL;
4711a: 7016 moveq #22,%d0
(*init_routine)();
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
}
return 0;
}
4711c: 4cee 1c04 ffec moveml %fp@(-20),%d2/%a2-%a4 47122: 4e5e unlk %fp
...
00047498 <pthread_rwlock_init>:
int pthread_rwlock_init(
pthread_rwlock_t *rwlock,
const pthread_rwlockattr_t *attr
)
{
47498: 4e56 ffe8 linkw %fp,#-24 4749c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 474a0: 246e 0008 moveal %fp@(8),%a2 474a4: 242e 000c movel %fp@(12),%d2
const pthread_rwlockattr_t *the_attr;
/*
* Error check parameters
*/
if ( !rwlock )
474a8: 4a8a tstl %a2
474aa: 676e beqs 4751a <pthread_rwlock_init+0x82>
return EINVAL;
/*
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
474ac: 4a82 tstl %d2 474ae: 6700 0088 beqw 47538 <pthread_rwlock_init+0xa0> 474b2: 2042 moveal %d2,%a0
}
/*
* Now start error checking the attributes that we are going to use
*/
if ( !the_attr->is_initialized )
474b4: 4a90 tstl %a0@
474b6: 6762 beqs 4751a <pthread_rwlock_init+0x82> <== NEVER TAKEN
return EINVAL;
switch ( the_attr->process_shared ) {
474b8: 4aa8 0004 tstl %a0@(4)
474bc: 665c bnes 4751a <pthread_rwlock_init+0x82> <== NEVER TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
474be: 2039 0006 2910 movel 62910 <_Thread_Dispatch_disable_level>,%d0 474c4: 5280 addql #1,%d0 474c6: 23c0 0006 2910 movel %d0,62910 <_Thread_Dispatch_disable_level>
* the inactive chain of free RWLock control blocks.
*/
RTEMS_INLINE_ROUTINE POSIX_RWLock_Control *_POSIX_RWLock_Allocate( void )
{
return (POSIX_RWLock_Control *)
_Objects_Allocate( &_POSIX_RWLock_Information );
474cc: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 474d2: 4eb9 0004 9e68 jsr 49e68 <_Objects_Allocate>
*/
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
474d8: 588f addql #4,%sp 474da: 2640 moveal %d0,%a3 474dc: 4a80 tstl %d0
474de: 6746 beqs 47526 <pthread_rwlock_init+0x8e>
_Thread_Enable_dispatch();
return EAGAIN;
}
_CORE_RWLock_Initialize( &the_rwlock->RWLock, &the_attributes );
474e0: 486e fffc pea %fp@(-4) 474e4: 486b 0010 pea %a3@(16) 474e8: 4eb9 0004 952c jsr 4952c <_CORE_RWLock_Initialize>
uint32_t name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
474ee: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
474f2: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
474f4: 2079 0006 2ab6 moveal 62ab6 <_POSIX_RWLock_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
uint32_t name
)
{
_Objects_Set_local_object(
474fa: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
474fc: 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;
47500: 42ab 000c clrl %a3@(12)
&_POSIX_RWLock_Information,
&the_rwlock->Object,
0
);
*rwlock = the_rwlock->Object.id;
47504: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
47506: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch>
return 0;
4750c: 508f addql #8,%sp 4750e: 4280 clrl %d0
}
47510: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47516: 4e5e unlk %fp 47518: 4e75 rts
switch ( the_attr->process_shared ) {
case PTHREAD_PROCESS_PRIVATE: /* only supported values */
break;
case PTHREAD_PROCESS_SHARED:
default:
return EINVAL;
4751a: 7016 moveq #22,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4751c: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47522: 4e5e unlk %fp 47524: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_rwlock = _POSIX_RWLock_Allocate();
if ( !the_rwlock ) {
_Thread_Enable_dispatch();
47526: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch>
return EAGAIN;
4752c: 700b moveq #11,%d0
*rwlock = the_rwlock->Object.id;
_Thread_Enable_dispatch();
return 0;
}
4752e: 4cee 0c04 ffe8 moveml %fp@(-24),%d2/%a2-%a3 47534: 4e5e unlk %fp 47536: 4e75 rts
* If the user passed in NULL, use the default attributes
*/
if ( attr ) {
the_attr = attr;
} else {
(void) pthread_rwlockattr_init( &default_attr );
47538: 240e movel %fp,%d2 4753a: 0682 ffff fff4 addil #-12,%d2 47540: 2f02 movel %d2,%sp@- 47542: 4eb9 0004 7fd0 jsr 47fd0 <pthread_rwlockattr_init> 47548: 588f addql #4,%sp
the_attr = &default_attr;
4754a: 2042 moveal %d2,%a0 4754c: 6000 ff66 braw 474b4 <pthread_rwlock_init+0x1c>
000475bc <pthread_rwlock_timedrdlock>:
int pthread_rwlock_timedrdlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
475bc: 4e56 ffec linkw %fp,#-20 475c0: 48d7 040c moveml %d2-%d3/%a2,%sp@ 475c4: 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 )
475c8: 4a8a tstl %a2 475ca: 6700 0082 beqw 4764e <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 );
475ce: 486e fff8 pea %fp@(-8) 475d2: 2f2e 000c movel %fp@(12),%sp@- 475d6: 4eb9 0004 df40 jsr 4df40 <_POSIX_Absolute_timeout_to_ticks> 475dc: 486e fffc pea %fp@(-4) 475e0: 2400 movel %d0,%d2 475e2: 2f12 movel %a2@,%sp@- 475e4: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 475ea: 4eb9 0004 a324 jsr 4a324 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
475f0: 4fef 0014 lea %sp@(20),%sp 475f4: 4aae fffc tstl %fp@(-4)
475f8: 6654 bnes 4764e <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,
475fa: 7203 moveq #3,%d1 475fc: b282 cmpl %d2,%d1 475fe: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_reading(
47600: 42a7 clrl %sp@- 47602: 2f2e fff8 movel %fp@(-8),%sp@- 47606: 4483 negl %d3 47608: 4281 clrl %d1 4760a: 1203 moveb %d3,%d1 4760c: 2040 moveal %d0,%a0 4760e: 2f01 movel %d1,%sp@- 47610: 2f12 movel %a2@,%sp@- 47612: 4868 0010 pea %a0@(16) 47616: 4eb9 0004 9560 jsr 49560 <_CORE_RWLock_Obtain_for_reading>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
4761c: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch>
if ( !do_wait ) {
47622: 4fef 0014 lea %sp@(20),%sp 47626: 4a03 tstb %d3
47628: 6644 bnes 4766e <pthread_rwlock_timedrdlock+0xb2>
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
4762a: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 47630: 7202 moveq #2,%d1 47632: 2028 0034 movel %a0@(52),%d0 47636: b280 cmpl %d0,%d1
47638: 6720 beqs 4765a <pthread_rwlock_timedrdlock+0x9e>
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4763a: 2f00 movel %d0,%sp@- 4763c: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47642: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47644: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4764a: 4e5e unlk %fp 4764c: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
4764e: 7016 moveq #22,%d0
}
47650: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47656: 4e5e unlk %fp 47658: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4765a: 4a82 tstl %d2
4765c: 67f0 beqs 4764e <pthread_rwlock_timedrdlock+0x92><== NEVER TAKEN
4765e: b282 cmpl %d2,%d1
47660: 65d8 bcss 4763a <pthread_rwlock_timedrdlock+0x7e><== NEVER TAKEN
case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT;
47662: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47664: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4766a: 4e5e unlk %fp 4766c: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait ) {
if ( _Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE ) {
switch (status) {
4766e: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 47674: 2028 0034 movel %a0@(52),%d0
break;
}
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47678: 2f00 movel %d0,%sp@- 4767a: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47680: 588f addql #4,%sp 47682: 60c0 bras 47644 <pthread_rwlock_timedrdlock+0x88>
00047684 <pthread_rwlock_timedwrlock>:
int pthread_rwlock_timedwrlock(
pthread_rwlock_t *rwlock,
const struct timespec *abstime
)
{
47684: 4e56 ffec linkw %fp,#-20 47688: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4768c: 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 )
47690: 4a8a tstl %a2 47692: 6700 0082 beqw 47716 <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 );
47696: 486e fff8 pea %fp@(-8) 4769a: 2f2e 000c movel %fp@(12),%sp@- 4769e: 4eb9 0004 df40 jsr 4df40 <_POSIX_Absolute_timeout_to_ticks> 476a4: 486e fffc pea %fp@(-4) 476a8: 2400 movel %d0,%d2 476aa: 2f12 movel %a2@,%sp@- 476ac: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 476b2: 4eb9 0004 a324 jsr 4a324 <_Objects_Get>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
do_wait = false;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
476b8: 4fef 0014 lea %sp@(20),%sp 476bc: 4aae fffc tstl %fp@(-4)
476c0: 6654 bnes 47716 <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,
476c2: 7203 moveq #3,%d1 476c4: b282 cmpl %d2,%d1 476c6: 57c3 seq %d3
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
476c8: 42a7 clrl %sp@- 476ca: 2f2e fff8 movel %fp@(-8),%sp@- 476ce: 4483 negl %d3 476d0: 4281 clrl %d1 476d2: 1203 moveb %d3,%d1 476d4: 2040 moveal %d0,%a0 476d6: 2f01 movel %d1,%sp@- 476d8: 2f12 movel %a2@,%sp@- 476da: 4868 0010 pea %a0@(16) 476de: 4eb9 0004 9620 jsr 49620 <_CORE_RWLock_Obtain_for_writing>
do_wait,
ticks,
NULL
);
_Thread_Enable_dispatch();
476e4: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch>
if ( !do_wait &&
476ea: 4fef 0014 lea %sp@(20),%sp 476ee: 4a03 tstb %d3
476f0: 6644 bnes 47736 <pthread_rwlock_timedwrlock+0xb2>
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476f2: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476f8: 7202 moveq #2,%d1
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
476fa: 2028 0034 movel %a0@(52),%d0
ticks,
NULL
);
_Thread_Enable_dispatch();
if ( !do_wait &&
476fe: b280 cmpl %d0,%d1
47700: 6720 beqs 47722 <pthread_rwlock_timedwrlock+0x9e>
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47702: 2f00 movel %d0,%sp@- 47704: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 4770a: 588f addql #4,%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4770c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47712: 4e5e unlk %fp 47714: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
47716: 7016 moveq #22,%d0
}
47718: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 4771e: 4e5e unlk %fp 47720: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
47722: 4a82 tstl %d2
47724: 67f0 beqs 47716 <pthread_rwlock_timedwrlock+0x92><== NEVER TAKEN
47726: b282 cmpl %d2,%d1
47728: 65d8 bcss 47702 <pthread_rwlock_timedwrlock+0x7e><== NEVER TAKEN
case POSIX_ABSOLUTE_TIMEOUT_INVALID: return EINVAL; case POSIX_ABSOLUTE_TIMEOUT_IS_IN_PAST: case POSIX_ABSOLUTE_TIMEOUT_IS_NOW: return ETIMEDOUT;
4772a: 7074 moveq #116,%d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4772c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47732: 4e5e unlk %fp 47734: 4e75 rts
);
_Thread_Enable_dispatch();
if ( !do_wait &&
(_Thread_Executing->Wait.return_code == CORE_RWLOCK_UNAVAILABLE) ) {
switch (status) {
47736: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0 4773c: 2028 0034 movel %a0@(52),%d0
case POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE:
break;
}
}
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47740: 2f00 movel %d0,%sp@- 47742: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code> 47748: 588f addql #4,%sp 4774a: 60c0 bras 4770c <pthread_rwlock_timedwrlock+0x88>
000477d0 <pthread_rwlock_trywrlock>:
*/
int pthread_rwlock_trywrlock(
pthread_rwlock_t *rwlock
)
{
477d0: 4e56 fffc linkw %fp,#-4 477d4: 2f0a movel %a2,%sp@- 477d6: 246e 0008 moveal %fp@(8),%a2
POSIX_RWLock_Control *the_rwlock;
Objects_Locations location;
if ( !rwlock )
477da: 4a8a tstl %a2
477dc: 6752 beqs 47830 <pthread_rwlock_trywrlock+0x60> <== NEVER TAKEN
477de: 486e fffc pea %fp@(-4) 477e2: 2f12 movel %a2@,%sp@- 477e4: 4879 0006 2a9e pea 62a9e <_POSIX_RWLock_Information> 477ea: 4eb9 0004 a324 jsr 4a324 <_Objects_Get>
return EINVAL;
the_rwlock = _POSIX_RWLock_Get( rwlock, &location );
switch ( location ) {
477f0: 4fef 000c lea %sp@(12),%sp 477f4: 4aae fffc tstl %fp@(-4)
477f8: 6636 bnes 47830 <pthread_rwlock_trywrlock+0x60> <== NEVER TAKEN
case OBJECTS_LOCAL:
_CORE_RWLock_Obtain_for_writing(
477fa: 42a7 clrl %sp@- 477fc: 2040 moveal %d0,%a0 477fe: 42a7 clrl %sp@- 47800: 42a7 clrl %sp@- 47802: 2f12 movel %a2@,%sp@- 47804: 4868 0010 pea %a0@(16) 47808: 4eb9 0004 9620 jsr 49620 <_CORE_RWLock_Obtain_for_writing>
false, /* we are not willing to wait */
0,
NULL
);
_Thread_Enable_dispatch();
4780e: 4eb9 0004 abae jsr 4abae <_Thread_Enable_dispatch>
return _POSIX_RWLock_Translate_core_RWLock_return_code(
(CORE_RWLock_Status) _Thread_Executing->Wait.return_code
47814: 2079 0006 2da0 moveal 62da0 <_Per_CPU_Information+0xc>,%a0
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
4781a: 2f28 0034 movel %a0@(52),%sp@- 4781e: 4eb9 0004 774c jsr 4774c <_POSIX_RWLock_Translate_core_RWLock_return_code>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
47824: 246e fff8 moveal %fp@(-8),%a2
0,
NULL
);
_Thread_Enable_dispatch();
return _POSIX_RWLock_Translate_core_RWLock_return_code(
47828: 4fef 0018 lea %sp@(24),%sp
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
4782c: 4e5e unlk %fp 4782e: 4e75 rts 47830: 246e fff8 moveal %fp@(-8),%a2
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
47834: 7016 moveq #22,%d0
}
47836: 4e5e unlk %fp
...
00047ff0 <pthread_rwlockattr_setpshared>:
int pthread_rwlockattr_setpshared(
pthread_rwlockattr_t *attr,
int pshared
)
{
47ff0: 4e56 0000 linkw %fp,#0 47ff4: 206e 0008 moveal %fp@(8),%a0 47ff8: 202e 000c movel %fp@(12),%d0
if ( !attr )
47ffc: 4a88 tstl %a0
47ffe: 670a beqs 4800a <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
if ( !attr->is_initialized )
48000: 4a90 tstl %a0@
48002: 6706 beqs 4800a <pthread_rwlockattr_setpshared+0x1a>
return EINVAL;
switch ( pshared ) {
48004: 7201 moveq #1,%d1 48006: b280 cmpl %d0,%d1
48008: 6406 bccs 48010 <pthread_rwlockattr_setpshared+0x20><== ALWAYS TAKEN
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
return 0;
default:
return EINVAL;
4800a: 7016 moveq #22,%d0
} }
4800c: 4e5e unlk %fp 4800e: 4e75 rts
return EINVAL;
switch ( pshared ) {
case PTHREAD_PROCESS_SHARED:
case PTHREAD_PROCESS_PRIVATE:
attr->process_shared = pshared;
48010: 2140 0004 movel %d0,%a0@(4)
return 0;
48014: 4280 clrl %d0
default:
return EINVAL;
}
}
48016: 4e5e unlk %fp
...
00049224 <pthread_setschedparam>:
int pthread_setschedparam(
pthread_t thread,
int policy,
struct sched_param *param
)
{
49224: 4e56 ffe0 linkw %fp,#-32 49228: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 4922c: 282e 000c movel %fp@(12),%d4 49230: 242e 0010 movel %fp@(16),%d2
int rc;
/*
* Check all the parameters
*/
if ( !param )
49234: 6700 00c4 beqw 492fa <pthread_setschedparam+0xd6>
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
49238: 486e fff8 pea %fp@(-8) 4923c: 486e fffc pea %fp@(-4) 49240: 2f02 movel %d2,%sp@- 49242: 2f04 movel %d4,%sp@- 49244: 4eb9 0004 f344 jsr 4f344 <_POSIX_Thread_Translate_sched_param>
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
4924a: 4fef 0010 lea %sp@(16),%sp
* Check all the parameters
*/
if ( !param )
return EINVAL;
rc = _POSIX_Thread_Translate_sched_param(
4924e: 2600 movel %d0,%d3
policy,
param,
&budget_algorithm,
&budget_callout
);
if ( rc )
49250: 670c beqs 4925e <pthread_setschedparam+0x3a>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
49252: 2003 movel %d3,%d0 49254: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 4925a: 4e5e unlk %fp 4925c: 4e75 rts 4925e: 486e fff4 pea %fp@(-12) 49262: 2f2e 0008 movel %fp@(8),%sp@- 49266: 4879 0006 4fc4 pea 64fc4 <_POSIX_Threads_Information> 4926c: 4eb9 0004 b414 jsr 4b414 <_Objects_Get>
/*
* Actually change the scheduling policy and parameters
*/
the_thread = _POSIX_Threads_Get( thread, &location );
switch ( location ) {
49272: 4fef 000c lea %sp@(12),%sp 49276: 2440 moveal %d0,%a2 49278: 4aae fff4 tstl %fp@(-12) 4927c: 6600 008a bnew 49308 <pthread_setschedparam+0xe4>
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
49280: 266a 010e moveal %a2@(270),%a3
if ( api->schedpolicy == SCHED_SPORADIC )
49284: 7004 moveq #4,%d0 49286: b0ab 0080 cmpl %a3@(128),%d0 4928a: 6700 00b8 beqw 49344 <pthread_setschedparam+0x120>
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
api->schedparam = *param;
4928e: 41eb 0084 lea %a3@(132),%a0 49292: 2242 moveal %d2,%a1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
49294: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
49298: 20d9 movel %a1@+,%a0@+ 4929a: 20d9 movel %a1@+,%a0@+ 4929c: 20d9 movel %a1@+,%a0@+ 4929e: 20d9 movel %a1@+,%a0@+ 492a0: 20d9 movel %a1@+,%a0@+ 492a2: 20d9 movel %a1@+,%a0@+ 492a4: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
492a6: 256e fffc 007a movel %fp@(-4),%a2@(122)
the_thread->budget_callout = budget_callout;
492ac: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
492b2: 4a84 tstl %d4
492b4: 6d32 blts 492e8 <pthread_setschedparam+0xc4> <== NEVER TAKEN
492b6: 7002 moveq #2,%d0 492b8: b084 cmpl %d4,%d0
492ba: 6d5a blts 49316 <pthread_setschedparam+0xf2>
492bc: 4280 clrl %d0 492be: 1039 0006 3616 moveb 63616 <rtems_maximum_priority>,%d0
case SCHED_OTHER:
case SCHED_FIFO:
case SCHED_RR:
the_thread->cpu_time_budget = _Thread_Ticks_per_timeslice;
492c4: 41f9 0006 4db4 lea 64db4 <_Thread_Ticks_per_timeslice>,%a0 492ca: 90ab 0084 subl %a3@(132),%d0 492ce: 2550 0076 movel %a0@,%a2@(118)
the_thread->real_priority =
492d2: 2540 0018 movel %d0,%a2@(24)
_POSIX_Priority_To_core( api->schedparam.sched_priority );
_Thread_Change_priority(
492d6: 4878 0001 pea 1 <ADD> 492da: 2f00 movel %d0,%sp@- 492dc: 2f0a movel %a2,%sp@- 492de: 4eb9 0004 b76c jsr 4b76c <_Thread_Change_priority>
the_thread,
the_thread->real_priority,
true
);
break;
492e4: 4fef 000c lea %sp@(12),%sp
_Watchdog_Remove( &api->Sporadic_timer );
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
break;
}
_Thread_Enable_dispatch();
492e8: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
492ee: 2003 movel %d3,%d0 492f0: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 492f6: 4e5e unlk %fp 492f8: 4e75 rts
/*
* Check all the parameters
*/
if ( !param )
return EINVAL;
492fa: 7616 moveq #22,%d3
case OBJECTS_ERROR:
break;
}
return ESRCH;
}
492fc: 2003 movel %d3,%d0 492fe: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 49304: 4e5e unlk %fp 49306: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return ESRCH;
49308: 7603 moveq #3,%d3
}
4930a: 2003 movel %d3,%d0 4930c: 4cee 0c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a3 49312: 4e5e unlk %fp 49314: 4e75 rts
api->schedpolicy = policy;
api->schedparam = *param;
the_thread->budget_algorithm = budget_algorithm;
the_thread->budget_callout = budget_callout;
switch ( api->schedpolicy ) {
49316: 103c 0004 moveb #4,%d0 4931a: b084 cmpl %d4,%d0
4931c: 66ca bnes 492e8 <pthread_setschedparam+0xc4> <== NEVER TAKEN
true
);
break;
case SCHED_SPORADIC:
api->ss_high_priority = api->schedparam.sched_priority;
4931e: 276b 0084 00a0 movel %a3@(132),%a3@(160)
_Watchdog_Remove( &api->Sporadic_timer );
49324: 486b 00a4 pea %a3@(164) 49328: 4eb9 0004 d188 jsr 4d188 <_Watchdog_Remove>
_POSIX_Threads_Sporadic_budget_TSR( 0, the_thread );
4932e: 2f0a movel %a2,%sp@- 49330: 42a7 clrl %sp@- 49332: 4eb9 0004 90d4 jsr 490d4 <_POSIX_Threads_Sporadic_budget_TSR>
break;
49338: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4933c: 4eb9 0004 bc9e jsr 4bc9e <_Thread_Enable_dispatch> 49342: 60aa bras 492ee <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 );
49344: 486b 00a4 pea %a3@(164) 49348: 4eb9 0004 d188 jsr 4d188 <_Watchdog_Remove> 4934e: 588f addql #4,%sp
api->schedpolicy = policy;
api->schedparam = *param;
49350: 41eb 0084 lea %a3@(132),%a0 49354: 2242 moveal %d2,%a1
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( api->schedpolicy == SCHED_SPORADIC )
(void) _Watchdog_Remove( &api->Sporadic_timer );
api->schedpolicy = policy;
49356: 2744 0080 movel %d4,%a3@(128)
api->schedparam = *param;
4935a: 20d9 movel %a1@+,%a0@+ 4935c: 20d9 movel %a1@+,%a0@+ 4935e: 20d9 movel %a1@+,%a0@+ 49360: 20d9 movel %a1@+,%a0@+ 49362: 20d9 movel %a1@+,%a0@+ 49364: 20d9 movel %a1@+,%a0@+ 49366: 2091 movel %a1@,%a0@
the_thread->budget_algorithm = budget_algorithm;
49368: 256e fffc 007a movel %fp@(-4),%a2@(122)
the_thread->budget_callout = budget_callout;
4936e: 256e fff8 007e movel %fp@(-8),%a2@(126)
switch ( api->schedpolicy ) {
49374: 4a84 tstl %d4 49376: 6c00 ff3e bgew 492b6 <pthread_setschedparam+0x92>
4937a: 6000 ff6c braw 492e8 <pthread_setschedparam+0xc4> <== NOT EXECUTED
...
000467a8 <pthread_setspecific>:
int pthread_setspecific(
pthread_key_t key,
const void *value
)
{
467a8: 4e56 fffc linkw %fp,#-4 467ac: 2f03 movel %d3,%sp@- 467ae: 2f02 movel %d2,%sp@- 467b0: 486e fffc pea %fp@(-4) 467b4: 2f2e 0008 movel %fp@(8),%sp@- 467b8: 4879 0006 1e22 pea 61e22 <_POSIX_Keys_Information> 467be: 4eb9 0004 9028 jsr 49028 <_Objects_Get>
uint32_t api;
uint32_t index;
Objects_Locations location;
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
467c4: 4fef 000c lea %sp@(12),%sp 467c8: 4aae fffc tstl %fp@(-4)
467cc: 663e bnes 4680c <pthread_setspecific+0x64> <== NEVER TAKEN
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
467ce: 2079 0006 1f3c moveal 61f3c <_Per_CPU_Information+0xc>,%a0 467d4: 7618 moveq #24,%d3
index = _Objects_Get_index( _Thread_Executing->Object.id );
the_key->Values[ api ][ index ] = (void *) value;
467d6: 2240 moveal %d0,%a1
the_key = _POSIX_Keys_Get( key, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
467d8: 2428 0008 movel %a0@(8),%d2 467dc: 2202 movel %d2,%d1 467de: e6a9 lsrl %d3,%d1 467e0: 163c 0007 moveb #7,%d3 467e4: c283 andl %d3,%d1
index = _Objects_Get_index( _Thread_Executing->Object.id );
467e6: 0282 0000 ffff andil #65535,%d2
the_key->Values[ api ][ index ] = (void *) value;
467ec: 2071 1c14 moveal %a1@(00000014,%d1:l:4),%a0 467f0: 43ee 000c lea %fp@(12),%a1 467f4: 2191 2c00 movel %a1@,%a0@(00000000,%d2:l:4)
_Thread_Enable_dispatch();
467f8: 4eb9 0004 98b2 jsr 498b2 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
467fe: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_LOCAL:
api = _Objects_Get_API( _Thread_Executing->Object.id );
index = _Objects_Get_index( _Thread_Executing->Object.id );
the_key->Values[ api ][ index ] = (void *) value;
_Thread_Enable_dispatch();
return 0;
46802: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
46804: 262e fff8 movel %fp@(-8),%d3 46808: 4e5e unlk %fp 4680a: 4e75 rts 4680c: 242e fff4 movel %fp@(-12),%d2
#endif
case OBJECTS_ERROR:
break;
}
return EINVAL;
46810: 7016 moveq #22,%d0
}
46812: 262e fff8 movel %fp@(-8),%d3 46816: 4e5e unlk %fp
...
0004d48c <pthread_sigmask>:
int pthread_sigmask(
int how,
const sigset_t *set,
sigset_t *oset
)
{
4d48c: 4e56 0000 linkw %fp,#0 4d490: 202e 0008 movel %fp@(8),%d0 4d494: 2f0a movel %a2,%sp@- 4d496: 226e 000c moveal %fp@(12),%a1 4d49a: 246e 0010 moveal %fp@(16),%a2
POSIX_API_Control *api;
if ( !set && !oset )
4d49e: 4a89 tstl %a1 4d4a0: 6700 0084 beqw 4d526 <pthread_sigmask+0x9a>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4d4a4: 2079 0006 1fac moveal 61fac <_Per_CPU_Information+0xc>,%a0 4d4aa: 2068 010e moveal %a0@(270),%a0
if ( oset )
4d4ae: 4a8a tstl %a2
4d4b0: 6708 beqs 4d4ba <pthread_sigmask+0x2e>
*oset = api->signals_blocked;
4d4b2: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4d4b6: 4a89 tstl %a1
4d4b8: 673a beqs 4d4f4 <pthread_sigmask+0x68> <== NEVER TAKEN
return 0;
switch ( how ) {
4d4ba: 7201 moveq #1,%d1 4d4bc: b280 cmpl %d0,%d1
4d4be: 675e beqs 4d51e <pthread_sigmask+0x92>
4d4c0: 123c 0002 moveb #2,%d1 4d4c4: b280 cmpl %d0,%d1
4d4c6: 6736 beqs 4d4fe <pthread_sigmask+0x72>
4d4c8: 4a80 tstl %d0
4d4ca: 663c bnes 4d508 <pthread_sigmask+0x7c>
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
break;
case SIG_SETMASK:
api->signals_blocked = *set;
4d4cc: 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) ) {
4d4d0: 2039 0006 21ae movel 621ae <_POSIX_signals_Pending>,%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4d4d6: 2228 00cc movel %a0@(204),%d1 4d4da: 4681 notl %d1
(api->signals_pending | _POSIX_signals_Pending) ) {
4d4dc: 80a8 00d0 orl %a0@(208),%d0
/* XXX are there critical section problems here? */
/* XXX evaluate the new set */
if ( ~api->signals_blocked &
4d4e0: c081 andl %d1,%d0
4d4e2: 6710 beqs 4d4f4 <pthread_sigmask+0x68>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
4d4e4: 4eb9 0004 98a4 jsr 498a4 <_Thread_Dispatch>
}
return 0;
}
4d4ea: 246e fffc moveal %fp@(-4),%a2
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
4d4ee: 4280 clrl %d0
}
4d4f0: 4e5e unlk %fp 4d4f2: 4e75 rts 4d4f4: 246e fffc moveal %fp@(-4),%a2
if ( ~api->signals_blocked &
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
4d4f8: 4280 clrl %d0
}
4d4fa: 4e5e unlk %fp 4d4fc: 4e75 rts
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
break;
case SIG_UNBLOCK:
api->signals_blocked &= ~*set;
4d4fe: 2011 movel %a1@,%d0 4d500: 4680 notl %d0 4d502: c1a8 00cc andl %d0,%a0@(204)
break;
4d506: 60c8 bras 4d4d0 <pthread_sigmask+0x44>
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d508: 4eb9 0004 fc64 jsr 4fc64 <__errno>
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d50e: 246e fffc moveal %fp@(-4),%a2
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d512: 2040 moveal %d0,%a0 4d514: 7216 moveq #22,%d1 4d516: 70ff moveq #-1,%d0
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d518: 4e5e unlk %fp
break;
case SIG_SETMASK:
api->signals_blocked = *set;
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4d51a: 2081 movel %d1,%a0@
(api->signals_pending | _POSIX_signals_Pending) ) {
_Thread_Dispatch();
}
return 0;
}
4d51c: 4e75 rts
if ( !set )
return 0;
switch ( how ) {
case SIG_BLOCK:
api->signals_blocked |= *set;
4d51e: 2011 movel %a1@,%d0 4d520: 81a8 00cc orl %d0,%a0@(204)
break;
4d524: 60aa bras 4d4d0 <pthread_sigmask+0x44>
sigset_t *oset
)
{
POSIX_API_Control *api;
if ( !set && !oset )
4d526: 4a8a tstl %a2
4d528: 67de beqs 4d508 <pthread_sigmask+0x7c>
rtems_set_errno_and_return_minus_one( EINVAL );
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
4d52a: 2079 0006 1fac moveal 61fac <_Per_CPU_Information+0xc>,%a0 4d530: 2068 010e moveal %a0@(270),%a0
if ( oset )
*oset = api->signals_blocked;
4d534: 24a8 00cc movel %a0@(204),%a2@
if ( !set )
4d538: 4a89 tstl %a1 4d53a: 6600 ff7e bnew 4d4ba <pthread_sigmask+0x2e> 4d53e: 60b4 bras 4d4f4 <pthread_sigmask+0x68>
00046d88 <pthread_testcancel>:
*
* 18.2.2 Setting Cancelability State, P1003.1c/Draft 10, p. 183
*/
void pthread_testcancel( void )
{
46d88: 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() )
46d8c: 4ab9 0006 1164 tstl 61164 <_Per_CPU_Information+0x8>
46d92: 663c bnes 46dd0 <pthread_testcancel+0x48> <== NEVER TAKEN
return;
thread_support = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
46d94: 2079 0006 1168 moveal 61168 <_Per_CPU_Information+0xc>,%a0 46d9a: 2039 0006 0cd8 movel 60cd8 <_Thread_Dispatch_disable_level>,%d0 46da0: 5280 addql #1,%d0 46da2: 2068 010e moveal %a0@(270),%a0 46da6: 23c0 0006 0cd8 movel %d0,60cd8 <_Thread_Dispatch_disable_level>
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
46dac: 4aa8 00d4 tstl %a0@(212)
46db0: 6622 bnes 46dd4 <pthread_testcancel+0x4c> <== NEVER TAKEN
46db2: 4aa8 00dc tstl %a0@(220)
46db6: 671c beqs 46dd4 <pthread_testcancel+0x4c>
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46db8: 4eb9 0004 9626 jsr 49626 <_Thread_Enable_dispatch>
if ( cancel )
_POSIX_Thread_Exit( _Thread_Executing, PTHREAD_CANCELED );
46dbe: 4878 ffff pea ffffffff <LESS> 46dc2: 2f39 0006 1168 movel 61168 <_Per_CPU_Information+0xc>,%sp@- 46dc8: 4eb9 0004 cdc4 jsr 4cdc4 <_POSIX_Thread_Exit>
46dce: 508f addql #8,%sp <== NOT EXECUTED
}
46dd0: 4e5e unlk %fp <== NOT EXECUTED 46dd2: 4e75 rts <== NOT EXECUTED
46dd4: 4e5e unlk %fp
_Thread_Disable_dispatch();
if ( thread_support->cancelability_state == PTHREAD_CANCEL_ENABLE &&
thread_support->cancelation_requested )
cancel = true;
_Thread_Enable_dispatch();
46dd6: 4ef9 0004 9626 jmp 49626 <_Thread_Enable_dispatch>
00043e44 <putk>:
* putk
*
* Kernel putk (e.g. puts) function requiring minimal infrastrure.
*/
void putk(const char *s)
{
43e44: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43e48: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43e4a: 246e 0008 moveal %fp@(8),%a2 <== NOT EXECUTED
const char *p = s;
for (p=s ; *p ; p++ )
43e4e: 1012 moveb %a2@,%d0 <== NOT EXECUTED 43e50: 6714 beqs 43e66 <putk+0x22> <== NOT EXECUTED
/* * putk * * Kernel putk (e.g. puts) function requiring minimal infrastrure. */ void putk(const char *s)
43e52: 528a addql #1,%a2 <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
43e54: 49c0 extbl %d0 <== NOT EXECUTED 43e56: 2079 0005 e64c moveal 5e64c <BSP_output_char>,%a0 <== NOT EXECUTED 43e5c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 43e5e: 4e90 jsr %a0@ <== NOT EXECUTED
*/
void putk(const char *s)
{
const char *p = s;
for (p=s ; *p ; p++ )
43e60: 588f addql #4,%sp <== NOT EXECUTED 43e62: 101a moveb %a2@+,%d0 <== NOT EXECUTED 43e64: 66ee bnes 43e54 <putk+0x10> <== NOT EXECUTED
BSP_output_char(*p);
BSP_output_char('\n');
43e66: 700a moveq #10,%d0 <== NOT EXECUTED
}
43e68: 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');
43e6c: 2d40 0008 movel %d0,%fp@(8) <== NOT EXECUTED
}
43e70: 4e5e unlk %fp <== NOT EXECUTED
{
const char *p = s;
for (p=s ; *p ; p++ )
BSP_output_char(*p);
BSP_output_char('\n');
43e72: 2279 0005 e64c moveal 5e64c <BSP_output_char>,%a1 <== NOT EXECUTED 43e78: 4ed1 jmp %a1@ <== NOT EXECUTED
...
0005bdec <read>:
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
5bdec: 4e56 fff4 linkw %fp,#-12 5bdf0: 202e 0008 movel %fp@(8),%d0 5bdf4: 222e 000c movel %fp@(12),%d1 5bdf8: 206e 0010 moveal %fp@(16),%a0 5bdfc: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5be00: b0b9 0005 e274 cmpl 5e274 <rtems_libio_number_iops>,%d0
5be06: 646a bccs 5be72 <read+0x86> <== NEVER TAKEN
iop = rtems_libio_iop( fd );
5be08: 2400 movel %d0,%d2 5be0a: ed88 lsll #6,%d0 5be0c: e78a lsll #3,%d2 5be0e: 2479 0005 f984 moveal 5f984 <rtems_libio_iops>,%a2 5be14: 9082 subl %d2,%d0 5be16: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5be18: 202a 0014 movel %a2@(20),%d0 5be1c: 0800 0008 btst #8,%d0
5be20: 6750 beqs 5be72 <read+0x86> rtems_libio_check_buffer( buffer );
5be22: 4a81 tstl %d1
5be24: 6764 beqs 5be8a <read+0x9e> <== NEVER TAKEN
rtems_libio_check_count( count );
5be26: 4a88 tstl %a0
5be28: 673c beqs 5be66 <read+0x7a> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
5be2a: 0800 0001 btst #1,%d0
5be2e: 675a beqs 5be8a <read+0x9e> <== NEVER TAKEN
return 0;
/*
* Now process the read().
*/
rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count );
5be30: 226a 0020 moveal %a2@(32),%a1 5be34: 2f08 movel %a0,%sp@- 5be36: 2f01 movel %d1,%sp@- 5be38: 2f0a movel %a2,%sp@- 5be3a: 2069 0008 moveal %a1@(8),%a0 5be3e: 4e90 jsr %a0@
if ( rc > 0 )
5be40: 4fef 000c lea %sp@(12),%sp 5be44: 4a80 tstl %d0
5be46: 6f14 bles 5be5c <read+0x70>
iop->offset += rc;
5be48: 2400 movel %d0,%d2 5be4a: 5bc1 smi %d1 5be4c: 49c1 extbl %d1 5be4e: d5aa 0010 addl %d2,%a2@(16) 5be52: 262a 000c movel %a2@(12),%d3 5be56: d781 addxl %d1,%d3 5be58: 2543 000c movel %d3,%a2@(12)
return rc;
}
5be5c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5be62: 4e5e unlk %fp 5be64: 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 );
5be66: 4280 clrl %d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5be68: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 5be6e: 4e5e unlk %fp <== NOT EXECUTED 5be70: 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 );
5be72: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5be78: 7409 moveq #9,%d2 5be7a: 2040 moveal %d0,%a0 5be7c: 70ff moveq #-1,%d0 5be7e: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5be80: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5be86: 4e5e unlk %fp 5be88: 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 );
5be8a: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 5be90: 7216 moveq #22,%d1 <== NOT EXECUTED 5be92: 2040 moveal %d0,%a0 <== NOT EXECUTED 5be94: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5be96: 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 );
5be9c: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5be9e: 4e5e unlk %fp <== NOT EXECUTED
000465b4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
465b4: 4e56 ffe0 linkw %fp,#-32 465b8: 48d7 001c moveml %d2-%d4,%sp@ 465bc: 242e 0008 movel %fp@(8),%d2 465c0: 282e 000c movel %fp@(12),%d4
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
465c4: 6776 beqs 4663c <readlink+0x88> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
465c6: 2f02 movel %d2,%sp@- 465c8: 260e movel %fp,%d3 465ca: 0683 ffff ffec addil #-20,%d3 465d0: 4eb9 0005 3864 jsr 53864 <strlen> 465d6: 4297 clrl %sp@ 465d8: 2f03 movel %d3,%sp@- 465da: 42a7 clrl %sp@- 465dc: 2f00 movel %d0,%sp@- 465de: 2f02 movel %d2,%sp@- 465e0: 4eb9 0004 5300 jsr 45300 <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
465e6: 4fef 0014 lea %sp@(20),%sp 465ea: 4a80 tstl %d0
465ec: 670e beqs 465fc <readlink+0x48> <== ALWAYS TAKEN
return -1;
465ee: 74ff moveq #-1,%d2 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
465f0: 2002 movel %d2,%d0 <== NOT EXECUTED 465f2: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 <== NOT EXECUTED 465f8: 4e5e unlk %fp <== NOT EXECUTED 465fa: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
465fc: 206e fff8 moveal %fp@(-8),%a0 46600: 2f03 movel %d3,%sp@- 46602: 2068 0010 moveal %a0@(16),%a0 46606: 4e90 jsr %a0@ 46608: 588f addql #4,%sp 4660a: 7204 moveq #4,%d1 4660c: b280 cmpl %d0,%d1
4660e: 6646 bnes 46656 <readlink+0xa2>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( EINVAL );
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
46610: 2f2e 0010 movel %fp@(16),%sp@- 46614: 206e fff8 moveal %fp@(-8),%a0 46618: 2f04 movel %d4,%sp@- 4661a: 2f03 movel %d3,%sp@- 4661c: 2068 003c moveal %a0@(60),%a0 46620: 4e90 jsr %a0@ 46622: 2400 movel %d0,%d2
rtems_filesystem_freenode( &loc );
46624: 2f03 movel %d3,%sp@- 46626: 4eb9 0004 5424 jsr 45424 <rtems_filesystem_freenode>
return result;
4662c: 4fef 0010 lea %sp@(16),%sp
}
46630: 2002 movel %d2,%d0 46632: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 46638: 4e5e unlk %fp 4663a: 4e75 rts
{
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
rtems_set_errno_and_return_minus_one( EFAULT );
4663c: 4eb9 0005 1d78 jsr 51d78 <__errno> <== NOT EXECUTED 46642: 74ff moveq #-1,%d2 <== NOT EXECUTED 46644: 720e moveq #14,%d1 <== NOT EXECUTED 46646: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46648: 2002 movel %d2,%d0 <== NOT EXECUTED 4664a: 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 );
46650: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
46652: 4e5e unlk %fp <== NOT EXECUTED 46654: 4e75 rts <== NOT EXECUTED
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
46656: 2f03 movel %d3,%sp@-
rtems_set_errno_and_return_minus_one( EINVAL );
46658: 74ff moveq #-1,%d2
0, &loc, false );
if ( result != 0 )
return -1;
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
rtems_filesystem_freenode( &loc );
4665a: 4eb9 0004 5424 jsr 45424 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EINVAL );
46660: 4eb9 0005 1d78 jsr 51d78 <__errno> 46666: 588f addql #4,%sp 46668: 2040 moveal %d0,%a0 4666a: 7016 moveq #22,%d0 4666c: 2080 movel %d0,%a0@
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
rtems_filesystem_freenode( &loc );
return result;
}
4666e: 2002 movel %d2,%d0 46670: 4cee 001c ffe0 moveml %fp@(-32),%d2-%d4 46676: 4e5e unlk %fp
...
00044ef0 <readv>:
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
44ef0: 4e56 ffe4 linkw %fp,#-28 44ef4: 202e 0008 movel %fp@(8),%d0 44ef8: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 44efc: 246e 000c moveal %fp@(12),%a2 44f00: 242e 0010 movel %fp@(16),%d2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
44f04: b0b9 0005 f034 cmpl 5f034 <rtems_libio_number_iops>,%d0 44f0a: 6400 00ec bccw 44ff8 <readv+0x108>
iop = rtems_libio_iop( fd );
44f0e: 2200 movel %d0,%d1 44f10: ed88 lsll #6,%d0 44f12: e789 lsll #3,%d1 44f14: 2679 0006 0744 moveal 60744 <rtems_libio_iops>,%a3 44f1a: 9081 subl %d1,%d0 44f1c: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
44f1e: 202b 0014 movel %a3@(20),%d0 44f22: 0800 0008 btst #8,%d0 44f26: 6700 00d0 beqw 44ff8 <readv+0x108>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
44f2a: 0800 0001 btst #1,%d0 44f2e: 6700 0092 beqw 44fc2 <readv+0xd2>
/*
* Argument validation on IO vector
*/
if ( !iov )
44f32: 4a8a tstl %a2 44f34: 6700 008c beqw 44fc2 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
44f38: 4a82 tstl %d2 44f3a: 6f00 0086 blew 44fc2 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
44f3e: 0c82 0000 0400 cmpil #1024,%d2
44f44: 6e7c bgts 44fc2 <readv+0xd2> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
44f46: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
44f48: 4281 clrl %d1 44f4a: 4280 clrl %d0 44f4c: 7801 moveq #1,%d4
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
44f4e: 4a90 tstl %a0@
44f50: 6770 beqs 44fc2 <readv+0xd2>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
44f52: 2628 0004 movel %a0@(4),%d3 44f56: 2240 moveal %d0,%a1 44f58: d3c3 addal %d3,%a1
* 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++ ) {
44f5a: 5281 addql #1,%d1 44f5c: 5088 addql #8,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
44f5e: b3c0 cmpal %d0,%a1
44f60: 6d60 blts 44fc2 <readv+0xd2>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
44f62: 4a83 tstl %d3 44f64: 57c3 seq %d3
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
44f66: 2009 movel %a1,%d0
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
44f68: c883 andl %d3,%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++ ) {
44f6a: b282 cmpl %d2,%d1
44f6c: 6de0 blts 44f4e <readv+0x5e>
/*
* 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 ) {
44f6e: 4a04 tstb %d4
44f70: 666a bnes 44fdc <readv+0xec>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t readv(
44f72: 588a addql #4,%a2 44f74: 4283 clrl %d3 44f76: 4284 clrl %d4
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->pathinfo.handlers->read_h)(
44f78: 206b 0020 moveal %a3@(32),%a0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44f7c: 5283 addql #1,%d3
bytes = (*iop->pathinfo.handlers->read_h)(
44f7e: 2f12 movel %a2@,%sp@- 44f80: 2f2a fffc movel %a2@(-4),%sp@- 44f84: 2f0b movel %a3,%sp@- 44f86: 2068 0008 moveal %a0@(8),%a0 44f8a: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
44f8c: 4fef 000c lea %sp@(12),%sp 44f90: 4a80 tstl %d0
44f92: 6d56 blts 44fea <readv+0xfa> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
44f94: 6716 beqs 44fac <readv+0xbc> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
44f96: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
44f98: 2c00 movel %d0,%d6 44f9a: 5bc5 smi %d5 44f9c: 49c5 extbl %d5 44f9e: ddab 0010 addl %d6,%a3@(16) 44fa2: 222b 000c movel %a3@(12),%d1 44fa6: d385 addxl %d5,%d1 44fa8: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
44fac: b092 cmpl %a2@,%d0
44fae: 6606 bnes 44fb6 <readv+0xc6> <== NEVER TAKEN
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
44fb0: 508a addql #8,%a2 44fb2: b682 cmpl %d2,%d3
44fb4: 6dc2 blts 44f78 <readv+0x88>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44fb6: 2004 movel %d4,%d0 44fb8: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44fbe: 4e5e unlk %fp 44fc0: 4e75 rts
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old )
rtems_set_errno_and_return_minus_one( EINVAL );
44fc2: 4eb9 0004 fa80 jsr 4fa80 <__errno> 44fc8: 78ff moveq #-1,%d4 44fca: 2040 moveal %d0,%a0 44fcc: 7016 moveq #22,%d0 44fce: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44fd0: 2004 movel %d4,%d0 44fd2: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44fd8: 4e5e unlk %fp 44fda: 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 ) {
return 0;
44fdc: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44fde: 2004 movel %d4,%d0 44fe0: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 44fe6: 4e5e unlk %fp 44fe8: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
44fea: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
44fec: 2004 movel %d4,%d0 <== NOT EXECUTED 44fee: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 44ff4: 4e5e unlk %fp <== NOT EXECUTED 44ff6: 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 );
44ff8: 4eb9 0004 fa80 jsr 4fa80 <__errno> 44ffe: 78ff moveq #-1,%d4 45000: 7209 moveq #9,%d1 45002: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
45004: 2004 movel %d4,%d0 45006: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
4500c: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4500e: 4e5e unlk %fp
...
0005bf24 <realloc>:
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
5bf24: 7003 moveq #3,%d0
void *realloc(
void *ptr,
size_t size
)
{
5bf26: 4e56 fff0 linkw %fp,#-16
uintptr_t old_size;
char *new_area;
MSBUMP(realloc_calls, 1);
5bf2a: 52b9 0005 f9ac addql #1,5f9ac <rtems_malloc_statistics+0x10>
void *realloc(
void *ptr,
size_t size
)
{
5bf30: 48d7 001c moveml %d2-%d4,%sp@ 5bf34: 242e 0008 movel %fp@(8),%d2 5bf38: 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())) {
5bf3c: b0b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d0
5bf42: 677a beqs 5bfbe <realloc+0x9a> <== ALWAYS TAKEN
}
/*
* Continue with realloc().
*/
if ( !ptr )
5bf44: 4a82 tstl %d2 5bf46: 6700 00de beqw 5c026 <realloc+0x102>
return malloc( size );
if ( !size ) {
5bf4a: 4a83 tstl %d3
5bf4c: 673e beqs 5bf8c <realloc+0x68> <== NEVER TAKEN
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
5bf4e: 486e fffc pea %fp@(-4) 5bf52: 2f02 movel %d2,%sp@- 5bf54: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 5bf5a: 4eb9 0005 c5d4 jsr 5c5d4 <_Protected_heap_Get_block_size> 5bf60: 4fef 000c lea %sp@(12),%sp 5bf64: 4a00 tstb %d0
5bf66: 673c beqs 5bfa4 <realloc+0x80> <== NEVER TAKEN
}
/*
* Now resize it.
*/
if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) {
5bf68: 2f03 movel %d3,%sp@- 5bf6a: 2f02 movel %d2,%sp@- 5bf6c: 2f39 0005 e280 movel 5e280 <RTEMS_Malloc_Heap>,%sp@- 5bf72: 4eb9 0005 c610 jsr 5c610 <_Protected_heap_Resize_block> 5bf78: 4fef 000c lea %sp@(12),%sp 5bf7c: 4a00 tstb %d0
5bf7e: 6754 beqs 5bfd4 <realloc+0xb0>
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bf80: 2002 movel %d2,%d0 5bf82: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5bf88: 4e5e unlk %fp 5bf8a: 4e75 rts
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5bf8c: 2f02 movel %d2,%sp@- <== NOT EXECUTED
return (void *) 0;
5bf8e: 4282 clrl %d2 <== NOT EXECUTED
*/
if ( !ptr )
return malloc( size );
if ( !size ) {
free( ptr );
5bf90: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
return (void *) 0;
5bf96: 588f addql #4,%sp <== NOT EXECUTED
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bf98: 2002 movel %d2,%d0 <== NOT EXECUTED 5bf9a: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 <== NOT EXECUTED 5bfa0: 4e5e unlk %fp <== NOT EXECUTED 5bfa2: 4e75 rts <== NOT EXECUTED
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5bfa4: 4eb9 0004 e9f4 jsr 4e9f4 <__errno>
return (void *) 0;
5bfaa: 4282 clrl %d2
free( ptr );
return (void *) 0;
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
errno = EINVAL;
5bfac: 2040 moveal %d0,%a0 5bfae: 7016 moveq #22,%d0 5bfb0: 2080 movel %d0,%a0@
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bfb2: 2002 movel %d2,%d0 5bfb4: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5bfba: 4e5e unlk %fp 5bfbc: 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)
5bfbe: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0
5bfc4: 6752 beqs 5c018 <realloc+0xf4> <== ALWAYS TAKEN
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
5bfc6: 4282 clrl %d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5bfc8: 2002 movel %d2,%d0 5bfca: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5bfd0: 4e5e unlk %fp 5bfd2: 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 );
5bfd4: 2f03 movel %d3,%sp@- 5bfd6: 4eb9 0004 30e8 jsr 430e8 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5bfdc: 588f addql #4,%sp
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
5bfde: 53b9 0005 f9a0 subql #1,5f9a0 <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 );
5bfe4: 2800 movel %d0,%d4
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
5bfe6: 67de beqs 5bfc6 <realloc+0xa2>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
5bfe8: 202e fffc movel %fp@(-4),%d0 5bfec: b083 cmpl %d3,%d0
5bfee: 6402 bccs 5bff2 <realloc+0xce> <== NEVER TAKEN
5bff0: 2600 movel %d0,%d3 5bff2: 2f03 movel %d3,%sp@- 5bff4: 2f02 movel %d2,%sp@- 5bff6: 2f04 movel %d4,%sp@- 5bff8: 4eb9 0004 f2a0 jsr 4f2a0 <memcpy>
free( ptr );
5bffe: 2f02 movel %d2,%sp@-
return new_area;
5c000: 2404 movel %d4,%d2
if ( !new_area ) {
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
5c002: 4eb9 0004 2db8 jsr 42db8 <free>
return new_area;
5c008: 4fef 0010 lea %sp@(16),%sp
}
5c00c: 2002 movel %d2,%d0 5c00e: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c014: 4e5e unlk %fp 5c016: 4e75 rts
if (_System_state_Is_up(_System_state_Get())) {
if (_Thread_Dispatch_disable_level > 0)
return (void *) 0;
if (_ISR_Nest_level > 0)
5c018: 4ab9 0005 ff68 tstl 5ff68 <_Per_CPU_Information+0x8> 5c01e: 6700 ff24 beqw 5bf44 <realloc+0x20>
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
if ( !new_area ) {
return (void *) 0;
5c022: 4282 clrl %d2 <== NOT EXECUTED 5c024: 60a2 bras 5bfc8 <realloc+0xa4> <== NOT EXECUTED
/*
* Continue with realloc().
*/
if ( !ptr )
return malloc( size );
5c026: 2f03 movel %d3,%sp@- 5c028: 4eb9 0004 30e8 jsr 430e8 <malloc> 5c02e: 588f addql #4,%sp 5c030: 2400 movel %d0,%d2
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
free( ptr );
return new_area;
}
5c032: 2002 movel %d2,%d0 5c034: 4cee 001c fff0 moveml %fp@(-16),%d2-%d4 5c03a: 4e5e unlk %fp
...
00044dcc <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
44dcc: 4e56 ffc0 linkw %fp,#-64 44dd0: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 44dd4: 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 );
44dd8: 2f02 movel %d2,%sp@- 44dda: 4eb9 0004 390a jsr 4390a <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
44de0: 588f addql #4,%sp 44de2: 4a80 tstl %d0 44de4: 6600 0132 bnew 44f18 <rmdir+0x14c>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44de8: 45ee ffe8 lea %fp@(-24),%a2 44dec: 4283 clrl %d3 44dee: 2f0a movel %a2,%sp@- 44df0: 486e fffc pea %fp@(-4)
const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false;
44df4: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
44df6: 2f02 movel %d2,%sp@- 44df8: 4eb9 0004 4f40 jsr 44f40 <rtems_filesystem_get_start_loc> 44dfe: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44e02: 2d52 ffd4 movel %a2@,%fp@(-44)
name = pathname + parentpathlen;
44e06: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44e08: 47f9 0005 0dc4 lea 50dc4 <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44e0e: 240e movel %fp,%d2 44e10: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
44e16: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 44e1c: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 44e22: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 44e28: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
44e2e: 2f03 movel %d3,%sp@- 44e30: 4e93 jsr %a3@ 44e32: 2e80 movel %d0,%sp@ 44e34: 2f03 movel %d3,%sp@- 44e36: 4eb9 0004 394c jsr 4394c <rtems_filesystem_prefix_separators> 44e3c: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
44e3e: 2f03 movel %d3,%sp@- 44e40: 4e93 jsr %a3@ 44e42: 4297 clrl %sp@ 44e44: 2f02 movel %d2,%sp@- 44e46: 42a7 clrl %sp@- 44e48: 2f00 movel %d0,%sp@- 44e4a: 2f03 movel %d3,%sp@- 44e4c: 4eb9 0004 37cc jsr 437cc <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
44e52: 4fef 001c lea %sp@(28),%sp 44e56: 4a80 tstl %d0
44e58: 6654 bnes 44eae <rmdir+0xe2>
}
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
44e5a: 206e ffe0 moveal %fp@(-32),%a0 44e5e: 2f02 movel %d2,%sp@- 44e60: 2068 0010 moveal %a0@(16),%a0 44e64: 4e90 jsr %a0@ 44e66: 588f addql #4,%sp 44e68: 7201 moveq #1,%d1 44e6a: b280 cmpl %d0,%d1
44e6c: 6652 bnes 44ec0 <rmdir+0xf4>
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
44e6e: 2f02 movel %d2,%sp@- 44e70: 206e ffdc moveal %fp@(-36),%a0 44e74: 2f0a movel %a2,%sp@- 44e76: 2068 0034 moveal %a0@(52),%a0
rtems_filesystem_freenode( &loc );
44e7a: 47f9 0004 3c2c lea 43c2c <rtems_filesystem_freenode>,%a3
/*
* Use the filesystems rmnod to remove the node.
*/
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
44e80: 4e90 jsr %a0@ 44e82: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
44e84: 2f02 movel %d2,%sp@- 44e86: 4e93 jsr %a3@
if ( free_parentloc )
44e88: 4fef 000c lea %sp@(12),%sp 44e8c: 4a04 tstb %d4
44e8e: 660c bnes 44e9c <rmdir+0xd0>
rtems_filesystem_freenode( &parentloc );
return result;
}
44e90: 2003 movel %d3,%d0 44e92: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 44e98: 4e5e unlk %fp 44e9a: 4e75 rts
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44e9c: 2f0a movel %a2,%sp@- 44e9e: 4e93 jsr %a3@ 44ea0: 588f addql #4,%sp
return result;
}
44ea2: 2003 movel %d3,%d0 44ea4: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 44eaa: 4e5e unlk %fp 44eac: 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 )
44eae: 4a04 tstb %d4
44eb0: 664e bnes 44f00 <rmdir+0x134> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
return -1;
44eb2: 76ff moveq #-1,%d3
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
44eb4: 2003 movel %d3,%d0 44eb6: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 44ebc: 4e5e unlk %fp 44ebe: 4e75 rts
/*
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
44ec0: 2f02 movel %d2,%sp@- 44ec2: 47f9 0004 3c2c lea 43c2c <rtems_filesystem_freenode>,%a3 44ec8: 4e93 jsr %a3@
if ( free_parentloc )
44eca: 588f addql #4,%sp 44ecc: 4a04 tstb %d4
44ece: 661a bnes 44eea <rmdir+0x11e> <== ALWAYS TAKEN
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( ENOTDIR );
44ed0: 4eb9 0004 fa20 jsr 4fa20 <__errno> <== NOT EXECUTED 44ed6: 76ff moveq #-1,%d3 <== NOT EXECUTED 44ed8: 2040 moveal %d0,%a0 <== NOT EXECUTED 44eda: 7014 moveq #20,%d0 <== NOT EXECUTED 44edc: 2080 movel %d0,%a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
44ede: 2003 movel %d3,%d0 44ee0: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 44ee6: 4e5e unlk %fp 44ee8: 4e75 rts
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44eea: 2f0a movel %a2,%sp@-
rtems_set_errno_and_return_minus_one( ENOTDIR );
44eec: 76ff moveq #-1,%d3
* Verify you can remove this node as a directory.
*/
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44eee: 4e93 jsr %a3@ 44ef0: 588f addql #4,%sp
rtems_set_errno_and_return_minus_one( ENOTDIR );
44ef2: 4eb9 0004 fa20 jsr 4fa20 <__errno> 44ef8: 2040 moveal %d0,%a0 44efa: 7014 moveq #20,%d0 44efc: 2080 movel %d0,%a0@ 44efe: 60de bras 44ede <rmdir+0x112>
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44f00: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return -1;
44f02: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
44f04: 4eb9 0004 3c2c jsr 43c2c <rtems_filesystem_freenode> <== NOT EXECUTED 44f0a: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
44f0c: 2003 movel %d3,%d0 <== NOT EXECUTED 44f0e: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 44f14: 4e5e unlk %fp <== NOT EXECUTED 44f16: 4e75 rts <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( pathname );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
44f18: 42a7 clrl %sp@- 44f1a: 45ee ffe8 lea %fp@(-24),%a2 44f1e: 2600 movel %d0,%d3 44f20: 2f0a movel %a2,%sp@- 44f22: 4878 0002 pea 2 <DOUBLE_FLOAT> 44f26: 2f00 movel %d0,%sp@- 44f28: 2f02 movel %d2,%sp@- 44f2a: 4eb9 0004 387c jsr 4387c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
44f30: 4fef 0014 lea %sp@(20),%sp 44f34: 4a80 tstl %d0 44f36: 6600 ff7a bnew 44eb2 <rmdir+0xe6>
return -1;
free_parentloc = true;
44f3a: 7801 moveq #1,%d4 44f3c: 6000 fec4 braw 44e02 <rmdir+0x36>
0004e03c <rtems_assoc_local_by_remote_bitfield>:
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4e03c: 4e56 ffe8 linkw %fp,#-24 4e040: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4e044: 2c2e 0008 movel %fp@(8),%d6 4e048: 7620 moveq #32,%d3
uint32_t b; uint32_t local_value = 0;
4e04a: 4285 clrl %d5
for (b = 1; b; b <<= 1) {
4e04c: 7401 moveq #1,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4e04e: 45f9 0004 e084 lea 4e084 <rtems_assoc_local_by_remote>,%a2
uint32_t rtems_assoc_local_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4e054: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
if (b & remote_value)
4e058: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e05a: 5383 subql #1,%d3
if (b & remote_value)
4e05c: c084 andl %d4,%d0
4e05e: 6612 bnes 4e072 <rtems_assoc_local_by_remote_bitfield+0x36>
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e060: d482 addl %d2,%d2 4e062: 4a83 tstl %d3
4e064: 66f2 bnes 4e058 <rtems_assoc_local_by_remote_bitfield+0x1c>
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
}
return local_value;
}
4e066: 2005 movel %d5,%d0 4e068: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 4e06e: 4e5e unlk %fp 4e070: 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);
4e072: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e074: d482 addl %d2,%d2
if (b & remote_value)
local_value |= rtems_assoc_local_by_remote(ap, b);
4e076: 2f06 movel %d6,%sp@- 4e078: 4e92 jsr %a2@ 4e07a: 508f addql #8,%sp 4e07c: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t local_value = 0;
for (b = 1; b; b <<= 1) {
4e07e: 4a83 tstl %d3
4e080: 66d6 bnes 4e058 <rtems_assoc_local_by_remote_bitfield+0x1c><== ALWAYS TAKEN
4e082: 60e2 bras 4e066 <rtems_assoc_local_by_remote_bitfield+0x2a><== NOT EXECUTED
00043580 <rtems_assoc_name_by_local_bitfield>:
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43580: 4e56 ffe0 linkw %fp,#-32 43584: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 43588: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
4358c: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
4358e: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
43590: 49f9 0004 35fc lea 435fc <rtems_assoc_name_by_local>,%a4 43596: 47f9 0005 068c lea 5068c <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
4359c: 4bf9 0005 0c50 lea 50c50 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
435a2: 4212 clrb %a2@
char *rtems_assoc_name_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
435a4: 2a2e 0008 movel %fp@(8),%d5 435a8: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
435ac: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
435ae: 5383 subql #1,%d3
if (b & value) {
435b0: c084 andl %d4,%d0
435b2: 6714 beqs 435c8 <rtems_assoc_name_by_local_bitfield+0x48>
if (*buffer)
435b4: 4a12 tstb %a2@
435b6: 6622 bnes 435da <rtems_assoc_name_by_local_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_local(ap, b));
435b8: 2f02 movel %d2,%sp@- 435ba: 2f05 movel %d5,%sp@- 435bc: 4e94 jsr %a4@ 435be: 2f00 movel %d0,%sp@- 435c0: 2f0a movel %a2,%sp@- 435c2: 4e93 jsr %a3@ 435c4: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
435c8: d482 addl %d2,%d2 435ca: 4a83 tstl %d3
435cc: 66de bnes 435ac <rtems_assoc_name_by_local_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_local(ap, b));
}
}
return buffer;
}
435ce: 200a movel %a2,%d0 435d0: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 435d6: 4e5e unlk %fp 435d8: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
435da: 2f0a movel %a2,%sp@- 435dc: 4e95 jsr %a5@ 435de: 588f addql #4,%sp 435e0: 323c 2000 movew #8192,%d1 435e4: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_local(ap, b));
435e8: 2f02 movel %d2,%sp@- 435ea: 2f05 movel %d5,%sp@- 435ec: 4e94 jsr %a4@ 435ee: 2f00 movel %d0,%sp@- 435f0: 2f0a movel %a2,%sp@- 435f2: 4e93 jsr %a3@ 435f4: 4fef 0010 lea %sp@(16),%sp 435f8: 60ce bras 435c8 <rtems_assoc_name_by_local_bitfield+0x48>
...
00043634 <rtems_assoc_name_by_remote_bitfield>:
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43634: 4e56 ffe0 linkw %fp,#-32 43638: 48d7 3c3c moveml %d2-%d5/%a2-%a5,%sp@ 4363c: 246e 0010 moveal %fp@(16),%a2
uint32_t b;
*buffer = 0;
43640: 7620 moveq #32,%d3
for (b = 1; b; b <<= 1) {
43642: 7401 moveq #1,%d2
if (b & value) {
if (*buffer)
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
43644: 49f9 0004 36b0 lea 436b0 <rtems_assoc_name_by_remote>,%a4 4364a: 47f9 0005 068c lea 5068c <strcat>,%a3
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
43650: 4bf9 0005 0c50 lea 50c50 <strlen>,%a5
char *buffer
)
{
uint32_t b;
*buffer = 0;
43656: 4212 clrb %a2@
char *rtems_assoc_name_by_remote_bitfield(
const rtems_assoc_t *ap,
uint32_t value,
char *buffer
)
{
43658: 2a2e 0008 movel %fp@(8),%d5 4365c: 282e 000c movel %fp@(12),%d4
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
43660: 2002 movel %d2,%d0
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
43662: 5383 subql #1,%d3
if (b & value) {
43664: c084 andl %d4,%d0
43666: 6714 beqs 4367c <rtems_assoc_name_by_remote_bitfield+0x48>
if (*buffer)
43668: 4a12 tstb %a2@
4366a: 6622 bnes 4368e <rtems_assoc_name_by_remote_bitfield+0x5a>
strcat(buffer, " ");
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
4366c: 2f02 movel %d2,%sp@- 4366e: 2f05 movel %d5,%sp@- 43670: 4e94 jsr %a4@ 43672: 2f00 movel %d0,%sp@- 43674: 2f0a movel %a2,%sp@- 43676: 4e93 jsr %a3@ 43678: 4fef 0010 lea %sp@(16),%sp
{
uint32_t b;
*buffer = 0;
for (b = 1; b; b <<= 1) {
4367c: d482 addl %d2,%d2 4367e: 4a83 tstl %d3
43680: 66de bnes 43660 <rtems_assoc_name_by_remote_bitfield+0x2c>
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
}
}
return buffer;
}
43682: 200a movel %a2,%d0 43684: 4cee 3c3c ffe0 moveml %fp@(-32),%d2-%d5/%a2-%a5 4368a: 4e5e unlk %fp 4368c: 4e75 rts
*buffer = 0;
for (b = 1; b; b <<= 1) {
if (b & value) {
if (*buffer)
strcat(buffer, " ");
4368e: 2f0a movel %a2,%sp@- 43690: 4e95 jsr %a5@ 43692: 588f addql #4,%sp 43694: 323c 2000 movew #8192,%d1 43698: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat(buffer, rtems_assoc_name_by_remote(ap, b));
4369c: 2f02 movel %d2,%sp@- 4369e: 2f05 movel %d5,%sp@- 436a0: 4e94 jsr %a4@ 436a2: 2f00 movel %d0,%sp@- 436a4: 2f0a movel %a2,%sp@- 436a6: 4e93 jsr %a3@ 436a8: 4fef 0010 lea %sp@(16),%sp 436ac: 60ce bras 4367c <rtems_assoc_name_by_remote_bitfield+0x48>
...
0004afa4 <rtems_assoc_ptr_by_local>:
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4afa4: 4e56 0000 linkw %fp,#0 4afa8: 2f0a movel %a2,%sp@- 4afaa: 246e 0008 moveal %fp@(8),%a2 4afae: 2f02 movel %d2,%sp@- 4afb0: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4afb4: 2012 movel %a2@,%d0
4afb6: 6742 beqs 4affa <rtems_assoc_ptr_by_local+0x56>
4afb8: 4879 0005 d696 pea 5d696 <IMFS_memfile_handlers+0x38> 4afbe: 2f00 movel %d0,%sp@- 4afc0: 4eb9 0004 f8f4 jsr 4f8f4 <strcmp> 4afc6: 508f addql #8,%sp 4afc8: 4a80 tstl %d0
4afca: 662a bnes 4aff6 <rtems_assoc_ptr_by_local+0x52>
default_ap = ap++;
4afcc: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
4afd0: 4a90 tstl %a0@
4afd2: 6714 beqs 4afe8 <rtems_assoc_ptr_by_local+0x44> <== NEVER TAKEN
4afd4: 200a movel %a2,%d0 4afd6: 2448 moveal %a0,%a2
if (ap->local_value == local_value)
4afd8: b4aa 0004 cmpl %a2@(4),%d2
4afdc: 670a beqs 4afe8 <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++)
4afde: 45ea 000c lea %a2@(12),%a2 4afe2: 4a92 tstl %a2@
4afe4: 66f2 bnes 4afd8 <rtems_assoc_ptr_by_local+0x34>
4afe6: 2440 moveal %d0,%a2
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4afe8: 200a movel %a2,%d0 4afea: 242e fff8 movel %fp@(-8),%d2 4afee: 246e fffc moveal %fp@(-4),%a2 4aff2: 4e5e unlk %fp 4aff4: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
const rtems_assoc_t *default_ap = 0;
4aff6: 4280 clrl %d0 4aff8: 60de bras 4afd8 <rtems_assoc_ptr_by_local+0x34> 4affa: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (ap->local_value == local_value)
return ap;
return default_ap;
}
4affc: 200a movel %a2,%d0 4affe: 242e fff8 movel %fp@(-8),%d2 4b002: 246e fffc moveal %fp@(-4),%a2 4b006: 4e5e unlk %fp
...
00043750 <rtems_assoc_ptr_by_name>:
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
43750: 4e56 ffec linkw %fp,#-20 43754: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 43758: 246e 0008 moveal %fp@(8),%a2 4375c: 262e 000c movel %fp@(12),%d3
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
43760: 2412 movel %a2@,%d2
43762: 6748 beqs 437ac <rtems_assoc_ptr_by_name+0x5c>
43764: 4879 0005 de83 pea 5de83 <_rodata_start+0x603> 4376a: 47f9 0005 06f8 lea 506f8 <strcmp>,%a3 43770: 2f02 movel %d2,%sp@- 43772: 4e93 jsr %a3@ 43774: 508f addql #8,%sp 43776: 4a80 tstl %d0
43778: 662e bnes 437a8 <rtems_assoc_ptr_by_name+0x58>
default_ap = ap++;
4377a: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
4377e: 2410 movel %a0@,%d2
43780: 671a beqs 4379c <rtems_assoc_ptr_by_name+0x4c> <== NEVER TAKEN
43782: 280a movel %a2,%d4 43784: 2448 moveal %a0,%a2
if (strcmp(ap->name, name) == 0)
43786: 2f03 movel %d3,%sp@- 43788: 2f02 movel %d2,%sp@- 4378a: 4e93 jsr %a3@ 4378c: 508f addql #8,%sp 4378e: 4a80 tstl %d0
43790: 670a beqs 4379c <rtems_assoc_ptr_by_name+0x4c>
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
default_ap = ap++;
for ( ; ap->name; ap++)
43792: 45ea 000c lea %a2@(12),%a2 43796: 2412 movel %a2@,%d2
43798: 66ec bnes 43786 <rtems_assoc_ptr_by_name+0x36>
4379a: 2444 moveal %d4,%a2
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
4379c: 200a movel %a2,%d0 4379e: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 437a4: 4e5e unlk %fp 437a6: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_name(
const rtems_assoc_t *ap,
const char *name
)
{
const rtems_assoc_t *default_ap = 0;
437a8: 4284 clrl %d4 437aa: 60da bras 43786 <rtems_assoc_ptr_by_name+0x36> 437ac: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (strcmp(ap->name, name) == 0)
return ap;
return default_ap;
}
437ae: 200a movel %a2,%d0 437b0: 4cee 0c1c ffec moveml %fp@(-20),%d2-%d4/%a2-%a3 437b6: 4e5e unlk %fp
...
0004e0bc <rtems_assoc_ptr_by_remote>:
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
4e0bc: 4e56 0000 linkw %fp,#0 4e0c0: 2f0a movel %a2,%sp@- 4e0c2: 246e 0008 moveal %fp@(8),%a2 4e0c6: 2f02 movel %d2,%sp@- 4e0c8: 242e 000c movel %fp@(12),%d2
const rtems_assoc_t *default_ap = 0;
if (rtems_assoc_is_default(ap))
4e0cc: 2012 movel %a2@,%d0
4e0ce: 6742 beqs 4e112 <rtems_assoc_ptr_by_remote+0x56> <== NEVER TAKEN
4e0d0: 4879 0005 d696 pea 5d696 <IMFS_memfile_handlers+0x38> 4e0d6: 2f00 movel %d0,%sp@- 4e0d8: 4eb9 0004 f8f4 jsr 4f8f4 <strcmp> 4e0de: 508f addql #8,%sp 4e0e0: 4a80 tstl %d0
4e0e2: 662a bnes 4e10e <rtems_assoc_ptr_by_remote+0x52>
default_ap = ap++;
4e0e4: 41ea 000c lea %a2@(12),%a0
for ( ; ap->name; ap++)
4e0e8: 4a90 tstl %a0@
4e0ea: 6714 beqs 4e100 <rtems_assoc_ptr_by_remote+0x44> <== NEVER TAKEN
4e0ec: 200a movel %a2,%d0 4e0ee: 2448 moveal %a0,%a2
if (ap->remote_value == remote_value)
4e0f0: b4aa 0008 cmpl %a2@(8),%d2
4e0f4: 670a beqs 4e100 <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++)
4e0f6: 45ea 000c lea %a2@(12),%a2 4e0fa: 4a92 tstl %a2@
4e0fc: 66f2 bnes 4e0f0 <rtems_assoc_ptr_by_remote+0x34>
4e0fe: 2440 moveal %d0,%a2
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4e100: 200a movel %a2,%d0 4e102: 242e fff8 movel %fp@(-8),%d2 4e106: 246e fffc moveal %fp@(-4),%a2 4e10a: 4e5e unlk %fp 4e10c: 4e75 rts
const rtems_assoc_t *rtems_assoc_ptr_by_remote(
const rtems_assoc_t *ap,
uint32_t remote_value
)
{
const rtems_assoc_t *default_ap = 0;
4e10e: 4280 clrl %d0 4e110: 60de bras 4e0f0 <rtems_assoc_ptr_by_remote+0x34> 4e112: 95ca subal %a2,%a2
for ( ; ap->name; ap++)
if (ap->remote_value == remote_value)
return ap;
return default_ap;
}
4e114: 200a movel %a2,%d0 4e116: 242e fff8 movel %fp@(-8),%d2 4e11a: 246e fffc moveal %fp@(-4),%a2 4e11e: 4e5e unlk %fp
...
00043824 <rtems_assoc_remote_by_local_bitfield>:
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
43824: 4e56 ffe8 linkw %fp,#-24 43828: 48d7 047c moveml %d2-%d6/%a2,%sp@ 4382c: 2c2e 0008 movel %fp@(8),%d6 43830: 7620 moveq #32,%d3
uint32_t b; uint32_t remote_value = 0;
43832: 4285 clrl %d5
for (b = 1; b; b <<= 1)
43834: 7401 moveq #1,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
43836: 45f9 0004 386c lea 4386c <rtems_assoc_remote_by_local>,%a2
uint32_t rtems_assoc_remote_by_local_bitfield(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
4383c: 282e 000c movel %fp@(12),%d4
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
if (b & local_value)
43840: 2002 movel %d2,%d0
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43842: 5383 subql #1,%d3
if (b & local_value)
43844: c084 andl %d4,%d0
43846: 6612 bnes 4385a <rtems_assoc_remote_by_local_bitfield+0x36>
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43848: d482 addl %d2,%d2 4384a: 4a83 tstl %d3
4384c: 66f2 bnes 43840 <rtems_assoc_remote_by_local_bitfield+0x1c>
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
return remote_value;
}
4384e: 2005 movel %d5,%d0 43850: 4cee 047c ffe8 moveml %fp@(-24),%d2-%d6/%a2 43856: 4e5e unlk %fp 43858: 4e75 rts
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
4385a: 2f02 movel %d2,%sp@-
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
4385c: d482 addl %d2,%d2
if (b & local_value)
remote_value |= rtems_assoc_remote_by_local(ap, b);
4385e: 2f06 movel %d6,%sp@- 43860: 4e92 jsr %a2@ 43862: 508f addql #8,%sp 43864: 8a80 orl %d0,%d5
)
{
uint32_t b;
uint32_t remote_value = 0;
for (b = 1; b; b <<= 1)
43866: 4a83 tstl %d3
43868: 66d6 bnes 43840 <rtems_assoc_remote_by_local_bitfield+0x1c><== ALWAYS TAKEN
4386a: 60e2 bras 4384e <rtems_assoc_remote_by_local_bitfield+0x2a><== NOT EXECUTED
0004e948 <rtems_barrier_create>:
rtems_name name,
rtems_attribute attribute_set,
uint32_t maximum_waiters,
rtems_id *id
)
{
4e948: 4e56 ffe8 linkw %fp,#-24 4e94c: 202e 0010 movel %fp@(16),%d0 4e950: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4e954: 242e 0008 movel %fp@(8),%d2 4e958: 262e 000c movel %fp@(12),%d3 4e95c: 246e 0014 moveal %fp@(20),%a2
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
4e960: 4a82 tstl %d2
4e962: 677a beqs 4e9de <rtems_barrier_create+0x96> <== NEVER TAKEN
return RTEMS_INVALID_NAME;
if ( !id )
4e964: 4a8a tstl %a2 4e966: 6700 00cc beqw 4ea34 <rtems_barrier_create+0xec>
return RTEMS_INVALID_ADDRESS;
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
4e96a: 0803 0004 btst #4,%d3
4e96e: 677a beqs 4e9ea <rtems_barrier_create+0xa2>
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
4e970: 42ae fff8 clrl %fp@(-8)
if ( maximum_waiters == 0 )
4e974: 4a80 tstl %d0 4e976: 6700 00b0 beqw 4ea28 <rtems_barrier_create+0xe0> 4e97a: 2239 0006 15e4 movel 615e4 <_Thread_Dispatch_disable_level>,%d1 4e980: 5281 addql #1,%d1
return RTEMS_INVALID_NUMBER;
} else
the_attributes.discipline = CORE_BARRIER_MANUAL_RELEASE;
the_attributes.maximum_count = maximum_waiters;
4e982: 2d40 fffc movel %d0,%fp@(-4) 4e986: 23c1 0006 15e4 movel %d1,615e4 <_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 );
4e98c: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4e992: 4eb9 0004 941c jsr 4941c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4e998: 588f addql #4,%sp 4e99a: 2640 moveal %d0,%a3 4e99c: 4a80 tstl %d0
4e99e: 6776 beqs 4ea16 <rtems_barrier_create+0xce> <== NEVER TAKEN
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
the_barrier->attribute_set = attribute_set;
4e9a0: 2743 0010 movel %d3,%a3@(16)
_CORE_barrier_Initialize( &the_barrier->Barrier, &the_attributes );
4e9a4: 486e fff8 pea %fp@(-8) 4e9a8: 486b 0014 pea %a3@(20) 4e9ac: 4eb9 0004 f1ec jsr 4f1ec <_CORE_barrier_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
4e9b2: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e9b6: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e9b8: 2079 0006 1e3a moveal 61e3a <_Barrier_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
4e9be: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
4e9c0: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
4e9c4: 2742 000c movel %d2,%a3@(12)
&_Barrier_Information,
&the_barrier->Object,
(Objects_Name) name
);
*id = the_barrier->Object.id;
4e9c8: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
4e9ca: 4eb9 0004 a162 jsr 4a162 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4e9d0: 508f addql #8,%sp 4e9d2: 4280 clrl %d0
}
4e9d4: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4e9da: 4e5e unlk %fp 4e9dc: 4e75 rts
{
Barrier_Control *the_barrier;
CORE_barrier_Attributes the_attributes;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
4e9de: 7003 moveq #3,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4e9e0: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4e9e6: 4e5e unlk %fp 4e9e8: 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;
4e9ea: 7201 moveq #1,%d1 4e9ec: 2d41 fff8 movel %d1,%fp@(-8) 4e9f0: 2239 0006 15e4 movel 615e4 <_Thread_Dispatch_disable_level>,%d1 4e9f6: 5281 addql #1,%d1
the_attributes.maximum_count = maximum_waiters;
4e9f8: 2d40 fffc movel %d0,%fp@(-4) 4e9fc: 23c1 0006 15e4 movel %d1,615e4 <_Thread_Dispatch_disable_level> 4ea02: 4879 0006 1e22 pea 61e22 <_Barrier_Information> 4ea08: 4eb9 0004 941c jsr 4941c <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_barrier = _Barrier_Allocate();
if ( !the_barrier ) {
4ea0e: 588f addql #4,%sp 4ea10: 2640 moveal %d0,%a3 4ea12: 4a80 tstl %d0
4ea14: 668a bnes 4e9a0 <rtems_barrier_create+0x58>
_Thread_Enable_dispatch();
4ea16: 4eb9 0004 a162 jsr 4a162 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
4ea1c: 7005 moveq #5,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4ea1e: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ea24: 4e5e unlk %fp 4ea26: 4e75 rts
/* Initialize core barrier attributes */
if ( _Attributes_Is_barrier_automatic( attribute_set ) ) {
the_attributes.discipline = CORE_BARRIER_AUTOMATIC_RELEASE;
if ( maximum_waiters == 0 )
return RTEMS_INVALID_NUMBER;
4ea28: 700a moveq #10,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4ea2a: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3 4ea30: 4e5e unlk %fp 4ea32: 4e75 rts
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
if ( !id )
return RTEMS_INVALID_ADDRESS;
4ea34: 7009 moveq #9,%d0
*id = the_barrier->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
4ea36: 4cee 0c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a3
4ea3c: 4e5e unlk %fp <== NOT EXECUTED
00042760 <rtems_bsp_cmdline_get_param>:
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
42760: 4e56 ffe8 linkw %fp,#-24 42764: 202e 0008 movel %fp@(8),%d0 42768: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 4276c: 246e 000c moveal %fp@(12),%a2
const char *p;
if ( !name )
42770: 4a80 tstl %d0
42772: 660e bnes 42782 <rtems_bsp_cmdline_get_param+0x22>
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
return NULL;
42774: 95ca subal %a2,%a2
copy_string( p, value, length );
return value;
}
42776: 200a movel %a2,%d0 42778: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 4277e: 4e5e unlk %fp 42780: 4e75 rts
const char *p;
if ( !name )
return NULL;
if ( !value )
42782: 4a8a tstl %a2
42784: 67f0 beqs 42776 <rtems_bsp_cmdline_get_param+0x16>
return NULL;
if ( !length )
42786: 4aae 0010 tstl %fp@(16)
4278a: 67e8 beqs 42774 <rtems_bsp_cmdline_get_param+0x14>
return NULL;
value[0] = '\0';
4278c: 4212 clrb %a2@
p = rtems_bsp_cmdline_get_param_raw( name );
4278e: 2f00 movel %d0,%sp@- 42790: 4eb9 0004 27f0 jsr 427f0 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
42796: 588f addql #4,%sp 42798: 4a80 tstl %d0
4279a: 67d8 beqs 42774 <rtems_bsp_cmdline_get_param+0x14>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
4279c: 2040 moveal %d0,%a0 4279e: 1210 moveb %a0@,%d1
427a0: 67d4 beqs 42776 <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
427a2: 282e 0010 movel %fp@(16),%d4 427a6: 5384 subql #1,%d4
427a8: 67cc beqs 42776 <rtems_bsp_cmdline_get_param+0x16><== NEVER TAKEN
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
427aa: 2240 moveal %d0,%a1 427ac: 47ea 0001 lea %a2@(1),%a3 427b0: 5289 addql #1,%a1
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
427b2: 91c8 subal %a0,%a0
value[i] = '\0';
}
}
const char *rtems_bsp_cmdline_get_param(
427b4: 4280 clrl %d0 427b6: 4283 clrl %d3
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
427b8: 7a22 moveq #34,%d5 427ba: 1401 moveb %d1,%d2 427bc: 49c2 extbl %d2 427be: ba82 cmpl %d2,%d5
427c0: 672a beqs 427ec <rtems_bsp_cmdline_get_param+0x8c>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
427c2: 0803 0000 btst #0,%d3
427c6: 6606 bnes 427ce <rtems_bsp_cmdline_get_param+0x6e>
427c8: 7a20 moveq #32,%d5 427ca: ba82 cmpl %d2,%d5
427cc: 67a8 beqs 42776 <rtems_bsp_cmdline_get_param+0x16>
break;
value[i++] = *p++;
427ce: 5280 addql #1,%d0 427d0: 1581 8800 moveb %d1,%a2@(00000000,%a0:l)
value[i] = '\0';
427d4: 421b clrb %a3@+
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
427d6: 2040 moveal %d0,%a0
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
427d8: 1219 moveb %a1@+,%d1
427da: 679a beqs 42776 <rtems_bsp_cmdline_get_param+0x16>
427dc: b880 cmpl %d0,%d4
427de: 62d8 bhis 427b8 <rtems_bsp_cmdline_get_param+0x58><== ALWAYS TAKEN
return NULL;
copy_string( p, value, length );
return value;
}
427e0: 200a movel %a2,%d0 <== NOT EXECUTED 427e2: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 <== NOT EXECUTED 427e8: 4e5e unlk %fp <== NOT EXECUTED 427ea: 4e75 rts <== NOT EXECUTED
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
quotes++;
427ec: 5283 addql #1,%d3 427ee: 60de bras 427ce <rtems_bsp_cmdline_get_param+0x6e>
000427f0 <rtems_bsp_cmdline_get_param_raw>:
extern const char *bsp_boot_cmdline;
const char *rtems_bsp_cmdline_get_param_raw(
const char *name
)
{
427f0: 4e56 0000 linkw %fp,#0 427f4: 202e 0008 movel %fp@(8),%d0
const char *p;
if ( !name )
427f8: 6606 bnes 42800 <rtems_bsp_cmdline_get_param_raw+0x10><== NEVER TAKEN
return NULL;
if ( !bsp_boot_cmdline )
return NULL;
427fa: 4280 clrl %d0
p = strstr(bsp_boot_cmdline, name);
/* printf( "raw: %p (%s)\n", p, p ); */
return p;
}
427fc: 4e5e unlk %fp 427fe: 4e75 rts
const char *p;
if ( !name )
return NULL;
if ( !bsp_boot_cmdline )
42800: 2239 0006 0670 movel 60670 <bsp_boot_cmdline>,%d1
42806: 67f2 beqs 427fa <rtems_bsp_cmdline_get_param_raw+0xa><== NEVER TAKEN
return NULL;
p = strstr(bsp_boot_cmdline, name);
42808: 2f00 movel %d0,%sp@- 4280a: 2f01 movel %d1,%sp@- 4280c: 4eb9 0005 08fc jsr 508fc <strstr> 42812: 508f addql #8,%sp
/* printf( "raw: %p (%s)\n", p, p ); */ return p; }
42814: 4e5e unlk %fp <== NOT EXECUTED
00042818 <rtems_bsp_cmdline_get_param_rhs>:
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42818: 4e56 fff0 linkw %fp,#-16 4281c: 48d7 041c moveml %d2-%d4/%a2,%sp@
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
42820: 2f2e 0010 movel %fp@(16),%sp@-
const char *rtems_bsp_cmdline_get_param_rhs(
const char *name,
char *value,
size_t length
)
{
42824: 242e 000c movel %fp@(12),%d2 42828: 282e 0008 movel %fp@(8),%d4
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
4282c: 2f02 movel %d2,%sp@- 4282e: 2f04 movel %d4,%sp@- 42830: 4eb9 0004 2760 jsr 42760 <rtems_bsp_cmdline_get_param>
if ( !p )
42836: 4fef 000c lea %sp@(12),%sp
{
const char *p;
const char *rhs;
char *d;
p = rtems_bsp_cmdline_get_param( name, value, length );
4283a: 2600 movel %d0,%d3
if ( !p )
4283c: 660e bnes 4284c <rtems_bsp_cmdline_get_param_rhs+0x34>
return NULL;
rhs = &p[strlen(name)];
if ( *rhs != '=' )
return NULL;
4283e: 4282 clrl %d2
if ( *(d-1) == '\"' )
d--;
*d = '\0';
return value;
}
42840: 2002 movel %d2,%d0 42842: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42848: 4e5e unlk %fp 4284a: 4e75 rts
p = rtems_bsp_cmdline_get_param( name, value, length );
if ( !p )
return NULL;
rhs = &p[strlen(name)];
4284c: 2f04 movel %d4,%sp@- 4284e: 4eb9 0005 0474 jsr 50474 <strlen> 42854: 588f addql #4,%sp 42856: 2243 moveal %d3,%a1 42858: d3c0 addal %d0,%a1
if ( *rhs != '=' )
4285a: 723d moveq #61,%d1 4285c: 1011 moveb %a1@,%d0 4285e: 49c0 extbl %d0 42860: b280 cmpl %d0,%d1
42862: 66da bnes 4283e <rtems_bsp_cmdline_get_param_rhs+0x26><== NEVER TAKEN
return NULL;
rhs++;
42864: 5289 addql #1,%a1
if ( *rhs == '\"' )
42866: 7622 moveq #34,%d3 42868: 1011 moveb %a1@,%d0 4286a: 1200 moveb %d0,%d1 4286c: 49c1 extbl %d1 4286e: b681 cmpl %d1,%d3
42870: 6730 beqs 428a2 <rtems_bsp_cmdline_get_param_rhs+0x8a>
rhs++;
for ( d=value ; *rhs ; )
42872: 4a00 tstb %d0
42874: 6732 beqs 428a8 <rtems_bsp_cmdline_get_param_rhs+0x90>
42876: 2042 moveal %d2,%a0
#include <string.h>
#include <rtems/bspcmdline.h>
const char *rtems_bsp_cmdline_get_param_rhs(
42878: 5289 addql #1,%a1
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
4287a: 10c0 moveb %d0,%a0@+
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
4287c: 1019 moveb %a1@+,%d0
*d++ = *rhs++;
4287e: 2448 moveal %a0,%a2
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
42880: 66f8 bnes 4287a <rtems_bsp_cmdline_get_param_rhs+0x62>
*d++ = *rhs++;
if ( *(d-1) == '\"' )
42882: 204a moveal %a2,%a0 42884: 7222 moveq #34,%d1 42886: 1020 moveb %a0@-,%d0 42888: 49c0 extbl %d0 4288a: b280 cmpl %d0,%d1
4288c: 670e beqs 4289c <rtems_bsp_cmdline_get_param_rhs+0x84>
d--;
*d = '\0';
4288e: 4212 clrb %a2@
return value;
}
42890: 2002 movel %d2,%d0 42892: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42898: 4e5e unlk %fp 4289a: 4e75 rts
rhs++;
if ( *rhs == '\"' )
rhs++;
for ( d=value ; *rhs ; )
*d++ = *rhs++;
if ( *(d-1) == '\"' )
4289c: 2448 moveal %a0,%a2
d--;
*d = '\0';
4289e: 4212 clrb %a2@ 428a0: 60ee bras 42890 <rtems_bsp_cmdline_get_param_rhs+0x78>
if ( *rhs != '=' )
return NULL;
rhs++;
if ( *rhs == '\"' )
rhs++;
428a2: 5289 addql #1,%a1 428a4: 1011 moveb %a1@,%d0 428a6: 60ca bras 42872 <rtems_bsp_cmdline_get_param_rhs+0x5a>
for ( d=value ; *rhs ; )
428a8: 2442 moveal %d2,%a2
*d++ = *rhs++;
if ( *(d-1) == '\"' )
428aa: 204a moveal %a2,%a0 428ac: 7222 moveq #34,%d1 428ae: 1020 moveb %a0@-,%d0 428b0: 49c0 extbl %d0 428b2: b280 cmpl %d0,%d1
428b4: 66d8 bnes 4288e <rtems_bsp_cmdline_get_param_rhs+0x76><== ALWAYS TAKEN
428b6: 60e4 bras 4289c <rtems_bsp_cmdline_get_param_rhs+0x84><== NOT EXECUTED
00043210 <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
43210: 4e56 ff9c linkw %fp,#-100 43214: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 43218: 262e 0008 movel %fp@(8),%d3 4321c: 286e 000c moveal %fp@(12),%a4
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
43220: 4a8c tstl %a4 43222: 6700 013e beqw 43362 <rtems_cpu_usage_report_with_plugin+0x152>
* 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 );
43226: 486e fff0 pea %fp@(-16)
}
}
}
#endif
(*print)(
4322a: 41f9 0006 a09c lea 6a09c <_Objects_Information_table+0x4>,%a0
* 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 );
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
43230: 2c0e movel %fp,%d6 43232: 0686 ffff ffe8 addil #-24,%d6
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
43238: 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 );
4323a: 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 );
4323c: 0684 ffff ffcb addil #-53,%d4
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43242: 4bf9 0004 b324 lea 4b324 <_Timespec_Divide>,%a5
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 );
43248: 0685 ffff ffe0 addil #-32,%d5
}
}
}
#endif
(*print)(
4324e: 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 );
43252: 4eb9 0004 8e5c jsr 48e5c <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
43258: 2f06 movel %d6,%sp@- 4325a: 486e fff0 pea %fp@(-16) 4325e: 4879 0006 a5b4 pea 6a5b4 <CPU_usage_Uptime_at_last_reset> 43264: 4eb9 0004 b408 jsr 4b408 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
4326a: 4879 0005 f316 pea 5f316 <IntUartPollCallbacks.6236+0x20> 43270: 2f03 movel %d3,%sp@- 43272: 4e94 jsr %a4@
/*PAGE
*
* rtems_cpu_usage_report
*/
void rtems_cpu_usage_report_with_plugin(
43274: 4fef 0018 lea %sp@(24),%sp
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
43278: 226e ffc4 moveal %fp@(-60),%a1 4327c: 58ae ffc4 addql #4,%fp@(-60) 43280: 2059 moveal %a1@+,%a0 43282: 4a88 tstl %a0 43284: 6700 00ac beqw 43332 <rtems_cpu_usage_report_with_plugin+0x122>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
43288: 2668 0004 moveal %a0@(4),%a3
if ( information ) {
4328c: 4a8b tstl %a3 4328e: 6700 00a2 beqw 43332 <rtems_cpu_usage_report_with_plugin+0x122>
for ( i=1 ; i <= information->maximum ; i++ ) {
43292: 4a6b 000e tstw %a3@(14) 43296: 6700 009a beqw 43332 <rtems_cpu_usage_report_with_plugin+0x122> 4329a: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
4329c: 206b 0018 moveal %a3@(24),%a0 432a0: 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++ ) {
432a4: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
432a6: 4a8a tstl %a2
432a8: 677c beqs 43326 <rtems_cpu_usage_report_with_plugin+0x116><== NEVER TAKEN
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
432aa: 2f04 movel %d4,%sp@- 432ac: 4878 000d pea d <OPER1+0x1> 432b0: 2f2a 0008 movel %a2@(8),%sp@- 432b4: 4eb9 0004 7a00 jsr 47a00 <rtems_object_get_name>
(*print)(
432ba: 2f04 movel %d4,%sp@- 432bc: 2f2a 0008 movel %a2@(8),%sp@- 432c0: 4879 0005 f488 pea 5f488 <IntUartPollCallbacks.6236+0x192> 432c6: 2f03 movel %d3,%sp@- 432c8: 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 ) {
432ca: 2079 0006 a5a6 moveal 6a5a6 <_Per_CPU_Information+0xc>,%a0 432d0: 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;
432d4: 202a 0082 movel %a2@(130),%d0 432d8: 222a 0086 movel %a2@(134),%d1
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
432dc: 246a 0008 moveal %a2@(8),%a2
#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;
432e0: 2d40 ffe0 movel %d0,%fp@(-32) 432e4: 2d41 ffe4 movel %d1,%fp@(-28)
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
432e8: b5e8 0008 cmpal %a0@(8),%a2
432ec: 677e beqs 4336c <rtems_cpu_usage_report_with_plugin+0x15c>
_Timestamp_Subtract(
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
432ee: 486e fff8 pea %fp@(-8)
/*
* Print the information
*/
(*print)( context,
432f2: 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 );
432f8: 486e fffc pea %fp@(-4) 432fc: 2f06 movel %d6,%sp@- 432fe: 2f05 movel %d5,%sp@- 43300: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
43302: 2f2e fff8 movel %fp@(-8),%sp@- 43306: 202e ffe4 movel %fp@(-28),%d0 4330a: 2f2e fffc movel %fp@(-4),%sp@- 4330e: 4c47 0000 remul %d7,%d0,%d0 43312: 2f00 movel %d0,%sp@- 43314: 2f2e ffe0 movel %fp@(-32),%sp@- 43318: 4879 0005 f49b pea 5f49b <IntUartPollCallbacks.6236+0x1a5> 4331e: 2f03 movel %d3,%sp@- 43320: 4e94 jsr %a4@ 43322: 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++ ) {
43326: 4280 clrl %d0 43328: 302b 000e movew %a3@(14),%d0 4332c: b480 cmpl %d0,%d2 4332e: 6300 ff6c blsw 4329c <rtems_cpu_usage_report_with_plugin+0x8c>
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
43332: 206e ffc4 moveal %fp@(-60),%a0 43336: b1fc 0006 a0a8 cmpal #434344,%a0 4333c: 6600 ff3a bnew 43278 <rtems_cpu_usage_report_with_plugin+0x68>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
43340: 202e ffec movel %fp@(-20),%d0 43344: 243c 0000 03e8 movel #1000,%d2 4334a: 4c42 0000 remul %d2,%d0,%d0 4334e: 2f00 movel %d0,%sp@- 43350: 2f2e ffe8 movel %fp@(-24),%sp@- 43354: 4879 0005 f4b3 pea 5f4b3 <IntUartPollCallbacks.6236+0x1bd> 4335a: 2f03 movel %d3,%sp@- 4335c: 4e94 jsr %a4@ 4335e: 4fef 0010 lea %sp@(16),%sp
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
43362: 4cee 3cfc ff9c moveml %fp@(-100),%d2-%d7/%a2-%a5 43368: 4e5e unlk %fp 4336a: 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(
4336c: 486e ffd8 pea %fp@(-40)
/*
* Print the information
*/
(*print)( context,
43370: 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(
43376: 486e fff0 pea %fp@(-16) 4337a: 4879 0006 a18a pea 6a18a <_Thread_Time_of_last_context_switch> 43380: 4eb9 0004 b408 jsr 4b408 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
43386: 486e ffd8 pea %fp@(-40) 4338a: 2f05 movel %d5,%sp@- 4338c: 4eb9 0004 b2dc jsr 4b2dc <_Timespec_Add_to> 43392: 4fef 0014 lea %sp@(20),%sp
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
43396: 486e fff8 pea %fp@(-8) 4339a: 486e fffc pea %fp@(-4) 4339e: 2f06 movel %d6,%sp@- 433a0: 2f05 movel %d5,%sp@- 433a2: 4e95 jsr %a5@
/*
* Print the information
*/
(*print)( context,
433a4: 2f2e fff8 movel %fp@(-8),%sp@- 433a8: 202e ffe4 movel %fp@(-28),%d0 433ac: 2f2e fffc movel %fp@(-4),%sp@- 433b0: 4c47 0000 remul %d7,%d0,%d0 433b4: 2f00 movel %d0,%sp@- 433b6: 2f2e ffe0 movel %fp@(-32),%sp@- 433ba: 4879 0005 f49b pea 5f49b <IntUartPollCallbacks.6236+0x1a5> 433c0: 2f03 movel %d3,%sp@- 433c2: 4e94 jsr %a4@ 433c4: 4fef 0028 lea %sp@(40),%sp 433c8: 6000 ff5c braw 43326 <rtems_cpu_usage_report_with_plugin+0x116>
0004e910 <rtems_deviceio_errno>:
[RTEMS_IO_ERROR] = EIO,
[RTEMS_PROXY_BLOCKING] = EIO
};
int rtems_deviceio_errno(rtems_status_code sc)
{
4e910: 4e56 0000 linkw %fp,#0 4e914: 202e 0008 movel %fp@(8),%d0 4e918: 2f02 movel %d2,%sp@-
if (sc == RTEMS_SUCCESSFUL) {
4e91a: 4a80 tstl %d0
4e91c: 660a bnes 4e928 <rtems_deviceio_errno+0x18> <== NEVER TAKEN
errno = eno;
return -1;
}
}
4e91e: 242e fffc movel %fp@(-4),%d2
};
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
4e922: 4280 clrl %d0
errno = eno;
return -1;
}
}
4e924: 4e5e unlk %fp 4e926: 4e75 rts
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
4e928: 721c moveq #28,%d1 <== NOT EXECUTED 4e92a: b280 cmpl %d0,%d1 <== NOT EXECUTED 4e92c: 651e bcss 4e94c <rtems_deviceio_errno+0x3c> <== NOT EXECUTED
eno = status_code_to_errno [sc];
4e92e: 41f9 0005 d8f0 lea 5d8f0 <status_code_to_errno>,%a0 <== NOT EXECUTED 4e934: 2430 0c00 movel %a0@(00000000,%d0:l:4),%d2 <== NOT EXECUTED
}
errno = eno;
4e938: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 4e93e: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4e940: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4e942: 2082 movel %d2,%a0@ <== NOT EXECUTED
return -1;
}
}
4e944: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 4e948: 4e5e unlk %fp <== NOT EXECUTED 4e94a: 4e75 rts <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4e94c: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
int rtems_deviceio_errno(rtems_status_code sc)
{
if (sc == RTEMS_SUCCESSFUL) {
return 0;
} else {
int eno = EINVAL;
4e952: 7416 moveq #22,%d2 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4e954: 2040 moveal %d0,%a0 <== NOT EXECUTED
return -1;
4e956: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) {
eno = status_code_to_errno [sc];
}
errno = eno;
4e958: 2082 movel %d2,%a0@ <== NOT EXECUTED 4e95a: 60e8 bras 4e944 <rtems_deviceio_errno+0x34> <== NOT EXECUTED
00048534 <rtems_extension_create>:
rtems_status_code rtems_extension_create(
rtems_name name,
const rtems_extensions_table *extension_table,
rtems_id *id
)
{
48534: 4e56 fff4 linkw %fp,#-12 48538: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4853c: 242e 0008 movel %fp@(8),%d2 48540: 246e 0010 moveal %fp@(16),%a2
Extension_Control *the_extension;
if ( !id )
48544: 4a8a tstl %a2 48546: 6700 00a0 beqw 485e8 <rtems_extension_create+0xb4>
return RTEMS_INVALID_ADDRESS;
if ( !rtems_is_name_valid( name ) )
4854a: 4a82 tstl %d2
4854c: 660c bnes 4855a <rtems_extension_create+0x26>
return RTEMS_INVALID_NAME;
4854e: 7003 moveq #3,%d0
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
48550: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 48556: 4e5e unlk %fp 48558: 4e75 rts
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
4855a: 2039 0006 a0dc movel 6a0dc <_Thread_Dispatch_disable_level>,%d0 48560: 5280 addql #1,%d0 48562: 23c0 0006 a0dc movel %d0,6a0dc <_Thread_Dispatch_disable_level>
#ifndef __EXTENSION_MANAGER_inl
#define __EXTENSION_MANAGER_inl
RTEMS_INLINE_ROUTINE Extension_Control *_Extension_Allocate( void )
{
return (Extension_Control *) _Objects_Allocate( &_Extension_Information );
48568: 4879 0006 a26a pea 6a26a <_Extension_Information> 4856e: 4eb9 0004 9528 jsr 49528 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
48574: 588f addql #4,%sp 48576: 2640 moveal %d0,%a3 48578: 4a80 tstl %d0
4857a: 675a beqs 485d6 <rtems_extension_create+0xa2> <== NEVER TAKEN
RTEMS_INLINE_ROUTINE void _User_extensions_Add_set_with_table(
User_extensions_Control *extension,
const User_extensions_Table *extension_table
)
{
extension->Callouts = *extension_table;
4857c: 206e 000c moveal %fp@(12),%a0 48580: 2758 0024 movel %a0@+,%a3@(36) 48584: 2758 0028 movel %a0@+,%a3@(40) 48588: 2758 002c movel %a0@+,%a3@(44) 4858c: 2758 0030 movel %a0@+,%a3@(48) 48590: 2758 0034 movel %a0@+,%a3@(52) 48594: 2758 0038 movel %a0@+,%a3@(56) 48598: 2758 003c movel %a0@+,%a3@(60) 4859c: 2750 0040 movel %a0@,%a3@(64)
_User_extensions_Add_set( extension );
485a0: 486b 0010 pea %a3@(16) 485a4: 4eb9 0004 b458 jsr 4b458 <_User_extensions_Add_set>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
485aa: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
485ae: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
485b0: 2079 0006 a282 moveal 6a282 <_Extension_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
485b6: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
485b8: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
485bc: 2742 000c movel %d2,%a3@(12)
&_Extension_Information,
&the_extension->Object,
(Objects_Name) name
);
*id = the_extension->Object.id;
485c0: 2480 movel %d0,%a2@
_Thread_Enable_dispatch();
485c2: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
485c8: 588f addql #4,%sp 485ca: 4280 clrl %d0
}
485cc: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 485d2: 4e5e unlk %fp 485d4: 4e75 rts
_Thread_Disable_dispatch(); /* to prevent deletion */
the_extension = _Extension_Allocate();
if ( !the_extension ) {
_Thread_Enable_dispatch();
485d6: 4eb9 0004 a372 jsr 4a372 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
485dc: 7005 moveq #5,%d0
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
485de: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 485e4: 4e5e unlk %fp 485e6: 4e75 rts
)
{
Extension_Control *the_extension;
if ( !id )
return RTEMS_INVALID_ADDRESS;
485e8: 7009 moveq #9,%d0
);
*id = the_extension->Object.id;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
485ea: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
485f0: 4e5e unlk %fp <== NOT EXECUTED
00042d0e <rtems_filesystem_dirname>:
int rtems_filesystem_dirname(
const char *pathname
)
{
42d0e: 4e56 fff4 linkw %fp,#-12 42d12: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 42d16: 246e 0008 moveal %fp@(8),%a2
int len = strlen( pathname );
42d1a: 2f0a movel %a2,%sp@- 42d1c: 4eb9 0004 fe4c jsr 4fe4c <strlen> 42d22: 588f addql #4,%sp 42d24: 2400 movel %d0,%d2
while ( len ) {
42d26: 671c beqs 42d44 <rtems_filesystem_dirname+0x36> <== NEVER TAKEN
flags,
pathloc,
follow_link );
}
int rtems_filesystem_dirname(
42d28: d5c0 addal %d0,%a2 42d2a: 47f9 0004 3cdc lea 43cdc <rtems_filesystem_is_separator>,%a3
)
{
int len = strlen( pathname );
while ( len ) {
len--;
42d30: 5382 subql #1,%d2
if ( rtems_filesystem_is_separator( pathname[len] ) )
42d32: 1022 moveb %a2@-,%d0 42d34: 49c0 extbl %d0 42d36: 2f00 movel %d0,%sp@- 42d38: 4e93 jsr %a3@ 42d3a: 588f addql #4,%sp 42d3c: 4a80 tstl %d0
42d3e: 6604 bnes 42d44 <rtems_filesystem_dirname+0x36>
const char *pathname
)
{
int len = strlen( pathname );
while ( len ) {
42d40: 4a82 tstl %d2
42d42: 66ec bnes 42d30 <rtems_filesystem_dirname+0x22>
if ( rtems_filesystem_is_separator( pathname[len] ) )
break;
}
return len;
}
42d44: 2002 movel %d2,%d0 42d46: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
42d4c: 4e5e unlk %fp <== NOT EXECUTED
00042c80 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42c80: 4e56 fffc linkw %fp,#-4 42c84: 2f0a movel %a2,%sp@- 42c86: 246e 0008 moveal %fp@(8),%a2 42c8a: 2f02 movel %d2,%sp@- 42c8c: 242e 0014 movel %fp@(20),%d2
int i = 0;
42c90: 42ae fffc clrl %fp@(-4)
/*
* Verify Input parameters.
*/
if ( !pathname )
42c94: 4a8a tstl %a2
42c96: 675c beqs 42cf4 <rtems_filesystem_evaluate_path+0x74><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42c98: 4a82 tstl %d2
42c9a: 673e beqs 42cda <rtems_filesystem_evaluate_path+0x5a><== NEVER TAKEN
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
42c9c: 2f02 movel %d2,%sp@- 42c9e: 486e fffc pea %fp@(-4) 42ca2: 2f0a movel %a2,%sp@- 42ca4: 4eb9 0004 3c68 jsr 43c68 <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],
42caa: 2f2e 0018 movel %fp@(24),%sp@- 42cae: 2f02 movel %d2,%sp@- 42cb0: 2f2e 0010 movel %fp@(16),%sp@- 42cb4: 202e fffc movel %fp@(-4),%d0 42cb8: 222e 000c movel %fp@(12),%d1 42cbc: 9280 subl %d0,%d1 42cbe: 2f01 movel %d1,%sp@- 42cc0: 4872 0800 pea %a2@(00000000,%d0:l) 42cc4: 4eb9 0004 2bd0 jsr 42bd0 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42cca: 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],
42cce: 4fef 0020 lea %sp@(32),%sp
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42cd2: 246e fff8 moveal %fp@(-8),%a2 42cd6: 4e5e unlk %fp 42cd8: 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 */
42cda: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 42ce0: 7405 moveq #5,%d2 <== NOT EXECUTED 42ce2: 2040 moveal %d0,%a0 <== NOT EXECUTED 42ce4: 70ff moveq #-1,%d0 <== NOT EXECUTED 42ce6: 2082 movel %d2,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42ce8: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED 42cec: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42cf0: 4e5e unlk %fp <== NOT EXECUTED 42cf2: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42cf4: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42cfa: 242e fff4 movel %fp@(-12),%d2 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42cfe: 2040 moveal %d0,%a0 <== NOT EXECUTED 42d00: 720e moveq #14,%d1 <== NOT EXECUTED 42d02: 70ff moveq #-1,%d0 <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
42d04: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 42d08: 4e5e unlk %fp <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42d0a: 2081 movel %d1,%a0@ <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i],
pathnamelen - i,
flags,
pathloc,
follow_link );
}
00042bd0 <rtems_filesystem_evaluate_relative_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
42bd0: 4e56 fff0 linkw %fp,#-16 42bd4: 202e 0008 movel %fp@(8),%d0 42bd8: 48d7 041c moveml %d2-%d4/%a2,%sp@ 42bdc: 222e 000c movel %fp@(12),%d1 42be0: 262e 0010 movel %fp@(16),%d3 42be4: 246e 0014 moveal %fp@(20),%a2 42be8: 282e 0018 movel %fp@(24),%d4
/*
* Verify Input parameters.
*/
if ( !pathname )
42bec: 4a80 tstl %d0
42bee: 6776 beqs 42c66 <rtems_filesystem_evaluate_relative_path+0x96><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
42bf0: 4a8a tstl %a2
42bf2: 6758 beqs 42c4c <rtems_filesystem_evaluate_relative_path+0x7c><== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
42bf4: 2f0a movel %a2,%sp@- 42bf6: 206a 000c moveal %a2@(12),%a0 42bfa: 2f03 movel %d3,%sp@- 42bfc: 2f01 movel %d1,%sp@- 42bfe: 2f00 movel %d0,%sp@- 42c00: 2050 moveal %a0@,%a0 42c02: 4e90 jsr %a0@
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42c04: 4fef 0010 lea %sp@(16),%sp
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
42c08: 2400 movel %d0,%d2
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
42c0a: 6604 bnes 42c10 <rtems_filesystem_evaluate_relative_path+0x40>
42c0c: 4a84 tstl %d4
42c0e: 660c bnes 42c1c <rtems_filesystem_evaluate_relative_path+0x4c>
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42c10: 2002 movel %d2,%d0 42c12: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42c18: 4e5e unlk %fp 42c1a: 4e75 rts
* not.
*/
if ( (result == 0) && follow_link ) {
type = (*pathloc->ops->node_type_h)( pathloc );
42c1c: 206a 000c moveal %a2@(12),%a0 42c20: 2f0a movel %a2,%sp@- 42c22: 2068 0010 moveal %a0@(16),%a0 42c26: 4e90 jsr %a0@
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
42c28: 588f addql #4,%sp 42c2a: 7201 moveq #1,%d1 42c2c: 5780 subql #3,%d0 42c2e: b280 cmpl %d0,%d1
42c30: 65de bcss 42c10 <rtems_filesystem_evaluate_relative_path+0x40>
* 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 );
42c32: 206a 000c moveal %a2@(12),%a0 42c36: 2d43 000c movel %d3,%fp@(12) 42c3a: 2d4a 0008 movel %a2,%fp@(8) 42c3e: 2268 0034 moveal %a0@(52),%a1
}
}
return result;
}
42c42: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 42c48: 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 );
42c4a: 4ed1 jmp %a1@
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
if ( !pathloc )
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
42c4c: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 42c52: 74ff moveq #-1,%d2 <== NOT EXECUTED 42c54: 2040 moveal %d0,%a0 <== NOT EXECUTED 42c56: 7005 moveq #5,%d0 <== NOT EXECUTED 42c58: 2080 movel %d0,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42c5a: 2002 movel %d2,%d0 <== NOT EXECUTED 42c5c: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED 42c62: 4e5e unlk %fp <== NOT EXECUTED 42c64: 4e75 rts <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42c66: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 42c6c: 74ff moveq #-1,%d2 <== NOT EXECUTED 42c6e: 720e moveq #14,%d1 <== NOT EXECUTED 42c70: 2040 moveal %d0,%a0 <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42c72: 2002 movel %d2,%d0 <== NOT EXECUTED 42c74: 4cee 041c fff0 moveml %fp@(-16),%d2-%d4/%a2 <== NOT EXECUTED
/*
* Verify Input parameters.
*/
if ( !pathname )
rtems_set_errno_and_return_minus_one( EFAULT );
42c7a: 2081 movel %d1,%a0@ <== NOT EXECUTED
result = (*pathloc->ops->eval_link_h)( pathloc, flags );
}
}
return result;
}
42c7c: 4e5e unlk %fp <== NOT EXECUTED
0004b550 <rtems_filesystem_get_mount_handler>:
rtems_filesystem_fsmount_me_t
rtems_filesystem_get_mount_handler(
const char *type
)
{
4b550: 4e56 fff8 linkw %fp,#-8 4b554: 202e 0008 movel %fp@(8),%d0
find_arg fa = {
4b558: 42ae fffc clrl %fp@(-4) 4b55c: 2d40 fff8 movel %d0,%fp@(-8)
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4b560: 6718 beqs 4b57a <rtems_filesystem_get_mount_handler+0x2a><== NEVER TAKEN
rtems_filesystem_iterate( find_handler, &fa );
4b562: 486e fff8 pea %fp@(-8) 4b566: 487a fefc pea %pc@(4b464 <find_handler>) 4b56a: 4eb9 0004 b4a6 jsr 4b4a6 <rtems_filesystem_iterate> 4b570: 202e fffc movel %fp@(-4),%d0 4b574: 508f addql #8,%sp
}
return fa.mount_h;
}
4b576: 4e5e unlk %fp 4b578: 4e75 rts
find_arg fa = {
.type = type,
.mount_h = NULL
};
if ( type != NULL ) {
4b57a: 4280 clrl %d0 <== NOT EXECUTED
rtems_filesystem_iterate( find_handler, &fa );
}
return fa.mount_h;
}
4b57c: 4e5e unlk %fp <== NOT EXECUTED
00042828 <rtems_filesystem_initialize>:
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42828: 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 )
{
4282a: 4e56 ffe0 linkw %fp,#-32
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
4282e: 2079 0005 e390 moveal 5e390 <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 )
{
42834: 48d7 1c00 moveml %a2-%a4,%sp@
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
42838: 2140 002c movel %d0,%a0@(44)
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
4283c: 4ab9 0005 cafe tstl 5cafe <rtems_filesystem_mount_table_size> 42842: 6700 00c2 beqw 42906 <rtems_filesystem_initialize+0xde>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
42846: 2079 0005 e27c moveal 5e27c <rtems_filesystem_mount_table>,%a0
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
4284c: 42a7 clrl %sp@- 4284e: 2f28 0004 movel %a0@(4),%sp@- 42852: 2f10 movel %a0@,%sp@- 42854: 2f28 000c movel %a0@(12),%sp@- 42858: 2f28 0008 movel %a0@(8),%sp@- 4285c: 4eb9 0004 3318 jsr 43318 <mount>
if ( status == -1 )
42862: 4fef 0014 lea %sp@(20),%sp 42866: 72ff moveq #-1,%d1 42868: b280 cmpl %d0,%d1 4286a: 6700 00b2 beqw 4291e <rtems_filesystem_initialize+0xf6>
rtems_fatal_error_occurred( 0xABCD0002 );
rtems_filesystem_link_counts = 0;
4286e: 2079 0005 e390 moveal 5e390 <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);
42874: 45ee ffec lea %fp@(-20),%a2 42878: 49f9 0004 2c80 lea 42c80 <rtems_filesystem_evaluate_path>,%a4
rtems_filesystem_root = loc;
4287e: 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;
42880: 4240 clrw %d0 42882: 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);
42886: 42a7 clrl %sp@- 42888: 2f0a movel %a2,%sp@- 4288a: 42a7 clrl %sp@- 4288c: 4878 0001 pea 1 <ADD> 42890: 4879 0005 ceb0 pea 5ceb0 <IMFS_ops+0x48> 42896: 4e94 jsr %a4@
rtems_filesystem_root = loc;
42898: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0 4289e: 2163 0028 movel %a3@-,%a0@(40) 428a2: 216e fff8 0024 movel %fp@(-8),%a0@(36) 428a8: 2152 0018 movel %a2@,%a0@(24) 428ac: 216e fff0 001c movel %fp@(-16),%a0@(28) 428b2: 216e fff4 0020 movel %fp@(-12),%a0@(32)
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
428b8: 42a7 clrl %sp@- 428ba: 2f0a movel %a2,%sp@- 428bc: 42a7 clrl %sp@- 428be: 4878 0001 pea 1 <ADD> 428c2: 4879 0005 ceb0 pea 5ceb0 <IMFS_ops+0x48> 428c8: 4e94 jsr %a4@
rtems_filesystem_current = loc;
428ca: 2079 0005 e390 moveal 5e390 <rtems_current_user_env>,%a0 428d0: 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);
428d2: 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;
428d6: 20d2 movel %a2@,%a0@+ 428d8: 20ee fff0 movel %fp@(-16),%a0@+ 428dc: 20ee fff4 movel %fp@(-12),%a0@+ 428e0: 20ee fff8 movel %fp@(-8),%a0@+ 428e4: 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);
428e6: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 428ea: 4879 0005 ceb2 pea 5ceb2 <IMFS_ops+0x4a> 428f0: 4eb9 0004 31b8 jsr 431b8 <mkdir>
if ( status != 0 )
428f6: 508f addql #8,%sp 428f8: 4a80 tstl %d0
428fa: 6616 bnes 42912 <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. */ }
428fc: 4cee 1c00 ffe0 moveml %fp@(-32),%a2-%a4 42902: 4e5e unlk %fp 42904: 4e75 rts
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
42906: 2f3c abcd 0001 movel #-1412628479,%sp@- <== NOT EXECUTED 4290c: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
* created that way by the IMFS.
*/
status = mkdir( "/dev", 0777);
if ( status != 0 )
rtems_fatal_error_occurred( 0xABCD0003 );
42912: 2f3c abcd 0003 movel #-1412628477,%sp@- <== NOT EXECUTED 42918: 4eb9 0004 6d74 jsr 46d74 <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 );
4291e: 2f3c abcd 0002 movel #-1412628478,%sp@- <== NOT EXECUTED 42924: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
...
0004b4a6 <rtems_filesystem_iterate>:
bool rtems_filesystem_iterate(
rtems_per_filesystem_routine routine,
void *routine_arg
)
{
4b4a6: 4e56 fff0 linkw %fp,#-16 4b4aa: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 4b4ae: 266e 0008 moveal %fp@(8),%a3 4b4b2: 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 ) {
4b4b6: 4ab9 0005 cade tstl 5cade <rtems_filesystem_table>
4b4bc: 672a beqs 4b4e8 <rtems_filesystem_iterate+0x42> <== NEVER TAKEN
4b4be: 45f9 0005 cade lea 5cade <rtems_filesystem_table>,%a2
stop = (*routine)( table_entry, routine_arg );
4b4c4: 2f03 movel %d3,%sp@- 4b4c6: 2f0a movel %a2,%sp@-
++table_entry;
4b4c8: 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 );
4b4ca: 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 ) {
4b4cc: 508f addql #8,%sp
stop = (*routine)( table_entry, routine_arg );
4b4ce: 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 ) {
4b4d0: 4a92 tstl %a2@
4b4d2: 6710 beqs 4b4e4 <rtems_filesystem_iterate+0x3e> <== ALWAYS TAKEN
4b4d4: 4a00 tstb %d0 <== NOT EXECUTED 4b4d6: 67ec beqs 4b4c4 <rtems_filesystem_iterate+0x1e> <== NOT EXECUTED
}
rtems_libio_unlock();
}
return stop;
}
4b4d8: 1002 moveb %d2,%d0 4b4da: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b4e0: 4e5e unlk %fp 4b4e2: 4e75 rts
while ( table_entry->type && !stop ) {
stop = (*routine)( table_entry, routine_arg );
++table_entry;
}
if ( !stop ) {
4b4e4: 4a00 tstb %d0
4b4e6: 66f0 bnes 4b4d8 <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 );
4b4e8: 42a7 clrl %sp@- 4b4ea: 42a7 clrl %sp@- 4b4ec: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b4f2: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b4f8: 2479 0005 e394 moveal 5e394 <filesystem_chain>,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b4fe: 4fef 000c lea %sp@(12),%sp 4b502: b5fc 0005 e398 cmpal #385944,%a2
4b508: 6734 beqs 4b53e <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 );
4b50a: 2f03 movel %d3,%sp@- 4b50c: 486a 0008 pea %a2@(8) 4b510: 4e93 jsr %a3@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b512: 2452 moveal %a2@,%a2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b514: 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 );
4b516: 1400 moveb %d0,%d2
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b518: b5fc 0005 e398 cmpal #385944,%a2
4b51e: 6704 beqs 4b524 <rtems_filesystem_iterate+0x7e>
node = rtems_chain_first( &filesystem_chain );
!rtems_chain_is_tail( &filesystem_chain, node ) && !stop;
4b520: 4a00 tstb %d0
4b522: 67e6 beqs 4b50a <rtems_filesystem_iterate+0x64> <== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b524: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b52a: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> 4b530: 588f addql #4,%sp
}
rtems_libio_unlock();
}
return stop;
}
4b532: 1002 moveb %d2,%d0 4b534: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 4b53a: 4e5e unlk %fp 4b53c: 4e75 rts 4b53e: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@-
++table_entry;
}
if ( !stop ) {
rtems_libio_lock();
for (
4b544: 4202 clrb %d2 4b546: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> 4b54c: 588f addql #4,%sp 4b54e: 60e2 bras 4b532 <rtems_filesystem_iterate+0x8c>
0004329c <rtems_filesystem_mount_iterate>:
bool rtems_filesystem_mount_iterate(
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
4329c: 4e56 fff0 linkw %fp,#-16 432a0: 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 );
432a4: 42a7 clrl %sp@- 432a6: 266e 0008 moveal %fp@(8),%a3 432aa: 42a7 clrl %sp@- 432ac: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 432b2: 262e 000c movel %fp@(12),%d3 432b6: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
432bc: 2479 0005 e370 moveal 5e370 <mount_chain>,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
432c2: 4fef 000c lea %sp@(12),%sp 432c6: b5fc 0005 e374 cmpal #385908,%a2
432cc: 6730 beqs 432fe <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 );
432ce: 2f03 movel %d3,%sp@- 432d0: 2f0a movel %a2,%sp@- 432d2: 4e93 jsr %a3@
}
rtems_libio_unlock();
return stop;
}
432d4: 2452 moveal %a2@,%a2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
432d6: 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 );
432d8: 1400 moveb %d0,%d2
{
rtems_chain_node *node = NULL;
bool stop = false;
rtems_libio_lock();
for (
432da: b5fc 0005 e374 cmpal #385908,%a2
432e0: 6704 beqs 432e6 <rtems_filesystem_mount_iterate+0x4a>
node = rtems_chain_first( &mount_chain );
!rtems_chain_is_tail( &mount_chain, node ) && !stop;
432e2: 4a00 tstb %d0
432e4: 67e8 beqs 432ce <rtems_filesystem_mount_iterate+0x32><== ALWAYS TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
432e6: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 432ec: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
432f2: 1002 moveb %d2,%d0 432f4: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 432fa: 4e5e unlk %fp 432fc: 4e75 rts
432fe: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- <== NOT EXECUTED
rtems_per_filesystem_mount_routine routine,
void *routine_arg
)
{
rtems_chain_node *node = NULL;
bool stop = false;
43304: 4202 clrb %d2 <== NOT EXECUTED 43306: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
stop = (*routine)( mt_entry, routine_arg );
}
rtems_libio_unlock();
return stop;
}
4330c: 1002 moveb %d2,%d0 <== NOT EXECUTED 4330e: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 43314: 4e5e unlk %fp <== NOT EXECUTED
00042d50 <rtems_filesystem_prefix_separators>:
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42d50: 4e56 fff0 linkw %fp,#-16 42d54: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 42d58: 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 ) )
42d5c: 1012 moveb %a2@,%d0
int rtems_filesystem_prefix_separators(
const char *pathname,
int pathnamelen
)
{
42d5e: 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 ) )
42d62: 4a00 tstb %d0
42d64: 6730 beqs 42d96 <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
42d66: 4a83 tstl %d3
42d68: 672c beqs 42d96 <rtems_filesystem_prefix_separators+0x46><== NEVER TAKEN
}
return len;
}
int rtems_filesystem_prefix_separators(
42d6a: 528a addql #1,%a2
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
42d6c: 4282 clrl %d2 42d6e: 47f9 0004 3cdc lea 43cdc <rtems_filesystem_is_separator>,%a3
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42d74: 49c0 extbl %d0 42d76: 2f00 movel %d0,%sp@- 42d78: 4e93 jsr %a3@ 42d7a: 588f addql #4,%sp 42d7c: 4a80 tstl %d0
42d7e: 670a beqs 42d8a <rtems_filesystem_prefix_separators+0x3a>
{
pathname++;
pathnamelen--;
stripped++;
42d80: 5282 addql #1,%d2
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
while ( *pathname && pathnamelen && rtems_filesystem_is_separator( *pathname ) )
42d82: 101a moveb %a2@+,%d0
42d84: 6704 beqs 42d8a <rtems_filesystem_prefix_separators+0x3a><== NEVER TAKEN
42d86: b483 cmpl %d3,%d2
42d88: 66ea bnes 42d74 <rtems_filesystem_prefix_separators+0x24><== ALWAYS TAKEN
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42d8a: 2002 movel %d2,%d0 42d8c: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 42d92: 4e5e unlk %fp 42d94: 4e75 rts
)
{
/*
* Eat any separators at start of the path.
*/
int stripped = 0;
42d96: 4282 clrl %d2 <== NOT EXECUTED
pathname++;
pathnamelen--;
stripped++;
}
return stripped;
}
42d98: 2002 movel %d2,%d0 <== NOT EXECUTED 42d9a: 4cee 0c0c fff0 moveml %fp@(-16),%d2-%d3/%a2-%a3 <== NOT EXECUTED 42da0: 4e5e unlk %fp <== NOT EXECUTED
0004b658 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
4b658: 4e56 fff4 linkw %fp,#-12 4b65c: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 4b660: 242e 0008 movel %fp@(8),%d2
rtems_chain_node *node = NULL;
if ( type == NULL ) {
4b664: 6700 0094 beqw 4b6fa <rtems_filesystem_unregister+0xa2>
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 );
4b668: 42a7 clrl %sp@- 4b66a: 42a7 clrl %sp@- 4b66c: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b672: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b678: 2479 0005 e394 moveal 5e394 <filesystem_chain>,%a2
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4b67e: 4fef 000c lea %sp@(12),%sp 4b682: b5fc 0005 e398 cmpal #385944,%a2
4b688: 671e beqs 4b6a8 <rtems_filesystem_unregister+0x50>
4b68a: 47f9 0004 f8f4 lea 4f8f4 <strcmp>,%a3
!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 ) {
4b690: 2f02 movel %d2,%sp@- 4b692: 2f2a 0008 movel %a2@(8),%sp@- 4b696: 4e93 jsr %a3@ 4b698: 508f addql #8,%sp 4b69a: 4a80 tstl %d0
4b69c: 6730 beqs 4b6ce <rtems_filesystem_unregister+0x76>
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b69e: 2452 moveal %a2@,%a2
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_lock();
for (
4b6a0: b5fc 0005 e398 cmpal #385944,%a2
4b6a6: 66e8 bnes 4b690 <rtems_filesystem_unregister+0x38><== NEVER TAKEN
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b6a8: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b6ae: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4b6b4: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4b6ba: 588f addql #4,%sp 4b6bc: 7202 moveq #2,%d1 4b6be: 2040 moveal %d0,%a0 4b6c0: 70ff moveq #-1,%d0
}
4b6c2: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
4b6c8: 2081 movel %d1,%a0@
}
4b6ca: 4e5e unlk %fp 4b6cc: 4e75 rts
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
4b6ce: 2f0a movel %a2,%sp@- 4b6d0: 4eb9 0004 70d0 jsr 470d0 <_Chain_Extract>
) {
filesystem_node *fsn = (filesystem_node *) node;
if ( strcmp( fsn->entry.type, type ) == 0 ) {
rtems_chain_extract( node );
free( fsn );
4b6d6: 2f0a movel %a2,%sp@- 4b6d8: 4eb9 0004 2db8 jsr 42db8 <free> 4b6de: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b6e4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> 4b6ea: 4fef 000c lea %sp@(12),%sp
rtems_libio_unlock();
return 0;
4b6ee: 4280 clrl %d0
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b6f0: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4b6f6: 4e5e unlk %fp 4b6f8: 4e75 rts
)
{
rtems_chain_node *node = NULL;
if ( type == NULL ) {
rtems_set_errno_and_return_minus_one( EINVAL );
4b6fa: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 4b700: 7416 moveq #22,%d2 4b702: 2040 moveal %d0,%a0 4b704: 70ff moveq #-1,%d0 4b706: 2082 movel %d2,%a0@
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
}
4b708: 4cee 0c04 fff4 moveml %fp@(-12),%d2/%a2-%a3 4b70e: 4e5e unlk %fp
...
0004373a <rtems_gxx_getspecific>:
void *rtems_gxx_getspecific(__gthread_key_t key)
{
4373a: 4e56 fffc linkw %fp,#-4
rtems_status_code status; void *p= 0;
4373e: 204e moveal %fp,%a0
}
return 0;
}
void *rtems_gxx_getspecific(__gthread_key_t key)
{
43740: 2f0a movel %a2,%sp@- 43742: 246e 0008 moveal %fp@(8),%a2
rtems_status_code status; void *p= 0;
43746: 42a0 clrl %a0@-
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p );
43748: 2f08 movel %a0,%sp@- 4374a: 2f0a movel %a2,%sp@- 4374c: 42a7 clrl %sp@- 4374e: 4eb9 0004 7830 jsr 47830 <rtems_task_variable_get>
if ( status == RTEMS_SUCCESSFUL ) {
43754: 4fef 000c lea %sp@(12),%sp 43758: 4a80 tstl %d0
4375a: 660a bnes 43766 <rtems_gxx_getspecific+0x2c> <== NEVER TAKEN
/* We do not have to do this, but what the heck ! */
p= key->val;
4375c: 2012 movel %a2@,%d0
p,
rtems_task_self()
);
#endif
return p;
}
4375e: 246e fff8 moveal %fp@(-8),%a2 43762: 4e5e unlk %fp 43764: 4e75 rts
p= key->val;
} else {
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
43766: 2f2a 0004 movel %a2@(4),%sp@- <== NOT EXECUTED 4376a: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4376c: 42a7 clrl %sp@- <== NOT EXECUTED 4376e: 4eb9 0004 76cc jsr 476cc <rtems_task_variable_add> <== NOT EXECUTED
if ( status != RTEMS_SUCCESSFUL ) {
43774: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 43778: 4a80 tstl %d0 <== NOT EXECUTED 4377a: 660e bnes 4378a <rtems_gxx_getspecific+0x50> <== NOT EXECUTED
rtems_panic ("rtems_gxx_getspecific");
}
key->val = (void *)0;
4377c: 4292 clrl %a2@ <== NOT EXECUTED 4377e: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED
p,
rtems_task_self()
);
#endif
return p;
}
43782: 246e fff8 moveal %fp@(-8),%a2 <== NOT EXECUTED 43786: 4e5e unlk %fp <== NOT EXECUTED 43788: 4e75 rts <== NOT EXECUTED
/* fisrt time, always set to zero, it is unknown the value that the others
* threads are using at the moment of this call
*/
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
if ( status != RTEMS_SUCCESSFUL ) {
rtems_panic ("rtems_gxx_getspecific");
4378a: 4879 0005 dff8 pea 5dff8 <rtems_status_assoc+0x1a0> <== NOT EXECUTED 43790: 4eb9 0004 3304 jsr 43304 <rtems_panic> <== NOT EXECUTED
00043708 <rtems_gxx_key_delete>:
int rtems_gxx_key_delete (__gthread_key_t key)
{
43708: 4e56 0000 linkw %fp,#0 4370c: 2f02 movel %d2,%sp@- 4370e: 242e 0008 movel %fp@(8),%d2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: delete key=%x\n", key );
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_delete( RTEMS_SELF, (void **)key );
43712: 2f02 movel %d2,%sp@- 43714: 42a7 clrl %sp@- 43716: 4eb9 0004 7788 jsr 47788 <rtems_task_variable_delete>
if ( status == RTEMS_SUCCESSFUL ) {
4371c: 508f addql #8,%sp 4371e: 4a80 tstl %d0
43720: 660e bnes 43730 <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
/* Hmm - hopefully all tasks using this key have gone away... */
if ( key ) free( (void *)key );
43722: 4a82 tstl %d2
43724: 670a beqs 43730 <rtems_gxx_key_delete+0x28> <== NEVER TAKEN
43726: 2f02 movel %d2,%sp@- 43728: 4eb9 0004 3520 jsr 43520 <free> 4372e: 588f addql #4,%sp
return 0;
}
return 0;
}
43730: 242e fffc movel %fp@(-4),%d2 43734: 4280 clrl %d0
43736: 4e5e unlk %fp <== NOT EXECUTED
000436f8 <rtems_gxx_key_dtor>:
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
return 0;
}
436f8: 4280 clrl %d0 <== NOT EXECUTED
return 0;
return -1;
}
int rtems_gxx_key_dtor (__gthread_key_t key, void *ptr)
{
436fa: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
436fe: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
return 0; }
43702: 4e5e unlk %fp <== NOT EXECUTED
{
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr );
#endif
key->val = 0;
43704: 4290 clrl %a0@ <== NOT EXECUTED
return 0;
}
00043824 <rtems_gxx_mutex_destroy>:
int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex)
{
43824: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 43828: 206e 0008 moveal %fp@(8),%a0 <== NOT EXECUTED
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
4382c: 2f10 movel %a0@,%sp@- <== NOT EXECUTED 4382e: 4eb9 0004 6f4c jsr 46f4c <rtems_semaphore_delete> <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL )
43834: 588f addql #4,%sp <== NOT EXECUTED
return 0;
return -1;
}
43836: 4e5e unlk %fp <== NOT EXECUTED
printk( "gxx_wrappers: destroy mutex=%X\n", *mutex );
#endif
status = rtems_semaphore_delete(*(rtems_id *)mutex);
if ( status == RTEMS_SUCCESSFUL )
return 0;
43838: 4a80 tstl %d0 <== NOT EXECUTED 4383a: 56c0 sne %d0 <== NOT EXECUTED 4383c: 49c0 extbl %d0 <== NOT EXECUTED
return -1;
}
000437cc <rtems_gxx_mutex_init>:
/*
* MUTEX support
*/
void rtems_gxx_mutex_init (__gthread_mutex_t *mutex)
{
437cc: 4e56 0000 linkw %fp,#0
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init =%X\n", *mutex );
#endif
status = rtems_semaphore_create(
437d0: 2f2e 0008 movel %fp@(8),%sp@- 437d4: 42a7 clrl %sp@- 437d6: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 437da: 4878 0001 pea 1 <ADD> 437de: 2f3c 4743 4332 movel #1195590450,%sp@- 437e4: 4eb9 0004 6d88 jsr 46d88 <rtems_semaphore_create>
RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE|
RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL,
0,
(rtems_id *)mutex
);
if ( status != RTEMS_SUCCESSFUL ) {
437ea: 4fef 0014 lea %sp@(20),%sp 437ee: 4a80 tstl %d0
437f0: 6604 bnes 437f6 <rtems_gxx_mutex_init+0x2a> <== NEVER TAKEN
rtems_panic ("rtems_gxx_mutex_init");
}
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: mutex init complete =%X\n", *mutex );
#endif
}
437f2: 4e5e unlk %fp 437f4: 4e75 rts
"gxx_wrappers: mutex init failed %s (%d)\n",
rtems_status_text(status),
status
);
#endif
rtems_panic ("rtems_gxx_mutex_init");
437f6: 4879 0005 e00e pea 5e00e <rtems_status_assoc+0x1b6> <== NOT EXECUTED 437fc: 4eb9 0004 3304 jsr 43304 <rtems_panic> <== NOT EXECUTED
0004363c <rtems_gxx_once>:
typedef int __gthread_once_t;
typedef void *__gthread_mutex_t;
typedef void *__gthread_recursive_mutex_t;
int rtems_gxx_once(__gthread_once_t *once, void (*func) (void))
{
4363c: 4e56 fff0 linkw %fp,#-16 43640: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 43644: 246e 0008 moveal %fp@(8),%a2
#ifdef DEBUG_GXX_WRAPPERS
printk( "gxx_wrappers: once=%x, func=%x\n", *once, func );
#endif
if ( *(volatile __gthread_once_t *)once == 0 ) {
43648: 2012 movel %a2@,%d0
4364a: 670c beqs 43658 <rtems_gxx_once+0x1c>
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
if ( o == 0 )
(*func)();
}
return 0;
}
4364c: 4280 clrl %d0 4364e: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43654: 4e5e unlk %fp 43656: 4e75 rts
if ( *(volatile __gthread_once_t *)once == 0 ) {
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
43658: 240e movel %fp,%d2 4365a: 5982 subql #4,%d2 4365c: 47f9 0004 7480 lea 47480 <rtems_task_mode>,%a3 43662: 2f02 movel %d2,%sp@- 43664: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 43668: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 4366c: 4e93 jsr %a3@
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
4366e: 2012 movel %a2@,%d0 43670: 4fef 000c lea %sp@(12),%sp
43674: 6626 bnes 4369c <rtems_gxx_once+0x60> <== NEVER TAKEN
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43676: 2f02 movel %d2,%sp@- 43678: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb>
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
4367c: 7001 moveq #1,%d0
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
4367e: 2f2e fffc movel %fp@(-4),%sp@-
rtems_mode saveMode;
__gthread_once_t o;
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
43682: 2480 movel %d0,%a2@
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
43684: 4e93 jsr %a3@
if ( o == 0 )
(*func)();
43686: 206e 000c moveal %fp@(12),%a0 4368a: 4e90 jsr %a0@ 4368c: 4fef 000c lea %sp@(12),%sp
} return 0; }
43690: 4280 clrl %d0 43692: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 43698: 4e5e unlk %fp 4369a: 4e75 rts
rtems_task_mode(RTEMS_NO_PREEMPT, RTEMS_PREEMPT_MASK, &saveMode);
if ( (o = *(volatile __gthread_once_t *)once) == 0 ) {
*(volatile __gthread_once_t *)once = 1;
}
rtems_task_mode(saveMode, RTEMS_PREEMPT_MASK, &saveMode);
4369c: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4369e: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> <== NOT EXECUTED 436a2: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 436a6: 4e93 jsr %a3@ <== NOT EXECUTED 436a8: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
if ( o == 0 )
(*func)();
}
return 0;
}
436ac: 4280 clrl %d0 <== NOT EXECUTED 436ae: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 <== NOT EXECUTED 436b4: 4e5e unlk %fp <== NOT EXECUTED
00043796 <rtems_gxx_setspecific>:
#endif
return p;
}
int rtems_gxx_setspecific(__gthread_key_t key, const void *ptr)
{
43796: 4e56 0000 linkw %fp,#0 4379a: 2f0a movel %a2,%sp@- 4379c: 246e 0008 moveal %fp@(8),%a2
rtems_task_self()
);
#endif
/* register with RTEMS the buffer that will hold the key values */
status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor );
437a0: 2f2a 0004 movel %a2@(4),%sp@- 437a4: 2f0a movel %a2,%sp@- 437a6: 42a7 clrl %sp@- 437a8: 4eb9 0004 76cc jsr 476cc <rtems_task_variable_add>
if ( status == RTEMS_SUCCESSFUL ) {
437ae: 4fef 000c lea %sp@(12),%sp 437b2: 4a80 tstl %d0
437b4: 660c bnes 437c2 <rtems_gxx_setspecific+0x2c> <== NEVER TAKEN
/* now let's set the proper value */
key->val = (void *)ptr;
437b6: 24ae 000c movel %fp@(12),%a2@
return 0;
}
return -1;
}
437ba: 246e fffc moveal %fp@(-4),%a2 437be: 4e5e unlk %fp 437c0: 4e75 rts
437c2: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
if ( status == RTEMS_SUCCESSFUL ) {
/* now let's set the proper value */
key->val = (void *)ptr;
return 0;
}
return -1;
437c6: 70ff moveq #-1,%d0 <== NOT EXECUTED
}
437c8: 4e5e unlk %fp <== NOT EXECUTED
00047cbc <rtems_heap_allocate_aligned_with_boundary>:
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
if (
47cbc: 7003 moveq #3,%d0
void *rtems_heap_allocate_aligned_with_boundary(
size_t size,
uintptr_t alignment,
uintptr_t boundary
)
{
47cbe: 4e56 0000 linkw %fp,#0
if (
47cc2: b0b9 0006 6066 cmpl 66066 <_System_state_Current>,%d0
47cc8: 6726 beqs 47cf0 <rtems_heap_allocate_aligned_with_boundary+0x34><== ALWAYS TAKEN
&& !malloc_is_system_state_OK()
) {
return NULL;
}
malloc_deferred_frees_process();
47cca: 4eb9 0004 6c08 jsr 46c08 <malloc_deferred_frees_process>
/* FIXME: Statistics, boundary checks */
return _Protected_heap_Allocate_aligned_with_boundary(
47cd0: 2f2e 0010 movel %fp@(16),%sp@- 47cd4: 2f2e 000c movel %fp@(12),%sp@- 47cd8: 2f2e 0008 movel %fp@(8),%sp@- 47cdc: 2f39 0006 3dc0 movel 63dc0 <RTEMS_Malloc_Heap>,%sp@- 47ce2: 4eb9 0004 d030 jsr 4d030 <_Protected_heap_Allocate_aligned_with_boundary> 47ce8: 4fef 0010 lea %sp@(16),%sp
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
47cec: 4e5e unlk %fp 47cee: 4e75 rts
uintptr_t boundary
)
{
if (
_System_state_Is_up( _System_state_Get() )
&& !malloc_is_system_state_OK()
47cf0: 4eb9 0004 6bc8 jsr 46bc8 <malloc_is_system_state_OK> 47cf6: 4a00 tstb %d0
47cf8: 66d0 bnes 47cca <rtems_heap_allocate_aligned_with_boundary+0xe>
) {
return NULL;
47cfa: 4280 clrl %d0
RTEMS_Malloc_Heap,
size,
alignment,
boundary
);
}
47cfc: 4e5e unlk %fp <== NOT EXECUTED
00046d02 <rtems_initialize_start_multitasking>:
46d02: 7002 moveq #2,%d0
}
void rtems_initialize_start_multitasking(void)
{
46d04: 4e56 0000 linkw %fp,#0
****** APPLICATION RUNS HERE ****** ****** RETURNS WHEN SYSTEM IS SHUT DOWN ****** ******************************************************************* ******************************************************************* *******************************************************************/ }
46d08: 4e5e unlk %fp 46d0a: 23c0 0005 fc4a movel %d0,5fc4a <_System_state_Current>
void rtems_initialize_start_multitasking(void)
{
_System_state_Set( SYSTEM_STATE_BEGIN_MULTITASKING );
_Thread_Start_multitasking();
46d10: 4ef9 0004 94a4 jmp 494a4 <_Thread_Start_multitasking>
...
0004278a <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
4278a: 4e56 ffd8 linkw %fp,#-40 4278e: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 42792: 262e 0008 movel %fp@(8),%d3
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(
42796: 45f9 0004 fe4c lea 4fe4c <strlen>,%a2 4279c: 240e movel %fp,%d2 4279e: 0682 ffff ffec addil #-20,%d2 427a4: 2f03 movel %d3,%sp@- 427a6: 4e92 jsr %a2@ 427a8: 7201 moveq #1,%d1 427aa: 2e81 movel %d1,%sp@ 427ac: 2f02 movel %d2,%sp@- 427ae: 42a7 clrl %sp@- 427b0: 2f00 movel %d0,%sp@- 427b2: 2f03 movel %d3,%sp@- 427b4: 4eb9 0004 2c80 jsr 42c80 <rtems_filesystem_evaluate_path>
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
427ba: 206e fff8 moveal %fp@(-8),%a0
IMFS_jnode_t *the_jnode;
rtems_filesystem_location_info_t loc;
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
427be: 2800 movel %d0,%d4
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
node_type = (*loc.ops->node_type_h)( &loc );
427c0: 2f02 movel %d2,%sp@-
int result;
rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path(
name, strlen( name ), 0x00, &loc, true );
the_jnode = loc.node_access;
427c2: 266e ffec moveal %fp@(-20),%a3
node_type = (*loc.ops->node_type_h)( &loc );
427c6: 2068 0010 moveal %a0@(16),%a0 427ca: 4e90 jsr %a0@
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
427cc: 4fef 0018 lea %sp@(24),%sp 427d0: 4a84 tstl %d4
427d2: 6606 bnes 427da <rtems_io_lookup_name+0x50> <== NEVER TAKEN
427d4: 7202 moveq #2,%d1 427d6: b280 cmpl %d0,%d1
427d8: 6716 beqs 427f0 <rtems_io_lookup_name+0x66>
rtems_filesystem_freenode( &loc );
427da: 2f02 movel %d2,%sp@- 427dc: 4eb9 0004 2da4 jsr 42da4 <rtems_filesystem_freenode>
return RTEMS_UNSATISFIED;
427e2: 588f addql #4,%sp 427e4: 700d moveq #13,%d0
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
return RTEMS_SUCCESSFUL;
}
427e6: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3 427ec: 4e5e unlk %fp 427ee: 4e75 rts
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
427f0: 206e 000c moveal %fp@(12),%a0 427f4: 2083 movel %d3,%a0@
device_info->device_name_length = strlen( name );
427f6: 2f03 movel %d3,%sp@- 427f8: 4e92 jsr %a2@
device_info->major = the_jnode->info.device.major;
427fa: 226e 000c moveal %fp@(12),%a1 427fe: 41eb 004c lea %a3@(76),%a0
device_info->minor = the_jnode->info.device.minor;
42802: 47eb 0050 lea %a3@(80),%a3
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
device_info->major = the_jnode->info.device.major;
42806: 2350 0008 movel %a0@,%a1@(8)
device_info->minor = the_jnode->info.device.minor;
4280a: 2353 000c movel %a3@,%a1@(12)
rtems_filesystem_freenode( &loc );
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
device_info->device_name_length = strlen( name );
4280e: 2340 0004 movel %d0,%a1@(4)
device_info->major = the_jnode->info.device.major;
device_info->minor = the_jnode->info.device.minor;
rtems_filesystem_freenode( &loc );
42812: 2e82 movel %d2,%sp@ 42814: 4eb9 0004 2da4 jsr 42da4 <rtems_filesystem_freenode>
return RTEMS_SUCCESSFUL;
4281a: 588f addql #4,%sp 4281c: 4280 clrl %d0
}
4281e: 4cee 0c1c ffd8 moveml %fp@(-40),%d2-%d4/%a2-%a3
42824: 4e5e unlk %fp <== NOT EXECUTED
00048248 <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
)
{
48248: 4e56 fff4 linkw %fp,#-12 4824c: 226e 000c moveal %fp@(12),%a1 48250: 48d7 040c moveml %d2-%d3/%a2,%sp@ 48254: 242e 0008 movel %fp@(8),%d2 48258: 246e 0010 moveal %fp@(16),%a2
rtems_device_major_number major_limit = _IO_Number_of_drivers;
4825c: 2039 0006 4590 movel 64590 <_IO_Number_of_drivers>,%d0
if ( rtems_interrupt_is_in_progress() )
48262: 4ab9 0006 41a0 tstl 641a0 <_Per_CPU_Information+0x8> 48268: 6600 009c bnew 48306 <rtems_io_register_driver+0xbe>
return RTEMS_CALLED_FROM_ISR;
if ( registered_major == NULL )
4826c: 4a8a tstl %a2 4826e: 6700 00ea beqw 4835a <rtems_io_register_driver+0x112>
return RTEMS_INVALID_ADDRESS;
/* Set it to an invalid value */
*registered_major = major_limit;
48272: 2480 movel %d0,%a2@
if ( driver_table == NULL )
48274: 4a89 tstl %a1 48276: 6700 00e2 beqw 4835a <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;
4827a: 4a91 tstl %a1@ 4827c: 6700 00d4 beqw 48352 <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 )
48280: b480 cmpl %d0,%d2
48282: 6476 bccs 482fa <rtems_io_register_driver+0xb2>
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
48284: 2039 0006 3d14 movel 63d14 <_Thread_Dispatch_disable_level>,%d0 4828a: 5280 addql #1,%d0 4828c: 23c0 0006 3d14 movel %d0,63d14 <_Thread_Dispatch_disable_level>
return RTEMS_INVALID_NUMBER;
_Thread_Disable_dispatch();
if ( major == 0 ) {
48292: 4a82 tstl %d2
48294: 667c bnes 48312 <rtems_io_register_driver+0xca>
static rtems_status_code rtems_io_obtain_major_number(
rtems_device_major_number *major
)
{
rtems_device_major_number n = _IO_Number_of_drivers;
48296: 2039 0006 4590 movel 64590 <_IO_Number_of_drivers>,%d0
rtems_device_major_number m = 0;
/* major is error checked by caller */
for ( m = 0; m < n; ++m ) {
4829c: 6700 0106 beqw 483a4 <rtems_io_register_driver+0x15c> 482a0: 2239 0006 4594 movel 64594 <_IO_Driver_address_table>,%d1 482a6: 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;
482a8: 4a90 tstl %a0@ 482aa: 6700 008e beqw 4833a <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 ) {
482ae: 5282 addql #1,%d2 482b0: 41e8 0018 lea %a0@(24),%a0 482b4: b480 cmpl %d0,%d2
482b6: 65f0 bcss 482a8 <rtems_io_register_driver+0x60>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
482b8: 2482 movel %d2,%a2@
if ( m != n )
482ba: b480 cmpl %d0,%d2 482bc: 6700 00e8 beqw 483a6 <rtems_io_register_driver+0x15e> 482c0: 2602 movel %d2,%d3 482c2: 2002 movel %d2,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
482c4: 2041 moveal %d1,%a0
}
/* Assigns invalid value in case of failure */
*major = m;
if ( m != n )
482c6: e78b lsll #3,%d3 482c8: eb88 lsll #5,%d0 482ca: 9083 subl %d3,%d0
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
482cc: d1c0 addal %d0,%a0 482ce: 20d9 movel %a1@+,%a0@+ 482d0: 20d9 movel %a1@+,%a0@+ 482d2: 20d9 movel %a1@+,%a0@+ 482d4: 20d9 movel %a1@+,%a0@+ 482d6: 20d9 movel %a1@+,%a0@+ 482d8: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
482da: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
482e0: 2d42 0008 movel %d2,%fp@(8)
}
482e4: 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 );
482ea: 42ae 0010 clrl %fp@(16) 482ee: 42ae 000c clrl %fp@(12)
}
482f2: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
482f4: 4ef9 0005 08c0 jmp 508c0 <rtems_io_initialize>
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
if ( major >= major_limit )
return RTEMS_INVALID_NUMBER;
482fa: 700a moveq #10,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
482fc: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48302: 4e5e unlk %fp 48304: 4e75 rts
)
{
rtems_device_major_number major_limit = _IO_Number_of_drivers;
if ( rtems_interrupt_is_in_progress() )
return RTEMS_CALLED_FROM_ISR;
48306: 7012 moveq #18,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48308: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4830e: 4e5e unlk %fp 48310: 4e75 rts
_Thread_Enable_dispatch();
return sc;
}
major = *registered_major;
} else {
rtems_driver_address_table *const table = _IO_Driver_address_table + major;
48312: 2202 movel %d2,%d1 48314: 2002 movel %d2,%d0 48316: e789 lsll #3,%d1 48318: eb88 lsll #5,%d0 4831a: 2079 0006 4594 moveal 64594 <_IO_Driver_address_table>,%a0 48320: 9081 subl %d1,%d0 48322: 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;
48324: 4a90 tstl %a0@
48326: 673e beqs 48366 <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();
48328: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
return RTEMS_RESOURCE_IN_USE;
4832e: 700c moveq #12,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
48330: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48336: 4e5e unlk %fp 48338: 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;
4833a: 4aa8 0004 tstl %a0@(4) 4833e: 6700 ff78 beqw 482b8 <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 ) {
48342: 5282 addql #1,%d2 48344: 41e8 0018 lea %a0@(24),%a0 48348: b480 cmpl %d0,%d2 4834a: 6500 ff5c bcsw 482a8 <rtems_io_register_driver+0x60> 4834e: 6000 ff68 braw 482b8 <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;
48352: 4aa9 0004 tstl %a1@(4) 48356: 6600 ff28 bnew 48280 <rtems_io_register_driver+0x38>
if ( driver_table == NULL )
return RTEMS_INVALID_ADDRESS;
if ( rtems_io_is_empty_table( driver_table ) )
return RTEMS_INVALID_ADDRESS;
4835a: 7009 moveq #9,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
4835c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 48362: 4e5e unlk %fp 48364: 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;
48366: 4aa8 0004 tstl %a0@(4)
4836a: 66bc bnes 48328 <rtems_io_register_driver+0xe0>
4836c: 2239 0006 4594 movel 64594 <_IO_Driver_address_table>,%d1
}
*registered_major = major;
}
_IO_Driver_address_table [major] = *driver_table;
48372: 2041 moveal %d1,%a0 48374: d1c0 addal %d0,%a0
if ( !rtems_io_is_empty_table( table ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
*registered_major = major;
48376: 2482 movel %d2,%a2@
}
_IO_Driver_address_table [major] = *driver_table;
48378: 20d9 movel %a1@+,%a0@+ 4837a: 20d9 movel %a1@+,%a0@+ 4837c: 20d9 movel %a1@+,%a0@+ 4837e: 20d9 movel %a1@+,%a0@+ 48380: 20d9 movel %a1@+,%a0@+ 48382: 2091 movel %a1@,%a0@
_Thread_Enable_dispatch();
48384: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
return rtems_io_initialize( major, 0, NULL );
4838a: 2d42 0008 movel %d2,%fp@(8)
}
4838e: 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 );
48394: 42ae 0010 clrl %fp@(16) 48398: 42ae 000c clrl %fp@(12)
}
4839c: 4e5e unlk %fp
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
4839e: 4ef9 0005 08c0 jmp 508c0 <rtems_io_initialize>
if ( rtems_io_is_empty_table( table ) )
break;
}
/* Assigns invalid value in case of failure */
*major = m;
483a4: 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();
483a6: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
*major = m;
if ( m != n )
return RTEMS_SUCCESSFUL;
return RTEMS_TOO_MANY;
483ac: 7005 moveq #5,%d0
_IO_Driver_address_table [major] = *driver_table;
_Thread_Enable_dispatch();
return rtems_io_initialize( major, 0, NULL );
}
483ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2
483b4: 4e5e unlk %fp <== NOT EXECUTED
00042758 <rtems_io_register_name>:
rtems_status_code rtems_io_register_name(
const char *device_name,
rtems_device_major_number major,
rtems_device_minor_number minor
)
{
42758: 4e56 0000 linkw %fp,#0
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
temp.__overlay.minor = _minor;
4275c: 222e 0010 movel %fp@(16),%d1
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
42760: 202e 000c movel %fp@(12),%d0
int status;
dev_t dev;
dev = rtems_filesystem_make_dev_t( major, minor );
status = mknod( device_name, 0777 | S_IFCHR, dev );
42764: 2f01 movel %d1,%sp@- 42766: 2f00 movel %d0,%sp@- 42768: 4878 21ff pea 21ff <D_MAX_EXP+0x1a00> 4276c: 2f2e 0008 movel %fp@(8),%sp@- 42770: 4eb9 0004 31d8 jsr 431d8 <mknod>
/* this is the only error returned by the old version */
if ( status )
42776: 4fef 0010 lea %sp@(16),%sp 4277a: 4a80 tstl %d0
4277c: 6606 bnes 42784 <rtems_io_register_name+0x2c> <== NEVER TAKEN
return RTEMS_TOO_MANY;
return RTEMS_SUCCESSFUL;
4277e: 4280 clrl %d0
}
42780: 4e5e unlk %fp 42782: 4e75 rts
dev = rtems_filesystem_make_dev_t( major, minor );
status = mknod( device_name, 0777 | S_IFCHR, dev );
/* this is the only error returned by the old version */
if ( status )
return RTEMS_TOO_MANY;
42784: 7005 moveq #5,%d0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
42786: 4e5e unlk %fp <== NOT EXECUTED
000494cc <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)
{
494cc: 4e56 fff0 linkw %fp,#-16 494d0: 48d7 1c04 moveml %d2/%a2-%a4,%sp@ 494d4: 266e 0008 moveal %fp@(8),%a3
uint32_t i;
uint32_t api_index;
Thread_Control *the_thread;
Objects_Information *information;
if ( !routine )
494d8: 4a8b tstl %a3
494da: 6742 beqs 4951e <rtems_iterate_over_all_threads+0x52><== NEVER TAKEN
494dc: 49f9 0006 a09c lea 6a09c <_Objects_Information_table+0x4>,%a4
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
494e2: 205c moveal %a4@+,%a0 494e4: 4a88 tstl %a0
494e6: 672e beqs 49516 <rtems_iterate_over_all_threads+0x4a><== NEVER TAKEN
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
494e8: 2468 0004 moveal %a0@(4),%a2
if ( !information )
494ec: 4a8a tstl %a2
494ee: 6726 beqs 49516 <rtems_iterate_over_all_threads+0x4a>
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
494f0: 4a6a 000e tstw %a2@(14)
494f4: 6720 beqs 49516 <rtems_iterate_over_all_threads+0x4a>
494f6: 7401 moveq #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
494f8: 206a 0018 moveal %a2@(24),%a0 494fc: 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++ ) {
49500: 5282 addql #1,%d2
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
49502: 4a80 tstl %d0
49504: 6706 beqs 4950c <rtems_iterate_over_all_threads+0x40><== NEVER TAKEN
continue;
(*routine)(the_thread);
49506: 2f00 movel %d0,%sp@- 49508: 4e93 jsr %a3@ 4950a: 588f addql #4,%sp
information = _Objects_Information_table[ api_index ][ 1 ];
if ( !information )
continue;
for ( i=1 ; i <= information->maximum ; i++ ) {
4950c: 4280 clrl %d0 4950e: 302a 000e movew %a2@(14),%d0 49512: b480 cmpl %d0,%d2
49514: 63e2 blss 494f8 <rtems_iterate_over_all_threads+0x2c>
Objects_Information *information;
if ( !routine )
return;
for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) {
49516: b9fc 0006 a0a8 cmpal #434344,%a4
4951c: 66c4 bnes 494e2 <rtems_iterate_over_all_threads+0x16>
(*routine)(the_thread);
}
}
}
4951e: 4cee 1c04 fff0 moveml %fp@(-16),%d2/%a2-%a4
49524: 4e5e unlk %fp <== NOT EXECUTED
0004b2da <rtems_libio_free>:
*/
void rtems_libio_free(
rtems_libio_t *iop
)
{
4b2da: 4e56 0000 linkw %fp,#0 4b2de: 2f0a movel %a2,%sp@- 4b2e0: 246e 0008 moveal %fp@(8),%a2
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 );
4b2e4: 42a7 clrl %sp@- 4b2e6: 42a7 clrl %sp@- 4b2e8: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b2ee: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
rtems_libio_lock();
if (iop->sem)
4b2f4: 202a 002c movel %a2@(44),%d0 4b2f8: 4fef 000c lea %sp@(12),%sp
4b2fc: 6630 bnes 4b32e <rtems_libio_free+0x54> <== ALWAYS TAKEN
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4b2fe: 41f9 0005 f988 lea 5f988 <rtems_libio_iop_freelist>,%a0 <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b304: 203c ffff feff movel #-257,%d0 <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
4b30a: 2550 0034 movel %a0@,%a2@(52) <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b30e: 41f9 0005 f98c lea 5f98c <rtems_libio_semaphore>,%a0 <== NOT EXECUTED 4b314: 2d50 0008 movel %a0@,%fp@(8) <== NOT EXECUTED
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b318: c1aa 0014 andl %d0,%a2@(20) <== NOT EXECUTED
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4b31c: 23ca 0005 f988 movel %a2,5f988 <rtems_libio_iop_freelist> <== NOT EXECUTED
rtems_libio_unlock();
}
4b322: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 4b326: 4e5e unlk %fp <== NOT EXECUTED 4b328: 4ef9 0004 6788 jmp 46788 <rtems_semaphore_release> <== NOT EXECUTED
)
{
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
4b32e: 2f00 movel %d0,%sp@- 4b330: 4eb9 0004 6570 jsr 46570 <rtems_semaphore_delete> 4b336: 588f addql #4,%sp
iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
4b338: 41f9 0005 f988 lea 5f988 <rtems_libio_iop_freelist>,%a0
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b33e: 203c ffff feff movel #-257,%d0
iop->data1 = rtems_libio_iop_freelist;
4b344: 2550 0034 movel %a0@,%a2@(52) 4b348: 41f9 0005 f98c lea 5f98c <rtems_libio_semaphore>,%a0 4b34e: 2d50 0008 movel %a0@,%fp@(8)
rtems_libio_lock();
if (iop->sem)
rtems_semaphore_delete(iop->sem);
iop->flags &= ~LIBIO_FLAGS_OPEN;
4b352: c1aa 0014 andl %d0,%a2@(20)
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
4b356: 23ca 0005 f988 movel %a2,5f988 <rtems_libio_iop_freelist>
rtems_libio_unlock();
}
4b35c: 246e fffc moveal %fp@(-4),%a2 4b360: 4e5e unlk %fp 4b362: 4ef9 0004 6788 jmp 46788 <rtems_semaphore_release>
00042ed4 <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
42ed4: 4e56 0000 linkw %fp,#0 42ed8: 2f02 movel %d2,%sp@-
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
42eda: 2439 0005 e274 movel 5e274 <rtems_libio_number_iops>,%d2
42ee0: 674a beqs 42f2c <rtems_libio_init+0x58> <== NEVER TAKEN
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
42ee2: 4878 0038 pea 38 <DBL_MANT_DIG+0x3> 42ee6: 2f02 movel %d2,%sp@- 42ee8: 4eb9 0004 292c jsr 4292c <calloc>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42eee: 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,
42ef0: 2040 moveal %d0,%a0 42ef2: 23c0 0005 f984 movel %d0,5f984 <rtems_libio_iops>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
42ef8: 6778 beqs 42f72 <rtems_libio_init+0x9e>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
42efa: 23c0 0005 f988 movel %d0,5f988 <rtems_libio_iop_freelist>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
42f00: 7201 moveq #1,%d1 42f02: b282 cmpl %d2,%d1
42f04: 6422 bccs 42f28 <rtems_libio_init+0x54> <== NEVER TAKEN
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
42f06: 2040 moveal %d0,%a0 42f08: 41e8 0038 lea %a0@(56),%a0
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++)
iop->data1 = iop + 1;
42f0c: 2148 fffc movel %a0,%a0@(-4) 42f10: 5281 addql #1,%d1 42f12: 41e8 0038 lea %a0@(56),%a0
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++)
42f16: b481 cmpl %d1,%d2
42f18: 66f2 bnes 42f0c <rtems_libio_init+0x38>
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
42f1a: 5381 subql #1,%d1 42f1c: 2401 movel %d1,%d2
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++)
42f1e: 2040 moveal %d0,%a0
* rtems_libio_init
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
42f20: e78a lsll #3,%d2 42f22: ed89 lsll #6,%d1 42f24: 9282 subl %d2,%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++)
42f26: d1c1 addal %d1,%a0
iop->data1 = iop + 1;
iop->data1 = NULL;
42f28: 42a8 0034 clrl %a0@(52)
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
42f2c: 4879 0005 f98c pea 5f98c <rtems_libio_semaphore> 42f32: 42a7 clrl %sp@- 42f34: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f> 42f38: 4878 0001 pea 1 <ADD> 42f3c: 2f3c 4c42 494f movel #1279412559,%sp@- 42f42: 4eb9 0004 63ac jsr 463ac <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
42f48: 4fef 0014 lea %sp@(20),%sp 42f4c: 4a80 tstl %d0
42f4e: 661a bnes 42f6a <rtems_libio_init+0x96> <== NEVER TAKEN
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
42f50: 2279 0005 e270 moveal 5e270 <rtems_fs_init_helper>,%a1 42f56: 4a89 tstl %a1
42f58: 6708 beqs 42f62 <rtems_libio_init+0x8e> <== NEVER TAKEN
(* rtems_fs_init_helper)();
}
42f5a: 242e fffc movel %fp@(-4),%d2 42f5e: 4e5e unlk %fp
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
(* rtems_fs_init_helper)();
42f60: 4ed1 jmp %a1@
}
42f62: 242e fffc movel %fp@(-4),%d2 <== NOT EXECUTED 42f66: 4e5e unlk %fp <== NOT EXECUTED 42f68: 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 );
42f6a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42f6c: 4eb9 0004 6d74 jsr 46d74 <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);
42f72: 4878 001a pea 1a <OPER2+0x6> 42f76: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred>
0004b3e6 <rtems_libio_is_file_open>:
*/
int rtems_libio_is_file_open(
void *node_access
)
{
4b3e6: 4e56 0000 linkw %fp,#0 4b3ea: 2f02 movel %d2,%sp@- 4b3ec: 242e 0008 movel %fp@(8),%d2
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 );
4b3f0: 42a7 clrl %sp@- 4b3f2: 42a7 clrl %sp@- 4b3f4: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b3fa: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b400: 2079 0005 f984 moveal 5f984 <rtems_libio_iops>,%a0 4b406: 4fef 000c lea %sp@(12),%sp 4b40a: 2279 0005 e274 moveal 5e274 <rtems_libio_number_iops>,%a1 4b410: 4a89 tstl %a1
4b412: 6720 beqs 4b434 <rtems_libio_is_file_open+0x4e> <== NEVER TAKEN
* given file refers to an active file descriptor.
*
* If the given file is open a 1 is returned, otherwise a 0 is returned.
*/
int rtems_libio_is_file_open(
4b414: 41e8 0014 lea %a0@(20),%a0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b418: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b41a: 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++){
4b41c: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b41e: 0281 0000 0100 andil #256,%d1
4b424: 6706 beqs 4b42c <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 ) {
4b426: b4a8 0004 cmpl %a0@(4),%d2
4b42a: 6720 beqs 4b44c <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++){
4b42c: 41e8 0038 lea %a0@(56),%a0 4b430: b3c0 cmpal %d0,%a1
4b432: 62e6 bhis 4b41a <rtems_libio_is_file_open+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b434: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@-
int rtems_libio_is_file_open(
void *node_access
)
{
rtems_libio_t *iop;
int result=0;
4b43a: 4282 clrl %d2 4b43c: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b442: 2002 movel %d2,%d0 4b444: 242e fffc movel %fp@(-4),%d2 4b448: 4e5e unlk %fp 4b44a: 4e75 rts 4b44c: 2f39 0005 f98c movel 5f98c <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 ) {
result = 1;
4b452: 7401 moveq #1,%d2 4b454: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b45a: 2002 movel %d2,%d0 4b45c: 242e fffc movel %fp@(-4),%d2
4b460: 4e5e unlk %fp <== NOT EXECUTED
0004b368 <rtems_libio_is_open_files_in_fs>:
*/
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
4b368: 4e56 0000 linkw %fp,#0 4b36c: 2f02 movel %d2,%sp@- 4b36e: 242e 0008 movel %fp@(8),%d2
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 );
4b372: 42a7 clrl %sp@- 4b374: 42a7 clrl %sp@- 4b376: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@- 4b37c: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b382: 2079 0005 f984 moveal 5f984 <rtems_libio_iops>,%a0 4b388: 4fef 000c lea %sp@(12),%sp 4b38c: 2279 0005 e274 moveal 5e274 <rtems_libio_number_iops>,%a1 4b392: 4a89 tstl %a1
4b394: 6720 beqs 4b3b6 <rtems_libio_is_open_files_in_fs+0x4e><== NEVER TAKEN
*
* If there is at least one node in the file system referenced by the mount
* table entry a 1 is returned, otherwise a 0 is returned.
*/
int rtems_libio_is_open_files_in_fs(
4b396: 41e8 0014 lea %a0@(20),%a0
/*
* Look for any active file descriptor entry.
*/
for (iop=rtems_libio_iops,i=0; i < rtems_libio_number_iops; iop++, i++){
4b39a: 4280 clrl %d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b39c: 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++){
4b39e: 5280 addql #1,%d0
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
4b3a0: 0281 0000 0100 andil #256,%d1
4b3a6: 6706 beqs 4b3ae <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 ) {
4b3a8: b4a8 0014 cmpl %a0@(20),%d2
4b3ac: 6720 beqs 4b3ce <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++){
4b3ae: 41e8 0038 lea %a0@(56),%a0 4b3b2: b3c0 cmpal %d0,%a1
4b3b4: 62e6 bhis 4b39c <rtems_libio_is_open_files_in_fs+0x34>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
4b3b6: 2f39 0005 f98c movel 5f98c <rtems_libio_semaphore>,%sp@-
int rtems_libio_is_open_files_in_fs(
rtems_filesystem_mount_table_entry_t * fs_mt_entry
)
{
rtems_libio_t *iop;
int result = 0;
4b3bc: 4282 clrl %d2 4b3be: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b3c4: 2002 movel %d2,%d0 4b3c6: 242e fffc movel %fp@(-4),%d2 4b3ca: 4e5e unlk %fp 4b3cc: 4e75 rts 4b3ce: 2f39 0005 f98c movel 5f98c <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 ) {
result = 1;
4b3d4: 7401 moveq #1,%d2 4b3d6: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
rtems_libio_unlock();
return result;
}
4b3dc: 2002 movel %d2,%d0 4b3de: 242e fffc movel %fp@(-4),%d2
4b3e2: 4e5e unlk %fp <== NOT EXECUTED
0004435c <rtems_libio_set_private_env>:
rtems_status_code rtems_libio_set_private_env(void)
{
4435c: 4e56 ffd4 linkw %fp,#-44 44360: 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);
44364: 486e fffc pea %fp@(-4) 44368: 42a7 clrl %sp@- 4436a: 42a7 clrl %sp@- 4436c: 4eb9 0004 7414 jsr 47414 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
44372: 4fef 000c lea %sp@(12),%sp
{
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
44376: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) return sc;
44378: 6600 009a bnew 44414 <rtems_libio_set_private_env+0xb8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
4437c: 2479 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a2 44382: b5fc 0006 02b4 cmpal #393908,%a2 44388: 6700 0096 beqw 44420 <rtems_libio_set_private_env+0xc4>
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
4438c: 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);
44390: 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*/
44394: 4879 0006 02b4 pea 602b4 <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);
4439a: 4bf9 0004 3050 lea 43050 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
443a0: 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*/
443a4: 2f0a movel %a2,%sp@- 443a6: 4eb9 0004 fbf8 jsr 4fbf8 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
443ac: 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);
443b0: 42a7 clrl %sp@- 443b2: 2f0b movel %a3,%sp@- 443b4: 42a7 clrl %sp@- 443b6: 4878 0001 pea 1 <ADD> 443ba: 4879 0005 d7b2 pea 5d7b2 <IMFS_ops+0x48> 443c0: 4e95 jsr %a5@
rtems_filesystem_root = loc;
443c2: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
443c8: 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;
443cc: 2153 0018 movel %a3@,%a0@(24) 443d0: 216e ffec 001c movel %fp@(-20),%a0@(28) 443d6: 216e fff0 0020 movel %fp@(-16),%a0@(32) 443dc: 216e fff4 0024 movel %fp@(-12),%a0@(36) 443e2: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
443e6: 42a7 clrl %sp@- 443e8: 2f0b movel %a3,%sp@- 443ea: 42a7 clrl %sp@- 443ec: 4878 0001 pea 1 <ADD> 443f0: 4879 0005 d7b2 pea 5d7b2 <IMFS_ops+0x48> 443f6: 4e95 jsr %a5@
rtems_filesystem_current = loc;
443f8: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0 443fe: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
44400: 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;
44404: 20d3 movel %a3@,%a0@+ 44406: 20ee ffec movel %fp@(-20),%a0@+ 4440a: 20ee fff0 movel %fp@(-16),%a0@+ 4440e: 20ee fff4 movel %fp@(-12),%a0@+ 44412: 2094 movel %a4@,%a0@
return RTEMS_SUCCESSFUL;
}
44414: 2002 movel %d2,%d0 44416: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 4441c: 4e5e unlk %fp 4441e: 4e75 rts
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));
44420: 4878 0048 pea 48 <DBL_MANT_DIG+0x13> 44424: 4eb9 0004 3794 jsr 43794 <malloc>
if (!tmp)
4442a: 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));
4442c: 2440 moveal %d0,%a2
if (!tmp)
4442e: 4a80 tstl %d0 44430: 6700 00b0 beqw 444e2 <rtems_libio_set_private_env+0x186>
#ifdef HAVE_USERENV_REFCNT
tmp->refcnt = 1;
#endif
sc = rtems_task_variable_add(
44434: 487a fede pea %pc@(44314 <free_user_env>) 44438: 4879 0005 ec78 pea 5ec78 <rtems_current_user_env> 4443e: 42a7 clrl %sp@- 44440: 4eb9 0004 75a8 jsr 475a8 <rtems_task_variable_add>
RTEMS_SELF,
(void*)&rtems_current_user_env,
(void(*)(void *))free_user_env
);
if (sc != RTEMS_SUCCESSFUL) {
44446: 4fef 000c lea %sp@(12),%sp 4444a: 4a80 tstl %d0 4444c: 6600 00a2 bnew 444f0 <rtems_libio_set_private_env+0x194>
return sc;
}
rtems_current_user_env = tmp;
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
44450: 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);
44454: 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*/
44458: 4879 0006 02b4 pea 602b4 <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);
4445e: 4bf9 0004 3050 lea 43050 <rtems_filesystem_evaluate_path>,%a5
rtems_filesystem_root = loc;
44464: 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*/
44468: 2f0a movel %a2,%sp@-
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
4446a: 23ca 0005 ec78 movel %a2,5ec78 <rtems_current_user_env>
}
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
44470: 4eb9 0004 fbf8 jsr 4fbf8 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
44476: 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);
4447a: 42a7 clrl %sp@- 4447c: 2f0b movel %a3,%sp@- 4447e: 42a7 clrl %sp@- 44480: 4878 0001 pea 1 <ADD> 44484: 4879 0005 d7b2 pea 5d7b2 <IMFS_ops+0x48> 4448a: 4e95 jsr %a5@
rtems_filesystem_root = loc;
4448c: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
44492: 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;
44496: 2153 0018 movel %a3@,%a0@(24) 4449a: 216e ffec 001c movel %fp@(-20),%a0@(28) 444a0: 216e fff0 0020 movel %fp@(-16),%a0@(32) 444a6: 216e fff4 0024 movel %fp@(-12),%a0@(36) 444ac: 2154 0028 movel %a4@,%a0@(40)
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
444b0: 42a7 clrl %sp@- 444b2: 2f0b movel %a3,%sp@- 444b4: 42a7 clrl %sp@- 444b6: 4878 0001 pea 1 <ADD> 444ba: 4879 0005 d7b2 pea 5d7b2 <IMFS_ops+0x48> 444c0: 4e95 jsr %a5@
rtems_filesystem_current = loc;
444c2: 2079 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a0 444c8: 5888 addql #4,%a0
return RTEMS_SUCCESSFUL;
444ca: 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;
444ce: 20d3 movel %a3@,%a0@+ 444d0: 20ee ffec movel %fp@(-20),%a0@+ 444d4: 20ee fff0 movel %fp@(-16),%a0@+ 444d8: 20ee fff4 movel %fp@(-12),%a0@+ 444dc: 2094 movel %a4@,%a0@ 444de: 6000 ff34 braw 44414 <rtems_libio_set_private_env+0xb8>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
if (!tmp)
return RTEMS_NO_MEMORY;
444e2: 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;
}
444e4: 2002 movel %d2,%d0 <== NOT EXECUTED 444e6: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 444ec: 4e5e unlk %fp <== NOT EXECUTED 444ee: 4e75 rts <== NOT EXECUTED
);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
444f0: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return sc;
444f2: 2400 movel %d0,%d2 <== NOT EXECUTED
);
if (sc != RTEMS_SUCCESSFUL) {
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
444f4: 4eb9 0004 3188 jsr 43188 <free> <== NOT EXECUTED
return sc;
444fa: 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;
}
444fc: 2002 movel %d2,%d0 <== NOT EXECUTED 444fe: 4cee 3c04 ffd4 moveml %fp@(-44),%d2/%a2-%a5 <== NOT EXECUTED 44504: 4e5e unlk %fp <== NOT EXECUTED
00044508 <rtems_libio_share_private_env>:
* while changing any of those (chdir(), chroot()).
*/
#ifndef HAVE_USERENV_REFCNT
rtems_status_code rtems_libio_share_private_env(rtems_id task_id)
{
44508: 4e56 fff8 linkw %fp,#-8 <== NOT EXECUTED 4450c: 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);
4450e: 486e fff8 pea %fp@(-8) <== NOT EXECUTED 44512: 42a7 clrl %sp@- <== NOT EXECUTED 44514: 42a7 clrl %sp@- <== NOT EXECUTED 44516: 4eb9 0004 7414 jsr 47414 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
4451c: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44520: 4a80 tstl %d0 <== NOT EXECUTED 44522: 6636 bnes 4455a <rtems_libio_share_private_env+0x52><== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
44524: 2479 0005 ec78 moveal 5ec78 <rtems_current_user_env>,%a2 <== NOT EXECUTED 4452a: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 4452e: b092 cmpl %a2@,%d0 <== NOT EXECUTED 44530: 6730 beqs 44562 <rtems_libio_share_private_env+0x5a><== NOT EXECUTED
rtems_user_env_t *tmp = rtems_current_user_env;
sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env);
if (sc != RTEMS_SUCCESSFUL) return sc;
free_user_env(tmp);
} else {
sc = rtems_task_variable_get(
44532: 486e fffc pea %fp@(-4) <== NOT EXECUTED 44536: 4879 0005 ec78 pea 5ec78 <rtems_current_user_env> <== NOT EXECUTED 4453c: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 44540: 4eb9 0004 770c jsr 4770c <rtems_task_variable_get> <== NOT EXECUTED
task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
44546: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4454a: 4a80 tstl %d0 <== NOT EXECUTED 4454c: 6730 beqs 4457e <rtems_libio_share_private_env+0x76><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
4454e: 223c 0006 02b4 movel #393908,%d1 <== NOT EXECUTED 44554: 23c1 0005 ec78 movel %d1,5ec78 <rtems_current_user_env> <== NOT EXECUTED
return sc; }
4455a: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 4455e: 4e5e unlk %fp <== NOT EXECUTED 44560: 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);
44562: 4879 0005 ec78 pea 5ec78 <rtems_current_user_env> <== NOT EXECUTED 44568: 42a7 clrl %sp@- <== NOT EXECUTED 4456a: 4eb9 0004 7664 jsr 47664 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
44570: 508f addql #8,%sp <== NOT EXECUTED 44572: 4a80 tstl %d0 <== NOT EXECUTED 44574: 66e4 bnes 4455a <rtems_libio_share_private_env+0x52><== NOT EXECUTED
free_user_env(tmp);
44576: 2f0a movel %a2,%sp@- <== NOT EXECUTED 44578: 4eba fd9a jsr %pc@(44314 <free_user_env>) <== NOT EXECUTED 4457c: 588f addql #4,%sp <== NOT EXECUTED
goto bailout;
}
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_add(
4457e: 487a fd94 pea %pc@(44314 <free_user_env>) <== NOT EXECUTED 44582: 4879 0005 ec78 pea 5ec78 <rtems_current_user_env> <== NOT EXECUTED 44588: 42a7 clrl %sp@- <== NOT EXECUTED 4458a: 4eb9 0004 75a8 jsr 475a8 <rtems_task_variable_add> <== NOT EXECUTED
RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
if (sc != RTEMS_SUCCESSFUL)
44590: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 44594: 4a80 tstl %d0 <== NOT EXECUTED 44596: 66b6 bnes 4454e <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;
44598: 41ee fffc lea %fp@(-4),%a0 <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
4459c: 246e fff4 moveal %fp@(-12),%a2 <== NOT EXECUTED 445a0: 4e5e unlk %fp <== NOT EXECUTED
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;
445a2: 23d0 0005 ec78 movel %a0@,5ec78 <rtems_current_user_env> <== NOT EXECUTED
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
return sc;
}
...
0004b1c8 <rtems_libio_to_fcntl_flags>:
uint32_t flags
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b1c8: 7006 moveq #6,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b1ca: 4e56 0000 linkw %fp,#0 4b1ce: 222e 0008 movel %fp@(8),%d1
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b1d2: c081 andl %d1,%d0
*/
uint32_t rtems_libio_to_fcntl_flags(
uint32_t flags
)
{
4b1d4: 2f02 movel %d2,%sp@-
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
4b1d6: 7406 moveq #6,%d2 4b1d8: b480 cmpl %d0,%d2
4b1da: 6736 beqs 4b212 <rtems_libio_to_fcntl_flags+0x4a><== NEVER TAKEN
fcntl_flags |= O_RDWR;
} else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) {
4b1dc: 0801 0001 btst #1,%d1
4b1e0: 6726 beqs 4b208 <rtems_libio_to_fcntl_flags+0x40><== NEVER TAKEN
fcntl_flags |= O_RDONLY;
4b1e2: 4280 clrl %d0
} else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) {
fcntl_flags |= O_WRONLY;
}
if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) {
4b1e4: 0801 0000 btst #0,%d1
4b1e8: 6704 beqs 4b1ee <rtems_libio_to_fcntl_flags+0x26>
fcntl_flags |= O_NONBLOCK;
4b1ea: 08c0 000e bset #14,%d0
}
if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) {
4b1ee: 0801 0009 btst #9,%d1
4b1f2: 6704 beqs 4b1f8 <rtems_libio_to_fcntl_flags+0x30>
fcntl_flags |= O_APPEND;
4b1f4: 7408 moveq #8,%d2 4b1f6: 8082 orl %d2,%d0
}
if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) {
4b1f8: 0801 000a btst #10,%d1
4b1fc: 6704 beqs 4b202 <rtems_libio_to_fcntl_flags+0x3a>
fcntl_flags |= O_CREAT;
4b1fe: 08c0 0009 bset #9,%d0
}
return fcntl_flags;
}
4b202: 241f movel %sp@+,%d2 4b204: 4e5e unlk %fp 4b206: 4e75 rts
)
{
uint32_t fcntl_flags = 0;
if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) {
fcntl_flags |= O_RDWR;
4b208: 44c1 movew %d1,%ccr <== NOT EXECUTED 4b20a: 57c0 seq %d0 <== NOT EXECUTED 4b20c: 49c0 extbl %d0 <== NOT EXECUTED 4b20e: 4480 negl %d0 <== NOT EXECUTED 4b210: 60d2 bras 4b1e4 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED 4b212: 7002 moveq #2,%d0 <== NOT EXECUTED 4b214: 60ce bras 4b1e4 <rtems_libio_to_fcntl_flags+0x1c><== NOT EXECUTED
00046f68 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
46f68: 4e56 fffc linkw %fp,#-4 46f6c: 2f03 movel %d3,%sp@- 46f6e: 2f02 movel %d2,%sp@-
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
46f70: 486e fffc pea %fp@(-4) 46f74: 2f2e 0008 movel %fp@(8),%sp@- 46f78: 2f39 0006 3dc0 movel 63dc0 <RTEMS_Malloc_Heap>,%sp@- 46f7e: 4eb9 0004 d0e8 jsr 4d0e8 <_Protected_heap_Get_block_size> 46f84: 4fef 000c lea %sp@(12),%sp 46f88: 4a00 tstb %d0
46f8a: 671a beqs 46fa6 <rtems_malloc_statistics_at_free+0x3e><== NEVER TAKEN
MSBUMP(lifetime_freed, size);
46f8c: 262e fffc movel %fp@(-4),%d3 46f90: 4282 clrl %d2 46f92: d7b9 0006 5de0 addl %d3,65de0 <rtems_malloc_statistics+0x28> 46f98: 2039 0006 5ddc movel 65ddc <rtems_malloc_statistics+0x24>,%d0 46f9e: d182 addxl %d2,%d0 46fa0: 23c0 0006 5ddc movel %d0,65ddc <rtems_malloc_statistics+0x24>
} }
46fa6: 242e fff4 movel %fp@(-12),%d2 46faa: 262e fff8 movel %fp@(-8),%d3
46fae: 4e5e unlk %fp <== NOT EXECUTED
00046fb2 <rtems_malloc_statistics_at_malloc>:
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
46fb2: 4e56 fffc linkw %fp,#-4 46fb6: 202e 0008 movel %fp@(8),%d0 46fba: 2f03 movel %d3,%sp@-
uintptr_t actual_size = 0;
46fbc: 42ae fffc clrl %fp@(-4)
}
static void rtems_malloc_statistics_at_malloc(
void *pointer
)
{
46fc0: 2f02 movel %d2,%sp@-
uintptr_t actual_size = 0;
uint32_t current_depth;
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
46fc2: 4a80 tstl %d0
46fc4: 674c beqs 47012 <rtems_malloc_statistics_at_malloc+0x60><== NEVER TAKEN
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
46fc6: 486e fffc pea %fp@(-4)
MSBUMP(lifetime_allocated, actual_size);
46fca: 4282 clrl %d2
rtems_malloc_statistics_t *s = &rtems_malloc_statistics;
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
46fcc: 2f00 movel %d0,%sp@- 46fce: 2f39 0006 3dc0 movel 63dc0 <RTEMS_Malloc_Heap>,%sp@- 46fd4: 4eb9 0004 d0e8 jsr 4d0e8 <_Protected_heap_Get_block_size>
MSBUMP(lifetime_allocated, actual_size);
46fda: 262e fffc movel %fp@(-4),%d3
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
46fde: 4fef 000c lea %sp@(12),%sp
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
46fe2: 2039 0006 5dd4 movel 65dd4 <rtems_malloc_statistics+0x1c>,%d0 46fe8: d6b9 0006 5dd8 addl 65dd8 <rtems_malloc_statistics+0x20>,%d3 46fee: d580 addxl %d0,%d2
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
46ff0: 2003 movel %d3,%d0 46ff2: 90b9 0006 5de0 subl 65de0 <rtems_malloc_statistics+0x28>,%d0
if ( !pointer )
return;
_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size);
MSBUMP(lifetime_allocated, actual_size);
46ff8: 23c2 0006 5dd4 movel %d2,65dd4 <rtems_malloc_statistics+0x1c> 46ffe: 23c3 0006 5dd8 movel %d3,65dd8 <rtems_malloc_statistics+0x20>
current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed);
if (current_depth > s->max_depth)
47004: b0b9 0006 5dd0 cmpl 65dd0 <rtems_malloc_statistics+0x18>,%d0
4700a: 6306 blss 47012 <rtems_malloc_statistics_at_malloc+0x60>
s->max_depth = current_depth;
4700c: 23c0 0006 5dd0 movel %d0,65dd0 <rtems_malloc_statistics+0x18>
}
47012: 242e fff4 movel %fp@(-12),%d2 47016: 262e fff8 movel %fp@(-8),%d3
4701a: 4e5e unlk %fp <== NOT EXECUTED
0004f834 <rtems_memalign>:
int rtems_memalign(
void **pointer,
size_t alignment,
size_t size
)
{
4f834: 4e56 0000 linkw %fp,#0 4f838: 2f0a movel %a2,%sp@- 4f83a: 246e 0008 moveal %fp@(8),%a2 4f83e: 2f02 movel %d2,%sp@-
void *return_this;
/*
* Parameter error checks
*/
if ( !pointer )
4f840: 4a8a tstl %a2
4f842: 675e beqs 4f8a2 <rtems_memalign+0x6e>
return EINVAL;
*pointer = NULL;
4f844: 4292 clrl %a2@
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4f846: 7003 moveq #3,%d0 4f848: b0b9 0006 3e82 cmpl 63e82 <_System_state_Current>,%d0
4f84e: 6748 beqs 4f898 <rtems_memalign+0x64> <== ALWAYS TAKEN
return EINVAL;
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
4f850: 4eb9 0004 4154 jsr 44154 <malloc_deferred_frees_process>
Heap_Control *heap,
uintptr_t size,
uintptr_t alignment
)
{
return
4f856: 42a7 clrl %sp@- 4f858: 2f2e 000c movel %fp@(12),%sp@- 4f85c: 2f2e 0010 movel %fp@(16),%sp@- 4f860: 2f39 0006 2410 movel 62410 <RTEMS_Malloc_Heap>,%sp@- 4f866: 4eb9 0004 97c4 jsr 497c4 <_Protected_heap_Allocate_aligned_with_boundary>
return_this = _Protected_heap_Allocate_aligned(
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
4f86c: 4fef 0010 lea %sp@(16),%sp 4f870: 2400 movel %d0,%d2
4f872: 673c beqs 4f8b0 <rtems_memalign+0x7c>
return ENOMEM;
/*
* If configured, update the more involved statistics
*/
if ( rtems_malloc_statistics_helpers )
4f874: 2079 0006 2ab6 moveal 62ab6 <rtems_malloc_statistics_helpers>,%a0 4f87a: 4a88 tstl %a0
4f87c: 670a beqs 4f888 <rtems_memalign+0x54>
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
4f87e: 2f0a movel %a2,%sp@- 4f880: 2068 0004 moveal %a0@(4),%a0 4f884: 4e90 jsr %a0@ 4f886: 588f addql #4,%sp
*pointer = return_this;
4f888: 2482 movel %d2,%a2@
return 0; }
4f88a: 242e fff8 movel %fp@(-8),%d2
*/
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
4f88e: 4280 clrl %d0
}
4f890: 246e fffc moveal %fp@(-4),%a2 4f894: 4e5e unlk %fp 4f896: 4e75 rts
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
4f898: 4eb9 0004 4114 jsr 44114 <malloc_is_system_state_OK>
*pointer = NULL;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
4f89e: 4a00 tstb %d0
4f8a0: 66ae bnes 4f850 <rtems_memalign+0x1c> <== ALWAYS TAKEN
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f8a2: 242e fff8 movel %fp@(-8),%d2
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
!malloc_is_system_state_OK() )
return EINVAL;
4f8a6: 7016 moveq #22,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f8a8: 246e fffc moveal %fp@(-4),%a2 4f8ac: 4e5e unlk %fp 4f8ae: 4e75 rts 4f8b0: 242e fff8 movel %fp@(-8),%d2
RTEMS_Malloc_Heap,
size,
alignment
);
if ( !return_this )
return ENOMEM;
4f8b4: 700c moveq #12,%d0
if ( rtems_malloc_statistics_helpers )
(*rtems_malloc_statistics_helpers->at_malloc)(pointer);
*pointer = return_this;
return 0;
}
4f8b6: 246e fffc moveal %fp@(-4),%a2 4f8ba: 4e5e unlk %fp
...
0004dd60 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4dd60: 4e56 ff90 linkw %fp,#-112 4dd64: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int success = 0; char *dup_path = strdup(path);
4dd68: 2f2e 0008 movel %fp@(8),%sp@-
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
4dd6c: 2a2e 000c movel %fp@(12),%d5
int success = 0; char *dup_path = strdup(path);
4dd70: 4eb9 0005 188c jsr 5188c <strdup>
if (dup_path != NULL) {
4dd76: 588f addql #4,%sp
int
rtems_mkdir(const char *path, mode_t mode)
{
int success = 0;
char *dup_path = strdup(path);
4dd78: 2640 moveal %d0,%a3
if (dup_path != NULL) {
4dd7a: 4a80 tstl %d0 4dd7c: 6700 0138 beqw 4deb6 <rtems_mkdir+0x156>
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
4dd80: 742f moveq #47,%d2 4dd82: 1013 moveb %a3@,%d0 4dd84: 1200 moveb %d0,%d1 4dd86: 49c1 extbl %d1 4dd88: b481 cmpl %d1,%d2 4dd8a: 6700 014a beqw 4ded6 <rtems_mkdir+0x176> 4dd8e: 244b moveal %a3,%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4dd90: 49ea 0001 lea %a2@(1),%a4 4dd94: 4283 clrl %d3 4dd96: 7201 moveq #1,%d1 4dd98: 4bf9 0004 48cc lea 448cc <mkdir>,%a5
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4dd9e: 2e3c 0005 08dc movel #329948,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask);
4dda4: 283c 0004 dfc4 movel #319428,%d4
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
4ddaa: 4a00 tstb %d0
4ddac: 6710 beqs 4ddbe <rtems_mkdir+0x5e> <== NEVER TAKEN
last = 1; else if (p[0] != '/')
4ddae: 49c0 extbl %d0 4ddb0: 742f moveq #47,%d2 4ddb2: b480 cmpl %d0,%d2
4ddb4: 6738 beqs 4ddee <rtems_mkdir+0x8e>
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4ddb6: 528a addql #1,%a2 4ddb8: 101c moveb %a4@+,%d0
if (p[0] == '\0')
4ddba: 4a00 tstb %d0
4ddbc: 66f0 bnes 4ddae <rtems_mkdir+0x4e> last = 1; else if (p[0] != '/') continue; *p = '\0';
4ddbe: 7401 moveq #1,%d2 4ddc0: 4212 clrb %a2@
if (!last && p[1] == '\0')
last = 1;
if (first) {
4ddc2: 4a81 tstl %d1
4ddc4: 6650 bnes 4de16 <rtems_mkdir+0xb6>
(void)umask(numask);
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4ddc6: 203c 0000 01ff movel #511,%d0
oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last)
4ddcc: 4a82 tstl %d2
4ddce: 662e bnes 4ddfe <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4ddd0: 2f00 movel %d0,%sp@- 4ddd2: 2f0b movel %a3,%sp@- 4ddd4: 4e95 jsr %a5@ 4ddd6: 508f addql #8,%sp 4ddd8: 4a80 tstl %d0
4ddda: 6d5c blts 4de38 <rtems_mkdir+0xd8>
} else {
retval = 0;
break;
}
}
if (!last)
4dddc: 4a82 tstl %d2 4ddde: 6600 00c0 bnew 4dea0 <rtems_mkdir+0x140>
*p = '/';
4dde2: 4281 clrl %d1 4dde4: 14bc 002f moveb #47,%a2@
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
4dde8: 528a addql #1,%a2 4ddea: 101c moveb %a4@+,%d0 4ddec: 60cc bras 4ddba <rtems_mkdir+0x5a>
if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0';
4ddee: 4212 clrb %a2@
if (!last && p[1] == '\0')
4ddf0: 4a14 tstb %a4@ 4ddf2: 57c2 seq %d2 4ddf4: 49c2 extbl %d2 4ddf6: 4482 negl %d2
last = 1;
if (first) {
4ddf8: 4a81 tstl %d1
4ddfa: 67ca beqs 4ddc6 <rtems_mkdir+0x66>
4ddfc: 6018 bras 4de16 <rtems_mkdir+0xb6>
numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask);
4ddfe: 2f03 movel %d3,%sp@- 4de00: 2044 moveal %d4,%a0 4de02: 4e90 jsr %a0@ 4de04: 588f addql #4,%sp
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4de06: 2005 movel %d5,%d0 4de08: 2f00 movel %d0,%sp@- 4de0a: 2f0b movel %a3,%sp@- 4de0c: 4e95 jsr %a5@ 4de0e: 508f addql #8,%sp 4de10: 4a80 tstl %d0
4de12: 6cc8 bges 4dddc <rtems_mkdir+0x7c>
4de14: 6022 bras 4de38 <rtems_mkdir+0xd8>
* mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0);
4de16: 42a7 clrl %sp@- 4de18: 2044 moveal %d4,%a0 4de1a: 4e90 jsr %a0@
numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask);
4de1c: 2044 moveal %d4,%a0
* mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0);
4de1e: 2600 movel %d0,%d3
numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask);
4de20: 0280 ffff ff3f andil #-193,%d0 4de26: 2f00 movel %d0,%sp@- 4de28: 4e90 jsr %a0@ 4de2a: 508f addql #8,%sp
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
4de2c: 203c 0000 01ff movel #511,%d0
oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last)
4de32: 4a82 tstl %d2
4de34: 679a beqs 4ddd0 <rtems_mkdir+0x70>
4de36: 60c6 bras 4ddfe <rtems_mkdir+0x9e>
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4de38: 2047 moveal %d7,%a0 4de3a: 2c3c 0005 08dc movel #329948,%d6 4de40: 4e90 jsr %a0@ 4de42: 7211 moveq #17,%d1 4de44: 2040 moveal %d0,%a0 4de46: b290 cmpl %a0@,%d1
4de48: 670c beqs 4de56 <rtems_mkdir+0xf6> <== ALWAYS TAKEN
4de4a: 2046 moveal %d6,%a0 <== NOT EXECUTED 4de4c: 4e90 jsr %a0@ <== NOT EXECUTED 4de4e: 7215 moveq #21,%d1 <== NOT EXECUTED 4de50: 2040 moveal %d0,%a0 <== NOT EXECUTED 4de52: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4de54: 6664 bnes 4deba <rtems_mkdir+0x15a> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
4de56: 486e ffba pea %fp@(-70) 4de5a: 2f0b movel %a3,%sp@- 4de5c: 4eb9 0004 df10 jsr 4df10 <stat> 4de62: 508f addql #8,%sp 4de64: 4a80 tstl %d0
4de66: 6d52 blts 4deba <rtems_mkdir+0x15a> <== NEVER TAKEN
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
4de68: 202e ffc6 movel %fp@(-58),%d0 4de6c: 0280 0000 f000 andil #61440,%d0 4de72: 0c80 0000 4000 cmpil #16384,%d0 4de78: 6700 ff62 beqw 4dddc <rtems_mkdir+0x7c>
if (last)
4de7c: 4a82 tstl %d2
4de7e: 677a beqs 4defa <rtems_mkdir+0x19a> <== NEVER TAKEN
errno = EEXIST;
4de80: 2046 moveal %d6,%a0 4de82: 4e90 jsr %a0@ 4de84: 7211 moveq #17,%d1 4de86: 2040 moveal %d0,%a0 4de88: 2081 movel %d1,%a0@
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4de8a: 2f0b movel %a3,%sp@- 4de8c: 4eb9 0004 41c8 jsr 441c8 <free> 4de92: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4de94: 70ff moveq #-1,%d0
}
4de96: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4de9c: 4e5e unlk %fp 4de9e: 4e75 rts
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4dea0: 2f0b movel %a3,%sp@- 4dea2: 4eb9 0004 41c8 jsr 441c8 <free> 4dea8: 588f addql #4,%sp
}
return success != 0 ? 0 : -1;
4deaa: 4280 clrl %d0
}
4deac: 4cee 3cfc ff90 moveml %fp@(-112),%d2-%d7/%a2-%a5 4deb2: 4e5e unlk %fp 4deb4: 4e75 rts
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
4deb6: 70ff moveq #-1,%d0 <== NOT EXECUTED 4deb8: 60dc bras 4de96 <rtems_mkdir+0x136> <== NOT EXECUTED
} } if (!last) *p = '/'; } if (!first && !last)
4deba: 4a82 tstl %d2 <== NOT EXECUTED 4debc: 66cc bnes 4de8a <rtems_mkdir+0x12a> <== NOT EXECUTED
(void)umask(oumask);
4debe: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4dec0: 4eb9 0004 dfc4 jsr 4dfc4 <umask> <== NOT EXECUTED 4dec6: 588f addql #4,%sp <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
4dec8: 2f0b movel %a3,%sp@- <== NOT EXECUTED 4deca: 4eb9 0004 41c8 jsr 441c8 <free> <== NOT EXECUTED 4ded0: 588f addql #4,%sp <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
4ded2: 70ff moveq #-1,%d0 <== NOT EXECUTED 4ded4: 60c0 bras 4de96 <rtems_mkdir+0x136> <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4ded6: 45eb 0001 lea %a3@(1),%a2
(void)umask(oumask);
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
4deda: 49ea 0001 lea %a2@(1),%a4 4dede: 4283 clrl %d3 4dee0: 7201 moveq #1,%d1 4dee2: 4bf9 0004 48cc lea 448cc <mkdir>,%a5
first = 0;
}
if (last)
(void)umask(oumask);
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
if (errno == EEXIST || errno == EISDIR) {
4dee8: 2e3c 0005 08dc movel #329948,%d7
numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) (void)umask(oumask);
4deee: 283c 0004 dfc4 movel #319428,%d4
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
4def4: 1012 moveb %a2@,%d0 4def6: 6000 feb2 braw 4ddaa <rtems_mkdir+0x4a>
break;
} else if (!S_ISDIR(sb.st_mode)) {
if (last)
errno = EEXIST;
else
errno = ENOTDIR;
4defa: 2046 moveal %d6,%a0 <== NOT EXECUTED 4defc: 4e90 jsr %a0@ <== NOT EXECUTED 4defe: 2040 moveal %d0,%a0 <== NOT EXECUTED 4df00: 7014 moveq #20,%d0 <== NOT EXECUTED 4df02: 2080 movel %d0,%a0@ <== NOT EXECUTED
} if (!last) *p = '/'; } if (!first && !last) (void)umask(oumask);
4df04: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4df06: 4eb9 0004 dfc4 jsr 4dfc4 <umask> <== NOT EXECUTED 4df0c: 588f addql #4,%sp <== NOT EXECUTED 4df0e: 60b8 bras 4dec8 <rtems_mkdir+0x168> <== NOT EXECUTED
00046644 <rtems_object_get_api_class_name>:
)
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
46644: 7001 moveq #1,%d0
const char *rtems_object_get_api_class_name(
int the_api,
int the_class
)
{
46646: 4e56 0000 linkw %fp,#0 4664a: 222e 0008 movel %fp@(8),%d1 4664e: 2f02 movel %d2,%sp@-
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
46650: b081 cmpl %d1,%d0
46652: 674e beqs 466a2 <rtems_object_get_api_class_name+0x5e><== NEVER TAKEN
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
46654: 7402 moveq #2,%d2 46656: b481 cmpl %d1,%d2
46658: 6740 beqs 4669a <rtems_object_get_api_class_name+0x56><== NEVER TAKEN
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
4665a: 143c 0003 moveb #3,%d2
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
4665e: 203c 0005 ddb6 movel #384438,%d0
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
46664: b481 cmpl %d1,%d2
46666: 6708 beqs 46670 <rtems_object_get_api_class_name+0x2c>
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
}
46668: 242e fffc movel %fp@(-4),%d2 4666c: 4e5e unlk %fp 4666e: 4e75 rts
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
#ifdef RTEMS_POSIX_API
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
46670: 203c 0005 eef8 movel #388856,%d0
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
46676: 2f2e 000c movel %fp@(12),%sp@- 4667a: 2f00 movel %d0,%sp@- 4667c: 4eb9 0004 b424 jsr 4b424 <rtems_assoc_ptr_by_local>
if ( class_assoc )
46682: 508f addql #8,%sp
else if ( the_api == OBJECTS_POSIX_API )
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
46684: 2040 moveal %d0,%a0
if ( class_assoc )
return class_assoc->name;
return "BAD CLASS";
46686: 203c 0005 ddbe movel #384446,%d0
api_assoc = rtems_object_api_posix_assoc;
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
4668c: 4a88 tstl %a0
4668e: 67d8 beqs 46668 <rtems_object_get_api_class_name+0x24>
return class_assoc->name;
return "BAD CLASS";
}
46690: 242e fffc movel %fp@(-4),%d2 46694: 4e5e unlk %fp
#endif
else
return "BAD API";
class_assoc = rtems_assoc_ptr_by_local( api_assoc, the_class );
if ( class_assoc )
return class_assoc->name;
46696: 2010 movel %a0@,%d0
return "BAD CLASS"; }
46698: 4e75 rts
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
else if ( the_api == OBJECTS_CLASSIC_API )
api_assoc = rtems_object_api_classic_assoc;
4669a: 203c 0005 ee80 movel #388736,%d0 466a0: 60d4 bras 46676 <rtems_object_get_api_class_name+0x32>
{
const rtems_assoc_t *api_assoc;
const rtems_assoc_t *class_assoc;
if ( the_api == OBJECTS_INTERNAL_API )
api_assoc = rtems_object_api_internal_assoc;
466a2: 203c 0005 ee68 movel #388712,%d0 466a8: 60cc bras 46676 <rtems_object_get_api_class_name+0x32>
...
0004808c <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
)
{
4808c: 4e56 0000 linkw %fp,#0 48090: 2f0a movel %a2,%sp@- 48092: 246e 0010 moveal %fp@(16),%a2 48096: 2f02 movel %d2,%sp@-
int i;
/*
* Validate parameters and look up information structure.
*/
if ( !info )
48098: 4a8a tstl %a2
4809a: 6766 beqs 48102 <rtems_object_get_class_information+0x76>
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
4809c: 2f2e 000c movel %fp@(12),%sp@- 480a0: 2f2e 0008 movel %fp@(8),%sp@- 480a4: 4eb9 0004 9dec jsr 49dec <_Objects_Get_information>
if ( !obj_info )
480aa: 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 );
480ac: 2040 moveal %d0,%a0
if ( !obj_info )
480ae: 4a80 tstl %d0
480b0: 675e beqs 48110 <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;
480b2: 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;
480b6: 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;
480b8: 2568 000a 0004 movel %a0@(10),%a2@(4)
info->auto_extend = obj_info->auto_extend; info->maximum = obj_info->maximum;
480be: 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;
480c2: 1568 0010 000c moveb %a0@(16),%a2@(12)
info->maximum = obj_info->maximum;
480c8: 2542 0008 movel %d2,%a2@(8)
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
480cc: 6750 beqs 4811e <rtems_object_get_class_information+0x92><== NEVER TAKEN
480ce: 2068 0018 moveal %a0@(24),%a0 480d2: 7201 moveq #1,%d1 480d4: 7001 moveq #1,%d0 480d6: 93c9 subal %a1,%a1 480d8: 5280 addql #1,%d0
if ( !obj_info->local_table[i] )
480da: 4ab0 1c00 tstl %a0@(00000000,%d1:l:4)
480de: 6718 beqs 480f8 <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++ )
480e0: 2200 movel %d0,%d1 480e2: b082 cmpl %d2,%d0
480e4: 63f2 blss 480d8 <rtems_object_get_class_information+0x4c><== ALWAYS TAKEN
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
480e6: 2549 000e movel %a1,%a2@(14)
return RTEMS_SUCCESSFUL;
480ea: 4280 clrl %d0
}
480ec: 242e fff8 movel %fp@(-8),%d2 480f0: 246e fffc moveal %fp@(-4),%a2 480f4: 4e5e unlk %fp 480f6: 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++;
480f8: 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++ )
480fa: 2200 movel %d0,%d1 480fc: b082 cmpl %d2,%d0
480fe: 63d8 blss 480d8 <rtems_object_get_class_information+0x4c><== NEVER TAKEN
48100: 60e4 bras 480e6 <rtems_object_get_class_information+0x5a>
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48102: 242e fff8 movel %fp@(-8),%d2
/*
* Validate parameters and look up information structure.
*/
if ( !info )
return RTEMS_INVALID_ADDRESS;
48106: 7009 moveq #9,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48108: 246e fffc moveal %fp@(-4),%a2 4810c: 4e5e unlk %fp 4810e: 4e75 rts 48110: 242e fff8 movel %fp@(-8),%d2
if ( !info )
return RTEMS_INVALID_ADDRESS;
obj_info = _Objects_Get_information( the_api, the_class );
if ( !obj_info )
return RTEMS_INVALID_NUMBER;
48114: 700a moveq #10,%d0
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
}
48116: 246e fffc moveal %fp@(-4),%a2 4811a: 4e5e unlk %fp 4811c: 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++ )
4811e: 93c9 subal %a1,%a1 <== NOT EXECUTED
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
return RTEMS_SUCCESSFUL;
48120: 4280 clrl %d0 <== NOT EXECUTED
for ( unallocated=0, i=1 ; i <= info->maximum ; i++ )
if ( !obj_info->local_table[i] )
unallocated++;
info->unallocated = unallocated;
48122: 2549 000e movel %a1,%a2@(14) <== NOT EXECUTED 48126: 60c4 bras 480ec <rtems_object_get_class_information+0x60><== NOT EXECUTED
00056a40 <rtems_partition_create>:
uint32_t length,
uint32_t buffer_size,
rtems_attribute attribute_set,
rtems_id *id
)
{
56a40: 4e56 ffe8 linkw %fp,#-24 56a44: 48d7 0c3c moveml %d2-%d5/%a2-%a3,%sp@ 56a48: 242e 0008 movel %fp@(8),%d2 56a4c: 2a2e 000c movel %fp@(12),%d5 56a50: 282e 0010 movel %fp@(16),%d4 56a54: 262e 0014 movel %fp@(20),%d3 56a58: 246e 001c moveal %fp@(28),%a2
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
56a5c: 4a82 tstl %d2
56a5e: 673a beqs 56a9a <rtems_partition_create+0x5a>
return RTEMS_INVALID_NAME;
if ( !starting_address )
56a60: 4a85 tstl %d5
56a62: 671e beqs 56a82 <rtems_partition_create+0x42>
return RTEMS_INVALID_ADDRESS;
if ( !id )
56a64: 4a8a tstl %a2
56a66: 671a beqs 56a82 <rtems_partition_create+0x42> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
56a68: 4a84 tstl %d4
56a6a: 6722 beqs 56a8e <rtems_partition_create+0x4e>
56a6c: 4a83 tstl %d3
56a6e: 671e beqs 56a8e <rtems_partition_create+0x4e>
56a70: b684 cmpl %d4,%d3
56a72: 621a bhis 56a8e <rtems_partition_create+0x4e>
*/
RTEMS_INLINE_ROUTINE bool _Partition_Is_buffer_size_aligned (
uint32_t buffer_size
)
{
return ((buffer_size % CPU_PARTITION_ALIGNMENT) == 0);
56a74: 7003 moveq #3,%d0 56a76: c083 andl %d3,%d0
56a78: 6614 bnes 56a8e <rtems_partition_create+0x4e>
)
{
#if (CPU_ALIGNMENT == 0)
return true;
#else
return (((uintptr_t)address % CPU_ALIGNMENT) == 0);
56a7a: 103c 0003 moveb #3,%d0 56a7e: c085 andl %d5,%d0
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
if ( !_Addresses_Is_aligned( starting_address ) )
56a80: 6724 beqs 56aa6 <rtems_partition_create+0x66>
return RTEMS_INVALID_ADDRESS;
56a82: 7009 moveq #9,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56a84: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a8a: 4e5e unlk %fp 56a8c: 4e75 rts
if ( !id )
return RTEMS_INVALID_ADDRESS;
if ( length == 0 || buffer_size == 0 || length < buffer_size ||
!_Partition_Is_buffer_size_aligned( buffer_size ) )
return RTEMS_INVALID_SIZE;
56a8e: 7008 moveq #8,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56a90: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56a96: 4e5e unlk %fp 56a98: 4e75 rts
)
{
register Partition_Control *the_partition;
if ( !rtems_is_name_valid( name ) )
return RTEMS_INVALID_NAME;
56a9a: 7003 moveq #3,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56a9c: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56aa2: 4e5e unlk %fp 56aa4: 4e75 rts 56aa6: 2039 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d0 56aac: 5280 addql #1,%d0 56aae: 23c0 0007 eac0 movel %d0,7eac0 <_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 );
56ab4: 4879 0007 e952 pea 7e952 <_Partition_Information> 56aba: 4eb9 0005 b744 jsr 5b744 <_Objects_Allocate>
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
56ac0: 588f addql #4,%sp 56ac2: 2640 moveal %d0,%a3 56ac4: 4a80 tstl %d0
56ac6: 6758 beqs 56b20 <rtems_partition_create+0xe0>
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
the_partition->length = length;
56ac8: 2744 0014 movel %d4,%a3@(20)
the_partition->buffer_size = buffer_size; the_partition->attribute_set = attribute_set;
56acc: 276e 0018 001c movel %fp@(24),%a3@(28)
the_partition->number_of_used_blocks = 0;
_Chain_Initialize( &the_partition->Memory, starting_address,
56ad2: 4c43 4004 remul %d3,%d4,%d4
_Thread_Enable_dispatch();
return RTEMS_TOO_MANY;
}
#endif
the_partition->starting_address = starting_address;
56ad6: 2745 0010 movel %d5,%a3@(16)
the_partition->length = length; the_partition->buffer_size = buffer_size;
56ada: 2743 0018 movel %d3,%a3@(24)
the_partition->attribute_set = attribute_set; the_partition->number_of_used_blocks = 0;
56ade: 42ab 0020 clrl %a3@(32)
_Chain_Initialize( &the_partition->Memory, starting_address,
56ae2: 2f03 movel %d3,%sp@- 56ae4: 2f04 movel %d4,%sp@- 56ae6: 2f05 movel %d5,%sp@- 56ae8: 486b 0024 pea %a3@(36) 56aec: 4eb9 0005 9fac jsr 59fac <_Chain_Initialize>
Objects_Name name
)
{
_Objects_Set_local_object(
information,
_Objects_Get_index( the_object->id ),
56af2: 202b 0008 movel %a3@(8),%d0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56af6: 4281 clrl %d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56af8: 2079 0007 e96a moveal 7e96a <_Partition_Information+0x18>,%a0
Objects_Information *information,
Objects_Control *the_object,
Objects_Name name
)
{
_Objects_Set_local_object(
56afe: 3200 movew %d0,%d1
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return;
#endif
information->local_table[ index ] = the_object;
56b00: 218b 1c00 movel %a3,%a0@(00000000,%d1:l:4)
information,
_Objects_Get_index( the_object->id ),
the_object
);
the_object->name = name;
56b04: 2742 000c movel %d2,%a3@(12)
&_Partition_Information,
&the_partition->Object,
(Objects_Name) name
);
*id = the_partition->Object.id;
56b08: 2480 movel %d0,%a2@
name,
0 /* Not used */
);
#endif
_Thread_Enable_dispatch();
56b0a: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
56b10: 4fef 0010 lea %sp@(16),%sp 56b14: 4280 clrl %d0
}
56b16: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b1c: 4e5e unlk %fp 56b1e: 4e75 rts
_Thread_Disable_dispatch(); /* prevents deletion */
the_partition = _Partition_Allocate();
if ( !the_partition ) {
_Thread_Enable_dispatch();
56b20: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_TOO_MANY;
56b26: 7005 moveq #5,%d0
);
#endif
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
56b28: 4cee 0c3c ffe8 moveml %fp@(-24),%d2-%d5/%a2-%a3 56b2e: 4e5e unlk %fp
...
00056ba4 <rtems_partition_get_buffer>:
rtems_status_code rtems_partition_get_buffer(
rtems_id id,
void **buffer
)
{
56ba4: 4e56 fff0 linkw %fp,#-16 56ba8: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 56bac: 246e 000c moveal %fp@(12),%a2
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
56bb0: 4a8a tstl %a2
56bb2: 6754 beqs 56c08 <rtems_partition_get_buffer+0x64><== NEVER TAKEN
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
56bb4: 486e fffc pea %fp@(-4) 56bb8: 2f2e 0008 movel %fp@(8),%sp@- 56bbc: 4879 0007 e952 pea 7e952 <_Partition_Information> 56bc2: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get>
return RTEMS_INVALID_ADDRESS;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56bc8: 4fef 000c lea %sp@(12),%sp 56bcc: 2640 moveal %d0,%a3 56bce: 4aae fffc tstl %fp@(-4)
56bd2: 6628 bnes 56bfc <rtems_partition_get_buffer+0x58>
*/
RTEMS_INLINE_ROUTINE void *_Partition_Allocate_buffer (
Partition_Control *the_partition
)
{
return _Chain_Get( &the_partition->Memory );
56bd4: 486b 0024 pea %a3@(36) 56bd8: 4eb9 0005 9f70 jsr 59f70 <_Chain_Get>
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
56bde: 588f addql #4,%sp 56be0: 2400 movel %d0,%d2
56be2: 6730 beqs 56c14 <rtems_partition_get_buffer+0x70>
the_partition->number_of_used_blocks += 1;
56be4: 52ab 0020 addql #1,%a3@(32)
_Thread_Enable_dispatch();
56be8: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
56bee: 4280 clrl %d0
case OBJECTS_LOCAL:
the_buffer = _Partition_Allocate_buffer( the_partition );
if ( the_buffer ) {
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
56bf0: 2482 movel %d2,%a2@
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56bf2: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56bf8: 4e5e unlk %fp 56bfa: 4e75 rts
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
56bfc: 7004 moveq #4,%d0
}
56bfe: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c04: 4e5e unlk %fp 56c06: 4e75 rts
register Partition_Control *the_partition;
Objects_Locations location;
void *the_buffer;
if ( !buffer )
return RTEMS_INVALID_ADDRESS;
56c08: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56c0a: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c10: 4e5e unlk %fp 56c12: 4e75 rts
the_partition->number_of_used_blocks += 1;
_Thread_Enable_dispatch();
*buffer = the_buffer;
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56c14: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_UNSATISFIED;
56c1a: 700d moveq #13,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56c1c: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 56c22: 4e5e unlk %fp
...
00056c54 <rtems_partition_return_buffer>:
rtems_status_code rtems_partition_return_buffer(
rtems_id id,
void *buffer
)
{
56c54: 4e56 fffc linkw %fp,#-4 56c58: 2f0a movel %a2,%sp@- 56c5a: 2f02 movel %d2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Partition_Control *)
_Objects_Get( &_Partition_Information, id, location );
56c5c: 486e fffc pea %fp@(-4) 56c60: 2f2e 0008 movel %fp@(8),%sp@- 56c64: 4879 0007 e952 pea 7e952 <_Partition_Information> 56c6a: 242e 000c movel %fp@(12),%d2 56c6e: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get>
register Partition_Control *the_partition;
Objects_Locations location;
the_partition = _Partition_Get( id, &location );
switch ( location ) {
56c74: 4fef 000c lea %sp@(12),%sp 56c78: 2440 moveal %d0,%a2 56c7a: 4aae fffc tstl %fp@(-4)
56c7e: 670e beqs 56c8e <rtems_partition_return_buffer+0x3a>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56c80: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
56c84: 7004 moveq #4,%d0
}
56c86: 246e fff8 moveal %fp@(-8),%a2 56c8a: 4e5e unlk %fp 56c8c: 4e75 rts
)
{
void *starting;
void *ending;
starting = the_partition->starting_address;
56c8e: 202a 0010 movel %a2@(16),%d0
ending = _Addresses_Add_offset( starting, the_partition->length );
56c92: 222a 0014 movel %a2@(20),%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56c96: b082 cmpl %d2,%d0
56c98: 623c bhis 56cd6 <rtems_partition_return_buffer+0x82>
RTEMS_INLINE_ROUTINE void *_Addresses_Add_offset (
const void *base,
uintptr_t offset
)
{
return (void *)((uintptr_t)base + offset);
56c9a: d280 addl %d0,%d1
const void *address,
const void *base,
const void *limit
)
{
return (address >= base && address <= limit);
56c9c: b282 cmpl %d2,%d1
56c9e: 6536 bcss 56cd6 <rtems_partition_return_buffer+0x82><== NEVER TAKEN
RTEMS_INLINE_ROUTINE int32_t _Addresses_Subtract (
const void *left,
const void *right
)
{
return (int32_t) ((const char *) left - (const char *) right);
56ca0: 2202 movel %d2,%d1 56ca2: 9280 subl %d0,%d1 56ca4: 2001 movel %d1,%d0
offset = (uint32_t) _Addresses_Subtract(
the_buffer,
the_partition->starting_address
);
return ((offset % the_partition->buffer_size) == 0);
56ca6: 4c6a 0001 0018 remul %a2@(24),%d1,%d0
starting = the_partition->starting_address;
ending = _Addresses_Add_offset( starting, the_partition->length );
return (
_Addresses_Is_in_range( the_buffer, starting, ending ) &&
56cac: 4a81 tstl %d1
56cae: 6626 bnes 56cd6 <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 );
56cb0: 2f02 movel %d2,%sp@- 56cb2: 486a 0024 pea %a2@(36) 56cb6: 4eb9 0005 9f10 jsr 59f10 <_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;
56cbc: 53aa 0020 subql #1,%a2@(32)
_Thread_Enable_dispatch();
56cc0: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56cc6: 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;
56cca: 508f addql #8,%sp 56ccc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56cce: 246e fff8 moveal %fp@(-8),%a2 56cd2: 4e5e unlk %fp 56cd4: 4e75 rts
_Partition_Free_buffer( the_partition, buffer );
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
56cd6: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56cdc: 242e fff4 movel %fp@(-12),%d2
the_partition->number_of_used_blocks -= 1;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
56ce0: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
56ce2: 246e fff8 moveal %fp@(-8),%a2 56ce6: 4e5e unlk %fp
...
0004266c <rtems_print_buffer>:
void rtems_print_buffer(
const unsigned char *buffer,
int length
)
{
4266c: 4e56 ff60 linkw %fp,#-160 42670: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 42674: 2e2e 000c movel %fp@(12),%d7
int i, mod, max;
if ( !length ) return;
42678: 6700 00d2 beqw 4274c <rtems_print_buffer+0xe0>
mod = length % 16;
4267c: 2a07 movel %d7,%d5 4267e: 0285 8000 000f andil #-2147483633,%d5 42684: 6d00 01ca bltw 42850 <rtems_print_buffer+0x1e4> 42688: 2c05 movel %d5,%d6
max = length - mod;
4268a: 9e85 subl %d5,%d7
for ( i=0 ; i<max ; i+=16 )
4268c: 4a87 tstl %d7 4268e: 6f00 00b8 blew 42748 <rtems_print_buffer+0xdc> 42692: 262e 0008 movel %fp@(8),%d3 42696: 4284 clrl %d4 42698: 45ee ff88 lea %fp@(-120),%a2 4269c: 49f9 0005 006c lea 5006c <sprintf>,%a4 426a2: 4bf9 0005 0788 lea 50788 <strlen>,%a5
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
426a8: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
426aa: 4282 clrl %d2
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
426ac: 4201 clrb %d1 426ae: 1d41 ff88 moveb %d1,%fp@(-120)
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
426b2: 4280 clrl %d0 426b4: 101b moveb %a3@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
426b6: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
426b8: 2f00 movel %d0,%sp@- 426ba: 2f0a movel %a2,%sp@- 426bc: 4879 0005 d804 pea 5d804 <IntUartPollCallbacks.6236+0x20> 426c2: 2f0a movel %a2,%sp@- 426c4: 4e94 jsr %a4@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
426c6: 4fef 0010 lea %sp@(16),%sp 426ca: 7010 moveq #16,%d0 426cc: b082 cmpl %d2,%d0
426ce: 66e2 bnes 426b2 <rtems_print_buffer+0x46>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
426d0: 2f0a movel %a2,%sp@- 426d2: 2643 moveal %d3,%a3
for( i=0 ; i<length ; i++ )
426d4: 4282 clrl %d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
426d6: 4e95 jsr %a5@ 426d8: 588f addql #4,%sp 426da: 323c 7c00 movew #31744,%d1 426de: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
426e2: 4280 clrl %d0 426e4: 101b moveb %a3@+,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
426e6: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
426e8: 2040 moveal %d0,%a0 426ea: 2279 0005 ee0c moveal 5ee0c <__ctype_ptr__>,%a1 426f0: 1031 8801 moveb %a1@(00000001,%a0:l),%d0 426f4: 49c0 extbl %d0 426f6: 0280 0000 0097 andil #151,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
426fc: 6702 beqs 42700 <rtems_print_buffer+0x94>
426fe: 2208 movel %a0,%d1 42700: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42702: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
42704: 2f0a movel %a2,%sp@- 42706: 4879 0005 d80c pea 5d80c <IntUartPollCallbacks.6236+0x28> 4270c: 2f0a movel %a2,%sp@- 4270e: 4e94 jsr %a4@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42710: 4fef 0010 lea %sp@(16),%sp 42714: 7210 moveq #16,%d1 42716: b282 cmpl %d2,%d1
42718: 66c8 bnes 426e2 <rtems_print_buffer+0x76>
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
4271a: 2f0a movel %a2,%sp@-
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
4271c: 0684 0000 0010 addil #16,%d4
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
42722: 4e95 jsr %a5@
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
42724: 0683 0000 0010 addil #16,%d3
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
4272a: 41f2 0800 lea %a2@(00000000,%d0:l),%a0 4272e: 4200 clrb %d0 42730: 30bc 7c0a movew #31754,%a0@ 42734: 1140 0002 moveb %d0,%a0@(2)
printk( line_buffer );
42738: 2e8a movel %a2,%sp@ 4273a: 4eb9 0004 4764 jsr 44764 <printk>
mod = length % 16;
max = length - mod;
for ( i=0 ; i<max ; i+=16 )
42740: 588f addql #4,%sp 42742: b887 cmpl %d7,%d4 42744: 6d00 ff62 bltw 426a8 <rtems_print_buffer+0x3c>
Dump_Line( &buffer[ i ], 16 );
if ( mod )
42748: 4a85 tstl %d5
4274a: 660a bnes 42756 <rtems_print_buffer+0xea>
Dump_Line( &buffer[ max ], mod );
}
4274c: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 42752: 4e5e unlk %fp 42754: 4e75 rts
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
42756: 266e 0008 moveal %fp@(8),%a3 4275a: d7c7 addal %d7,%a3
{
int i;
char line_buffer[120];
line_buffer[0] = '\0';
4275c: 4200 clrb %d0 4275e: 1d40 ff88 moveb %d0,%fp@(-120)
for( i=0 ; i<length ; i++ )
42762: 4a85 tstl %d5 42764: 6f00 0110 blew 42876 <rtems_print_buffer+0x20a> 42768: 2a4b moveal %a3,%a5 4276a: 4282 clrl %d2 4276c: 45ee ff88 lea %fp@(-120),%a2 42770: 49f9 0005 006c lea 5006c <sprintf>,%a4
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
42776: 4280 clrl %d0 42778: 101d moveb %a5@+,%d0
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4277a: 5282 addql #1,%d2
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
4277c: 2f00 movel %d0,%sp@- 4277e: 2f0a movel %a2,%sp@- 42780: 4879 0005 d804 pea 5d804 <IntUartPollCallbacks.6236+0x20> 42786: 2f0a movel %a2,%sp@- 42788: 4e94 jsr %a4@
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
4278a: 4fef 0010 lea %sp@(16),%sp 4278e: b485 cmpl %d5,%d2
42790: 6de4 blts 42776 <rtems_print_buffer+0x10a>
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42792: 720f moveq #15,%d1 42794: b285 cmpl %d5,%d1 42796: 6d00 0108 bltw 428a0 <rtems_print_buffer+0x234> 4279a: 2405 movel %d5,%d2 4279c: 4bf9 0005 0788 lea 50788 <strlen>,%a5
strcat( line_buffer, " " );
427a2: 2f0a movel %a2,%sp@-
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
427a4: 5282 addql #1,%d2
strcat( line_buffer, " " );
427a6: 4e95 jsr %a5@ 427a8: 588f addql #4,%sp 427aa: 223c 2020 2000 movel #538976256,%d1 427b0: 2581 0800 movel %d1,%a2@(00000000,%d0:l)
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
427b4: 700f moveq #15,%d0 427b6: b082 cmpl %d2,%d0
427b8: 6ce8 bges 427a2 <rtems_print_buffer+0x136>
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
427ba: 2f0a movel %a2,%sp@- 427bc: 49f9 0005 006c lea 5006c <sprintf>,%a4 427c2: 4eb9 0005 0788 jsr 50788 <strlen> 427c8: 588f addql #4,%sp 427ca: 323c 7c00 movew #31744,%d1 427ce: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
for( i=0 ; i<length ; i++ )
427d2: 4a85 tstl %d5 427d4: 6f00 0086 blew 4285c <rtems_print_buffer+0x1f0> 427d8: 4282 clrl %d2
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
427da: 4283 clrl %d3 427dc: 161b moveb %a3@+,%d3
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
427de: 722e moveq #46,%d1
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
427e0: 2079 0005 ee0c moveal 5ee0c <__ctype_ptr__>,%a0 427e6: 1030 3801 moveb %a0@(00000001,%d3:l),%d0 427ea: 49c0 extbl %d0 427ec: 0280 0000 0097 andil #151,%d0
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
427f2: 6702 beqs 427f6 <rtems_print_buffer+0x18a>
427f4: 2203 movel %d3,%d1 427f6: 2f01 movel %d1,%sp@-
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
427f8: 5282 addql #1,%d2
sprintf( line_buffer, "%s%c", line_buffer,
427fa: 2f0a movel %a2,%sp@- 427fc: 4879 0005 d80c pea 5d80c <IntUartPollCallbacks.6236+0x28> 42802: 2f0a movel %a2,%sp@- 42804: 4e94 jsr %a4@
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
42806: 4fef 0010 lea %sp@(16),%sp 4280a: b485 cmpl %d5,%d2
4280c: 6dcc blts 427da <rtems_print_buffer+0x16e>
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
4280e: 700f moveq #15,%d0 42810: b085 cmpl %d5,%d0
42812: 6d16 blts 4282a <rtems_print_buffer+0x1be> <== NEVER TAKEN
strcat( line_buffer, " " );
42814: 2f0a movel %a2,%sp@-
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
42816: 5286 addql #1,%d6
strcat( line_buffer, " " );
42818: 4e95 jsr %a5@ 4281a: 588f addql #4,%sp 4281c: 323c 2000 movew #8192,%d1 42820: 3581 0800 movew %d1,%a2@(00000000,%d0:l)
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
42824: 700f moveq #15,%d0 42826: b086 cmpl %d6,%d0
42828: 6cea bges 42814 <rtems_print_buffer+0x1a8>
strcat( line_buffer, " " );
strcat( line_buffer, "|\n" );
4282a: 2f0a movel %a2,%sp@- 4282c: 4e95 jsr %a5@ 4282e: 4201 clrb %d1 42830: 41f2 0800 lea %a2@(00000000,%d0:l),%a0 42834: 30bc 7c0a movew #31754,%a0@ 42838: 1141 0002 moveb %d1,%a0@(2)
printk( line_buffer );
4283c: 2e8a movel %a2,%sp@ 4283e: 4eb9 0004 4764 jsr 44764 <printk> 42844: 588f addql #4,%sp
for ( i=0 ; i<max ; i+=16 )
Dump_Line( &buffer[ i ], 16 );
if ( mod )
Dump_Line( &buffer[ max ], mod );
}
42846: 4cee 3cfc ff60 moveml %fp@(-160),%d2-%d7/%a2-%a5 4284c: 4e5e unlk %fp 4284e: 4e75 rts
int i, mod, max;
if ( !length ) return;
mod = length % 16;
42850: 5385 subql #1,%d5 <== NOT EXECUTED 42852: 70f0 moveq #-16,%d0 <== NOT EXECUTED 42854: 8a80 orl %d0,%d5 <== NOT EXECUTED 42856: 5285 addql #1,%d5 <== NOT EXECUTED 42858: 6000 fe2e braw 42688 <rtems_print_buffer+0x1c> <== NOT EXECUTED
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
4285c: 2f0a movel %a2,%sp@- <== NOT EXECUTED
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
4285e: 4286 clrl %d6 <== NOT EXECUTED
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
42860: 5286 addql #1,%d6 <== NOT EXECUTED
strcat( line_buffer, " " );
42862: 4e95 jsr %a5@ <== NOT EXECUTED 42864: 588f addql #4,%sp <== NOT EXECUTED 42866: 323c 2000 movew #8192,%d1 <== NOT EXECUTED 4286a: 3581 0800 movew %d1,%a2@(00000000,%d0:l) <== NOT EXECUTED
strcat( line_buffer, "|" );
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%c", line_buffer,
isprint( buffer[ i ] ) ? buffer[ i ] : '.' );
for( ; i<16 ; i++ )
4286e: 700f moveq #15,%d0 <== NOT EXECUTED 42870: b086 cmpl %d6,%d0 <== NOT EXECUTED 42872: 6ca0 bges 42814 <rtems_print_buffer+0x1a8> <== NOT EXECUTED 42874: 60b4 bras 4282a <rtems_print_buffer+0x1be> <== NOT EXECUTED 42876: 45ee ff88 lea %fp@(-120),%a2 <== NOT EXECUTED 4287a: 4bf9 0005 0788 lea 50788 <strlen>,%a5 <== NOT EXECUTED
int i;
char line_buffer[120];
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
42880: 4282 clrl %d2 <== NOT EXECUTED
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42882: 5282 addql #1,%d2 <== NOT EXECUTED
strcat( line_buffer, " " );
42884: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42886: 4e95 jsr %a5@ <== NOT EXECUTED 42888: 588f addql #4,%sp <== NOT EXECUTED 4288a: 223c 2020 2000 movel #538976256,%d1 <== NOT EXECUTED 42890: 2581 0800 movel %d1,%a2@(00000000,%d0:l) <== NOT EXECUTED
line_buffer[0] = '\0';
for( i=0 ; i<length ; i++ )
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
42894: 700f moveq #15,%d0 <== NOT EXECUTED 42896: b082 cmpl %d2,%d0 <== NOT EXECUTED 42898: 6c00 ff08 bgew 427a2 <rtems_print_buffer+0x136> <== NOT EXECUTED 4289c: 6000 ff1c braw 427ba <rtems_print_buffer+0x14e> <== NOT EXECUTED
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
428a0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 428a2: 4bf9 0005 0788 lea 50788 <strlen>,%a5 <== NOT EXECUTED
for( i=0 ; i<length ; i++ )
428a8: 4282 clrl %d2 <== NOT EXECUTED
sprintf( line_buffer, "%s%02x ", line_buffer, buffer[ i ] );
for( ; i<16 ; i++ )
strcat( line_buffer, " " );
strcat( line_buffer, "|" );
428aa: 4e95 jsr %a5@ <== NOT EXECUTED 428ac: 588f addql #4,%sp <== NOT EXECUTED 428ae: 323c 7c00 movew #31744,%d1 <== NOT EXECUTED 428b2: 3581 0800 movew %d1,%a2@(00000000,%d0:l) <== NOT EXECUTED 428b6: 6000 ff22 braw 427da <rtems_print_buffer+0x16e> <== NOT EXECUTED
...
000476e0 <rtems_rate_monotonic_period>:
rtems_status_code rtems_rate_monotonic_period(
rtems_id id,
rtems_interval length
)
{
476e0: 4e56 ffec linkw %fp,#-20 476e4: 48d7 040c moveml %d2-%d3/%a2,%sp@
Objects_Id id,
Objects_Locations *location
)
{
return (Rate_monotonic_Control *)
_Objects_Get( &_Rate_monotonic_Information, id, location );
476e8: 486e fffc pea %fp@(-4) 476ec: 242e 0008 movel %fp@(8),%d2 476f0: 2f02 movel %d2,%sp@- 476f2: 4879 0006 1b1c pea 61b1c <_Rate_monotonic_Information> 476f8: 4eb9 0004 9b08 jsr 49b08 <_Objects_Get>
rtems_rate_monotonic_period_states local_state;
ISR_Level level;
the_period = _Rate_monotonic_Get( id, &location );
switch ( location ) {
476fe: 4fef 000c lea %sp@(12),%sp 47702: 2440 moveal %d0,%a2 47704: 4aae fffc tstl %fp@(-4)
47708: 661e bnes 47728 <rtems_rate_monotonic_period+0x48>
case OBJECTS_LOCAL:
if ( !_Thread_Is_executing( the_period->owner ) ) {
4770a: 2039 0006 20a8 movel 620a8 <_Per_CPU_Information+0xc>,%d0 47710: b0aa 0040 cmpl %a2@(64),%d0
47714: 671e beqs 47734 <rtems_rate_monotonic_period+0x54>
_Thread_Enable_dispatch();
47716: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return RTEMS_NOT_OWNER_OF_RESOURCE;
4771c: 7017 moveq #23,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4771e: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47724: 4e5e unlk %fp 47726: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
47728: 7004 moveq #4,%d0
}
4772a: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47730: 4e5e unlk %fp 47732: 4e75 rts
if ( !_Thread_Is_executing( the_period->owner ) ) {
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
47734: 4aae 000c tstl %fp@(12) 47738: 6700 00ce beqw 47808 <rtems_rate_monotonic_period+0x128>
}
_Thread_Enable_dispatch();
return( return_value );
}
_ISR_Disable( level );
4773c: 203c 0000 0700 movel #1792,%d0 47742: 40c3 movew %sr,%d3 47744: 8083 orl %d3,%d0 47746: 46c0 movew %d0,%sr
switch ( the_period->state ) {
47748: 202a 0038 movel %a2@(56),%d0 4774c: 7202 moveq #2,%d1 4774e: b280 cmpl %d0,%d1 47750: 6700 00e4 beqw 47836 <rtems_rate_monotonic_period+0x156> 47754: 123c 0004 moveb #4,%d1 47758: b280 cmpl %d0,%d1
4775a: 6762 beqs 477be <rtems_rate_monotonic_period+0xde>
4775c: 4a80 tstl %d0
4775e: 66c8 bnes 47728 <rtems_rate_monotonic_period+0x48><== NEVER TAKEN
case RATE_MONOTONIC_INACTIVE: {
_ISR_Enable( level );
47760: 46c3 movew %d3,%sr
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
47762: 2f0a movel %a2,%sp@- 47764: 2d40 fff8 movel %d0,%fp@(-8) 47768: 4eb9 0004 7548 jsr 47548 <_Rate_monotonic_Initiate_statistics>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4776e: 223c 0004 7b44 movel #293700,%d1
the_watchdog->id = id;
47774: 2542 0030 movel %d2,%a2@(48)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
47778: 242e 000c movel %fp@(12),%d2
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
4777c: 2541 002c movel %d1,%a2@(44)
/*
* Baseline statistics information for the beginning of a period.
*/
_Rate_monotonic_Initiate_statistics( the_period );
the_period->state = RATE_MONOTONIC_ACTIVE;
47780: 7202 moveq #2,%d1
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
47782: 42aa 0018 clrl %a2@(24) 47786: 2541 0038 movel %d1,%a2@(56)
the_watchdog->routine = routine; the_watchdog->id = id; the_watchdog->user_data = user_data;
4778a: 42aa 0034 clrl %a2@(52)
_Rate_monotonic_Timeout,
id,
NULL
);
the_period->next_length = length;
4778e: 2542 003c movel %d2,%a2@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
47792: 2542 001c movel %d2,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
47796: 486a 0010 pea %a2@(16) 4779a: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 477a0: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
477a6: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
477ac: 202e fff8 movel %fp@(-8),%d0 477b0: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477b4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 477ba: 4e5e unlk %fp 477bc: 4e75 rts
case RATE_MONOTONIC_EXPIRED:
/*
* Update statistics from the concluding period
*/
_Rate_monotonic_Update_statistics( the_period );
477be: 2f0a movel %a2,%sp@- 477c0: 4eb9 0004 75c6 jsr 475c6 <_Rate_monotonic_Update_statistics>
_ISR_Enable( level );
477c6: 46c3 movew %d3,%sr
the_period->state = RATE_MONOTONIC_ACTIVE;
477c8: 7402 moveq #2,%d2
the_period->next_length = length;
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
return RTEMS_TIMEOUT;
477ca: 7006 moveq #6,%d0
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
the_period->next_length = length;
477cc: 222e 000c movel %fp@(12),%d1
*/
_Rate_monotonic_Update_statistics( the_period );
_ISR_Enable( level );
the_period->state = RATE_MONOTONIC_ACTIVE;
477d0: 2542 0038 movel %d2,%a2@(56)
the_period->next_length = length;
477d4: 2541 003c movel %d1,%a2@(60)
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
477d8: 2541 001c movel %d1,%a2@(28)
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
477dc: 486a 0010 pea %a2@(16) 477e0: 4879 0006 1cda pea 61cda <_Watchdog_Ticks_chain> 477e6: 2d40 fff8 movel %d0,%fp@(-8) 477ea: 4eb9 0004 b714 jsr 4b714 <_Watchdog_Insert>
_Watchdog_Insert_ticks( &the_period->Timer, length );
_Thread_Enable_dispatch();
477f0: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return RTEMS_TIMEOUT;
477f6: 202e fff8 movel %fp@(-8),%d0 477fa: 4fef 000c lea %sp@(12),%sp
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477fe: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47804: 4e5e unlk %fp 47806: 4e75 rts
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
47808: 202a 0038 movel %a2@(56),%d0 4780c: 7204 moveq #4,%d1 4780e: b280 cmpl %d0,%d1 47810: 6500 00a4 bcsw 478b6 <rtems_rate_monotonic_period+0x1d6> 47814: 41f9 0005 f2ba lea 5f2ba <CSWTCH.2>,%a0 4781a: 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();
4781e: 2d40 fff8 movel %d0,%fp@(-8) 47822: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return( return_value );
47828: 202e fff8 movel %fp@(-8),%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4782c: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47832: 4e5e unlk %fp 47834: 4e75 rts
case RATE_MONOTONIC_ACTIVE:
/*
* Update statistics from the concluding period.
*/
_Rate_monotonic_Update_statistics( the_period );
47836: 2f0a movel %a2,%sp@- 47838: 4eb9 0004 75c6 jsr 475c6 <_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;
4783e: 222e 000c movel %fp@(12),%d1
/*
* 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;
47842: 7001 moveq #1,%d0
the_period->next_length = length;
47844: 2541 003c movel %d1,%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;
47848: 2540 0038 movel %d0,%a2@(56)
the_period->next_length = length;
_ISR_Enable( level );
4784c: 46c3 movew %d3,%sr
_Thread_Executing->Wait.id = the_period->Object.id;
4784e: 2079 0006 20a8 moveal 620a8 <_Per_CPU_Information+0xc>,%a0 47854: 216a 0008 0020 movel %a2@(8),%a0@(32)
_Thread_Set_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
4785a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4785e: 2f08 movel %a0,%sp@- 47860: 4eb9 0004 add8 jsr 4add8 <_Thread_Set_state>
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
47866: 203c 0000 0700 movel #1792,%d0 4786c: 40c1 movew %sr,%d1 4786e: 8081 orl %d1,%d0 47870: 46c0 movew %d0,%sr
local_state = the_period->state;
the_period->state = RATE_MONOTONIC_ACTIVE;
47872: 7402 moveq #2,%d2
/*
* Did the watchdog timer expire while we were actually blocking
* on it?
*/
_ISR_Disable( level );
local_state = the_period->state;
47874: 202a 0038 movel %a2@(56),%d0
the_period->state = RATE_MONOTONIC_ACTIVE;
47878: 2542 0038 movel %d2,%a2@(56)
_ISR_Enable( level );
4787c: 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 )
4787e: 7203 moveq #3,%d1 47880: 4fef 000c lea %sp@(12),%sp 47884: b280 cmpl %d0,%d1
47886: 6712 beqs 4789a <rtems_rate_monotonic_period+0x1ba>
_Thread_Clear_state( _Thread_Executing, STATES_WAITING_FOR_PERIOD );
_Thread_Enable_dispatch();
47888: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4788e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47890: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 47896: 4e5e unlk %fp 47898: 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 );
4789a: 4878 4000 pea 4000 <D_MAX_EXP+0x3801> 4789e: 2f39 0006 20a8 movel 620a8 <_Per_CPU_Information+0xc>,%sp@- 478a4: 4eb9 0004 a02c jsr 4a02c <_Thread_Clear_state> 478aa: 508f addql #8,%sp
_Thread_Enable_dispatch();
478ac: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
478b2: 4280 clrl %d0 478b4: 60da bras 47890 <rtems_rate_monotonic_period+0x1b0>
_Thread_Enable_dispatch();
return RTEMS_NOT_OWNER_OF_RESOURCE;
}
if ( length == RTEMS_PERIOD_STATUS ) {
switch ( the_period->state ) {
478b6: 4280 clrl %d0 <== NOT EXECUTED
case RATE_MONOTONIC_ACTIVE:
default: /* unreached -- only to remove warnings */
return_value = RTEMS_SUCCESSFUL;
break;
}
_Thread_Enable_dispatch();
478b8: 2d40 fff8 movel %d0,%fp@(-8) <== NOT EXECUTED 478bc: 4eb9 0004 a412 jsr 4a412 <_Thread_Enable_dispatch> <== NOT EXECUTED
return( return_value );
478c2: 202e fff8 movel %fp@(-8),%d0 <== NOT EXECUTED 478c6: 6000 ff64 braw 4782c <rtems_rate_monotonic_period+0x14c><== NOT EXECUTED
...
000478cc <rtems_rate_monotonic_report_statistics_with_plugin>:
*/
void rtems_rate_monotonic_report_statistics_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
478cc: 4e56 ff78 linkw %fp,#-136 478d0: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 478d4: 262e 0008 movel %fp@(8),%d3 478d8: 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 )
478dc: 4a8a tstl %a2 478de: 6700 0082 beqw 47962 <rtems_rate_monotonic_report_statistics_with_plugin+0x96>
return;
(*print)( context, "Period information by period\n" );
478e2: 4879 0005 f2ce pea 5f2ce <CSWTCH.2+0x14> 478e8: 2f03 movel %d3,%sp@- 478ea: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)( context, "--- CPU times are in seconds ---\n" );
478ec: 4879 0005 f2ec pea 5f2ec <CSWTCH.2+0x32> 478f2: 2f03 movel %d3,%sp@- 478f4: 4e92 jsr %a2@
(*print)( context, "--- Wall times are in seconds ---\n" );
478f6: 4879 0005 f30e pea 5f30e <CSWTCH.2+0x54> 478fc: 2f03 movel %d3,%sp@- 478fe: 4e92 jsr %a2@
Be sure to test the various cases. (*print)( context,"\ 1234567890123456789012345678901234567890123456789012345678901234567890123456789\ \n"); */ (*print)( context, " ID OWNER COUNT MISSED "
47900: 4879 0005 f331 pea 5f331 <CSWTCH.2+0x77> 47906: 2f03 movel %d3,%sp@- 47908: 4e92 jsr %a2@
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
" "
#endif
" WALL TIME\n"
);
(*print)( context, " "
4790a: 4fef 001c lea %sp@(28),%sp 4790e: 2ebc 0005 f37c movel #390012,%sp@ 47914: 2f03 movel %d3,%sp@- 47916: 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 ;
47918: 2439 0006 1b22 movel 61b22 <_Rate_monotonic_Information+0x6>,%d2 4791e: 508f addql #8,%sp 47920: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2
47926: 623a bhis 47962 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NEVER TAKEN
47928: 280e movel %fp,%d4
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
4792a: 2a0e movel %fp,%d5 4792c: 0684 ffff ffa2 addil #-94,%d4 47932: 47f9 0004 de00 lea 4de00 <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 );
47938: 4bf9 0004 dec0 lea 4dec0 <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 );
4793e: 5b85 subql #5,%d5 47940: 49f9 0004 7c24 lea 47c24 <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 );
47946: 2e3c 0004 b314 movel #307988,%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 );
4794c: 2f04 movel %d4,%sp@- 4794e: 2f02 movel %d2,%sp@- 47950: 4e93 jsr %a3@
if ( status != RTEMS_SUCCESSFUL )
47952: 508f addql #8,%sp 47954: 4a80 tstl %d0
47956: 6714 beqs 4796c <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++ ) {
47958: 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 ;
4795a: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2
47960: 63ea blss 4794c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
the_stats.min_wall_time, the_stats.max_wall_time, ival_wall, fval_wall
);
#endif
}
}
}
47962: 4cee 3cfc ff78 moveml %fp@(-136),%d2-%d7/%a2-%a5 47968: 4e5e unlk %fp 4796a: 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 );
4796c: 486e ffda pea %fp@(-38) 47970: 2f02 movel %d2,%sp@- 47972: 4e95 jsr %a5@
#if defined(RTEMS_DEBUG)
if ( status != RTEMS_SUCCESSFUL )
continue;
#endif
rtems_object_get_name( the_status.owner, sizeof(name), name );
47974: 2f05 movel %d5,%sp@- 47976: 4878 0005 pea 5 <COMPARE> 4797a: 2f2e ffda movel %fp@(-38),%sp@- 4797e: 4e94 jsr %a4@
/*
* Print part of report line that is not dependent on granularity
*/
(*print)( context,
47980: 2f2e ffa6 movel %fp@(-90),%sp@- 47984: 2f2e ffa2 movel %fp@(-94),%sp@- 47988: 2f05 movel %d5,%sp@- 4798a: 2f02 movel %d2,%sp@- 4798c: 4879 0005 f3c8 pea 5f3c8 <CSWTCH.2+0x10e> 47992: 2f03 movel %d3,%sp@- 47994: 4e92 jsr %a2@
);
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
47996: 202e ffa2 movel %fp@(-94),%d0 4799a: 4fef 002c lea %sp@(44),%sp
4799e: 6618 bnes 479b8 <rtems_rate_monotonic_report_statistics_with_plugin+0xec>
(*print)( context, "\n" );
479a0: 4879 0005 f266 pea 5f266 <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++ ) {
479a6: 5282 addql #1,%d2
/*
* If the count is zero, don't print statistics
*/
if (the_stats.count == 0) {
(*print)( context, "\n" );
479a8: 2f03 movel %d3,%sp@- 479aa: 4e92 jsr %a2@
continue;
479ac: 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 ;
479ae: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2
479b4: 6396 blss 4794c <rtems_rate_monotonic_report_statistics_with_plugin+0x80><== ALWAYS TAKEN
479b6: 60aa bras 47962 <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 );
479b8: 486e fff2 pea %fp@(-14) 479bc: 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++ ) {
479be: 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 );
479c0: 2f00 movel %d0,%sp@- 479c2: 486e ffba pea %fp@(-70) 479c6: 4e90 jsr %a0@
(*print)( context,
479c8: 202e fff6 movel %fp@(-10),%d0 479cc: 223c 0000 03e8 movel #1000,%d1 479d2: 4c41 0800 remsl %d1,%d0,%d0 479d6: 2c2e ffb6 movel %fp@(-74),%d6 479da: 2f00 movel %d0,%sp@- 479dc: 2001 movel %d1,%d0 479de: 2f2e fff2 movel %fp@(-14),%sp@- 479e2: 4c40 6806 remsl %d0,%d6,%d6 479e6: 202e ffae movel %fp@(-82),%d0 479ea: 2246 moveal %d6,%a1 479ec: 223c 0000 03e8 movel #1000,%d1 479f2: 2f09 movel %a1,%sp@- 479f4: 2f2e ffb2 movel %fp@(-78),%sp@- 479f8: 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,
479fc: 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,
47a02: 2f00 movel %d0,%sp@- 47a04: 2f2e ffaa movel %fp@(-86),%sp@- 47a08: 4879 0005 f3df pea 5f3df <CSWTCH.2+0x125> 47a0e: 2f03 movel %d3,%sp@- 47a10: 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);
47a12: 4fef 002c lea %sp@(44),%sp 47a16: 2047 moveal %d7,%a0 47a18: 486e fff2 pea %fp@(-14) 47a1c: 2f2e ffa2 movel %fp@(-94),%sp@- 47a20: 486e ffd2 pea %fp@(-46) 47a24: 4e90 jsr %a0@
(*print)( context,
47a26: 202e fff6 movel %fp@(-10),%d0 47a2a: 4c46 0800 remsl %d6,%d0,%d0 47a2e: 222e ffce movel %fp@(-50),%d1 47a32: 2f00 movel %d0,%sp@- 47a34: 2f2e fff2 movel %fp@(-14),%sp@- 47a38: 4c46 1801 remsl %d6,%d1,%d1 47a3c: 202e ffc6 movel %fp@(-58),%d0 47a40: 2241 moveal %d1,%a1 47a42: 2f09 movel %a1,%sp@- 47a44: 2f2e ffca movel %fp@(-54),%sp@- 47a48: 4c46 0800 remsl %d6,%d0,%d0 47a4c: 2f00 movel %d0,%sp@- 47a4e: 2f2e ffc2 movel %fp@(-62),%sp@- 47a52: 4879 0005 f3fe pea 5f3fe <CSWTCH.2+0x144> 47a58: 2f03 movel %d3,%sp@- 47a5a: 4e92 jsr %a2@ 47a5c: 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 ;
47a60: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2 47a66: 6300 fee4 blsw 4794c <rtems_rate_monotonic_report_statistics_with_plugin+0x80>
47a6a: 6000 fef6 braw 47962 <rtems_rate_monotonic_report_statistics_with_plugin+0x96><== NOT EXECUTED
00047a88 <rtems_rate_monotonic_reset_all_statistics>:
/*
* rtems_rate_monotonic_reset_all_statistics
*/
void rtems_rate_monotonic_reset_all_statistics( void )
{
47a88: 4e56 0000 linkw %fp,#0 47a8c: 2039 0006 1c18 movel 61c18 <_Thread_Dispatch_disable_level>,%d0 47a92: 5280 addql #1,%d0 47a94: 2f0a movel %a2,%sp@- 47a96: 23c0 0006 1c18 movel %d0,61c18 <_Thread_Dispatch_disable_level> 47a9c: 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 ;
47a9e: 2439 0006 1b22 movel 61b22 <_Rate_monotonic_Information+0x6>,%d2 47aa4: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2
47aaa: 6216 bhis 47ac2 <rtems_rate_monotonic_reset_all_statistics+0x3a><== NEVER TAKEN
47aac: 45f9 0004 7ad4 lea 47ad4 <rtems_rate_monotonic_reset_statistics>,%a2
id <= _Rate_monotonic_Information.maximum_id ;
id++ ) {
status = rtems_rate_monotonic_reset_statistics( id );
47ab2: 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++ ) {
47ab4: 5282 addql #1,%d2
status = rtems_rate_monotonic_reset_statistics( id );
47ab6: 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 ;
47ab8: 588f addql #4,%sp 47aba: b4b9 0006 1b26 cmpl 61b26 <_Rate_monotonic_Information+0xa>,%d2
47ac0: 63f0 blss 47ab2 <rtems_rate_monotonic_reset_all_statistics+0x2a>
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
}
47ac2: 242e fff8 movel %fp@(-8),%d2 47ac6: 246e fffc moveal %fp@(-4),%a2 47aca: 4e5e unlk %fp
}
/*
* Done so exit thread dispatching disabled critical section.
*/
_Thread_Enable_dispatch();
47acc: 4ef9 0004 a412 jmp 4a412 <_Thread_Enable_dispatch>
...
00057788 <rtems_region_extend>:
rtems_status_code rtems_region_extend(
rtems_id id,
void *starting_address,
uintptr_t length
)
{
57788: 4e56 fff8 linkw %fp,#-8 5778c: 2f0a movel %a2,%sp@- 5778e: 2f02 movel %d2,%sp@- 57790: 242e 000c movel %fp@(12),%d2
bool extend_ok;
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
57794: 6700 0086 beqw 5781c <rtems_region_extend+0x94>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator(); /* to prevent deletion */
57798: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 5779e: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock>
Objects_Id id,
Objects_Locations *location
)
{
return (Region_Control *)
_Objects_Get_no_protection( &_Region_Information, id, location );
577a4: 486e fff8 pea %fp@(-8) 577a8: 2f2e 0008 movel %fp@(8),%sp@- 577ac: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 577b2: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
577b8: 4fef 0010 lea %sp@(16),%sp 577bc: 2440 moveal %d0,%a2 577be: 4aae fff8 tstl %fp@(-8)
577c2: 6646 bnes 5780a <rtems_region_extend+0x82> <== NEVER TAKEN
case OBJECTS_LOCAL:
extend_ok = _Heap_Extend(
577c4: 486e fffc pea %fp@(-4) 577c8: 2f2e 0010 movel %fp@(16),%sp@- 577cc: 2f02 movel %d2,%sp@- 577ce: 486a 0068 pea %a2@(104) 577d2: 4eb9 0005 acc0 jsr 5acc0 <_Heap_Extend>
starting_address,
length,
&amount_extended
);
if ( extend_ok ) {
577d8: 4fef 0010 lea %sp@(16),%sp 577dc: 4a00 tstb %d0
577de: 674c beqs 5782c <rtems_region_extend+0xa4>
the_region->length += amount_extended;
577e0: 202e fffc movel %fp@(-4),%d0 577e4: d1aa 0054 addl %d0,%a2@(84)
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
577e8: 4282 clrl %d2
&amount_extended
);
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
577ea: d1aa 005c addl %d0,%a2@(92)
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
577ee: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 577f4: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status;
577fa: 588f addql #4,%sp
}
577fc: 2002 movel %d2,%d0 577fe: 242e fff0 movel %fp@(-16),%d2 57802: 246e fff4 moveal %fp@(-12),%a2 57806: 4e5e unlk %fp 57808: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5780a: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@-
break;
#endif
case OBJECTS_ERROR:
default:
return_status = RTEMS_INVALID_ID;
57810: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57812: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status;
57818: 588f addql #4,%sp 5781a: 60e0 bras 577fc <rtems_region_extend+0x74>
Objects_Locations location;
rtems_status_code return_status;
Region_Control *the_region;
if ( !starting_address )
return RTEMS_INVALID_ADDRESS;
5781c: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
5781e: 2002 movel %d2,%d0 57820: 242e fff0 movel %fp@(-16),%d2 57824: 246e fff4 moveal %fp@(-12),%a2 57828: 4e5e unlk %fp 5782a: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
5782c: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@-
if ( extend_ok ) {
the_region->length += amount_extended;
the_region->maximum_segment_size += amount_extended;
return_status = RTEMS_SUCCESSFUL;
} else {
return_status = RTEMS_INVALID_ADDRESS;
57832: 7409 moveq #9,%d2
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57834: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status;
5783a: 588f addql #4,%sp 5783c: 60be bras 577fc <rtems_region_extend+0x74>
...
00057ac4 <rtems_region_get_segment_size>:
rtems_status_code rtems_region_get_segment_size(
rtems_id id,
void *segment,
uintptr_t *size
)
{
57ac4: 4e56 fffc linkw %fp,#-4 57ac8: 2f03 movel %d3,%sp@- 57aca: 262e 0010 movel %fp@(16),%d3 57ace: 2f02 movel %d2,%sp@- 57ad0: 242e 000c movel %fp@(12),%d2
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
register Region_Control *the_region;
if ( !segment )
57ad4: 6700 0092 beqw 57b68 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
if ( !size )
57ad8: 4a83 tstl %d3 57ada: 6700 008c beqw 57b68 <rtems_region_get_segment_size+0xa4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
57ade: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57ae4: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock> 57aea: 486e fffc pea %fp@(-4) 57aee: 2f2e 0008 movel %fp@(8),%sp@- 57af2: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 57af8: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
57afe: 222e fffc movel %fp@(-4),%d1 57b02: 4fef 0010 lea %sp@(16),%sp
57b06: 6636 bnes 57b3e <rtems_region_get_segment_size+0x7a>
case OBJECTS_LOCAL:
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, size ) )
57b08: 2f03 movel %d3,%sp@- 57b0a: 2040 moveal %d0,%a0 57b0c: 2f02 movel %d2,%sp@- 57b0e: 4868 0068 pea %a0@(104) 57b12: 4eb9 0005 b61c jsr 5b61c <_Heap_Size_of_alloc_area> 57b18: 4fef 000c lea %sp@(12),%sp 57b1c: 4a00 tstb %d0
57b1e: 6624 bnes 57b44 <rtems_region_get_segment_size+0x80><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57b20: 2f39 0007 eb62 movel 7eb62 <_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 ) )
return_status = RTEMS_INVALID_ADDRESS;
57b26: 7409 moveq #9,%d2 <== NOT EXECUTED
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57b28: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock> <== NOT EXECUTED
return return_status;
57b2e: 588f addql #4,%sp <== NOT EXECUTED
}
57b30: 2002 movel %d2,%d0 57b32: 242e fff4 movel %fp@(-12),%d2 57b36: 262e fff8 movel %fp@(-8),%d3 57b3a: 4e5e unlk %fp 57b3c: 4e75 rts
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
the_region = _Region_Get( id, &location );
switch ( location ) {
57b3e: 7001 moveq #1,%d0 57b40: b081 cmpl %d1,%d0
57b42: 6712 beqs 57b56 <rtems_region_get_segment_size+0x92><== ALWAYS TAKEN
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57b44: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@-
void *segment,
uintptr_t *size
)
{
Objects_Locations location;
rtems_status_code return_status = RTEMS_SUCCESSFUL;
57b4a: 4282 clrl %d2
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57b4c: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status;
57b52: 588f addql #4,%sp 57b54: 60da bras 57b30 <rtems_region_get_segment_size+0x6c>
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57b56: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@-
case OBJECTS_REMOTE: /* this error cannot be returned */
break;
#endif
case OBJECTS_ERROR:
return_status = RTEMS_INVALID_ID;
57b5c: 7404 moveq #4,%d2
break;
}
_RTEMS_Unlock_allocator();
57b5e: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status;
57b64: 588f addql #4,%sp 57b66: 60c8 bras 57b30 <rtems_region_get_segment_size+0x6c>
if ( !segment )
return RTEMS_INVALID_ADDRESS;
if ( !size )
return RTEMS_INVALID_ADDRESS;
57b68: 7409 moveq #9,%d2
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57b6a: 2002 movel %d2,%d0 57b6c: 242e fff4 movel %fp@(-12),%d2 57b70: 262e fff8 movel %fp@(-8),%d3
57b74: 4e5e unlk %fp <== NOT EXECUTED
00057ba4 <rtems_region_resize_segment>:
rtems_id id,
void *segment,
uintptr_t size,
uintptr_t *old_size
)
{
57ba4: 4e56 fff0 linkw %fp,#-16 57ba8: 2f0b movel %a3,%sp@- 57baa: 2f0a movel %a2,%sp@- 57bac: 246e 0014 moveal %fp@(20),%a2
uintptr_t osize;
rtems_status_code return_status;
Heap_Resize_status status;
register Region_Control *the_region;
if ( !old_size )
57bb0: 4a8a tstl %a2 57bb2: 6700 00a4 beqw 57c58 <rtems_region_resize_segment+0xb4>
return RTEMS_INVALID_ADDRESS;
_RTEMS_Lock_allocator();
57bb6: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57bbc: 4eb9 0005 9e7c jsr 59e7c <_API_Mutex_Lock> 57bc2: 486e fff8 pea %fp@(-8) 57bc6: 2f2e 0008 movel %fp@(8),%sp@- 57bca: 4879 0007 e9c6 pea 7e9c6 <_Region_Information> 57bd0: 4eb9 0005 bc00 jsr 5bc00 <_Objects_Get_no_protection>
the_region = _Region_Get( id, &location );
switch ( location ) {
57bd6: 4fef 0010 lea %sp@(16),%sp 57bda: 2640 moveal %d0,%a3 57bdc: 4aae fff8 tstl %fp@(-8)
57be0: 663e bnes 57c20 <rtems_region_resize_segment+0x7c><== NEVER TAKEN
case OBJECTS_LOCAL:
_Region_Debug_Walk( the_region, 7 );
status = _Heap_Resize_block(
57be2: 486e fffc pea %fp@(-4) 57be6: 486e fff4 pea %fp@(-12) 57bea: 2f2e 0010 movel %fp@(16),%sp@- 57bee: 2f2e 000c movel %fp@(12),%sp@- 57bf2: 486b 0068 pea %a3@(104) 57bf6: 4eb9 0005 b530 jsr 5b530 <_Heap_Resize_block>
segment,
(uint32_t) size,
&osize,
&avail_size
);
*old_size = (uint32_t) osize;
57bfc: 24ae fff4 movel %fp@(-12),%a2@
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
57c00: 4fef 0014 lea %sp@(20),%sp 57c04: 4a80 tstl %d0
57c06: 6634 bnes 57c3c <rtems_region_resize_segment+0x98>
_Region_Process_queue( the_region ); /* unlocks allocator */
57c08: 2f0b movel %a3,%sp@- 57c0a: 4eb9 0006 01a0 jsr 601a0 <_Region_Process_queue>
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c10: 246e ffe8 moveal %fp@(-24),%a2
*old_size = (uint32_t) osize;
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
57c14: 588f addql #4,%sp
else
_RTEMS_Unlock_allocator();
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
57c16: 4280 clrl %d0
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c18: 266e ffec moveal %fp@(-20),%a3 57c1c: 4e5e unlk %fp 57c1e: 4e75 rts
default:
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
57c20: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57c26: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
return return_status; }
57c2c: 246e ffe8 moveal %fp@(-24),%a2
return_status = RTEMS_INVALID_ID;
break;
}
_RTEMS_Unlock_allocator();
return return_status;
57c30: 588f addql #4,%sp 57c32: 7004 moveq #4,%d0
}
57c34: 266e ffec moveal %fp@(-20),%a3 57c38: 4e5e unlk %fp 57c3a: 4e75 rts
_Region_Debug_Walk( the_region, 8 );
if ( status == HEAP_RESIZE_SUCCESSFUL )
_Region_Process_queue( the_region ); /* unlocks allocator */
else
_RTEMS_Unlock_allocator();
57c3c: 2f39 0007 eb62 movel 7eb62 <_RTEMS_Allocator_Mutex>,%sp@- 57c42: 2d40 fff0 movel %d0,%fp@(-16) 57c46: 4eb9 0005 9edc jsr 59edc <_API_Mutex_Unlock>
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
57c4c: 202e fff0 movel %fp@(-16),%d0 57c50: 588f addql #4,%sp 57c52: 7201 moveq #1,%d1 57c54: b280 cmpl %d0,%d1
57c56: 670e beqs 57c66 <rtems_region_resize_segment+0xc2>
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c58: 246e ffe8 moveal %fp@(-24),%a2
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
return RTEMS_INVALID_ADDRESS;
57c5c: 7009 moveq #9,%d0
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c5e: 266e ffec moveal %fp@(-20),%a3 57c62: 4e5e unlk %fp 57c64: 4e75 rts 57c66: 246e ffe8 moveal %fp@(-24),%a2
if (status == HEAP_RESIZE_SUCCESSFUL)
return RTEMS_SUCCESSFUL;
if (status == HEAP_RESIZE_UNSATISFIED)
return RTEMS_UNSATISFIED;
57c6a: 700d moveq #13,%d0
break;
}
_RTEMS_Unlock_allocator();
return return_status;
}
57c6c: 266e ffec moveal %fp@(-20),%a3
57c70: 4e5e unlk %fp <== NOT EXECUTED
00046570 <rtems_semaphore_delete>:
#endif
rtems_status_code rtems_semaphore_delete(
rtems_id id
)
{
46570: 4e56 fffc linkw %fp,#-4 46574: 2f0a movel %a2,%sp@-
Objects_Id id,
Objects_Locations *location
)
{
return (Semaphore_Control *)
_Objects_Get( &_Semaphore_Information, id, location );
46576: 486e fffc pea %fp@(-4) 4657a: 2f2e 0008 movel %fp@(8),%sp@- 4657e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46584: 4eb9 0004 7fa4 jsr 47fa4 <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
4658a: 4fef 000c lea %sp@(12),%sp 4658e: 2440 moveal %d0,%a2 46590: 4aae fffc tstl %fp@(-4)
46594: 670a beqs 465a0 <rtems_semaphore_delete+0x30>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46596: 246e fff8 moveal %fp@(-8),%a2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4659a: 7004 moveq #4,%d0
}
4659c: 4e5e unlk %fp 4659e: 4e75 rts 465a0: 7030 moveq #48,%d0 465a2: 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) ) {
465a6: 6760 beqs 46608 <rtems_semaphore_delete+0x98>
if ( _CORE_mutex_Is_locked( &the_semaphore->Core_control.mutex ) &&
465a8: 4aaa 0062 tstl %a2@(98)
465ac: 6616 bnes 465c4 <rtems_semaphore_delete+0x54>
465ae: 7220 moveq #32,%d1 465b0: b280 cmpl %d0,%d1
465b2: 6710 beqs 465c4 <rtems_semaphore_delete+0x54>
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
465b4: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
465ba: 246e fff8 moveal %fp@(-8),%a2
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();
return RTEMS_RESOURCE_IN_USE;
465be: 700c moveq #12,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
465c0: 4e5e unlk %fp 465c2: 4e75 rts
!_Attributes_Is_simple_binary_semaphore(
the_semaphore->attribute_set ) ) {
_Thread_Enable_dispatch();
return RTEMS_RESOURCE_IN_USE;
}
_CORE_mutex_Flush(
465c4: 4878 0004 pea 4 <CONTEXT_ARG> 465c8: 42a7 clrl %sp@- 465ca: 486a 0014 pea %a2@(20) 465ce: 4eb9 0004 7134 jsr 47134 <_CORE_mutex_Flush> 465d4: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
465d8: 2f0a movel %a2,%sp@- 465da: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 465e0: 4eb9 0004 7b78 jsr 47b78 <_Objects_Close>
*/
RTEMS_INLINE_ROUTINE void _Semaphore_Free (
Semaphore_Control *the_semaphore
)
{
_Objects_Free( &_Semaphore_Information, &the_semaphore->Object );
465e6: 2f0a movel %a2,%sp@- 465e8: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 465ee: 4eb9 0004 7e3c jsr 47e3c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
465f4: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
465fa: 4fef 0010 lea %sp@(16),%sp 465fe: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46600: 246e fff8 moveal %fp@(-8),%a2 46604: 4e5e unlk %fp 46606: 4e75 rts
&the_semaphore->Core_control.mutex,
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_MUTEX_WAS_DELETED
);
} else {
_CORE_semaphore_Flush(
46608: 4878 0002 pea 2 <DOUBLE_FLOAT> 4660c: 42a7 clrl %sp@- 4660e: 486a 0014 pea %a2@(20) 46612: 4eb9 0004 746c jsr 4746c <_CORE_semaphore_Flush> 46618: 4fef 000c lea %sp@(12),%sp
SEMAPHORE_MP_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_WAS_DELETED
);
}
_Objects_Close( &_Semaphore_Information, &the_semaphore->Object );
4661c: 2f0a movel %a2,%sp@- 4661e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46624: 4eb9 0004 7b78 jsr 47b78 <_Objects_Close> 4662a: 2f0a movel %a2,%sp@- 4662c: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46632: 4eb9 0004 7e3c jsr 47e3c <_Objects_Free>
0, /* Not used */
0 /* Not used */
);
}
#endif
_Thread_Enable_dispatch();
46638: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
4663e: 4fef 0010 lea %sp@(16),%sp 46642: 4280 clrl %d0 46644: 60ba bras 46600 <rtems_semaphore_delete+0x90>
...
000503d0 <rtems_semaphore_flush>:
#endif
rtems_status_code rtems_semaphore_flush(
rtems_id id
)
{
503d0: 4e56 fffc linkw %fp,#-4 503d4: 486e fffc pea %fp@(-4) 503d8: 2f2e 0008 movel %fp@(8),%sp@- 503dc: 4879 0006 3c54 pea 63c54 <_Semaphore_Information> 503e2: 4eb9 0004 955c jsr 4955c <_Objects_Get>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
503e8: 4fef 000c lea %sp@(12),%sp 503ec: 4aae fffc tstl %fp@(-4)
503f0: 6706 beqs 503f8 <rtems_semaphore_flush+0x28>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
503f2: 7004 moveq #4,%d0
}
503f4: 4e5e unlk %fp 503f6: 4e75 rts 503f8: 7230 moveq #48,%d1 503fa: 2040 moveal %d0,%a0 503fc: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
50400: 6720 beqs 50422 <rtems_semaphore_flush+0x52>
_CORE_mutex_Flush(
50402: 4878 0001 pea 1 <ADD> 50406: 42a7 clrl %sp@- 50408: 4868 0014 pea %a0@(20) 5040c: 4eb9 0004 86ec jsr 486ec <_CORE_mutex_Flush> 50412: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50416: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5041c: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5041e: 4e5e unlk %fp 50420: 4e75 rts
&the_semaphore->Core_control.mutex,
SEND_OBJECT_WAS_DELETED,
CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT
);
} else {
_CORE_semaphore_Flush(
50422: 4878 0001 pea 1 <ADD> 50426: 2040 moveal %d0,%a0 50428: 42a7 clrl %sp@- 5042a: 4868 0014 pea %a0@(20) 5042e: 4eb9 0004 8a24 jsr 48a24 <_CORE_semaphore_Flush> 50434: 4fef 000c lea %sp@(12),%sp
&the_semaphore->Core_control.semaphore,
SEND_OBJECT_WAS_DELETED,
CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT
);
}
_Thread_Enable_dispatch();
50438: 4eb9 0004 9e6e jsr 49e6e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
5043e: 4280 clrl %d0 50440: 60dc bras 5041e <rtems_semaphore_flush+0x4e>
...
00046648 <rtems_semaphore_obtain>:
rtems_status_code rtems_semaphore_obtain(
rtems_id id,
rtems_option option_set,
rtems_interval timeout
)
{
46648: 4e56 ffec linkw %fp,#-20 4664c: 48d7 001c moveml %d2-%d4,%sp@
Objects_Locations *location,
ISR_Level *level
)
{
return (Semaphore_Control *)
_Objects_Get_isr_disable( &_Semaphore_Information, id, location, level );
46650: 486e fff8 pea %fp@(-8) 46654: 486e fffc pea %fp@(-4) 46658: 242e 0008 movel %fp@(8),%d2 4665c: 2f02 movel %d2,%sp@- 4665e: 4879 0005 fa1c pea 5fa1c <_Semaphore_Information> 46664: 262e 000c movel %fp@(12),%d3 46668: 282e 0010 movel %fp@(16),%d4 4666c: 4eb9 0004 7f44 jsr 47f44 <_Objects_Get_isr_disable>
register Semaphore_Control *the_semaphore;
Objects_Locations location;
ISR_Level level;
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
46672: 4fef 0010 lea %sp@(16),%sp 46676: 4aae fffc tstl %fp@(-4)
4667a: 670c beqs 46688 <rtems_semaphore_obtain+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4667c: 7004 moveq #4,%d0
}
4667e: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 46684: 4e5e unlk %fp 46686: 4e75 rts 46688: 7230 moveq #48,%d1 4668a: 2040 moveal %d0,%a0 4668c: c2a8 0010 andl %a0@(16),%d1
the_semaphore = _Semaphore_Get_interrupt_disable( id, &location, &level );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Attributes_Is_counting_semaphore(the_semaphore->attribute_set) ) {
46690: 6738 beqs 466ca <rtems_semaphore_obtain+0x82>
_CORE_mutex_Seize(
46692: 2f2e fff8 movel %fp@(-8),%sp@-
*/
RTEMS_INLINE_ROUTINE bool _Options_Is_no_wait (
rtems_option option_set
)
{
return (option_set & RTEMS_NO_WAIT) ? true : false;
46696: 7201 moveq #1,%d1 46698: c681 andl %d1,%d3 4669a: 2f04 movel %d4,%sp@- 4669c: b781 eorl %d3,%d1 4669e: 2f01 movel %d1,%sp@- 466a0: 2f02 movel %d2,%sp@- 466a2: 4868 0014 pea %a0@(20) 466a6: 4eb9 0004 72bc jsr 472bc <_CORE_mutex_Seize>
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
_Thread_Executing->Wait.return_code );
466ac: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
level
);
return _Semaphore_Translate_core_mutex_return_code(
466b2: 2f28 0034 movel %a0@(52),%sp@- 466b6: 4eb9 0004 6818 jsr 46818 <_Semaphore_Translate_core_mutex_return_code> 466bc: 4fef 0018 lea %sp@(24),%sp
break;
}
return RTEMS_INVALID_ID;
}
466c0: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 466c6: 4e5e unlk %fp 466c8: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
466ca: 2240 moveal %d0,%a1
{
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
466cc: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
466d2: 2229 005c movel %a1@(92),%d1
Thread_Control *executing;
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
466d6: 42a8 0034 clrl %a0@(52)
if ( the_semaphore->count != 0 ) {
466da: 4a81 tstl %d1
466dc: 662e bnes 4670c <rtems_semaphore_obtain+0xc4>
the_semaphore->count -= 1;
_ISR_Enable( *level_p );
return;
}
if ( !wait ) {
466de: 0803 0000 btst #0,%d3
466e2: 6748 beqs 4672c <rtems_semaphore_obtain+0xe4>
_ISR_Enable( *level_p );
466e4: 202e fff8 movel %fp@(-8),%d0 466e8: 46c0 movew %d0,%sr
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_UNSATISFIED_NOWAIT;
466ea: 7001 moveq #1,%d0 466ec: 2140 0034 movel %d0,%a0@(52)
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
466f0: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
466f6: 2f28 0034 movel %a0@(52),%sp@- 466fa: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46700: 588f addql #4,%sp
break;
}
return RTEMS_INVALID_ID;
}
46702: 4cee 001c ffec moveml %fp@(-20),%d2-%d4 46708: 4e5e unlk %fp 4670a: 4e75 rts
/* disabled when you get here */
executing = _Thread_Executing;
executing->Wait.return_code = CORE_SEMAPHORE_STATUS_SUCCESSFUL;
if ( the_semaphore->count != 0 ) {
the_semaphore->count -= 1;
4670c: 5381 subql #1,%d1 4670e: 2341 005c movel %d1,%a1@(92)
_ISR_Enable( *level_p );
46712: 202e fff8 movel %fp@(-8),%d0 46716: 46c0 movew %d0,%sr
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
_Thread_Executing->Wait.return_code );
46718: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
4671e: 2f28 0034 movel %a0@(52),%sp@- 46722: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46728: 588f addql #4,%sp 4672a: 60d6 bras 46702 <rtems_semaphore_obtain+0xba> 4672c: 2239 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d1 46732: 5281 addql #1,%d1 46734: 23c1 0005 fadc movel %d1,5fadc <_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;
4673a: 7201 moveq #1,%d1 4673c: 2240 moveal %d0,%a1
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4673e: 0680 0000 0014 addil #20,%d0 46744: 2341 0044 movel %d1,%a1@(68)
executing->Wait.id = id;
46748: 2142 0020 movel %d2,%a0@(32)
return;
}
_Thread_Disable_dispatch();
_Thread_queue_Enter_critical_section( &the_semaphore->Wait_queue );
executing->Wait.queue = &the_semaphore->Wait_queue;
4674c: 2140 0044 movel %d0,%a0@(68)
executing->Wait.id = id; _ISR_Enable( *level_p );
46750: 222e fff8 movel %fp@(-8),%d1 46754: 46c1 movew %d1,%sr
_Thread_queue_Enqueue( &the_semaphore->Wait_queue, timeout );
46756: 4879 0004 91cc pea 491cc <_Thread_queue_Timeout> 4675c: 2f04 movel %d4,%sp@- 4675e: 2f00 movel %d0,%sp@- 46760: 4eb9 0004 8e04 jsr 48e04 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
46766: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
_Thread_Executing->Wait.return_code );
4676c: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0 46772: 4fef 000c lea %sp@(12),%sp
id,
((_Options_Is_no_wait( option_set )) ? false : true),
timeout,
&level
);
return _Semaphore_Translate_core_semaphore_return_code(
46776: 2f28 0034 movel %a0@(52),%sp@- 4677a: 4eb9 0004 682e jsr 4682e <_Semaphore_Translate_core_semaphore_return_code> 46780: 588f addql #4,%sp 46782: 6000 ff7e braw 46702 <rtems_semaphore_obtain+0xba>
...
00058244 <rtems_signal_send>:
rtems_status_code rtems_signal_send(
rtems_id id,
rtems_signal_set signal_set
)
{
58244: 4e56 fffc linkw %fp,#-4 58248: 2f03 movel %d3,%sp@- 5824a: 2f02 movel %d2,%sp@- 5824c: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
58250: 660e bnes 58260 <rtems_signal_send+0x1c>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58252: 242e fff4 movel %fp@(-12),%d2
Objects_Locations location;
RTEMS_API_Control *api;
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
58256: 700a moveq #10,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58258: 262e fff8 movel %fp@(-8),%d3 5825c: 4e5e unlk %fp 5825e: 4e75 rts
ASR_Information *asr;
if ( !signal_set )
return RTEMS_INVALID_NUMBER;
the_thread = _Thread_Get( id, &location );
58260: 486e fffc pea %fp@(-4) 58264: 2f2e 0008 movel %fp@(8),%sp@- 58268: 4eb9 0005 c56c jsr 5c56c <_Thread_Get>
switch ( location ) {
5826e: 508f addql #8,%sp 58270: 4aae fffc tstl %fp@(-4)
58274: 670e beqs 58284 <rtems_signal_send+0x40>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58276: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5827a: 7004 moveq #4,%d0
}
5827c: 262e fff8 movel %fp@(-8),%d3 58280: 4e5e unlk %fp 58282: 4e75 rts
the_thread = _Thread_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_RTEMS ];
58284: 2240 moveal %d0,%a1 58286: 2069 010a moveal %a1@(266),%a0
asr = &api->Signal;
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
5828a: 4aa8 000a tstl %a0@(10)
5828e: 676a beqs 582fa <rtems_signal_send+0xb6>
if ( asr->is_enabled ) {
58290: 4a28 0008 tstb %a0@(8)
58294: 6736 beqs 582cc <rtems_signal_send+0x88>
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
58296: 223c 0000 0700 movel #1792,%d1 5829c: 40c3 movew %sr,%d3 5829e: 8283 orl %d3,%d1 582a0: 46c1 movew %d1,%sr
*signal_set |= signals;
582a2: 85a8 0012 orl %d2,%a0@(18)
_ISR_Enable( _level );
582a6: 46c3 movew %d3,%sr
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
582a8: 4ab9 0007 ef54 tstl 7ef54 <_Per_CPU_Information+0x8>
582ae: 6708 beqs 582b8 <rtems_signal_send+0x74>
582b0: b0b9 0007 ef58 cmpl 7ef58 <_Per_CPU_Information+0xc>,%d0
582b6: 6730 beqs 582e8 <rtems_signal_send+0xa4> <== ALWAYS TAKEN
_Context_Switch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
582b8: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
582be: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
582c0: 242e fff4 movel %fp@(-12),%d2 582c4: 262e fff8 movel %fp@(-8),%d3 582c8: 4e5e unlk %fp 582ca: 4e75 rts
rtems_signal_set *signal_set
)
{
ISR_Level _level;
_ISR_Disable( _level );
582cc: 203c 0000 0700 movel #1792,%d0 582d2: 40c1 movew %sr,%d1 582d4: 8081 orl %d1,%d0 582d6: 46c0 movew %d0,%sr
*signal_set |= signals;
582d8: 85a8 0016 orl %d2,%a0@(22)
_ISR_Enable( _level );
582dc: 46c1 movew %d1,%sr
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
582de: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
582e4: 4280 clrl %d0 582e6: 60d8 bras 582c0 <rtems_signal_send+0x7c>
if ( ! _ASR_Is_null_handler( asr->handler ) ) {
if ( asr->is_enabled ) {
_ASR_Post_signals( signal_set, &asr->signals_posted );
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
_Context_Switch_necessary = true;
582e8: 7001 moveq #1,%d0 582ea: 13c0 0007 ef64 moveb %d0,7ef64 <_Per_CPU_Information+0x18>
} else {
_ASR_Post_signals( signal_set, &asr->signals_pending );
}
_Thread_Enable_dispatch();
582f0: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
582f6: 4280 clrl %d0 582f8: 60c6 bras 582c0 <rtems_signal_send+0x7c>
}
_Thread_Enable_dispatch();
582fa: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58300: 242e fff4 movel %fp@(-12),%d2
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_NOT_DEFINED;
58304: 700b moveq #11,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58306: 262e fff8 movel %fp@(-8),%d3 5830a: 4e5e unlk %fp
...
00042232 <rtems_stack_checker_begin_extension>:
* rtems_stack_checker_Begin_extension
*/
void rtems_stack_checker_begin_extension(
Thread_Control *the_thread
)
{
42232: 4e56 0000 linkw %fp,#0 42236: 206e 0008 moveal %fp@(8),%a0
Stack_check_Control *the_pattern;
if ( the_thread->Object.id == 0 ) /* skip system tasks */
4223a: 4aa8 0008 tstl %a0@(8)
4223e: 672c beqs 4226c <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;
42240: 2068 00c2 moveal %a0@(194),%a0 42244: 43f9 0005 fea8 lea 5fea8 <Stack_check_Pattern>,%a1 4224a: 2151 0008 movel %a1@,%a0@(8) 4224e: 43f9 0005 feac lea 5feac <Stack_check_Pattern+0x4>,%a1 42254: 2151 000c movel %a1@,%a0@(12) 42258: 43f9 0005 feb0 lea 5feb0 <Stack_check_Pattern+0x8>,%a1 4225e: 2151 0010 movel %a1@,%a0@(16) 42262: 43f9 0005 feb4 lea 5feb4 <Stack_check_Pattern+0xc>,%a1 42268: 2151 0014 movel %a1@,%a0@(20)
}
4226c: 4e5e unlk %fp <== NOT EXECUTED
0004220a <rtems_stack_checker_create_extension>:
*/
bool rtems_stack_checker_create_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *the_thread
)
{
4220a: 4e56 0000 linkw %fp,#0 4220e: 206e 000c moveal %fp@(12),%a0
Stack_check_Initialize();
if (the_thread)
42212: 4a88 tstl %a0
42214: 6716 beqs 4222c <rtems_stack_checker_create_extension+0x22><== NEVER TAKEN
Stack_check_Dope_stack(&the_thread->Start.Initial_stack);
42216: 2f28 00be movel %a0@(190),%sp@- 4221a: 4878 00a5 pea a5 <DBL_MANT_DIG+0x70> 4221e: 2f28 00c2 movel %a0@(194),%sp@- 42222: 4eb9 0004 f788 jsr 4f788 <memset> 42228: 4fef 000c lea %sp@(12),%sp
return true;
}
4222c: 4e5e unlk %fp
4222e: 7001 moveq #1,%d0 <== NOT EXECUTED
000423a0 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
423a0: 4e56 0000 linkw %fp,#0
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
423a4: 2079 0006 04ac moveal 604ac <_Per_CPU_Information+0xc>,%a0
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
423aa: 2028 00c2 movel %a0@(194),%d0 423ae: b08e cmpl %fp,%d0
423b0: 6208 bhis 423ba <rtems_stack_checker_is_blown+0x1a><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
423b2: d0a8 00be addl %a0@(190),%d0 423b6: b08e cmpl %fp,%d0
423b8: 6410 bccs 423ca <rtems_stack_checker_is_blown+0x2a><== ALWAYS TAKEN
/*
* Let's report as much as we can.
*/
if ( !sp_ok || !pattern_ok ) {
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
423ba: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 423be: 2f39 0006 04ac movel 604ac <_Per_CPU_Information+0xc>,%sp@-<== NOT EXECUTED 423c4: 4eb9 0004 2270 jsr 42270 <Stack_check_report_blown_task> <== NOT EXECUTED
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
return false;
}
423ca: 4e5e unlk %fp
423cc: 4200 clrb %d0 <== NOT EXECUTED
00042436 <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
42436: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
4243a: 4879 0004 3fac pea 43fac <printk_plugin> <== NOT EXECUTED 42440: 42a7 clrl %sp@- <== NOT EXECUTED 42442: 4eb9 0004 23d0 jsr 423d0 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED 42448: 508f addql #8,%sp <== NOT EXECUTED
}
4244a: 4e5e unlk %fp <== NOT EXECUTED
...
000423d0 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
423d0: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 423d4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 423d6: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 423da: 2f02 movel %d2,%sp@- <== NOT EXECUTED 423dc: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED
if ( !print )
423e0: 4a8a tstl %a2 <== NOT EXECUTED 423e2: 6746 beqs 4242a <rtems_stack_checker_report_usage_with_plugin+0x5a><== NOT EXECUTED
return;
print_context = context;
print_handler = print;
(*print)( context, "Stack usage by thread\n");
423e4: 4879 0005 d332 pea 5d332 <IntUartPollCallbacks.6236+0x136> <== NOT EXECUTED
)
{
if ( !print )
return;
print_context = context;
423ea: 23c2 0005 f6a4 movel %d2,5f6a4 <print_context> <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
423f0: 2f02 movel %d2,%sp@- <== NOT EXECUTED
{
if ( !print )
return;
print_context = context;
print_handler = print;
423f2: 23ca 0005 f6a8 movel %a2,5f6a8 <print_handler> <== NOT EXECUTED
(*print)( context, "Stack usage by thread\n");
423f8: 4e92 jsr %a2@ <== NOT EXECUTED
(*print)( context,
423fa: 4879 0005 d349 pea 5d349 <IntUartPollCallbacks.6236+0x14d> <== NOT EXECUTED 42400: 2f02 movel %d2,%sp@- <== NOT EXECUTED 42402: 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 );
42404: 4879 0004 20e8 pea 420e8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED 4240a: 4eb9 0004 7e00 jsr 47e00 <rtems_iterate_over_all_threads> <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
42410: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 42414: 4eb9 0004 20e8 jsr 420e8 <Stack_check_Dump_threads_usage> <== NOT EXECUTED
#endif
print_context = NULL;
print_handler = NULL;
4241a: 4fef 0018 lea %sp@(24),%sp <== NOT EXECUTED
#if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE)
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
#endif
print_context = NULL;
4241e: 42b9 0005 f6a4 clrl 5f6a4 <print_context> <== NOT EXECUTED
print_handler = NULL;
42424: 42b9 0005 f6a8 clrl 5f6a8 <print_handler> <== NOT EXECUTED
}
4242a: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4242e: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED 42432: 4e5e unlk %fp <== NOT EXECUTED
00042320 <rtems_stack_checker_switch_extension>:
*/
void rtems_stack_checker_switch_extension(
Thread_Control *running __attribute__((unused)),
Thread_Control *heir __attribute__((unused))
)
{
42320: 4e56 0000 linkw %fp,#0 42324: 2f0a movel %a2,%sp@- 42326: 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;
4232a: 222a 00c2 movel %a2@(194),%d1 4232e: 5081 addql #8,%d1
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
42330: 202a 00c2 movel %a2@(194),%d0 42334: b08e cmpl %fp,%d0
42336: 622a bhis 42362 <rtems_stack_checker_switch_extension+0x42><== NEVER TAKEN
return false;
}
if ( sp > (the_stack->area + the_stack->size) ) {
42338: d0aa 00be addl %a2@(190),%d0 4233c: b08e cmpl %fp,%d0
4233e: 6522 bcss 42362 <rtems_stack_checker_switch_extension+0x42><== NEVER 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,
42340: 4878 0010 pea 10 <INVALID_OPERATION> 42344: 4879 0005 fea8 pea 5fea8 <Stack_check_Pattern> 4234a: 2f01 movel %d1,%sp@- 4234c: 4eb9 0004 f698 jsr 4f698 <memcmp> 42352: 4fef 000c lea %sp@(12),%sp
(void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES));
if ( !sp_ok || !pattern_ok ) {
42356: 4a80 tstl %d0
42358: 6634 bnes 4238e <rtems_stack_checker_switch_extension+0x6e><== NEVER TAKEN
Stack_check_report_blown_task( running, pattern_ok );
}
}
4235a: 246e fffc moveal %fp@(-4),%a2 4235e: 4e5e unlk %fp 42360: 4e75 rts
/*
* 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,
42362: 4878 0010 pea 10 <INVALID_OPERATION> <== NOT EXECUTED 42366: 4879 0005 fea8 pea 5fea8 <Stack_check_Pattern> <== NOT EXECUTED 4236c: 2f01 movel %d1,%sp@- <== NOT EXECUTED 4236e: 4eb9 0004 f698 jsr 4f698 <memcmp> <== NOT EXECUTED 42374: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 42378: 4a80 tstl %d0 <== NOT EXECUTED 4237a: 57c0 seq %d0 <== NOT EXECUTED 4237c: 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 );
4237e: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42384: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42386: 2f0a movel %a2,%sp@- <== NOT EXECUTED 42388: 4eb9 0004 2270 jsr 42270 <Stack_check_report_blown_task> <== 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 ) {
4238e: 4200 clrb %d0 <== NOT EXECUTED
Stack_check_report_blown_task( running, pattern_ok );
42390: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 42396: 2f00 movel %d0,%sp@- <== NOT EXECUTED 42398: 2f0a movel %a2,%sp@- <== NOT EXECUTED 4239a: 4eb9 0004 2270 jsr 42270 <Stack_check_report_blown_task> <== NOT EXECUTED
0004d598 <rtems_string_to_double>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d598: 4e56 ffe4 linkw %fp,#-28 <== NOT EXECUTED 4d59c: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ <== NOT EXECUTED 4d5a0: 242e 0008 movel %fp@(8),%d2 <== NOT EXECUTED 4d5a4: 246e 000c moveal %fp@(12),%a2 <== NOT EXECUTED 4d5a8: 266e 0010 moveal %fp@(16),%a3 <== NOT EXECUTED
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d5ac: 4a8a tstl %a2 <== NOT EXECUTED 4d5ae: 677a beqs 4d62a <rtems_string_to_double+0x92> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d5b0: 49f9 0005 0938 lea 50938 <__errno>,%a4 <== NOT EXECUTED 4d5b6: 4e94 jsr %a4@ <== NOT EXECUTED
*n = 0;
4d5b8: 4281 clrl %d1 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d5ba: 2040 moveal %d0,%a0 <== NOT EXECUTED
*n = 0;
4d5bc: 4280 clrl %d0 <== NOT EXECUTED
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d5be: 4290 clrl %a0@ <== NOT EXECUTED
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d5c0: 486e fffc pea %fp@(-4) <== NOT EXECUTED
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d5c4: 2480 movel %d0,%a2@ <== NOT EXECUTED 4d5c6: 2541 0004 movel %d1,%a2@(4) <== NOT EXECUTED
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d5ca: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4d5cc: 4eb9 0005 332e jsr 5332e <strtod> <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d5d2: 508f addql #8,%sp <== NOT EXECUTED
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d5d4: 2600 movel %d0,%d3 <== NOT EXECUTED 4d5d6: 2801 movel %d1,%d4 <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d5d8: 4a8b tstl %a3 <== NOT EXECUTED 4d5da: 675a beqs 4d636 <rtems_string_to_double+0x9e> <== NOT EXECUTED
*endptr = end;
4d5dc: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4d5e0: 2680 movel %d0,%a3@ <== NOT EXECUTED
/* nothing was converted */
if ( end == s )
4d5e2: b082 cmpl %d2,%d0 <== NOT EXECUTED 4d5e4: 6756 beqs 4d63c <rtems_string_to_double+0xa4> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d5e6: 4878 ffff pea ffffffff <LESS> <== NOT EXECUTED 4d5ea: 2f3c 7fef ffff movel #2146435071,%sp@- <== NOT EXECUTED 4d5f0: 2f04 movel %d4,%sp@- <== NOT EXECUTED 4d5f2: 2f03 movel %d3,%sp@- <== NOT EXECUTED 4d5f4: 4eb9 0005 e33c jsr 5e33c <__gtdf2> <== NOT EXECUTED 4d5fa: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 4d5fe: 4a80 tstl %d0 <== NOT EXECUTED 4d600: 6e12 bgts 4d614 <rtems_string_to_double+0x7c> <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d602: 2483 movel %d3,%a2@ <== NOT EXECUTED
#endif return RTEMS_SUCCESSFUL;
4d604: 4280 clrl %d0 <== NOT EXECUTED
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d606: 2544 0004 movel %d4,%a2@(4) <== NOT EXECUTED
#endif return RTEMS_SUCCESSFUL; }
4d60a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d610: 4e5e unlk %fp <== NOT EXECUTED 4d612: 4e75 rts <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d614: 4e94 jsr %a4@ <== NOT EXECUTED 4d616: 7222 moveq #34,%d1 <== NOT EXECUTED 4d618: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d61a: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d61c: 66e4 bnes 4d602 <rtems_string_to_double+0x6a> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4d61e: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d620: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d626: 4e5e unlk %fp <== NOT EXECUTED 4d628: 4e75 rts <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d62a: 7009 moveq #9,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d62c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d632: 4e5e unlk %fp <== NOT EXECUTED 4d634: 4e75 rts <== NOT EXECUTED
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d636: 202e fffc movel %fp@(-4),%d0 <== NOT EXECUTED 4d63a: 60a6 bras 4d5e2 <rtems_string_to_double+0x4a> <== NOT EXECUTED
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d63c: 700b moveq #11,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d63e: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 <== NOT EXECUTED 4d644: 4e5e unlk %fp <== NOT EXECUTED
0004d648 <rtems_string_to_float>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d648: 4e56 ffe8 linkw %fp,#-24 4d64c: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d650: 242e 0008 movel %fp@(8),%d2 4d654: 246e 000c moveal %fp@(12),%a2 4d658: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d65c: 4a8a tstl %a2
4d65e: 6768 beqs 4d6c8 <rtems_string_to_float+0x80>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d660: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d666: 4e94 jsr %a4@ 4d668: 2040 moveal %d0,%a0 4d66a: 4290 clrl %a0@
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d66c: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d670: 24bc 0000 0000 movel #0,%a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d676: 2f02 movel %d2,%sp@- 4d678: 4eb9 0005 334e jsr 5334e <strtof>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d67e: 508f addql #8,%sp
errno = 0;
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
4d680: 2600 movel %d0,%d3
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d682: 4a8b tstl %a3
4d684: 674e beqs 4d6d4 <rtems_string_to_float+0x8c>
*endptr = end;
4d686: 202e fffc movel %fp@(-4),%d0 4d68a: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4d68c: b082 cmpl %d2,%d0
4d68e: 674a beqs 4d6da <rtems_string_to_float+0x92>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d690: 2f3c 7f7f ffff movel #2139095039,%sp@- 4d696: 2f03 movel %d3,%sp@- 4d698: 4eb9 0005 e3cc jsr 5e3cc <__gtsf2> 4d69e: 508f addql #8,%sp 4d6a0: 4a80 tstl %d0
4d6a2: 6e0e bgts 4d6b2 <rtems_string_to_float+0x6a> <== NEVER TAKEN
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d6a4: 2483 movel %d3,%a2@
#endif return RTEMS_SUCCESSFUL;
4d6a6: 4280 clrl %d0
}
4d6a8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6ae: 4e5e unlk %fp 4d6b0: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d6b2: 4e94 jsr %a4@ <== NOT EXECUTED 4d6b4: 7222 moveq #34,%d1 <== NOT EXECUTED 4d6b6: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d6b8: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d6ba: 66e8 bnes 4d6a4 <rtems_string_to_float+0x5c> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4d6bc: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d6be: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d6c4: 4e5e unlk %fp <== NOT EXECUTED 4d6c6: 4e75 rts <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d6c8: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d6ca: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6d0: 4e5e unlk %fp 4d6d2: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d6d4: 202e fffc movel %fp@(-4),%d0 4d6d8: 60b2 bras 4d68c <rtems_string_to_float+0x44>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d6da: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d6dc: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d6e2: 4e5e unlk %fp
...
0004d6e8 <rtems_string_to_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d6e8: 4e56 ffe8 linkw %fp,#-24 4d6ec: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d6f0: 242e 0008 movel %fp@(8),%d2 4d6f4: 246e 000c moveal %fp@(12),%a2 4d6f8: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d6fc: 4a8a tstl %a2
4d6fe: 675e beqs 4d75e <rtems_string_to_int+0x76>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d700: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d706: 4e94 jsr %a4@ 4d708: 2040 moveal %d0,%a0 4d70a: 4290 clrl %a0@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d70c: 2f2e 0014 movel %fp@(20),%sp@- 4d710: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d714: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d716: 2f02 movel %d2,%sp@- 4d718: 4eb9 0005 3504 jsr 53504 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d71e: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d722: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d724: 4a8b tstl %a3
4d726: 6742 beqs 4d76a <rtems_string_to_int+0x82>
*endptr = end;
4d728: 202e fffc movel %fp@(-4),%d0 4d72c: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4d72e: b082 cmpl %d2,%d0
4d730: 673e beqs 4d770 <rtems_string_to_int+0x88>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d732: 0c83 7fff ffff cmpil #2147483647,%d3
4d738: 670e beqs 4d748 <rtems_string_to_int+0x60>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d73a: 2483 movel %d3,%a2@
#endif return RTEMS_SUCCESSFUL;
4d73c: 4280 clrl %d0
}
4d73e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d744: 4e5e unlk %fp 4d746: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d748: 4e94 jsr %a4@ 4d74a: 7222 moveq #34,%d1 4d74c: 2040 moveal %d0,%a0 4d74e: b290 cmpl %a0@,%d1
4d750: 66e8 bnes 4d73a <rtems_string_to_int+0x52> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4d752: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d754: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d75a: 4e5e unlk %fp 4d75c: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d75e: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d760: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d766: 4e5e unlk %fp 4d768: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d76a: 202e fffc movel %fp@(-4),%d0 4d76e: 60be bras 4d72e <rtems_string_to_int+0x46>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d770: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d772: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d778: 4e5e unlk %fp <== NOT EXECUTED
0004d834 <rtems_string_to_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d834: 4e56 ffe8 linkw %fp,#-24 4d838: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d83c: 262e 0008 movel %fp@(8),%d3 4d840: 246e 000c moveal %fp@(12),%a2 4d844: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d848: 4a8a tstl %a2
4d84a: 6766 beqs 4d8b2 <rtems_string_to_long+0x7e>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d84c: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d852: 4e94 jsr %a4@ 4d854: 2040 moveal %d0,%a0 4d856: 4290 clrl %a0@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d858: 2f2e 0014 movel %fp@(20),%sp@- 4d85c: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d860: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d862: 2f03 movel %d3,%sp@- 4d864: 4eb9 0005 3504 jsr 53504 <strtol>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d86a: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d86e: 2400 movel %d0,%d2
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d870: 4a8b tstl %a3
4d872: 674a beqs 4d8be <rtems_string_to_long+0x8a>
*endptr = end;
4d874: 202e fffc movel %fp@(-4),%d0 4d878: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4d87a: b083 cmpl %d3,%d0
4d87c: 6746 beqs 4d8c4 <rtems_string_to_long+0x90>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d87e: 0c82 7fff ffff cmpil #2147483647,%d2
4d884: 6716 beqs 4d89c <rtems_string_to_long+0x68>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d886: 0c82 8000 0000 cmpil #-2147483648,%d2
4d88c: 670e beqs 4d89c <rtems_string_to_long+0x68>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d88e: 2482 movel %d2,%a2@
#endif return RTEMS_SUCCESSFUL;
4d890: 4280 clrl %d0
}
4d892: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d898: 4e5e unlk %fp 4d89a: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d89c: 4e94 jsr %a4@ 4d89e: 7222 moveq #34,%d1 4d8a0: 2040 moveal %d0,%a0 4d8a2: b290 cmpl %a0@,%d1
4d8a4: 66e8 bnes 4d88e <rtems_string_to_long+0x5a> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4d8a6: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d8a8: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8ae: 4e5e unlk %fp 4d8b0: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d8b2: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d8b4: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d8ba: 4e5e unlk %fp 4d8bc: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d8be: 202e fffc movel %fp@(-4),%d0 4d8c2: 60b6 bras 4d87a <rtems_string_to_long+0x46>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d8c4: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d8c6: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4
4d8cc: 4e5e unlk %fp <== NOT EXECUTED
0004d77c <rtems_string_to_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d77c: 4e56 ffe4 linkw %fp,#-28 4d780: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4d784: 282e 0008 movel %fp@(8),%d4 4d788: 246e 000c moveal %fp@(12),%a2 4d78c: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d790: 4a8a tstl %a2 4d792: 6700 0082 beqw 4d816 <rtems_string_to_long_long+0x9a>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d796: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d79c: 4e94 jsr %a4@ 4d79e: 2040 moveal %d0,%a0
*n = 0;
4d7a0: 4280 clrl %d0 4d7a2: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d7a4: 4290 clrl %a0@
*n = 0;
4d7a6: 2480 movel %d0,%a2@ 4d7a8: 2541 0004 movel %d1,%a2@(4)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d7ac: 2f2e 0014 movel %fp@(20),%sp@- 4d7b0: 486e fffc pea %fp@(-4) 4d7b4: 2f04 movel %d4,%sp@- 4d7b6: 4eb9 0005 3524 jsr 53524 <strtoll>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d7bc: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d7c0: 2400 movel %d0,%d2 4d7c2: 2601 movel %d1,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d7c4: 4a8b tstl %a3
4d7c6: 675a beqs 4d822 <rtems_string_to_long_long+0xa6> <== NEVER TAKEN
*endptr = end;
4d7c8: 202e fffc movel %fp@(-4),%d0 4d7cc: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4d7ce: b084 cmpl %d4,%d0
4d7d0: 6756 beqs 4d828 <rtems_string_to_long_long+0xac> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d7d2: 203c 7fff ffff movel #2147483647,%d0 4d7d8: 72ff moveq #-1,%d1 4d7da: 9283 subl %d3,%d1 4d7dc: 9182 subxl %d2,%d0
4d7de: 6720 beqs 4d800 <rtems_string_to_long_long+0x84> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d7e0: 203c 8000 0000 movel #-2147483648,%d0 4d7e6: 4281 clrl %d1 4d7e8: 9283 subl %d3,%d1 4d7ea: 9182 subxl %d2,%d0
4d7ec: 6712 beqs 4d800 <rtems_string_to_long_long+0x84> <== NEVER TAKEN
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4d7ee: 4280 clrl %d0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4d7f0: 2482 movel %d2,%a2@ 4d7f2: 2543 0004 movel %d3,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4d7f6: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d7fc: 4e5e unlk %fp 4d7fe: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MIN
/* there was an underflow */
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
4d800: 4e94 jsr %a4@ 4d802: 7222 moveq #34,%d1 4d804: 2040 moveal %d0,%a0 4d806: b290 cmpl %a0@,%d1
4d808: 66e4 bnes 4d7ee <rtems_string_to_long_long+0x72> <== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4d80a: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d80c: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d812: 4e5e unlk %fp 4d814: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d816: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d818: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4d81e: 4e5e unlk %fp 4d820: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d822: 202e fffc movel %fp@(-4),%d0 4d826: 60a6 bras 4d7ce <rtems_string_to_long_long+0x52>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d828: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d82a: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4d830: 4e5e unlk %fp <== NOT EXECUTED
0004d8d0 <rtems_string_to_pointer>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d8d0: 4e56 ffe8 linkw %fp,#-24 4d8d4: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d8d8: 242e 0008 movel %fp@(8),%d2 4d8dc: 246e 000c moveal %fp@(12),%a2 4d8e0: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d8e4: 4a8a tstl %a2
4d8e6: 675c beqs 4d944 <rtems_string_to_pointer+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d8e8: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d8ee: 4e94 jsr %a4@ 4d8f0: 2040 moveal %d0,%a0 4d8f2: 4290 clrl %a0@
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
4d8f4: 4878 0010 pea 10 <INVALID_OPERATION> 4d8f8: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4d8fc: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
4d8fe: 2f02 movel %d2,%sp@- 4d900: 4eb9 0005 3938 jsr 53938 <strtoul>
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d906: 4fef 000c lea %sp@(12),%sp
*n = 0;
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
4d90a: 2600 movel %d0,%d3
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d90c: 4a8b tstl %a3
4d90e: 6740 beqs 4d950 <rtems_string_to_pointer+0x80>
*endptr = end;
4d910: 202e fffc movel %fp@(-4),%d0 4d914: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4d916: b082 cmpl %d2,%d0
4d918: 673c beqs 4d956 <rtems_string_to_pointer+0x86>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d91a: 70ff moveq #-1,%d0 4d91c: b083 cmpl %d3,%d0
4d91e: 670e beqs 4d92e <rtems_string_to_pointer+0x5e> <== NEVER TAKEN
if ( (result == STRING_TO_MIN) && (errno == ERANGE))
return RTEMS_INVALID_NUMBER;
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
4d920: 2483 movel %d3,%a2@
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4d922: 4280 clrl %d0
}
4d924: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d92a: 4e5e unlk %fp 4d92c: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4d92e: 4e94 jsr %a4@ <== NOT EXECUTED 4d930: 7222 moveq #34,%d1 <== NOT EXECUTED 4d932: 2040 moveal %d0,%a0 <== NOT EXECUTED 4d934: b290 cmpl %a0@,%d1 <== NOT EXECUTED 4d936: 66e8 bnes 4d920 <rtems_string_to_pointer+0x50> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
4d938: 700a moveq #10,%d0 <== NOT EXECUTED
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d93a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 <== NOT EXECUTED 4d940: 4e5e unlk %fp <== NOT EXECUTED 4d942: 4e75 rts <== NOT EXECUTED
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4d944: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d946: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d94c: 4e5e unlk %fp 4d94e: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4d950: 202e fffc movel %fp@(-4),%d0 4d954: 60c0 bras 4d916 <rtems_string_to_pointer+0x46>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4d956: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4d958: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4d95e: 4e5e unlk %fp
...
0004d9d8 <rtems_string_to_unsigned_int>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4d9d8: 4e56 ffe8 linkw %fp,#-24 4d9dc: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4d9e0: 242e 0008 movel %fp@(8),%d2 4d9e4: 246e 000c moveal %fp@(12),%a2 4d9e8: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4d9ec: 4a8a tstl %a2
4d9ee: 675c beqs 4da4c <rtems_string_to_unsigned_int+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4d9f0: 49f9 0005 0938 lea 50938 <__errno>,%a4 4d9f6: 4e94 jsr %a4@ 4d9f8: 2040 moveal %d0,%a0 4d9fa: 4290 clrl %a0@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4d9fc: 2f2e 0014 movel %fp@(20),%sp@- 4da00: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4da04: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4da06: 2f02 movel %d2,%sp@- 4da08: 4eb9 0005 3938 jsr 53938 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4da0e: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4da12: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4da14: 4a8b tstl %a3
4da16: 6740 beqs 4da58 <rtems_string_to_unsigned_int+0x80>
*endptr = end;
4da18: 202e fffc movel %fp@(-4),%d0 4da1c: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4da1e: b082 cmpl %d2,%d0
4da20: 673c beqs 4da5e <rtems_string_to_unsigned_int+0x86>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4da22: 70ff moveq #-1,%d0 4da24: b083 cmpl %d3,%d0
4da26: 670e beqs 4da36 <rtems_string_to_unsigned_int+0x5e>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4da28: 2483 movel %d3,%a2@
#endif return RTEMS_SUCCESSFUL;
4da2a: 4280 clrl %d0
}
4da2c: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da32: 4e5e unlk %fp 4da34: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4da36: 4e94 jsr %a4@ 4da38: 7222 moveq #34,%d1 4da3a: 2040 moveal %d0,%a0 4da3c: b290 cmpl %a0@,%d1
4da3e: 66e8 bnes 4da28 <rtems_string_to_unsigned_int+0x50><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4da40: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4da42: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da48: 4e5e unlk %fp 4da4a: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4da4c: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4da4e: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da54: 4e5e unlk %fp 4da56: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4da58: 202e fffc movel %fp@(-4),%d0 4da5c: 60c0 bras 4da1e <rtems_string_to_unsigned_int+0x46>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4da5e: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4da60: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4da66: 4e5e unlk %fp
...
0004db10 <rtems_string_to_unsigned_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4db10: 4e56 ffe8 linkw %fp,#-24 4db14: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 4db18: 242e 0008 movel %fp@(8),%d2 4db1c: 246e 000c moveal %fp@(12),%a2 4db20: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4db24: 4a8a tstl %a2
4db26: 675c beqs 4db84 <rtems_string_to_unsigned_long+0x74>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4db28: 49f9 0005 0938 lea 50938 <__errno>,%a4 4db2e: 4e94 jsr %a4@ 4db30: 2040 moveal %d0,%a0 4db32: 4290 clrl %a0@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4db34: 2f2e 0014 movel %fp@(20),%sp@- 4db38: 486e fffc pea %fp@(-4)
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
4db3c: 4292 clrl %a2@
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4db3e: 2f02 movel %d2,%sp@- 4db40: 4eb9 0005 3938 jsr 53938 <strtoul>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4db46: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4db4a: 2600 movel %d0,%d3
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4db4c: 4a8b tstl %a3
4db4e: 6740 beqs 4db90 <rtems_string_to_unsigned_long+0x80>
*endptr = end;
4db50: 202e fffc movel %fp@(-4),%d0 4db54: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4db56: b082 cmpl %d2,%d0
4db58: 673c beqs 4db96 <rtems_string_to_unsigned_long+0x86>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4db5a: 70ff moveq #-1,%d0 4db5c: b083 cmpl %d3,%d0
4db5e: 670e beqs 4db6e <rtems_string_to_unsigned_long+0x5e>
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4db60: 2483 movel %d3,%a2@
#endif return RTEMS_SUCCESSFUL;
4db62: 4280 clrl %d0
}
4db64: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4db6a: 4e5e unlk %fp 4db6c: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4db6e: 4e94 jsr %a4@ 4db70: 7222 moveq #34,%d1 4db72: 2040 moveal %d0,%a0 4db74: b290 cmpl %a0@,%d1
4db76: 66e8 bnes 4db60 <rtems_string_to_unsigned_long+0x50><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4db78: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4db7a: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4db80: 4e5e unlk %fp 4db82: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4db84: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4db86: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4db8c: 4e5e unlk %fp 4db8e: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4db90: 202e fffc movel %fp@(-4),%d0 4db94: 60c0 bras 4db56 <rtems_string_to_unsigned_long+0x46>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4db96: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4db98: 4cee 1c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a4 4db9e: 4e5e unlk %fp
...
0004da6c <rtems_string_to_unsigned_long_long>:
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER)
,
int base
#endif
)
{
4da6c: 4e56 ffe4 linkw %fp,#-28 4da70: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 4da74: 242e 0008 movel %fp@(8),%d2 4da78: 246e 000c moveal %fp@(12),%a2 4da7c: 266e 0010 moveal %fp@(16),%a3
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
4da80: 4a8a tstl %a2
4da82: 676e beqs 4daf2 <rtems_string_to_unsigned_long_long+0x86>
return RTEMS_INVALID_ADDRESS;
errno = 0;
4da84: 49f9 0005 0938 lea 50938 <__errno>,%a4 4da8a: 4e94 jsr %a4@ 4da8c: 2040 moveal %d0,%a0
*n = 0;
4da8e: 4280 clrl %d0 4da90: 4281 clrl %d1
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
4da92: 4290 clrl %a0@
*n = 0;
4da94: 2480 movel %d0,%a2@ 4da96: 2541 0004 movel %d1,%a2@(4)
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4da9a: 2f2e 0014 movel %fp@(20),%sp@- 4da9e: 486e fffc pea %fp@(-4) 4daa2: 2f02 movel %d2,%sp@- 4daa4: 4eb9 0005 3958 jsr 53958 <strtoull>
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4daaa: 4fef 000c lea %sp@(12),%sp
#ifdef STRING_TO_FLOAT
result = STRING_TO_METHOD( s, &end );
#elif defined(STRING_TO_POINTER)
result = STRING_TO_METHOD( s, &end, 16 );
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
4daae: 2600 movel %d0,%d3 4dab0: 2801 movel %d1,%d4
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4dab2: 4a8b tstl %a3
4dab4: 6748 beqs 4dafe <rtems_string_to_unsigned_long_long+0x92>
*endptr = end;
4dab6: 202e fffc movel %fp@(-4),%d0 4daba: 2680 movel %d0,%a3@
/* nothing was converted */
if ( end == s )
4dabc: b082 cmpl %d2,%d0
4dabe: 6744 beqs 4db04 <rtems_string_to_unsigned_long_long+0x98>
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4dac0: 70ff moveq #-1,%d0 4dac2: 72ff moveq #-1,%d1 4dac4: 9284 subl %d4,%d1 4dac6: 9183 subxl %d3,%d0
4dac8: 6712 beqs 4dadc <rtems_string_to_unsigned_long_long+0x70>
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
4daca: 4280 clrl %d0
#endif
#if defined(STRING_TO_POINTER)
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
4dacc: 2483 movel %d3,%a2@ 4dace: 2544 0004 movel %d4,%a2@(4)
#endif return RTEMS_SUCCESSFUL; }
4dad2: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4dad8: 4e5e unlk %fp 4dada: 4e75 rts
return RTEMS_INVALID_NUMBER;
#endif
#ifdef STRING_TO_MAX
/* there was an overflow */
if ( (result == STRING_TO_MAX) && (errno == ERANGE))
4dadc: 4e94 jsr %a4@ 4dade: 7222 moveq #34,%d1 4dae0: 2040 moveal %d0,%a0 4dae2: b290 cmpl %a0@,%d1
4dae4: 66e4 bnes 4daca <rtems_string_to_unsigned_long_long+0x5e><== NEVER TAKEN
return RTEMS_INVALID_NUMBER;
4dae6: 700a moveq #10,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4dae8: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4daee: 4e5e unlk %fp 4daf0: 4e75 rts
{
STRING_TO_INPUT_TYPE result;
char *end;
if ( !n )
return RTEMS_INVALID_ADDRESS;
4daf2: 7009 moveq #9,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4daf4: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4 4dafa: 4e5e unlk %fp 4dafc: 4e75 rts
#elif defined(STRING_TO_INTEGER)
result = STRING_TO_METHOD( s, &end, base );
#endif
/* If the user wants the end pointer back, then return it. */
if ( endptr )
4dafe: 202e fffc movel %fp@(-4),%d0 4db02: 60b8 bras 4dabc <rtems_string_to_unsigned_long_long+0x50>
*endptr = end;
/* nothing was converted */
if ( end == s )
return RTEMS_NOT_DEFINED;
4db04: 700b moveq #11,%d0
*n = (STRING_TO_TYPE) (uintptr_t)result;
#else
*n = (STRING_TO_TYPE) result;
#endif
return RTEMS_SUCCESSFUL;
}
4db06: 4cee 1c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a4
4db0c: 4e5e unlk %fp <== NOT EXECUTED
000425d4 <rtems_tarfs_load>:
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
425d4: 4e56 fe44 linkw %fp,#-444 425d8: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
425dc: 2f2e 0008 movel %fp@(8),%sp@-
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
425e0: 2a2e 000c movel %fp@(12),%d5
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
425e4: 4eb9 0005 2b28 jsr 52b28 <strlen>
int rtems_tarfs_load(
char *mountpoint,
uint8_t *tar_image,
size_t tar_size
)
{
425ea: 2c2e 0010 movel %fp@(16),%d6
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
425ee: 4297 clrl %sp@ 425f0: 486e ffe8 pea %fp@(-24) 425f4: 42a7 clrl %sp@- 425f6: 2f00 movel %d0,%sp@- 425f8: 2f2e 0008 movel %fp@(8),%sp@- 425fc: 4eb9 0004 31b4 jsr 431b4 <rtems_filesystem_evaluate_path>
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
42602: 4fef 0014 lea %sp@(20),%sp
int offset;
unsigned long nblocks;
IMFS_jnode_t *node;
int status;
status = rtems_filesystem_evaluate_path(
42606: 2d40 fe6c movel %d0,%fp@(-404)
strlen(mountpoint),
0,
&root_loc,
0
);
if (status != 0)
4260a: 6600 0168 bnew 42774 <rtems_tarfs_load+0x1a0>
return -1;
if (root_loc.ops != &IMFS_ops
4260e: 202e fff4 movel %fp@(-12),%d0 42612: 0c80 0006 1c1a cmpil #400410,%d0 42618: 6600 01b8 bnew 427d2 <rtems_tarfs_load+0x1fe> 4261c: 95ca subal %a2,%a2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
4261e: 280e movel %fp,%d4
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
42620: 240a movel %a2,%d2
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42622: 0684 ffff ff70 addil #-144,%d4
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
42628: 4bee fe70 lea %fp@(-400),%a5
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
4262c: 0682 0000 0200 addil #512,%d2 42632: bc82 cmpl %d2,%d6 42634: 6500 0098 bcsw 426ce <rtems_tarfs_load+0xfa>
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
42638: 4878 0007 pea 7 <TRUNCDFSF>
break;
/*
* Read a header.
*/
hdr_ptr = (char *) &tar_image[offset];
4263c: 45f2 5800 lea %a2@(00000000,%d5:l),%a2
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
42640: 4879 0006 1c62 pea 61c62 <IMFS_ops+0x48> 42646: 486a 0101 pea %a2@(257) 4264a: 4eb9 0005 2b40 jsr 52b40 <strncmp> 42650: 4fef 000c lea %sp@(12),%sp 42654: 4a80 tstl %d0
42656: 6676 bnes 426ce <rtems_tarfs_load+0xfa>
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42658: 4878 0063 pea 63 <DBL_MANT_DIG+0x2e>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4265c: 47f9 0004 a924 lea 4a924 <_rtems_octal2ulong>,%a3
hdr_ptr = (char *) &tar_image[offset];
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
42662: 2f0a movel %a2,%sp@- 42664: 2f04 movel %d4,%sp@- 42666: 4eb9 0005 2c30 jsr 52c30 <strncpy>
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4266c: 4878 0008 pea 8 <DIVIDE_BY_ZERO> 42670: 486a 0064 pea %a2@(100)
offset += 512;
if (strncmp(&hdr_ptr[257], "ustar ", 7))
break;
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
42674: 4200 clrb %d0 42676: 1d40 ffd3 moveb %d0,%fp@(-45)
linkflag = hdr_ptr[156];
4267a: 162a 009c moveb %a2@(156),%d3
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
4267e: 4e93 jsr %a3@
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42680: 4878 000c pea c <OPER1>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
42684: 2840 moveal %d0,%a4
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42686: 486a 007c pea %a2@(124) 4268a: 4e93 jsr %a3@
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
4268c: 4878 0008 pea 8 <DIVIDE_BY_ZERO>
strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE);
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
42690: 2e00 movel %d0,%d7
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
42692: 486a 0094 pea %a2@(148) 42696: 4e93 jsr %a3@
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
42698: 4fef 0020 lea %sp@(32),%sp
filename[MAX_NAME_FIELD_SIZE] = '\0';
linkflag = hdr_ptr[156];
file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8);
file_size = _rtems_octal2ulong(&hdr_ptr[124], 12);
hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8);
4269c: 2640 moveal %d0,%a3
if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum)
4269e: 2e8a movel %a2,%sp@ 426a0: 4eb9 0004 adce jsr 4adce <_rtems_tar_header_checksum> 426a6: 588f addql #4,%sp 426a8: b7c0 cmpal %d0,%a3
426aa: 6622 bnes 426ce <rtems_tarfs_load+0xfa> <== NEVER TAKEN
* Generate an IMFS node depending on the file type.
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
426ac: 7235 moveq #53,%d1 426ae: 0283 0000 00ff andil #255,%d3 426b4: b283 cmpl %d3,%d1
426b6: 676c beqs 42724 <rtems_tarfs_load+0x150>
* IMFS_create_node was ONLY passed a NULL when we created the
* root node. We added a new IMFS_create_root_node() so this
* path no longer existed. The result was simpler code which
* should not have this path.
*/
else if (linkflag == REGTYPE) {
426b8: 7030 moveq #48,%d0 426ba: b083 cmpl %d3,%d0
426bc: 671e beqs 426dc <rtems_tarfs_load+0x108>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
426be: 2442 moveal %d2,%a2
/*
* Create an IMFS node structure pointing to tar image memory.
*/
offset = 0;
while (1) {
if (offset + 512 > tar_size)
426c0: 240a movel %a2,%d2 426c2: 0682 0000 0200 addil #512,%d2 426c8: bc82 cmpl %d2,%d6 426ca: 6400 ff6c bccw 42638 <rtems_tarfs_load+0x64>
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
426ce: 202e fe6c movel %fp@(-404),%d0 426d2: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 426d8: 4e5e unlk %fp 426da: 4e75 rts
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
426dc: 486e fffc pea %fp@(-4) 426e0: 486e ffd4 pea %fp@(-44)
* should not have this path.
*/
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
426e4: 2d6e ffe8 ffd4 movel %fp@(-24),%fp@(-44) 426ea: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 426f0: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 426f6: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 426fc: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
42702: 2f04 movel %d4,%sp@- 42704: 4eb9 0004 b724 jsr 4b724 <IMFS_evaluate_for_make> 4270a: 4fef 000c lea %sp@(12),%sp 4270e: 4a80 tstl %d0
42710: 6776 beqs 42788 <rtems_tarfs_load+0x1b4> <== ALWAYS TAKEN
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
42712: 0687 0000 01ff addil #511,%d7 <== NOT EXECUTED
offset += 512 * nblocks;
42718: 0287 ffff fe00 andil #-512,%d7 <== NOT EXECUTED 4271e: d487 addl %d7,%d2 <== NOT EXECUTED
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
42720: 2442 moveal %d2,%a2 42722: 609c bras 426c0 <rtems_tarfs_load+0xec>
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
42724: 2f2e 0008 movel %fp@(8),%sp@-
if (full_filename[strlen(full_filename)-1] != '/')
42728: 762f moveq #47,%d3
* - For directories, just create directories as usual. IMFS
* will take care of the rest.
* - For files, create a file node with special tarfs properties.
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
4272a: 2f0d movel %a5,%sp@- 4272c: 4eb9 0005 267c jsr 5267c <strcpy>
if (full_filename[strlen(full_filename)-1] != '/')
42732: 2f0d movel %a5,%sp@- 42734: 4eb9 0005 2b28 jsr 52b28 <strlen> 4273a: 4fef 000c lea %sp@(12),%sp 4273e: 41f6 0800 lea %fp@(00000000,%d0:l),%a0 42742: 1228 fe6f moveb %a0@(-401),%d1 42746: 49c1 extbl %d1 42748: b681 cmpl %d1,%d3
4274a: 6708 beqs 42754 <rtems_tarfs_load+0x180> <== ALWAYS TAKEN
strcat(full_filename, "/");
4274c: 323c 2f00 movew #12032,%d1 <== NOT EXECUTED 42750: 3b81 0800 movew %d1,%a5@(00000000,%d0:l) <== NOT EXECUTED
strcat(full_filename, filename);
42754: 2f04 movel %d4,%sp@-
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
42756: 2442 moveal %d2,%a2
*/
if (linkflag == DIRTYPE) {
strcpy(full_filename, mountpoint);
if (full_filename[strlen(full_filename)-1] != '/')
strcat(full_filename, "/");
strcat(full_filename, filename);
42758: 2f0d movel %a5,%sp@- 4275a: 4eb9 0005 2564 jsr 52564 <strcat>
mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO);
42760: 4878 01ff pea 1ff <DBL_MANT_DIG+0x1ca> 42764: 2f0d movel %a5,%sp@- 42766: 4eb9 0004 3b50 jsr 43b50 <mkdir> 4276c: 4fef 0010 lea %sp@(16),%sp 42770: 6000 ff4e braw 426c0 <rtems_tarfs_load+0xec>
0,
&root_loc,
0
);
if (status != 0)
return -1;
42774: 76ff moveq #-1,%d3 <== NOT EXECUTED 42776: 2d43 fe6c movel %d3,%fp@(-404) <== NOT EXECUTED
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
4277a: 202e fe6c movel %fp@(-404),%d0 <== NOT EXECUTED 4277e: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 <== NOT EXECUTED 42784: 4e5e unlk %fp <== NOT EXECUTED 42786: 4e75 rts <== NOT EXECUTED
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
42788: 200c movel %a4,%d0 4278a: 0280 0000 01ff andil #511,%d0
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
42790: 42a7 clrl %sp@- 42792: 08c0 000f bset #15,%d0 42796: 2f00 movel %d0,%sp@- 42798: 2f2e fffc movel %fp@(-4),%sp@- 4279c: 4878 0006 pea 6 <EXTENDSFDF> 427a0: 486e ffd4 pea %fp@(-44) 427a4: 4eb9 0004 afe6 jsr 4afe6 <IMFS_create_node>
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
427aa: 4fef 0014 lea %sp@(20),%sp 427ae: 2205 movel %d5,%d1
else if (linkflag == REGTYPE) {
const char *name;
loc = root_loc;
if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) {
node = IMFS_create_node(
427b0: 2040 moveal %d0,%a0
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
427b2: d282 addl %d2,%d1
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
427b4: 2147 0050 movel %d7,%a0@(80)
node->info.linearfile.direct = &tar_image[offset];
}
nblocks = (((file_size) + 511) & ~511) / 512;
427b8: 0687 0000 01ff addil #511,%d7
offset += 512 * nblocks;
427be: 0287 ffff fe00 andil #-512,%d7
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
node->info.linearfile.direct = &tar_image[offset];
427c4: 2141 0054 movel %d1,%a0@(84)
}
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
427c8: d487 addl %d7,%d2
&loc,
IMFS_LINEAR_FILE, (char *)name,
(file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG,
NULL
);
node->info.linearfile.size = file_size;
427ca: 42a8 004c clrl %a0@(76) 427ce: 6000 ff50 braw 42720 <rtems_tarfs_load+0x14c>
);
if (status != 0)
return -1;
if (root_loc.ops != &IMFS_ops
&& root_loc.ops != &fifoIMFS_ops)
427d2: 0c80 0006 23fc cmpil #402428,%d0 <== NOT EXECUTED 427d8: 6700 fe42 beqw 4261c <rtems_tarfs_load+0x48> <== NOT EXECUTED
return -1;
427dc: 70ff moveq #-1,%d0 <== NOT EXECUTED 427de: 2d40 fe6c movel %d0,%fp@(-404) <== NOT EXECUTED
nblocks = (((file_size) + 511) & ~511) / 512;
offset += 512 * nblocks;
}
}
return status;
}
427e2: 202e fe6c movel %fp@(-404),%d0 <== NOT EXECUTED 427e6: 4cee 3cfc fe44 moveml %fp@(-444),%d2-%d7/%a2-%a5 <== NOT EXECUTED 427ec: 4e5e unlk %fp <== NOT EXECUTED
0004e488 <rtems_task_mode>:
rtems_status_code rtems_task_mode(
rtems_mode mode_set,
rtems_mode mask,
rtems_mode *previous_mode_set
)
{
4e488: 4e56 ffe4 linkw %fp,#-28 4e48c: 48d7 1c3c moveml %d2-%d5/%a2-%a4,%sp@ 4e490: 2a2e 0008 movel %fp@(8),%d5 4e494: 242e 000c movel %fp@(12),%d2 4e498: 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 )
4e49c: 4a8c tstl %a4 4e49e: 6700 015c beqw 4e5fc <rtems_task_mode+0x174>
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
4e4a2: 2479 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a2
api = executing->API_Extensions[ THREAD_API_RTEMS ];
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4e4a8: 4a2a 0074 tstb %a2@(116) 4e4ac: 57c3 seq %d3
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
executing = _Thread_Executing;
api = executing->API_Extensions[ THREAD_API_RTEMS ];
4e4ae: 266a 010a moveal %a2@(266),%a3
asr = &api->Signal;
old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT;
4e4b2: 49c3 extbl %d3 4e4b4: 0283 0000 0100 andil #256,%d3
if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE )
4e4ba: 4aaa 007a tstl %a2@(122) 4e4be: 6600 00cc bnew 4e58c <rtems_task_mode+0x104>
old_mode |= RTEMS_NO_TIMESLICE;
else
old_mode |= RTEMS_TIMESLICE;
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4e4c2: 4a2b 0008 tstb %a3@(8) 4e4c6: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4e4c8: 4eb9 0004 9ea8 jsr 49ea8 <_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;
4e4ce: 49c4 extbl %d4 4e4d0: 0284 0000 0400 andil #1024,%d4 4e4d6: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4e4d8: 8083 orl %d3,%d0 4e4da: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4e4dc: 0802 0008 btst #8,%d2
4e4e0: 670c beqs 4e4ee <rtems_task_mode+0x66>
executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false;
4e4e2: 0805 0008 btst #8,%d5 4e4e6: 57c0 seq %d0 4e4e8: 4480 negl %d0 4e4ea: 1540 0074 moveb %d0,%a2@(116)
if ( mask & RTEMS_TIMESLICE_MASK ) {
4e4ee: 0802 0009 btst #9,%d2
4e4f2: 6718 beqs 4e50c <rtems_task_mode+0x84>
if ( _Modes_Is_timeslice(mode_set) ) {
4e4f4: 0805 0009 btst #9,%d5 4e4f8: 6700 00f0 beqw 4e5ea <rtems_task_mode+0x162>
executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE;
4e4fc: 7001 moveq #1,%d0
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4e4fe: 41f9 0005 fa94 lea 5fa94 <_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;
4e504: 2540 007a movel %d0,%a2@(122)
executing->cpu_time_budget = _Thread_Ticks_per_timeslice;
4e508: 2550 0076 movel %a0@,%a2@(118)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4e50c: 7007 moveq #7,%d0 4e50e: c082 andl %d2,%d0
4e510: 6712 beqs 4e524 <rtems_task_mode+0x9c>
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4e512: 40c0 movew %sr,%d0
*/
RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
Modes_Control mode_set
)
{
return ( mode_set & RTEMS_INTERRUPT_MASK );
4e514: 7207 moveq #7,%d1 4e516: c285 andl %d5,%d1
*/
RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
Modes_Control mode_set
)
{
_ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
4e518: 0280 0000 f8ff andil #63743,%d0 4e51e: e189 lsll #8,%d1 4e520: 8081 orl %d1,%d0 4e522: 46c0 movew %d0,%sr
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
4e524: 0802 000a btst #10,%d2
4e528: 6754 beqs 4e57e <rtems_task_mode+0xf6>
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4e52a: 4282 clrl %d2 4e52c: 142b 0008 moveb %a3@(8),%d2 4e530: 4280 clrl %d0
* Output:
* *previous_mode_set - previous mode set
* always return RTEMS_SUCCESSFUL;
*/
rtems_status_code rtems_task_mode(
4e532: 0805 000a btst #10,%d5 4e536: 57c1 seq %d1 4e538: 4481 negl %d1
is_asr_enabled = false;
needs_asr_dispatching = false;
if ( mask & RTEMS_ASR_MASK ) {
is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true;
if ( is_asr_enabled != asr->is_enabled ) {
4e53a: 1001 moveb %d1,%d0 4e53c: b082 cmpl %d2,%d0
4e53e: 673e beqs 4e57e <rtems_task_mode+0xf6>
)
{
rtems_signal_set _signals;
ISR_Level _level;
_ISR_Disable( _level );
4e540: 203c 0000 0700 movel #1792,%d0
asr->is_enabled = is_asr_enabled;
4e546: 1741 0008 moveb %d1,%a3@(8) 4e54a: 40c1 movew %sr,%d1 4e54c: 8081 orl %d1,%d0 4e54e: 46c0 movew %d0,%sr
_signals = information->signals_pending;
4e550: 202b 0016 movel %a3@(22),%d0
information->signals_pending = information->signals_posted;
4e554: 276b 0012 0016 movel %a3@(18),%a3@(22)
information->signals_posted = _signals;
4e55a: 2740 0012 movel %d0,%a3@(18)
_ISR_Enable( _level );
4e55e: 46c1 movew %d1,%sr
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4e560: 4aab 0012 tstl %a3@(18) 4e564: 56c0 sne %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4e566: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4e568: 4480 negl %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4e56a: b2b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d1
4e570: 6744 beqs 4e5b6 <rtems_task_mode+0x12e> <== ALWAYS TAKEN
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
4e572: 4280 clrl %d0
}
4e574: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e57a: 4e5e unlk %fp 4e57c: 4e75 rts
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4e57e: 7203 moveq #3,%d1
/*
* This is specific to the RTEMS API
*/
is_asr_enabled = false;
needs_asr_dispatching = false;
4e580: 4200 clrb %d0
needs_asr_dispatching = true;
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
4e582: b2b9 0005 fc4a cmpl 5fc4a <_System_state_Current>,%d1
4e588: 66e8 bnes 4e572 <rtems_task_mode+0xea> <== NEVER TAKEN
4e58a: 602a bras 4e5b6 <rtems_task_mode+0x12e>
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;
4e58c: 4a2b 0008 tstb %a3@(8) 4e590: 57c4 seq %d4
old_mode |= _ISR_Get_level();
4e592: 4eb9 0004 9ea8 jsr 49ea8 <_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;
4e598: 49c4 extbl %d4 4e59a: 0284 0000 0400 andil #1024,%d4
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;
4e5a0: 08c3 0009 bset #9,%d3
old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR;
4e5a4: 8084 orl %d4,%d0
old_mode |= _ISR_Get_level();
4e5a6: 8083 orl %d3,%d0 4e5a8: 2880 movel %d0,%a4@
/*
* These are generic thread scheduling characteristics.
*/
if ( mask & RTEMS_PREEMPT_MASK )
4e5aa: 0802 0008 btst #8,%d2 4e5ae: 6700 ff3e beqw 4e4ee <rtems_task_mode+0x66> 4e5b2: 6000 ff2e braw 4e4e2 <rtems_task_mode+0x5a>
*/
RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void )
{
Thread_Control *executing;
executing = _Thread_Executing;
4e5b6: 2079 0005 ff6c moveal 5ff6c <_Per_CPU_Information+0xc>,%a0
if ( !_States_Is_ready( executing->current_state ) ||
4e5bc: 4aa8 0010 tstl %a0@(16)
4e5c0: 660e bnes 4e5d0 <rtems_task_mode+0x148> <== NEVER TAKEN
4e5c2: b1f9 0005 ff70 cmpal 5ff70 <_Per_CPU_Information+0x10>,%a0
4e5c8: 673e beqs 4e608 <rtems_task_mode+0x180>
( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) {
4e5ca: 4a28 0074 tstb %a0@(116)
4e5ce: 6738 beqs 4e608 <rtems_task_mode+0x180> <== NEVER TAKEN
_Context_Switch_necessary = true;
4e5d0: 7001 moveq #1,%d0 4e5d2: 13c0 0005 ff78 moveb %d0,5ff78 <_Per_CPU_Information+0x18>
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
4e5d8: 4eb9 0004 8744 jsr 48744 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
4e5de: 4280 clrl %d0
}
4e5e0: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e5e6: 4e5e unlk %fp 4e5e8: 4e75 rts
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4e5ea: 7007 moveq #7,%d0 4e5ec: 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;
4e5ee: 42aa 007a clrl %a2@(122)
/*
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK )
4e5f2: 4a80 tstl %d0 4e5f4: 6700 ff2e beqw 4e524 <rtems_task_mode+0x9c> 4e5f8: 6000 ff18 braw 4e512 <rtems_task_mode+0x8a>
bool is_asr_enabled = false;
bool needs_asr_dispatching = false;
rtems_mode old_mode;
if ( !previous_mode_set )
return RTEMS_INVALID_ADDRESS;
4e5fc: 7009 moveq #9,%d0
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
_Thread_Dispatch();
return RTEMS_SUCCESSFUL;
}
4e5fe: 4cee 1c3c ffe4 moveml %fp@(-28),%d2-%d5/%a2-%a4 4e604: 4e5e unlk %fp 4e606: 4e75 rts
}
}
}
if ( _System_state_Is_up( _System_state_Get() ) )
if ( _Thread_Evaluate_mode() || needs_asr_dispatching )
4e608: 4a00 tstb %d0 4e60a: 6700 ff66 beqw 4e572 <rtems_task_mode+0xea>
_Thread_Dispatch();
4e60e: 4eb9 0004 8744 jsr 48744 <_Thread_Dispatch>
return RTEMS_SUCCESSFUL;
4e614: 4280 clrl %d0 4e616: 60c8 bras 4e5e0 <rtems_task_mode+0x158>
0004af0c <rtems_task_set_priority>:
rtems_status_code rtems_task_set_priority(
rtems_id id,
rtems_task_priority new_priority,
rtems_task_priority *old_priority
)
{
4af0c: 4e56 fffc linkw %fp,#-4 4af10: 2f0a movel %a2,%sp@- 4af12: 246e 0010 moveal %fp@(16),%a2 4af16: 2f02 movel %d2,%sp@- 4af18: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
4af1c: 670c beqs 4af2a <rtems_task_set_priority+0x1e>
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
4af1e: 4280 clrl %d0 4af20: 1039 0006 27d2 moveb 627d2 <rtems_maximum_priority>,%d0
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
4af26: b082 cmpl %d2,%d0
4af28: 6566 bcss 4af90 <rtems_task_set_priority+0x84>
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
if ( !old_priority )
4af2a: 4a8a tstl %a2
4af2c: 6770 beqs 4af9e <rtems_task_set_priority+0x92>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
4af2e: 486e fffc pea %fp@(-4) 4af32: 2f2e 0008 movel %fp@(8),%sp@- 4af36: 4eb9 0004 cf34 jsr 4cf34 <_Thread_Get>
switch ( location ) {
4af3c: 508f addql #8,%sp 4af3e: 4aae fffc tstl %fp@(-4)
4af42: 663e bnes 4af82 <rtems_task_set_priority+0x76>
case OBJECTS_LOCAL:
/* XXX need helper to "convert" from core priority */
*old_priority = the_thread->current_priority;
4af44: 2040 moveal %d0,%a0 4af46: 24a8 0014 movel %a0@(20),%a2@
if ( new_priority != RTEMS_CURRENT_PRIORITY ) {
4af4a: 4a82 tstl %d2
4af4c: 6720 beqs 4af6e <rtems_task_set_priority+0x62>
the_thread->real_priority = new_priority;
4af4e: 2142 0018 movel %d2,%a0@(24)
if ( the_thread->resource_count == 0 ||
4af52: 4aa8 001c tstl %a0@(28)
4af56: 6706 beqs 4af5e <rtems_task_set_priority+0x52>
4af58: b4a8 0014 cmpl %a0@(20),%d2
4af5c: 6410 bccs 4af6e <rtems_task_set_priority+0x62> <== ALWAYS TAKEN
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
4af5e: 42a7 clrl %sp@- 4af60: 2f02 movel %d2,%sp@- 4af62: 2f00 movel %d0,%sp@- 4af64: 4eb9 0004 c9dc jsr 4c9dc <_Thread_Change_priority> 4af6a: 4fef 000c lea %sp@(12),%sp
}
_Thread_Enable_dispatch();
4af6e: 4eb9 0004 cf0e jsr 4cf0e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af74: 242e fff4 movel %fp@(-12),%d2
if ( the_thread->resource_count == 0 ||
the_thread->current_priority > new_priority )
_Thread_Change_priority( the_thread, new_priority, false );
}
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
4af78: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af7a: 246e fff8 moveal %fp@(-8),%a2 4af7e: 4e5e unlk %fp 4af80: 4e75 rts 4af82: 242e fff4 movel %fp@(-12),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4af86: 7004 moveq #4,%d0
}
4af88: 246e fff8 moveal %fp@(-8),%a2 4af8c: 4e5e unlk %fp 4af8e: 4e75 rts 4af90: 242e fff4 movel %fp@(-12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( new_priority != RTEMS_CURRENT_PRIORITY &&
!_RTEMS_tasks_Priority_is_valid( new_priority ) )
return RTEMS_INVALID_PRIORITY;
4af94: 7013 moveq #19,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4af96: 246e fff8 moveal %fp@(-8),%a2 4af9a: 4e5e unlk %fp 4af9c: 4e75 rts 4af9e: 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 )
return RTEMS_INVALID_ADDRESS;
4afa2: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4afa4: 246e fff8 moveal %fp@(-8),%a2
4afa8: 4e5e unlk %fp <== NOT EXECUTED
00046af4 <rtems_task_start>:
rtems_status_code rtems_task_start(
rtems_id id,
rtems_task_entry entry_point,
rtems_task_argument argument
)
{
46af4: 4e56 fffc linkw %fp,#-4 46af8: 2f02 movel %d2,%sp@- 46afa: 242e 000c movel %fp@(12),%d2
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
46afe: 674a beqs 46b4a <rtems_task_start+0x56> <== NEVER TAKEN
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get( id, &location );
46b00: 486e fffc pea %fp@(-4) 46b04: 2f2e 0008 movel %fp@(8),%sp@- 46b08: 4eb9 0004 88d4 jsr 488d4 <_Thread_Get>
switch ( location ) {
46b0e: 508f addql #8,%sp 46b10: 4aae fffc tstl %fp@(-4)
46b14: 662a bnes 46b40 <rtems_task_start+0x4c>
case OBJECTS_LOCAL:
if ( _Thread_Start(
46b16: 2f2e 0010 movel %fp@(16),%sp@- 46b1a: 42a7 clrl %sp@- 46b1c: 2f02 movel %d2,%sp@- 46b1e: 42a7 clrl %sp@- 46b20: 2f00 movel %d0,%sp@- 46b22: 4eb9 0004 94f4 jsr 494f4 <_Thread_Start> 46b28: 4fef 0014 lea %sp@(20),%sp 46b2c: 4a00 tstb %d0
46b2e: 6624 bnes 46b54 <rtems_task_start+0x60>
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
46b30: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46b36: 242e fff8 movel %fp@(-8),%d2
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
46b3a: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46b3c: 4e5e unlk %fp 46b3e: 4e75 rts 46b40: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
46b44: 7004 moveq #4,%d0
}
46b46: 4e5e unlk %fp 46b48: 4e75 rts 46b4a: 242e fff8 movel %fp@(-8),%d2
{
register Thread_Control *the_thread;
Objects_Locations location;
if ( entry_point == NULL )
return RTEMS_INVALID_ADDRESS;
46b4e: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46b50: 4e5e unlk %fp 46b52: 4e75 rts
switch ( location ) {
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
46b54: 4eb9 0004 88ae jsr 488ae <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46b5a: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_LOCAL:
if ( _Thread_Start(
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
46b5e: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
46b60: 4e5e unlk %fp <== NOT EXECUTED
00047788 <rtems_task_variable_delete>:
rtems_status_code rtems_task_variable_delete(
rtems_id tid,
void **ptr
)
{
47788: 4e56 fffc linkw %fp,#-4 4778c: 2f02 movel %d2,%sp@- 4778e: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
47792: 6772 beqs 47806 <rtems_task_variable_delete+0x7e>
return RTEMS_INVALID_ADDRESS;
prev = NULL;
the_thread = _Thread_Get (tid, &location);
47794: 486e fffc pea %fp@(-4) 47798: 2f2e 0008 movel %fp@(8),%sp@- 4779c: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get>
switch (location) {
477a2: 508f addql #8,%sp 477a4: 4aae fffc tstl %fp@(-4)
477a8: 6634 bnes 477de <rtems_task_variable_delete+0x56>
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
477aa: 2040 moveal %d0,%a0 477ac: 2268 0116 moveal %a0@(278),%a1
while (tvp) {
477b0: 4a89 tstl %a1
477b2: 671a beqs 477ce <rtems_task_variable_delete+0x46>
if (tvp->ptr == ptr) {
477b4: b4a9 0004 cmpl %a1@(4),%d2
477b8: 6756 beqs 47810 <rtems_task_variable_delete+0x88><== NEVER TAKEN
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
477ba: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
477bc: 4a88 tstl %a0
477be: 670e beqs 477ce <rtems_task_variable_delete+0x46><== NEVER TAKEN
if (tvp->ptr == ptr) {
477c0: b4a8 0004 cmpl %a0@(4),%d2
477c4: 6722 beqs 477e8 <rtems_task_variable_delete+0x60>
477c6: 2248 moveal %a0,%a1
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
477c8: 2051 moveal %a1@,%a0
the_thread = _Thread_Get (tid, &location);
switch (location) {
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
477ca: 4a88 tstl %a0
477cc: 66f2 bnes 477c0 <rtems_task_variable_delete+0x38><== ALWAYS TAKEN
return RTEMS_SUCCESSFUL;
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
477ce: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477d4: 242e fff8 movel %fp@(-8),%d2
}
prev = tvp;
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
477d8: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477da: 4e5e unlk %fp 477dc: 4e75 rts 477de: 242e fff8 movel %fp@(-8),%d2
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
477e2: 7004 moveq #4,%d0
}
477e4: 4e5e unlk %fp 477e6: 4e75 rts
case OBJECTS_LOCAL:
tvp = the_thread->task_variables;
while (tvp) {
if (tvp->ptr == ptr) {
if (prev)
prev->next = tvp->next;
477e8: 2290 movel %a0@,%a1@
else
the_thread->task_variables = (rtems_task_variable_t *)tvp->next;
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
477ea: 2f08 movel %a0,%sp@- 477ec: 2f00 movel %d0,%sp@- 477ee: 4eb9 0004 78bc jsr 478bc <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
477f4: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
477fa: 508f addql #8,%sp 477fc: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
477fe: 242e fff8 movel %fp@(-8),%d2 47802: 4e5e unlk %fp 47804: 4e75 rts 47806: 242e fff8 movel %fp@(-8),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp, *prev;
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
4780a: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4780c: 4e5e unlk %fp 4780e: 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;
47810: 2040 moveal %d0,%a0 47812: 2151 0116 movel %a1@,%a0@(278) 47816: 2049 moveal %a1,%a0
_RTEMS_Tasks_Invoke_task_variable_dtor( the_thread, tvp );
47818: 2f08 movel %a0,%sp@- 4781a: 2f00 movel %d0,%sp@- 4781c: 4eb9 0004 78bc jsr 478bc <_RTEMS_Tasks_Invoke_task_variable_dtor>
_Thread_Enable_dispatch();
47822: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
47828: 508f addql #8,%sp 4782a: 4280 clrl %d0 4782c: 60d0 bras 477fe <rtems_task_variable_delete+0x76>
...
00047830 <rtems_task_variable_get>:
rtems_status_code rtems_task_variable_get(
rtems_id tid,
void **ptr,
void **result
)
{
47830: 4e56 fffc linkw %fp,#-4 47834: 2f0a movel %a2,%sp@- 47836: 246e 0010 moveal %fp@(16),%a2 4783a: 2f02 movel %d2,%sp@- 4783c: 242e 000c movel %fp@(12),%d2
Thread_Control *the_thread;
Objects_Locations location;
rtems_task_variable_t *tvp;
if ( !ptr )
47840: 6752 beqs 47894 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
if ( !result )
47842: 4a8a tstl %a2
47844: 674e beqs 47894 <rtems_task_variable_get+0x64>
return RTEMS_INVALID_ADDRESS;
the_thread = _Thread_Get (tid, &location);
47846: 486e fffc pea %fp@(-4) 4784a: 2f2e 0008 movel %fp@(8),%sp@- 4784e: 4eb9 0004 95a4 jsr 495a4 <_Thread_Get>
switch (location) {
47854: 508f addql #8,%sp 47856: 4aae fffc tstl %fp@(-4)
4785a: 662a bnes 47886 <rtems_task_variable_get+0x56>
case OBJECTS_LOCAL:
/*
* Figure out if the variable is in this task's list.
*/
tvp = the_thread->task_variables;
4785c: 2240 moveal %d0,%a1 4785e: 2069 0116 moveal %a1@(278),%a0
while (tvp) {
47862: 4a88 tstl %a0
47864: 670c beqs 47872 <rtems_task_variable_get+0x42>
if (tvp->ptr == ptr) {
47866: b4a8 0004 cmpl %a0@(4),%d2
4786a: 6736 beqs 478a2 <rtems_task_variable_get+0x72>
*/
*result = tvp->tval;
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
4786c: 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) {
4786e: 4a88 tstl %a0
47870: 66f4 bnes 47866 <rtems_task_variable_get+0x36> <== ALWAYS TAKEN
_Thread_Enable_dispatch();
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
47872: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
47878: 242e fff4 movel %fp@(-12),%d2
return RTEMS_SUCCESSFUL;
}
tvp = (rtems_task_variable_t *)tvp->next;
}
_Thread_Enable_dispatch();
return RTEMS_INVALID_ADDRESS;
4787c: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4787e: 246e fff8 moveal %fp@(-8),%a2 47882: 4e5e unlk %fp 47884: 4e75 rts 47886: 242e fff4 movel %fp@(-12),%d2
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
4788a: 7004 moveq #4,%d0
}
4788c: 246e fff8 moveal %fp@(-8),%a2 47890: 4e5e unlk %fp 47892: 4e75 rts 47894: 242e fff4 movel %fp@(-12),%d2
if ( !ptr )
return RTEMS_INVALID_ADDRESS;
if ( !result )
return RTEMS_INVALID_ADDRESS;
47898: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
4789a: 246e fff8 moveal %fp@(-8),%a2 4789e: 4e5e unlk %fp 478a0: 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;
478a2: 24a8 000c movel %a0@(12),%a2@
_Thread_Enable_dispatch();
478a6: 4eb9 0004 957e jsr 4957e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478ac: 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();
return RTEMS_SUCCESSFUL;
478b0: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
478b2: 246e fff8 moveal %fp@(-8),%a2 478b6: 4e5e unlk %fp
...
00045574 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45574: 7209 moveq #9,%d1
#include <rtems/termiostypes.h>
int rtems_termios_baud_to_index(
rtems_termios_baud_t termios_baud
)
{
45576: 4e56 0000 linkw %fp,#0 4557a: 202e 0008 movel %fp@(8),%d0
int baud_index;
switch (termios_baud) {
4557e: b280 cmpl %d0,%d1 45580: 6700 010a beqw 4568c <rtems_termios_baud_to_index+0x118>
45584: 6c32 bges 455b8 <rtems_termios_baud_to_index+0x44>
45586: 720e moveq #14,%d1 45588: b280 cmpl %d0,%d1 4558a: 6700 00d6 beqw 45662 <rtems_termios_baud_to_index+0xee>
4558e: 6c56 bges 455e6 <rtems_termios_baud_to_index+0x72>
45590: 0c80 0000 1002 cmpil #4098,%d0 45596: 6700 00e2 beqw 4567a <rtems_termios_baud_to_index+0x106> 4559a: 6f00 0098 blew 45634 <rtems_termios_baud_to_index+0xc0> 4559e: 0c80 0000 1003 cmpil #4099,%d0 455a4: 6700 00b6 beqw 4565c <rtems_termios_baud_to_index+0xe8> 455a8: 0c80 0000 1004 cmpil #4100,%d0 455ae: 6700 009a beqw 4564a <rtems_termios_baud_to_index+0xd6>
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;
default: baud_index = -1; break;
455b2: 70ff moveq #-1,%d0
}
return baud_index;
}
455b4: 4e5e unlk %fp 455b6: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
455b8: 123c 0004 moveb #4,%d1 455bc: b280 cmpl %d0,%d1 455be: 6700 00d2 beqw 45692 <rtems_termios_baud_to_index+0x11e>
455c2: 6d46 blts 4560a <rtems_termios_baud_to_index+0x96>
455c4: 123c 0001 moveb #1,%d1 455c8: b280 cmpl %d0,%d1 455ca: 6700 00a2 beqw 4566e <rtems_termios_baud_to_index+0xfa> 455ce: 6c00 00c8 bgew 45698 <rtems_termios_baud_to_index+0x124> 455d2: 7202 moveq #2,%d1 455d4: b280 cmpl %d0,%d1
455d6: 677e beqs 45656 <rtems_termios_baud_to_index+0xe2>
455d8: 123c 0003 moveb #3,%d1 455dc: b280 cmpl %d0,%d1
455de: 66d2 bnes 455b2 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
case B110: baud_index = 3; break;
455e0: 7003 moveq #3,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
455e2: 4e5e unlk %fp 455e4: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
455e6: 123c 000b moveb #11,%d1 455ea: b280 cmpl %d0,%d1 455ec: 6700 0086 beqw 45674 <rtems_termios_baud_to_index+0x100>
455f0: 6e3c bgts 4562e <rtems_termios_baud_to_index+0xba>
455f2: 123c 000c moveb #12,%d1 455f6: b280 cmpl %d0,%d1 455f8: 6700 008c beqw 45686 <rtems_termios_baud_to_index+0x112> 455fc: 123c 000d moveb #13,%d1 45600: b280 cmpl %d0,%d1
45602: 66ae bnes 455b2 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
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;
45604: 700d moveq #13,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45606: 4e5e unlk %fp 45608: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4560a: 7206 moveq #6,%d1 4560c: b280 cmpl %d0,%d1
4560e: 6758 beqs 45668 <rtems_termios_baud_to_index+0xf4> 45610: 6e16 bgts 45628 <rtems_termios_baud_to_index+0xb4>
45612: 123c 0007 moveb #7,%d1 45616: b280 cmpl %d0,%d1
45618: 6766 beqs 45680 <rtems_termios_baud_to_index+0x10c>
4561a: 123c 0008 moveb #8,%d1 4561e: b280 cmpl %d0,%d1
45620: 6690 bnes 455b2 <rtems_termios_baud_to_index+0x3e><== NEVER TAKEN
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;
45622: 7008 moveq #8,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45624: 4e5e unlk %fp 45626: 4e75 rts
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;
45628: 7005 moveq #5,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4562a: 4e5e unlk %fp 4562c: 4e75 rts
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;
4562e: 700a moveq #10,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45630: 4e5e unlk %fp 45632: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45634: 720f moveq #15,%d1 45636: b280 cmpl %d0,%d1
45638: 6716 beqs 45650 <rtems_termios_baud_to_index+0xdc>
4563a: 0c80 0000 1001 cmpil #4097,%d0 45640: 6600 ff70 bnew 455b2 <rtems_termios_baud_to_index+0x3e>
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;
45644: 7010 moveq #16,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45646: 4e5e unlk %fp 45648: 4e75 rts
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;
4564a: 7013 moveq #19,%d0
default: baud_index = -1; break;
}
return baud_index;
}
4564c: 4e5e unlk %fp 4564e: 4e75 rts
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;
45650: 700f moveq #15,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45652: 4e5e unlk %fp 45654: 4e75 rts
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
case B75: baud_index = 2; break;
45656: 7002 moveq #2,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45658: 4e5e unlk %fp 4565a: 4e75 rts
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;
4565c: 7012 moveq #18,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4565e: 4e5e unlk %fp 45660: 4e75 rts
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;
45662: 700e moveq #14,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45664: 4e5e unlk %fp 45666: 4e75 rts
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;
45668: 7006 moveq #6,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4566a: 4e5e unlk %fp 4566c: 4e75 rts
{
int baud_index;
switch (termios_baud) {
case B0: baud_index = 0; break;
case B50: baud_index = 1; break;
4566e: 7001 moveq #1,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45670: 4e5e unlk %fp 45672: 4e75 rts
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;
45674: 700b moveq #11,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45676: 4e5e unlk %fp 45678: 4e75 rts
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;
4567a: 7011 moveq #17,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4567c: 4e5e unlk %fp 4567e: 4e75 rts
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;
45680: 7007 moveq #7,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45682: 4e5e unlk %fp 45684: 4e75 rts
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;
45686: 700c moveq #12,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45688: 4e5e unlk %fp 4568a: 4e75 rts
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;
4568c: 7009 moveq #9,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
4568e: 4e5e unlk %fp 45690: 4e75 rts
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;
45692: 7004 moveq #4,%d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
45694: 4e5e unlk %fp 45696: 4e75 rts
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
45698: 4a80 tstl %d0 4569a: 6600 ff16 bnew 455b2 <rtems_termios_baud_to_index+0x3e>
case B0: baud_index = 0; break;
4569e: 4280 clrl %d0
case B460800: baud_index = 19; break;
default: baud_index = -1; break;
}
return baud_index;
}
456a0: 4e5e unlk %fp <== NOT EXECUTED
00043d10 <rtems_termios_baud_to_number>:
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
43d10: 203c 0000 04b0 movel #1200,%d0
#include <rtems/termiostypes.h>
int32_t rtems_termios_baud_to_number(
int termios_baud
)
{
43d16: 4e56 0000 linkw %fp,#0 43d1a: 222e 0008 movel %fp@(8),%d1 43d1e: 2f02 movel %d2,%sp@-
int32_t baud;
switch (termios_baud) {
43d20: 7409 moveq #9,%d2 43d22: b481 cmpl %d1,%d2
43d24: 6740 beqs 43d66 <rtems_termios_baud_to_number+0x56>
43d26: 6c44 bges 43d6c <rtems_termios_baud_to_number+0x5c>
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;
43d28: 203c 0000 4b00 movel #19200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d2e: 740e moveq #14,%d2 43d30: b481 cmpl %d1,%d2
43d32: 6732 beqs 43d66 <rtems_termios_baud_to_number+0x56>
43d34: 6c68 bges 43d9e <rtems_termios_baud_to_number+0x8e>
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;
43d36: 203c 0001 c200 movel #115200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d3c: 0c81 0000 1002 cmpil #4098,%d1
43d42: 6722 beqs 43d66 <rtems_termios_baud_to_number+0x56>
43d44: 6f00 00c0 blew 43e06 <rtems_termios_baud_to_number+0xf6>
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;
43d48: 203c 0003 8400 movel #230400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d4e: 0c81 0000 1003 cmpil #4099,%d1
43d54: 6710 beqs 43d66 <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;
43d56: 203c 0007 0800 movel #460800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d5c: 0c81 0000 1004 cmpil #4100,%d1
43d62: 6702 beqs 43d66 <rtems_termios_baud_to_number+0x56><== ALWAYS TAKEN
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default: baud = -1; break;
43d64: 70ff moveq #-1,%d0
}
return baud;
}
43d66: 241f movel %sp@+,%d2 43d68: 4e5e unlk %fp 43d6a: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d6c: 143c 0004 moveb #4,%d2
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
43d70: 303c 0086 movew #134,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d74: b481 cmpl %d1,%d2
43d76: 67ee beqs 43d66 <rtems_termios_baud_to_number+0x56> 43d78: 6d54 blts 43dce <rtems_termios_baud_to_number+0xbe>
43d7a: 103c 0001 moveb #1,%d0 43d7e: b081 cmpl %d1,%d0 43d80: 6700 00a6 beqw 43e28 <rtems_termios_baud_to_number+0x118> 43d84: 6c00 00b2 bgew 43e38 <rtems_termios_baud_to_number+0x128> 43d88: 7402 moveq #2,%d2 43d8a: b481 cmpl %d1,%d2 43d8c: 6700 00a2 beqw 43e30 <rtems_termios_baud_to_number+0x120> 43d90: 7003 moveq #3,%d0 43d92: b081 cmpl %d1,%d0
43d94: 66ce bnes 43d64 <rtems_termios_baud_to_number+0x54><== NEVER TAKEN
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43d96: 241f movel %sp@+,%d2
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
case B75: baud = 75; break;
case B110: baud = 110; break;
43d98: 706e moveq #110,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43d9a: 4e5e unlk %fp 43d9c: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43d9e: 143c 000b moveb #11,%d2
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
43da2: 303c 0960 movew #2400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43da6: b481 cmpl %d1,%d2
43da8: 67bc beqs 43d66 <rtems_termios_baud_to_number+0x56>
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;
43daa: 303c 0708 movew #1800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dae: b481 cmpl %d1,%d2
43db0: 6eb4 bgts 43d66 <rtems_termios_baud_to_number+0x56>
43db2: 143c 000c moveb #12,%d2
case B300: baud = 300; break;
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
43db6: 303c 12c0 movew #4800,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dba: b481 cmpl %d1,%d2
43dbc: 67a8 beqs 43d66 <rtems_termios_baud_to_number+0x56>
43dbe: 143c 000d moveb #13,%d2
case B600: baud = 600; break;
case B1200: baud = 1200; break;
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
43dc2: 303c 2580 movew #9600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dc6: b481 cmpl %d1,%d2
43dc8: 679c beqs 43d66 <rtems_termios_baud_to_number+0x56><== ALWAYS TAKEN
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default: baud = -1; break;
43dca: 70ff moveq #-1,%d0 <== NOT EXECUTED 43dcc: 6098 bras 43d66 <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
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;
43dce: 203c 0000 00c8 movel #200,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dd4: 7406 moveq #6,%d2 43dd6: b481 cmpl %d1,%d2
43dd8: 678c beqs 43d66 <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;
case B150: baud = 150; break;
43dda: 0680 ffff ffce addil #-50,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43de0: b481 cmpl %d1,%d2
43de2: 6e82 bgts 43d66 <rtems_termios_baud_to_number+0x56>
43de4: 143c 0007 moveb #7,%d2
case B75: baud = 75; break;
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
43de8: 303c 012c movew #300,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dec: b481 cmpl %d1,%d2 43dee: 6700 ff76 beqw 43d66 <rtems_termios_baud_to_number+0x56> 43df2: 143c 0008 moveb #8,%d2
case B110: baud = 110; break;
case B134: baud = 134; break;
case B150: baud = 150; break;
case B200: baud = 200; break;
case B300: baud = 300; break;
case B600: baud = 600; break;
43df6: 303c 0258 movew #600,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43dfa: b481 cmpl %d1,%d2 43dfc: 6700 ff68 beqw 43d66 <rtems_termios_baud_to_number+0x56>
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default: baud = -1; break;
43e00: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e02: 6000 ff62 braw 43d66 <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e06: 740f moveq #15,%d2
case B1800: baud = 1800; break;
case B2400: baud = 2400; break;
case B4800: baud = 4800; break;
case B9600: baud = 9600; break;
case B19200: baud = 19200; break;
case B38400: baud = 38400; break;
43e08: 203c 0000 9600 movel #38400,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e0e: b481 cmpl %d1,%d2 43e10: 6700 ff54 beqw 43d66 <rtems_termios_baud_to_number+0x56>
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;
43e14: 303c e100 movew #-7936,%d0
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e18: 0c81 0000 1001 cmpil #4097,%d1 43e1e: 6700 ff46 beqw 43d66 <rtems_termios_baud_to_number+0x56>
case B38400: baud = 38400; break;
case B57600: baud = 57600; break;
case B115200: baud = 115200; break;
case B230400: baud = 230400; break;
case B460800: baud = 460800; break;
default: baud = -1; break;
43e22: 70ff moveq #-1,%d0 <== NOT EXECUTED 43e24: 6000 ff40 braw 43d66 <rtems_termios_baud_to_number+0x56><== NOT EXECUTED
}
return baud;
}
43e28: 241f movel %sp@+,%d2
{
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
case B50: baud = 50; break;
43e2a: 7032 moveq #50,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e2c: 4e5e unlk %fp 43e2e: 4e75 rts 43e30: 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;
43e32: 704b moveq #75,%d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e34: 4e5e unlk %fp 43e36: 4e75 rts
int termios_baud
)
{
int32_t baud;
switch (termios_baud) {
43e38: 4a81 tstl %d1 43e3a: 6600 ff28 bnew 43d64 <rtems_termios_baud_to_number+0x54>
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e3e: 241f movel %sp@+,%d2
)
{
int32_t baud;
switch (termios_baud) {
case B0: baud = 0; break;
43e40: 4280 clrl %d0
case B460800: baud = 460800; break;
default: baud = -1; break;
}
return baud;
}
43e42: 4e5e unlk %fp
...
000444d8 <rtems_termios_bufsize>:
{
rtems_termios_cbufsize = cbufsize;
rtems_termios_raw_input_size = raw_input;
rtems_termios_raw_output_size = raw_output;
return RTEMS_SUCCESSFUL;
}
444d8: 4280 clrl %d0 <== NOT EXECUTED
rtems_status_code rtems_termios_bufsize (
int cbufsize,
int raw_input,
int raw_output
)
{
444da: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED
rtems_termios_cbufsize = cbufsize;
444de: 41ee 0008 lea %fp@(8),%a0 <== NOT EXECUTED 444e2: 23d0 0005 e380 movel %a0@,5e380 <rtems_termios_cbufsize> <== NOT EXECUTED
rtems_termios_raw_input_size = raw_input;
444e8: 41ee 000c lea %fp@(12),%a0 <== NOT EXECUTED 444ec: 23d0 0005 e384 movel %a0@,5e384 <rtems_termios_raw_input_size><== NOT EXECUTED
rtems_termios_raw_output_size = raw_output;
444f2: 41ee 0010 lea %fp@(16),%a0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
444f6: 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;
444f8: 23d0 0005 e388 movel %a0@,5e388 <rtems_termios_raw_output_size><== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
0004433a <rtems_termios_close>:
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4433a: 4e56 fff4 linkw %fp,#-12 4433e: 48d7 1c00 moveml %a2-%a4,%sp@ 44342: 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(
44346: 49f9 0004 6648 lea 46648 <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;
4434c: 2053 moveal %a3@,%a0 4434e: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain(
44352: 42a7 clrl %sp@- 44354: 42a7 clrl %sp@- 44356: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- 4435c: 4e94 jsr %a4@
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
4435e: 4fef 000c lea %sp@(12),%sp 44362: 4a80 tstl %d0 44364: 6600 011c bnew 44482 <rtems_termios_close+0x148>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
44368: 202a 0008 movel %a2@(8),%d0 4436c: 5380 subql #1,%d0 4436e: 2540 0008 movel %d0,%a2@(8) 44372: 6600 00a4 bnew 44418 <rtems_termios_close+0xde>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
44376: 202a 00cc movel %a2@(204),%d0 4437a: eb88 lsll #5,%d0 4437c: 0680 0005 f190 addil #389520,%d0 44382: 2240 moveal %d0,%a1 44384: 2051 moveal %a1@,%a0 44386: 4a88 tstl %a0 44388: 6700 0128 beqw 444b2 <rtems_termios_close+0x178>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4438c: 2f0a movel %a2,%sp@- 4438e: 4e90 jsr %a0@ 44390: 588f addql #4,%sp
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44392: 7002 moveq #2,%d0 44394: b0aa 00b4 cmpl %a2@(180),%d0 44398: 6700 00c0 beqw 4445a <rtems_termios_close+0x120>
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
4439c: 206a 009c moveal %a2@(156),%a0 443a0: 4a88 tstl %a0
443a2: 6710 beqs 443b4 <rtems_termios_close+0x7a>
(*tty->device.lastClose)(tty->major, tty->minor, arg);
443a4: 2f0b movel %a3,%sp@- 443a6: 2f2a 0010 movel %a2@(16),%sp@- 443aa: 2f2a 000c movel %a2@(12),%sp@- 443ae: 4e90 jsr %a0@ 443b0: 4fef 000c lea %sp@(12),%sp
if (tty->forw == NULL) {
443b4: 2052 moveal %a2@,%a0 443b6: 4a88 tstl %a0 443b8: 6700 00e2 beqw 4449c <rtems_termios_close+0x162>
rtems_termios_ttyTail = tty->back;
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
} else {
tty->forw->back = tty->back;
443bc: 216a 0004 0004 movel %a2@(4),%a0@(4) 443c2: 226a 0004 moveal %a2@(4),%a1
}
if (tty->back == NULL) {
443c6: 4a89 tstl %a1 443c8: 6700 00c0 beqw 4448a <rtems_termios_close+0x150>
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
443cc: 2288 movel %a0,%a1@ <== NOT EXECUTED
}
rtems_semaphore_delete (tty->isem);
443ce: 2f2a 0014 movel %a2@(20),%sp@- 443d2: 47f9 0004 6570 lea 46570 <rtems_semaphore_delete>,%a3 443d8: 4e93 jsr %a3@
rtems_semaphore_delete (tty->osem);
443da: 2f2a 0018 movel %a2@(24),%sp@- 443de: 4e93 jsr %a3@
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
443e0: 2f2a 008c movel %a2@(140),%sp@- 443e4: 4e93 jsr %a3@
if ((tty->device.pollRead == NULL) ||
443e6: 4fef 000c lea %sp@(12),%sp 443ea: 4aaa 00a0 tstl %a2@(160)
443ee: 6740 beqs 44430 <rtems_termios_close+0xf6>
443f0: 7002 moveq #2,%d0 443f2: b0aa 00b4 cmpl %a2@(180),%d0
443f6: 6738 beqs 44430 <rtems_termios_close+0xf6>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
free (tty->rawInBuf.theBuf);
443f8: 2f2a 0058 movel %a2@(88),%sp@- 443fc: 47f9 0004 2db8 lea 42db8 <free>,%a3 44402: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44404: 2f2a 007c movel %a2@(124),%sp@- 44408: 4e93 jsr %a3@
free (tty->cbuf);
4440a: 2f2a 001c movel %a2@(28),%sp@- 4440e: 4e93 jsr %a3@
free (tty);
44410: 2f0a movel %a2,%sp@- 44412: 4e93 jsr %a3@ 44414: 4fef 0010 lea %sp@(16),%sp
} rtems_semaphore_release (rtems_termios_ttyMutex);
44418: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- 4441e: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
44424: 4cee 1c00 fff4 moveml %fp@(-12),%a2-%a4 4442a: 4280 clrl %d0 4442c: 4e5e unlk %fp 4442e: 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);
44430: 2f2a 0068 movel %a2@(104),%sp@- 44434: 4e93 jsr %a3@ 44436: 588f addql #4,%sp
free (tty->rawInBuf.theBuf);
44438: 47f9 0004 2db8 lea 42db8 <free>,%a3 4443e: 2f2a 0058 movel %a2@(88),%sp@- 44442: 4e93 jsr %a3@
free (tty->rawOutBuf.theBuf);
44444: 2f2a 007c movel %a2@(124),%sp@- 44448: 4e93 jsr %a3@
free (tty->cbuf);
4444a: 2f2a 001c movel %a2@(28),%sp@- 4444e: 4e93 jsr %a3@
free (tty);
44450: 2f0a movel %a2,%sp@- 44452: 4e93 jsr %a3@ 44454: 4fef 0010 lea %sp@(16),%sp 44458: 60be bras 44418 <rtems_termios_close+0xde>
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT );
4445a: 4878 0001 pea 1 <ADD> 4445e: 49f9 0004 6138 lea 46138 <rtems_event_send>,%a4 44464: 2f2a 00c4 movel %a2@(196),%sp@- 44468: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
4446a: 508f addql #8,%sp 4446c: 4a80 tstl %d0
4446e: 6612 bnes 44482 <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT );
44470: 4878 0001 pea 1 <ADD> 44474: 2f2a 00c8 movel %a2@(200),%sp@- 44478: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL)
4447a: 508f addql #8,%sp 4447c: 4a80 tstl %d0 4447e: 6700 ff1c beqw 4439c <rtems_termios_close+0x62>
rtems_fatal_error_occurred (sc);
44482: 2f00 movel %d0,%sp@- <== NOT EXECUTED 44484: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
} else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
4448a: 23c8 0005 f9d0 movel %a0,5f9d0 <rtems_termios_ttyHead>
if ( rtems_termios_ttyHead != NULL ) {
44490: 6700 ff3c beqw 443ce <rtems_termios_close+0x94>
rtems_termios_ttyHead->back = NULL;
44494: 42a8 0004 clrl %a0@(4) 44498: 6000 ff34 braw 443ce <rtems_termios_close+0x94>
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
rtems_termios_ttyTail = tty->back;
4449c: 226a 0004 moveal %a2@(4),%a1 444a0: 23c9 0005 f9cc movel %a1,5f9cc <rtems_termios_ttyTail>
if ( rtems_termios_ttyTail != NULL ) {
444a6: 67e2 beqs 4448a <rtems_termios_close+0x150> <== ALWAYS TAKEN
rtems_termios_ttyTail->forw = NULL;
444a8: 4291 clrl %a1@ <== NOT EXECUTED 444aa: 2052 moveal %a2@,%a0 <== NOT EXECUTED
rtems_termios_ttyHead = tty->forw;
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
} else {
tty->back->forw = tty->forw;
444ac: 2288 movel %a0,%a1@ <== NOT EXECUTED 444ae: 6000 ff1e braw 443ce <rtems_termios_close+0x94> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
} else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
444b2: 42a7 clrl %sp@- 444b4: 42a7 clrl %sp@- 444b6: 2f2a 0018 movel %a2@(24),%sp@- 444ba: 4e94 jsr %a4@
if (sc != RTEMS_SUCCESSFUL) {
444bc: 4fef 000c lea %sp@(12),%sp 444c0: 4a80 tstl %d0
444c2: 66be bnes 44482 <rtems_termios_close+0x148> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
444c4: 2f0a movel %a2,%sp@- 444c6: 4eba f9bc jsr %pc@(43e84 <drainOutput>) 444ca: 588f addql #4,%sp
}
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
444cc: 7002 moveq #2,%d0 444ce: b0aa 00b4 cmpl %a2@(180),%d0 444d2: 6600 fec8 bnew 4439c <rtems_termios_close+0x62> 444d6: 6082 bras 4445a <rtems_termios_close+0x120>
00045b16 <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)
{
45b16: 4e56 0000 linkw %fp,#0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45b1a: 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)
{
45b1e: 206e 0008 moveal %fp@(8),%a0
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
45b22: d1a8 0090 addl %d0,%a0@(144)
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
45b26: 7002 moveq #2,%d0 45b28: b0a8 00b4 cmpl %a0@(180),%d0
45b2c: 672a beqs 45b58 <rtems_termios_dequeue_characters+0x42>
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
return 0; /* nothing to output in IRQ... */
}
if (tty->t_line == PPPDISC ) {
45b2e: 7005 moveq #5,%d0 45b30: b0a8 00cc cmpl %a0@(204),%d0
45b34: 670c beqs 45b42 <rtems_termios_dequeue_characters+0x2c>
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
45b36: 2d48 0008 movel %a0,%fp@(8)
}
45b3a: 4e5e unlk %fp
rtems_termios_linesw[tty->t_line].l_start(tty);
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
45b3c: 4ef9 0004 5862 jmp 45862 <rtems_termios_refill_transmitter>
if (tty->t_line == PPPDISC ) {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45b42: 2279 0005 f240 moveal 5f240 <rtems_termios_linesw+0xb4>,%a1 45b48: 4a89 tstl %a1
45b4a: 6706 beqs 45b52 <rtems_termios_dequeue_characters+0x3c><== NEVER TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45b4c: 2f08 movel %a0,%sp@- 45b4e: 4e91 jsr %a1@ 45b50: 588f addql #4,%sp
}
return 0; /* nothing to output in IRQ... */
}
return rtems_termios_refill_transmitter(tty);
}
45b52: 4280 clrl %d0 45b54: 4e5e unlk %fp 45b56: 4e75 rts
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT);
45b58: 4878 0002 pea 2 <DOUBLE_FLOAT> 45b5c: 2f28 00c8 movel %a0@(200),%sp@- 45b60: 4eb9 0004 6138 jsr 46138 <rtems_event_send>
if (sc != RTEMS_SUCCESSFUL)
45b66: 508f addql #8,%sp 45b68: 4a80 tstl %d0
45b6a: 67e6 beqs 45b52 <rtems_termios_dequeue_characters+0x3c><== ALWAYS TAKEN
rtems_fatal_error_occurred (sc);
45b6c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 45b6e: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
00045514 <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)
{
45514: 4e56 ffcc linkw %fp,#-52 45518: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 4551c: 246e 0008 moveal %fp@(8),%a2
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
45520: 202a 00cc movel %a2@(204),%d0 45524: eb88 lsll #5,%d0
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
45526: 266e 000c moveal %fp@(12),%a3
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
4552a: 0680 0005 f19c addil #389532,%d0 45530: 2240 moveal %d0,%a1
* 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)
{
45532: 242e 0010 movel %fp@(16),%d2
char c;
int dropped = 0;
bool flow_rcv = false; /* true, if flow control char received */
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
45536: 2051 moveal %a1@,%a0 45538: 4a88 tstl %a0
4553a: 6774 beqs 455b0 <rtems_termios_enqueue_raw_characters+0x9c>
while (len--) {
4553c: 4a82 tstl %d2
4553e: 6734 beqs 45574 <rtems_termios_enqueue_raw_characters+0x60><== NEVER TAKEN
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
45540: 2f0a movel %a2,%sp@- 45542: 5382 subql #1,%d2 45544: 121b moveb %a3@+,%d1 45546: 49c1 extbl %d1 45548: 2f01 movel %d1,%sp@- 4554a: 4e90 jsr %a0@
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--) {
4554c: 508f addql #8,%sp 4554e: 4a82 tstl %d2
45550: 6722 beqs 45574 <rtems_termios_enqueue_raw_characters+0x60><== NEVER TAKEN
45552: 202a 00cc movel %a2@(204),%d0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
45556: 5382 subql #1,%d2
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--) {
45558: eb88 lsll #5,%d0 4555a: 0680 0005 f19c addil #389532,%d0 45560: 2240 moveal %d0,%a1 45562: 2051 moveal %a1@,%a0
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
45564: 2f0a movel %a2,%sp@- 45566: 121b moveb %a3@+,%d1 45568: 49c1 extbl %d1 4556a: 2f01 movel %d1,%sp@- 4556c: 4e90 jsr %a0@
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--) {
4556e: 508f addql #8,%sp 45570: 4a82 tstl %d2
45572: 66de bnes 45552 <rtems_termios_enqueue_raw_characters+0x3e>
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
45574: 4aaa 00e4 tstl %a2@(228)
45578: 6628 bnes 455a2 <rtems_termios_enqueue_raw_characters+0x8e><== NEVER TAKEN
4557a: 206a 00dc moveal %a2@(220),%a0 4557e: 4a88 tstl %a0
45580: 6720 beqs 455a2 <rtems_termios_enqueue_raw_characters+0x8e><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
45582: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
45586: 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);
45588: 486a 0030 pea %a2@(48) <== NOT EXECUTED 4558c: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
4558e: 508f addql #8,%sp <== NOT EXECUTED 45590: 7001 moveq #1,%d0 <== NOT EXECUTED 45592: 2540 00e4 movel %d0,%a2@(228) <== NOT EXECUTED
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
45596: 2005 movel %d5,%d0 <== NOT EXECUTED 45598: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 <== NOT EXECUTED 4559e: 4e5e unlk %fp <== NOT EXECUTED 455a0: 4e75 rts <== NOT EXECUTED
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
tty->tty_rcvwakeup = 1;
}
return 0;
455a2: 4285 clrl %d5
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
}
455a4: 2005 movel %d5,%d0 455a6: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 455ac: 4e5e unlk %fp 455ae: 4e75 rts
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,
455b0: 41ea 004a lea %a2@(74),%a0
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) {
455b4: 4285 clrl %d5
}
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);
455b6: 387c 0700 moveaw #1792,%a4
/*
* 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);
455ba: 4bea 0030 lea %a2@(48),%a5
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) {
455be: 4200 clrb %d0
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,
455c0: 2d48 fffc movel %a0,%fp@(-4)
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) {
455c4: 1d40 fff7 moveb %d0,%fp@(-9)
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
455c8: 4a82 tstl %d2 455ca: 6700 00e6 beqw 456b2 <rtems_termios_enqueue_raw_characters+0x19e>
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
455ce: 202a 00b8 movel %a2@(184),%d0
}
return 0;
}
while (len--) {
c = *buf++;
455d2: 181b moveb %a3@+,%d4
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
455d4: 0800 0009 btst #9,%d0
455d8: 671c beqs 455f6 <rtems_termios_enqueue_raw_characters+0xe2>
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
455da: 4281 clrl %d1 455dc: 122a 004a moveb %a2@(74),%d1 455e0: 1004 moveb %d4,%d0 455e2: 49c0 extbl %d0 455e4: b280 cmpl %d0,%d1 455e6: 6700 0146 beqw 4572e <rtems_termios_enqueue_raw_characters+0x21a>
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
455ea: 4281 clrl %d1 455ec: 122a 0049 moveb %a2@(73),%d1 455f0: b280 cmpl %d0,%d1 455f2: 6700 00da beqw 456ce <rtems_termios_enqueue_raw_characters+0x1ba>
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
455f6: 4a2e fff7 tstb %fp@(-9) 455fa: 6600 00e4 bnew 456e0 <rtems_termios_enqueue_raw_characters+0x1cc>
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
455fe: 2e2a 0060 movel %a2@(96),%d7 45602: 5287 addql #1,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
45604: 200c movel %a4,%d0
}
/* reenable interrupts */
rtems_interrupt_enable(level);
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
45606: 222a 0064 movel %a2@(100),%d1 4560a: 4c41 7003 remul %d1,%d3,%d7
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
4560e: 40c7 movew %sr,%d7 45610: 8087 orl %d7,%d0 45612: 46c0 movew %d0,%sr
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
45614: 222a 005c movel %a2@(92),%d1 45618: 202a 0064 movel %a2@(100),%d0 4561c: 9081 subl %d1,%d0 4561e: 2240 moveal %d0,%a1 45620: d3c3 addal %d3,%a1
% tty->rawInBuf.Size) > tty->highwater) &&
45622: 2209 movel %a1,%d1 45624: 202a 0064 movel %a2@(100),%d0 45628: 4c40 1006 remul %d0,%d6,%d1 4562c: 2d40 fff8 movel %d0,%fp@(-8)
}
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
45630: bcaa 00c0 cmpl %a2@(192),%d6
45634: 633e blss 45674 <rtems_termios_enqueue_raw_characters+0x160><== ALWAYS TAKEN
% tty->rawInBuf.Size) > tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
45636: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED
} else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
% tty->rawInBuf.Size) > tty->highwater) &&
4563a: 0800 0000 btst #0,%d0 <== NOT EXECUTED 4563e: 6634 bnes 45674 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
45640: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45644: 7201 moveq #1,%d1 <== NOT EXECUTED 45646: 8081 orl %d1,%d0 <== NOT EXECUTED 45648: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
4564c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45650: 0280 0000 0402 andil #1026,%d0 <== NOT EXECUTED 45656: 0c80 0000 0400 cmpil #1024,%d0 <== NOT EXECUTED 4565c: 6700 010c beqw 4576a <rtems_termios_enqueue_raw_characters+0x256><== NOT EXECUTED
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
45660: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45664: 0280 0000 0104 andil #260,%d0 <== NOT EXECUTED 4566a: 0c80 0000 0100 cmpil #256,%d0 <== NOT EXECUTED 45670: 6700 0130 beqw 457a2 <rtems_termios_enqueue_raw_characters+0x28e><== NOT EXECUTED
}
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
45674: 46c7 movew %d7,%sr
if (newTail == tty->rawInBuf.Head) {
45676: 202a 005c movel %a2@(92),%d0 4567a: b680 cmpl %d0,%d3 4567c: 6700 00ce beqw 4574c <rtems_termios_enqueue_raw_characters+0x238>
dropped++;
} else {
tty->rawInBuf.theBuf[newTail] = c;
45680: 206a 0058 moveal %a2@(88),%a0 45684: 1184 3800 moveb %d4,%a0@(00000000,%d3:l)
tty->rawInBuf.Tail = newTail;
45688: 2543 0060 movel %d3,%a2@(96)
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
4568c: 4aaa 00e4 tstl %a2@(228)
45690: 6618 bnes 456aa <rtems_termios_enqueue_raw_characters+0x196><== NEVER TAKEN
45692: 206a 00dc moveal %a2@(220),%a0 45696: 4a88 tstl %a0
45698: 6710 beqs 456aa <rtems_termios_enqueue_raw_characters+0x196><== ALWAYS TAKEN
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
4569a: 2f2a 00e0 movel %a2@(224),%sp@- <== NOT EXECUTED 4569e: 2f0d movel %a5,%sp@- <== NOT EXECUTED 456a0: 4e90 jsr %a0@ <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
456a2: 508f addql #8,%sp <== NOT EXECUTED 456a4: 7201 moveq #1,%d1 <== NOT EXECUTED 456a6: 2541 00e4 movel %d1,%a2@(228) <== NOT EXECUTED
456aa: 5382 subql #1,%d2
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
456ac: 4a82 tstl %d2 456ae: 6600 ff1e bnew 455ce <rtems_termios_enqueue_raw_characters+0xba>
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
456b2: 2f2a 0068 movel %a2@(104),%sp@-
}
}
}
}
tty->rawInBufDropped += dropped;
456b6: dbaa 0078 addl %d5,%a2@(120)
rtems_semaphore_release (tty->rawInBuf.Semaphore);
456ba: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return dropped;
456c0: 588f addql #4,%sp
}
456c2: 2005 movel %d5,%d0 456c4: 4cee 3cfc ffcc moveml %fp@(-52),%d2-%d7/%a2-%a5 456ca: 4e5e unlk %fp 456cc: 4e75 rts
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
456ce: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 456d2: 72ef moveq #-17,%d1 <== NOT EXECUTED 456d4: c081 andl %d1,%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)
{
456d6: 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;
456d8: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
456dc: 1d46 fff7 moveb %d6,%fp@(-9) <== 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) {
456e0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 456e4: 7c30 moveq #48,%d6 <== NOT EXECUTED 456e6: 7220 moveq #32,%d1 <== NOT EXECUTED 456e8: c086 andl %d6,%d0 <== NOT EXECUTED 456ea: b280 cmpl %d0,%d1 <== NOT EXECUTED 456ec: 66bc bnes 456aa <rtems_termios_enqueue_raw_characters+0x196><== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
456ee: 200c movel %a4,%d0 <== NOT EXECUTED 456f0: 40c3 movew %sr,%d3 <== NOT EXECUTED 456f2: 8083 orl %d3,%d0 <== NOT EXECUTED 456f4: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
456f6: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 456fa: 7cdf moveq #-33,%d6 <== NOT EXECUTED 456fc: c086 andl %d6,%d0 <== NOT EXECUTED 456fe: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
45702: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 45706: 6606 bnes 4570e <rtems_termios_enqueue_raw_characters+0x1fa><== 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);
45708: 46c3 movew %d3,%sr <== 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;
4570a: 5382 subql #1,%d2 <== NOT EXECUTED 4570c: 609e bras 456ac <rtems_termios_enqueue_raw_characters+0x198><== 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)(
4570e: 4878 0001 pea 1 <ADD> <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
45712: 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)(
45716: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 4571a: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4571c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45720: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 45724: 4e90 jsr %a0@ <== NOT EXECUTED 45726: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
4572a: 46c3 movew %d3,%sr <== NOT EXECUTED 4572c: 60dc bras 4570a <rtems_termios_enqueue_raw_characters+0x1f6><== 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]) {
4572e: 4281 clrl %d1 <== NOT EXECUTED 45730: 122a 0049 moveb %a2@(73),%d1 <== NOT EXECUTED 45734: b280 cmpl %d0,%d1 <== NOT EXECUTED 45736: 671c beqs 45754 <rtems_termios_enqueue_raw_characters+0x240><== NOT EXECUTED
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
45738: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4573c: 7c10 moveq #16,%d6 <== NOT EXECUTED 4573e: 8086 orl %d6,%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)
{
45740: 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;
45742: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
45746: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 4574a: 6094 bras 456e0 <rtems_termios_enqueue_raw_characters+0x1cc><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
dropped++;
4574c: 5285 addql #1,%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);
tty->tty_rcvwakeup = 1;
4574e: 5382 subql #1,%d2 <== NOT EXECUTED 45750: 6000 ff5a braw 456ac <rtems_termios_enqueue_raw_characters+0x198><== 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;
45754: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45758: 7210 moveq #16,%d1 <== NOT EXECUTED 4575a: b380 eorl %d1,%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)
{
4575c: 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;
4575e: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
* device receive interrupt handler.
* Returns the number of characters dropped because of overflow.
*/
int
rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
{
45762: 1d46 fff7 moveb %d6,%fp@(-9) <== NOT EXECUTED 45766: 6000 ff78 braw 456e0 <rtems_termios_enqueue_raw_characters+0x1cc><== 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) ||
4576a: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4576e: 0800 0005 btst #5,%d0 <== NOT EXECUTED 45772: 6608 bnes 4577c <rtems_termios_enqueue_raw_characters+0x268><== NOT EXECUTED 45774: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 45778: 6600 fefa bnew 45674 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
4577c: 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;
45780: 7c02 moveq #2,%d6 <== NOT EXECUTED 45782: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45786: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 4578a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4578e: 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;
45792: 8286 orl %d6,%d1 <== NOT EXECUTED 45794: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
(*tty->device.write)(tty->minor,
45798: 4e90 jsr %a0@ <== NOT EXECUTED 4579a: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED 4579e: 6000 fed4 braw 45674 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
457a2: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 457a6: 303c 0004 movew #4,%d0 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
457aa: 206a 00ac moveal %a2@(172),%a0 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
(*tty->device.write)(tty->minor,
(void *)&(tty->termios.c_cc[VSTOP]), 1);
}
} else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) {
tty->flow_ctrl |= FL_IRTSOFF;
457ae: 8280 orl %d0,%d1 <== NOT EXECUTED 457b0: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
457b4: 4a88 tstl %a0 <== NOT EXECUTED 457b6: 6700 febc beqw 45674 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
tty->device.stopRemoteTx(tty->minor);
457ba: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 457be: 4e90 jsr %a0@ <== NOT EXECUTED 457c0: 588f addql #4,%sp <== NOT EXECUTED 457c2: 6000 feb0 braw 45674 <rtems_termios_enqueue_raw_characters+0x160><== NOT EXECUTED
00044500 <rtems_termios_ioctl>:
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
44500: 4e56 ffec linkw %fp,#-20 44504: 48d7 1c0c moveml %d2-%d3/%a2-%a4,%sp@ 44508: 266e 0008 moveal %fp@(8),%a3
rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
4450c: 2053 moveal %a3@,%a0 4450e: 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);
44512: 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;
44514: 286b 0008 moveal %a3@(8),%a4
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44518: 42a7 clrl %sp@- 4451a: 2f2a 0018 movel %a2@(24),%sp@-
rtems_libio_ioctl_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
4451e: 42ab 000c clrl %a3@(12)
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
44522: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
44528: 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);
4452c: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL) {
4452e: 662c bnes 4455c <rtems_termios_ioctl+0x5c> <== NEVER TAKEN
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
44530: 202b 0004 movel %a3@(4),%d0 44534: 7204 moveq #4,%d1 44536: b280 cmpl %d0,%d1
44538: 6774 beqs 445ae <rtems_termios_ioctl+0xae> <== NEVER TAKEN
4453a: 6530 bcss 4456c <rtems_termios_ioctl+0x6c>
4453c: 7602 moveq #2,%d3 4453e: b680 cmpl %d0,%d3 44540: 6700 00b6 beqw 445f8 <rtems_termios_ioctl+0xf8> 44544: 6400 0228 bccw 4476e <rtems_termios_ioctl+0x26e>
if (tty->device.setAttributes)
(*tty->device.setAttributes)(tty->minor, &tty->termios);
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
44548: 2f0a movel %a2,%sp@- 4454a: 4eba f938 jsr %pc@(43e84 <drainOutput>)
break;
4454e: 588f addql #4,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44550: 2f2a 0018 movel %a2@(24),%sp@- 44554: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
4455a: 588f addql #4,%sp
}
4455c: 2002 movel %d2,%d0
}
break;
}
rtems_semaphore_release (tty->osem);
args->ioctl_return = sc;
4455e: 2742 000c movel %d2,%a3@(12)
return sc; }
44562: 4cee 1c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a4 44568: 4e5e unlk %fp 4456a: 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) {
4456c: 0c80 4004 667f cmpil #1074030207,%d0
44572: 6756 beqs 445ca <rtems_termios_ioctl+0xca> <== NEVER TAKEN
44574: 6200 023a bhiw 447b0 <rtems_termios_ioctl+0x2b0> 44578: 7605 moveq #5,%d3 4457a: b680 cmpl %d0,%d3 4457c: 6700 01d2 beqw 44750 <rtems_termios_ioctl+0x250>
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
44580: 202a 00cc movel %a2@(204),%d0 44584: eb88 lsll #5,%d0 44586: 0680 0005 f1a4 addil #389540,%d0 4458c: 2240 moveal %d0,%a1 4458e: 2051 moveal %a1@,%a0 44590: 4a88 tstl %a0 44592: 6700 02a6 beqw 4483a <rtems_termios_ioctl+0x33a>
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
44596: 2f0b movel %a3,%sp@- 44598: 2f0a movel %a2,%sp@- 4459a: 4e90 jsr %a0@ 4459c: 508f addql #8,%sp 4459e: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
445a0: 2f2a 0018 movel %a2@(24),%sp@- 445a4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
445aa: 588f addql #4,%sp 445ac: 60ae bras 4455c <rtems_termios_ioctl+0x5c>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
break;
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
445ae: 2014 movel %a4@,%d0 <== NOT EXECUTED 445b0: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 445b4: 2540 00dc movel %d0,%a2@(220) <== NOT EXECUTED 445b8: 2541 00e0 movel %d1,%a2@(224) <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
445bc: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 445c0: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
445c6: 588f addql #4,%sp <== NOT EXECUTED 445c8: 6092 bras 4455c <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
445ca: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 445ce: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED 445d2: 9081 subl %d1,%d0 <== NOT EXECUTED
if ( rawnc < 0 )
445d4: 6b00 02ae bmiw 44884 <rtems_termios_ioctl+0x384> <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
445d8: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 445dc: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 445e0: d280 addl %d0,%d1 <== NOT EXECUTED 445e2: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 445e6: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
445e8: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 445ec: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
445f2: 588f addql #4,%sp <== NOT EXECUTED 445f4: 6000 ff66 braw 4455c <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;
445f8: 206b 0008 moveal %a3@(8),%a0 445fc: 49ea 0030 lea %a2@(48),%a4 44600: 2898 movel %a0@+,%a4@ 44602: 2558 0034 movel %a0@+,%a2@(52) 44606: 2558 0038 movel %a0@+,%a2@(56) 4460a: 2558 003c movel %a0@+,%a2@(60) 4460e: 2558 0040 movel %a0@+,%a2@(64) 44612: 2558 0044 movel %a0@+,%a2@(68) 44616: 2558 0048 movel %a0@+,%a2@(72) 4461a: 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) &&
4461e: 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;
44622: 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) &&
44626: 0800 0009 btst #9,%d0
4462a: 6746 beqs 44672 <rtems_termios_ioctl+0x172>
!(tty->termios.c_iflag & IXON)) {
4462c: 202a 0030 movel %a2@(48),%d0 44630: 0280 0000 0400 andil #1024,%d0
/*
* check for flow control options to be switched off
*/
/* check for outgoing XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXON) &&
44636: 663a bnes 44672 <rtems_termios_ioctl+0x172> <== ALWAYS TAKEN
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
44638: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4463c: 0280 ffff fdef andil #-529,%d0 <== NOT EXECUTED 44642: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
44646: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4464a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4464e: 6722 beqs 44672 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
44650: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 44656: 40c3 movew %sr,%d3 <== NOT EXECUTED 44658: 8083 orl %d3,%d0 <== NOT EXECUTED 4465a: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl &= ~FL_OSTOP;
4465c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44660: 72df moveq #-33,%d1 <== NOT EXECUTED 44662: c081 andl %d1,%d0 <== NOT EXECUTED 44664: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
44668: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 4466c: 6600 0240 bnew 448ae <rtems_termios_ioctl+0x3ae> <== 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);
44670: 46c3 movew %d3,%sr <== NOT EXECUTED
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) && !(tty->termios.c_iflag & IXOFF)) {
44672: 202a 00b8 movel %a2@(184),%d0 44676: 0800 000a btst #10,%d0
4467a: 6724 beqs 446a0 <rtems_termios_ioctl+0x1a0> <== ALWAYS TAKEN
4467c: 202a 0030 movel %a2@(48),%d0 <== NOT EXECUTED 44680: 0280 0000 1000 andil #4096,%d0 <== NOT EXECUTED 44686: 6618 bnes 446a0 <rtems_termios_ioctl+0x1a0> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
44688: 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);
4468c: 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);
4468e: 0880 000a bclr #10,%d0 <== NOT EXECUTED 44692: 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);
44696: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4469a: c083 andl %d3,%d0 <== NOT EXECUTED 4469c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
446a0: 202a 00b8 movel %a2@(184),%d0 446a4: 0800 0008 btst #8,%d0 446a8: 6700 0186 beqw 44830 <rtems_termios_ioctl+0x330>
446ac: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED 446b0: 6d00 01ec bltw 4489e <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
446b4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 446b8: 0880 0008 bclr #8,%d0 <== NOT EXECUTED 446bc: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) {
446c0: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 446c4: 44c0 movew %d0,%ccr <== NOT EXECUTED 446c6: 6614 bnes 446dc <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED 446c8: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED 446cc: 4a88 tstl %a0 <== NOT EXECUTED 446ce: 670c beqs 446dc <rtems_termios_ioctl+0x1dc> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
446d0: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 446d4: 4e90 jsr %a0@ <== NOT EXECUTED 446d6: 222a 0038 movel %a2@(56),%d1 <== NOT EXECUTED 446da: 588f addql #4,%sp <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
446dc: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 446e0: 76fb moveq #-5,%d3 <== NOT EXECUTED 446e2: c083 andl %d3,%d0 <== NOT EXECUTED 446e4: 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) {
446e8: 4a81 tstl %d1 <== NOT EXECUTED 446ea: 6d00 01b2 bltw 4489e <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
tty->flow_ctrl |= FL_MDRTS;
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
446ee: 202a 0030 movel %a2@(48),%d0 446f2: 0800 000c btst #12,%d0
446f6: 670c beqs 44704 <rtems_termios_ioctl+0x204> <== ALWAYS TAKEN
tty->flow_ctrl |= FL_MDXOF;
446f8: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 446fc: 08c1 000a bset #10,%d1 <== NOT EXECUTED 44700: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
44704: 0800 000a btst #10,%d0
44708: 670c beqs 44716 <rtems_termios_ioctl+0x216>
tty->flow_ctrl |= FL_MDXON;
4470a: 202a 00b8 movel %a2@(184),%d0 4470e: 08c0 0009 bset #9,%d0 44712: 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) {
44716: 7002 moveq #2,%d0 44718: c0aa 003c andl %a2@(60),%d0 4471c: 6700 012e beqw 4484c <rtems_termios_ioctl+0x34c>
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
44720: 42aa 006c clrl %a2@(108)
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
44724: 42aa 0070 clrl %a2@(112)
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
44728: 42aa 0074 clrl %a2@(116)
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
4472c: 206a 00a8 moveal %a2@(168),%a0 44730: 4a88 tstl %a0 44732: 6700 fe1c beqw 44550 <rtems_termios_ioctl+0x50>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
44736: 2f0c movel %a4,%sp@- 44738: 2f2a 0010 movel %a2@(16),%sp@- 4473c: 4e90 jsr %a0@ 4473e: 508f addql #8,%sp
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44740: 2f2a 0018 movel %a2@(24),%sp@- 44744: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
4474a: 588f addql #4,%sp 4474c: 6000 fe0e braw 4455c <rtems_termios_ioctl+0x5c>
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
break;
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
44750: 2014 movel %a4@,%d0 <== NOT EXECUTED 44752: 222c 0004 movel %a4@(4),%d1 <== NOT EXECUTED 44756: 2540 00d4 movel %d0,%a2@(212) <== NOT EXECUTED 4475a: 2541 00d8 movel %d1,%a2@(216) <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
4475e: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED 44762: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44768: 588f addql #4,%sp <== NOT EXECUTED 4476a: 6000 fdf0 braw 4455c <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) {
4476e: 123c 0001 moveb #1,%d1 44772: b280 cmpl %d0,%d1 44774: 6600 fe0a bnew 44580 <rtems_termios_ioctl+0x80>
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
44778: 206b 0008 moveal %a3@(8),%a0 4477c: 20ea 0030 movel %a2@(48),%a0@+ 44780: 20ea 0034 movel %a2@(52),%a0@+ 44784: 20ea 0038 movel %a2@(56),%a0@+ 44788: 20ea 003c movel %a2@(60),%a0@+ 4478c: 20ea 0040 movel %a2@(64),%a0@+ 44790: 20ea 0044 movel %a2@(68),%a0@+ 44794: 20ea 0048 movel %a2@(72),%a0@+ 44798: 20ea 004c movel %a2@(76),%a0@+ 4479c: 20aa 0050 movel %a2@(80),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
447a0: 2f2a 0018 movel %a2@(24),%sp@- 447a4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
447aa: 588f addql #4,%sp 447ac: 6000 fdae braw 4455c <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) {
447b0: 0c80 4004 741a cmpil #1074033690,%d0
447b6: 6760 beqs 44818 <rtems_termios_ioctl+0x318>
447b8: 0c80 8004 741b cmpil #-2147191781,%d0 447be: 6600 fdc0 bnew 44580 <rtems_termios_ioctl+0x80>
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
447c2: 202a 00cc movel %a2@(204),%d0 447c6: eb88 lsll #5,%d0 447c8: 0680 0005 f190 addil #389520,%d0 447ce: 2240 moveal %d0,%a1 447d0: 2051 moveal %a1@,%a0 447d2: 4a88 tstl %a0
447d4: 6708 beqs 447de <rtems_termios_ioctl+0x2de>
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
447d6: 2f0a movel %a2,%sp@- 447d8: 4e90 jsr %a0@ 447da: 588f addql #4,%sp 447dc: 2400 movel %d0,%d2
}
tty->t_line=*(int*)(args->buffer);
447de: 206b 0008 moveal %a3@(8),%a0 447e2: 2010 movel %a0@,%d0
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
447e4: 2200 movel %d0,%d1 447e6: 41f9 0005 f18c lea 5f18c <rtems_termios_linesw>,%a0 447ec: eb89 lsll #5,%d1
* 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);
447ee: 2540 00cc movel %d0,%a2@(204)
tty->t_sc = NULL; /* ensure that no more valid data */
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
447f2: 2070 1800 moveal %a0@(00000000,%d1:l),%a0
*/
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 */
447f6: 42aa 00d0 clrl %a2@(208)
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
447fa: 4a88 tstl %a0 447fc: 6700 fd52 beqw 44550 <rtems_termios_ioctl+0x50>
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
44800: 2f0a movel %a2,%sp@- 44802: 4e90 jsr %a0@ 44804: 588f addql #4,%sp 44806: 2400 movel %d0,%d2
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44808: 2f2a 0018 movel %a2@(24),%sp@- 4480c: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
44812: 588f addql #4,%sp 44814: 6000 fd46 braw 4455c <rtems_termios_ioctl+0x5c>
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;
44818: 206b 0008 moveal %a3@(8),%a0 4481c: 20aa 00cc movel %a2@(204),%a0@
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44820: 2f2a 0018 movel %a2@(24),%sp@- 44824: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
args->ioctl_return = sc; return sc;
4482a: 588f addql #4,%sp 4482c: 6000 fd2e braw 4455c <rtems_termios_ioctl+0x5c>
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) {
44830: 222a 0038 movel %a2@(56),%d1
/*
* check for flow control options to be switched on
*/
/* check for incoming RTS/CTS flow control switched on */
if (tty->termios.c_cflag & CRTSCTS) {
44834: 6c00 feb8 bgew 446ee <rtems_termios_ioctl+0x1ee>
44838: 6064 bras 4489e <rtems_termios_ioctl+0x39e> <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
4483a: 2f2a 0018 movel %a2@(24),%sp@- <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
}
else {
sc = RTEMS_INVALID_NUMBER;
4483e: 740a moveq #10,%d2 <== NOT EXECUTED
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
}
break;
}
rtems_semaphore_release (tty->osem);
44840: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
args->ioctl_return = sc; return sc;
44846: 588f addql #4,%sp <== NOT EXECUTED 44848: 6000 fd12 braw 4455c <rtems_termios_ioctl+0x5c> <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
4484c: 4283 clrl %d3 4484e: 162a 0046 moveb %a2@(70),%d3
rtems_clock_get_ticks_per_second() / 10;
44852: 4eb9 0004 5f0c jsr 45f0c <rtems_clock_get_ticks_per_second>
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
44858: 4c03 0800 mulsl %d3,%d0
rtems_clock_get_ticks_per_second() / 10;
4485c: 760a moveq #10,%d3 4485e: 4c43 0000 remul %d3,%d0,%d0
if (tty->termios.c_lflag & ICANON) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
44862: 2540 0054 movel %d0,%a2@(84)
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
44866: 4a2a 0046 tstb %a2@(70)
4486a: 6764 beqs 448d0 <rtems_termios_ioctl+0x3d0> <== ALWAYS TAKEN
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
4486c: 42aa 006c clrl %a2@(108) <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
44870: 2540 0070 movel %d0,%a2@(112) <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
44874: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 44878: 6600 feae bnew 44728 <rtems_termios_ioctl+0x228> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
4487c: 2540 0074 movel %d0,%a2@(116) <== NOT EXECUTED 44880: 6000 feaa braw 4472c <rtems_termios_ioctl+0x22c> <== NOT EXECUTED
break;
#endif
case FIONREAD: {
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
if ( rawnc < 0 )
rawnc += tty->rawInBuf.Size;
44884: 222a 0064 movel %a2@(100),%d1 <== NOT EXECUTED 44888: d081 addl %d1,%d0 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
4488a: 222a 0020 movel %a2@(32),%d1 <== NOT EXECUTED 4488e: 92aa 0024 subl %a2@(36),%d1 <== NOT EXECUTED 44892: d280 addl %d0,%d1 <== NOT EXECUTED 44894: 206b 0008 moveal %a3@(8),%a0 <== NOT EXECUTED 44898: 2081 movel %d1,%a0@ <== NOT EXECUTED 4489a: 6000 fd4c braw 445e8 <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;
4489e: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 448a2: 08c0 0008 bset #8,%d0 <== NOT EXECUTED 448a6: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED 448aa: 6000 fe42 braw 446ee <rtems_termios_ioctl+0x1ee> <== 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);
448ae: 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)(
448b2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 448b6: d0aa 007c addl %a2@(124),%d0 <== NOT EXECUTED 448ba: 2f00 movel %d0,%sp@- <== NOT EXECUTED 448bc: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 448c0: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 448c4: 4e90 jsr %a0@ <== NOT EXECUTED 448c6: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
}
/* reenable interrupts */
rtems_interrupt_enable(level);
448ca: 46c3 movew %d3,%sr <== NOT EXECUTED 448cc: 6000 fda4 braw 44672 <rtems_termios_ioctl+0x172> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
} else {
if (tty->termios.c_cc[VMIN]) {
448d0: 4a2a 0047 tstb %a2@(71) 448d4: 6600 fe4a bnew 44720 <rtems_termios_ioctl+0x220>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
} else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
448d8: 7001 moveq #1,%d0 448da: 2540 006c movel %d0,%a2@(108) 448de: 6000 fe4c braw 4472c <rtems_termios_ioctl+0x22c>
00045818 <rtems_termios_number_to_baud>:
#include <rtems/termiostypes.h>
int rtems_termios_number_to_baud(
int32_t baud
)
{
45818: 4e56 0000 linkw %fp,#0 4581c: 222e 0008 movel %fp@(8),%d1
int termios_baud;
switch (baud) {
45820: 0c81 0000 04b0 cmpil #1200,%d1 45826: 6700 011c beqw 45944 <rtems_termios_number_to_baud+0x12c>
4582a: 6f3c bles 45868 <rtems_termios_number_to_baud+0x50>
4582c: 0c81 0000 4b00 cmpil #19200,%d1 45832: 6700 011c beqw 45950 <rtems_termios_number_to_baud+0x138>
45836: 6f60 bles 45898 <rtems_termios_number_to_baud+0x80>
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;
45838: 203c 0000 1002 movel #4098,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
4583e: 0c81 0001 c200 cmpil #115200,%d1
45844: 671e beqs 45864 <rtems_termios_number_to_baud+0x4c>
45846: 6f00 00a8 blew 458f0 <rtems_termios_number_to_baud+0xd8>
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;
4584a: 203c 0000 1003 movel #4099,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
45850: 0c81 0003 8400 cmpil #230400,%d1
45856: 670c beqs 45864 <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;
45858: 5280 addql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
4585a: 0c81 0007 0800 cmpil #460800,%d1
45860: 6702 beqs 45864 <rtems_termios_number_to_baud+0x4c><== ALWAYS TAKEN
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;
default: termios_baud = -1; break;
45862: 70ff moveq #-1,%d0
}
return termios_baud;
}
45864: 4e5e unlk %fp 45866: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45868: 0c81 0000 0086 cmpil #134,%d1 4586e: 6700 00da beqw 4594a <rtems_termios_number_to_baud+0x132>
45872: 6f46 bles 458ba <rtems_termios_number_to_baud+0xa2>
45874: 0c81 0000 00c8 cmpil #200,%d1 4587a: 6700 00b6 beqw 45932 <rtems_termios_number_to_baud+0x11a>
4587e: 6f56 bles 458d6 <rtems_termios_number_to_baud+0xbe>
45880: 0c81 0000 012c cmpil #300,%d1 45886: 6700 00a4 beqw 4592c <rtems_termios_number_to_baud+0x114> 4588a: 0c81 0000 0258 cmpil #600,%d1
45890: 66d0 bnes 45862 <rtems_termios_number_to_baud+0x4a><== NEVER TAKEN
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;
45892: 7008 moveq #8,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45894: 4e5e unlk %fp 45896: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
45898: 0c81 0000 0960 cmpil #2400,%d1 4589e: 6700 009e beqw 4593e <rtems_termios_number_to_baud+0x126>
458a2: 6f66 bles 4590a <rtems_termios_number_to_baud+0xf2>
458a4: 0c81 0000 12c0 cmpil #4800,%d1
458aa: 676e beqs 4591a <rtems_termios_number_to_baud+0x102>
458ac: 0c81 0000 2580 cmpil #9600,%d1
458b2: 66ae bnes 45862 <rtems_termios_number_to_baud+0x4a>
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;
458b4: 700d moveq #13,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
458b6: 4e5e unlk %fp 458b8: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
458ba: 7032 moveq #50,%d0 458bc: b081 cmpl %d1,%d0
458be: 6778 beqs 45938 <rtems_termios_number_to_baud+0x120> 458c0: 6c22 bges 458e4 <rtems_termios_number_to_baud+0xcc>
458c2: 704b moveq #75,%d0 458c4: b081 cmpl %d1,%d0
458c6: 6758 beqs 45920 <rtems_termios_number_to_baud+0x108>
458c8: 103c 006e moveb #110,%d0 458cc: b081 cmpl %d1,%d0
458ce: 6692 bnes 45862 <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;
458d0: 7003 moveq #3,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
458d2: 4e5e unlk %fp 458d4: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
458d6: 0c81 0000 0096 cmpil #150,%d1
458dc: 6684 bnes 45862 <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;
case 150: termios_baud = B150; break;
458de: 7005 moveq #5,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
458e0: 4e5e unlk %fp 458e2: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
458e4: 4a81 tstl %d1 458e6: 6600 ff7a bnew 45862 <rtems_termios_number_to_baud+0x4a>
case 0: termios_baud = B0; break;
458ea: 4280 clrl %d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
458ec: 4e5e unlk %fp 458ee: 4e75 rts
int32_t baud
)
{
int termios_baud;
switch (baud) {
458f0: 0c81 0000 9600 cmpil #38400,%d1
458f6: 672e beqs 45926 <rtems_termios_number_to_baud+0x10e>
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;
458f8: 5380 subql #1,%d0
int32_t baud
)
{
int termios_baud;
switch (baud) {
458fa: 0c81 0000 e100 cmpil #57600,%d1 45900: 6700 ff62 beqw 45864 <rtems_termios_number_to_baud+0x4c>
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;
default: termios_baud = -1; break;
45904: 70ff moveq #-1,%d0 <== NOT EXECUTED 45906: 6000 ff5c braw 45864 <rtems_termios_number_to_baud+0x4c><== NOT EXECUTED
int32_t baud
)
{
int termios_baud;
switch (baud) {
4590a: 0c81 0000 0708 cmpil #1800,%d1 45910: 6600 ff50 bnew 45862 <rtems_termios_number_to_baud+0x4a>
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;
45914: 700a moveq #10,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45916: 4e5e unlk %fp 45918: 4e75 rts
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;
4591a: 700c moveq #12,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4591c: 4e5e unlk %fp 4591e: 4e75 rts
int termios_baud;
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
case 75: termios_baud = B75; break;
45920: 7002 moveq #2,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45922: 4e5e unlk %fp 45924: 4e75 rts
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;
45926: 700f moveq #15,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45928: 4e5e unlk %fp 4592a: 4e75 rts
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;
4592c: 7007 moveq #7,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4592e: 4e5e unlk %fp 45930: 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;
45932: 7006 moveq #6,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45934: 4e5e unlk %fp 45936: 4e75 rts
{
int termios_baud;
switch (baud) {
case 0: termios_baud = B0; break;
case 50: termios_baud = B50; break;
45938: 7001 moveq #1,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4593a: 4e5e unlk %fp 4593c: 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;
4593e: 700b moveq #11,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45940: 4e5e unlk %fp 45942: 4e75 rts
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;
45944: 7009 moveq #9,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45946: 4e5e unlk %fp 45948: 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;
case 134: termios_baud = B134; break;
4594a: 7004 moveq #4,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
4594c: 4e5e unlk %fp 4594e: 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;
45950: 700e moveq #14,%d0
case 460800: termios_baud = B460800; break;
default: termios_baud = -1; break;
}
return termios_baud;
}
45952: 4e5e unlk %fp
...
00043ef8 <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43ef8: 4e56 ffd8 linkw %fp,#-40 43efc: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43f00: 42a7 clrl %sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43f02: 242e 0008 movel %fp@(8),%d2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43f06: 42a7 clrl %sp@- 43f08: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@-
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43f0e: 262e 000c movel %fp@(12),%d3 43f12: 266e 0010 moveal %fp@(16),%a3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43f16: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43f1c: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain(
43f20: 2800 movel %d0,%d4
rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43f22: 6600 027e bnew 441a2 <rtems_termios_open+0x2aa>
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
43f26: 2879 0005 f9d0 moveal 5f9d0 <rtems_termios_ttyHead>,%a4 43f2c: 4a8c tstl %a4
43f2e: 6710 beqs 43f40 <rtems_termios_open+0x48>
43f30: 244c moveal %a4,%a2
if ((tty->major == major) && (tty->minor == minor))
43f32: b4aa 000c cmpl %a2@(12),%d2 43f36: 6700 0276 beqw 441ae <rtems_termios_open+0x2b6>
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) {
43f3a: 2452 moveal %a2@,%a2 43f3c: 4a8a tstl %a2
43f3e: 66f2 bnes 43f32 <rtems_termios_open+0x3a> <== NEVER TAKEN
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
43f40: 4878 00e8 pea e8 <DBL_MANT_DIG+0xb3> 43f44: 4878 0001 pea 1 <ADD> 43f48: 4eb9 0004 292c jsr 4292c <calloc>
if (tty == NULL) {
43f4e: 508f addql #8,%sp
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
43f50: 2a40 moveal %d0,%a5 43f52: 2440 moveal %d0,%a2
if (tty == NULL) {
43f54: 4a80 tstl %d0 43f56: 6700 0346 beqw 4429e <rtems_termios_open+0x3a6>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
43f5a: 41f9 0005 e384 lea 5e384 <rtems_termios_raw_input_size>,%a0 43f60: 2b50 0064 movel %a0@,%a5@(100)
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
43f64: 2e3c 0004 30e8 movel #274664,%d7 43f6a: 2047 moveal %d7,%a0 43f6c: 202d 0064 movel %a5@(100),%d0 43f70: 2f00 movel %d0,%sp@- 43f72: 4e90 jsr %a0@
if (tty->rawInBuf.theBuf == NULL) {
43f74: 588f addql #4,%sp
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
43f76: 2a00 movel %d0,%d5 43f78: 2b40 0058 movel %d0,%a5@(88)
if (tty->rawInBuf.theBuf == NULL) {
43f7c: 6700 033c beqw 442ba <rtems_termios_open+0x3c2>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
43f80: 41f9 0005 e388 lea 5e388 <rtems_termios_raw_output_size>,%a0 43f86: 2b50 0088 movel %a0@,%a5@(136)
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
43f8a: 2047 moveal %d7,%a0 43f8c: 202d 0088 movel %a5@(136),%d0 43f90: 2f00 movel %d0,%sp@- 43f92: 4e90 jsr %a0@
if (tty->rawOutBuf.theBuf == NULL) {
43f94: 588f addql #4,%sp
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
43f96: 2c00 movel %d0,%d6 43f98: 2b40 007c movel %d0,%a5@(124)
if (tty->rawOutBuf.theBuf == NULL) {
43f9c: 6700 0340 beqw 442de <rtems_termios_open+0x3e6>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
43fa0: 2f39 0005 e380 movel 5e380 <rtems_termios_cbufsize>,%sp@- 43fa6: 2047 moveal %d7,%a0 43fa8: 4e90 jsr %a0@
if (tty->cbuf == NULL) {
43faa: 588f addql #4,%sp
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
43fac: 2b40 001c movel %d0,%a5@(28)
if (tty->cbuf == NULL) {
43fb0: 6700 0358 beqw 4430a <rtems_termios_open+0x412>
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
43fb4: 42ad 00d4 clrl %a5@(212)
tty->tty_snd.sw_arg = NULL;
43fb8: 42ad 00d8 clrl %a5@(216)
tty->tty_rcv.sw_pfn = NULL;
43fbc: 42ad 00dc clrl %a5@(220)
tty->tty_rcv.sw_arg = NULL;
43fc0: 42ad 00e0 clrl %a5@(224)
tty->tty_rcvwakeup = 0;
43fc4: 42ad 00e4 clrl %a5@(228)
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
43fc8: 2a8c movel %a4,%a5@
tty->back = NULL;
43fca: 42ad 0004 clrl %a5@(4)
if (rtems_termios_ttyHead != NULL)
43fce: 4a8c tstl %a4
43fd0: 6704 beqs 43fd6 <rtems_termios_open+0xde>
rtems_termios_ttyHead->back = tty;
43fd2: 294d 0004 movel %a5,%a4@(4)
rtems_termios_ttyHead = tty;
43fd6: 23cd 0005 f9d0 movel %a5,5f9d0 <rtems_termios_ttyHead>
if (rtems_termios_ttyTail == NULL)
43fdc: 4ab9 0005 f9cc tstl 5f9cc <rtems_termios_ttyTail> 43fe2: 6700 02b0 beqw 44294 <rtems_termios_open+0x39c>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
43fe6: 486d 0014 pea %a5@(20) 43fea: 49f9 0004 63ac lea 463ac <rtems_semaphore_create>,%a4
rtems_build_name ('T', 'R', 'i', c),
43ff0: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
43ff6: 42a7 clrl %sp@- 43ff8: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'i', c),
43ffc: 49c0 extbl %d0
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
43ffe: 4878 0001 pea 1 <ADD> 44002: 0080 5452 6900 oril #1414686976,%d0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
44008: 2b43 0010 movel %d3,%a5@(16)
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
4400c: 2f00 movel %d0,%sp@-
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
tty->major = major;
4400e: 2b42 000c movel %d2,%a5@(12)
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44012: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'i', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
44014: 4fef 0014 lea %sp@(20),%sp 44018: 4a80 tstl %d0 4401a: 6600 020a bnew 44226 <rtems_termios_open+0x32e>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4401e: 486d 0018 pea %a5@(24)
rtems_build_name ('T', 'R', 'o', c),
44022: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44028: 42a7 clrl %sp@- 4402a: 4878 0054 pea 54 <DBL_MANT_DIG+0x1f>
rtems_build_name ('T', 'R', 'o', c),
4402e: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->isem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44030: 4878 0001 pea 1 <ADD> 44034: 0080 5452 6f00 oril #1414688512,%d0 4403a: 2f00 movel %d0,%sp@- 4403c: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'o', c),
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
4403e: 4fef 0014 lea %sp@(20),%sp 44042: 4a80 tstl %d0 44044: 6600 01e0 bnew 44226 <rtems_termios_open+0x32e>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44048: 486d 008c pea %a5@(140)
rtems_build_name ('T', 'R', 'x', c),
4404c: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44052: 42a7 clrl %sp@- 44054: 4878 0020 pea 20 <OPER2+0xc>
rtems_build_name ('T', 'R', 'x', c),
44058: 49c0 extbl %d0
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->osem);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4405a: 0080 5452 7800 oril #1414690816,%d0 44060: 42a7 clrl %sp@- 44062: 2f00 movel %d0,%sp@- 44064: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'x', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO,
RTEMS_NO_PRIORITY,
&tty->rawOutBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
44066: 4fef 0014 lea %sp@(20),%sp 4406a: 4a80 tstl %d0 4406c: 6600 01b8 bnew 44226 <rtems_termios_open+0x32e>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
44070: 226e 0014 moveal %fp@(20),%a1 44074: 41ed 0098 lea %a5@(152),%a0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
44078: 7002 moveq #2,%d0
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
4407a: 20d9 movel %a1@+,%a0@+ 4407c: 20d9 movel %a1@+,%a0@+ 4407e: 20d9 movel %a1@+,%a0@+ 44080: 20d9 movel %a1@+,%a0@+ 44082: 20d9 movel %a1@+,%a0@+ 44084: 20d9 movel %a1@+,%a0@+ 44086: 20d9 movel %a1@+,%a0@+ 44088: 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;
4408a: 42ad 0094 clrl %a5@(148)
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4408e: b0ad 00b4 cmpl %a5@(180),%d0 44092: 6700 019a beqw 4422e <rtems_termios_open+0x336>
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
44096: 4aad 00a0 tstl %a5@(160) 4409a: 6700 0162 beqw 441fe <rtems_termios_open+0x306> 4409e: 7002 moveq #2,%d0 440a0: b0ad 00b4 cmpl %a5@(180),%d0 440a4: 6700 0158 beqw 441fe <rtems_termios_open+0x306>
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;
440a8: 42ad 00b8 clrl %a5@(184)
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
440ac: 222d 0064 movel %a5@(100),%d1
tty->highwater = tty->rawInBuf.Size * 3/4;
440b0: 206d 0064 moveal %a5@(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;
440b4: e289 lsrl #1,%d1
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';
440b6: 7c03 moveq #3,%d6
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
440b8: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
/* 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;
440be: 2b41 00bc movel %d1,%a5@(188)
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
440c2: 49c0 extbl %d0 440c4: 2a00 movel %d0,%d5 440c6: 2240 moveal %d0,%a1 440c8: 5285 addql #1,%d5
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';
440ca: 1b46 0041 moveb %d6,%a5@(65)
tty->termios.c_cc[VQUIT] = '\034';
440ce: 7c1c moveq #28,%d6
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;
440d0: 41f0 8a00 lea %a0@(00000000,%a0:l:2),%a0
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';
440d4: 4201 clrb %d1
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';
440d6: 1b46 0042 moveb %d6,%a5@(66)
tty->termios.c_cc[VERASE] = '\177';
440da: 7c7f moveq #127,%d6
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;
440dc: 2008 movel %a0,%d0 440de: e488 lsrl #2,%d0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
440e0: 307c 2502 moveaw #9474,%a0
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';
440e4: 1b46 0043 moveb %d6,%a5@(67)
tty->termios.c_cc[VKILL] = '\025';
440e8: 7c15 moveq #21,%d6
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;
440ea: 2b40 00c0 movel %d0,%a5@(192)
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';
440ee: 1b46 0044 moveb %d6,%a5@(68)
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
440f2: 2b48 0030 movel %a0,%a5@(48)
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
tty->termios.c_cc[VERASE] = '\177';
tty->termios.c_cc[VKILL] = '\025';
tty->termios.c_cc[VEOF] = '\004';
440f6: 7c04 moveq #4,%d6
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
440f8: 7013 moveq #19,%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';
440fa: 1b46 0045 moveb %d6,%a5@(69)
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
440fe: 7c11 moveq #17,%d6
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';
44100: 1b41 004c moveb %d1,%a5@(76)
tty->termios.c_cc[VEOL2] = '\000';
44104: 1b41 0051 moveb %d1,%a5@(81)
tty->termios.c_cc[VSTART] = '\021';
44108: 1b46 0049 moveb %d6,%a5@(73)
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
4410c: 721a moveq #26,%d1
tty->termios.c_cc[VREPRINT] = '\022';
4410e: 7c12 moveq #18,%d6
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';
44110: 1b40 004a moveb %d0,%a5@(74)
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
44114: 700f moveq #15,%d0
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';
44116: 1b41 004b moveb %d1,%a5@(75)
tty->termios.c_cc[VREPRINT] = '\022';
4411a: 1b46 004d moveb %d6,%a5@(77)
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
4411e: 7217 moveq #23,%d1
tty->termios.c_cc[VLNEXT] = '\026';
44120: 7c16 moveq #22,%d6
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';
44122: 1b40 004e moveb %d0,%a5@(78)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44126: 203c 0000 1805 movel #6149,%d0
tty->termios.c_cc[VSTART] = '\021';
tty->termios.c_cc[VSTOP] = '\023';
tty->termios.c_cc[VSUSP] = '\032';
tty->termios.c_cc[VREPRINT] = '\022';
tty->termios.c_cc[VDISCARD] = '\017';
tty->termios.c_cc[VWERASE] = '\027';
4412c: 1b41 004f moveb %d1,%a5@(79)
tty->termios.c_cc[VLNEXT] = '\026';
44130: 1b46 0050 moveb %d6,%a5@(80)
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
44134: 2b40 0034 movel %d0,%a5@(52)
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
44138: 223c 0000 08bd movel #2237,%d1 4413e: 2b41 0038 movel %d1,%a5@(56)
tty->termios.c_lflag =
44142: 2c3c 0000 823b movel #33339,%d6
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
44148: 303c 007a movew #122,%d0 4414c: 13c5 0005 e38c moveb %d5,5e38c <c.6222>
* 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 =
44152: 2b46 003c movel %d6,%a5@(60)
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
44156: b089 cmpl %a1,%d0
44158: 6608 bnes 44162 <rtems_termios_open+0x26a> <== ALWAYS TAKEN
c = 'a';
4415a: 7261 moveq #97,%d1 <== NOT EXECUTED 4415c: 13c1 0005 e38c moveb %d1,5e38c <c.6222> <== NOT EXECUTED
}
args->iop->data1 = tty;
if (!tty->refcount++) {
44162: 202a 0008 movel %a2@(8),%d0 44166: 2c00 movel %d0,%d6 44168: 5286 addql #1,%d6
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
4416a: 2053 moveal %a3@,%a0 4416c: 214a 0034 movel %a2,%a0@(52)
if (!tty->refcount++) {
44170: 2546 0008 movel %d6,%a2@(8) 44174: 4a80 tstl %d0
44176: 661c bnes 44194 <rtems_termios_open+0x29c>
if (tty->device.firstOpen)
44178: 206a 0098 moveal %a2@(152),%a0 4417c: 4a88 tstl %a0
4417e: 670c beqs 4418c <rtems_termios_open+0x294>
(*tty->device.firstOpen)(major, minor, arg);
44180: 2f0b movel %a3,%sp@- 44182: 2f03 movel %d3,%sp@- 44184: 2f02 movel %d2,%sp@- 44186: 4e90 jsr %a0@ 44188: 4fef 000c lea %sp@(12),%sp
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4418c: 7002 moveq #2,%d0 4418e: b0aa 00b4 cmpl %a2@(180),%d0
44192: 672c beqs 441c0 <rtems_termios_open+0x2c8>
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
44194: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- 4419a: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
441a0: 588f addql #4,%sp
}
441a2: 2004 movel %d4,%d0 441a4: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 441aa: 4e5e unlk %fp 441ac: 4e75 rts
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))
441ae: b6aa 0010 cmpl %a2@(16),%d3
441b2: 67ae beqs 44162 <rtems_termios_open+0x26a> <== 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) {
441b4: 2452 moveal %a2@,%a2 <== NOT EXECUTED 441b6: 4a8a tstl %a2 <== NOT EXECUTED 441b8: 6600 fd78 bnew 43f32 <rtems_termios_open+0x3a> <== NOT EXECUTED 441bc: 6000 fd82 braw 43f40 <rtems_termios_open+0x48> <== NOT EXECUTED
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_start(
441c0: 2f0a movel %a2,%sp@- 441c2: 487a 1602 pea %pc@(457c6 <rtems_termios_rxdaemon>) 441c6: 47f9 0004 6af4 lea 46af4 <rtems_task_start>,%a3 441cc: 2f2a 00c4 movel %a2@(196),%sp@- 441d0: 4e93 jsr %a3@
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
441d2: 4fef 000c lea %sp@(12),%sp 441d6: 4a80 tstl %d0
441d8: 664c bnes 44226 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
441da: 2f0a movel %a2,%sp@- 441dc: 487a 18b6 pea %pc@(45a94 <rtems_termios_txdaemon>) 441e0: 2f2a 00c8 movel %a2@(200),%sp@- 441e4: 4e93 jsr %a3@
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
441e6: 4fef 000c lea %sp@(12),%sp 441ea: 4a80 tstl %d0
441ec: 6638 bnes 44226 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
441ee: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- 441f4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
441fa: 588f addql #4,%sp 441fc: 60a4 bras 441a2 <rtems_termios_open+0x2aa>
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
441fe: 486d 0068 pea %a5@(104)
rtems_build_name ('T', 'R', 'r', c),
44202: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44208: 42a7 clrl %sp@- 4420a: 4878 0024 pea 24 <OPER2+0x10>
rtems_build_name ('T', 'R', 'r', c),
4420e: 49c0 extbl %d0
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
sc = rtems_semaphore_create (
44210: 0080 5452 7200 oril #1414689280,%d0 44216: 42a7 clrl %sp@- 44218: 2f00 movel %d0,%sp@- 4421a: 4e94 jsr %a4@
rtems_build_name ('T', 'R', 'r', c),
0,
RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&tty->rawInBuf.Semaphore);
if (sc != RTEMS_SUCCESSFUL)
4421c: 4fef 0014 lea %sp@(20),%sp 44220: 4a80 tstl %d0 44222: 6700 fe84 beqw 440a8 <rtems_termios_open+0x1b0>
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(
tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
44226: 2f00 movel %d0,%sp@- 44228: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred>
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
4422e: 486d 00c8 pea %a5@(200) 44232: 2a3c 0004 6844 movel #288836,%d5 44238: 2045 moveal %d5,%a0 4423a: 42a7 clrl %sp@- 4423c: 4878 0500 pea 500 <DBL_MAX_EXP+0xff> 44240: 4878 0400 pea 400 <D_BIAS+0x2> 44244: 4878 000a pea a <LASTO>
rtems_build_name ('T', 'x', 'T', c),
44248: 1039 0005 e38c moveb 5e38c <c.6222>,%d0 4424e: 49c0 extbl %d0
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
sc = rtems_task_create (
44250: 0080 5478 5400 oril #1417171968,%d0 44256: 2f00 movel %d0,%sp@- 44258: 4e90 jsr %a0@
TERMIOS_TXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
4425a: 4fef 0018 lea %sp@(24),%sp 4425e: 4a80 tstl %d0
44260: 66c4 bnes 44226 <rtems_termios_open+0x32e> <== NEVER TAKEN
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
44262: 486d 00c4 pea %a5@(196) 44266: 2045 moveal %d5,%a0
rtems_build_name ('R', 'x', 'T', c),
44268: 1039 0005 e38c moveb 5e38c <c.6222>,%d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
4426e: 42a7 clrl %sp@- 44270: 4878 0500 pea 500 <DBL_MAX_EXP+0xff>
rtems_build_name ('R', 'x', 'T', c),
44274: 49c0 extbl %d0
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->txTaskId);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
44276: 4878 0400 pea 400 <D_BIAS+0x2> 4427a: 4878 0009 pea 9 <DIVIDE_BY_ZERO+0x1> 4427e: 0080 5278 5400 oril #1383617536,%d0 44284: 2f00 movel %d0,%sp@- 44286: 4e90 jsr %a0@
TERMIOS_RXTASK_STACKSIZE,
RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE |
RTEMS_NO_ASR,
RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL,
&tty->rxTaskId);
if (sc != RTEMS_SUCCESSFUL)
44288: 4fef 0018 lea %sp@(24),%sp 4428c: 4a80 tstl %d0 4428e: 6700 fe06 beqw 44096 <rtems_termios_open+0x19e>
44292: 6092 bras 44226 <rtems_termios_open+0x32e> <== 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;
44294: 23cd 0005 f9cc movel %a5,5f9cc <rtems_termios_ttyTail> 4429a: 6000 fd4a braw 43fe6 <rtems_termios_open+0xee>
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
4429e: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED
return RTEMS_NO_MEMORY;
442a4: 781a moveq #26,%d4 <== NOT EXECUTED
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (rtems_termios_ttyMutex);
442a6: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
442ac: 588f addql #4,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
442ae: 2004 movel %d4,%d0 <== NOT EXECUTED 442b0: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 442b6: 4e5e unlk %fp <== NOT EXECUTED 442b8: 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);
442ba: 2f0d movel %a5,%sp@- <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
442bc: 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);
442be: 4eb9 0004 2db8 jsr 42db8 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
442c4: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 442ca: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
442d0: 508f addql #8,%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
442d2: 2004 movel %d4,%d0 <== NOT EXECUTED 442d4: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 442da: 4e5e unlk %fp <== NOT EXECUTED 442dc: 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));
442de: 2f05 movel %d5,%sp@- <== NOT EXECUTED 442e0: 45f9 0004 2db8 lea 42db8 <free>,%a2 <== NOT EXECUTED
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
442e6: 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));
442e8: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
442ea: 2f0d movel %a5,%sp@- <== NOT EXECUTED 442ec: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
442ee: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 442f4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
442fa: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
442fe: 2004 movel %d4,%d0 <== NOT EXECUTED 44300: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44306: 4e5e unlk %fp <== NOT EXECUTED 44308: 4e75 rts <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
4430a: 2f06 movel %d6,%sp@- <== NOT EXECUTED 4430c: 45f9 0004 2db8 lea 42db8 <free>,%a2 <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
free(tty);
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_NO_MEMORY;
44312: 781a moveq #26,%d4 <== NOT EXECUTED
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
if (tty->cbuf == NULL) {
free((void *)(tty->rawOutBuf.theBuf));
44314: 4e92 jsr %a2@ <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
44316: 2f05 movel %d5,%sp@- <== NOT EXECUTED 44318: 4e92 jsr %a2@ <== NOT EXECUTED
free(tty);
4431a: 2f0d movel %a5,%sp@- <== NOT EXECUTED 4431c: 4e92 jsr %a2@ <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4431e: 2f39 0005 f9c8 movel 5f9c8 <rtems_termios_ttyMutex>,%sp@- <== NOT EXECUTED 44324: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4432a: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
return RTEMS_SUCCESSFUL;
}
4432e: 2004 movel %d4,%d0 <== NOT EXECUTED 44330: 4cee 3cfc ffd8 moveml %fp@(-40),%d2-%d7/%a2-%a5 <== NOT EXECUTED 44336: 4e5e unlk %fp <== NOT EXECUTED
000448e2 <rtems_termios_puts>:
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
448e2: 4e56 ffdc linkw %fp,#-36 448e6: 48d7 1cfc moveml %d2-%d7/%a2-%a4,%sp@ 448ea: 286e 0008 moveal %fp@(8),%a4 448ee: 242e 000c movel %fp@(12),%d2 448f2: 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) {
448f6: 4aaa 00b4 tstl %a2@(180) 448fa: 6700 00c6 beqw 449c2 <rtems_termios_puts+0xe0>
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
448fe: 2c2a 0080 movel %a2@(128),%d6
while (len) {
44902: 4a82 tstl %d2 44904: 6700 008e beqw 44994 <rtems_termios_puts+0xb2>
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
rtems_interrupt_disable (level);
44908: 2a3c 0000 0700 movel #1792,%d5 4490e: 47f9 0004 6648 lea 46648 <rtems_semaphore_obtain>,%a3
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
44914: 222a 0088 movel %a2@(136),%d1 44918: 5286 addql #1,%d6
rtems_interrupt_disable (level);
4491a: 2005 movel %d5,%d0
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
4491c: 4c41 6007 remul %d1,%d7,%d6 44920: 2c07 movel %d7,%d6
rtems_interrupt_disable (level);
44922: 40c3 movew %sr,%d3 44924: 8083 orl %d3,%d0 44926: 46c0 movew %d0,%sr
while (newHead == tty->rawOutBuf.Tail) {
44928: 282a 0084 movel %a2@(132),%d4 4492c: be84 cmpl %d4,%d7
4492e: 662c bnes 4495c <rtems_termios_puts+0x7a>
tty->rawOutBufState = rob_wait;
44930: 7002 moveq #2,%d0 44932: 2540 0094 movel %d0,%a2@(148)
rtems_interrupt_enable (level);
44936: 46c3 movew %d3,%sr
sc = rtems_semaphore_obtain(
44938: 42a7 clrl %sp@- 4493a: 42a7 clrl %sp@- 4493c: 2f2a 008c movel %a2@(140),%sp@- 44940: 4e93 jsr %a3@
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
44942: 4fef 000c lea %sp@(12),%sp 44946: 4a80 tstl %d0 44948: 6600 0094 bnew 449de <rtems_termios_puts+0xfc>
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
4494c: 2005 movel %d5,%d0 4494e: 40c3 movew %sr,%d3 44950: 8083 orl %d3,%d0 44952: 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) {
44954: 202a 0084 movel %a2@(132),%d0 44958: b880 cmpl %d0,%d4
4495a: 67d4 beqs 44930 <rtems_termios_puts+0x4e> <== NEVER TAKEN
tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
rtems_interrupt_disable (level);
}
tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++;
4495c: 202a 0080 movel %a2@(128),%d0 44960: 206a 007c moveal %a2@(124),%a0 44964: 119c 0800 moveb %a4@+,%a0@(00000000,%d0:l)
tty->rawOutBuf.Head = newHead;
44968: 2547 0080 movel %d7,%a2@(128)
if (tty->rawOutBufState == rob_idle) {
4496c: 4aaa 0094 tstl %a2@(148)
44970: 661c bnes 4498e <rtems_termios_puts+0xac>
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
44972: 202a 00b8 movel %a2@(184),%d0 44976: 0800 0004 btst #4,%d0
4497a: 6722 beqs 4499e <rtems_termios_puts+0xbc> <== 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;
4497c: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 44980: 7220 moveq #32,%d1 <== NOT EXECUTED 44982: 8081 orl %d1,%d0 <== NOT EXECUTED 44984: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy;
44988: 7001 moveq #1,%d0 <== NOT EXECUTED 4498a: 2540 0094 movel %d0,%a2@(148) <== NOT EXECUTED
}
rtems_interrupt_enable (level);
4498e: 46c3 movew %d3,%sr
len--;
44990: 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) {
44992: 6680 bnes 44914 <rtems_termios_puts+0x32>
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
44994: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 4499a: 4e5e unlk %fp 4499c: 4e75 rts
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,
4499e: 4878 0001 pea 1 <ADD>
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
449a2: 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,
449a6: d0aa 007c addl %a2@(124),%d0 449aa: 2f00 movel %d0,%sp@- 449ac: 2f2a 0010 movel %a2@(16),%sp@- 449b0: 206a 00a4 moveal %a2@(164),%a0 449b4: 4e90 jsr %a0@ 449b6: 4fef 000c lea %sp@(12),%sp
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
} else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
449ba: 7001 moveq #1,%d0 449bc: 2540 0094 movel %d0,%a2@(148) 449c0: 60cc bras 4498e <rtems_termios_puts+0xac>
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);
449c2: 226a 00a4 moveal %a2@(164),%a1 449c6: 2d6a 0010 0008 movel %a2@(16),%fp@(8) 449cc: 2d42 0010 movel %d2,%fp@(16) 449d0: 2d4c 000c movel %a4,%fp@(12)
tty->rawOutBufState = rob_busy;
}
rtems_interrupt_enable (level);
len--;
}
}
449d4: 4cee 1cfc ffdc moveml %fp@(-36),%d2-%d7/%a2-%a4 449da: 4e5e unlk %fp
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
449dc: 4ed1 jmp %a1@
tty->rawOutBufState = rob_wait;
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);
449de: 2f00 movel %d0,%sp@- <== NOT EXECUTED 449e0: 4eb9 0004 6d74 jsr 46d74 <rtems_fatal_error_occurred> <== NOT EXECUTED
000451a2 <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
451a2: 4e56 ffd4 linkw %fp,#-44 451a6: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 451aa: 2a6e 0008 moveal %fp@(8),%a5
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);
451ae: 2c3c 0004 6648 movel #288328,%d6
rtems_status_code
rtems_termios_read (void *arg)
{
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
451b4: 2055 moveal %a5@,%a0 451b6: 2468 0034 moveal %a0@(52),%a2
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
451ba: 2046 moveal %d6,%a0 451bc: 42a7 clrl %sp@-
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;
451be: 282d 0010 movel %a5@(16),%d4
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
451c2: 42a7 clrl %sp@- 451c4: 2f2a 0014 movel %a2@(20),%sp@-
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;
451c8: 286d 000c moveal %a5@(12),%a4
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
451cc: 4e90 jsr %a0@
if (sc != RTEMS_SUCCESSFUL)
451ce: 4fef 000c lea %sp@(12),%sp
struct rtems_termios_tty *tty = args->iop->data1;
uint32_t count = args->count;
char *buffer = args->buffer;
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
451d2: 2a00 movel %d0,%d5
if (sc != RTEMS_SUCCESSFUL)
451d4: 662e bnes 45204 <rtems_termios_read+0x62> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
451d6: 202a 00cc movel %a2@(204),%d0 451da: eb88 lsll #5,%d0 451dc: 0680 0005 f194 addil #389524,%d0 451e2: 2240 moveal %d0,%a1 451e4: 2051 moveal %a1@,%a0 451e6: 4a88 tstl %a0
451e8: 6726 beqs 45210 <rtems_termios_read+0x6e>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
451ea: 2f0d movel %a5,%sp@- 451ec: 2f0a movel %a2,%sp@- 451ee: 4e90 jsr %a0@ 451f0: 2a00 movel %d0,%d5
tty->tty_rcvwakeup = 0;
451f2: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
451f6: 2f2a 0014 movel %a2@(20),%sp@- 451fa: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return sc;
45200: 4fef 000c lea %sp@(12),%sp
} args->bytes_moved = args->count - count; tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; }
45204: 2005 movel %d5,%d0 45206: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 4520c: 4e5e unlk %fp 4520e: 4e75 rts
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
45210: 202a 0020 movel %a2@(32),%d0 45214: b0aa 0024 cmpl %a2@(36),%d0
45218: 674e beqs 45268 <rtems_termios_read+0xc6> <== ALWAYS TAKEN
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
4521a: 4a84 tstl %d4
4521c: 6724 beqs 45242 <rtems_termios_read+0xa0> <== NEVER TAKEN
4521e: 202a 0024 movel %a2@(36),%d0 45222: b0aa 0020 cmpl %a2@(32),%d0
45226: 6c1a bges 45242 <rtems_termios_read+0xa0> <== NEVER TAKEN
*buffer++ = tty->cbuf[tty->cindex++];
45228: 206a 001c moveal %a2@(28),%a0
count--;
4522c: 5384 subql #1,%d4
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
4522e: 18f0 0800 moveb %a0@(00000000,%d0:l),%a4@+ 45232: 5280 addql #1,%d0 45234: 2540 0024 movel %d0,%a2@(36)
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
45238: 4a84 tstl %d4
4523a: 6706 beqs 45242 <rtems_termios_read+0xa0> <== NEVER TAKEN
4523c: b0aa 0020 cmpl %a2@(32),%d0
45240: 6de6 blts 45228 <rtems_termios_read+0x86>
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
45242: 202d 0010 movel %a5@(16),%d0 45246: 9084 subl %d4,%d0 45248: 2b40 0018 movel %d0,%a5@(24)
tty->tty_rcvwakeup = 0;
4524c: 42aa 00e4 clrl %a2@(228)
rtems_semaphore_release (tty->isem);
45250: 2f2a 0014 movel %a2@(20),%sp@- 45254: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return sc;
4525a: 588f addql #4,%sp
}
4525c: 2005 movel %d5,%d0 4525e: 4cee 3cfc ffd4 moveml %fp@(-44),%d2-%d7/%a2-%a5 45264: 4e5e unlk %fp 45266: 4e75 rts
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
45268: 206a 00a0 moveal %a2@(160),%a0
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
4526c: 256a 0028 002c movel %a2@(40),%a2@(44)
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
45272: 42aa 0020 clrl %a2@(32) 45276: 42aa 0024 clrl %a2@(36)
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL &&
4527a: 4a88 tstl %a0
4527c: 6708 beqs 45286 <rtems_termios_read+0xe4>
4527e: 4aaa 00b4 tstl %a2@(180) 45282: 6700 0172 beqw 453f6 <rtems_termios_read+0x254>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45286: 222a 005c movel %a2@(92),%d1
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)(
4528a: 41ea 0049 lea %a2@(73),%a0
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
4528e: 7401 moveq #1,%d2 45290: 47fa fdc6 lea %pc@(45058 <siproc>),%a3
* Fill the input buffer from the raw input queue
*/
static rtems_status_code
fillBufferQueue (struct rtems_termios_tty *tty)
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
45294: 262a 0074 movel %a2@(116),%d3
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45298: 202a 0060 movel %a2@(96),%d0
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)(
4529c: 2d48 fffc movel %a0,%fp@(-4)
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
452a0: b081 cmpl %d1,%d0 452a2: 6700 00be beqw 45362 <rtems_termios_read+0x1c0>
(tty->ccount < (CBUFSIZE-1))) {
452a6: 2039 0005 e380 movel 5e380 <rtems_termios_cbufsize>,%d0 452ac: 5380 subql #1,%d0
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
452ae: b0aa 0020 cmpl %a2@(32),%d0 452b2: 6f00 00ae blew 45362 <rtems_termios_read+0x1c0>
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
452b6: 262a 005c movel %a2@(92),%d3 452ba: 5283 addql #1,%d3 452bc: 202a 0064 movel %a2@(100),%d0
c = tty->rawInBuf.theBuf[newHead];
452c0: 206a 0058 moveal %a2@(88),%a0
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
452c4: 4c40 3001 remul %d0,%d1,%d3
c = tty->rawInBuf.theBuf[newHead];
452c8: 1630 1800 moveb %a0@(00000000,%d1:l),%d3
tty->rawInBuf.Head = newHead;
452cc: 2541 005c movel %d1,%a2@(92)
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
452d0: 202a 0060 movel %a2@(96),%d0 452d4: 206a 0064 moveal %a2@(100),%a0 452d8: d088 addl %a0,%d0 452da: 9081 subl %d1,%d0
% tty->rawInBuf.Size)
452dc: 222a 0064 movel %a2@(100),%d1 452e0: 4c41 0007 remul %d1,%d7,%d0
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
c = tty->rawInBuf.theBuf[newHead];
tty->rawInBuf.Head = newHead;
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
452e4: beaa 00bc cmpl %a2@(188),%d7
452e8: 6446 bccs 45330 <rtems_termios_read+0x18e> <== NEVER TAKEN
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
452ea: 202a 00b8 movel %a2@(184),%d0 452ee: 72fe moveq #-2,%d1 452f0: c081 andl %d1,%d0 452f2: 2540 00b8 movel %d0,%a2@(184)
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
452f6: 202a 00b8 movel %a2@(184),%d0 452fa: 0280 0000 0202 andil #514,%d0 45300: 0c80 0000 0202 cmpil #514,%d0 45306: 6700 0088 beqw 45390 <rtems_termios_read+0x1ee>
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
4530a: 202a 00b8 movel %a2@(184),%d0 4530e: 0800 0008 btst #8,%d0
45312: 671c beqs 45330 <rtems_termios_read+0x18e> <== ALWAYS TAKEN
tty->flow_ctrl &= ~FL_IRTSOFF;
45314: 222a 00b8 movel %a2@(184),%d1 <== NOT EXECUTED 45318: 7efb moveq #-5,%d7 <== NOT EXECUTED 4531a: c287 andl %d7,%d1 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
4531c: 206a 00b0 moveal %a2@(176),%a0 <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
/* XON should be sent now... */
(*tty->device.write)(
tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
} else if (tty->flow_ctrl & FL_MDRTS) {
tty->flow_ctrl &= ~FL_IRTSOFF;
45320: 2541 00b8 movel %d1,%a2@(184) <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
45324: 4a88 tstl %a0 <== NOT EXECUTED 45326: 6708 beqs 45330 <rtems_termios_read+0x18e> <== NOT EXECUTED
tty->device.startRemoteTx(tty->minor);
45328: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 4532c: 4e90 jsr %a0@ <== NOT EXECUTED 4532e: 588f addql #4,%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
45330: 7002 moveq #2,%d0 45332: c0aa 003c andl %a2@(60),%d0 45336: 6700 008a beqw 453c2 <rtems_termios_read+0x220>
if (siproc (c, tty))
4533a: 2f0a movel %a2,%sp@- 4533c: 0283 0000 00ff andil #255,%d3 45342: 2f03 movel %d3,%sp@- 45344: 4e93 jsr %a3@
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45346: 222a 005c movel %a2@(92),%d1
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
4534a: 4a80 tstl %d0 4534c: 57c0 seq %d0
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
4534e: 262a 0070 movel %a2@(112),%d3
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
45352: 49c0 extbl %d0
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
45354: 508f addql #8,%sp
wait = 0;
45356: c480 andl %d0,%d2
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45358: 202a 0060 movel %a2@(96),%d0 4535c: b081 cmpl %d1,%d0 4535e: 6600 ff46 bnew 452a6 <rtems_termios_read+0x104>
}
/*
* Wait for characters
*/
if ( wait ) {
45362: 4a82 tstl %d2 45364: 6700 feb4 beqw 4521a <rtems_termios_read+0x78>
sc = rtems_semaphore_obtain(
45368: 2f03 movel %d3,%sp@- 4536a: 2f2a 006c movel %a2@(108),%sp@- 4536e: 2046 moveal %d6,%a0 45370: 2f2a 0068 movel %a2@(104),%sp@- 45374: 4e90 jsr %a0@
tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout);
if (sc != RTEMS_SUCCESSFUL)
45376: 4fef 000c lea %sp@(12),%sp 4537a: 4a80 tstl %d0 4537c: 6600 fe9c bnew 4521a <rtems_termios_read+0x78>
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
45380: 222a 005c movel %a2@(92),%d1 45384: 202a 0060 movel %a2@(96),%d0 45388: b081 cmpl %d1,%d0 4538a: 6600 ff1a bnew 452a6 <rtems_termios_read+0x104> 4538e: 60d2 bras 45362 <rtems_termios_read+0x1c0>
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
45390: 4aaa 0094 tstl %a2@(148) <== NOT EXECUTED 45394: 670c beqs 453a2 <rtems_termios_read+0x200> <== NOT EXECUTED
|| (tty->flow_ctrl & FL_OSTOP))) {
45396: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 4539a: 0800 0005 btst #5,%d0 <== NOT EXECUTED 4539e: 6700 ff6a beqw 4530a <rtems_termios_read+0x168> <== NOT EXECUTED
/* XON should be sent now... */
(*tty->device.write)(
453a2: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 453a6: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 453aa: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 453ae: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 453b2: 4e90 jsr %a0@ <== NOT EXECUTED 453b4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
453b8: 7002 moveq #2,%d0 <== NOT EXECUTED 453ba: c0aa 003c andl %a2@(60),%d0 <== NOT EXECUTED 453be: 6600 ff7a bnew 4533a <rtems_termios_read+0x198> <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
453c2: 2f0a movel %a2,%sp@- <== NOT EXECUTED 453c4: 0283 0000 00ff andil #255,%d3 <== NOT EXECUTED 453ca: 2f03 movel %d3,%sp@- <== NOT EXECUTED 453cc: 4e93 jsr %a3@ <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
453ce: 222a 005c movel %a2@(92),%d1 <== NOT EXECUTED
if (tty->termios.c_lflag & ICANON) {
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
453d2: 4280 clrl %d0 <== NOT EXECUTED 453d4: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 453d8: 508f addql #8,%sp <== NOT EXECUTED
wait = 0;
453da: b0aa 0020 cmpl %a2@(32),%d0 <== NOT EXECUTED 453de: 5ec0 sgt %d0 <== NOT EXECUTED
}
timeout = tty->rawInBufSemaphoreTimeout;
453e0: 262a 0070 movel %a2@(112),%d3 <== NOT EXECUTED
if (siproc (c, tty))
wait = 0;
} else {
siproc (c, tty);
if (tty->ccount >= tty->termios.c_cc[VMIN])
wait = 0;
453e4: 49c0 extbl %d0 <== NOT EXECUTED 453e6: c480 andl %d0,%d2 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
453e8: 202a 0060 movel %a2@(96),%d0 <== NOT EXECUTED 453ec: b081 cmpl %d1,%d0 <== NOT EXECUTED 453ee: 6600 feb6 bnew 452a6 <rtems_termios_read+0x104> <== NOT EXECUTED 453f2: 6000 ff6e braw 45362 <rtems_termios_read+0x1c0> <== NOT EXECUTED
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
453f6: 7002 moveq #2,%d0 453f8: c0aa 003c andl %a2@(60),%d0
453fc: 6740 beqs 4543e <rtems_termios_read+0x29c> <== NEVER TAKEN
453fe: 47fa fc58 lea %pc@(45058 <siproc>),%a3
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
45402: 243c 0004 6bb0 movel #289712,%d2
{
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45408: 2f2a 0010 movel %a2@(16),%sp@- 4540c: 4e90 jsr %a0@
if (n < 0) {
4540e: 588f addql #4,%sp 45410: 4a80 tstl %d0
45412: 6d1a blts 4542e <rtems_termios_read+0x28c>
rtems_task_wake_after (1);
} else {
if (siproc (n, tty))
45414: 2f0a movel %a2,%sp@- 45416: 0280 0000 00ff andil #255,%d0 4541c: 2f00 movel %d0,%sp@- 4541e: 4e93 jsr %a3@ 45420: 508f addql #8,%sp 45422: 4a80 tstl %d0 45424: 6600 fdf4 bnew 4521a <rtems_termios_read+0x78>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45428: 206a 00a0 moveal %a2@(160),%a0 4542c: 60da bras 45408 <rtems_termios_read+0x266>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4542e: 4878 0001 pea 1 <ADD> 45432: 2042 moveal %d2,%a0 45434: 4e90 jsr %a0@
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
45436: 206a 00a0 moveal %a2@(160),%a0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
rtems_task_wake_after (1);
4543a: 588f addql #4,%sp 4543c: 60ca bras 45408 <rtems_termios_read+0x266>
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
4543e: 47fa fc18 lea %pc@(45058 <siproc>),%a3 <== NOT EXECUTED
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
45442: 263c 0004 5f24 movel #286500,%d3 <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
45448: 243c 0004 6bb0 movel #289712,%d2 <== NOT EXECUTED
}
}
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
4544e: 2243 moveal %d3,%a1 <== NOT EXECUTED 45450: 4e91 jsr %a1@ <== NOT EXECUTED 45452: 2c00 movel %d0,%d6 <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
45454: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45458: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 4545c: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
4545e: 588f addql #4,%sp <== NOT EXECUTED 45460: 4a80 tstl %d0 <== NOT EXECUTED 45462: 6d38 blts 4549c <rtems_termios_read+0x2fa> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
} else {
siproc (n, tty);
45464: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45466: 0280 0000 00ff andil #255,%d0 <== NOT EXECUTED 4546c: 2f00 movel %d0,%sp@- <== NOT EXECUTED 4546e: 4e93 jsr %a3@ <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
45470: 508f addql #8,%sp <== NOT EXECUTED 45472: 4281 clrl %d1 <== NOT EXECUTED 45474: 102a 0047 moveb %a2@(71),%d0 <== NOT EXECUTED 45478: 1200 moveb %d0,%d1 <== NOT EXECUTED 4547a: b2aa 0020 cmpl %a2@(32),%d1 <== NOT EXECUTED 4547e: 6f00 fd9a blew 4521a <rtems_termios_read+0x78> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
45482: 4a00 tstb %d0 <== NOT EXECUTED 45484: 67ce beqs 45454 <rtems_termios_read+0x2b2> <== NOT EXECUTED 45486: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 4548a: 66c2 bnes 4544e <rtems_termios_read+0x2ac> <== NOT EXECUTED
} else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
4548c: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45490: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 45494: 4e90 jsr %a0@ <== NOT EXECUTED
if (n < 0) {
45496: 588f addql #4,%sp <== NOT EXECUTED 45498: 4a80 tstl %d0 <== NOT EXECUTED 4549a: 6cc8 bges 45464 <rtems_termios_read+0x2c2> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
4549c: 4a2a 0047 tstb %a2@(71) <== NOT EXECUTED 454a0: 6732 beqs 454d4 <rtems_termios_read+0x332> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
454a2: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 454a6: 6706 beqs 454ae <rtems_termios_read+0x30c> <== NOT EXECUTED 454a8: 4aaa 0020 tstl %a2@(32) <== NOT EXECUTED 454ac: 660c bnes 454ba <rtems_termios_read+0x318> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
454ae: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 454b2: 2042 moveal %d2,%a0 <== NOT EXECUTED 454b4: 4e90 jsr %a0@ <== NOT EXECUTED 454b6: 588f addql #4,%sp <== NOT EXECUTED 454b8: 609a bras 45454 <rtems_termios_read+0x2b2> <== NOT EXECUTED
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
if (tty->termios.c_cc[VMIN]) {
if (tty->termios.c_cc[VTIME] && tty->ccount) {
now = rtems_clock_get_ticks_since_boot();
454ba: 2043 moveal %d3,%a0 <== NOT EXECUTED 454bc: 4e90 jsr %a0@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
454be: 9086 subl %d6,%d0 <== NOT EXECUTED 454c0: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 454c4: 6200 fd54 bhiw 4521a <rtems_termios_read+0x78> <== NOT EXECUTED
now = rtems_clock_get_ticks_since_boot();
if ((now - then) > tty->vtimeTicks) {
break;
}
}
rtems_task_wake_after (1);
454c8: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 454cc: 2042 moveal %d2,%a0 <== NOT EXECUTED 454ce: 4e90 jsr %a0@ <== NOT EXECUTED 454d0: 588f addql #4,%sp <== NOT EXECUTED 454d2: 6080 bras 45454 <rtems_termios_read+0x2b2> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
break;
}
}
} else {
if (!tty->termios.c_cc[VTIME])
454d4: 4a2a 0046 tstb %a2@(70) <== NOT EXECUTED 454d8: 6700 fd40 beqw 4521a <rtems_termios_read+0x78> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
454dc: 2243 moveal %d3,%a1 <== NOT EXECUTED 454de: 4e91 jsr %a1@ <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
454e0: 9086 subl %d6,%d0 <== NOT EXECUTED 454e2: b0aa 0054 cmpl %a2@(84),%d0 <== NOT EXECUTED 454e6: 6200 fd32 bhiw 4521a <rtems_termios_read+0x78> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
454ea: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 454ee: 2042 moveal %d2,%a0 <== NOT EXECUTED 454f0: 4e90 jsr %a0@ <== NOT EXECUTED 454f2: 588f addql #4,%sp <== NOT EXECUTED 454f4: 6000 ff5e braw 45454 <rtems_termios_read+0x2b2> <== NOT EXECUTED
00045862 <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)
{
45862: 4e56 fff4 linkw %fp,#-12 45866: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4586a: 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))
4586e: 202a 00b8 movel %a2@(184),%d0 45872: 0280 0000 0403 andil #1027,%d0 45878: 0c80 0000 0401 cmpil #1025,%d0 4587e: 6700 0140 beqw 459c0 <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)) == FL_ISNTXOF) {
45882: 202a 00b8 movel %a2@(184),%d0 45886: 7603 moveq #3,%d3 45888: 7202 moveq #2,%d1 4588a: c083 andl %d3,%d0 4588c: b280 cmpl %d0,%d1 4588e: 6700 0172 beqw 45a02 <rtems_termios_refill_transmitter+0x1a0>
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
nToSend = 1;
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
45892: 222a 0080 movel %a2@(128),%d1 45896: 202a 0084 movel %a2@(132),%d0 4589a: b081 cmpl %d1,%d0 4589c: 6700 009a beqw 45938 <rtems_termios_refill_transmitter+0xd6>
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
}
rtems_interrupt_disable(level);
458a0: 203c 0000 0700 movel #1792,%d0 458a6: 40c2 movew %sr,%d2 458a8: 8082 orl %d2,%d0 458aa: 46c0 movew %d0,%sr
len = tty->t_dqlen;
458ac: 222a 0090 movel %a2@(144),%d1
tty->t_dqlen = 0;
458b0: 42aa 0090 clrl %a2@(144)
rtems_interrupt_enable(level);
458b4: 46c2 movew %d2,%sr
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
458b6: 202a 0084 movel %a2@(132),%d0 458ba: d280 addl %d0,%d1 458bc: 202a 0088 movel %a2@(136),%d0 458c0: 4c40 1002 remul %d0,%d2,%d1
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
458c4: 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;
458c6: 2542 0084 movel %d2,%a2@(132)
if (tty->rawOutBufState == rob_wait) {
458ca: b0aa 0094 cmpl %a2@(148),%d0 458ce: 6700 00d8 beqw 459a8 <rtems_termios_refill_transmitter+0x146>
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
if (newTail == tty->rawOutBuf.Head) {
458d2: 202a 0080 movel %a2@(128),%d0 458d6: b480 cmpl %d0,%d2
458d8: 6776 beqs 45950 <rtems_termios_refill_transmitter+0xee>
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))
458da: 202a 00b8 movel %a2@(184),%d0 458de: 0280 0000 0210 andil #528,%d0 458e4: 0c80 0000 0210 cmpil #528,%d0 458ea: 6700 015a beqw 45a46 <rtems_termios_refill_transmitter+0x1e4>
nToSend = 0;
} else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
458ee: 202a 0080 movel %a2@(128),%d0 458f2: b082 cmpl %d2,%d0
458f4: 647c bccs 45972 <rtems_termios_refill_transmitter+0x110>
nToSend = tty->rawOutBuf.Size - newTail;
458f6: 262a 0088 movel %a2@(136),%d3 458fa: 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)) {
458fc: 202a 00b8 movel %a2@(184),%d0 45900: 0280 0000 0600 andil #1536,%d0
45906: 667c bnes 45984 <rtems_termios_refill_transmitter+0x122><== NEVER TAKEN
45908: 2003 movel %d3,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
4590a: 7201 moveq #1,%d1
(*tty->device.write)(
4590c: 2f00 movel %d0,%sp@- 4590e: 202a 007c movel %a2@(124),%d0 45912: d082 addl %d2,%d0 45914: 2f00 movel %d0,%sp@- 45916: 2f2a 0010 movel %a2@(16),%sp@- 4591a: 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*/
4591e: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
45922: 4e90 jsr %a0@ 45924: 4fef 000c lea %sp@(12),%sp
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45928: 2542 0084 movel %d2,%a2@(132)
} return nToSend; }
4592c: 2003 movel %d3,%d0 4592e: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 45934: 4e5e unlk %fp 45936: 4e75 rts
} else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
45938: 7602 moveq #2,%d3 4593a: b6aa 0094 cmpl %a2@(148),%d3 4593e: 6700 0130 beqw 45a70 <rtems_termios_refill_transmitter+0x20e>
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
}
return 0;
45942: 4283 clrl %d3
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45944: 2003 movel %d3,%d0 45946: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 4594c: 4e5e unlk %fp 4594e: 4e75 rts
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45950: 206a 00d4 moveal %a2@(212),%a0
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
45954: 42aa 0094 clrl %a2@(148)
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
45958: 4a88 tstl %a0 4595a: 6700 012e beqw 45a8a <rtems_termios_refill_transmitter+0x228>
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
4595e: 2f2a 00d8 movel %a2@(216),%sp@- <== NOT EXECUTED
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45962: 4283 clrl %d3 <== NOT EXECUTED
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
45964: 486a 0030 pea %a2@(48) <== NOT EXECUTED 45968: 4e90 jsr %a0@ <== NOT EXECUTED 4596a: 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*/
4596c: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED 45970: 60ba bras 4592c <rtems_termios_refill_transmitter+0xca><== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
45972: 262a 0080 movel %a2@(128),%d3 45976: 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)) {
45978: 202a 00b8 movel %a2@(184),%d0 4597c: 0280 0000 0600 andil #1536,%d0
45982: 6784 beqs 45908 <rtems_termios_refill_transmitter+0xa6>
45984: 7001 moveq #1,%d0
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
45986: 7201 moveq #1,%d1
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)) {
nToSend = 1;
45988: 7601 moveq #1,%d3
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
4598a: 2f00 movel %d0,%sp@- 4598c: 202a 007c movel %a2@(124),%d0 45990: d082 addl %d2,%d0 45992: 2f00 movel %d0,%sp@- 45994: 2f2a 0010 movel %a2@(16),%sp@- 45998: 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*/
4599c: 2541 0094 movel %d1,%a2@(148)
(*tty->device.write)(
459a0: 4e90 jsr %a0@ 459a2: 4fef 000c lea %sp@(12),%sp 459a6: 6080 bras 45928 <rtems_termios_refill_transmitter+0xc6>
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
459a8: 2f2a 008c movel %a2@(140),%sp@- 459ac: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
if (newTail == tty->rawOutBuf.Head) {
459b2: 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);
459b6: 588f addql #4,%sp
}
if (newTail == tty->rawOutBuf.Head) {
459b8: b480 cmpl %d0,%d2 459ba: 6600 ff1e bnew 458da <rtems_termios_refill_transmitter+0x78> 459be: 6090 bras 45950 <rtems_termios_refill_transmitter+0xee>
/* 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, (void *)&(tty->termios.c_cc[VSTOP]), 1);
459c0: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 459c4: 486a 004a pea %a2@(74) <== NOT EXECUTED 459c8: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 459cc: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 459d0: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
459d2: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 459d8: 40c1 movew %sr,%d1 <== NOT EXECUTED 459da: 8081 orl %d1,%d0 <== NOT EXECUTED 459dc: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
459de: 7402 moveq #2,%d2 <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
459e0: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
459e4: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 459e8: 8082 orl %d2,%d0 <== NOT EXECUTED 459ea: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
459ee: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
459f0: 7601 moveq #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
459f2: 2003 movel %d3,%d0 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl |= FL_ISNTXOF;
rtems_interrupt_enable(level);
459f4: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
459f8: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 459fe: 4e5e unlk %fp <== NOT EXECUTED 45a00: 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, (void *)&(tty->termios.c_cc[VSTART]), 1);
45a02: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 45a06: 486a 0049 pea %a2@(73) <== NOT EXECUTED 45a0a: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45a0e: 206a 00a4 moveal %a2@(164),%a0 <== NOT EXECUTED 45a12: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_interrupt_disable(level);
45a14: 203c 0000 0700 movel #1792,%d0 <== NOT EXECUTED 45a1a: 40c1 movew %sr,%d1 <== NOT EXECUTED 45a1c: 8081 orl %d1,%d0 <== NOT EXECUTED 45a1e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
45a20: 74fd moveq #-3,%d2 <== NOT EXECUTED
* Therefore the dequeue "length" should be reduced by 1
*/
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
45a22: 53aa 0090 subql #1,%a2@(144) <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
45a26: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45a2a: c082 andl %d2,%d0 <== NOT EXECUTED 45a2c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
rtems_interrupt_enable(level);
45a30: 46c1 movew %d1,%sr <== NOT EXECUTED
nToSend = 1;
45a32: 163c 0001 moveb #1,%d3 <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45a36: 2003 movel %d3,%d0 <== NOT EXECUTED
(*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
tty->flow_ctrl &= ~FL_ISNTXOF;
rtems_interrupt_enable(level);
45a38: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45a3c: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45a42: 4e5e unlk %fp <== NOT EXECUTED 45a44: 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);
45a46: 303c 0700 movew #1792,%d0 <== NOT EXECUTED 45a4a: 40c1 movew %sr,%d1 <== NOT EXECUTED 45a4c: 8081 orl %d1,%d0 <== NOT EXECUTED 45a4e: 46c0 movew %d0,%sr <== NOT EXECUTED
tty->flow_ctrl |= FL_OSTOP;
45a50: 202a 00b8 movel %a2@(184),%d0 <== NOT EXECUTED 45a54: 7620 moveq #32,%d3 <== NOT EXECUTED 45a56: 8083 orl %d3,%d0 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45a58: 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;
45a5c: 2540 00b8 movel %d0,%a2@(184) <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
45a60: 2543 0094 movel %d3,%a2@(148) <== NOT EXECUTED
rtems_interrupt_enable(level);
45a64: 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*/
45a66: 2542 0084 movel %d2,%a2@(132) <== NOT EXECUTED
/* 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);
nToSend = 0;
45a6a: 4203 clrb %d3 <== NOT EXECUTED 45a6c: 6000 febe braw 4592c <rtems_termios_refill_transmitter+0xca><== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45a70: 2f2a 008c movel %a2@(140),%sp@- <== NOT EXECUTED
}
return 0;
45a74: 4203 clrb %d3 <== NOT EXECUTED
*/
if (tty->rawOutBufState == rob_wait) {
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
45a76: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release> <== NOT EXECUTED 45a7c: 588f addql #4,%sp <== NOT EXECUTED
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
}
return nToSend;
}
45a7e: 2003 movel %d3,%d0 <== NOT EXECUTED 45a80: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 45a86: 4e5e unlk %fp <== NOT EXECUTED 45a88: 4e75 rts <== NOT EXECUTED
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(
tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
45a8a: 2542 0084 movel %d2,%a2@(132)
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
nToSend = 0;
45a8e: 4283 clrl %d3 45a90: 6000 fe9a braw 4592c <rtems_termios_refill_transmitter+0xca>
000457c6 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
457c6: 4e56 ffe0 linkw %fp,#-32 457ca: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 457ce: 240e movel %fp,%d2 457d0: 260e movel %fp,%d3 457d2: 5d82 subql #6,%d2 457d4: 47f9 0004 5f90 lea 45f90 <rtems_event_receive>,%a3 457da: 49f9 0004 6988 lea 46988 <rtems_task_delete>,%a4 457e0: 5383 subql #1,%d3 457e2: 4bf9 0004 5514 lea 45514 <rtems_termios_enqueue_raw_characters>,%a5 457e8: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
457ec: 2f02 movel %d2,%sp@- 457ee: 42a7 clrl %sp@- 457f0: 4878 0002 pea 2 <DOUBLE_FLOAT> 457f4: 4878 0003 pea 3 <DIVIDE> 457f8: 4e93 jsr %a3@
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
457fa: 4fef 0010 lea %sp@(16),%sp 457fe: 7001 moveq #1,%d0 45800: c0ae fffa andl %fp@(-6),%d0
45804: 663e bnes 45844 <rtems_termios_rxdaemon+0x7e> <== NEVER TAKEN
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
45806: 2f2a 0010 movel %a2@(16),%sp@- 4580a: 206a 00a0 moveal %a2@(160),%a0 4580e: 4e90 jsr %a0@
if (c != EOF) {
45810: 588f addql #4,%sp 45812: 72ff moveq #-1,%d1 45814: b280 cmpl %d0,%d1
45816: 67d4 beqs 457ec <rtems_termios_rxdaemon+0x26>
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45818: 4878 0001 pea 1 <ADD>
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
4581c: 1d40 ffff moveb %d0,%fp@(-1)
rtems_termios_enqueue_raw_characters ( tty,&c_buf,1);
45820: 2f03 movel %d3,%sp@- 45822: 2f0a movel %a2,%sp@- 45824: 4e95 jsr %a5@ 45826: 4fef 000c lea %sp@(12),%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
4582a: 2f02 movel %d2,%sp@- 4582c: 42a7 clrl %sp@- 4582e: 4878 0002 pea 2 <DOUBLE_FLOAT> 45832: 4878 0003 pea 3 <DIVIDE> 45836: 4e93 jsr %a3@
(TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) {
45838: 4fef 0010 lea %sp@(16),%sp 4583c: 7001 moveq #1,%d0 4583e: c0ae fffa andl %fp@(-6),%d0
45842: 67c2 beqs 45806 <rtems_termios_rxdaemon+0x40> <== ALWAYS TAKEN
tty->rxTaskId = 0;
45844: 42aa 00c4 clrl %a2@(196) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45848: 42a7 clrl %sp@- <== NOT EXECUTED 4584a: 4e94 jsr %a4@ <== NOT EXECUTED 4584c: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4584e: 2f2a 0010 movel %a2@(16),%sp@- <== NOT EXECUTED 45852: 206a 00a0 moveal %a2@(160),%a0 <== NOT EXECUTED 45856: 4e90 jsr %a0@ <== NOT EXECUTED
if (c != EOF) {
45858: 588f addql #4,%sp <== NOT EXECUTED 4585a: 72ff moveq #-1,%d1 <== NOT EXECUTED 4585c: b280 cmpl %d0,%d1 <== NOT EXECUTED 4585e: 678c beqs 457ec <rtems_termios_rxdaemon+0x26> <== NOT EXECUTED 45860: 60b6 bras 45818 <rtems_termios_rxdaemon+0x52> <== NOT EXECUTED
00045a94 <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45a94: 4e56 ffe8 linkw %fp,#-24 45a98: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 45a9c: 240e movel %fp,%d2 45a9e: 5982 subql #4,%d2 45aa0: 49f9 0004 5f90 lea 45f90 <rtems_event_receive>,%a4 45aa6: 4bf9 0004 6988 lea 46988 <rtems_task_delete>,%a5 45aac: 47f9 0004 5862 lea 45862 <rtems_termios_refill_transmitter>,%a3
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45ab2: 2f02 movel %d2,%sp@-
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
45ab4: 246e 0008 moveal %fp@(8),%a2
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45ab8: 42a7 clrl %sp@- 45aba: 4878 0002 pea 2 <DOUBLE_FLOAT> 45abe: 4878 0003 pea 3 <DIVIDE> 45ac2: 4e94 jsr %a4@
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45ac4: 4fef 0010 lea %sp@(16),%sp 45ac8: 7001 moveq #1,%d0 45aca: c0ae fffc andl %fp@(-4),%d0
45ace: 663a bnes 45b0a <rtems_termios_txdaemon+0x76> <== NEVER TAKEN
}
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
45ad0: 202a 00cc movel %a2@(204),%d0 45ad4: eb88 lsll #5,%d0 45ad6: 0680 0005 f1a0 addil #389536,%d0 45adc: 2240 moveal %d0,%a1 45ade: 2051 moveal %a1@,%a0 45ae0: 4a88 tstl %a0
45ae2: 6706 beqs 45aea <rtems_termios_txdaemon+0x56> <== ALWAYS TAKEN
rtems_termios_linesw[tty->t_line].l_start(tty);
45ae4: 2f0a movel %a2,%sp@- <== NOT EXECUTED 45ae6: 4e90 jsr %a0@ <== NOT EXECUTED 45ae8: 588f addql #4,%sp <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
45aea: 2f0a movel %a2,%sp@- 45aec: 4e93 jsr %a3@
}
45aee: 588f addql #4,%sp
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive(
45af0: 2f02 movel %d2,%sp@- 45af2: 42a7 clrl %sp@- 45af4: 4878 0002 pea 2 <DOUBLE_FLOAT> 45af8: 4878 0003 pea 3 <DIVIDE> 45afc: 4e94 jsr %a4@
(TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT),
RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&the_event
);
if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) {
45afe: 4fef 0010 lea %sp@(16),%sp 45b02: 7001 moveq #1,%d0 45b04: c0ae fffc andl %fp@(-4),%d0
45b08: 67c6 beqs 45ad0 <rtems_termios_txdaemon+0x3c> <== ALWAYS TAKEN
tty->txTaskId = 0;
45b0a: 42aa 00c8 clrl %a2@(200) <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
45b0e: 42a7 clrl %sp@- <== NOT EXECUTED 45b10: 4e95 jsr %a5@ <== NOT EXECUTED 45b12: 588f addql #4,%sp <== NOT EXECUTED 45b14: 60ba bras 45ad0 <rtems_termios_txdaemon+0x3c> <== NOT EXECUTED
000450cc <rtems_termios_write>:
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
450cc: 4e56 ffe8 linkw %fp,#-24 450d0: 48d7 3c0c moveml %d2-%d3/%a2-%a5,%sp@ 450d4: 266e 0008 moveal %fp@(8),%a3
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
450d8: 2053 moveal %a3@,%a0 450da: 2468 0034 moveal %a0@(52),%a2
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
450de: 42a7 clrl %sp@- 450e0: 42a7 clrl %sp@- 450e2: 2f2a 0018 movel %a2@(24),%sp@- 450e6: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
450ec: 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);
450f0: 2400 movel %d0,%d2
if (sc != RTEMS_SUCCESSFUL)
450f2: 662a bnes 4511e <rtems_termios_write+0x52> <== NEVER TAKEN
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
450f4: 202a 00cc movel %a2@(204),%d0 450f8: eb88 lsll #5,%d0 450fa: 0680 0005 f198 addil #389528,%d0 45100: 2240 moveal %d0,%a1 45102: 2051 moveal %a1@,%a0 45104: 4a88 tstl %a0
45106: 6722 beqs 4512a <rtems_termios_write+0x5e>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
45108: 2f0b movel %a3,%sp@- 4510a: 2f0a movel %a2,%sp@- 4510c: 4e90 jsr %a0@
rtems_semaphore_release (tty->osem);
4510e: 2f2a 0018 movel %a2@(24),%sp@-
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);
45112: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
45114: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return sc;
4511a: 4fef 000c lea %sp@(12),%sp
rtems_termios_puts (args->buffer, args->count, tty);
args->bytes_moved = args->count;
}
rtems_semaphore_release (tty->osem);
return sc;
}
4511e: 2002 movel %d2,%d0 45120: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 45126: 4e5e unlk %fp 45128: 4e75 rts
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) {
4512a: 7001 moveq #1,%d0 4512c: c0aa 0034 andl %a2@(52),%d0
45130: 6740 beqs 45172 <rtems_termios_write+0xa6>
uint32_t count = args->count;
45132: 262b 0010 movel %a3@(16),%d3
char *buffer = args->buffer;
45136: 286b 000c moveal %a3@(12),%a4
while (count--)
4513a: 675e beqs 4519a <rtems_termios_write+0xce> <== NEVER TAKEN
4513c: 4bfa f8a8 lea %pc@(449e6 <oproc>),%a5
oproc (*buffer++, tty);
45140: 4280 clrl %d0 45142: 101c moveb %a4@+,%d0 45144: 5383 subql #1,%d3 45146: 2f0a movel %a2,%sp@- 45148: 2f00 movel %d0,%sp@- 4514a: 4e95 jsr %a5@
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
4514c: 508f addql #8,%sp 4514e: 4a83 tstl %d3
45150: 66ee bnes 45140 <rtems_termios_write+0x74>
45152: 202b 0010 movel %a3@(16),%d0
oproc (*buffer++, tty);
args->bytes_moved = args->count;
45156: 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);
4515a: 2f2a 0018 movel %a2@(24),%sp@- 4515e: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return sc;
45164: 588f addql #4,%sp
}
45166: 2002 movel %d2,%d0 45168: 4cee 3c0c ffe8 moveml %fp@(-24),%d2-%d3/%a2-%a5 4516e: 4e5e unlk %fp 45170: 4e75 rts
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
args->bytes_moved = args->count;
} else {
rtems_termios_puts (args->buffer, args->count, tty);
45172: 2f0a movel %a2,%sp@- 45174: 2f2b 0010 movel %a3@(16),%sp@- 45178: 2f2b 000c movel %a3@(12),%sp@- 4517c: 4eb9 0004 48e2 jsr 448e2 <rtems_termios_puts>
args->bytes_moved = args->count;
45182: 276b 0010 0018 movel %a3@(16),%a3@(24) 45188: 4fef 000c lea %sp@(12),%sp
} rtems_semaphore_release (tty->osem);
4518c: 2f2a 0018 movel %a2@(24),%sp@- 45190: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
return sc;
45196: 588f addql #4,%sp 45198: 60cc bras 45166 <rtems_termios_write+0x9a>
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
4519a: 4280 clrl %d0 <== NOT EXECUTED
oproc (*buffer++, tty);
args->bytes_moved = args->count;
4519c: 2740 0018 movel %d0,%a3@(24) <== NOT EXECUTED 451a0: 60b8 bras 4515a <rtems_termios_write+0x8e> <== NOT EXECUTED
00058c44 <rtems_timer_cancel>:
*/
rtems_status_code rtems_timer_cancel(
rtems_id id
)
{
58c44: 4e56 fffc linkw %fp,#-4
Objects_Id id,
Objects_Locations *location
)
{
return (Timer_Control *)
_Objects_Get( &_Timer_Information, id, location );
58c48: 486e fffc pea %fp@(-4) 58c4c: 2f2e 0008 movel %fp@(8),%sp@- 58c50: 4879 0007 f344 pea 7f344 <_Timer_Information> 58c56: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
58c5c: 4fef 000c lea %sp@(12),%sp 58c60: 4aae fffc tstl %fp@(-4)
58c64: 6706 beqs 58c6c <rtems_timer_cancel+0x28>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
58c66: 7004 moveq #4,%d0
}
58c68: 4e5e unlk %fp 58c6a: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( !_Timer_Is_dormant_class( the_timer->the_class ) )
58c6c: 7204 moveq #4,%d1 58c6e: 2040 moveal %d0,%a0 58c70: b2a8 0038 cmpl %a0@(56),%d1
58c74: 670c beqs 58c82 <rtems_timer_cancel+0x3e> <== NEVER TAKEN
(void) _Watchdog_Remove( &the_timer->Ticker );
58c76: 4868 0010 pea %a0@(16) 58c7a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove> 58c80: 588f addql #4,%sp
_Thread_Enable_dispatch();
58c82: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
58c88: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
58c8a: 4e5e unlk %fp
...
000596f8 <rtems_timer_initiate_server>:
rtems_status_code rtems_timer_initiate_server(
uint32_t priority,
uint32_t stack_size,
rtems_attribute attribute_set
)
{
596f8: 4e56 fffc linkw %fp,#-4 596fc: 202e 0008 movel %fp@(8),%d0 59700: 2f03 movel %d3,%sp@- 59702: 2f02 movel %d2,%sp@- 59704: 4a80 tstl %d0
59706: 6748 beqs 59750 <rtems_timer_initiate_server+0x58>
( the_priority <= RTEMS_MAXIMUM_PRIORITY ) );
59708: 4281 clrl %d1 5970a: 1239 0007 8f52 moveb 78f52 <rtems_maximum_priority>,%d1
*/
RTEMS_INLINE_ROUTINE bool _RTEMS_tasks_Priority_is_valid (
rtems_task_priority the_priority
)
{
return ( ( the_priority >= RTEMS_MINIMUM_PRIORITY ) &&
59710: b280 cmpl %d0,%d1
59712: 644a bccs 5975e <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 )
59714: 72ff moveq #-1,%d1 59716: b280 cmpl %d0,%d1
59718: 6636 bnes 59750 <rtems_timer_initiate_server+0x58>
5971a: 2239 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d1 59720: 5281 addql #1,%d1
return RTEMS_INVALID_PRIORITY;
_priority = 0;
59722: 4283 clrl %d3 59724: 23c1 0007 eac0 movel %d1,7eac0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
5972a: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
5972c: 1439 0007 9f9a moveb 79f9a <initialized.3565>,%d2
initialized = true;
59732: 13c0 0007 9f9a moveb %d0,79f9a <initialized.3565>
_Thread_Enable_dispatch();
59738: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
if ( tmpInitialized )
5973e: 4a02 tstb %d2
59740: 6744 beqs 59786 <rtems_timer_initiate_server+0x8e>
initialized = false;
}
#endif
return status;
}
59742: 242e fff4 movel %fp@(-12),%d2
tmpInitialized = initialized;
initialized = true;
_Thread_Enable_dispatch();
if ( tmpInitialized )
return RTEMS_INCORRECT_STATE;
59746: 700e moveq #14,%d0
initialized = false;
}
#endif
return status;
}
59748: 262e fff8 movel %fp@(-8),%d3 5974c: 4e5e unlk %fp 5974e: 4e75 rts 59750: 242e fff4 movel %fp@(-12),%d2
* a specific invalid value as the default.
*/
_priority = priority;
if ( !_RTEMS_tasks_Priority_is_valid( priority ) ) {
if ( priority != RTEMS_TIMER_SERVER_DEFAULT_PRIORITY )
return RTEMS_INVALID_PRIORITY;
59754: 7013 moveq #19,%d0
initialized = false;
}
#endif
return status;
}
59756: 262e fff8 movel %fp@(-8),%d3 5975a: 4e5e unlk %fp 5975c: 4e75 rts 5975e: 2239 0007 eac0 movel 7eac0 <_Thread_Dispatch_disable_level>,%d1 59764: 5281 addql #1,%d1 59766: 2600 movel %d0,%d3 59768: 23c1 0007 eac0 movel %d1,7eac0 <_Thread_Dispatch_disable_level>
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
initialized = true;
5976e: 7001 moveq #1,%d0
/*
* Just to make sure this is only called once.
*/
_Thread_Disable_dispatch();
tmpInitialized = initialized;
59770: 1439 0007 9f9a moveb 79f9a <initialized.3565>,%d2
initialized = true;
59776: 13c0 0007 9f9a moveb %d0,79f9a <initialized.3565>
_Thread_Enable_dispatch();
5977c: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
if ( tmpInitialized )
59782: 4a02 tstb %d2
59784: 66bc bnes 59742 <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(
59786: 222e 0010 movel %fp@(16),%d1 5978a: 486e fffc pea %fp@(-4) 5978e: 08c1 000f bset #15,%d1 59792: 2f01 movel %d1,%sp@- 59794: 4878 0100 pea 100 <DBL_MANT_DIG+0xcb> 59798: 2f2e 000c movel %fp@(12),%sp@- 5979c: 2f03 movel %d3,%sp@- 5979e: 2f3c 5449 4d45 movel #1414090053,%sp@- 597a4: 4eb9 0005 8310 jsr 58310 <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) {
597aa: 4fef 0018 lea %sp@(24),%sp 597ae: 4a80 tstl %d0
597b0: 6714 beqs 597c6 <rtems_timer_initiate_server+0xce>
initialized = false;
}
#endif
return status;
}
597b2: 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;
597b6: 4201 clrb %d1
initialized = false;
}
#endif
return status;
}
597b8: 262e fff8 movel %fp@(-8),%d3 597bc: 4e5e unlk %fp
/* system task specified for 0 priority */
attribute_set | RTEMS_SYSTEM_TASK,
&id /* get the id back */
);
if (status) {
initialized = false;
597be: 13c1 0007 9f9a moveb %d1,79f9a <initialized.3565>
initialized = false;
}
#endif
return status;
}
597c4: 4e75 rts
* 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(
&_RTEMS_tasks_Information,
_Objects_Get_index(id)
597c6: 202e fffc movel %fp@(-4),%d0
*/
#if defined(RTEMS_DEBUG)
if ( index > information->maximum )
return NULL;
#endif
return information->local_table[ index ];
597ca: 4282 clrl %d2
/*
* 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(
597cc: 2079 0007 ea52 moveal 7ea52 <_RTEMS_tasks_Information+0x18>,%a0 597d2: 3400 movew %d0,%d2
* 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;
597d4: 2239 0007 ebec movel 7ebec <_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(
597da: 41f0 2c00 lea %a0@(00000000,%d2:l:4),%a0 597de: 23d0 0007 9f1c movel %a0@,79f1c <_Timer_server_Default>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
597e4: 41f9 0007 9f50 lea 79f50 <_Timer_server_Default+0x34>,%a0
_Timer_server = ts;
/*
* Start the timer server
*/
status = rtems_task_start(
597ea: 4879 0007 9f1c pea 79f1c <_Timer_server_Default> 597f0: 487a fb6e pea %pc@(59360 <_Timer_server_Body>) 597f4: 23c8 0007 9f4c movel %a0,79f4c <_Timer_server_Default+0x30>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
597fa: 41f9 0007 9f4c lea 79f4c <_Timer_server_Default+0x30>,%a0 59800: 23c8 0007 9f54 movel %a0,79f54 <_Timer_server_Default+0x38>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59806: 41f9 0007 9f88 lea 79f88 <_Timer_server_Default+0x6c>,%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;
5980c: 23c1 0007 9f58 movel %d1,79f58 <_Timer_server_Default+0x3c>
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59812: 223c 0007 9f84 movel #499588,%d1
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
59818: 23c8 0007 9f84 movel %a0,79f84 <_Timer_server_Default+0x68>
ts->TOD_watchdogs.last_snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
5981e: 41f9 0007 eb4a lea 7eb4a <_TOD_Now>,%a0
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
59824: 23c1 0007 9f8c movel %d1,79f8c <_Timer_server_Default+0x70> 5982a: 23d0 0007 9f90 movel %a0@,79f90 <_Timer_server_Default+0x74>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
59830: 223c 0005 c3a0 movel #377760,%d1 59836: 41f9 0005 c3a0 lea 5c3a0 <_Thread_Delay_ended>,%a0 5983c: 23c1 0007 9f40 movel %d1,79f40 <_Timer_server_Default+0x24>
ts->insert_chain = NULL;
ts->active = false;
59842: 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;
59844: 42b9 0007 9f94 clrl 79f94 <_Timer_server_Default+0x78>
ts->active = false;
5984a: 13c1 0007 9f98 moveb %d1,79f98 <_Timer_server_Default+0x7c> 59850: 23c8 0007 9f78 movel %a0,79f78 <_Timer_server_Default+0x5c>
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59856: 41f9 0007 9f1c lea 79f1c <_Timer_server_Default>,%a0
/*
* Start the timer server
*/
status = rtems_task_start(
5985c: 2f00 movel %d0,%sp@-
/*
* 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;
5985e: 223c 0005 959c movel #365980,%d1
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
59864: 42b9 0007 9f50 clrl 79f50 <_Timer_server_Default+0x34> 5986a: 42b9 0007 9f88 clrl 79f88 <_Timer_server_Default+0x6c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
59870: 42b9 0007 9f2c clrl 79f2c <_Timer_server_Default+0x10> 59876: 23c1 0007 9f20 movel %d1,79f20 <_Timer_server_Default+0x4>
the_watchdog->routine = routine; the_watchdog->id = id;
5987c: 23c0 0007 9f44 movel %d0,79f44 <_Timer_server_Default+0x28>
ts->active = false;
/*
* The default timer server is now available.
*/
_Timer_server = ts;
59882: 23c8 0007 f37e movel %a0,7f37e <_Timer_server>
the_watchdog->user_data = user_data;
59888: 42b9 0007 9f48 clrl 79f48 <_Timer_server_Default+0x2c>
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5988e: 42b9 0007 9f64 clrl 79f64 <_Timer_server_Default+0x48>
the_watchdog->routine = routine; the_watchdog->id = id;
59894: 23c0 0007 9f7c movel %d0,79f7c <_Timer_server_Default+0x60>
the_watchdog->user_data = user_data;
5989a: 42b9 0007 9f80 clrl 79f80 <_Timer_server_Default+0x64>
/*
* Start the timer server
*/
status = rtems_task_start(
598a0: 4eb9 0005 8a2c jsr 58a2c <rtems_task_start>
initialized = false;
}
#endif
return status;
}
598a6: 242e fff4 movel %fp@(-12),%d2
if (status) {
initialized = false;
}
#endif
return status;
598aa: 4fef 000c lea %sp@(12),%sp
}
598ae: 262e fff8 movel %fp@(-8),%d3 598b2: 4e5e unlk %fp
...
00058ffc <rtems_timer_reset>:
*/
rtems_status_code rtems_timer_reset(
rtems_id id
)
{
58ffc: 4e56 fff0 linkw %fp,#-16 59000: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 59004: 486e fffc pea %fp@(-4) 59008: 2f2e 0008 movel %fp@(8),%sp@- 5900c: 4879 0007 f344 pea 7f344 <_Timer_Information> 59012: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get>
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
59018: 4fef 000c lea %sp@(12),%sp 5901c: 2440 moveal %d0,%a2 5901e: 4aae fffc tstl %fp@(-4)
59022: 670e beqs 59032 <rtems_timer_reset+0x36>
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
59024: 7404 moveq #4,%d2
}
59026: 2002 movel %d2,%d0 59028: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5902e: 4e5e unlk %fp 59030: 4e75 rts
the_timer = _Timer_Get( id, &location );
switch ( location ) {
case OBJECTS_LOCAL:
if ( the_timer->the_class == TIMER_INTERVAL ) {
59032: 202a 0038 movel %a2@(56),%d0
59036: 671a beqs 59052 <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 ) {
59038: 7201 moveq #1,%d1 5903a: b280 cmpl %d0,%d1
5903c: 673c beqs 5907a <rtems_timer_reset+0x7e>
/*
* Must be dormant or time of day timer (e.g. TIMER_DORMANT,
* TIMER_TIME_OF_DAY, or TIMER_TIME_OF_DAY_ON_TASK). We
* can only reset active interval timers.
*/
status = RTEMS_NOT_DEFINED;
5903e: 740b moveq #11,%d2
}
_Thread_Enable_dispatch();
59040: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59046: 2002 movel %d2,%d0 59048: 4cee 0c04 fff0 moveml %fp@(-16),%d2/%a2-%a3 5904e: 4e5e unlk %fp 59050: 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 );
59052: 45ea 0010 lea %a2@(16),%a2
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
59056: 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 );
59058: 2f0a movel %a2,%sp@- 5905a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove>
_Watchdog_Insert( &_Watchdog_Ticks_chain, &the_timer->Ticker );
59060: 2f0a movel %a2,%sp@- 59062: 4879 0007 eb82 pea 7eb82 <_Watchdog_Ticks_chain> 59068: 4eb9 0005 da58 jsr 5da58 <_Watchdog_Insert> 5906e: 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();
59072: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> 59078: 60cc bras 59046 <rtems_timer_reset+0x4a>
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
5907a: 486a 0010 pea %a2@(16)
rtems_id id
)
{
Timer_Control *the_timer;
Objects_Locations location;
rtems_status_code status = RTEMS_SUCCESSFUL;
5907e: 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;
59080: 2679 0007 f37e moveal 7f37e <_Timer_server>,%a3
if ( !timer_server ) {
_Thread_Enable_dispatch();
return RTEMS_INCORRECT_STATE;
}
#endif
_Watchdog_Remove( &the_timer->Ticker );
59086: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove>
(*timer_server->schedule_operation)( timer_server, the_timer );
5908c: 2f0a movel %a2,%sp@- 5908e: 2f0b movel %a3,%sp@- 59090: 206b 0004 moveal %a3@(4),%a0 59094: 4e90 jsr %a0@ 59096: 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();
5909a: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch> 590a0: 60a4 bras 59046 <rtems_timer_reset+0x4a>
...
0005918c <rtems_timer_server_fire_when>:
rtems_id id,
rtems_time_of_day *wall_time,
rtems_timer_service_routine_entry routine,
void *user_data
)
{
5918c: 4e56 ffec linkw %fp,#-20 59190: 48d7 0c0c moveml %d2-%d3/%a2-%a3,%sp@ 59194: 242e 000c movel %fp@(12),%d2 59198: 262e 0010 movel %fp@(16),%d3
Timer_Control *the_timer; Objects_Locations location; rtems_interval seconds; Timer_server_Control *timer_server = _Timer_server;
5919c: 2479 0007 f37e moveal 7f37e <_Timer_server>,%a2
if ( !timer_server )
591a2: 4a8a tstl %a2 591a4: 6700 00c8 beqw 5926e <rtems_timer_server_fire_when+0xe2>
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
591a8: 4a39 0007 ead0 tstb 7ead0 <_TOD_Is_set> 591ae: 6700 00a6 beqw 59256 <rtems_timer_server_fire_when+0xca>
return RTEMS_NOT_DEFINED;
if ( !routine )
591b2: 4a83 tstl %d3 591b4: 6700 00ac beqw 59262 <rtems_timer_server_fire_when+0xd6>
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
591b8: 2f02 movel %d2,%sp@- 591ba: 4eb9 0005 5eac jsr 55eac <_TOD_Validate> 591c0: 588f addql #4,%sp 591c2: 4a00 tstb %d0
591c4: 660c bnes 591d2 <rtems_timer_server_fire_when+0x46>
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
if ( seconds <= _TOD_Seconds_since_epoch() )
return RTEMS_INVALID_CLOCK;
591c6: 7014 moveq #20,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
591c8: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 591ce: 4e5e unlk %fp 591d0: 4e75 rts
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
591d2: 2f02 movel %d2,%sp@- 591d4: 4eb9 0005 5da4 jsr 55da4 <_TOD_To_seconds>
if ( seconds <= _TOD_Seconds_since_epoch() )
591da: 588f addql #4,%sp
return RTEMS_INVALID_ADDRESS;
if ( !_TOD_Validate( wall_time ) )
return RTEMS_INVALID_CLOCK;
seconds = _TOD_To_seconds( wall_time );
591dc: 2400 movel %d0,%d2
if ( seconds <= _TOD_Seconds_since_epoch() )
591de: b0b9 0007 eb4a cmpl 7eb4a <_TOD_Now>,%d0
591e4: 63e0 blss 591c6 <rtems_timer_server_fire_when+0x3a>
591e6: 486e fffc pea %fp@(-4) 591ea: 2f2e 0008 movel %fp@(8),%sp@- 591ee: 4879 0007 f344 pea 7f344 <_Timer_Information> 591f4: 4eb9 0005 bc3c jsr 5bc3c <_Objects_Get>
return RTEMS_INVALID_CLOCK;
the_timer = _Timer_Get( id, &location );
switch ( location ) {
591fa: 4fef 000c lea %sp@(12),%sp 591fe: 2640 moveal %d0,%a3 59200: 4aae fffc tstl %fp@(-4)
59204: 6674 bnes 5927a <rtems_timer_server_fire_when+0xee>
case OBJECTS_LOCAL:
(void) _Watchdog_Remove( &the_timer->Ticker );
59206: 486b 0010 pea %a3@(16) 5920a: 4eb9 0005 dba0 jsr 5dba0 <_Watchdog_Remove>
the_watchdog->user_data = user_data;
59210: 276e 0014 0034 movel %fp@(20),%a3@(52)
the_timer->the_class = TIMER_TIME_OF_DAY_ON_TASK;
59216: 7003 moveq #3,%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59218: 94b9 0007 eb4a subl 7eb4a <_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;
5921e: 2740 0038 movel %d0,%a3@(56)
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
the_watchdog->id = id;
59222: 202e 0008 movel %fp@(8),%d0
_Watchdog_Initialize( &the_timer->Ticker, routine, id, user_data );
the_timer->Ticker.initial = seconds - _TOD_Seconds_since_epoch();
59226: 2742 001c movel %d2,%a3@(28) 5922a: 2740 0030 movel %d0,%a3@(48)
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
5922e: 42ab 0018 clrl %a3@(24)
the_watchdog->routine = routine;
59232: 2743 002c movel %d3,%a3@(44)
(*timer_server->schedule_operation)( timer_server, the_timer );
59236: 2f0b movel %a3,%sp@- 59238: 2f0a movel %a2,%sp@- 5923a: 206a 0004 moveal %a2@(4),%a0 5923e: 4e90 jsr %a0@
_Thread_Enable_dispatch();
59240: 4eb9 0005 c546 jsr 5c546 <_Thread_Enable_dispatch>
return RTEMS_SUCCESSFUL;
59246: 4fef 000c lea %sp@(12),%sp 5924a: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
5924c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59252: 4e5e unlk %fp 59254: 4e75 rts
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
59256: 700b moveq #11,%d0 <== NOT EXECUTED
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59258: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 <== NOT EXECUTED 5925e: 4e5e unlk %fp <== NOT EXECUTED 59260: 4e75 rts <== NOT EXECUTED
if ( !_TOD_Is_set )
return RTEMS_NOT_DEFINED;
if ( !routine )
return RTEMS_INVALID_ADDRESS;
59262: 7009 moveq #9,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59264: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 5926a: 4e5e unlk %fp 5926c: 4e75 rts
Objects_Locations location;
rtems_interval seconds;
Timer_server_Control *timer_server = _Timer_server;
if ( !timer_server )
return RTEMS_INCORRECT_STATE;
5926e: 700e moveq #14,%d0
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
}
59270: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59276: 4e5e unlk %fp 59278: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
return RTEMS_INVALID_ID;
5927a: 7004 moveq #4,%d0
}
5927c: 4cee 0c0c ffec moveml %fp@(-20),%d2-%d3/%a2-%a3 59282: 4e5e unlk %fp
...
00042990 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
42990: 4e56 ffe8 linkw %fp,#-24 42994: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@ 42998: 242e 0008 movel %fp@(8),%d2
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC) {
4299c: 0802 001d btst #29,%d2
429a0: 6730 beqs 429d2 <rtems_verror+0x42>
if (rtems_panic_in_progress++)
429a2: 2239 0005 f980 movel 5f980 <rtems_panic_in_progress>,%d1 429a8: 2001 movel %d1,%d0 429aa: 5280 addql #1,%d0 429ac: 23c0 0005 f980 movel %d0,5f980 <rtems_panic_in_progress> 429b2: 4a81 tstl %d1
429b4: 6714 beqs 429ca <rtems_verror+0x3a> <== ALWAYS TAKEN
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
429b6: 2039 0005 fadc movel 5fadc <_Thread_Dispatch_disable_level>,%d0<== NOT EXECUTED 429bc: 5280 addql #1,%d0 <== NOT EXECUTED 429be: 23c0 0005 fadc movel %d0,5fadc <_Thread_Dispatch_disable_level><== NOT EXECUTED
RTEMS_COMPILER_MEMORY_BARRIER();
429c4: 2039 0005 f980 movel 5f980 <rtems_panic_in_progress>,%d0 <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
429ca: 7202 moveq #2,%d1 429cc: b280 cmpl %d0,%d1 429ce: 6d00 00b6 bltw 42a86 <rtems_verror+0xf6>
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429d2: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 429d8: 45f9 0004 ed5e lea 4ed5e <fflush>,%a2
status = error_flag & ~RTEMS_ERROR_MASK;
429de: 2802 movel %d2,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429e0: 2f28 0008 movel %a0@(8),%sp@-
status = error_flag & ~RTEMS_ERROR_MASK;
429e4: 0284 8fff ffff andil #-1879048193,%d4
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
429ea: 4e92 jsr %a2@
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
429ec: 588f addql #4,%sp 429ee: 0802 001e btst #30,%d2 429f2: 6600 00ca bnew 42abe <rtems_verror+0x12e>
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
429f6: 2f2e 0010 movel %fp@(16),%sp@-
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
int local_errno = 0;
429fa: 4283 clrl %d3 429fc: 47f9 0004 f186 lea 4f186 <fprintf>,%a3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42a02: 2f2e 000c movel %fp@(12),%sp@- 42a06: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42a0c: 2f28 000c movel %a0@(12),%sp@- 42a10: 4eb9 0005 55ca jsr 555ca <vfprintf>
if (status)
42a16: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42a1a: 2400 movel %d0,%d2
if (status)
42a1c: 4a84 tstl %d4
42a1e: 6674 bnes 42a94 <rtems_verror+0x104>
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42a20: 4a83 tstl %d3
42a22: 6732 beqs 42a56 <rtems_verror+0xc6>
if ((local_errno > 0) && *strerror(local_errno))
42a24: 4a83 tstl %d3
42a26: 6f14 bles 42a3c <rtems_verror+0xac>
42a28: 2f03 movel %d3,%sp@- 42a2a: 49f9 0004 fa1c lea 4fa1c <strerror>,%a4 42a30: 4e94 jsr %a4@ 42a32: 588f addql #4,%sp 42a34: 2040 moveal %d0,%a0 42a36: 4a10 tstb %a0@ 42a38: 6600 00ba bnew 42af4 <rtems_verror+0x164>
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
42a3c: 2f03 movel %d3,%sp@- 42a3e: 4879 0005 ced2 pea 5ced2 <IMFS_ops+0x6a> 42a44: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42a4a: 2f28 000c movel %a0@(12),%sp@- 42a4e: 4e93 jsr %a3@ 42a50: 4fef 000c lea %sp@(12),%sp 42a54: d480 addl %d0,%d2
}
chars_written += fprintf(stderr, "\n");
42a56: 4879 0005 d362 pea 5d362 <rtems_status_assoc+0x19e> 42a5c: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42a62: 2f28 000c movel %a0@(12),%sp@- 42a66: 4e93 jsr %a3@
(void) fflush(stderr);
42a68: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42a6e: d480 addl %d0,%d2
(void) fflush(stderr);
42a70: 2f28 000c movel %a0@(12),%sp@- 42a74: 4e92 jsr %a2@
return chars_written;
42a76: 4fef 000c lea %sp@(12),%sp
}
42a7a: 2002 movel %d2,%d0 42a7c: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 42a82: 4e5e unlk %fp 42a84: 4e75 rts
if (rtems_panic_in_progress++)
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
return 0;
42a86: 4282 clrl %d2 <== NOT EXECUTED
chars_written += fprintf(stderr, "\n");
(void) fflush(stderr);
return chars_written;
}
42a88: 2002 movel %d2,%d0 <== NOT EXECUTED 42a8a: 4cee 1c1c ffe8 moveml %fp@(-24),%d2-%d4/%a2-%a4 <== NOT EXECUTED 42a90: 4e5e unlk %fp <== NOT EXECUTED 42a92: 4e75 rts <== NOT EXECUTED
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
fprintf(stderr, " (status: %s)", rtems_status_text(status));
42a94: 2f04 movel %d4,%sp@- 42a96: 4eb9 0004 2978 jsr 42978 <rtems_status_text> 42a9c: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42aa2: 2f00 movel %d0,%sp@- 42aa4: 4879 0005 ceb7 pea 5ceb7 <IMFS_ops+0x4f> 42aaa: 2f28 000c movel %a0@(12),%sp@- 42aae: 4e93 jsr %a3@
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
if (status)
chars_written +=
42ab0: 4fef 0010 lea %sp@(16),%sp 42ab4: d480 addl %d0,%d2
fprintf(stderr, " (status: %s)", rtems_status_text(status));
if (local_errno) {
42ab6: 4a83 tstl %d3
42ab8: 679c beqs 42a56 <rtems_verror+0xc6>
42aba: 6000 ff68 braw 42a24 <rtems_verror+0x94>
(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;
42abe: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 42ac4: 47f9 0004 f186 lea 4f186 <fprintf>,%a3 42aca: 2040 moveal %d0,%a0 42acc: 2610 movel %a0@,%d3
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42ace: 2f2e 0010 movel %fp@(16),%sp@- 42ad2: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42ad8: 2f2e 000c movel %fp@(12),%sp@- 42adc: 2f28 000c movel %a0@(12),%sp@- 42ae0: 4eb9 0005 55ca jsr 555ca <vfprintf>
if (status)
42ae6: 4fef 000c lea %sp@(12),%sp
#if defined(RTEMS_MULTIPROCESSING)
if (_System_state_Is_multiprocessing)
fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node);
#endif
chars_written += vfprintf(stderr, printf_format, arglist);
42aea: 2400 movel %d0,%d2
if (status)
42aec: 4a84 tstl %d4 42aee: 6700 ff30 beqw 42a20 <rtems_verror+0x90> 42af2: 60a0 bras 42a94 <rtems_verror+0x104>
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));
42af4: 2f03 movel %d3,%sp@- 42af6: 4e94 jsr %a4@ 42af8: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42afe: 2f00 movel %d0,%sp@- 42b00: 4879 0005 cec5 pea 5cec5 <IMFS_ops+0x5d> 42b06: 2f28 000c movel %a0@(12),%sp@- 42b0a: 4e93 jsr %a3@ 42b0c: 4fef 0010 lea %sp@(16),%sp 42b10: d480 addl %d0,%d2
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42b12: 4879 0005 d362 pea 5d362 <rtems_status_assoc+0x19e> 42b18: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0 42b1e: 2f28 000c movel %a0@(12),%sp@- 42b22: 4e93 jsr %a3@
(void) fflush(stderr);
42b24: 2079 0005 e454 moveal 5e454 <_impure_ptr>,%a0
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
}
chars_written += fprintf(stderr, "\n");
42b2a: d480 addl %d0,%d2
(void) fflush(stderr);
42b2c: 2f28 000c movel %a0@(12),%sp@- 42b30: 4e92 jsr %a2@
return chars_written;
42b32: 4fef 000c lea %sp@(12),%sp 42b36: 6000 ff42 braw 42a7a <rtems_verror+0xea>
00043508 <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
43508: 4e56 ffe4 linkw %fp,#-28 4350c: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 43510: 246e 0008 moveal %fp@(8),%a2
int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0;
43514: 4284 clrl %d4
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
unsigned int limit = INT_MAX;
43516: 263c 7fff ffff movel #2147483647,%d3
*/
static int
scanInt(FILE *fp, int *val)
{
int c;
unsigned int i = 0;
4351c: 4282 clrl %d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4351e: 47f9 0005 0f38 lea 50f38 <__srget_r>,%a3 43524: 202a 0004 movel %a2@(4),%d0 43528: 5380 subql #1,%d0 4352a: 2540 0004 movel %d0,%a2@(4)
4352e: 6d62 blts 43592 <scanInt+0x8a> <== NEVER TAKEN
43530: 2052 moveal %a2@,%a0 43532: 4280 clrl %d0 43534: 1010 moveb %a0@,%d0 43536: 5288 addql #1,%a0
if (c == ':')
43538: 723a moveq #58,%d1
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4353a: 2488 movel %a0,%a2@
if (c == ':')
4353c: b280 cmpl %d0,%d1
4353e: 6764 beqs 435a4 <scanInt+0x9c>
break;
if (sign == 0) {
43540: 4a84 tstl %d4
43542: 660a bnes 4354e <scanInt+0x46>
if (c == '-') {
43544: 7c2d moveq #45,%d6 43546: bc80 cmpl %d0,%d6 43548: 6700 0084 beqw 435ce <scanInt+0xc6>
sign = -1;
limit++;
continue;
}
sign = 1;
4354c: 7801 moveq #1,%d4
}
if (!isdigit(c))
4354e: 2079 0005 ff00 moveal 5ff00 <__ctype_ptr__>,%a0 43554: 1230 0801 moveb %a0@(00000001,%d0:l),%d1 43558: 49c1 extbl %d1 4355a: 44c1 movew %d1,%ccr
4355c: 6664 bnes 435c2 <scanInt+0xba>
return 0;
d = c - '0';
if ((i > (limit / 10))
4355e: 2203 movel %d3,%d1 43560: 7c0a moveq #10,%d6 43562: 4c46 1005 remul %d6,%d5,%d1 43566: 4c46 1001 remul %d6,%d1,%d1 4356a: b282 cmpl %d2,%d1
4356c: 6554 bcss 435c2 <scanInt+0xba> <== NEVER TAKEN
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
4356e: 0680 ffff ffd0 addil #-48,%d0
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
43574: b282 cmpl %d2,%d1
43576: 6746 beqs 435be <scanInt+0xb6> <== NEVER TAKEN
return 0;
i = i * 10 + d;
43578: 2202 movel %d2,%d1 4357a: e789 lsll #3,%d1 4357c: 2241 moveal %d1,%a1 4357e: 41f1 2a00 lea %a1@(00000000,%d2:l:2),%a0 43582: 2400 movel %d0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
43584: 202a 0004 movel %a2@(4),%d0 43588: 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;
4358a: d488 addl %a0,%d2
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
4358c: 2540 0004 movel %d0,%a2@(4)
43590: 6c9e bges 43530 <scanInt+0x28> <== ALWAYS TAKEN
43592: 2f0a movel %a2,%sp@- <== NOT EXECUTED 43594: 2f39 0005 ff04 movel 5ff04 <_impure_ptr>,%sp@- <== NOT EXECUTED 4359a: 4e93 jsr %a3@ <== NOT EXECUTED 4359c: 508f addql #8,%sp <== NOT EXECUTED
if (c == ':')
4359e: 723a moveq #58,%d1 <== NOT EXECUTED 435a0: b280 cmpl %d0,%d1 <== NOT EXECUTED 435a2: 669c bnes 43540 <scanInt+0x38> <== NOT EXECUTED
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
}
if (sign == 0)
435a4: 4a84 tstl %d4
435a6: 671a beqs 435c2 <scanInt+0xba> <== NEVER TAKEN
return 0;
*val = i * sign;
435a8: 4c02 4800 mulsl %d2,%d4
return 1;
435ac: 7001 moveq #1,%d0
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
*val = i * sign;
435ae: 206e 000c moveal %fp@(12),%a0 435b2: 2084 movel %d4,%a0@
return 1; }
435b4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 435ba: 4e5e unlk %fp 435bc: 4e75 rts
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
|| ((i == (limit / 10)) && (d > (limit % 10))))
435be: ba80 cmpl %d0,%d5 <== NOT EXECUTED 435c0: 64b6 bccs 43578 <scanInt+0x70> <== NOT EXECUTED
return 0;
i = i * 10 + d;
}
if (sign == 0)
return 0;
435c2: 4280 clrl %d0
*val = i * sign; return 1; }
435c4: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 435ca: 4e5e unlk %fp 435cc: 4e75 rts
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
limit++;
435ce: 5283 addql #1,%d3
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
sign = -1;
435d0: 78ff moveq #-1,%d4
limit++;
continue;
435d2: 6000 ff50 braw 43524 <scanInt+0x1c>
000435d6 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
435d6: 4e56 ffec linkw %fp,#-20
int c;
*name = *bufp;
435da: 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)
{
435de: 48d7 3c04 moveml %d2/%a2-%a5,%sp@ 435e2: 246e 0008 moveal %fp@(8),%a2
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
435e6: 4bf9 0005 0f38 lea 50f38 <__srget_r>,%a5
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
435ec: 266e 0010 moveal %fp@(16),%a3 435f0: 286e 0014 moveal %fp@(20),%a4 435f4: 242e 0018 movel %fp@(24),%d2
int c;
*name = *bufp;
435f8: 2093 movel %a3@,%a0@
for (;;) {
c = getc(fp);
435fa: 202a 0004 movel %a2@(4),%d0 435fe: 5380 subql #1,%d0 43600: 2540 0004 movel %d0,%a2@(4)
43604: 6d36 blts 4363c <scanString+0x66>
43606: 2052 moveal %a2@,%a0 43608: 4280 clrl %d0 4360a: 1010 moveb %a0@,%d0 4360c: 5288 addql #1,%a0
if (c == ':') {
4360e: 723a moveq #58,%d1
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43610: 2488 movel %a0,%a2@
if (c == ':') {
43612: b280 cmpl %d0,%d1
43614: 6738 beqs 4364e <scanString+0x78>
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
43616: 720a moveq #10,%d1 43618: b280 cmpl %d0,%d1
4361a: 674a beqs 43666 <scanString+0x90>
if (!nlFlag)
return 0;
break;
}
if (c == EOF)
4361c: 72ff moveq #-1,%d1 4361e: b280 cmpl %d0,%d1
43620: 6748 beqs 4366a <scanString+0x94>
return 0;
if (*nleft < 2)
43622: 7201 moveq #1,%d1 43624: b294 cmpl %a4@,%d1
43626: 6442 bccs 4366a <scanString+0x94> <== NEVER TAKEN
return 0;
**bufp = c;
43628: 2053 moveal %a3@,%a0 4362a: 1080 moveb %d0,%a0@
++(*bufp);
4362c: 5293 addql #1,%a3@
--(*nleft);
4362e: 5394 subql #1,%a4@
{
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
43630: 202a 0004 movel %a2@(4),%d0 43634: 5380 subql #1,%d0 43636: 2540 0004 movel %d0,%a2@(4)
4363a: 6cca bges 43606 <scanString+0x30> <== ALWAYS TAKEN
4363c: 2f0a movel %a2,%sp@- 4363e: 2f39 0005 ff04 movel 5ff04 <_impure_ptr>,%sp@- 43644: 4e95 jsr %a5@ 43646: 508f addql #8,%sp
if (c == ':') {
43648: 723a moveq #58,%d1 4364a: b280 cmpl %d0,%d1
4364c: 66c8 bnes 43616 <scanString+0x40> <== ALWAYS TAKEN
if (nlFlag)
4364e: 4a82 tstl %d2
43650: 6618 bnes 4366a <scanString+0x94>
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
43652: 2053 moveal %a3@,%a0
++(*bufp); --(*nleft); return 1;
43654: 7001 moveq #1,%d0
return 0;
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
43656: 4210 clrb %a0@
++(*bufp);
43658: 5293 addql #1,%a3@
--(*nleft);
4365a: 5394 subql #1,%a4@
return 1; }
4365c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5 43662: 4e5e unlk %fp 43664: 4e75 rts
if (nlFlag)
return 0;
break;
}
if (c == '\n') {
if (!nlFlag)
43666: 4a82 tstl %d2
43668: 66e8 bnes 43652 <scanString+0x7c>
break;
}
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
4366a: 4280 clrl %d0
} **bufp = '\0'; ++(*bufp); --(*nleft); return 1; }
4366c: 4cee 3c04 ffec moveml %fp@(-20),%d2/%a2-%a5
43672: 4e5e unlk %fp <== NOT EXECUTED
00043676 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
43676: 4e56 ffe4 linkw %fp,#-28 4367a: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4367e: 42a7 clrl %sp@- 43680: 280e movel %fp,%d4 43682: 0684 0000 0014 addil #20,%d4 43688: 260e movel %fp,%d3 4368a: 0683 0000 0010 addil #16,%d3 43690: 47fa ff44 lea %pc@(435d6 <scanString>),%a3 43694: 2f04 movel %d4,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
43696: 246e 000c moveal %fp@(12),%a2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
4369a: 2f03 movel %d3,%sp@-
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
4369c: 242e 0008 movel %fp@(8),%d2
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
436a0: 2f0a movel %a2,%sp@- 436a2: 2f02 movel %d2,%sp@- 436a4: 4e93 jsr %a3@ 436a6: 4fef 0014 lea %sp@(20),%sp 436aa: 4a80 tstl %d0
436ac: 660c bnes 436ba <scangr+0x44>
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
return 0;
436ae: 4280 clrl %d0
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
}
436b0: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 436b6: 4e5e unlk %fp 436b8: 4e75 rts
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
436ba: 42a7 clrl %sp@- 436bc: 2f04 movel %d4,%sp@- 436be: 2f03 movel %d3,%sp@- 436c0: 486a 0004 pea %a2@(4) 436c4: 2f02 movel %d2,%sp@- 436c6: 4e93 jsr %a3@ 436c8: 4fef 0014 lea %sp@(20),%sp 436cc: 4a80 tstl %d0
436ce: 67de beqs 436ae <scangr+0x38> <== NEVER TAKEN
|| !scanInt(fp, &grgid)
436d0: 486e fffc pea %fp@(-4) 436d4: 2f02 movel %d2,%sp@- 436d6: 4eba fe30 jsr %pc@(43508 <scanInt>) 436da: 508f addql #8,%sp 436dc: 4a80 tstl %d0
436de: 67ce beqs 436ae <scangr+0x38> <== NEVER TAKEN
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
436e0: 4878 0001 pea 1 <ADD> 436e4: 2f04 movel %d4,%sp@- 436e6: 2f03 movel %d3,%sp@- 436e8: 486e fff8 pea %fp@(-8) 436ec: 2f02 movel %d2,%sp@- 436ee: 4e93 jsr %a3@ 436f0: 4fef 0014 lea %sp@(20),%sp 436f4: 4a80 tstl %d0
436f6: 67b6 beqs 436ae <scangr+0x38> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
436f8: 266e fff8 moveal %fp@(-8),%a3
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;
436fc: 356e fffe 0008 movew %fp@(-2),%a2@(8)
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43702: 1013 moveb %a3@,%d0
43704: 677a beqs 43780 <scangr+0x10a> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
43706: 41eb 0001 lea %a3@(1),%a0
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4370a: 7201 moveq #1,%d1
if(*cp == ',')
4370c: 49c0 extbl %d0 4370e: 742c moveq #44,%d2 43710: b480 cmpl %d0,%d2
43712: 6756 beqs 4376a <scangr+0xf4> <== NEVER TAKEN
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43714: 1018 moveb %a0@+,%d0
43716: 66f4 bnes 4370c <scangr+0x96>
43718: e589 lsll #2,%d1 4371a: 0681 0000 0013 addil #19,%d1
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
43720: b2ae 0014 cmpl %fp@(20),%d1
43724: 6288 bhis 436ae <scangr+0x38> <== NEVER TAKEN
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
43726: 226e 0010 moveal %fp@(16),%a1 4372a: 43e9 000f lea %a1@(15),%a1 4372e: 2009 movel %a1,%d0 43730: 72f0 moveq #-16,%d1 43732: c081 andl %d1,%d0 43734: 2540 000a movel %d0,%a2@(10) 43738: 2240 moveal %d0,%a1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
4373a: 228b movel %a3,%a1@
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4373c: 206e fff8 moveal %fp@(-8),%a0 43740: 1010 moveb %a0@,%d0
43742: 6740 beqs 43784 <scangr+0x10e> <== NEVER TAKEN
}
/*
* Extract a single group record from the database
*/
static int scangr(
43744: 5288 addql #1,%a0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43746: 7201 moveq #1,%d1
if(*cp == ',') {
43748: 49c0 extbl %d0 4374a: 742c moveq #44,%d2 4374c: b480 cmpl %d0,%d2
4374e: 671e beqs 4376e <scangr+0xf8> <== NEVER TAKEN
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43750: 1018 moveb %a0@+,%d0
43752: 66f4 bnes 43748 <scangr+0xd2>
43754: 226a 000a moveal %a2@(10),%a1
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
43758: 7001 moveq #1,%d0
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
4375a: e589 lsll #2,%d1
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
4375c: 42b1 1800 clrl %a1@(00000000,%d1:l)
return 1; }
43760: 4cee 0c1c ffe4 moveml %fp@(-28),%d2-%d4/%a2-%a3 43766: 4e5e unlk %fp 43768: 4e75 rts
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
memcount++;
4376a: 5281 addql #1,%d1 4376c: 60a6 bras 43714 <scangr+0x9e>
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
4376e: 4200 clrb %d0 43770: 1140 ffff moveb %d0,%a0@(-1)
grp->gr_mem[memcount++] = cp + 1;
43774: 226a 000a moveal %a2@(10),%a1 43778: 2388 1c00 movel %a0,%a1@(00000000,%d1:l:4) 4377c: 5281 addql #1,%d1 4377e: 60d0 bras 43750 <scangr+0xda>
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43780: 7217 moveq #23,%d1 <== NOT EXECUTED 43782: 609c bras 43720 <scangr+0xaa> <== NOT EXECUTED
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
43784: 7204 moveq #4,%d1 <== NOT EXECUTED
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
return 1;
43786: 7001 moveq #1,%d0 <== NOT EXECUTED
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
43788: 42b1 1800 clrl %a1@(00000000,%d1:l) <== NOT EXECUTED 4378c: 60d2 bras 43760 <scangr+0xea> <== NOT EXECUTED
0004378e <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
4378e: 4e56 ffe0 linkw %fp,#-32 43792: 48d7 1c1c moveml %d2-%d4/%a2-%a4,%sp@
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
43796: 42a7 clrl %sp@- 43798: 280e movel %fp,%d4 4379a: 0684 0000 0014 addil #20,%d4 437a0: 260e movel %fp,%d3 437a2: 0683 0000 0010 addil #16,%d3 437a8: 47fa fe2c lea %pc@(435d6 <scanString>),%a3 437ac: 2f04 movel %d4,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
437ae: 246e 000c moveal %fp@(12),%a2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
437b2: 2f03 movel %d3,%sp@-
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
437b4: 242e 0008 movel %fp@(8),%d2
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
437b8: 2f0a movel %a2,%sp@- 437ba: 2f02 movel %d2,%sp@- 437bc: 4e93 jsr %a3@ 437be: 4fef 0014 lea %sp@(20),%sp 437c2: 4a80 tstl %d0
437c4: 660c bnes 437d2 <scanpw+0x44>
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
437c6: 4280 clrl %d0
pwd->pw_uid = pwuid; pwd->pw_gid = pwgid; return 1; }
437c8: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4 437ce: 4e5e unlk %fp 437d0: 4e75 rts
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
437d2: 42a7 clrl %sp@- 437d4: 2f04 movel %d4,%sp@- 437d6: 2f03 movel %d3,%sp@- 437d8: 486a 0004 pea %a2@(4) 437dc: 2f02 movel %d2,%sp@- 437de: 4e93 jsr %a3@ 437e0: 4fef 0014 lea %sp@(20),%sp 437e4: 4a80 tstl %d0
437e6: 67de beqs 437c6 <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwuid)
437e8: 486e fffc pea %fp@(-4) 437ec: 49fa fd1a lea %pc@(43508 <scanInt>),%a4 437f0: 2f02 movel %d2,%sp@- 437f2: 4e94 jsr %a4@ 437f4: 508f addql #8,%sp 437f6: 4a80 tstl %d0
437f8: 67cc beqs 437c6 <scanpw+0x38> <== NEVER TAKEN
|| !scanInt(fp, &pwgid)
437fa: 486e fff8 pea %fp@(-8) 437fe: 2f02 movel %d2,%sp@- 43800: 4e94 jsr %a4@ 43802: 508f addql #8,%sp 43804: 4a80 tstl %d0
43806: 67be beqs 437c6 <scanpw+0x38> || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
43808: 42a7 clrl %sp@- 4380a: 2f04 movel %d4,%sp@- 4380c: 2f03 movel %d3,%sp@- 4380e: 486a 000c pea %a2@(12) 43812: 2f02 movel %d2,%sp@- 43814: 4e93 jsr %a3@ 43816: 4fef 0014 lea %sp@(20),%sp 4381a: 4a80 tstl %d0
4381c: 67a8 beqs 437c6 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
4381e: 42a7 clrl %sp@- 43820: 2f04 movel %d4,%sp@- 43822: 2f03 movel %d3,%sp@- 43824: 486a 0010 pea %a2@(16) 43828: 2f02 movel %d2,%sp@- 4382a: 4e93 jsr %a3@ 4382c: 4fef 0014 lea %sp@(20),%sp 43830: 4a80 tstl %d0
43832: 6792 beqs 437c6 <scanpw+0x38> <== NEVER TAKEN
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
43834: 42a7 clrl %sp@- 43836: 2f04 movel %d4,%sp@- 43838: 2f03 movel %d3,%sp@- 4383a: 486a 0014 pea %a2@(20) 4383e: 2f02 movel %d2,%sp@- 43840: 4e93 jsr %a3@ 43842: 4fef 0014 lea %sp@(20),%sp 43846: 4a80 tstl %d0 43848: 6700 ff7c beqw 437c6 <scanpw+0x38>
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
4384c: 4878 0001 pea 1 <ADD> 43850: 2f04 movel %d4,%sp@- 43852: 2f03 movel %d3,%sp@- 43854: 486a 0018 pea %a2@(24) 43858: 2f02 movel %d2,%sp@- 4385a: 4e93 jsr %a3@ 4385c: 4fef 0014 lea %sp@(20),%sp 43860: 4a80 tstl %d0 43862: 6700 ff62 beqw 437c6 <scanpw+0x38>
return 0;
pwd->pw_uid = pwuid;
pwd->pw_gid = pwgid;
return 1;
43866: 7001 moveq #1,%d0
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_gecos, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_dir, &buffer, &bufsize, 0)
|| !scanString(fp, &pwd->pw_shell, &buffer, &bufsize, 1))
return 0;
pwd->pw_uid = pwuid;
43868: 356e fffe 0008 movew %fp@(-2),%a2@(8)
pwd->pw_gid = pwgid;
4386e: 356e fffa 000a movew %fp@(-6),%a2@(10)
return 1; }
43874: 4cee 1c1c ffe0 moveml %fp@(-32),%d2-%d4/%a2-%a4
4387a: 4e5e unlk %fp <== NOT EXECUTED
0004713c <sched_get_priority_max>:
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
4713c: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_max(
int policy
)
{
4713e: 4e56 0000 linkw %fp,#0 47142: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
47146: b081 cmpl %d1,%d0
47148: 6412 bccs 4715c <sched_get_priority_max+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
4714a: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 47150: 7216 moveq #22,%d1 47152: 2040 moveal %d0,%a0 47154: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
47156: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47158: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
}
4715a: 4e75 rts
int sched_get_priority_max(
int policy
)
{
switch ( policy ) {
4715c: 103c 0001 moveb #1,%d0 47160: e3a8 lsll %d1,%d0 47162: 7217 moveq #23,%d1 47164: c081 andl %d1,%d0
47166: 67e2 beqs 4714a <sched_get_priority_max+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
47168: 4280 clrl %d0 4716a: 1039 0005 f7e6 moveb 5f7e6 <rtems_maximum_priority>,%d0
}
47170: 4e5e unlk %fp
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MAXIMUM_PRIORITY;
47172: 5380 subql #1,%d0
}
...
00047178 <sched_get_priority_min>:
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47178: 7004 moveq #4,%d0
#include <rtems/posix/priority.h>
int sched_get_priority_min(
int policy
)
{
4717a: 4e56 0000 linkw %fp,#0 4717e: 222e 0008 movel %fp@(8),%d1
switch ( policy ) {
47182: b081 cmpl %d1,%d0
47184: 6412 bccs 47198 <sched_get_priority_min+0x20>
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47186: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 4718c: 7216 moveq #22,%d1 4718e: 2040 moveal %d0,%a0 47190: 70ff moveq #-1,%d0
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47192: 4e5e unlk %fp
case SCHED_RR:
case SCHED_SPORADIC:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
47194: 2081 movel %d1,%a0@
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
}
47196: 4e75 rts
int sched_get_priority_min(
int policy
)
{
switch ( policy ) {
47198: 103c 0001 moveb #1,%d0 4719c: e3a8 lsll %d1,%d0 4719e: 7217 moveq #23,%d1 471a0: c081 andl %d1,%d0
471a2: 67e2 beqs 47186 <sched_get_priority_min+0xe> <== NEVER TAKEN
default:
rtems_set_errno_and_return_minus_one( EINVAL );
}
return POSIX_SCHEDULER_MINIMUM_PRIORITY;
471a4: 7001 moveq #1,%d0
}
471a6: 4e5e unlk %fp
...
000471ac <sched_rr_get_interval>:
int sched_rr_get_interval(
pid_t pid,
struct timespec *interval
)
{
471ac: 4e56 0000 linkw %fp,#0 471b0: 2f03 movel %d3,%sp@- 471b2: 262e 0008 movel %fp@(8),%d3 471b6: 2f02 movel %d2,%sp@- 471b8: 242e 000c movel %fp@(12),%d2
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
471bc: 4a83 tstl %d3
471be: 6622 bnes 471e2 <sched_rr_get_interval+0x36> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
471c0: 4a82 tstl %d2
471c2: 6742 beqs 47206 <sched_rr_get_interval+0x5a>
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
471c4: 2f02 movel %d2,%sp@- 471c6: 2f39 0006 0f24 movel 60f24 <_Thread_Ticks_per_timeslice>,%sp@- 471cc: 4eb9 0004 ab20 jsr 4ab20 <_Timespec_From_ticks>
return 0; }
471d2: 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;
471d6: 508f addql #8,%sp 471d8: 4280 clrl %d0
}
471da: 262e fffc movel %fp@(-4),%d3 471de: 4e5e unlk %fp 471e0: 4e75 rts
{
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid && pid != getpid() )
471e2: 4eb9 0004 3768 jsr 43768 <getpid> 471e8: b680 cmpl %d0,%d3
471ea: 67d4 beqs 471c0 <sched_rr_get_interval+0x14>
rtems_set_errno_and_return_minus_one( ESRCH );
471ec: 4eb9 0004 f9b0 jsr 4f9b0 <__errno> 471f2: 7403 moveq #3,%d2 471f4: 2040 moveal %d0,%a0 471f6: 70ff moveq #-1,%d0 471f8: 2082 movel %d2,%a0@
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
471fa: 242e fff8 movel %fp@(-8),%d2 471fe: 262e fffc movel %fp@(-4),%d3 47202: 4e5e unlk %fp 47204: 4e75 rts
if ( pid && pid != getpid() )
rtems_set_errno_and_return_minus_one( ESRCH );
if ( !interval )
rtems_set_errno_and_return_minus_one( EINVAL );
47206: 4eb9 0004 f9b0 jsr 4f9b0 <__errno>
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
4720c: 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 );
47210: 2040 moveal %d0,%a0 47212: 7216 moveq #22,%d1 47214: 70ff moveq #-1,%d0
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
47216: 262e fffc movel %fp@(-4),%d3 4721a: 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 );
4721c: 2081 movel %d1,%a0@ <== NOT EXECUTED
_Timespec_From_ticks( _Thread_Ticks_per_timeslice, interval );
return 0;
}
000494a8 <sem_open>:
int oflag,
...
/* mode_t mode, */
/* unsigned int value */
)
{
494a8: 4e56 ffe0 linkw %fp,#-32
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
494ac: 2039 0006 4dc8 movel 64dc8 <_Thread_Dispatch_disable_level>,%d0 494b2: 5280 addql #1,%d0 494b4: 48d7 043c moveml %d2-%d5/%a2,%sp@ 494b8: 2a2e 0008 movel %fp@(8),%d5 494bc: 262e 000c movel %fp@(12),%d3 494c0: 23c0 0006 4dc8 movel %d0,64dc8 <_Thread_Dispatch_disable_level>
POSIX_Semaphore_Control *the_semaphore;
Objects_Locations location;
_Thread_Disable_dispatch();
if ( oflag & O_CREAT ) {
494c6: 2803 movel %d3,%d4 494c8: 0284 0000 0200 andil #512,%d4 494ce: 6600 0086 bnew 49556 <sem_open+0xae>
/* unsigned int value */
)
{
va_list arg;
mode_t mode;
unsigned int value = 0;
494d2: 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 );
494d4: 486e fffc pea %fp@(-4) 494d8: 2f05 movel %d5,%sp@- 494da: 4eb9 0004 fe20 jsr 4fe20 <_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 ) {
494e0: 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 );
494e2: 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 ) {
494e4: 6726 beqs 4950c <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) ) ) {
494e6: 7002 moveq #2,%d0 494e8: b082 cmpl %d2,%d0
494ea: 6604 bnes 494f0 <sem_open+0x48> <== NEVER TAKEN
494ec: 4a84 tstl %d4
494ee: 666e bnes 4955e <sem_open+0xb6>
_Thread_Enable_dispatch();
494f0: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( status, sem_t * );
494f6: 4eb9 0005 2bf4 jsr 52bf4 <__errno> 494fc: 2040 moveal %d0,%a0 494fe: 70ff moveq #-1,%d0 49500: 2082 movel %d2,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
49502: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49508: 4e5e unlk %fp 4950a: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
4950c: 0283 0000 0a00 andil #2560,%d3 49512: 0c83 0000 0a00 cmpil #2560,%d3
49518: 6772 beqs 4958c <sem_open+0xe4>
4951a: 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();
4951e: 45f9 0004 c06e lea 4c06e <_Thread_Enable_dispatch>,%a2 49524: 2f2e fffc movel %fp@(-4),%sp@- 49528: 4879 0006 5004 pea 65004 <_POSIX_Semaphore_Information> 4952e: 4eb9 0004 b75c jsr 4b75c <_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;
49534: 2040 moveal %d0,%a0 49536: 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 );
4953a: 2d40 fff8 movel %d0,%fp@(-8)
the_semaphore->open_count += 1;
_Thread_Enable_dispatch();
4953e: 4e92 jsr %a2@
_Thread_Enable_dispatch();
49540: 4e92 jsr %a2@
goto return_id;
49542: 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;
49546: 202e fff8 movel %fp@(-8),%d0 4954a: 5080 addql #8,%d0
#endif return id; }
4954c: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49552: 4e5e unlk %fp 49554: 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 );
49556: 246e 0014 moveal %fp@(20),%a2 4955a: 6000 ff78 braw 494d4 <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(
4955e: 486e fff8 pea %fp@(-8) 49562: 2f0a movel %a2,%sp@- 49564: 42a7 clrl %sp@- 49566: 2f05 movel %d5,%sp@- 49568: 4eb9 0004 fc68 jsr 4fc68 <_POSIX_Semaphore_Create_support> 4956e: 2400 movel %d0,%d2
/*
* errno was set by Create_support, so don't set it again.
*/
_Thread_Enable_dispatch();
49570: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch>
if ( status == -1 )
49576: 4fef 0010 lea %sp@(16),%sp 4957a: 70ff moveq #-1,%d0 4957c: b082 cmpl %d2,%d0
4957e: 66c6 bnes 49546 <sem_open+0x9e>
return SEM_FAILED;
49580: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
49582: 4cee 043c ffe0 moveml %fp@(-32),%d2-%d5/%a2 49588: 4e5e unlk %fp 4958a: 4e75 rts
/*
* Check for existence with creation.
*/
if ( (oflag & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL) ) {
_Thread_Enable_dispatch();
4958c: 4eb9 0004 c06e jsr 4c06e <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one_cast( EEXIST, sem_t * );
49592: 4eb9 0005 2bf4 jsr 52bf4 <__errno> 49598: 7211 moveq #17,%d1 4959a: 2040 moveal %d0,%a0 4959c: 70ff moveq #-1,%d0
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
4959e: 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 * );
495a4: 2081 movel %d1,%a0@
id = &the_semaphore->Semaphore_id;
#else
id = (sem_t *)&the_semaphore->Object.id;
#endif
return id;
}
495a6: 4e5e unlk %fp
...
00049604 <sem_timedwait>:
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
49604: 4e56 fffc linkw %fp,#-4 49608: 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 );
4960a: 486e fffc pea %fp@(-4) 4960e: 2f2e 000c movel %fp@(12),%sp@-
int sem_timedwait(
sem_t *sem,
const struct timespec *abstime
)
{
49612: 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 );
49616: 4eb9 0004 f084 jsr 4f084 <_POSIX_Absolute_timeout_to_ticks>
if ( status != POSIX_ABSOLUTE_TIMEOUT_IS_IN_FUTURE )
4961c: 508f addql #8,%sp 4961e: 7203 moveq #3,%d1 49620: b280 cmpl %d0,%d1
49622: 671a beqs 4963e <sem_timedwait+0x3a> <== ALWAYS TAKEN
do_wait = false;
lock_status = _POSIX_Semaphore_Wait_support( sem, do_wait, ticks );
49624: 2f2e fffc movel %fp@(-4),%sp@- <== NOT EXECUTED 49628: 42a7 clrl %sp@- <== NOT EXECUTED 4962a: 2f02 movel %d2,%sp@- <== NOT EXECUTED 4962c: 4eb9 0004 fe94 jsr 4fe94 <_POSIX_Semaphore_Wait_support> <== NOT EXECUTED
break;
}
}
return lock_status;
}
49632: 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 );
49636: 4fef 000c lea %sp@(12),%sp <== NOT EXECUTED
break;
}
}
return lock_status;
}
4963a: 4e5e unlk %fp <== NOT EXECUTED 4963c: 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 );
4963e: 2f2e fffc movel %fp@(-4),%sp@- 49642: 4878 0001 pea 1 <ADD> 49646: 2f02 movel %d2,%sp@- 49648: 4eb9 0004 fe94 jsr 4fe94 <_POSIX_Semaphore_Wait_support>
break;
}
}
return lock_status;
}
4964e: 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 );
49652: 4fef 000c lea %sp@(12),%sp
break;
}
}
return lock_status;
}
49656: 4e5e unlk %fp
...
00046f78 <sigaction>:
int sigaction(
int sig,
const struct sigaction *act,
struct sigaction *oact
)
{
46f78: 4e56 fff4 linkw %fp,#-12 46f7c: 226e 0010 moveal %fp@(16),%a1 46f80: 48d7 040c moveml %d2-%d3/%a2,%sp@ 46f84: 242e 0008 movel %fp@(8),%d2 46f88: 246e 000c moveal %fp@(12),%a2
ISR_Level level;
if ( oact )
46f8c: 4a89 tstl %a1
46f8e: 6718 beqs 46fa8 <sigaction+0x30>
*oact = _POSIX_signals_Vectors[ sig ];
46f90: 2202 movel %d2,%d1 46f92: 2002 movel %d2,%d0 46f94: e989 lsll #4,%d1 46f96: e588 lsll #2,%d0 46f98: 2041 moveal %d1,%a0 46f9a: 91c0 subal %d0,%a0 46f9c: d1fc 0006 1fba addal #401338,%a0 46fa2: 22d8 movel %a0@+,%a1@+ 46fa4: 22d8 movel %a0@+,%a1@+ 46fa6: 2290 movel %a0@,%a1@
if ( !sig )
46fa8: 4a82 tstl %d2 46faa: 6700 0088 beqw 47034 <sigaction+0xbc>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
46fae: 2002 movel %d2,%d0 46fb0: 5380 subql #1,%d0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
46fb2: 721f moveq #31,%d1 46fb4: b280 cmpl %d0,%d1
46fb6: 657c bcss 47034 <sigaction+0xbc>
*
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
46fb8: 7009 moveq #9,%d0 46fba: b082 cmpl %d2,%d0
46fbc: 6776 beqs 47034 <sigaction+0xbc>
/*
* Evaluate the new action structure and set the global signal vector
* appropriately.
*/
if ( act ) {
46fbe: 4a8a tstl %a2
46fc0: 6766 beqs 47028 <sigaction+0xb0> <== 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 );
46fc2: 203c 0000 0700 movel #1792,%d0 46fc8: 40c3 movew %sr,%d3 46fca: 8083 orl %d3,%d0 46fcc: 46c0 movew %d0,%sr
if ( act->sa_handler == SIG_DFL ) {
46fce: 4aaa 0008 tstl %a2@(8)
46fd2: 6730 beqs 47004 <sigaction+0x8c>
_POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ];
} else {
_POSIX_signals_Clear_process_signals( sig );
46fd4: 2f02 movel %d2,%sp@- 46fd6: 4eb9 0004 cd00 jsr 4cd00 <_POSIX_signals_Clear_process_signals>
_POSIX_signals_Vectors[ sig ] = *act;
46fdc: 588f addql #4,%sp 46fde: 2002 movel %d2,%d0 46fe0: 224a moveal %a2,%a1 46fe2: e98a lsll #4,%d2 46fe4: e588 lsll #2,%d0 46fe6: 2042 moveal %d2,%a0 46fe8: 91c0 subal %d0,%a0 46fea: d1fc 0006 1fba addal #401338,%a0 46ff0: 20d9 movel %a1@+,%a0@+ 46ff2: 20d9 movel %a1@+,%a0@+ 46ff4: 2091 movel %a1@,%a0@
}
_ISR_Enable( level );
46ff6: 46c3 movew %d3,%sr
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
46ff8: 4280 clrl %d0
}
46ffa: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 47000: 4e5e unlk %fp 47002: 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 ];
47004: 2002 movel %d2,%d0 47006: e98a lsll #4,%d2 47008: e588 lsll #2,%d0 4700a: 9480 subl %d0,%d2 4700c: 2242 moveal %d2,%a1 4700e: 2042 moveal %d2,%a0 47010: d3fc 0005 f642 addal #390722,%a1 47016: d1fc 0006 1fba addal #401338,%a0 4701c: 20d9 movel %a1@+,%a0@+ 4701e: 20d9 movel %a1@+,%a0@+ 47020: 2091 movel %a1@,%a0@
} else {
_POSIX_signals_Clear_process_signals( sig );
_POSIX_signals_Vectors[ sig ] = *act;
}
_ISR_Enable( level );
47022: 46c3 movew %d3,%sr
* now (signals not posted when SIG_IGN).
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
47024: 4280 clrl %d0 47026: 60d2 bras 46ffa <sigaction+0x82>
47028: 4280 clrl %d0 <== NOT EXECUTED
}
4702a: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 <== NOT EXECUTED 47030: 4e5e unlk %fp <== NOT EXECUTED 47032: 4e75 rts <== NOT EXECUTED
* NOTE: Solaris documentation claims to "silently enforce" this which
* contradicts the POSIX specification.
*/
if ( sig == SIGKILL )
rtems_set_errno_and_return_minus_one( EINVAL );
47034: 4eb9 0004 fc64 jsr 4fc64 <__errno> 4703a: 7216 moveq #22,%d1 4703c: 2040 moveal %d0,%a0 4703e: 70ff moveq #-1,%d0
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
47040: 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 );
47046: 2081 movel %d1,%a0@
* + If we are now ignoring a signal that was previously pending,
* we clear the pending signal indicator.
*/
return 0;
}
47048: 4e5e unlk %fp <== NOT EXECUTED
00049658 <sigsuspend>:
#include <rtems/seterr.h>
int sigsuspend(
const sigset_t *sigmask
)
{
49658: 4e56 ffec linkw %fp,#-20 4965c: 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 );
49660: 240e movel %fp,%d2 49662: 5982 subql #4,%d2 49664: 45f9 0004 9630 lea 49630 <sigprocmask>,%a2
(void) sigfillset( &all_signals );
4966a: 260e movel %fp,%d3 4966c: 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 );
4966e: 2f02 movel %d2,%sp@- 49670: 2f2e 0008 movel %fp@(8),%sp@- 49674: 4878 0001 pea 1 <ADD> 49678: 4e92 jsr %a2@
(void) sigfillset( &all_signals );
4967a: 2f03 movel %d3,%sp@- 4967c: 4eb9 0004 9584 jsr 49584 <sigfillset>
status = sigtimedwait( &all_signals, NULL, NULL );
49682: 42a7 clrl %sp@- 49684: 42a7 clrl %sp@- 49686: 2f03 movel %d3,%sp@- 49688: 4eb9 0004 9714 jsr 49714 <sigtimedwait> 4968e: 2600 movel %d0,%d3
(void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
49690: 42a7 clrl %sp@- 49692: 2f02 movel %d2,%sp@- 49694: 42a7 clrl %sp@- 49696: 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 )
49698: 4fef 0028 lea %sp@(40),%sp 4969c: 70ff moveq #-1,%d0 4969e: b083 cmpl %d3,%d0
496a0: 660c bnes 496ae <sigsuspend+0x56> <== ALWAYS TAKEN
rtems_set_errno_and_return_minus_one( EINTR );
return status;
}
496a2: 70ff moveq #-1,%d0 <== NOT EXECUTED 496a4: 4cee 040c ffec moveml %fp@(-20),%d2-%d3/%a2 <== NOT EXECUTED 496aa: 4e5e unlk %fp <== NOT EXECUTED 496ac: 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 );
496ae: 4eb9 0005 2218 jsr 52218 <__errno> 496b4: 2040 moveal %d0,%a0 496b6: 7004 moveq #4,%d0
return status;
}
496b8: 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 );
496be: 2080 movel %d0,%a0@
return status;
}
496c0: 70ff moveq #-1,%d0 496c2: 4e5e unlk %fp
...
000498fc <sigwait>:
int sigwait(
const sigset_t *set,
int *sig
)
{
498fc: 4e56 0000 linkw %fp,#0 49900: 2f0a movel %a2,%sp@- 49902: 246e 000c moveal %fp@(12),%a2
int status;
status = sigtimedwait( set, NULL, NULL );
49906: 42a7 clrl %sp@- 49908: 42a7 clrl %sp@- 4990a: 2f2e 0008 movel %fp@(8),%sp@- 4990e: 4eb9 0004 9714 jsr 49714 <sigtimedwait>
if ( status != -1 ) {
49914: 4fef 000c lea %sp@(12),%sp 49918: 72ff moveq #-1,%d1 4991a: b280 cmpl %d0,%d1
4991c: 6710 beqs 4992e <sigwait+0x32>
if ( sig )
4991e: 4a8a tstl %a2
49920: 671e beqs 49940 <sigwait+0x44> <== NEVER TAKEN
*sig = status;
49922: 2480 movel %d0,%a2@
return 0;
}
return errno;
}
49924: 246e fffc moveal %fp@(-4),%a2
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
49928: 4280 clrl %d0
}
return errno;
}
4992a: 4e5e unlk %fp 4992c: 4e75 rts
if ( sig )
*sig = status;
return 0;
}
return errno;
4992e: 4eb9 0005 2218 jsr 52218 <__errno>
}
49934: 246e fffc moveal %fp@(-4),%a2
if ( sig )
*sig = status;
return 0;
}
return errno;
49938: 2040 moveal %d0,%a0
}
4993a: 4e5e unlk %fp
if ( sig )
*sig = status;
return 0;
}
return errno;
4993c: 2010 movel %a0@,%d0
}
4993e: 4e75 rts
49940: 246e fffc moveal %fp@(-4),%a2 <== NOT EXECUTED
status = sigtimedwait( set, NULL, NULL );
if ( status != -1 ) {
if ( sig )
*sig = status;
return 0;
49944: 4280 clrl %d0 <== NOT EXECUTED
}
return errno;
}
49946: 4e5e unlk %fp <== NOT EXECUTED
...
00045058 <siproc>:
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
45058: 4e56 0000 linkw %fp,#0 4505c: 2f0a movel %a2,%sp@- 4505e: 246e 000c moveal %fp@(12),%a2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
45062: 202a 003c movel %a2@(60),%d0 45066: 0280 0000 0e78 andil #3704,%d0
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
4506c: 2f02 movel %d2,%sp@- 4506e: 142e 000b moveb %fp@(11),%d2
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
45072: 4a80 tstl %d0
45074: 661c bnes 45092 <siproc+0x3a> <== ALWAYS TAKEN
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
}
else {
i = iproc (c, tty);
45076: 2d4a 000c movel %a2,%fp@(12) <== NOT EXECUTED
} return i; }
4507a: 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);
4507e: 0282 0000 00ff andil #255,%d2 <== NOT EXECUTED 45084: 2d42 0008 movel %d2,%fp@(8) <== NOT EXECUTED
} return i; }
45088: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 4508c: 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);
4508e: 6000 fdd0 braw 44e60 <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);
45092: 42a7 clrl %sp@-
i = iproc (c, tty);
45094: 0282 0000 00ff andil #255,%d2
/*
* 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);
4509a: 42a7 clrl %sp@- 4509c: 2f2a 0018 movel %a2@(24),%sp@- 450a0: 4eb9 0004 6648 jsr 46648 <rtems_semaphore_obtain>
i = iproc (c, tty);
450a6: 2f0a movel %a2,%sp@- 450a8: 2f02 movel %d2,%sp@- 450aa: 4eba fdb4 jsr %pc@(44e60 <iproc>)
rtems_semaphore_release (tty->osem);
450ae: 2f2a 0018 movel %a2@(24),%sp@-
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
450b2: 2400 movel %d0,%d2
rtems_semaphore_release (tty->osem);
450b4: 4eb9 0004 6788 jsr 46788 <rtems_semaphore_release>
}
else {
i = iproc (c, tty);
}
return i;
}
450ba: 246e fffc moveal %fp@(-4),%a2 450be: 2002 movel %d2,%d0
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
i = iproc (c, tty);
rtems_semaphore_release (tty->osem);
450c0: 4fef 0018 lea %sp@(24),%sp
}
else {
i = iproc (c, tty);
}
return i;
}
450c4: 242e fff8 movel %fp@(-8),%d2
450c8: 4e5e unlk %fp <== NOT EXECUTED
000468a4 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
468a4: 4e56 ffdc linkw %fp,#-36 468a8: 48d7 001c moveml %d2-%d4,%sp@ 468ac: 242e 0008 movel %fp@(8),%d2
* 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 ) )
468b0: 260e movel %fp,%d3 468b2: 0683 ffff ffec addil #-20,%d3 468b8: 2f02 movel %d2,%sp@-
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
468ba: 282e 000c movel %fp@(12),%d4
* 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 ) )
468be: 4eb9 0005 3864 jsr 53864 <strlen> 468c4: 7201 moveq #1,%d1 468c6: 2e81 movel %d1,%sp@ 468c8: 2f03 movel %d3,%sp@- 468ca: 42a7 clrl %sp@- 468cc: 2f00 movel %d0,%sp@- 468ce: 2f02 movel %d2,%sp@- 468d0: 4eb9 0004 5300 jsr 45300 <rtems_filesystem_evaluate_path> 468d6: 4fef 0014 lea %sp@(20),%sp 468da: 4a80 tstl %d0
468dc: 670c beqs 468ea <statvfs+0x46> <== ALWAYS TAKEN
return -1;
468de: 70ff moveq #-1,%d0 <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
rtems_filesystem_freenode( &loc );
return result;
}
468e0: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 <== NOT EXECUTED 468e6: 4e5e unlk %fp <== NOT EXECUTED 468e8: 4e75 rts <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
468ea: 2044 moveal %d4,%a0 468ec: 4298 clrl %a0@+
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
return -1;
mt_entry = loc.mt_entry;
468ee: 226e fffc moveal %fp@(-4),%a1
fs_mount_root = &mt_entry->mt_fs_root;
memset (sb, 0, sizeof (struct statvfs));
468f2: 4298 clrl %a0@+ 468f4: 4298 clrl %a0@+ 468f6: 4298 clrl %a0@+ 468f8: 4298 clrl %a0@+ 468fa: 4298 clrl %a0@+ 468fc: 4298 clrl %a0@+ 468fe: 4298 clrl %a0@+ 46900: 4298 clrl %a0@+ 46902: 4298 clrl %a0@+ 46904: 4298 clrl %a0@+ 46906: 4298 clrl %a0@+ 46908: 4298 clrl %a0@+ 4690a: 4290 clrl %a0@
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
4690c: 2069 0028 moveal %a1@(40),%a0 46910: 2f04 movel %d4,%sp@- 46912: 4869 001c pea %a1@(28) 46916: 2068 0044 moveal %a0@(68),%a0 4691a: 4e90 jsr %a0@
rtems_filesystem_freenode( &loc );
4691c: 2f03 movel %d3,%sp@- 4691e: 2d40 ffe8 movel %d0,%fp@(-24) 46922: 4eb9 0004 5424 jsr 45424 <rtems_filesystem_freenode>
return result;
46928: 202e ffe8 movel %fp@(-24),%d0 4692c: 4fef 000c lea %sp@(12),%sp
}
46930: 4cee 001c ffdc moveml %fp@(-36),%d2-%d4 46936: 4e5e unlk %fp
...
00045184 <sync_per_thread>:
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45184: 4e56 0000 linkw %fp,#0 45188: 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;
4518c: 2028 0106 movel %a0@(262),%d0
fdatasync(fn);
}
/* iterate over all FILE *'s for this thread */
static void sync_per_thread(Thread_Control *t)
{
45190: 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 ) {
45192: 4a80 tstl %d0
45194: 6728 beqs 451be <sync_per_thread+0x3a> <== NEVER TAKEN
current_reent = _Thread_Executing->libc_reent;
45196: 2279 0006 1bec moveal 61bec <_Per_CPU_Information+0xc>,%a1 4519c: 2429 0106 movel %a1@(262),%d2
_Thread_Executing->libc_reent = this_reent;
451a0: 2340 0106 movel %d0,%a1@(262)
_fwalk (t->libc_reent, sync_wrapper);
451a4: 487a 0020 pea %pc@(451c6 <sync_wrapper>) 451a8: 2f28 0106 movel %a0@(262),%sp@- 451ac: 4eb9 0005 0b40 jsr 50b40 <_fwalk>
_Thread_Executing->libc_reent = current_reent;
451b2: 2079 0006 1bec moveal 61bec <_Per_CPU_Information+0xc>,%a0 451b8: 508f addql #8,%sp 451ba: 2142 0106 movel %d2,%a0@(262)
} }
451be: 242e fffc movel %fp@(-4),%d2
451c2: 4e5e unlk %fp <== NOT EXECUTED
00045504 <tcsetattr>:
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
45504: 4e56 0000 linkw %fp,#0 45508: 202e 000c movel %fp@(12),%d0 4550c: 2f03 movel %d3,%sp@- 4550e: 262e 0010 movel %fp@(16),%d3 45512: 2f02 movel %d2,%sp@- 45514: 242e 0008 movel %fp@(8),%d2
switch (opt) {
45518: 4a80 tstl %d0
4551a: 6738 beqs 45554 <tcsetattr+0x50>
4551c: 7201 moveq #1,%d1 4551e: b280 cmpl %d0,%d1
45520: 671c beqs 4553e <tcsetattr+0x3a>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
45522: 4eb9 0005 02b0 jsr 502b0 <__errno> 45528: 2040 moveal %d0,%a0 4552a: 20bc 0000 0086 movel #134,%a0@
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
}
}
45530: 242e fff8 movel %fp@(-8),%d2 45534: 70ff moveq #-1,%d0 45536: 262e fffc movel %fp@(-4),%d3 4553a: 4e5e unlk %fp 4553c: 4e75 rts
switch (opt) {
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
4553e: 42a7 clrl %sp@- 45540: 4878 0003 pea 3 <DIVIDE> 45544: 2f02 movel %d2,%sp@- 45546: 4eb9 0004 cd9c jsr 4cd9c <ioctl> 4554c: 4fef 000c lea %sp@(12),%sp 45550: 4a80 tstl %d0
45552: 6ddc blts 45530 <tcsetattr+0x2c> <== NEVER TAKEN
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
45554: 2d43 0010 movel %d3,%fp@(16) 45558: 7002 moveq #2,%d0 4555a: 2d42 0008 movel %d2,%fp@(8)
} }
4555e: 242e fff8 movel %fp@(-8),%d2 45562: 262e fffc movel %fp@(-4),%d3
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
45566: 2d40 000c movel %d0,%fp@(12)
} }
4556a: 4e5e unlk %fp
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
4556c: 4ef9 0004 cd9c jmp 4cd9c <ioctl>
...
00047bcc <timer_getoverrun>:
* its execution, _POSIX_Timer_TSR will have to set this counter to 0.
*/
int timer_getoverrun(
timer_t timerid
)
{
47bcc: 4e56 fffc linkw %fp,#-4 47bd0: 2f02 movel %d2,%sp@-
timer_t id,
Objects_Locations *location
)
{
return (POSIX_Timer_Control *)
_Objects_Get( &_POSIX_Timer_Information, (Objects_Id) id, location );
47bd2: 486e fffc pea %fp@(-4) 47bd6: 2f2e 0008 movel %fp@(8),%sp@- 47bda: 4879 0006 2e72 pea 62e72 <_POSIX_Timer_Information> 47be0: 4eb9 0004 a004 jsr 4a004 <_Objects_Get>
int overrun;
POSIX_Timer_Control *ptimer;
Objects_Locations location;
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
47be6: 4fef 000c lea %sp@(12),%sp 47bea: 2040 moveal %d0,%a0 47bec: 4aae fffc tstl %fp@(-4)
47bf0: 6718 beqs 47c0a <timer_getoverrun+0x3e> <== NEVER TAKEN
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
47bf2: 4eb9 0005 0d18 jsr 50d18 <__errno> 47bf8: 74ff moveq #-1,%d2 47bfa: 2040 moveal %d0,%a0 47bfc: 7016 moveq #22,%d0 47bfe: 2080 movel %d0,%a0@
}
47c00: 2002 movel %d2,%d0 47c02: 242e fff8 movel %fp@(-8),%d2 47c06: 4e5e unlk %fp 47c08: 4e75 rts
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
case OBJECTS_LOCAL:
overrun = ptimer->overrun;
47c0a: 2428 0066 movel %a0@(102),%d2
ptimer->overrun = 0;
47c0e: 42a8 0066 clrl %a0@(102)
_Thread_Enable_dispatch();
47c12: 4eb9 0004 a88e jsr 4a88e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
47c18: 2002 movel %d2,%d0 47c1a: 242e fff8 movel %fp@(-8),%d2 47c1e: 4e5e unlk %fp
...
00047c24 <timer_gettime>:
int timer_gettime(
timer_t timerid,
struct itimerspec *value
)
{
47c24: 4e56 fff4 linkw %fp,#-12 47c28: 2f0b movel %a3,%sp@- 47c2a: 2f0a movel %a2,%sp@- 47c2c: 246e 000c moveal %fp@(12),%a2
POSIX_Timer_Control *ptimer;
Objects_Locations location;
struct timespec current_time;
Watchdog_Interval left;
if ( !value )
47c30: 4a8a tstl %a2
47c32: 676a beqs 47c9e <timer_gettime+0x7a> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
/* Reads the current time */
_TOD_Get( ¤t_time );
47c34: 486e fff4 pea %fp@(-12) 47c38: 4eb9 0004 9548 jsr 49548 <_TOD_Get> 47c3e: 486e fffc pea %fp@(-4) 47c42: 2f2e 0008 movel %fp@(8),%sp@- 47c46: 4879 0006 2e72 pea 62e72 <_POSIX_Timer_Information> 47c4c: 4eb9 0004 a004 jsr 4a004 <_Objects_Get>
ptimer = _POSIX_Timer_Get( timerid, &location );
switch ( location ) {
47c52: 4fef 0010 lea %sp@(16),%sp 47c56: 2640 moveal %d0,%a3 47c58: 4aae fffc tstl %fp@(-4)
47c5c: 6640 bnes 47c9e <timer_gettime+0x7a>
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
47c5e: 486a 0008 pea %a2@(8)
case OBJECTS_LOCAL:
/* Calculates the time left before the timer finishes */
left =
(ptimer->Timer.start_time + ptimer->Timer.initial) - /* expire */
47c62: 222b 001c movel %a3@(28),%d1 47c66: d2ab 0024 addl %a3@(36),%d1 47c6a: 2039 0006 2d28 movel 62d28 <_Watchdog_Ticks_since_boot>,%d0
_Watchdog_Ticks_since_boot; /* now */
_Timespec_From_ticks( left, &value->it_value );
47c70: 9280 subl %d0,%d1 47c72: 2f01 movel %d1,%sp@- 47c74: 4eb9 0004 b790 jsr 4b790 <_Timespec_From_ticks>
value->it_interval = ptimer->timer_data.it_interval;
47c7a: 202b 0052 movel %a3@(82),%d0 47c7e: 222b 0056 movel %a3@(86),%d1 47c82: 2480 movel %d0,%a2@ 47c84: 2541 0004 movel %d1,%a2@(4)
_Thread_Enable_dispatch();
47c88: 4eb9 0004 a88e jsr 4a88e <_Thread_Enable_dispatch>
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
47c8e: 246e ffec moveal %fp@(-20),%a2
_Timespec_From_ticks( left, &value->it_value );
value->it_interval = ptimer->timer_data.it_interval;
_Thread_Enable_dispatch();
return 0;
47c92: 508f addql #8,%sp 47c94: 4280 clrl %d0
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
}
47c96: 266e fff0 moveal %fp@(-16),%a3 47c9a: 4e5e unlk %fp 47c9c: 4e75 rts
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
47c9e: 4eb9 0005 0d18 jsr 50d18 <__errno>
}
47ca4: 246e ffec moveal %fp@(-20),%a2
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
47ca8: 2040 moveal %d0,%a0 47caa: 7216 moveq #22,%d1 47cac: 70ff moveq #-1,%d0
}
47cae: 266e fff0 moveal %fp@(-16),%a3 47cb2: 4e5e unlk %fp
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( EINVAL );
47cb4: 2081 movel %d1,%a0@ <== NOT EXECUTED
}
00048a2c <truncate>:
int truncate(
const char *path,
off_t length
)
{
48a2c: 4e56 0000 linkw %fp,#0 <== NOT EXECUTED 48a30: 2f03 movel %d3,%sp@- <== NOT EXECUTED 48a32: 2f02 movel %d2,%sp@- <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
48a34: 4878 0001 pea 1 <ADD> <== NOT EXECUTED 48a38: 2f2e 0008 movel %fp@(8),%sp@- <== NOT EXECUTED 48a3c: 4eb9 0004 6374 jsr 46374 <open> <== NOT EXECUTED
if ( fd == -1 )
48a42: 508f addql #8,%sp <== NOT EXECUTED
)
{
int status;
int fd;
fd = open( path, O_WRONLY );
48a44: 2400 movel %d0,%d2 <== NOT EXECUTED
if ( fd == -1 )
48a46: 70ff moveq #-1,%d0 <== NOT EXECUTED 48a48: b082 cmpl %d2,%d0 <== NOT EXECUTED 48a4a: 672c beqs 48a78 <truncate+0x4c> <== NOT EXECUTED
return -1;
status = ftruncate( fd, length );
48a4c: 2f2e 0010 movel %fp@(16),%sp@- <== NOT EXECUTED 48a50: 2f2e 000c movel %fp@(12),%sp@- <== NOT EXECUTED 48a54: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48a56: 4eb9 0004 e4b8 jsr 4e4b8 <ftruncate> <== NOT EXECUTED 48a5c: 2600 movel %d0,%d3 <== NOT EXECUTED
(void) close( fd );
48a5e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 48a60: 4eb9 0004 4d04 jsr 44d04 <close> <== NOT EXECUTED
return status;
}
48a66: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 48a6a: 2003 movel %d3,%d0 <== NOT EXECUTED
status = ftruncate( fd, length );
(void) close( fd );
return status;
48a6c: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED
}
48a70: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 48a74: 4e5e unlk %fp <== NOT EXECUTED 48a76: 4e75 rts <== NOT EXECUTED
int status;
int fd;
fd = open( path, O_WRONLY );
if ( fd == -1 )
return -1;
48a78: 76ff moveq #-1,%d3 <== NOT EXECUTED
status = ftruncate( fd, length );
(void) close( fd );
return status;
}
48a7a: 2003 movel %d3,%d0 <== NOT EXECUTED 48a7c: 242e fff8 movel %fp@(-8),%d2 <== NOT EXECUTED 48a80: 262e fffc movel %fp@(-4),%d3 <== NOT EXECUTED 48a84: 4e5e unlk %fp <== NOT EXECUTED
000463f6 <ualarm>:
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
463f6: 4e56 ffe8 linkw %fp,#-24 463fa: 48d7 041c moveml %d2-%d4/%a2,%sp@ 463fe: 242e 0008 movel %fp@(8),%d2
/*
* Initialize the timer used to implement alarm().
*/
if ( !the_timer->routine ) {
46402: 4ab9 0006 1d1e tstl 61d1e <_POSIX_signals_Ualarm_timer+0x1c> 46408: 6700 0086 beqw 46490 <ualarm+0x9a>
_Watchdog_Initialize( the_timer, _POSIX_signals_Ualarm_TSR, 0, NULL );
} else {
Watchdog_States state;
state = _Watchdog_Remove( the_timer );
4640c: 4879 0006 1d02 pea 61d02 <_POSIX_signals_Ualarm_timer> 46412: 4eb9 0004 a268 jsr 4a268 <_Watchdog_Remove>
if ( (state == WATCHDOG_ACTIVE) || (state == WATCHDOG_REMOVE_IT) ) {
46418: 588f addql #4,%sp 4641a: 7201 moveq #1,%d1 4641c: 5580 subql #2,%d0 4641e: b280 cmpl %d0,%d1 46420: 6400 0098 bccw 464ba <ualarm+0xc4>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
46424: 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 ) {
46426: 4a82 tstl %d2 <== NOT EXECUTED 46428: 660c bnes 46436 <ualarm+0x40> <== NOT EXECUTED
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
}
return remaining;
}
4642a: 2003 movel %d3,%d0 4642c: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 46432: 4e5e unlk %fp 46434: 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 );
46436: 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;
46438: 223c 000f 4240 movel #1000000,%d1
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
4643e: 5184 subql #8,%d4 46440: 45f9 0004 9d74 lea 49d74 <_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;
46446: 4c41 2000 remul %d1,%d0,%d2 4644a: 4c41 2002 remul %d1,%d2,%d2
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
4644e: 223c 0000 03e8 movel #1000,%d1 46454: 4c00 1800 mulsl %d0,%d1
ticks = _Timespec_To_ticks( &tp );
46458: 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;
4645a: 2d41 fffc movel %d1,%fp@(-4)
* 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;
4645e: 2d42 fff8 movel %d2,%fp@(-8)
tp.tv_nsec = (useconds % TOD_MICROSECONDS_PER_SECOND) * 1000;
ticks = _Timespec_To_ticks( &tp );
46462: 4e92 jsr %a2@
if ( ticks == 0 )
ticks = 1;
_Watchdog_Insert_ticks( the_timer, _Timespec_To_ticks( &tp ) );
46464: 2f04 movel %d4,%sp@- 46466: 4e92 jsr %a2@
)
{
the_watchdog->initial = units;
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
46468: 4879 0006 1d02 pea 61d02 <_POSIX_signals_Ualarm_timer> 4646e: 4879 0006 15ae pea 615ae <_Watchdog_Ticks_chain>
Watchdog_Control *the_watchdog,
Watchdog_Interval units
)
{
the_watchdog->initial = units;
46474: 23c0 0006 1d0e movel %d0,61d0e <_POSIX_signals_Ualarm_timer+0xc>
_Watchdog_Insert( &_Watchdog_Ticks_chain, the_watchdog );
4647a: 4eb9 0004 a120 jsr 4a120 <_Watchdog_Insert> 46480: 4fef 0010 lea %sp@(16),%sp
}
return remaining;
}
46484: 2003 movel %d3,%d0 46486: 4cee 041c ffe8 moveml %fp@(-24),%d2-%d4/%a2 4648c: 4e5e unlk %fp 4648e: 4e75 rts
Watchdog_Service_routine_entry routine,
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
46490: 42b9 0006 1d0a clrl 61d0a <_POSIX_signals_Ualarm_timer+0x8>
useconds_t ualarm(
useconds_t useconds,
useconds_t interval
)
{
useconds_t remaining = 0;
46496: 4283 clrl %d3
the_watchdog->routine = routine;
46498: 203c 0004 63b4 movel #287668,%d0
the_watchdog->id = id;
4649e: 42b9 0006 1d22 clrl 61d22 <_POSIX_signals_Ualarm_timer+0x20>
Objects_Id id,
void *user_data
)
{
the_watchdog->state = WATCHDOG_INACTIVE;
the_watchdog->routine = routine;
464a4: 23c0 0006 1d1e movel %d0,61d1e <_POSIX_signals_Ualarm_timer+0x1c>
the_watchdog->id = id; the_watchdog->user_data = user_data;
464aa: 42b9 0006 1d26 clrl 61d26 <_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 ) {
464b0: 4a82 tstl %d2 464b2: 6700 ff76 beqw 4642a <ualarm+0x34> 464b6: 6000 ff7e braw 46436 <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);
464ba: 2039 0006 1d16 movel 61d16 <_POSIX_signals_Ualarm_timer+0x14>,%d0 464c0: d0b9 0006 1d0e addl 61d0e <_POSIX_signals_Ualarm_timer+0xc>,%d0
/* remaining is now in ticks */
_Timespec_From_ticks( ticks, &tp );
464c6: 486e fff8 pea %fp@(-8) 464ca: 90b9 0006 1d1a subl 61d1a <_POSIX_signals_Ualarm_timer+0x18>,%d0
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
464d0: 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 );
464d6: 2f00 movel %d0,%sp@- 464d8: 4eb9 0004 9ce8 jsr 49ce8 <_Timespec_From_ticks>
remaining = tp.tv_sec * TOD_MICROSECONDS_PER_SECOND;
464de: 202e fff8 movel %fp@(-8),%d0 464e2: 4c04 0800 mulsl %d4,%d0
remaining += tp.tv_nsec / 1000;
464e6: 283c 0000 03e8 movel #1000,%d4 464ec: 508f addql #8,%sp 464ee: 262e fffc movel %fp@(-4),%d3 464f2: 4c44 3803 remsl %d4,%d3,%d3 464f6: 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 ) {
464f8: 4a82 tstl %d2 464fa: 6700 ff2e beqw 4642a <ualarm+0x34>
464fe: 6000 ff36 braw 46436 <ualarm+0x40> <== NOT EXECUTED
...
00046e28 <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
46e28: 4e56 ffc0 linkw %fp,#-64 46e2c: 48d7 0c1c moveml %d2-%d4/%a2-%a3,%sp@ 46e30: 242e 0008 movel %fp@(8),%d2
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
46e34: 2f02 movel %d2,%sp@- 46e36: 4eb9 0004 3ea6 jsr 43ea6 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
46e3c: 588f addql #4,%sp 46e3e: 4a80 tstl %d0 46e40: 6600 00f4 bnew 46f36 <unlink+0x10e>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46e44: 45ee ffe8 lea %fp@(-24),%a2 46e48: 4283 clrl %d3 46e4a: 2f0a movel %a2,%sp@- 46e4c: 486e fffc pea %fp@(-4)
const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false;
46e50: 4204 clrb %d4
*/
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
46e52: 2f02 movel %d2,%sp@- 46e54: 4eb9 0004 4f1c jsr 44f1c <rtems_filesystem_get_start_loc> 46e5a: 4fef 000c lea %sp@(12),%sp
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
46e5e: 2d52 ffd4 movel %a2@,%fp@(-44)
name = path + parentpathlen;
46e62: d682 addl %d2,%d3
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46e64: 47f9 0005 414c lea 5414c <strlen>,%a3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46e6a: 240e movel %fp,%d2 46e6c: 0682 ffff ffd4 addil #-44,%d2
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
46e72: 2d6e ffec ffd8 movel %fp@(-20),%fp@(-40) 46e78: 2d6e fff0 ffdc movel %fp@(-16),%fp@(-36) 46e7e: 2d6e fff4 ffe0 movel %fp@(-12),%fp@(-32) 46e84: 2d6e fff8 ffe4 movel %fp@(-8),%fp@(-28)
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
46e8a: 2f03 movel %d3,%sp@- 46e8c: 4e93 jsr %a3@ 46e8e: 2e80 movel %d0,%sp@ 46e90: 2f03 movel %d3,%sp@- 46e92: 4eb9 0004 3ee8 jsr 43ee8 <rtems_filesystem_prefix_separators> 46e98: d680 addl %d0,%d3
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
46e9a: 2f03 movel %d3,%sp@- 46e9c: 4e93 jsr %a3@ 46e9e: 4297 clrl %sp@ 46ea0: 2f02 movel %d2,%sp@- 46ea2: 42a7 clrl %sp@- 46ea4: 2f00 movel %d0,%sp@- 46ea6: 2f03 movel %d3,%sp@- 46ea8: 4eb9 0004 3d68 jsr 43d68 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
46eae: 4fef 001c lea %sp@(28),%sp 46eb2: 4a80 tstl %d0
46eb4: 6656 bnes 46f0c <unlink+0xe4> <== NEVER TAKEN
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
46eb6: 206e ffe0 moveal %fp@(-32),%a0 46eba: 2f02 movel %d2,%sp@- 46ebc: 2068 0010 moveal %a0@(16),%a0 46ec0: 4e90 jsr %a0@ 46ec2: 588f addql #4,%sp 46ec4: 7201 moveq #1,%d1 46ec6: b280 cmpl %d0,%d1 46ec8: 6700 0092 beqw 46f5c <unlink+0x134>
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
46ecc: 2f02 movel %d2,%sp@- 46ece: 206e ffe0 moveal %fp@(-32),%a0 46ed2: 2f0a movel %a2,%sp@- 46ed4: 2068 000c moveal %a0@(12),%a0
rtems_filesystem_freenode( &loc );
46ed8: 47f9 0004 3f3c lea 43f3c <rtems_filesystem_freenode>,%a3
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
46ede: 4e90 jsr %a0@ 46ee0: 2600 movel %d0,%d3
rtems_filesystem_freenode( &loc );
46ee2: 2f02 movel %d2,%sp@- 46ee4: 4e93 jsr %a3@
if ( free_parentloc )
46ee6: 4fef 000c lea %sp@(12),%sp 46eea: 4a04 tstb %d4
46eec: 660c bnes 46efa <unlink+0xd2>
rtems_filesystem_freenode( &parentloc );
return result;
}
46eee: 2003 movel %d3,%d0 46ef0: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 46ef6: 4e5e unlk %fp 46ef8: 4e75 rts
result = (*loc.ops->unlink_h)( &parentloc, &loc );
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
46efa: 2f0a movel %a2,%sp@- 46efc: 4e93 jsr %a3@ 46efe: 588f addql #4,%sp
return result;
}
46f00: 2003 movel %d3,%d0 46f02: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 46f08: 4e5e unlk %fp 46f0a: 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 )
46f0c: 4a04 tstb %d4 <== NOT EXECUTED 46f0e: 660e bnes 46f1e <unlink+0xf6> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
return -1;
46f10: 76ff moveq #-1,%d3 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
46f12: 2003 movel %d3,%d0 <== NOT EXECUTED 46f14: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 46f1a: 4e5e unlk %fp <== NOT EXECUTED 46f1c: 4e75 rts <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
46f1e: 2f0a movel %a2,%sp@- <== NOT EXECUTED
return -1;
46f20: 76ff moveq #-1,%d3 <== NOT EXECUTED
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
0, &loc, false );
if ( result != 0 ) {
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
46f22: 4eb9 0004 3f3c jsr 43f3c <rtems_filesystem_freenode> <== NOT EXECUTED 46f28: 588f addql #4,%sp <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
46f2a: 2003 movel %d3,%d0 <== NOT EXECUTED 46f2c: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 <== NOT EXECUTED 46f32: 4e5e unlk %fp <== NOT EXECUTED 46f34: 4e75 rts <== NOT EXECUTED
parentpathlen = rtems_filesystem_dirname ( path );
if ( parentpathlen == 0 )
rtems_filesystem_get_start_loc( path, &i, &parentloc );
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
46f36: 42a7 clrl %sp@- 46f38: 45ee ffe8 lea %fp@(-24),%a2 46f3c: 2600 movel %d0,%d3 46f3e: 2f0a movel %a2,%sp@- 46f40: 4878 0002 pea 2 <DOUBLE_FLOAT> 46f44: 2f00 movel %d0,%sp@- 46f46: 2f02 movel %d2,%sp@- 46f48: 4eb9 0004 3e18 jsr 43e18 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
46f4e: 4fef 0014 lea %sp@(20),%sp 46f52: 4a80 tstl %d0
46f54: 66ba bnes 46f10 <unlink+0xe8> <== NEVER TAKEN
return -1;
free_parentloc = true;
46f56: 7801 moveq #1,%d4 46f58: 6000 ff04 braw 46e5e <unlink+0x36>
rtems_filesystem_freenode( &parentloc );
return -1;
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
46f5c: 2f02 movel %d2,%sp@- 46f5e: 47f9 0004 3f3c lea 43f3c <rtems_filesystem_freenode>,%a3 46f64: 4e93 jsr %a3@
if ( free_parentloc )
46f66: 588f addql #4,%sp 46f68: 4a04 tstb %d4
46f6a: 661a bnes 46f86 <unlink+0x15e> <== NEVER TAKEN
rtems_filesystem_freenode( &parentloc );
rtems_set_errno_and_return_minus_one( EISDIR );
46f6c: 4eb9 0005 2da8 jsr 52da8 <__errno> 46f72: 76ff moveq #-1,%d3 46f74: 2040 moveal %d0,%a0 46f76: 7015 moveq #21,%d0 46f78: 2080 movel %d0,%a0@
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
return result;
}
46f7a: 2003 movel %d3,%d0 46f7c: 4cee 0c1c ffc0 moveml %fp@(-64),%d2-%d4/%a2-%a3 46f82: 4e5e unlk %fp 46f84: 4e75 rts
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
46f86: 2f0a movel %a2,%sp@- <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
46f88: 76ff moveq #-1,%d3 <== NOT EXECUTED
}
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_filesystem_freenode( &loc );
if ( free_parentloc )
rtems_filesystem_freenode( &parentloc );
46f8a: 4e93 jsr %a3@ <== NOT EXECUTED 46f8c: 588f addql #4,%sp <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
46f8e: 4eb9 0005 2da8 jsr 52da8 <__errno> <== NOT EXECUTED 46f94: 2040 moveal %d0,%a0 <== NOT EXECUTED 46f96: 7015 moveq #21,%d0 <== NOT EXECUTED 46f98: 2080 movel %d0,%a0@ <== NOT EXECUTED 46f9a: 60de bras 46f7a <unlink+0x152> <== NOT EXECUTED
000471a8 <unmount>:
*/
int unmount(
const char *path
)
{
471a8: 4e56 ffe0 linkw %fp,#-32 471ac: 48d7 0c04 moveml %d2/%a2-%a3,%sp@ 471b0: 246e 0008 moveal %fp@(8),%a2
* The root node of the mounted filesytem.
* The node for the directory that the fileystem is mounted on.
* The mount entry that is being refered to.
*/
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) )
471b4: 240e movel %fp,%d2 471b6: 0682 ffff ffec addil #-20,%d2 471bc: 2f0a movel %a2,%sp@- 471be: 4eb9 0005 1274 jsr 51274 <strlen> 471c4: 7201 moveq #1,%d1 471c6: 2e81 movel %d1,%sp@ 471c8: 2f02 movel %d2,%sp@- 471ca: 42a7 clrl %sp@- 471cc: 2f00 movel %d0,%sp@- 471ce: 2f0a movel %a2,%sp@- 471d0: 4eb9 0004 3d74 jsr 43d74 <rtems_filesystem_evaluate_path> 471d6: 4fef 0014 lea %sp@(20),%sp 471da: 4a80 tstl %d0
471dc: 6664 bnes 47242 <unmount+0x9a>
return -1;
mt_entry = loc.mt_entry;
471de: 246e fffc moveal %fp@(-4),%a2
/*
* Verify this is the root node for the file system to be unmounted.
*/
if ( fs_root_loc->node_access != loc.node_access ){
471e2: 202e ffec movel %fp@(-20),%d0 471e6: b0aa 001c cmpl %a2@(28),%d0 471ea: 6600 00b6 bnew 472a2 <unmount+0xfa>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
471ee: 2f02 movel %d2,%sp@- 471f0: 47f9 0004 3e98 lea 43e98 <rtems_filesystem_freenode>,%a3 471f6: 4e93 jsr %a3@
* that made the current node thread based instead
* of system based? I thought it was but it doesn't
* look like it in this version.
*/
if ( rtems_filesystem_current.mt_entry == mt_entry )
471f8: 2079 0006 08c4 moveal 608c4 <rtems_current_user_env>,%a0 471fe: 588f addql #4,%sp 47200: b5e8 0014 cmpal %a0@(20),%a2 47204: 6700 00be beqw 472c4 <unmount+0x11c>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
47208: 2f2a 002c movel %a2@(44),%sp@- 4720c: 487a ff82 pea %pc@(47190 <is_fs_below_mount_point>) 47210: 4eb9 0004 4780 jsr 44780 <rtems_filesystem_mount_iterate> 47216: 508f addql #8,%sp 47218: 4a00 tstb %d0 4721a: 6600 00a8 bnew 472c4 <unmount+0x11c>
* 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 )
4721e: 2f0a movel %a2,%sp@- 47220: 4eb9 0004 4250 jsr 44250 <rtems_libio_is_open_files_in_fs> 47226: 588f addql #4,%sp 47228: 7201 moveq #1,%d1 4722a: b280 cmpl %d0,%d1 4722c: 6700 0096 beqw 472c4 <unmount+0x11c>
* 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 )
47230: 206a 0014 moveal %a2@(20),%a0 47234: 2f0a movel %a2,%sp@- 47236: 2068 0028 moveal %a0@(40),%a0 4723a: 4e90 jsr %a0@ 4723c: 588f addql #4,%sp 4723e: 4a80 tstl %d0
47240: 670c beqs 4724e <unmount+0xa6> <== ALWAYS TAKEN
*/
if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
rtems_fatal_error_occurred( 0 );
return -1;
47242: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
47244: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4724a: 4e5e unlk %fp 4724c: 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){
4724e: 206a 0028 moveal %a2@(40),%a0 47252: 2f0a movel %a2,%sp@- 47254: 2068 002c moveal %a0@(44),%a0 47258: 4e90 jsr %a0@ 4725a: 588f addql #4,%sp 4725c: 4a80 tstl %d0
4725e: 667c bnes 472dc <unmount+0x134> <== NEVER TAKEN
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 );
47260: 42a7 clrl %sp@- 47262: 42a7 clrl %sp@- 47264: 2f39 0006 1f4c movel 61f4c <rtems_libio_semaphore>,%sp@- 4726a: 4eb9 0004 7dcc jsr 47dcc <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
47270: 2f0a movel %a2,%sp@- 47272: 4eb9 0004 8804 jsr 48804 <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
47278: 2f39 0006 1f4c movel 61f4c <rtems_libio_semaphore>,%sp@- 4727e: 4eb9 0004 7f0c jsr 47f0c <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 );
47284: 486a 0008 pea %a2@(8) 47288: 4e93 jsr %a3@
free( mt_entry );
4728a: 2f0a movel %a2,%sp@- 4728c: 4eb9 0004 3eac jsr 43eac <free>
return 0;
47292: 4fef 001c lea %sp@(28),%sp 47296: 4280 clrl %d0
}
47298: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 4729e: 4e5e unlk %fp 472a0: 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 );
472a2: 2f02 movel %d2,%sp@-
rtems_set_errno_and_return_minus_one( EACCES );
472a4: 740d moveq #13,%d2
/*
* 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 );
472a6: 4eb9 0004 3e98 jsr 43e98 <rtems_filesystem_freenode>
rtems_set_errno_and_return_minus_one( EACCES );
472ac: 4eb9 0004 fda0 jsr 4fda0 <__errno> 472b2: 588f addql #4,%sp 472b4: 2040 moveal %d0,%a0 472b6: 70ff moveq #-1,%d0 472b8: 2082 movel %d2,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
472ba: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3 472c0: 4e5e unlk %fp 472c2: 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 );
472c4: 4eb9 0004 fda0 jsr 4fda0 <__errno> 472ca: 7210 moveq #16,%d1 472cc: 2040 moveal %d0,%a0 472ce: 70ff moveq #-1,%d0
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
472d0: 4cee 0c04 ffe0 moveml %fp@(-32),%d2/%a2-%a3
* 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 );
472d6: 2081 movel %d1,%a0@
rtems_filesystem_freenode( fs_mount_loc );
free( mt_entry );
return 0;
}
472d8: 4e5e unlk %fp 472da: 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 )
472dc: 206a 0014 moveal %a2@(20),%a0 <== NOT EXECUTED 472e0: 2f0a movel %a2,%sp@- <== NOT EXECUTED 472e2: 2068 0020 moveal %a0@(32),%a0 <== NOT EXECUTED 472e6: 4e90 jsr %a0@ <== NOT EXECUTED 472e8: 588f addql #4,%sp <== NOT EXECUTED 472ea: 4a80 tstl %d0 <== NOT EXECUTED 472ec: 6700 ff54 beqw 47242 <unmount+0x9a> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
472f0: 42a7 clrl %sp@- <== NOT EXECUTED 472f2: 4eb9 0004 84a8 jsr 484a8 <rtems_fatal_error_occurred> <== NOT EXECUTED
00047094 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
47094: 4e56 ffdc linkw %fp,#-36 47098: 48d7 040c moveml %d2-%d3/%a2,%sp@ 4709c: 262e 0008 movel %fp@(8),%d3
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
470a0: 240e movel %fp,%d2 470a2: 0682 ffff ffec addil #-20,%d2 470a8: 2f03 movel %d3,%sp@-
int utime(
const char *path,
const struct utimbuf *times
)
{
470aa: 246e 000c moveal %fp@(12),%a2
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
470ae: 4eb9 0005 1cc8 jsr 51cc8 <strlen> 470b4: 7201 moveq #1,%d1 470b6: 2e81 movel %d1,%sp@ 470b8: 2f02 movel %d2,%sp@- 470ba: 42a7 clrl %sp@- 470bc: 2f00 movel %d0,%sp@- 470be: 2f03 movel %d3,%sp@- 470c0: 4eb9 0004 36b0 jsr 436b0 <rtems_filesystem_evaluate_path> 470c6: 4fef 0014 lea %sp@(20),%sp 470ca: 4a80 tstl %d0
470cc: 6638 bnes 47106 <utime+0x72>
return -1;
if ( times == NULL ) {
470ce: 4a8a tstl %a2
470d0: 6740 beqs 47112 <utime+0x7e> <== NEVER TAKEN
470d2: 2212 movel %a2@,%d1 470d4: 202a 0004 movel %a2@(4),%d0
now.actime = now.modtime = time( NULL );
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
470d8: 2f00 movel %d0,%sp@- 470da: 206e fff8 moveal %fp@(-8),%a0 470de: 2f01 movel %d1,%sp@- 470e0: 2f02 movel %d2,%sp@- 470e2: 2068 0030 moveal %a0@(48),%a0 470e6: 4e90 jsr %a0@
rtems_filesystem_freenode( &temp_loc );
470e8: 2f02 movel %d2,%sp@- 470ea: 2d40 ffe8 movel %d0,%fp@(-24) 470ee: 4eb9 0004 3b8c jsr 43b8c <rtems_filesystem_freenode>
return result;
470f4: 202e ffe8 movel %fp@(-24),%d0 470f8: 4fef 0010 lea %sp@(16),%sp
}
470fc: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 47102: 4e5e unlk %fp 47104: 4e75 rts
rtems_filesystem_location_info_t temp_loc;
int result;
struct utimbuf now;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
47106: 70ff moveq #-1,%d0
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
rtems_filesystem_freenode( &temp_loc );
return result;
}
47108: 4cee 040c ffdc moveml %fp@(-36),%d2-%d3/%a2 4710e: 4e5e unlk %fp 47110: 4e75 rts
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) )
return -1;
if ( times == NULL ) {
now.actime = now.modtime = time( NULL );
47112: 42a7 clrl %sp@- <== NOT EXECUTED 47114: 4eb9 0005 3fa8 jsr 53fa8 <time> <== NOT EXECUTED 4711a: 588f addql #4,%sp <== NOT EXECUTED 4711c: 2200 movel %d0,%d1 <== NOT EXECUTED
times = &now;
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
4711e: 2f00 movel %d0,%sp@- <== NOT EXECUTED 47120: 206e fff8 moveal %fp@(-8),%a0 <== NOT EXECUTED 47124: 2f01 movel %d1,%sp@- <== NOT EXECUTED 47126: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47128: 2068 0030 moveal %a0@(48),%a0 <== NOT EXECUTED 4712c: 4e90 jsr %a0@ <== NOT EXECUTED
rtems_filesystem_freenode( &temp_loc );
4712e: 2f02 movel %d2,%sp@- <== NOT EXECUTED 47130: 2d40 ffe8 movel %d0,%fp@(-24) <== NOT EXECUTED 47134: 4eb9 0004 3b8c jsr 43b8c <rtems_filesystem_freenode> <== NOT EXECUTED
return result;
4713a: 202e ffe8 movel %fp@(-24),%d0 <== NOT EXECUTED 4713e: 4fef 0010 lea %sp@(16),%sp <== NOT EXECUTED 47142: 60b8 bras 470fc <utime+0x68> <== NOT EXECUTED
00045b74 <vprintk>:
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45b74: 4e56 ffc0 linkw %fp,#-64 45b78: 48d7 3cfc moveml %d2-%d7/%a2-%a5,%sp@ 45b7c: 246e 0008 moveal %fp@(8),%a2
for (; *fmt != '\0'; fmt++) {
45b80: 1012 moveb %a2@,%d0
*/
void vprintk(
const char *fmt,
va_list ap
)
{
45b82: 2a6e 000c moveal %fp@(12),%a5
for (; *fmt != '\0'; fmt++) {
45b86: 6728 beqs 45bb0 <vprintk+0x3c> <== NEVER TAKEN
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45b88: 2a0e movel %fp,%d5 45b8a: 0685 ffff ffec addil #-20,%d5 45b90: 49f9 0005 d3a5 lea 5d3a5 <rtems_filesystem_default_pathconf+0x41>,%a4
bool minus = false;
bool sign = false;
char lead = ' ';
char c;
if (*fmt != '%') {
45b96: 49c0 extbl %d0 45b98: 7225 moveq #37,%d1 45b9a: b280 cmpl %d0,%d1
45b9c: 671c beqs 45bba <vprintk+0x46>
BSP_output_char(*fmt);
45b9e: 2f00 movel %d0,%sp@- 45ba0: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45ba6: 4e90 jsr %a0@
continue;
45ba8: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45baa: 528a addql #1,%a2 45bac: 1012 moveb %a2@,%d0
45bae: 66e6 bnes 45b96 <vprintk+0x22>
sign,
width,
lead
);
}
}
45bb0: 4cee 3cfc ffc0 moveml %fp@(-64),%d2-%d7/%a2-%a5 45bb6: 4e5e unlk %fp 45bb8: 4e75 rts
if (*fmt != '%') {
BSP_output_char(*fmt);
continue;
}
fmt++;
45bba: 528a addql #1,%a2
if (*fmt == '0' ) {
45bbc: 7430 moveq #48,%d2 45bbe: 1012 moveb %a2@,%d0 45bc0: 1200 moveb %d0,%d1 45bc2: 49c1 extbl %d1 45bc4: b481 cmpl %d1,%d2 45bc6: 6700 021a beqw 45de2 <vprintk+0x26e>
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
bool sign = false;
char lead = ' ';
45bca: 7e20 moveq #32,%d7
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
45bcc: 762d moveq #45,%d3 45bce: b681 cmpl %d1,%d3 45bd0: 6700 01e4 beqw 45db6 <vprintk+0x242>
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45bd4: 0680 ffff ffd0 addil #-48,%d0 45bda: 7c09 moveq #9,%d6 45bdc: 0280 0000 00ff andil #255,%d0
{
for (; *fmt != '\0'; fmt++) {
unsigned base = 0;
unsigned width = 0;
bool lflag = false;
bool minus = false;
45be2: 4204 clrb %d4
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45be4: bc80 cmpl %d0,%d6 45be6: 6500 01ec bcsw 45dd4 <vprintk+0x260>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45bea: 41ea 0001 lea %a2@(1),%a0 45bee: 4282 clrl %d2
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
width *= 10;
45bf0: 2602 movel %d2,%d3
width += ((unsigned) *fmt - '0');
45bf2: 2448 moveal %a0,%a2
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45bf4: 5288 addql #1,%a0 45bf6: 7c09 moveq #9,%d6
width *= 10;
45bf8: e78b lsll #3,%d3
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45bfa: 1012 moveb %a2@,%d0
width *= 10;
45bfc: 2243 moveal %d3,%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45bfe: 2600 movel %d0,%d3 45c00: 0683 ffff ffd0 addil #-48,%d3
width *= 10;
45c06: 43f1 2a00 lea %a1@(00000000,%d2:l:2),%a1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c0a: 0283 0000 00ff andil #255,%d3
width *= 10;
width += ((unsigned) *fmt - '0');
45c10: 43f1 18d0 lea %a1@(ffffffd0,%d1:l),%a1 45c14: 1200 moveb %d0,%d1 45c16: 2409 movel %a1,%d2 45c18: 49c1 extbl %d1
}
if (*fmt == '-' ) {
minus = true;
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45c1a: bc83 cmpl %d3,%d6
45c1c: 64d2 bccs 45bf0 <vprintk+0x7c>
45c1e: 1200 moveb %d0,%d1
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45c20: 706c moveq #108,%d0 45c22: 49c1 extbl %d1 45c24: b081 cmpl %d1,%d0 45c26: 6700 008e beqw 45cb6 <vprintk+0x142>
lflag = true;
c = *++fmt;
}
if ( c == 'c' ) {
45c2a: 7663 moveq #99,%d3 45c2c: b681 cmpl %d1,%d3 45c2e: 6700 0094 beqw 45cc4 <vprintk+0x150>
/* 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' ) {
45c32: 7c73 moveq #115,%d6 45c34: bc81 cmpl %d1,%d6 45c36: 6700 01b8 beqw 45df0 <vprintk+0x27c>
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
45c3a: 766f moveq #111,%d3 45c3c: b681 cmpl %d1,%d3 45c3e: 6700 0168 beqw 45da8 <vprintk+0x234> 45c42: 7c4f moveq #79,%d6 45c44: bc81 cmpl %d1,%d6 45c46: 6700 0160 beqw 45da8 <vprintk+0x234>
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
45c4a: 163c 0069 moveb #105,%d3 45c4e: b681 cmpl %d1,%d3 45c50: 6700 0090 beqw 45ce2 <vprintk+0x16e> 45c54: 1c3c 0049 moveb #73,%d6 45c58: bc81 cmpl %d1,%d6 45c5a: 6700 0086 beqw 45ce2 <vprintk+0x16e> 45c5e: 163c 0064 moveb #100,%d3 45c62: b681 cmpl %d1,%d3
45c64: 677c beqs 45ce2 <vprintk+0x16e>
c == 'd' || c == 'D' ) {
45c66: 1c3c 0044 moveb #68,%d6 45c6a: bc81 cmpl %d1,%d6
45c6c: 6774 beqs 45ce2 <vprintk+0x16e> <== NEVER TAKEN
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
45c6e: 163c 0075 moveb #117,%d3 45c72: b681 cmpl %d1,%d3 45c74: 6700 0258 beqw 45ece <vprintk+0x35a> 45c78: 1c3c 0055 moveb #85,%d6 45c7c: bc81 cmpl %d1,%d6 45c7e: 6700 024e beqw 45ece <vprintk+0x35a>
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
45c82: 163c 0078 moveb #120,%d3 45c86: b681 cmpl %d1,%d3 45c88: 6700 0264 beqw 45eee <vprintk+0x37a> 45c8c: 1c3c 0058 moveb #88,%d6 45c90: bc81 cmpl %d1,%d6 45c92: 6700 025a beqw 45eee <vprintk+0x37a>
base = 16; sign = false;
} else if ( c == 'p' ) {
45c96: 7070 moveq #112,%d0 45c98: b081 cmpl %d1,%d0 45c9a: 6700 0260 beqw 45efc <vprintk+0x388>
base = 16; sign = false; lflag = true;
} else {
BSP_output_char(c);
45c9e: 2f01 movel %d1,%sp@- 45ca0: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45ca6: 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);
45ca8: 4e90 jsr %a0@
continue;
45caa: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45cac: 1012 moveb %a2@,%d0 45cae: 6600 fee6 bnew 45b96 <vprintk+0x22>
45cb2: 6000 fefc braw 45bb0 <vprintk+0x3c> <== NOT EXECUTED
fmt++;
}
if ((c = *fmt) == 'l') {
lflag = true;
c = *++fmt;
45cb6: 528a addql #1,%a2
}
if ( c == 'c' ) {
45cb8: 7663 moveq #99,%d3 45cba: 1212 moveb %a2@,%d1 45cbc: 49c1 extbl %d1 45cbe: b681 cmpl %d1,%d3 45cc0: 6600 ff70 bnew 45c32 <vprintk+0xbe>
/* need a cast here since va_arg() only takes fully promoted types */
char chr = (char) va_arg(ap, int);
45cc4: 2015 movel %a5@,%d0
BSP_output_char(chr);
45cc6: 49c0 extbl %d0
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45cc8: 528a addql #1,%a2
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);
45cca: 588d addql #4,%a5
BSP_output_char(chr);
45ccc: 2f00 movel %d0,%sp@- 45cce: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45cd4: 4e90 jsr %a0@
continue;
45cd6: 588f addql #4,%sp
void vprintk(
const char *fmt,
va_list ap
)
{
for (; *fmt != '\0'; fmt++) {
45cd8: 1012 moveb %a2@,%d0 45cda: 6600 feba bnew 45b96 <vprintk+0x22>
45cde: 6000 fed0 braw 45bb0 <vprintk+0x3c> <== NOT EXECUTED
} else {
BSP_output_char(c);
continue;
}
printNum(
45ce2: 49c7 extbl %d7
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
45ce4: 760a moveq #10,%d3 45ce6: 7201 moveq #1,%d1
} else {
BSP_output_char(c);
continue;
}
printNum(
45ce8: 2d47 ffe8 movel %d7,%fp@(-24) 45cec: 2815 movel %a5@,%d4
lflag ? va_arg(ap, long) : (long) va_arg(ap, int),
45cee: 588d addql #4,%a5
unsigned long unsigned_num;
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
45cf0: 4a01 tstb %d1
45cf2: 6706 beqs 45cfa <vprintk+0x186>
45cf4: 4a84 tstl %d4 45cf6: 6d00 01a0 bltw 45e98 <vprintk+0x324>
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45cfa: 2004 movel %d4,%d0 45cfc: 4c43 0000 remul %d3,%d0,%d0 45d00: 6700 01b8 beqw 45eba <vprintk+0x346> 45d04: 2045 moveal %d5,%a0 45d06: 2200 movel %d0,%d1 45d08: 3243 moveaw %d3,%a1 45d0a: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45d0e: 3c09 movew %a1,%d6 45d10: cdc0 mulsw %d0,%d6 45d12: 9886 subl %d6,%d4 45d14: 2c04 movel %d4,%d6
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45d16: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45d18: 10c6 moveb %d6,%a0@+ 45d1a: 2648 moveal %a0,%a3 45d1c: 97c5 subal %d5,%a3
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45d1e: 4a81 tstl %d1
45d20: 671c beqs 45d3e <vprintk+0x1ca>
45d22: 2001 movel %d1,%d0 45d24: 2200 movel %d0,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45d26: 3c09 movew %a1,%d6
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45d28: 4c43 1001 remul %d3,%d1,%d1
toPrint[count++] = (char) (unsigned_num - (n * base));
45d2c: cdc0 mulsw %d0,%d6 45d2e: 9886 subl %d6,%d4 45d30: 2c04 movel %d4,%d6
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45d32: 2800 movel %d0,%d4
toPrint[count++] = (char) (unsigned_num - (n * base));
45d34: 10c6 moveb %d6,%a0@+ 45d36: 2648 moveal %a0,%a3 45d38: 97c5 subal %d5,%a3
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45d3a: 4a81 tstl %d1
45d3c: 66e4 bnes 45d22 <vprintk+0x1ae>
45d3e: 260b movel %a3,%d3 45d40: 5283 addql #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45d42: 1d80 b8ec moveb %d0,%fp@(ffffffec,%a3:l)
for (n=maxwidth ; n > count; n-- )
45d46: b682 cmpl %d2,%d3
45d48: 6414 bccs 45d5e <vprintk+0x1ea>
BSP_output_char(lead);
45d4a: 2f2e ffe8 movel %fp@(-24),%sp@-
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45d4e: 5382 subql #1,%d2
BSP_output_char(lead);
45d50: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45d56: 4e90 jsr %a0@
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
45d58: 588f addql #4,%sp 45d5a: b682 cmpl %d2,%d3
45d5c: 65ec bcss 45d4a <vprintk+0x1d6>
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45d5e: 4a83 tstl %d3 45d60: 6700 fe48 beqw 45baa <vprintk+0x36>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45d64: 2645 moveal %d5,%a3 45d66: d7c3 addal %d3,%a3 45d68: 4282 clrl %d2
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45d6a: 2079 0005 e36c moveal 5e36c <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++) {
45d70: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45d72: 1023 moveb %a3@-,%d0 45d74: 49c0 extbl %d0 45d76: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 45d7a: 49c0 extbl %d0 45d7c: 2f00 movel %d0,%sp@- 45d7e: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45d80: 588f addql #4,%sp 45d82: b682 cmpl %d2,%d3 45d84: 6300 fe24 blsw 45baa <vprintk+0x36>
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45d88: 2079 0005 e36c moveal 5e36c <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++) {
45d8e: 5282 addql #1,%d2
BSP_output_char("0123456789ABCDEF"[(int)(toPrint[count-(n+1)])]);
45d90: 1023 moveb %a3@-,%d0 45d92: 49c0 extbl %d0 45d94: 1034 0800 moveb %a4@(00000000,%d0:l),%d0 45d98: 49c0 extbl %d0 45d9a: 2f00 movel %d0,%sp@- 45d9c: 4e90 jsr %a0@
toPrint[count++] = (char) unsigned_num;
for (n=maxwidth ; n > count; n-- )
BSP_output_char(lead);
for (n = 0; n < count; n++) {
45d9e: 588f addql #4,%sp 45da0: b682 cmpl %d2,%d3
45da2: 62c6 bhis 45d6a <vprintk+0x1f6>
45da4: 6000 fe04 braw 45baa <vprintk+0x36>
} else {
BSP_output_char(c);
continue;
}
printNum(
45da8: 49c7 extbl %d7 <== NOT EXECUTED
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45daa: 7608 moveq #8,%d3 <== NOT EXECUTED
} else {
BSP_output_char(c);
continue;
}
printNum(
45dac: 2d47 ffe8 movel %d7,%fp@(-24) <== NOT EXECUTED
continue;
}
/* must be a numeric format or something unsupported */
if ( c == 'o' || c == 'O' ) {
base = 8; sign = false;
45db0: 4201 clrb %d1 <== NOT EXECUTED 45db2: 6000 ff38 braw 45cec <vprintk+0x178> <== NOT EXECUTED
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
45db6: 528a addql #1,%a2
}
while (*fmt >= '0' && *fmt <= '9' ) {
45db8: 7c09 moveq #9,%d6
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
fmt++;
45dba: 1012 moveb %a2@,%d0
if (*fmt == '0' ) {
lead = '0';
fmt++;
}
if (*fmt == '-' ) {
minus = true;
45dbc: 7801 moveq #1,%d4 45dbe: 1200 moveb %d0,%d1
fmt++;
}
while (*fmt >= '0' && *fmt <= '9' ) {
45dc0: 0680 ffff ffd0 addil #-48,%d0 45dc6: 0280 0000 00ff andil #255,%d0 45dcc: 49c1 extbl %d1 45dce: bc80 cmpl %d0,%d6 45dd0: 6400 fe18 bccw 45bea <vprintk+0x76> 45dd4: 4282 clrl %d2
width *= 10;
width += ((unsigned) *fmt - '0');
fmt++;
}
if ((c = *fmt) == 'l') {
45dd6: 706c moveq #108,%d0 45dd8: b081 cmpl %d1,%d0 45dda: 6600 fe4e bnew 45c2a <vprintk+0xb6> 45dde: 6000 fed6 braw 45cb6 <vprintk+0x142>
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
fmt++;
45de2: 528a addql #1,%a2 45de4: 1012 moveb %a2@,%d0
BSP_output_char(*fmt);
continue;
}
fmt++;
if (*fmt == '0' ) {
lead = '0';
45de6: 7e30 moveq #48,%d7 45de8: 1200 moveb %d0,%d1 45dea: 49c1 extbl %d1 45dec: 6000 fdde braw 45bcc <vprintk+0x58>
}
if ( c == 's' ) {
unsigned i, len;
char *s, *str;
str = va_arg(ap, char *);
45df0: 2655 moveal %a5@,%a3 45df2: 588d addql #4,%a5
if ( str == NULL ) {
45df4: 4a8b tstl %a3 45df6: 6700 00e4 beqw 45edc <vprintk+0x368>
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45dfa: 4a13 tstb %a3@ 45dfc: 6700 00ea beqw 45ee8 <vprintk+0x374>
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45e00: 41eb 0001 lea %a3@(1),%a0
if ( str == NULL ) {
str = "";
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45e04: 4283 clrl %d3 45e06: 5283 addql #1,%d3 45e08: 4a18 tstb %a0@+
45e0a: 66fa bnes 45e06 <vprintk+0x292>
;
/* leading spaces */
if ( !minus )
45e0c: 4a04 tstb %d4
45e0e: 661a bnes 45e2a <vprintk+0x2b6>
for ( i=len ; i<width ; i++ )
45e10: b483 cmpl %d3,%d2
45e12: 6316 blss 45e2a <vprintk+0x2b6> <== ALWAYS TAKEN
45e14: 2c03 movel %d3,%d6 <== NOT EXECUTED
BSP_output_char(' ');
45e16: 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++ )
45e1a: 5286 addql #1,%d6 <== NOT EXECUTED
BSP_output_char(' ');
45e1c: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 <== NOT EXECUTED 45e22: 4e90 jsr %a0@ <== NOT EXECUTED
for ( len=0, s=str ; *s ; len++, s++ )
;
/* leading spaces */
if ( !minus )
for ( i=len ; i<width ; i++ )
45e24: 588f addql #4,%sp <== NOT EXECUTED 45e26: b486 cmpl %d6,%d2 <== NOT EXECUTED 45e28: 62ec bhis 45e16 <vprintk+0x2a2> <== NOT EXECUTED
BSP_output_char(' ');
/* no width option */
if (width == 0) {
45e2a: 4a82 tstl %d2
45e2c: 6606 bnes 45e34 <vprintk+0x2c0>
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45e2e: 4a83 tstl %d3
45e30: 672c beqs 45e5e <vprintk+0x2ea>
45e32: 2403 movel %d3,%d2 45e34: 1013 moveb %a3@,%d0
45e36: 6726 beqs 45e5e <vprintk+0x2ea> <== NEVER TAKEN
BSP_output_char(*str);
45e38: 49c0 extbl %d0
* console is not yet initialized or in ISR's. * * Arguments: * as in printf: fmt - format string, ... - unnamed arguments. */ void vprintk(
45e3a: 528b addql #1,%a3
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
45e3c: 2f00 movel %d0,%sp@- 45e3e: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45e44: 4e90 jsr %a0@ 45e46: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45e48: 101b moveb %a3@+,%d0
45e4a: 6712 beqs 45e5e <vprintk+0x2ea>
BSP_output_char(*str);
45e4c: 49c0 extbl %d0 45e4e: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45e54: 2f00 movel %d0,%sp@- 45e56: 4e90 jsr %a0@ 45e58: 588f addql #4,%sp
if (width == 0) {
width = len;
}
/* output the string */
for ( i=0 ; i<width && *str ; str++ )
45e5a: 101b moveb %a3@+,%d0
45e5c: 66ee bnes 45e4c <vprintk+0x2d8>
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
45e5e: 4a04 tstb %d4 45e60: 6700 fd48 beqw 45baa <vprintk+0x36>
for ( i=len ; i<width ; i++ )
45e64: b483 cmpl %d3,%d2 45e66: 6300 fd42 blsw 45baa <vprintk+0x36>
BSP_output_char(' ');
45e6a: 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++ )
45e6e: 5283 addql #1,%d3
BSP_output_char(' ');
45e70: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45e76: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45e78: 588f addql #4,%sp 45e7a: b483 cmpl %d3,%d2 45e7c: 6300 fd2c blsw 45baa <vprintk+0x36>
BSP_output_char(' ');
45e80: 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++ )
45e84: 5283 addql #1,%d3
BSP_output_char(' ');
45e86: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 45e8c: 4e90 jsr %a0@
for ( i=0 ; i<width && *str ; str++ )
BSP_output_char(*str);
/* trailing spaces */
if ( minus )
for ( i=len ; i<width ; i++ )
45e8e: 588f addql #4,%sp 45e90: b483 cmpl %d3,%d2
45e92: 62d6 bhis 45e6a <vprintk+0x2f6>
45e94: 6000 fd14 braw 45baa <vprintk+0x36>
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45e98: 4878 002d pea 2d <OPER2+0x19> <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
45e9c: 4484 negl %d4 <== NOT EXECUTED
unsigned long n;
unsigned count;
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
45e9e: 2079 0005 e36c moveal 5e36c <BSP_output_char>,%a0 <== NOT EXECUTED 45ea4: 4e90 jsr %a0@ <== NOT EXECUTED
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45ea6: 588f addql #4,%sp <== NOT EXECUTED 45ea8: 4a82 tstl %d2 <== NOT EXECUTED 45eaa: 6700 fe4e beqw 45cfa <vprintk+0x186> <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45eae: 2004 movel %d4,%d0 <== NOT EXECUTED
char toPrint[20];
if ( sign && (num < 0) ) {
BSP_output_char('-');
unsigned_num = (unsigned long) -num;
if (maxwidth) maxwidth--;
45eb0: 5382 subql #1,%d2 <== NOT EXECUTED
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
while ((n = unsigned_num / base) > 0) {
45eb2: 4c43 0000 remul %d3,%d0,%d0 <== NOT EXECUTED 45eb6: 6600 fe4c bnew 45d04 <vprintk+0x190> <== NOT EXECUTED
45eba: 2004 movel %d4,%d0
if (maxwidth) maxwidth--;
} else {
unsigned_num = (unsigned long) num;
}
count = 0;
45ebc: 97cb subal %a3,%a3
while ((n = unsigned_num / base) > 0) {
45ebe: 7601 moveq #1,%d3
toPrint[count++] = (char) (unsigned_num - (n * base));
unsigned_num = n;
}
toPrint[count++] = (char) unsigned_num;
45ec0: 1d80 b8ec moveb %d0,%fp@(ffffffec,%a3:l)
for (n=maxwidth ; n > count; n-- )
45ec4: b682 cmpl %d2,%d3 45ec6: 6500 fe82 bcsw 45d4a <vprintk+0x1d6> 45eca: 6000 fe92 braw 45d5e <vprintk+0x1ea>
} else {
BSP_output_char(c);
continue;
}
printNum(
45ece: 49c7 extbl %d7
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
45ed0: 760a moveq #10,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
45ed2: 2d47 ffe8 movel %d7,%fp@(-24)
base = 8; sign = false;
} else if ( c == 'i' || c == 'I' ||
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
45ed6: 4201 clrb %d1 45ed8: 6000 fe12 braw 45cec <vprintk+0x178>
char *s, *str;
str = va_arg(ap, char *);
if ( str == NULL ) {
str = "";
45edc: 47f9 0005 d3a4 lea 5d3a4 <rtems_filesystem_default_pathconf+0x40>,%a3
}
/* calculate length of string */
for ( len=0, s=str ; *s ; len++, s++ )
45ee2: 4a13 tstb %a3@ 45ee4: 6600 ff1a bnew 45e00 <vprintk+0x28c> 45ee8: 4283 clrl %d3 45eea: 6000 ff20 braw 45e0c <vprintk+0x298>
} else {
BSP_output_char(c);
continue;
}
printNum(
45eee: 49c7 extbl %d7
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
45ef0: 7610 moveq #16,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
45ef2: 2d47 ffe8 movel %d7,%fp@(-24)
c == 'd' || c == 'D' ) {
base = 10; sign = true;
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
45ef6: 4201 clrb %d1 45ef8: 6000 fdf2 braw 45cec <vprintk+0x178>
} else {
BSP_output_char(c);
continue;
}
printNum(
45efc: 49c7 extbl %d7
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
45efe: 7610 moveq #16,%d3
} else {
BSP_output_char(c);
continue;
}
printNum(
45f00: 2d47 ffe8 movel %d7,%fp@(-24)
} else if ( c == 'u' || c == 'U' ) {
base = 10; sign = false;
} else if ( c == 'x' || c == 'X' ) {
base = 16; sign = false;
} else if ( c == 'p' ) {
base = 16; sign = false; lflag = true;
45f04: 4201 clrb %d1 45f06: 6000 fde4 braw 45cec <vprintk+0x178>
...
0005c040 <write>:
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
5c040: 4e56 fff4 linkw %fp,#-12 5c044: 202e 0008 movel %fp@(8),%d0 5c048: 222e 000c movel %fp@(12),%d1 5c04c: 206e 0010 moveal %fp@(16),%a0 5c050: 48d7 040c moveml %d2-%d3/%a2,%sp@
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
5c054: b0b9 0005 e274 cmpl 5e274 <rtems_libio_number_iops>,%d0
5c05a: 6468 bccs 5c0c4 <write+0x84> iop = rtems_libio_iop( fd );
5c05c: 2400 movel %d0,%d2 5c05e: ed88 lsll #6,%d0 5c060: e78a lsll #3,%d2 5c062: 2479 0005 f984 moveal 5f984 <rtems_libio_iops>,%a2 5c068: 9082 subl %d2,%d0 5c06a: d5c0 addal %d0,%a2
rtems_libio_check_is_open( iop );
5c06c: 202a 0014 movel %a2@(20),%d0 5c070: 0800 0008 btst #8,%d0
5c074: 674e beqs 5c0c4 <write+0x84> rtems_libio_check_buffer( buffer );
5c076: 4a81 tstl %d1
5c078: 6762 beqs 5c0dc <write+0x9c> <== NEVER TAKEN
rtems_libio_check_count( count );
5c07a: 4a88 tstl %a0
5c07c: 673a beqs 5c0b8 <write+0x78> <== NEVER TAKEN
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5c07e: 44c0 movew %d0,%ccr
5c080: 665a bnes 5c0dc <write+0x9c> <== NEVER TAKEN
return 0;
/*
* Now process the write() request.
*/
rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count );
5c082: 226a 0020 moveal %a2@(32),%a1 5c086: 2f08 movel %a0,%sp@- 5c088: 2f01 movel %d1,%sp@- 5c08a: 2f0a movel %a2,%sp@- 5c08c: 2069 000c moveal %a1@(12),%a0 5c090: 4e90 jsr %a0@
if ( rc > 0 )
5c092: 4fef 000c lea %sp@(12),%sp 5c096: 4a80 tstl %d0
5c098: 6f14 bles 5c0ae <write+0x6e>
iop->offset += rc;
5c09a: 2400 movel %d0,%d2 5c09c: 5bc1 smi %d1 5c09e: 49c1 extbl %d1 5c0a0: d5aa 0010 addl %d2,%a2@(16) 5c0a4: 262a 000c movel %a2@(12),%d3 5c0a8: d781 addxl %d1,%d3 5c0aa: 2543 000c movel %d3,%a2@(12)
return rc;
}
5c0ae: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c0b4: 4e5e unlk %fp 5c0b6: 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 );
5c0b8: 4280 clrl %d0
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5c0ba: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c0c0: 4e5e unlk %fp 5c0c2: 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 );
5c0c4: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> 5c0ca: 7409 moveq #9,%d2 5c0cc: 2040 moveal %d0,%a0 5c0ce: 70ff moveq #-1,%d0 5c0d0: 2082 movel %d2,%a0@
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5c0d2: 4cee 040c fff4 moveml %fp@(-12),%d2-%d3/%a2 5c0d8: 4e5e unlk %fp 5c0da: 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_WRITE );
5c0dc: 4eb9 0004 e9f4 jsr 4e9f4 <__errno> <== NOT EXECUTED 5c0e2: 7216 moveq #22,%d1 <== NOT EXECUTED 5c0e4: 2040 moveal %d0,%a0 <== NOT EXECUTED 5c0e6: 70ff moveq #-1,%d0 <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5c0e8: 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 );
5c0ee: 2081 movel %d1,%a0@ <== NOT EXECUTED
if ( rc > 0 )
iop->offset += rc;
return rc;
}
5c0f0: 4e5e unlk %fp <== NOT EXECUTED
0004736c <writev>:
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
4736c: 4e56 ffe4 linkw %fp,#-28 47370: 202e 0008 movel %fp@(8),%d0 47374: 48d7 0c7c moveml %d2-%d6/%a2-%a3,%sp@ 47378: 246e 000c moveal %fp@(12),%a2 4737c: 242e 0010 movel %fp@(16),%d2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
47380: b0b9 0005 f034 cmpl 5f034 <rtems_libio_number_iops>,%d0 47386: 6400 00e8 bccw 47470 <writev+0x104>
iop = rtems_libio_iop( fd );
4738a: 2200 movel %d0,%d1 4738c: ed88 lsll #6,%d0 4738e: e789 lsll #3,%d1 47390: 2679 0006 0744 moveal 60744 <rtems_libio_iops>,%a3 47396: 9081 subl %d1,%d0 47398: d7c0 addal %d0,%a3
rtems_libio_check_is_open( iop );
4739a: 202b 0014 movel %a3@(20),%d0 4739e: 0800 0008 btst #8,%d0 473a2: 6700 00cc beqw 47470 <writev+0x104>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
473a6: 44c0 movew %d0,%ccr
473a8: 6640 bnes 473ea <writev+0x7e> <== NEVER TAKEN
/*
* Argument validation on IO vector
*/
if ( !iov )
473aa: 4a8a tstl %a2
473ac: 673c beqs 473ea <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
473ae: 4a82 tstl %d2
473b0: 6f38 bles 473ea <writev+0x7e>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
473b2: 0c82 0000 0400 cmpil #1024,%d2
473b8: 6e30 bgts 473ea <writev+0x7e> <== NEVER TAKEN
rtems_set_errno_and_return_minus_one( EINVAL );
473ba: 204a moveal %a2,%a0
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
473bc: 4281 clrl %d1 473be: 93c9 subal %a1,%a1 473c0: 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 )
473c2: 4a90 tstl %a0@
473c4: 6724 beqs 473ea <writev+0x7e> <== 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 )
473c6: 2028 0004 movel %a0@(4),%d0
all_zeros = false;
473ca: 57c4 seq %d4
/* check for wrap */
old = total;
total += iov[v].iov_len;
473cc: d089 addl %a1,%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++ ) {
473ce: 5281 addql #1,%d1 473d0: 5088 addql #8,%a0
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iov[v].iov_len )
all_zeros = false;
473d2: c684 andl %d4,%d3
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
473d4: b3c0 cmpal %d0,%a1
473d6: 6e12 bgts 473ea <writev+0x7e>
473d8: 0c80 0000 7fff cmpil #32767,%d0
473de: 6e0a bgts 473ea <writev+0x7e> <== 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++ ) {
473e0: b282 cmpl %d2,%d1
473e2: 6c20 bges 47404 <writev+0x98>
473e4: 2240 moveal %d0,%a1
if ( !iov[v].iov_base )
473e6: 4a90 tstl %a0@
473e8: 66dc bnes 473c6 <writev+0x5a>
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
rtems_set_errno_and_return_minus_one( EINVAL );
473ea: 4eb9 0004 fa80 jsr 4fa80 <__errno> 473f0: 78ff moveq #-1,%d4 473f2: 2040 moveal %d0,%a0 473f4: 7016 moveq #22,%d0 473f6: 2080 movel %d0,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
473f8: 2004 movel %d4,%d0 473fa: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 47400: 4e5e unlk %fp 47402: 4e75 rts
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
47404: 4a03 tstb %d3
47406: 661c bnes 47424 <writev+0xb8>
#include <sys/uio.h>
#include <rtems/libio_.h>
#include <rtems/seterr.h>
ssize_t writev(
47408: 588a addql #4,%a2 4740a: 4283 clrl %d3 4740c: 4284 clrl %d4
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4740e: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
47410: 2012 movel %a2@,%d0
47412: 661e bnes 47432 <writev+0xc6> <== ALWAYS TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47414: 508a addql #8,%a2 <== NOT EXECUTED 47416: b682 cmpl %d2,%d3 <== NOT EXECUTED 47418: 6cde bges 473f8 <writev+0x8c> <== NOT EXECUTED
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4741a: 2012 movel %a2@,%d0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
4741c: 5283 addql #1,%d3
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
4741e: 4a80 tstl %d0
47420: 67f2 beqs 47414 <writev+0xa8> <== NEVER TAKEN
47422: 600e bras 47432 <writev+0xc6>
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
return 0;
47424: 4284 clrl %d4
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47426: 2004 movel %d4,%d0 47428: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 4742e: 4e5e unlk %fp 47430: 4e75 rts
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
continue;
bytes = (*iop->pathinfo.handlers->write_h)(
47432: 206b 0020 moveal %a3@(32),%a0 47436: 2f00 movel %d0,%sp@- 47438: 2f2a fffc movel %a2@(-4),%sp@- 4743c: 2f0b movel %a3,%sp@- 4743e: 2068 000c moveal %a0@(12),%a0 47442: 4e90 jsr %a0@
iop,
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
47444: 4fef 000c lea %sp@(12),%sp 47448: 4a80 tstl %d0
4744a: 6d3e blts 4748a <writev+0x11e> <== NEVER TAKEN
return -1;
if ( bytes > 0 ) {
4744c: 6716 beqs 47464 <writev+0xf8> <== NEVER TAKEN
iop->offset += bytes;
total += bytes;
4744e: d880 addl %d0,%d4
if ( bytes < 0 )
return -1;
if ( bytes > 0 ) {
iop->offset += bytes;
47450: 2c00 movel %d0,%d6 47452: 5bc5 smi %d5 47454: 49c5 extbl %d5 47456: ddab 0010 addl %d6,%a3@(16) 4745a: 222b 000c movel %a3@(12),%d1 4745e: d385 addxl %d5,%d1 47460: 2741 000c movel %d1,%a3@(12)
total += bytes;
}
if (bytes != iov[ v ].iov_len)
47464: b092 cmpl %a2@,%d0
47466: 6690 bnes 473f8 <writev+0x8c> <== NEVER TAKEN
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
47468: 508a addql #8,%a2 4746a: b682 cmpl %d2,%d3
4746c: 6dac blts 4741a <writev+0xae>
4746e: 6088 bras 473f8 <writev+0x8c>
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open( iop );
47470: 4eb9 0004 fa80 jsr 4fa80 <__errno> 47476: 78ff moveq #-1,%d4 47478: 7209 moveq #9,%d1 4747a: 2040 moveal %d0,%a0
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4747c: 2004 movel %d4,%d0 4747e: 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 );
47484: 2081 movel %d1,%a0@
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
47486: 4e5e unlk %fp 47488: 4e75 rts
iov[v].iov_base,
iov[v].iov_len
);
if ( bytes < 0 )
return -1;
4748a: 78ff moveq #-1,%d4 <== NOT EXECUTED
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
4748c: 2004 movel %d4,%d0 <== NOT EXECUTED 4748e: 4cee 0c7c ffe4 moveml %fp@(-28),%d2-%d6/%a2-%a3 <== NOT EXECUTED 47494: 4e5e unlk %fp <== NOT EXECUTED